@agentic-surfaces/server 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/assets/{index-BATbs24P.js → index-CsNSnoPS.js} +89 -89
- package/dist/editor/assets/{index-CR4Gb62p.css → index-tZEgT0Bn.css} +1 -1
- package/dist/editor/index.html +2 -2
- package/dist/http.d.ts +6 -0
- package/dist/http.js +35 -1
- package/dist/serve.d.ts +7 -0
- package/dist/serve.js +6 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var QS=Object.defineProperty;var JS=(e,t,n)=>t in e?QS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ze=(e,t,n)=>JS(e,typeof t!="symbol"?t+"":t,n);function ZS(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function su(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nf={exports:{}},us={},Cf={exports:{}},Te={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var GS=Object.defineProperty;var XS=(e,t,n)=>t in e?GS(e,t,{enumerable:!0,config
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var $g;function ek(){if($g)return Te;$g=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function g(D){return D===null||typeof D!="object"?null:(D=p&&D[p]||D["@@iterator"],typeof D=="function"?D:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function b(D,H,V){this.props=D,this.context=H,this.refs=w,this.updater=V||v}b.prototype.isReactComponent={},b.prototype.setState=function(D,H){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,H,"setState")},b.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function k(){}k.prototype=b.prototype;function _(D,H,V){this.props=D,this.context=H,this.refs=w,this.updater=V||v}var E=_.prototype=new k;E.constructor=_,S(E,b.prototype),E.isPureReactComponent=!0;var N=Array.isArray,A=Object.prototype.hasOwnProperty,L={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function C(D,H,V){var K,Q={},re=null,se=null;if(H!=null)for(K in H.ref!==void 0&&(se=H.ref),H.key!==void 0&&(re=""+H.key),H)A.call(H,K)&&!R.hasOwnProperty(K)&&(Q[K]=H[K]);var ee=arguments.length-2;if(ee===1)Q.children=V;else if(1<ee){for(var oe=Array(ee),de=0;de<ee;de++)oe[de]=arguments[de+2];Q.children=oe}if(D&&D.defaultProps)for(K in ee=D.defaultProps,ee)Q[K]===void 0&&(Q[K]=ee[K]);return{$$typeof:e,type:D,key:re,ref:se,props:Q,_owner:L.current}}function P(D,H){return{$$typeof:e,type:D.type,key:H,ref:D.ref,props:D.props,_owner:D._owner}}function F(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function M(D){var H={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(V){return H[V]})}var $=/\/+/g;function Z(D,H){return typeof D=="object"&&D!==null&&D.key!=null?M(""+D.key):H.toString(36)}function j(D,H,V,K,Q){var re=typeof D;(re==="undefined"||re==="boolean")&&(D=null);var se=!1;if(D===null)se=!0;else switch(re){case"string":case"number":se=!0;break;case"object":switch(D.$$typeof){case e:case t:se=!0}}if(se)return se=D,Q=Q(se),D=K===""?"."+Z(se,0):K,N(Q)?(V="",D!=null&&(V=D.replace($,"$&/")+"/"),j(Q,H,V,"",function(de){return de})):Q!=null&&(F(Q)&&(Q=P(Q,V+(!Q.key||se&&se.key===Q.key?"":(""+Q.key).replace($,"$&/")+"/")+D)),H.push(Q)),1;if(se=0,K=K===""?".":K+":",N(D))for(var ee=0;ee<D.length;ee++){re=D[ee];var oe=K+Z(re,ee);se+=j(re,H,V,oe,Q)}else if(oe=g(D),typeof oe=="function")for(D=oe.call(D),ee=0;!(re=D.next()).done;)re=re.value,oe=K+Z(re,ee++),se+=j(re,H,V,oe,Q);else if(re==="object")throw H=String(D),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return se}function G(D,H,V){if(D==null)return D;var K=[],Q=0;return j(D,K,"","",function(re){return H.call(V,re,Q++)}),K}function q(D){if(D._status===-1){var H=D._result;H=H(),H.then(function(V){(D._status===0||D._status===-1)&&(D._status=1,D._result=V)},function(V){(D._status===0||D._status===-1)&&(D._status=2,D._result=V)}),D._status===-1&&(D._status=0,D._result=H)}if(D._status===1)return D._result.default;throw D._result}var J={current:null},Y={transition:null},W={ReactCurrentDispatcher:J,ReactCurrentBatchConfig:Y,ReactCurrentOwner:L};function B(){throw Error("act(...) is not supported in production builds of React.")}return Te.Children={map:G,forEach:function(D,H,V){G(D,function(){H.apply(this,arguments)},V)},count:function(D){var H=0;return G(D,function(){H++}),H},toArray:function(D){return G(D,function(H){return H})||[]},only:function(D){if(!F(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Te.Component=b,Te.Fragment=n,Te.Profiler=s,Te.PureComponent=_,Te.StrictMode=i,Te.Suspense=f,Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W,Te.act=B,Te.cloneElement=function(D,H,V){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var K=S({},D.props),Q=D.key,re=D.ref,se=D._owner;if(H!=null){if(H.ref!==void 0&&(re=H.ref,se=L.current),H.key!==void 0&&(Q=""+H.key),D.type&&D.type.defaultProps)var ee=D.type.defaultProps;for(oe in H)A.call(H,oe)&&!R.hasOwnProperty(oe)&&(K[oe]=H[oe]===void 0&&ee!==void 0?ee[oe]:H[oe])}var oe=arguments.length-2;if(oe===1)K.children=V;else if(1<oe){ee=Array(oe);for(var de=0;de<oe;de++)ee[de]=arguments[de+2];K.children=ee}return{$$typeof:e,type:D.type,key:Q,ref:re,props:K,_owner:se}},Te.createContext=function(D){return D={$$typeof:a,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:l,_context:D},D.Consumer=D},Te.createElement=C,Te.createFactory=function(D){var H=C.bind(null,D);return H.type=D,H},Te.createRef=function(){return{current:null}},Te.forwardRef=function(D){return{$$typeof:c,render:D}},Te.isValidElement=F,Te.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:q}},Te.memo=function(D,H){return{$$typeof:d,type:D,compare:H===void 0?null:H}},Te.startTransition=function(D){var H=Y.transition;Y.transition={};try{D()}finally{Y.transition=H}},Te.unstable_act=B,Te.useCallback=function(D,H){return J.current.useCallback(D,H)},Te.useContext=function(D){return J.current.useContext(D)},Te.useDebugValue=function(){},Te.useDeferredValue=function(D){return J.current.useDeferredValue(D)},Te.useEffect=function(D,H){return J.current.useEffect(D,H)},Te.useId=function(){return J.current.useId()},Te.useImperativeHandle=function(D,H,V){return J.current.useImperativeHandle(D,H,V)},Te.useInsertionEffect=function(D,H){return J.current.useInsertionEffect(D,H)},Te.useLayoutEffect=function(D,H){return J.current.useLayoutEffect(D,H)},Te.useMemo=function(D,H){return J.current.useMemo(D,H)},Te.useReducer=function(D,H,V){return J.current.useReducer(D,H,V)},Te.useRef=function(D){return J.current.useRef(D)},Te.useState=function(D){return J.current.useState(D)},Te.useSyncExternalStore=function(D,H,V){return J.current.useSyncExternalStore(D,H,V)},Te.useTransition=function(){return J.current.useTransition()},Te.version="18.3.1",Te}var zg;function Ls(){return zg||(zg=1,Cf.exports=ek()),Cf.exports}/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var GS=Object.defineProperty;var XS=(e,t,n)=>t in e?GS(e,t,{enumerable:!0,config
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Fg;function tk(){if(Fg)return us;Fg=1;var e=Ls(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(c,f,d){var m,p={},g=null,v=null;d!==void 0&&(g=""+d),f.key!==void 0&&(g=""+f.key),f.ref!==void 0&&(v=f.ref);for(m in f)i.call(f,m)&&!l.hasOwnProperty(m)&&(p[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)p[m]===void 0&&(p[m]=f[m]);return{$$typeof:t,type:c,key:g,ref:v,props:p,_owner:s.current}}return us.Fragment=n,us.jsx=a,us.jsxs=a,us}var Bg;function nk(){return Bg||(Bg=1,Nf.exports=tk()),Nf.exports}var O=nk(),T=Ls();const bh=su(T),Sh=ZS({__proto__:null,default:bh},[T]);var la={},If={exports:{}},Pt={},Tf={exports:{}},Pf={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.min.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var GS=Object.defineProperty;var XS=(e,t,n)=>t in e?GS(e,t,{enumerable:!0,config
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var
|
|
25
|
+
*/var Vg;function rk(){return Vg||(Vg=1,(function(e){function t(Y,W){var B=Y.length;Y.push(W);e:for(;0<B;){var D=B-1>>>1,H=Y[D];if(0<s(H,W))Y[D]=W,Y[B]=H,B=D;else break e}}function n(Y){return Y.length===0?null:Y[0]}function i(Y){if(Y.length===0)return null;var W=Y[0],B=Y.pop();if(B!==W){Y[0]=B;e:for(var D=0,H=Y.length,V=H>>>1;D<V;){var K=2*(D+1)-1,Q=Y[K],re=K+1,se=Y[re];if(0>s(Q,B))re<H&&0>s(se,Q)?(Y[D]=se,Y[re]=B,D=re):(Y[D]=Q,Y[K]=B,D=K);else if(re<H&&0>s(se,B))Y[D]=se,Y[re]=B,D=re;else break e}}return W}function s(Y,W){var B=Y.sortIndex-W.sortIndex;return B!==0?B:Y.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],d=[],m=1,p=null,g=3,v=!1,S=!1,w=!1,b=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,_=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(Y){for(var W=n(d);W!==null;){if(W.callback===null)i(d);else if(W.startTime<=Y)i(d),W.sortIndex=W.expirationTime,t(f,W);else break;W=n(d)}}function N(Y){if(w=!1,E(Y),!S)if(n(f)!==null)S=!0,q(A);else{var W=n(d);W!==null&&J(N,W.startTime-Y)}}function A(Y,W){S=!1,w&&(w=!1,k(C),C=-1),v=!0;var B=g;try{for(E(W),p=n(f);p!==null&&(!(p.expirationTime>W)||Y&&!M());){var D=p.callback;if(typeof D=="function"){p.callback=null,g=p.priorityLevel;var H=D(p.expirationTime<=W);W=e.unstable_now(),typeof H=="function"?p.callback=H:p===n(f)&&i(f),E(W)}else i(f);p=n(f)}if(p!==null)var V=!0;else{var K=n(d);K!==null&&J(N,K.startTime-W),V=!1}return V}finally{p=null,g=B,v=!1}}var L=!1,R=null,C=-1,P=5,F=-1;function M(){return!(e.unstable_now()-F<P)}function $(){if(R!==null){var Y=e.unstable_now();F=Y;var W=!0;try{W=R(!0,Y)}finally{W?Z():(L=!1,R=null)}}else L=!1}var Z;if(typeof _=="function")Z=function(){_($)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,G=j.port2;j.port1.onmessage=$,Z=function(){G.postMessage(null)}}else Z=function(){b($,0)};function q(Y){R=Y,L||(L=!0,Z())}function J(Y,W){C=b(function(){Y(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Y){Y.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,q(A))},e.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<Y?Math.floor(1e3/Y):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(Y){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var B=g;g=W;try{return Y()}finally{g=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Y,W){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var B=g;g=Y;try{return W()}finally{g=B}},e.unstable_scheduleCallback=function(Y,W,B){var D=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?D+B:D):B=D,Y){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=B+H,Y={id:m++,callback:W,priorityLevel:Y,startTime:B,expirationTime:H,sortIndex:-1},B>D?(Y.sortIndex=B,t(d,Y),n(f)===null&&Y===n(d)&&(w?(k(C),C=-1):w=!0,J(N,B-D))):(Y.sortIndex=H,t(f,Y),S||v||(S=!0,q(A))),Y},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(Y){var W=g;return function(){var B=g;g=W;try{return Y.apply(this,arguments)}finally{g=B}}}})(Pf)),Pf}var Hg;function ik(){return Hg||(Hg=1,Tf.exports=rk()),Tf.exports}/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -30,14 +30,14 @@ var GS=Object.defineProperty;var XS=(e,t,n)=>t in e?GS(e,t,{enumerable:!0,config
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
33
|
+
*/var Wg;function ok(){if(Wg)return Pt;Wg=1;var e=Ls(),t=ik();function n(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function l(r,o){a(r,o),a(r+"Capture",o)}function a(r,o){for(s[r]=o,r=0;r<o.length;r++)i.add(o[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,d=/^[: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]*$/,m={},p={};function g(r){return f.call(p,r)?!0:f.call(m,r)?!1:d.test(r)?p[r]=!0:(m[r]=!0,!1)}function v(r,o,u,h){if(u!==null&&u.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return h?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function S(r,o,u,h){if(o===null||typeof o>"u"||v(r,o,u,h))return!0;if(h)return!1;if(u!==null)switch(u.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function w(r,o,u,h,y,x,I){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=y,this.mustUseProperty=u,this.propertyName=r,this.type=o,this.sanitizeURL=x,this.removeEmptyString=I}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){b[r]=new w(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];b[o]=new w(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){b[r]=new w(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){b[r]=new w(r,2,!1,r,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(r){b[r]=new w(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){b[r]=new w(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){b[r]=new w(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){b[r]=new w(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){b[r]=new w(r,5,!1,r.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function _(r){return r[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(r){var o=r.replace(k,_);b[o]=new w(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(k,_);b[o]=new w(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(k,_);b[o]=new w(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){b[r]=new w(r,1,!1,r.toLowerCase(),null,!1,!1)}),b.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){b[r]=new w(r,1,!1,r.toLowerCase(),null,!0,!0)});function E(r,o,u,h){var y=b.hasOwnProperty(o)?b[o]:null;(y!==null?y.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(S(o,u,y,h)&&(u=null),h||y===null?g(o)&&(u===null?r.removeAttribute(o):r.setAttribute(o,""+u)):y.mustUseProperty?r[y.propertyName]=u===null?y.type===3?!1:"":u:(o=y.attributeName,h=y.attributeNamespace,u===null?r.removeAttribute(o):(y=y.type,u=y===3||y===4&&u===!0?"":""+u,h?r.setAttributeNS(h,o,u):r.setAttribute(o,u))))}var N=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,A=Symbol.for("react.element"),L=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),M=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),J=Symbol.for("react.offscreen"),Y=Symbol.iterator;function W(r){return r===null||typeof r!="object"?null:(r=Y&&r[Y]||r["@@iterator"],typeof r=="function"?r:null)}var B=Object.assign,D;function H(r){if(D===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
|
|
34
34
|
`+D+r}var V=!1;function K(r,o){if(!r||V)return"";V=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(ie){var h=ie}Reflect.construct(r,[],o)}else{try{o.call()}catch(ie){h=ie}r.call(o.prototype)}else{try{throw Error()}catch(ie){h=ie}r()}}catch(ie){if(ie&&h&&typeof ie.stack=="string"){for(var y=ie.stack.split(`
|
|
35
|
-
`),
|
|
36
|
-
`),I=y.length-1,z=
|
|
37
|
-
`+y[I].replace(" at new "," at ");return r.displayName&&W.includes("<anonymous>")&&(W=W.replace("<anonymous>",r.displayName)),W}while(1<=I&&0<=z);break}}}finally{V=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?H(r):""}function Q(r){switch(r.tag){case 5:return H(r.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return r=K(r.type,!1),r;case 11:return r=K(r.type.render,!1),r;case 1:return r=K(r.type,!0),r;default:return""}}function re(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case R:return"Fragment";case L:return"Portal";case P:return"Profiler";case C:return"StrictMode";case Z:return"Suspense";case j:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case M:return(r.displayName||"Context")+".Consumer";case F:return(r._context.displayName||"Context")+".Provider";case $:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case G:return o=r.displayName||null,o!==null?o:re(r.type)||"Memo";case q:o=r._payload,r=r._init;try{return re(r(o))}catch{}}return null}function se(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(o);case 8:return o===C?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function ee(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function oe(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function de(r){var o=oe(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),h=""+r[o];if(!r.hasOwnProperty(o)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,w=u.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return y.call(this)},set:function(I){h=""+I,w.call(this,I)}}),Object.defineProperty(r,o,{enumerable:u.enumerable}),{getValue:function(){return h},setValue:function(I){h=""+I},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function xe(r){r._valueTracker||(r._valueTracker=de(r))}function he(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var u=o.getValue(),h="";return r&&(h=oe(r)?r.checked?"true":"false":r.value),r=h,r!==u?(o.setValue(r),!0):!1}function fe(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function ke(r,o){var u=o.checked;return B({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function Pe(r,o){var u=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;u=ee(o.value!=null?o.value:u),r._wrapperState={initialChecked:h,initialValue:u,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ae(r,o){o=o.checked,o!=null&&E(r,"checked",o,!1)}function $e(r,o){Ae(r,o);var u=ee(o.value),h=o.type;if(u!=null)h==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(h==="submit"||h==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?kt(r,o.type,u):o.hasOwnProperty("defaultValue")&&kt(r,o.type,ee(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function yt(r,o,u){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,u||o===r.value||(r.value=o),r.defaultValue=o}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function kt(r,o,u){(o!=="number"||fe(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var ft=Array.isArray;function dt(r,o,u,h){if(r=r.options,o){o={};for(var y=0;y<u.length;y++)o["$"+u[y]]=!0;for(u=0;u<r.length;u++)y=o.hasOwnProperty("$"+r[u].value),r[u].selected!==y&&(r[u].selected=y),y&&h&&(r[u].defaultSelected=!0)}else{for(u=""+ee(u),o=null,y=0;y<r.length;y++){if(r[y].value===u){r[y].selected=!0,h&&(r[y].defaultSelected=!0);return}o!==null||r[y].disabled||(o=r[y])}o!==null&&(o.selected=!0)}}function Mn(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return B({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function wn(r,o){var u=o.value;if(u==null){if(u=o.children,o=o.defaultValue,u!=null){if(o!=null)throw Error(n(92));if(ft(u)){if(1<u.length)throw Error(n(93));u=u[0]}o=u}o==null&&(o=""),u=o}r._wrapperState={initialValue:ee(u)}}function xn(r,o){var u=ee(o.value),h=ee(o.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),o.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),h!=null&&(r.defaultValue=""+h)}function Et(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function Ht(r){switch(r){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 Lt(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?Ht(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Ut,Hs=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,u,h,y){MSApp.execUnsafeLocalFunction(function(){return r(o,u,h,y)})}:r})(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(Ut=Ut||document.createElement("div"),Ut.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ut.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function Rn(r,o){if(o){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=o;return}}r.textContent=o}var Pr={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},Ou=["Webkit","ms","Moz","O"];Object.keys(Pr).forEach(function(r){Ou.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),Pr[o]=Pr[r]})});function Us(r,o,u){return o==null||typeof o=="boolean"||o===""?"":u||typeof o!="number"||o===0||Pr.hasOwnProperty(r)&&Pr[r]?(""+o).trim():o+"px"}function Ws(r,o){r=r.style;for(var u in o)if(o.hasOwnProperty(u)){var h=u.indexOf("--")===0,y=Us(u,o[u],h);u==="float"&&(u="cssFloat"),h?r.setProperty(u,y):r[u]=y}}var Lu=B({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 xo(r,o){if(o){if(Lu[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function bo(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var So=null;function ko(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Eo=null,Zn=null,er=null;function qs(r){if(r=Ko(r)){if(typeof Eo!="function")throw Error(n(280));var o=r.stateNode;o&&(o=Sl(o),Eo(r.stateNode,r.type,o))}}function Ys(r){Zn?er?er.push(r):er=[r]:Zn=r}function Ks(){if(Zn){var r=Zn,o=er;if(er=Zn=null,qs(r),o)for(r=0;r<o.length;r++)qs(o[r])}}function Gs(r,o){return r(o)}function Xs(){}var _o=!1;function Qs(r,o,u){if(_o)return r(o,u);_o=!0;try{return Gs(r,o,u)}finally{_o=!1,(Zn!==null||er!==null)&&(Xs(),Ks())}}function Ar(r,o){var u=r.stateNode;if(u===null)return null;var h=Sl(u);if(h===null)return null;u=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(r=r.type,h=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!h;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,o,typeof u));return u}var No=!1;if(c)try{var Or={};Object.defineProperty(Or,"passive",{get:function(){No=!0}}),window.addEventListener("test",Or,Or),window.removeEventListener("test",Or,Or)}catch{No=!1}function Mu(r,o,u,h,y,w,I,z,W){var ie=Array.prototype.slice.call(arguments,3);try{o.apply(u,ie)}catch(ae){this.onError(ae)}}var Lr=!1,ci=null,fi=!1,Co=null,Ru={onError:function(r){Lr=!0,ci=r}};function Du(r,o,u,h,y,w,I,z,W){Lr=!1,ci=null,Mu.apply(Ru,arguments)}function ju(r,o,u,h,y,w,I,z,W){if(Du.apply(this,arguments),Lr){if(Lr){var ie=ci;Lr=!1,ci=null}else throw Error(n(198));fi||(fi=!0,Co=ie)}}function bn(r){var o=r,u=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(u=o.return),r=o.return;while(r)}return o.tag===3?u:null}function Io(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function To(r){if(bn(r)!==r)throw Error(n(188))}function $u(r){var o=r.alternate;if(!o){if(o=bn(r),o===null)throw Error(n(188));return o!==r?null:r}for(var u=r,h=o;;){var y=u.return;if(y===null)break;var w=y.alternate;if(w===null){if(h=y.return,h!==null){u=h;continue}break}if(y.child===w.child){for(w=y.child;w;){if(w===u)return To(y),r;if(w===h)return To(y),o;w=w.sibling}throw Error(n(188))}if(u.return!==h.return)u=y,h=w;else{for(var I=!1,z=y.child;z;){if(z===u){I=!0,u=y,h=w;break}if(z===h){I=!0,h=y,u=w;break}z=z.sibling}if(!I){for(z=w.child;z;){if(z===u){I=!0,u=w,h=y;break}if(z===h){I=!0,h=w,u=y;break}z=z.sibling}if(!I)throw Error(n(189))}}if(u.alternate!==h)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:o}function Js(r){return r=$u(r),r!==null?Zs(r):null}function Zs(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=Zs(r);if(o!==null)return o;r=r.sibling}return null}var el=t.unstable_scheduleCallback,tl=t.unstable_cancelCallback,zu=t.unstable_shouldYield,nl=t.unstable_requestPaint,Ue=t.unstable_now,Fu=t.unstable_getCurrentPriorityLevel,Po=t.unstable_ImmediatePriority,rl=t.unstable_UserBlockingPriority,di=t.unstable_NormalPriority,Bu=t.unstable_LowPriority,il=t.unstable_IdlePriority,hi=null,Mt=null;function Vu(r){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(hi,r,void 0,(r.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:Wu,Hu=Math.log,Uu=Math.LN2;function Wu(r){return r>>>=0,r===0?32:31-(Hu(r)/Uu|0)|0}var pi=64,mi=4194304;function Mr(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Dn(r,o){var u=r.pendingLanes;if(u===0)return 0;var h=0,y=r.suspendedLanes,w=r.pingedLanes,I=u&268435455;if(I!==0){var z=I&~y;z!==0?h=Mr(z):(w&=I,w!==0&&(h=Mr(w)))}else I=u&~y,I!==0?h=Mr(I):w!==0&&(h=Mr(w));if(h===0)return 0;if(o!==0&&o!==h&&(o&y)===0&&(y=h&-h,w=o&-o,y>=w||y===16&&(w&4194240)!==0))return o;if((h&4)!==0&&(h|=u&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=h;0<o;)u=31-Rt(o),y=1<<u,h|=r[u],o&=~y;return h}function qu(r,o){switch(r){case 1:case 2:case 4:return o+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 o+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 ol(r,o){for(var u=r.suspendedLanes,h=r.pingedLanes,y=r.expirationTimes,w=r.pendingLanes;0<w;){var I=31-Rt(w),z=1<<I,W=y[I];W===-1?((z&u)===0||(z&h)!==0)&&(y[I]=qu(z,o)):W<=o&&(r.expiredLanes|=z),w&=~z}}function Ao(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function sl(){var r=pi;return pi<<=1,(pi&4194240)===0&&(pi=64),r}function Rr(r){for(var o=[],u=0;31>u;u++)o.push(r);return o}function Dr(r,o,u){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-Rt(o),r[o]=u}function Yu(r,o){var u=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var h=r.eventTimes;for(r=r.expirationTimes;0<u;){var y=31-Rt(u),w=1<<y;o[y]=0,h[y]=-1,r[y]=-1,u&=~w}}function gi(r,o){var u=r.entangledLanes|=o;for(r=r.entanglements;u;){var h=31-Rt(u),y=1<<h;y&o|r[h]&o&&(r[h]|=o),u&=~y}}var Re=0;function mp(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var gp,Ku,yp,vp,wp,Gu=!1,ll=[],tr=null,nr=null,rr=null,Oo=new Map,Lo=new Map,ir=[],yb="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 xp(r,o){switch(r){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":Oo.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lo.delete(o.pointerId)}}function Mo(r,o,u,h,y,w){return r===null||r.nativeEvent!==w?(r={blockedOn:o,domEventName:u,eventSystemFlags:h,nativeEvent:w,targetContainers:[y]},o!==null&&(o=Ko(o),o!==null&&Ku(o)),r):(r.eventSystemFlags|=h,o=r.targetContainers,y!==null&&o.indexOf(y)===-1&&o.push(y),r)}function vb(r,o,u,h,y){switch(o){case"focusin":return tr=Mo(tr,r,o,u,h,y),!0;case"dragenter":return nr=Mo(nr,r,o,u,h,y),!0;case"mouseover":return rr=Mo(rr,r,o,u,h,y),!0;case"pointerover":var w=y.pointerId;return Oo.set(w,Mo(Oo.get(w)||null,r,o,u,h,y)),!0;case"gotpointercapture":return w=y.pointerId,Lo.set(w,Mo(Lo.get(w)||null,r,o,u,h,y)),!0}return!1}function bp(r){var o=jr(r.target);if(o!==null){var u=bn(o);if(u!==null){if(o=u.tag,o===13){if(o=Io(u),o!==null){r.blockedOn=o,wp(r.priority,function(){yp(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function al(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var u=Qu(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var h=new u.constructor(u.type,u);So=h,u.target.dispatchEvent(h),So=null}else return o=Ko(u),o!==null&&Ku(o),r.blockedOn=u,!1;o.shift()}return!0}function Sp(r,o,u){al(r)&&u.delete(o)}function wb(){Gu=!1,tr!==null&&al(tr)&&(tr=null),nr!==null&&al(nr)&&(nr=null),rr!==null&&al(rr)&&(rr=null),Oo.forEach(Sp),Lo.forEach(Sp)}function Ro(r,o){r.blockedOn===o&&(r.blockedOn=null,Gu||(Gu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,wb)))}function Do(r){function o(y){return Ro(y,r)}if(0<ll.length){Ro(ll[0],r);for(var u=1;u<ll.length;u++){var h=ll[u];h.blockedOn===r&&(h.blockedOn=null)}}for(tr!==null&&Ro(tr,r),nr!==null&&Ro(nr,r),rr!==null&&Ro(rr,r),Oo.forEach(o),Lo.forEach(o),u=0;u<ir.length;u++)h=ir[u],h.blockedOn===r&&(h.blockedOn=null);for(;0<ir.length&&(u=ir[0],u.blockedOn===null);)bp(u),u.blockedOn===null&&ir.shift()}var yi=N.ReactCurrentBatchConfig,ul=!0;function xb(r,o,u,h){var y=Re,w=yi.transition;yi.transition=null;try{Re=1,Xu(r,o,u,h)}finally{Re=y,yi.transition=w}}function bb(r,o,u,h){var y=Re,w=yi.transition;yi.transition=null;try{Re=4,Xu(r,o,u,h)}finally{Re=y,yi.transition=w}}function Xu(r,o,u,h){if(ul){var y=Qu(r,o,u,h);if(y===null)pc(r,o,h,cl,u),xp(r,h);else if(vb(y,r,o,u,h))h.stopPropagation();else if(xp(r,h),o&4&&-1<yb.indexOf(r)){for(;y!==null;){var w=Ko(y);if(w!==null&&gp(w),w=Qu(r,o,u,h),w===null&&pc(r,o,h,cl,u),w===y)break;y=w}y!==null&&h.stopPropagation()}else pc(r,o,h,null,u)}}var cl=null;function Qu(r,o,u,h){if(cl=null,r=ko(h),r=jr(r),r!==null)if(o=bn(r),o===null)r=null;else if(u=o.tag,u===13){if(r=Io(o),r!==null)return r;r=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return cl=r,null}function kp(r){switch(r){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(Fu()){case Po:return 1;case rl:return 4;case di:case Bu:return 16;case il:return 536870912;default:return 16}default:return 16}}var or=null,Ju=null,fl=null;function Ep(){if(fl)return fl;var r,o=Ju,u=o.length,h,y="value"in or?or.value:or.textContent,w=y.length;for(r=0;r<u&&o[r]===y[r];r++);var I=u-r;for(h=1;h<=I&&o[u-h]===y[w-h];h++);return fl=y.slice(r,1<h?1-h:void 0)}function dl(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function hl(){return!0}function _p(){return!1}function Dt(r){function o(u,h,y,w,I){this._reactName=u,this._targetInst=y,this.type=h,this.nativeEvent=w,this.target=I,this.currentTarget=null;for(var z in r)r.hasOwnProperty(z)&&(u=r[z],this[z]=u?u(w):w[z]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?hl:_p,this.isPropagationStopped=_p,this}return B(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=hl)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),o}var vi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zu=Dt(vi),jo=B({},vi,{view:0,detail:0}),Sb=Dt(jo),ec,tc,$o,pl=B({},jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rc,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==$o&&($o&&r.type==="mousemove"?(ec=r.screenX-$o.screenX,tc=r.screenY-$o.screenY):tc=ec=0,$o=r),ec)},movementY:function(r){return"movementY"in r?r.movementY:tc}}),Np=Dt(pl),kb=B({},pl,{dataTransfer:0}),Eb=Dt(kb),_b=B({},jo,{relatedTarget:0}),nc=Dt(_b),Nb=B({},vi,{animationName:0,elapsedTime:0,pseudoElement:0}),Cb=Dt(Nb),Ib=B({},vi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Tb=Dt(Ib),Pb=B({},vi,{data:0}),Cp=Dt(Pb),Ab={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ob={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"},Lb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mb(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=Lb[r])?!!o[r]:!1}function rc(){return Mb}var Rb=B({},jo,{key:function(r){if(r.key){var o=Ab[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=dl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Ob[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rc,charCode:function(r){return r.type==="keypress"?dl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?dl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),Db=Dt(Rb),jb=B({},pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ip=Dt(jb),$b=B({},jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rc}),zb=Dt($b),Fb=B({},vi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bb=Dt(Fb),Vb=B({},pl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Hb=Dt(Vb),Ub=[9,13,27,32],ic=c&&"CompositionEvent"in window,zo=null;c&&"documentMode"in document&&(zo=document.documentMode);var Wb=c&&"TextEvent"in window&&!zo,Tp=c&&(!ic||zo&&8<zo&&11>=zo),Pp=" ",Ap=!1;function Op(r,o){switch(r){case"keyup":return Ub.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var wi=!1;function qb(r,o){switch(r){case"compositionend":return Lp(o);case"keypress":return o.which!==32?null:(Ap=!0,Pp);case"textInput":return r=o.data,r===Pp&&Ap?null:r;default:return null}}function Yb(r,o){if(wi)return r==="compositionend"||!ic&&Op(r,o)?(r=Ep(),fl=Ju=or=null,wi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Tp&&o.locale!=="ko"?null:o.data;default:return null}}var Kb={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 Mp(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!Kb[r.type]:o==="textarea"}function Rp(r,o,u,h){Ys(h),o=wl(o,"onChange"),0<o.length&&(u=new Zu("onChange","change",null,u,h),r.push({event:u,listeners:o}))}var Fo=null,Bo=null;function Gb(r){Zp(r,0)}function ml(r){var o=Ei(r);if(he(o))return r}function Xb(r,o){if(r==="change")return o}var Dp=!1;if(c){var oc;if(c){var sc="oninput"in document;if(!sc){var jp=document.createElement("div");jp.setAttribute("oninput","return;"),sc=typeof jp.oninput=="function"}oc=sc}else oc=!1;Dp=oc&&(!document.documentMode||9<document.documentMode)}function $p(){Fo&&(Fo.detachEvent("onpropertychange",zp),Bo=Fo=null)}function zp(r){if(r.propertyName==="value"&&ml(Bo)){var o=[];Rp(o,Bo,r,ko(r)),Qs(Gb,o)}}function Qb(r,o,u){r==="focusin"?($p(),Fo=o,Bo=u,Fo.attachEvent("onpropertychange",zp)):r==="focusout"&&$p()}function Jb(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return ml(Bo)}function Zb(r,o){if(r==="click")return ml(o)}function eS(r,o){if(r==="input"||r==="change")return ml(o)}function tS(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var nn=typeof Object.is=="function"?Object.is:tS;function Vo(r,o){if(nn(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var u=Object.keys(r),h=Object.keys(o);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var y=u[h];if(!f.call(o,y)||!nn(r[y],o[y]))return!1}return!0}function Fp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Bp(r,o){var u=Fp(r);r=0;for(var h;u;){if(u.nodeType===3){if(h=r+u.textContent.length,r<=o&&h>=o)return{node:u,offset:o-r};r=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Fp(u)}}function Vp(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Vp(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Hp(){for(var r=window,o=fe();o instanceof r.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)r=o.contentWindow;else break;o=fe(r.document)}return o}function lc(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function nS(r){var o=Hp(),u=r.focusedElem,h=r.selectionRange;if(o!==u&&u&&u.ownerDocument&&Vp(u.ownerDocument.documentElement,u)){if(h!==null&&lc(u)){if(o=h.start,r=h.end,r===void 0&&(r=o),"selectionStart"in u)u.selectionStart=o,u.selectionEnd=Math.min(r,u.value.length);else if(r=(o=u.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var y=u.textContent.length,w=Math.min(h.start,y);h=h.end===void 0?w:Math.min(h.end,y),!r.extend&&w>h&&(y=h,h=w,w=y),y=Bp(u,w);var I=Bp(u,h);y&&I&&(r.rangeCount!==1||r.anchorNode!==y.node||r.anchorOffset!==y.offset||r.focusNode!==I.node||r.focusOffset!==I.offset)&&(o=o.createRange(),o.setStart(y.node,y.offset),r.removeAllRanges(),w>h?(r.addRange(o),r.extend(I.node,I.offset)):(o.setEnd(I.node,I.offset),r.addRange(o)))}}for(o=[],r=u;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<o.length;u++)r=o[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var rS=c&&"documentMode"in document&&11>=document.documentMode,xi=null,ac=null,Ho=null,uc=!1;function Up(r,o,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;uc||xi==null||xi!==fe(h)||(h=xi,"selectionStart"in h&&lc(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ho&&Vo(Ho,h)||(Ho=h,h=wl(ac,"onSelect"),0<h.length&&(o=new Zu("onSelect","select",null,o,u),r.push({event:o,listeners:h}),o.target=xi)))}function gl(r,o){var u={};return u[r.toLowerCase()]=o.toLowerCase(),u["Webkit"+r]="webkit"+o,u["Moz"+r]="moz"+o,u}var bi={animationend:gl("Animation","AnimationEnd"),animationiteration:gl("Animation","AnimationIteration"),animationstart:gl("Animation","AnimationStart"),transitionend:gl("Transition","TransitionEnd")},cc={},Wp={};c&&(Wp=document.createElement("div").style,"AnimationEvent"in window||(delete bi.animationend.animation,delete bi.animationiteration.animation,delete bi.animationstart.animation),"TransitionEvent"in window||delete bi.transitionend.transition);function yl(r){if(cc[r])return cc[r];if(!bi[r])return r;var o=bi[r],u;for(u in o)if(o.hasOwnProperty(u)&&u in Wp)return cc[r]=o[u];return r}var qp=yl("animationend"),Yp=yl("animationiteration"),Kp=yl("animationstart"),Gp=yl("transitionend"),Xp=new Map,Qp="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 sr(r,o){Xp.set(r,o),l(o,[r])}for(var fc=0;fc<Qp.length;fc++){var dc=Qp[fc],iS=dc.toLowerCase(),oS=dc[0].toUpperCase()+dc.slice(1);sr(iS,"on"+oS)}sr(qp,"onAnimationEnd"),sr(Yp,"onAnimationIteration"),sr(Kp,"onAnimationStart"),sr("dblclick","onDoubleClick"),sr("focusin","onFocus"),sr("focusout","onBlur"),sr(Gp,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uo="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(" "),sS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Uo));function Jp(r,o,u){var h=r.type||"unknown-event";r.currentTarget=u,ju(h,o,void 0,r),r.currentTarget=null}function Zp(r,o){o=(o&4)!==0;for(var u=0;u<r.length;u++){var h=r[u],y=h.event;h=h.listeners;e:{var w=void 0;if(o)for(var I=h.length-1;0<=I;I--){var z=h[I],W=z.instance,ie=z.currentTarget;if(z=z.listener,W!==w&&y.isPropagationStopped())break e;Jp(y,z,ie),w=W}else for(I=0;I<h.length;I++){if(z=h[I],W=z.instance,ie=z.currentTarget,z=z.listener,W!==w&&y.isPropagationStopped())break e;Jp(y,z,ie),w=W}}}if(fi)throw r=Co,fi=!1,Co=null,r}function ze(r,o){var u=o[xc];u===void 0&&(u=o[xc]=new Set);var h=r+"__bubble";u.has(h)||(em(o,r,2,!1),u.add(h))}function hc(r,o,u){var h=0;o&&(h|=4),em(u,r,h,o)}var vl="_reactListening"+Math.random().toString(36).slice(2);function Wo(r){if(!r[vl]){r[vl]=!0,i.forEach(function(u){u!=="selectionchange"&&(sS.has(u)||hc(u,!1,r),hc(u,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[vl]||(o[vl]=!0,hc("selectionchange",!1,o))}}function em(r,o,u,h){switch(kp(o)){case 1:var y=xb;break;case 4:y=bb;break;default:y=Xu}u=y.bind(null,o,u,r),y=void 0,!No||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(y=!0),h?y!==void 0?r.addEventListener(o,u,{capture:!0,passive:y}):r.addEventListener(o,u,!0):y!==void 0?r.addEventListener(o,u,{passive:y}):r.addEventListener(o,u,!1)}function pc(r,o,u,h,y){var w=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var I=h.tag;if(I===3||I===4){var z=h.stateNode.containerInfo;if(z===y||z.nodeType===8&&z.parentNode===y)break;if(I===4)for(I=h.return;I!==null;){var W=I.tag;if((W===3||W===4)&&(W=I.stateNode.containerInfo,W===y||W.nodeType===8&&W.parentNode===y))return;I=I.return}for(;z!==null;){if(I=jr(z),I===null)return;if(W=I.tag,W===5||W===6){h=w=I;continue e}z=z.parentNode}}h=h.return}Qs(function(){var ie=w,ae=ko(u),ue=[];e:{var le=Xp.get(r);if(le!==void 0){var pe=Zu,ve=r;switch(r){case"keypress":if(dl(u)===0)break e;case"keydown":case"keyup":pe=Db;break;case"focusin":ve="focus",pe=nc;break;case"focusout":ve="blur",pe=nc;break;case"beforeblur":case"afterblur":pe=nc;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=Np;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=Eb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=zb;break;case qp:case Yp:case Kp:pe=Cb;break;case Gp:pe=Bb;break;case"scroll":pe=Sb;break;case"wheel":pe=Hb;break;case"copy":case"cut":case"paste":pe=Tb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=Ip}var we=(o&4)!==0,Ke=!we&&r==="scroll",te=we?le!==null?le+"Capture":null:le;we=[];for(var X=ie,ne;X!==null;){ne=X;var ce=ne.stateNode;if(ne.tag===5&&ce!==null&&(ne=ce,te!==null&&(ce=Ar(X,te),ce!=null&&we.push(qo(X,ce,ne)))),Ke)break;X=X.return}0<we.length&&(le=new pe(le,ve,null,u,ae),ue.push({event:le,listeners:we}))}}if((o&7)===0){e:{if(le=r==="mouseover"||r==="pointerover",pe=r==="mouseout"||r==="pointerout",le&&u!==So&&(ve=u.relatedTarget||u.fromElement)&&(jr(ve)||ve[jn]))break e;if((pe||le)&&(le=ae.window===ae?ae:(le=ae.ownerDocument)?le.defaultView||le.parentWindow:window,pe?(ve=u.relatedTarget||u.toElement,pe=ie,ve=ve?jr(ve):null,ve!==null&&(Ke=bn(ve),ve!==Ke||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(pe=null,ve=ie),pe!==ve)){if(we=Np,ce="onMouseLeave",te="onMouseEnter",X="mouse",(r==="pointerout"||r==="pointerover")&&(we=Ip,ce="onPointerLeave",te="onPointerEnter",X="pointer"),Ke=pe==null?le:Ei(pe),ne=ve==null?le:Ei(ve),le=new we(ce,X+"leave",pe,u,ae),le.target=Ke,le.relatedTarget=ne,ce=null,jr(ae)===ie&&(we=new we(te,X+"enter",ve,u,ae),we.target=ne,we.relatedTarget=Ke,ce=we),Ke=ce,pe&&ve)t:{for(we=pe,te=ve,X=0,ne=we;ne;ne=Si(ne))X++;for(ne=0,ce=te;ce;ce=Si(ce))ne++;for(;0<X-ne;)we=Si(we),X--;for(;0<ne-X;)te=Si(te),ne--;for(;X--;){if(we===te||te!==null&&we===te.alternate)break t;we=Si(we),te=Si(te)}we=null}else we=null;pe!==null&&tm(ue,le,pe,we,!1),ve!==null&&Ke!==null&&tm(ue,Ke,ve,we,!0)}}e:{if(le=ie?Ei(ie):window,pe=le.nodeName&&le.nodeName.toLowerCase(),pe==="select"||pe==="input"&&le.type==="file")var be=Xb;else if(Mp(le))if(Dp)be=eS;else{be=Jb;var Ee=Qb}else(pe=le.nodeName)&&pe.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(be=Zb);if(be&&(be=be(r,ie))){Rp(ue,be,u,ae);break e}Ee&&Ee(r,le,ie),r==="focusout"&&(Ee=le._wrapperState)&&Ee.controlled&&le.type==="number"&&kt(le,"number",le.value)}switch(Ee=ie?Ei(ie):window,r){case"focusin":(Mp(Ee)||Ee.contentEditable==="true")&&(xi=Ee,ac=ie,Ho=null);break;case"focusout":Ho=ac=xi=null;break;case"mousedown":uc=!0;break;case"contextmenu":case"mouseup":case"dragend":uc=!1,Up(ue,u,ae);break;case"selectionchange":if(rS)break;case"keydown":case"keyup":Up(ue,u,ae)}var _e;if(ic)e:{switch(r){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else wi?Op(r,u)&&(Ne="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ne="onCompositionStart");Ne&&(Tp&&u.locale!=="ko"&&(wi||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&wi&&(_e=Ep()):(or=ae,Ju="value"in or?or.value:or.textContent,wi=!0)),Ee=wl(ie,Ne),0<Ee.length&&(Ne=new Cp(Ne,r,null,u,ae),ue.push({event:Ne,listeners:Ee}),_e?Ne.data=_e:(_e=Lp(u),_e!==null&&(Ne.data=_e)))),(_e=Wb?qb(r,u):Yb(r,u))&&(ie=wl(ie,"onBeforeInput"),0<ie.length&&(ae=new Cp("onBeforeInput","beforeinput",null,u,ae),ue.push({event:ae,listeners:ie}),ae.data=_e))}Zp(ue,o)})}function qo(r,o,u){return{instance:r,listener:o,currentTarget:u}}function wl(r,o){for(var u=o+"Capture",h=[];r!==null;){var y=r,w=y.stateNode;y.tag===5&&w!==null&&(y=w,w=Ar(r,u),w!=null&&h.unshift(qo(r,w,y)),w=Ar(r,o),w!=null&&h.push(qo(r,w,y))),r=r.return}return h}function Si(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function tm(r,o,u,h,y){for(var w=o._reactName,I=[];u!==null&&u!==h;){var z=u,W=z.alternate,ie=z.stateNode;if(W!==null&&W===h)break;z.tag===5&&ie!==null&&(z=ie,y?(W=Ar(u,w),W!=null&&I.unshift(qo(u,W,z))):y||(W=Ar(u,w),W!=null&&I.push(qo(u,W,z)))),u=u.return}I.length!==0&&r.push({event:o,listeners:I})}var lS=/\r\n?/g,aS=/\u0000|\uFFFD/g;function nm(r){return(typeof r=="string"?r:""+r).replace(lS,`
|
|
38
|
-
`).replace(aS,"")}function xl(r,o,u){if(o=nm(o),nm(r)!==o&&u)throw Error(n(425))}function bl(){}var mc=null,gc=null;function yc(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var vc=typeof setTimeout=="function"?setTimeout:void 0,uS=typeof clearTimeout=="function"?clearTimeout:void 0,rm=typeof Promise=="function"?Promise:void 0,cS=typeof queueMicrotask=="function"?queueMicrotask:typeof rm<"u"?function(r){return rm.resolve(null).then(r).catch(fS)}:vc;function fS(r){setTimeout(function(){throw r})}function wc(r,o){var u=o,h=0;do{var y=u.nextSibling;if(r.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"){if(h===0){r.removeChild(y),Do(o);return}h--}else u!=="$"&&u!=="$?"&&u!=="$!"||h++;u=y}while(u);Do(o)}function lr(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function im(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(o===0)return r;o--}else u==="/$"&&o++}r=r.previousSibling}return null}var ki=Math.random().toString(36).slice(2),Sn="__reactFiber$"+ki,Yo="__reactProps$"+ki,jn="__reactContainer$"+ki,xc="__reactEvents$"+ki,dS="__reactListeners$"+ki,hS="__reactHandles$"+ki;function jr(r){var o=r[Sn];if(o)return o;for(var u=r.parentNode;u;){if(o=u[jn]||u[Sn]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(r=im(r);r!==null;){if(u=r[Sn])return u;r=im(r)}return o}r=u,u=r.parentNode}return null}function Ko(r){return r=r[Sn]||r[jn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Ei(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Sl(r){return r[Yo]||null}var bc=[],_i=-1;function ar(r){return{current:r}}function Fe(r){0>_i||(r.current=bc[_i],bc[_i]=null,_i--)}function De(r,o){_i++,bc[_i]=r.current,r.current=o}var ur={},ht=ar(ur),_t=ar(!1),$r=ur;function Ni(r,o){var u=r.type.contextTypes;if(!u)return ur;var h=r.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var y={},w;for(w in u)y[w]=o[w];return h&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=y),y}function Nt(r){return r=r.childContextTypes,r!=null}function kl(){Fe(_t),Fe(ht)}function om(r,o,u){if(ht.current!==ur)throw Error(n(168));De(ht,o),De(_t,u)}function sm(r,o,u){var h=r.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return u;h=h.getChildContext();for(var y in h)if(!(y in o))throw Error(n(108,se(r)||"Unknown",y));return B({},u,h)}function El(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ur,$r=ht.current,De(ht,r),De(_t,_t.current),!0}function lm(r,o,u){var h=r.stateNode;if(!h)throw Error(n(169));u?(r=sm(r,o,$r),h.__reactInternalMemoizedMergedChildContext=r,Fe(_t),Fe(ht),De(ht,r)):Fe(_t),De(_t,u)}var $n=null,_l=!1,Sc=!1;function am(r){$n===null?$n=[r]:$n.push(r)}function pS(r){_l=!0,am(r)}function cr(){if(!Sc&&$n!==null){Sc=!0;var r=0,o=Re;try{var u=$n;for(Re=1;r<u.length;r++){var h=u[r];do h=h(!0);while(h!==null)}$n=null,_l=!1}catch(y){throw $n!==null&&($n=$n.slice(r+1)),el(Po,cr),y}finally{Re=o,Sc=!1}}return null}var Ci=[],Ii=0,Nl=null,Cl=0,Wt=[],qt=0,zr=null,zn=1,Fn="";function Fr(r,o){Ci[Ii++]=Cl,Ci[Ii++]=Nl,Nl=r,Cl=o}function um(r,o,u){Wt[qt++]=zn,Wt[qt++]=Fn,Wt[qt++]=zr,zr=r;var h=zn;r=Fn;var y=32-Rt(h)-1;h&=~(1<<y),u+=1;var w=32-Rt(o)+y;if(30<w){var I=y-y%5;w=(h&(1<<I)-1).toString(32),h>>=I,y-=I,zn=1<<32-Rt(o)+y|u<<y|h,Fn=w+r}else zn=1<<w|u<<y|h,Fn=r}function kc(r){r.return!==null&&(Fr(r,1),um(r,1,0))}function Ec(r){for(;r===Nl;)Nl=Ci[--Ii],Ci[Ii]=null,Cl=Ci[--Ii],Ci[Ii]=null;for(;r===zr;)zr=Wt[--qt],Wt[qt]=null,Fn=Wt[--qt],Wt[qt]=null,zn=Wt[--qt],Wt[qt]=null}var jt=null,$t=null,Be=!1,rn=null;function cm(r,o){var u=Xt(5,null,null,0);u.elementType="DELETED",u.stateNode=o,u.return=r,o=r.deletions,o===null?(r.deletions=[u],r.flags|=16):o.push(u)}function fm(r,o){switch(r.tag){case 5:var u=r.type;return o=o.nodeType!==1||u.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,jt=r,$t=lr(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,jt=r,$t=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(u=zr!==null?{id:zn,overflow:Fn}:null,r.memoizedState={dehydrated:o,treeContext:u,retryLane:1073741824},u=Xt(18,null,null,0),u.stateNode=o,u.return=r,r.child=u,jt=r,$t=null,!0):!1;default:return!1}}function _c(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Nc(r){if(Be){var o=$t;if(o){var u=o;if(!fm(r,o)){if(_c(r))throw Error(n(418));o=lr(u.nextSibling);var h=jt;o&&fm(r,o)?cm(h,u):(r.flags=r.flags&-4097|2,Be=!1,jt=r)}}else{if(_c(r))throw Error(n(418));r.flags=r.flags&-4097|2,Be=!1,jt=r}}}function dm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;jt=r}function Il(r){if(r!==jt)return!1;if(!Be)return dm(r),Be=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!yc(r.type,r.memoizedProps)),o&&(o=$t)){if(_c(r))throw hm(),Error(n(418));for(;o;)cm(r,o),o=lr(o.nextSibling)}if(dm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(o===0){$t=lr(r.nextSibling);break e}o--}else u!=="$"&&u!=="$!"&&u!=="$?"||o++}r=r.nextSibling}$t=null}}else $t=jt?lr(r.stateNode.nextSibling):null;return!0}function hm(){for(var r=$t;r;)r=lr(r.nextSibling)}function Ti(){$t=jt=null,Be=!1}function Cc(r){rn===null?rn=[r]:rn.push(r)}var mS=N.ReactCurrentBatchConfig;function Go(r,o,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var h=u.stateNode}if(!h)throw Error(n(147,r));var y=h,w=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===w?o.ref:(o=function(I){var z=y.refs;I===null?delete z[w]:z[w]=I},o._stringRef=w,o)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function Tl(r,o){throw r=Object.prototype.toString.call(o),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function pm(r){var o=r._init;return o(r._payload)}function mm(r){function o(te,X){if(r){var ne=te.deletions;ne===null?(te.deletions=[X],te.flags|=16):ne.push(X)}}function u(te,X){if(!r)return null;for(;X!==null;)o(te,X),X=X.sibling;return null}function h(te,X){for(te=new Map;X!==null;)X.key!==null?te.set(X.key,X):te.set(X.index,X),X=X.sibling;return te}function y(te,X){return te=vr(te,X),te.index=0,te.sibling=null,te}function w(te,X,ne){return te.index=ne,r?(ne=te.alternate,ne!==null?(ne=ne.index,ne<X?(te.flags|=2,X):ne):(te.flags|=2,X)):(te.flags|=1048576,X)}function I(te){return r&&te.alternate===null&&(te.flags|=2),te}function z(te,X,ne,ce){return X===null||X.tag!==6?(X=wf(ne,te.mode,ce),X.return=te,X):(X=y(X,ne),X.return=te,X)}function W(te,X,ne,ce){var be=ne.type;return be===R?ae(te,X,ne.props.children,ce,ne.key):X!==null&&(X.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===q&&pm(be)===X.type)?(ce=y(X,ne.props),ce.ref=Go(te,X,ne),ce.return=te,ce):(ce=Zl(ne.type,ne.key,ne.props,null,te.mode,ce),ce.ref=Go(te,X,ne),ce.return=te,ce)}function ie(te,X,ne,ce){return X===null||X.tag!==4||X.stateNode.containerInfo!==ne.containerInfo||X.stateNode.implementation!==ne.implementation?(X=xf(ne,te.mode,ce),X.return=te,X):(X=y(X,ne.children||[]),X.return=te,X)}function ae(te,X,ne,ce,be){return X===null||X.tag!==7?(X=Kr(ne,te.mode,ce,be),X.return=te,X):(X=y(X,ne),X.return=te,X)}function ue(te,X,ne){if(typeof X=="string"&&X!==""||typeof X=="number")return X=wf(""+X,te.mode,ne),X.return=te,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case A:return ne=Zl(X.type,X.key,X.props,null,te.mode,ne),ne.ref=Go(te,null,X),ne.return=te,ne;case L:return X=xf(X,te.mode,ne),X.return=te,X;case q:var ce=X._init;return ue(te,ce(X._payload),ne)}if(ft(X)||U(X))return X=Kr(X,te.mode,ne,null),X.return=te,X;Tl(te,X)}return null}function le(te,X,ne,ce){var be=X!==null?X.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number")return be!==null?null:z(te,X,""+ne,ce);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case A:return ne.key===be?W(te,X,ne,ce):null;case L:return ne.key===be?ie(te,X,ne,ce):null;case q:return be=ne._init,le(te,X,be(ne._payload),ce)}if(ft(ne)||U(ne))return be!==null?null:ae(te,X,ne,ce,null);Tl(te,ne)}return null}function pe(te,X,ne,ce,be){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return te=te.get(ne)||null,z(X,te,""+ce,be);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case A:return te=te.get(ce.key===null?ne:ce.key)||null,W(X,te,ce,be);case L:return te=te.get(ce.key===null?ne:ce.key)||null,ie(X,te,ce,be);case q:var Ee=ce._init;return pe(te,X,ne,Ee(ce._payload),be)}if(ft(ce)||U(ce))return te=te.get(ne)||null,ae(X,te,ce,be,null);Tl(X,ce)}return null}function ve(te,X,ne,ce){for(var be=null,Ee=null,_e=X,Ne=X=0,lt=null;_e!==null&&Ne<ne.length;Ne++){_e.index>Ne?(lt=_e,_e=null):lt=_e.sibling;var Me=le(te,_e,ne[Ne],ce);if(Me===null){_e===null&&(_e=lt);break}r&&_e&&Me.alternate===null&&o(te,_e),X=w(Me,X,Ne),Ee===null?be=Me:Ee.sibling=Me,Ee=Me,_e=lt}if(Ne===ne.length)return u(te,_e),Be&&Fr(te,Ne),be;if(_e===null){for(;Ne<ne.length;Ne++)_e=ue(te,ne[Ne],ce),_e!==null&&(X=w(_e,X,Ne),Ee===null?be=_e:Ee.sibling=_e,Ee=_e);return Be&&Fr(te,Ne),be}for(_e=h(te,_e);Ne<ne.length;Ne++)lt=pe(_e,te,Ne,ne[Ne],ce),lt!==null&&(r&<.alternate!==null&&_e.delete(lt.key===null?Ne:lt.key),X=w(lt,X,Ne),Ee===null?be=lt:Ee.sibling=lt,Ee=lt);return r&&_e.forEach(function(wr){return o(te,wr)}),Be&&Fr(te,Ne),be}function we(te,X,ne,ce){var be=U(ne);if(typeof be!="function")throw Error(n(150));if(ne=be.call(ne),ne==null)throw Error(n(151));for(var Ee=be=null,_e=X,Ne=X=0,lt=null,Me=ne.next();_e!==null&&!Me.done;Ne++,Me=ne.next()){_e.index>Ne?(lt=_e,_e=null):lt=_e.sibling;var wr=le(te,_e,Me.value,ce);if(wr===null){_e===null&&(_e=lt);break}r&&_e&&wr.alternate===null&&o(te,_e),X=w(wr,X,Ne),Ee===null?be=wr:Ee.sibling=wr,Ee=wr,_e=lt}if(Me.done)return u(te,_e),Be&&Fr(te,Ne),be;if(_e===null){for(;!Me.done;Ne++,Me=ne.next())Me=ue(te,Me.value,ce),Me!==null&&(X=w(Me,X,Ne),Ee===null?be=Me:Ee.sibling=Me,Ee=Me);return Be&&Fr(te,Ne),be}for(_e=h(te,_e);!Me.done;Ne++,Me=ne.next())Me=pe(_e,te,Ne,Me.value,ce),Me!==null&&(r&&Me.alternate!==null&&_e.delete(Me.key===null?Ne:Me.key),X=w(Me,X,Ne),Ee===null?be=Me:Ee.sibling=Me,Ee=Me);return r&&_e.forEach(function(KS){return o(te,KS)}),Be&&Fr(te,Ne),be}function Ke(te,X,ne,ce){if(typeof ne=="object"&&ne!==null&&ne.type===R&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case A:e:{for(var be=ne.key,Ee=X;Ee!==null;){if(Ee.key===be){if(be=ne.type,be===R){if(Ee.tag===7){u(te,Ee.sibling),X=y(Ee,ne.props.children),X.return=te,te=X;break e}}else if(Ee.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===q&&pm(be)===Ee.type){u(te,Ee.sibling),X=y(Ee,ne.props),X.ref=Go(te,Ee,ne),X.return=te,te=X;break e}u(te,Ee);break}else o(te,Ee);Ee=Ee.sibling}ne.type===R?(X=Kr(ne.props.children,te.mode,ce,ne.key),X.return=te,te=X):(ce=Zl(ne.type,ne.key,ne.props,null,te.mode,ce),ce.ref=Go(te,X,ne),ce.return=te,te=ce)}return I(te);case L:e:{for(Ee=ne.key;X!==null;){if(X.key===Ee)if(X.tag===4&&X.stateNode.containerInfo===ne.containerInfo&&X.stateNode.implementation===ne.implementation){u(te,X.sibling),X=y(X,ne.children||[]),X.return=te,te=X;break e}else{u(te,X);break}else o(te,X);X=X.sibling}X=xf(ne,te.mode,ce),X.return=te,te=X}return I(te);case q:return Ee=ne._init,Ke(te,X,Ee(ne._payload),ce)}if(ft(ne))return ve(te,X,ne,ce);if(U(ne))return we(te,X,ne,ce);Tl(te,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"?(ne=""+ne,X!==null&&X.tag===6?(u(te,X.sibling),X=y(X,ne),X.return=te,te=X):(u(te,X),X=wf(ne,te.mode,ce),X.return=te,te=X),I(te)):u(te,X)}return Ke}var Pi=mm(!0),gm=mm(!1),Pl=ar(null),Al=null,Ai=null,Ic=null;function Tc(){Ic=Ai=Al=null}function Pc(r){var o=Pl.current;Fe(Pl),r._currentValue=o}function Ac(r,o,u){for(;r!==null;){var h=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),r===u)break;r=r.return}}function Oi(r,o){Al=r,Ic=Ai=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&o)!==0&&(Ct=!0),r.firstContext=null)}function Yt(r){var o=r._currentValue;if(Ic!==r)if(r={context:r,memoizedValue:o,next:null},Ai===null){if(Al===null)throw Error(n(308));Ai=r,Al.dependencies={lanes:0,firstContext:r}}else Ai=Ai.next=r;return o}var Br=null;function Oc(r){Br===null?Br=[r]:Br.push(r)}function ym(r,o,u,h){var y=o.interleaved;return y===null?(u.next=u,Oc(o)):(u.next=y.next,y.next=u),o.interleaved=u,Bn(r,h)}function Bn(r,o){r.lanes|=o;var u=r.alternate;for(u!==null&&(u.lanes|=o),u=r,r=r.return;r!==null;)r.childLanes|=o,u=r.alternate,u!==null&&(u.childLanes|=o),u=r,r=r.return;return u.tag===3?u.stateNode:null}var fr=!1;function Lc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vm(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Vn(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function dr(r,o,u){var h=r.updateQueue;if(h===null)return null;if(h=h.shared,(Le&2)!==0){var y=h.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),h.pending=o,Bn(r,u)}return y=h.interleaved,y===null?(o.next=o,Oc(h)):(o.next=y.next,y.next=o),h.interleaved=o,Bn(r,u)}function Ol(r,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194240)!==0)){var h=o.lanes;h&=r.pendingLanes,u|=h,o.lanes=u,gi(r,u)}}function wm(r,o){var u=r.updateQueue,h=r.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var y=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var I={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};w===null?y=w=I:w=w.next=I,u=u.next}while(u!==null);w===null?y=w=o:w=w.next=o}else y=w=o;u={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:w,shared:h.shared,effects:h.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=o:r.next=o,u.lastBaseUpdate=o}function Ll(r,o,u,h){var y=r.updateQueue;fr=!1;var w=y.firstBaseUpdate,I=y.lastBaseUpdate,z=y.shared.pending;if(z!==null){y.shared.pending=null;var W=z,ie=W.next;W.next=null,I===null?w=ie:I.next=ie,I=W;var ae=r.alternate;ae!==null&&(ae=ae.updateQueue,z=ae.lastBaseUpdate,z!==I&&(z===null?ae.firstBaseUpdate=ie:z.next=ie,ae.lastBaseUpdate=W))}if(w!==null){var ue=y.baseState;I=0,ae=ie=W=null,z=w;do{var le=z.lane,pe=z.eventTime;if((h&le)===le){ae!==null&&(ae=ae.next={eventTime:pe,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var ve=r,we=z;switch(le=o,pe=u,we.tag){case 1:if(ve=we.payload,typeof ve=="function"){ue=ve.call(pe,ue,le);break e}ue=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=we.payload,le=typeof ve=="function"?ve.call(pe,ue,le):ve,le==null)break e;ue=B({},ue,le);break e;case 2:fr=!0}}z.callback!==null&&z.lane!==0&&(r.flags|=64,le=y.effects,le===null?y.effects=[z]:le.push(z))}else pe={eventTime:pe,lane:le,tag:z.tag,payload:z.payload,callback:z.callback,next:null},ae===null?(ie=ae=pe,W=ue):ae=ae.next=pe,I|=le;if(z=z.next,z===null){if(z=y.shared.pending,z===null)break;le=z,z=le.next,le.next=null,y.lastBaseUpdate=le,y.shared.pending=null}}while(!0);if(ae===null&&(W=ue),y.baseState=W,y.firstBaseUpdate=ie,y.lastBaseUpdate=ae,o=y.shared.interleaved,o!==null){y=o;do I|=y.lane,y=y.next;while(y!==o)}else w===null&&(y.shared.lanes=0);Ur|=I,r.lanes=I,r.memoizedState=ue}}function xm(r,o,u){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var h=r[o],y=h.callback;if(y!==null){if(h.callback=null,h=u,typeof y!="function")throw Error(n(191,y));y.call(h)}}}var Xo={},kn=ar(Xo),Qo=ar(Xo),Jo=ar(Xo);function Vr(r){if(r===Xo)throw Error(n(174));return r}function Mc(r,o){switch(De(Jo,o),De(Qo,r),De(kn,Xo),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:Lt(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=Lt(o,r)}Fe(kn),De(kn,o)}function Li(){Fe(kn),Fe(Qo),Fe(Jo)}function bm(r){Vr(Jo.current);var o=Vr(kn.current),u=Lt(o,r.type);o!==u&&(De(Qo,r),De(kn,u))}function Rc(r){Qo.current===r&&(Fe(kn),Fe(Qo))}var We=ar(0);function Ml(r){for(var o=r;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Dc=[];function jc(){for(var r=0;r<Dc.length;r++)Dc[r]._workInProgressVersionPrimary=null;Dc.length=0}var Rl=N.ReactCurrentDispatcher,$c=N.ReactCurrentBatchConfig,Hr=0,qe=null,nt=null,ot=null,Dl=!1,Zo=!1,es=0,gS=0;function pt(){throw Error(n(321))}function zc(r,o){if(o===null)return!1;for(var u=0;u<o.length&&u<r.length;u++)if(!nn(r[u],o[u]))return!1;return!0}function Fc(r,o,u,h,y,w){if(Hr=w,qe=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Rl.current=r===null||r.memoizedState===null?xS:bS,r=u(h,y),Zo){w=0;do{if(Zo=!1,es=0,25<=w)throw Error(n(301));w+=1,ot=nt=null,o.updateQueue=null,Rl.current=SS,r=u(h,y)}while(Zo)}if(Rl.current=zl,o=nt!==null&&nt.next!==null,Hr=0,ot=nt=qe=null,Dl=!1,o)throw Error(n(300));return r}function Bc(){var r=es!==0;return es=0,r}function En(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?qe.memoizedState=ot=r:ot=ot.next=r,ot}function Kt(){if(nt===null){var r=qe.alternate;r=r!==null?r.memoizedState:null}else r=nt.next;var o=ot===null?qe.memoizedState:ot.next;if(o!==null)ot=o,nt=r;else{if(r===null)throw Error(n(310));nt=r,r={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},ot===null?qe.memoizedState=ot=r:ot=ot.next=r}return ot}function ts(r,o){return typeof o=="function"?o(r):o}function Vc(r){var o=Kt(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var h=nt,y=h.baseQueue,w=u.pending;if(w!==null){if(y!==null){var I=y.next;y.next=w.next,w.next=I}h.baseQueue=y=w,u.pending=null}if(y!==null){w=y.next,h=h.baseState;var z=I=null,W=null,ie=w;do{var ae=ie.lane;if((Hr&ae)===ae)W!==null&&(W=W.next={lane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),h=ie.hasEagerState?ie.eagerState:r(h,ie.action);else{var ue={lane:ae,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null};W===null?(z=W=ue,I=h):W=W.next=ue,qe.lanes|=ae,Ur|=ae}ie=ie.next}while(ie!==null&&ie!==w);W===null?I=h:W.next=z,nn(h,o.memoizedState)||(Ct=!0),o.memoizedState=h,o.baseState=I,o.baseQueue=W,u.lastRenderedState=h}if(r=u.interleaved,r!==null){y=r;do w=y.lane,qe.lanes|=w,Ur|=w,y=y.next;while(y!==r)}else y===null&&(u.lanes=0);return[o.memoizedState,u.dispatch]}function Hc(r){var o=Kt(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var h=u.dispatch,y=u.pending,w=o.memoizedState;if(y!==null){u.pending=null;var I=y=y.next;do w=r(w,I.action),I=I.next;while(I!==y);nn(w,o.memoizedState)||(Ct=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,h]}function Sm(){}function km(r,o){var u=qe,h=Kt(),y=o(),w=!nn(h.memoizedState,y);if(w&&(h.memoizedState=y,Ct=!0),h=h.queue,Uc(Nm.bind(null,u,h,r),[r]),h.getSnapshot!==o||w||ot!==null&&ot.memoizedState.tag&1){if(u.flags|=2048,ns(9,_m.bind(null,u,h,y,o),void 0,null),st===null)throw Error(n(349));(Hr&30)!==0||Em(u,o,y)}return y}function Em(r,o,u){r.flags|=16384,r={getSnapshot:o,value:u},o=qe.updateQueue,o===null?(o={lastEffect:null,stores:null},qe.updateQueue=o,o.stores=[r]):(u=o.stores,u===null?o.stores=[r]:u.push(r))}function _m(r,o,u,h){o.value=u,o.getSnapshot=h,Cm(o)&&Im(r)}function Nm(r,o,u){return u(function(){Cm(o)&&Im(r)})}function Cm(r){var o=r.getSnapshot;r=r.value;try{var u=o();return!nn(r,u)}catch{return!0}}function Im(r){var o=Bn(r,1);o!==null&&an(o,r,1,-1)}function Tm(r){var o=En();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:r},o.queue=r,r=r.dispatch=wS.bind(null,qe,r),[o.memoizedState,r]}function ns(r,o,u,h){return r={tag:r,create:o,destroy:u,deps:h,next:null},o=qe.updateQueue,o===null?(o={lastEffect:null,stores:null},qe.updateQueue=o,o.lastEffect=r.next=r):(u=o.lastEffect,u===null?o.lastEffect=r.next=r:(h=u.next,u.next=r,r.next=h,o.lastEffect=r)),r}function Pm(){return Kt().memoizedState}function jl(r,o,u,h){var y=En();qe.flags|=r,y.memoizedState=ns(1|o,u,void 0,h===void 0?null:h)}function $l(r,o,u,h){var y=Kt();h=h===void 0?null:h;var w=void 0;if(nt!==null){var I=nt.memoizedState;if(w=I.destroy,h!==null&&zc(h,I.deps)){y.memoizedState=ns(o,u,w,h);return}}qe.flags|=r,y.memoizedState=ns(1|o,u,w,h)}function Am(r,o){return jl(8390656,8,r,o)}function Uc(r,o){return $l(2048,8,r,o)}function Om(r,o){return $l(4,2,r,o)}function Lm(r,o){return $l(4,4,r,o)}function Mm(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function Rm(r,o,u){return u=u!=null?u.concat([r]):null,$l(4,4,Mm.bind(null,o,r),u)}function Wc(){}function Dm(r,o){var u=Kt();o=o===void 0?null:o;var h=u.memoizedState;return h!==null&&o!==null&&zc(o,h[1])?h[0]:(u.memoizedState=[r,o],r)}function jm(r,o){var u=Kt();o=o===void 0?null:o;var h=u.memoizedState;return h!==null&&o!==null&&zc(o,h[1])?h[0]:(r=r(),u.memoizedState=[r,o],r)}function $m(r,o,u){return(Hr&21)===0?(r.baseState&&(r.baseState=!1,Ct=!0),r.memoizedState=u):(nn(u,o)||(u=sl(),qe.lanes|=u,Ur|=u,r.baseState=!0),o)}function yS(r,o){var u=Re;Re=u!==0&&4>u?u:4,r(!0);var h=$c.transition;$c.transition={};try{r(!1),o()}finally{Re=u,$c.transition=h}}function zm(){return Kt().memoizedState}function vS(r,o,u){var h=gr(r);if(u={lane:h,action:u,hasEagerState:!1,eagerState:null,next:null},Fm(r))Bm(o,u);else if(u=ym(r,o,u,h),u!==null){var y=wt();an(u,r,h,y),Vm(u,o,h)}}function wS(r,o,u){var h=gr(r),y={lane:h,action:u,hasEagerState:!1,eagerState:null,next:null};if(Fm(r))Bm(o,y);else{var w=r.alternate;if(r.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var I=o.lastRenderedState,z=w(I,u);if(y.hasEagerState=!0,y.eagerState=z,nn(z,I)){var W=o.interleaved;W===null?(y.next=y,Oc(o)):(y.next=W.next,W.next=y),o.interleaved=y;return}}catch{}finally{}u=ym(r,o,y,h),u!==null&&(y=wt(),an(u,r,h,y),Vm(u,o,h))}}function Fm(r){var o=r.alternate;return r===qe||o!==null&&o===qe}function Bm(r,o){Zo=Dl=!0;var u=r.pending;u===null?o.next=o:(o.next=u.next,u.next=o),r.pending=o}function Vm(r,o,u){if((u&4194240)!==0){var h=o.lanes;h&=r.pendingLanes,u|=h,o.lanes=u,gi(r,u)}}var zl={readContext:Yt,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},xS={readContext:Yt,useCallback:function(r,o){return En().memoizedState=[r,o===void 0?null:o],r},useContext:Yt,useEffect:Am,useImperativeHandle:function(r,o,u){return u=u!=null?u.concat([r]):null,jl(4194308,4,Mm.bind(null,o,r),u)},useLayoutEffect:function(r,o){return jl(4194308,4,r,o)},useInsertionEffect:function(r,o){return jl(4,2,r,o)},useMemo:function(r,o){var u=En();return o=o===void 0?null:o,r=r(),u.memoizedState=[r,o],r},useReducer:function(r,o,u){var h=En();return o=u!==void 0?u(o):o,h.memoizedState=h.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},h.queue=r,r=r.dispatch=vS.bind(null,qe,r),[h.memoizedState,r]},useRef:function(r){var o=En();return r={current:r},o.memoizedState=r},useState:Tm,useDebugValue:Wc,useDeferredValue:function(r){return En().memoizedState=r},useTransition:function(){var r=Tm(!1),o=r[0];return r=yS.bind(null,r[1]),En().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,u){var h=qe,y=En();if(Be){if(u===void 0)throw Error(n(407));u=u()}else{if(u=o(),st===null)throw Error(n(349));(Hr&30)!==0||Em(h,o,u)}y.memoizedState=u;var w={value:u,getSnapshot:o};return y.queue=w,Am(Nm.bind(null,h,w,r),[r]),h.flags|=2048,ns(9,_m.bind(null,h,w,u,o),void 0,null),u},useId:function(){var r=En(),o=st.identifierPrefix;if(Be){var u=Fn,h=zn;u=(h&~(1<<32-Rt(h)-1)).toString(32)+u,o=":"+o+"R"+u,u=es++,0<u&&(o+="H"+u.toString(32)),o+=":"}else u=gS++,o=":"+o+"r"+u.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},bS={readContext:Yt,useCallback:Dm,useContext:Yt,useEffect:Uc,useImperativeHandle:Rm,useInsertionEffect:Om,useLayoutEffect:Lm,useMemo:jm,useReducer:Vc,useRef:Pm,useState:function(){return Vc(ts)},useDebugValue:Wc,useDeferredValue:function(r){var o=Kt();return $m(o,nt.memoizedState,r)},useTransition:function(){var r=Vc(ts)[0],o=Kt().memoizedState;return[r,o]},useMutableSource:Sm,useSyncExternalStore:km,useId:zm,unstable_isNewReconciler:!1},SS={readContext:Yt,useCallback:Dm,useContext:Yt,useEffect:Uc,useImperativeHandle:Rm,useInsertionEffect:Om,useLayoutEffect:Lm,useMemo:jm,useReducer:Hc,useRef:Pm,useState:function(){return Hc(ts)},useDebugValue:Wc,useDeferredValue:function(r){var o=Kt();return nt===null?o.memoizedState=r:$m(o,nt.memoizedState,r)},useTransition:function(){var r=Hc(ts)[0],o=Kt().memoizedState;return[r,o]},useMutableSource:Sm,useSyncExternalStore:km,useId:zm,unstable_isNewReconciler:!1};function on(r,o){if(r&&r.defaultProps){o=B({},o),r=r.defaultProps;for(var u in r)o[u]===void 0&&(o[u]=r[u]);return o}return o}function qc(r,o,u,h){o=r.memoizedState,u=u(h,o),u=u==null?o:B({},o,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Fl={isMounted:function(r){return(r=r._reactInternals)?bn(r)===r:!1},enqueueSetState:function(r,o,u){r=r._reactInternals;var h=wt(),y=gr(r),w=Vn(h,y);w.payload=o,u!=null&&(w.callback=u),o=dr(r,w,y),o!==null&&(an(o,r,y,h),Ol(o,r,y))},enqueueReplaceState:function(r,o,u){r=r._reactInternals;var h=wt(),y=gr(r),w=Vn(h,y);w.tag=1,w.payload=o,u!=null&&(w.callback=u),o=dr(r,w,y),o!==null&&(an(o,r,y,h),Ol(o,r,y))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var u=wt(),h=gr(r),y=Vn(u,h);y.tag=2,o!=null&&(y.callback=o),o=dr(r,y,h),o!==null&&(an(o,r,h,u),Ol(o,r,h))}};function Hm(r,o,u,h,y,w,I){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(h,w,I):o.prototype&&o.prototype.isPureReactComponent?!Vo(u,h)||!Vo(y,w):!0}function Um(r,o,u){var h=!1,y=ur,w=o.contextType;return typeof w=="object"&&w!==null?w=Yt(w):(y=Nt(o)?$r:ht.current,h=o.contextTypes,w=(h=h!=null)?Ni(r,y):ur),o=new o(u,w),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Fl,r.stateNode=o,o._reactInternals=r,h&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=y,r.__reactInternalMemoizedMaskedChildContext=w),o}function Wm(r,o,u,h){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,h),o.state!==r&&Fl.enqueueReplaceState(o,o.state,null)}function Yc(r,o,u,h){var y=r.stateNode;y.props=u,y.state=r.memoizedState,y.refs={},Lc(r);var w=o.contextType;typeof w=="object"&&w!==null?y.context=Yt(w):(w=Nt(o)?$r:ht.current,y.context=Ni(r,w)),y.state=r.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(qc(r,o,w,u),y.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(o=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),o!==y.state&&Fl.enqueueReplaceState(y,y.state,null),Ll(r,u,y,h),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308)}function Mi(r,o){try{var u="",h=o;do u+=Q(h),h=h.return;while(h);var y=u}catch(w){y=`
|
|
39
|
-
Error generating stack: `+
|
|
40
|
-
`+w.stack}return{value:r,source:o,stack:y,digest:null}}function Kc(r,o,u){return{value:r,source:null,stack:u??null,digest:o??null}}function Gc(r,o){try{console.error(o.value)}catch(u){setTimeout(function(){throw u})}}var kS=typeof WeakMap=="function"?WeakMap:Map;function qm(r,o,u){u=Vn(-1,u),u.tag=3,u.payload={element:null};var h=o.value;return u.callback=function(){Yl||(Yl=!0,ff=h),Gc(r,o)},u}function Ym(r,o,u){u=Vn(-1,u),u.tag=3;var h=r.type.getDerivedStateFromError;if(typeof h=="function"){var y=o.value;u.payload=function(){return h(y)},u.callback=function(){Gc(r,o)}}var w=r.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(u.callback=function(){Gc(r,o),typeof h!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var I=o.stack;this.componentDidCatch(o.value,{componentStack:I!==null?I:""})}),u}function Km(r,o,u){var h=r.pingCache;if(h===null){h=r.pingCache=new kS;var y=new Set;h.set(o,y)}else y=h.get(o),y===void 0&&(y=new Set,h.set(o,y));y.has(u)||(y.add(u),r=jS.bind(null,r,o,u),o.then(r,r))}function Gm(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function Xm(r,o,u,h,y){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(o=Vn(-1,1),o.tag=2,dr(u,o,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=y,r)}var ES=N.ReactCurrentOwner,Ct=!1;function vt(r,o,u,h){o.child=r===null?gm(o,null,u,h):Pi(o,r.child,u,h)}function Qm(r,o,u,h,y){u=u.render;var w=o.ref;return Oi(o,y),h=Fc(r,o,u,h,w,y),u=Bc(),r!==null&&!Ct?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~y,Hn(r,o,y)):(Be&&u&&kc(o),o.flags|=1,vt(r,o,h,y),o.child)}function Jm(r,o,u,h,y){if(r===null){var w=u.type;return typeof w=="function"&&!vf(w)&&w.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(o.tag=15,o.type=w,Zm(r,o,w,h,y)):(r=Zl(u.type,null,h,o,o.mode,y),r.ref=o.ref,r.return=o,o.child=r)}if(w=r.child,(r.lanes&y)===0){var I=w.memoizedProps;if(u=u.compare,u=u!==null?u:Vo,u(I,h)&&r.ref===o.ref)return Hn(r,o,y)}return o.flags|=1,r=vr(w,h),r.ref=o.ref,r.return=o,o.child=r}function Zm(r,o,u,h,y){if(r!==null){var w=r.memoizedProps;if(Vo(w,h)&&r.ref===o.ref)if(Ct=!1,o.pendingProps=h=w,(r.lanes&y)!==0)(r.flags&131072)!==0&&(Ct=!0);else return o.lanes=r.lanes,Hn(r,o,y)}return Xc(r,o,u,h,y)}function eg(r,o,u){var h=o.pendingProps,y=h.children,w=r!==null?r.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Di,zt),zt|=u;else{if((u&1073741824)===0)return r=w!==null?w.baseLanes|u:u,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,De(Di,zt),zt|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=w!==null?w.baseLanes:u,De(Di,zt),zt|=h}else w!==null?(h=w.baseLanes|u,o.memoizedState=null):h=u,De(Di,zt),zt|=h;return vt(r,o,y,u),o.child}function tg(r,o){var u=o.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(o.flags|=512,o.flags|=2097152)}function Xc(r,o,u,h,y){var w=Nt(u)?$r:ht.current;return w=Ni(o,w),Oi(o,y),u=Fc(r,o,u,h,w,y),h=Bc(),r!==null&&!Ct?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~y,Hn(r,o,y)):(Be&&h&&kc(o),o.flags|=1,vt(r,o,u,y),o.child)}function ng(r,o,u,h,y){if(Nt(u)){var w=!0;El(o)}else w=!1;if(Oi(o,y),o.stateNode===null)Vl(r,o),Um(o,u,h),Yc(o,u,h,y),h=!0;else if(r===null){var I=o.stateNode,z=o.memoizedProps;I.props=z;var W=I.context,ie=u.contextType;typeof ie=="object"&&ie!==null?ie=Yt(ie):(ie=Nt(u)?$r:ht.current,ie=Ni(o,ie));var ae=u.getDerivedStateFromProps,ue=typeof ae=="function"||typeof I.getSnapshotBeforeUpdate=="function";ue||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(z!==h||W!==ie)&&Wm(o,I,h,ie),fr=!1;var le=o.memoizedState;I.state=le,Ll(o,h,I,y),W=o.memoizedState,z!==h||le!==W||_t.current||fr?(typeof ae=="function"&&(qc(o,u,ae,h),W=o.memoizedState),(z=fr||Hm(o,u,z,h,le,W,ie))?(ue||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount()),typeof I.componentDidMount=="function"&&(o.flags|=4194308)):(typeof I.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=W),I.props=h,I.state=W,I.context=ie,h=z):(typeof I.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{I=o.stateNode,vm(r,o),z=o.memoizedProps,ie=o.type===o.elementType?z:on(o.type,z),I.props=ie,ue=o.pendingProps,le=I.context,W=u.contextType,typeof W=="object"&&W!==null?W=Yt(W):(W=Nt(u)?$r:ht.current,W=Ni(o,W));var pe=u.getDerivedStateFromProps;(ae=typeof pe=="function"||typeof I.getSnapshotBeforeUpdate=="function")||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(z!==ue||le!==W)&&Wm(o,I,h,W),fr=!1,le=o.memoizedState,I.state=le,Ll(o,h,I,y);var ve=o.memoizedState;z!==ue||le!==ve||_t.current||fr?(typeof pe=="function"&&(qc(o,u,pe,h),ve=o.memoizedState),(ie=fr||Hm(o,u,ie,h,le,ve,W)||!1)?(ae||typeof I.UNSAFE_componentWillUpdate!="function"&&typeof I.componentWillUpdate!="function"||(typeof I.componentWillUpdate=="function"&&I.componentWillUpdate(h,ve,W),typeof I.UNSAFE_componentWillUpdate=="function"&&I.UNSAFE_componentWillUpdate(h,ve,W)),typeof I.componentDidUpdate=="function"&&(o.flags|=4),typeof I.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof I.componentDidUpdate!="function"||z===r.memoizedProps&&le===r.memoizedState||(o.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||z===r.memoizedProps&&le===r.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ve),I.props=h,I.state=ve,I.context=W,h=ie):(typeof I.componentDidUpdate!="function"||z===r.memoizedProps&&le===r.memoizedState||(o.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||z===r.memoizedProps&&le===r.memoizedState||(o.flags|=1024),h=!1)}return Qc(r,o,u,h,w,y)}function Qc(r,o,u,h,y,w){tg(r,o);var I=(o.flags&128)!==0;if(!h&&!I)return y&&lm(o,u,!1),Hn(r,o,w);h=o.stateNode,ES.current=o;var z=I&&typeof u.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,r!==null&&I?(o.child=Pi(o,r.child,null,w),o.child=Pi(o,null,z,w)):vt(r,o,z,w),o.memoizedState=h.state,y&&lm(o,u,!0),o.child}function rg(r){var o=r.stateNode;o.pendingContext?om(r,o.pendingContext,o.pendingContext!==o.context):o.context&&om(r,o.context,!1),Mc(r,o.containerInfo)}function ig(r,o,u,h,y){return Ti(),Cc(y),o.flags|=256,vt(r,o,u,h),o.child}var Jc={dehydrated:null,treeContext:null,retryLane:0};function Zc(r){return{baseLanes:r,cachePool:null,transitions:null}}function og(r,o,u){var h=o.pendingProps,y=We.current,w=!1,I=(o.flags&128)!==0,z;if((z=I)||(z=r!==null&&r.memoizedState===null?!1:(y&2)!==0),z?(w=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(y|=1),De(We,y&1),r===null)return Nc(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((o.mode&1)===0?o.lanes=1:r.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(I=h.children,r=h.fallback,w?(h=o.mode,w=o.child,I={mode:"hidden",children:I},(h&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=I):w=ea(I,h,0,null),r=Kr(r,h,u,null),w.return=o,r.return=o,w.sibling=r,o.child=w,o.child.memoizedState=Zc(u),o.memoizedState=Jc,r):ef(o,I));if(y=r.memoizedState,y!==null&&(z=y.dehydrated,z!==null))return _S(r,o,I,h,z,y,u);if(w){w=h.fallback,I=o.mode,y=r.child,z=y.sibling;var W={mode:"hidden",children:h.children};return(I&1)===0&&o.child!==y?(h=o.child,h.childLanes=0,h.pendingProps=W,o.deletions=null):(h=vr(y,W),h.subtreeFlags=y.subtreeFlags&14680064),z!==null?w=vr(z,w):(w=Kr(w,I,u,null),w.flags|=2),w.return=o,h.return=o,h.sibling=w,o.child=h,h=w,w=o.child,I=r.child.memoizedState,I=I===null?Zc(u):{baseLanes:I.baseLanes|u,cachePool:null,transitions:I.transitions},w.memoizedState=I,w.childLanes=r.childLanes&~u,o.memoizedState=Jc,h}return w=r.child,r=w.sibling,h=vr(w,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=u),h.return=o,h.sibling=null,r!==null&&(u=o.deletions,u===null?(o.deletions=[r],o.flags|=16):u.push(r)),o.child=h,o.memoizedState=null,h}function ef(r,o){return o=ea({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function Bl(r,o,u,h){return h!==null&&Cc(h),Pi(o,r.child,null,u),r=ef(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function _S(r,o,u,h,y,w,I){if(u)return o.flags&256?(o.flags&=-257,h=Kc(Error(n(422))),Bl(r,o,I,h)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(w=h.fallback,y=o.mode,h=ea({mode:"visible",children:h.children},y,0,null),w=Kr(w,y,I,null),w.flags|=2,h.return=o,w.return=o,h.sibling=w,o.child=h,(o.mode&1)!==0&&Pi(o,r.child,null,I),o.child.memoizedState=Zc(I),o.memoizedState=Jc,w);if((o.mode&1)===0)return Bl(r,o,I,null);if(y.data==="$!"){if(h=y.nextSibling&&y.nextSibling.dataset,h)var z=h.dgst;return h=z,w=Error(n(419)),h=Kc(w,h,void 0),Bl(r,o,I,h)}if(z=(I&r.childLanes)!==0,Ct||z){if(h=st,h!==null){switch(I&-I){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(h.suspendedLanes|I))!==0?0:y,y!==0&&y!==w.retryLane&&(w.retryLane=y,Bn(r,y),an(h,r,y,-1))}return yf(),h=Kc(Error(n(421))),Bl(r,o,I,h)}return y.data==="$?"?(o.flags|=128,o.child=r.child,o=$S.bind(null,r),y._reactRetry=o,null):(r=w.treeContext,$t=lr(y.nextSibling),jt=o,Be=!0,rn=null,r!==null&&(Wt[qt++]=zn,Wt[qt++]=Fn,Wt[qt++]=zr,zn=r.id,Fn=r.overflow,zr=o),o=ef(o,h.children),o.flags|=4096,o)}function sg(r,o,u){r.lanes|=o;var h=r.alternate;h!==null&&(h.lanes|=o),Ac(r.return,o,u)}function tf(r,o,u,h,y){var w=r.memoizedState;w===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:y}:(w.isBackwards=o,w.rendering=null,w.renderingStartTime=0,w.last=h,w.tail=u,w.tailMode=y)}function lg(r,o,u){var h=o.pendingProps,y=h.revealOrder,w=h.tail;if(vt(r,o,h.children,u),h=We.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&sg(r,u,o);else if(r.tag===19)sg(r,u,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}h&=1}if(De(We,h),(o.mode&1)===0)o.memoizedState=null;else switch(y){case"forwards":for(u=o.child,y=null;u!==null;)r=u.alternate,r!==null&&Ml(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=o.child,o.child=null):(y=u.sibling,u.sibling=null),tf(o,!1,y,u,w);break;case"backwards":for(u=null,y=o.child,o.child=null;y!==null;){if(r=y.alternate,r!==null&&Ml(r)===null){o.child=y;break}r=y.sibling,y.sibling=u,u=y,y=r}tf(o,!0,u,null,w);break;case"together":tf(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Vl(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function Hn(r,o,u){if(r!==null&&(o.dependencies=r.dependencies),Ur|=o.lanes,(u&o.childLanes)===0)return null;if(r!==null&&o.child!==r.child)throw Error(n(153));if(o.child!==null){for(r=o.child,u=vr(r,r.pendingProps),o.child=u,u.return=o;r.sibling!==null;)r=r.sibling,u=u.sibling=vr(r,r.pendingProps),u.return=o;u.sibling=null}return o.child}function NS(r,o,u){switch(o.tag){case 3:rg(o),Ti();break;case 5:bm(o);break;case 1:Nt(o.type)&&El(o);break;case 4:Mc(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,y=o.memoizedProps.value;De(Pl,h._currentValue),h._currentValue=y;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(De(We,We.current&1),o.flags|=128,null):(u&o.child.childLanes)!==0?og(r,o,u):(De(We,We.current&1),r=Hn(r,o,u),r!==null?r.sibling:null);De(We,We.current&1);break;case 19:if(h=(u&o.childLanes)!==0,(r.flags&128)!==0){if(h)return lg(r,o,u);o.flags|=128}if(y=o.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),De(We,We.current),h)break;return null;case 22:case 23:return o.lanes=0,eg(r,o,u)}return Hn(r,o,u)}var ag,nf,ug,cg;ag=function(r,o){for(var u=o.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},nf=function(){},ug=function(r,o,u,h){var y=r.memoizedProps;if(y!==h){r=o.stateNode,Vr(kn.current);var w=null;switch(u){case"input":y=ke(r,y),h=ke(r,h),w=[];break;case"select":y=B({},y,{value:void 0}),h=B({},h,{value:void 0}),w=[];break;case"textarea":y=Mn(r,y),h=Mn(r,h),w=[];break;default:typeof y.onClick!="function"&&typeof h.onClick=="function"&&(r.onclick=bl)}xo(u,h);var I;u=null;for(ie in y)if(!h.hasOwnProperty(ie)&&y.hasOwnProperty(ie)&&y[ie]!=null)if(ie==="style"){var z=y[ie];for(I in z)z.hasOwnProperty(I)&&(u||(u={}),u[I]="")}else ie!=="dangerouslySetInnerHTML"&&ie!=="children"&&ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(s.hasOwnProperty(ie)?w||(w=[]):(w=w||[]).push(ie,null));for(ie in h){var W=h[ie];if(z=y!=null?y[ie]:void 0,h.hasOwnProperty(ie)&&W!==z&&(W!=null||z!=null))if(ie==="style")if(z){for(I in z)!z.hasOwnProperty(I)||W&&W.hasOwnProperty(I)||(u||(u={}),u[I]="");for(I in W)W.hasOwnProperty(I)&&z[I]!==W[I]&&(u||(u={}),u[I]=W[I])}else u||(w||(w=[]),w.push(ie,u)),u=W;else ie==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,z=z?z.__html:void 0,W!=null&&z!==W&&(w=w||[]).push(ie,W)):ie==="children"?typeof W!="string"&&typeof W!="number"||(w=w||[]).push(ie,""+W):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&(s.hasOwnProperty(ie)?(W!=null&&ie==="onScroll"&&ze("scroll",r),w||z===W||(w=[])):(w=w||[]).push(ie,W))}u&&(w=w||[]).push("style",u);var ie=w;(o.updateQueue=ie)&&(o.flags|=4)}},cg=function(r,o,u,h){u!==h&&(o.flags|=4)};function rs(r,o){if(!Be)switch(r.tailMode){case"hidden":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:h.sibling=null}}function mt(r){var o=r.alternate!==null&&r.alternate.child===r.child,u=0,h=0;if(o)for(var y=r.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags&14680064,h|=y.flags&14680064,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags,h|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=h,r.childLanes=u,o}function CS(r,o,u){var h=o.pendingProps;switch(Ec(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(o),null;case 1:return Nt(o.type)&&kl(),mt(o),null;case 3:return h=o.stateNode,Li(),Fe(_t),Fe(ht),jc(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(r===null||r.child===null)&&(Il(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,rn!==null&&(pf(rn),rn=null))),nf(r,o),mt(o),null;case 5:Rc(o);var y=Vr(Jo.current);if(u=o.type,r!==null&&o.stateNode!=null)ug(r,o,u,h,y),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return mt(o),null}if(r=Vr(kn.current),Il(o)){h=o.stateNode,u=o.type;var w=o.memoizedProps;switch(h[Sn]=o,h[Yo]=w,r=(o.mode&1)!==0,u){case"dialog":ze("cancel",h),ze("close",h);break;case"iframe":case"object":case"embed":ze("load",h);break;case"video":case"audio":for(y=0;y<Uo.length;y++)ze(Uo[y],h);break;case"source":ze("error",h);break;case"img":case"image":case"link":ze("error",h),ze("load",h);break;case"details":ze("toggle",h);break;case"input":Pe(h,w),ze("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!w.multiple},ze("invalid",h);break;case"textarea":wn(h,w),ze("invalid",h)}xo(u,w),y=null;for(var I in w)if(w.hasOwnProperty(I)){var z=w[I];I==="children"?typeof z=="string"?h.textContent!==z&&(w.suppressHydrationWarning!==!0&&xl(h.textContent,z,r),y=["children",z]):typeof z=="number"&&h.textContent!==""+z&&(w.suppressHydrationWarning!==!0&&xl(h.textContent,z,r),y=["children",""+z]):s.hasOwnProperty(I)&&z!=null&&I==="onScroll"&&ze("scroll",h)}switch(u){case"input":xe(h),yt(h,w,!0);break;case"textarea":xe(h),Et(h);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(h.onclick=bl)}h=y,o.updateQueue=h,h!==null&&(o.flags|=4)}else{I=y.nodeType===9?y:y.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Ht(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=I.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof h.is=="string"?r=I.createElement(u,{is:h.is}):(r=I.createElement(u),u==="select"&&(I=r,h.multiple?I.multiple=!0:h.size&&(I.size=h.size))):r=I.createElementNS(r,u),r[Sn]=o,r[Yo]=h,ag(r,o,!1,!1),o.stateNode=r;e:{switch(I=bo(u,h),u){case"dialog":ze("cancel",r),ze("close",r),y=h;break;case"iframe":case"object":case"embed":ze("load",r),y=h;break;case"video":case"audio":for(y=0;y<Uo.length;y++)ze(Uo[y],r);y=h;break;case"source":ze("error",r),y=h;break;case"img":case"image":case"link":ze("error",r),ze("load",r),y=h;break;case"details":ze("toggle",r),y=h;break;case"input":Pe(r,h),y=ke(r,h),ze("invalid",r);break;case"option":y=h;break;case"select":r._wrapperState={wasMultiple:!!h.multiple},y=B({},h,{value:void 0}),ze("invalid",r);break;case"textarea":wn(r,h),y=Mn(r,h),ze("invalid",r);break;default:y=h}xo(u,y),z=y;for(w in z)if(z.hasOwnProperty(w)){var W=z[w];w==="style"?Ws(r,W):w==="dangerouslySetInnerHTML"?(W=W?W.__html:void 0,W!=null&&Hs(r,W)):w==="children"?typeof W=="string"?(u!=="textarea"||W!=="")&&Rn(r,W):typeof W=="number"&&Rn(r,""+W):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(s.hasOwnProperty(w)?W!=null&&w==="onScroll"&&ze("scroll",r):W!=null&&E(r,w,W,I))}switch(u){case"input":xe(r),yt(r,h,!1);break;case"textarea":xe(r),Et(r);break;case"option":h.value!=null&&r.setAttribute("value",""+ee(h.value));break;case"select":r.multiple=!!h.multiple,w=h.value,w!=null?dt(r,!!h.multiple,w,!1):h.defaultValue!=null&&dt(r,!!h.multiple,h.defaultValue,!0);break;default:typeof y.onClick=="function"&&(r.onclick=bl)}switch(u){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return mt(o),null;case 6:if(r&&o.stateNode!=null)cg(r,o,r.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(u=Vr(Jo.current),Vr(kn.current),Il(o)){if(h=o.stateNode,u=o.memoizedProps,h[Sn]=o,(w=h.nodeValue!==u)&&(r=jt,r!==null))switch(r.tag){case 3:xl(h.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&xl(h.nodeValue,u,(r.mode&1)!==0)}w&&(o.flags|=4)}else h=(u.nodeType===9?u:u.ownerDocument).createTextNode(h),h[Sn]=o,o.stateNode=h}return mt(o),null;case 13:if(Fe(We),h=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Be&&$t!==null&&(o.mode&1)!==0&&(o.flags&128)===0)hm(),Ti(),o.flags|=98560,w=!1;else if(w=Il(o),h!==null&&h.dehydrated!==null){if(r===null){if(!w)throw Error(n(318));if(w=o.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(n(317));w[Sn]=o}else Ti(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;mt(o),w=!1}else rn!==null&&(pf(rn),rn=null),w=!0;if(!w)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=u,o):(h=h!==null,h!==(r!==null&&r.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(r===null||(We.current&1)!==0?rt===0&&(rt=3):yf())),o.updateQueue!==null&&(o.flags|=4),mt(o),null);case 4:return Li(),nf(r,o),r===null&&Wo(o.stateNode.containerInfo),mt(o),null;case 10:return Pc(o.type._context),mt(o),null;case 17:return Nt(o.type)&&kl(),mt(o),null;case 19:if(Fe(We),w=o.memoizedState,w===null)return mt(o),null;if(h=(o.flags&128)!==0,I=w.rendering,I===null)if(h)rs(w,!1);else{if(rt!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(I=Ml(r),I!==null){for(o.flags|=128,rs(w,!1),h=I.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=u,u=o.child;u!==null;)w=u,r=h,w.flags&=14680066,I=w.alternate,I===null?(w.childLanes=0,w.lanes=r,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=I.childLanes,w.lanes=I.lanes,w.child=I.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=I.memoizedProps,w.memoizedState=I.memoizedState,w.updateQueue=I.updateQueue,w.type=I.type,r=I.dependencies,w.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return De(We,We.current&1|2),o.child}r=r.sibling}w.tail!==null&&Ue()>ji&&(o.flags|=128,h=!0,rs(w,!1),o.lanes=4194304)}else{if(!h)if(r=Ml(I),r!==null){if(o.flags|=128,h=!0,u=r.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),rs(w,!0),w.tail===null&&w.tailMode==="hidden"&&!I.alternate&&!Be)return mt(o),null}else 2*Ue()-w.renderingStartTime>ji&&u!==1073741824&&(o.flags|=128,h=!0,rs(w,!1),o.lanes=4194304);w.isBackwards?(I.sibling=o.child,o.child=I):(u=w.last,u!==null?u.sibling=I:o.child=I,w.last=I)}return w.tail!==null?(o=w.tail,w.rendering=o,w.tail=o.sibling,w.renderingStartTime=Ue(),o.sibling=null,u=We.current,De(We,h?u&1|2:u&1),o):(mt(o),null);case 22:case 23:return gf(),h=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(zt&1073741824)!==0&&(mt(o),o.subtreeFlags&6&&(o.flags|=8192)):mt(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function IS(r,o){switch(Ec(o),o.tag){case 1:return Nt(o.type)&&kl(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return Li(),Fe(_t),Fe(ht),jc(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return Rc(o),null;case 13:if(Fe(We),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ti()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return Fe(We),null;case 4:return Li(),null;case 10:return Pc(o.type._context),null;case 22:case 23:return gf(),null;case 24:return null;default:return null}}var Hl=!1,gt=!1,TS=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Ri(r,o){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(h){Ye(r,o,h)}else u.current=null}function rf(r,o,u){try{u()}catch(h){Ye(r,o,h)}}var fg=!1;function PS(r,o){if(mc=ul,r=Hp(),lc(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var y=h.anchorOffset,w=h.focusNode;h=h.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var I=0,z=-1,W=-1,ie=0,ae=0,ue=r,le=null;t:for(;;){for(var pe;ue!==u||y!==0&&ue.nodeType!==3||(z=I+y),ue!==w||h!==0&&ue.nodeType!==3||(W=I+h),ue.nodeType===3&&(I+=ue.nodeValue.length),(pe=ue.firstChild)!==null;)le=ue,ue=pe;for(;;){if(ue===r)break t;if(le===u&&++ie===y&&(z=I),le===w&&++ae===h&&(W=I),(pe=ue.nextSibling)!==null)break;ue=le,le=ue.parentNode}ue=pe}u=z===-1||W===-1?null:{start:z,end:W}}else u=null}u=u||{start:0,end:0}}else u=null;for(gc={focusedElem:r,selectionRange:u},ul=!1,ge=o;ge!==null;)if(o=ge,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,ge=r;else for(;ge!==null;){o=ge;try{var ve=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var we=ve.memoizedProps,Ke=ve.memoizedState,te=o.stateNode,X=te.getSnapshotBeforeUpdate(o.elementType===o.type?we:on(o.type,we),Ke);te.__reactInternalSnapshotBeforeUpdate=X}break;case 3:var ne=o.stateNode.containerInfo;ne.nodeType===1?ne.textContent="":ne.nodeType===9&&ne.documentElement&&ne.removeChild(ne.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ce){Ye(o,o.return,ce)}if(r=o.sibling,r!==null){r.return=o.return,ge=r;break}ge=o.return}return ve=fg,fg=!1,ve}function is(r,o,u){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var y=h=h.next;do{if((y.tag&r)===r){var w=y.destroy;y.destroy=void 0,w!==void 0&&rf(o,u,w)}y=y.next}while(y!==h)}}function Ul(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&r)===r){var h=u.create;u.destroy=h()}u=u.next}while(u!==o)}}function of(r){var o=r.ref;if(o!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof o=="function"?o(r):o.current=r}}function dg(r){var o=r.alternate;o!==null&&(r.alternate=null,dg(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[Sn],delete o[Yo],delete o[xc],delete o[dS],delete o[hS])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function hg(r){return r.tag===5||r.tag===3||r.tag===4}function pg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||hg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function sf(r,o,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,o?u.nodeType===8?u.parentNode.insertBefore(r,o):u.insertBefore(r,o):(u.nodeType===8?(o=u.parentNode,o.insertBefore(r,u)):(o=u,o.appendChild(r)),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=bl));else if(h!==4&&(r=r.child,r!==null))for(sf(r,o,u),r=r.sibling;r!==null;)sf(r,o,u),r=r.sibling}function lf(r,o,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,o?u.insertBefore(r,o):u.appendChild(r);else if(h!==4&&(r=r.child,r!==null))for(lf(r,o,u),r=r.sibling;r!==null;)lf(r,o,u),r=r.sibling}var ut=null,sn=!1;function hr(r,o,u){for(u=u.child;u!==null;)mg(r,o,u),u=u.sibling}function mg(r,o,u){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(hi,u)}catch{}switch(u.tag){case 5:gt||Ri(u,o);case 6:var h=ut,y=sn;ut=null,hr(r,o,u),ut=h,sn=y,ut!==null&&(sn?(r=ut,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):ut.removeChild(u.stateNode));break;case 18:ut!==null&&(sn?(r=ut,u=u.stateNode,r.nodeType===8?wc(r.parentNode,u):r.nodeType===1&&wc(r,u),Do(r)):wc(ut,u.stateNode));break;case 4:h=ut,y=sn,ut=u.stateNode.containerInfo,sn=!0,hr(r,o,u),ut=h,sn=y;break;case 0:case 11:case 14:case 15:if(!gt&&(h=u.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){y=h=h.next;do{var w=y,I=w.destroy;w=w.tag,I!==void 0&&((w&2)!==0||(w&4)!==0)&&rf(u,o,I),y=y.next}while(y!==h)}hr(r,o,u);break;case 1:if(!gt&&(Ri(u,o),h=u.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=u.memoizedProps,h.state=u.memoizedState,h.componentWillUnmount()}catch(z){Ye(u,o,z)}hr(r,o,u);break;case 21:hr(r,o,u);break;case 22:u.mode&1?(gt=(h=gt)||u.memoizedState!==null,hr(r,o,u),gt=h):hr(r,o,u);break;default:hr(r,o,u)}}function gg(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new TS),o.forEach(function(h){var y=zS.bind(null,r,h);u.has(h)||(u.add(h),h.then(y,y))})}}function ln(r,o){var u=o.deletions;if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];try{var w=r,I=o,z=I;e:for(;z!==null;){switch(z.tag){case 5:ut=z.stateNode,sn=!1;break e;case 3:ut=z.stateNode.containerInfo,sn=!0;break e;case 4:ut=z.stateNode.containerInfo,sn=!0;break e}z=z.return}if(ut===null)throw Error(n(160));mg(w,I,y),ut=null,sn=!1;var W=y.alternate;W!==null&&(W.return=null),y.return=null}catch(ie){Ye(y,o,ie)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)yg(o,r),o=o.sibling}function yg(r,o){var u=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(ln(o,r),_n(r),h&4){try{is(3,r,r.return),Ul(3,r)}catch(we){Ye(r,r.return,we)}try{is(5,r,r.return)}catch(we){Ye(r,r.return,we)}}break;case 1:ln(o,r),_n(r),h&512&&u!==null&&Ri(u,u.return);break;case 5:if(ln(o,r),_n(r),h&512&&u!==null&&Ri(u,u.return),r.flags&32){var y=r.stateNode;try{Rn(y,"")}catch(we){Ye(r,r.return,we)}}if(h&4&&(y=r.stateNode,y!=null)){var w=r.memoizedProps,I=u!==null?u.memoizedProps:w,z=r.type,W=r.updateQueue;if(r.updateQueue=null,W!==null)try{z==="input"&&w.type==="radio"&&w.name!=null&&Ae(y,w),bo(z,I);var ie=bo(z,w);for(I=0;I<W.length;I+=2){var ae=W[I],ue=W[I+1];ae==="style"?Ws(y,ue):ae==="dangerouslySetInnerHTML"?Hs(y,ue):ae==="children"?Rn(y,ue):E(y,ae,ue,ie)}switch(z){case"input":$e(y,w);break;case"textarea":xn(y,w);break;case"select":var le=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!w.multiple;var pe=w.value;pe!=null?dt(y,!!w.multiple,pe,!1):le!==!!w.multiple&&(w.defaultValue!=null?dt(y,!!w.multiple,w.defaultValue,!0):dt(y,!!w.multiple,w.multiple?[]:"",!1))}y[Yo]=w}catch(we){Ye(r,r.return,we)}}break;case 6:if(ln(o,r),_n(r),h&4){if(r.stateNode===null)throw Error(n(162));y=r.stateNode,w=r.memoizedProps;try{y.nodeValue=w}catch(we){Ye(r,r.return,we)}}break;case 3:if(ln(o,r),_n(r),h&4&&u!==null&&u.memoizedState.isDehydrated)try{Do(o.containerInfo)}catch(we){Ye(r,r.return,we)}break;case 4:ln(o,r),_n(r);break;case 13:ln(o,r),_n(r),y=r.child,y.flags&8192&&(w=y.memoizedState!==null,y.stateNode.isHidden=w,!w||y.alternate!==null&&y.alternate.memoizedState!==null||(cf=Ue())),h&4&&gg(r);break;case 22:if(ae=u!==null&&u.memoizedState!==null,r.mode&1?(gt=(ie=gt)||ae,ln(o,r),gt=ie):ln(o,r),_n(r),h&8192){if(ie=r.memoizedState!==null,(r.stateNode.isHidden=ie)&&!ae&&(r.mode&1)!==0)for(ge=r,ae=r.child;ae!==null;){for(ue=ge=ae;ge!==null;){switch(le=ge,pe=le.child,le.tag){case 0:case 11:case 14:case 15:is(4,le,le.return);break;case 1:Ri(le,le.return);var ve=le.stateNode;if(typeof ve.componentWillUnmount=="function"){h=le,u=le.return;try{o=h,ve.props=o.memoizedProps,ve.state=o.memoizedState,ve.componentWillUnmount()}catch(we){Ye(h,u,we)}}break;case 5:Ri(le,le.return);break;case 22:if(le.memoizedState!==null){xg(ue);continue}}pe!==null?(pe.return=le,ge=pe):xg(ue)}ae=ae.sibling}e:for(ae=null,ue=r;;){if(ue.tag===5){if(ae===null){ae=ue;try{y=ue.stateNode,ie?(w=y.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(z=ue.stateNode,W=ue.memoizedProps.style,I=W!=null&&W.hasOwnProperty("display")?W.display:null,z.style.display=Us("display",I))}catch(we){Ye(r,r.return,we)}}}else if(ue.tag===6){if(ae===null)try{ue.stateNode.nodeValue=ie?"":ue.memoizedProps}catch(we){Ye(r,r.return,we)}}else if((ue.tag!==22&&ue.tag!==23||ue.memoizedState===null||ue===r)&&ue.child!==null){ue.child.return=ue,ue=ue.child;continue}if(ue===r)break e;for(;ue.sibling===null;){if(ue.return===null||ue.return===r)break e;ae===ue&&(ae=null),ue=ue.return}ae===ue&&(ae=null),ue.sibling.return=ue.return,ue=ue.sibling}}break;case 19:ln(o,r),_n(r),h&4&&gg(r);break;case 21:break;default:ln(o,r),_n(r)}}function _n(r){var o=r.flags;if(o&2){try{e:{for(var u=r.return;u!==null;){if(hg(u)){var h=u;break e}u=u.return}throw Error(n(160))}switch(h.tag){case 5:var y=h.stateNode;h.flags&32&&(Rn(y,""),h.flags&=-33);var w=pg(r);lf(r,w,y);break;case 3:case 4:var I=h.stateNode.containerInfo,z=pg(r);sf(r,z,I);break;default:throw Error(n(161))}}catch(W){Ye(r,r.return,W)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function AS(r,o,u){ge=r,vg(r)}function vg(r,o,u){for(var h=(r.mode&1)!==0;ge!==null;){var y=ge,w=y.child;if(y.tag===22&&h){var I=y.memoizedState!==null||Hl;if(!I){var z=y.alternate,W=z!==null&&z.memoizedState!==null||gt;z=Hl;var ie=gt;if(Hl=I,(gt=W)&&!ie)for(ge=y;ge!==null;)I=ge,W=I.child,I.tag===22&&I.memoizedState!==null?bg(y):W!==null?(W.return=I,ge=W):bg(y);for(;w!==null;)ge=w,vg(w),w=w.sibling;ge=y,Hl=z,gt=ie}wg(r)}else(y.subtreeFlags&8772)!==0&&w!==null?(w.return=y,ge=w):wg(r)}}function wg(r){for(;ge!==null;){var o=ge;if((o.flags&8772)!==0){var u=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:gt||Ul(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!gt)if(u===null)h.componentDidMount();else{var y=o.elementType===o.type?u.memoizedProps:on(o.type,u.memoizedProps);h.componentDidUpdate(y,u.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var w=o.updateQueue;w!==null&&xm(o,w,h);break;case 3:var I=o.updateQueue;if(I!==null){if(u=null,o.child!==null)switch(o.child.tag){case 5:u=o.child.stateNode;break;case 1:u=o.child.stateNode}xm(o,I,u)}break;case 5:var z=o.stateNode;if(u===null&&o.flags&4){u=z;var W=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":W.autoFocus&&u.focus();break;case"img":W.src&&(u.src=W.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ie=o.alternate;if(ie!==null){var ae=ie.memoizedState;if(ae!==null){var ue=ae.dehydrated;ue!==null&&Do(ue)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}gt||o.flags&512&&of(o)}catch(le){Ye(o,o.return,le)}}if(o===r){ge=null;break}if(u=o.sibling,u!==null){u.return=o.return,ge=u;break}ge=o.return}}function xg(r){for(;ge!==null;){var o=ge;if(o===r){ge=null;break}var u=o.sibling;if(u!==null){u.return=o.return,ge=u;break}ge=o.return}}function bg(r){for(;ge!==null;){var o=ge;try{switch(o.tag){case 0:case 11:case 15:var u=o.return;try{Ul(4,o)}catch(W){Ye(o,u,W)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var y=o.return;try{h.componentDidMount()}catch(W){Ye(o,y,W)}}var w=o.return;try{of(o)}catch(W){Ye(o,w,W)}break;case 5:var I=o.return;try{of(o)}catch(W){Ye(o,I,W)}}}catch(W){Ye(o,o.return,W)}if(o===r){ge=null;break}var z=o.sibling;if(z!==null){z.return=o.return,ge=z;break}ge=o.return}}var OS=Math.ceil,Wl=N.ReactCurrentDispatcher,af=N.ReactCurrentOwner,Gt=N.ReactCurrentBatchConfig,Le=0,st=null,Je=null,ct=0,zt=0,Di=ar(0),rt=0,os=null,Ur=0,ql=0,uf=0,ss=null,It=null,cf=0,ji=1/0,Un=null,Yl=!1,ff=null,pr=null,Kl=!1,mr=null,Gl=0,ls=0,df=null,Xl=-1,Ql=0;function wt(){return(Le&6)!==0?Ue():Xl!==-1?Xl:Xl=Ue()}function gr(r){return(r.mode&1)===0?1:(Le&2)!==0&&ct!==0?ct&-ct:mS.transition!==null?(Ql===0&&(Ql=sl()),Ql):(r=Re,r!==0||(r=window.event,r=r===void 0?16:kp(r.type)),r)}function an(r,o,u,h){if(50<ls)throw ls=0,df=null,Error(n(185));Dr(r,u,h),((Le&2)===0||r!==st)&&(r===st&&((Le&2)===0&&(ql|=u),rt===4&&yr(r,ct)),Tt(r,h),u===1&&Le===0&&(o.mode&1)===0&&(ji=Ue()+500,_l&&cr()))}function Tt(r,o){var u=r.callbackNode;ol(r,o);var h=Dn(r,r===st?ct:0);if(h===0)u!==null&&tl(u),r.callbackNode=null,r.callbackPriority=0;else if(o=h&-h,r.callbackPriority!==o){if(u!=null&&tl(u),o===1)r.tag===0?pS(kg.bind(null,r)):am(kg.bind(null,r)),cS(function(){(Le&6)===0&&cr()}),u=null;else{switch(mp(h)){case 1:u=Po;break;case 4:u=rl;break;case 16:u=di;break;case 536870912:u=il;break;default:u=di}u=Ag(u,Sg.bind(null,r))}r.callbackPriority=o,r.callbackNode=u}}function Sg(r,o){if(Xl=-1,Ql=0,(Le&6)!==0)throw Error(n(327));var u=r.callbackNode;if($i()&&r.callbackNode!==u)return null;var h=Dn(r,r===st?ct:0);if(h===0)return null;if((h&30)!==0||(h&r.expiredLanes)!==0||o)o=Jl(r,h);else{o=h;var y=Le;Le|=2;var w=_g();(st!==r||ct!==o)&&(Un=null,ji=Ue()+500,qr(r,o));do try{RS();break}catch(z){Eg(r,z)}while(!0);Tc(),Wl.current=w,Le=y,Je!==null?o=0:(st=null,ct=0,o=rt)}if(o!==0){if(o===2&&(y=Ao(r),y!==0&&(h=y,o=hf(r,y))),o===1)throw u=os,qr(r,0),yr(r,h),Tt(r,Ue()),u;if(o===6)yr(r,h);else{if(y=r.current.alternate,(h&30)===0&&!LS(y)&&(o=Jl(r,h),o===2&&(w=Ao(r),w!==0&&(h=w,o=hf(r,w))),o===1))throw u=os,qr(r,0),yr(r,h),Tt(r,Ue()),u;switch(r.finishedWork=y,r.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Yr(r,It,Un);break;case 3:if(yr(r,h),(h&130023424)===h&&(o=cf+500-Ue(),10<o)){if(Dn(r,0)!==0)break;if(y=r.suspendedLanes,(y&h)!==h){wt(),r.pingedLanes|=r.suspendedLanes&y;break}r.timeoutHandle=vc(Yr.bind(null,r,It,Un),o);break}Yr(r,It,Un);break;case 4:if(yr(r,h),(h&4194240)===h)break;for(o=r.eventTimes,y=-1;0<h;){var I=31-Rt(h);w=1<<I,I=o[I],I>y&&(y=I),h&=~w}if(h=y,h=Ue()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*OS(h/1960))-h,10<h){r.timeoutHandle=vc(Yr.bind(null,r,It,Un),h);break}Yr(r,It,Un);break;case 5:Yr(r,It,Un);break;default:throw Error(n(329))}}}return Tt(r,Ue()),r.callbackNode===u?Sg.bind(null,r):null}function hf(r,o){var u=ss;return r.current.memoizedState.isDehydrated&&(qr(r,o).flags|=256),r=Jl(r,o),r!==2&&(o=It,It=u,o!==null&&pf(o)),r}function pf(r){It===null?It=r:It.push.apply(It,r)}function LS(r){for(var o=r;;){if(o.flags&16384){var u=o.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var h=0;h<u.length;h++){var y=u[h],w=y.getSnapshot;y=y.value;try{if(!nn(w(),y))return!1}catch{return!1}}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function yr(r,o){for(o&=~uf,o&=~ql,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var u=31-Rt(o),h=1<<u;r[u]=-1,o&=~h}}function kg(r){if((Le&6)!==0)throw Error(n(327));$i();var o=Dn(r,0);if((o&1)===0)return Tt(r,Ue()),null;var u=Jl(r,o);if(r.tag!==0&&u===2){var h=Ao(r);h!==0&&(o=h,u=hf(r,h))}if(u===1)throw u=os,qr(r,0),yr(r,o),Tt(r,Ue()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Yr(r,It,Un),Tt(r,Ue()),null}function mf(r,o){var u=Le;Le|=1;try{return r(o)}finally{Le=u,Le===0&&(ji=Ue()+500,_l&&cr())}}function Wr(r){mr!==null&&mr.tag===0&&(Le&6)===0&&$i();var o=Le;Le|=1;var u=Gt.transition,h=Re;try{if(Gt.transition=null,Re=1,r)return r()}finally{Re=h,Gt.transition=u,Le=o,(Le&6)===0&&cr()}}function gf(){zt=Di.current,Fe(Di)}function qr(r,o){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,uS(u)),Je!==null)for(u=Je.return;u!==null;){var h=u;switch(Ec(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&kl();break;case 3:Li(),Fe(_t),Fe(ht),jc();break;case 5:Rc(h);break;case 4:Li();break;case 13:Fe(We);break;case 19:Fe(We);break;case 10:Pc(h.type._context);break;case 22:case 23:gf()}u=u.return}if(st=r,Je=r=vr(r.current,null),ct=zt=o,rt=0,os=null,uf=ql=Ur=0,It=ss=null,Br!==null){for(o=0;o<Br.length;o++)if(u=Br[o],h=u.interleaved,h!==null){u.interleaved=null;var y=h.next,w=u.pending;if(w!==null){var I=w.next;w.next=y,h.next=I}u.pending=h}Br=null}return r}function Eg(r,o){do{var u=Je;try{if(Tc(),Rl.current=zl,Dl){for(var h=qe.memoizedState;h!==null;){var y=h.queue;y!==null&&(y.pending=null),h=h.next}Dl=!1}if(Hr=0,ot=nt=qe=null,Zo=!1,es=0,af.current=null,u===null||u.return===null){rt=1,os=o,Je=null;break}e:{var w=r,I=u.return,z=u,W=o;if(o=ct,z.flags|=32768,W!==null&&typeof W=="object"&&typeof W.then=="function"){var ie=W,ae=z,ue=ae.tag;if((ae.mode&1)===0&&(ue===0||ue===11||ue===15)){var le=ae.alternate;le?(ae.updateQueue=le.updateQueue,ae.memoizedState=le.memoizedState,ae.lanes=le.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var pe=Gm(I);if(pe!==null){pe.flags&=-257,Xm(pe,I,z,w,o),pe.mode&1&&Km(w,ie,o),o=pe,W=ie;var ve=o.updateQueue;if(ve===null){var we=new Set;we.add(W),o.updateQueue=we}else ve.add(W);break e}else{if((o&1)===0){Km(w,ie,o),yf();break e}W=Error(n(426))}}else if(Be&&z.mode&1){var Ke=Gm(I);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),Xm(Ke,I,z,w,o),Cc(Mi(W,z));break e}}w=W=Mi(W,z),rt!==4&&(rt=2),ss===null?ss=[w]:ss.push(w),w=I;do{switch(w.tag){case 3:w.flags|=65536,o&=-o,w.lanes|=o;var te=qm(w,W,o);wm(w,te);break e;case 1:z=W;var X=w.type,ne=w.stateNode;if((w.flags&128)===0&&(typeof X.getDerivedStateFromError=="function"||ne!==null&&typeof ne.componentDidCatch=="function"&&(pr===null||!pr.has(ne)))){w.flags|=65536,o&=-o,w.lanes|=o;var ce=Ym(w,z,o);wm(w,ce);break e}}w=w.return}while(w!==null)}Cg(u)}catch(be){o=be,Je===u&&u!==null&&(Je=u=u.return);continue}break}while(!0)}function _g(){var r=Wl.current;return Wl.current=zl,r===null?zl:r}function yf(){(rt===0||rt===3||rt===2)&&(rt=4),st===null||(Ur&268435455)===0&&(ql&268435455)===0||yr(st,ct)}function Jl(r,o){var u=Le;Le|=2;var h=_g();(st!==r||ct!==o)&&(Un=null,qr(r,o));do try{MS();break}catch(y){Eg(r,y)}while(!0);if(Tc(),Le=u,Wl.current=h,Je!==null)throw Error(n(261));return st=null,ct=0,rt}function MS(){for(;Je!==null;)Ng(Je)}function RS(){for(;Je!==null&&!zu();)Ng(Je)}function Ng(r){var o=Pg(r.alternate,r,zt);r.memoizedProps=r.pendingProps,o===null?Cg(r):Je=o,af.current=null}function Cg(r){var o=r;do{var u=o.alternate;if(r=o.return,(o.flags&32768)===0){if(u=CS(u,o,zt),u!==null){Je=u;return}}else{if(u=IS(u,o),u!==null){u.flags&=32767,Je=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{rt=6,Je=null;return}}if(o=o.sibling,o!==null){Je=o;return}Je=o=r}while(o!==null);rt===0&&(rt=5)}function Yr(r,o,u){var h=Re,y=Gt.transition;try{Gt.transition=null,Re=1,DS(r,o,u,h)}finally{Gt.transition=y,Re=h}return null}function DS(r,o,u,h){do $i();while(mr!==null);if((Le&6)!==0)throw Error(n(327));u=r.finishedWork;var y=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var w=u.lanes|u.childLanes;if(Yu(r,w),r===st&&(Je=st=null,ct=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Kl||(Kl=!0,Ag(di,function(){return $i(),null})),w=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||w){w=Gt.transition,Gt.transition=null;var I=Re;Re=1;var z=Le;Le|=4,af.current=null,PS(r,u),yg(u,r),nS(gc),ul=!!mc,gc=mc=null,r.current=u,AS(u),nl(),Le=z,Re=I,Gt.transition=w}else r.current=u;if(Kl&&(Kl=!1,mr=r,Gl=y),w=r.pendingLanes,w===0&&(pr=null),Vu(u.stateNode),Tt(r,Ue()),o!==null)for(h=r.onRecoverableError,u=0;u<o.length;u++)y=o[u],h(y.value,{componentStack:y.stack,digest:y.digest});if(Yl)throw Yl=!1,r=ff,ff=null,r;return(Gl&1)!==0&&r.tag!==0&&$i(),w=r.pendingLanes,(w&1)!==0?r===df?ls++:(ls=0,df=r):ls=0,cr(),null}function $i(){if(mr!==null){var r=mp(Gl),o=Gt.transition,u=Re;try{if(Gt.transition=null,Re=16>r?16:r,mr===null)var h=!1;else{if(r=mr,mr=null,Gl=0,(Le&6)!==0)throw Error(n(331));var y=Le;for(Le|=4,ge=r.current;ge!==null;){var w=ge,I=w.child;if((ge.flags&16)!==0){var z=w.deletions;if(z!==null){for(var W=0;W<z.length;W++){var ie=z[W];for(ge=ie;ge!==null;){var ae=ge;switch(ae.tag){case 0:case 11:case 15:is(8,ae,w)}var ue=ae.child;if(ue!==null)ue.return=ae,ge=ue;else for(;ge!==null;){ae=ge;var le=ae.sibling,pe=ae.return;if(dg(ae),ae===ie){ge=null;break}if(le!==null){le.return=pe,ge=le;break}ge=pe}}}var ve=w.alternate;if(ve!==null){var we=ve.child;if(we!==null){ve.child=null;do{var Ke=we.sibling;we.sibling=null,we=Ke}while(we!==null)}}ge=w}}if((w.subtreeFlags&2064)!==0&&I!==null)I.return=w,ge=I;else e:for(;ge!==null;){if(w=ge,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:is(9,w,w.return)}var te=w.sibling;if(te!==null){te.return=w.return,ge=te;break e}ge=w.return}}var X=r.current;for(ge=X;ge!==null;){I=ge;var ne=I.child;if((I.subtreeFlags&2064)!==0&&ne!==null)ne.return=I,ge=ne;else e:for(I=X;ge!==null;){if(z=ge,(z.flags&2048)!==0)try{switch(z.tag){case 0:case 11:case 15:Ul(9,z)}}catch(be){Ye(z,z.return,be)}if(z===I){ge=null;break e}var ce=z.sibling;if(ce!==null){ce.return=z.return,ge=ce;break e}ge=z.return}}if(Le=y,cr(),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(hi,r)}catch{}h=!0}return h}finally{Re=u,Gt.transition=o}}return!1}function Ig(r,o,u){o=Mi(u,o),o=qm(r,o,1),r=dr(r,o,1),o=wt(),r!==null&&(Dr(r,1,o),Tt(r,o))}function Ye(r,o,u){if(r.tag===3)Ig(r,r,u);else for(;o!==null;){if(o.tag===3){Ig(o,r,u);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(pr===null||!pr.has(h))){r=Mi(u,r),r=Ym(o,r,1),o=dr(o,r,1),r=wt(),o!==null&&(Dr(o,1,r),Tt(o,r));break}}o=o.return}}function jS(r,o,u){var h=r.pingCache;h!==null&&h.delete(o),o=wt(),r.pingedLanes|=r.suspendedLanes&u,st===r&&(ct&u)===u&&(rt===4||rt===3&&(ct&130023424)===ct&&500>Ue()-cf?qr(r,0):uf|=u),Tt(r,o)}function Tg(r,o){o===0&&((r.mode&1)===0?o=1:(o=mi,mi<<=1,(mi&130023424)===0&&(mi=4194304)));var u=wt();r=Bn(r,o),r!==null&&(Dr(r,o,u),Tt(r,u))}function $S(r){var o=r.memoizedState,u=0;o!==null&&(u=o.retryLane),Tg(r,u)}function zS(r,o){var u=0;switch(r.tag){case 13:var h=r.stateNode,y=r.memoizedState;y!==null&&(u=y.retryLane);break;case 19:h=r.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),Tg(r,u)}var Pg;Pg=function(r,o,u){if(r!==null)if(r.memoizedProps!==o.pendingProps||_t.current)Ct=!0;else{if((r.lanes&u)===0&&(o.flags&128)===0)return Ct=!1,NS(r,o,u);Ct=(r.flags&131072)!==0}else Ct=!1,Be&&(o.flags&1048576)!==0&&um(o,Cl,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;Vl(r,o),r=o.pendingProps;var y=Ni(o,ht.current);Oi(o,u),y=Fc(null,o,h,r,y,u);var w=Bc();return o.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Nt(h)?(w=!0,El(o)):w=!1,o.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Lc(o),y.updater=Fl,o.stateNode=y,y._reactInternals=o,Yc(o,h,r,u),o=Qc(null,o,h,!0,w,u)):(o.tag=0,Be&&w&&kc(o),vt(null,o,y,u),o=o.child),o;case 16:h=o.elementType;e:{switch(Vl(r,o),r=o.pendingProps,y=h._init,h=y(h._payload),o.type=h,y=o.tag=BS(h),r=on(h,r),y){case 0:o=Xc(null,o,h,r,u);break e;case 1:o=ng(null,o,h,r,u);break e;case 11:o=Qm(null,o,h,r,u);break e;case 14:o=Jm(null,o,h,on(h.type,r),u);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,y=o.pendingProps,y=o.elementType===h?y:on(h,y),Xc(r,o,h,y,u);case 1:return h=o.type,y=o.pendingProps,y=o.elementType===h?y:on(h,y),ng(r,o,h,y,u);case 3:e:{if(rg(o),r===null)throw Error(n(387));h=o.pendingProps,w=o.memoizedState,y=w.element,vm(r,o),Ll(o,h,null,u);var I=o.memoizedState;if(h=I.element,w.isDehydrated)if(w={element:h,isDehydrated:!1,cache:I.cache,pendingSuspenseBoundaries:I.pendingSuspenseBoundaries,transitions:I.transitions},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){y=Mi(Error(n(423)),o),o=ig(r,o,h,u,y);break e}else if(h!==y){y=Mi(Error(n(424)),o),o=ig(r,o,h,u,y);break e}else for($t=lr(o.stateNode.containerInfo.firstChild),jt=o,Be=!0,rn=null,u=gm(o,null,h,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ti(),h===y){o=Hn(r,o,u);break e}vt(r,o,h,u)}o=o.child}return o;case 5:return bm(o),r===null&&Nc(o),h=o.type,y=o.pendingProps,w=r!==null?r.memoizedProps:null,I=y.children,yc(h,y)?I=null:w!==null&&yc(h,w)&&(o.flags|=32),tg(r,o),vt(r,o,I,u),o.child;case 6:return r===null&&Nc(o),null;case 13:return og(r,o,u);case 4:return Mc(o,o.stateNode.containerInfo),h=o.pendingProps,r===null?o.child=Pi(o,null,h,u):vt(r,o,h,u),o.child;case 11:return h=o.type,y=o.pendingProps,y=o.elementType===h?y:on(h,y),Qm(r,o,h,y,u);case 7:return vt(r,o,o.pendingProps,u),o.child;case 8:return vt(r,o,o.pendingProps.children,u),o.child;case 12:return vt(r,o,o.pendingProps.children,u),o.child;case 10:e:{if(h=o.type._context,y=o.pendingProps,w=o.memoizedProps,I=y.value,De(Pl,h._currentValue),h._currentValue=I,w!==null)if(nn(w.value,I)){if(w.children===y.children&&!_t.current){o=Hn(r,o,u);break e}}else for(w=o.child,w!==null&&(w.return=o);w!==null;){var z=w.dependencies;if(z!==null){I=w.child;for(var W=z.firstContext;W!==null;){if(W.context===h){if(w.tag===1){W=Vn(-1,u&-u),W.tag=2;var ie=w.updateQueue;if(ie!==null){ie=ie.shared;var ae=ie.pending;ae===null?W.next=W:(W.next=ae.next,ae.next=W),ie.pending=W}}w.lanes|=u,W=w.alternate,W!==null&&(W.lanes|=u),Ac(w.return,u,o),z.lanes|=u;break}W=W.next}}else if(w.tag===10)I=w.type===o.type?null:w.child;else if(w.tag===18){if(I=w.return,I===null)throw Error(n(341));I.lanes|=u,z=I.alternate,z!==null&&(z.lanes|=u),Ac(I,u,o),I=w.sibling}else I=w.child;if(I!==null)I.return=w;else for(I=w;I!==null;){if(I===o){I=null;break}if(w=I.sibling,w!==null){w.return=I.return,I=w;break}I=I.return}w=I}vt(r,o,y.children,u),o=o.child}return o;case 9:return y=o.type,h=o.pendingProps.children,Oi(o,u),y=Yt(y),h=h(y),o.flags|=1,vt(r,o,h,u),o.child;case 14:return h=o.type,y=on(h,o.pendingProps),y=on(h.type,y),Jm(r,o,h,y,u);case 15:return Zm(r,o,o.type,o.pendingProps,u);case 17:return h=o.type,y=o.pendingProps,y=o.elementType===h?y:on(h,y),Vl(r,o),o.tag=1,Nt(h)?(r=!0,El(o)):r=!1,Oi(o,u),Um(o,h,y),Yc(o,h,y,u),Qc(null,o,h,!0,r,u);case 19:return lg(r,o,u);case 22:return eg(r,o,u)}throw Error(n(156,o.tag))};function Ag(r,o){return el(r,o)}function FS(r,o,u,h){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(r,o,u,h){return new FS(r,o,u,h)}function vf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function BS(r){if(typeof r=="function")return vf(r)?1:0;if(r!=null){if(r=r.$$typeof,r===$)return 11;if(r===G)return 14}return 2}function vr(r,o){var u=r.alternate;return u===null?(u=Xt(r.tag,o,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=o,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,o=r.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function Zl(r,o,u,h,y,w){var I=2;if(h=r,typeof r=="function")vf(r)&&(I=1);else if(typeof r=="string")I=5;else e:switch(r){case R:return Kr(u.children,y,w,o);case C:I=8,y|=8;break;case P:return r=Xt(12,u,o,y|2),r.elementType=P,r.lanes=w,r;case Z:return r=Xt(13,u,o,y),r.elementType=Z,r.lanes=w,r;case j:return r=Xt(19,u,o,y),r.elementType=j,r.lanes=w,r;case J:return ea(u,y,w,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case F:I=10;break e;case M:I=9;break e;case $:I=11;break e;case G:I=14;break e;case q:I=16,h=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return o=Xt(I,u,o,y),o.elementType=r,o.type=h,o.lanes=w,o}function Kr(r,o,u,h){return r=Xt(7,r,h,o),r.lanes=u,r}function ea(r,o,u,h){return r=Xt(22,r,h,o),r.elementType=J,r.lanes=u,r.stateNode={isHidden:!1},r}function wf(r,o,u){return r=Xt(6,r,null,o),r.lanes=u,r}function xf(r,o,u){return o=Xt(4,r.children!==null?r.children:[],r.key,o),o.lanes=u,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function VS(r,o,u,h,y){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rr(0),this.expirationTimes=Rr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rr(0),this.identifierPrefix=h,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function bf(r,o,u,h,y,w,I,z,W){return r=new VS(r,o,u,z,W),o===1?(o=1,w===!0&&(o|=8)):o=0,w=Xt(3,null,null,o),r.current=w,w.stateNode=r,w.memoizedState={element:h,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lc(w),r}function HS(r,o,u){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:r,containerInfo:o,implementation:u}}function Og(r){if(!r)return ur;r=r._reactInternals;e:{if(bn(r)!==r||r.tag!==1)throw Error(n(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Nt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(Nt(u))return sm(r,u,o)}return o}function Lg(r,o,u,h,y,w,I,z,W){return r=bf(u,h,!0,r,y,w,I,z,W),r.context=Og(null),u=r.current,h=wt(),y=gr(u),w=Vn(h,y),w.callback=o??null,dr(u,w,y),r.current.lanes=y,Dr(r,y,h),Tt(r,h),r}function ta(r,o,u,h){var y=o.current,w=wt(),I=gr(y);return u=Og(u),o.context===null?o.context=u:o.pendingContext=u,o=Vn(w,I),o.payload={element:r},h=h===void 0?null:h,h!==null&&(o.callback=h),r=dr(y,o,I),r!==null&&(an(r,y,I,w),Ol(r,y,I)),I}function na(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Mg(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<o?u:o}}function Sf(r,o){Mg(r,o),(r=r.alternate)&&Mg(r,o)}function US(){return null}var Rg=typeof reportError=="function"?reportError:function(r){console.error(r)};function kf(r){this._internalRoot=r}ra.prototype.render=kf.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));ta(r,o,null,null)},ra.prototype.unmount=kf.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Wr(function(){ta(null,r,null,null)}),o[jn]=null}};function ra(r){this._internalRoot=r}ra.prototype.unstable_scheduleHydration=function(r){if(r){var o=vp();r={blockedOn:null,target:r,priority:o};for(var u=0;u<ir.length&&o!==0&&o<ir[u].priority;u++);ir.splice(u,0,r),u===0&&bp(r)}};function Ef(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function ia(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Dg(){}function WS(r,o,u,h,y){if(y){if(typeof h=="function"){var w=h;h=function(){var ie=na(I);w.call(ie)}}var I=Lg(o,h,r,0,null,!1,!1,"",Dg);return r._reactRootContainer=I,r[jn]=I.current,Wo(r.nodeType===8?r.parentNode:r),Wr(),I}for(;y=r.lastChild;)r.removeChild(y);if(typeof h=="function"){var z=h;h=function(){var ie=na(W);z.call(ie)}}var W=bf(r,0,!1,null,null,!1,!1,"",Dg);return r._reactRootContainer=W,r[jn]=W.current,Wo(r.nodeType===8?r.parentNode:r),Wr(function(){ta(o,W,u,h)}),W}function oa(r,o,u,h,y){var w=u._reactRootContainer;if(w){var I=w;if(typeof y=="function"){var z=y;y=function(){var W=na(I);z.call(W)}}ta(o,I,r,y)}else I=WS(u,o,r,y,h);return na(I)}gp=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var u=Mr(o.pendingLanes);u!==0&&(gi(o,u|1),Tt(o,Ue()),(Le&6)===0&&(ji=Ue()+500,cr()))}break;case 13:Wr(function(){var h=Bn(r,1);if(h!==null){var y=wt();an(h,r,1,y)}}),Sf(r,1)}},Ku=function(r){if(r.tag===13){var o=Bn(r,134217728);if(o!==null){var u=wt();an(o,r,134217728,u)}Sf(r,134217728)}},yp=function(r){if(r.tag===13){var o=gr(r),u=Bn(r,o);if(u!==null){var h=wt();an(u,r,o,h)}Sf(r,o)}},vp=function(){return Re},wp=function(r,o){var u=Re;try{return Re=r,o()}finally{Re=u}},Eo=function(r,o,u){switch(o){case"input":if($e(r,u),o=u.name,u.type==="radio"&&o!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<u.length;o++){var h=u[o];if(h!==r&&h.form===r.form){var y=Sl(h);if(!y)throw Error(n(90));he(h),$e(h,y)}}}break;case"textarea":xn(r,u);break;case"select":o=u.value,o!=null&&dt(r,!!u.multiple,o,!1)}},Gs=mf,Xs=Wr;var qS={usingClientEntryPoint:!1,Events:[Ko,Ei,Sl,Ys,Ks,mf]},as={findFiberByHostInstance:jr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},YS={bundleType:as.bundleType,version:as.version,rendererPackageName:as.rendererPackageName,rendererConfig:as.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:N.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Js(r),r===null?null:r.stateNode},findFiberByHostInstance:as.findFiberByHostInstance||US,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 sa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sa.isDisabled&&sa.supportsFiber)try{hi=sa.inject(YS),Mt=sa}catch{}}return Pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qS,Pt.createPortal=function(r,o){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ef(o))throw Error(n(200));return HS(r,o,null,u)},Pt.createRoot=function(r,o){if(!Ef(r))throw Error(n(299));var u=!1,h="",y=Rg;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(y=o.onRecoverableError)),o=bf(r,1,!1,null,null,u,!1,h,y),r[jn]=o.current,Wo(r.nodeType===8?r.parentNode:r),new kf(o)},Pt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Js(o),r=r===null?null:r.stateNode,r},Pt.flushSync=function(r){return Wr(r)},Pt.hydrate=function(r,o,u){if(!ia(o))throw Error(n(200));return oa(null,r,o,!0,u)},Pt.hydrateRoot=function(r,o,u){if(!Ef(r))throw Error(n(405));var h=u!=null&&u.hydratedSources||null,y=!1,w="",I=Rg;if(u!=null&&(u.unstable_strictMode===!0&&(y=!0),u.identifierPrefix!==void 0&&(w=u.identifierPrefix),u.onRecoverableError!==void 0&&(I=u.onRecoverableError)),o=Lg(o,null,r,1,u??null,y,!1,w,I),r[jn]=o.current,Wo(r),h)for(r=0;r<h.length;r++)u=h[r],y=u._getVersion,y=y(u._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[u,y]:o.mutableSourceEagerHydrationData.push(u,y);return new ra(o)},Pt.render=function(r,o,u){if(!ia(o))throw Error(n(200));return oa(null,r,o,!1,u)},Pt.unmountComponentAtNode=function(r){if(!ia(r))throw Error(n(40));return r._reactRootContainer?(Wr(function(){oa(null,null,r,!1,function(){r._reactRootContainer=null,r[jn]=null})}),!0):!1},Pt.unstable_batchedUpdates=mf,Pt.unstable_renderSubtreeIntoContainer=function(r,o,u,h){if(!ia(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return oa(r,o,u,!1,h)},Pt.version="18.3.1-next-f1338f8080-20240426",Pt}var Ug;function Ov(){if(Ug)return Cf.exports;Ug=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Cf.exports=rk(),Cf.exports}var Wg;function ik(){if(Wg)return la;Wg=1;var e=Ov();return la.createRoot=e.createRoot,la.hydrateRoot=e.hydrateRoot,la}var ok=ik();const sk=ou(ok);function tt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,i;n<e.length;n++)(i=tt(e[n]))!==""&&(t+=(t&&" ")+i);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var lk={value:()=>{}};function su(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Aa(n)}function Aa(e){this._=e}function ak(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");if(s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Aa.prototype=su.prototype={constructor:Aa,on:function(e,t){var n=this._,i=ak(e+"",n),s,l=-1,a=i.length;if(arguments.length<2){for(;++l<a;)if((s=(e=i[l]).type)&&(s=uk(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<a;)if(s=(e=i[l]).type)n[s]=qg(n[s],e.name,t);else if(t==null)for(s in n)n[s]=qg(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Aa(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,l;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],i=0,s=l.length;i<s;++i)l[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,l=i.length;s<l;++s)i[s].value.apply(t,n)}};function uk(e,t){for(var n=0,i=e.length,s;n<i;++n)if((s=e[n]).name===t)return s.value}function qg(e,t,n){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=lk,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Qd="http://www.w3.org/1999/xhtml";const Yg={svg:"http://www.w3.org/2000/svg",xhtml:Qd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function lu(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Yg.hasOwnProperty(t)?{space:Yg[t],local:e}:e}function ck(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Qd&&t.documentElement.namespaceURI===Qd?t.createElement(e):t.createElementNS(n,e)}}function fk(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Lv(e){var t=lu(e);return(t.local?fk:ck)(t)}function dk(){}function Sh(e){return e==null?dk:function(){return this.querySelector(e)}}function hk(e){typeof e!="function"&&(e=Sh(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=new Array(a),f,d,m=0;m<a;++m)(f=l[m])&&(d=e.call(f,f.__data__,m,l))&&("__data__"in f&&(d.__data__=f.__data__),c[m]=d);return new Bt(i,this._parents)}function pk(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function mk(){return[]}function Mv(e){return e==null?mk:function(){return this.querySelectorAll(e)}}function gk(e){return function(){return pk(e.apply(this,arguments))}}function yk(e){typeof e=="function"?e=gk(e):e=Mv(e);for(var t=this._groups,n=t.length,i=[],s=[],l=0;l<n;++l)for(var a=t[l],c=a.length,f,d=0;d<c;++d)(f=a[d])&&(i.push(e.call(f,f.__data__,d,a)),s.push(f));return new Bt(i,s)}function Rv(e){return function(){return this.matches(e)}}function Dv(e){return function(t){return t.matches(e)}}var vk=Array.prototype.find;function wk(e){return function(){return vk.call(this.children,e)}}function xk(){return this.firstElementChild}function bk(e){return this.select(e==null?xk:wk(typeof e=="function"?e:Dv(e)))}var Sk=Array.prototype.filter;function kk(){return Array.from(this.children)}function Ek(e){return function(){return Sk.call(this.children,e)}}function _k(e){return this.selectAll(e==null?kk:Ek(typeof e=="function"?e:Dv(e)))}function Nk(e){typeof e!="function"&&(e=Rv(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=[],f,d=0;d<a;++d)(f=l[d])&&e.call(f,f.__data__,d,l)&&c.push(f);return new Bt(i,this._parents)}function jv(e){return new Array(e.length)}function Ck(){return new Bt(this._enter||this._groups.map(jv),this._parents)}function Ba(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ba.prototype={constructor:Ba,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ik(e){return function(){return e}}function Tk(e,t,n,i,s,l){for(var a=0,c,f=t.length,d=l.length;a<d;++a)(c=t[a])?(c.__data__=l[a],i[a]=c):n[a]=new Ba(e,l[a]);for(;a<f;++a)(c=t[a])&&(s[a]=c)}function Pk(e,t,n,i,s,l,a){var c,f,d=new Map,m=t.length,p=l.length,g=new Array(m),v;for(c=0;c<m;++c)(f=t[c])&&(g[c]=v=a.call(f,f.__data__,c,t)+"",d.has(v)?s[c]=f:d.set(v,f));for(c=0;c<p;++c)v=a.call(e,l[c],c,l)+"",(f=d.get(v))?(i[c]=f,f.__data__=l[c],d.delete(v)):n[c]=new Ba(e,l[c]);for(c=0;c<m;++c)(f=t[c])&&d.get(g[c])===f&&(s[c]=f)}function Ak(e){return e.__data__}function Ok(e,t){if(!arguments.length)return Array.from(this,Ak);var n=t?Pk:Tk,i=this._parents,s=this._groups;typeof e!="function"&&(e=Ik(e));for(var l=s.length,a=new Array(l),c=new Array(l),f=new Array(l),d=0;d<l;++d){var m=i[d],p=s[d],g=p.length,v=Lk(e.call(m,m&&m.__data__,d,i)),S=v.length,x=c[d]=new Array(S),b=a[d]=new Array(S),k=f[d]=new Array(g);n(m,p,x,b,k,v,t);for(var _=0,E=0,N,A;_<S;++_)if(N=x[_]){for(_>=E&&(E=_+1);!(A=b[E])&&++E<S;);N._next=A||null}}return a=new Bt(a,i),a._enter=c,a._exit=f,a}function Lk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Mk(){return new Bt(this._exit||this._groups.map(jv),this._parents)}function Rk(e,t,n){var i=this.enter(),s=this,l=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?l.remove():n(l),i&&s?i.merge(s).order():s}function Dk(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,s=n.length,l=i.length,a=Math.min(s,l),c=new Array(s),f=0;f<a;++f)for(var d=n[f],m=i[f],p=d.length,g=c[f]=new Array(p),v,S=0;S<p;++S)(v=d[S]||m[S])&&(g[S]=v);for(;f<s;++f)c[f]=n[f];return new Bt(c,this._parents)}function jk(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],s=i.length-1,l=i[s],a;--s>=0;)(a=i[s])&&(l&&a.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(a,l),l=a);return this}function $k(e){e||(e=zk);function t(p,g){return p&&g?e(p.__data__,g.__data__):!p-!g}for(var n=this._groups,i=n.length,s=new Array(i),l=0;l<i;++l){for(var a=n[l],c=a.length,f=s[l]=new Array(c),d,m=0;m<c;++m)(d=a[m])&&(f[m]=d);f.sort(t)}return new Bt(s,this._parents).order()}function zk(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Fk(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Bk(){return Array.from(this)}function Vk(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,l=i.length;s<l;++s){var a=i[s];if(a)return a}return null}function Hk(){let e=0;for(const t of this)++e;return e}function Uk(){return!this.node()}function Wk(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var s=t[n],l=0,a=s.length,c;l<a;++l)(c=s[l])&&e.call(c,c.__data__,l,s);return this}function qk(e){return function(){this.removeAttribute(e)}}function Yk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Kk(e,t){return function(){this.setAttribute(e,t)}}function Gk(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xk(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Qk(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Jk(e,t){var n=lu(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?Yk:qk:typeof t=="function"?n.local?Qk:Xk:n.local?Gk:Kk)(n,t))}function $v(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Zk(e){return function(){this.style.removeProperty(e)}}function eE(e,t,n){return function(){this.style.setProperty(e,t,n)}}function tE(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function nE(e,t,n){return arguments.length>1?this.each((t==null?Zk:typeof t=="function"?tE:eE)(e,t,n??"")):to(this.node(),e)}function to(e,t){return e.style.getPropertyValue(t)||$v(e).getComputedStyle(e,null).getPropertyValue(t)}function rE(e){return function(){delete this[e]}}function iE(e,t){return function(){this[e]=t}}function oE(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function sE(e,t){return arguments.length>1?this.each((t==null?rE:typeof t=="function"?oE:iE)(e,t)):this.node()[e]}function zv(e){return e.trim().split(/^|\s+/)}function kh(e){return e.classList||new Fv(e)}function Fv(e){this._node=e,this._names=zv(e.getAttribute("class")||"")}Fv.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Bv(e,t){for(var n=kh(e),i=-1,s=t.length;++i<s;)n.add(t[i])}function Vv(e,t){for(var n=kh(e),i=-1,s=t.length;++i<s;)n.remove(t[i])}function lE(e){return function(){Bv(this,e)}}function aE(e){return function(){Vv(this,e)}}function uE(e,t){return function(){(t.apply(this,arguments)?Bv:Vv)(this,e)}}function cE(e,t){var n=zv(e+"");if(arguments.length<2){for(var i=kh(this.node()),s=-1,l=n.length;++s<l;)if(!i.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?uE:t?lE:aE)(n,t))}function fE(){this.textContent=""}function dE(e){return function(){this.textContent=e}}function hE(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function pE(e){return arguments.length?this.each(e==null?fE:(typeof e=="function"?hE:dE)(e)):this.node().textContent}function mE(){this.innerHTML=""}function gE(e){return function(){this.innerHTML=e}}function yE(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function vE(e){return arguments.length?this.each(e==null?mE:(typeof e=="function"?yE:gE)(e)):this.node().innerHTML}function wE(){this.nextSibling&&this.parentNode.appendChild(this)}function xE(){return this.each(wE)}function bE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function SE(){return this.each(bE)}function kE(e){var t=typeof e=="function"?e:Lv(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function EE(){return null}function _E(e,t){var n=typeof e=="function"?e:Lv(e),i=t==null?EE:typeof t=="function"?t:Sh(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function NE(){var e=this.parentNode;e&&e.removeChild(this)}function CE(){return this.each(NE)}function IE(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function TE(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function PE(e){return this.select(e?TE:IE)}function AE(e){return arguments.length?this.property("__data__",e):this.node().__data__}function OE(e){return function(t){e.call(this,t,this.__data__)}}function LE(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function ME(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,s=t.length,l;n<s;++n)l=t[n],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++i]=l;++i?t.length=i:delete this.__on}}}function RE(e,t,n){return function(){var i=this.__on,s,l=OE(t);if(i){for(var a=0,c=i.length;a<c;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=l,s.options=n),s.value=t;return}}this.addEventListener(e.type,l,n),s={type:e.type,name:e.name,value:t,listener:l,options:n},i?i.push(s):this.__on=[s]}}function DE(e,t,n){var i=LE(e+""),s,l=i.length,a;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,d=c.length,m;f<d;++f)for(s=0,m=c[f];s<l;++s)if((a=i[s]).type===m.type&&a.name===m.name)return m.value}return}for(c=t?RE:ME,s=0;s<l;++s)this.each(c(i[s],t,n));return this}function Hv(e,t,n){var i=$v(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,n):(s=i.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function jE(e,t){return function(){return Hv(this,e,t)}}function $E(e,t){return function(){return Hv(this,e,t.apply(this,arguments))}}function zE(e,t){return this.each((typeof t=="function"?$E:jE)(e,t))}function*FE(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,l=i.length,a;s<l;++s)(a=i[s])&&(yield a)}var Uv=[null];function Bt(e,t){this._groups=e,this._parents=t}function Ms(){return new Bt([[document.documentElement]],Uv)}function BE(){return this}Bt.prototype=Ms.prototype={constructor:Bt,select:hk,selectAll:yk,selectChild:bk,selectChildren:_k,filter:Nk,data:Ok,enter:Ck,exit:Mk,join:Rk,merge:Dk,selection:BE,order:jk,sort:$k,call:Fk,nodes:Bk,node:Vk,size:Hk,empty:Uk,each:Wk,attr:Jk,style:nE,property:sE,classed:cE,text:pE,html:vE,raise:xE,lower:SE,append:kE,insert:_E,remove:CE,clone:PE,datum:AE,on:DE,dispatch:zE,[Symbol.iterator]:FE};function Ft(e){return typeof e=="string"?new Bt([[document.querySelector(e)]],[document.documentElement]):new Bt([[e]],Uv)}function VE(e){let t;for(;t=e.sourceEvent;)e=t;return e}function cn(e,t){if(e=VE(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}const HE={passive:!1},Ss={capture:!0,passive:!1};function Pf(e){e.stopImmediatePropagation()}function Xi(e){e.preventDefault(),e.stopImmediatePropagation()}function Wv(e){var t=e.document.documentElement,n=Ft(e).on("dragstart.drag",Xi,Ss);"onselectstart"in t?n.on("selectstart.drag",Xi,Ss):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function qv(e,t){var n=e.document.documentElement,i=Ft(e).on("dragstart.drag",null);t&&(i.on("click.drag",Xi,Ss),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const aa=e=>()=>e;function Jd(e,{sourceEvent:t,subject:n,target:i,identifier:s,active:l,x:a,y:c,dx:f,dy:d,dispatch:m}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:l,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:m}})}Jd.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function UE(e){return!e.ctrlKey&&!e.button}function WE(){return this.parentNode}function qE(e,t){return t??{x:e.x,y:e.y}}function YE(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yv(){var e=UE,t=WE,n=qE,i=YE,s={},l=su("start","drag","end"),a=0,c,f,d,m,p=0;function g(N){N.on("mousedown.drag",v).filter(i).on("touchstart.drag",b).on("touchmove.drag",k,HE).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(N,A){if(!(m||!e.call(this,N,A))){var L=E(this,t.call(this,N,A),N,A,"mouse");L&&(Ft(N.view).on("mousemove.drag",S,Ss).on("mouseup.drag",x,Ss),Wv(N.view),Pf(N),d=!1,c=N.clientX,f=N.clientY,L("start",N))}}function S(N){if(Xi(N),!d){var A=N.clientX-c,L=N.clientY-f;d=A*A+L*L>p}s.mouse("drag",N)}function x(N){Ft(N.view).on("mousemove.drag mouseup.drag",null),qv(N.view,d),Xi(N),s.mouse("end",N)}function b(N,A){if(e.call(this,N,A)){var L=N.changedTouches,R=t.call(this,N,A),C=L.length,P,F;for(P=0;P<C;++P)(F=E(this,R,N,A,L[P].identifier,L[P]))&&(Pf(N),F("start",N,L[P]))}}function k(N){var A=N.changedTouches,L=A.length,R,C;for(R=0;R<L;++R)(C=s[A[R].identifier])&&(Xi(N),C("drag",N,A[R]))}function _(N){var A=N.changedTouches,L=A.length,R,C;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),R=0;R<L;++R)(C=s[A[R].identifier])&&(Pf(N),C("end",N,A[R]))}function E(N,A,L,R,C,P){var F=l.copy(),M=cn(P||L,A),$,Z,j;if((j=n.call(N,new Jd("beforestart",{sourceEvent:L,target:g,identifier:C,active:a,x:M[0],y:M[1],dx:0,dy:0,dispatch:F}),R))!=null)return $=j.x-M[0]||0,Z=j.y-M[1]||0,function G(q,J,Y){var U=M,B;switch(q){case"start":s[C]=G,B=a++;break;case"end":delete s[C],--a;case"drag":M=cn(Y||J,A),B=a;break}F.call(q,N,new Jd(q,{sourceEvent:J,subject:j,target:g,identifier:C,active:B,x:M[0]+$,y:M[1]+Z,dx:M[0]-U[0],dy:M[1]-U[1],dispatch:F}),R)}}return g.filter=function(N){return arguments.length?(e=typeof N=="function"?N:aa(!!N),g):e},g.container=function(N){return arguments.length?(t=typeof N=="function"?N:aa(N),g):t},g.subject=function(N){return arguments.length?(n=typeof N=="function"?N:aa(N),g):n},g.touchable=function(N){return arguments.length?(i=typeof N=="function"?N:aa(!!N),g):i},g.on=function(){var N=l.on.apply(l,arguments);return N===l?g:N},g.clickDistance=function(N){return arguments.length?(p=(N=+N)*N,g):Math.sqrt(p)},g}function Eh(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Kv(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Rs(){}var ks=.7,Va=1/ks,Qi="\\s*([+-]?\\d+)\\s*",Es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KE=/^#([0-9a-f]{3,8})$/,GE=new RegExp(`^rgb\\(${Qi},${Qi},${Qi}\\)$`),XE=new RegExp(`^rgb\\(${Pn},${Pn},${Pn}\\)$`),QE=new RegExp(`^rgba\\(${Qi},${Qi},${Qi},${Es}\\)$`),JE=new RegExp(`^rgba\\(${Pn},${Pn},${Pn},${Es}\\)$`),ZE=new RegExp(`^hsl\\(${Es},${Pn},${Pn}\\)$`),e_=new RegExp(`^hsla\\(${Es},${Pn},${Pn},${Es}\\)$`),Kg={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};Eh(Rs,ri,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Gg,formatHex:Gg,formatHex8:t_,formatHsl:n_,formatRgb:Xg,toString:Xg});function Gg(){return this.rgb().formatHex()}function t_(){return this.rgb().formatHex8()}function n_(){return Gv(this).formatHsl()}function Xg(){return this.rgb().formatRgb()}function ri(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=KE.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Qg(t):n===3?new At(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ua(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ua(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=GE.exec(e))?new At(t[1],t[2],t[3],1):(t=XE.exec(e))?new At(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QE.exec(e))?ua(t[1],t[2],t[3],t[4]):(t=JE.exec(e))?ua(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ZE.exec(e))?ey(t[1],t[2]/100,t[3]/100,1):(t=e_.exec(e))?ey(t[1],t[2]/100,t[3]/100,t[4]):Kg.hasOwnProperty(e)?Qg(Kg[e]):e==="transparent"?new At(NaN,NaN,NaN,0):null}function Qg(e){return new At(e>>16&255,e>>8&255,e&255,1)}function ua(e,t,n,i){return i<=0&&(e=t=n=NaN),new At(e,t,n,i)}function r_(e){return e instanceof Rs||(e=ri(e)),e?(e=e.rgb(),new At(e.r,e.g,e.b,e.opacity)):new At}function Zd(e,t,n,i){return arguments.length===1?r_(e):new At(e,t,n,i??1)}function At(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Eh(At,Zd,Kv(Rs,{brighter(e){return e=e==null?Va:Math.pow(Va,e),new At(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ks:Math.pow(ks,e),new At(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new At(ti(this.r),ti(this.g),ti(this.b),Ha(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:Jg,formatHex:Jg,formatHex8:i_,formatRgb:Zg,toString:Zg}));function Jg(){return`#${Jr(this.r)}${Jr(this.g)}${Jr(this.b)}`}function i_(){return`#${Jr(this.r)}${Jr(this.g)}${Jr(this.b)}${Jr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Zg(){const e=Ha(this.opacity);return`${e===1?"rgb(":"rgba("}${ti(this.r)}, ${ti(this.g)}, ${ti(this.b)}${e===1?")":`, ${e})`}`}function Ha(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ti(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jr(e){return e=ti(e),(e<16?"0":"")+e.toString(16)}function ey(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fn(e,t,n,i)}function Gv(e){if(e instanceof fn)return new fn(e.h,e.s,e.l,e.opacity);if(e instanceof Rs||(e=ri(e)),!e)return new fn;if(e instanceof fn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,s=Math.min(t,n,i),l=Math.max(t,n,i),a=NaN,c=l-s,f=(l+s)/2;return c?(t===l?a=(n-i)/c+(n<i)*6:n===l?a=(i-t)/c+2:a=(t-n)/c+4,c/=f<.5?l+s:2-l-s,a*=60):c=f>0&&f<1?0:a,new fn(a,c,f,e.opacity)}function o_(e,t,n,i){return arguments.length===1?Gv(e):new fn(e,t,n,i??1)}function fn(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Eh(fn,o_,Kv(Rs,{brighter(e){return e=e==null?Va:Math.pow(Va,e),new fn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ks:Math.pow(ks,e),new fn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,s=2*n-i;return new At(Af(e>=240?e-240:e+120,s,i),Af(e,s,i),Af(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new fn(ty(this.h),ca(this.s),ca(this.l),Ha(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ha(this.opacity);return`${e===1?"hsl(":"hsla("}${ty(this.h)}, ${ca(this.s)*100}%, ${ca(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ty(e){return e=(e||0)%360,e<0?e+360:e}function ca(e){return Math.max(0,Math.min(1,e||0))}function Af(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const _h=e=>()=>e;function s_(e,t){return function(n){return e+n*t}}function l_(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function a_(e){return(e=+e)==1?Xv:function(t,n){return n-t?l_(t,n,e):_h(isNaN(t)?n:t)}}function Xv(e,t){var n=t-e;return n?s_(e,n):_h(isNaN(e)?t:e)}const Ua=(function e(t){var n=a_(t);function i(s,l){var a=n((s=Zd(s)).r,(l=Zd(l)).r),c=n(s.g,l.g),f=n(s.b,l.b),d=Xv(s.opacity,l.opacity);return function(m){return s.r=a(m),s.g=c(m),s.b=f(m),s.opacity=d(m),s+""}}return i.gamma=e,i})(1);function u_(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,i=t.slice(),s;return function(l){for(s=0;s<n;++s)i[s]=e[s]*(1-l)+t[s]*l;return i}}function c_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function f_(e,t){var n=t?t.length:0,i=e?Math.min(n,e.length):0,s=new Array(i),l=new Array(n),a;for(a=0;a<i;++a)s[a]=vs(e[a],t[a]);for(;a<n;++a)l[a]=t[a];return function(c){for(a=0;a<i;++a)l[a]=s[a](c);return l}}function d_(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function In(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function h_(e,t){var n={},i={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?n[s]=vs(e[s],t[s]):i[s]=t[s];return function(l){for(s in n)i[s]=n[s](l);return i}}var eh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Of=new RegExp(eh.source,"g");function p_(e){return function(){return e}}function m_(e){return function(t){return e(t)+""}}function Qv(e,t){var n=eh.lastIndex=Of.lastIndex=0,i,s,l,a=-1,c=[],f=[];for(e=e+"",t=t+"";(i=eh.exec(e))&&(s=Of.exec(t));)(l=s.index)>n&&(l=t.slice(n,l),c[a]?c[a]+=l:c[++a]=l),(i=i[0])===(s=s[0])?c[a]?c[a]+=s:c[++a]=s:(c[++a]=null,f.push({i:a,x:In(i,s)})),n=Of.lastIndex;return n<t.length&&(l=t.slice(n),c[a]?c[a]+=l:c[++a]=l),c.length<2?f[0]?m_(f[0].x):p_(t):(t=f.length,function(d){for(var m=0,p;m<t;++m)c[(p=f[m]).i]=p.x(d);return c.join("")})}function vs(e,t){var n=typeof t,i;return t==null||n==="boolean"?_h(t):(n==="number"?In:n==="string"?(i=ri(t))?(t=i,Ua):Qv:t instanceof ri?Ua:t instanceof Date?d_:c_(t)?u_:Array.isArray(t)?f_:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?h_:In)(e,t)}var ny=180/Math.PI,th={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jv(e,t,n,i,s,l){var a,c,f;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(f=e*n+t*i)&&(n-=e*f,i-=t*f),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,f/=c),e*i<t*n&&(e=-e,t=-t,f=-f,a=-a),{translateX:s,translateY:l,rotate:Math.atan2(t,e)*ny,skewX:Math.atan(f)*ny,scaleX:a,scaleY:c}}var fa;function g_(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?th:Jv(t.a,t.b,t.c,t.d,t.e,t.f)}function y_(e){return e==null||(fa||(fa=document.createElementNS("http://www.w3.org/2000/svg","g")),fa.setAttribute("transform",e),!(e=fa.transform.baseVal.consolidate()))?th:(e=e.matrix,Jv(e.a,e.b,e.c,e.d,e.e,e.f))}function Zv(e,t,n,i){function s(d){return d.length?d.pop()+" ":""}function l(d,m,p,g,v,S){if(d!==p||m!==g){var x=v.push("translate(",null,t,null,n);S.push({i:x-4,x:In(d,p)},{i:x-2,x:In(m,g)})}else(p||g)&&v.push("translate("+p+t+g+n)}function a(d,m,p,g){d!==m?(d-m>180?m+=360:m-d>180&&(d+=360),g.push({i:p.push(s(p)+"rotate(",null,i)-2,x:In(d,m)})):m&&p.push(s(p)+"rotate("+m+i)}function c(d,m,p,g){d!==m?g.push({i:p.push(s(p)+"skewX(",null,i)-2,x:In(d,m)}):m&&p.push(s(p)+"skewX("+m+i)}function f(d,m,p,g,v,S){if(d!==p||m!==g){var x=v.push(s(v)+"scale(",null,",",null,")");S.push({i:x-4,x:In(d,p)},{i:x-2,x:In(m,g)})}else(p!==1||g!==1)&&v.push(s(v)+"scale("+p+","+g+")")}return function(d,m){var p=[],g=[];return d=e(d),m=e(m),l(d.translateX,d.translateY,m.translateX,m.translateY,p,g),a(d.rotate,m.rotate,p,g),c(d.skewX,m.skewX,p,g),f(d.scaleX,d.scaleY,m.scaleX,m.scaleY,p,g),d=m=null,function(v){for(var S=-1,x=g.length,b;++S<x;)p[(b=g[S]).i]=b.x(v);return p.join("")}}}var v_=Zv(g_,"px, ","px)","deg)"),w_=Zv(y_,", ",")",")"),x_=1e-12;function ry(e){return((e=Math.exp(e))+1/e)/2}function b_(e){return((e=Math.exp(e))-1/e)/2}function S_(e){return((e=Math.exp(2*e))-1)/(e+1)}const Oa=(function e(t,n,i){function s(l,a){var c=l[0],f=l[1],d=l[2],m=a[0],p=a[1],g=a[2],v=m-c,S=p-f,x=v*v+S*S,b,k;if(x<x_)k=Math.log(g/d)/t,b=function(R){return[c+R*v,f+R*S,d*Math.exp(t*R*k)]};else{var _=Math.sqrt(x),E=(g*g-d*d+i*x)/(2*d*n*_),N=(g*g-d*d-i*x)/(2*g*n*_),A=Math.log(Math.sqrt(E*E+1)-E),L=Math.log(Math.sqrt(N*N+1)-N);k=(L-A)/t,b=function(R){var C=R*k,P=ry(A),F=d/(n*_)*(P*S_(t*C+A)-b_(A));return[c+F*v,f+F*S,d*P/ry(t*C+A)]}}return b.duration=k*1e3*t/Math.SQRT2,b}return s.rho=function(l){var a=Math.max(.001,+l),c=a*a,f=c*c;return e(a,c,f)},s})(Math.SQRT2,2,4);var no=0,ps=0,cs=0,ew=1e3,Wa,ms,qa=0,ii=0,au=0,_s=typeof performance=="object"&&performance.now?performance:Date,tw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Nh(){return ii||(tw(k_),ii=_s.now()+au)}function k_(){ii=0}function Ya(){this._call=this._time=this._next=null}Ya.prototype=nw.prototype={constructor:Ya,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Nh():+n)+(t==null?0:+t),!this._next&&ms!==this&&(ms?ms._next=this:Wa=this,ms=this),this._call=e,this._time=n,nh()},stop:function(){this._call&&(this._call=null,this._time=1/0,nh())}};function nw(e,t,n){var i=new Ya;return i.restart(e,t,n),i}function E_(){Nh(),++no;for(var e=Wa,t;e;)(t=ii-e._time)>=0&&e._call.call(void 0,t),e=e._next;--no}function iy(){ii=(qa=_s.now())+au,no=ps=0;try{E_()}finally{no=0,N_(),ii=0}}function __(){var e=_s.now(),t=e-qa;t>ew&&(au-=t,qa=e)}function N_(){for(var e,t=Wa,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Wa=n);ms=e,nh(i)}function nh(e){if(!no){ps&&(ps=clearTimeout(ps));var t=e-ii;t>24?(e<1/0&&(ps=setTimeout(iy,e-_s.now()-au)),cs&&(cs=clearInterval(cs))):(cs||(qa=_s.now(),cs=setInterval(__,ew)),no=1,tw(iy))}}function oy(e,t,n){var i=new Ya;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,n),i}var C_=su("start","end","cancel","interrupt"),I_=[],rw=0,sy=1,rh=2,La=3,ly=4,ih=5,Ma=6;function uu(e,t,n,i,s,l){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;T_(e,n,{name:t,index:i,group:s,on:C_,tween:I_,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:rw})}function Ch(e,t){var n=gn(e,t);if(n.state>rw)throw new Error("too late; already scheduled");return n}function On(e,t){var n=gn(e,t);if(n.state>La)throw new Error("too late; already running");return n}function gn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function T_(e,t,n){var i=e.__transition,s;i[t]=n,n.timer=nw(l,0,n.time);function l(d){n.state=sy,n.timer.restart(a,n.delay,n.time),n.delay<=d&&a(d-n.delay)}function a(d){var m,p,g,v;if(n.state!==sy)return f();for(m in i)if(v=i[m],v.name===n.name){if(v.state===La)return oy(a);v.state===ly?(v.state=Ma,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete i[m]):+m<t&&(v.state=Ma,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete i[m])}if(oy(function(){n.state===La&&(n.state=ly,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=rh,n.on.call("start",e,e.__data__,n.index,n.group),n.state===rh){for(n.state=La,s=new Array(g=n.tween.length),m=0,p=-1;m<g;++m)(v=n.tween[m].value.call(e,e.__data__,n.index,n.group))&&(s[++p]=v);s.length=p+1}}function c(d){for(var m=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(f),n.state=ih,1),p=-1,g=s.length;++p<g;)s[p].call(e,m);n.state===ih&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=Ma,n.timer.stop(),delete i[t];for(var d in i)return;delete e.__transition}}function Ra(e,t){var n=e.__transition,i,s,l=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){l=!1;continue}s=i.state>rh&&i.state<ih,i.state=Ma,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}l&&delete e.__transition}}function P_(e){return this.each(function(){Ra(this,e)})}function A_(e,t){var n,i;return function(){var s=On(this,e),l=s.tween;if(l!==n){i=n=l;for(var a=0,c=i.length;a<c;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function O_(e,t,n){var i,s;if(typeof n!="function")throw new Error;return function(){var l=On(this,e),a=l.tween;if(a!==i){s=(i=a).slice();for(var c={name:t,value:n},f=0,d=s.length;f<d;++f)if(s[f].name===t){s[f]=c;break}f===d&&s.push(c)}l.tween=s}}function L_(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=gn(this.node(),n).tween,s=0,l=i.length,a;s<l;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?A_:O_)(n,e,t))}function Ih(e,t,n){var i=e._id;return e.each(function(){var s=On(this,i);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return gn(s,i).value[t]}}function iw(e,t){var n;return(typeof t=="number"?In:t instanceof ri?Ua:(n=ri(t))?(t=n,Ua):Qv)(e,t)}function M_(e){return function(){this.removeAttribute(e)}}function R_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function D_(e,t,n){var i,s=n+"",l;return function(){var a=this.getAttribute(e);return a===s?null:a===i?l:l=t(i=a,n)}}function j_(e,t,n){var i,s=n+"",l;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?l:l=t(i=a,n)}}function $_(e,t,n){var i,s,l;return function(){var a,c=n(this),f;return c==null?void this.removeAttribute(e):(a=this.getAttribute(e),f=c+"",a===f?null:a===i&&f===s?l:(s=f,l=t(i=a,c)))}}function z_(e,t,n){var i,s,l;return function(){var a,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),f=c+"",a===f?null:a===i&&f===s?l:(s=f,l=t(i=a,c)))}}function F_(e,t){var n=lu(e),i=n==="transform"?w_:iw;return this.attrTween(e,typeof t=="function"?(n.local?z_:$_)(n,i,Ih(this,"attr."+e,t)):t==null?(n.local?R_:M_)(n):(n.local?j_:D_)(n,i,t))}function B_(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function V_(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function H_(e,t){var n,i;function s(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&V_(e,l)),n}return s._value=t,s}function U_(e,t){var n,i;function s(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&B_(e,l)),n}return s._value=t,s}function W_(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=lu(e);return this.tween(n,(i.local?H_:U_)(i,t))}function q_(e,t){return function(){Ch(this,e).delay=+t.apply(this,arguments)}}function Y_(e,t){return t=+t,function(){Ch(this,e).delay=t}}function K_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?q_:Y_)(t,e)):gn(this.node(),t).delay}function G_(e,t){return function(){On(this,e).duration=+t.apply(this,arguments)}}function X_(e,t){return t=+t,function(){On(this,e).duration=t}}function Q_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?G_:X_)(t,e)):gn(this.node(),t).duration}function J_(e,t){if(typeof t!="function")throw new Error;return function(){On(this,e).ease=t}}function Z_(e){var t=this._id;return arguments.length?this.each(J_(t,e)):gn(this.node(),t).ease}function eN(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;On(this,e).ease=n}}function tN(e){if(typeof e!="function")throw new Error;return this.each(eN(this._id,e))}function nN(e){typeof e!="function"&&(e=Rv(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=[],f,d=0;d<a;++d)(f=l[d])&&e.call(f,f.__data__,d,l)&&c.push(f);return new Qn(i,this._parents,this._name,this._id)}function rN(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,s=n.length,l=Math.min(i,s),a=new Array(i),c=0;c<l;++c)for(var f=t[c],d=n[c],m=f.length,p=a[c]=new Array(m),g,v=0;v<m;++v)(g=f[v]||d[v])&&(p[v]=g);for(;c<i;++c)a[c]=t[c];return new Qn(a,this._parents,this._name,this._id)}function iN(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function oN(e,t,n){var i,s,l=iN(t)?Ch:On;return function(){var a=l(this,e),c=a.on;c!==i&&(s=(i=c).copy()).on(t,n),a.on=s}}function sN(e,t){var n=this._id;return arguments.length<2?gn(this.node(),n).on.on(e):this.each(oN(n,e,t))}function lN(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function aN(){return this.on("end.remove",lN(this._id))}function uN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Sh(e));for(var i=this._groups,s=i.length,l=new Array(s),a=0;a<s;++a)for(var c=i[a],f=c.length,d=l[a]=new Array(f),m,p,g=0;g<f;++g)(m=c[g])&&(p=e.call(m,m.__data__,g,c))&&("__data__"in m&&(p.__data__=m.__data__),d[g]=p,uu(d[g],t,n,g,d,gn(m,n)));return new Qn(l,this._parents,t,n)}function cN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Mv(e));for(var i=this._groups,s=i.length,l=[],a=[],c=0;c<s;++c)for(var f=i[c],d=f.length,m,p=0;p<d;++p)if(m=f[p]){for(var g=e.call(m,m.__data__,p,f),v,S=gn(m,n),x=0,b=g.length;x<b;++x)(v=g[x])&&uu(v,t,n,x,g,S);l.push(g),a.push(m)}return new Qn(l,a,t,n)}var fN=Ms.prototype.constructor;function dN(){return new fN(this._groups,this._parents)}function hN(e,t){var n,i,s;return function(){var l=to(this,e),a=(this.style.removeProperty(e),to(this,e));return l===a?null:l===n&&a===i?s:s=t(n=l,i=a)}}function ow(e){return function(){this.style.removeProperty(e)}}function pN(e,t,n){var i,s=n+"",l;return function(){var a=to(this,e);return a===s?null:a===i?l:l=t(i=a,n)}}function mN(e,t,n){var i,s,l;return function(){var a=to(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),to(this,e))),a===f?null:a===i&&f===s?l:(s=f,l=t(i=a,c))}}function gN(e,t){var n,i,s,l="style."+t,a="end."+l,c;return function(){var f=On(this,e),d=f.on,m=f.value[l]==null?c||(c=ow(t)):void 0;(d!==n||s!==m)&&(i=(n=d).copy()).on(a,s=m),f.on=i}}function yN(e,t,n){var i=(e+="")=="transform"?v_:iw;return t==null?this.styleTween(e,hN(e,i)).on("end.style."+e,ow(e)):typeof t=="function"?this.styleTween(e,mN(e,i,Ih(this,"style."+e,t))).each(gN(this._id,e)):this.styleTween(e,pN(e,i,t),n).on("end.style."+e,null)}function vN(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function wN(e,t,n){var i,s;function l(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&vN(e,a,n)),i}return l._value=t,l}function xN(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,wN(e,t,n??""))}function bN(e){return function(){this.textContent=e}}function SN(e){return function(){var t=e(this);this.textContent=t??""}}function kN(e){return this.tween("text",typeof e=="function"?SN(Ih(this,"text",e)):bN(e==null?"":e+""))}function EN(e){return function(t){this.textContent=e.call(this,t)}}function _N(e){var t,n;function i(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&EN(s)),t}return i._value=e,i}function NN(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,_N(e))}function CN(){for(var e=this._name,t=this._id,n=sw(),i=this._groups,s=i.length,l=0;l<s;++l)for(var a=i[l],c=a.length,f,d=0;d<c;++d)if(f=a[d]){var m=gn(f,t);uu(f,e,n,d,a,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new Qn(i,this._parents,e,n)}function IN(){var e,t,n=this,i=n._id,s=n.size();return new Promise(function(l,a){var c={value:a},f={value:function(){--s===0&&l()}};n.each(function(){var d=On(this,i),m=d.on;m!==e&&(t=(e=m).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(f)),d.on=t}),s===0&&l()})}var TN=0;function Qn(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function sw(){return++TN}var Wn=Ms.prototype;Qn.prototype={constructor:Qn,select:uN,selectAll:cN,selectChild:Wn.selectChild,selectChildren:Wn.selectChildren,filter:nN,merge:rN,selection:dN,transition:CN,call:Wn.call,nodes:Wn.nodes,node:Wn.node,size:Wn.size,empty:Wn.empty,each:Wn.each,on:sN,attr:F_,attrTween:W_,style:yN,styleTween:xN,text:kN,textTween:NN,remove:aN,tween:L_,delay:K_,duration:Q_,ease:Z_,easeVarying:tN,end:IN,[Symbol.iterator]:Wn[Symbol.iterator]};function PN(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var AN={time:null,delay:0,duration:250,ease:PN};function ON(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function LN(e){var t,n;e instanceof Qn?(t=e._id,e=e._name):(t=sw(),(n=AN).time=Nh(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,l=0;l<s;++l)for(var a=i[l],c=a.length,f,d=0;d<c;++d)(f=a[d])&&uu(f,e,t,d,a,n||ON(f,t));return new Qn(i,this._parents,e,t)}Ms.prototype.interrupt=P_;Ms.prototype.transition=LN;const da=e=>()=>e;function MN(e,{sourceEvent:t,target:n,transform:i,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function Yn(e,t,n){this.k=e,this.x=t,this.y=n}Yn.prototype={constructor:Yn,scale:function(e){return e===1?this:new Yn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Yn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var cu=new Yn(1,0,0);lw.prototype=Yn.prototype;function lw(e){for(;!e.__zoom;)if(!(e=e.parentNode))return cu;return e.__zoom}function Lf(e){e.stopImmediatePropagation()}function fs(e){e.preventDefault(),e.stopImmediatePropagation()}function RN(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function DN(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function ay(){return this.__zoom||cu}function jN(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function $N(){return navigator.maxTouchPoints||"ontouchstart"in this}function zN(e,t,n){var i=e.invertX(t[0][0])-n[0][0],s=e.invertX(t[1][0])-n[1][0],l=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),a>l?(l+a)/2:Math.min(0,l)||Math.max(0,a))}function aw(){var e=RN,t=DN,n=zN,i=jN,s=$N,l=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],c=250,f=Oa,d=su("start","zoom","end"),m,p,g,v=500,S=150,x=0,b=10;function k(j){j.property("__zoom",ay).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",F).filter(s).on("touchstart.zoom",M).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",Z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(j,G,q,J){var Y=j.selection?j.selection():j;Y.property("__zoom",ay),j!==Y?A(j,G,q,J):Y.interrupt().each(function(){L(this,arguments).event(J).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},k.scaleBy=function(j,G,q,J){k.scaleTo(j,function(){var Y=this.__zoom.k,U=typeof G=="function"?G.apply(this,arguments):G;return Y*U},q,J)},k.scaleTo=function(j,G,q,J){k.transform(j,function(){var Y=t.apply(this,arguments),U=this.__zoom,B=q==null?N(Y):typeof q=="function"?q.apply(this,arguments):q,D=U.invert(B),H=typeof G=="function"?G.apply(this,arguments):G;return n(E(_(U,H),B,D),Y,a)},q,J)},k.translateBy=function(j,G,q,J){k.transform(j,function(){return n(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof q=="function"?q.apply(this,arguments):q),t.apply(this,arguments),a)},null,J)},k.translateTo=function(j,G,q,J,Y){k.transform(j,function(){var U=t.apply(this,arguments),B=this.__zoom,D=J==null?N(U):typeof J=="function"?J.apply(this,arguments):J;return n(cu.translate(D[0],D[1]).scale(B.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof q=="function"?-q.apply(this,arguments):-q),U,a)},J,Y)};function _(j,G){return G=Math.max(l[0],Math.min(l[1],G)),G===j.k?j:new Yn(G,j.x,j.y)}function E(j,G,q){var J=G[0]-q[0]*j.k,Y=G[1]-q[1]*j.k;return J===j.x&&Y===j.y?j:new Yn(j.k,J,Y)}function N(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function A(j,G,q,J){j.on("start.zoom",function(){L(this,arguments).event(J).start()}).on("interrupt.zoom end.zoom",function(){L(this,arguments).event(J).end()}).tween("zoom",function(){var Y=this,U=arguments,B=L(Y,U).event(J),D=t.apply(Y,U),H=q==null?N(D):typeof q=="function"?q.apply(Y,U):q,V=Math.max(D[1][0]-D[0][0],D[1][1]-D[0][1]),K=Y.__zoom,Q=typeof G=="function"?G.apply(Y,U):G,re=f(K.invert(H).concat(V/K.k),Q.invert(H).concat(V/Q.k));return function(se){if(se===1)se=Q;else{var ee=re(se),oe=V/ee[2];se=new Yn(oe,H[0]-ee[0]*oe,H[1]-ee[1]*oe)}B.zoom(null,se)}})}function L(j,G,q){return!q&&j.__zooming||new R(j,G)}function R(j,G){this.that=j,this.args=G,this.active=0,this.sourceEvent=null,this.extent=t.apply(j,G),this.taps=0}R.prototype={event:function(j){return j&&(this.sourceEvent=j),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(j,G){return this.mouse&&j!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&j!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&j!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(j){var G=Ft(this.that).datum();d.call(j,this.that,new MN(j,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:d}),G)}};function C(j,...G){if(!e.apply(this,arguments))return;var q=L(this,G).event(j),J=this.__zoom,Y=Math.max(l[0],Math.min(l[1],J.k*Math.pow(2,i.apply(this,arguments)))),U=cn(j);if(q.wheel)(q.mouse[0][0]!==U[0]||q.mouse[0][1]!==U[1])&&(q.mouse[1]=J.invert(q.mouse[0]=U)),clearTimeout(q.wheel);else{if(J.k===Y)return;q.mouse=[U,J.invert(U)],Ra(this),q.start()}fs(j),q.wheel=setTimeout(B,S),q.zoom("mouse",n(E(_(J,Y),q.mouse[0],q.mouse[1]),q.extent,a));function B(){q.wheel=null,q.end()}}function P(j,...G){if(g||!e.apply(this,arguments))return;var q=j.currentTarget,J=L(this,G,!0).event(j),Y=Ft(j.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",V,!0),U=cn(j,q),B=j.clientX,D=j.clientY;Wv(j.view),Lf(j),J.mouse=[U,this.__zoom.invert(U)],Ra(this),J.start();function H(K){if(fs(K),!J.moved){var Q=K.clientX-B,re=K.clientY-D;J.moved=Q*Q+re*re>x}J.event(K).zoom("mouse",n(E(J.that.__zoom,J.mouse[0]=cn(K,q),J.mouse[1]),J.extent,a))}function V(K){Y.on("mousemove.zoom mouseup.zoom",null),qv(K.view,J.moved),fs(K),J.event(K).end()}}function F(j,...G){if(e.apply(this,arguments)){var q=this.__zoom,J=cn(j.changedTouches?j.changedTouches[0]:j,this),Y=q.invert(J),U=q.k*(j.shiftKey?.5:2),B=n(E(_(q,U),J,Y),t.apply(this,G),a);fs(j),c>0?Ft(this).transition().duration(c).call(A,B,J,j):Ft(this).call(k.transform,B,J,j)}}function M(j,...G){if(e.apply(this,arguments)){var q=j.touches,J=q.length,Y=L(this,G,j.changedTouches.length===J).event(j),U,B,D,H;for(Lf(j),B=0;B<J;++B)D=q[B],H=cn(D,this),H=[H,this.__zoom.invert(H),D.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==H[2]&&(Y.touch1=H,Y.taps=0):(Y.touch0=H,U=!0,Y.taps=1+!!m);m&&(m=clearTimeout(m)),U&&(Y.taps<2&&(p=H[0],m=setTimeout(function(){m=null},v)),Ra(this),Y.start())}}function $(j,...G){if(this.__zooming){var q=L(this,G).event(j),J=j.changedTouches,Y=J.length,U,B,D,H;for(fs(j),U=0;U<Y;++U)B=J[U],D=cn(B,this),q.touch0&&q.touch0[2]===B.identifier?q.touch0[0]=D:q.touch1&&q.touch1[2]===B.identifier&&(q.touch1[0]=D);if(B=q.that.__zoom,q.touch1){var V=q.touch0[0],K=q.touch0[1],Q=q.touch1[0],re=q.touch1[1],se=(se=Q[0]-V[0])*se+(se=Q[1]-V[1])*se,ee=(ee=re[0]-K[0])*ee+(ee=re[1]-K[1])*ee;B=_(B,Math.sqrt(se/ee)),D=[(V[0]+Q[0])/2,(V[1]+Q[1])/2],H=[(K[0]+re[0])/2,(K[1]+re[1])/2]}else if(q.touch0)D=q.touch0[0],H=q.touch0[1];else return;q.zoom("touch",n(E(B,D,H),q.extent,a))}}function Z(j,...G){if(this.__zooming){var q=L(this,G).event(j),J=j.changedTouches,Y=J.length,U,B;for(Lf(j),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),U=0;U<Y;++U)B=J[U],q.touch0&&q.touch0[2]===B.identifier?delete q.touch0:q.touch1&&q.touch1[2]===B.identifier&&delete q.touch1;if(q.touch1&&!q.touch0&&(q.touch0=q.touch1,delete q.touch1),q.touch0)q.touch0[1]=this.__zoom.invert(q.touch0[0]);else if(q.end(),q.taps===2&&(B=cn(B,this),Math.hypot(p[0]-B[0],p[1]-B[1])<b)){var D=Ft(this).on("dblclick.zoom");D&&D.apply(this,arguments)}}}return k.wheelDelta=function(j){return arguments.length?(i=typeof j=="function"?j:da(+j),k):i},k.filter=function(j){return arguments.length?(e=typeof j=="function"?j:da(!!j),k):e},k.touchable=function(j){return arguments.length?(s=typeof j=="function"?j:da(!!j),k):s},k.extent=function(j){return arguments.length?(t=typeof j=="function"?j:da([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),k):t},k.scaleExtent=function(j){return arguments.length?(l[0]=+j[0],l[1]=+j[1],k):[l[0],l[1]]},k.translateExtent=function(j){return arguments.length?(a[0][0]=+j[0][0],a[1][0]=+j[1][0],a[0][1]=+j[0][1],a[1][1]=+j[1][1],k):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},k.constrain=function(j){return arguments.length?(n=j,k):n},k.duration=function(j){return arguments.length?(c=+j,k):c},k.interpolate=function(j){return arguments.length?(f=j,k):f},k.on=function(){var j=d.on.apply(d,arguments);return j===d?k:j},k.clickDistance=function(j){return arguments.length?(x=(j=+j)*j,k):Math.sqrt(x)},k.tapDistance=function(j){return arguments.length?(b=+j,k):b},k}const pn={error001:(e="react")=>`Seems like you have not used zustand provider as an ancestor. Help: https://${e}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:e=>`Node type "${e}" 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:i})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:i}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Ns=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],uw=["Enter"," ","Escape"],cw={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var ro;(function(e){e.Strict="strict",e.Loose="loose"})(ro||(ro={}));var ni;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ni||(ni={}));var Cs;(function(e){e.Partial="partial",e.Full="full"})(Cs||(Cs={}));const fw={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var _r;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(_r||(_r={}));var Ka;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ka||(Ka={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));const uy={[Se.Left]:Se.Right,[Se.Right]:Se.Left,[Se.Top]:Se.Bottom,[Se.Bottom]:Se.Top};function dw(e){return e===null?null:e?"valid":"invalid"}const hw=e=>"id"in e&&"source"in e&&"target"in e,FN=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Th=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Ds=(e,t=[0,0])=>{const{width:n,height:i}=Jn(e),s=e.origin??t,l=n*s[0],a=i*s[1];return{x:e.position.x-l,y:e.position.y-a}},BN=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((i,s)=>{const l=typeof s=="string";let a=!t.nodeLookup&&!l?s:void 0;t.nodeLookup&&(a=l?t.nodeLookup.get(s):Th(s)?s:t.nodeLookup.get(s.id));const c=a?Ga(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return fu(i,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return du(n)},js=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},i=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(n=fu(n,Ga(s)),i=!0)}),i?du(n):{x:0,y:0,width:0,height:0}},Ph=(e,t,[n,i,s]=[0,0,1],l=!1,a=!1)=>{const c={...po(t,[n,i,s]),width:t.width/s,height:t.height/s},f=[];for(const d of e.values()){const{measured:m,selectable:p=!0,hidden:g=!1}=d;if(a&&!p||g)continue;const v=m.width??d.width??d.initialWidth??null,S=m.height??d.height??d.initialHeight??null,x=Is(c,oo(d)),b=(v??0)*(S??0),k=l&&x>0;(!d.internals.handleBounds||k||x>=b||d.dragging)&&f.push(d)}return f},VN=(e,t)=>{const n=new Set;return e.forEach(i=>{n.add(i.id)}),t.filter(i=>n.has(i.source)||n.has(i.target))};function HN(e,t){const n=new Map,i=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!s.hidden)&&(!i||i.has(s.id))&&n.set(s.id,s)}),n}async function UN({nodes:e,width:t,height:n,panZoom:i,minZoom:s,maxZoom:l},a){if(e.size===0)return!0;const c=HN(e,a),f=js(c),d=Oh(f,t,n,(a==null?void 0:a.minZoom)??s,(a==null?void 0:a.maxZoom)??l,(a==null?void 0:a.padding)??.1);return await i.setViewport(d,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),!0}function pw({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:i=[0,0],nodeExtent:s,onError:l}){const a=n.get(e),c=a.parentId?n.get(a.parentId):void 0,{x:f,y:d}=c?c.internals.positionAbsolute:{x:0,y:0},m=a.origin??i;let p=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!c)l==null||l("005",pn.error005());else{const v=c.measured.width,S=c.measured.height;v&&S&&(p=[[f,d],[f+v,d+S]])}else c&&si(a.extent)&&(p=[[a.extent[0][0]+f,a.extent[0][1]+d],[a.extent[1][0]+f,a.extent[1][1]+d]]);const g=si(p)?oi(t,p,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&(l==null||l("015",pn.error015())),{position:{x:g.x-f+(a.measured.width??0)*m[0],y:g.y-d+(a.measured.height??0)*m[1]},positionAbsolute:g}}async function WN({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:i,onBeforeDelete:s}){const l=new Set(e.map(g=>g.id)),a=[];for(const g of n){if(g.deletable===!1)continue;const v=l.has(g.id),S=!v&&g.parentId&&a.find(x=>x.id===g.parentId);(v||S)&&a.push(g)}const c=new Set(t.map(g=>g.id)),f=i.filter(g=>g.deletable!==!1),m=VN(a,f);for(const g of f)c.has(g.id)&&!m.find(S=>S.id===g.id)&&m.push(g);if(!s)return{edges:m,nodes:a};const p=await s({nodes:a,edges:m});return typeof p=="boolean"?p?{edges:m,nodes:a}:{edges:[],nodes:[]}:p}const io=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),oi=(e={x:0,y:0},t,n)=>({x:io(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:io(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function mw(e,t,n){const{width:i,height:s}=Jn(n),{x:l,y:a}=n.internals.positionAbsolute;return oi(e,[[l,a],[l+i,a+s]],t)}const cy=(e,t,n)=>e<t?io(Math.abs(e-t),1,t)/t:e>n?-io(Math.abs(e-n),1,t)/t:0,Ah=(e,t,n=15,i=40)=>{const s=cy(e.x,i,t.width-i)*n,l=cy(e.y,i,t.height-i)*n;return[s,l]},fu=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),oh=({x:e,y:t,width:n,height:i})=>({x:e,y:t,x2:e+n,y2:t+i}),du=({x:e,y:t,x2:n,y2:i})=>({x:e,y:t,width:n-e,height:i-t}),oo=(e,t=[0,0])=>{var s,l;const{x:n,y:i}=Th(e)?e.internals.positionAbsolute:Ds(e,t);return{x:n,y:i,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((l=e.measured)==null?void 0:l.height)??e.height??e.initialHeight??0}},Ga=(e,t=[0,0])=>{var s,l;const{x:n,y:i}=Th(e)?e.internals.positionAbsolute:Ds(e,t);return{x:n,y:i,x2:n+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:i+(((l=e.measured)==null?void 0:l.height)??e.height??e.initialHeight??0)}},gw=(e,t)=>du(fu(oh(e),oh(t))),Is=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),i=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*i)},fy=e=>dn(e.width)&&dn(e.height)&&dn(e.x)&&dn(e.y),dn=e=>!isNaN(e)&&isFinite(e),yw=(e,t)=>(n,i)=>{},$s=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),po=({x:e,y:t},[n,i,s],l=!1,a=[1,1])=>{const c={x:(e-n)/s,y:(t-i)/s};return l?$s(c,a):c},so=({x:e,y:t},[n,i,s])=>({x:e*s+n,y:t*s+i});function zi(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function qN(e,t,n){if(typeof e=="string"||typeof e=="number"){const i=zi(e,n),s=zi(e,t);return{top:i,right:s,bottom:i,left:s,x:s*2,y:i*2}}if(typeof e=="object"){const i=zi(e.top??e.y??0,n),s=zi(e.bottom??e.y??0,n),l=zi(e.left??e.x??0,t),a=zi(e.right??e.x??0,t);return{top:i,right:a,bottom:s,left:l,x:l+a,y:i+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function YN(e,t,n,i,s,l){const{x:a,y:c}=so(e,[t,n,i]),{x:f,y:d}=so({x:e.x+e.width,y:e.y+e.height},[t,n,i]),m=s-f,p=l-d;return{left:Math.floor(a),top:Math.floor(c),right:Math.floor(m),bottom:Math.floor(p)}}const Oh=(e,t,n,i,s,l)=>{const a=qN(l,t,n),c=(t-a.x)/e.width,f=(n-a.y)/e.height,d=Math.min(c,f),m=io(d,i,s),p=e.x+e.width/2,g=e.y+e.height/2,v=t/2-p*m,S=n/2-g*m,x=YN(e,v,S,m,t,n),b={left:Math.min(x.left-a.left,0),top:Math.min(x.top-a.top,0),right:Math.min(x.right-a.right,0),bottom:Math.min(x.bottom-a.bottom,0)};return{x:v-b.left+b.right,y:S-b.top+b.bottom,zoom:m}},Ts=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function si(e){return e!=null&&e!=="parent"}function Jn(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function vw(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function ww(e,t={width:0,height:0},n,i,s){const l={...e},a=i.get(n);if(a){const c=a.origin||s;l.x+=a.internals.positionAbsolute.x-(t.width??0)*c[0],l.y+=a.internals.positionAbsolute.y-(t.height??0)*c[1]}return l}function dy(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function KN(){let e,t;return{promise:new Promise((i,s)=>{e=i,t=s}),resolve:e,reject:t}}function GN(e){return{...cw,...e||{}}}function ws(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:i,containerBounds:s}){const{x:l,y:a}=hn(e),c=po({x:l-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},i),{x:f,y:d}=n?$s(c,t):c;return{xSnapped:f,ySnapped:d,...c}}const Lh=e=>({width:e.offsetWidth,height:e.offsetHeight}),xw=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},XN=["INPUT","SELECT","TEXTAREA"];function bw(e){var i,s;const t=((s=(i=e.composedPath)==null?void 0:i.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:XN.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Sw=e=>"clientX"in e,hn=(e,t)=>{var l,a;const n=Sw(e),i=n?e.clientX:(l=e.touches)==null?void 0:l[0].clientX,s=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:i-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},hy=(e,t,n,i,s)=>{const l=t.querySelectorAll(`.${e}`);return!l||!l.length?null:Array.from(l).map(a=>{const c=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:s,position:a.getAttribute("data-handlepos"),x:(c.left-n.left)/i,y:(c.top-n.top)/i,...Lh(a)}})};function kw({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:c}){const f=e*.125+s*.375+a*.375+n*.125,d=t*.125+l*.375+c*.375+i*.125,m=Math.abs(f-e),p=Math.abs(d-t);return[f,d,m,p]}function ha(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function py({pos:e,x1:t,y1:n,x2:i,y2:s,c:l}){switch(e){case Se.Left:return[t-ha(t-i,l),n];case Se.Right:return[t+ha(i-t,l),n];case Se.Top:return[t,n-ha(n-s,l)];case Se.Bottom:return[t,n+ha(s-n,l)]}}function Ew({sourceX:e,sourceY:t,sourcePosition:n=Se.Bottom,targetX:i,targetY:s,targetPosition:l=Se.Top,curvature:a=.25}){const[c,f]=py({pos:n,x1:e,y1:t,x2:i,y2:s,c:a}),[d,m]=py({pos:l,x1:i,y1:s,x2:e,y2:t,c:a}),[p,g,v,S]=kw({sourceX:e,sourceY:t,targetX:i,targetY:s,sourceControlX:c,sourceControlY:f,targetControlX:d,targetControlY:m});return[`M${e},${t} C${c},${f} ${d},${m} ${i},${s}`,p,g,v,S]}function _w({sourceX:e,sourceY:t,targetX:n,targetY:i}){const s=Math.abs(n-e)/2,l=n<e?n+s:n-s,a=Math.abs(i-t)/2,c=i<t?i+a:i-a;return[l,c,s,a]}function QN({sourceNode:e,targetNode:t,selected:n=!1,zIndex:i=0,elevateOnSelect:s=!1,zIndexMode:l="basic"}){if(l==="manual")return i;const a=s&&n?i+1e3:i,c=Math.max(e.parentId||s&&e.selected?e.internals.z:0,t.parentId||s&&t.selected?t.internals.z:0);return a+c}function JN({sourceNode:e,targetNode:t,width:n,height:i,transform:s}){const l=fu(Ga(e),Ga(t));l.x===l.x2&&(l.x2+=1),l.y===l.y2&&(l.y2+=1);const a={x:-s[0]/s[2],y:-s[1]/s[2],width:n/s[2],height:i/s[2]};return Is(a,du(l))>0}const ZN=({source:e,sourceHandle:t,target:n,targetHandle:i})=>`xy-edge__${e}${t||""}-${n}${i||""}`,eC=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),tC=(e,t,n={})=>{var l;if(!e.source||!e.target)return(l=n.onError)==null||l.call(n,"006",pn.error006()),t;const i=n.getEdgeId||ZN;let s;return hw(e)?s={...e}:s={...e,id:i(e)},eC(s,t)?t:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,t.concat(s))};function Nw({sourceX:e,sourceY:t,targetX:n,targetY:i}){const[s,l,a,c]=_w({sourceX:e,sourceY:t,targetX:n,targetY:i});return[`M ${e},${t}L ${n},${i}`,s,l,a,c]}const my={[Se.Left]:{x:-1,y:0},[Se.Right]:{x:1,y:0},[Se.Top]:{x:0,y:-1},[Se.Bottom]:{x:0,y:1}},nC=({source:e,sourcePosition:t=Se.Bottom,target:n})=>t===Se.Left||t===Se.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},gy=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function rC({source:e,sourcePosition:t=Se.Bottom,target:n,targetPosition:i=Se.Top,center:s,offset:l,stepPosition:a}){const c=my[t],f=my[i],d={x:e.x+c.x*l,y:e.y+c.y*l},m={x:n.x+f.x*l,y:n.y+f.y*l},p=nC({source:d,sourcePosition:t,target:m}),g=p.x!==0?"x":"y",v=p[g];let S=[],x,b;const k={x:0,y:0},_={x:0,y:0},[,,E,N]=_w({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(c[g]*f[g]===-1){g==="x"?(x=s.x??d.x+(m.x-d.x)*a,b=s.y??(d.y+m.y)/2):(x=s.x??(d.x+m.x)/2,b=s.y??d.y+(m.y-d.y)*a);const C=[{x,y:d.y},{x,y:m.y}],P=[{x:d.x,y:b},{x:m.x,y:b}];c[g]===v?S=g==="x"?C:P:S=g==="x"?P:C}else{const C=[{x:d.x,y:m.y}],P=[{x:m.x,y:d.y}];if(g==="x"?S=c.x===v?P:C:S=c.y===v?C:P,t===i){const j=Math.abs(e[g]-n[g]);if(j<=l){const G=Math.min(l-1,l-j);c[g]===v?k[g]=(d[g]>e[g]?-1:1)*G:_[g]=(m[g]>n[g]?-1:1)*G}}if(t!==i){const j=g==="x"?"y":"x",G=c[g]===f[j],q=d[j]>m[j],J=d[j]<m[j];(c[g]===1&&(!G&&q||G&&J)||c[g]!==1&&(!G&&J||G&&q))&&(S=g==="x"?C:P)}const F={x:d.x+k.x,y:d.y+k.y},M={x:m.x+_.x,y:m.y+_.y},$=Math.max(Math.abs(F.x-S[0].x),Math.abs(M.x-S[0].x)),Z=Math.max(Math.abs(F.y-S[0].y),Math.abs(M.y-S[0].y));$>=Z?(x=(F.x+M.x)/2,b=S[0].y):(x=S[0].x,b=(F.y+M.y)/2)}const A={x:d.x+k.x,y:d.y+k.y},L={x:m.x+_.x,y:m.y+_.y};return[[e,...A.x!==S[0].x||A.y!==S[0].y?[A]:[],...S,...L.x!==S[S.length-1].x||L.y!==S[S.length-1].y?[L]:[],n],x,b,E,N]}function iC(e,t,n,i){const s=Math.min(gy(e,t)/2,gy(t,n)/2,i),{x:l,y:a}=t;if(e.x===l&&l===n.x||e.y===a&&a===n.y)return`L${l} ${a}`;if(e.y===a){const d=e.x<n.x?-1:1,m=e.y<n.y?1:-1;return`L ${l+s*d},${a}Q ${l},${a} ${l},${a+s*m}`}const c=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${l},${a+s*f}Q ${l},${a} ${l+s*c},${a}`}function sh({sourceX:e,sourceY:t,sourcePosition:n=Se.Bottom,targetX:i,targetY:s,targetPosition:l=Se.Top,borderRadius:a=5,centerX:c,centerY:f,offset:d=20,stepPosition:m=.5}){const[p,g,v,S,x]=rC({source:{x:e,y:t},sourcePosition:n,target:{x:i,y:s},targetPosition:l,center:{x:c,y:f},offset:d,stepPosition:m});let b=`M${p[0].x} ${p[0].y}`;for(let k=1;k<p.length-1;k++)b+=iC(p[k-1],p[k],p[k+1],a);return b+=`L${p[p.length-1].x} ${p[p.length-1].y}`,[b,g,v,S,x]}function yy(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function oC(e){var p;const{sourceNode:t,targetNode:n}=e;if(!yy(t)||!yy(n))return null;const i=t.internals.handleBounds||vy(t.handles),s=n.internals.handleBounds||vy(n.handles),l=wy((i==null?void 0:i.source)??[],e.sourceHandle),a=wy(e.connectionMode===ro.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),e.targetHandle);if(!l||!a)return(p=e.onError)==null||p.call(e,"008",pn.error008(l?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(l==null?void 0:l.position)||Se.Bottom,f=(a==null?void 0:a.position)||Se.Top,d=li(t,l,c),m=li(n,a,f);return{sourceX:d.x,sourceY:d.y,targetX:m.x,targetY:m.y,sourcePosition:c,targetPosition:f}}function vy(e){if(!e)return null;const t=[],n=[];for(const i of e)i.width=i.width??1,i.height=i.height??1,i.type==="source"?t.push(i):i.type==="target"&&n.push(i);return{source:t,target:n}}function li(e,t,n=Se.Left,i=!1){const s=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,l=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:a,height:c}=t??Jn(e);if(i)return{x:s+a/2,y:l+c/2};switch((t==null?void 0:t.position)??n){case Se.Top:return{x:s+a/2,y:l};case Se.Right:return{x:s+a,y:l+c/2};case Se.Bottom:return{x:s+a/2,y:l+c};case Se.Left:return{x:s,y:l+c/2}}}function wy(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function lh(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(i=>`${i}=${e[i]}`).join("&")}`:""}function sC(e,{id:t,defaultColor:n,defaultMarkerStart:i,defaultMarkerEnd:s}){const l=new Set;return e.reduce((a,c)=>([c.markerStart||i,c.markerEnd||s].forEach(f=>{if(f&&typeof f=="object"){const d=lh(f,t);l.has(d)||(a.push({id:d,color:f.color||n,...f}),l.add(d))}}),a),[]).sort((a,c)=>a.id.localeCompare(c.id))}const Cw=1e3,lC=10,Mh={nodeOrigin:[0,0],nodeExtent:Ns,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},aC={...Mh,checkEquality:!0};function Rh(e,t){const n={...e};for(const i in t)t[i]!==void 0&&(n[i]=t[i]);return n}function uC(e,t,n){const i=Rh(Mh,n);for(const s of e.values())if(s.parentId)jh(s,e,t,i);else{const l=Ds(s,i.nodeOrigin),a=si(s.extent)?s.extent:i.nodeExtent,c=oi(l,a,Jn(s));s.internals.positionAbsolute=c}}function cC(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],i=[];for(const s of e.handles){const l={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?n.push(l):s.type==="target"&&i.push(l)}return{source:n,target:i}}function Dh(e){return e==="manual"}function ah(e,t,n,i={}){var m,p;const s=Rh(aC,i),l={i:0},a=new Map(t),c=s!=null&&s.elevateNodesOnSelect&&!Dh(s.zIndexMode)?Cw:0;let f=e.length>0,d=!1;t.clear(),n.clear();for(const g of e){let v=a.get(g.id);if(s.checkEquality&&g===(v==null?void 0:v.internals.userNode))t.set(g.id,v);else{const S=Ds(g,s.nodeOrigin),x=si(g.extent)?g.extent:s.nodeExtent,b=oi(S,x,Jn(g));v={...s.defaults,...g,measured:{width:(m=g.measured)==null?void 0:m.width,height:(p=g.measured)==null?void 0:p.height},internals:{positionAbsolute:b,handleBounds:cC(g,v),z:Iw(g,c,s.zIndexMode),userNode:g}},t.set(g.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(f=!1),g.parentId&&jh(v,t,n,i,l),d||(d=g.selected??!1)}return{nodesInitialized:f,hasSelectedNodes:d}}function fC(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function jh(e,t,n,i,s){const{elevateNodesOnSelect:l,nodeOrigin:a,nodeExtent:c,zIndexMode:f}=Rh(Mh,i),d=e.parentId,m=t.get(d);if(!m){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}fC(e,n),s&&!m.parentId&&m.internals.rootParentIndex===void 0&&f==="auto"&&(m.internals.rootParentIndex=++s.i,m.internals.z=m.internals.z+s.i*lC),s&&m.internals.rootParentIndex!==void 0&&(s.i=m.internals.rootParentIndex);const p=l&&!Dh(f)?Cw:0,{x:g,y:v,z:S}=dC(e,m,a,c,p,f),{positionAbsolute:x}=e.internals,b=g!==x.x||v!==x.y;(b||S!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:g,y:v}:x,z:S}})}function Iw(e,t,n){const i=dn(e.zIndex)?e.zIndex:0;return Dh(n)?i:i+(e.selected?t:0)}function dC(e,t,n,i,s,l){const{x:a,y:c}=t.internals.positionAbsolute,f=Jn(e),d=Ds(e,n),m=si(e.extent)?oi(d,e.extent,f):d;let p=oi({x:a+m.x,y:c+m.y},i,f);e.extent==="parent"&&(p=mw(p,f,t));const g=Iw(e,s,l),v=t.internals.z??0;return{x:p.x,y:p.y,z:v>=g?v+1:g}}function $h(e,t,n,i=[0,0]){var a;const s=[],l=new Map;for(const c of e){const f=t.get(c.parentId);if(!f)continue;const d=((a=l.get(c.parentId))==null?void 0:a.expandedRect)??oo(f),m=gw(d,c.rect);l.set(c.parentId,{expandedRect:m,parent:f})}return l.size>0&&l.forEach(({expandedRect:c,parent:f},d)=>{var E;const m=f.internals.positionAbsolute,p=Jn(f),g=f.origin??i,v=c.x<m.x?Math.round(Math.abs(m.x-c.x)):0,S=c.y<m.y?Math.round(Math.abs(m.y-c.y)):0,x=Math.max(p.width,Math.round(c.width)),b=Math.max(p.height,Math.round(c.height)),k=(x-p.width)*g[0],_=(b-p.height)*g[1];(v>0||S>0||k||_)&&(s.push({id:d,type:"position",position:{x:f.position.x-v+k,y:f.position.y-S+_}}),(E=n.get(d))==null||E.forEach(N=>{e.some(A=>A.id===N.id)||s.push({id:N.id,type:"position",position:{x:N.position.x+v,y:N.position.y+S}})})),(p.width<c.width||p.height<c.height||v||S)&&s.push({id:d,type:"dimensions",setAttributes:!0,dimensions:{width:x+(v?g[0]*v-k:0),height:b+(S?g[1]*S-_:0)}})}),s}function hC(e,t,n,i,s,l,a){const c=i==null?void 0:i.querySelector(".xyflow__viewport");let f=!1;if(!c)return{changes:[],updatedInternals:f};const d=[],m=window.getComputedStyle(c),{m22:p}=new window.DOMMatrixReadOnly(m.transform),g=[];for(const v of e.values()){const S=t.get(v.id);if(!S)continue;if(S.hidden){t.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),f=!0;continue}const x=Lh(v.nodeElement),b=S.measured.width!==x.width||S.measured.height!==x.height;if(!!(x.width&&x.height&&(b||!S.internals.handleBounds||v.force))){const _=v.nodeElement.getBoundingClientRect(),E=si(S.extent)?S.extent:l;let{positionAbsolute:N}=S.internals;S.parentId&&S.extent==="parent"?N=mw(N,x,t.get(S.parentId)):E&&(N=oi(N,E,x));const A={...S,measured:x,internals:{...S.internals,positionAbsolute:N,handleBounds:{source:hy("source",v.nodeElement,_,p,S.id),target:hy("target",v.nodeElement,_,p,S.id)}}};t.set(S.id,A),S.parentId&&jh(A,t,n,{nodeOrigin:s,zIndexMode:a}),f=!0,b&&(d.push({id:S.id,type:"dimensions",dimensions:x}),S.expandParent&&S.parentId&&g.push({id:S.id,parentId:S.parentId,rect:oo(A,s)}))}}if(g.length>0){const v=$h(g,t,n,s);d.push(...v)}return{changes:d,updatedInternals:f}}async function pC({delta:e,panZoom:t,transform:n,translateExtent:i,width:s,height:l}){if(!t||!e.x&&!e.y)return!1;const a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[s,l]],i);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])}function xy(e,t,n,i,s,l){let a=s;const c=i.get(a)||new Map;i.set(a,c.set(n,t)),a=`${s}-${e}`;const f=i.get(a)||new Map;if(i.set(a,f.set(n,t)),l){a=`${s}-${e}-${l}`;const d=i.get(a)||new Map;i.set(a,d.set(n,t))}}function Tw(e,t,n){e.clear(),t.clear();for(const i of n){const{source:s,target:l,sourceHandle:a=null,targetHandle:c=null}=i,f={edgeId:i.id,source:s,target:l,sourceHandle:a,targetHandle:c},d=`${s}-${a}--${l}-${c}`,m=`${l}-${c}--${s}-${a}`;xy("source",f,m,e,s,a),xy("target",f,d,e,l,c),t.set(i.id,i)}}function Pw(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Pw(n,t):!1}function by(e,t,n){var s;let i=e;do{if((s=i==null?void 0:i.matches)!=null&&s.call(i,t))return!0;if(i===n)return!1;i=i==null?void 0:i.parentElement}while(i);return!1}function mC(e,t,n,i){const s=new Map;for(const[l,a]of e)if((a.selected||a.id===i)&&(!a.parentId||!Pw(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){const c=e.get(l);c&&s.set(l,{id:l,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return s}function Mf({nodeId:e,dragItems:t,nodeLookup:n,dragging:i=!0}){var a,c,f;const s=[];for(const[d,m]of t){const p=(a=n.get(d))==null?void 0:a.internals.userNode;p&&s.push({...p,position:m.position,dragging:i})}if(!e)return[s[0],s];const l=(c=n.get(e))==null?void 0:c.internals.userNode;return[l?{...l,position:((f=t.get(e))==null?void 0:f.position)||l.position,dragging:i}:s[0],s]}function gC({dragItems:e,snapGrid:t,x:n,y:i}){const s=e.values().next().value;if(!s)return null;const l={x:n-s.distance.x,y:i-s.distance.y},a=$s(l,t);return{x:a.x-l.x,y:a.y-l.y}}function yC({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:i,onDragStop:s}){let l={x:null,y:null},a=0,c=new Map,f=!1,d={x:0,y:0},m=null,p=!1,g=null,v=!1,S=!1,x=null;function b({noDragClassName:_,handleSelector:E,domNode:N,isSelectable:A,nodeId:L,nodeClickDistance:R=0}){g=Ft(N);function C({x:$,y:Z}){const{nodeLookup:j,nodeExtent:G,snapGrid:q,snapToGrid:J,nodeOrigin:Y,onNodeDrag:U,onSelectionDrag:B,onError:D,updateNodePositions:H}=t();l={x:$,y:Z};let V=!1;const K=c.size>1,Q=K&&G?oh(js(c)):null,re=K&&J?gC({dragItems:c,snapGrid:q,x:$,y:Z}):null;for(const[se,ee]of c){if(!j.has(se))continue;let oe={x:$-ee.distance.x,y:Z-ee.distance.y};J&&(oe=re?{x:Math.round(oe.x+re.x),y:Math.round(oe.y+re.y)}:$s(oe,q));let de=null;if(K&&G&&!ee.extent&&Q){const{positionAbsolute:fe}=ee.internals,ke=fe.x-Q.x+G[0][0],Pe=fe.x+ee.measured.width-Q.x2+G[1][0],Ae=fe.y-Q.y+G[0][1],$e=fe.y+ee.measured.height-Q.y2+G[1][1];de=[[ke,Ae],[Pe,$e]]}const{position:xe,positionAbsolute:he}=pw({nodeId:se,nextPosition:oe,nodeLookup:j,nodeExtent:de||G,nodeOrigin:Y,onError:D});V=V||ee.position.x!==xe.x||ee.position.y!==xe.y,ee.position=xe,ee.internals.positionAbsolute=he}if(S=S||V,!!V&&(H(c,!0),x&&(i||U||!L&&B))){const[se,ee]=Mf({nodeId:L,dragItems:c,nodeLookup:j});i==null||i(x,c,se,ee),U==null||U(x,se,ee),L||B==null||B(x,ee)}}async function P(){if(!m)return;const{transform:$,panBy:Z,autoPanSpeed:j,autoPanOnNodeDrag:G}=t();if(!G){f=!1,cancelAnimationFrame(a);return}const[q,J]=Ah(d,m,j);(q!==0||J!==0)&&(l.x=(l.x??0)-q/$[2],l.y=(l.y??0)-J/$[2],await Z({x:q,y:J})&&C(l)),a=requestAnimationFrame(P)}function F($){var K;const{nodeLookup:Z,multiSelectionActive:j,nodesDraggable:G,transform:q,snapGrid:J,snapToGrid:Y,selectNodesOnDrag:U,onNodeDragStart:B,onSelectionDragStart:D,unselectNodesAndEdges:H}=t();p=!0,(!U||!A)&&!j&&L&&((K=Z.get(L))!=null&&K.selected||H()),A&&U&&L&&(e==null||e(L));const V=ws($.sourceEvent,{transform:q,snapGrid:J,snapToGrid:Y,containerBounds:m});if(l=V,c=mC(Z,G,V,L),c.size>0&&(n||B||!L&&D)){const[Q,re]=Mf({nodeId:L,dragItems:c,nodeLookup:Z});n==null||n($.sourceEvent,c,Q,re),B==null||B($.sourceEvent,Q,re),L||D==null||D($.sourceEvent,re)}}const M=Yv().clickDistance(R).on("start",$=>{const{domNode:Z,nodeDragThreshold:j,transform:G,snapGrid:q,snapToGrid:J}=t();m=(Z==null?void 0:Z.getBoundingClientRect())||null,v=!1,S=!1,x=$.sourceEvent,j===0&&F($),l=ws($.sourceEvent,{transform:G,snapGrid:q,snapToGrid:J,containerBounds:m}),d=hn($.sourceEvent,m)}).on("drag",$=>{const{autoPanOnNodeDrag:Z,transform:j,snapGrid:G,snapToGrid:q,nodeDragThreshold:J,nodeLookup:Y}=t(),U=ws($.sourceEvent,{transform:j,snapGrid:G,snapToGrid:q,containerBounds:m});if(x=$.sourceEvent,($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||L&&!Y.has(L))&&(v=!0),!v){if(!f&&Z&&p&&(f=!0,P()),!p){const B=hn($.sourceEvent,m),D=B.x-d.x,H=B.y-d.y;Math.sqrt(D*D+H*H)>J&&F($)}(l.x!==U.xSnapped||l.y!==U.ySnapped)&&c&&p&&(d=hn($.sourceEvent,m),C(U))}}).on("end",$=>{if(!p||v){v&&c.size>0&&t().updateNodePositions(c,!1);return}if(f=!1,p=!1,cancelAnimationFrame(a),c.size>0){const{nodeLookup:Z,updateNodePositions:j,onNodeDragStop:G,onSelectionDragStop:q}=t();if(S&&(j(c,!1),S=!1),s||G||!L&&q){const[J,Y]=Mf({nodeId:L,dragItems:c,nodeLookup:Z,dragging:!1});s==null||s($.sourceEvent,c,J,Y),G==null||G($.sourceEvent,J,Y),L||q==null||q($.sourceEvent,Y)}}}).filter($=>{const Z=$.target;return!$.button&&(!_||!by(Z,`.${_}`,N))&&(!E||by(Z,E,N))});g.call(M)}function k(){g==null||g.on(".drag",null)}return{update:b,destroy:k}}function vC(e,t,n){const i=[],s={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const l of t.values())Is(s,oo(l))>0&&i.push(l);return i}const wC=250;function xC(e,t,n,i){var c,f;let s=[],l=1/0;const a=vC(e,n,t+wC);for(const d of a){const m=[...((c=d.internals.handleBounds)==null?void 0:c.source)??[],...((f=d.internals.handleBounds)==null?void 0:f.target)??[]];for(const p of m){if(i.nodeId===p.nodeId&&i.type===p.type&&i.id===p.id)continue;const{x:g,y:v}=li(d,p,p.position,!0),S=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(v-e.y,2));S>t||(S<l?(s=[{...p,x:g,y:v}],l=S):S===l&&s.push({...p,x:g,y:v}))}}if(!s.length)return null;if(s.length>1){const d=i.type==="source"?"target":"source";return s.find(m=>m.type===d)??s[0]}return s[0]}function Aw(e,t,n,i,s,l=!1){var d,m,p;const a=i.get(e);if(!a)return null;const c=s==="strict"?(d=a.internals.handleBounds)==null?void 0:d[t]:[...((m=a.internals.handleBounds)==null?void 0:m.source)??[],...((p=a.internals.handleBounds)==null?void 0:p.target)??[]],f=(n?c==null?void 0:c.find(g=>g.id===n):c==null?void 0:c[0])??null;return f&&l?{...f,...li(a,f,f.position,!0)}:f}function Ow(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function bC(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Lw=()=>!0;function SC(e,{connectionMode:t,connectionRadius:n,handleId:i,nodeId:s,edgeUpdaterType:l,isTarget:a,domNode:c,nodeLookup:f,lib:d,autoPanOnConnect:m,flowId:p,panBy:g,cancelConnection:v,onConnectStart:S,onConnect:x,onConnectEnd:b,isValidConnection:k=Lw,onReconnectEnd:_,updateConnection:E,getTransform:N,getFromHandle:A,autoPanSpeed:L,dragThreshold:R=1,handleDomNode:C}){const P=xw(e.target);let F=0,M;const{x:$,y:Z}=hn(e),j=Ow(l,C),G=c==null?void 0:c.getBoundingClientRect();let q=!1;if(!G||!j)return;const J=Aw(s,j,i,f,t);if(!J)return;let Y=hn(e,G),U=!1,B=null,D=!1,H=null;function V(){if(!m||!G)return;const[xe,he]=Ah(Y,G,L);g({x:xe,y:he}),F=requestAnimationFrame(V)}const K={...J,nodeId:s,type:j,position:J.position},Q=f.get(s);let se={inProgress:!0,isValid:null,from:li(Q,K,Se.Left,!0),fromHandle:K,fromPosition:K.position,fromNode:Q,to:Y,toHandle:null,toPosition:uy[K.position],toNode:null,pointer:Y};function ee(){q=!0,E(se),S==null||S(e,{nodeId:s,handleId:i,handleType:j})}R===0&&ee();function oe(xe){if(!q){const{x:$e,y:yt}=hn(xe),kt=$e-$,ft=yt-Z;if(!(kt*kt+ft*ft>R*R))return;ee()}if(!A()||!K){de(xe);return}const he=N();Y=hn(xe,G),M=xC(po(Y,he,!1,[1,1]),n,f,K),U||(V(),U=!0);const fe=Mw(xe,{handle:M,connectionMode:t,fromNodeId:s,fromHandleId:i,fromType:a?"target":"source",isValidConnection:k,doc:P,lib:d,flowId:p,nodeLookup:f});H=fe.handleDomNode,B=fe.connection,D=bC(!!M,fe.isValid);const ke=f.get(s),Pe=ke?li(ke,K,Se.Left,!0):se.from,Ae={...se,from:Pe,isValid:D,to:fe.toHandle&&D?so({x:fe.toHandle.x,y:fe.toHandle.y},he):Y,toHandle:fe.toHandle,toPosition:D&&fe.toHandle?fe.toHandle.position:uy[K.position],toNode:fe.toHandle?f.get(fe.toHandle.nodeId):null,pointer:Y};E(Ae),se=Ae}function de(xe){if(!("touches"in xe&&xe.touches.length>0)){if(q){(M||H)&&B&&D&&(x==null||x(B));const{inProgress:he,...fe}=se,ke={...fe,toPosition:se.toHandle?se.toPosition:null};b==null||b(xe,ke),l&&(_==null||_(xe,ke))}v(),cancelAnimationFrame(F),U=!1,D=!1,B=null,H=null,P.removeEventListener("mousemove",oe),P.removeEventListener("mouseup",de),P.removeEventListener("touchmove",oe),P.removeEventListener("touchend",de)}}P.addEventListener("mousemove",oe),P.addEventListener("mouseup",de),P.addEventListener("touchmove",oe),P.addEventListener("touchend",de)}function Mw(e,{handle:t,connectionMode:n,fromNodeId:i,fromHandleId:s,fromType:l,doc:a,lib:c,flowId:f,isValidConnection:d=Lw,nodeLookup:m}){const p=l==="target",g=t?a.querySelector(`.${c}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:v,y:S}=hn(e),x=a.elementFromPoint(v,S),b=x!=null&&x.classList.contains(`${c}-flow__handle`)?x:g,k={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const _=Ow(void 0,b),E=b.getAttribute("data-nodeid"),N=b.getAttribute("data-handleid"),A=b.classList.contains("connectable"),L=b.classList.contains("connectableend");if(!E||!_)return k;const R={source:p?E:i,sourceHandle:p?N:s,target:p?i:E,targetHandle:p?s:N};k.connection=R;const P=A&&L&&(n===ro.Strict?p&&_==="source"||!p&&_==="target":E!==i||N!==s);k.isValid=P&&d(R),k.toHandle=Aw(E,_,N,m,n,!0)}return k}const uh={onPointerDown:SC,isValid:Mw};function kC({domNode:e,panZoom:t,getTransform:n,getViewScale:i}){const s=Ft(e);function l({translateExtent:c,width:f,height:d,zoomStep:m=1,pannable:p=!0,zoomable:g=!0,inversePan:v=!1}){const S=E=>{if(E.sourceEvent.type!=="wheel"||!t)return;const N=n(),A=E.sourceEvent.ctrlKey&&Ts()?10:1,L=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*m,R=N[2]*Math.pow(2,L*A);t.scaleTo(R)};let x=[0,0];const b=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(x=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},k=E=>{const N=n();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const A=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],L=[A[0]-x[0],A[1]-x[1]];x=A;const R=i()*Math.max(N[2],Math.log(N[2]))*(v?-1:1),C={x:N[0]-L[0]*R,y:N[1]-L[1]*R},P=[[0,0],[f,d]];t.setViewportConstrained({x:C.x,y:C.y,zoom:N[2]},P,c)},_=aw().on("start",b).on("zoom",p?k:null).on("zoom.wheel",g?S:null);s.call(_,{})}function a(){s.on("zoom",null)}return{update:l,destroy:a,pointer:cn}}const hu=e=>({x:e.x,y:e.y,zoom:e.k}),Rf=({x:e,y:t,zoom:n})=>cu.translate(e,t).scale(n),Wi=(e,t)=>e.target.closest(`.${t}`),Rw=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),EC=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Df=(e,t=0,n=EC,i=()=>{})=>{const s=typeof t=="number"&&t>0;return s||i(),s?e.transition().duration(t).ease(n).on("end",i):e},Dw=e=>{const t=e.ctrlKey&&Ts()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function _C({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:i,panOnScrollMode:s,panOnScrollSpeed:l,zoomOnPinch:a,onPanZoomStart:c,onPanZoom:f,onPanZoomEnd:d}){return m=>{if(Wi(m,t))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(m.ctrlKey&&a){const b=cn(m),k=Dw(m),_=p*Math.pow(2,k);i.scaleTo(n,_,b,m);return}const g=m.deltaMode===1?20:1;let v=s===ni.Vertical?0:m.deltaX*g,S=s===ni.Horizontal?0:m.deltaY*g;!Ts()&&m.shiftKey&&s!==ni.Vertical&&(v=m.deltaY*g,S=0),i.translateBy(n,-(v/p)*l,-(S/p)*l,{internal:!0});const x=hu(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(f==null||f(m,x),e.panScrollTimeout=setTimeout(()=>{d==null||d(m,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,c==null||c(m,x))}}function NC({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(i,s){const l=i.type==="wheel",a=!t&&l&&!i.ctrlKey,c=Wi(i,e);if(i.ctrlKey&&l&&c&&i.preventDefault(),a||c)return null;i.preventDefault(),n.call(this,i,s)}}function CC({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return i=>{var l,a,c;if((l=i.sourceEvent)!=null&&l.internal)return;const s=hu(i.transform);e.mouseButton=((a=i.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((c=i.sourceEvent)==null?void 0:c.type)==="mousedown"&&t(!0),n&&(n==null||n(i.sourceEvent,s))}}function IC({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:i,onPanZoom:s}){return l=>{var a,c;e.usedRightMouseButton=!!(n&&Rw(t,e.mouseButton??0)),(a=l.sourceEvent)!=null&&a.sync||i([l.transform.x,l.transform.y,l.transform.k]),s&&!((c=l.sourceEvent)!=null&&c.internal)&&(s==null||s(l.sourceEvent,hu(l.transform)))}}function TC({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:i,onPanZoomEnd:s,onPaneContextMenu:l}){return a=>{var c;if(!((c=a.sourceEvent)!=null&&c.internal)&&(e.isZoomingOrPanning=!1,l&&Rw(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&l(a.sourceEvent),e.usedRightMouseButton=!1,i(!1),s)){const f=hu(a.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,f)},n?150:0)}}}function PC({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:i,panOnScroll:s,zoomOnDoubleClick:l,userSelectionActive:a,noWheelClassName:c,noPanClassName:f,lib:d,connectionInProgress:m}){return p=>{var b;const g=e||t,v=n&&p.ctrlKey,S=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Wi(p,`${d}-flow__node`)||Wi(p,`${d}-flow__edge`)))return!0;if(!i&&!g&&!s&&!l&&!n||a||m&&!S||Wi(p,c)&&S||Wi(p,f)&&(!S||s&&S&&!e)||!n&&p.ctrlKey&&S)return!1;if(!n&&p.type==="touchstart"&&((b=p.touches)==null?void 0:b.length)>1)return p.preventDefault(),!1;if(!g&&!s&&!v&&S||!i&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(i)&&!i.includes(p.button)&&p.type==="mousedown")return!1;const x=Array.isArray(i)&&i.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||S)&&x}}function AC({domNode:e,minZoom:t,maxZoom:n,translateExtent:i,viewport:s,onPanZoom:l,onPanZoomStart:a,onPanZoomEnd:c,onDraggingChange:f}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=e.getBoundingClientRect(),p=aw().scaleExtent([t,n]).translateExtent(i),g=Ft(e).call(p);_({x:s.x,y:s.y,zoom:io(s.zoom,t,n)},[[0,0],[m.width,m.height]],i);const v=g.on("wheel.zoom"),S=g.on("dblclick.zoom");p.wheelDelta(Dw);async function x(M,$){return g?new Promise(Z=>{p==null||p.interpolate(($==null?void 0:$.interpolate)==="linear"?vs:Oa).transform(Df(g,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>Z(!0)),M)}):!1}function b({noWheelClassName:M,noPanClassName:$,onPaneContextMenu:Z,userSelectionActive:j,panOnScroll:G,panOnDrag:q,panOnScrollMode:J,panOnScrollSpeed:Y,preventScrolling:U,zoomOnPinch:B,zoomOnScroll:D,zoomOnDoubleClick:H,zoomActivationKeyPressed:V,lib:K,onTransformChange:Q,connectionInProgress:re,paneClickDistance:se,selectionOnDrag:ee}){j&&!d.isZoomingOrPanning&&k();const oe=G&&!V&&!j;p.clickDistance(ee?1/0:!dn(se)||se<0?0:se);const de=oe?_C({zoomPanValues:d,noWheelClassName:M,d3Selection:g,d3Zoom:p,panOnScrollMode:J,panOnScrollSpeed:Y,zoomOnPinch:B,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}):NC({noWheelClassName:M,preventScrolling:U,d3ZoomHandler:v});g.on("wheel.zoom",de,{passive:!1});const xe=CC({zoomPanValues:d,onDraggingChange:f,onPanZoomStart:a});p.on("start",xe);const he=IC({zoomPanValues:d,panOnDrag:q,onPaneContextMenu:!!Z,onPanZoom:l,onTransformChange:Q});p.on("zoom",he);const fe=TC({zoomPanValues:d,panOnDrag:q,panOnScroll:G,onPaneContextMenu:Z,onPanZoomEnd:c,onDraggingChange:f});p.on("end",fe);const ke=PC({zoomActivationKeyPressed:V,panOnDrag:q,zoomOnScroll:D,panOnScroll:G,zoomOnDoubleClick:H,zoomOnPinch:B,userSelectionActive:j,noPanClassName:$,noWheelClassName:M,lib:K,connectionInProgress:re});p.filter(ke),H?g.on("dblclick.zoom",S):g.on("dblclick.zoom",null)}function k(){p.on("zoom",null)}async function _(M,$,Z){const j=Rf(M),G=p==null?void 0:p.constrain()(j,$,Z);return G&&await x(G),G}async function E(M,$){const Z=Rf(M);return await x(Z,$),Z}function N(M){if(g){const $=Rf(M),Z=g.property("__zoom");(Z.k!==M.zoom||Z.x!==M.x||Z.y!==M.y)&&(p==null||p.transform(g,$,null,{sync:!0}))}}function A(){const M=g?lw(g.node()):{x:0,y:0,k:1};return{x:M.x,y:M.y,zoom:M.k}}async function L(M,$){return g?new Promise(Z=>{p==null||p.interpolate(($==null?void 0:$.interpolate)==="linear"?vs:Oa).scaleTo(Df(g,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>Z(!0)),M)}):!1}async function R(M,$){return g?new Promise(Z=>{p==null||p.interpolate(($==null?void 0:$.interpolate)==="linear"?vs:Oa).scaleBy(Df(g,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>Z(!0)),M)}):!1}function C(M){p==null||p.scaleExtent(M)}function P(M){p==null||p.translateExtent(M)}function F(M){const $=!dn(M)||M<0?0:M;p==null||p.clickDistance($)}return{update:b,destroy:k,setViewport:E,setViewportConstrained:_,getViewport:A,scaleTo:L,scaleBy:R,setScaleExtent:C,setTranslateExtent:P,syncViewport:N,setClickDistance:F}}var lo;(function(e){e.Line="line",e.Handle="handle"})(lo||(lo={}));function OC({width:e,prevWidth:t,height:n,prevHeight:i,affectsX:s,affectsY:l}){const a=e-t,c=n-i,f=[a>0?1:a<0?-1:0,c>0?1:c<0?-1:0];return a&&s&&(f[0]=f[0]*-1),c&&l&&(f[1]=f[1]*-1),f}function Sy(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),i=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:i,affectsY:s}}function xr(e,t){return Math.max(0,t-e)}function br(e,t){return Math.max(0,e-t)}function pa(e,t,n){return Math.max(0,t-e,e-n)}function ky(e,t){return e?!t:t}function LC(e,t,n,i,s,l,a,c){let{affectsX:f,affectsY:d}=t;const{isHorizontal:m,isVertical:p}=t,g=m&&p,{xSnapped:v,ySnapped:S}=n,{minWidth:x,maxWidth:b,minHeight:k,maxHeight:_}=i,{x:E,y:N,width:A,height:L,aspectRatio:R}=e;let C=Math.floor(m?v-e.pointerX:0),P=Math.floor(p?S-e.pointerY:0);const F=A+(f?-C:C),M=L+(d?-P:P),$=-l[0]*A,Z=-l[1]*L;let j=pa(F,x,b),G=pa(M,k,_);if(a){let Y=0,U=0;f&&C<0?Y=xr(E+C+$,a[0][0]):!f&&C>0&&(Y=br(E+F+$,a[1][0])),d&&P<0?U=xr(N+P+Z,a[0][1]):!d&&P>0&&(U=br(N+M+Z,a[1][1])),j=Math.max(j,Y),G=Math.max(G,U)}if(c){let Y=0,U=0;f&&C>0?Y=br(E+C,c[0][0]):!f&&C<0&&(Y=xr(E+F,c[1][0])),d&&P>0?U=br(N+P,c[0][1]):!d&&P<0&&(U=xr(N+M,c[1][1])),j=Math.max(j,Y),G=Math.max(G,U)}if(s){if(m){const Y=pa(F/R,k,_)*R;if(j=Math.max(j,Y),a){let U=0;!f&&!d||f&&!d&&g?U=br(N+Z+F/R,a[1][1])*R:U=xr(N+Z+(f?C:-C)/R,a[0][1])*R,j=Math.max(j,U)}if(c){let U=0;!f&&!d||f&&!d&&g?U=xr(N+F/R,c[1][1])*R:U=br(N+(f?C:-C)/R,c[0][1])*R,j=Math.max(j,U)}}if(p){const Y=pa(M*R,x,b)/R;if(G=Math.max(G,Y),a){let U=0;!f&&!d||d&&!f&&g?U=br(E+M*R+$,a[1][0])/R:U=xr(E+(d?P:-P)*R+$,a[0][0])/R,G=Math.max(G,U)}if(c){let U=0;!f&&!d||d&&!f&&g?U=xr(E+M*R,c[1][0])/R:U=br(E+(d?P:-P)*R,c[0][0])/R,G=Math.max(G,U)}}}P=P+(P<0?G:-G),C=C+(C<0?j:-j),s&&(g?F>M*R?P=(ky(f,d)?-C:C)/R:C=(ky(f,d)?-P:P)*R:m?(P=C/R,d=f):(C=P*R,f=d));const q=f?E+C:E,J=d?N+P:N;return{width:A+(f?-C:C),height:L+(d?-P:P),x:l[0]*C*(f?-1:1)+q,y:l[1]*P*(d?-1:1)+J}}const jw={width:0,height:0,x:0,y:0},MC={...jw,pointerX:0,pointerY:0,aspectRatio:1};function RC(e,t,n){const i=t.position.x+e.position.x,s=t.position.y+e.position.y,l=e.measured.width??0,a=e.measured.height??0,c=n[0]*l,f=n[1]*a;return[[i-c,s-f],[i+l-c,s+a-f]]}function DC({domNode:e,nodeId:t,getStoreItems:n,onChange:i,onEnd:s}){const l=Ft(e);let a={controlDirection:Sy("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:d,boundaries:m,keepAspectRatio:p,resizeDirection:g,onResizeStart:v,onResize:S,onResizeEnd:x,shouldResize:b}){let k={...jw},_={...MC};a={boundaries:m,resizeDirection:g,keepAspectRatio:p,controlDirection:Sy(d)};let E,N=null,A=[],L,R,C,P=!1;const F=Yv().on("start",M=>{const{nodeLookup:$,transform:Z,snapGrid:j,snapToGrid:G,nodeOrigin:q,paneDomNode:J}=n();if(E=$.get(t),!E)return;N=(J==null?void 0:J.getBoundingClientRect())??null;const{xSnapped:Y,ySnapped:U}=ws(M.sourceEvent,{transform:Z,snapGrid:j,snapToGrid:G,containerBounds:N});k={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},_={...k,pointerX:Y,pointerY:U,aspectRatio:k.width/k.height},L=void 0,R=si(E.extent)?E.extent:void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(L=$.get(E.parentId)),L&&E.extent==="parent"&&(R=[[0,0],[L.measured.width,L.measured.height]]),A=[],C=void 0;for(const[B,D]of $)if(D.parentId===t&&(A.push({id:B,position:{...D.position},extent:D.extent}),D.extent==="parent"||D.expandParent)){const H=RC(D,E,D.origin??q);C?C=[[Math.min(H[0][0],C[0][0]),Math.min(H[0][1],C[0][1])],[Math.max(H[1][0],C[1][0]),Math.max(H[1][1],C[1][1])]]:C=H}v==null||v(M,{...k})}).on("drag",M=>{const{transform:$,snapGrid:Z,snapToGrid:j,nodeOrigin:G}=n(),q=ws(M.sourceEvent,{transform:$,snapGrid:Z,snapToGrid:j,containerBounds:N}),J=[];if(!E)return;const{x:Y,y:U,width:B,height:D}=k,H={},V=E.origin??G,{width:K,height:Q,x:re,y:se}=LC(_,a.controlDirection,q,a.boundaries,a.keepAspectRatio,V,R,C),ee=K!==B,oe=Q!==D,de=re!==Y&&ee,xe=se!==U&&oe;if(!de&&!xe&&!ee&&!oe)return;if((de||xe||V[0]===1||V[1]===1)&&(H.x=de?re:k.x,H.y=xe?se:k.y,k.x=H.x,k.y=H.y,A.length>0)){const Pe=re-Y,Ae=se-U;for(const $e of A)$e.position={x:$e.position.x-Pe+V[0]*(K-B),y:$e.position.y-Ae+V[1]*(Q-D)},J.push($e)}if((ee||oe)&&(H.width=ee&&(!a.resizeDirection||a.resizeDirection==="horizontal")?K:k.width,H.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?Q:k.height,k.width=H.width,k.height=H.height),L&&E.expandParent){const Pe=V[0]*(H.width??0);H.x&&H.x<Pe&&(k.x=Pe,_.x=_.x-(H.x-Pe));const Ae=V[1]*(H.height??0);H.y&&H.y<Ae&&(k.y=Ae,_.y=_.y-(H.y-Ae))}const he=OC({width:k.width,prevWidth:B,height:k.height,prevHeight:D,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),fe={...k,direction:he};(b==null?void 0:b(M,fe))!==!1&&(P=!0,S==null||S(M,fe),i(H,J))}).on("end",M=>{P&&(x==null||x(M,{...k}),s==null||s({...k}),P=!1)});l.call(F)}function f(){l.on(".drag",null)}return{update:c,destroy:f}}var jf={exports:{}},$f={},zf={exports:{}},Ff={};/**
|
|
35
|
+
`),x=h.stack.split(`
|
|
36
|
+
`),I=y.length-1,z=x.length-1;1<=I&&0<=z&&y[I]!==x[z];)z--;for(;1<=I&&0<=z;I--,z--)if(y[I]!==x[z]){if(I!==1||z!==1)do if(I--,z--,0>z||y[I]!==x[z]){var U=`
|
|
37
|
+
`+y[I].replace(" at new "," at ");return r.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",r.displayName)),U}while(1<=I&&0<=z);break}}}finally{V=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?H(r):""}function Q(r){switch(r.tag){case 5:return H(r.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return r=K(r.type,!1),r;case 11:return r=K(r.type.render,!1),r;case 1:return r=K(r.type,!0),r;default:return""}}function re(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case R:return"Fragment";case L:return"Portal";case P:return"Profiler";case C:return"StrictMode";case Z:return"Suspense";case j:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case M:return(r.displayName||"Context")+".Consumer";case F:return(r._context.displayName||"Context")+".Provider";case $:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case G:return o=r.displayName||null,o!==null?o:re(r.type)||"Memo";case q:o=r._payload,r=r._init;try{return re(r(o))}catch{}}return null}function se(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(o);case 8:return o===C?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function ee(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function oe(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function de(r){var o=oe(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),h=""+r[o];if(!r.hasOwnProperty(o)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,x=u.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return y.call(this)},set:function(I){h=""+I,x.call(this,I)}}),Object.defineProperty(r,o,{enumerable:u.enumerable}),{getValue:function(){return h},setValue:function(I){h=""+I},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function xe(r){r._valueTracker||(r._valueTracker=de(r))}function he(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var u=o.getValue(),h="";return r&&(h=oe(r)?r.checked?"true":"false":r.value),r=h,r!==u?(o.setValue(r),!0):!1}function fe(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function ke(r,o){var u=o.checked;return B({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function Pe(r,o){var u=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;u=ee(o.value!=null?o.value:u),r._wrapperState={initialChecked:h,initialValue:u,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ae(r,o){o=o.checked,o!=null&&E(r,"checked",o,!1)}function $e(r,o){Ae(r,o);var u=ee(o.value),h=o.type;if(u!=null)h==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(h==="submit"||h==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?kt(r,o.type,u):o.hasOwnProperty("defaultValue")&&kt(r,o.type,ee(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function yt(r,o,u){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,u||o===r.value||(r.value=o),r.defaultValue=o}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function kt(r,o,u){(o!=="number"||fe(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var ft=Array.isArray;function dt(r,o,u,h){if(r=r.options,o){o={};for(var y=0;y<u.length;y++)o["$"+u[y]]=!0;for(u=0;u<r.length;u++)y=o.hasOwnProperty("$"+r[u].value),r[u].selected!==y&&(r[u].selected=y),y&&h&&(r[u].defaultSelected=!0)}else{for(u=""+ee(u),o=null,y=0;y<r.length;y++){if(r[y].value===u){r[y].selected=!0,h&&(r[y].defaultSelected=!0);return}o!==null||r[y].disabled||(o=r[y])}o!==null&&(o.selected=!0)}}function Mn(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return B({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function wn(r,o){var u=o.value;if(u==null){if(u=o.children,o=o.defaultValue,u!=null){if(o!=null)throw Error(n(92));if(ft(u)){if(1<u.length)throw Error(n(93));u=u[0]}o=u}o==null&&(o=""),u=o}r._wrapperState={initialValue:ee(u)}}function xn(r,o){var u=ee(o.value),h=ee(o.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),o.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),h!=null&&(r.defaultValue=""+h)}function Et(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function Ht(r){switch(r){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 Lt(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?Ht(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Wt,Hs=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,u,h,y){MSApp.execUnsafeLocalFunction(function(){return r(o,u,h,y)})}:r})(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(Wt=Wt||document.createElement("div"),Wt.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Wt.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function Rn(r,o){if(o){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=o;return}}r.textContent=o}var Pr={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},Lu=["Webkit","ms","Moz","O"];Object.keys(Pr).forEach(function(r){Lu.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),Pr[o]=Pr[r]})});function Ws(r,o,u){return o==null||typeof o=="boolean"||o===""?"":u||typeof o!="number"||o===0||Pr.hasOwnProperty(r)&&Pr[r]?(""+o).trim():o+"px"}function Us(r,o){r=r.style;for(var u in o)if(o.hasOwnProperty(u)){var h=u.indexOf("--")===0,y=Ws(u,o[u],h);u==="float"&&(u="cssFloat"),h?r.setProperty(u,y):r[u]=y}}var Mu=B({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 xo(r,o){if(o){if(Mu[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function bo(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var So=null;function ko(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Eo=null,Zn=null,er=null;function qs(r){if(r=Ko(r)){if(typeof Eo!="function")throw Error(n(280));var o=r.stateNode;o&&(o=Sl(o),Eo(r.stateNode,r.type,o))}}function Ys(r){Zn?er?er.push(r):er=[r]:Zn=r}function Ks(){if(Zn){var r=Zn,o=er;if(er=Zn=null,qs(r),o)for(r=0;r<o.length;r++)qs(o[r])}}function Gs(r,o){return r(o)}function Xs(){}var _o=!1;function Qs(r,o,u){if(_o)return r(o,u);_o=!0;try{return Gs(r,o,u)}finally{_o=!1,(Zn!==null||er!==null)&&(Xs(),Ks())}}function Ar(r,o){var u=r.stateNode;if(u===null)return null;var h=Sl(u);if(h===null)return null;u=h[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(r=r.type,h=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!h;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,o,typeof u));return u}var No=!1;if(c)try{var Or={};Object.defineProperty(Or,"passive",{get:function(){No=!0}}),window.addEventListener("test",Or,Or),window.removeEventListener("test",Or,Or)}catch{No=!1}function Ru(r,o,u,h,y,x,I,z,U){var ie=Array.prototype.slice.call(arguments,3);try{o.apply(u,ie)}catch(ae){this.onError(ae)}}var Lr=!1,ci=null,fi=!1,Co=null,Du={onError:function(r){Lr=!0,ci=r}};function ju(r,o,u,h,y,x,I,z,U){Lr=!1,ci=null,Ru.apply(Du,arguments)}function $u(r,o,u,h,y,x,I,z,U){if(ju.apply(this,arguments),Lr){if(Lr){var ie=ci;Lr=!1,ci=null}else throw Error(n(198));fi||(fi=!0,Co=ie)}}function bn(r){var o=r,u=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(u=o.return),r=o.return;while(r)}return o.tag===3?u:null}function Io(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function To(r){if(bn(r)!==r)throw Error(n(188))}function zu(r){var o=r.alternate;if(!o){if(o=bn(r),o===null)throw Error(n(188));return o!==r?null:r}for(var u=r,h=o;;){var y=u.return;if(y===null)break;var x=y.alternate;if(x===null){if(h=y.return,h!==null){u=h;continue}break}if(y.child===x.child){for(x=y.child;x;){if(x===u)return To(y),r;if(x===h)return To(y),o;x=x.sibling}throw Error(n(188))}if(u.return!==h.return)u=y,h=x;else{for(var I=!1,z=y.child;z;){if(z===u){I=!0,u=y,h=x;break}if(z===h){I=!0,h=y,u=x;break}z=z.sibling}if(!I){for(z=x.child;z;){if(z===u){I=!0,u=x,h=y;break}if(z===h){I=!0,h=x,u=y;break}z=z.sibling}if(!I)throw Error(n(189))}}if(u.alternate!==h)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:o}function Js(r){return r=zu(r),r!==null?Zs(r):null}function Zs(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=Zs(r);if(o!==null)return o;r=r.sibling}return null}var el=t.unstable_scheduleCallback,tl=t.unstable_cancelCallback,Fu=t.unstable_shouldYield,nl=t.unstable_requestPaint,We=t.unstable_now,Bu=t.unstable_getCurrentPriorityLevel,Po=t.unstable_ImmediatePriority,rl=t.unstable_UserBlockingPriority,di=t.unstable_NormalPriority,Vu=t.unstable_LowPriority,il=t.unstable_IdlePriority,hi=null,Mt=null;function Hu(r){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(hi,r,void 0,(r.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:qu,Wu=Math.log,Uu=Math.LN2;function qu(r){return r>>>=0,r===0?32:31-(Wu(r)/Uu|0)|0}var pi=64,mi=4194304;function Mr(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Dn(r,o){var u=r.pendingLanes;if(u===0)return 0;var h=0,y=r.suspendedLanes,x=r.pingedLanes,I=u&268435455;if(I!==0){var z=I&~y;z!==0?h=Mr(z):(x&=I,x!==0&&(h=Mr(x)))}else I=u&~y,I!==0?h=Mr(I):x!==0&&(h=Mr(x));if(h===0)return 0;if(o!==0&&o!==h&&(o&y)===0&&(y=h&-h,x=o&-o,y>=x||y===16&&(x&4194240)!==0))return o;if((h&4)!==0&&(h|=u&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=h;0<o;)u=31-Rt(o),y=1<<u,h|=r[u],o&=~y;return h}function Yu(r,o){switch(r){case 1:case 2:case 4:return o+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 o+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 ol(r,o){for(var u=r.suspendedLanes,h=r.pingedLanes,y=r.expirationTimes,x=r.pendingLanes;0<x;){var I=31-Rt(x),z=1<<I,U=y[I];U===-1?((z&u)===0||(z&h)!==0)&&(y[I]=Yu(z,o)):U<=o&&(r.expiredLanes|=z),x&=~z}}function Ao(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function sl(){var r=pi;return pi<<=1,(pi&4194240)===0&&(pi=64),r}function Rr(r){for(var o=[],u=0;31>u;u++)o.push(r);return o}function Dr(r,o,u){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-Rt(o),r[o]=u}function Ku(r,o){var u=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var h=r.eventTimes;for(r=r.expirationTimes;0<u;){var y=31-Rt(u),x=1<<y;o[y]=0,h[y]=-1,r[y]=-1,u&=~x}}function gi(r,o){var u=r.entangledLanes|=o;for(r=r.entanglements;u;){var h=31-Rt(u),y=1<<h;y&o|r[h]&o&&(r[h]|=o),u&=~y}}var Re=0;function gp(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var yp,Gu,vp,wp,xp,Xu=!1,ll=[],tr=null,nr=null,rr=null,Oo=new Map,Lo=new Map,ir=[],wb="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 bp(r,o){switch(r){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":Oo.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lo.delete(o.pointerId)}}function Mo(r,o,u,h,y,x){return r===null||r.nativeEvent!==x?(r={blockedOn:o,domEventName:u,eventSystemFlags:h,nativeEvent:x,targetContainers:[y]},o!==null&&(o=Ko(o),o!==null&&Gu(o)),r):(r.eventSystemFlags|=h,o=r.targetContainers,y!==null&&o.indexOf(y)===-1&&o.push(y),r)}function xb(r,o,u,h,y){switch(o){case"focusin":return tr=Mo(tr,r,o,u,h,y),!0;case"dragenter":return nr=Mo(nr,r,o,u,h,y),!0;case"mouseover":return rr=Mo(rr,r,o,u,h,y),!0;case"pointerover":var x=y.pointerId;return Oo.set(x,Mo(Oo.get(x)||null,r,o,u,h,y)),!0;case"gotpointercapture":return x=y.pointerId,Lo.set(x,Mo(Lo.get(x)||null,r,o,u,h,y)),!0}return!1}function Sp(r){var o=jr(r.target);if(o!==null){var u=bn(o);if(u!==null){if(o=u.tag,o===13){if(o=Io(u),o!==null){r.blockedOn=o,xp(r.priority,function(){vp(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function al(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var u=Ju(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var h=new u.constructor(u.type,u);So=h,u.target.dispatchEvent(h),So=null}else return o=Ko(u),o!==null&&Gu(o),r.blockedOn=u,!1;o.shift()}return!0}function kp(r,o,u){al(r)&&u.delete(o)}function bb(){Xu=!1,tr!==null&&al(tr)&&(tr=null),nr!==null&&al(nr)&&(nr=null),rr!==null&&al(rr)&&(rr=null),Oo.forEach(kp),Lo.forEach(kp)}function Ro(r,o){r.blockedOn===o&&(r.blockedOn=null,Xu||(Xu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,bb)))}function Do(r){function o(y){return Ro(y,r)}if(0<ll.length){Ro(ll[0],r);for(var u=1;u<ll.length;u++){var h=ll[u];h.blockedOn===r&&(h.blockedOn=null)}}for(tr!==null&&Ro(tr,r),nr!==null&&Ro(nr,r),rr!==null&&Ro(rr,r),Oo.forEach(o),Lo.forEach(o),u=0;u<ir.length;u++)h=ir[u],h.blockedOn===r&&(h.blockedOn=null);for(;0<ir.length&&(u=ir[0],u.blockedOn===null);)Sp(u),u.blockedOn===null&&ir.shift()}var yi=N.ReactCurrentBatchConfig,ul=!0;function Sb(r,o,u,h){var y=Re,x=yi.transition;yi.transition=null;try{Re=1,Qu(r,o,u,h)}finally{Re=y,yi.transition=x}}function kb(r,o,u,h){var y=Re,x=yi.transition;yi.transition=null;try{Re=4,Qu(r,o,u,h)}finally{Re=y,yi.transition=x}}function Qu(r,o,u,h){if(ul){var y=Ju(r,o,u,h);if(y===null)mc(r,o,h,cl,u),bp(r,h);else if(xb(y,r,o,u,h))h.stopPropagation();else if(bp(r,h),o&4&&-1<wb.indexOf(r)){for(;y!==null;){var x=Ko(y);if(x!==null&&yp(x),x=Ju(r,o,u,h),x===null&&mc(r,o,h,cl,u),x===y)break;y=x}y!==null&&h.stopPropagation()}else mc(r,o,h,null,u)}}var cl=null;function Ju(r,o,u,h){if(cl=null,r=ko(h),r=jr(r),r!==null)if(o=bn(r),o===null)r=null;else if(u=o.tag,u===13){if(r=Io(o),r!==null)return r;r=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return cl=r,null}function Ep(r){switch(r){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(Bu()){case Po:return 1;case rl:return 4;case di:case Vu:return 16;case il:return 536870912;default:return 16}default:return 16}}var or=null,Zu=null,fl=null;function _p(){if(fl)return fl;var r,o=Zu,u=o.length,h,y="value"in or?or.value:or.textContent,x=y.length;for(r=0;r<u&&o[r]===y[r];r++);var I=u-r;for(h=1;h<=I&&o[u-h]===y[x-h];h++);return fl=y.slice(r,1<h?1-h:void 0)}function dl(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function hl(){return!0}function Np(){return!1}function Dt(r){function o(u,h,y,x,I){this._reactName=u,this._targetInst=y,this.type=h,this.nativeEvent=x,this.target=I,this.currentTarget=null;for(var z in r)r.hasOwnProperty(z)&&(u=r[z],this[z]=u?u(x):x[z]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?hl:Np,this.isPropagationStopped=Np,this}return B(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=hl)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=hl)},persist:function(){},isPersistent:hl}),o}var vi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ec=Dt(vi),jo=B({},vi,{view:0,detail:0}),Eb=Dt(jo),tc,nc,$o,pl=B({},jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ic,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==$o&&($o&&r.type==="mousemove"?(tc=r.screenX-$o.screenX,nc=r.screenY-$o.screenY):nc=tc=0,$o=r),tc)},movementY:function(r){return"movementY"in r?r.movementY:nc}}),Cp=Dt(pl),_b=B({},pl,{dataTransfer:0}),Nb=Dt(_b),Cb=B({},jo,{relatedTarget:0}),rc=Dt(Cb),Ib=B({},vi,{animationName:0,elapsedTime:0,pseudoElement:0}),Tb=Dt(Ib),Pb=B({},vi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Ab=Dt(Pb),Ob=B({},vi,{data:0}),Ip=Dt(Ob),Lb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mb={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"},Rb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Db(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=Rb[r])?!!o[r]:!1}function ic(){return Db}var jb=B({},jo,{key:function(r){if(r.key){var o=Lb[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=dl(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Mb[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ic,charCode:function(r){return r.type==="keypress"?dl(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?dl(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),$b=Dt(jb),zb=B({},pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tp=Dt(zb),Fb=B({},jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ic}),Bb=Dt(Fb),Vb=B({},vi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hb=Dt(Vb),Wb=B({},pl,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Ub=Dt(Wb),qb=[9,13,27,32],oc=c&&"CompositionEvent"in window,zo=null;c&&"documentMode"in document&&(zo=document.documentMode);var Yb=c&&"TextEvent"in window&&!zo,Pp=c&&(!oc||zo&&8<zo&&11>=zo),Ap=" ",Op=!1;function Lp(r,o){switch(r){case"keyup":return qb.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var wi=!1;function Kb(r,o){switch(r){case"compositionend":return Mp(o);case"keypress":return o.which!==32?null:(Op=!0,Ap);case"textInput":return r=o.data,r===Ap&&Op?null:r;default:return null}}function Gb(r,o){if(wi)return r==="compositionend"||!oc&&Lp(r,o)?(r=_p(),fl=Zu=or=null,wi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Pp&&o.locale!=="ko"?null:o.data;default:return null}}var Xb={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 Rp(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!Xb[r.type]:o==="textarea"}function Dp(r,o,u,h){Ys(h),o=wl(o,"onChange"),0<o.length&&(u=new ec("onChange","change",null,u,h),r.push({event:u,listeners:o}))}var Fo=null,Bo=null;function Qb(r){em(r,0)}function ml(r){var o=Ei(r);if(he(o))return r}function Jb(r,o){if(r==="change")return o}var jp=!1;if(c){var sc;if(c){var lc="oninput"in document;if(!lc){var $p=document.createElement("div");$p.setAttribute("oninput","return;"),lc=typeof $p.oninput=="function"}sc=lc}else sc=!1;jp=sc&&(!document.documentMode||9<document.documentMode)}function zp(){Fo&&(Fo.detachEvent("onpropertychange",Fp),Bo=Fo=null)}function Fp(r){if(r.propertyName==="value"&&ml(Bo)){var o=[];Dp(o,Bo,r,ko(r)),Qs(Qb,o)}}function Zb(r,o,u){r==="focusin"?(zp(),Fo=o,Bo=u,Fo.attachEvent("onpropertychange",Fp)):r==="focusout"&&zp()}function eS(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return ml(Bo)}function tS(r,o){if(r==="click")return ml(o)}function nS(r,o){if(r==="input"||r==="change")return ml(o)}function rS(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var nn=typeof Object.is=="function"?Object.is:rS;function Vo(r,o){if(nn(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var u=Object.keys(r),h=Object.keys(o);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var y=u[h];if(!f.call(o,y)||!nn(r[y],o[y]))return!1}return!0}function Bp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Vp(r,o){var u=Bp(r);r=0;for(var h;u;){if(u.nodeType===3){if(h=r+u.textContent.length,r<=o&&h>=o)return{node:u,offset:o-r};r=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Bp(u)}}function Hp(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Hp(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Wp(){for(var r=window,o=fe();o instanceof r.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)r=o.contentWindow;else break;o=fe(r.document)}return o}function ac(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function iS(r){var o=Wp(),u=r.focusedElem,h=r.selectionRange;if(o!==u&&u&&u.ownerDocument&&Hp(u.ownerDocument.documentElement,u)){if(h!==null&&ac(u)){if(o=h.start,r=h.end,r===void 0&&(r=o),"selectionStart"in u)u.selectionStart=o,u.selectionEnd=Math.min(r,u.value.length);else if(r=(o=u.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var y=u.textContent.length,x=Math.min(h.start,y);h=h.end===void 0?x:Math.min(h.end,y),!r.extend&&x>h&&(y=h,h=x,x=y),y=Vp(u,x);var I=Vp(u,h);y&&I&&(r.rangeCount!==1||r.anchorNode!==y.node||r.anchorOffset!==y.offset||r.focusNode!==I.node||r.focusOffset!==I.offset)&&(o=o.createRange(),o.setStart(y.node,y.offset),r.removeAllRanges(),x>h?(r.addRange(o),r.extend(I.node,I.offset)):(o.setEnd(I.node,I.offset),r.addRange(o)))}}for(o=[],r=u;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<o.length;u++)r=o[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var oS=c&&"documentMode"in document&&11>=document.documentMode,xi=null,uc=null,Ho=null,cc=!1;function Up(r,o,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;cc||xi==null||xi!==fe(h)||(h=xi,"selectionStart"in h&&ac(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ho&&Vo(Ho,h)||(Ho=h,h=wl(uc,"onSelect"),0<h.length&&(o=new ec("onSelect","select",null,o,u),r.push({event:o,listeners:h}),o.target=xi)))}function gl(r,o){var u={};return u[r.toLowerCase()]=o.toLowerCase(),u["Webkit"+r]="webkit"+o,u["Moz"+r]="moz"+o,u}var bi={animationend:gl("Animation","AnimationEnd"),animationiteration:gl("Animation","AnimationIteration"),animationstart:gl("Animation","AnimationStart"),transitionend:gl("Transition","TransitionEnd")},fc={},qp={};c&&(qp=document.createElement("div").style,"AnimationEvent"in window||(delete bi.animationend.animation,delete bi.animationiteration.animation,delete bi.animationstart.animation),"TransitionEvent"in window||delete bi.transitionend.transition);function yl(r){if(fc[r])return fc[r];if(!bi[r])return r;var o=bi[r],u;for(u in o)if(o.hasOwnProperty(u)&&u in qp)return fc[r]=o[u];return r}var Yp=yl("animationend"),Kp=yl("animationiteration"),Gp=yl("animationstart"),Xp=yl("transitionend"),Qp=new Map,Jp="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 sr(r,o){Qp.set(r,o),l(o,[r])}for(var dc=0;dc<Jp.length;dc++){var hc=Jp[dc],sS=hc.toLowerCase(),lS=hc[0].toUpperCase()+hc.slice(1);sr(sS,"on"+lS)}sr(Yp,"onAnimationEnd"),sr(Kp,"onAnimationIteration"),sr(Gp,"onAnimationStart"),sr("dblclick","onDoubleClick"),sr("focusin","onFocus"),sr("focusout","onBlur"),sr(Xp,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wo="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(" "),aS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Wo));function Zp(r,o,u){var h=r.type||"unknown-event";r.currentTarget=u,$u(h,o,void 0,r),r.currentTarget=null}function em(r,o){o=(o&4)!==0;for(var u=0;u<r.length;u++){var h=r[u],y=h.event;h=h.listeners;e:{var x=void 0;if(o)for(var I=h.length-1;0<=I;I--){var z=h[I],U=z.instance,ie=z.currentTarget;if(z=z.listener,U!==x&&y.isPropagationStopped())break e;Zp(y,z,ie),x=U}else for(I=0;I<h.length;I++){if(z=h[I],U=z.instance,ie=z.currentTarget,z=z.listener,U!==x&&y.isPropagationStopped())break e;Zp(y,z,ie),x=U}}}if(fi)throw r=Co,fi=!1,Co=null,r}function ze(r,o){var u=o[bc];u===void 0&&(u=o[bc]=new Set);var h=r+"__bubble";u.has(h)||(tm(o,r,2,!1),u.add(h))}function pc(r,o,u){var h=0;o&&(h|=4),tm(u,r,h,o)}var vl="_reactListening"+Math.random().toString(36).slice(2);function Uo(r){if(!r[vl]){r[vl]=!0,i.forEach(function(u){u!=="selectionchange"&&(aS.has(u)||pc(u,!1,r),pc(u,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[vl]||(o[vl]=!0,pc("selectionchange",!1,o))}}function tm(r,o,u,h){switch(Ep(o)){case 1:var y=Sb;break;case 4:y=kb;break;default:y=Qu}u=y.bind(null,o,u,r),y=void 0,!No||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(y=!0),h?y!==void 0?r.addEventListener(o,u,{capture:!0,passive:y}):r.addEventListener(o,u,!0):y!==void 0?r.addEventListener(o,u,{passive:y}):r.addEventListener(o,u,!1)}function mc(r,o,u,h,y){var x=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var I=h.tag;if(I===3||I===4){var z=h.stateNode.containerInfo;if(z===y||z.nodeType===8&&z.parentNode===y)break;if(I===4)for(I=h.return;I!==null;){var U=I.tag;if((U===3||U===4)&&(U=I.stateNode.containerInfo,U===y||U.nodeType===8&&U.parentNode===y))return;I=I.return}for(;z!==null;){if(I=jr(z),I===null)return;if(U=I.tag,U===5||U===6){h=x=I;continue e}z=z.parentNode}}h=h.return}Qs(function(){var ie=x,ae=ko(u),ue=[];e:{var le=Qp.get(r);if(le!==void 0){var pe=ec,ve=r;switch(r){case"keypress":if(dl(u)===0)break e;case"keydown":case"keyup":pe=$b;break;case"focusin":ve="focus",pe=rc;break;case"focusout":ve="blur",pe=rc;break;case"beforeblur":case"afterblur":pe=rc;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=Cp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=Nb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=Bb;break;case Yp:case Kp:case Gp:pe=Tb;break;case Xp:pe=Hb;break;case"scroll":pe=Eb;break;case"wheel":pe=Ub;break;case"copy":case"cut":case"paste":pe=Ab;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=Tp}var we=(o&4)!==0,Ke=!we&&r==="scroll",te=we?le!==null?le+"Capture":null:le;we=[];for(var X=ie,ne;X!==null;){ne=X;var ce=ne.stateNode;if(ne.tag===5&&ce!==null&&(ne=ce,te!==null&&(ce=Ar(X,te),ce!=null&&we.push(qo(X,ce,ne)))),Ke)break;X=X.return}0<we.length&&(le=new pe(le,ve,null,u,ae),ue.push({event:le,listeners:we}))}}if((o&7)===0){e:{if(le=r==="mouseover"||r==="pointerover",pe=r==="mouseout"||r==="pointerout",le&&u!==So&&(ve=u.relatedTarget||u.fromElement)&&(jr(ve)||ve[jn]))break e;if((pe||le)&&(le=ae.window===ae?ae:(le=ae.ownerDocument)?le.defaultView||le.parentWindow:window,pe?(ve=u.relatedTarget||u.toElement,pe=ie,ve=ve?jr(ve):null,ve!==null&&(Ke=bn(ve),ve!==Ke||ve.tag!==5&&ve.tag!==6)&&(ve=null)):(pe=null,ve=ie),pe!==ve)){if(we=Cp,ce="onMouseLeave",te="onMouseEnter",X="mouse",(r==="pointerout"||r==="pointerover")&&(we=Tp,ce="onPointerLeave",te="onPointerEnter",X="pointer"),Ke=pe==null?le:Ei(pe),ne=ve==null?le:Ei(ve),le=new we(ce,X+"leave",pe,u,ae),le.target=Ke,le.relatedTarget=ne,ce=null,jr(ae)===ie&&(we=new we(te,X+"enter",ve,u,ae),we.target=ne,we.relatedTarget=Ke,ce=we),Ke=ce,pe&&ve)t:{for(we=pe,te=ve,X=0,ne=we;ne;ne=Si(ne))X++;for(ne=0,ce=te;ce;ce=Si(ce))ne++;for(;0<X-ne;)we=Si(we),X--;for(;0<ne-X;)te=Si(te),ne--;for(;X--;){if(we===te||te!==null&&we===te.alternate)break t;we=Si(we),te=Si(te)}we=null}else we=null;pe!==null&&nm(ue,le,pe,we,!1),ve!==null&&Ke!==null&&nm(ue,Ke,ve,we,!0)}}e:{if(le=ie?Ei(ie):window,pe=le.nodeName&&le.nodeName.toLowerCase(),pe==="select"||pe==="input"&&le.type==="file")var be=Jb;else if(Rp(le))if(jp)be=nS;else{be=eS;var Ee=Zb}else(pe=le.nodeName)&&pe.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(be=tS);if(be&&(be=be(r,ie))){Dp(ue,be,u,ae);break e}Ee&&Ee(r,le,ie),r==="focusout"&&(Ee=le._wrapperState)&&Ee.controlled&&le.type==="number"&&kt(le,"number",le.value)}switch(Ee=ie?Ei(ie):window,r){case"focusin":(Rp(Ee)||Ee.contentEditable==="true")&&(xi=Ee,uc=ie,Ho=null);break;case"focusout":Ho=uc=xi=null;break;case"mousedown":cc=!0;break;case"contextmenu":case"mouseup":case"dragend":cc=!1,Up(ue,u,ae);break;case"selectionchange":if(oS)break;case"keydown":case"keyup":Up(ue,u,ae)}var _e;if(oc)e:{switch(r){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else wi?Lp(r,u)&&(Ne="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ne="onCompositionStart");Ne&&(Pp&&u.locale!=="ko"&&(wi||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&wi&&(_e=_p()):(or=ae,Zu="value"in or?or.value:or.textContent,wi=!0)),Ee=wl(ie,Ne),0<Ee.length&&(Ne=new Ip(Ne,r,null,u,ae),ue.push({event:Ne,listeners:Ee}),_e?Ne.data=_e:(_e=Mp(u),_e!==null&&(Ne.data=_e)))),(_e=Yb?Kb(r,u):Gb(r,u))&&(ie=wl(ie,"onBeforeInput"),0<ie.length&&(ae=new Ip("onBeforeInput","beforeinput",null,u,ae),ue.push({event:ae,listeners:ie}),ae.data=_e))}em(ue,o)})}function qo(r,o,u){return{instance:r,listener:o,currentTarget:u}}function wl(r,o){for(var u=o+"Capture",h=[];r!==null;){var y=r,x=y.stateNode;y.tag===5&&x!==null&&(y=x,x=Ar(r,u),x!=null&&h.unshift(qo(r,x,y)),x=Ar(r,o),x!=null&&h.push(qo(r,x,y))),r=r.return}return h}function Si(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function nm(r,o,u,h,y){for(var x=o._reactName,I=[];u!==null&&u!==h;){var z=u,U=z.alternate,ie=z.stateNode;if(U!==null&&U===h)break;z.tag===5&&ie!==null&&(z=ie,y?(U=Ar(u,x),U!=null&&I.unshift(qo(u,U,z))):y||(U=Ar(u,x),U!=null&&I.push(qo(u,U,z)))),u=u.return}I.length!==0&&r.push({event:o,listeners:I})}var uS=/\r\n?/g,cS=/\u0000|\uFFFD/g;function rm(r){return(typeof r=="string"?r:""+r).replace(uS,`
|
|
38
|
+
`).replace(cS,"")}function xl(r,o,u){if(o=rm(o),rm(r)!==o&&u)throw Error(n(425))}function bl(){}var gc=null,yc=null;function vc(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var wc=typeof setTimeout=="function"?setTimeout:void 0,fS=typeof clearTimeout=="function"?clearTimeout:void 0,im=typeof Promise=="function"?Promise:void 0,dS=typeof queueMicrotask=="function"?queueMicrotask:typeof im<"u"?function(r){return im.resolve(null).then(r).catch(hS)}:wc;function hS(r){setTimeout(function(){throw r})}function xc(r,o){var u=o,h=0;do{var y=u.nextSibling;if(r.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"){if(h===0){r.removeChild(y),Do(o);return}h--}else u!=="$"&&u!=="$?"&&u!=="$!"||h++;u=y}while(u);Do(o)}function lr(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function om(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(o===0)return r;o--}else u==="/$"&&o++}r=r.previousSibling}return null}var ki=Math.random().toString(36).slice(2),Sn="__reactFiber$"+ki,Yo="__reactProps$"+ki,jn="__reactContainer$"+ki,bc="__reactEvents$"+ki,pS="__reactListeners$"+ki,mS="__reactHandles$"+ki;function jr(r){var o=r[Sn];if(o)return o;for(var u=r.parentNode;u;){if(o=u[jn]||u[Sn]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(r=om(r);r!==null;){if(u=r[Sn])return u;r=om(r)}return o}r=u,u=r.parentNode}return null}function Ko(r){return r=r[Sn]||r[jn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Ei(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Sl(r){return r[Yo]||null}var Sc=[],_i=-1;function ar(r){return{current:r}}function Fe(r){0>_i||(r.current=Sc[_i],Sc[_i]=null,_i--)}function De(r,o){_i++,Sc[_i]=r.current,r.current=o}var ur={},ht=ar(ur),_t=ar(!1),$r=ur;function Ni(r,o){var u=r.type.contextTypes;if(!u)return ur;var h=r.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var y={},x;for(x in u)y[x]=o[x];return h&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=y),y}function Nt(r){return r=r.childContextTypes,r!=null}function kl(){Fe(_t),Fe(ht)}function sm(r,o,u){if(ht.current!==ur)throw Error(n(168));De(ht,o),De(_t,u)}function lm(r,o,u){var h=r.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return u;h=h.getChildContext();for(var y in h)if(!(y in o))throw Error(n(108,se(r)||"Unknown",y));return B({},u,h)}function El(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||ur,$r=ht.current,De(ht,r),De(_t,_t.current),!0}function am(r,o,u){var h=r.stateNode;if(!h)throw Error(n(169));u?(r=lm(r,o,$r),h.__reactInternalMemoizedMergedChildContext=r,Fe(_t),Fe(ht),De(ht,r)):Fe(_t),De(_t,u)}var $n=null,_l=!1,kc=!1;function um(r){$n===null?$n=[r]:$n.push(r)}function gS(r){_l=!0,um(r)}function cr(){if(!kc&&$n!==null){kc=!0;var r=0,o=Re;try{var u=$n;for(Re=1;r<u.length;r++){var h=u[r];do h=h(!0);while(h!==null)}$n=null,_l=!1}catch(y){throw $n!==null&&($n=$n.slice(r+1)),el(Po,cr),y}finally{Re=o,kc=!1}}return null}var Ci=[],Ii=0,Nl=null,Cl=0,Ut=[],qt=0,zr=null,zn=1,Fn="";function Fr(r,o){Ci[Ii++]=Cl,Ci[Ii++]=Nl,Nl=r,Cl=o}function cm(r,o,u){Ut[qt++]=zn,Ut[qt++]=Fn,Ut[qt++]=zr,zr=r;var h=zn;r=Fn;var y=32-Rt(h)-1;h&=~(1<<y),u+=1;var x=32-Rt(o)+y;if(30<x){var I=y-y%5;x=(h&(1<<I)-1).toString(32),h>>=I,y-=I,zn=1<<32-Rt(o)+y|u<<y|h,Fn=x+r}else zn=1<<x|u<<y|h,Fn=r}function Ec(r){r.return!==null&&(Fr(r,1),cm(r,1,0))}function _c(r){for(;r===Nl;)Nl=Ci[--Ii],Ci[Ii]=null,Cl=Ci[--Ii],Ci[Ii]=null;for(;r===zr;)zr=Ut[--qt],Ut[qt]=null,Fn=Ut[--qt],Ut[qt]=null,zn=Ut[--qt],Ut[qt]=null}var jt=null,$t=null,Be=!1,rn=null;function fm(r,o){var u=Xt(5,null,null,0);u.elementType="DELETED",u.stateNode=o,u.return=r,o=r.deletions,o===null?(r.deletions=[u],r.flags|=16):o.push(u)}function dm(r,o){switch(r.tag){case 5:var u=r.type;return o=o.nodeType!==1||u.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,jt=r,$t=lr(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,jt=r,$t=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(u=zr!==null?{id:zn,overflow:Fn}:null,r.memoizedState={dehydrated:o,treeContext:u,retryLane:1073741824},u=Xt(18,null,null,0),u.stateNode=o,u.return=r,r.child=u,jt=r,$t=null,!0):!1;default:return!1}}function Nc(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Cc(r){if(Be){var o=$t;if(o){var u=o;if(!dm(r,o)){if(Nc(r))throw Error(n(418));o=lr(u.nextSibling);var h=jt;o&&dm(r,o)?fm(h,u):(r.flags=r.flags&-4097|2,Be=!1,jt=r)}}else{if(Nc(r))throw Error(n(418));r.flags=r.flags&-4097|2,Be=!1,jt=r}}}function hm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;jt=r}function Il(r){if(r!==jt)return!1;if(!Be)return hm(r),Be=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!vc(r.type,r.memoizedProps)),o&&(o=$t)){if(Nc(r))throw pm(),Error(n(418));for(;o;)fm(r,o),o=lr(o.nextSibling)}if(hm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(o===0){$t=lr(r.nextSibling);break e}o--}else u!=="$"&&u!=="$!"&&u!=="$?"||o++}r=r.nextSibling}$t=null}}else $t=jt?lr(r.stateNode.nextSibling):null;return!0}function pm(){for(var r=$t;r;)r=lr(r.nextSibling)}function Ti(){$t=jt=null,Be=!1}function Ic(r){rn===null?rn=[r]:rn.push(r)}var yS=N.ReactCurrentBatchConfig;function Go(r,o,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var h=u.stateNode}if(!h)throw Error(n(147,r));var y=h,x=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===x?o.ref:(o=function(I){var z=y.refs;I===null?delete z[x]:z[x]=I},o._stringRef=x,o)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function Tl(r,o){throw r=Object.prototype.toString.call(o),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function mm(r){var o=r._init;return o(r._payload)}function gm(r){function o(te,X){if(r){var ne=te.deletions;ne===null?(te.deletions=[X],te.flags|=16):ne.push(X)}}function u(te,X){if(!r)return null;for(;X!==null;)o(te,X),X=X.sibling;return null}function h(te,X){for(te=new Map;X!==null;)X.key!==null?te.set(X.key,X):te.set(X.index,X),X=X.sibling;return te}function y(te,X){return te=vr(te,X),te.index=0,te.sibling=null,te}function x(te,X,ne){return te.index=ne,r?(ne=te.alternate,ne!==null?(ne=ne.index,ne<X?(te.flags|=2,X):ne):(te.flags|=2,X)):(te.flags|=1048576,X)}function I(te){return r&&te.alternate===null&&(te.flags|=2),te}function z(te,X,ne,ce){return X===null||X.tag!==6?(X=xf(ne,te.mode,ce),X.return=te,X):(X=y(X,ne),X.return=te,X)}function U(te,X,ne,ce){var be=ne.type;return be===R?ae(te,X,ne.props.children,ce,ne.key):X!==null&&(X.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===q&&mm(be)===X.type)?(ce=y(X,ne.props),ce.ref=Go(te,X,ne),ce.return=te,ce):(ce=Zl(ne.type,ne.key,ne.props,null,te.mode,ce),ce.ref=Go(te,X,ne),ce.return=te,ce)}function ie(te,X,ne,ce){return X===null||X.tag!==4||X.stateNode.containerInfo!==ne.containerInfo||X.stateNode.implementation!==ne.implementation?(X=bf(ne,te.mode,ce),X.return=te,X):(X=y(X,ne.children||[]),X.return=te,X)}function ae(te,X,ne,ce,be){return X===null||X.tag!==7?(X=Kr(ne,te.mode,ce,be),X.return=te,X):(X=y(X,ne),X.return=te,X)}function ue(te,X,ne){if(typeof X=="string"&&X!==""||typeof X=="number")return X=xf(""+X,te.mode,ne),X.return=te,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case A:return ne=Zl(X.type,X.key,X.props,null,te.mode,ne),ne.ref=Go(te,null,X),ne.return=te,ne;case L:return X=bf(X,te.mode,ne),X.return=te,X;case q:var ce=X._init;return ue(te,ce(X._payload),ne)}if(ft(X)||W(X))return X=Kr(X,te.mode,ne,null),X.return=te,X;Tl(te,X)}return null}function le(te,X,ne,ce){var be=X!==null?X.key:null;if(typeof ne=="string"&&ne!==""||typeof ne=="number")return be!==null?null:z(te,X,""+ne,ce);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case A:return ne.key===be?U(te,X,ne,ce):null;case L:return ne.key===be?ie(te,X,ne,ce):null;case q:return be=ne._init,le(te,X,be(ne._payload),ce)}if(ft(ne)||W(ne))return be!==null?null:ae(te,X,ne,ce,null);Tl(te,ne)}return null}function pe(te,X,ne,ce,be){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return te=te.get(ne)||null,z(X,te,""+ce,be);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case A:return te=te.get(ce.key===null?ne:ce.key)||null,U(X,te,ce,be);case L:return te=te.get(ce.key===null?ne:ce.key)||null,ie(X,te,ce,be);case q:var Ee=ce._init;return pe(te,X,ne,Ee(ce._payload),be)}if(ft(ce)||W(ce))return te=te.get(ne)||null,ae(X,te,ce,be,null);Tl(X,ce)}return null}function ve(te,X,ne,ce){for(var be=null,Ee=null,_e=X,Ne=X=0,lt=null;_e!==null&&Ne<ne.length;Ne++){_e.index>Ne?(lt=_e,_e=null):lt=_e.sibling;var Me=le(te,_e,ne[Ne],ce);if(Me===null){_e===null&&(_e=lt);break}r&&_e&&Me.alternate===null&&o(te,_e),X=x(Me,X,Ne),Ee===null?be=Me:Ee.sibling=Me,Ee=Me,_e=lt}if(Ne===ne.length)return u(te,_e),Be&&Fr(te,Ne),be;if(_e===null){for(;Ne<ne.length;Ne++)_e=ue(te,ne[Ne],ce),_e!==null&&(X=x(_e,X,Ne),Ee===null?be=_e:Ee.sibling=_e,Ee=_e);return Be&&Fr(te,Ne),be}for(_e=h(te,_e);Ne<ne.length;Ne++)lt=pe(_e,te,Ne,ne[Ne],ce),lt!==null&&(r&<.alternate!==null&&_e.delete(lt.key===null?Ne:lt.key),X=x(lt,X,Ne),Ee===null?be=lt:Ee.sibling=lt,Ee=lt);return r&&_e.forEach(function(wr){return o(te,wr)}),Be&&Fr(te,Ne),be}function we(te,X,ne,ce){var be=W(ne);if(typeof be!="function")throw Error(n(150));if(ne=be.call(ne),ne==null)throw Error(n(151));for(var Ee=be=null,_e=X,Ne=X=0,lt=null,Me=ne.next();_e!==null&&!Me.done;Ne++,Me=ne.next()){_e.index>Ne?(lt=_e,_e=null):lt=_e.sibling;var wr=le(te,_e,Me.value,ce);if(wr===null){_e===null&&(_e=lt);break}r&&_e&&wr.alternate===null&&o(te,_e),X=x(wr,X,Ne),Ee===null?be=wr:Ee.sibling=wr,Ee=wr,_e=lt}if(Me.done)return u(te,_e),Be&&Fr(te,Ne),be;if(_e===null){for(;!Me.done;Ne++,Me=ne.next())Me=ue(te,Me.value,ce),Me!==null&&(X=x(Me,X,Ne),Ee===null?be=Me:Ee.sibling=Me,Ee=Me);return Be&&Fr(te,Ne),be}for(_e=h(te,_e);!Me.done;Ne++,Me=ne.next())Me=pe(_e,te,Ne,Me.value,ce),Me!==null&&(r&&Me.alternate!==null&&_e.delete(Me.key===null?Ne:Me.key),X=x(Me,X,Ne),Ee===null?be=Me:Ee.sibling=Me,Ee=Me);return r&&_e.forEach(function(XS){return o(te,XS)}),Be&&Fr(te,Ne),be}function Ke(te,X,ne,ce){if(typeof ne=="object"&&ne!==null&&ne.type===R&&ne.key===null&&(ne=ne.props.children),typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case A:e:{for(var be=ne.key,Ee=X;Ee!==null;){if(Ee.key===be){if(be=ne.type,be===R){if(Ee.tag===7){u(te,Ee.sibling),X=y(Ee,ne.props.children),X.return=te,te=X;break e}}else if(Ee.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===q&&mm(be)===Ee.type){u(te,Ee.sibling),X=y(Ee,ne.props),X.ref=Go(te,Ee,ne),X.return=te,te=X;break e}u(te,Ee);break}else o(te,Ee);Ee=Ee.sibling}ne.type===R?(X=Kr(ne.props.children,te.mode,ce,ne.key),X.return=te,te=X):(ce=Zl(ne.type,ne.key,ne.props,null,te.mode,ce),ce.ref=Go(te,X,ne),ce.return=te,te=ce)}return I(te);case L:e:{for(Ee=ne.key;X!==null;){if(X.key===Ee)if(X.tag===4&&X.stateNode.containerInfo===ne.containerInfo&&X.stateNode.implementation===ne.implementation){u(te,X.sibling),X=y(X,ne.children||[]),X.return=te,te=X;break e}else{u(te,X);break}else o(te,X);X=X.sibling}X=bf(ne,te.mode,ce),X.return=te,te=X}return I(te);case q:return Ee=ne._init,Ke(te,X,Ee(ne._payload),ce)}if(ft(ne))return ve(te,X,ne,ce);if(W(ne))return we(te,X,ne,ce);Tl(te,ne)}return typeof ne=="string"&&ne!==""||typeof ne=="number"?(ne=""+ne,X!==null&&X.tag===6?(u(te,X.sibling),X=y(X,ne),X.return=te,te=X):(u(te,X),X=xf(ne,te.mode,ce),X.return=te,te=X),I(te)):u(te,X)}return Ke}var Pi=gm(!0),ym=gm(!1),Pl=ar(null),Al=null,Ai=null,Tc=null;function Pc(){Tc=Ai=Al=null}function Ac(r){var o=Pl.current;Fe(Pl),r._currentValue=o}function Oc(r,o,u){for(;r!==null;){var h=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),r===u)break;r=r.return}}function Oi(r,o){Al=r,Tc=Ai=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&o)!==0&&(Ct=!0),r.firstContext=null)}function Yt(r){var o=r._currentValue;if(Tc!==r)if(r={context:r,memoizedValue:o,next:null},Ai===null){if(Al===null)throw Error(n(308));Ai=r,Al.dependencies={lanes:0,firstContext:r}}else Ai=Ai.next=r;return o}var Br=null;function Lc(r){Br===null?Br=[r]:Br.push(r)}function vm(r,o,u,h){var y=o.interleaved;return y===null?(u.next=u,Lc(o)):(u.next=y.next,y.next=u),o.interleaved=u,Bn(r,h)}function Bn(r,o){r.lanes|=o;var u=r.alternate;for(u!==null&&(u.lanes|=o),u=r,r=r.return;r!==null;)r.childLanes|=o,u=r.alternate,u!==null&&(u.childLanes|=o),u=r,r=r.return;return u.tag===3?u.stateNode:null}var fr=!1;function Mc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wm(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Vn(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function dr(r,o,u){var h=r.updateQueue;if(h===null)return null;if(h=h.shared,(Le&2)!==0){var y=h.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),h.pending=o,Bn(r,u)}return y=h.interleaved,y===null?(o.next=o,Lc(h)):(o.next=y.next,y.next=o),h.interleaved=o,Bn(r,u)}function Ol(r,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194240)!==0)){var h=o.lanes;h&=r.pendingLanes,u|=h,o.lanes=u,gi(r,u)}}function xm(r,o){var u=r.updateQueue,h=r.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var y=null,x=null;if(u=u.firstBaseUpdate,u!==null){do{var I={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};x===null?y=x=I:x=x.next=I,u=u.next}while(u!==null);x===null?y=x=o:x=x.next=o}else y=x=o;u={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:x,shared:h.shared,effects:h.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=o:r.next=o,u.lastBaseUpdate=o}function Ll(r,o,u,h){var y=r.updateQueue;fr=!1;var x=y.firstBaseUpdate,I=y.lastBaseUpdate,z=y.shared.pending;if(z!==null){y.shared.pending=null;var U=z,ie=U.next;U.next=null,I===null?x=ie:I.next=ie,I=U;var ae=r.alternate;ae!==null&&(ae=ae.updateQueue,z=ae.lastBaseUpdate,z!==I&&(z===null?ae.firstBaseUpdate=ie:z.next=ie,ae.lastBaseUpdate=U))}if(x!==null){var ue=y.baseState;I=0,ae=ie=U=null,z=x;do{var le=z.lane,pe=z.eventTime;if((h&le)===le){ae!==null&&(ae=ae.next={eventTime:pe,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var ve=r,we=z;switch(le=o,pe=u,we.tag){case 1:if(ve=we.payload,typeof ve=="function"){ue=ve.call(pe,ue,le);break e}ue=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=we.payload,le=typeof ve=="function"?ve.call(pe,ue,le):ve,le==null)break e;ue=B({},ue,le);break e;case 2:fr=!0}}z.callback!==null&&z.lane!==0&&(r.flags|=64,le=y.effects,le===null?y.effects=[z]:le.push(z))}else pe={eventTime:pe,lane:le,tag:z.tag,payload:z.payload,callback:z.callback,next:null},ae===null?(ie=ae=pe,U=ue):ae=ae.next=pe,I|=le;if(z=z.next,z===null){if(z=y.shared.pending,z===null)break;le=z,z=le.next,le.next=null,y.lastBaseUpdate=le,y.shared.pending=null}}while(!0);if(ae===null&&(U=ue),y.baseState=U,y.firstBaseUpdate=ie,y.lastBaseUpdate=ae,o=y.shared.interleaved,o!==null){y=o;do I|=y.lane,y=y.next;while(y!==o)}else x===null&&(y.shared.lanes=0);Wr|=I,r.lanes=I,r.memoizedState=ue}}function bm(r,o,u){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var h=r[o],y=h.callback;if(y!==null){if(h.callback=null,h=u,typeof y!="function")throw Error(n(191,y));y.call(h)}}}var Xo={},kn=ar(Xo),Qo=ar(Xo),Jo=ar(Xo);function Vr(r){if(r===Xo)throw Error(n(174));return r}function Rc(r,o){switch(De(Jo,o),De(Qo,r),De(kn,Xo),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:Lt(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=Lt(o,r)}Fe(kn),De(kn,o)}function Li(){Fe(kn),Fe(Qo),Fe(Jo)}function Sm(r){Vr(Jo.current);var o=Vr(kn.current),u=Lt(o,r.type);o!==u&&(De(Qo,r),De(kn,u))}function Dc(r){Qo.current===r&&(Fe(kn),Fe(Qo))}var Ue=ar(0);function Ml(r){for(var o=r;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var jc=[];function $c(){for(var r=0;r<jc.length;r++)jc[r]._workInProgressVersionPrimary=null;jc.length=0}var Rl=N.ReactCurrentDispatcher,zc=N.ReactCurrentBatchConfig,Hr=0,qe=null,nt=null,ot=null,Dl=!1,Zo=!1,es=0,vS=0;function pt(){throw Error(n(321))}function Fc(r,o){if(o===null)return!1;for(var u=0;u<o.length&&u<r.length;u++)if(!nn(r[u],o[u]))return!1;return!0}function Bc(r,o,u,h,y,x){if(Hr=x,qe=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Rl.current=r===null||r.memoizedState===null?SS:kS,r=u(h,y),Zo){x=0;do{if(Zo=!1,es=0,25<=x)throw Error(n(301));x+=1,ot=nt=null,o.updateQueue=null,Rl.current=ES,r=u(h,y)}while(Zo)}if(Rl.current=zl,o=nt!==null&&nt.next!==null,Hr=0,ot=nt=qe=null,Dl=!1,o)throw Error(n(300));return r}function Vc(){var r=es!==0;return es=0,r}function En(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?qe.memoizedState=ot=r:ot=ot.next=r,ot}function Kt(){if(nt===null){var r=qe.alternate;r=r!==null?r.memoizedState:null}else r=nt.next;var o=ot===null?qe.memoizedState:ot.next;if(o!==null)ot=o,nt=r;else{if(r===null)throw Error(n(310));nt=r,r={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},ot===null?qe.memoizedState=ot=r:ot=ot.next=r}return ot}function ts(r,o){return typeof o=="function"?o(r):o}function Hc(r){var o=Kt(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var h=nt,y=h.baseQueue,x=u.pending;if(x!==null){if(y!==null){var I=y.next;y.next=x.next,x.next=I}h.baseQueue=y=x,u.pending=null}if(y!==null){x=y.next,h=h.baseState;var z=I=null,U=null,ie=x;do{var ae=ie.lane;if((Hr&ae)===ae)U!==null&&(U=U.next={lane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),h=ie.hasEagerState?ie.eagerState:r(h,ie.action);else{var ue={lane:ae,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null};U===null?(z=U=ue,I=h):U=U.next=ue,qe.lanes|=ae,Wr|=ae}ie=ie.next}while(ie!==null&&ie!==x);U===null?I=h:U.next=z,nn(h,o.memoizedState)||(Ct=!0),o.memoizedState=h,o.baseState=I,o.baseQueue=U,u.lastRenderedState=h}if(r=u.interleaved,r!==null){y=r;do x=y.lane,qe.lanes|=x,Wr|=x,y=y.next;while(y!==r)}else y===null&&(u.lanes=0);return[o.memoizedState,u.dispatch]}function Wc(r){var o=Kt(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var h=u.dispatch,y=u.pending,x=o.memoizedState;if(y!==null){u.pending=null;var I=y=y.next;do x=r(x,I.action),I=I.next;while(I!==y);nn(x,o.memoizedState)||(Ct=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),u.lastRenderedState=x}return[x,h]}function km(){}function Em(r,o){var u=qe,h=Kt(),y=o(),x=!nn(h.memoizedState,y);if(x&&(h.memoizedState=y,Ct=!0),h=h.queue,Uc(Cm.bind(null,u,h,r),[r]),h.getSnapshot!==o||x||ot!==null&&ot.memoizedState.tag&1){if(u.flags|=2048,ns(9,Nm.bind(null,u,h,y,o),void 0,null),st===null)throw Error(n(349));(Hr&30)!==0||_m(u,o,y)}return y}function _m(r,o,u){r.flags|=16384,r={getSnapshot:o,value:u},o=qe.updateQueue,o===null?(o={lastEffect:null,stores:null},qe.updateQueue=o,o.stores=[r]):(u=o.stores,u===null?o.stores=[r]:u.push(r))}function Nm(r,o,u,h){o.value=u,o.getSnapshot=h,Im(o)&&Tm(r)}function Cm(r,o,u){return u(function(){Im(o)&&Tm(r)})}function Im(r){var o=r.getSnapshot;r=r.value;try{var u=o();return!nn(r,u)}catch{return!0}}function Tm(r){var o=Bn(r,1);o!==null&&an(o,r,1,-1)}function Pm(r){var o=En();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:r},o.queue=r,r=r.dispatch=bS.bind(null,qe,r),[o.memoizedState,r]}function ns(r,o,u,h){return r={tag:r,create:o,destroy:u,deps:h,next:null},o=qe.updateQueue,o===null?(o={lastEffect:null,stores:null},qe.updateQueue=o,o.lastEffect=r.next=r):(u=o.lastEffect,u===null?o.lastEffect=r.next=r:(h=u.next,u.next=r,r.next=h,o.lastEffect=r)),r}function Am(){return Kt().memoizedState}function jl(r,o,u,h){var y=En();qe.flags|=r,y.memoizedState=ns(1|o,u,void 0,h===void 0?null:h)}function $l(r,o,u,h){var y=Kt();h=h===void 0?null:h;var x=void 0;if(nt!==null){var I=nt.memoizedState;if(x=I.destroy,h!==null&&Fc(h,I.deps)){y.memoizedState=ns(o,u,x,h);return}}qe.flags|=r,y.memoizedState=ns(1|o,u,x,h)}function Om(r,o){return jl(8390656,8,r,o)}function Uc(r,o){return $l(2048,8,r,o)}function Lm(r,o){return $l(4,2,r,o)}function Mm(r,o){return $l(4,4,r,o)}function Rm(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function Dm(r,o,u){return u=u!=null?u.concat([r]):null,$l(4,4,Rm.bind(null,o,r),u)}function qc(){}function jm(r,o){var u=Kt();o=o===void 0?null:o;var h=u.memoizedState;return h!==null&&o!==null&&Fc(o,h[1])?h[0]:(u.memoizedState=[r,o],r)}function $m(r,o){var u=Kt();o=o===void 0?null:o;var h=u.memoizedState;return h!==null&&o!==null&&Fc(o,h[1])?h[0]:(r=r(),u.memoizedState=[r,o],r)}function zm(r,o,u){return(Hr&21)===0?(r.baseState&&(r.baseState=!1,Ct=!0),r.memoizedState=u):(nn(u,o)||(u=sl(),qe.lanes|=u,Wr|=u,r.baseState=!0),o)}function wS(r,o){var u=Re;Re=u!==0&&4>u?u:4,r(!0);var h=zc.transition;zc.transition={};try{r(!1),o()}finally{Re=u,zc.transition=h}}function Fm(){return Kt().memoizedState}function xS(r,o,u){var h=gr(r);if(u={lane:h,action:u,hasEagerState:!1,eagerState:null,next:null},Bm(r))Vm(o,u);else if(u=vm(r,o,u,h),u!==null){var y=wt();an(u,r,h,y),Hm(u,o,h)}}function bS(r,o,u){var h=gr(r),y={lane:h,action:u,hasEagerState:!1,eagerState:null,next:null};if(Bm(r))Vm(o,y);else{var x=r.alternate;if(r.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var I=o.lastRenderedState,z=x(I,u);if(y.hasEagerState=!0,y.eagerState=z,nn(z,I)){var U=o.interleaved;U===null?(y.next=y,Lc(o)):(y.next=U.next,U.next=y),o.interleaved=y;return}}catch{}finally{}u=vm(r,o,y,h),u!==null&&(y=wt(),an(u,r,h,y),Hm(u,o,h))}}function Bm(r){var o=r.alternate;return r===qe||o!==null&&o===qe}function Vm(r,o){Zo=Dl=!0;var u=r.pending;u===null?o.next=o:(o.next=u.next,u.next=o),r.pending=o}function Hm(r,o,u){if((u&4194240)!==0){var h=o.lanes;h&=r.pendingLanes,u|=h,o.lanes=u,gi(r,u)}}var zl={readContext:Yt,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},SS={readContext:Yt,useCallback:function(r,o){return En().memoizedState=[r,o===void 0?null:o],r},useContext:Yt,useEffect:Om,useImperativeHandle:function(r,o,u){return u=u!=null?u.concat([r]):null,jl(4194308,4,Rm.bind(null,o,r),u)},useLayoutEffect:function(r,o){return jl(4194308,4,r,o)},useInsertionEffect:function(r,o){return jl(4,2,r,o)},useMemo:function(r,o){var u=En();return o=o===void 0?null:o,r=r(),u.memoizedState=[r,o],r},useReducer:function(r,o,u){var h=En();return o=u!==void 0?u(o):o,h.memoizedState=h.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},h.queue=r,r=r.dispatch=xS.bind(null,qe,r),[h.memoizedState,r]},useRef:function(r){var o=En();return r={current:r},o.memoizedState=r},useState:Pm,useDebugValue:qc,useDeferredValue:function(r){return En().memoizedState=r},useTransition:function(){var r=Pm(!1),o=r[0];return r=wS.bind(null,r[1]),En().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,u){var h=qe,y=En();if(Be){if(u===void 0)throw Error(n(407));u=u()}else{if(u=o(),st===null)throw Error(n(349));(Hr&30)!==0||_m(h,o,u)}y.memoizedState=u;var x={value:u,getSnapshot:o};return y.queue=x,Om(Cm.bind(null,h,x,r),[r]),h.flags|=2048,ns(9,Nm.bind(null,h,x,u,o),void 0,null),u},useId:function(){var r=En(),o=st.identifierPrefix;if(Be){var u=Fn,h=zn;u=(h&~(1<<32-Rt(h)-1)).toString(32)+u,o=":"+o+"R"+u,u=es++,0<u&&(o+="H"+u.toString(32)),o+=":"}else u=vS++,o=":"+o+"r"+u.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},kS={readContext:Yt,useCallback:jm,useContext:Yt,useEffect:Uc,useImperativeHandle:Dm,useInsertionEffect:Lm,useLayoutEffect:Mm,useMemo:$m,useReducer:Hc,useRef:Am,useState:function(){return Hc(ts)},useDebugValue:qc,useDeferredValue:function(r){var o=Kt();return zm(o,nt.memoizedState,r)},useTransition:function(){var r=Hc(ts)[0],o=Kt().memoizedState;return[r,o]},useMutableSource:km,useSyncExternalStore:Em,useId:Fm,unstable_isNewReconciler:!1},ES={readContext:Yt,useCallback:jm,useContext:Yt,useEffect:Uc,useImperativeHandle:Dm,useInsertionEffect:Lm,useLayoutEffect:Mm,useMemo:$m,useReducer:Wc,useRef:Am,useState:function(){return Wc(ts)},useDebugValue:qc,useDeferredValue:function(r){var o=Kt();return nt===null?o.memoizedState=r:zm(o,nt.memoizedState,r)},useTransition:function(){var r=Wc(ts)[0],o=Kt().memoizedState;return[r,o]},useMutableSource:km,useSyncExternalStore:Em,useId:Fm,unstable_isNewReconciler:!1};function on(r,o){if(r&&r.defaultProps){o=B({},o),r=r.defaultProps;for(var u in r)o[u]===void 0&&(o[u]=r[u]);return o}return o}function Yc(r,o,u,h){o=r.memoizedState,u=u(h,o),u=u==null?o:B({},o,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Fl={isMounted:function(r){return(r=r._reactInternals)?bn(r)===r:!1},enqueueSetState:function(r,o,u){r=r._reactInternals;var h=wt(),y=gr(r),x=Vn(h,y);x.payload=o,u!=null&&(x.callback=u),o=dr(r,x,y),o!==null&&(an(o,r,y,h),Ol(o,r,y))},enqueueReplaceState:function(r,o,u){r=r._reactInternals;var h=wt(),y=gr(r),x=Vn(h,y);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=dr(r,x,y),o!==null&&(an(o,r,y,h),Ol(o,r,y))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var u=wt(),h=gr(r),y=Vn(u,h);y.tag=2,o!=null&&(y.callback=o),o=dr(r,y,h),o!==null&&(an(o,r,h,u),Ol(o,r,h))}};function Wm(r,o,u,h,y,x,I){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(h,x,I):o.prototype&&o.prototype.isPureReactComponent?!Vo(u,h)||!Vo(y,x):!0}function Um(r,o,u){var h=!1,y=ur,x=o.contextType;return typeof x=="object"&&x!==null?x=Yt(x):(y=Nt(o)?$r:ht.current,h=o.contextTypes,x=(h=h!=null)?Ni(r,y):ur),o=new o(u,x),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Fl,r.stateNode=o,o._reactInternals=r,h&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=y,r.__reactInternalMemoizedMaskedChildContext=x),o}function qm(r,o,u,h){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,h),o.state!==r&&Fl.enqueueReplaceState(o,o.state,null)}function Kc(r,o,u,h){var y=r.stateNode;y.props=u,y.state=r.memoizedState,y.refs={},Mc(r);var x=o.contextType;typeof x=="object"&&x!==null?y.context=Yt(x):(x=Nt(o)?$r:ht.current,y.context=Ni(r,x)),y.state=r.memoizedState,x=o.getDerivedStateFromProps,typeof x=="function"&&(Yc(r,o,x,u),y.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(o=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),o!==y.state&&Fl.enqueueReplaceState(y,y.state,null),Ll(r,u,y,h),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308)}function Mi(r,o){try{var u="",h=o;do u+=Q(h),h=h.return;while(h);var y=u}catch(x){y=`
|
|
39
|
+
Error generating stack: `+x.message+`
|
|
40
|
+
`+x.stack}return{value:r,source:o,stack:y,digest:null}}function Gc(r,o,u){return{value:r,source:null,stack:u??null,digest:o??null}}function Xc(r,o){try{console.error(o.value)}catch(u){setTimeout(function(){throw u})}}var _S=typeof WeakMap=="function"?WeakMap:Map;function Ym(r,o,u){u=Vn(-1,u),u.tag=3,u.payload={element:null};var h=o.value;return u.callback=function(){Yl||(Yl=!0,df=h),Xc(r,o)},u}function Km(r,o,u){u=Vn(-1,u),u.tag=3;var h=r.type.getDerivedStateFromError;if(typeof h=="function"){var y=o.value;u.payload=function(){return h(y)},u.callback=function(){Xc(r,o)}}var x=r.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(u.callback=function(){Xc(r,o),typeof h!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var I=o.stack;this.componentDidCatch(o.value,{componentStack:I!==null?I:""})}),u}function Gm(r,o,u){var h=r.pingCache;if(h===null){h=r.pingCache=new _S;var y=new Set;h.set(o,y)}else y=h.get(o),y===void 0&&(y=new Set,h.set(o,y));y.has(u)||(y.add(u),r=zS.bind(null,r,o,u),o.then(r,r))}function Xm(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function Qm(r,o,u,h,y){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(o=Vn(-1,1),o.tag=2,dr(u,o,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=y,r)}var NS=N.ReactCurrentOwner,Ct=!1;function vt(r,o,u,h){o.child=r===null?ym(o,null,u,h):Pi(o,r.child,u,h)}function Jm(r,o,u,h,y){u=u.render;var x=o.ref;return Oi(o,y),h=Bc(r,o,u,h,x,y),u=Vc(),r!==null&&!Ct?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~y,Hn(r,o,y)):(Be&&u&&Ec(o),o.flags|=1,vt(r,o,h,y),o.child)}function Zm(r,o,u,h,y){if(r===null){var x=u.type;return typeof x=="function"&&!wf(x)&&x.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(o.tag=15,o.type=x,eg(r,o,x,h,y)):(r=Zl(u.type,null,h,o,o.mode,y),r.ref=o.ref,r.return=o,o.child=r)}if(x=r.child,(r.lanes&y)===0){var I=x.memoizedProps;if(u=u.compare,u=u!==null?u:Vo,u(I,h)&&r.ref===o.ref)return Hn(r,o,y)}return o.flags|=1,r=vr(x,h),r.ref=o.ref,r.return=o,o.child=r}function eg(r,o,u,h,y){if(r!==null){var x=r.memoizedProps;if(Vo(x,h)&&r.ref===o.ref)if(Ct=!1,o.pendingProps=h=x,(r.lanes&y)!==0)(r.flags&131072)!==0&&(Ct=!0);else return o.lanes=r.lanes,Hn(r,o,y)}return Qc(r,o,u,h,y)}function tg(r,o,u){var h=o.pendingProps,y=h.children,x=r!==null?r.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Di,zt),zt|=u;else{if((u&1073741824)===0)return r=x!==null?x.baseLanes|u:u,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,De(Di,zt),zt|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=x!==null?x.baseLanes:u,De(Di,zt),zt|=h}else x!==null?(h=x.baseLanes|u,o.memoizedState=null):h=u,De(Di,zt),zt|=h;return vt(r,o,y,u),o.child}function ng(r,o){var u=o.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(o.flags|=512,o.flags|=2097152)}function Qc(r,o,u,h,y){var x=Nt(u)?$r:ht.current;return x=Ni(o,x),Oi(o,y),u=Bc(r,o,u,h,x,y),h=Vc(),r!==null&&!Ct?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~y,Hn(r,o,y)):(Be&&h&&Ec(o),o.flags|=1,vt(r,o,u,y),o.child)}function rg(r,o,u,h,y){if(Nt(u)){var x=!0;El(o)}else x=!1;if(Oi(o,y),o.stateNode===null)Vl(r,o),Um(o,u,h),Kc(o,u,h,y),h=!0;else if(r===null){var I=o.stateNode,z=o.memoizedProps;I.props=z;var U=I.context,ie=u.contextType;typeof ie=="object"&&ie!==null?ie=Yt(ie):(ie=Nt(u)?$r:ht.current,ie=Ni(o,ie));var ae=u.getDerivedStateFromProps,ue=typeof ae=="function"||typeof I.getSnapshotBeforeUpdate=="function";ue||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(z!==h||U!==ie)&&qm(o,I,h,ie),fr=!1;var le=o.memoizedState;I.state=le,Ll(o,h,I,y),U=o.memoizedState,z!==h||le!==U||_t.current||fr?(typeof ae=="function"&&(Yc(o,u,ae,h),U=o.memoizedState),(z=fr||Wm(o,u,z,h,le,U,ie))?(ue||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount()),typeof I.componentDidMount=="function"&&(o.flags|=4194308)):(typeof I.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=U),I.props=h,I.state=U,I.context=ie,h=z):(typeof I.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{I=o.stateNode,wm(r,o),z=o.memoizedProps,ie=o.type===o.elementType?z:on(o.type,z),I.props=ie,ue=o.pendingProps,le=I.context,U=u.contextType,typeof U=="object"&&U!==null?U=Yt(U):(U=Nt(u)?$r:ht.current,U=Ni(o,U));var pe=u.getDerivedStateFromProps;(ae=typeof pe=="function"||typeof I.getSnapshotBeforeUpdate=="function")||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(z!==ue||le!==U)&&qm(o,I,h,U),fr=!1,le=o.memoizedState,I.state=le,Ll(o,h,I,y);var ve=o.memoizedState;z!==ue||le!==ve||_t.current||fr?(typeof pe=="function"&&(Yc(o,u,pe,h),ve=o.memoizedState),(ie=fr||Wm(o,u,ie,h,le,ve,U)||!1)?(ae||typeof I.UNSAFE_componentWillUpdate!="function"&&typeof I.componentWillUpdate!="function"||(typeof I.componentWillUpdate=="function"&&I.componentWillUpdate(h,ve,U),typeof I.UNSAFE_componentWillUpdate=="function"&&I.UNSAFE_componentWillUpdate(h,ve,U)),typeof I.componentDidUpdate=="function"&&(o.flags|=4),typeof I.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof I.componentDidUpdate!="function"||z===r.memoizedProps&&le===r.memoizedState||(o.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||z===r.memoizedProps&&le===r.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ve),I.props=h,I.state=ve,I.context=U,h=ie):(typeof I.componentDidUpdate!="function"||z===r.memoizedProps&&le===r.memoizedState||(o.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||z===r.memoizedProps&&le===r.memoizedState||(o.flags|=1024),h=!1)}return Jc(r,o,u,h,x,y)}function Jc(r,o,u,h,y,x){ng(r,o);var I=(o.flags&128)!==0;if(!h&&!I)return y&&am(o,u,!1),Hn(r,o,x);h=o.stateNode,NS.current=o;var z=I&&typeof u.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,r!==null&&I?(o.child=Pi(o,r.child,null,x),o.child=Pi(o,null,z,x)):vt(r,o,z,x),o.memoizedState=h.state,y&&am(o,u,!0),o.child}function ig(r){var o=r.stateNode;o.pendingContext?sm(r,o.pendingContext,o.pendingContext!==o.context):o.context&&sm(r,o.context,!1),Rc(r,o.containerInfo)}function og(r,o,u,h,y){return Ti(),Ic(y),o.flags|=256,vt(r,o,u,h),o.child}var Zc={dehydrated:null,treeContext:null,retryLane:0};function ef(r){return{baseLanes:r,cachePool:null,transitions:null}}function sg(r,o,u){var h=o.pendingProps,y=Ue.current,x=!1,I=(o.flags&128)!==0,z;if((z=I)||(z=r!==null&&r.memoizedState===null?!1:(y&2)!==0),z?(x=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(y|=1),De(Ue,y&1),r===null)return Cc(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((o.mode&1)===0?o.lanes=1:r.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(I=h.children,r=h.fallback,x?(h=o.mode,x=o.child,I={mode:"hidden",children:I},(h&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=I):x=ea(I,h,0,null),r=Kr(r,h,u,null),x.return=o,r.return=o,x.sibling=r,o.child=x,o.child.memoizedState=ef(u),o.memoizedState=Zc,r):tf(o,I));if(y=r.memoizedState,y!==null&&(z=y.dehydrated,z!==null))return CS(r,o,I,h,z,y,u);if(x){x=h.fallback,I=o.mode,y=r.child,z=y.sibling;var U={mode:"hidden",children:h.children};return(I&1)===0&&o.child!==y?(h=o.child,h.childLanes=0,h.pendingProps=U,o.deletions=null):(h=vr(y,U),h.subtreeFlags=y.subtreeFlags&14680064),z!==null?x=vr(z,x):(x=Kr(x,I,u,null),x.flags|=2),x.return=o,h.return=o,h.sibling=x,o.child=h,h=x,x=o.child,I=r.child.memoizedState,I=I===null?ef(u):{baseLanes:I.baseLanes|u,cachePool:null,transitions:I.transitions},x.memoizedState=I,x.childLanes=r.childLanes&~u,o.memoizedState=Zc,h}return x=r.child,r=x.sibling,h=vr(x,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=u),h.return=o,h.sibling=null,r!==null&&(u=o.deletions,u===null?(o.deletions=[r],o.flags|=16):u.push(r)),o.child=h,o.memoizedState=null,h}function tf(r,o){return o=ea({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function Bl(r,o,u,h){return h!==null&&Ic(h),Pi(o,r.child,null,u),r=tf(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function CS(r,o,u,h,y,x,I){if(u)return o.flags&256?(o.flags&=-257,h=Gc(Error(n(422))),Bl(r,o,I,h)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(x=h.fallback,y=o.mode,h=ea({mode:"visible",children:h.children},y,0,null),x=Kr(x,y,I,null),x.flags|=2,h.return=o,x.return=o,h.sibling=x,o.child=h,(o.mode&1)!==0&&Pi(o,r.child,null,I),o.child.memoizedState=ef(I),o.memoizedState=Zc,x);if((o.mode&1)===0)return Bl(r,o,I,null);if(y.data==="$!"){if(h=y.nextSibling&&y.nextSibling.dataset,h)var z=h.dgst;return h=z,x=Error(n(419)),h=Gc(x,h,void 0),Bl(r,o,I,h)}if(z=(I&r.childLanes)!==0,Ct||z){if(h=st,h!==null){switch(I&-I){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(h.suspendedLanes|I))!==0?0:y,y!==0&&y!==x.retryLane&&(x.retryLane=y,Bn(r,y),an(h,r,y,-1))}return vf(),h=Gc(Error(n(421))),Bl(r,o,I,h)}return y.data==="$?"?(o.flags|=128,o.child=r.child,o=FS.bind(null,r),y._reactRetry=o,null):(r=x.treeContext,$t=lr(y.nextSibling),jt=o,Be=!0,rn=null,r!==null&&(Ut[qt++]=zn,Ut[qt++]=Fn,Ut[qt++]=zr,zn=r.id,Fn=r.overflow,zr=o),o=tf(o,h.children),o.flags|=4096,o)}function lg(r,o,u){r.lanes|=o;var h=r.alternate;h!==null&&(h.lanes|=o),Oc(r.return,o,u)}function nf(r,o,u,h,y){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:y}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=h,x.tail=u,x.tailMode=y)}function ag(r,o,u){var h=o.pendingProps,y=h.revealOrder,x=h.tail;if(vt(r,o,h.children,u),h=Ue.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&lg(r,u,o);else if(r.tag===19)lg(r,u,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}h&=1}if(De(Ue,h),(o.mode&1)===0)o.memoizedState=null;else switch(y){case"forwards":for(u=o.child,y=null;u!==null;)r=u.alternate,r!==null&&Ml(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=o.child,o.child=null):(y=u.sibling,u.sibling=null),nf(o,!1,y,u,x);break;case"backwards":for(u=null,y=o.child,o.child=null;y!==null;){if(r=y.alternate,r!==null&&Ml(r)===null){o.child=y;break}r=y.sibling,y.sibling=u,u=y,y=r}nf(o,!0,u,null,x);break;case"together":nf(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Vl(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function Hn(r,o,u){if(r!==null&&(o.dependencies=r.dependencies),Wr|=o.lanes,(u&o.childLanes)===0)return null;if(r!==null&&o.child!==r.child)throw Error(n(153));if(o.child!==null){for(r=o.child,u=vr(r,r.pendingProps),o.child=u,u.return=o;r.sibling!==null;)r=r.sibling,u=u.sibling=vr(r,r.pendingProps),u.return=o;u.sibling=null}return o.child}function IS(r,o,u){switch(o.tag){case 3:ig(o),Ti();break;case 5:Sm(o);break;case 1:Nt(o.type)&&El(o);break;case 4:Rc(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,y=o.memoizedProps.value;De(Pl,h._currentValue),h._currentValue=y;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(De(Ue,Ue.current&1),o.flags|=128,null):(u&o.child.childLanes)!==0?sg(r,o,u):(De(Ue,Ue.current&1),r=Hn(r,o,u),r!==null?r.sibling:null);De(Ue,Ue.current&1);break;case 19:if(h=(u&o.childLanes)!==0,(r.flags&128)!==0){if(h)return ag(r,o,u);o.flags|=128}if(y=o.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),De(Ue,Ue.current),h)break;return null;case 22:case 23:return o.lanes=0,tg(r,o,u)}return Hn(r,o,u)}var ug,rf,cg,fg;ug=function(r,o){for(var u=o.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},rf=function(){},cg=function(r,o,u,h){var y=r.memoizedProps;if(y!==h){r=o.stateNode,Vr(kn.current);var x=null;switch(u){case"input":y=ke(r,y),h=ke(r,h),x=[];break;case"select":y=B({},y,{value:void 0}),h=B({},h,{value:void 0}),x=[];break;case"textarea":y=Mn(r,y),h=Mn(r,h),x=[];break;default:typeof y.onClick!="function"&&typeof h.onClick=="function"&&(r.onclick=bl)}xo(u,h);var I;u=null;for(ie in y)if(!h.hasOwnProperty(ie)&&y.hasOwnProperty(ie)&&y[ie]!=null)if(ie==="style"){var z=y[ie];for(I in z)z.hasOwnProperty(I)&&(u||(u={}),u[I]="")}else ie!=="dangerouslySetInnerHTML"&&ie!=="children"&&ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&ie!=="autoFocus"&&(s.hasOwnProperty(ie)?x||(x=[]):(x=x||[]).push(ie,null));for(ie in h){var U=h[ie];if(z=y!=null?y[ie]:void 0,h.hasOwnProperty(ie)&&U!==z&&(U!=null||z!=null))if(ie==="style")if(z){for(I in z)!z.hasOwnProperty(I)||U&&U.hasOwnProperty(I)||(u||(u={}),u[I]="");for(I in U)U.hasOwnProperty(I)&&z[I]!==U[I]&&(u||(u={}),u[I]=U[I])}else u||(x||(x=[]),x.push(ie,u)),u=U;else ie==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,z=z?z.__html:void 0,U!=null&&z!==U&&(x=x||[]).push(ie,U)):ie==="children"?typeof U!="string"&&typeof U!="number"||(x=x||[]).push(ie,""+U):ie!=="suppressContentEditableWarning"&&ie!=="suppressHydrationWarning"&&(s.hasOwnProperty(ie)?(U!=null&&ie==="onScroll"&&ze("scroll",r),x||z===U||(x=[])):(x=x||[]).push(ie,U))}u&&(x=x||[]).push("style",u);var ie=x;(o.updateQueue=ie)&&(o.flags|=4)}},fg=function(r,o,u,h){u!==h&&(o.flags|=4)};function rs(r,o){if(!Be)switch(r.tailMode){case"hidden":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:h.sibling=null}}function mt(r){var o=r.alternate!==null&&r.alternate.child===r.child,u=0,h=0;if(o)for(var y=r.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags&14680064,h|=y.flags&14680064,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags,h|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=h,r.childLanes=u,o}function TS(r,o,u){var h=o.pendingProps;switch(_c(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(o),null;case 1:return Nt(o.type)&&kl(),mt(o),null;case 3:return h=o.stateNode,Li(),Fe(_t),Fe(ht),$c(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(r===null||r.child===null)&&(Il(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,rn!==null&&(mf(rn),rn=null))),rf(r,o),mt(o),null;case 5:Dc(o);var y=Vr(Jo.current);if(u=o.type,r!==null&&o.stateNode!=null)cg(r,o,u,h,y),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return mt(o),null}if(r=Vr(kn.current),Il(o)){h=o.stateNode,u=o.type;var x=o.memoizedProps;switch(h[Sn]=o,h[Yo]=x,r=(o.mode&1)!==0,u){case"dialog":ze("cancel",h),ze("close",h);break;case"iframe":case"object":case"embed":ze("load",h);break;case"video":case"audio":for(y=0;y<Wo.length;y++)ze(Wo[y],h);break;case"source":ze("error",h);break;case"img":case"image":case"link":ze("error",h),ze("load",h);break;case"details":ze("toggle",h);break;case"input":Pe(h,x),ze("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!x.multiple},ze("invalid",h);break;case"textarea":wn(h,x),ze("invalid",h)}xo(u,x),y=null;for(var I in x)if(x.hasOwnProperty(I)){var z=x[I];I==="children"?typeof z=="string"?h.textContent!==z&&(x.suppressHydrationWarning!==!0&&xl(h.textContent,z,r),y=["children",z]):typeof z=="number"&&h.textContent!==""+z&&(x.suppressHydrationWarning!==!0&&xl(h.textContent,z,r),y=["children",""+z]):s.hasOwnProperty(I)&&z!=null&&I==="onScroll"&&ze("scroll",h)}switch(u){case"input":xe(h),yt(h,x,!0);break;case"textarea":xe(h),Et(h);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(h.onclick=bl)}h=y,o.updateQueue=h,h!==null&&(o.flags|=4)}else{I=y.nodeType===9?y:y.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Ht(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=I.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof h.is=="string"?r=I.createElement(u,{is:h.is}):(r=I.createElement(u),u==="select"&&(I=r,h.multiple?I.multiple=!0:h.size&&(I.size=h.size))):r=I.createElementNS(r,u),r[Sn]=o,r[Yo]=h,ug(r,o,!1,!1),o.stateNode=r;e:{switch(I=bo(u,h),u){case"dialog":ze("cancel",r),ze("close",r),y=h;break;case"iframe":case"object":case"embed":ze("load",r),y=h;break;case"video":case"audio":for(y=0;y<Wo.length;y++)ze(Wo[y],r);y=h;break;case"source":ze("error",r),y=h;break;case"img":case"image":case"link":ze("error",r),ze("load",r),y=h;break;case"details":ze("toggle",r),y=h;break;case"input":Pe(r,h),y=ke(r,h),ze("invalid",r);break;case"option":y=h;break;case"select":r._wrapperState={wasMultiple:!!h.multiple},y=B({},h,{value:void 0}),ze("invalid",r);break;case"textarea":wn(r,h),y=Mn(r,h),ze("invalid",r);break;default:y=h}xo(u,y),z=y;for(x in z)if(z.hasOwnProperty(x)){var U=z[x];x==="style"?Us(r,U):x==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Hs(r,U)):x==="children"?typeof U=="string"?(u!=="textarea"||U!=="")&&Rn(r,U):typeof U=="number"&&Rn(r,""+U):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(s.hasOwnProperty(x)?U!=null&&x==="onScroll"&&ze("scroll",r):U!=null&&E(r,x,U,I))}switch(u){case"input":xe(r),yt(r,h,!1);break;case"textarea":xe(r),Et(r);break;case"option":h.value!=null&&r.setAttribute("value",""+ee(h.value));break;case"select":r.multiple=!!h.multiple,x=h.value,x!=null?dt(r,!!h.multiple,x,!1):h.defaultValue!=null&&dt(r,!!h.multiple,h.defaultValue,!0);break;default:typeof y.onClick=="function"&&(r.onclick=bl)}switch(u){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return mt(o),null;case 6:if(r&&o.stateNode!=null)fg(r,o,r.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(u=Vr(Jo.current),Vr(kn.current),Il(o)){if(h=o.stateNode,u=o.memoizedProps,h[Sn]=o,(x=h.nodeValue!==u)&&(r=jt,r!==null))switch(r.tag){case 3:xl(h.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&xl(h.nodeValue,u,(r.mode&1)!==0)}x&&(o.flags|=4)}else h=(u.nodeType===9?u:u.ownerDocument).createTextNode(h),h[Sn]=o,o.stateNode=h}return mt(o),null;case 13:if(Fe(Ue),h=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Be&&$t!==null&&(o.mode&1)!==0&&(o.flags&128)===0)pm(),Ti(),o.flags|=98560,x=!1;else if(x=Il(o),h!==null&&h.dehydrated!==null){if(r===null){if(!x)throw Error(n(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[Sn]=o}else Ti(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;mt(o),x=!1}else rn!==null&&(mf(rn),rn=null),x=!0;if(!x)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=u,o):(h=h!==null,h!==(r!==null&&r.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(r===null||(Ue.current&1)!==0?rt===0&&(rt=3):vf())),o.updateQueue!==null&&(o.flags|=4),mt(o),null);case 4:return Li(),rf(r,o),r===null&&Uo(o.stateNode.containerInfo),mt(o),null;case 10:return Ac(o.type._context),mt(o),null;case 17:return Nt(o.type)&&kl(),mt(o),null;case 19:if(Fe(Ue),x=o.memoizedState,x===null)return mt(o),null;if(h=(o.flags&128)!==0,I=x.rendering,I===null)if(h)rs(x,!1);else{if(rt!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(I=Ml(r),I!==null){for(o.flags|=128,rs(x,!1),h=I.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=u,u=o.child;u!==null;)x=u,r=h,x.flags&=14680066,I=x.alternate,I===null?(x.childLanes=0,x.lanes=r,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=I.childLanes,x.lanes=I.lanes,x.child=I.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=I.memoizedProps,x.memoizedState=I.memoizedState,x.updateQueue=I.updateQueue,x.type=I.type,r=I.dependencies,x.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return De(Ue,Ue.current&1|2),o.child}r=r.sibling}x.tail!==null&&We()>ji&&(o.flags|=128,h=!0,rs(x,!1),o.lanes=4194304)}else{if(!h)if(r=Ml(I),r!==null){if(o.flags|=128,h=!0,u=r.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),rs(x,!0),x.tail===null&&x.tailMode==="hidden"&&!I.alternate&&!Be)return mt(o),null}else 2*We()-x.renderingStartTime>ji&&u!==1073741824&&(o.flags|=128,h=!0,rs(x,!1),o.lanes=4194304);x.isBackwards?(I.sibling=o.child,o.child=I):(u=x.last,u!==null?u.sibling=I:o.child=I,x.last=I)}return x.tail!==null?(o=x.tail,x.rendering=o,x.tail=o.sibling,x.renderingStartTime=We(),o.sibling=null,u=Ue.current,De(Ue,h?u&1|2:u&1),o):(mt(o),null);case 22:case 23:return yf(),h=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(zt&1073741824)!==0&&(mt(o),o.subtreeFlags&6&&(o.flags|=8192)):mt(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function PS(r,o){switch(_c(o),o.tag){case 1:return Nt(o.type)&&kl(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return Li(),Fe(_t),Fe(ht),$c(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return Dc(o),null;case 13:if(Fe(Ue),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ti()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return Fe(Ue),null;case 4:return Li(),null;case 10:return Ac(o.type._context),null;case 22:case 23:return yf(),null;case 24:return null;default:return null}}var Hl=!1,gt=!1,AS=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Ri(r,o){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(h){Ye(r,o,h)}else u.current=null}function of(r,o,u){try{u()}catch(h){Ye(r,o,h)}}var dg=!1;function OS(r,o){if(gc=ul,r=Wp(),ac(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var y=h.anchorOffset,x=h.focusNode;h=h.focusOffset;try{u.nodeType,x.nodeType}catch{u=null;break e}var I=0,z=-1,U=-1,ie=0,ae=0,ue=r,le=null;t:for(;;){for(var pe;ue!==u||y!==0&&ue.nodeType!==3||(z=I+y),ue!==x||h!==0&&ue.nodeType!==3||(U=I+h),ue.nodeType===3&&(I+=ue.nodeValue.length),(pe=ue.firstChild)!==null;)le=ue,ue=pe;for(;;){if(ue===r)break t;if(le===u&&++ie===y&&(z=I),le===x&&++ae===h&&(U=I),(pe=ue.nextSibling)!==null)break;ue=le,le=ue.parentNode}ue=pe}u=z===-1||U===-1?null:{start:z,end:U}}else u=null}u=u||{start:0,end:0}}else u=null;for(yc={focusedElem:r,selectionRange:u},ul=!1,ge=o;ge!==null;)if(o=ge,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,ge=r;else for(;ge!==null;){o=ge;try{var ve=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ve!==null){var we=ve.memoizedProps,Ke=ve.memoizedState,te=o.stateNode,X=te.getSnapshotBeforeUpdate(o.elementType===o.type?we:on(o.type,we),Ke);te.__reactInternalSnapshotBeforeUpdate=X}break;case 3:var ne=o.stateNode.containerInfo;ne.nodeType===1?ne.textContent="":ne.nodeType===9&&ne.documentElement&&ne.removeChild(ne.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ce){Ye(o,o.return,ce)}if(r=o.sibling,r!==null){r.return=o.return,ge=r;break}ge=o.return}return ve=dg,dg=!1,ve}function is(r,o,u){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var y=h=h.next;do{if((y.tag&r)===r){var x=y.destroy;y.destroy=void 0,x!==void 0&&of(o,u,x)}y=y.next}while(y!==h)}}function Wl(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&r)===r){var h=u.create;u.destroy=h()}u=u.next}while(u!==o)}}function sf(r){var o=r.ref;if(o!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof o=="function"?o(r):o.current=r}}function hg(r){var o=r.alternate;o!==null&&(r.alternate=null,hg(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[Sn],delete o[Yo],delete o[bc],delete o[pS],delete o[mS])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function pg(r){return r.tag===5||r.tag===3||r.tag===4}function mg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||pg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function lf(r,o,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,o?u.nodeType===8?u.parentNode.insertBefore(r,o):u.insertBefore(r,o):(u.nodeType===8?(o=u.parentNode,o.insertBefore(r,u)):(o=u,o.appendChild(r)),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=bl));else if(h!==4&&(r=r.child,r!==null))for(lf(r,o,u),r=r.sibling;r!==null;)lf(r,o,u),r=r.sibling}function af(r,o,u){var h=r.tag;if(h===5||h===6)r=r.stateNode,o?u.insertBefore(r,o):u.appendChild(r);else if(h!==4&&(r=r.child,r!==null))for(af(r,o,u),r=r.sibling;r!==null;)af(r,o,u),r=r.sibling}var ut=null,sn=!1;function hr(r,o,u){for(u=u.child;u!==null;)gg(r,o,u),u=u.sibling}function gg(r,o,u){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(hi,u)}catch{}switch(u.tag){case 5:gt||Ri(u,o);case 6:var h=ut,y=sn;ut=null,hr(r,o,u),ut=h,sn=y,ut!==null&&(sn?(r=ut,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):ut.removeChild(u.stateNode));break;case 18:ut!==null&&(sn?(r=ut,u=u.stateNode,r.nodeType===8?xc(r.parentNode,u):r.nodeType===1&&xc(r,u),Do(r)):xc(ut,u.stateNode));break;case 4:h=ut,y=sn,ut=u.stateNode.containerInfo,sn=!0,hr(r,o,u),ut=h,sn=y;break;case 0:case 11:case 14:case 15:if(!gt&&(h=u.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){y=h=h.next;do{var x=y,I=x.destroy;x=x.tag,I!==void 0&&((x&2)!==0||(x&4)!==0)&&of(u,o,I),y=y.next}while(y!==h)}hr(r,o,u);break;case 1:if(!gt&&(Ri(u,o),h=u.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=u.memoizedProps,h.state=u.memoizedState,h.componentWillUnmount()}catch(z){Ye(u,o,z)}hr(r,o,u);break;case 21:hr(r,o,u);break;case 22:u.mode&1?(gt=(h=gt)||u.memoizedState!==null,hr(r,o,u),gt=h):hr(r,o,u);break;default:hr(r,o,u)}}function yg(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new AS),o.forEach(function(h){var y=BS.bind(null,r,h);u.has(h)||(u.add(h),h.then(y,y))})}}function ln(r,o){var u=o.deletions;if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];try{var x=r,I=o,z=I;e:for(;z!==null;){switch(z.tag){case 5:ut=z.stateNode,sn=!1;break e;case 3:ut=z.stateNode.containerInfo,sn=!0;break e;case 4:ut=z.stateNode.containerInfo,sn=!0;break e}z=z.return}if(ut===null)throw Error(n(160));gg(x,I,y),ut=null,sn=!1;var U=y.alternate;U!==null&&(U.return=null),y.return=null}catch(ie){Ye(y,o,ie)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)vg(o,r),o=o.sibling}function vg(r,o){var u=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(ln(o,r),_n(r),h&4){try{is(3,r,r.return),Wl(3,r)}catch(we){Ye(r,r.return,we)}try{is(5,r,r.return)}catch(we){Ye(r,r.return,we)}}break;case 1:ln(o,r),_n(r),h&512&&u!==null&&Ri(u,u.return);break;case 5:if(ln(o,r),_n(r),h&512&&u!==null&&Ri(u,u.return),r.flags&32){var y=r.stateNode;try{Rn(y,"")}catch(we){Ye(r,r.return,we)}}if(h&4&&(y=r.stateNode,y!=null)){var x=r.memoizedProps,I=u!==null?u.memoizedProps:x,z=r.type,U=r.updateQueue;if(r.updateQueue=null,U!==null)try{z==="input"&&x.type==="radio"&&x.name!=null&&Ae(y,x),bo(z,I);var ie=bo(z,x);for(I=0;I<U.length;I+=2){var ae=U[I],ue=U[I+1];ae==="style"?Us(y,ue):ae==="dangerouslySetInnerHTML"?Hs(y,ue):ae==="children"?Rn(y,ue):E(y,ae,ue,ie)}switch(z){case"input":$e(y,x);break;case"textarea":xn(y,x);break;case"select":var le=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!x.multiple;var pe=x.value;pe!=null?dt(y,!!x.multiple,pe,!1):le!==!!x.multiple&&(x.defaultValue!=null?dt(y,!!x.multiple,x.defaultValue,!0):dt(y,!!x.multiple,x.multiple?[]:"",!1))}y[Yo]=x}catch(we){Ye(r,r.return,we)}}break;case 6:if(ln(o,r),_n(r),h&4){if(r.stateNode===null)throw Error(n(162));y=r.stateNode,x=r.memoizedProps;try{y.nodeValue=x}catch(we){Ye(r,r.return,we)}}break;case 3:if(ln(o,r),_n(r),h&4&&u!==null&&u.memoizedState.isDehydrated)try{Do(o.containerInfo)}catch(we){Ye(r,r.return,we)}break;case 4:ln(o,r),_n(r);break;case 13:ln(o,r),_n(r),y=r.child,y.flags&8192&&(x=y.memoizedState!==null,y.stateNode.isHidden=x,!x||y.alternate!==null&&y.alternate.memoizedState!==null||(ff=We())),h&4&&yg(r);break;case 22:if(ae=u!==null&&u.memoizedState!==null,r.mode&1?(gt=(ie=gt)||ae,ln(o,r),gt=ie):ln(o,r),_n(r),h&8192){if(ie=r.memoizedState!==null,(r.stateNode.isHidden=ie)&&!ae&&(r.mode&1)!==0)for(ge=r,ae=r.child;ae!==null;){for(ue=ge=ae;ge!==null;){switch(le=ge,pe=le.child,le.tag){case 0:case 11:case 14:case 15:is(4,le,le.return);break;case 1:Ri(le,le.return);var ve=le.stateNode;if(typeof ve.componentWillUnmount=="function"){h=le,u=le.return;try{o=h,ve.props=o.memoizedProps,ve.state=o.memoizedState,ve.componentWillUnmount()}catch(we){Ye(h,u,we)}}break;case 5:Ri(le,le.return);break;case 22:if(le.memoizedState!==null){bg(ue);continue}}pe!==null?(pe.return=le,ge=pe):bg(ue)}ae=ae.sibling}e:for(ae=null,ue=r;;){if(ue.tag===5){if(ae===null){ae=ue;try{y=ue.stateNode,ie?(x=y.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(z=ue.stateNode,U=ue.memoizedProps.style,I=U!=null&&U.hasOwnProperty("display")?U.display:null,z.style.display=Ws("display",I))}catch(we){Ye(r,r.return,we)}}}else if(ue.tag===6){if(ae===null)try{ue.stateNode.nodeValue=ie?"":ue.memoizedProps}catch(we){Ye(r,r.return,we)}}else if((ue.tag!==22&&ue.tag!==23||ue.memoizedState===null||ue===r)&&ue.child!==null){ue.child.return=ue,ue=ue.child;continue}if(ue===r)break e;for(;ue.sibling===null;){if(ue.return===null||ue.return===r)break e;ae===ue&&(ae=null),ue=ue.return}ae===ue&&(ae=null),ue.sibling.return=ue.return,ue=ue.sibling}}break;case 19:ln(o,r),_n(r),h&4&&yg(r);break;case 21:break;default:ln(o,r),_n(r)}}function _n(r){var o=r.flags;if(o&2){try{e:{for(var u=r.return;u!==null;){if(pg(u)){var h=u;break e}u=u.return}throw Error(n(160))}switch(h.tag){case 5:var y=h.stateNode;h.flags&32&&(Rn(y,""),h.flags&=-33);var x=mg(r);af(r,x,y);break;case 3:case 4:var I=h.stateNode.containerInfo,z=mg(r);lf(r,z,I);break;default:throw Error(n(161))}}catch(U){Ye(r,r.return,U)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function LS(r,o,u){ge=r,wg(r)}function wg(r,o,u){for(var h=(r.mode&1)!==0;ge!==null;){var y=ge,x=y.child;if(y.tag===22&&h){var I=y.memoizedState!==null||Hl;if(!I){var z=y.alternate,U=z!==null&&z.memoizedState!==null||gt;z=Hl;var ie=gt;if(Hl=I,(gt=U)&&!ie)for(ge=y;ge!==null;)I=ge,U=I.child,I.tag===22&&I.memoizedState!==null?Sg(y):U!==null?(U.return=I,ge=U):Sg(y);for(;x!==null;)ge=x,wg(x),x=x.sibling;ge=y,Hl=z,gt=ie}xg(r)}else(y.subtreeFlags&8772)!==0&&x!==null?(x.return=y,ge=x):xg(r)}}function xg(r){for(;ge!==null;){var o=ge;if((o.flags&8772)!==0){var u=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:gt||Wl(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!gt)if(u===null)h.componentDidMount();else{var y=o.elementType===o.type?u.memoizedProps:on(o.type,u.memoizedProps);h.componentDidUpdate(y,u.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&bm(o,x,h);break;case 3:var I=o.updateQueue;if(I!==null){if(u=null,o.child!==null)switch(o.child.tag){case 5:u=o.child.stateNode;break;case 1:u=o.child.stateNode}bm(o,I,u)}break;case 5:var z=o.stateNode;if(u===null&&o.flags&4){u=z;var U=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&u.focus();break;case"img":U.src&&(u.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var ie=o.alternate;if(ie!==null){var ae=ie.memoizedState;if(ae!==null){var ue=ae.dehydrated;ue!==null&&Do(ue)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}gt||o.flags&512&&sf(o)}catch(le){Ye(o,o.return,le)}}if(o===r){ge=null;break}if(u=o.sibling,u!==null){u.return=o.return,ge=u;break}ge=o.return}}function bg(r){for(;ge!==null;){var o=ge;if(o===r){ge=null;break}var u=o.sibling;if(u!==null){u.return=o.return,ge=u;break}ge=o.return}}function Sg(r){for(;ge!==null;){var o=ge;try{switch(o.tag){case 0:case 11:case 15:var u=o.return;try{Wl(4,o)}catch(U){Ye(o,u,U)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var y=o.return;try{h.componentDidMount()}catch(U){Ye(o,y,U)}}var x=o.return;try{sf(o)}catch(U){Ye(o,x,U)}break;case 5:var I=o.return;try{sf(o)}catch(U){Ye(o,I,U)}}}catch(U){Ye(o,o.return,U)}if(o===r){ge=null;break}var z=o.sibling;if(z!==null){z.return=o.return,ge=z;break}ge=o.return}}var MS=Math.ceil,Ul=N.ReactCurrentDispatcher,uf=N.ReactCurrentOwner,Gt=N.ReactCurrentBatchConfig,Le=0,st=null,Je=null,ct=0,zt=0,Di=ar(0),rt=0,os=null,Wr=0,ql=0,cf=0,ss=null,It=null,ff=0,ji=1/0,Wn=null,Yl=!1,df=null,pr=null,Kl=!1,mr=null,Gl=0,ls=0,hf=null,Xl=-1,Ql=0;function wt(){return(Le&6)!==0?We():Xl!==-1?Xl:Xl=We()}function gr(r){return(r.mode&1)===0?1:(Le&2)!==0&&ct!==0?ct&-ct:yS.transition!==null?(Ql===0&&(Ql=sl()),Ql):(r=Re,r!==0||(r=window.event,r=r===void 0?16:Ep(r.type)),r)}function an(r,o,u,h){if(50<ls)throw ls=0,hf=null,Error(n(185));Dr(r,u,h),((Le&2)===0||r!==st)&&(r===st&&((Le&2)===0&&(ql|=u),rt===4&&yr(r,ct)),Tt(r,h),u===1&&Le===0&&(o.mode&1)===0&&(ji=We()+500,_l&&cr()))}function Tt(r,o){var u=r.callbackNode;ol(r,o);var h=Dn(r,r===st?ct:0);if(h===0)u!==null&&tl(u),r.callbackNode=null,r.callbackPriority=0;else if(o=h&-h,r.callbackPriority!==o){if(u!=null&&tl(u),o===1)r.tag===0?gS(Eg.bind(null,r)):um(Eg.bind(null,r)),dS(function(){(Le&6)===0&&cr()}),u=null;else{switch(gp(h)){case 1:u=Po;break;case 4:u=rl;break;case 16:u=di;break;case 536870912:u=il;break;default:u=di}u=Og(u,kg.bind(null,r))}r.callbackPriority=o,r.callbackNode=u}}function kg(r,o){if(Xl=-1,Ql=0,(Le&6)!==0)throw Error(n(327));var u=r.callbackNode;if($i()&&r.callbackNode!==u)return null;var h=Dn(r,r===st?ct:0);if(h===0)return null;if((h&30)!==0||(h&r.expiredLanes)!==0||o)o=Jl(r,h);else{o=h;var y=Le;Le|=2;var x=Ng();(st!==r||ct!==o)&&(Wn=null,ji=We()+500,qr(r,o));do try{jS();break}catch(z){_g(r,z)}while(!0);Pc(),Ul.current=x,Le=y,Je!==null?o=0:(st=null,ct=0,o=rt)}if(o!==0){if(o===2&&(y=Ao(r),y!==0&&(h=y,o=pf(r,y))),o===1)throw u=os,qr(r,0),yr(r,h),Tt(r,We()),u;if(o===6)yr(r,h);else{if(y=r.current.alternate,(h&30)===0&&!RS(y)&&(o=Jl(r,h),o===2&&(x=Ao(r),x!==0&&(h=x,o=pf(r,x))),o===1))throw u=os,qr(r,0),yr(r,h),Tt(r,We()),u;switch(r.finishedWork=y,r.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Yr(r,It,Wn);break;case 3:if(yr(r,h),(h&130023424)===h&&(o=ff+500-We(),10<o)){if(Dn(r,0)!==0)break;if(y=r.suspendedLanes,(y&h)!==h){wt(),r.pingedLanes|=r.suspendedLanes&y;break}r.timeoutHandle=wc(Yr.bind(null,r,It,Wn),o);break}Yr(r,It,Wn);break;case 4:if(yr(r,h),(h&4194240)===h)break;for(o=r.eventTimes,y=-1;0<h;){var I=31-Rt(h);x=1<<I,I=o[I],I>y&&(y=I),h&=~x}if(h=y,h=We()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*MS(h/1960))-h,10<h){r.timeoutHandle=wc(Yr.bind(null,r,It,Wn),h);break}Yr(r,It,Wn);break;case 5:Yr(r,It,Wn);break;default:throw Error(n(329))}}}return Tt(r,We()),r.callbackNode===u?kg.bind(null,r):null}function pf(r,o){var u=ss;return r.current.memoizedState.isDehydrated&&(qr(r,o).flags|=256),r=Jl(r,o),r!==2&&(o=It,It=u,o!==null&&mf(o)),r}function mf(r){It===null?It=r:It.push.apply(It,r)}function RS(r){for(var o=r;;){if(o.flags&16384){var u=o.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var h=0;h<u.length;h++){var y=u[h],x=y.getSnapshot;y=y.value;try{if(!nn(x(),y))return!1}catch{return!1}}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function yr(r,o){for(o&=~cf,o&=~ql,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var u=31-Rt(o),h=1<<u;r[u]=-1,o&=~h}}function Eg(r){if((Le&6)!==0)throw Error(n(327));$i();var o=Dn(r,0);if((o&1)===0)return Tt(r,We()),null;var u=Jl(r,o);if(r.tag!==0&&u===2){var h=Ao(r);h!==0&&(o=h,u=pf(r,h))}if(u===1)throw u=os,qr(r,0),yr(r,o),Tt(r,We()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Yr(r,It,Wn),Tt(r,We()),null}function gf(r,o){var u=Le;Le|=1;try{return r(o)}finally{Le=u,Le===0&&(ji=We()+500,_l&&cr())}}function Ur(r){mr!==null&&mr.tag===0&&(Le&6)===0&&$i();var o=Le;Le|=1;var u=Gt.transition,h=Re;try{if(Gt.transition=null,Re=1,r)return r()}finally{Re=h,Gt.transition=u,Le=o,(Le&6)===0&&cr()}}function yf(){zt=Di.current,Fe(Di)}function qr(r,o){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,fS(u)),Je!==null)for(u=Je.return;u!==null;){var h=u;switch(_c(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&kl();break;case 3:Li(),Fe(_t),Fe(ht),$c();break;case 5:Dc(h);break;case 4:Li();break;case 13:Fe(Ue);break;case 19:Fe(Ue);break;case 10:Ac(h.type._context);break;case 22:case 23:yf()}u=u.return}if(st=r,Je=r=vr(r.current,null),ct=zt=o,rt=0,os=null,cf=ql=Wr=0,It=ss=null,Br!==null){for(o=0;o<Br.length;o++)if(u=Br[o],h=u.interleaved,h!==null){u.interleaved=null;var y=h.next,x=u.pending;if(x!==null){var I=x.next;x.next=y,h.next=I}u.pending=h}Br=null}return r}function _g(r,o){do{var u=Je;try{if(Pc(),Rl.current=zl,Dl){for(var h=qe.memoizedState;h!==null;){var y=h.queue;y!==null&&(y.pending=null),h=h.next}Dl=!1}if(Hr=0,ot=nt=qe=null,Zo=!1,es=0,uf.current=null,u===null||u.return===null){rt=1,os=o,Je=null;break}e:{var x=r,I=u.return,z=u,U=o;if(o=ct,z.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var ie=U,ae=z,ue=ae.tag;if((ae.mode&1)===0&&(ue===0||ue===11||ue===15)){var le=ae.alternate;le?(ae.updateQueue=le.updateQueue,ae.memoizedState=le.memoizedState,ae.lanes=le.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var pe=Xm(I);if(pe!==null){pe.flags&=-257,Qm(pe,I,z,x,o),pe.mode&1&&Gm(x,ie,o),o=pe,U=ie;var ve=o.updateQueue;if(ve===null){var we=new Set;we.add(U),o.updateQueue=we}else ve.add(U);break e}else{if((o&1)===0){Gm(x,ie,o),vf();break e}U=Error(n(426))}}else if(Be&&z.mode&1){var Ke=Xm(I);if(Ke!==null){(Ke.flags&65536)===0&&(Ke.flags|=256),Qm(Ke,I,z,x,o),Ic(Mi(U,z));break e}}x=U=Mi(U,z),rt!==4&&(rt=2),ss===null?ss=[x]:ss.push(x),x=I;do{switch(x.tag){case 3:x.flags|=65536,o&=-o,x.lanes|=o;var te=Ym(x,U,o);xm(x,te);break e;case 1:z=U;var X=x.type,ne=x.stateNode;if((x.flags&128)===0&&(typeof X.getDerivedStateFromError=="function"||ne!==null&&typeof ne.componentDidCatch=="function"&&(pr===null||!pr.has(ne)))){x.flags|=65536,o&=-o,x.lanes|=o;var ce=Km(x,z,o);xm(x,ce);break e}}x=x.return}while(x!==null)}Ig(u)}catch(be){o=be,Je===u&&u!==null&&(Je=u=u.return);continue}break}while(!0)}function Ng(){var r=Ul.current;return Ul.current=zl,r===null?zl:r}function vf(){(rt===0||rt===3||rt===2)&&(rt=4),st===null||(Wr&268435455)===0&&(ql&268435455)===0||yr(st,ct)}function Jl(r,o){var u=Le;Le|=2;var h=Ng();(st!==r||ct!==o)&&(Wn=null,qr(r,o));do try{DS();break}catch(y){_g(r,y)}while(!0);if(Pc(),Le=u,Ul.current=h,Je!==null)throw Error(n(261));return st=null,ct=0,rt}function DS(){for(;Je!==null;)Cg(Je)}function jS(){for(;Je!==null&&!Fu();)Cg(Je)}function Cg(r){var o=Ag(r.alternate,r,zt);r.memoizedProps=r.pendingProps,o===null?Ig(r):Je=o,uf.current=null}function Ig(r){var o=r;do{var u=o.alternate;if(r=o.return,(o.flags&32768)===0){if(u=TS(u,o,zt),u!==null){Je=u;return}}else{if(u=PS(u,o),u!==null){u.flags&=32767,Je=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{rt=6,Je=null;return}}if(o=o.sibling,o!==null){Je=o;return}Je=o=r}while(o!==null);rt===0&&(rt=5)}function Yr(r,o,u){var h=Re,y=Gt.transition;try{Gt.transition=null,Re=1,$S(r,o,u,h)}finally{Gt.transition=y,Re=h}return null}function $S(r,o,u,h){do $i();while(mr!==null);if((Le&6)!==0)throw Error(n(327));u=r.finishedWork;var y=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var x=u.lanes|u.childLanes;if(Ku(r,x),r===st&&(Je=st=null,ct=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Kl||(Kl=!0,Og(di,function(){return $i(),null})),x=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||x){x=Gt.transition,Gt.transition=null;var I=Re;Re=1;var z=Le;Le|=4,uf.current=null,OS(r,u),vg(u,r),iS(yc),ul=!!gc,yc=gc=null,r.current=u,LS(u),nl(),Le=z,Re=I,Gt.transition=x}else r.current=u;if(Kl&&(Kl=!1,mr=r,Gl=y),x=r.pendingLanes,x===0&&(pr=null),Hu(u.stateNode),Tt(r,We()),o!==null)for(h=r.onRecoverableError,u=0;u<o.length;u++)y=o[u],h(y.value,{componentStack:y.stack,digest:y.digest});if(Yl)throw Yl=!1,r=df,df=null,r;return(Gl&1)!==0&&r.tag!==0&&$i(),x=r.pendingLanes,(x&1)!==0?r===hf?ls++:(ls=0,hf=r):ls=0,cr(),null}function $i(){if(mr!==null){var r=gp(Gl),o=Gt.transition,u=Re;try{if(Gt.transition=null,Re=16>r?16:r,mr===null)var h=!1;else{if(r=mr,mr=null,Gl=0,(Le&6)!==0)throw Error(n(331));var y=Le;for(Le|=4,ge=r.current;ge!==null;){var x=ge,I=x.child;if((ge.flags&16)!==0){var z=x.deletions;if(z!==null){for(var U=0;U<z.length;U++){var ie=z[U];for(ge=ie;ge!==null;){var ae=ge;switch(ae.tag){case 0:case 11:case 15:is(8,ae,x)}var ue=ae.child;if(ue!==null)ue.return=ae,ge=ue;else for(;ge!==null;){ae=ge;var le=ae.sibling,pe=ae.return;if(hg(ae),ae===ie){ge=null;break}if(le!==null){le.return=pe,ge=le;break}ge=pe}}}var ve=x.alternate;if(ve!==null){var we=ve.child;if(we!==null){ve.child=null;do{var Ke=we.sibling;we.sibling=null,we=Ke}while(we!==null)}}ge=x}}if((x.subtreeFlags&2064)!==0&&I!==null)I.return=x,ge=I;else e:for(;ge!==null;){if(x=ge,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:is(9,x,x.return)}var te=x.sibling;if(te!==null){te.return=x.return,ge=te;break e}ge=x.return}}var X=r.current;for(ge=X;ge!==null;){I=ge;var ne=I.child;if((I.subtreeFlags&2064)!==0&&ne!==null)ne.return=I,ge=ne;else e:for(I=X;ge!==null;){if(z=ge,(z.flags&2048)!==0)try{switch(z.tag){case 0:case 11:case 15:Wl(9,z)}}catch(be){Ye(z,z.return,be)}if(z===I){ge=null;break e}var ce=z.sibling;if(ce!==null){ce.return=z.return,ge=ce;break e}ge=z.return}}if(Le=y,cr(),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(hi,r)}catch{}h=!0}return h}finally{Re=u,Gt.transition=o}}return!1}function Tg(r,o,u){o=Mi(u,o),o=Ym(r,o,1),r=dr(r,o,1),o=wt(),r!==null&&(Dr(r,1,o),Tt(r,o))}function Ye(r,o,u){if(r.tag===3)Tg(r,r,u);else for(;o!==null;){if(o.tag===3){Tg(o,r,u);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(pr===null||!pr.has(h))){r=Mi(u,r),r=Km(o,r,1),o=dr(o,r,1),r=wt(),o!==null&&(Dr(o,1,r),Tt(o,r));break}}o=o.return}}function zS(r,o,u){var h=r.pingCache;h!==null&&h.delete(o),o=wt(),r.pingedLanes|=r.suspendedLanes&u,st===r&&(ct&u)===u&&(rt===4||rt===3&&(ct&130023424)===ct&&500>We()-ff?qr(r,0):cf|=u),Tt(r,o)}function Pg(r,o){o===0&&((r.mode&1)===0?o=1:(o=mi,mi<<=1,(mi&130023424)===0&&(mi=4194304)));var u=wt();r=Bn(r,o),r!==null&&(Dr(r,o,u),Tt(r,u))}function FS(r){var o=r.memoizedState,u=0;o!==null&&(u=o.retryLane),Pg(r,u)}function BS(r,o){var u=0;switch(r.tag){case 13:var h=r.stateNode,y=r.memoizedState;y!==null&&(u=y.retryLane);break;case 19:h=r.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),Pg(r,u)}var Ag;Ag=function(r,o,u){if(r!==null)if(r.memoizedProps!==o.pendingProps||_t.current)Ct=!0;else{if((r.lanes&u)===0&&(o.flags&128)===0)return Ct=!1,IS(r,o,u);Ct=(r.flags&131072)!==0}else Ct=!1,Be&&(o.flags&1048576)!==0&&cm(o,Cl,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;Vl(r,o),r=o.pendingProps;var y=Ni(o,ht.current);Oi(o,u),y=Bc(null,o,h,r,y,u);var x=Vc();return o.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Nt(h)?(x=!0,El(o)):x=!1,o.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Mc(o),y.updater=Fl,o.stateNode=y,y._reactInternals=o,Kc(o,h,r,u),o=Jc(null,o,h,!0,x,u)):(o.tag=0,Be&&x&&Ec(o),vt(null,o,y,u),o=o.child),o;case 16:h=o.elementType;e:{switch(Vl(r,o),r=o.pendingProps,y=h._init,h=y(h._payload),o.type=h,y=o.tag=HS(h),r=on(h,r),y){case 0:o=Qc(null,o,h,r,u);break e;case 1:o=rg(null,o,h,r,u);break e;case 11:o=Jm(null,o,h,r,u);break e;case 14:o=Zm(null,o,h,on(h.type,r),u);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,y=o.pendingProps,y=o.elementType===h?y:on(h,y),Qc(r,o,h,y,u);case 1:return h=o.type,y=o.pendingProps,y=o.elementType===h?y:on(h,y),rg(r,o,h,y,u);case 3:e:{if(ig(o),r===null)throw Error(n(387));h=o.pendingProps,x=o.memoizedState,y=x.element,wm(r,o),Ll(o,h,null,u);var I=o.memoizedState;if(h=I.element,x.isDehydrated)if(x={element:h,isDehydrated:!1,cache:I.cache,pendingSuspenseBoundaries:I.pendingSuspenseBoundaries,transitions:I.transitions},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){y=Mi(Error(n(423)),o),o=og(r,o,h,u,y);break e}else if(h!==y){y=Mi(Error(n(424)),o),o=og(r,o,h,u,y);break e}else for($t=lr(o.stateNode.containerInfo.firstChild),jt=o,Be=!0,rn=null,u=ym(o,null,h,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ti(),h===y){o=Hn(r,o,u);break e}vt(r,o,h,u)}o=o.child}return o;case 5:return Sm(o),r===null&&Cc(o),h=o.type,y=o.pendingProps,x=r!==null?r.memoizedProps:null,I=y.children,vc(h,y)?I=null:x!==null&&vc(h,x)&&(o.flags|=32),ng(r,o),vt(r,o,I,u),o.child;case 6:return r===null&&Cc(o),null;case 13:return sg(r,o,u);case 4:return Rc(o,o.stateNode.containerInfo),h=o.pendingProps,r===null?o.child=Pi(o,null,h,u):vt(r,o,h,u),o.child;case 11:return h=o.type,y=o.pendingProps,y=o.elementType===h?y:on(h,y),Jm(r,o,h,y,u);case 7:return vt(r,o,o.pendingProps,u),o.child;case 8:return vt(r,o,o.pendingProps.children,u),o.child;case 12:return vt(r,o,o.pendingProps.children,u),o.child;case 10:e:{if(h=o.type._context,y=o.pendingProps,x=o.memoizedProps,I=y.value,De(Pl,h._currentValue),h._currentValue=I,x!==null)if(nn(x.value,I)){if(x.children===y.children&&!_t.current){o=Hn(r,o,u);break e}}else for(x=o.child,x!==null&&(x.return=o);x!==null;){var z=x.dependencies;if(z!==null){I=x.child;for(var U=z.firstContext;U!==null;){if(U.context===h){if(x.tag===1){U=Vn(-1,u&-u),U.tag=2;var ie=x.updateQueue;if(ie!==null){ie=ie.shared;var ae=ie.pending;ae===null?U.next=U:(U.next=ae.next,ae.next=U),ie.pending=U}}x.lanes|=u,U=x.alternate,U!==null&&(U.lanes|=u),Oc(x.return,u,o),z.lanes|=u;break}U=U.next}}else if(x.tag===10)I=x.type===o.type?null:x.child;else if(x.tag===18){if(I=x.return,I===null)throw Error(n(341));I.lanes|=u,z=I.alternate,z!==null&&(z.lanes|=u),Oc(I,u,o),I=x.sibling}else I=x.child;if(I!==null)I.return=x;else for(I=x;I!==null;){if(I===o){I=null;break}if(x=I.sibling,x!==null){x.return=I.return,I=x;break}I=I.return}x=I}vt(r,o,y.children,u),o=o.child}return o;case 9:return y=o.type,h=o.pendingProps.children,Oi(o,u),y=Yt(y),h=h(y),o.flags|=1,vt(r,o,h,u),o.child;case 14:return h=o.type,y=on(h,o.pendingProps),y=on(h.type,y),Zm(r,o,h,y,u);case 15:return eg(r,o,o.type,o.pendingProps,u);case 17:return h=o.type,y=o.pendingProps,y=o.elementType===h?y:on(h,y),Vl(r,o),o.tag=1,Nt(h)?(r=!0,El(o)):r=!1,Oi(o,u),Um(o,h,y),Kc(o,h,y,u),Jc(null,o,h,!0,r,u);case 19:return ag(r,o,u);case 22:return tg(r,o,u)}throw Error(n(156,o.tag))};function Og(r,o){return el(r,o)}function VS(r,o,u,h){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(r,o,u,h){return new VS(r,o,u,h)}function wf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function HS(r){if(typeof r=="function")return wf(r)?1:0;if(r!=null){if(r=r.$$typeof,r===$)return 11;if(r===G)return 14}return 2}function vr(r,o){var u=r.alternate;return u===null?(u=Xt(r.tag,o,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=o,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,o=r.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function Zl(r,o,u,h,y,x){var I=2;if(h=r,typeof r=="function")wf(r)&&(I=1);else if(typeof r=="string")I=5;else e:switch(r){case R:return Kr(u.children,y,x,o);case C:I=8,y|=8;break;case P:return r=Xt(12,u,o,y|2),r.elementType=P,r.lanes=x,r;case Z:return r=Xt(13,u,o,y),r.elementType=Z,r.lanes=x,r;case j:return r=Xt(19,u,o,y),r.elementType=j,r.lanes=x,r;case J:return ea(u,y,x,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case F:I=10;break e;case M:I=9;break e;case $:I=11;break e;case G:I=14;break e;case q:I=16,h=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return o=Xt(I,u,o,y),o.elementType=r,o.type=h,o.lanes=x,o}function Kr(r,o,u,h){return r=Xt(7,r,h,o),r.lanes=u,r}function ea(r,o,u,h){return r=Xt(22,r,h,o),r.elementType=J,r.lanes=u,r.stateNode={isHidden:!1},r}function xf(r,o,u){return r=Xt(6,r,null,o),r.lanes=u,r}function bf(r,o,u){return o=Xt(4,r.children!==null?r.children:[],r.key,o),o.lanes=u,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function WS(r,o,u,h,y){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rr(0),this.expirationTimes=Rr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rr(0),this.identifierPrefix=h,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Sf(r,o,u,h,y,x,I,z,U){return r=new WS(r,o,u,z,U),o===1?(o=1,x===!0&&(o|=8)):o=0,x=Xt(3,null,null,o),r.current=x,x.stateNode=r,x.memoizedState={element:h,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mc(x),r}function US(r,o,u){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:r,containerInfo:o,implementation:u}}function Lg(r){if(!r)return ur;r=r._reactInternals;e:{if(bn(r)!==r||r.tag!==1)throw Error(n(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Nt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(Nt(u))return lm(r,u,o)}return o}function Mg(r,o,u,h,y,x,I,z,U){return r=Sf(u,h,!0,r,y,x,I,z,U),r.context=Lg(null),u=r.current,h=wt(),y=gr(u),x=Vn(h,y),x.callback=o??null,dr(u,x,y),r.current.lanes=y,Dr(r,y,h),Tt(r,h),r}function ta(r,o,u,h){var y=o.current,x=wt(),I=gr(y);return u=Lg(u),o.context===null?o.context=u:o.pendingContext=u,o=Vn(x,I),o.payload={element:r},h=h===void 0?null:h,h!==null&&(o.callback=h),r=dr(y,o,I),r!==null&&(an(r,y,I,x),Ol(r,y,I)),I}function na(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Rg(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<o?u:o}}function kf(r,o){Rg(r,o),(r=r.alternate)&&Rg(r,o)}function qS(){return null}var Dg=typeof reportError=="function"?reportError:function(r){console.error(r)};function Ef(r){this._internalRoot=r}ra.prototype.render=Ef.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));ta(r,o,null,null)},ra.prototype.unmount=Ef.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Ur(function(){ta(null,r,null,null)}),o[jn]=null}};function ra(r){this._internalRoot=r}ra.prototype.unstable_scheduleHydration=function(r){if(r){var o=wp();r={blockedOn:null,target:r,priority:o};for(var u=0;u<ir.length&&o!==0&&o<ir[u].priority;u++);ir.splice(u,0,r),u===0&&Sp(r)}};function _f(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function ia(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function jg(){}function YS(r,o,u,h,y){if(y){if(typeof h=="function"){var x=h;h=function(){var ie=na(I);x.call(ie)}}var I=Mg(o,h,r,0,null,!1,!1,"",jg);return r._reactRootContainer=I,r[jn]=I.current,Uo(r.nodeType===8?r.parentNode:r),Ur(),I}for(;y=r.lastChild;)r.removeChild(y);if(typeof h=="function"){var z=h;h=function(){var ie=na(U);z.call(ie)}}var U=Sf(r,0,!1,null,null,!1,!1,"",jg);return r._reactRootContainer=U,r[jn]=U.current,Uo(r.nodeType===8?r.parentNode:r),Ur(function(){ta(o,U,u,h)}),U}function oa(r,o,u,h,y){var x=u._reactRootContainer;if(x){var I=x;if(typeof y=="function"){var z=y;y=function(){var U=na(I);z.call(U)}}ta(o,I,r,y)}else I=YS(u,o,r,y,h);return na(I)}yp=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var u=Mr(o.pendingLanes);u!==0&&(gi(o,u|1),Tt(o,We()),(Le&6)===0&&(ji=We()+500,cr()))}break;case 13:Ur(function(){var h=Bn(r,1);if(h!==null){var y=wt();an(h,r,1,y)}}),kf(r,1)}},Gu=function(r){if(r.tag===13){var o=Bn(r,134217728);if(o!==null){var u=wt();an(o,r,134217728,u)}kf(r,134217728)}},vp=function(r){if(r.tag===13){var o=gr(r),u=Bn(r,o);if(u!==null){var h=wt();an(u,r,o,h)}kf(r,o)}},wp=function(){return Re},xp=function(r,o){var u=Re;try{return Re=r,o()}finally{Re=u}},Eo=function(r,o,u){switch(o){case"input":if($e(r,u),o=u.name,u.type==="radio"&&o!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<u.length;o++){var h=u[o];if(h!==r&&h.form===r.form){var y=Sl(h);if(!y)throw Error(n(90));he(h),$e(h,y)}}}break;case"textarea":xn(r,u);break;case"select":o=u.value,o!=null&&dt(r,!!u.multiple,o,!1)}},Gs=gf,Xs=Ur;var KS={usingClientEntryPoint:!1,Events:[Ko,Ei,Sl,Ys,Ks,gf]},as={findFiberByHostInstance:jr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},GS={bundleType:as.bundleType,version:as.version,rendererPackageName:as.rendererPackageName,rendererConfig:as.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:N.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Js(r),r===null?null:r.stateNode},findFiberByHostInstance:as.findFiberByHostInstance||qS,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 sa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sa.isDisabled&&sa.supportsFiber)try{hi=sa.inject(GS),Mt=sa}catch{}}return Pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KS,Pt.createPortal=function(r,o){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_f(o))throw Error(n(200));return US(r,o,null,u)},Pt.createRoot=function(r,o){if(!_f(r))throw Error(n(299));var u=!1,h="",y=Dg;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(y=o.onRecoverableError)),o=Sf(r,1,!1,null,null,u,!1,h,y),r[jn]=o.current,Uo(r.nodeType===8?r.parentNode:r),new Ef(o)},Pt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Js(o),r=r===null?null:r.stateNode,r},Pt.flushSync=function(r){return Ur(r)},Pt.hydrate=function(r,o,u){if(!ia(o))throw Error(n(200));return oa(null,r,o,!0,u)},Pt.hydrateRoot=function(r,o,u){if(!_f(r))throw Error(n(405));var h=u!=null&&u.hydratedSources||null,y=!1,x="",I=Dg;if(u!=null&&(u.unstable_strictMode===!0&&(y=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onRecoverableError!==void 0&&(I=u.onRecoverableError)),o=Mg(o,null,r,1,u??null,y,!1,x,I),r[jn]=o.current,Uo(r),h)for(r=0;r<h.length;r++)u=h[r],y=u._getVersion,y=y(u._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[u,y]:o.mutableSourceEagerHydrationData.push(u,y);return new ra(o)},Pt.render=function(r,o,u){if(!ia(o))throw Error(n(200));return oa(null,r,o,!1,u)},Pt.unmountComponentAtNode=function(r){if(!ia(r))throw Error(n(40));return r._reactRootContainer?(Ur(function(){oa(null,null,r,!1,function(){r._reactRootContainer=null,r[jn]=null})}),!0):!1},Pt.unstable_batchedUpdates=gf,Pt.unstable_renderSubtreeIntoContainer=function(r,o,u,h){if(!ia(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return oa(r,o,u,!1,h)},Pt.version="18.3.1-next-f1338f8080-20240426",Pt}var Ug;function Mv(){if(Ug)return If.exports;Ug=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),If.exports=ok(),If.exports}var qg;function sk(){if(qg)return la;qg=1;var e=Mv();return la.createRoot=e.createRoot,la.hydrateRoot=e.hydrateRoot,la}var lk=sk();const ak=su(lk);function tt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,i;n<e.length;n++)(i=tt(e[n]))!==""&&(t+=(t&&" ")+i);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var uk={value:()=>{}};function lu(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Oa(n)}function Oa(e){this._=e}function ck(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");if(s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Oa.prototype=lu.prototype={constructor:Oa,on:function(e,t){var n=this._,i=ck(e+"",n),s,l=-1,a=i.length;if(arguments.length<2){for(;++l<a;)if((s=(e=i[l]).type)&&(s=fk(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<a;)if(s=(e=i[l]).type)n[s]=Yg(n[s],e.name,t);else if(t==null)for(s in n)n[s]=Yg(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Oa(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,l;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],i=0,s=l.length;i<s;++i)l[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,l=i.length;s<l;++s)i[s].value.apply(t,n)}};function fk(e,t){for(var n=0,i=e.length,s;n<i;++n)if((s=e[n]).name===t)return s.value}function Yg(e,t,n){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=uk,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Jd="http://www.w3.org/1999/xhtml";const Kg={svg:"http://www.w3.org/2000/svg",xhtml:Jd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function au(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Kg.hasOwnProperty(t)?{space:Kg[t],local:e}:e}function dk(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Jd&&t.documentElement.namespaceURI===Jd?t.createElement(e):t.createElementNS(n,e)}}function hk(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Rv(e){var t=au(e);return(t.local?hk:dk)(t)}function pk(){}function kh(e){return e==null?pk:function(){return this.querySelector(e)}}function mk(e){typeof e!="function"&&(e=kh(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=new Array(a),f,d,m=0;m<a;++m)(f=l[m])&&(d=e.call(f,f.__data__,m,l))&&("__data__"in f&&(d.__data__=f.__data__),c[m]=d);return new Bt(i,this._parents)}function gk(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function yk(){return[]}function Dv(e){return e==null?yk:function(){return this.querySelectorAll(e)}}function vk(e){return function(){return gk(e.apply(this,arguments))}}function wk(e){typeof e=="function"?e=vk(e):e=Dv(e);for(var t=this._groups,n=t.length,i=[],s=[],l=0;l<n;++l)for(var a=t[l],c=a.length,f,d=0;d<c;++d)(f=a[d])&&(i.push(e.call(f,f.__data__,d,a)),s.push(f));return new Bt(i,s)}function jv(e){return function(){return this.matches(e)}}function $v(e){return function(t){return t.matches(e)}}var xk=Array.prototype.find;function bk(e){return function(){return xk.call(this.children,e)}}function Sk(){return this.firstElementChild}function kk(e){return this.select(e==null?Sk:bk(typeof e=="function"?e:$v(e)))}var Ek=Array.prototype.filter;function _k(){return Array.from(this.children)}function Nk(e){return function(){return Ek.call(this.children,e)}}function Ck(e){return this.selectAll(e==null?_k:Nk(typeof e=="function"?e:$v(e)))}function Ik(e){typeof e!="function"&&(e=jv(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=[],f,d=0;d<a;++d)(f=l[d])&&e.call(f,f.__data__,d,l)&&c.push(f);return new Bt(i,this._parents)}function zv(e){return new Array(e.length)}function Tk(){return new Bt(this._enter||this._groups.map(zv),this._parents)}function Va(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Va.prototype={constructor:Va,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Pk(e){return function(){return e}}function Ak(e,t,n,i,s,l){for(var a=0,c,f=t.length,d=l.length;a<d;++a)(c=t[a])?(c.__data__=l[a],i[a]=c):n[a]=new Va(e,l[a]);for(;a<f;++a)(c=t[a])&&(s[a]=c)}function Ok(e,t,n,i,s,l,a){var c,f,d=new Map,m=t.length,p=l.length,g=new Array(m),v;for(c=0;c<m;++c)(f=t[c])&&(g[c]=v=a.call(f,f.__data__,c,t)+"",d.has(v)?s[c]=f:d.set(v,f));for(c=0;c<p;++c)v=a.call(e,l[c],c,l)+"",(f=d.get(v))?(i[c]=f,f.__data__=l[c],d.delete(v)):n[c]=new Va(e,l[c]);for(c=0;c<m;++c)(f=t[c])&&d.get(g[c])===f&&(s[c]=f)}function Lk(e){return e.__data__}function Mk(e,t){if(!arguments.length)return Array.from(this,Lk);var n=t?Ok:Ak,i=this._parents,s=this._groups;typeof e!="function"&&(e=Pk(e));for(var l=s.length,a=new Array(l),c=new Array(l),f=new Array(l),d=0;d<l;++d){var m=i[d],p=s[d],g=p.length,v=Rk(e.call(m,m&&m.__data__,d,i)),S=v.length,w=c[d]=new Array(S),b=a[d]=new Array(S),k=f[d]=new Array(g);n(m,p,w,b,k,v,t);for(var _=0,E=0,N,A;_<S;++_)if(N=w[_]){for(_>=E&&(E=_+1);!(A=b[E])&&++E<S;);N._next=A||null}}return a=new Bt(a,i),a._enter=c,a._exit=f,a}function Rk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Dk(){return new Bt(this._exit||this._groups.map(zv),this._parents)}function jk(e,t,n){var i=this.enter(),s=this,l=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?l.remove():n(l),i&&s?i.merge(s).order():s}function $k(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,s=n.length,l=i.length,a=Math.min(s,l),c=new Array(s),f=0;f<a;++f)for(var d=n[f],m=i[f],p=d.length,g=c[f]=new Array(p),v,S=0;S<p;++S)(v=d[S]||m[S])&&(g[S]=v);for(;f<s;++f)c[f]=n[f];return new Bt(c,this._parents)}function zk(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],s=i.length-1,l=i[s],a;--s>=0;)(a=i[s])&&(l&&a.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(a,l),l=a);return this}function Fk(e){e||(e=Bk);function t(p,g){return p&&g?e(p.__data__,g.__data__):!p-!g}for(var n=this._groups,i=n.length,s=new Array(i),l=0;l<i;++l){for(var a=n[l],c=a.length,f=s[l]=new Array(c),d,m=0;m<c;++m)(d=a[m])&&(f[m]=d);f.sort(t)}return new Bt(s,this._parents).order()}function Bk(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Vk(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Hk(){return Array.from(this)}function Wk(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,l=i.length;s<l;++s){var a=i[s];if(a)return a}return null}function Uk(){let e=0;for(const t of this)++e;return e}function qk(){return!this.node()}function Yk(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var s=t[n],l=0,a=s.length,c;l<a;++l)(c=s[l])&&e.call(c,c.__data__,l,s);return this}function Kk(e){return function(){this.removeAttribute(e)}}function Gk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Xk(e,t){return function(){this.setAttribute(e,t)}}function Qk(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Jk(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Zk(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function eE(e,t){var n=au(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?Gk:Kk:typeof t=="function"?n.local?Zk:Jk:n.local?Qk:Xk)(n,t))}function Fv(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function tE(e){return function(){this.style.removeProperty(e)}}function nE(e,t,n){return function(){this.style.setProperty(e,t,n)}}function rE(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function iE(e,t,n){return arguments.length>1?this.each((t==null?tE:typeof t=="function"?rE:nE)(e,t,n??"")):to(this.node(),e)}function to(e,t){return e.style.getPropertyValue(t)||Fv(e).getComputedStyle(e,null).getPropertyValue(t)}function oE(e){return function(){delete this[e]}}function sE(e,t){return function(){this[e]=t}}function lE(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function aE(e,t){return arguments.length>1?this.each((t==null?oE:typeof t=="function"?lE:sE)(e,t)):this.node()[e]}function Bv(e){return e.trim().split(/^|\s+/)}function Eh(e){return e.classList||new Vv(e)}function Vv(e){this._node=e,this._names=Bv(e.getAttribute("class")||"")}Vv.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Hv(e,t){for(var n=Eh(e),i=-1,s=t.length;++i<s;)n.add(t[i])}function Wv(e,t){for(var n=Eh(e),i=-1,s=t.length;++i<s;)n.remove(t[i])}function uE(e){return function(){Hv(this,e)}}function cE(e){return function(){Wv(this,e)}}function fE(e,t){return function(){(t.apply(this,arguments)?Hv:Wv)(this,e)}}function dE(e,t){var n=Bv(e+"");if(arguments.length<2){for(var i=Eh(this.node()),s=-1,l=n.length;++s<l;)if(!i.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?fE:t?uE:cE)(n,t))}function hE(){this.textContent=""}function pE(e){return function(){this.textContent=e}}function mE(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function gE(e){return arguments.length?this.each(e==null?hE:(typeof e=="function"?mE:pE)(e)):this.node().textContent}function yE(){this.innerHTML=""}function vE(e){return function(){this.innerHTML=e}}function wE(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function xE(e){return arguments.length?this.each(e==null?yE:(typeof e=="function"?wE:vE)(e)):this.node().innerHTML}function bE(){this.nextSibling&&this.parentNode.appendChild(this)}function SE(){return this.each(bE)}function kE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function EE(){return this.each(kE)}function _E(e){var t=typeof e=="function"?e:Rv(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function NE(){return null}function CE(e,t){var n=typeof e=="function"?e:Rv(e),i=t==null?NE:typeof t=="function"?t:kh(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function IE(){var e=this.parentNode;e&&e.removeChild(this)}function TE(){return this.each(IE)}function PE(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function AE(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function OE(e){return this.select(e?AE:PE)}function LE(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ME(e){return function(t){e.call(this,t,this.__data__)}}function RE(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function DE(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,s=t.length,l;n<s;++n)l=t[n],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++i]=l;++i?t.length=i:delete this.__on}}}function jE(e,t,n){return function(){var i=this.__on,s,l=ME(t);if(i){for(var a=0,c=i.length;a<c;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=l,s.options=n),s.value=t;return}}this.addEventListener(e.type,l,n),s={type:e.type,name:e.name,value:t,listener:l,options:n},i?i.push(s):this.__on=[s]}}function $E(e,t,n){var i=RE(e+""),s,l=i.length,a;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,d=c.length,m;f<d;++f)for(s=0,m=c[f];s<l;++s)if((a=i[s]).type===m.type&&a.name===m.name)return m.value}return}for(c=t?jE:DE,s=0;s<l;++s)this.each(c(i[s],t,n));return this}function Uv(e,t,n){var i=Fv(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,n):(s=i.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function zE(e,t){return function(){return Uv(this,e,t)}}function FE(e,t){return function(){return Uv(this,e,t.apply(this,arguments))}}function BE(e,t){return this.each((typeof t=="function"?FE:zE)(e,t))}function*VE(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,l=i.length,a;s<l;++s)(a=i[s])&&(yield a)}var qv=[null];function Bt(e,t){this._groups=e,this._parents=t}function Ms(){return new Bt([[document.documentElement]],qv)}function HE(){return this}Bt.prototype=Ms.prototype={constructor:Bt,select:mk,selectAll:wk,selectChild:kk,selectChildren:Ck,filter:Ik,data:Mk,enter:Tk,exit:Dk,join:jk,merge:$k,selection:HE,order:zk,sort:Fk,call:Vk,nodes:Hk,node:Wk,size:Uk,empty:qk,each:Yk,attr:eE,style:iE,property:aE,classed:dE,text:gE,html:xE,raise:SE,lower:EE,append:_E,insert:CE,remove:TE,clone:OE,datum:LE,on:$E,dispatch:BE,[Symbol.iterator]:VE};function Ft(e){return typeof e=="string"?new Bt([[document.querySelector(e)]],[document.documentElement]):new Bt([[e]],qv)}function WE(e){let t;for(;t=e.sourceEvent;)e=t;return e}function cn(e,t){if(e=WE(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}const UE={passive:!1},Ss={capture:!0,passive:!1};function Af(e){e.stopImmediatePropagation()}function Xi(e){e.preventDefault(),e.stopImmediatePropagation()}function Yv(e){var t=e.document.documentElement,n=Ft(e).on("dragstart.drag",Xi,Ss);"onselectstart"in t?n.on("selectstart.drag",Xi,Ss):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Kv(e,t){var n=e.document.documentElement,i=Ft(e).on("dragstart.drag",null);t&&(i.on("click.drag",Xi,Ss),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const aa=e=>()=>e;function Zd(e,{sourceEvent:t,subject:n,target:i,identifier:s,active:l,x:a,y:c,dx:f,dy:d,dispatch:m}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:l,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:m}})}Zd.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function qE(e){return!e.ctrlKey&&!e.button}function YE(){return this.parentNode}function KE(e,t){return t??{x:e.x,y:e.y}}function GE(){return navigator.maxTouchPoints||"ontouchstart"in this}function Gv(){var e=qE,t=YE,n=KE,i=GE,s={},l=lu("start","drag","end"),a=0,c,f,d,m,p=0;function g(N){N.on("mousedown.drag",v).filter(i).on("touchstart.drag",b).on("touchmove.drag",k,UE).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(N,A){if(!(m||!e.call(this,N,A))){var L=E(this,t.call(this,N,A),N,A,"mouse");L&&(Ft(N.view).on("mousemove.drag",S,Ss).on("mouseup.drag",w,Ss),Yv(N.view),Af(N),d=!1,c=N.clientX,f=N.clientY,L("start",N))}}function S(N){if(Xi(N),!d){var A=N.clientX-c,L=N.clientY-f;d=A*A+L*L>p}s.mouse("drag",N)}function w(N){Ft(N.view).on("mousemove.drag mouseup.drag",null),Kv(N.view,d),Xi(N),s.mouse("end",N)}function b(N,A){if(e.call(this,N,A)){var L=N.changedTouches,R=t.call(this,N,A),C=L.length,P,F;for(P=0;P<C;++P)(F=E(this,R,N,A,L[P].identifier,L[P]))&&(Af(N),F("start",N,L[P]))}}function k(N){var A=N.changedTouches,L=A.length,R,C;for(R=0;R<L;++R)(C=s[A[R].identifier])&&(Xi(N),C("drag",N,A[R]))}function _(N){var A=N.changedTouches,L=A.length,R,C;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),R=0;R<L;++R)(C=s[A[R].identifier])&&(Af(N),C("end",N,A[R]))}function E(N,A,L,R,C,P){var F=l.copy(),M=cn(P||L,A),$,Z,j;if((j=n.call(N,new Zd("beforestart",{sourceEvent:L,target:g,identifier:C,active:a,x:M[0],y:M[1],dx:0,dy:0,dispatch:F}),R))!=null)return $=j.x-M[0]||0,Z=j.y-M[1]||0,function G(q,J,Y){var W=M,B;switch(q){case"start":s[C]=G,B=a++;break;case"end":delete s[C],--a;case"drag":M=cn(Y||J,A),B=a;break}F.call(q,N,new Zd(q,{sourceEvent:J,subject:j,target:g,identifier:C,active:B,x:M[0]+$,y:M[1]+Z,dx:M[0]-W[0],dy:M[1]-W[1],dispatch:F}),R)}}return g.filter=function(N){return arguments.length?(e=typeof N=="function"?N:aa(!!N),g):e},g.container=function(N){return arguments.length?(t=typeof N=="function"?N:aa(N),g):t},g.subject=function(N){return arguments.length?(n=typeof N=="function"?N:aa(N),g):n},g.touchable=function(N){return arguments.length?(i=typeof N=="function"?N:aa(!!N),g):i},g.on=function(){var N=l.on.apply(l,arguments);return N===l?g:N},g.clickDistance=function(N){return arguments.length?(p=(N=+N)*N,g):Math.sqrt(p)},g}function _h(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xv(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Rs(){}var ks=.7,Ha=1/ks,Qi="\\s*([+-]?\\d+)\\s*",Es="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",XE=/^#([0-9a-f]{3,8})$/,QE=new RegExp(`^rgb\\(${Qi},${Qi},${Qi}\\)$`),JE=new RegExp(`^rgb\\(${Pn},${Pn},${Pn}\\)$`),ZE=new RegExp(`^rgba\\(${Qi},${Qi},${Qi},${Es}\\)$`),e_=new RegExp(`^rgba\\(${Pn},${Pn},${Pn},${Es}\\)$`),t_=new RegExp(`^hsl\\(${Es},${Pn},${Pn}\\)$`),n_=new RegExp(`^hsla\\(${Es},${Pn},${Pn},${Es}\\)$`),Gg={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};_h(Rs,ri,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Xg,formatHex:Xg,formatHex8:r_,formatHsl:i_,formatRgb:Qg,toString:Qg});function Xg(){return this.rgb().formatHex()}function r_(){return this.rgb().formatHex8()}function i_(){return Qv(this).formatHsl()}function Qg(){return this.rgb().formatRgb()}function ri(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=XE.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Jg(t):n===3?new At(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ua(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ua(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=QE.exec(e))?new At(t[1],t[2],t[3],1):(t=JE.exec(e))?new At(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ZE.exec(e))?ua(t[1],t[2],t[3],t[4]):(t=e_.exec(e))?ua(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=t_.exec(e))?ty(t[1],t[2]/100,t[3]/100,1):(t=n_.exec(e))?ty(t[1],t[2]/100,t[3]/100,t[4]):Gg.hasOwnProperty(e)?Jg(Gg[e]):e==="transparent"?new At(NaN,NaN,NaN,0):null}function Jg(e){return new At(e>>16&255,e>>8&255,e&255,1)}function ua(e,t,n,i){return i<=0&&(e=t=n=NaN),new At(e,t,n,i)}function o_(e){return e instanceof Rs||(e=ri(e)),e?(e=e.rgb(),new At(e.r,e.g,e.b,e.opacity)):new At}function eh(e,t,n,i){return arguments.length===1?o_(e):new At(e,t,n,i??1)}function At(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}_h(At,eh,Xv(Rs,{brighter(e){return e=e==null?Ha:Math.pow(Ha,e),new At(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ks:Math.pow(ks,e),new At(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new At(ti(this.r),ti(this.g),ti(this.b),Wa(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:Zg,formatHex:Zg,formatHex8:s_,formatRgb:ey,toString:ey}));function Zg(){return`#${Jr(this.r)}${Jr(this.g)}${Jr(this.b)}`}function s_(){return`#${Jr(this.r)}${Jr(this.g)}${Jr(this.b)}${Jr((isNaN(this.opacity)?1:this.opacity)*255)}`}function ey(){const e=Wa(this.opacity);return`${e===1?"rgb(":"rgba("}${ti(this.r)}, ${ti(this.g)}, ${ti(this.b)}${e===1?")":`, ${e})`}`}function Wa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ti(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jr(e){return e=ti(e),(e<16?"0":"")+e.toString(16)}function ty(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fn(e,t,n,i)}function Qv(e){if(e instanceof fn)return new fn(e.h,e.s,e.l,e.opacity);if(e instanceof Rs||(e=ri(e)),!e)return new fn;if(e instanceof fn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,s=Math.min(t,n,i),l=Math.max(t,n,i),a=NaN,c=l-s,f=(l+s)/2;return c?(t===l?a=(n-i)/c+(n<i)*6:n===l?a=(i-t)/c+2:a=(t-n)/c+4,c/=f<.5?l+s:2-l-s,a*=60):c=f>0&&f<1?0:a,new fn(a,c,f,e.opacity)}function l_(e,t,n,i){return arguments.length===1?Qv(e):new fn(e,t,n,i??1)}function fn(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}_h(fn,l_,Xv(Rs,{brighter(e){return e=e==null?Ha:Math.pow(Ha,e),new fn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ks:Math.pow(ks,e),new fn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,s=2*n-i;return new At(Of(e>=240?e-240:e+120,s,i),Of(e,s,i),Of(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new fn(ny(this.h),ca(this.s),ca(this.l),Wa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Wa(this.opacity);return`${e===1?"hsl(":"hsla("}${ny(this.h)}, ${ca(this.s)*100}%, ${ca(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ny(e){return e=(e||0)%360,e<0?e+360:e}function ca(e){return Math.max(0,Math.min(1,e||0))}function Of(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Nh=e=>()=>e;function a_(e,t){return function(n){return e+n*t}}function u_(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function c_(e){return(e=+e)==1?Jv:function(t,n){return n-t?u_(t,n,e):Nh(isNaN(t)?n:t)}}function Jv(e,t){var n=t-e;return n?a_(e,n):Nh(isNaN(e)?t:e)}const Ua=(function e(t){var n=c_(t);function i(s,l){var a=n((s=eh(s)).r,(l=eh(l)).r),c=n(s.g,l.g),f=n(s.b,l.b),d=Jv(s.opacity,l.opacity);return function(m){return s.r=a(m),s.g=c(m),s.b=f(m),s.opacity=d(m),s+""}}return i.gamma=e,i})(1);function f_(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,i=t.slice(),s;return function(l){for(s=0;s<n;++s)i[s]=e[s]*(1-l)+t[s]*l;return i}}function d_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function h_(e,t){var n=t?t.length:0,i=e?Math.min(n,e.length):0,s=new Array(i),l=new Array(n),a;for(a=0;a<i;++a)s[a]=vs(e[a],t[a]);for(;a<n;++a)l[a]=t[a];return function(c){for(a=0;a<i;++a)l[a]=s[a](c);return l}}function p_(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function In(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function m_(e,t){var n={},i={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?n[s]=vs(e[s],t[s]):i[s]=t[s];return function(l){for(s in n)i[s]=n[s](l);return i}}var th=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Lf=new RegExp(th.source,"g");function g_(e){return function(){return e}}function y_(e){return function(t){return e(t)+""}}function Zv(e,t){var n=th.lastIndex=Lf.lastIndex=0,i,s,l,a=-1,c=[],f=[];for(e=e+"",t=t+"";(i=th.exec(e))&&(s=Lf.exec(t));)(l=s.index)>n&&(l=t.slice(n,l),c[a]?c[a]+=l:c[++a]=l),(i=i[0])===(s=s[0])?c[a]?c[a]+=s:c[++a]=s:(c[++a]=null,f.push({i:a,x:In(i,s)})),n=Lf.lastIndex;return n<t.length&&(l=t.slice(n),c[a]?c[a]+=l:c[++a]=l),c.length<2?f[0]?y_(f[0].x):g_(t):(t=f.length,function(d){for(var m=0,p;m<t;++m)c[(p=f[m]).i]=p.x(d);return c.join("")})}function vs(e,t){var n=typeof t,i;return t==null||n==="boolean"?Nh(t):(n==="number"?In:n==="string"?(i=ri(t))?(t=i,Ua):Zv:t instanceof ri?Ua:t instanceof Date?p_:d_(t)?f_:Array.isArray(t)?h_:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?m_:In)(e,t)}var ry=180/Math.PI,nh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ew(e,t,n,i,s,l){var a,c,f;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(f=e*n+t*i)&&(n-=e*f,i-=t*f),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,f/=c),e*i<t*n&&(e=-e,t=-t,f=-f,a=-a),{translateX:s,translateY:l,rotate:Math.atan2(t,e)*ry,skewX:Math.atan(f)*ry,scaleX:a,scaleY:c}}var fa;function v_(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?nh:ew(t.a,t.b,t.c,t.d,t.e,t.f)}function w_(e){return e==null||(fa||(fa=document.createElementNS("http://www.w3.org/2000/svg","g")),fa.setAttribute("transform",e),!(e=fa.transform.baseVal.consolidate()))?nh:(e=e.matrix,ew(e.a,e.b,e.c,e.d,e.e,e.f))}function tw(e,t,n,i){function s(d){return d.length?d.pop()+" ":""}function l(d,m,p,g,v,S){if(d!==p||m!==g){var w=v.push("translate(",null,t,null,n);S.push({i:w-4,x:In(d,p)},{i:w-2,x:In(m,g)})}else(p||g)&&v.push("translate("+p+t+g+n)}function a(d,m,p,g){d!==m?(d-m>180?m+=360:m-d>180&&(d+=360),g.push({i:p.push(s(p)+"rotate(",null,i)-2,x:In(d,m)})):m&&p.push(s(p)+"rotate("+m+i)}function c(d,m,p,g){d!==m?g.push({i:p.push(s(p)+"skewX(",null,i)-2,x:In(d,m)}):m&&p.push(s(p)+"skewX("+m+i)}function f(d,m,p,g,v,S){if(d!==p||m!==g){var w=v.push(s(v)+"scale(",null,",",null,")");S.push({i:w-4,x:In(d,p)},{i:w-2,x:In(m,g)})}else(p!==1||g!==1)&&v.push(s(v)+"scale("+p+","+g+")")}return function(d,m){var p=[],g=[];return d=e(d),m=e(m),l(d.translateX,d.translateY,m.translateX,m.translateY,p,g),a(d.rotate,m.rotate,p,g),c(d.skewX,m.skewX,p,g),f(d.scaleX,d.scaleY,m.scaleX,m.scaleY,p,g),d=m=null,function(v){for(var S=-1,w=g.length,b;++S<w;)p[(b=g[S]).i]=b.x(v);return p.join("")}}}var x_=tw(v_,"px, ","px)","deg)"),b_=tw(w_,", ",")",")"),S_=1e-12;function iy(e){return((e=Math.exp(e))+1/e)/2}function k_(e){return((e=Math.exp(e))-1/e)/2}function E_(e){return((e=Math.exp(2*e))-1)/(e+1)}const La=(function e(t,n,i){function s(l,a){var c=l[0],f=l[1],d=l[2],m=a[0],p=a[1],g=a[2],v=m-c,S=p-f,w=v*v+S*S,b,k;if(w<S_)k=Math.log(g/d)/t,b=function(R){return[c+R*v,f+R*S,d*Math.exp(t*R*k)]};else{var _=Math.sqrt(w),E=(g*g-d*d+i*w)/(2*d*n*_),N=(g*g-d*d-i*w)/(2*g*n*_),A=Math.log(Math.sqrt(E*E+1)-E),L=Math.log(Math.sqrt(N*N+1)-N);k=(L-A)/t,b=function(R){var C=R*k,P=iy(A),F=d/(n*_)*(P*E_(t*C+A)-k_(A));return[c+F*v,f+F*S,d*P/iy(t*C+A)]}}return b.duration=k*1e3*t/Math.SQRT2,b}return s.rho=function(l){var a=Math.max(.001,+l),c=a*a,f=c*c;return e(a,c,f)},s})(Math.SQRT2,2,4);var no=0,ps=0,cs=0,nw=1e3,qa,ms,Ya=0,ii=0,uu=0,_s=typeof performance=="object"&&performance.now?performance:Date,rw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ch(){return ii||(rw(__),ii=_s.now()+uu)}function __(){ii=0}function Ka(){this._call=this._time=this._next=null}Ka.prototype=iw.prototype={constructor:Ka,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ch():+n)+(t==null?0:+t),!this._next&&ms!==this&&(ms?ms._next=this:qa=this,ms=this),this._call=e,this._time=n,rh()},stop:function(){this._call&&(this._call=null,this._time=1/0,rh())}};function iw(e,t,n){var i=new Ka;return i.restart(e,t,n),i}function N_(){Ch(),++no;for(var e=qa,t;e;)(t=ii-e._time)>=0&&e._call.call(void 0,t),e=e._next;--no}function oy(){ii=(Ya=_s.now())+uu,no=ps=0;try{N_()}finally{no=0,I_(),ii=0}}function C_(){var e=_s.now(),t=e-Ya;t>nw&&(uu-=t,Ya=e)}function I_(){for(var e,t=qa,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:qa=n);ms=e,rh(i)}function rh(e){if(!no){ps&&(ps=clearTimeout(ps));var t=e-ii;t>24?(e<1/0&&(ps=setTimeout(oy,e-_s.now()-uu)),cs&&(cs=clearInterval(cs))):(cs||(Ya=_s.now(),cs=setInterval(C_,nw)),no=1,rw(oy))}}function sy(e,t,n){var i=new Ka;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,n),i}var T_=lu("start","end","cancel","interrupt"),P_=[],ow=0,ly=1,ih=2,Ma=3,ay=4,oh=5,Ra=6;function cu(e,t,n,i,s,l){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;A_(e,n,{name:t,index:i,group:s,on:T_,tween:P_,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:ow})}function Ih(e,t){var n=gn(e,t);if(n.state>ow)throw new Error("too late; already scheduled");return n}function On(e,t){var n=gn(e,t);if(n.state>Ma)throw new Error("too late; already running");return n}function gn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function A_(e,t,n){var i=e.__transition,s;i[t]=n,n.timer=iw(l,0,n.time);function l(d){n.state=ly,n.timer.restart(a,n.delay,n.time),n.delay<=d&&a(d-n.delay)}function a(d){var m,p,g,v;if(n.state!==ly)return f();for(m in i)if(v=i[m],v.name===n.name){if(v.state===Ma)return sy(a);v.state===ay?(v.state=Ra,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete i[m]):+m<t&&(v.state=Ra,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete i[m])}if(sy(function(){n.state===Ma&&(n.state=ay,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=ih,n.on.call("start",e,e.__data__,n.index,n.group),n.state===ih){for(n.state=Ma,s=new Array(g=n.tween.length),m=0,p=-1;m<g;++m)(v=n.tween[m].value.call(e,e.__data__,n.index,n.group))&&(s[++p]=v);s.length=p+1}}function c(d){for(var m=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(f),n.state=oh,1),p=-1,g=s.length;++p<g;)s[p].call(e,m);n.state===oh&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=Ra,n.timer.stop(),delete i[t];for(var d in i)return;delete e.__transition}}function Da(e,t){var n=e.__transition,i,s,l=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){l=!1;continue}s=i.state>ih&&i.state<oh,i.state=Ra,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}l&&delete e.__transition}}function O_(e){return this.each(function(){Da(this,e)})}function L_(e,t){var n,i;return function(){var s=On(this,e),l=s.tween;if(l!==n){i=n=l;for(var a=0,c=i.length;a<c;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function M_(e,t,n){var i,s;if(typeof n!="function")throw new Error;return function(){var l=On(this,e),a=l.tween;if(a!==i){s=(i=a).slice();for(var c={name:t,value:n},f=0,d=s.length;f<d;++f)if(s[f].name===t){s[f]=c;break}f===d&&s.push(c)}l.tween=s}}function R_(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=gn(this.node(),n).tween,s=0,l=i.length,a;s<l;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?L_:M_)(n,e,t))}function Th(e,t,n){var i=e._id;return e.each(function(){var s=On(this,i);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return gn(s,i).value[t]}}function sw(e,t){var n;return(typeof t=="number"?In:t instanceof ri?Ua:(n=ri(t))?(t=n,Ua):Zv)(e,t)}function D_(e){return function(){this.removeAttribute(e)}}function j_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $_(e,t,n){var i,s=n+"",l;return function(){var a=this.getAttribute(e);return a===s?null:a===i?l:l=t(i=a,n)}}function z_(e,t,n){var i,s=n+"",l;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?l:l=t(i=a,n)}}function F_(e,t,n){var i,s,l;return function(){var a,c=n(this),f;return c==null?void this.removeAttribute(e):(a=this.getAttribute(e),f=c+"",a===f?null:a===i&&f===s?l:(s=f,l=t(i=a,c)))}}function B_(e,t,n){var i,s,l;return function(){var a,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),f=c+"",a===f?null:a===i&&f===s?l:(s=f,l=t(i=a,c)))}}function V_(e,t){var n=au(e),i=n==="transform"?b_:sw;return this.attrTween(e,typeof t=="function"?(n.local?B_:F_)(n,i,Th(this,"attr."+e,t)):t==null?(n.local?j_:D_)(n):(n.local?z_:$_)(n,i,t))}function H_(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function W_(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function U_(e,t){var n,i;function s(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&W_(e,l)),n}return s._value=t,s}function q_(e,t){var n,i;function s(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&H_(e,l)),n}return s._value=t,s}function Y_(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=au(e);return this.tween(n,(i.local?U_:q_)(i,t))}function K_(e,t){return function(){Ih(this,e).delay=+t.apply(this,arguments)}}function G_(e,t){return t=+t,function(){Ih(this,e).delay=t}}function X_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?K_:G_)(t,e)):gn(this.node(),t).delay}function Q_(e,t){return function(){On(this,e).duration=+t.apply(this,arguments)}}function J_(e,t){return t=+t,function(){On(this,e).duration=t}}function Z_(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Q_:J_)(t,e)):gn(this.node(),t).duration}function eN(e,t){if(typeof t!="function")throw new Error;return function(){On(this,e).ease=t}}function tN(e){var t=this._id;return arguments.length?this.each(eN(t,e)):gn(this.node(),t).ease}function nN(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;On(this,e).ease=n}}function rN(e){if(typeof e!="function")throw new Error;return this.each(nN(this._id,e))}function iN(e){typeof e!="function"&&(e=jv(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=[],f,d=0;d<a;++d)(f=l[d])&&e.call(f,f.__data__,d,l)&&c.push(f);return new Qn(i,this._parents,this._name,this._id)}function oN(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,s=n.length,l=Math.min(i,s),a=new Array(i),c=0;c<l;++c)for(var f=t[c],d=n[c],m=f.length,p=a[c]=new Array(m),g,v=0;v<m;++v)(g=f[v]||d[v])&&(p[v]=g);for(;c<i;++c)a[c]=t[c];return new Qn(a,this._parents,this._name,this._id)}function sN(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function lN(e,t,n){var i,s,l=sN(t)?Ih:On;return function(){var a=l(this,e),c=a.on;c!==i&&(s=(i=c).copy()).on(t,n),a.on=s}}function aN(e,t){var n=this._id;return arguments.length<2?gn(this.node(),n).on.on(e):this.each(lN(n,e,t))}function uN(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function cN(){return this.on("end.remove",uN(this._id))}function fN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=kh(e));for(var i=this._groups,s=i.length,l=new Array(s),a=0;a<s;++a)for(var c=i[a],f=c.length,d=l[a]=new Array(f),m,p,g=0;g<f;++g)(m=c[g])&&(p=e.call(m,m.__data__,g,c))&&("__data__"in m&&(p.__data__=m.__data__),d[g]=p,cu(d[g],t,n,g,d,gn(m,n)));return new Qn(l,this._parents,t,n)}function dN(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Dv(e));for(var i=this._groups,s=i.length,l=[],a=[],c=0;c<s;++c)for(var f=i[c],d=f.length,m,p=0;p<d;++p)if(m=f[p]){for(var g=e.call(m,m.__data__,p,f),v,S=gn(m,n),w=0,b=g.length;w<b;++w)(v=g[w])&&cu(v,t,n,w,g,S);l.push(g),a.push(m)}return new Qn(l,a,t,n)}var hN=Ms.prototype.constructor;function pN(){return new hN(this._groups,this._parents)}function mN(e,t){var n,i,s;return function(){var l=to(this,e),a=(this.style.removeProperty(e),to(this,e));return l===a?null:l===n&&a===i?s:s=t(n=l,i=a)}}function lw(e){return function(){this.style.removeProperty(e)}}function gN(e,t,n){var i,s=n+"",l;return function(){var a=to(this,e);return a===s?null:a===i?l:l=t(i=a,n)}}function yN(e,t,n){var i,s,l;return function(){var a=to(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),to(this,e))),a===f?null:a===i&&f===s?l:(s=f,l=t(i=a,c))}}function vN(e,t){var n,i,s,l="style."+t,a="end."+l,c;return function(){var f=On(this,e),d=f.on,m=f.value[l]==null?c||(c=lw(t)):void 0;(d!==n||s!==m)&&(i=(n=d).copy()).on(a,s=m),f.on=i}}function wN(e,t,n){var i=(e+="")=="transform"?x_:sw;return t==null?this.styleTween(e,mN(e,i)).on("end.style."+e,lw(e)):typeof t=="function"?this.styleTween(e,yN(e,i,Th(this,"style."+e,t))).each(vN(this._id,e)):this.styleTween(e,gN(e,i,t),n).on("end.style."+e,null)}function xN(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function bN(e,t,n){var i,s;function l(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&xN(e,a,n)),i}return l._value=t,l}function SN(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,bN(e,t,n??""))}function kN(e){return function(){this.textContent=e}}function EN(e){return function(){var t=e(this);this.textContent=t??""}}function _N(e){return this.tween("text",typeof e=="function"?EN(Th(this,"text",e)):kN(e==null?"":e+""))}function NN(e){return function(t){this.textContent=e.call(this,t)}}function CN(e){var t,n;function i(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&NN(s)),t}return i._value=e,i}function IN(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,CN(e))}function TN(){for(var e=this._name,t=this._id,n=aw(),i=this._groups,s=i.length,l=0;l<s;++l)for(var a=i[l],c=a.length,f,d=0;d<c;++d)if(f=a[d]){var m=gn(f,t);cu(f,e,n,d,a,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new Qn(i,this._parents,e,n)}function PN(){var e,t,n=this,i=n._id,s=n.size();return new Promise(function(l,a){var c={value:a},f={value:function(){--s===0&&l()}};n.each(function(){var d=On(this,i),m=d.on;m!==e&&(t=(e=m).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(f)),d.on=t}),s===0&&l()})}var AN=0;function Qn(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function aw(){return++AN}var Un=Ms.prototype;Qn.prototype={constructor:Qn,select:fN,selectAll:dN,selectChild:Un.selectChild,selectChildren:Un.selectChildren,filter:iN,merge:oN,selection:pN,transition:TN,call:Un.call,nodes:Un.nodes,node:Un.node,size:Un.size,empty:Un.empty,each:Un.each,on:aN,attr:V_,attrTween:Y_,style:wN,styleTween:SN,text:_N,textTween:IN,remove:cN,tween:R_,delay:X_,duration:Z_,ease:tN,easeVarying:rN,end:PN,[Symbol.iterator]:Un[Symbol.iterator]};function ON(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var LN={time:null,delay:0,duration:250,ease:ON};function MN(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function RN(e){var t,n;e instanceof Qn?(t=e._id,e=e._name):(t=aw(),(n=LN).time=Ch(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,l=0;l<s;++l)for(var a=i[l],c=a.length,f,d=0;d<c;++d)(f=a[d])&&cu(f,e,t,d,a,n||MN(f,t));return new Qn(i,this._parents,e,t)}Ms.prototype.interrupt=O_;Ms.prototype.transition=RN;const da=e=>()=>e;function DN(e,{sourceEvent:t,target:n,transform:i,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function Yn(e,t,n){this.k=e,this.x=t,this.y=n}Yn.prototype={constructor:Yn,scale:function(e){return e===1?this:new Yn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Yn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var fu=new Yn(1,0,0);uw.prototype=Yn.prototype;function uw(e){for(;!e.__zoom;)if(!(e=e.parentNode))return fu;return e.__zoom}function Mf(e){e.stopImmediatePropagation()}function fs(e){e.preventDefault(),e.stopImmediatePropagation()}function jN(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function $N(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function uy(){return this.__zoom||fu}function zN(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function FN(){return navigator.maxTouchPoints||"ontouchstart"in this}function BN(e,t,n){var i=e.invertX(t[0][0])-n[0][0],s=e.invertX(t[1][0])-n[1][0],l=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),a>l?(l+a)/2:Math.min(0,l)||Math.max(0,a))}function cw(){var e=jN,t=$N,n=BN,i=zN,s=FN,l=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],c=250,f=La,d=lu("start","zoom","end"),m,p,g,v=500,S=150,w=0,b=10;function k(j){j.property("__zoom",uy).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",F).filter(s).on("touchstart.zoom",M).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",Z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(j,G,q,J){var Y=j.selection?j.selection():j;Y.property("__zoom",uy),j!==Y?A(j,G,q,J):Y.interrupt().each(function(){L(this,arguments).event(J).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},k.scaleBy=function(j,G,q,J){k.scaleTo(j,function(){var Y=this.__zoom.k,W=typeof G=="function"?G.apply(this,arguments):G;return Y*W},q,J)},k.scaleTo=function(j,G,q,J){k.transform(j,function(){var Y=t.apply(this,arguments),W=this.__zoom,B=q==null?N(Y):typeof q=="function"?q.apply(this,arguments):q,D=W.invert(B),H=typeof G=="function"?G.apply(this,arguments):G;return n(E(_(W,H),B,D),Y,a)},q,J)},k.translateBy=function(j,G,q,J){k.transform(j,function(){return n(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof q=="function"?q.apply(this,arguments):q),t.apply(this,arguments),a)},null,J)},k.translateTo=function(j,G,q,J,Y){k.transform(j,function(){var W=t.apply(this,arguments),B=this.__zoom,D=J==null?N(W):typeof J=="function"?J.apply(this,arguments):J;return n(fu.translate(D[0],D[1]).scale(B.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof q=="function"?-q.apply(this,arguments):-q),W,a)},J,Y)};function _(j,G){return G=Math.max(l[0],Math.min(l[1],G)),G===j.k?j:new Yn(G,j.x,j.y)}function E(j,G,q){var J=G[0]-q[0]*j.k,Y=G[1]-q[1]*j.k;return J===j.x&&Y===j.y?j:new Yn(j.k,J,Y)}function N(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function A(j,G,q,J){j.on("start.zoom",function(){L(this,arguments).event(J).start()}).on("interrupt.zoom end.zoom",function(){L(this,arguments).event(J).end()}).tween("zoom",function(){var Y=this,W=arguments,B=L(Y,W).event(J),D=t.apply(Y,W),H=q==null?N(D):typeof q=="function"?q.apply(Y,W):q,V=Math.max(D[1][0]-D[0][0],D[1][1]-D[0][1]),K=Y.__zoom,Q=typeof G=="function"?G.apply(Y,W):G,re=f(K.invert(H).concat(V/K.k),Q.invert(H).concat(V/Q.k));return function(se){if(se===1)se=Q;else{var ee=re(se),oe=V/ee[2];se=new Yn(oe,H[0]-ee[0]*oe,H[1]-ee[1]*oe)}B.zoom(null,se)}})}function L(j,G,q){return!q&&j.__zooming||new R(j,G)}function R(j,G){this.that=j,this.args=G,this.active=0,this.sourceEvent=null,this.extent=t.apply(j,G),this.taps=0}R.prototype={event:function(j){return j&&(this.sourceEvent=j),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(j,G){return this.mouse&&j!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&j!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&j!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(j){var G=Ft(this.that).datum();d.call(j,this.that,new DN(j,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:d}),G)}};function C(j,...G){if(!e.apply(this,arguments))return;var q=L(this,G).event(j),J=this.__zoom,Y=Math.max(l[0],Math.min(l[1],J.k*Math.pow(2,i.apply(this,arguments)))),W=cn(j);if(q.wheel)(q.mouse[0][0]!==W[0]||q.mouse[0][1]!==W[1])&&(q.mouse[1]=J.invert(q.mouse[0]=W)),clearTimeout(q.wheel);else{if(J.k===Y)return;q.mouse=[W,J.invert(W)],Da(this),q.start()}fs(j),q.wheel=setTimeout(B,S),q.zoom("mouse",n(E(_(J,Y),q.mouse[0],q.mouse[1]),q.extent,a));function B(){q.wheel=null,q.end()}}function P(j,...G){if(g||!e.apply(this,arguments))return;var q=j.currentTarget,J=L(this,G,!0).event(j),Y=Ft(j.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",V,!0),W=cn(j,q),B=j.clientX,D=j.clientY;Yv(j.view),Mf(j),J.mouse=[W,this.__zoom.invert(W)],Da(this),J.start();function H(K){if(fs(K),!J.moved){var Q=K.clientX-B,re=K.clientY-D;J.moved=Q*Q+re*re>w}J.event(K).zoom("mouse",n(E(J.that.__zoom,J.mouse[0]=cn(K,q),J.mouse[1]),J.extent,a))}function V(K){Y.on("mousemove.zoom mouseup.zoom",null),Kv(K.view,J.moved),fs(K),J.event(K).end()}}function F(j,...G){if(e.apply(this,arguments)){var q=this.__zoom,J=cn(j.changedTouches?j.changedTouches[0]:j,this),Y=q.invert(J),W=q.k*(j.shiftKey?.5:2),B=n(E(_(q,W),J,Y),t.apply(this,G),a);fs(j),c>0?Ft(this).transition().duration(c).call(A,B,J,j):Ft(this).call(k.transform,B,J,j)}}function M(j,...G){if(e.apply(this,arguments)){var q=j.touches,J=q.length,Y=L(this,G,j.changedTouches.length===J).event(j),W,B,D,H;for(Mf(j),B=0;B<J;++B)D=q[B],H=cn(D,this),H=[H,this.__zoom.invert(H),D.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==H[2]&&(Y.touch1=H,Y.taps=0):(Y.touch0=H,W=!0,Y.taps=1+!!m);m&&(m=clearTimeout(m)),W&&(Y.taps<2&&(p=H[0],m=setTimeout(function(){m=null},v)),Da(this),Y.start())}}function $(j,...G){if(this.__zooming){var q=L(this,G).event(j),J=j.changedTouches,Y=J.length,W,B,D,H;for(fs(j),W=0;W<Y;++W)B=J[W],D=cn(B,this),q.touch0&&q.touch0[2]===B.identifier?q.touch0[0]=D:q.touch1&&q.touch1[2]===B.identifier&&(q.touch1[0]=D);if(B=q.that.__zoom,q.touch1){var V=q.touch0[0],K=q.touch0[1],Q=q.touch1[0],re=q.touch1[1],se=(se=Q[0]-V[0])*se+(se=Q[1]-V[1])*se,ee=(ee=re[0]-K[0])*ee+(ee=re[1]-K[1])*ee;B=_(B,Math.sqrt(se/ee)),D=[(V[0]+Q[0])/2,(V[1]+Q[1])/2],H=[(K[0]+re[0])/2,(K[1]+re[1])/2]}else if(q.touch0)D=q.touch0[0],H=q.touch0[1];else return;q.zoom("touch",n(E(B,D,H),q.extent,a))}}function Z(j,...G){if(this.__zooming){var q=L(this,G).event(j),J=j.changedTouches,Y=J.length,W,B;for(Mf(j),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),W=0;W<Y;++W)B=J[W],q.touch0&&q.touch0[2]===B.identifier?delete q.touch0:q.touch1&&q.touch1[2]===B.identifier&&delete q.touch1;if(q.touch1&&!q.touch0&&(q.touch0=q.touch1,delete q.touch1),q.touch0)q.touch0[1]=this.__zoom.invert(q.touch0[0]);else if(q.end(),q.taps===2&&(B=cn(B,this),Math.hypot(p[0]-B[0],p[1]-B[1])<b)){var D=Ft(this).on("dblclick.zoom");D&&D.apply(this,arguments)}}}return k.wheelDelta=function(j){return arguments.length?(i=typeof j=="function"?j:da(+j),k):i},k.filter=function(j){return arguments.length?(e=typeof j=="function"?j:da(!!j),k):e},k.touchable=function(j){return arguments.length?(s=typeof j=="function"?j:da(!!j),k):s},k.extent=function(j){return arguments.length?(t=typeof j=="function"?j:da([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),k):t},k.scaleExtent=function(j){return arguments.length?(l[0]=+j[0],l[1]=+j[1],k):[l[0],l[1]]},k.translateExtent=function(j){return arguments.length?(a[0][0]=+j[0][0],a[1][0]=+j[1][0],a[0][1]=+j[0][1],a[1][1]=+j[1][1],k):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},k.constrain=function(j){return arguments.length?(n=j,k):n},k.duration=function(j){return arguments.length?(c=+j,k):c},k.interpolate=function(j){return arguments.length?(f=j,k):f},k.on=function(){var j=d.on.apply(d,arguments);return j===d?k:j},k.clickDistance=function(j){return arguments.length?(w=(j=+j)*j,k):Math.sqrt(w)},k.tapDistance=function(j){return arguments.length?(b=+j,k):b},k}const pn={error001:(e="react")=>`Seems like you have not used zustand provider as an ancestor. Help: https://${e}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:e=>`Node type "${e}" 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:i})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:i}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},Ns=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],fw=["Enter"," ","Escape"],dw={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var ro;(function(e){e.Strict="strict",e.Loose="loose"})(ro||(ro={}));var ni;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ni||(ni={}));var Cs;(function(e){e.Partial="partial",e.Full="full"})(Cs||(Cs={}));const hw={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var _r;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(_r||(_r={}));var Ga;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ga||(Ga={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));const cy={[Se.Left]:Se.Right,[Se.Right]:Se.Left,[Se.Top]:Se.Bottom,[Se.Bottom]:Se.Top};function pw(e){return e===null?null:e?"valid":"invalid"}const mw=e=>"id"in e&&"source"in e&&"target"in e,VN=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Ph=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Ds=(e,t=[0,0])=>{const{width:n,height:i}=Jn(e),s=e.origin??t,l=n*s[0],a=i*s[1];return{x:e.position.x-l,y:e.position.y-a}},HN=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((i,s)=>{const l=typeof s=="string";let a=!t.nodeLookup&&!l?s:void 0;t.nodeLookup&&(a=l?t.nodeLookup.get(s):Ph(s)?s:t.nodeLookup.get(s.id));const c=a?Xa(a,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return du(i,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return hu(n)},js=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},i=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(n=du(n,Xa(s)),i=!0)}),i?hu(n):{x:0,y:0,width:0,height:0}},Ah=(e,t,[n,i,s]=[0,0,1],l=!1,a=!1)=>{const c={...po(t,[n,i,s]),width:t.width/s,height:t.height/s},f=[];for(const d of e.values()){const{measured:m,selectable:p=!0,hidden:g=!1}=d;if(a&&!p||g)continue;const v=m.width??d.width??d.initialWidth??null,S=m.height??d.height??d.initialHeight??null,w=Is(c,oo(d)),b=(v??0)*(S??0),k=l&&w>0;(!d.internals.handleBounds||k||w>=b||d.dragging)&&f.push(d)}return f},WN=(e,t)=>{const n=new Set;return e.forEach(i=>{n.add(i.id)}),t.filter(i=>n.has(i.source)||n.has(i.target))};function UN(e,t){const n=new Map,i=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!s.hidden)&&(!i||i.has(s.id))&&n.set(s.id,s)}),n}async function qN({nodes:e,width:t,height:n,panZoom:i,minZoom:s,maxZoom:l},a){if(e.size===0)return!0;const c=UN(e,a),f=js(c),d=Lh(f,t,n,(a==null?void 0:a.minZoom)??s,(a==null?void 0:a.maxZoom)??l,(a==null?void 0:a.padding)??.1);return await i.setViewport(d,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),!0}function gw({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:i=[0,0],nodeExtent:s,onError:l}){const a=n.get(e),c=a.parentId?n.get(a.parentId):void 0,{x:f,y:d}=c?c.internals.positionAbsolute:{x:0,y:0},m=a.origin??i;let p=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!c)l==null||l("005",pn.error005());else{const v=c.measured.width,S=c.measured.height;v&&S&&(p=[[f,d],[f+v,d+S]])}else c&&si(a.extent)&&(p=[[a.extent[0][0]+f,a.extent[0][1]+d],[a.extent[1][0]+f,a.extent[1][1]+d]]);const g=si(p)?oi(t,p,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&(l==null||l("015",pn.error015())),{position:{x:g.x-f+(a.measured.width??0)*m[0],y:g.y-d+(a.measured.height??0)*m[1]},positionAbsolute:g}}async function YN({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:i,onBeforeDelete:s}){const l=new Set(e.map(g=>g.id)),a=[];for(const g of n){if(g.deletable===!1)continue;const v=l.has(g.id),S=!v&&g.parentId&&a.find(w=>w.id===g.parentId);(v||S)&&a.push(g)}const c=new Set(t.map(g=>g.id)),f=i.filter(g=>g.deletable!==!1),m=WN(a,f);for(const g of f)c.has(g.id)&&!m.find(S=>S.id===g.id)&&m.push(g);if(!s)return{edges:m,nodes:a};const p=await s({nodes:a,edges:m});return typeof p=="boolean"?p?{edges:m,nodes:a}:{edges:[],nodes:[]}:p}const io=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),oi=(e={x:0,y:0},t,n)=>({x:io(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:io(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function yw(e,t,n){const{width:i,height:s}=Jn(n),{x:l,y:a}=n.internals.positionAbsolute;return oi(e,[[l,a],[l+i,a+s]],t)}const fy=(e,t,n)=>e<t?io(Math.abs(e-t),1,t)/t:e>n?-io(Math.abs(e-n),1,t)/t:0,Oh=(e,t,n=15,i=40)=>{const s=fy(e.x,i,t.width-i)*n,l=fy(e.y,i,t.height-i)*n;return[s,l]},du=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),sh=({x:e,y:t,width:n,height:i})=>({x:e,y:t,x2:e+n,y2:t+i}),hu=({x:e,y:t,x2:n,y2:i})=>({x:e,y:t,width:n-e,height:i-t}),oo=(e,t=[0,0])=>{var s,l;const{x:n,y:i}=Ph(e)?e.internals.positionAbsolute:Ds(e,t);return{x:n,y:i,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((l=e.measured)==null?void 0:l.height)??e.height??e.initialHeight??0}},Xa=(e,t=[0,0])=>{var s,l;const{x:n,y:i}=Ph(e)?e.internals.positionAbsolute:Ds(e,t);return{x:n,y:i,x2:n+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:i+(((l=e.measured)==null?void 0:l.height)??e.height??e.initialHeight??0)}},vw=(e,t)=>hu(du(sh(e),sh(t))),Is=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),i=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*i)},dy=e=>dn(e.width)&&dn(e.height)&&dn(e.x)&&dn(e.y),dn=e=>!isNaN(e)&&isFinite(e),ww=(e,t)=>(n,i)=>{},$s=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),po=({x:e,y:t},[n,i,s],l=!1,a=[1,1])=>{const c={x:(e-n)/s,y:(t-i)/s};return l?$s(c,a):c},so=({x:e,y:t},[n,i,s])=>({x:e*s+n,y:t*s+i});function zi(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function KN(e,t,n){if(typeof e=="string"||typeof e=="number"){const i=zi(e,n),s=zi(e,t);return{top:i,right:s,bottom:i,left:s,x:s*2,y:i*2}}if(typeof e=="object"){const i=zi(e.top??e.y??0,n),s=zi(e.bottom??e.y??0,n),l=zi(e.left??e.x??0,t),a=zi(e.right??e.x??0,t);return{top:i,right:a,bottom:s,left:l,x:l+a,y:i+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function GN(e,t,n,i,s,l){const{x:a,y:c}=so(e,[t,n,i]),{x:f,y:d}=so({x:e.x+e.width,y:e.y+e.height},[t,n,i]),m=s-f,p=l-d;return{left:Math.floor(a),top:Math.floor(c),right:Math.floor(m),bottom:Math.floor(p)}}const Lh=(e,t,n,i,s,l)=>{const a=KN(l,t,n),c=(t-a.x)/e.width,f=(n-a.y)/e.height,d=Math.min(c,f),m=io(d,i,s),p=e.x+e.width/2,g=e.y+e.height/2,v=t/2-p*m,S=n/2-g*m,w=GN(e,v,S,m,t,n),b={left:Math.min(w.left-a.left,0),top:Math.min(w.top-a.top,0),right:Math.min(w.right-a.right,0),bottom:Math.min(w.bottom-a.bottom,0)};return{x:v-b.left+b.right,y:S-b.top+b.bottom,zoom:m}},Ts=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function si(e){return e!=null&&e!=="parent"}function Jn(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function xw(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function bw(e,t={width:0,height:0},n,i,s){const l={...e},a=i.get(n);if(a){const c=a.origin||s;l.x+=a.internals.positionAbsolute.x-(t.width??0)*c[0],l.y+=a.internals.positionAbsolute.y-(t.height??0)*c[1]}return l}function hy(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function XN(){let e,t;return{promise:new Promise((i,s)=>{e=i,t=s}),resolve:e,reject:t}}function QN(e){return{...dw,...e||{}}}function ws(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:i,containerBounds:s}){const{x:l,y:a}=hn(e),c=po({x:l-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},i),{x:f,y:d}=n?$s(c,t):c;return{xSnapped:f,ySnapped:d,...c}}const Mh=e=>({width:e.offsetWidth,height:e.offsetHeight}),Sw=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},JN=["INPUT","SELECT","TEXTAREA"];function kw(e){var i,s;const t=((s=(i=e.composedPath)==null?void 0:i.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:JN.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Ew=e=>"clientX"in e,hn=(e,t)=>{var l,a;const n=Ew(e),i=n?e.clientX:(l=e.touches)==null?void 0:l[0].clientX,s=n?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:i-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},py=(e,t,n,i,s)=>{const l=t.querySelectorAll(`.${e}`);return!l||!l.length?null:Array.from(l).map(a=>{const c=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:s,position:a.getAttribute("data-handlepos"),x:(c.left-n.left)/i,y:(c.top-n.top)/i,...Mh(a)}})};function _w({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:c}){const f=e*.125+s*.375+a*.375+n*.125,d=t*.125+l*.375+c*.375+i*.125,m=Math.abs(f-e),p=Math.abs(d-t);return[f,d,m,p]}function ha(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function my({pos:e,x1:t,y1:n,x2:i,y2:s,c:l}){switch(e){case Se.Left:return[t-ha(t-i,l),n];case Se.Right:return[t+ha(i-t,l),n];case Se.Top:return[t,n-ha(n-s,l)];case Se.Bottom:return[t,n+ha(s-n,l)]}}function Nw({sourceX:e,sourceY:t,sourcePosition:n=Se.Bottom,targetX:i,targetY:s,targetPosition:l=Se.Top,curvature:a=.25}){const[c,f]=my({pos:n,x1:e,y1:t,x2:i,y2:s,c:a}),[d,m]=my({pos:l,x1:i,y1:s,x2:e,y2:t,c:a}),[p,g,v,S]=_w({sourceX:e,sourceY:t,targetX:i,targetY:s,sourceControlX:c,sourceControlY:f,targetControlX:d,targetControlY:m});return[`M${e},${t} C${c},${f} ${d},${m} ${i},${s}`,p,g,v,S]}function Cw({sourceX:e,sourceY:t,targetX:n,targetY:i}){const s=Math.abs(n-e)/2,l=n<e?n+s:n-s,a=Math.abs(i-t)/2,c=i<t?i+a:i-a;return[l,c,s,a]}function ZN({sourceNode:e,targetNode:t,selected:n=!1,zIndex:i=0,elevateOnSelect:s=!1,zIndexMode:l="basic"}){if(l==="manual")return i;const a=s&&n?i+1e3:i,c=Math.max(e.parentId||s&&e.selected?e.internals.z:0,t.parentId||s&&t.selected?t.internals.z:0);return a+c}function eC({sourceNode:e,targetNode:t,width:n,height:i,transform:s}){const l=du(Xa(e),Xa(t));l.x===l.x2&&(l.x2+=1),l.y===l.y2&&(l.y2+=1);const a={x:-s[0]/s[2],y:-s[1]/s[2],width:n/s[2],height:i/s[2]};return Is(a,hu(l))>0}const tC=({source:e,sourceHandle:t,target:n,targetHandle:i})=>`xy-edge__${e}${t||""}-${n}${i||""}`,nC=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),rC=(e,t,n={})=>{var l;if(!e.source||!e.target)return(l=n.onError)==null||l.call(n,"006",pn.error006()),t;const i=n.getEdgeId||tC;let s;return mw(e)?s={...e}:s={...e,id:i(e)},nC(s,t)?t:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,t.concat(s))};function Iw({sourceX:e,sourceY:t,targetX:n,targetY:i}){const[s,l,a,c]=Cw({sourceX:e,sourceY:t,targetX:n,targetY:i});return[`M ${e},${t}L ${n},${i}`,s,l,a,c]}const gy={[Se.Left]:{x:-1,y:0},[Se.Right]:{x:1,y:0},[Se.Top]:{x:0,y:-1},[Se.Bottom]:{x:0,y:1}},iC=({source:e,sourcePosition:t=Se.Bottom,target:n})=>t===Se.Left||t===Se.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},yy=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function oC({source:e,sourcePosition:t=Se.Bottom,target:n,targetPosition:i=Se.Top,center:s,offset:l,stepPosition:a}){const c=gy[t],f=gy[i],d={x:e.x+c.x*l,y:e.y+c.y*l},m={x:n.x+f.x*l,y:n.y+f.y*l},p=iC({source:d,sourcePosition:t,target:m}),g=p.x!==0?"x":"y",v=p[g];let S=[],w,b;const k={x:0,y:0},_={x:0,y:0},[,,E,N]=Cw({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(c[g]*f[g]===-1){g==="x"?(w=s.x??d.x+(m.x-d.x)*a,b=s.y??(d.y+m.y)/2):(w=s.x??(d.x+m.x)/2,b=s.y??d.y+(m.y-d.y)*a);const C=[{x:w,y:d.y},{x:w,y:m.y}],P=[{x:d.x,y:b},{x:m.x,y:b}];c[g]===v?S=g==="x"?C:P:S=g==="x"?P:C}else{const C=[{x:d.x,y:m.y}],P=[{x:m.x,y:d.y}];if(g==="x"?S=c.x===v?P:C:S=c.y===v?C:P,t===i){const j=Math.abs(e[g]-n[g]);if(j<=l){const G=Math.min(l-1,l-j);c[g]===v?k[g]=(d[g]>e[g]?-1:1)*G:_[g]=(m[g]>n[g]?-1:1)*G}}if(t!==i){const j=g==="x"?"y":"x",G=c[g]===f[j],q=d[j]>m[j],J=d[j]<m[j];(c[g]===1&&(!G&&q||G&&J)||c[g]!==1&&(!G&&J||G&&q))&&(S=g==="x"?C:P)}const F={x:d.x+k.x,y:d.y+k.y},M={x:m.x+_.x,y:m.y+_.y},$=Math.max(Math.abs(F.x-S[0].x),Math.abs(M.x-S[0].x)),Z=Math.max(Math.abs(F.y-S[0].y),Math.abs(M.y-S[0].y));$>=Z?(w=(F.x+M.x)/2,b=S[0].y):(w=S[0].x,b=(F.y+M.y)/2)}const A={x:d.x+k.x,y:d.y+k.y},L={x:m.x+_.x,y:m.y+_.y};return[[e,...A.x!==S[0].x||A.y!==S[0].y?[A]:[],...S,...L.x!==S[S.length-1].x||L.y!==S[S.length-1].y?[L]:[],n],w,b,E,N]}function sC(e,t,n,i){const s=Math.min(yy(e,t)/2,yy(t,n)/2,i),{x:l,y:a}=t;if(e.x===l&&l===n.x||e.y===a&&a===n.y)return`L${l} ${a}`;if(e.y===a){const d=e.x<n.x?-1:1,m=e.y<n.y?1:-1;return`L ${l+s*d},${a}Q ${l},${a} ${l},${a+s*m}`}const c=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${l},${a+s*f}Q ${l},${a} ${l+s*c},${a}`}function lh({sourceX:e,sourceY:t,sourcePosition:n=Se.Bottom,targetX:i,targetY:s,targetPosition:l=Se.Top,borderRadius:a=5,centerX:c,centerY:f,offset:d=20,stepPosition:m=.5}){const[p,g,v,S,w]=oC({source:{x:e,y:t},sourcePosition:n,target:{x:i,y:s},targetPosition:l,center:{x:c,y:f},offset:d,stepPosition:m});let b=`M${p[0].x} ${p[0].y}`;for(let k=1;k<p.length-1;k++)b+=sC(p[k-1],p[k],p[k+1],a);return b+=`L${p[p.length-1].x} ${p[p.length-1].y}`,[b,g,v,S,w]}function vy(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function lC(e){var p;const{sourceNode:t,targetNode:n}=e;if(!vy(t)||!vy(n))return null;const i=t.internals.handleBounds||wy(t.handles),s=n.internals.handleBounds||wy(n.handles),l=xy((i==null?void 0:i.source)??[],e.sourceHandle),a=xy(e.connectionMode===ro.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),e.targetHandle);if(!l||!a)return(p=e.onError)==null||p.call(e,"008",pn.error008(l?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(l==null?void 0:l.position)||Se.Bottom,f=(a==null?void 0:a.position)||Se.Top,d=li(t,l,c),m=li(n,a,f);return{sourceX:d.x,sourceY:d.y,targetX:m.x,targetY:m.y,sourcePosition:c,targetPosition:f}}function wy(e){if(!e)return null;const t=[],n=[];for(const i of e)i.width=i.width??1,i.height=i.height??1,i.type==="source"?t.push(i):i.type==="target"&&n.push(i);return{source:t,target:n}}function li(e,t,n=Se.Left,i=!1){const s=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,l=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:a,height:c}=t??Jn(e);if(i)return{x:s+a/2,y:l+c/2};switch((t==null?void 0:t.position)??n){case Se.Top:return{x:s+a/2,y:l};case Se.Right:return{x:s+a,y:l+c/2};case Se.Bottom:return{x:s+a/2,y:l+c};case Se.Left:return{x:s,y:l+c/2}}}function xy(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function ah(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(i=>`${i}=${e[i]}`).join("&")}`:""}function aC(e,{id:t,defaultColor:n,defaultMarkerStart:i,defaultMarkerEnd:s}){const l=new Set;return e.reduce((a,c)=>([c.markerStart||i,c.markerEnd||s].forEach(f=>{if(f&&typeof f=="object"){const d=ah(f,t);l.has(d)||(a.push({id:d,color:f.color||n,...f}),l.add(d))}}),a),[]).sort((a,c)=>a.id.localeCompare(c.id))}const Tw=1e3,uC=10,Rh={nodeOrigin:[0,0],nodeExtent:Ns,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},cC={...Rh,checkEquality:!0};function Dh(e,t){const n={...e};for(const i in t)t[i]!==void 0&&(n[i]=t[i]);return n}function fC(e,t,n){const i=Dh(Rh,n);for(const s of e.values())if(s.parentId)$h(s,e,t,i);else{const l=Ds(s,i.nodeOrigin),a=si(s.extent)?s.extent:i.nodeExtent,c=oi(l,a,Jn(s));s.internals.positionAbsolute=c}}function dC(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],i=[];for(const s of e.handles){const l={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?n.push(l):s.type==="target"&&i.push(l)}return{source:n,target:i}}function jh(e){return e==="manual"}function uh(e,t,n,i={}){var m,p;const s=Dh(cC,i),l={i:0},a=new Map(t),c=s!=null&&s.elevateNodesOnSelect&&!jh(s.zIndexMode)?Tw:0;let f=e.length>0,d=!1;t.clear(),n.clear();for(const g of e){let v=a.get(g.id);if(s.checkEquality&&g===(v==null?void 0:v.internals.userNode))t.set(g.id,v);else{const S=Ds(g,s.nodeOrigin),w=si(g.extent)?g.extent:s.nodeExtent,b=oi(S,w,Jn(g));v={...s.defaults,...g,measured:{width:(m=g.measured)==null?void 0:m.width,height:(p=g.measured)==null?void 0:p.height},internals:{positionAbsolute:b,handleBounds:dC(g,v),z:Pw(g,c,s.zIndexMode),userNode:g}},t.set(g.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(f=!1),g.parentId&&$h(v,t,n,i,l),d||(d=g.selected??!1)}return{nodesInitialized:f,hasSelectedNodes:d}}function hC(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function $h(e,t,n,i,s){const{elevateNodesOnSelect:l,nodeOrigin:a,nodeExtent:c,zIndexMode:f}=Dh(Rh,i),d=e.parentId,m=t.get(d);if(!m){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}hC(e,n),s&&!m.parentId&&m.internals.rootParentIndex===void 0&&f==="auto"&&(m.internals.rootParentIndex=++s.i,m.internals.z=m.internals.z+s.i*uC),s&&m.internals.rootParentIndex!==void 0&&(s.i=m.internals.rootParentIndex);const p=l&&!jh(f)?Tw:0,{x:g,y:v,z:S}=pC(e,m,a,c,p,f),{positionAbsolute:w}=e.internals,b=g!==w.x||v!==w.y;(b||S!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:g,y:v}:w,z:S}})}function Pw(e,t,n){const i=dn(e.zIndex)?e.zIndex:0;return jh(n)?i:i+(e.selected?t:0)}function pC(e,t,n,i,s,l){const{x:a,y:c}=t.internals.positionAbsolute,f=Jn(e),d=Ds(e,n),m=si(e.extent)?oi(d,e.extent,f):d;let p=oi({x:a+m.x,y:c+m.y},i,f);e.extent==="parent"&&(p=yw(p,f,t));const g=Pw(e,s,l),v=t.internals.z??0;return{x:p.x,y:p.y,z:v>=g?v+1:g}}function zh(e,t,n,i=[0,0]){var a;const s=[],l=new Map;for(const c of e){const f=t.get(c.parentId);if(!f)continue;const d=((a=l.get(c.parentId))==null?void 0:a.expandedRect)??oo(f),m=vw(d,c.rect);l.set(c.parentId,{expandedRect:m,parent:f})}return l.size>0&&l.forEach(({expandedRect:c,parent:f},d)=>{var E;const m=f.internals.positionAbsolute,p=Jn(f),g=f.origin??i,v=c.x<m.x?Math.round(Math.abs(m.x-c.x)):0,S=c.y<m.y?Math.round(Math.abs(m.y-c.y)):0,w=Math.max(p.width,Math.round(c.width)),b=Math.max(p.height,Math.round(c.height)),k=(w-p.width)*g[0],_=(b-p.height)*g[1];(v>0||S>0||k||_)&&(s.push({id:d,type:"position",position:{x:f.position.x-v+k,y:f.position.y-S+_}}),(E=n.get(d))==null||E.forEach(N=>{e.some(A=>A.id===N.id)||s.push({id:N.id,type:"position",position:{x:N.position.x+v,y:N.position.y+S}})})),(p.width<c.width||p.height<c.height||v||S)&&s.push({id:d,type:"dimensions",setAttributes:!0,dimensions:{width:w+(v?g[0]*v-k:0),height:b+(S?g[1]*S-_:0)}})}),s}function mC(e,t,n,i,s,l,a){const c=i==null?void 0:i.querySelector(".xyflow__viewport");let f=!1;if(!c)return{changes:[],updatedInternals:f};const d=[],m=window.getComputedStyle(c),{m22:p}=new window.DOMMatrixReadOnly(m.transform),g=[];for(const v of e.values()){const S=t.get(v.id);if(!S)continue;if(S.hidden){t.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),f=!0;continue}const w=Mh(v.nodeElement),b=S.measured.width!==w.width||S.measured.height!==w.height;if(!!(w.width&&w.height&&(b||!S.internals.handleBounds||v.force))){const _=v.nodeElement.getBoundingClientRect(),E=si(S.extent)?S.extent:l;let{positionAbsolute:N}=S.internals;S.parentId&&S.extent==="parent"?N=yw(N,w,t.get(S.parentId)):E&&(N=oi(N,E,w));const A={...S,measured:w,internals:{...S.internals,positionAbsolute:N,handleBounds:{source:py("source",v.nodeElement,_,p,S.id),target:py("target",v.nodeElement,_,p,S.id)}}};t.set(S.id,A),S.parentId&&$h(A,t,n,{nodeOrigin:s,zIndexMode:a}),f=!0,b&&(d.push({id:S.id,type:"dimensions",dimensions:w}),S.expandParent&&S.parentId&&g.push({id:S.id,parentId:S.parentId,rect:oo(A,s)}))}}if(g.length>0){const v=zh(g,t,n,s);d.push(...v)}return{changes:d,updatedInternals:f}}async function gC({delta:e,panZoom:t,transform:n,translateExtent:i,width:s,height:l}){if(!t||!e.x&&!e.y)return!1;const a=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[s,l]],i);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])}function by(e,t,n,i,s,l){let a=s;const c=i.get(a)||new Map;i.set(a,c.set(n,t)),a=`${s}-${e}`;const f=i.get(a)||new Map;if(i.set(a,f.set(n,t)),l){a=`${s}-${e}-${l}`;const d=i.get(a)||new Map;i.set(a,d.set(n,t))}}function Aw(e,t,n){e.clear(),t.clear();for(const i of n){const{source:s,target:l,sourceHandle:a=null,targetHandle:c=null}=i,f={edgeId:i.id,source:s,target:l,sourceHandle:a,targetHandle:c},d=`${s}-${a}--${l}-${c}`,m=`${l}-${c}--${s}-${a}`;by("source",f,m,e,s,a),by("target",f,d,e,l,c),t.set(i.id,i)}}function Ow(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Ow(n,t):!1}function Sy(e,t,n){var s;let i=e;do{if((s=i==null?void 0:i.matches)!=null&&s.call(i,t))return!0;if(i===n)return!1;i=i==null?void 0:i.parentElement}while(i);return!1}function yC(e,t,n,i){const s=new Map;for(const[l,a]of e)if((a.selected||a.id===i)&&(!a.parentId||!Ow(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){const c=e.get(l);c&&s.set(l,{id:l,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return s}function Rf({nodeId:e,dragItems:t,nodeLookup:n,dragging:i=!0}){var a,c,f;const s=[];for(const[d,m]of t){const p=(a=n.get(d))==null?void 0:a.internals.userNode;p&&s.push({...p,position:m.position,dragging:i})}if(!e)return[s[0],s];const l=(c=n.get(e))==null?void 0:c.internals.userNode;return[l?{...l,position:((f=t.get(e))==null?void 0:f.position)||l.position,dragging:i}:s[0],s]}function vC({dragItems:e,snapGrid:t,x:n,y:i}){const s=e.values().next().value;if(!s)return null;const l={x:n-s.distance.x,y:i-s.distance.y},a=$s(l,t);return{x:a.x-l.x,y:a.y-l.y}}function wC({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:i,onDragStop:s}){let l={x:null,y:null},a=0,c=new Map,f=!1,d={x:0,y:0},m=null,p=!1,g=null,v=!1,S=!1,w=null;function b({noDragClassName:_,handleSelector:E,domNode:N,isSelectable:A,nodeId:L,nodeClickDistance:R=0}){g=Ft(N);function C({x:$,y:Z}){const{nodeLookup:j,nodeExtent:G,snapGrid:q,snapToGrid:J,nodeOrigin:Y,onNodeDrag:W,onSelectionDrag:B,onError:D,updateNodePositions:H}=t();l={x:$,y:Z};let V=!1;const K=c.size>1,Q=K&&G?sh(js(c)):null,re=K&&J?vC({dragItems:c,snapGrid:q,x:$,y:Z}):null;for(const[se,ee]of c){if(!j.has(se))continue;let oe={x:$-ee.distance.x,y:Z-ee.distance.y};J&&(oe=re?{x:Math.round(oe.x+re.x),y:Math.round(oe.y+re.y)}:$s(oe,q));let de=null;if(K&&G&&!ee.extent&&Q){const{positionAbsolute:fe}=ee.internals,ke=fe.x-Q.x+G[0][0],Pe=fe.x+ee.measured.width-Q.x2+G[1][0],Ae=fe.y-Q.y+G[0][1],$e=fe.y+ee.measured.height-Q.y2+G[1][1];de=[[ke,Ae],[Pe,$e]]}const{position:xe,positionAbsolute:he}=gw({nodeId:se,nextPosition:oe,nodeLookup:j,nodeExtent:de||G,nodeOrigin:Y,onError:D});V=V||ee.position.x!==xe.x||ee.position.y!==xe.y,ee.position=xe,ee.internals.positionAbsolute=he}if(S=S||V,!!V&&(H(c,!0),w&&(i||W||!L&&B))){const[se,ee]=Rf({nodeId:L,dragItems:c,nodeLookup:j});i==null||i(w,c,se,ee),W==null||W(w,se,ee),L||B==null||B(w,ee)}}async function P(){if(!m)return;const{transform:$,panBy:Z,autoPanSpeed:j,autoPanOnNodeDrag:G}=t();if(!G){f=!1,cancelAnimationFrame(a);return}const[q,J]=Oh(d,m,j);(q!==0||J!==0)&&(l.x=(l.x??0)-q/$[2],l.y=(l.y??0)-J/$[2],await Z({x:q,y:J})&&C(l)),a=requestAnimationFrame(P)}function F($){var K;const{nodeLookup:Z,multiSelectionActive:j,nodesDraggable:G,transform:q,snapGrid:J,snapToGrid:Y,selectNodesOnDrag:W,onNodeDragStart:B,onSelectionDragStart:D,unselectNodesAndEdges:H}=t();p=!0,(!W||!A)&&!j&&L&&((K=Z.get(L))!=null&&K.selected||H()),A&&W&&L&&(e==null||e(L));const V=ws($.sourceEvent,{transform:q,snapGrid:J,snapToGrid:Y,containerBounds:m});if(l=V,c=yC(Z,G,V,L),c.size>0&&(n||B||!L&&D)){const[Q,re]=Rf({nodeId:L,dragItems:c,nodeLookup:Z});n==null||n($.sourceEvent,c,Q,re),B==null||B($.sourceEvent,Q,re),L||D==null||D($.sourceEvent,re)}}const M=Gv().clickDistance(R).on("start",$=>{const{domNode:Z,nodeDragThreshold:j,transform:G,snapGrid:q,snapToGrid:J}=t();m=(Z==null?void 0:Z.getBoundingClientRect())||null,v=!1,S=!1,w=$.sourceEvent,j===0&&F($),l=ws($.sourceEvent,{transform:G,snapGrid:q,snapToGrid:J,containerBounds:m}),d=hn($.sourceEvent,m)}).on("drag",$=>{const{autoPanOnNodeDrag:Z,transform:j,snapGrid:G,snapToGrid:q,nodeDragThreshold:J,nodeLookup:Y}=t(),W=ws($.sourceEvent,{transform:j,snapGrid:G,snapToGrid:q,containerBounds:m});if(w=$.sourceEvent,($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||L&&!Y.has(L))&&(v=!0),!v){if(!f&&Z&&p&&(f=!0,P()),!p){const B=hn($.sourceEvent,m),D=B.x-d.x,H=B.y-d.y;Math.sqrt(D*D+H*H)>J&&F($)}(l.x!==W.xSnapped||l.y!==W.ySnapped)&&c&&p&&(d=hn($.sourceEvent,m),C(W))}}).on("end",$=>{if(!p||v){v&&c.size>0&&t().updateNodePositions(c,!1);return}if(f=!1,p=!1,cancelAnimationFrame(a),c.size>0){const{nodeLookup:Z,updateNodePositions:j,onNodeDragStop:G,onSelectionDragStop:q}=t();if(S&&(j(c,!1),S=!1),s||G||!L&&q){const[J,Y]=Rf({nodeId:L,dragItems:c,nodeLookup:Z,dragging:!1});s==null||s($.sourceEvent,c,J,Y),G==null||G($.sourceEvent,J,Y),L||q==null||q($.sourceEvent,Y)}}}).filter($=>{const Z=$.target;return!$.button&&(!_||!Sy(Z,`.${_}`,N))&&(!E||Sy(Z,E,N))});g.call(M)}function k(){g==null||g.on(".drag",null)}return{update:b,destroy:k}}function xC(e,t,n){const i=[],s={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const l of t.values())Is(s,oo(l))>0&&i.push(l);return i}const bC=250;function SC(e,t,n,i){var c,f;let s=[],l=1/0;const a=xC(e,n,t+bC);for(const d of a){const m=[...((c=d.internals.handleBounds)==null?void 0:c.source)??[],...((f=d.internals.handleBounds)==null?void 0:f.target)??[]];for(const p of m){if(i.nodeId===p.nodeId&&i.type===p.type&&i.id===p.id)continue;const{x:g,y:v}=li(d,p,p.position,!0),S=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(v-e.y,2));S>t||(S<l?(s=[{...p,x:g,y:v}],l=S):S===l&&s.push({...p,x:g,y:v}))}}if(!s.length)return null;if(s.length>1){const d=i.type==="source"?"target":"source";return s.find(m=>m.type===d)??s[0]}return s[0]}function Lw(e,t,n,i,s,l=!1){var d,m,p;const a=i.get(e);if(!a)return null;const c=s==="strict"?(d=a.internals.handleBounds)==null?void 0:d[t]:[...((m=a.internals.handleBounds)==null?void 0:m.source)??[],...((p=a.internals.handleBounds)==null?void 0:p.target)??[]],f=(n?c==null?void 0:c.find(g=>g.id===n):c==null?void 0:c[0])??null;return f&&l?{...f,...li(a,f,f.position,!0)}:f}function Mw(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function kC(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Rw=()=>!0;function EC(e,{connectionMode:t,connectionRadius:n,handleId:i,nodeId:s,edgeUpdaterType:l,isTarget:a,domNode:c,nodeLookup:f,lib:d,autoPanOnConnect:m,flowId:p,panBy:g,cancelConnection:v,onConnectStart:S,onConnect:w,onConnectEnd:b,isValidConnection:k=Rw,onReconnectEnd:_,updateConnection:E,getTransform:N,getFromHandle:A,autoPanSpeed:L,dragThreshold:R=1,handleDomNode:C}){const P=Sw(e.target);let F=0,M;const{x:$,y:Z}=hn(e),j=Mw(l,C),G=c==null?void 0:c.getBoundingClientRect();let q=!1;if(!G||!j)return;const J=Lw(s,j,i,f,t);if(!J)return;let Y=hn(e,G),W=!1,B=null,D=!1,H=null;function V(){if(!m||!G)return;const[xe,he]=Oh(Y,G,L);g({x:xe,y:he}),F=requestAnimationFrame(V)}const K={...J,nodeId:s,type:j,position:J.position},Q=f.get(s);let se={inProgress:!0,isValid:null,from:li(Q,K,Se.Left,!0),fromHandle:K,fromPosition:K.position,fromNode:Q,to:Y,toHandle:null,toPosition:cy[K.position],toNode:null,pointer:Y};function ee(){q=!0,E(se),S==null||S(e,{nodeId:s,handleId:i,handleType:j})}R===0&&ee();function oe(xe){if(!q){const{x:$e,y:yt}=hn(xe),kt=$e-$,ft=yt-Z;if(!(kt*kt+ft*ft>R*R))return;ee()}if(!A()||!K){de(xe);return}const he=N();Y=hn(xe,G),M=SC(po(Y,he,!1,[1,1]),n,f,K),W||(V(),W=!0);const fe=Dw(xe,{handle:M,connectionMode:t,fromNodeId:s,fromHandleId:i,fromType:a?"target":"source",isValidConnection:k,doc:P,lib:d,flowId:p,nodeLookup:f});H=fe.handleDomNode,B=fe.connection,D=kC(!!M,fe.isValid);const ke=f.get(s),Pe=ke?li(ke,K,Se.Left,!0):se.from,Ae={...se,from:Pe,isValid:D,to:fe.toHandle&&D?so({x:fe.toHandle.x,y:fe.toHandle.y},he):Y,toHandle:fe.toHandle,toPosition:D&&fe.toHandle?fe.toHandle.position:cy[K.position],toNode:fe.toHandle?f.get(fe.toHandle.nodeId):null,pointer:Y};E(Ae),se=Ae}function de(xe){if(!("touches"in xe&&xe.touches.length>0)){if(q){(M||H)&&B&&D&&(w==null||w(B));const{inProgress:he,...fe}=se,ke={...fe,toPosition:se.toHandle?se.toPosition:null};b==null||b(xe,ke),l&&(_==null||_(xe,ke))}v(),cancelAnimationFrame(F),W=!1,D=!1,B=null,H=null,P.removeEventListener("mousemove",oe),P.removeEventListener("mouseup",de),P.removeEventListener("touchmove",oe),P.removeEventListener("touchend",de)}}P.addEventListener("mousemove",oe),P.addEventListener("mouseup",de),P.addEventListener("touchmove",oe),P.addEventListener("touchend",de)}function Dw(e,{handle:t,connectionMode:n,fromNodeId:i,fromHandleId:s,fromType:l,doc:a,lib:c,flowId:f,isValidConnection:d=Rw,nodeLookup:m}){const p=l==="target",g=t?a.querySelector(`.${c}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:v,y:S}=hn(e),w=a.elementFromPoint(v,S),b=w!=null&&w.classList.contains(`${c}-flow__handle`)?w:g,k={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const _=Mw(void 0,b),E=b.getAttribute("data-nodeid"),N=b.getAttribute("data-handleid"),A=b.classList.contains("connectable"),L=b.classList.contains("connectableend");if(!E||!_)return k;const R={source:p?E:i,sourceHandle:p?N:s,target:p?i:E,targetHandle:p?s:N};k.connection=R;const P=A&&L&&(n===ro.Strict?p&&_==="source"||!p&&_==="target":E!==i||N!==s);k.isValid=P&&d(R),k.toHandle=Lw(E,_,N,m,n,!0)}return k}const ch={onPointerDown:EC,isValid:Dw};function _C({domNode:e,panZoom:t,getTransform:n,getViewScale:i}){const s=Ft(e);function l({translateExtent:c,width:f,height:d,zoomStep:m=1,pannable:p=!0,zoomable:g=!0,inversePan:v=!1}){const S=E=>{if(E.sourceEvent.type!=="wheel"||!t)return;const N=n(),A=E.sourceEvent.ctrlKey&&Ts()?10:1,L=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*m,R=N[2]*Math.pow(2,L*A);t.scaleTo(R)};let w=[0,0];const b=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(w=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},k=E=>{const N=n();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const A=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],L=[A[0]-w[0],A[1]-w[1]];w=A;const R=i()*Math.max(N[2],Math.log(N[2]))*(v?-1:1),C={x:N[0]-L[0]*R,y:N[1]-L[1]*R},P=[[0,0],[f,d]];t.setViewportConstrained({x:C.x,y:C.y,zoom:N[2]},P,c)},_=cw().on("start",b).on("zoom",p?k:null).on("zoom.wheel",g?S:null);s.call(_,{})}function a(){s.on("zoom",null)}return{update:l,destroy:a,pointer:cn}}const pu=e=>({x:e.x,y:e.y,zoom:e.k}),Df=({x:e,y:t,zoom:n})=>fu.translate(e,t).scale(n),Ui=(e,t)=>e.target.closest(`.${t}`),jw=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),NC=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,jf=(e,t=0,n=NC,i=()=>{})=>{const s=typeof t=="number"&&t>0;return s||i(),s?e.transition().duration(t).ease(n).on("end",i):e},$w=e=>{const t=e.ctrlKey&&Ts()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function CC({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:i,panOnScrollMode:s,panOnScrollSpeed:l,zoomOnPinch:a,onPanZoomStart:c,onPanZoom:f,onPanZoomEnd:d}){return m=>{if(Ui(m,t))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(m.ctrlKey&&a){const b=cn(m),k=$w(m),_=p*Math.pow(2,k);i.scaleTo(n,_,b,m);return}const g=m.deltaMode===1?20:1;let v=s===ni.Vertical?0:m.deltaX*g,S=s===ni.Horizontal?0:m.deltaY*g;!Ts()&&m.shiftKey&&s!==ni.Vertical&&(v=m.deltaY*g,S=0),i.translateBy(n,-(v/p)*l,-(S/p)*l,{internal:!0});const w=pu(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(f==null||f(m,w),e.panScrollTimeout=setTimeout(()=>{d==null||d(m,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,c==null||c(m,w))}}function IC({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(i,s){const l=i.type==="wheel",a=!t&&l&&!i.ctrlKey,c=Ui(i,e);if(i.ctrlKey&&l&&c&&i.preventDefault(),a||c)return null;i.preventDefault(),n.call(this,i,s)}}function TC({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return i=>{var l,a,c;if((l=i.sourceEvent)!=null&&l.internal)return;const s=pu(i.transform);e.mouseButton=((a=i.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((c=i.sourceEvent)==null?void 0:c.type)==="mousedown"&&t(!0),n&&(n==null||n(i.sourceEvent,s))}}function PC({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:i,onPanZoom:s}){return l=>{var a,c;e.usedRightMouseButton=!!(n&&jw(t,e.mouseButton??0)),(a=l.sourceEvent)!=null&&a.sync||i([l.transform.x,l.transform.y,l.transform.k]),s&&!((c=l.sourceEvent)!=null&&c.internal)&&(s==null||s(l.sourceEvent,pu(l.transform)))}}function AC({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:i,onPanZoomEnd:s,onPaneContextMenu:l}){return a=>{var c;if(!((c=a.sourceEvent)!=null&&c.internal)&&(e.isZoomingOrPanning=!1,l&&jw(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&l(a.sourceEvent),e.usedRightMouseButton=!1,i(!1),s)){const f=pu(a.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,f)},n?150:0)}}}function OC({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:i,panOnScroll:s,zoomOnDoubleClick:l,userSelectionActive:a,noWheelClassName:c,noPanClassName:f,lib:d,connectionInProgress:m}){return p=>{var b;const g=e||t,v=n&&p.ctrlKey,S=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Ui(p,`${d}-flow__node`)||Ui(p,`${d}-flow__edge`)))return!0;if(!i&&!g&&!s&&!l&&!n||a||m&&!S||Ui(p,c)&&S||Ui(p,f)&&(!S||s&&S&&!e)||!n&&p.ctrlKey&&S)return!1;if(!n&&p.type==="touchstart"&&((b=p.touches)==null?void 0:b.length)>1)return p.preventDefault(),!1;if(!g&&!s&&!v&&S||!i&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(i)&&!i.includes(p.button)&&p.type==="mousedown")return!1;const w=Array.isArray(i)&&i.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||S)&&w}}function LC({domNode:e,minZoom:t,maxZoom:n,translateExtent:i,viewport:s,onPanZoom:l,onPanZoomStart:a,onPanZoomEnd:c,onDraggingChange:f}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=e.getBoundingClientRect(),p=cw().scaleExtent([t,n]).translateExtent(i),g=Ft(e).call(p);_({x:s.x,y:s.y,zoom:io(s.zoom,t,n)},[[0,0],[m.width,m.height]],i);const v=g.on("wheel.zoom"),S=g.on("dblclick.zoom");p.wheelDelta($w);async function w(M,$){return g?new Promise(Z=>{p==null||p.interpolate(($==null?void 0:$.interpolate)==="linear"?vs:La).transform(jf(g,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>Z(!0)),M)}):!1}function b({noWheelClassName:M,noPanClassName:$,onPaneContextMenu:Z,userSelectionActive:j,panOnScroll:G,panOnDrag:q,panOnScrollMode:J,panOnScrollSpeed:Y,preventScrolling:W,zoomOnPinch:B,zoomOnScroll:D,zoomOnDoubleClick:H,zoomActivationKeyPressed:V,lib:K,onTransformChange:Q,connectionInProgress:re,paneClickDistance:se,selectionOnDrag:ee}){j&&!d.isZoomingOrPanning&&k();const oe=G&&!V&&!j;p.clickDistance(ee?1/0:!dn(se)||se<0?0:se);const de=oe?CC({zoomPanValues:d,noWheelClassName:M,d3Selection:g,d3Zoom:p,panOnScrollMode:J,panOnScrollSpeed:Y,zoomOnPinch:B,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}):IC({noWheelClassName:M,preventScrolling:W,d3ZoomHandler:v});g.on("wheel.zoom",de,{passive:!1});const xe=TC({zoomPanValues:d,onDraggingChange:f,onPanZoomStart:a});p.on("start",xe);const he=PC({zoomPanValues:d,panOnDrag:q,onPaneContextMenu:!!Z,onPanZoom:l,onTransformChange:Q});p.on("zoom",he);const fe=AC({zoomPanValues:d,panOnDrag:q,panOnScroll:G,onPaneContextMenu:Z,onPanZoomEnd:c,onDraggingChange:f});p.on("end",fe);const ke=OC({zoomActivationKeyPressed:V,panOnDrag:q,zoomOnScroll:D,panOnScroll:G,zoomOnDoubleClick:H,zoomOnPinch:B,userSelectionActive:j,noPanClassName:$,noWheelClassName:M,lib:K,connectionInProgress:re});p.filter(ke),H?g.on("dblclick.zoom",S):g.on("dblclick.zoom",null)}function k(){p.on("zoom",null)}async function _(M,$,Z){const j=Df(M),G=p==null?void 0:p.constrain()(j,$,Z);return G&&await w(G),G}async function E(M,$){const Z=Df(M);return await w(Z,$),Z}function N(M){if(g){const $=Df(M),Z=g.property("__zoom");(Z.k!==M.zoom||Z.x!==M.x||Z.y!==M.y)&&(p==null||p.transform(g,$,null,{sync:!0}))}}function A(){const M=g?uw(g.node()):{x:0,y:0,k:1};return{x:M.x,y:M.y,zoom:M.k}}async function L(M,$){return g?new Promise(Z=>{p==null||p.interpolate(($==null?void 0:$.interpolate)==="linear"?vs:La).scaleTo(jf(g,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>Z(!0)),M)}):!1}async function R(M,$){return g?new Promise(Z=>{p==null||p.interpolate(($==null?void 0:$.interpolate)==="linear"?vs:La).scaleBy(jf(g,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>Z(!0)),M)}):!1}function C(M){p==null||p.scaleExtent(M)}function P(M){p==null||p.translateExtent(M)}function F(M){const $=!dn(M)||M<0?0:M;p==null||p.clickDistance($)}return{update:b,destroy:k,setViewport:E,setViewportConstrained:_,getViewport:A,scaleTo:L,scaleBy:R,setScaleExtent:C,setTranslateExtent:P,syncViewport:N,setClickDistance:F}}var lo;(function(e){e.Line="line",e.Handle="handle"})(lo||(lo={}));function MC({width:e,prevWidth:t,height:n,prevHeight:i,affectsX:s,affectsY:l}){const a=e-t,c=n-i,f=[a>0?1:a<0?-1:0,c>0?1:c<0?-1:0];return a&&s&&(f[0]=f[0]*-1),c&&l&&(f[1]=f[1]*-1),f}function ky(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),i=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:i,affectsY:s}}function xr(e,t){return Math.max(0,t-e)}function br(e,t){return Math.max(0,e-t)}function pa(e,t,n){return Math.max(0,t-e,e-n)}function Ey(e,t){return e?!t:t}function RC(e,t,n,i,s,l,a,c){let{affectsX:f,affectsY:d}=t;const{isHorizontal:m,isVertical:p}=t,g=m&&p,{xSnapped:v,ySnapped:S}=n,{minWidth:w,maxWidth:b,minHeight:k,maxHeight:_}=i,{x:E,y:N,width:A,height:L,aspectRatio:R}=e;let C=Math.floor(m?v-e.pointerX:0),P=Math.floor(p?S-e.pointerY:0);const F=A+(f?-C:C),M=L+(d?-P:P),$=-l[0]*A,Z=-l[1]*L;let j=pa(F,w,b),G=pa(M,k,_);if(a){let Y=0,W=0;f&&C<0?Y=xr(E+C+$,a[0][0]):!f&&C>0&&(Y=br(E+F+$,a[1][0])),d&&P<0?W=xr(N+P+Z,a[0][1]):!d&&P>0&&(W=br(N+M+Z,a[1][1])),j=Math.max(j,Y),G=Math.max(G,W)}if(c){let Y=0,W=0;f&&C>0?Y=br(E+C,c[0][0]):!f&&C<0&&(Y=xr(E+F,c[1][0])),d&&P>0?W=br(N+P,c[0][1]):!d&&P<0&&(W=xr(N+M,c[1][1])),j=Math.max(j,Y),G=Math.max(G,W)}if(s){if(m){const Y=pa(F/R,k,_)*R;if(j=Math.max(j,Y),a){let W=0;!f&&!d||f&&!d&&g?W=br(N+Z+F/R,a[1][1])*R:W=xr(N+Z+(f?C:-C)/R,a[0][1])*R,j=Math.max(j,W)}if(c){let W=0;!f&&!d||f&&!d&&g?W=xr(N+F/R,c[1][1])*R:W=br(N+(f?C:-C)/R,c[0][1])*R,j=Math.max(j,W)}}if(p){const Y=pa(M*R,w,b)/R;if(G=Math.max(G,Y),a){let W=0;!f&&!d||d&&!f&&g?W=br(E+M*R+$,a[1][0])/R:W=xr(E+(d?P:-P)*R+$,a[0][0])/R,G=Math.max(G,W)}if(c){let W=0;!f&&!d||d&&!f&&g?W=xr(E+M*R,c[1][0])/R:W=br(E+(d?P:-P)*R,c[0][0])/R,G=Math.max(G,W)}}}P=P+(P<0?G:-G),C=C+(C<0?j:-j),s&&(g?F>M*R?P=(Ey(f,d)?-C:C)/R:C=(Ey(f,d)?-P:P)*R:m?(P=C/R,d=f):(C=P*R,f=d));const q=f?E+C:E,J=d?N+P:N;return{width:A+(f?-C:C),height:L+(d?-P:P),x:l[0]*C*(f?-1:1)+q,y:l[1]*P*(d?-1:1)+J}}const zw={width:0,height:0,x:0,y:0},DC={...zw,pointerX:0,pointerY:0,aspectRatio:1};function jC(e,t,n){const i=t.position.x+e.position.x,s=t.position.y+e.position.y,l=e.measured.width??0,a=e.measured.height??0,c=n[0]*l,f=n[1]*a;return[[i-c,s-f],[i+l-c,s+a-f]]}function $C({domNode:e,nodeId:t,getStoreItems:n,onChange:i,onEnd:s}){const l=Ft(e);let a={controlDirection:ky("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:d,boundaries:m,keepAspectRatio:p,resizeDirection:g,onResizeStart:v,onResize:S,onResizeEnd:w,shouldResize:b}){let k={...zw},_={...DC};a={boundaries:m,resizeDirection:g,keepAspectRatio:p,controlDirection:ky(d)};let E,N=null,A=[],L,R,C,P=!1;const F=Gv().on("start",M=>{const{nodeLookup:$,transform:Z,snapGrid:j,snapToGrid:G,nodeOrigin:q,paneDomNode:J}=n();if(E=$.get(t),!E)return;N=(J==null?void 0:J.getBoundingClientRect())??null;const{xSnapped:Y,ySnapped:W}=ws(M.sourceEvent,{transform:Z,snapGrid:j,snapToGrid:G,containerBounds:N});k={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},_={...k,pointerX:Y,pointerY:W,aspectRatio:k.width/k.height},L=void 0,R=si(E.extent)?E.extent:void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(L=$.get(E.parentId)),L&&E.extent==="parent"&&(R=[[0,0],[L.measured.width,L.measured.height]]),A=[],C=void 0;for(const[B,D]of $)if(D.parentId===t&&(A.push({id:B,position:{...D.position},extent:D.extent}),D.extent==="parent"||D.expandParent)){const H=jC(D,E,D.origin??q);C?C=[[Math.min(H[0][0],C[0][0]),Math.min(H[0][1],C[0][1])],[Math.max(H[1][0],C[1][0]),Math.max(H[1][1],C[1][1])]]:C=H}v==null||v(M,{...k})}).on("drag",M=>{const{transform:$,snapGrid:Z,snapToGrid:j,nodeOrigin:G}=n(),q=ws(M.sourceEvent,{transform:$,snapGrid:Z,snapToGrid:j,containerBounds:N}),J=[];if(!E)return;const{x:Y,y:W,width:B,height:D}=k,H={},V=E.origin??G,{width:K,height:Q,x:re,y:se}=RC(_,a.controlDirection,q,a.boundaries,a.keepAspectRatio,V,R,C),ee=K!==B,oe=Q!==D,de=re!==Y&&ee,xe=se!==W&&oe;if(!de&&!xe&&!ee&&!oe)return;if((de||xe||V[0]===1||V[1]===1)&&(H.x=de?re:k.x,H.y=xe?se:k.y,k.x=H.x,k.y=H.y,A.length>0)){const Pe=re-Y,Ae=se-W;for(const $e of A)$e.position={x:$e.position.x-Pe+V[0]*(K-B),y:$e.position.y-Ae+V[1]*(Q-D)},J.push($e)}if((ee||oe)&&(H.width=ee&&(!a.resizeDirection||a.resizeDirection==="horizontal")?K:k.width,H.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?Q:k.height,k.width=H.width,k.height=H.height),L&&E.expandParent){const Pe=V[0]*(H.width??0);H.x&&H.x<Pe&&(k.x=Pe,_.x=_.x-(H.x-Pe));const Ae=V[1]*(H.height??0);H.y&&H.y<Ae&&(k.y=Ae,_.y=_.y-(H.y-Ae))}const he=MC({width:k.width,prevWidth:B,height:k.height,prevHeight:D,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),fe={...k,direction:he};(b==null?void 0:b(M,fe))!==!1&&(P=!0,S==null||S(M,fe),i(H,J))}).on("end",M=>{P&&(w==null||w(M,{...k}),s==null||s({...k}),P=!1)});l.call(F)}function f(){l.on(".drag",null)}return{update:c,destroy:f}}var $f={exports:{}},zf={},Ff={exports:{}},Bf={};/**
|
|
41
41
|
* @license React
|
|
42
42
|
* use-sync-external-store-shim.production.js
|
|
43
43
|
*
|
|
@@ -45,7 +45,7 @@ Error generating stack: `+w.message+`
|
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var
|
|
48
|
+
*/var _y;function zC(){if(_y)return Bf;_y=1;var e=Ls();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,a=e.useDebugValue;function c(p,g){var v=g(),S=i({inst:{value:v,getSnapshot:g}}),w=S[0].inst,b=S[1];return l(function(){w.value=v,w.getSnapshot=g,f(w)&&b({inst:w})},[p,v,g]),s(function(){return f(w)&&b({inst:w}),p(function(){f(w)&&b({inst:w})})},[p]),a(v),v}function f(p){var g=p.getSnapshot;p=p.value;try{var v=g();return!n(p,v)}catch{return!0}}function d(p,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return Bf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Bf}var Ny;function FC(){return Ny||(Ny=1,Ff.exports=zC()),Ff.exports}/**
|
|
49
49
|
* @license React
|
|
50
50
|
* use-sync-external-store-shim/with-selector.production.js
|
|
51
51
|
*
|
|
@@ -53,14 +53,14 @@ Error generating stack: `+w.message+`
|
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the MIT license found in the
|
|
55
55
|
* LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/var
|
|
56
|
+
*/var Cy;function BC(){if(Cy)return zf;Cy=1;var e=Ls(),t=FC();function n(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var i=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,l=e.useRef,a=e.useEffect,c=e.useMemo,f=e.useDebugValue;return zf.useSyncExternalStoreWithSelector=function(d,m,p,g,v){var S=l(null);if(S.current===null){var w={hasValue:!1,value:null};S.current=w}else w=S.current;S=c(function(){function k(L){if(!_){if(_=!0,E=L,L=g(L),v!==void 0&&w.hasValue){var R=w.value;if(v(R,L))return N=R}return N=L}if(R=N,i(E,L))return R;var C=g(L);return v!==void 0&&v(R,C)?(E=L,R):(E=L,N=C)}var _=!1,E,N,A=p===void 0?null:p;return[function(){return k(m())},A===null?void 0:function(){return k(A())}]},[m,p,g,v]);var b=s(d,S[0],S[1]);return a(function(){w.hasValue=!0,w.value=b},[b]),f(b),b},zf}var Iy;function VC(){return Iy||(Iy=1,$f.exports=BC()),$f.exports}var HC=VC();const WC=su(HC),UC={},Ty=e=>{let t;const n=new Set,i=(m,p)=>{const g=typeof m=="function"?m(t):m;if(!Object.is(g,t)){const v=t;t=p??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(S=>S(t,v))}},s=()=>t,f={setState:i,getState:s,getInitialState:()=>d,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(UC?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(i,s,f);return f},qC=e=>e?Ty(e):Ty,{useDebugValue:YC}=bh,{useSyncExternalStoreWithSelector:KC}=WC,GC=e=>e;function Fw(e,t=GC,n){const i=KC(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return YC(i),i}const Py=(e,t)=>{const n=qC(e),i=(s,l=t)=>Fw(n,s,l);return Object.assign(i,n),i},XC=(e,t)=>e?Py(e,t):Py;function Ve(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1;return!0}var Bw=Mv();const mu=T.createContext(null),QC=mu.Provider,Vw=pn.error001("react");function Oe(e,t){const n=T.useContext(mu);if(n===null)throw new Error(Vw);return Fw(n,e,t)}function He(){const e=T.useContext(mu);if(e===null)throw new Error(Vw);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Ay={display:"none"},JC={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Hw="react-flow__node-desc",Ww="react-flow__edge-desc",ZC="react-flow__aria-live",e2=e=>e.ariaLiveMessage,t2=e=>e.ariaLabelConfig;function n2({rfId:e}){const t=Oe(e2);return O.jsx("div",{id:`${ZC}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:JC,children:t})}function r2({rfId:e,disableKeyboardA11y:t}){const n=Oe(t2);return O.jsxs(O.Fragment,{children:[O.jsx("div",{id:`${Hw}-${e}`,style:Ay,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),O.jsx("div",{id:`${Ww}-${e}`,style:Ay,children:n["edge.a11yDescription.default"]}),!t&&O.jsx(n2,{rfId:e})]})}const gu=T.forwardRef(({position:e="top-left",children:t,className:n,style:i,...s},l)=>{const a=`${e}`.split("-");return O.jsx("div",{className:tt(["react-flow__panel",n,...a]),style:i,ref:l,...s,children:t})});gu.displayName="Panel";function i2({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:O.jsx(gu,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:O.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const o2=e=>{const t=[],n=[];for(const[,i]of e.nodeLookup)i.selected&&t.push(i.internals.userNode);for(const[,i]of e.edgeLookup)i.selected&&n.push(i);return{selectedNodes:t,selectedEdges:n}},ma=e=>e.id;function s2(e,t){return Ve(e.selectedNodes.map(ma),t.selectedNodes.map(ma))&&Ve(e.selectedEdges.map(ma),t.selectedEdges.map(ma))}function l2({onSelectionChange:e}){const t=He(),{selectedNodes:n,selectedEdges:i}=Oe(o2,s2);return T.useEffect(()=>{const s={nodes:n,edges:i};e==null||e(s),t.getState().onSelectionChangeHandlers.forEach(l=>l(s))},[n,i,e]),null}const a2=e=>!!e.onSelectionChangeHandlers;function u2({onSelectionChange:e}){const t=Oe(a2);return e||t?O.jsx(l2,{onSelectionChange:e}):null}const Uw=[0,0],c2={x:0,y:0,zoom:1},f2=["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"],Oy=[...f2,"rfId"],d2=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Ly={translateExtent:Ns,nodeOrigin:Uw,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function h2(e){const{setNodes:t,setEdges:n,setMinZoom:i,setMaxZoom:s,setTranslateExtent:l,setNodeExtent:a,reset:c,setDefaultNodesAndEdges:f}=Oe(d2,Ve),d=He();T.useEffect(()=>(f(e.defaultNodes,e.defaultEdges),()=>{m.current=Ly,c()}),[]);const m=T.useRef(Ly);return T.useEffect(()=>{for(const p of Oy){const g=e[p],v=m.current[p];g!==v&&(typeof e[p]>"u"||(p==="nodes"?t(g):p==="edges"?n(g):p==="minZoom"?i(g):p==="maxZoom"?s(g):p==="translateExtent"?l(g):p==="nodeExtent"?a(g):p==="ariaLabelConfig"?d.setState({ariaLabelConfig:QN(g)}):p==="fitView"?d.setState({fitViewQueued:g}):p==="fitViewOptions"?d.setState({fitViewOptions:g}):d.setState({[p]:g})))}m.current=e},Oy.map(p=>e[p])),null}function My(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function p2(e){var i;const[t,n]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){n(e);return}const s=My(),l=()=>n(s!=null&&s.matches?"dark":"light");return l(),s==null||s.addEventListener("change",l),()=>{s==null||s.removeEventListener("change",l)}},[e]),t!==null?t:(i=My())!=null&&i.matches?"dark":"light"}const Ry=typeof document<"u"?document:null;function Ps(e=null,t={target:Ry,actInsideInputWithModifier:!0}){const[n,i]=T.useState(!1),s=T.useRef(!1),l=T.useRef(new Set([])),[a,c]=T.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
57
57
|
`).replace(`
|
|
58
58
|
|
|
59
59
|
`,`
|
|
60
60
|
+`).split(`
|
|
61
|
-
`)),m=d.reduce((p,g)=>p.concat(...g),[]);return[d,m]}return[[],[]]},[e]);return T.useEffect(()=>{const f=(t==null?void 0:t.target)??My,d=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const m=v=>{var b,k;if(s.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!s.current||s.current&&!d)&&bw(v))return!1;const x=Dy(v.code,c);if(l.current.add(v[x]),Ry(a,l.current,!1)){const _=((k=(b=v.composedPath)==null?void 0:b.call(v))==null?void 0:k[0])||v.target,E=(_==null?void 0:_.nodeName)==="BUTTON"||(_==null?void 0:_.nodeName)==="A";t.preventDefault!==!1&&(s.current||!E)&&v.preventDefault(),i(!0)}},p=v=>{const S=Dy(v.code,c);Ry(a,l.current,!0)?(i(!1),l.current.clear()):l.current.delete(v[S]),v.key==="Meta"&&l.current.clear(),s.current=!1},g=()=>{l.current.clear(),i(!1)};return f==null||f.addEventListener("keydown",m),f==null||f.addEventListener("keyup",p),window.addEventListener("blur",g),window.addEventListener("contextmenu",g),()=>{f==null||f.removeEventListener("keydown",m),f==null||f.removeEventListener("keyup",p),window.removeEventListener("blur",g),window.removeEventListener("contextmenu",g)}}},[e,i]),n}function Ry(e,t,n){return e.filter(i=>n||i.length===t.size).some(i=>i.every(s=>t.has(s)))}function Dy(e,t){return t.includes(e)?"code":"key"}const h2=()=>{const e=He();return T.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:i}=e.getState();return i?i.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[i,s,l],panZoom:a}=e.getState();return a?(await a.setViewport({x:t.x??i,y:t.y??s,zoom:t.zoom??l},n),!0):!1},getViewport:()=>{const[t,n,i]=e.getState().transform;return{x:t,y:n,zoom:i}},setCenter:async(t,n,i)=>e.getState().setCenter(t,n,i),fitBounds:async(t,n)=>{const{width:i,height:s,minZoom:l,maxZoom:a,panZoom:c}=e.getState(),f=Oh(t,i,s,l,a,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(f,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:i,snapGrid:s,snapToGrid:l,domNode:a}=e.getState();if(!a)return t;const{x:c,y:f}=a.getBoundingClientRect(),d={x:t.x-c,y:t.y-f},m=n.snapGrid??s,p=n.snapToGrid??l;return po(d,i,p,m)},flowToScreenPosition:t=>{const{transform:n,domNode:i}=e.getState();if(!i)return t;const{x:s,y:l}=i.getBoundingClientRect(),a=so(t,n);return{x:a.x+s,y:a.y+l}}}),[])};function Uw(e,t){const n=[],i=new Map,s=[];for(const l of e)if(l.type==="add"){s.push(l);continue}else if(l.type==="remove"||l.type==="replace")i.set(l.id,[l]);else{const a=i.get(l.id);a?a.push(l):i.set(l.id,[l])}for(const l of t){const a=i.get(l.id);if(!a){n.push(l);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){n.push({...a[0].item});continue}const c={...l};for(const f of a)p2(f,c);n.push(c)}return s.length&&s.forEach(l=>{l.index!==void 0?n.splice(l.index,0,{...l.item}):n.push({...l.item})}),n}function p2(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function m2(e,t){return Uw(e,t)}function g2(e,t){return Uw(e,t)}function Xr(e,t){return{id:e,type:"select",selected:t}}function qi(e,t=new Set,n=!1){const i=[];for(const[s,l]of e){const a=t.has(s);!(l.selected===void 0&&!a)&&l.selected!==a&&(n&&(l.selected=a),i.push(Xr(l.id,a)))}return i}function jy({items:e=[],lookup:t}){var s;const n=[],i=new Map(e.map(l=>[l.id,l]));for(const[l,a]of e.entries()){const c=t.get(a.id),f=((s=c==null?void 0:c.internals)==null?void 0:s.userNode)??c;f!==void 0&&f!==a&&n.push({id:a.id,item:a,type:"replace"}),f===void 0&&n.push({item:a,type:"add",index:l})}for(const[l]of t)i.get(l)===void 0&&n.push({id:l,type:"remove"});return n}function $y(e){return{id:e.id,type:"remove"}}const y2=yw();function v2(e,t,n={}){return tC(e,t,{...n,onError:n.onError??y2})}const zy=e=>FN(e),w2=e=>hw(e);function Ww(e){return T.forwardRef(e)}const x2=typeof window<"u"?T.useLayoutEffect:T.useEffect;function Fy(e){const[t,n]=T.useState(BigInt(0)),[i]=T.useState(()=>b2(()=>n(s=>s+BigInt(1))));return x2(()=>{const s=i.get();s.length&&(e(s),i.reset())},[t]),i}function b2(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const qw=T.createContext(null);function S2({children:e}){const t=He(),n=T.useCallback(c=>{const{nodes:f=[],setNodes:d,hasDefaultNodes:m,onNodesChange:p,nodeLookup:g,fitViewQueued:v,onNodesChangeMiddlewareMap:S}=t.getState();let x=f;for(const k of c)x=typeof k=="function"?k(x):k;let b=jy({items:x,lookup:g});for(const k of S.values())b=k(b);m&&d(x),b.length>0?p==null||p(b):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:k,nodes:_,setNodes:E}=t.getState();k&&E(_)})},[]),i=Fy(n),s=T.useCallback(c=>{const{edges:f=[],setEdges:d,hasDefaultEdges:m,onEdgesChange:p,edgeLookup:g}=t.getState();let v=f;for(const S of c)v=typeof S=="function"?S(v):S;m?d(v):p&&p(jy({items:v,lookup:g}))},[]),l=Fy(s),a=T.useMemo(()=>({nodeQueue:i,edgeQueue:l}),[]);return O.jsx(qw.Provider,{value:a,children:e})}function k2(){const e=T.useContext(qw);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const E2=e=>!!e.panZoom;function zh(){const e=h2(),t=He(),n=k2(),i=Oe(E2),s=T.useMemo(()=>{const l=p=>t.getState().nodeLookup.get(p),a=p=>{n.nodeQueue.push(p)},c=p=>{n.edgeQueue.push(p)},f=p=>{var k,_;const{nodeLookup:g,nodeOrigin:v}=t.getState(),S=zy(p)?p:g.get(p.id),x=S.parentId?ww(S.position,S.measured,S.parentId,g,v):S.position,b={...S,position:x,width:((k=S.measured)==null?void 0:k.width)??S.width,height:((_=S.measured)==null?void 0:_.height)??S.height};return oo(b)},d=(p,g,v={replace:!1})=>{a(S=>S.map(x=>{if(x.id===p){const b=typeof g=="function"?g(x):g;return v.replace&&zy(b)?b:{...x,...b}}return x}))},m=(p,g,v={replace:!1})=>{c(S=>S.map(x=>{if(x.id===p){const b=typeof g=="function"?g(x):g;return v.replace&&w2(b)?b:{...x,...b}}return x}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var g;return(g=l(p))==null?void 0:g.internals.userNode},getInternalNode:l,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(g=>({...g}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:a,setEdges:c,addNodes:p=>{const g=Array.isArray(p)?p:[p];n.nodeQueue.push(v=>[...v,...g])},addEdges:p=>{const g=Array.isArray(p)?p:[p];n.edgeQueue.push(v=>[...v,...g])},toObject:()=>{const{nodes:p=[],edges:g=[],transform:v}=t.getState(),[S,x,b]=v;return{nodes:p.map(k=>({...k})),edges:g.map(k=>({...k})),viewport:{x:S,y:x,zoom:b}}},deleteElements:async({nodes:p=[],edges:g=[]})=>{const{nodes:v,edges:S,onNodesDelete:x,onEdgesDelete:b,triggerNodeChanges:k,triggerEdgeChanges:_,onDelete:E,onBeforeDelete:N}=t.getState(),{nodes:A,edges:L}=await WN({nodesToRemove:p,edgesToRemove:g,nodes:v,edges:S,onBeforeDelete:N}),R=L.length>0,C=A.length>0;if(R){const P=L.map($y);b==null||b(L),_(P)}if(C){const P=A.map($y);x==null||x(A),k(P)}return(C||R)&&(E==null||E({nodes:A,edges:L})),{deletedNodes:A,deletedEdges:L}},getIntersectingNodes:(p,g=!0,v)=>{const S=fy(p),x=S?p:f(p),b=v!==void 0;return x?(v||t.getState().nodes).filter(k=>{const _=t.getState().nodeLookup.get(k.id);if(_&&!S&&(k.id===p.id||!_.internals.positionAbsolute))return!1;const E=oo(b?k:_),N=Is(E,x);return g&&N>0||N>=E.width*E.height||N>=x.width*x.height}):[]},isNodeIntersecting:(p,g,v=!0)=>{const x=fy(p)?p:f(p);if(!x)return!1;const b=Is(x,g);return v&&b>0||b>=g.width*g.height||b>=x.width*x.height},updateNode:d,updateNodeData:(p,g,v={replace:!1})=>{d(p,S=>{const x=typeof g=="function"?g(S):g;return v.replace?{...S,data:x}:{...S,data:{...S.data,...x}}},v)},updateEdge:m,updateEdgeData:(p,g,v={replace:!1})=>{m(p,S=>{const x=typeof g=="function"?g(S):g;return v.replace?{...S,data:x}:{...S,data:{...S.data,...x}}},v)},getNodesBounds:p=>{const{nodeLookup:g,nodeOrigin:v}=t.getState();return BN(p,{nodeLookup:g,nodeOrigin:v})},getHandleConnections:({type:p,id:g,nodeId:v})=>{var S;return Array.from(((S=t.getState().connectionLookup.get(`${v}-${p}${g?`-${g}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:p,handleId:g,nodeId:v})=>{var S;return Array.from(((S=t.getState().connectionLookup.get(`${v}${p?g?`-${p}-${g}`:`-${p}`:""}`))==null?void 0:S.values())??[])},fitView:async p=>{const g=t.getState().fitViewResolver??KN();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:g}),n.nodeQueue.push(v=>[...v]),g.promise}}},[]);return T.useMemo(()=>({...s,...e,viewportInitialized:i}),[i])}const By=e=>e.selected,_2=typeof window<"u"?window:void 0;function N2({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=He(),{deleteElements:i}=zh(),s=Ps(e,{actInsideInputWithModifier:!1}),l=Ps(t,{target:_2});T.useEffect(()=>{if(s){const{edges:a,nodes:c}=n.getState();i({nodes:c.filter(By),edges:a.filter(By)}),n.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{n.setState({multiSelectionActive:l})},[l])}function C2(e){const t=He();T.useEffect(()=>{const n=()=>{var s,l,a,c;if(!e.current||!(((l=(s=e.current).checkVisibility)==null?void 0:l.call(s))??!0))return!1;const i=Lh(e.current);(i.height===0||i.width===0)&&((c=(a=t.getState()).onError)==null||c.call(a,"004",pn.error004())),t.setState({width:i.width||500,height:i.height||500})};if(e.current){n(),window.addEventListener("resize",n);const i=new ResizeObserver(()=>n());return i.observe(e.current),()=>{window.removeEventListener("resize",n),i&&e.current&&i.unobserve(e.current)}}},[])}const gu={position:"absolute",width:"100%",height:"100%",top:0,left:0},I2=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function T2({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:i=!1,panOnScrollSpeed:s=.5,panOnScrollMode:l=ni.Free,zoomOnDoubleClick:a=!0,panOnDrag:c=!0,defaultViewport:f,translateExtent:d,minZoom:m,maxZoom:p,zoomActivationKeyCode:g,preventScrolling:v=!0,children:S,noWheelClassName:x,noPanClassName:b,onViewportChange:k,isControlledViewport:_,paneClickDistance:E,selectionOnDrag:N}){const A=He(),L=T.useRef(null),{userSelectionActive:R,lib:C,connectionInProgress:P}=Oe(I2,Ve),F=Ps(g),M=T.useRef();C2(L);const $=T.useCallback(Z=>{k==null||k({x:Z[0],y:Z[1],zoom:Z[2]}),_||A.setState({transform:Z})},[k,_]);return T.useEffect(()=>{if(L.current){M.current=AC({domNode:L.current,minZoom:m,maxZoom:p,translateExtent:d,viewport:f,onDraggingChange:q=>A.setState(J=>J.paneDragging===q?J:{paneDragging:q}),onPanZoomStart:(q,J)=>{const{onViewportChangeStart:Y,onMoveStart:U}=A.getState();U==null||U(q,J),Y==null||Y(J)},onPanZoom:(q,J)=>{const{onViewportChange:Y,onMove:U}=A.getState();U==null||U(q,J),Y==null||Y(J)},onPanZoomEnd:(q,J)=>{const{onViewportChangeEnd:Y,onMoveEnd:U}=A.getState();U==null||U(q,J),Y==null||Y(J)}});const{x:Z,y:j,zoom:G}=M.current.getViewport();return A.setState({panZoom:M.current,transform:[Z,j,G],domNode:L.current.closest(".react-flow")}),()=>{var q;(q=M.current)==null||q.destroy()}}},[]),T.useEffect(()=>{var Z;(Z=M.current)==null||Z.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:i,panOnScrollSpeed:s,panOnScrollMode:l,zoomOnDoubleClick:a,panOnDrag:c,zoomActivationKeyPressed:F,preventScrolling:v,noPanClassName:b,userSelectionActive:R,noWheelClassName:x,lib:C,onTransformChange:$,connectionInProgress:P,selectionOnDrag:N,paneClickDistance:E})},[e,t,n,i,s,l,a,c,F,v,b,R,x,C,$,P,N,E]),O.jsx("div",{className:"react-flow__renderer",ref:L,style:gu,children:S})}const P2=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function A2(){const{userSelectionActive:e,userSelectionRect:t}=Oe(P2,Ve);return e&&t?O.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Bf=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},O2=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function L2({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Cs.Full,panOnDrag:i,autoPanOnSelection:s,paneClickDistance:l,selectionOnDrag:a,onSelectionStart:c,onSelectionEnd:f,onPaneClick:d,onPaneContextMenu:m,onPaneScroll:p,onPaneMouseEnter:g,onPaneMouseMove:v,onPaneMouseLeave:S,children:x}){const b=T.useRef(0),k=He(),{userSelectionActive:_,elementsSelectable:E,dragging:N,connectionInProgress:A,panBy:L,autoPanSpeed:R}=Oe(O2,Ve),C=E&&(e||_),P=T.useRef(null),F=T.useRef(),M=T.useRef(new Set),$=T.useRef(new Set),Z=T.useRef(!1),j=T.useRef({x:0,y:0}),G=T.useRef(!1),q=ee=>{if(Z.current||A){Z.current=!1;return}d==null||d(ee),k.getState().resetSelectedElements(),k.setState({nodesSelectionActive:!1})},J=ee=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){ee.preventDefault();return}m==null||m(ee)},Y=p?ee=>p(ee):void 0,U=ee=>{Z.current&&(ee.stopPropagation(),Z.current=!1)},B=ee=>{var $e,yt;const{domNode:oe,transform:de}=k.getState();if(F.current=oe==null?void 0:oe.getBoundingClientRect(),!F.current)return;const xe=ee.target===P.current;if(!xe&&!!ee.target.closest(".nokey")||!e||!(a&&xe||t)||ee.button!==0||!ee.isPrimary)return;(yt=($e=ee.target)==null?void 0:$e.setPointerCapture)==null||yt.call($e,ee.pointerId),Z.current=!1;const{x:ke,y:Pe}=hn(ee.nativeEvent,F.current),Ae=po({x:ke,y:Pe},de);k.setState({userSelectionRect:{width:0,height:0,startX:Ae.x,startY:Ae.y,x:ke,y:Pe}}),xe||(ee.stopPropagation(),ee.preventDefault())};function D(ee,oe){const{userSelectionRect:de}=k.getState();if(!de)return;const{transform:xe,nodeLookup:he,edgeLookup:fe,connectionLookup:ke,triggerNodeChanges:Pe,triggerEdgeChanges:Ae,defaultEdgeOptions:$e}=k.getState(),yt={x:de.startX,y:de.startY},{x:kt,y:ft}=so(yt,xe),dt={startX:yt.x,startY:yt.y,x:ee<kt?ee:kt,y:oe<ft?oe:ft,width:Math.abs(ee-kt),height:Math.abs(oe-ft)},Mn=M.current,wn=$.current;M.current=new Set(Ph(he,dt,xe,n===Cs.Partial,!0).map(Et=>Et.id)),$.current=new Set;const xn=($e==null?void 0:$e.selectable)??!0;for(const Et of M.current){const Ht=ke.get(Et);if(Ht)for(const{edgeId:Lt}of Ht.values()){const Ut=fe.get(Lt);Ut&&(Ut.selectable??xn)&&$.current.add(Lt)}}if(!dy(Mn,M.current)){const Et=qi(he,M.current,!0);Pe(Et)}if(!dy(wn,$.current)){const Et=qi(fe,$.current);Ae(Et)}k.setState({userSelectionRect:dt,userSelectionActive:!0,nodesSelectionActive:!1})}function H(){if(!s||!F.current)return;const[ee,oe]=Ah(j.current,F.current,R);L({x:ee,y:oe}).then(de=>{if(!Z.current||!de){b.current=requestAnimationFrame(H);return}const{x:xe,y:he}=j.current;D(xe,he),b.current=requestAnimationFrame(H)})}const V=()=>{cancelAnimationFrame(b.current),b.current=0,G.current=!1};T.useEffect(()=>()=>V(),[]);const K=ee=>{const{userSelectionRect:oe,transform:de,resetSelectedElements:xe}=k.getState();if(!F.current||!oe)return;const{x:he,y:fe}=hn(ee.nativeEvent,F.current);j.current={x:he,y:fe};const ke=so({x:oe.startX,y:oe.startY},de);if(!Z.current){const Pe=t?0:l;if(Math.hypot(he-ke.x,fe-ke.y)<=Pe)return;xe(),c==null||c(ee)}Z.current=!0,G.current||(H(),G.current=!0),D(he,fe)},Q=ee=>{var oe,de;ee.button===0&&((de=(oe=ee.target)==null?void 0:oe.releasePointerCapture)==null||de.call(oe,ee.pointerId),!_&&ee.target===P.current&&k.getState().userSelectionRect&&(q==null||q(ee)),k.setState({userSelectionActive:!1,userSelectionRect:null}),Z.current&&(f==null||f(ee),k.setState({nodesSelectionActive:M.current.size>0})),V())},re=ee=>{var oe,de;(de=(oe=ee.target)==null?void 0:oe.releasePointerCapture)==null||de.call(oe,ee.pointerId),V()},se=i===!0||Array.isArray(i)&&i.includes(0);return O.jsxs("div",{className:tt(["react-flow__pane",{draggable:se,dragging:N,selection:e}]),onClick:C?void 0:Bf(q,P),onContextMenu:Bf(J,P),onWheel:Bf(Y,P),onPointerEnter:C?void 0:g,onPointerMove:C?K:v,onPointerUp:C?Q:void 0,onPointerCancel:C?re:void 0,onPointerDownCapture:C?B:void 0,onClickCapture:C?U:void 0,onPointerLeave:S,ref:P,style:gu,children:[x,O.jsx(A2,{})]})}function ch({id:e,store:t,unselect:n=!1,nodeRef:i}){const{addSelectedNodes:s,unselectNodesAndEdges:l,multiSelectionActive:a,nodeLookup:c,onError:f}=t.getState(),d=c.get(e);if(!d){f==null||f("012",pn.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&a)&&(l({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var m;return(m=i==null?void 0:i.current)==null?void 0:m.blur()})):s([e])}function Yw({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:i,nodeId:s,isSelectable:l,nodeClickDistance:a}){const c=He(),[f,d]=T.useState(!1),m=T.useRef();return T.useEffect(()=>{m.current=yC({getStoreItems:()=>c.getState(),onNodeMouseDown:p=>{ch({id:p,store:c,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),T.useEffect(()=>{if(!(t||!e.current||!m.current))return m.current.update({noDragClassName:n,handleSelector:i,domNode:e.current,isSelectable:l,nodeId:s,nodeClickDistance:a}),()=>{var p;(p=m.current)==null||p.destroy()}},[n,i,t,l,e,s,a]),f}const M2=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Kw(){const e=He();return T.useCallback(n=>{const{nodeExtent:i,snapToGrid:s,snapGrid:l,nodesDraggable:a,onError:c,updateNodePositions:f,nodeLookup:d,nodeOrigin:m}=e.getState(),p=new Map,g=M2(a),v=s?l[0]:5,S=s?l[1]:5,x=n.direction.x*v*n.factor,b=n.direction.y*S*n.factor;for(const[,k]of d){if(!g(k))continue;let _={x:k.internals.positionAbsolute.x+x,y:k.internals.positionAbsolute.y+b};s&&(_=$s(_,l));const{position:E,positionAbsolute:N}=pw({nodeId:k.id,nextPosition:_,nodeLookup:d,nodeExtent:i,nodeOrigin:m,onError:c});k.position=E,k.internals.positionAbsolute=N,p.set(k.id,k)}f(p)},[])}const Fh=T.createContext(null),R2=Fh.Provider;Fh.Consumer;const Gw=()=>T.useContext(Fh),D2=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),j2=(e,t,n)=>i=>{const{connectionClickStartHandle:s,connectionMode:l,connection:a}=i,{fromHandle:c,toHandle:f,isValid:d}=a,m=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n,connectingTo:m,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===n,isPossibleEndHandle:l===ro.Strict?(c==null?void 0:c.type)!==n:e!==(c==null?void 0:c.nodeId)||t!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!s,valid:m&&d}};function $2({type:e="source",position:t=Se.Top,isValidConnection:n,isConnectable:i=!0,isConnectableStart:s=!0,isConnectableEnd:l=!0,id:a,onConnect:c,children:f,className:d,onMouseDown:m,onTouchStart:p,...g},v){var G,q;const S=a||null,x=e==="target",b=He(),k=Gw(),{connectOnClick:_,noPanClassName:E,rfId:N}=Oe(D2,Ve),{connectingFrom:A,connectingTo:L,clickConnecting:R,isPossibleEndHandle:C,connectionInProcess:P,clickConnectionInProcess:F,valid:M}=Oe(j2(k,S,e),Ve);k||(q=(G=b.getState()).onError)==null||q.call(G,"010",pn.error010());const $=J=>{const{defaultEdgeOptions:Y,onConnect:U,hasDefaultEdges:B}=b.getState(),D={...Y,...J};if(B){const{edges:H,setEdges:V,onError:K}=b.getState();V(v2(D,H,{onError:K}))}U==null||U(D),c==null||c(D)},Z=J=>{if(!k)return;const Y=Sw(J.nativeEvent);if(s&&(Y&&J.button===0||!Y)){const U=b.getState();uh.onPointerDown(J.nativeEvent,{handleDomNode:J.currentTarget,autoPanOnConnect:U.autoPanOnConnect,connectionMode:U.connectionMode,connectionRadius:U.connectionRadius,domNode:U.domNode,nodeLookup:U.nodeLookup,lib:U.lib,isTarget:x,handleId:S,nodeId:k,flowId:U.rfId,panBy:U.panBy,cancelConnection:U.cancelConnection,onConnectStart:U.onConnectStart,onConnectEnd:(...B)=>{var D,H;return(H=(D=b.getState()).onConnectEnd)==null?void 0:H.call(D,...B)},updateConnection:U.updateConnection,onConnect:$,isValidConnection:n||((...B)=>{var D,H;return((H=(D=b.getState()).isValidConnection)==null?void 0:H.call(D,...B))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:U.autoPanSpeed,dragThreshold:U.connectionDragThreshold})}Y?m==null||m(J):p==null||p(J)},j=J=>{const{onClickConnectStart:Y,onClickConnectEnd:U,connectionClickStartHandle:B,connectionMode:D,isValidConnection:H,lib:V,rfId:K,nodeLookup:Q,connection:re}=b.getState();if(!k||!B&&!s)return;if(!B){Y==null||Y(J.nativeEvent,{nodeId:k,handleId:S,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:k,type:e,id:S}});return}const se=xw(J.target),ee=n||H,{connection:oe,isValid:de}=uh.isValid(J.nativeEvent,{handle:{nodeId:k,id:S,type:e},connectionMode:D,fromNodeId:B.nodeId,fromHandleId:B.id||null,fromType:B.type,isValidConnection:ee,flowId:K,doc:se,lib:V,nodeLookup:Q});de&&oe&&$(oe);const xe=structuredClone(re);delete xe.inProgress,xe.toPosition=xe.toHandle?xe.toHandle.position:null,U==null||U(J,xe),b.setState({connectionClickStartHandle:null})};return O.jsx("div",{"data-handleid":S,"data-nodeid":k,"data-handlepos":t,"data-id":`${N}-${k}-${S}-${e}`,className:tt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,d,{source:!x,target:x,connectable:i,connectablestart:s,connectableend:l,clickconnecting:R,connectingfrom:A,connectingto:L,valid:M,connectionindicator:i&&(!P||C)&&(P||F?l:s)}]),onMouseDown:Z,onTouchStart:Z,onClick:_?j:void 0,ref:v,...g,children:f})}const Nr=T.memo(Ww($2));function z2({data:e,isConnectable:t,sourcePosition:n=Se.Bottom}){return O.jsxs(O.Fragment,{children:[e==null?void 0:e.label,O.jsx(Nr,{type:"source",position:n,isConnectable:t})]})}function F2({data:e,isConnectable:t,targetPosition:n=Se.Top,sourcePosition:i=Se.Bottom}){return O.jsxs(O.Fragment,{children:[O.jsx(Nr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,O.jsx(Nr,{type:"source",position:i,isConnectable:t})]})}function B2(){return null}function V2({data:e,isConnectable:t,targetPosition:n=Se.Top}){return O.jsxs(O.Fragment,{children:[O.jsx(Nr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Xa={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Vy={input:z2,default:F2,output:V2,group:B2};function H2(e){var t,n,i,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((i=e.style)==null?void 0:i.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const U2=e=>{const{width:t,height:n,x:i,y:s}=js(e.nodeLookup,{filter:l=>!!l.selected});return{width:dn(t)?t:null,height:dn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${i}px,${s}px)`}};function W2({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const i=He(),{width:s,height:l,transformString:a,userSelectionActive:c}=Oe(U2,Ve),f=Kw(),d=T.useRef(null);T.useEffect(()=>{var v;n||(v=d.current)==null||v.focus({preventScroll:!0})},[n]);const m=!c&&s!==null&&l!==null;if(Yw({nodeRef:d,disabled:!m}),!m)return null;const p=e?v=>{const S=i.getState().nodes.filter(x=>x.selected);e(v,S)}:void 0,g=v=>{Object.prototype.hasOwnProperty.call(Xa,v.key)&&(v.preventDefault(),f({direction:Xa[v.key],factor:v.shiftKey?4:1}))};return O.jsx("div",{className:tt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:a},children:O.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:s,height:l}})})}const Hy=typeof window<"u"?window:void 0,q2=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Xw({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:s,onPaneContextMenu:l,onPaneScroll:a,paneClickDistance:c,deleteKeyCode:f,selectionKeyCode:d,selectionOnDrag:m,selectionMode:p,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:S,panActivationKeyCode:x,zoomActivationKeyCode:b,elementsSelectable:k,zoomOnScroll:_,zoomOnPinch:E,panOnScroll:N,panOnScrollSpeed:A,panOnScrollMode:L,zoomOnDoubleClick:R,panOnDrag:C,autoPanOnSelection:P,defaultViewport:F,translateExtent:M,minZoom:$,maxZoom:Z,preventScrolling:j,onSelectionContextMenu:G,noWheelClassName:q,noPanClassName:J,disableKeyboardA11y:Y,onViewportChange:U,isControlledViewport:B}){const{nodesSelectionActive:D,userSelectionActive:H}=Oe(q2,Ve),V=Ps(d,{target:Hy}),K=Ps(x,{target:Hy}),Q=K||C,re=K||N,se=m&&Q!==!0,ee=V||H||se;return N2({deleteKeyCode:f,multiSelectionKeyCode:S}),O.jsx(T2,{onPaneContextMenu:l,elementsSelectable:k,zoomOnScroll:_,zoomOnPinch:E,panOnScroll:re,panOnScrollSpeed:A,panOnScrollMode:L,zoomOnDoubleClick:R,panOnDrag:!V&&Q,defaultViewport:F,translateExtent:M,minZoom:$,maxZoom:Z,zoomActivationKeyCode:b,preventScrolling:j,noWheelClassName:q,noPanClassName:J,onViewportChange:U,isControlledViewport:B,paneClickDistance:c,selectionOnDrag:se,children:O.jsxs(L2,{onSelectionStart:g,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:s,onPaneContextMenu:l,onPaneScroll:a,panOnDrag:Q,autoPanOnSelection:P,isSelecting:!!ee,selectionMode:p,selectionKeyPressed:V,paneClickDistance:c,selectionOnDrag:se,children:[e,D&&O.jsx(W2,{onSelectionContextMenu:G,noPanClassName:J,disableKeyboardA11y:Y})]})})}Xw.displayName="FlowRenderer";const Y2=T.memo(Xw),K2=e=>t=>e?Ph(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function G2(e){return Oe(T.useCallback(K2(e),[e]),Ve)}const X2=e=>e.updateNodeInternals;function Q2(){const e=Oe(X2),[t]=T.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const i=new Map;n.forEach(s=>{const l=s.target.getAttribute("data-id");i.set(l,{id:l,nodeElement:s.target,force:!0})}),e(i)}));return T.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function J2({node:e,nodeType:t,hasDimensions:n,resizeObserver:i}){const s=He(),l=T.useRef(null),a=T.useRef(null),c=T.useRef(e.sourcePosition),f=T.useRef(e.targetPosition),d=T.useRef(t),m=n&&!!e.internals.handleBounds;return T.useEffect(()=>{l.current&&!e.hidden&&(!m||a.current!==l.current)&&(a.current&&(i==null||i.unobserve(a.current)),i==null||i.observe(l.current),a.current=l.current)},[m,e.hidden]),T.useEffect(()=>()=>{a.current&&(i==null||i.unobserve(a.current),a.current=null)},[]),T.useEffect(()=>{if(l.current){const p=d.current!==t,g=c.current!==e.sourcePosition,v=f.current!==e.targetPosition;(p||g||v)&&(d.current=t,c.current=e.sourcePosition,f.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:l.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),l}function Z2({id:e,onClick:t,onMouseEnter:n,onMouseMove:i,onMouseLeave:s,onContextMenu:l,onDoubleClick:a,nodesDraggable:c,elementsSelectable:f,nodesConnectable:d,nodesFocusable:m,resizeObserver:p,noDragClassName:g,noPanClassName:v,disableKeyboardA11y:S,rfId:x,nodeTypes:b,nodeClickDistance:k,onError:_}){const{node:E,internals:N,isParent:A}=Oe(ee=>{const oe=ee.nodeLookup.get(e),de=ee.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:de}},Ve);let L=E.type||"default",R=(b==null?void 0:b[L])||Vy[L];R===void 0&&(_==null||_("003",pn.error003(L)),L="default",R=(b==null?void 0:b.default)||Vy.default);const C=!!(E.draggable||c&&typeof E.draggable>"u"),P=!!(E.selectable||f&&typeof E.selectable>"u"),F=!!(E.connectable||d&&typeof E.connectable>"u"),M=!!(E.focusable||m&&typeof E.focusable>"u"),$=He(),Z=vw(E),j=J2({node:E,nodeType:L,hasDimensions:Z,resizeObserver:p}),G=Yw({nodeRef:j,disabled:E.hidden||!C,noDragClassName:g,handleSelector:E.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:k}),q=Kw();if(E.hidden)return null;const J=Jn(E),Y=H2(E),U=P||C||t||n||i||s,B=n?ee=>n(ee,{...N.userNode}):void 0,D=i?ee=>i(ee,{...N.userNode}):void 0,H=s?ee=>s(ee,{...N.userNode}):void 0,V=l?ee=>l(ee,{...N.userNode}):void 0,K=a?ee=>a(ee,{...N.userNode}):void 0,Q=ee=>{const{selectNodesOnDrag:oe,nodeDragThreshold:de}=$.getState();P&&(!oe||!C||de>0)&&ch({id:e,store:$,nodeRef:j}),t&&t(ee,{...N.userNode})},re=ee=>{if(!(bw(ee.nativeEvent)||S)){if(uw.includes(ee.key)&&P){const oe=ee.key==="Escape";ch({id:e,store:$,unselect:oe,nodeRef:j})}else if(C&&E.selected&&Object.prototype.hasOwnProperty.call(Xa,ee.key)){ee.preventDefault();const{ariaLabelConfig:oe}=$.getState();$.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:ee.key.replace("Arrow","").toLowerCase(),x:~~N.positionAbsolute.x,y:~~N.positionAbsolute.y})}),q({direction:Xa[ee.key],factor:ee.shiftKey?4:1})}}},se=()=>{var ke;if(S||!((ke=j.current)!=null&&ke.matches(":focus-visible")))return;const{transform:ee,width:oe,height:de,autoPanOnNodeFocus:xe,setCenter:he}=$.getState();if(!xe)return;Ph(new Map([[e,E]]),{x:0,y:0,width:oe,height:de},ee,!0).length>0||he(E.position.x+J.width/2,E.position.y+J.height/2,{zoom:ee[2]})};return O.jsx("div",{className:tt(["react-flow__node",`react-flow__node-${L}`,{[v]:C},E.className,{selected:E.selected,selectable:P,parent:A,draggable:C,dragging:G}]),ref:j,style:{zIndex:N.z,transform:`translate(${N.positionAbsolute.x}px,${N.positionAbsolute.y}px)`,pointerEvents:U?"all":"none",visibility:Z?"visible":"hidden",...E.style,...Y},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:B,onMouseMove:D,onMouseLeave:H,onContextMenu:V,onClick:Q,onDoubleClick:K,onKeyDown:M?re:void 0,tabIndex:M?0:void 0,onFocus:M?se:void 0,role:E.ariaRole??(M?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${Bw}-${x}`,"aria-label":E.ariaLabel,...E.domAttributes,children:O.jsx(R2,{value:e,children:O.jsx(R,{id:e,data:E.data,type:L,positionAbsoluteX:N.positionAbsolute.x,positionAbsoluteY:N.positionAbsolute.y,selected:E.selected??!1,selectable:P,draggable:C,deletable:E.deletable??!0,isConnectable:F,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:G,dragHandle:E.dragHandle,zIndex:N.z,parentId:E.parentId,...J})})})}var eI=T.memo(Z2);const tI=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Qw(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:s,onError:l}=Oe(tI,Ve),a=G2(e.onlyRenderVisibleElements),c=Q2();return O.jsx("div",{className:"react-flow__nodes",style:gu,children:a.map(f=>O.jsx(eI,{id:f,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:c,nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:l},f))})}Qw.displayName="NodeRenderer";const nI=T.memo(Qw);function rI(e){return Oe(T.useCallback(n=>{if(!e)return n.edges.map(s=>s.id);const i=[];if(n.width&&n.height)for(const s of n.edges){const l=n.nodeLookup.get(s.source),a=n.nodeLookup.get(s.target);l&&a&&JN({sourceNode:l,targetNode:a,width:n.width,height:n.height,transform:n.transform})&&i.push(s.id)}return i},[e]),Ve)}const iI=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return O.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},oI=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return O.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Uy={[Ka.Arrow]:iI,[Ka.ArrowClosed]:oI};function sI(e){const t=He();return T.useMemo(()=>{var s,l;return Object.prototype.hasOwnProperty.call(Uy,e)?Uy[e]:((l=(s=t.getState()).onError)==null||l.call(s,"009",pn.error009(e)),null)},[e])}const lI=({id:e,type:t,color:n,width:i=12.5,height:s=12.5,markerUnits:l="strokeWidth",strokeWidth:a,orient:c="auto-start-reverse"})=>{const f=sI(t);return f?O.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${i}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:l,orient:c,refX:"0",refY:"0",children:O.jsx(f,{color:n,strokeWidth:a})}):null},Jw=({defaultColor:e,rfId:t})=>{const n=Oe(l=>l.edges),i=Oe(l=>l.defaultEdgeOptions),s=T.useMemo(()=>sC(n,{id:t,defaultColor:e,defaultMarkerStart:i==null?void 0:i.markerStart,defaultMarkerEnd:i==null?void 0:i.markerEnd}),[n,i,t,e]);return s.length?O.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:O.jsx("defs",{children:s.map(l=>O.jsx(lI,{id:l.id,type:l.type,color:l.color,width:l.width,height:l.height,markerUnits:l.markerUnits,strokeWidth:l.strokeWidth,orient:l.orient},l.id))})}):null};Jw.displayName="MarkerDefinitions";var aI=T.memo(Jw);function Zw({x:e,y:t,label:n,labelStyle:i,labelShowBg:s=!0,labelBgStyle:l,labelBgPadding:a=[2,4],labelBgBorderRadius:c=2,children:f,className:d,...m}){const[p,g]=T.useState({x:1,y:0,width:0,height:0}),v=tt(["react-flow__edge-textwrapper",d]),S=T.useRef(null);return T.useEffect(()=>{if(S.current){const x=S.current.getBBox();g({x:x.x,y:x.y,width:x.width,height:x.height})}},[n]),n?O.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:v,visibility:p.width?"visible":"hidden",...m,children:[s&&O.jsx("rect",{width:p.width+2*a[0],x:-a[0],y:-a[1],height:p.height+2*a[1],className:"react-flow__edge-textbg",style:l,rx:c,ry:c}),O.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:S,style:i,children:n}),f]}):null}Zw.displayName="EdgeText";const uI=T.memo(Zw);function yu({path:e,labelX:t,labelY:n,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f,interactionWidth:d=20,...m}){return O.jsxs(O.Fragment,{children:[O.jsx("path",{...m,d:e,fill:"none",className:tt(["react-flow__edge-path",m.className])}),d?O.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,i&&dn(t)&&dn(n)?O.jsx(uI,{x:t,y:n,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f}):null]})}function Wy({pos:e,x1:t,y1:n,x2:i,y2:s}){return e===Se.Left||e===Se.Right?[.5*(t+i),n]:[t,.5*(n+s)]}function e1({sourceX:e,sourceY:t,sourcePosition:n=Se.Bottom,targetX:i,targetY:s,targetPosition:l=Se.Top}){const[a,c]=Wy({pos:n,x1:e,y1:t,x2:i,y2:s}),[f,d]=Wy({pos:l,x1:i,y1:s,x2:e,y2:t}),[m,p,g,v]=kw({sourceX:e,sourceY:t,targetX:i,targetY:s,sourceControlX:a,sourceControlY:c,targetControlX:f,targetControlY:d});return[`M${e},${t} C${a},${c} ${f},${d} ${i},${s}`,m,p,g,v]}function t1(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:s,targetY:l,sourcePosition:a,targetPosition:c,label:f,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:S,markerEnd:x,markerStart:b,interactionWidth:k})=>{const[_,E,N]=e1({sourceX:n,sourceY:i,sourcePosition:a,targetX:s,targetY:l,targetPosition:c}),A=e.isInternal?void 0:t;return O.jsx(yu,{id:A,path:_,labelX:E,labelY:N,label:f,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:S,markerEnd:x,markerStart:b,interactionWidth:k})})}const cI=t1({isInternal:!1}),n1=t1({isInternal:!0});cI.displayName="SimpleBezierEdge";n1.displayName="SimpleBezierEdgeInternal";function r1(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:s,targetY:l,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:g,sourcePosition:v=Se.Bottom,targetPosition:S=Se.Top,markerEnd:x,markerStart:b,pathOptions:k,interactionWidth:_})=>{const[E,N,A]=sh({sourceX:n,sourceY:i,sourcePosition:v,targetX:s,targetY:l,targetPosition:S,borderRadius:k==null?void 0:k.borderRadius,offset:k==null?void 0:k.offset,stepPosition:k==null?void 0:k.stepPosition}),L=e.isInternal?void 0:t;return O.jsx(yu,{id:L,path:E,labelX:N,labelY:A,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:g,markerEnd:x,markerStart:b,interactionWidth:_})})}const i1=r1({isInternal:!1}),o1=r1({isInternal:!0});i1.displayName="SmoothStepEdge";o1.displayName="SmoothStepEdgeInternal";function s1(e){return T.memo(({id:t,...n})=>{var s;const i=e.isInternal?void 0:t;return O.jsx(i1,{...n,id:i,pathOptions:T.useMemo(()=>{var l;return{borderRadius:0,offset:(l=n.pathOptions)==null?void 0:l.offset}},[(s=n.pathOptions)==null?void 0:s.offset])})})}const fI=s1({isInternal:!1}),l1=s1({isInternal:!0});fI.displayName="StepEdge";l1.displayName="StepEdgeInternal";function a1(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:s,targetY:l,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:g,markerEnd:v,markerStart:S,interactionWidth:x})=>{const[b,k,_]=Nw({sourceX:n,sourceY:i,targetX:s,targetY:l}),E=e.isInternal?void 0:t;return O.jsx(yu,{id:E,path:b,labelX:k,labelY:_,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:g,markerEnd:v,markerStart:S,interactionWidth:x})})}const dI=a1({isInternal:!1}),u1=a1({isInternal:!0});dI.displayName="StraightEdge";u1.displayName="StraightEdgeInternal";function c1(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:s,targetY:l,sourcePosition:a=Se.Bottom,targetPosition:c=Se.Top,label:f,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:S,markerEnd:x,markerStart:b,pathOptions:k,interactionWidth:_})=>{const[E,N,A]=Ew({sourceX:n,sourceY:i,sourcePosition:a,targetX:s,targetY:l,targetPosition:c,curvature:k==null?void 0:k.curvature}),L=e.isInternal?void 0:t;return O.jsx(yu,{id:L,path:E,labelX:N,labelY:A,label:f,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:S,markerEnd:x,markerStart:b,interactionWidth:_})})}const hI=c1({isInternal:!1}),f1=c1({isInternal:!0});hI.displayName="BezierEdge";f1.displayName="BezierEdgeInternal";const qy={default:f1,straight:u1,step:l1,smoothstep:o1,simplebezier:n1},Yy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},pI=(e,t,n)=>n===Se.Left?e-t:n===Se.Right?e+t:e,mI=(e,t,n)=>n===Se.Top?e-t:n===Se.Bottom?e+t:e,Ky="react-flow__edgeupdater";function Gy({position:e,centerX:t,centerY:n,radius:i=10,onMouseDown:s,onMouseEnter:l,onMouseOut:a,type:c}){return O.jsx("circle",{onMouseDown:s,onMouseEnter:l,onMouseOut:a,className:tt([Ky,`${Ky}-${c}`]),cx:pI(t,i,e),cy:mI(n,i,e),r:i,stroke:"transparent",fill:"transparent"})}function gI({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:i,sourceY:s,targetX:l,targetY:a,sourcePosition:c,targetPosition:f,onReconnect:d,onReconnectStart:m,onReconnectEnd:p,setReconnecting:g,setUpdateHover:v}){const S=He(),x=(N,A)=>{if(N.button!==0)return;const{autoPanOnConnect:L,domNode:R,connectionMode:C,connectionRadius:P,lib:F,onConnectStart:M,cancelConnection:$,nodeLookup:Z,rfId:j,panBy:G,updateConnection:q}=S.getState(),J=A.type==="target",Y=(D,H)=>{g(!1),p==null||p(D,n,A.type,H)},U=D=>d==null?void 0:d(n,D),B=(D,H)=>{g(!0),m==null||m(N,n,A.type),M==null||M(D,H)};uh.onPointerDown(N.nativeEvent,{autoPanOnConnect:L,connectionMode:C,connectionRadius:P,domNode:R,handleId:A.id,nodeId:A.nodeId,nodeLookup:Z,isTarget:J,edgeUpdaterType:A.type,lib:F,flowId:j,cancelConnection:$,panBy:G,isValidConnection:(...D)=>{var H,V;return((V=(H=S.getState()).isValidConnection)==null?void 0:V.call(H,...D))??!0},onConnect:U,onConnectStart:B,onConnectEnd:(...D)=>{var H,V;return(V=(H=S.getState()).onConnectEnd)==null?void 0:V.call(H,...D)},onReconnectEnd:Y,updateConnection:q,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:N.currentTarget})},b=N=>x(N,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),k=N=>x(N,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),_=()=>v(!0),E=()=>v(!1);return O.jsxs(O.Fragment,{children:[(e===!0||e==="source")&&O.jsx(Gy,{position:c,centerX:i,centerY:s,radius:t,onMouseDown:b,onMouseEnter:_,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&O.jsx(Gy,{position:f,centerX:l,centerY:a,radius:t,onMouseDown:k,onMouseEnter:_,onMouseOut:E,type:"target"})]})}function yI({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:i,onClick:s,onDoubleClick:l,onContextMenu:a,onMouseEnter:c,onMouseMove:f,onMouseLeave:d,reconnectRadius:m,onReconnect:p,onReconnectStart:g,onReconnectEnd:v,rfId:S,edgeTypes:x,noPanClassName:b,onError:k,disableKeyboardA11y:_}){let E=Oe(he=>he.edgeLookup.get(e));const N=Oe(he=>he.defaultEdgeOptions);E=N?{...N,...E}:E;let A=E.type||"default",L=(x==null?void 0:x[A])||qy[A];L===void 0&&(k==null||k("011",pn.error011(A)),A="default",L=(x==null?void 0:x.default)||qy.default);const R=!!(E.focusable||t&&typeof E.focusable>"u"),C=typeof p<"u"&&(E.reconnectable||n&&typeof E.reconnectable>"u"),P=!!(E.selectable||i&&typeof E.selectable>"u"),F=T.useRef(null),[M,$]=T.useState(!1),[Z,j]=T.useState(!1),G=He(),{zIndex:q,sourceX:J,sourceY:Y,targetX:U,targetY:B,sourcePosition:D,targetPosition:H}=Oe(T.useCallback(he=>{const fe=he.nodeLookup.get(E.source),ke=he.nodeLookup.get(E.target);if(!fe||!ke)return{zIndex:E.zIndex,...Yy};const Pe=oC({id:e,sourceNode:fe,targetNode:ke,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:he.connectionMode,onError:k});return{zIndex:QN({selected:E.selected,zIndex:E.zIndex,sourceNode:fe,targetNode:ke,elevateOnSelect:he.elevateEdgesOnSelect,zIndexMode:he.zIndexMode}),...Pe||Yy}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),Ve),V=T.useMemo(()=>E.markerStart?`url('#${lh(E.markerStart,S)}')`:void 0,[E.markerStart,S]),K=T.useMemo(()=>E.markerEnd?`url('#${lh(E.markerEnd,S)}')`:void 0,[E.markerEnd,S]);if(E.hidden||J===null||Y===null||U===null||B===null)return null;const Q=he=>{var Ae;const{addSelectedEdges:fe,unselectNodesAndEdges:ke,multiSelectionActive:Pe}=G.getState();P&&(G.setState({nodesSelectionActive:!1}),E.selected&&Pe?(ke({nodes:[],edges:[E]}),(Ae=F.current)==null||Ae.blur()):fe([e])),s&&s(he,E)},re=l?he=>{l(he,{...E})}:void 0,se=a?he=>{a(he,{...E})}:void 0,ee=c?he=>{c(he,{...E})}:void 0,oe=f?he=>{f(he,{...E})}:void 0,de=d?he=>{d(he,{...E})}:void 0,xe=he=>{var fe;if(!_&&uw.includes(he.key)&&P){const{unselectNodesAndEdges:ke,addSelectedEdges:Pe}=G.getState();he.key==="Escape"?((fe=F.current)==null||fe.blur(),ke({edges:[E]})):Pe([e])}};return O.jsx("svg",{style:{zIndex:q},children:O.jsxs("g",{className:tt(["react-flow__edge",`react-flow__edge-${A}`,E.className,b,{selected:E.selected,animated:E.animated,inactive:!P&&!s,updating:M,selectable:P}]),onClick:Q,onDoubleClick:re,onContextMenu:se,onMouseEnter:ee,onMouseMove:oe,onMouseLeave:de,onKeyDown:R?xe:void 0,tabIndex:R?0:void 0,role:E.ariaRole??(R?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":R?`${Vw}-${S}`:void 0,ref:F,...E.domAttributes,children:[!Z&&O.jsx(L,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:P,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:J,sourceY:Y,targetX:U,targetY:B,sourcePosition:D,targetPosition:H,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:V,markerEnd:K,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),C&&O.jsx(gI,{edge:E,isReconnectable:C,reconnectRadius:m,onReconnect:p,onReconnectStart:g,onReconnectEnd:v,sourceX:J,sourceY:Y,targetX:U,targetY:B,sourcePosition:D,targetPosition:H,setUpdateHover:$,setReconnecting:j})]})})}var vI=T.memo(yI);const wI=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function d1({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:i,noPanClassName:s,onReconnect:l,onEdgeContextMenu:a,onEdgeMouseEnter:c,onEdgeMouseMove:f,onEdgeMouseLeave:d,onEdgeClick:m,reconnectRadius:p,onEdgeDoubleClick:g,onReconnectStart:v,onReconnectEnd:S,disableKeyboardA11y:x}){const{edgesFocusable:b,edgesReconnectable:k,elementsSelectable:_,onError:E}=Oe(wI,Ve),N=rI(t);return O.jsxs("div",{className:"react-flow__edges",children:[O.jsx(aI,{defaultColor:e,rfId:n}),N.map(A=>O.jsx(vI,{id:A,edgesFocusable:b,edgesReconnectable:k,elementsSelectable:_,noPanClassName:s,onReconnect:l,onContextMenu:a,onMouseEnter:c,onMouseMove:f,onMouseLeave:d,onClick:m,reconnectRadius:p,onDoubleClick:g,onReconnectStart:v,onReconnectEnd:S,rfId:n,onError:E,edgeTypes:i,disableKeyboardA11y:x},A))]})}d1.displayName="EdgeRenderer";const xI=T.memo(d1),bI=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function SI({children:e}){const t=Oe(bI);return O.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function kI(e){const t=zh(),n=T.useRef(!1);T.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const EI=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function _I(e){const t=Oe(EI),n=He();return T.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function NI(e){return e.connection.inProgress?{...e.connection,to:po(e.connection.to,e.transform)}:{...e.connection}}function CI(e){return NI}function II(e){const t=CI();return Oe(t,Ve)}const TI=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function PI({containerStyle:e,style:t,type:n,component:i}){const{nodesConnectable:s,width:l,height:a,isValid:c,inProgress:f}=Oe(TI,Ve);return!(l&&s&&f)?null:O.jsx("svg",{style:e,width:l,height:a,className:"react-flow__connectionline react-flow__container",children:O.jsx("g",{className:tt(["react-flow__connection",dw(c)]),children:O.jsx(h1,{style:t,type:n,CustomComponent:i,isValid:c})})})}const h1=({style:e,type:t=_r.Bezier,CustomComponent:n,isValid:i})=>{const{inProgress:s,from:l,fromNode:a,fromHandle:c,fromPosition:f,to:d,toNode:m,toHandle:p,toPosition:g,pointer:v}=II();if(!s)return;if(n)return O.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:a,fromHandle:c,fromX:l.x,fromY:l.y,toX:d.x,toY:d.y,fromPosition:f,toPosition:g,connectionStatus:dw(i),toNode:m,toHandle:p,pointer:v});let S="";const x={sourceX:l.x,sourceY:l.y,sourcePosition:f,targetX:d.x,targetY:d.y,targetPosition:g};switch(t){case _r.Bezier:[S]=Ew(x);break;case _r.SimpleBezier:[S]=e1(x);break;case _r.Step:[S]=sh({...x,borderRadius:0});break;case _r.SmoothStep:[S]=sh(x);break;default:[S]=Nw(x)}return O.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:e})};h1.displayName="ConnectionLine";const AI={};function Xy(e=AI){T.useRef(e),He(),T.useEffect(()=>{},[e])}function OI(){He(),T.useRef(!1),T.useEffect(()=>{},[])}function p1({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:i,onEdgeClick:s,onNodeDoubleClick:l,onEdgeDoubleClick:a,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:m,onSelectionContextMenu:p,onSelectionStart:g,onSelectionEnd:v,connectionLineType:S,connectionLineStyle:x,connectionLineComponent:b,connectionLineContainerStyle:k,selectionKeyCode:_,selectionOnDrag:E,selectionMode:N,multiSelectionKeyCode:A,panActivationKeyCode:L,zoomActivationKeyCode:R,deleteKeyCode:C,onlyRenderVisibleElements:P,elementsSelectable:F,defaultViewport:M,translateExtent:$,minZoom:Z,maxZoom:j,preventScrolling:G,defaultMarkerColor:q,zoomOnScroll:J,zoomOnPinch:Y,panOnScroll:U,panOnScrollSpeed:B,panOnScrollMode:D,zoomOnDoubleClick:H,panOnDrag:V,autoPanOnSelection:K,onPaneClick:Q,onPaneMouseEnter:re,onPaneMouseMove:se,onPaneMouseLeave:ee,onPaneScroll:oe,onPaneContextMenu:de,paneClickDistance:xe,nodeClickDistance:he,onEdgeContextMenu:fe,onEdgeMouseEnter:ke,onEdgeMouseMove:Pe,onEdgeMouseLeave:Ae,reconnectRadius:$e,onReconnect:yt,onReconnectStart:kt,onReconnectEnd:ft,noDragClassName:dt,noWheelClassName:Mn,noPanClassName:wn,disableKeyboardA11y:xn,nodeExtent:Et,rfId:Ht,viewport:Lt,onViewportChange:Ut}){return Xy(e),Xy(t),OI(),kI(n),_I(Lt),O.jsx(Y2,{onPaneClick:Q,onPaneMouseEnter:re,onPaneMouseMove:se,onPaneMouseLeave:ee,onPaneContextMenu:de,onPaneScroll:oe,paneClickDistance:xe,deleteKeyCode:C,selectionKeyCode:_,selectionOnDrag:E,selectionMode:N,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:A,panActivationKeyCode:L,zoomActivationKeyCode:R,elementsSelectable:F,zoomOnScroll:J,zoomOnPinch:Y,zoomOnDoubleClick:H,panOnScroll:U,panOnScrollSpeed:B,panOnScrollMode:D,panOnDrag:V,autoPanOnSelection:K,defaultViewport:M,translateExtent:$,minZoom:Z,maxZoom:j,onSelectionContextMenu:p,preventScrolling:G,noDragClassName:dt,noWheelClassName:Mn,noPanClassName:wn,disableKeyboardA11y:xn,onViewportChange:Ut,isControlledViewport:!!Lt,children:O.jsxs(SI,{children:[O.jsx(xI,{edgeTypes:t,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:yt,onReconnectStart:kt,onReconnectEnd:ft,onlyRenderVisibleElements:P,onEdgeContextMenu:fe,onEdgeMouseEnter:ke,onEdgeMouseMove:Pe,onEdgeMouseLeave:Ae,reconnectRadius:$e,defaultMarkerColor:q,noPanClassName:wn,disableKeyboardA11y:xn,rfId:Ht}),O.jsx(PI,{style:x,type:S,component:b,containerStyle:k}),O.jsx("div",{className:"react-flow__edgelabel-renderer"}),O.jsx(nI,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:m,nodeClickDistance:he,onlyRenderVisibleElements:P,noPanClassName:wn,noDragClassName:dt,disableKeyboardA11y:xn,nodeExtent:Et,rfId:Ht}),O.jsx("div",{className:"react-flow__viewport-portal"})]})})}p1.displayName="GraphView";const LI=T.memo(p1),MI=yw(),Qy=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:s,height:l,fitView:a,fitViewOptions:c,minZoom:f=.5,maxZoom:d=2,nodeOrigin:m,nodeExtent:p,zIndexMode:g="basic"}={})=>{const v=new Map,S=new Map,x=new Map,b=new Map,k=i??t??[],_=n??e??[],E=m??[0,0],N=p??Ns;Tw(x,b,k);const{nodesInitialized:A}=ah(_,v,S,{nodeOrigin:E,nodeExtent:N,zIndexMode:g});let L=[0,0,1];if(a&&s&&l){const R=js(v,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:C,y:P,zoom:F}=Oh(R,s,l,f,d,(c==null?void 0:c.padding)??.1);L=[C,P,F]}return{rfId:"1",width:s??0,height:l??0,transform:L,nodes:_,nodesInitialized:A,nodeLookup:v,parentLookup:S,edges:k,edgeLookup:b,connectionLookup:x,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:f,maxZoom:d,translateExtent:Ns,nodeExtent:N,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ro.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:a??!1,fitViewOptions:c,fitViewResolver:null,connection:{...fw},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:MI,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:cw,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},RI=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:s,height:l,fitView:a,fitViewOptions:c,minZoom:f,maxZoom:d,nodeOrigin:m,nodeExtent:p,zIndexMode:g})=>KC((v,S)=>{async function x(){const{nodeLookup:b,panZoom:k,fitViewOptions:_,fitViewResolver:E,width:N,height:A,minZoom:L,maxZoom:R}=S();k&&(await UN({nodes:b,width:N,height:A,panZoom:k,minZoom:L,maxZoom:R},_),E==null||E.resolve(!0),v({fitViewResolver:null}))}return{...Qy({nodes:e,edges:t,width:s,height:l,fitView:a,fitViewOptions:c,minZoom:f,maxZoom:d,nodeOrigin:m,nodeExtent:p,defaultNodes:n,defaultEdges:i,zIndexMode:g}),setNodes:b=>{const{nodeLookup:k,parentLookup:_,nodeOrigin:E,elevateNodesOnSelect:N,fitViewQueued:A,zIndexMode:L,nodesSelectionActive:R}=S(),{nodesInitialized:C,hasSelectedNodes:P}=ah(b,k,_,{nodeOrigin:E,nodeExtent:p,elevateNodesOnSelect:N,checkEquality:!0,zIndexMode:L}),F=R&&P;A&&C?(x(),v({nodes:b,nodesInitialized:C,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:F})):v({nodes:b,nodesInitialized:C,nodesSelectionActive:F})},setEdges:b=>{const{connectionLookup:k,edgeLookup:_}=S();Tw(k,_,b),v({edges:b})},setDefaultNodesAndEdges:(b,k)=>{if(b){const{setNodes:_}=S();_(b),v({hasDefaultNodes:!0})}if(k){const{setEdges:_}=S();_(k),v({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:k,nodeLookup:_,parentLookup:E,domNode:N,nodeOrigin:A,nodeExtent:L,debug:R,fitViewQueued:C,zIndexMode:P}=S(),{changes:F,updatedInternals:M}=hC(b,_,E,N,A,L,P);M&&(uC(_,E,{nodeOrigin:A,nodeExtent:L,zIndexMode:P}),C?(x(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),(F==null?void 0:F.length)>0&&(R&&console.log("React Flow: trigger node changes",F),k==null||k(F)))},updateNodePositions:(b,k=!1)=>{const _=[];let E=[];const{nodeLookup:N,triggerNodeChanges:A,connection:L,updateConnection:R,onNodesChangeMiddlewareMap:C}=S();for(const[P,F]of b){const M=N.get(P),$=!!(M!=null&&M.expandParent&&(M!=null&&M.parentId)&&(F!=null&&F.position)),Z={id:P,type:"position",position:$?{x:Math.max(0,F.position.x),y:Math.max(0,F.position.y)}:F.position,dragging:k};if(M&&L.inProgress&&L.fromNode.id===M.id){const j=li(M,L.fromHandle,Se.Left,!0);R({...L,from:j})}$&&M.parentId&&_.push({id:P,parentId:M.parentId,rect:{...F.internals.positionAbsolute,width:F.measured.width??0,height:F.measured.height??0}}),E.push(Z)}if(_.length>0){const{parentLookup:P,nodeOrigin:F}=S(),M=$h(_,N,P,F);E.push(...M)}for(const P of C.values())E=P(E);A(E)},triggerNodeChanges:b=>{const{onNodesChange:k,setNodes:_,nodes:E,hasDefaultNodes:N,debug:A}=S();if(b!=null&&b.length){if(N){const L=m2(b,E);_(L)}A&&console.log("React Flow: trigger node changes",b),k==null||k(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:k,setEdges:_,edges:E,hasDefaultEdges:N,debug:A}=S();if(b!=null&&b.length){if(N){const L=g2(b,E);_(L)}A&&console.log("React Flow: trigger edge changes",b),k==null||k(b)}},addSelectedNodes:b=>{const{multiSelectionActive:k,edgeLookup:_,nodeLookup:E,triggerNodeChanges:N,triggerEdgeChanges:A}=S();if(k){const L=b.map(R=>Xr(R,!0));N(L);return}N(qi(E,new Set([...b]),!0)),A(qi(_))},addSelectedEdges:b=>{const{multiSelectionActive:k,edgeLookup:_,nodeLookup:E,triggerNodeChanges:N,triggerEdgeChanges:A}=S();if(k){const L=b.map(R=>Xr(R,!0));A(L);return}A(qi(_,new Set([...b]))),N(qi(E,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:k}={})=>{const{edges:_,nodes:E,nodeLookup:N,triggerNodeChanges:A,triggerEdgeChanges:L}=S(),R=b||E,C=k||_,P=[];for(const M of R){if(!M.selected)continue;const $=N.get(M.id);$&&($.selected=!1),P.push(Xr(M.id,!1))}const F=[];for(const M of C)M.selected&&F.push(Xr(M.id,!1));A(P),L(F)},setMinZoom:b=>{const{panZoom:k,maxZoom:_}=S();k==null||k.setScaleExtent([b,_]),v({minZoom:b})},setMaxZoom:b=>{const{panZoom:k,minZoom:_}=S();k==null||k.setScaleExtent([_,b]),v({maxZoom:b})},setTranslateExtent:b=>{var k;(k=S().panZoom)==null||k.setTranslateExtent(b),v({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:k,triggerNodeChanges:_,triggerEdgeChanges:E,elementsSelectable:N}=S();if(!N)return;const A=k.reduce((R,C)=>C.selected?[...R,Xr(C.id,!1)]:R,[]),L=b.reduce((R,C)=>C.selected?[...R,Xr(C.id,!1)]:R,[]);_(A),E(L)},setNodeExtent:b=>{const{nodes:k,nodeLookup:_,parentLookup:E,nodeOrigin:N,elevateNodesOnSelect:A,nodeExtent:L,zIndexMode:R}=S();b[0][0]===L[0][0]&&b[0][1]===L[0][1]&&b[1][0]===L[1][0]&&b[1][1]===L[1][1]||(ah(k,_,E,{nodeOrigin:N,nodeExtent:b,elevateNodesOnSelect:A,checkEquality:!1,zIndexMode:R}),v({nodeExtent:b}))},panBy:b=>{const{transform:k,width:_,height:E,panZoom:N,translateExtent:A}=S();return pC({delta:b,panZoom:N,transform:k,translateExtent:A,width:_,height:E})},setCenter:async(b,k,_)=>{const{width:E,height:N,maxZoom:A,panZoom:L}=S();if(!L)return!1;const R=typeof(_==null?void 0:_.zoom)<"u"?_.zoom:A;return await L.setViewport({x:E/2-b*R,y:N/2-k*R,zoom:R},{duration:_==null?void 0:_.duration,ease:_==null?void 0:_.ease,interpolate:_==null?void 0:_.interpolate}),!0},cancelConnection:()=>{v({connection:{...fw}})},updateConnection:b=>{v({connection:b})},reset:()=>v({...Qy()})}},Object.is);function m1({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:i,initialWidth:s,initialHeight:l,initialMinZoom:a,initialMaxZoom:c,initialFitViewOptions:f,fitView:d,nodeOrigin:m,nodeExtent:p,zIndexMode:g,children:v}){const[S]=T.useState(()=>RI({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:s,height:l,fitView:d,minZoom:a,maxZoom:c,fitViewOptions:f,nodeOrigin:m,nodeExtent:p,zIndexMode:g}));return O.jsx(GC,{value:S,children:O.jsx(S2,{children:v})})}function DI({children:e,nodes:t,edges:n,defaultNodes:i,defaultEdges:s,width:l,height:a,fitView:c,fitViewOptions:f,minZoom:d,maxZoom:m,nodeOrigin:p,nodeExtent:g,zIndexMode:v}){return T.useContext(pu)?O.jsx(O.Fragment,{children:e}):O.jsx(m1,{initialNodes:t,initialEdges:n,defaultNodes:i,defaultEdges:s,initialWidth:l,initialHeight:a,fitView:c,initialFitViewOptions:f,initialMinZoom:d,initialMaxZoom:m,nodeOrigin:p,nodeExtent:g,zIndexMode:v,children:e})}const jI={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function $I({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,className:s,nodeTypes:l,edgeTypes:a,onNodeClick:c,onEdgeClick:f,onInit:d,onMove:m,onMoveStart:p,onMoveEnd:g,onConnect:v,onConnectStart:S,onConnectEnd:x,onClickConnectStart:b,onClickConnectEnd:k,onNodeMouseEnter:_,onNodeMouseMove:E,onNodeMouseLeave:N,onNodeContextMenu:A,onNodeDoubleClick:L,onNodeDragStart:R,onNodeDrag:C,onNodeDragStop:P,onNodesDelete:F,onEdgesDelete:M,onDelete:$,onSelectionChange:Z,onSelectionDragStart:j,onSelectionDrag:G,onSelectionDragStop:q,onSelectionContextMenu:J,onSelectionStart:Y,onSelectionEnd:U,onBeforeDelete:B,connectionMode:D,connectionLineType:H=_r.Bezier,connectionLineStyle:V,connectionLineComponent:K,connectionLineContainerStyle:Q,deleteKeyCode:re="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:ee=!1,selectionMode:oe=Cs.Full,panActivationKeyCode:de="Space",multiSelectionKeyCode:xe=Ts()?"Meta":"Control",zoomActivationKeyCode:he=Ts()?"Meta":"Control",snapToGrid:fe,snapGrid:ke,onlyRenderVisibleElements:Pe=!1,selectNodesOnDrag:Ae,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:kt,nodesFocusable:ft,nodeOrigin:dt=Hw,edgesFocusable:Mn,edgesReconnectable:wn,elementsSelectable:xn=!0,defaultViewport:Et=a2,minZoom:Ht=.5,maxZoom:Lt=2,translateExtent:Ut=Ns,preventScrolling:Hs=!0,nodeExtent:Rn,defaultMarkerColor:Pr="#b1b1b7",zoomOnScroll:Ou=!0,zoomOnPinch:Us=!0,panOnScroll:Ws=!1,panOnScrollSpeed:Lu=.5,panOnScrollMode:xo=ni.Free,zoomOnDoubleClick:bo=!0,panOnDrag:So=!0,onPaneClick:ko,onPaneMouseEnter:Eo,onPaneMouseMove:Zn,onPaneMouseLeave:er,onPaneScroll:qs,onPaneContextMenu:Ys,paneClickDistance:Ks=1,nodeClickDistance:Gs=0,children:Xs,onReconnect:_o,onReconnectStart:Qs,onReconnectEnd:Ar,onEdgeContextMenu:No,onEdgeDoubleClick:Or,onEdgeMouseEnter:Mu,onEdgeMouseMove:Lr,onEdgeMouseLeave:ci,reconnectRadius:fi=10,onNodesChange:Co,onEdgesChange:Ru,noDragClassName:Du="nodrag",noWheelClassName:ju="nowheel",noPanClassName:bn="nopan",fitView:Io,fitViewOptions:To,connectOnClick:$u,attributionPosition:Js,proOptions:Zs,defaultEdgeOptions:el,elevateNodesOnSelect:tl=!0,elevateEdgesOnSelect:zu=!1,disableKeyboardA11y:nl=!1,autoPanOnConnect:Ue,autoPanOnNodeDrag:Fu,autoPanOnSelection:Po=!0,autoPanSpeed:rl,connectionRadius:di,isValidConnection:Bu,onError:il,style:hi,id:Mt,nodeDragThreshold:Vu,connectionDragThreshold:Rt,viewport:Hu,onViewportChange:Uu,width:Wu,height:pi,colorMode:mi="light",debug:Mr,onScroll:Dn,ariaLabelConfig:qu,zIndexMode:ol="basic",...Ao},sl){const Rr=Mt||"1",Dr=d2(mi),Yu=T.useCallback(gi=>{gi.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Dn==null||Dn(gi)},[Dn]);return O.jsx("div",{"data-testid":"rf__wrapper",...Ao,onScroll:Yu,style:{...hi,...jI},ref:sl,className:tt(["react-flow",s,Dr]),id:Mt,role:"application",children:O.jsxs(DI,{nodes:e,edges:t,width:Wu,height:pi,fitView:Io,fitViewOptions:To,minZoom:Ht,maxZoom:Lt,nodeOrigin:dt,nodeExtent:Rn,zIndexMode:ol,children:[O.jsx(f2,{nodes:e,edges:t,defaultNodes:n,defaultEdges:i,onConnect:v,onConnectStart:S,onConnectEnd:x,onClickConnectStart:b,onClickConnectEnd:k,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:kt,nodesFocusable:ft,edgesFocusable:Mn,edgesReconnectable:wn,elementsSelectable:xn,elevateNodesOnSelect:tl,elevateEdgesOnSelect:zu,minZoom:Ht,maxZoom:Lt,nodeExtent:Rn,onNodesChange:Co,onEdgesChange:Ru,snapToGrid:fe,snapGrid:ke,connectionMode:D,translateExtent:Ut,connectOnClick:$u,defaultEdgeOptions:el,fitView:Io,fitViewOptions:To,onNodesDelete:F,onEdgesDelete:M,onDelete:$,onNodeDragStart:R,onNodeDrag:C,onNodeDragStop:P,onSelectionDrag:G,onSelectionDragStart:j,onSelectionDragStop:q,onMove:m,onMoveStart:p,onMoveEnd:g,noPanClassName:bn,nodeOrigin:dt,rfId:Rr,autoPanOnConnect:Ue,autoPanOnNodeDrag:Fu,autoPanSpeed:rl,onError:il,connectionRadius:di,isValidConnection:Bu,selectNodesOnDrag:Ae,nodeDragThreshold:Vu,connectionDragThreshold:Rt,onBeforeDelete:B,debug:Mr,ariaLabelConfig:qu,zIndexMode:ol}),O.jsx(LI,{onInit:d,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:_,onNodeMouseMove:E,onNodeMouseLeave:N,onNodeContextMenu:A,onNodeDoubleClick:L,nodeTypes:l,edgeTypes:a,connectionLineType:H,connectionLineStyle:V,connectionLineComponent:K,connectionLineContainerStyle:Q,selectionKeyCode:se,selectionOnDrag:ee,selectionMode:oe,deleteKeyCode:re,multiSelectionKeyCode:xe,panActivationKeyCode:de,zoomActivationKeyCode:he,onlyRenderVisibleElements:Pe,defaultViewport:Et,translateExtent:Ut,minZoom:Ht,maxZoom:Lt,preventScrolling:Hs,zoomOnScroll:Ou,zoomOnPinch:Us,zoomOnDoubleClick:bo,panOnScroll:Ws,panOnScrollSpeed:Lu,panOnScrollMode:xo,panOnDrag:So,autoPanOnSelection:Po,onPaneClick:ko,onPaneMouseEnter:Eo,onPaneMouseMove:Zn,onPaneMouseLeave:er,onPaneScroll:qs,onPaneContextMenu:Ys,paneClickDistance:Ks,nodeClickDistance:Gs,onSelectionContextMenu:J,onSelectionStart:Y,onSelectionEnd:U,onReconnect:_o,onReconnectStart:Qs,onReconnectEnd:Ar,onEdgeContextMenu:No,onEdgeDoubleClick:Or,onEdgeMouseEnter:Mu,onEdgeMouseMove:Lr,onEdgeMouseLeave:ci,reconnectRadius:fi,defaultMarkerColor:Pr,noDragClassName:Du,noWheelClassName:ju,noPanClassName:bn,rfId:Rr,disableKeyboardA11y:nl,nodeExtent:Rn,viewport:Hu,onViewportChange:Uu}),O.jsx(l2,{onSelectionChange:Z}),Xs,O.jsx(n2,{proOptions:Zs,position:Js}),O.jsx(t2,{rfId:Rr,disableKeyboardA11y:nl})]})})}var zI=Ww($I);function FI({dimensions:e,lineWidth:t,variant:n,className:i}){return O.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:tt(["react-flow__background-pattern",n,i])})}function BI({radius:e,className:t}){return O.jsx("circle",{cx:e,cy:e,r:e,className:tt(["react-flow__background-pattern","dots",t])})}var Gn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Gn||(Gn={}));const VI={[Gn.Dots]:1,[Gn.Lines]:1,[Gn.Cross]:6},HI=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function g1({id:e,variant:t=Gn.Dots,gap:n=20,size:i,lineWidth:s=1,offset:l=0,color:a,bgColor:c,style:f,className:d,patternClassName:m}){const p=T.useRef(null),{transform:g,patternId:v}=Oe(HI,Ve),S=i||VI[t],x=t===Gn.Dots,b=t===Gn.Cross,k=Array.isArray(n)?n:[n,n],_=[k[0]*g[2]||1,k[1]*g[2]||1],E=S*g[2],N=Array.isArray(l)?l:[l,l],A=b?[E,E]:_,L=[N[0]*g[2]||1+A[0]/2,N[1]*g[2]||1+A[1]/2],R=`${v}${e||""}`;return O.jsxs("svg",{className:tt(["react-flow__background",d]),style:{...f,...gu,"--xy-background-color-props":c,"--xy-background-pattern-color-props":a},ref:p,"data-testid":"rf__background",children:[O.jsx("pattern",{id:R,x:g[0]%_[0],y:g[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${L[0]},-${L[1]})`,children:x?O.jsx(BI,{radius:E/2,className:m}):O.jsx(FI,{dimensions:A,lineWidth:s,variant:t,className:m})}),O.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${R})`})]})}g1.displayName="Background";const UI=T.memo(g1);function WI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:O.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function qI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:O.jsx("path",{d:"M0 0h32v4.2H0z"})})}function YI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:O.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 KI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:O.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 GI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:O.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 ga({children:e,className:t,...n}){return O.jsx("button",{type:"button",className:tt(["react-flow__controls-button",t]),...n,children:e})}const XI=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function y1({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:i=!0,fitViewOptions:s,onZoomIn:l,onZoomOut:a,onFitView:c,onInteractiveChange:f,className:d,children:m,position:p="bottom-left",orientation:g="vertical","aria-label":v}){const S=He(),{isInteractive:x,minZoomReached:b,maxZoomReached:k,ariaLabelConfig:_}=Oe(XI,Ve),{zoomIn:E,zoomOut:N,fitView:A}=zh(),L=()=>{E(),l==null||l()},R=()=>{N(),a==null||a()},C=()=>{A(s),c==null||c()},P=()=>{S.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),f==null||f(!x)},F=g==="horizontal"?"horizontal":"vertical";return O.jsxs(mu,{className:tt(["react-flow__controls",F,d]),position:p,style:e,"data-testid":"rf__controls","aria-label":v??_["controls.ariaLabel"],children:[t&&O.jsxs(O.Fragment,{children:[O.jsx(ga,{onClick:L,className:"react-flow__controls-zoomin",title:_["controls.zoomIn.ariaLabel"],"aria-label":_["controls.zoomIn.ariaLabel"],disabled:k,children:O.jsx(WI,{})}),O.jsx(ga,{onClick:R,className:"react-flow__controls-zoomout",title:_["controls.zoomOut.ariaLabel"],"aria-label":_["controls.zoomOut.ariaLabel"],disabled:b,children:O.jsx(qI,{})})]}),n&&O.jsx(ga,{className:"react-flow__controls-fitview",onClick:C,title:_["controls.fitView.ariaLabel"],"aria-label":_["controls.fitView.ariaLabel"],children:O.jsx(YI,{})}),i&&O.jsx(ga,{className:"react-flow__controls-interactive",onClick:P,title:_["controls.interactive.ariaLabel"],"aria-label":_["controls.interactive.ariaLabel"],children:x?O.jsx(GI,{}):O.jsx(KI,{})}),m]})}y1.displayName="Controls";const QI=T.memo(y1);function JI({id:e,x:t,y:n,width:i,height:s,style:l,color:a,strokeColor:c,strokeWidth:f,className:d,borderRadius:m,shapeRendering:p,selected:g,onClick:v}){const{background:S,backgroundColor:x}=l||{},b=a||S||x;return O.jsx("rect",{className:tt(["react-flow__minimap-node",{selected:g},d]),x:t,y:n,rx:m,ry:m,width:i,height:s,style:{fill:b,stroke:c,strokeWidth:f},shapeRendering:p,onClick:v?k=>v(k,e):void 0})}const ZI=T.memo(JI),eT=e=>e.nodes.map(t=>t.id),Vf=e=>e instanceof Function?e:()=>e;function tT({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l=ZI,onClick:a}){const c=Oe(eT,Ve),f=Vf(t),d=Vf(e),m=Vf(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return O.jsx(O.Fragment,{children:c.map(g=>O.jsx(rT,{id:g,nodeColorFunc:f,nodeStrokeColorFunc:d,nodeClassNameFunc:m,nodeBorderRadius:i,nodeStrokeWidth:s,NodeComponent:l,onClick:a,shapeRendering:p},g))})}function nT({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:i,nodeBorderRadius:s,nodeStrokeWidth:l,shapeRendering:a,NodeComponent:c,onClick:f}){const{node:d,x:m,y:p,width:g,height:v}=Oe(S=>{const x=S.nodeLookup.get(e);if(!x)return{node:void 0,x:0,y:0,width:0,height:0};const b=x.internals.userNode,{x:k,y:_}=x.internals.positionAbsolute,{width:E,height:N}=Jn(b);return{node:b,x:k,y:_,width:E,height:N}},Ve);return!d||d.hidden||!vw(d)?null:O.jsx(c,{x:m,y:p,width:g,height:v,style:d.style,selected:!!d.selected,className:i(d),color:t(d),borderRadius:s,strokeColor:n(d),strokeWidth:l,shapeRendering:a,onClick:f,id:d.id})}const rT=T.memo(nT);var iT=T.memo(tT);const oT=200,sT=150,lT=e=>!e.hidden,aT=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?gw(js(e.nodeLookup,{filter:lT}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},uT="react-flow__minimap-desc";function v1({style:e,className:t,nodeStrokeColor:n,nodeColor:i,nodeClassName:s="",nodeBorderRadius:l=5,nodeStrokeWidth:a,nodeComponent:c,bgColor:f,maskColor:d,maskStrokeColor:m,maskStrokeWidth:p,position:g="bottom-right",onClick:v,onNodeClick:S,pannable:x=!1,zoomable:b=!1,ariaLabel:k,inversePan:_,zoomStep:E=1,offsetScale:N=5}){const A=He(),L=T.useRef(null),{boundingRect:R,viewBB:C,rfId:P,panZoom:F,translateExtent:M,flowWidth:$,flowHeight:Z,ariaLabelConfig:j}=Oe(aT,Ve),G=(e==null?void 0:e.width)??oT,q=(e==null?void 0:e.height)??sT,J=R.width/G,Y=R.height/q,U=Math.max(J,Y),B=U*G,D=U*q,H=N*U,V=R.x-(B-R.width)/2-H,K=R.y-(D-R.height)/2-H,Q=B+H*2,re=D+H*2,se=`${uT}-${P}`,ee=T.useRef(0),oe=T.useRef();ee.current=U,T.useEffect(()=>{if(L.current&&F)return oe.current=kC({domNode:L.current,panZoom:F,getTransform:()=>A.getState().transform,getViewScale:()=>ee.current}),()=>{var fe;(fe=oe.current)==null||fe.destroy()}},[F]),T.useEffect(()=>{var fe;(fe=oe.current)==null||fe.update({translateExtent:M,width:$,height:Z,inversePan:_,pannable:x,zoomStep:E,zoomable:b})},[x,b,_,E,M,$,Z]);const de=v?fe=>{var Ae;const[ke,Pe]=((Ae=oe.current)==null?void 0:Ae.pointer(fe))||[0,0];v(fe,{x:ke,y:Pe})}:void 0,xe=S?T.useCallback((fe,ke)=>{const Pe=A.getState().nodeLookup.get(ke).internals.userNode;S(fe,Pe)},[]):void 0,he=k??j["minimap.ariaLabel"];return O.jsx(mu,{position:g,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*U:void 0,"--xy-minimap-node-background-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:tt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:O.jsxs("svg",{width:G,height:q,viewBox:`${V} ${K} ${Q} ${re}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:L,onClick:de,children:[he&&O.jsx("title",{id:se,children:he}),O.jsx(iT,{onClick:xe,nodeColor:i,nodeStrokeColor:n,nodeBorderRadius:l,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:c}),O.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-H},${K-H}h${Q+H*2}v${re+H*2}h${-Q-H*2}z
|
|
62
|
-
M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}v1.displayName="MiniMap";T.memo(v1);const cT=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,fT={[lo.Line]:"right",[lo.Handle]:"bottom-right"};function dT({nodeId:e,position:t,variant:n=lo.Handle,className:i,style:s=void 0,children:l,color:a,minWidth:c=10,minHeight:f=10,maxWidth:d=Number.MAX_VALUE,maxHeight:m=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:g,autoScale:v=!0,shouldResize:S,onResizeStart:x,onResize:b,onResizeEnd:k}){const _=Gw(),E=typeof e=="string"?e:_,N=He(),A=T.useRef(null),L=n===lo.Handle,R=Oe(T.useCallback(cT(L&&v),[L,v]),Ve),C=T.useRef(null),P=t??fT[n];T.useEffect(()=>{if(!(!A.current||!E))return C.current||(C.current=DC({domNode:A.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:M,transform:$,snapGrid:Z,snapToGrid:j,nodeOrigin:G,domNode:q}=N.getState();return{nodeLookup:M,transform:$,snapGrid:Z,snapToGrid:j,nodeOrigin:G,paneDomNode:q}},onChange:(M,$)=>{const{triggerNodeChanges:Z,nodeLookup:j,parentLookup:G,nodeOrigin:q}=N.getState(),J=[],Y={x:M.x,y:M.y},U=j.get(E);if(U&&U.expandParent&&U.parentId){const B=U.origin??q,D=M.width??U.measured.width??0,H=M.height??U.measured.height??0,V={id:U.id,parentId:U.parentId,rect:{width:D,height:H,...ww({x:M.x??U.position.x,y:M.y??U.position.y},{width:D,height:H},U.parentId,j,B)}},K=$h([V],j,G,q);J.push(...K),Y.x=M.x?Math.max(B[0]*D,M.x):void 0,Y.y=M.y?Math.max(B[1]*H,M.y):void 0}if(Y.x!==void 0&&Y.y!==void 0){const B={id:E,type:"position",position:{...Y}};J.push(B)}if(M.width!==void 0&&M.height!==void 0){const D={id:E,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:M.width,height:M.height}};J.push(D)}for(const B of $){const D={...B,type:"position"};J.push(D)}Z(J)},onEnd:({width:M,height:$})=>{const Z={id:E,type:"dimensions",resizing:!1,dimensions:{width:M,height:$}};N.getState().triggerNodeChanges([Z])}})),C.current.update({controlPosition:P,boundaries:{minWidth:c,minHeight:f,maxWidth:d,maxHeight:m},keepAspectRatio:p,resizeDirection:g,onResizeStart:x,onResize:b,onResizeEnd:k,shouldResize:S}),()=>{var M;(M=C.current)==null||M.destroy()}},[P,c,f,d,m,p,x,b,k,S]);const F=P.split("-");return O.jsx("div",{className:tt(["react-flow__resize-control","nodrag",...F,n,i]),ref:A,style:{...s,scale:R,...a&&{[L?"backgroundColor":"borderColor"]:a}},children:l})}T.memo(dT);function w1(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=w1(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function x1(){for(var e,t,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=w1(e))&&(i&&(i+=" "),i+=t);return i}const hT=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},pT=(e,t)=>({classGroupId:e,validator:t}),b1=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Qa="-",Jy=[],mT="arbitrary..",gT=e=>{const t=vT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return yT(a);const c=a.split(Qa),f=c[0]===""&&c.length>1?1:0;return S1(c,f,t)},getConflictingClassGroupIds:(a,c)=>{if(c){const f=i[a],d=n[a];return f?d?hT(d,f):f:d||Jy}return n[a]||Jy}}},S1=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],l=n.nextPart.get(s);if(l){const d=S1(e,t+1,l);if(d)return d}const a=n.validators;if(a===null)return;const c=t===0?e.join(Qa):e.slice(t).join(Qa),f=a.length;for(let d=0;d<f;d++){const m=a[d];if(m.validator(c))return m.classGroupId}},yT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?mT+i:void 0})(),vT=e=>{const{theme:t,classGroups:n}=e;return wT(n,t)},wT=(e,t)=>{const n=b1();for(const i in e){const s=e[i];Bh(s,n,i,t)}return n},Bh=(e,t,n,i)=>{const s=e.length;for(let l=0;l<s;l++){const a=e[l];xT(a,t,n,i)}},xT=(e,t,n,i)=>{if(typeof e=="string"){bT(e,t,n);return}if(typeof e=="function"){ST(e,t,n,i);return}kT(e,t,n,i)},bT=(e,t,n)=>{const i=e===""?t:k1(t,e);i.classGroupId=n},ST=(e,t,n,i)=>{if(ET(e)){Bh(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(pT(n,e))},kT=(e,t,n,i)=>{const s=Object.entries(e),l=s.length;for(let a=0;a<l;a++){const[c,f]=s[a];Bh(f,k1(t,c),n,i)}},k1=(e,t)=>{let n=e;const i=t.split(Qa),s=i.length;for(let l=0;l<s;l++){const a=i[l];let c=n.nextPart.get(a);c||(c=b1(),n.nextPart.set(a,c)),n=c}return n},ET=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_T=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const s=(l,a)=>{n[l]=a,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(l){let a=n[l];if(a!==void 0)return a;if((a=i[l])!==void 0)return s(l,a),a},set(l,a){l in n?n[l]=a:s(l,a)}}},fh="!",Zy=":",NT=[],e0=(e,t,n,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:s}),CT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=s=>{const l=[];let a=0,c=0,f=0,d;const m=s.length;for(let x=0;x<m;x++){const b=s[x];if(a===0&&c===0){if(b===Zy){l.push(s.slice(f,x)),f=x+1;continue}if(b==="/"){d=x;continue}}b==="["?a++:b==="]"?a--:b==="("?c++:b===")"&&c--}const p=l.length===0?s:s.slice(f);let g=p,v=!1;p.endsWith(fh)?(g=p.slice(0,-1),v=!0):p.startsWith(fh)&&(g=p.slice(1),v=!0);const S=d&&d>f?d-f:void 0;return e0(l,v,g,S)};if(t){const s=t+Zy,l=i;i=a=>a.startsWith(s)?l(a.slice(s.length)):e0(NT,!1,a,void 0,!0)}if(n){const s=i;i=l=>n({className:l,parseClassName:s})}return i},IT=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let s=[];for(let l=0;l<n.length;l++){const a=n[l],c=a[0]==="[",f=t.has(a);c||f?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(a)):s.push(a)}return s.length>0&&(s.sort(),i.push(...s)),i}},TT=e=>({cache:_T(e.cacheSize),parseClassName:CT(e),sortModifiers:IT(e),postfixLookupClassGroupIds:PT(e),...gT(e)}),PT=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let i=0;i<n.length;i++)t[n[i]]=!0;return t},AT=/\s+/,OT=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l,postfixLookupClassGroupIds:a}=t,c=[],f=e.trim().split(AT);let d="";for(let m=f.length-1;m>=0;m-=1){const p=f[m],{isExternal:g,modifiers:v,hasImportantModifier:S,baseClassName:x,maybePostfixModifierPosition:b}=n(p);if(g){d=p+(d.length>0?" "+d:d);continue}let k=!!b,_;if(k){const R=x.substring(0,b);_=i(R);const C=_&&a[_]?i(x):void 0;C&&C!==_&&(_=C,k=!1)}else _=i(x);if(!_){if(!k){d=p+(d.length>0?" "+d:d);continue}if(_=i(x),!_){d=p+(d.length>0?" "+d:d);continue}k=!1}const E=v.length===0?"":v.length===1?v[0]:l(v).join(":"),N=S?E+fh:E,A=N+_;if(c.indexOf(A)>-1)continue;c.push(A);const L=s(_,k);for(let R=0;R<L.length;++R){const C=L[R];c.push(N+C)}d=p+(d.length>0?" "+d:d)}return d},LT=(...e)=>{let t=0,n,i,s="";for(;t<e.length;)(n=e[t++])&&(i=E1(n))&&(s&&(s+=" "),s+=i);return s},E1=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=E1(e[i]))&&(n&&(n+=" "),n+=t);return n},MT=(e,...t)=>{let n,i,s,l;const a=f=>{const d=t.reduce((m,p)=>p(m),e());return n=TT(d),i=n.cache.get,s=n.cache.set,l=c,c(f)},c=f=>{const d=i(f);if(d)return d;const m=OT(f,n);return s(f,m),m};return l=a,(...f)=>l(LT(...f))},RT=[],it=e=>{const t=n=>n[e]||RT;return t.isThemeGetter=!0,t},_1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,N1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,DT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,jT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$T=/\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$/,zT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,FT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sr=e=>DT.test(e),Ie=e=>!!e&&!Number.isNaN(Number(e)),Nn=e=>!!e&&Number.isInteger(Number(e)),Hf=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),qn=e=>jT.test(e),C1=()=>!0,VT=e=>$T.test(e)&&!zT.test(e),Vh=()=>!1,HT=e=>FT.test(e),UT=e=>BT.test(e),WT=e=>!me(e)&&!ye(e),qT=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),YT=e=>Ir(e,P1,Vh),me=e=>_1.test(e),Gr=e=>Ir(e,A1,VT),t0=e=>Ir(e,tP,Ie),KT=e=>Ir(e,L1,C1),GT=e=>Ir(e,O1,Vh),n0=e=>Ir(e,I1,Vh),XT=e=>Ir(e,T1,UT),ya=e=>Ir(e,M1,HT),ye=e=>N1.test(e),ds=e=>ui(e,A1),QT=e=>ui(e,O1),r0=e=>ui(e,I1),JT=e=>ui(e,P1),ZT=e=>ui(e,T1),va=e=>ui(e,M1,!0),eP=e=>ui(e,L1,!0),Ir=(e,t,n)=>{const i=_1.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},ui=(e,t,n=!1)=>{const i=N1.exec(e);return i?i[1]?t(i[1]):n:!1},I1=e=>e==="position"||e==="percentage",T1=e=>e==="image"||e==="url",P1=e=>e==="length"||e==="size"||e==="bg-size",A1=e=>e==="length",tP=e=>e==="number",O1=e=>e==="family-name",L1=e=>e==="number"||e==="weight",M1=e=>e==="shadow",nP=()=>{const e=it("color"),t=it("font"),n=it("text"),i=it("font-weight"),s=it("tracking"),l=it("leading"),a=it("breakpoint"),c=it("container"),f=it("spacing"),d=it("radius"),m=it("shadow"),p=it("inset-shadow"),g=it("text-shadow"),v=it("drop-shadow"),S=it("blur"),x=it("perspective"),b=it("aspect"),k=it("ease"),_=it("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...N(),ye,me],L=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],C=()=>[ye,me,f],P=()=>[Sr,"full","auto",...C()],F=()=>[Nn,"none","subgrid",ye,me],M=()=>["auto",{span:["full",Nn,ye,me]},Nn,ye,me],$=()=>[Nn,"auto",ye,me],Z=()=>["auto","min","max","fr",ye,me],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...C()],J=()=>[Sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],Y=()=>[Sr,"screen","full","dvw","lvw","svw","min","max","fit",...C()],U=()=>[Sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],B=()=>[e,ye,me],D=()=>[...N(),r0,n0,{position:[ye,me]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",JT,YT,{size:[ye,me]}],K=()=>[Hf,ds,Gr],Q=()=>["","none","full",d,ye,me],re=()=>["",Ie,ds,Gr],se=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[Ie,Hf,r0,n0],de=()=>["","none",S,ye,me],xe=()=>["none",Ie,ye,me],he=()=>["none",Ie,ye,me],fe=()=>[Ie,ye,me],ke=()=>[Sr,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qn],breakpoint:[qn],color:[C1],container:[qn],"drop-shadow":[qn],ease:["in","out","in-out"],font:[WT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qn],shadow:[qn],spacing:["px",Ie],text:[qn],"text-shadow":[qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Sr,me,ye,b]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,me]}],"container-named":[qT],columns:[{columns:[Ie,me,ye,c]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Nn,"auto",ye,me]}],basis:[{basis:[Sr,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,Sr,"auto","initial","none",me]}],grow:[{grow:["",Ie,ye,me]}],shrink:[{shrink:["",Ie,ye,me]}],order:[{order:[Nn,"first","last","none",ye,me]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...U()]}],"min-block-size":[{"min-block":["auto",...U()]}],"max-block-size":[{"max-block":["none",...U()]}],w:[{w:[c,"screen",...J()]}],"min-w":[{"min-w":[c,"screen","none",...J()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",n,ds,Gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,eP,KT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hf,me]}],"font-family":[{font:[QT,GT,t]}],"font-features":[{"font-features":[me]}],"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:[s,ye,me]}],"line-clamp":[{"line-clamp":[Ie,"none",ye,t0]}],leading:[{leading:[l,...C()]}],"list-image":[{"list-image":["none",ye,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",ye,Gr]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Ie,"auto",ye,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Nn,ye,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nn,ye,me],radial:["",ye,me],conic:[Nn,ye,me]},ZT,XT]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,ye,me]}],"outline-w":[{outline:["",Ie,ds,Gr]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",m,va,ya]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",p,va,ya]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Ie,Gr]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",g,va,ya]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Ie,ye,me]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[ye,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,me]}],filter:[{filter:["","none",ye,me]}],blur:[{blur:de()}],brightness:[{brightness:[Ie,ye,me]}],contrast:[{contrast:[Ie,ye,me]}],"drop-shadow":[{"drop-shadow":["","none",v,va,ya]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Ie,ye,me]}],"hue-rotate":[{"hue-rotate":[Ie,ye,me]}],invert:[{invert:["",Ie,ye,me]}],saturate:[{saturate:[Ie,ye,me]}],sepia:[{sepia:["",Ie,ye,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,me]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,ye,me]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,ye,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,ye,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,ye,me]}],"backdrop-invert":[{"backdrop-invert":["",Ie,ye,me]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,ye,me]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,ye,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,ye,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",ye,me]}],ease:[{ease:["linear","initial",k,ye,me]}],delay:[{delay:[Ie,ye,me]}],animate:[{animate:["none",_,ye,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,ye,me]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:xe()}],"rotate-x":[{"rotate-x":xe()}],"rotate-y":[{"rotate-y":xe()}],"rotate-z":[{"rotate-z":xe()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[ye,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],zoom:[{zoom:[Nn,ye,me]}],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":B()}],"scrollbar-track-color":[{"scrollbar-track":B()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",ye,me]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Ie,ds,Gr,t0]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},rP=MT(nP);function at(...e){return rP(x1(e))}const iP=[{id:"jpd-comment-triage",trigger:"hourly",active:!0},{id:"github-pr-summary",trigger:"webhook",active:!1},{id:"confluence-digest",trigger:"daily",active:!1}];function oP({activeView:e,onViewChange:t,liveConnected:n}){return O.jsxs("aside",{className:"w-60 shrink-0 bg-bg border-r border-border flex flex-col",children:[O.jsxs("div",{className:"h-12 flex items-center gap-2 px-4 border-b border-border",children:[O.jsx("div",{className:"size-5 rounded bg-fg flex items-center justify-center text-bg text-[10px] font-mono",children:"~/"}),O.jsx("span",{className:"font-semibold tracking-tight",children:"workflow-engine"}),O.jsx("span",{className:"ml-auto text-[10px] text-mutedfg font-mono",children:"v0.1"})]}),O.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] uppercase tracking-wider text-mutedfg",children:"Workflows"}),O.jsx("nav",{className:"px-2 space-y-0.5",children:iP.map(i=>O.jsxs("button",{className:at("w-full text-left px-2.5 py-1.5 rounded-md flex items-center gap-2 text-[13px]",i.active?"bg-muted":"hover:bg-muted text-mutedfg"),children:[O.jsx("span",{className:at("size-1.5 rounded-full",i.active?"bg-ok":"bg-border")}),i.id,O.jsx("span",{className:"ml-auto text-[10px] text-mutedfg font-mono",children:i.trigger})]},i.id))}),O.jsx("div",{className:"px-3 pt-5 pb-1 text-[11px] uppercase tracking-wider text-mutedfg",children:"View"}),O.jsxs("nav",{className:"px-2 space-y-0.5",children:[O.jsx("button",{onClick:()=>t("board"),className:at("w-full text-left px-2.5 py-1.5 rounded-md flex items-center gap-2 text-[13px]",e==="board"?"bg-muted":"hover:bg-muted text-mutedfg"),children:"Whiteboard"}),O.jsxs("button",{onClick:()=>t("runs"),className:at("w-full text-left px-2.5 py-1.5 rounded-md flex items-center gap-2 text-[13px]",e==="runs"?"bg-muted":"hover:bg-muted text-mutedfg"),children:["Runs",n&&O.jsx("span",{className:"ml-auto size-1.5 rounded-full bg-ok pulse-dot"})]})]}),O.jsxs("div",{className:"mt-auto p-3 border-t border-border text-[11px] text-mutedfg leading-relaxed",children:[O.jsxs("div",{className:"flex items-center gap-1.5",children:[O.jsx("span",{className:at("size-1.5 rounded-full",n?"bg-ok":"bg-border")}),n?"server connected":"scheduler running"]}),O.jsxs("div",{className:"mt-1 font-mono",children:["no fleet state stored —",O.jsx("br",{}),"surfaces are the source of truth"]})]})]})}function sP({workflow:e,onLoadYaml:t}){const n=(e==null?void 0:e.name)??"no workflow loaded",i=e?`workflows/${e.name}.yaml`:"",[s,l]=T.useState(!1),a=T.useRef(null),c=T.useCallback(()=>{var m;const d=((m=a.current)==null?void 0:m.value)??"";d.trim()&&(t(d),l(!1))},[t]),f=T.useCallback(()=>{l(!1)},[]);return O.jsxs(O.Fragment,{children:[O.jsxs("header",{className:"h-12 shrink-0 bg-bg border-b border-border flex items-center px-4 gap-3",children:[O.jsx("h1",{className:"font-semibold tracking-tight",children:n}),i&&O.jsx("span",{className:"text-[11px] font-mono text-mutedfg px-1.5 py-0.5 bg-muted rounded",children:i}),O.jsx("div",{className:"ml-auto",children:O.jsx("button",{onClick:()=>l(!0),className:"text-[12px] px-2.5 py-1 rounded bg-muted hover:bg-border text-fg transition-colors",children:"Paste YAML"})})]}),s&&O.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-bg/80 z-50",children:O.jsxs("div",{className:"bg-bg border border-border rounded-lg shadow-lg p-4 flex flex-col gap-3 w-[520px] max-w-[90vw]",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsx("span",{className:"font-semibold text-sm",children:"Paste YAML"}),O.jsx("button",{onClick:f,className:"text-mutedfg hover:text-fg text-lg leading-none","aria-label":"Close",children:"×"})]}),O.jsx("textarea",{ref:a,className:"w-full h-64 font-mono text-[12px] bg-muted border border-border rounded p-2 resize-y focus:outline-none focus:ring-1 focus:ring-primary",placeholder:"Paste your workflow YAML here...",spellCheck:!1}),O.jsxs("div",{className:"flex justify-end gap-2",children:[O.jsx("button",{onClick:f,className:"text-[12px] px-3 py-1.5 rounded bg-muted hover:bg-border text-fg transition-colors",children:"Cancel"}),O.jsx("button",{onClick:c,className:"text-[12px] px-3 py-1.5 rounded bg-primary hover:opacity-90 text-white transition-opacity",children:"Apply"})]})]})})]})}function i0({status:e}){return O.jsx("span",{"data-testid":"status-dot","data-status":e,className:at("size-1.5 rounded-full flex-shrink-0",e==="idle"&&"bg-border",e==="running"&&"bg-run pulse-dot",e==="success"&&"bg-ok",e==="failed"&&"bg-fail")})}function o0({data:e,selected:t}){const{node:n,liveStatus:i="idle"}=e;if(n.type==="agent.run"){const l=i==="running";return O.jsxs("div",{"data-testid":"agent-node","data-node-type":"agent.run","data-live-status":i,className:at("rounded-lg border overflow-hidden cursor-pointer","bg-agentbg border-agent/40",l?"agent-ring agent-live":"agent-ring"),style:{width:220,height:60},onClick:()=>{var a;return(a=e.onNodeClick)==null?void 0:a.call(e,n)},children:[O.jsx("div",{className:"h-1 bg-agent"}),O.jsxs("div",{className:"p-2.5 flex flex-col justify-center",style:{height:"calc(100% - 4px)"},children:[O.jsxs("div",{className:"flex items-center gap-1.5",children:[O.jsx(i0,{status:i}),O.jsx("span",{className:"font-medium text-agent text-[12px]",children:n.id}),O.jsx("span",{className:"ml-auto text-[9px] font-mono uppercase tracking-wide text-agent/70 bg-agent/10 px-1 rounded",children:"agent"})]}),O.jsx("div",{className:"font-mono text-[10px] text-agent/60 mt-0.5",children:n.type})]}),O.jsx(Nr,{type:"target",position:Se.Left,className:"!bg-agent/50"}),O.jsx(Nr,{type:"source",position:Se.Right,className:"!bg-agent/50"})]})}return O.jsxs("div",{"data-testid":"workflow-node","data-node-type":n.type,"data-live-status":i,className:at("rounded-lg border overflow-hidden cursor-pointer bg-bg border-border shadow-sm",t&&"ring-2 ring-fg/20"),style:{width:n.type==="task.branch"||n.type.startsWith("trigger.")?140:220,height:60},onClick:()=>{var l;return(l=e.onNodeClick)==null?void 0:l.call(e,n)},children:[O.jsx("div",{className:"h-1 bg-mutedfg/30"}),O.jsxs("div",{className:"p-2.5 flex flex-col justify-center",style:{height:"calc(100% - 4px)"},children:[O.jsxs("div",{className:"flex items-center gap-1.5",children:[O.jsx(i0,{status:i}),O.jsx("span",{className:"font-medium text-[12px]",children:n.id})]}),O.jsx("div",{className:"font-mono text-[10px] text-mutedfg mt-0.5",children:n.type})]}),O.jsx(Nr,{type:"target",position:Se.Left,className:"!bg-mutedfg/50"}),O.jsx(Nr,{type:"source",position:Se.Right,className:"!bg-mutedfg/50"})]})}var Uf,s0;function Hh(){if(s0)return Uf;s0=1;var e="\0",t="\0",n="";class i{constructor(m){Ze(this,"_isDirected",!0);Ze(this,"_isMultigraph",!1);Ze(this,"_isCompound",!1);Ze(this,"_label");Ze(this,"_defaultNodeLabelFn",()=>{});Ze(this,"_defaultEdgeLabelFn",()=>{});Ze(this,"_nodes",{});Ze(this,"_in",{});Ze(this,"_preds",{});Ze(this,"_out",{});Ze(this,"_sucs",{});Ze(this,"_edgeObjs",{});Ze(this,"_edgeLabels",{});Ze(this,"_nodeCount",0);Ze(this,"_edgeCount",0);Ze(this,"_parent");Ze(this,"_children");m&&(this._isDirected=Object.hasOwn(m,"directed")?m.directed:!0,this._isMultigraph=Object.hasOwn(m,"multigraph")?m.multigraph:!1,this._isCompound=Object.hasOwn(m,"compound")?m.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(m){return this._label=m,this}graph(){return this._label}setDefaultNodeLabel(m){return this._defaultNodeLabelFn=m,typeof m!="function"&&(this._defaultNodeLabelFn=()=>m),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var m=this;return this.nodes().filter(p=>Object.keys(m._in[p]).length===0)}sinks(){var m=this;return this.nodes().filter(p=>Object.keys(m._out[p]).length===0)}setNodes(m,p){var g=arguments,v=this;return m.forEach(function(S){g.length>1?v.setNode(S,p):v.setNode(S)}),this}setNode(m,p){return Object.hasOwn(this._nodes,m)?(arguments.length>1&&(this._nodes[m]=p),this):(this._nodes[m]=arguments.length>1?p:this._defaultNodeLabelFn(m),this._isCompound&&(this._parent[m]=t,this._children[m]={},this._children[t][m]=!0),this._in[m]={},this._preds[m]={},this._out[m]={},this._sucs[m]={},++this._nodeCount,this)}node(m){return this._nodes[m]}hasNode(m){return Object.hasOwn(this._nodes,m)}removeNode(m){var p=this;if(Object.hasOwn(this._nodes,m)){var g=v=>p.removeEdge(p._edgeObjs[v]);delete this._nodes[m],this._isCompound&&(this._removeFromParentsChildList(m),delete this._parent[m],this.children(m).forEach(function(v){p.setParent(v)}),delete this._children[m]),Object.keys(this._in[m]).forEach(g),delete this._in[m],delete this._preds[m],Object.keys(this._out[m]).forEach(g),delete this._out[m],delete this._sucs[m],--this._nodeCount}return this}setParent(m,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(p===void 0)p=t;else{p+="";for(var g=p;g!==void 0;g=this.parent(g))if(g===m)throw new Error("Setting "+p+" as parent of "+m+" would create a cycle");this.setNode(p)}return this.setNode(m),this._removeFromParentsChildList(m),this._parent[m]=p,this._children[p][m]=!0,this}_removeFromParentsChildList(m){delete this._children[this._parent[m]][m]}parent(m){if(this._isCompound){var p=this._parent[m];if(p!==t)return p}}children(m=t){if(this._isCompound){var p=this._children[m];if(p)return Object.keys(p)}else{if(m===t)return this.nodes();if(this.hasNode(m))return[]}}predecessors(m){var p=this._preds[m];if(p)return Object.keys(p)}successors(m){var p=this._sucs[m];if(p)return Object.keys(p)}neighbors(m){var p=this.predecessors(m);if(p){const v=new Set(p);for(var g of this.successors(m))v.add(g);return Array.from(v.values())}}isLeaf(m){var p;return this.isDirected()?p=this.successors(m):p=this.neighbors(m),p.length===0}filterNodes(m){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var g=this;Object.entries(this._nodes).forEach(function([x,b]){m(x)&&p.setNode(x,b)}),Object.values(this._edgeObjs).forEach(function(x){p.hasNode(x.v)&&p.hasNode(x.w)&&p.setEdge(x,g.edge(x))});var v={};function S(x){var b=g.parent(x);return b===void 0||p.hasNode(b)?(v[x]=b,b):b in v?v[b]:S(b)}return this._isCompound&&p.nodes().forEach(x=>p.setParent(x,S(x))),p}setDefaultEdgeLabel(m){return this._defaultEdgeLabelFn=m,typeof m!="function"&&(this._defaultEdgeLabelFn=()=>m),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(m,p){var g=this,v=arguments;return m.reduce(function(S,x){return v.length>1?g.setEdge(S,x,p):g.setEdge(S,x),x}),this}setEdge(){var m,p,g,v,S=!1,x=arguments[0];typeof x=="object"&&x!==null&&"v"in x?(m=x.v,p=x.w,g=x.name,arguments.length===2&&(v=arguments[1],S=!0)):(m=x,p=arguments[1],g=arguments[3],arguments.length>2&&(v=arguments[2],S=!0)),m=""+m,p=""+p,g!==void 0&&(g=""+g);var b=a(this._isDirected,m,p,g);if(Object.hasOwn(this._edgeLabels,b))return S&&(this._edgeLabels[b]=v),this;if(g!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(m),this.setNode(p),this._edgeLabels[b]=S?v:this._defaultEdgeLabelFn(m,p,g);var k=c(this._isDirected,m,p,g);return m=k.v,p=k.w,Object.freeze(k),this._edgeObjs[b]=k,s(this._preds[p],m),s(this._sucs[m],p),this._in[p][b]=k,this._out[m][b]=k,this._edgeCount++,this}edge(m,p,g){var v=arguments.length===1?f(this._isDirected,arguments[0]):a(this._isDirected,m,p,g);return this._edgeLabels[v]}edgeAsObj(){const m=this.edge(...arguments);return typeof m!="object"?{label:m}:m}hasEdge(m,p,g){var v=arguments.length===1?f(this._isDirected,arguments[0]):a(this._isDirected,m,p,g);return Object.hasOwn(this._edgeLabels,v)}removeEdge(m,p,g){var v=arguments.length===1?f(this._isDirected,arguments[0]):a(this._isDirected,m,p,g),S=this._edgeObjs[v];return S&&(m=S.v,p=S.w,delete this._edgeLabels[v],delete this._edgeObjs[v],l(this._preds[p],m),l(this._sucs[m],p),delete this._in[p][v],delete this._out[m][v],this._edgeCount--),this}inEdges(m,p){var g=this._in[m];if(g){var v=Object.values(g);return p?v.filter(S=>S.v===p):v}}outEdges(m,p){var g=this._out[m];if(g){var v=Object.values(g);return p?v.filter(S=>S.w===p):v}}nodeEdges(m,p){var g=this.inEdges(m,p);if(g)return g.concat(this.outEdges(m,p))}}function s(d,m){d[m]?d[m]++:d[m]=1}function l(d,m){--d[m]||delete d[m]}function a(d,m,p,g){var v=""+m,S=""+p;if(!d&&v>S){var x=v;v=S,S=x}return v+n+S+n+(g===void 0?e:g)}function c(d,m,p,g){var v=""+m,S=""+p;if(!d&&v>S){var x=v;v=S,S=x}var b={v,w:S};return g&&(b.name=g),b}function f(d,m){return a(d,m.v,m.w,m.name)}return Uf=i,Uf}var Wf,l0;function lP(){return l0||(l0=1,Wf="2.2.4"),Wf}var qf,a0;function aP(){return a0||(a0=1,qf={Graph:Hh(),version:lP()}),qf}var Yf,u0;function uP(){if(u0)return Yf;u0=1;var e=Hh();Yf={write:t,read:s};function t(l){var a={options:{directed:l.isDirected(),multigraph:l.isMultigraph(),compound:l.isCompound()},nodes:n(l),edges:i(l)};return l.graph()!==void 0&&(a.value=structuredClone(l.graph())),a}function n(l){return l.nodes().map(function(a){var c=l.node(a),f=l.parent(a),d={v:a};return c!==void 0&&(d.value=c),f!==void 0&&(d.parent=f),d})}function i(l){return l.edges().map(function(a){var c=l.edge(a),f={v:a.v,w:a.w};return a.name!==void 0&&(f.name=a.name),c!==void 0&&(f.value=c),f})}function s(l){var a=new e(l.options).setGraph(l.value);return l.nodes.forEach(function(c){a.setNode(c.v,c.value),c.parent&&a.setParent(c.v,c.parent)}),l.edges.forEach(function(c){a.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),a}return Yf}var Kf,c0;function cP(){if(c0)return Kf;c0=1,Kf=e;function e(t){var n={},i=[],s;function l(a){Object.hasOwn(n,a)||(n[a]=!0,s.push(a),t.successors(a).forEach(l),t.predecessors(a).forEach(l))}return t.nodes().forEach(function(a){s=[],l(a),s.length&&i.push(s)}),i}return Kf}var Gf,f0;function R1(){if(f0)return Gf;f0=1;class e{constructor(){Ze(this,"_arr",[]);Ze(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var i=this._keyIndices[n];if(i!==void 0)return this._arr[i].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,i){var s=this._keyIndices;if(n=String(n),!Object.hasOwn(s,n)){var l=this._arr,a=l.length;return s[n]=a,l.push({key:n,priority:i}),this._decrease(a),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,i){var s=this._keyIndices[n];if(i>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[s].priority+" New: "+i);this._arr[s].priority=i,this._decrease(s)}_heapify(n){var i=this._arr,s=2*n,l=s+1,a=n;s<i.length&&(a=i[s].priority<i[a].priority?s:a,l<i.length&&(a=i[l].priority<i[a].priority?l:a),a!==n&&(this._swap(n,a),this._heapify(a)))}_decrease(n){for(var i=this._arr,s=i[n].priority,l;n!==0&&(l=n>>1,!(i[l].priority<s));)this._swap(n,l),n=l}_swap(n,i){var s=this._arr,l=this._keyIndices,a=s[n],c=s[i];s[n]=c,s[i]=a,l[c.key]=n,l[a.key]=i}}return Gf=e,Gf}var Xf,d0;function D1(){if(d0)return Xf;d0=1;var e=R1();Xf=n;var t=()=>1;function n(s,l,a,c){return i(s,String(l),a||t,c||function(f){return s.outEdges(f)})}function i(s,l,a,c){var f={},d=new e,m,p,g=function(v){var S=v.v!==m?v.v:v.w,x=f[S],b=a(v),k=p.distance+b;if(b<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+v+" Weight: "+b);k<x.distance&&(x.distance=k,x.predecessor=m,d.decrease(S,k))};for(s.nodes().forEach(function(v){var S=v===l?0:Number.POSITIVE_INFINITY;f[v]={distance:S},d.add(v,S)});d.size()>0&&(m=d.removeMin(),p=f[m],p.distance!==Number.POSITIVE_INFINITY);)c(m).forEach(g);return f}return Xf}var Qf,h0;function fP(){if(h0)return Qf;h0=1;var e=D1();Qf=t;function t(n,i,s){return n.nodes().reduce(function(l,a){return l[a]=e(n,a,i,s),l},{})}return Qf}var Jf,p0;function j1(){if(p0)return Jf;p0=1,Jf=e;function e(t){var n=0,i=[],s={},l=[];function a(c){var f=s[c]={onStack:!0,lowlink:n,index:n++};if(i.push(c),t.successors(c).forEach(function(p){Object.hasOwn(s,p)?s[p].onStack&&(f.lowlink=Math.min(f.lowlink,s[p].index)):(a(p),f.lowlink=Math.min(f.lowlink,s[p].lowlink))}),f.lowlink===f.index){var d=[],m;do m=i.pop(),s[m].onStack=!1,d.push(m);while(c!==m);l.push(d)}}return t.nodes().forEach(function(c){Object.hasOwn(s,c)||a(c)}),l}return Jf}var Zf,m0;function dP(){if(m0)return Zf;m0=1;var e=j1();Zf=t;function t(n){return e(n).filter(function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return Zf}var ed,g0;function hP(){if(g0)return ed;g0=1,ed=t;var e=()=>1;function t(i,s,l){return n(i,s||e,l||function(a){return i.outEdges(a)})}function n(i,s,l){var a={},c=i.nodes();return c.forEach(function(f){a[f]={},a[f][f]={distance:0},c.forEach(function(d){f!==d&&(a[f][d]={distance:Number.POSITIVE_INFINITY})}),l(f).forEach(function(d){var m=d.v===f?d.w:d.v,p=s(d);a[f][m]={distance:p,predecessor:f}})}),c.forEach(function(f){var d=a[f];c.forEach(function(m){var p=a[m];c.forEach(function(g){var v=p[f],S=d[g],x=p[g],b=v.distance+S.distance;b<x.distance&&(x.distance=b,x.predecessor=S.predecessor)})})}),a}return ed}var td,y0;function $1(){if(y0)return td;y0=1;function e(n){var i={},s={},l=[];function a(c){if(Object.hasOwn(s,c))throw new t;Object.hasOwn(i,c)||(s[c]=!0,i[c]=!0,n.predecessors(c).forEach(a),delete s[c],l.push(c))}if(n.sinks().forEach(a),Object.keys(i).length!==n.nodeCount())throw new t;return l}class t extends Error{constructor(){super(...arguments)}}return td=e,e.CycleException=t,td}var nd,v0;function pP(){if(v0)return nd;v0=1;var e=$1();nd=t;function t(n){try{e(n)}catch(i){if(i instanceof e.CycleException)return!1;throw i}return!0}return nd}var rd,w0;function z1(){if(w0)return rd;w0=1,rd=e;function e(s,l,a){Array.isArray(l)||(l=[l]);var c=s.isDirected()?p=>s.successors(p):p=>s.neighbors(p),f=a==="post"?t:n,d=[],m={};return l.forEach(p=>{if(!s.hasNode(p))throw new Error("Graph does not have node: "+p);f(p,c,m,d)}),d}function t(s,l,a,c){for(var f=[[s,!1]];f.length>0;){var d=f.pop();d[1]?c.push(d[0]):Object.hasOwn(a,d[0])||(a[d[0]]=!0,f.push([d[0],!0]),i(l(d[0]),m=>f.push([m,!1])))}}function n(s,l,a,c){for(var f=[s];f.length>0;){var d=f.pop();Object.hasOwn(a,d)||(a[d]=!0,c.push(d),i(l(d),m=>f.push(m)))}}function i(s,l){for(var a=s.length;a--;)l(s[a],a,s);return s}return rd}var id,x0;function mP(){if(x0)return id;x0=1;var e=z1();id=t;function t(n,i){return e(n,i,"post")}return id}var od,b0;function gP(){if(b0)return od;b0=1;var e=z1();od=t;function t(n,i){return e(n,i,"pre")}return od}var sd,S0;function yP(){if(S0)return sd;S0=1;var e=Hh(),t=R1();sd=n;function n(i,s){var l=new e,a={},c=new t,f;function d(p){var g=p.v===f?p.w:p.v,v=c.priority(g);if(v!==void 0){var S=s(p);S<v&&(a[g]=f,c.decrease(g,S))}}if(i.nodeCount()===0)return l;i.nodes().forEach(function(p){c.add(p,Number.POSITIVE_INFINITY),l.setNode(p)}),c.decrease(i.nodes()[0],0);for(var m=!1;c.size()>0;){if(f=c.removeMin(),Object.hasOwn(a,f))l.setEdge(f,a[f]);else{if(m)throw new Error("Input graph is not connected: "+i);m=!0}i.nodeEdges(f).forEach(d)}return l}return sd}var ld,k0;function vP(){return k0||(k0=1,ld={components:cP(),dijkstra:D1(),dijkstraAll:fP(),findCycles:dP(),floydWarshall:hP(),isAcyclic:pP(),postorder:mP(),preorder:gP(),prim:yP(),tarjan:j1(),topsort:$1()}),ld}var ad,E0;function mn(){if(E0)return ad;E0=1;var e=aP();return ad={Graph:e.Graph,json:uP(),alg:vP(),version:e.version},ad}var ud,_0;function wP(){if(_0)return ud;_0=1;class e{constructor(){let s={};s._next=s._prev=s,this._sentinel=s}dequeue(){let s=this._sentinel,l=s._prev;if(l!==s)return t(l),l}enqueue(s){let l=this._sentinel;s._prev&&s._next&&t(s),s._next=l._next,l._next._prev=s,l._next=s,s._prev=l}toString(){let s=[],l=this._sentinel,a=l._prev;for(;a!==l;)s.push(JSON.stringify(a,n)),a=a._prev;return"["+s.join(", ")+"]"}}function t(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function n(i,s){if(i!=="_next"&&i!=="_prev")return s}return ud=e,ud}var cd,N0;function xP(){if(N0)return cd;N0=1;let e=mn().Graph,t=wP();cd=i;let n=()=>1;function i(d,m){if(d.nodeCount()<=1)return[];let p=a(d,m||n);return s(p.graph,p.buckets,p.zeroIdx).flatMap(v=>d.outEdges(v.v,v.w))}function s(d,m,p){let g=[],v=m[m.length-1],S=m[0],x;for(;d.nodeCount();){for(;x=S.dequeue();)l(d,m,p,x);for(;x=v.dequeue();)l(d,m,p,x);if(d.nodeCount()){for(let b=m.length-2;b>0;--b)if(x=m[b].dequeue(),x){g=g.concat(l(d,m,p,x,!0));break}}}return g}function l(d,m,p,g,v){let S=v?[]:void 0;return d.inEdges(g.v).forEach(x=>{let b=d.edge(x),k=d.node(x.v);v&&S.push({v:x.v,w:x.w}),k.out-=b,c(m,p,k)}),d.outEdges(g.v).forEach(x=>{let b=d.edge(x),k=x.w,_=d.node(k);_.in-=b,c(m,p,_)}),d.removeNode(g.v),S}function a(d,m){let p=new e,g=0,v=0;d.nodes().forEach(b=>{p.setNode(b,{v:b,in:0,out:0})}),d.edges().forEach(b=>{let k=p.edge(b.v,b.w)||0,_=m(b),E=k+_;p.setEdge(b.v,b.w,E),v=Math.max(v,p.node(b.v).out+=_),g=Math.max(g,p.node(b.w).in+=_)});let S=f(v+g+3).map(()=>new t),x=g+1;return p.nodes().forEach(b=>{c(S,x,p.node(b))}),{graph:p,buckets:S,zeroIdx:x}}function c(d,m,p){p.out?p.in?d[p.out-p.in+m].enqueue(p):d[d.length-1].enqueue(p):d[0].enqueue(p)}function f(d){const m=[];for(let p=0;p<d;p++)m.push(p);return m}return cd}var fd,C0;function et(){if(C0)return fd;C0=1;let e=mn().Graph;fd={addBorderNode:m,addDummyNode:t,applyWithChunking:v,asNonCompoundGraph:i,buildLayerMatrix:c,intersectRect:a,mapValues:L,maxRank:S,normalizeRanks:f,notime:k,partition:x,pick:A,predecessorWeights:l,range:N,removeEmptyRanks:d,simplify:n,successorWeights:s,time:b,uniqueId:E,zipObject:R};function t(C,P,F,M){for(var $=M;C.hasNode($);)$=E(M);return F.dummy=P,C.setNode($,F),$}function n(C){let P=new e().setGraph(C.graph());return C.nodes().forEach(F=>P.setNode(F,C.node(F))),C.edges().forEach(F=>{let M=P.edge(F.v,F.w)||{weight:0,minlen:1},$=C.edge(F);P.setEdge(F.v,F.w,{weight:M.weight+$.weight,minlen:Math.max(M.minlen,$.minlen)})}),P}function i(C){let P=new e({multigraph:C.isMultigraph()}).setGraph(C.graph());return C.nodes().forEach(F=>{C.children(F).length||P.setNode(F,C.node(F))}),C.edges().forEach(F=>{P.setEdge(F,C.edge(F))}),P}function s(C){let P=C.nodes().map(F=>{let M={};return C.outEdges(F).forEach($=>{M[$.w]=(M[$.w]||0)+C.edge($).weight}),M});return R(C.nodes(),P)}function l(C){let P=C.nodes().map(F=>{let M={};return C.inEdges(F).forEach($=>{M[$.v]=(M[$.v]||0)+C.edge($).weight}),M});return R(C.nodes(),P)}function a(C,P){let F=C.x,M=C.y,$=P.x-F,Z=P.y-M,j=C.width/2,G=C.height/2;if(!$&&!Z)throw new Error("Not possible to find intersection inside of the rectangle");let q,J;return Math.abs(Z)*j>Math.abs($)*G?(Z<0&&(G=-G),q=G*$/Z,J=G):($<0&&(j=-j),q=j,J=j*Z/$),{x:F+q,y:M+J}}function c(C){let P=N(S(C)+1).map(()=>[]);return C.nodes().forEach(F=>{let M=C.node(F),$=M.rank;$!==void 0&&(P[$][M.order]=F)}),P}function f(C){let P=C.nodes().map(M=>{let $=C.node(M).rank;return $===void 0?Number.MAX_VALUE:$}),F=v(Math.min,P);C.nodes().forEach(M=>{let $=C.node(M);Object.hasOwn($,"rank")&&($.rank-=F)})}function d(C){let P=C.nodes().map(j=>C.node(j).rank),F=v(Math.min,P),M=[];C.nodes().forEach(j=>{let G=C.node(j).rank-F;M[G]||(M[G]=[]),M[G].push(j)});let $=0,Z=C.graph().nodeRankFactor;Array.from(M).forEach((j,G)=>{j===void 0&&G%Z!==0?--$:j!==void 0&&$&&j.forEach(q=>C.node(q).rank+=$)})}function m(C,P,F,M){let $={width:0,height:0};return arguments.length>=4&&($.rank=F,$.order=M),t(C,"border",$,P)}function p(C,P=g){const F=[];for(let M=0;M<C.length;M+=P){const $=C.slice(M,M+P);F.push($)}return F}const g=65535;function v(C,P){if(P.length>g){const F=p(P);return C.apply(null,F.map(M=>C.apply(null,M)))}else return C.apply(null,P)}function S(C){const F=C.nodes().map(M=>{let $=C.node(M).rank;return $===void 0?Number.MIN_VALUE:$});return v(Math.max,F)}function x(C,P){let F={lhs:[],rhs:[]};return C.forEach(M=>{P(M)?F.lhs.push(M):F.rhs.push(M)}),F}function b(C,P){let F=Date.now();try{return P()}finally{console.log(C+" time: "+(Date.now()-F)+"ms")}}function k(C,P){return P()}let _=0;function E(C){var P=++_;return C+(""+P)}function N(C,P,F=1){P==null&&(P=C,C=0);let M=Z=>Z<P;F<0&&(M=Z=>P<Z);const $=[];for(let Z=C;M(Z);Z+=F)$.push(Z);return $}function A(C,P){const F={};for(const M of P)C[M]!==void 0&&(F[M]=C[M]);return F}function L(C,P){let F=P;return typeof P=="string"&&(F=M=>M[P]),Object.entries(C).reduce((M,[$,Z])=>(M[$]=F(Z,$),M),{})}function R(C,P){return C.reduce((F,M,$)=>(F[M]=P[$],F),{})}return fd}var dd,I0;function bP(){if(I0)return dd;I0=1;let e=xP(),t=et().uniqueId;dd={run:n,undo:s};function n(l){(l.graph().acyclicer==="greedy"?e(l,c(l)):i(l)).forEach(f=>{let d=l.edge(f);l.removeEdge(f),d.forwardName=f.name,d.reversed=!0,l.setEdge(f.w,f.v,d,t("rev"))});function c(f){return d=>f.edge(d).weight}}function i(l){let a=[],c={},f={};function d(m){Object.hasOwn(f,m)||(f[m]=!0,c[m]=!0,l.outEdges(m).forEach(p=>{Object.hasOwn(c,p.w)?a.push(p):d(p.w)}),delete c[m])}return l.nodes().forEach(d),a}function s(l){l.edges().forEach(a=>{let c=l.edge(a);if(c.reversed){l.removeEdge(a);let f=c.forwardName;delete c.reversed,delete c.forwardName,l.setEdge(a.w,a.v,c,f)}})}return dd}var hd,T0;function SP(){if(T0)return hd;T0=1;let e=et();hd={run:t,undo:i};function t(s){s.graph().dummyChains=[],s.edges().forEach(l=>n(s,l))}function n(s,l){let a=l.v,c=s.node(a).rank,f=l.w,d=s.node(f).rank,m=l.name,p=s.edge(l),g=p.labelRank;if(d===c+1)return;s.removeEdge(l);let v,S,x;for(x=0,++c;c<d;++x,++c)p.points=[],S={width:0,height:0,edgeLabel:p,edgeObj:l,rank:c},v=e.addDummyNode(s,"edge",S,"_d"),c===g&&(S.width=p.width,S.height=p.height,S.dummy="edge-label",S.labelpos=p.labelpos),s.setEdge(a,v,{weight:p.weight},m),x===0&&s.graph().dummyChains.push(v),a=v;s.setEdge(a,f,{weight:p.weight},m)}function i(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),c=a.edgeLabel,f;for(s.setEdge(a.edgeObj,c);a.dummy;)f=s.successors(l)[0],s.removeNode(l),c.points.push({x:a.x,y:a.y}),a.dummy==="edge-label"&&(c.x=a.x,c.y=a.y,c.width=a.width,c.height=a.height),l=f,a=s.node(l)})}return hd}var pd,P0;function Ja(){if(P0)return pd;P0=1;const{applyWithChunking:e}=et();pd={longestPath:t,slack:n};function t(i){var s={};function l(a){var c=i.node(a);if(Object.hasOwn(s,a))return c.rank;s[a]=!0;let f=i.outEdges(a).map(m=>m==null?Number.POSITIVE_INFINITY:l(m.w)-i.edge(m).minlen);var d=e(Math.min,f);return d===Number.POSITIVE_INFINITY&&(d=0),c.rank=d}i.sources().forEach(l)}function n(i,s){return i.node(s.w).rank-i.node(s.v).rank-i.edge(s).minlen}return pd}var md,A0;function F1(){if(A0)return md;A0=1;var e=mn().Graph,t=Ja().slack;md=n;function n(a){var c=new e({directed:!1}),f=a.nodes()[0],d=a.nodeCount();c.setNode(f,{});for(var m,p;i(c,a)<d;)m=s(c,a),p=c.hasNode(m.v)?t(a,m):-t(a,m),l(c,a,p);return c}function i(a,c){function f(d){c.nodeEdges(d).forEach(m=>{var p=m.v,g=d===p?m.w:p;!a.hasNode(g)&&!t(c,m)&&(a.setNode(g,{}),a.setEdge(d,g,{}),f(g))})}return a.nodes().forEach(f),a.nodeCount()}function s(a,c){return c.edges().reduce((d,m)=>{let p=Number.POSITIVE_INFINITY;return a.hasNode(m.v)!==a.hasNode(m.w)&&(p=t(c,m)),p<d[0]?[p,m]:d},[Number.POSITIVE_INFINITY,null])[1]}function l(a,c,f){a.nodes().forEach(d=>c.node(d).rank+=f)}return md}var gd,O0;function kP(){if(O0)return gd;O0=1;var e=F1(),t=Ja().slack,n=Ja().longestPath,i=mn().alg.preorder,s=mn().alg.postorder,l=et().simplify;gd=a,a.initLowLimValues=m,a.initCutValues=c,a.calcCutValue=d,a.leaveEdge=g,a.enterEdge=v,a.exchangeEdges=S;function a(_){_=l(_),n(_);var E=e(_);m(E),c(E,_);for(var N,A;N=g(E);)A=v(E,_,N),S(E,_,N,A)}function c(_,E){var N=s(_,_.nodes());N=N.slice(0,N.length-1),N.forEach(A=>f(_,E,A))}function f(_,E,N){var A=_.node(N),L=A.parent;_.edge(N,L).cutvalue=d(_,E,N)}function d(_,E,N){var A=_.node(N),L=A.parent,R=!0,C=E.edge(N,L),P=0;return C||(R=!1,C=E.edge(L,N)),P=C.weight,E.nodeEdges(N).forEach(F=>{var M=F.v===N,$=M?F.w:F.v;if($!==L){var Z=M===R,j=E.edge(F).weight;if(P+=Z?j:-j,b(_,N,$)){var G=_.edge(N,$).cutvalue;P+=Z?-G:G}}}),P}function m(_,E){arguments.length<2&&(E=_.nodes()[0]),p(_,{},1,E)}function p(_,E,N,A,L){var R=N,C=_.node(A);return E[A]=!0,_.neighbors(A).forEach(P=>{Object.hasOwn(E,P)||(N=p(_,E,N,P,A))}),C.low=R,C.lim=N++,L?C.parent=L:delete C.parent,N}function g(_){return _.edges().find(E=>_.edge(E).cutvalue<0)}function v(_,E,N){var A=N.v,L=N.w;E.hasEdge(A,L)||(A=N.w,L=N.v);var R=_.node(A),C=_.node(L),P=R,F=!1;R.lim>C.lim&&(P=C,F=!0);var M=E.edges().filter($=>F===k(_,_.node($.v),P)&&F!==k(_,_.node($.w),P));return M.reduce(($,Z)=>t(E,Z)<t(E,$)?Z:$)}function S(_,E,N,A){var L=N.v,R=N.w;_.removeEdge(L,R),_.setEdge(A.v,A.w,{}),m(_),c(_,E),x(_,E)}function x(_,E){var N=_.nodes().find(L=>!E.node(L).parent),A=i(_,N);A=A.slice(1),A.forEach(L=>{var R=_.node(L).parent,C=E.edge(L,R),P=!1;C||(C=E.edge(R,L),P=!0),E.node(L).rank=E.node(R).rank+(P?C.minlen:-C.minlen)})}function b(_,E,N){return _.hasEdge(E,N)}function k(_,E,N){return N.low<=E.lim&&E.lim<=N.lim}return gd}var yd,L0;function EP(){if(L0)return yd;L0=1;var e=Ja(),t=e.longestPath,n=F1(),i=kP();yd=s;function s(f){var d=f.graph().ranker;if(d instanceof Function)return d(f);switch(f.graph().ranker){case"network-simplex":c(f);break;case"tight-tree":a(f);break;case"longest-path":l(f);break;case"none":break;default:c(f)}}var l=t;function a(f){t(f),n(f)}function c(f){i(f)}return yd}var vd,M0;function _P(){if(M0)return vd;M0=1,vd=e;function e(i){let s=n(i);i.graph().dummyChains.forEach(l=>{let a=i.node(l),c=a.edgeObj,f=t(i,s,c.v,c.w),d=f.path,m=f.lca,p=0,g=d[p],v=!0;for(;l!==c.w;){if(a=i.node(l),v){for(;(g=d[p])!==m&&i.node(g).maxRank<a.rank;)p++;g===m&&(v=!1)}if(!v){for(;p<d.length-1&&i.node(g=d[p+1]).minRank<=a.rank;)p++;g=d[p]}i.setParent(l,g),l=i.successors(l)[0]}})}function t(i,s,l,a){let c=[],f=[],d=Math.min(s[l].low,s[a].low),m=Math.max(s[l].lim,s[a].lim),p,g;p=l;do p=i.parent(p),c.push(p);while(p&&(s[p].low>d||m>s[p].lim));for(g=p,p=a;(p=i.parent(p))!==g;)f.push(p);return{path:c.concat(f.reverse()),lca:g}}function n(i){let s={},l=0;function a(c){let f=l;i.children(c).forEach(a),s[c]={low:f,lim:l++}}return i.children().forEach(a),s}return vd}var wd,R0;function NP(){if(R0)return wd;R0=1;let e=et();wd={run:t,cleanup:l};function t(a){let c=e.addDummyNode(a,"root",{},"_root"),f=i(a),d=Object.values(f),m=e.applyWithChunking(Math.max,d)-1,p=2*m+1;a.graph().nestingRoot=c,a.edges().forEach(v=>a.edge(v).minlen*=p);let g=s(a)+1;a.children().forEach(v=>n(a,c,p,g,m,f,v)),a.graph().nodeRankFactor=p}function n(a,c,f,d,m,p,g){let v=a.children(g);if(!v.length){g!==c&&a.setEdge(c,g,{weight:0,minlen:f});return}let S=e.addBorderNode(a,"_bt"),x=e.addBorderNode(a,"_bb"),b=a.node(g);a.setParent(S,g),b.borderTop=S,a.setParent(x,g),b.borderBottom=x,v.forEach(k=>{n(a,c,f,d,m,p,k);let _=a.node(k),E=_.borderTop?_.borderTop:k,N=_.borderBottom?_.borderBottom:k,A=_.borderTop?d:2*d,L=E!==N?1:m-p[g]+1;a.setEdge(S,E,{weight:A,minlen:L,nestingEdge:!0}),a.setEdge(N,x,{weight:A,minlen:L,nestingEdge:!0})}),a.parent(g)||a.setEdge(c,S,{weight:0,minlen:m+p[g]})}function i(a){var c={};function f(d,m){var p=a.children(d);p&&p.length&&p.forEach(g=>f(g,m+1)),c[d]=m}return a.children().forEach(d=>f(d,1)),c}function s(a){return a.edges().reduce((c,f)=>c+a.edge(f).weight,0)}function l(a){var c=a.graph();a.removeNode(c.nestingRoot),delete c.nestingRoot,a.edges().forEach(f=>{var d=a.edge(f);d.nestingEdge&&a.removeEdge(f)})}return wd}var xd,D0;function CP(){if(D0)return xd;D0=1;let e=et();xd=t;function t(i){function s(l){let a=i.children(l),c=i.node(l);if(a.length&&a.forEach(s),Object.hasOwn(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(let f=c.minRank,d=c.maxRank+1;f<d;++f)n(i,"borderLeft","_bl",l,c,f),n(i,"borderRight","_br",l,c,f)}}i.children().forEach(s)}function n(i,s,l,a,c,f){let d={width:0,height:0,rank:f,borderType:s},m=c[s][f-1],p=e.addDummyNode(i,"border",d,l);c[s][f]=p,i.setParent(p,a),m&&i.setEdge(m,p,{weight:1})}return xd}var bd,j0;function IP(){if(j0)return bd;j0=1,bd={adjust:e,undo:t};function e(f){let d=f.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&n(f)}function t(f){let d=f.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&s(f),(d==="lr"||d==="rl")&&(a(f),n(f))}function n(f){f.nodes().forEach(d=>i(f.node(d))),f.edges().forEach(d=>i(f.edge(d)))}function i(f){let d=f.width;f.width=f.height,f.height=d}function s(f){f.nodes().forEach(d=>l(f.node(d))),f.edges().forEach(d=>{let m=f.edge(d);m.points.forEach(l),Object.hasOwn(m,"y")&&l(m)})}function l(f){f.y=-f.y}function a(f){f.nodes().forEach(d=>c(f.node(d))),f.edges().forEach(d=>{let m=f.edge(d);m.points.forEach(c),Object.hasOwn(m,"x")&&c(m)})}function c(f){let d=f.x;f.x=f.y,f.y=d}return bd}var Sd,$0;function TP(){if($0)return Sd;$0=1;let e=et();Sd=t;function t(n){let i={},s=n.nodes().filter(m=>!n.children(m).length),l=s.map(m=>n.node(m).rank),a=e.applyWithChunking(Math.max,l),c=e.range(a+1).map(()=>[]);function f(m){if(i[m])return;i[m]=!0;let p=n.node(m);c[p.rank].push(m),n.successors(m).forEach(f)}return s.sort((m,p)=>n.node(m).rank-n.node(p).rank).forEach(f),c}return Sd}var kd,z0;function PP(){if(z0)return kd;z0=1;let e=et().zipObject;kd=t;function t(i,s){let l=0;for(let a=1;a<s.length;++a)l+=n(i,s[a-1],s[a]);return l}function n(i,s,l){let a=e(l,l.map((g,v)=>v)),c=s.flatMap(g=>i.outEdges(g).map(v=>({pos:a[v.w],weight:i.edge(v).weight})).sort((v,S)=>v.pos-S.pos)),f=1;for(;f<l.length;)f<<=1;let d=2*f-1;f-=1;let m=new Array(d).fill(0),p=0;return c.forEach(g=>{let v=g.pos+f;m[v]+=g.weight;let S=0;for(;v>0;)v%2&&(S+=m[v+1]),v=v-1>>1,m[v]+=g.weight;p+=g.weight*S}),p}return kd}var Ed,F0;function AP(){if(F0)return Ed;F0=1,Ed=e;function e(t,n=[]){return n.map(i=>{let s=t.inEdges(i);if(s.length){let l=s.reduce((a,c)=>{let f=t.edge(c),d=t.node(c.v);return{sum:a.sum+f.weight*d.order,weight:a.weight+f.weight}},{sum:0,weight:0});return{v:i,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:i}})}return Ed}var _d,B0;function OP(){if(B0)return _d;B0=1;let e=et();_d=t;function t(s,l){let a={};s.forEach((f,d)=>{let m=a[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};f.barycenter!==void 0&&(m.barycenter=f.barycenter,m.weight=f.weight)}),l.edges().forEach(f=>{let d=a[f.v],m=a[f.w];d!==void 0&&m!==void 0&&(m.indegree++,d.out.push(a[f.w]))});let c=Object.values(a).filter(f=>!f.indegree);return n(c)}function n(s){let l=[];function a(f){return d=>{d.merged||(d.barycenter===void 0||f.barycenter===void 0||d.barycenter>=f.barycenter)&&i(f,d)}}function c(f){return d=>{d.in.push(f),--d.indegree===0&&s.push(d)}}for(;s.length;){let f=s.pop();l.push(f),f.in.reverse().forEach(a(f)),f.out.forEach(c(f))}return l.filter(f=>!f.merged).map(f=>e.pick(f,["vs","i","barycenter","weight"]))}function i(s,l){let a=0,c=0;s.weight&&(a+=s.barycenter*s.weight,c+=s.weight),l.weight&&(a+=l.barycenter*l.weight,c+=l.weight),s.vs=l.vs.concat(s.vs),s.barycenter=a/c,s.weight=c,s.i=Math.min(l.i,s.i),l.merged=!0}return _d}var Nd,V0;function LP(){if(V0)return Nd;V0=1;let e=et();Nd=t;function t(s,l){let a=e.partition(s,S=>Object.hasOwn(S,"barycenter")),c=a.lhs,f=a.rhs.sort((S,x)=>x.i-S.i),d=[],m=0,p=0,g=0;c.sort(i(!!l)),g=n(d,f,g),c.forEach(S=>{g+=S.vs.length,d.push(S.vs),m+=S.barycenter*S.weight,p+=S.weight,g=n(d,f,g)});let v={vs:d.flat(!0)};return p&&(v.barycenter=m/p,v.weight=p),v}function n(s,l,a){let c;for(;l.length&&(c=l[l.length-1]).i<=a;)l.pop(),s.push(c.vs),a++;return a}function i(s){return(l,a)=>l.barycenter<a.barycenter?-1:l.barycenter>a.barycenter?1:s?a.i-l.i:l.i-a.i}return Nd}var Cd,H0;function MP(){if(H0)return Cd;H0=1;let e=AP(),t=OP(),n=LP();Cd=i;function i(a,c,f,d){let m=a.children(c),p=a.node(c),g=p?p.borderLeft:void 0,v=p?p.borderRight:void 0,S={};g&&(m=m.filter(_=>_!==g&&_!==v));let x=e(a,m);x.forEach(_=>{if(a.children(_.v).length){let E=i(a,_.v,f,d);S[_.v]=E,Object.hasOwn(E,"barycenter")&&l(_,E)}});let b=t(x,f);s(b,S);let k=n(b,d);if(g&&(k.vs=[g,k.vs,v].flat(!0),a.predecessors(g).length)){let _=a.node(a.predecessors(g)[0]),E=a.node(a.predecessors(v)[0]);Object.hasOwn(k,"barycenter")||(k.barycenter=0,k.weight=0),k.barycenter=(k.barycenter*k.weight+_.order+E.order)/(k.weight+2),k.weight+=2}return k}function s(a,c){a.forEach(f=>{f.vs=f.vs.flatMap(d=>c[d]?c[d].vs:d)})}function l(a,c){a.barycenter!==void 0?(a.barycenter=(a.barycenter*a.weight+c.barycenter*c.weight)/(a.weight+c.weight),a.weight+=c.weight):(a.barycenter=c.barycenter,a.weight=c.weight)}return Cd}var Id,U0;function RP(){if(U0)return Id;U0=1;let e=mn().Graph,t=et();Id=n;function n(s,l,a,c){c||(c=s.nodes());let f=i(s),d=new e({compound:!0}).setGraph({root:f}).setDefaultNodeLabel(m=>s.node(m));return c.forEach(m=>{let p=s.node(m),g=s.parent(m);(p.rank===l||p.minRank<=l&&l<=p.maxRank)&&(d.setNode(m),d.setParent(m,g||f),s[a](m).forEach(v=>{let S=v.v===m?v.w:v.v,x=d.edge(S,m),b=x!==void 0?x.weight:0;d.setEdge(S,m,{weight:s.edge(v).weight+b})}),Object.hasOwn(p,"minRank")&&d.setNode(m,{borderLeft:p.borderLeft[l],borderRight:p.borderRight[l]}))}),d}function i(s){for(var l;s.hasNode(l=t.uniqueId("_root")););return l}return Id}var Td,W0;function DP(){if(W0)return Td;W0=1,Td=e;function e(t,n,i){let s={},l;i.forEach(a=>{let c=t.parent(a),f,d;for(;c;){if(f=t.parent(c),f?(d=s[f],s[f]=c):(d=l,l=c),d&&d!==c){n.setEdge(d,c);return}c=f}})}return Td}var Pd,q0;function jP(){if(q0)return Pd;q0=1;let e=TP(),t=PP(),n=MP(),i=RP(),s=DP(),l=mn().Graph,a=et();Pd=c;function c(p,g){if(g&&typeof g.customOrder=="function"){g.customOrder(p,c);return}let v=a.maxRank(p),S=f(p,a.range(1,v+1),"inEdges"),x=f(p,a.range(v-1,-1,-1),"outEdges"),b=e(p);if(m(p,b),g&&g.disableOptimalOrderHeuristic)return;let k=Number.POSITIVE_INFINITY,_;for(let E=0,N=0;N<4;++E,++N){d(E%2?S:x,E%4>=2),b=a.buildLayerMatrix(p);let A=t(p,b);A<k&&(N=0,_=Object.assign({},b),k=A)}m(p,_)}function f(p,g,v){const S=new Map,x=(b,k)=>{S.has(b)||S.set(b,[]),S.get(b).push(k)};for(const b of p.nodes()){const k=p.node(b);if(typeof k.rank=="number"&&x(k.rank,b),typeof k.minRank=="number"&&typeof k.maxRank=="number")for(let _=k.minRank;_<=k.maxRank;_++)_!==k.rank&&x(_,b)}return g.map(function(b){return i(p,b,v,S.get(b)||[])})}function d(p,g){let v=new l;p.forEach(function(S){let x=S.graph().root,b=n(S,x,v,g);b.vs.forEach((k,_)=>S.node(k).order=_),s(S,v,b.vs)})}function m(p,g){Object.values(g).forEach(v=>v.forEach((S,x)=>p.node(S).order=x))}return Pd}var Ad,Y0;function $P(){if(Y0)return Ad;Y0=1;let e=mn().Graph,t=et();Ad={positionX:v,findType1Conflicts:n,findType2Conflicts:i,addConflict:l,hasConflict:a,verticalAlignment:c,horizontalCompaction:f,alignCoordinates:p,findSmallestWidthAlignment:m,balance:g};function n(b,k){let _={};function E(N,A){let L=0,R=0,C=N.length,P=A[A.length-1];return A.forEach((F,M)=>{let $=s(b,F),Z=$?b.node($).order:C;($||F===P)&&(A.slice(R,M+1).forEach(j=>{b.predecessors(j).forEach(G=>{let q=b.node(G),J=q.order;(J<L||Z<J)&&!(q.dummy&&b.node(j).dummy)&&l(_,G,j)})}),R=M+1,L=Z)}),A}return k.length&&k.reduce(E),_}function i(b,k){let _={};function E(A,L,R,C,P){let F;t.range(L,R).forEach(M=>{F=A[M],b.node(F).dummy&&b.predecessors(F).forEach($=>{let Z=b.node($);Z.dummy&&(Z.order<C||Z.order>P)&&l(_,$,F)})})}function N(A,L){let R=-1,C,P=0;return L.forEach((F,M)=>{if(b.node(F).dummy==="border"){let $=b.predecessors(F);$.length&&(C=b.node($[0]).order,E(L,P,M,R,C),P=M,R=C)}E(L,P,L.length,C,A.length)}),L}return k.length&&k.reduce(N),_}function s(b,k){if(b.node(k).dummy)return b.predecessors(k).find(_=>b.node(_).dummy)}function l(b,k,_){if(k>_){let N=k;k=_,_=N}let E=b[k];E||(b[k]=E={}),E[_]=!0}function a(b,k,_){if(k>_){let E=k;k=_,_=E}return!!b[k]&&Object.hasOwn(b[k],_)}function c(b,k,_,E){let N={},A={},L={};return k.forEach(R=>{R.forEach((C,P)=>{N[C]=C,A[C]=C,L[C]=P})}),k.forEach(R=>{let C=-1;R.forEach(P=>{let F=E(P);if(F.length){F=F.sort(($,Z)=>L[$]-L[Z]);let M=(F.length-1)/2;for(let $=Math.floor(M),Z=Math.ceil(M);$<=Z;++$){let j=F[$];A[P]===P&&C<L[j]&&!a(_,P,j)&&(A[j]=P,A[P]=N[P]=N[j],C=L[j])}}})}),{root:N,align:A}}function f(b,k,_,E,N){let A={},L=d(b,k,_,N),R=N?"borderLeft":"borderRight";function C(M,$){let Z=L.nodes(),j=Z.pop(),G={};for(;j;)G[j]?M(j):(G[j]=!0,Z.push(j),Z=Z.concat($(j))),j=Z.pop()}function P(M){A[M]=L.inEdges(M).reduce(($,Z)=>Math.max($,A[Z.v]+L.edge(Z)),0)}function F(M){let $=L.outEdges(M).reduce((j,G)=>Math.min(j,A[G.w]-L.edge(G)),Number.POSITIVE_INFINITY),Z=b.node(M);$!==Number.POSITIVE_INFINITY&&Z.borderType!==R&&(A[M]=Math.max(A[M],$))}return C(P,L.predecessors.bind(L)),C(F,L.successors.bind(L)),Object.keys(E).forEach(M=>A[M]=A[_[M]]),A}function d(b,k,_,E){let N=new e,A=b.graph(),L=S(A.nodesep,A.edgesep,E);return k.forEach(R=>{let C;R.forEach(P=>{let F=_[P];if(N.setNode(F),C){var M=_[C],$=N.edge(M,F);N.setEdge(M,F,Math.max(L(b,P,C),$||0))}C=P})}),N}function m(b,k){return Object.values(k).reduce((_,E)=>{let N=Number.NEGATIVE_INFINITY,A=Number.POSITIVE_INFINITY;Object.entries(E).forEach(([R,C])=>{let P=x(b,R)/2;N=Math.max(C+P,N),A=Math.min(C-P,A)});const L=N-A;return L<_[0]&&(_=[L,E]),_},[Number.POSITIVE_INFINITY,null])[1]}function p(b,k){let _=Object.values(k),E=t.applyWithChunking(Math.min,_),N=t.applyWithChunking(Math.max,_);["u","d"].forEach(A=>{["l","r"].forEach(L=>{let R=A+L,C=b[R];if(C===k)return;let P=Object.values(C),F=E-t.applyWithChunking(Math.min,P);L!=="l"&&(F=N-t.applyWithChunking(Math.max,P)),F&&(b[R]=t.mapValues(C,M=>M+F))})})}function g(b,k){return t.mapValues(b.ul,(_,E)=>{if(k)return b[k.toLowerCase()][E];{let N=Object.values(b).map(A=>A[E]).sort((A,L)=>A-L);return(N[1]+N[2])/2}})}function v(b){let k=t.buildLayerMatrix(b),_=Object.assign(n(b,k),i(b,k)),E={},N;["u","d"].forEach(L=>{N=L==="u"?k:Object.values(k).reverse(),["l","r"].forEach(R=>{R==="r"&&(N=N.map(M=>Object.values(M).reverse()));let C=(L==="u"?b.predecessors:b.successors).bind(b),P=c(b,N,_,C),F=f(b,N,P.root,P.align,R==="r");R==="r"&&(F=t.mapValues(F,M=>-M)),E[L+R]=F})});let A=m(b,E);return p(E,A),g(E,b.graph().align)}function S(b,k,_){return(E,N,A)=>{let L=E.node(N),R=E.node(A),C=0,P;if(C+=L.width/2,Object.hasOwn(L,"labelpos"))switch(L.labelpos.toLowerCase()){case"l":P=-L.width/2;break;case"r":P=L.width/2;break}if(P&&(C+=_?P:-P),P=0,C+=(L.dummy?k:b)/2,C+=(R.dummy?k:b)/2,C+=R.width/2,Object.hasOwn(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":P=R.width/2;break;case"r":P=-R.width/2;break}return P&&(C+=_?P:-P),P=0,C}}function x(b,k){return b.node(k).width}return Ad}var Od,K0;function zP(){if(K0)return Od;K0=1;let e=et(),t=$P().positionX;Od=n;function n(s){s=e.asNonCompoundGraph(s),i(s),Object.entries(t(s)).forEach(([l,a])=>s.node(l).x=a)}function i(s){let l=e.buildLayerMatrix(s),a=s.graph().ranksep,c=0;l.forEach(f=>{const d=f.reduce((m,p)=>{const g=s.node(p).height;return m>g?m:g},0);f.forEach(m=>s.node(m).y=c+d/2),c+=d+a})}return Od}var Ld,G0;function FP(){if(G0)return Ld;G0=1;let e=bP(),t=SP(),n=EP(),i=et().normalizeRanks,s=_P(),l=et().removeEmptyRanks,a=NP(),c=CP(),f=IP(),d=jP(),m=zP(),p=et(),g=mn().Graph;Ld=v;function v(V,K){let Q=K&&K.debugTiming?p.time:p.notime;Q("layout",()=>{let re=Q(" buildLayoutGraph",()=>C(V));Q(" runLayout",()=>S(re,Q,K)),Q(" updateInputGraph",()=>x(V,re))})}function S(V,K,Q){K(" makeSpaceForEdgeLabels",()=>P(V)),K(" removeSelfEdges",()=>Y(V)),K(" acyclic",()=>e.run(V)),K(" nestingGraph.run",()=>a.run(V)),K(" rank",()=>n(p.asNonCompoundGraph(V))),K(" injectEdgeLabelProxies",()=>F(V)),K(" removeEmptyRanks",()=>l(V)),K(" nestingGraph.cleanup",()=>a.cleanup(V)),K(" normalizeRanks",()=>i(V)),K(" assignRankMinMax",()=>M(V)),K(" removeEdgeLabelProxies",()=>$(V)),K(" normalize.run",()=>t.run(V)),K(" parentDummyChains",()=>s(V)),K(" addBorderSegments",()=>c(V)),K(" order",()=>d(V,Q)),K(" insertSelfEdges",()=>U(V)),K(" adjustCoordinateSystem",()=>f.adjust(V)),K(" position",()=>m(V)),K(" positionSelfEdges",()=>B(V)),K(" removeBorderNodes",()=>J(V)),K(" normalize.undo",()=>t.undo(V)),K(" fixupEdgeLabelCoords",()=>G(V)),K(" undoCoordinateSystem",()=>f.undo(V)),K(" translateGraph",()=>Z(V)),K(" assignNodeIntersects",()=>j(V)),K(" reversePoints",()=>q(V)),K(" acyclic.undo",()=>e.undo(V))}function x(V,K){V.nodes().forEach(Q=>{let re=V.node(Q),se=K.node(Q);re&&(re.x=se.x,re.y=se.y,re.rank=se.rank,K.children(Q).length&&(re.width=se.width,re.height=se.height))}),V.edges().forEach(Q=>{let re=V.edge(Q),se=K.edge(Q);re.points=se.points,Object.hasOwn(se,"x")&&(re.x=se.x,re.y=se.y)}),V.graph().width=K.graph().width,V.graph().height=K.graph().height}let b=["nodesep","edgesep","ranksep","marginx","marginy"],k={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],E=["width","height","rank"],N={width:0,height:0},A=["minlen","weight","width","height","labeloffset"],L={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},R=["labelpos"];function C(V){let K=new g({multigraph:!0,compound:!0}),Q=H(V.graph());return K.setGraph(Object.assign({},k,D(Q,b),p.pick(Q,_))),V.nodes().forEach(re=>{let se=H(V.node(re));const ee=D(se,E);Object.keys(N).forEach(oe=>{ee[oe]===void 0&&(ee[oe]=N[oe])}),K.setNode(re,ee),K.setParent(re,V.parent(re))}),V.edges().forEach(re=>{let se=H(V.edge(re));K.setEdge(re,Object.assign({},L,D(se,A),p.pick(se,R)))}),K}function P(V){let K=V.graph();K.ranksep/=2,V.edges().forEach(Q=>{let re=V.edge(Q);re.minlen*=2,re.labelpos.toLowerCase()!=="c"&&(K.rankdir==="TB"||K.rankdir==="BT"?re.width+=re.labeloffset:re.height+=re.labeloffset)})}function F(V){V.edges().forEach(K=>{let Q=V.edge(K);if(Q.width&&Q.height){let re=V.node(K.v),ee={rank:(V.node(K.w).rank-re.rank)/2+re.rank,e:K};p.addDummyNode(V,"edge-proxy",ee,"_ep")}})}function M(V){let K=0;V.nodes().forEach(Q=>{let re=V.node(Q);re.borderTop&&(re.minRank=V.node(re.borderTop).rank,re.maxRank=V.node(re.borderBottom).rank,K=Math.max(K,re.maxRank))}),V.graph().maxRank=K}function $(V){V.nodes().forEach(K=>{let Q=V.node(K);Q.dummy==="edge-proxy"&&(V.edge(Q.e).labelRank=Q.rank,V.removeNode(K))})}function Z(V){let K=Number.POSITIVE_INFINITY,Q=0,re=Number.POSITIVE_INFINITY,se=0,ee=V.graph(),oe=ee.marginx||0,de=ee.marginy||0;function xe(he){let fe=he.x,ke=he.y,Pe=he.width,Ae=he.height;K=Math.min(K,fe-Pe/2),Q=Math.max(Q,fe+Pe/2),re=Math.min(re,ke-Ae/2),se=Math.max(se,ke+Ae/2)}V.nodes().forEach(he=>xe(V.node(he))),V.edges().forEach(he=>{let fe=V.edge(he);Object.hasOwn(fe,"x")&&xe(fe)}),K-=oe,re-=de,V.nodes().forEach(he=>{let fe=V.node(he);fe.x-=K,fe.y-=re}),V.edges().forEach(he=>{let fe=V.edge(he);fe.points.forEach(ke=>{ke.x-=K,ke.y-=re}),Object.hasOwn(fe,"x")&&(fe.x-=K),Object.hasOwn(fe,"y")&&(fe.y-=re)}),ee.width=Q-K+oe,ee.height=se-re+de}function j(V){V.edges().forEach(K=>{let Q=V.edge(K),re=V.node(K.v),se=V.node(K.w),ee,oe;Q.points?(ee=Q.points[0],oe=Q.points[Q.points.length-1]):(Q.points=[],ee=se,oe=re),Q.points.unshift(p.intersectRect(re,ee)),Q.points.push(p.intersectRect(se,oe))})}function G(V){V.edges().forEach(K=>{let Q=V.edge(K);if(Object.hasOwn(Q,"x"))switch((Q.labelpos==="l"||Q.labelpos==="r")&&(Q.width-=Q.labeloffset),Q.labelpos){case"l":Q.x-=Q.width/2+Q.labeloffset;break;case"r":Q.x+=Q.width/2+Q.labeloffset;break}})}function q(V){V.edges().forEach(K=>{let Q=V.edge(K);Q.reversed&&Q.points.reverse()})}function J(V){V.nodes().forEach(K=>{if(V.children(K).length){let Q=V.node(K),re=V.node(Q.borderTop),se=V.node(Q.borderBottom),ee=V.node(Q.borderLeft[Q.borderLeft.length-1]),oe=V.node(Q.borderRight[Q.borderRight.length-1]);Q.width=Math.abs(oe.x-ee.x),Q.height=Math.abs(se.y-re.y),Q.x=ee.x+Q.width/2,Q.y=re.y+Q.height/2}}),V.nodes().forEach(K=>{V.node(K).dummy==="border"&&V.removeNode(K)})}function Y(V){V.edges().forEach(K=>{if(K.v===K.w){var Q=V.node(K.v);Q.selfEdges||(Q.selfEdges=[]),Q.selfEdges.push({e:K,label:V.edge(K)}),V.removeEdge(K)}})}function U(V){var K=p.buildLayerMatrix(V);K.forEach(Q=>{var re=0;Q.forEach((se,ee)=>{var oe=V.node(se);oe.order=ee+re,(oe.selfEdges||[]).forEach(de=>{p.addDummyNode(V,"selfedge",{width:de.label.width,height:de.label.height,rank:oe.rank,order:ee+ ++re,e:de.e,label:de.label},"_se")}),delete oe.selfEdges})})}function B(V){V.nodes().forEach(K=>{var Q=V.node(K);if(Q.dummy==="selfedge"){var re=V.node(Q.e.v),se=re.x+re.width/2,ee=re.y,oe=Q.x-se,de=re.height/2;V.setEdge(Q.e,Q.label),V.removeNode(K),Q.label.points=[{x:se+2*oe/3,y:ee-de},{x:se+5*oe/6,y:ee-de},{x:se+oe,y:ee},{x:se+5*oe/6,y:ee+de},{x:se+2*oe/3,y:ee+de}],Q.label.x=Q.x,Q.label.y=Q.y}})}function D(V,K){return p.mapValues(p.pick(V,K),Number)}function H(V){var K={};return V&&Object.entries(V).forEach(([Q,re])=>{typeof Q=="string"&&(Q=Q.toLowerCase()),K[Q]=re}),K}return Ld}var Md,X0;function BP(){if(X0)return Md;X0=1;let e=et(),t=mn().Graph;Md={debugOrdering:n};function n(i){let s=e.buildLayerMatrix(i),l=new t({compound:!0,multigraph:!0}).setGraph({});return i.nodes().forEach(a=>{l.setNode(a,{label:a}),l.setParent(a,"layer"+i.node(a).rank)}),i.edges().forEach(a=>l.setEdge(a.v,a.w,{},a.name)),s.forEach((a,c)=>{let f="layer"+c;l.setNode(f,{rank:"same"}),a.reduce((d,m)=>(l.setEdge(d,m,{style:"invis"}),m))}),l}return Md}var Rd,Q0;function VP(){return Q0||(Q0=1,Rd="1.1.8"),Rd}var Dd,J0;function HP(){return J0||(J0=1,Dd={graphlib:mn(),layout:FP(),debug:BP(),util:{time:et().time,notime:et().notime},version:VP()}),Dd}var UP=HP();const Z0=ou(UP),ev=220,tv=140,jd=60;function WP(e){return T.useMemo(()=>{if(!e)return{nodes:[],edges:[]};const t=new Z0.graphlib.Graph;t.setDefaultEdgeLabel(()=>({})),t.setGraph({rankdir:"LR",nodesep:40,ranksep:80});for(const s of e.nodes){const l=s.type==="task.branch"||s.type.startsWith("trigger.")?tv:ev;t.setNode(s.id,{width:l,height:jd})}for(const s of e.edges)t.setEdge(s.from,s.to);Z0.layout(t);const n=e.nodes.map(s=>{const l=t.node(s.id),a=s.type==="task.branch"||s.type.startsWith("trigger.")?tv:ev;return{id:s.id,type:s.type==="agent.run"?"agentNode":"workflowNode",position:{x:l.x-a/2,y:l.y-jd/2},data:{node:s},width:a,height:jd}}),i=e.edges.map((s,l)=>({id:`e-${l}`,source:s.from,target:s.to,label:s.when,type:"smoothstep",style:{stroke:"hsl(240 5% 65%)",strokeWidth:1.5},labelStyle:{fontSize:11,fontFamily:"JetBrains Mono, monospace"}}));return{nodes:n,edges:i}},[e])}const qP={workflowNode:o0,agentNode:o0};function YP({workflow:e,onNodeClick:t,onLoadYaml:n,nodeStatuses:i={}}){const{nodes:s,edges:l}=WP(e),[a,c]=T.useState(!1),f=s.map(v=>({...v,data:{...v.data,onNodeClick:t,liveStatus:i[v.id]??"idle"}})),d=T.useCallback((v,S)=>{const x=S.data.node;x&&t(x)},[t]),m=T.useCallback(v=>{v.preventDefault(),v.dataTransfer.dropEffect="copy",c(!0)},[]),p=T.useCallback(()=>{c(!1)},[]),g=T.useCallback(v=>{v.preventDefault(),c(!1);const S=v.dataTransfer.files[0];if(!S)return;const x=new FileReader;x.onload=b=>{var _;const k=(_=b.target)==null?void 0:_.result;typeof k=="string"&&n(k)},x.readAsText(S)},[n]);return O.jsxs("div",{className:"flex-1 relative canvas-grid overflow-hidden",style:{height:"100%"},onDragOver:m,onDragLeave:p,onDrop:g,children:[O.jsxs(zI,{nodes:f,edges:l,nodeTypes:qP,onNodeClick:d,fitView:!0,attributionPosition:"bottom-right",children:[O.jsx(UI,{variant:Gn.Dots,gap:22,size:1,color:"hsl(240 5.9% 88%)"}),O.jsx(QI,{})]}),a&&O.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-bg/70 border-2 border-dashed border-primary pointer-events-none z-10",children:O.jsx("span",{className:"text-sm font-medium text-primary",children:"Drop YAML here"})}),O.jsx("div",{className:"absolute bottom-3 right-14 text-[10px] font-mono text-mutedfg pointer-events-none",children:"layout: auto (dagre) · positions not stored"})]})}function bt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function nv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function KP(...e){return t=>{let n=!1;const i=e.map(s=>{const l=nv(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():nv(e[s],null)}}}}function Vt(...e){return T.useCallback(KP(...e),e)}function B1(e,t=[]){let n=[];function i(l,a){const c=T.createContext(a);c.displayName=l+"Context";const f=n.length;n=[...n,a];const d=p=>{var k;const{scope:g,children:v,...S}=p,x=((k=g==null?void 0:g[e])==null?void 0:k[f])||c,b=T.useMemo(()=>S,Object.values(S));return O.jsx(x.Provider,{value:b,children:v})};d.displayName=l+"Provider";function m(p,g){var x;const v=((x=g==null?void 0:g[e])==null?void 0:x[f])||c,S=T.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[d,m]}const s=()=>{const l=n.map(a=>T.createContext(a));return function(c){const f=(c==null?void 0:c[e])||l;return T.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return s.scopeName=e,[i,GP(s,...t)]}function GP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const a=i.reduce((c,{useScope:f,scopeName:d})=>{const p=f(l)[`__scope${d}`];return{...c,...p}},{});return T.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ao=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},XP=bh[" useId ".trim().toString()]||(()=>{}),QP=0;function $d(e){const[t,n]=T.useState(XP());return ao(()=>{n(i=>i??String(QP++))},[e]),e||(t?`radix-${t}`:"")}var JP=bh[" useInsertionEffect ".trim().toString()]||ao;function ZP({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[s,l,a]=eA({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:s;{const m=T.useRef(e!==void 0);T.useEffect(()=>{const p=m.current;p!==c&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,i])}const d=T.useCallback(m=>{var p;if(c){const g=tA(m)?m(e):m;g!==e&&((p=a.current)==null||p.call(a,g))}else l(m)},[c,e,l,a]);return[f,d]}function eA({defaultProp:e,onChange:t}){const[n,i]=T.useState(e),s=T.useRef(n),l=T.useRef(t);return JP(()=>{l.current=t},[t]),T.useEffect(()=>{var a;s.current!==n&&((a=l.current)==null||a.call(l,n),s.current=n)},[n,s]),[n,i,l]}function tA(e){return typeof e=="function"}function V1(e){const t=T.forwardRef((n,i)=>{let{children:s,...l}=n,a=null,c=!1;const f=[];rv(s)&&typeof wa=="function"&&(s=wa(s._payload)),T.Children.forEach(s,g=>{var v;if(sA(g)){c=!0;const S=g;let x="child"in S.props?S.props.child:S.props.children;rv(x)&&typeof wa=="function"&&(x=wa(x._payload)),a=rA(S,x),f.push((v=a==null?void 0:a.props)==null?void 0:v.children)}else f.push(g)}),a?a=T.cloneElement(a,void 0,f):!c&&T.Children.count(s)===1&&T.isValidElement(s)&&(a=s);const d=a?oA(a):void 0,m=Vt(i,d);if(!a){if(s||s===0)throw new Error(c?cA(e):uA(e));return s}const p=iA(l,a.props??{});return a.type!==T.Fragment&&(p.ref=i?m:d),T.cloneElement(a,p)});return t.displayName=`${e}.Slot`,t}var nA=Symbol.for("radix.slottable"),rA=(e,t)=>{if("child"in e.props){const n=e.props.child;return T.isValidElement(n)?T.cloneElement(n,void 0,e.props.children(n.props.children)):null}return T.isValidElement(t)?t:null};function iA(e,t){const n={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?n[i]=(...c)=>{const f=l(...c);return s(...c),f}:s&&(n[i]=s):i==="style"?n[i]={...s,...l}:i==="className"&&(n[i]=[s,l].filter(Boolean).join(" "))}return{...e,...n}}function oA(e){var i,s;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function sA(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nA}var lA=Symbol.for("react.lazy");function rv(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===lA&&"_payload"in e&&aA(e._payload)}function aA(e){return typeof e=="object"&&e!==null&&"then"in e}var uA=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,cA=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,wa=bh[" use ".trim().toString()],fA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ot=fA.reduce((e,t)=>{const n=V1(`Primitive.${t}`),i=T.forwardRef((s,l)=>{const{asChild:a,...c}=s,f=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(f,{...c,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function dA(e,t){e&&zw.flushSync(()=>e.dispatchEvent(t))}function Qt(e){const t=T.useRef(e);return T.useEffect(()=>{t.current=e}),T.useMemo(()=>((...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)}),[])}function hA(e,t=globalThis==null?void 0:globalThis.document){const n=Qt(e);T.useEffect(()=>{const i=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var pA="DismissableLayer",dh="dismissableLayer.update",mA="dismissableLayer.pointerDownOutside",gA="dismissableLayer.focusOutside",iv,Uh=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),H1=T.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:a,onInteractOutside:c,onDismiss:f,...d}=e,m=T.useContext(Uh),[p,g]=T.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=T.useState({}),x=Vt(t,P=>g(P)),b=Array.from(m.layers),[k]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),_=b.indexOf(k),E=p?b.indexOf(p):-1,N=m.layersWithOutsidePointerEventsDisabled.size>0,A=E>=_,L=T.useRef(!1),R=xA(P=>{const F=P.target;if(!(F instanceof Node))return;const M=[...m.branches].some($=>$.contains(F));!A||M||(l==null||l(P),c==null||c(P),P.defaultPrevented||f==null||f())},{ownerDocument:v,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:L,dismissableSurfaces:m.dismissableSurfaces}),C=bA(P=>{if(i&&L.current)return;const F=P.target;[...m.branches].some($=>$.contains(F))||(a==null||a(P),c==null||c(P),P.defaultPrevented||f==null||f())},v);return hA(P=>{E===m.layers.size-1&&(s==null||s(P),!P.defaultPrevented&&f&&(P.preventDefault(),f()))},v),T.useEffect(()=>{if(p)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(iv=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(p)),m.layers.add(p),ov(),()=>{n&&(m.layersWithOutsidePointerEventsDisabled.delete(p),m.layersWithOutsidePointerEventsDisabled.size===0&&(v.body.style.pointerEvents=iv))}},[p,v,n,m]),T.useEffect(()=>()=>{p&&(m.layers.delete(p),m.layersWithOutsidePointerEventsDisabled.delete(p),ov())},[p,m]),T.useEffect(()=>{const P=()=>S({});return document.addEventListener(dh,P),()=>document.removeEventListener(dh,P)},[]),O.jsx(Ot.div,{...d,ref:x,style:{pointerEvents:N?A?"auto":"none":void 0,...e.style},onFocusCapture:bt(e.onFocusCapture,C.onFocusCapture),onBlurCapture:bt(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:bt(e.onPointerDownCapture,R.onPointerDownCapture)})});H1.displayName=pA;var yA="DismissableLayerBranch",vA=T.forwardRef((e,t)=>{const n=T.useContext(Uh),i=T.useRef(null),s=Vt(t,i);return T.useEffect(()=>{const l=i.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),O.jsx(Ot.div,{...e,ref:s})});vA.displayName=yA;function wA(){const e=T.useContext(Uh),[t,n]=T.useState(null);return T.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function xA(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:l}=t,a=Qt(e),c=T.useRef(!1),f=T.useRef(!1),d=T.useRef(new Map),m=T.useRef(()=>{});return T.useEffect(()=>{function p(){f.current=!1,s.current=!1,d.current.clear()}function g(){return Array.from(d.current.values()).some(Boolean)}function v(_){if(!f.current)return;const E=_.target;E instanceof Node&&[...l].some(A=>A.contains(E))||d.current.set(_.type,!0),_.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function S(_){f.current&&d.current.set(_.type,!1)}const x=_=>{if(_.target&&!c.current){let E=function(){n.removeEventListener("click",m.current);const A=g();p(),A||U1(mA,a,N,{discrete:!0})};const N={originalEvent:_};f.current=!0,s.current=i&&_.button===0,d.current.clear(),!i||_.button!==0?E():(n.removeEventListener("click",m.current),m.current=E,n.addEventListener("click",m.current,{once:!0}))}else n.removeEventListener("click",m.current),p();c.current=!1},b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const _ of b)n.addEventListener(_,v,!0),n.addEventListener(_,S);const k=window.setTimeout(()=>{n.addEventListener("pointerdown",x)},0);return()=>{window.clearTimeout(k),n.removeEventListener("pointerdown",x),n.removeEventListener("click",m.current);for(const _ of b)n.removeEventListener(_,v,!0),n.removeEventListener(_,S)}},[n,a,i,s,l]),{onPointerDownCapture:()=>c.current=!0}}function bA(e,t=globalThis==null?void 0:globalThis.document){const n=Qt(e),i=T.useRef(!1);return T.useEffect(()=>{const s=l=>{l.target&&!i.current&&U1(gA,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function ov(){const e=new CustomEvent(dh);document.dispatchEvent(e)}function U1(e,t,n,{discrete:i}){const s=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),i?dA(s,l):s.dispatchEvent(l)}var zd="focusScope.autoFocusOnMount",Fd="focusScope.autoFocusOnUnmount",sv={bubbles:!1,cancelable:!0},SA="FocusScope",W1=T.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...a}=e,[c,f]=T.useState(null),d=Qt(s),m=Qt(l),p=T.useRef(null),g=Vt(t,x=>f(x)),v=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(i){let x=function(E){if(v.paused||!c)return;const N=E.target;c.contains(N)?p.current=N:kr(p.current,{select:!0})},b=function(E){if(v.paused||!c)return;const N=E.relatedTarget;N!==null&&(c.contains(N)||kr(p.current,{select:!0}))},k=function(E){if(document.activeElement===document.body)for(const A of E)A.removedNodes.length>0&&kr(c)};document.addEventListener("focusin",x),document.addEventListener("focusout",b);const _=new MutationObserver(k);return c&&_.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",b),_.disconnect()}}},[i,c,v.paused]),T.useEffect(()=>{if(c){av.add(v);const x=document.activeElement;if(!c.contains(x)){const k=new CustomEvent(zd,sv);c.addEventListener(zd,d),c.dispatchEvent(k),k.defaultPrevented||(kA(IA(q1(c)),{select:!0}),document.activeElement===x&&kr(c))}return()=>{c.removeEventListener(zd,d),setTimeout(()=>{const k=new CustomEvent(Fd,sv);c.addEventListener(Fd,m),c.dispatchEvent(k),k.defaultPrevented||kr(x??document.body,{select:!0}),c.removeEventListener(Fd,m),av.remove(v)},0)}}},[c,d,m,v]);const S=T.useCallback(x=>{if(!n&&!i||v.paused)return;const b=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,k=document.activeElement;if(b&&k){const _=x.currentTarget,[E,N]=EA(_);E&&N?!x.shiftKey&&k===N?(x.preventDefault(),n&&kr(E,{select:!0})):x.shiftKey&&k===E&&(x.preventDefault(),n&&kr(N,{select:!0})):k===_&&x.preventDefault()}},[n,i,v.paused]);return O.jsx(Ot.div,{tabIndex:-1,...a,ref:g,onKeyDown:S})});W1.displayName=SA;function kA(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(kr(i,{select:t}),document.activeElement!==n)return}function EA(e){const t=q1(e),n=lv(t,e),i=lv(t.reverse(),e);return[n,i]}function q1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function lv(e,t){for(const n of e)if(!_A(n,{upTo:t}))return n}function _A(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function NA(e){return e instanceof HTMLInputElement&&"select"in e}function kr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&NA(e)&&t&&e.select()}}var av=CA();function CA(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=uv(e,t),e.unshift(t)},remove(t){var n;e=uv(e,t),(n=e[0])==null||n.resume()}}}function uv(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function IA(e){return e.filter(t=>t.tagName!=="A")}var TA="Portal",Y1=T.forwardRef((e,t)=>{var c;const{container:n,...i}=e,[s,l]=T.useState(!1);ao(()=>l(!0),[]);const a=n||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?zw.createPortal(O.jsx(Ot.div,{...i,ref:t}),a):null});Y1.displayName=TA;function PA(e,t){return T.useReducer((n,i)=>t[n][i]??n,e)}var Tr=e=>{const{present:t,children:n}=e,i=AA(t),s=typeof n=="function"?n({present:i.isPresent}):T.Children.only(n),l=OA(i.ref,LA(s));return typeof n=="function"||i.isPresent?T.cloneElement(s,{ref:l}):null};Tr.displayName="Presence";function AA(e){const[t,n]=T.useState(),i=T.useRef(null),s=T.useRef(e),l=T.useRef("none"),a=e?"mounted":"unmounted",[c,f]=PA(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const d=xa(i.current);l.current=c==="mounted"?d:"none"},[c]),ao(()=>{const d=i.current,m=s.current;if(m!==e){const g=l.current,v=xa(d);e?f("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,f]),ao(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,p=v=>{const x=xa(i.current).includes(CSS.escape(v.animationName));if(v.target===t&&x&&(f("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=v=>{v.target===t&&(l.current=xa(i.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:T.useCallback(d=>{i.current=d?getComputedStyle(d):null,n(d)},[])}}function cv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function OA(...e){const t=T.useRef(e);return t.current=e,T.useCallback(n=>{const i=t.current;let s=!1;const l=i.map(a=>{const c=cv(a,n);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let a=0;a<l.length;a++){const c=l[a];typeof c=="function"?c():cv(i[a],null)}}},[])}function xa(e){return(e==null?void 0:e.animationName)||"none"}function LA(e){var i,s;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ba=0,Cn=null;function MA(){T.useEffect(()=>{Cn||(Cn={start:fv(),end:fv()});const{start:e,end:t}=Cn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ba++,()=>{ba===1&&(Cn==null||Cn.start.remove(),Cn==null||Cn.end.remove(),Cn=null),ba=Math.max(0,ba-1)}},[])}function fv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Tn=function(){return Tn=Object.assign||function(t){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Tn.apply(this,arguments)};function K1(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n}function RA(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var Da="right-scroll-bar-position",ja="width-before-scroll-bar",DA="with-scroll-bars-hidden",jA="--removed-body-scroll-bar-size";function Bd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $A(e,t){var n=T.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var s=n.value;s!==i&&(n.value=i,n.callback(i,s))}}}})[0];return n.callback=t,n.facade}var zA=typeof window<"u"?T.useLayoutEffect:T.useEffect,dv=new WeakMap;function FA(e,t){var n=$A(null,function(i){return e.forEach(function(s){return Bd(s,i)})});return zA(function(){var i=dv.get(n);if(i){var s=new Set(i),l=new Set(e),a=n.current;s.forEach(function(c){l.has(c)||Bd(c,null)}),l.forEach(function(c){s.has(c)||Bd(c,a)})}dv.set(n,e)},[e]),n}function BA(e){return e}function VA(e,t){t===void 0&&(t=BA);var n=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var a=t(l,i);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(l){for(i=!0;n.length;){var a=n;n=[],a.forEach(l)}n={push:function(c){return l(c)},filter:function(){return n}}},assignMedium:function(l){i=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(l),a=n}var f=function(){var m=a;a=[],m.forEach(l)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(m){a.push(m),d()},filter:function(m){return a=a.filter(m),n}}}};return s}function HA(e){e===void 0&&(e={});var t=VA(null);return t.options=Tn({async:!0,ssr:!1},e),t}var G1=function(e){var t=e.sideCar,n=K1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return T.createElement(i,Tn({},n))};G1.isSideCarExport=!0;function UA(e,t){return e.useMedium(t),G1}var X1=HA(),Vd=function(){},vu=T.forwardRef(function(e,t){var n=T.useRef(null),i=T.useState({onScrollCapture:Vd,onWheelCapture:Vd,onTouchMoveCapture:Vd}),s=i[0],l=i[1],a=e.forwardProps,c=e.children,f=e.className,d=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,S=e.noIsolation,x=e.inert,b=e.allowPinchZoom,k=e.as,_=k===void 0?"div":k,E=e.gapMode,N=K1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=g,L=FA([n,t]),R=Tn(Tn({},N),s);return T.createElement(T.Fragment,null,m&&T.createElement(A,{sideCar:X1,removeScrollBar:d,shards:p,noRelative:v,noIsolation:S,inert:x,setCallbacks:l,allowPinchZoom:!!b,lockRef:n,gapMode:E}),a?T.cloneElement(T.Children.only(c),Tn(Tn({},R),{ref:L})):T.createElement(_,Tn({},R,{className:f,ref:L}),c))});vu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vu.classNames={fullWidth:ja,zeroRight:Da};var WA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function qA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=WA();return t&&e.setAttribute("nonce",t),e}function YA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function KA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var GA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=qA())&&(YA(t,n),KA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},XA=function(){var e=GA();return function(t,n){T.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Q1=function(){var e=XA(),t=function(n){var i=n.styles,s=n.dynamic;return e(i,s),null};return t},QA={left:0,top:0,right:0,gap:0},Hd=function(e){return parseInt(e||"",10)||0},JA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Hd(n),Hd(i),Hd(s)]},ZA=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return QA;var t=JA(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},eO=Q1(),Ji="data-scroll-locked",tO=function(e,t,n,i){var s=e.left,l=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
63
|
-
.`.concat(
|
|
61
|
+
`)),m=d.reduce((p,g)=>p.concat(...g),[]);return[d,m]}return[[],[]]},[e]);return T.useEffect(()=>{const f=(t==null?void 0:t.target)??Ry,d=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const m=v=>{var b,k;if(s.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!s.current||s.current&&!d)&&kw(v))return!1;const w=jy(v.code,c);if(l.current.add(v[w]),Dy(a,l.current,!1)){const _=((k=(b=v.composedPath)==null?void 0:b.call(v))==null?void 0:k[0])||v.target,E=(_==null?void 0:_.nodeName)==="BUTTON"||(_==null?void 0:_.nodeName)==="A";t.preventDefault!==!1&&(s.current||!E)&&v.preventDefault(),i(!0)}},p=v=>{const S=jy(v.code,c);Dy(a,l.current,!0)?(i(!1),l.current.clear()):l.current.delete(v[S]),v.key==="Meta"&&l.current.clear(),s.current=!1},g=()=>{l.current.clear(),i(!1)};return f==null||f.addEventListener("keydown",m),f==null||f.addEventListener("keyup",p),window.addEventListener("blur",g),window.addEventListener("contextmenu",g),()=>{f==null||f.removeEventListener("keydown",m),f==null||f.removeEventListener("keyup",p),window.removeEventListener("blur",g),window.removeEventListener("contextmenu",g)}}},[e,i]),n}function Dy(e,t,n){return e.filter(i=>n||i.length===t.size).some(i=>i.every(s=>t.has(s)))}function jy(e,t){return t.includes(e)?"code":"key"}const m2=()=>{const e=He();return T.useMemo(()=>({zoomIn:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{const{panZoom:i}=e.getState();return i?i.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[i,s,l],panZoom:a}=e.getState();return a?(await a.setViewport({x:t.x??i,y:t.y??s,zoom:t.zoom??l},n),!0):!1},getViewport:()=>{const[t,n,i]=e.getState().transform;return{x:t,y:n,zoom:i}},setCenter:async(t,n,i)=>e.getState().setCenter(t,n,i),fitBounds:async(t,n)=>{const{width:i,height:s,minZoom:l,maxZoom:a,panZoom:c}=e.getState(),f=Lh(t,i,s,l,a,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(f,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{const{transform:i,snapGrid:s,snapToGrid:l,domNode:a}=e.getState();if(!a)return t;const{x:c,y:f}=a.getBoundingClientRect(),d={x:t.x-c,y:t.y-f},m=n.snapGrid??s,p=n.snapToGrid??l;return po(d,i,p,m)},flowToScreenPosition:t=>{const{transform:n,domNode:i}=e.getState();if(!i)return t;const{x:s,y:l}=i.getBoundingClientRect(),a=so(t,n);return{x:a.x+s,y:a.y+l}}}),[])};function qw(e,t){const n=[],i=new Map,s=[];for(const l of e)if(l.type==="add"){s.push(l);continue}else if(l.type==="remove"||l.type==="replace")i.set(l.id,[l]);else{const a=i.get(l.id);a?a.push(l):i.set(l.id,[l])}for(const l of t){const a=i.get(l.id);if(!a){n.push(l);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){n.push({...a[0].item});continue}const c={...l};for(const f of a)g2(f,c);n.push(c)}return s.length&&s.forEach(l=>{l.index!==void 0?n.splice(l.index,0,{...l.item}):n.push({...l.item})}),n}function g2(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function y2(e,t){return qw(e,t)}function v2(e,t){return qw(e,t)}function Xr(e,t){return{id:e,type:"select",selected:t}}function qi(e,t=new Set,n=!1){const i=[];for(const[s,l]of e){const a=t.has(s);!(l.selected===void 0&&!a)&&l.selected!==a&&(n&&(l.selected=a),i.push(Xr(l.id,a)))}return i}function $y({items:e=[],lookup:t}){var s;const n=[],i=new Map(e.map(l=>[l.id,l]));for(const[l,a]of e.entries()){const c=t.get(a.id),f=((s=c==null?void 0:c.internals)==null?void 0:s.userNode)??c;f!==void 0&&f!==a&&n.push({id:a.id,item:a,type:"replace"}),f===void 0&&n.push({item:a,type:"add",index:l})}for(const[l]of t)i.get(l)===void 0&&n.push({id:l,type:"remove"});return n}function zy(e){return{id:e.id,type:"remove"}}const w2=ww();function x2(e,t,n={}){return rC(e,t,{...n,onError:n.onError??w2})}const Fy=e=>VN(e),b2=e=>mw(e);function Yw(e){return T.forwardRef(e)}const S2=typeof window<"u"?T.useLayoutEffect:T.useEffect;function By(e){const[t,n]=T.useState(BigInt(0)),[i]=T.useState(()=>k2(()=>n(s=>s+BigInt(1))));return S2(()=>{const s=i.get();s.length&&(e(s),i.reset())},[t]),i}function k2(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Kw=T.createContext(null);function E2({children:e}){const t=He(),n=T.useCallback(c=>{const{nodes:f=[],setNodes:d,hasDefaultNodes:m,onNodesChange:p,nodeLookup:g,fitViewQueued:v,onNodesChangeMiddlewareMap:S}=t.getState();let w=f;for(const k of c)w=typeof k=="function"?k(w):k;let b=$y({items:w,lookup:g});for(const k of S.values())b=k(b);m&&d(w),b.length>0?p==null||p(b):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:k,nodes:_,setNodes:E}=t.getState();k&&E(_)})},[]),i=By(n),s=T.useCallback(c=>{const{edges:f=[],setEdges:d,hasDefaultEdges:m,onEdgesChange:p,edgeLookup:g}=t.getState();let v=f;for(const S of c)v=typeof S=="function"?S(v):S;m?d(v):p&&p($y({items:v,lookup:g}))},[]),l=By(s),a=T.useMemo(()=>({nodeQueue:i,edgeQueue:l}),[]);return O.jsx(Kw.Provider,{value:a,children:e})}function _2(){const e=T.useContext(Kw);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const N2=e=>!!e.panZoom;function Fh(){const e=m2(),t=He(),n=_2(),i=Oe(N2),s=T.useMemo(()=>{const l=p=>t.getState().nodeLookup.get(p),a=p=>{n.nodeQueue.push(p)},c=p=>{n.edgeQueue.push(p)},f=p=>{var k,_;const{nodeLookup:g,nodeOrigin:v}=t.getState(),S=Fy(p)?p:g.get(p.id),w=S.parentId?bw(S.position,S.measured,S.parentId,g,v):S.position,b={...S,position:w,width:((k=S.measured)==null?void 0:k.width)??S.width,height:((_=S.measured)==null?void 0:_.height)??S.height};return oo(b)},d=(p,g,v={replace:!1})=>{a(S=>S.map(w=>{if(w.id===p){const b=typeof g=="function"?g(w):g;return v.replace&&Fy(b)?b:{...w,...b}}return w}))},m=(p,g,v={replace:!1})=>{c(S=>S.map(w=>{if(w.id===p){const b=typeof g=="function"?g(w):g;return v.replace&&b2(b)?b:{...w,...b}}return w}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var g;return(g=l(p))==null?void 0:g.internals.userNode},getInternalNode:l,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(g=>({...g}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:a,setEdges:c,addNodes:p=>{const g=Array.isArray(p)?p:[p];n.nodeQueue.push(v=>[...v,...g])},addEdges:p=>{const g=Array.isArray(p)?p:[p];n.edgeQueue.push(v=>[...v,...g])},toObject:()=>{const{nodes:p=[],edges:g=[],transform:v}=t.getState(),[S,w,b]=v;return{nodes:p.map(k=>({...k})),edges:g.map(k=>({...k})),viewport:{x:S,y:w,zoom:b}}},deleteElements:async({nodes:p=[],edges:g=[]})=>{const{nodes:v,edges:S,onNodesDelete:w,onEdgesDelete:b,triggerNodeChanges:k,triggerEdgeChanges:_,onDelete:E,onBeforeDelete:N}=t.getState(),{nodes:A,edges:L}=await YN({nodesToRemove:p,edgesToRemove:g,nodes:v,edges:S,onBeforeDelete:N}),R=L.length>0,C=A.length>0;if(R){const P=L.map(zy);b==null||b(L),_(P)}if(C){const P=A.map(zy);w==null||w(A),k(P)}return(C||R)&&(E==null||E({nodes:A,edges:L})),{deletedNodes:A,deletedEdges:L}},getIntersectingNodes:(p,g=!0,v)=>{const S=dy(p),w=S?p:f(p),b=v!==void 0;return w?(v||t.getState().nodes).filter(k=>{const _=t.getState().nodeLookup.get(k.id);if(_&&!S&&(k.id===p.id||!_.internals.positionAbsolute))return!1;const E=oo(b?k:_),N=Is(E,w);return g&&N>0||N>=E.width*E.height||N>=w.width*w.height}):[]},isNodeIntersecting:(p,g,v=!0)=>{const w=dy(p)?p:f(p);if(!w)return!1;const b=Is(w,g);return v&&b>0||b>=g.width*g.height||b>=w.width*w.height},updateNode:d,updateNodeData:(p,g,v={replace:!1})=>{d(p,S=>{const w=typeof g=="function"?g(S):g;return v.replace?{...S,data:w}:{...S,data:{...S.data,...w}}},v)},updateEdge:m,updateEdgeData:(p,g,v={replace:!1})=>{m(p,S=>{const w=typeof g=="function"?g(S):g;return v.replace?{...S,data:w}:{...S,data:{...S.data,...w}}},v)},getNodesBounds:p=>{const{nodeLookup:g,nodeOrigin:v}=t.getState();return HN(p,{nodeLookup:g,nodeOrigin:v})},getHandleConnections:({type:p,id:g,nodeId:v})=>{var S;return Array.from(((S=t.getState().connectionLookup.get(`${v}-${p}${g?`-${g}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:p,handleId:g,nodeId:v})=>{var S;return Array.from(((S=t.getState().connectionLookup.get(`${v}${p?g?`-${p}-${g}`:`-${p}`:""}`))==null?void 0:S.values())??[])},fitView:async p=>{const g=t.getState().fitViewResolver??XN();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:g}),n.nodeQueue.push(v=>[...v]),g.promise}}},[]);return T.useMemo(()=>({...s,...e,viewportInitialized:i}),[i])}const Vy=e=>e.selected,C2=typeof window<"u"?window:void 0;function I2({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=He(),{deleteElements:i}=Fh(),s=Ps(e,{actInsideInputWithModifier:!1}),l=Ps(t,{target:C2});T.useEffect(()=>{if(s){const{edges:a,nodes:c}=n.getState();i({nodes:c.filter(Vy),edges:a.filter(Vy)}),n.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{n.setState({multiSelectionActive:l})},[l])}function T2(e){const t=He();T.useEffect(()=>{const n=()=>{var s,l,a,c;if(!e.current||!(((l=(s=e.current).checkVisibility)==null?void 0:l.call(s))??!0))return!1;const i=Mh(e.current);(i.height===0||i.width===0)&&((c=(a=t.getState()).onError)==null||c.call(a,"004",pn.error004())),t.setState({width:i.width||500,height:i.height||500})};if(e.current){n(),window.addEventListener("resize",n);const i=new ResizeObserver(()=>n());return i.observe(e.current),()=>{window.removeEventListener("resize",n),i&&e.current&&i.unobserve(e.current)}}},[])}const yu={position:"absolute",width:"100%",height:"100%",top:0,left:0},P2=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function A2({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:i=!1,panOnScrollSpeed:s=.5,panOnScrollMode:l=ni.Free,zoomOnDoubleClick:a=!0,panOnDrag:c=!0,defaultViewport:f,translateExtent:d,minZoom:m,maxZoom:p,zoomActivationKeyCode:g,preventScrolling:v=!0,children:S,noWheelClassName:w,noPanClassName:b,onViewportChange:k,isControlledViewport:_,paneClickDistance:E,selectionOnDrag:N}){const A=He(),L=T.useRef(null),{userSelectionActive:R,lib:C,connectionInProgress:P}=Oe(P2,Ve),F=Ps(g),M=T.useRef();T2(L);const $=T.useCallback(Z=>{k==null||k({x:Z[0],y:Z[1],zoom:Z[2]}),_||A.setState({transform:Z})},[k,_]);return T.useEffect(()=>{if(L.current){M.current=LC({domNode:L.current,minZoom:m,maxZoom:p,translateExtent:d,viewport:f,onDraggingChange:q=>A.setState(J=>J.paneDragging===q?J:{paneDragging:q}),onPanZoomStart:(q,J)=>{const{onViewportChangeStart:Y,onMoveStart:W}=A.getState();W==null||W(q,J),Y==null||Y(J)},onPanZoom:(q,J)=>{const{onViewportChange:Y,onMove:W}=A.getState();W==null||W(q,J),Y==null||Y(J)},onPanZoomEnd:(q,J)=>{const{onViewportChangeEnd:Y,onMoveEnd:W}=A.getState();W==null||W(q,J),Y==null||Y(J)}});const{x:Z,y:j,zoom:G}=M.current.getViewport();return A.setState({panZoom:M.current,transform:[Z,j,G],domNode:L.current.closest(".react-flow")}),()=>{var q;(q=M.current)==null||q.destroy()}}},[]),T.useEffect(()=>{var Z;(Z=M.current)==null||Z.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:i,panOnScrollSpeed:s,panOnScrollMode:l,zoomOnDoubleClick:a,panOnDrag:c,zoomActivationKeyPressed:F,preventScrolling:v,noPanClassName:b,userSelectionActive:R,noWheelClassName:w,lib:C,onTransformChange:$,connectionInProgress:P,selectionOnDrag:N,paneClickDistance:E})},[e,t,n,i,s,l,a,c,F,v,b,R,w,C,$,P,N,E]),O.jsx("div",{className:"react-flow__renderer",ref:L,style:yu,children:S})}const O2=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function L2(){const{userSelectionActive:e,userSelectionRect:t}=Oe(O2,Ve);return e&&t?O.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Vf=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},M2=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function R2({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Cs.Full,panOnDrag:i,autoPanOnSelection:s,paneClickDistance:l,selectionOnDrag:a,onSelectionStart:c,onSelectionEnd:f,onPaneClick:d,onPaneContextMenu:m,onPaneScroll:p,onPaneMouseEnter:g,onPaneMouseMove:v,onPaneMouseLeave:S,children:w}){const b=T.useRef(0),k=He(),{userSelectionActive:_,elementsSelectable:E,dragging:N,connectionInProgress:A,panBy:L,autoPanSpeed:R}=Oe(M2,Ve),C=E&&(e||_),P=T.useRef(null),F=T.useRef(),M=T.useRef(new Set),$=T.useRef(new Set),Z=T.useRef(!1),j=T.useRef({x:0,y:0}),G=T.useRef(!1),q=ee=>{if(Z.current||A){Z.current=!1;return}d==null||d(ee),k.getState().resetSelectedElements(),k.setState({nodesSelectionActive:!1})},J=ee=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){ee.preventDefault();return}m==null||m(ee)},Y=p?ee=>p(ee):void 0,W=ee=>{Z.current&&(ee.stopPropagation(),Z.current=!1)},B=ee=>{var $e,yt;const{domNode:oe,transform:de}=k.getState();if(F.current=oe==null?void 0:oe.getBoundingClientRect(),!F.current)return;const xe=ee.target===P.current;if(!xe&&!!ee.target.closest(".nokey")||!e||!(a&&xe||t)||ee.button!==0||!ee.isPrimary)return;(yt=($e=ee.target)==null?void 0:$e.setPointerCapture)==null||yt.call($e,ee.pointerId),Z.current=!1;const{x:ke,y:Pe}=hn(ee.nativeEvent,F.current),Ae=po({x:ke,y:Pe},de);k.setState({userSelectionRect:{width:0,height:0,startX:Ae.x,startY:Ae.y,x:ke,y:Pe}}),xe||(ee.stopPropagation(),ee.preventDefault())};function D(ee,oe){const{userSelectionRect:de}=k.getState();if(!de)return;const{transform:xe,nodeLookup:he,edgeLookup:fe,connectionLookup:ke,triggerNodeChanges:Pe,triggerEdgeChanges:Ae,defaultEdgeOptions:$e}=k.getState(),yt={x:de.startX,y:de.startY},{x:kt,y:ft}=so(yt,xe),dt={startX:yt.x,startY:yt.y,x:ee<kt?ee:kt,y:oe<ft?oe:ft,width:Math.abs(ee-kt),height:Math.abs(oe-ft)},Mn=M.current,wn=$.current;M.current=new Set(Ah(he,dt,xe,n===Cs.Partial,!0).map(Et=>Et.id)),$.current=new Set;const xn=($e==null?void 0:$e.selectable)??!0;for(const Et of M.current){const Ht=ke.get(Et);if(Ht)for(const{edgeId:Lt}of Ht.values()){const Wt=fe.get(Lt);Wt&&(Wt.selectable??xn)&&$.current.add(Lt)}}if(!hy(Mn,M.current)){const Et=qi(he,M.current,!0);Pe(Et)}if(!hy(wn,$.current)){const Et=qi(fe,$.current);Ae(Et)}k.setState({userSelectionRect:dt,userSelectionActive:!0,nodesSelectionActive:!1})}function H(){if(!s||!F.current)return;const[ee,oe]=Oh(j.current,F.current,R);L({x:ee,y:oe}).then(de=>{if(!Z.current||!de){b.current=requestAnimationFrame(H);return}const{x:xe,y:he}=j.current;D(xe,he),b.current=requestAnimationFrame(H)})}const V=()=>{cancelAnimationFrame(b.current),b.current=0,G.current=!1};T.useEffect(()=>()=>V(),[]);const K=ee=>{const{userSelectionRect:oe,transform:de,resetSelectedElements:xe}=k.getState();if(!F.current||!oe)return;const{x:he,y:fe}=hn(ee.nativeEvent,F.current);j.current={x:he,y:fe};const ke=so({x:oe.startX,y:oe.startY},de);if(!Z.current){const Pe=t?0:l;if(Math.hypot(he-ke.x,fe-ke.y)<=Pe)return;xe(),c==null||c(ee)}Z.current=!0,G.current||(H(),G.current=!0),D(he,fe)},Q=ee=>{var oe,de;ee.button===0&&((de=(oe=ee.target)==null?void 0:oe.releasePointerCapture)==null||de.call(oe,ee.pointerId),!_&&ee.target===P.current&&k.getState().userSelectionRect&&(q==null||q(ee)),k.setState({userSelectionActive:!1,userSelectionRect:null}),Z.current&&(f==null||f(ee),k.setState({nodesSelectionActive:M.current.size>0})),V())},re=ee=>{var oe,de;(de=(oe=ee.target)==null?void 0:oe.releasePointerCapture)==null||de.call(oe,ee.pointerId),V()},se=i===!0||Array.isArray(i)&&i.includes(0);return O.jsxs("div",{className:tt(["react-flow__pane",{draggable:se,dragging:N,selection:e}]),onClick:C?void 0:Vf(q,P),onContextMenu:Vf(J,P),onWheel:Vf(Y,P),onPointerEnter:C?void 0:g,onPointerMove:C?K:v,onPointerUp:C?Q:void 0,onPointerCancel:C?re:void 0,onPointerDownCapture:C?B:void 0,onClickCapture:C?W:void 0,onPointerLeave:S,ref:P,style:yu,children:[w,O.jsx(L2,{})]})}function fh({id:e,store:t,unselect:n=!1,nodeRef:i}){const{addSelectedNodes:s,unselectNodesAndEdges:l,multiSelectionActive:a,nodeLookup:c,onError:f}=t.getState(),d=c.get(e);if(!d){f==null||f("012",pn.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&a)&&(l({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var m;return(m=i==null?void 0:i.current)==null?void 0:m.blur()})):s([e])}function Gw({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:i,nodeId:s,isSelectable:l,nodeClickDistance:a}){const c=He(),[f,d]=T.useState(!1),m=T.useRef();return T.useEffect(()=>{m.current=wC({getStoreItems:()=>c.getState(),onNodeMouseDown:p=>{fh({id:p,store:c,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),T.useEffect(()=>{if(!(t||!e.current||!m.current))return m.current.update({noDragClassName:n,handleSelector:i,domNode:e.current,isSelectable:l,nodeId:s,nodeClickDistance:a}),()=>{var p;(p=m.current)==null||p.destroy()}},[n,i,t,l,e,s,a]),f}const D2=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Xw(){const e=He();return T.useCallback(n=>{const{nodeExtent:i,snapToGrid:s,snapGrid:l,nodesDraggable:a,onError:c,updateNodePositions:f,nodeLookup:d,nodeOrigin:m}=e.getState(),p=new Map,g=D2(a),v=s?l[0]:5,S=s?l[1]:5,w=n.direction.x*v*n.factor,b=n.direction.y*S*n.factor;for(const[,k]of d){if(!g(k))continue;let _={x:k.internals.positionAbsolute.x+w,y:k.internals.positionAbsolute.y+b};s&&(_=$s(_,l));const{position:E,positionAbsolute:N}=gw({nodeId:k.id,nextPosition:_,nodeLookup:d,nodeExtent:i,nodeOrigin:m,onError:c});k.position=E,k.internals.positionAbsolute=N,p.set(k.id,k)}f(p)},[])}const Bh=T.createContext(null),j2=Bh.Provider;Bh.Consumer;const Qw=()=>T.useContext(Bh),$2=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),z2=(e,t,n)=>i=>{const{connectionClickStartHandle:s,connectionMode:l,connection:a}=i,{fromHandle:c,toHandle:f,isValid:d}=a,m=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n,connectingTo:m,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===n,isPossibleEndHandle:l===ro.Strict?(c==null?void 0:c.type)!==n:e!==(c==null?void 0:c.nodeId)||t!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!s,valid:m&&d}};function F2({type:e="source",position:t=Se.Top,isValidConnection:n,isConnectable:i=!0,isConnectableStart:s=!0,isConnectableEnd:l=!0,id:a,onConnect:c,children:f,className:d,onMouseDown:m,onTouchStart:p,...g},v){var G,q;const S=a||null,w=e==="target",b=He(),k=Qw(),{connectOnClick:_,noPanClassName:E,rfId:N}=Oe($2,Ve),{connectingFrom:A,connectingTo:L,clickConnecting:R,isPossibleEndHandle:C,connectionInProcess:P,clickConnectionInProcess:F,valid:M}=Oe(z2(k,S,e),Ve);k||(q=(G=b.getState()).onError)==null||q.call(G,"010",pn.error010());const $=J=>{const{defaultEdgeOptions:Y,onConnect:W,hasDefaultEdges:B}=b.getState(),D={...Y,...J};if(B){const{edges:H,setEdges:V,onError:K}=b.getState();V(x2(D,H,{onError:K}))}W==null||W(D),c==null||c(D)},Z=J=>{if(!k)return;const Y=Ew(J.nativeEvent);if(s&&(Y&&J.button===0||!Y)){const W=b.getState();ch.onPointerDown(J.nativeEvent,{handleDomNode:J.currentTarget,autoPanOnConnect:W.autoPanOnConnect,connectionMode:W.connectionMode,connectionRadius:W.connectionRadius,domNode:W.domNode,nodeLookup:W.nodeLookup,lib:W.lib,isTarget:w,handleId:S,nodeId:k,flowId:W.rfId,panBy:W.panBy,cancelConnection:W.cancelConnection,onConnectStart:W.onConnectStart,onConnectEnd:(...B)=>{var D,H;return(H=(D=b.getState()).onConnectEnd)==null?void 0:H.call(D,...B)},updateConnection:W.updateConnection,onConnect:$,isValidConnection:n||((...B)=>{var D,H;return((H=(D=b.getState()).isValidConnection)==null?void 0:H.call(D,...B))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:W.autoPanSpeed,dragThreshold:W.connectionDragThreshold})}Y?m==null||m(J):p==null||p(J)},j=J=>{const{onClickConnectStart:Y,onClickConnectEnd:W,connectionClickStartHandle:B,connectionMode:D,isValidConnection:H,lib:V,rfId:K,nodeLookup:Q,connection:re}=b.getState();if(!k||!B&&!s)return;if(!B){Y==null||Y(J.nativeEvent,{nodeId:k,handleId:S,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:k,type:e,id:S}});return}const se=Sw(J.target),ee=n||H,{connection:oe,isValid:de}=ch.isValid(J.nativeEvent,{handle:{nodeId:k,id:S,type:e},connectionMode:D,fromNodeId:B.nodeId,fromHandleId:B.id||null,fromType:B.type,isValidConnection:ee,flowId:K,doc:se,lib:V,nodeLookup:Q});de&&oe&&$(oe);const xe=structuredClone(re);delete xe.inProgress,xe.toPosition=xe.toHandle?xe.toHandle.position:null,W==null||W(J,xe),b.setState({connectionClickStartHandle:null})};return O.jsx("div",{"data-handleid":S,"data-nodeid":k,"data-handlepos":t,"data-id":`${N}-${k}-${S}-${e}`,className:tt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,d,{source:!w,target:w,connectable:i,connectablestart:s,connectableend:l,clickconnecting:R,connectingfrom:A,connectingto:L,valid:M,connectionindicator:i&&(!P||C)&&(P||F?l:s)}]),onMouseDown:Z,onTouchStart:Z,onClick:_?j:void 0,ref:v,...g,children:f})}const Nr=T.memo(Yw(F2));function B2({data:e,isConnectable:t,sourcePosition:n=Se.Bottom}){return O.jsxs(O.Fragment,{children:[e==null?void 0:e.label,O.jsx(Nr,{type:"source",position:n,isConnectable:t})]})}function V2({data:e,isConnectable:t,targetPosition:n=Se.Top,sourcePosition:i=Se.Bottom}){return O.jsxs(O.Fragment,{children:[O.jsx(Nr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,O.jsx(Nr,{type:"source",position:i,isConnectable:t})]})}function H2(){return null}function W2({data:e,isConnectable:t,targetPosition:n=Se.Top}){return O.jsxs(O.Fragment,{children:[O.jsx(Nr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Qa={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Hy={input:B2,default:V2,output:W2,group:H2};function U2(e){var t,n,i,s;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((i=e.style)==null?void 0:i.width),height:e.height??((s=e.style)==null?void 0:s.height)}}const q2=e=>{const{width:t,height:n,x:i,y:s}=js(e.nodeLookup,{filter:l=>!!l.selected});return{width:dn(t)?t:null,height:dn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${i}px,${s}px)`}};function Y2({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const i=He(),{width:s,height:l,transformString:a,userSelectionActive:c}=Oe(q2,Ve),f=Xw(),d=T.useRef(null);T.useEffect(()=>{var v;n||(v=d.current)==null||v.focus({preventScroll:!0})},[n]);const m=!c&&s!==null&&l!==null;if(Gw({nodeRef:d,disabled:!m}),!m)return null;const p=e?v=>{const S=i.getState().nodes.filter(w=>w.selected);e(v,S)}:void 0,g=v=>{Object.prototype.hasOwnProperty.call(Qa,v.key)&&(v.preventDefault(),f({direction:Qa[v.key],factor:v.shiftKey?4:1}))};return O.jsx("div",{className:tt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:a},children:O.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:s,height:l}})})}const Wy=typeof window<"u"?window:void 0,K2=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Jw({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:s,onPaneContextMenu:l,onPaneScroll:a,paneClickDistance:c,deleteKeyCode:f,selectionKeyCode:d,selectionOnDrag:m,selectionMode:p,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:S,panActivationKeyCode:w,zoomActivationKeyCode:b,elementsSelectable:k,zoomOnScroll:_,zoomOnPinch:E,panOnScroll:N,panOnScrollSpeed:A,panOnScrollMode:L,zoomOnDoubleClick:R,panOnDrag:C,autoPanOnSelection:P,defaultViewport:F,translateExtent:M,minZoom:$,maxZoom:Z,preventScrolling:j,onSelectionContextMenu:G,noWheelClassName:q,noPanClassName:J,disableKeyboardA11y:Y,onViewportChange:W,isControlledViewport:B}){const{nodesSelectionActive:D,userSelectionActive:H}=Oe(K2,Ve),V=Ps(d,{target:Wy}),K=Ps(w,{target:Wy}),Q=K||C,re=K||N,se=m&&Q!==!0,ee=V||H||se;return I2({deleteKeyCode:f,multiSelectionKeyCode:S}),O.jsx(A2,{onPaneContextMenu:l,elementsSelectable:k,zoomOnScroll:_,zoomOnPinch:E,panOnScroll:re,panOnScrollSpeed:A,panOnScrollMode:L,zoomOnDoubleClick:R,panOnDrag:!V&&Q,defaultViewport:F,translateExtent:M,minZoom:$,maxZoom:Z,zoomActivationKeyCode:b,preventScrolling:j,noWheelClassName:q,noPanClassName:J,onViewportChange:W,isControlledViewport:B,paneClickDistance:c,selectionOnDrag:se,children:O.jsxs(R2,{onSelectionStart:g,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:s,onPaneContextMenu:l,onPaneScroll:a,panOnDrag:Q,autoPanOnSelection:P,isSelecting:!!ee,selectionMode:p,selectionKeyPressed:V,paneClickDistance:c,selectionOnDrag:se,children:[e,D&&O.jsx(Y2,{onSelectionContextMenu:G,noPanClassName:J,disableKeyboardA11y:Y})]})})}Jw.displayName="FlowRenderer";const G2=T.memo(Jw),X2=e=>t=>e?Ah(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function Q2(e){return Oe(T.useCallback(X2(e),[e]),Ve)}const J2=e=>e.updateNodeInternals;function Z2(){const e=Oe(J2),[t]=T.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const i=new Map;n.forEach(s=>{const l=s.target.getAttribute("data-id");i.set(l,{id:l,nodeElement:s.target,force:!0})}),e(i)}));return T.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function eI({node:e,nodeType:t,hasDimensions:n,resizeObserver:i}){const s=He(),l=T.useRef(null),a=T.useRef(null),c=T.useRef(e.sourcePosition),f=T.useRef(e.targetPosition),d=T.useRef(t),m=n&&!!e.internals.handleBounds;return T.useEffect(()=>{l.current&&!e.hidden&&(!m||a.current!==l.current)&&(a.current&&(i==null||i.unobserve(a.current)),i==null||i.observe(l.current),a.current=l.current)},[m,e.hidden]),T.useEffect(()=>()=>{a.current&&(i==null||i.unobserve(a.current),a.current=null)},[]),T.useEffect(()=>{if(l.current){const p=d.current!==t,g=c.current!==e.sourcePosition,v=f.current!==e.targetPosition;(p||g||v)&&(d.current=t,c.current=e.sourcePosition,f.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:l.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),l}function tI({id:e,onClick:t,onMouseEnter:n,onMouseMove:i,onMouseLeave:s,onContextMenu:l,onDoubleClick:a,nodesDraggable:c,elementsSelectable:f,nodesConnectable:d,nodesFocusable:m,resizeObserver:p,noDragClassName:g,noPanClassName:v,disableKeyboardA11y:S,rfId:w,nodeTypes:b,nodeClickDistance:k,onError:_}){const{node:E,internals:N,isParent:A}=Oe(ee=>{const oe=ee.nodeLookup.get(e),de=ee.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:de}},Ve);let L=E.type||"default",R=(b==null?void 0:b[L])||Hy[L];R===void 0&&(_==null||_("003",pn.error003(L)),L="default",R=(b==null?void 0:b.default)||Hy.default);const C=!!(E.draggable||c&&typeof E.draggable>"u"),P=!!(E.selectable||f&&typeof E.selectable>"u"),F=!!(E.connectable||d&&typeof E.connectable>"u"),M=!!(E.focusable||m&&typeof E.focusable>"u"),$=He(),Z=xw(E),j=eI({node:E,nodeType:L,hasDimensions:Z,resizeObserver:p}),G=Gw({nodeRef:j,disabled:E.hidden||!C,noDragClassName:g,handleSelector:E.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:k}),q=Xw();if(E.hidden)return null;const J=Jn(E),Y=U2(E),W=P||C||t||n||i||s,B=n?ee=>n(ee,{...N.userNode}):void 0,D=i?ee=>i(ee,{...N.userNode}):void 0,H=s?ee=>s(ee,{...N.userNode}):void 0,V=l?ee=>l(ee,{...N.userNode}):void 0,K=a?ee=>a(ee,{...N.userNode}):void 0,Q=ee=>{const{selectNodesOnDrag:oe,nodeDragThreshold:de}=$.getState();P&&(!oe||!C||de>0)&&fh({id:e,store:$,nodeRef:j}),t&&t(ee,{...N.userNode})},re=ee=>{if(!(kw(ee.nativeEvent)||S)){if(fw.includes(ee.key)&&P){const oe=ee.key==="Escape";fh({id:e,store:$,unselect:oe,nodeRef:j})}else if(C&&E.selected&&Object.prototype.hasOwnProperty.call(Qa,ee.key)){ee.preventDefault();const{ariaLabelConfig:oe}=$.getState();$.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:ee.key.replace("Arrow","").toLowerCase(),x:~~N.positionAbsolute.x,y:~~N.positionAbsolute.y})}),q({direction:Qa[ee.key],factor:ee.shiftKey?4:1})}}},se=()=>{var ke;if(S||!((ke=j.current)!=null&&ke.matches(":focus-visible")))return;const{transform:ee,width:oe,height:de,autoPanOnNodeFocus:xe,setCenter:he}=$.getState();if(!xe)return;Ah(new Map([[e,E]]),{x:0,y:0,width:oe,height:de},ee,!0).length>0||he(E.position.x+J.width/2,E.position.y+J.height/2,{zoom:ee[2]})};return O.jsx("div",{className:tt(["react-flow__node",`react-flow__node-${L}`,{[v]:C},E.className,{selected:E.selected,selectable:P,parent:A,draggable:C,dragging:G}]),ref:j,style:{zIndex:N.z,transform:`translate(${N.positionAbsolute.x}px,${N.positionAbsolute.y}px)`,pointerEvents:W?"all":"none",visibility:Z?"visible":"hidden",...E.style,...Y},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:B,onMouseMove:D,onMouseLeave:H,onContextMenu:V,onClick:Q,onDoubleClick:K,onKeyDown:M?re:void 0,tabIndex:M?0:void 0,onFocus:M?se:void 0,role:E.ariaRole??(M?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${Hw}-${w}`,"aria-label":E.ariaLabel,...E.domAttributes,children:O.jsx(j2,{value:e,children:O.jsx(R,{id:e,data:E.data,type:L,positionAbsoluteX:N.positionAbsolute.x,positionAbsoluteY:N.positionAbsolute.y,selected:E.selected??!1,selectable:P,draggable:C,deletable:E.deletable??!0,isConnectable:F,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:G,dragHandle:E.dragHandle,zIndex:N.z,parentId:E.parentId,...J})})})}var nI=T.memo(tI);const rI=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Zw(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:s,onError:l}=Oe(rI,Ve),a=Q2(e.onlyRenderVisibleElements),c=Z2();return O.jsx("div",{className:"react-flow__nodes",style:yu,children:a.map(f=>O.jsx(nI,{id:f,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:c,nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:l},f))})}Zw.displayName="NodeRenderer";const iI=T.memo(Zw);function oI(e){return Oe(T.useCallback(n=>{if(!e)return n.edges.map(s=>s.id);const i=[];if(n.width&&n.height)for(const s of n.edges){const l=n.nodeLookup.get(s.source),a=n.nodeLookup.get(s.target);l&&a&&eC({sourceNode:l,targetNode:a,width:n.width,height:n.height,transform:n.transform})&&i.push(s.id)}return i},[e]),Ve)}const sI=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return O.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},lI=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return O.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Uy={[Ga.Arrow]:sI,[Ga.ArrowClosed]:lI};function aI(e){const t=He();return T.useMemo(()=>{var s,l;return Object.prototype.hasOwnProperty.call(Uy,e)?Uy[e]:((l=(s=t.getState()).onError)==null||l.call(s,"009",pn.error009(e)),null)},[e])}const uI=({id:e,type:t,color:n,width:i=12.5,height:s=12.5,markerUnits:l="strokeWidth",strokeWidth:a,orient:c="auto-start-reverse"})=>{const f=aI(t);return f?O.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${i}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:l,orient:c,refX:"0",refY:"0",children:O.jsx(f,{color:n,strokeWidth:a})}):null},ex=({defaultColor:e,rfId:t})=>{const n=Oe(l=>l.edges),i=Oe(l=>l.defaultEdgeOptions),s=T.useMemo(()=>aC(n,{id:t,defaultColor:e,defaultMarkerStart:i==null?void 0:i.markerStart,defaultMarkerEnd:i==null?void 0:i.markerEnd}),[n,i,t,e]);return s.length?O.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:O.jsx("defs",{children:s.map(l=>O.jsx(uI,{id:l.id,type:l.type,color:l.color,width:l.width,height:l.height,markerUnits:l.markerUnits,strokeWidth:l.strokeWidth,orient:l.orient},l.id))})}):null};ex.displayName="MarkerDefinitions";var cI=T.memo(ex);function tx({x:e,y:t,label:n,labelStyle:i,labelShowBg:s=!0,labelBgStyle:l,labelBgPadding:a=[2,4],labelBgBorderRadius:c=2,children:f,className:d,...m}){const[p,g]=T.useState({x:1,y:0,width:0,height:0}),v=tt(["react-flow__edge-textwrapper",d]),S=T.useRef(null);return T.useEffect(()=>{if(S.current){const w=S.current.getBBox();g({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?O.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:v,visibility:p.width?"visible":"hidden",...m,children:[s&&O.jsx("rect",{width:p.width+2*a[0],x:-a[0],y:-a[1],height:p.height+2*a[1],className:"react-flow__edge-textbg",style:l,rx:c,ry:c}),O.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:S,style:i,children:n}),f]}):null}tx.displayName="EdgeText";const fI=T.memo(tx);function vu({path:e,labelX:t,labelY:n,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f,interactionWidth:d=20,...m}){return O.jsxs(O.Fragment,{children:[O.jsx("path",{...m,d:e,fill:"none",className:tt(["react-flow__edge-path",m.className])}),d?O.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,i&&dn(t)&&dn(n)?O.jsx(fI,{x:t,y:n,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:a,labelBgPadding:c,labelBgBorderRadius:f}):null]})}function qy({pos:e,x1:t,y1:n,x2:i,y2:s}){return e===Se.Left||e===Se.Right?[.5*(t+i),n]:[t,.5*(n+s)]}function nx({sourceX:e,sourceY:t,sourcePosition:n=Se.Bottom,targetX:i,targetY:s,targetPosition:l=Se.Top}){const[a,c]=qy({pos:n,x1:e,y1:t,x2:i,y2:s}),[f,d]=qy({pos:l,x1:i,y1:s,x2:e,y2:t}),[m,p,g,v]=_w({sourceX:e,sourceY:t,targetX:i,targetY:s,sourceControlX:a,sourceControlY:c,targetControlX:f,targetControlY:d});return[`M${e},${t} C${a},${c} ${f},${d} ${i},${s}`,m,p,g,v]}function rx(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:s,targetY:l,sourcePosition:a,targetPosition:c,label:f,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:S,markerEnd:w,markerStart:b,interactionWidth:k})=>{const[_,E,N]=nx({sourceX:n,sourceY:i,sourcePosition:a,targetX:s,targetY:l,targetPosition:c}),A=e.isInternal?void 0:t;return O.jsx(vu,{id:A,path:_,labelX:E,labelY:N,label:f,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:S,markerEnd:w,markerStart:b,interactionWidth:k})})}const dI=rx({isInternal:!1}),ix=rx({isInternal:!0});dI.displayName="SimpleBezierEdge";ix.displayName="SimpleBezierEdgeInternal";function ox(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:s,targetY:l,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:g,sourcePosition:v=Se.Bottom,targetPosition:S=Se.Top,markerEnd:w,markerStart:b,pathOptions:k,interactionWidth:_})=>{const[E,N,A]=lh({sourceX:n,sourceY:i,sourcePosition:v,targetX:s,targetY:l,targetPosition:S,borderRadius:k==null?void 0:k.borderRadius,offset:k==null?void 0:k.offset,stepPosition:k==null?void 0:k.stepPosition}),L=e.isInternal?void 0:t;return O.jsx(vu,{id:L,path:E,labelX:N,labelY:A,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:g,markerEnd:w,markerStart:b,interactionWidth:_})})}const sx=ox({isInternal:!1}),lx=ox({isInternal:!0});sx.displayName="SmoothStepEdge";lx.displayName="SmoothStepEdgeInternal";function ax(e){return T.memo(({id:t,...n})=>{var s;const i=e.isInternal?void 0:t;return O.jsx(sx,{...n,id:i,pathOptions:T.useMemo(()=>{var l;return{borderRadius:0,offset:(l=n.pathOptions)==null?void 0:l.offset}},[(s=n.pathOptions)==null?void 0:s.offset])})})}const hI=ax({isInternal:!1}),ux=ax({isInternal:!0});hI.displayName="StepEdge";ux.displayName="StepEdgeInternal";function cx(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:s,targetY:l,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:g,markerEnd:v,markerStart:S,interactionWidth:w})=>{const[b,k,_]=Iw({sourceX:n,sourceY:i,targetX:s,targetY:l}),E=e.isInternal?void 0:t;return O.jsx(vu,{id:E,path:b,labelX:k,labelY:_,label:a,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:p,style:g,markerEnd:v,markerStart:S,interactionWidth:w})})}const pI=cx({isInternal:!1}),fx=cx({isInternal:!0});pI.displayName="StraightEdge";fx.displayName="StraightEdgeInternal";function dx(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:s,targetY:l,sourcePosition:a=Se.Bottom,targetPosition:c=Se.Top,label:f,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:S,markerEnd:w,markerStart:b,pathOptions:k,interactionWidth:_})=>{const[E,N,A]=Nw({sourceX:n,sourceY:i,sourcePosition:a,targetX:s,targetY:l,targetPosition:c,curvature:k==null?void 0:k.curvature}),L=e.isInternal?void 0:t;return O.jsx(vu,{id:L,path:E,labelX:N,labelY:A,label:f,labelStyle:d,labelShowBg:m,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:S,markerEnd:w,markerStart:b,interactionWidth:_})})}const mI=dx({isInternal:!1}),hx=dx({isInternal:!0});mI.displayName="BezierEdge";hx.displayName="BezierEdgeInternal";const Yy={default:hx,straight:fx,step:ux,smoothstep:lx,simplebezier:ix},Ky={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},gI=(e,t,n)=>n===Se.Left?e-t:n===Se.Right?e+t:e,yI=(e,t,n)=>n===Se.Top?e-t:n===Se.Bottom?e+t:e,Gy="react-flow__edgeupdater";function Xy({position:e,centerX:t,centerY:n,radius:i=10,onMouseDown:s,onMouseEnter:l,onMouseOut:a,type:c}){return O.jsx("circle",{onMouseDown:s,onMouseEnter:l,onMouseOut:a,className:tt([Gy,`${Gy}-${c}`]),cx:gI(t,i,e),cy:yI(n,i,e),r:i,stroke:"transparent",fill:"transparent"})}function vI({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:i,sourceY:s,targetX:l,targetY:a,sourcePosition:c,targetPosition:f,onReconnect:d,onReconnectStart:m,onReconnectEnd:p,setReconnecting:g,setUpdateHover:v}){const S=He(),w=(N,A)=>{if(N.button!==0)return;const{autoPanOnConnect:L,domNode:R,connectionMode:C,connectionRadius:P,lib:F,onConnectStart:M,cancelConnection:$,nodeLookup:Z,rfId:j,panBy:G,updateConnection:q}=S.getState(),J=A.type==="target",Y=(D,H)=>{g(!1),p==null||p(D,n,A.type,H)},W=D=>d==null?void 0:d(n,D),B=(D,H)=>{g(!0),m==null||m(N,n,A.type),M==null||M(D,H)};ch.onPointerDown(N.nativeEvent,{autoPanOnConnect:L,connectionMode:C,connectionRadius:P,domNode:R,handleId:A.id,nodeId:A.nodeId,nodeLookup:Z,isTarget:J,edgeUpdaterType:A.type,lib:F,flowId:j,cancelConnection:$,panBy:G,isValidConnection:(...D)=>{var H,V;return((V=(H=S.getState()).isValidConnection)==null?void 0:V.call(H,...D))??!0},onConnect:W,onConnectStart:B,onConnectEnd:(...D)=>{var H,V;return(V=(H=S.getState()).onConnectEnd)==null?void 0:V.call(H,...D)},onReconnectEnd:Y,updateConnection:q,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:N.currentTarget})},b=N=>w(N,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),k=N=>w(N,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),_=()=>v(!0),E=()=>v(!1);return O.jsxs(O.Fragment,{children:[(e===!0||e==="source")&&O.jsx(Xy,{position:c,centerX:i,centerY:s,radius:t,onMouseDown:b,onMouseEnter:_,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&O.jsx(Xy,{position:f,centerX:l,centerY:a,radius:t,onMouseDown:k,onMouseEnter:_,onMouseOut:E,type:"target"})]})}function wI({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:i,onClick:s,onDoubleClick:l,onContextMenu:a,onMouseEnter:c,onMouseMove:f,onMouseLeave:d,reconnectRadius:m,onReconnect:p,onReconnectStart:g,onReconnectEnd:v,rfId:S,edgeTypes:w,noPanClassName:b,onError:k,disableKeyboardA11y:_}){let E=Oe(he=>he.edgeLookup.get(e));const N=Oe(he=>he.defaultEdgeOptions);E=N?{...N,...E}:E;let A=E.type||"default",L=(w==null?void 0:w[A])||Yy[A];L===void 0&&(k==null||k("011",pn.error011(A)),A="default",L=(w==null?void 0:w.default)||Yy.default);const R=!!(E.focusable||t&&typeof E.focusable>"u"),C=typeof p<"u"&&(E.reconnectable||n&&typeof E.reconnectable>"u"),P=!!(E.selectable||i&&typeof E.selectable>"u"),F=T.useRef(null),[M,$]=T.useState(!1),[Z,j]=T.useState(!1),G=He(),{zIndex:q,sourceX:J,sourceY:Y,targetX:W,targetY:B,sourcePosition:D,targetPosition:H}=Oe(T.useCallback(he=>{const fe=he.nodeLookup.get(E.source),ke=he.nodeLookup.get(E.target);if(!fe||!ke)return{zIndex:E.zIndex,...Ky};const Pe=lC({id:e,sourceNode:fe,targetNode:ke,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:he.connectionMode,onError:k});return{zIndex:ZN({selected:E.selected,zIndex:E.zIndex,sourceNode:fe,targetNode:ke,elevateOnSelect:he.elevateEdgesOnSelect,zIndexMode:he.zIndexMode}),...Pe||Ky}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),Ve),V=T.useMemo(()=>E.markerStart?`url('#${ah(E.markerStart,S)}')`:void 0,[E.markerStart,S]),K=T.useMemo(()=>E.markerEnd?`url('#${ah(E.markerEnd,S)}')`:void 0,[E.markerEnd,S]);if(E.hidden||J===null||Y===null||W===null||B===null)return null;const Q=he=>{var Ae;const{addSelectedEdges:fe,unselectNodesAndEdges:ke,multiSelectionActive:Pe}=G.getState();P&&(G.setState({nodesSelectionActive:!1}),E.selected&&Pe?(ke({nodes:[],edges:[E]}),(Ae=F.current)==null||Ae.blur()):fe([e])),s&&s(he,E)},re=l?he=>{l(he,{...E})}:void 0,se=a?he=>{a(he,{...E})}:void 0,ee=c?he=>{c(he,{...E})}:void 0,oe=f?he=>{f(he,{...E})}:void 0,de=d?he=>{d(he,{...E})}:void 0,xe=he=>{var fe;if(!_&&fw.includes(he.key)&&P){const{unselectNodesAndEdges:ke,addSelectedEdges:Pe}=G.getState();he.key==="Escape"?((fe=F.current)==null||fe.blur(),ke({edges:[E]})):Pe([e])}};return O.jsx("svg",{style:{zIndex:q},children:O.jsxs("g",{className:tt(["react-flow__edge",`react-flow__edge-${A}`,E.className,b,{selected:E.selected,animated:E.animated,inactive:!P&&!s,updating:M,selectable:P}]),onClick:Q,onDoubleClick:re,onContextMenu:se,onMouseEnter:ee,onMouseMove:oe,onMouseLeave:de,onKeyDown:R?xe:void 0,tabIndex:R?0:void 0,role:E.ariaRole??(R?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":R?`${Ww}-${S}`:void 0,ref:F,...E.domAttributes,children:[!Z&&O.jsx(L,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:P,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:J,sourceY:Y,targetX:W,targetY:B,sourcePosition:D,targetPosition:H,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:V,markerEnd:K,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),C&&O.jsx(vI,{edge:E,isReconnectable:C,reconnectRadius:m,onReconnect:p,onReconnectStart:g,onReconnectEnd:v,sourceX:J,sourceY:Y,targetX:W,targetY:B,sourcePosition:D,targetPosition:H,setUpdateHover:$,setReconnecting:j})]})})}var xI=T.memo(wI);const bI=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function px({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:i,noPanClassName:s,onReconnect:l,onEdgeContextMenu:a,onEdgeMouseEnter:c,onEdgeMouseMove:f,onEdgeMouseLeave:d,onEdgeClick:m,reconnectRadius:p,onEdgeDoubleClick:g,onReconnectStart:v,onReconnectEnd:S,disableKeyboardA11y:w}){const{edgesFocusable:b,edgesReconnectable:k,elementsSelectable:_,onError:E}=Oe(bI,Ve),N=oI(t);return O.jsxs("div",{className:"react-flow__edges",children:[O.jsx(cI,{defaultColor:e,rfId:n}),N.map(A=>O.jsx(xI,{id:A,edgesFocusable:b,edgesReconnectable:k,elementsSelectable:_,noPanClassName:s,onReconnect:l,onContextMenu:a,onMouseEnter:c,onMouseMove:f,onMouseLeave:d,onClick:m,reconnectRadius:p,onDoubleClick:g,onReconnectStart:v,onReconnectEnd:S,rfId:n,onError:E,edgeTypes:i,disableKeyboardA11y:w},A))]})}px.displayName="EdgeRenderer";const SI=T.memo(px),kI=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function EI({children:e}){const t=Oe(kI);return O.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function _I(e){const t=Fh(),n=T.useRef(!1);T.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const NI=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function CI(e){const t=Oe(NI),n=He();return T.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function II(e){return e.connection.inProgress?{...e.connection,to:po(e.connection.to,e.transform)}:{...e.connection}}function TI(e){return II}function PI(e){const t=TI();return Oe(t,Ve)}const AI=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function OI({containerStyle:e,style:t,type:n,component:i}){const{nodesConnectable:s,width:l,height:a,isValid:c,inProgress:f}=Oe(AI,Ve);return!(l&&s&&f)?null:O.jsx("svg",{style:e,width:l,height:a,className:"react-flow__connectionline react-flow__container",children:O.jsx("g",{className:tt(["react-flow__connection",pw(c)]),children:O.jsx(mx,{style:t,type:n,CustomComponent:i,isValid:c})})})}const mx=({style:e,type:t=_r.Bezier,CustomComponent:n,isValid:i})=>{const{inProgress:s,from:l,fromNode:a,fromHandle:c,fromPosition:f,to:d,toNode:m,toHandle:p,toPosition:g,pointer:v}=PI();if(!s)return;if(n)return O.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:a,fromHandle:c,fromX:l.x,fromY:l.y,toX:d.x,toY:d.y,fromPosition:f,toPosition:g,connectionStatus:pw(i),toNode:m,toHandle:p,pointer:v});let S="";const w={sourceX:l.x,sourceY:l.y,sourcePosition:f,targetX:d.x,targetY:d.y,targetPosition:g};switch(t){case _r.Bezier:[S]=Nw(w);break;case _r.SimpleBezier:[S]=nx(w);break;case _r.Step:[S]=lh({...w,borderRadius:0});break;case _r.SmoothStep:[S]=lh(w);break;default:[S]=Iw(w)}return O.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:e})};mx.displayName="ConnectionLine";const LI={};function Qy(e=LI){T.useRef(e),He(),T.useEffect(()=>{},[e])}function MI(){He(),T.useRef(!1),T.useEffect(()=>{},[])}function gx({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:i,onEdgeClick:s,onNodeDoubleClick:l,onEdgeDoubleClick:a,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:m,onSelectionContextMenu:p,onSelectionStart:g,onSelectionEnd:v,connectionLineType:S,connectionLineStyle:w,connectionLineComponent:b,connectionLineContainerStyle:k,selectionKeyCode:_,selectionOnDrag:E,selectionMode:N,multiSelectionKeyCode:A,panActivationKeyCode:L,zoomActivationKeyCode:R,deleteKeyCode:C,onlyRenderVisibleElements:P,elementsSelectable:F,defaultViewport:M,translateExtent:$,minZoom:Z,maxZoom:j,preventScrolling:G,defaultMarkerColor:q,zoomOnScroll:J,zoomOnPinch:Y,panOnScroll:W,panOnScrollSpeed:B,panOnScrollMode:D,zoomOnDoubleClick:H,panOnDrag:V,autoPanOnSelection:K,onPaneClick:Q,onPaneMouseEnter:re,onPaneMouseMove:se,onPaneMouseLeave:ee,onPaneScroll:oe,onPaneContextMenu:de,paneClickDistance:xe,nodeClickDistance:he,onEdgeContextMenu:fe,onEdgeMouseEnter:ke,onEdgeMouseMove:Pe,onEdgeMouseLeave:Ae,reconnectRadius:$e,onReconnect:yt,onReconnectStart:kt,onReconnectEnd:ft,noDragClassName:dt,noWheelClassName:Mn,noPanClassName:wn,disableKeyboardA11y:xn,nodeExtent:Et,rfId:Ht,viewport:Lt,onViewportChange:Wt}){return Qy(e),Qy(t),MI(),_I(n),CI(Lt),O.jsx(G2,{onPaneClick:Q,onPaneMouseEnter:re,onPaneMouseMove:se,onPaneMouseLeave:ee,onPaneContextMenu:de,onPaneScroll:oe,paneClickDistance:xe,deleteKeyCode:C,selectionKeyCode:_,selectionOnDrag:E,selectionMode:N,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:A,panActivationKeyCode:L,zoomActivationKeyCode:R,elementsSelectable:F,zoomOnScroll:J,zoomOnPinch:Y,zoomOnDoubleClick:H,panOnScroll:W,panOnScrollSpeed:B,panOnScrollMode:D,panOnDrag:V,autoPanOnSelection:K,defaultViewport:M,translateExtent:$,minZoom:Z,maxZoom:j,onSelectionContextMenu:p,preventScrolling:G,noDragClassName:dt,noWheelClassName:Mn,noPanClassName:wn,disableKeyboardA11y:xn,onViewportChange:Wt,isControlledViewport:!!Lt,children:O.jsxs(EI,{children:[O.jsx(SI,{edgeTypes:t,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:yt,onReconnectStart:kt,onReconnectEnd:ft,onlyRenderVisibleElements:P,onEdgeContextMenu:fe,onEdgeMouseEnter:ke,onEdgeMouseMove:Pe,onEdgeMouseLeave:Ae,reconnectRadius:$e,defaultMarkerColor:q,noPanClassName:wn,disableKeyboardA11y:xn,rfId:Ht}),O.jsx(OI,{style:w,type:S,component:b,containerStyle:k}),O.jsx("div",{className:"react-flow__edgelabel-renderer"}),O.jsx(iI,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:m,nodeClickDistance:he,onlyRenderVisibleElements:P,noPanClassName:wn,noDragClassName:dt,disableKeyboardA11y:xn,nodeExtent:Et,rfId:Ht}),O.jsx("div",{className:"react-flow__viewport-portal"})]})})}gx.displayName="GraphView";const RI=T.memo(gx),DI=ww(),Jy=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:s,height:l,fitView:a,fitViewOptions:c,minZoom:f=.5,maxZoom:d=2,nodeOrigin:m,nodeExtent:p,zIndexMode:g="basic"}={})=>{const v=new Map,S=new Map,w=new Map,b=new Map,k=i??t??[],_=n??e??[],E=m??[0,0],N=p??Ns;Aw(w,b,k);const{nodesInitialized:A}=uh(_,v,S,{nodeOrigin:E,nodeExtent:N,zIndexMode:g});let L=[0,0,1];if(a&&s&&l){const R=js(v,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:C,y:P,zoom:F}=Lh(R,s,l,f,d,(c==null?void 0:c.padding)??.1);L=[C,P,F]}return{rfId:"1",width:s??0,height:l??0,transform:L,nodes:_,nodesInitialized:A,nodeLookup:v,parentLookup:S,edges:k,edgeLookup:b,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:f,maxZoom:d,translateExtent:Ns,nodeExtent:N,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ro.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:a??!1,fitViewOptions:c,fitViewResolver:null,connection:{...hw},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:DI,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:dw,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},jI=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:s,height:l,fitView:a,fitViewOptions:c,minZoom:f,maxZoom:d,nodeOrigin:m,nodeExtent:p,zIndexMode:g})=>XC((v,S)=>{async function w(){const{nodeLookup:b,panZoom:k,fitViewOptions:_,fitViewResolver:E,width:N,height:A,minZoom:L,maxZoom:R}=S();k&&(await qN({nodes:b,width:N,height:A,panZoom:k,minZoom:L,maxZoom:R},_),E==null||E.resolve(!0),v({fitViewResolver:null}))}return{...Jy({nodes:e,edges:t,width:s,height:l,fitView:a,fitViewOptions:c,minZoom:f,maxZoom:d,nodeOrigin:m,nodeExtent:p,defaultNodes:n,defaultEdges:i,zIndexMode:g}),setNodes:b=>{const{nodeLookup:k,parentLookup:_,nodeOrigin:E,elevateNodesOnSelect:N,fitViewQueued:A,zIndexMode:L,nodesSelectionActive:R}=S(),{nodesInitialized:C,hasSelectedNodes:P}=uh(b,k,_,{nodeOrigin:E,nodeExtent:p,elevateNodesOnSelect:N,checkEquality:!0,zIndexMode:L}),F=R&&P;A&&C?(w(),v({nodes:b,nodesInitialized:C,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:F})):v({nodes:b,nodesInitialized:C,nodesSelectionActive:F})},setEdges:b=>{const{connectionLookup:k,edgeLookup:_}=S();Aw(k,_,b),v({edges:b})},setDefaultNodesAndEdges:(b,k)=>{if(b){const{setNodes:_}=S();_(b),v({hasDefaultNodes:!0})}if(k){const{setEdges:_}=S();_(k),v({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:k,nodeLookup:_,parentLookup:E,domNode:N,nodeOrigin:A,nodeExtent:L,debug:R,fitViewQueued:C,zIndexMode:P}=S(),{changes:F,updatedInternals:M}=mC(b,_,E,N,A,L,P);M&&(fC(_,E,{nodeOrigin:A,nodeExtent:L,zIndexMode:P}),C?(w(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),(F==null?void 0:F.length)>0&&(R&&console.log("React Flow: trigger node changes",F),k==null||k(F)))},updateNodePositions:(b,k=!1)=>{const _=[];let E=[];const{nodeLookup:N,triggerNodeChanges:A,connection:L,updateConnection:R,onNodesChangeMiddlewareMap:C}=S();for(const[P,F]of b){const M=N.get(P),$=!!(M!=null&&M.expandParent&&(M!=null&&M.parentId)&&(F!=null&&F.position)),Z={id:P,type:"position",position:$?{x:Math.max(0,F.position.x),y:Math.max(0,F.position.y)}:F.position,dragging:k};if(M&&L.inProgress&&L.fromNode.id===M.id){const j=li(M,L.fromHandle,Se.Left,!0);R({...L,from:j})}$&&M.parentId&&_.push({id:P,parentId:M.parentId,rect:{...F.internals.positionAbsolute,width:F.measured.width??0,height:F.measured.height??0}}),E.push(Z)}if(_.length>0){const{parentLookup:P,nodeOrigin:F}=S(),M=zh(_,N,P,F);E.push(...M)}for(const P of C.values())E=P(E);A(E)},triggerNodeChanges:b=>{const{onNodesChange:k,setNodes:_,nodes:E,hasDefaultNodes:N,debug:A}=S();if(b!=null&&b.length){if(N){const L=y2(b,E);_(L)}A&&console.log("React Flow: trigger node changes",b),k==null||k(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:k,setEdges:_,edges:E,hasDefaultEdges:N,debug:A}=S();if(b!=null&&b.length){if(N){const L=v2(b,E);_(L)}A&&console.log("React Flow: trigger edge changes",b),k==null||k(b)}},addSelectedNodes:b=>{const{multiSelectionActive:k,edgeLookup:_,nodeLookup:E,triggerNodeChanges:N,triggerEdgeChanges:A}=S();if(k){const L=b.map(R=>Xr(R,!0));N(L);return}N(qi(E,new Set([...b]),!0)),A(qi(_))},addSelectedEdges:b=>{const{multiSelectionActive:k,edgeLookup:_,nodeLookup:E,triggerNodeChanges:N,triggerEdgeChanges:A}=S();if(k){const L=b.map(R=>Xr(R,!0));A(L);return}A(qi(_,new Set([...b]))),N(qi(E,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:k}={})=>{const{edges:_,nodes:E,nodeLookup:N,triggerNodeChanges:A,triggerEdgeChanges:L}=S(),R=b||E,C=k||_,P=[];for(const M of R){if(!M.selected)continue;const $=N.get(M.id);$&&($.selected=!1),P.push(Xr(M.id,!1))}const F=[];for(const M of C)M.selected&&F.push(Xr(M.id,!1));A(P),L(F)},setMinZoom:b=>{const{panZoom:k,maxZoom:_}=S();k==null||k.setScaleExtent([b,_]),v({minZoom:b})},setMaxZoom:b=>{const{panZoom:k,minZoom:_}=S();k==null||k.setScaleExtent([_,b]),v({maxZoom:b})},setTranslateExtent:b=>{var k;(k=S().panZoom)==null||k.setTranslateExtent(b),v({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:k,triggerNodeChanges:_,triggerEdgeChanges:E,elementsSelectable:N}=S();if(!N)return;const A=k.reduce((R,C)=>C.selected?[...R,Xr(C.id,!1)]:R,[]),L=b.reduce((R,C)=>C.selected?[...R,Xr(C.id,!1)]:R,[]);_(A),E(L)},setNodeExtent:b=>{const{nodes:k,nodeLookup:_,parentLookup:E,nodeOrigin:N,elevateNodesOnSelect:A,nodeExtent:L,zIndexMode:R}=S();b[0][0]===L[0][0]&&b[0][1]===L[0][1]&&b[1][0]===L[1][0]&&b[1][1]===L[1][1]||(uh(k,_,E,{nodeOrigin:N,nodeExtent:b,elevateNodesOnSelect:A,checkEquality:!1,zIndexMode:R}),v({nodeExtent:b}))},panBy:b=>{const{transform:k,width:_,height:E,panZoom:N,translateExtent:A}=S();return gC({delta:b,panZoom:N,transform:k,translateExtent:A,width:_,height:E})},setCenter:async(b,k,_)=>{const{width:E,height:N,maxZoom:A,panZoom:L}=S();if(!L)return!1;const R=typeof(_==null?void 0:_.zoom)<"u"?_.zoom:A;return await L.setViewport({x:E/2-b*R,y:N/2-k*R,zoom:R},{duration:_==null?void 0:_.duration,ease:_==null?void 0:_.ease,interpolate:_==null?void 0:_.interpolate}),!0},cancelConnection:()=>{v({connection:{...hw}})},updateConnection:b=>{v({connection:b})},reset:()=>v({...Jy()})}},Object.is);function yx({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:i,initialWidth:s,initialHeight:l,initialMinZoom:a,initialMaxZoom:c,initialFitViewOptions:f,fitView:d,nodeOrigin:m,nodeExtent:p,zIndexMode:g,children:v}){const[S]=T.useState(()=>jI({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:s,height:l,fitView:d,minZoom:a,maxZoom:c,fitViewOptions:f,nodeOrigin:m,nodeExtent:p,zIndexMode:g}));return O.jsx(QC,{value:S,children:O.jsx(E2,{children:v})})}function $I({children:e,nodes:t,edges:n,defaultNodes:i,defaultEdges:s,width:l,height:a,fitView:c,fitViewOptions:f,minZoom:d,maxZoom:m,nodeOrigin:p,nodeExtent:g,zIndexMode:v}){return T.useContext(mu)?O.jsx(O.Fragment,{children:e}):O.jsx(yx,{initialNodes:t,initialEdges:n,defaultNodes:i,defaultEdges:s,initialWidth:l,initialHeight:a,fitView:c,initialFitViewOptions:f,initialMinZoom:d,initialMaxZoom:m,nodeOrigin:p,nodeExtent:g,zIndexMode:v,children:e})}const zI={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function FI({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,className:s,nodeTypes:l,edgeTypes:a,onNodeClick:c,onEdgeClick:f,onInit:d,onMove:m,onMoveStart:p,onMoveEnd:g,onConnect:v,onConnectStart:S,onConnectEnd:w,onClickConnectStart:b,onClickConnectEnd:k,onNodeMouseEnter:_,onNodeMouseMove:E,onNodeMouseLeave:N,onNodeContextMenu:A,onNodeDoubleClick:L,onNodeDragStart:R,onNodeDrag:C,onNodeDragStop:P,onNodesDelete:F,onEdgesDelete:M,onDelete:$,onSelectionChange:Z,onSelectionDragStart:j,onSelectionDrag:G,onSelectionDragStop:q,onSelectionContextMenu:J,onSelectionStart:Y,onSelectionEnd:W,onBeforeDelete:B,connectionMode:D,connectionLineType:H=_r.Bezier,connectionLineStyle:V,connectionLineComponent:K,connectionLineContainerStyle:Q,deleteKeyCode:re="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:ee=!1,selectionMode:oe=Cs.Full,panActivationKeyCode:de="Space",multiSelectionKeyCode:xe=Ts()?"Meta":"Control",zoomActivationKeyCode:he=Ts()?"Meta":"Control",snapToGrid:fe,snapGrid:ke,onlyRenderVisibleElements:Pe=!1,selectNodesOnDrag:Ae,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:kt,nodesFocusable:ft,nodeOrigin:dt=Uw,edgesFocusable:Mn,edgesReconnectable:wn,elementsSelectable:xn=!0,defaultViewport:Et=c2,minZoom:Ht=.5,maxZoom:Lt=2,translateExtent:Wt=Ns,preventScrolling:Hs=!0,nodeExtent:Rn,defaultMarkerColor:Pr="#b1b1b7",zoomOnScroll:Lu=!0,zoomOnPinch:Ws=!0,panOnScroll:Us=!1,panOnScrollSpeed:Mu=.5,panOnScrollMode:xo=ni.Free,zoomOnDoubleClick:bo=!0,panOnDrag:So=!0,onPaneClick:ko,onPaneMouseEnter:Eo,onPaneMouseMove:Zn,onPaneMouseLeave:er,onPaneScroll:qs,onPaneContextMenu:Ys,paneClickDistance:Ks=1,nodeClickDistance:Gs=0,children:Xs,onReconnect:_o,onReconnectStart:Qs,onReconnectEnd:Ar,onEdgeContextMenu:No,onEdgeDoubleClick:Or,onEdgeMouseEnter:Ru,onEdgeMouseMove:Lr,onEdgeMouseLeave:ci,reconnectRadius:fi=10,onNodesChange:Co,onEdgesChange:Du,noDragClassName:ju="nodrag",noWheelClassName:$u="nowheel",noPanClassName:bn="nopan",fitView:Io,fitViewOptions:To,connectOnClick:zu,attributionPosition:Js,proOptions:Zs,defaultEdgeOptions:el,elevateNodesOnSelect:tl=!0,elevateEdgesOnSelect:Fu=!1,disableKeyboardA11y:nl=!1,autoPanOnConnect:We,autoPanOnNodeDrag:Bu,autoPanOnSelection:Po=!0,autoPanSpeed:rl,connectionRadius:di,isValidConnection:Vu,onError:il,style:hi,id:Mt,nodeDragThreshold:Hu,connectionDragThreshold:Rt,viewport:Wu,onViewportChange:Uu,width:qu,height:pi,colorMode:mi="light",debug:Mr,onScroll:Dn,ariaLabelConfig:Yu,zIndexMode:ol="basic",...Ao},sl){const Rr=Mt||"1",Dr=p2(mi),Ku=T.useCallback(gi=>{gi.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Dn==null||Dn(gi)},[Dn]);return O.jsx("div",{"data-testid":"rf__wrapper",...Ao,onScroll:Ku,style:{...hi,...zI},ref:sl,className:tt(["react-flow",s,Dr]),id:Mt,role:"application",children:O.jsxs($I,{nodes:e,edges:t,width:qu,height:pi,fitView:Io,fitViewOptions:To,minZoom:Ht,maxZoom:Lt,nodeOrigin:dt,nodeExtent:Rn,zIndexMode:ol,children:[O.jsx(h2,{nodes:e,edges:t,defaultNodes:n,defaultEdges:i,onConnect:v,onConnectStart:S,onConnectEnd:w,onClickConnectStart:b,onClickConnectEnd:k,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:kt,nodesFocusable:ft,edgesFocusable:Mn,edgesReconnectable:wn,elementsSelectable:xn,elevateNodesOnSelect:tl,elevateEdgesOnSelect:Fu,minZoom:Ht,maxZoom:Lt,nodeExtent:Rn,onNodesChange:Co,onEdgesChange:Du,snapToGrid:fe,snapGrid:ke,connectionMode:D,translateExtent:Wt,connectOnClick:zu,defaultEdgeOptions:el,fitView:Io,fitViewOptions:To,onNodesDelete:F,onEdgesDelete:M,onDelete:$,onNodeDragStart:R,onNodeDrag:C,onNodeDragStop:P,onSelectionDrag:G,onSelectionDragStart:j,onSelectionDragStop:q,onMove:m,onMoveStart:p,onMoveEnd:g,noPanClassName:bn,nodeOrigin:dt,rfId:Rr,autoPanOnConnect:We,autoPanOnNodeDrag:Bu,autoPanSpeed:rl,onError:il,connectionRadius:di,isValidConnection:Vu,selectNodesOnDrag:Ae,nodeDragThreshold:Hu,connectionDragThreshold:Rt,onBeforeDelete:B,debug:Mr,ariaLabelConfig:Yu,zIndexMode:ol}),O.jsx(RI,{onInit:d,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:_,onNodeMouseMove:E,onNodeMouseLeave:N,onNodeContextMenu:A,onNodeDoubleClick:L,nodeTypes:l,edgeTypes:a,connectionLineType:H,connectionLineStyle:V,connectionLineComponent:K,connectionLineContainerStyle:Q,selectionKeyCode:se,selectionOnDrag:ee,selectionMode:oe,deleteKeyCode:re,multiSelectionKeyCode:xe,panActivationKeyCode:de,zoomActivationKeyCode:he,onlyRenderVisibleElements:Pe,defaultViewport:Et,translateExtent:Wt,minZoom:Ht,maxZoom:Lt,preventScrolling:Hs,zoomOnScroll:Lu,zoomOnPinch:Ws,zoomOnDoubleClick:bo,panOnScroll:Us,panOnScrollSpeed:Mu,panOnScrollMode:xo,panOnDrag:So,autoPanOnSelection:Po,onPaneClick:ko,onPaneMouseEnter:Eo,onPaneMouseMove:Zn,onPaneMouseLeave:er,onPaneScroll:qs,onPaneContextMenu:Ys,paneClickDistance:Ks,nodeClickDistance:Gs,onSelectionContextMenu:J,onSelectionStart:Y,onSelectionEnd:W,onReconnect:_o,onReconnectStart:Qs,onReconnectEnd:Ar,onEdgeContextMenu:No,onEdgeDoubleClick:Or,onEdgeMouseEnter:Ru,onEdgeMouseMove:Lr,onEdgeMouseLeave:ci,reconnectRadius:fi,defaultMarkerColor:Pr,noDragClassName:ju,noWheelClassName:$u,noPanClassName:bn,rfId:Rr,disableKeyboardA11y:nl,nodeExtent:Rn,viewport:Wu,onViewportChange:Uu}),O.jsx(u2,{onSelectionChange:Z}),Xs,O.jsx(i2,{proOptions:Zs,position:Js}),O.jsx(r2,{rfId:Rr,disableKeyboardA11y:nl})]})})}var BI=Yw(FI);function VI({dimensions:e,lineWidth:t,variant:n,className:i}){return O.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:tt(["react-flow__background-pattern",n,i])})}function HI({radius:e,className:t}){return O.jsx("circle",{cx:e,cy:e,r:e,className:tt(["react-flow__background-pattern","dots",t])})}var Gn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Gn||(Gn={}));const WI={[Gn.Dots]:1,[Gn.Lines]:1,[Gn.Cross]:6},UI=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function vx({id:e,variant:t=Gn.Dots,gap:n=20,size:i,lineWidth:s=1,offset:l=0,color:a,bgColor:c,style:f,className:d,patternClassName:m}){const p=T.useRef(null),{transform:g,patternId:v}=Oe(UI,Ve),S=i||WI[t],w=t===Gn.Dots,b=t===Gn.Cross,k=Array.isArray(n)?n:[n,n],_=[k[0]*g[2]||1,k[1]*g[2]||1],E=S*g[2],N=Array.isArray(l)?l:[l,l],A=b?[E,E]:_,L=[N[0]*g[2]||1+A[0]/2,N[1]*g[2]||1+A[1]/2],R=`${v}${e||""}`;return O.jsxs("svg",{className:tt(["react-flow__background",d]),style:{...f,...yu,"--xy-background-color-props":c,"--xy-background-pattern-color-props":a},ref:p,"data-testid":"rf__background",children:[O.jsx("pattern",{id:R,x:g[0]%_[0],y:g[1]%_[1],width:_[0],height:_[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${L[0]},-${L[1]})`,children:w?O.jsx(HI,{radius:E/2,className:m}):O.jsx(VI,{dimensions:A,lineWidth:s,variant:t,className:m})}),O.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${R})`})]})}vx.displayName="Background";const qI=T.memo(vx);function YI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:O.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function KI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:O.jsx("path",{d:"M0 0h32v4.2H0z"})})}function GI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:O.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 XI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:O.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 QI(){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:O.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 ga({children:e,className:t,...n}){return O.jsx("button",{type:"button",className:tt(["react-flow__controls-button",t]),...n,children:e})}const JI=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function wx({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:i=!0,fitViewOptions:s,onZoomIn:l,onZoomOut:a,onFitView:c,onInteractiveChange:f,className:d,children:m,position:p="bottom-left",orientation:g="vertical","aria-label":v}){const S=He(),{isInteractive:w,minZoomReached:b,maxZoomReached:k,ariaLabelConfig:_}=Oe(JI,Ve),{zoomIn:E,zoomOut:N,fitView:A}=Fh(),L=()=>{E(),l==null||l()},R=()=>{N(),a==null||a()},C=()=>{A(s),c==null||c()},P=()=>{S.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),f==null||f(!w)},F=g==="horizontal"?"horizontal":"vertical";return O.jsxs(gu,{className:tt(["react-flow__controls",F,d]),position:p,style:e,"data-testid":"rf__controls","aria-label":v??_["controls.ariaLabel"],children:[t&&O.jsxs(O.Fragment,{children:[O.jsx(ga,{onClick:L,className:"react-flow__controls-zoomin",title:_["controls.zoomIn.ariaLabel"],"aria-label":_["controls.zoomIn.ariaLabel"],disabled:k,children:O.jsx(YI,{})}),O.jsx(ga,{onClick:R,className:"react-flow__controls-zoomout",title:_["controls.zoomOut.ariaLabel"],"aria-label":_["controls.zoomOut.ariaLabel"],disabled:b,children:O.jsx(KI,{})})]}),n&&O.jsx(ga,{className:"react-flow__controls-fitview",onClick:C,title:_["controls.fitView.ariaLabel"],"aria-label":_["controls.fitView.ariaLabel"],children:O.jsx(GI,{})}),i&&O.jsx(ga,{className:"react-flow__controls-interactive",onClick:P,title:_["controls.interactive.ariaLabel"],"aria-label":_["controls.interactive.ariaLabel"],children:w?O.jsx(QI,{}):O.jsx(XI,{})}),m]})}wx.displayName="Controls";const ZI=T.memo(wx);function eT({id:e,x:t,y:n,width:i,height:s,style:l,color:a,strokeColor:c,strokeWidth:f,className:d,borderRadius:m,shapeRendering:p,selected:g,onClick:v}){const{background:S,backgroundColor:w}=l||{},b=a||S||w;return O.jsx("rect",{className:tt(["react-flow__minimap-node",{selected:g},d]),x:t,y:n,rx:m,ry:m,width:i,height:s,style:{fill:b,stroke:c,strokeWidth:f},shapeRendering:p,onClick:v?k=>v(k,e):void 0})}const tT=T.memo(eT),nT=e=>e.nodes.map(t=>t.id),Hf=e=>e instanceof Function?e:()=>e;function rT({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l=tT,onClick:a}){const c=Oe(nT,Ve),f=Hf(t),d=Hf(e),m=Hf(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return O.jsx(O.Fragment,{children:c.map(g=>O.jsx(oT,{id:g,nodeColorFunc:f,nodeStrokeColorFunc:d,nodeClassNameFunc:m,nodeBorderRadius:i,nodeStrokeWidth:s,NodeComponent:l,onClick:a,shapeRendering:p},g))})}function iT({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:i,nodeBorderRadius:s,nodeStrokeWidth:l,shapeRendering:a,NodeComponent:c,onClick:f}){const{node:d,x:m,y:p,width:g,height:v}=Oe(S=>{const w=S.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const b=w.internals.userNode,{x:k,y:_}=w.internals.positionAbsolute,{width:E,height:N}=Jn(b);return{node:b,x:k,y:_,width:E,height:N}},Ve);return!d||d.hidden||!xw(d)?null:O.jsx(c,{x:m,y:p,width:g,height:v,style:d.style,selected:!!d.selected,className:i(d),color:t(d),borderRadius:s,strokeColor:n(d),strokeWidth:l,shapeRendering:a,onClick:f,id:d.id})}const oT=T.memo(iT);var sT=T.memo(rT);const lT=200,aT=150,uT=e=>!e.hidden,cT=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?vw(js(e.nodeLookup,{filter:uT}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},fT="react-flow__minimap-desc";function xx({style:e,className:t,nodeStrokeColor:n,nodeColor:i,nodeClassName:s="",nodeBorderRadius:l=5,nodeStrokeWidth:a,nodeComponent:c,bgColor:f,maskColor:d,maskStrokeColor:m,maskStrokeWidth:p,position:g="bottom-right",onClick:v,onNodeClick:S,pannable:w=!1,zoomable:b=!1,ariaLabel:k,inversePan:_,zoomStep:E=1,offsetScale:N=5}){const A=He(),L=T.useRef(null),{boundingRect:R,viewBB:C,rfId:P,panZoom:F,translateExtent:M,flowWidth:$,flowHeight:Z,ariaLabelConfig:j}=Oe(cT,Ve),G=(e==null?void 0:e.width)??lT,q=(e==null?void 0:e.height)??aT,J=R.width/G,Y=R.height/q,W=Math.max(J,Y),B=W*G,D=W*q,H=N*W,V=R.x-(B-R.width)/2-H,K=R.y-(D-R.height)/2-H,Q=B+H*2,re=D+H*2,se=`${fT}-${P}`,ee=T.useRef(0),oe=T.useRef();ee.current=W,T.useEffect(()=>{if(L.current&&F)return oe.current=_C({domNode:L.current,panZoom:F,getTransform:()=>A.getState().transform,getViewScale:()=>ee.current}),()=>{var fe;(fe=oe.current)==null||fe.destroy()}},[F]),T.useEffect(()=>{var fe;(fe=oe.current)==null||fe.update({translateExtent:M,width:$,height:Z,inversePan:_,pannable:w,zoomStep:E,zoomable:b})},[w,b,_,E,M,$,Z]);const de=v?fe=>{var Ae;const[ke,Pe]=((Ae=oe.current)==null?void 0:Ae.pointer(fe))||[0,0];v(fe,{x:ke,y:Pe})}:void 0,xe=S?T.useCallback((fe,ke)=>{const Pe=A.getState().nodeLookup.get(ke).internals.userNode;S(fe,Pe)},[]):void 0,he=k??j["minimap.ariaLabel"];return O.jsx(gu,{position:g,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*W:void 0,"--xy-minimap-node-background-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:tt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:O.jsxs("svg",{width:G,height:q,viewBox:`${V} ${K} ${Q} ${re}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:L,onClick:de,children:[he&&O.jsx("title",{id:se,children:he}),O.jsx(sT,{onClick:xe,nodeColor:i,nodeStrokeColor:n,nodeBorderRadius:l,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:c}),O.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-H},${K-H}h${Q+H*2}v${re+H*2}h${-Q-H*2}z
|
|
62
|
+
M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}xx.displayName="MiniMap";T.memo(xx);const dT=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,hT={[lo.Line]:"right",[lo.Handle]:"bottom-right"};function pT({nodeId:e,position:t,variant:n=lo.Handle,className:i,style:s=void 0,children:l,color:a,minWidth:c=10,minHeight:f=10,maxWidth:d=Number.MAX_VALUE,maxHeight:m=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:g,autoScale:v=!0,shouldResize:S,onResizeStart:w,onResize:b,onResizeEnd:k}){const _=Qw(),E=typeof e=="string"?e:_,N=He(),A=T.useRef(null),L=n===lo.Handle,R=Oe(T.useCallback(dT(L&&v),[L,v]),Ve),C=T.useRef(null),P=t??hT[n];T.useEffect(()=>{if(!(!A.current||!E))return C.current||(C.current=$C({domNode:A.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:M,transform:$,snapGrid:Z,snapToGrid:j,nodeOrigin:G,domNode:q}=N.getState();return{nodeLookup:M,transform:$,snapGrid:Z,snapToGrid:j,nodeOrigin:G,paneDomNode:q}},onChange:(M,$)=>{const{triggerNodeChanges:Z,nodeLookup:j,parentLookup:G,nodeOrigin:q}=N.getState(),J=[],Y={x:M.x,y:M.y},W=j.get(E);if(W&&W.expandParent&&W.parentId){const B=W.origin??q,D=M.width??W.measured.width??0,H=M.height??W.measured.height??0,V={id:W.id,parentId:W.parentId,rect:{width:D,height:H,...bw({x:M.x??W.position.x,y:M.y??W.position.y},{width:D,height:H},W.parentId,j,B)}},K=zh([V],j,G,q);J.push(...K),Y.x=M.x?Math.max(B[0]*D,M.x):void 0,Y.y=M.y?Math.max(B[1]*H,M.y):void 0}if(Y.x!==void 0&&Y.y!==void 0){const B={id:E,type:"position",position:{...Y}};J.push(B)}if(M.width!==void 0&&M.height!==void 0){const D={id:E,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:M.width,height:M.height}};J.push(D)}for(const B of $){const D={...B,type:"position"};J.push(D)}Z(J)},onEnd:({width:M,height:$})=>{const Z={id:E,type:"dimensions",resizing:!1,dimensions:{width:M,height:$}};N.getState().triggerNodeChanges([Z])}})),C.current.update({controlPosition:P,boundaries:{minWidth:c,minHeight:f,maxWidth:d,maxHeight:m},keepAspectRatio:p,resizeDirection:g,onResizeStart:w,onResize:b,onResizeEnd:k,shouldResize:S}),()=>{var M;(M=C.current)==null||M.destroy()}},[P,c,f,d,m,p,w,b,k,S]);const F=P.split("-");return O.jsx("div",{className:tt(["react-flow__resize-control","nodrag",...F,n,i]),ref:A,style:{...s,scale:R,...a&&{[L?"backgroundColor":"borderColor"]:a}},children:l})}T.memo(pT);function bx(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=bx(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Sx(){for(var e,t,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=bx(e))&&(i&&(i+=" "),i+=t);return i}const mT=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},gT=(e,t)=>({classGroupId:e,validator:t}),kx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ja="-",Zy=[],yT="arbitrary..",vT=e=>{const t=xT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return wT(a);const c=a.split(Ja),f=c[0]===""&&c.length>1?1:0;return Ex(c,f,t)},getConflictingClassGroupIds:(a,c)=>{if(c){const f=i[a],d=n[a];return f?d?mT(d,f):f:d||Zy}return n[a]||Zy}}},Ex=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],l=n.nextPart.get(s);if(l){const d=Ex(e,t+1,l);if(d)return d}const a=n.validators;if(a===null)return;const c=t===0?e.join(Ja):e.slice(t).join(Ja),f=a.length;for(let d=0;d<f;d++){const m=a[d];if(m.validator(c))return m.classGroupId}},wT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?yT+i:void 0})(),xT=e=>{const{theme:t,classGroups:n}=e;return bT(n,t)},bT=(e,t)=>{const n=kx();for(const i in e){const s=e[i];Vh(s,n,i,t)}return n},Vh=(e,t,n,i)=>{const s=e.length;for(let l=0;l<s;l++){const a=e[l];ST(a,t,n,i)}},ST=(e,t,n,i)=>{if(typeof e=="string"){kT(e,t,n);return}if(typeof e=="function"){ET(e,t,n,i);return}_T(e,t,n,i)},kT=(e,t,n)=>{const i=e===""?t:_x(t,e);i.classGroupId=n},ET=(e,t,n,i)=>{if(NT(e)){Vh(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(gT(n,e))},_T=(e,t,n,i)=>{const s=Object.entries(e),l=s.length;for(let a=0;a<l;a++){const[c,f]=s[a];Vh(f,_x(t,c),n,i)}},_x=(e,t)=>{let n=e;const i=t.split(Ja),s=i.length;for(let l=0;l<s;l++){const a=i[l];let c=n.nextPart.get(a);c||(c=kx(),n.nextPart.set(a,c)),n=c}return n},NT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,CT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const s=(l,a)=>{n[l]=a,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(l){let a=n[l];if(a!==void 0)return a;if((a=i[l])!==void 0)return s(l,a),a},set(l,a){l in n?n[l]=a:s(l,a)}}},dh="!",e0=":",IT=[],t0=(e,t,n,i,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:s}),TT=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=s=>{const l=[];let a=0,c=0,f=0,d;const m=s.length;for(let w=0;w<m;w++){const b=s[w];if(a===0&&c===0){if(b===e0){l.push(s.slice(f,w)),f=w+1;continue}if(b==="/"){d=w;continue}}b==="["?a++:b==="]"?a--:b==="("?c++:b===")"&&c--}const p=l.length===0?s:s.slice(f);let g=p,v=!1;p.endsWith(dh)?(g=p.slice(0,-1),v=!0):p.startsWith(dh)&&(g=p.slice(1),v=!0);const S=d&&d>f?d-f:void 0;return t0(l,v,g,S)};if(t){const s=t+e0,l=i;i=a=>a.startsWith(s)?l(a.slice(s.length)):t0(IT,!1,a,void 0,!0)}if(n){const s=i;i=l=>n({className:l,parseClassName:s})}return i},PT=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let s=[];for(let l=0;l<n.length;l++){const a=n[l],c=a[0]==="[",f=t.has(a);c||f?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(a)):s.push(a)}return s.length>0&&(s.sort(),i.push(...s)),i}},AT=e=>({cache:CT(e.cacheSize),parseClassName:TT(e),sortModifiers:PT(e),postfixLookupClassGroupIds:OT(e),...vT(e)}),OT=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let i=0;i<n.length;i++)t[n[i]]=!0;return t},LT=/\s+/,MT=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:l,postfixLookupClassGroupIds:a}=t,c=[],f=e.trim().split(LT);let d="";for(let m=f.length-1;m>=0;m-=1){const p=f[m],{isExternal:g,modifiers:v,hasImportantModifier:S,baseClassName:w,maybePostfixModifierPosition:b}=n(p);if(g){d=p+(d.length>0?" "+d:d);continue}let k=!!b,_;if(k){const R=w.substring(0,b);_=i(R);const C=_&&a[_]?i(w):void 0;C&&C!==_&&(_=C,k=!1)}else _=i(w);if(!_){if(!k){d=p+(d.length>0?" "+d:d);continue}if(_=i(w),!_){d=p+(d.length>0?" "+d:d);continue}k=!1}const E=v.length===0?"":v.length===1?v[0]:l(v).join(":"),N=S?E+dh:E,A=N+_;if(c.indexOf(A)>-1)continue;c.push(A);const L=s(_,k);for(let R=0;R<L.length;++R){const C=L[R];c.push(N+C)}d=p+(d.length>0?" "+d:d)}return d},RT=(...e)=>{let t=0,n,i,s="";for(;t<e.length;)(n=e[t++])&&(i=Nx(n))&&(s&&(s+=" "),s+=i);return s},Nx=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Nx(e[i]))&&(n&&(n+=" "),n+=t);return n},DT=(e,...t)=>{let n,i,s,l;const a=f=>{const d=t.reduce((m,p)=>p(m),e());return n=AT(d),i=n.cache.get,s=n.cache.set,l=c,c(f)},c=f=>{const d=i(f);if(d)return d;const m=MT(f,n);return s(f,m),m};return l=a,(...f)=>l(RT(...f))},jT=[],it=e=>{const t=n=>n[e]||jT;return t.isThemeGetter=!0,t},Cx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ix=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$T=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,zT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FT=/\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$/,BT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,VT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Sr=e=>$T.test(e),Ie=e=>!!e&&!Number.isNaN(Number(e)),Nn=e=>!!e&&Number.isInteger(Number(e)),Wf=e=>e.endsWith("%")&&Ie(e.slice(0,-1)),qn=e=>zT.test(e),Tx=()=>!0,WT=e=>FT.test(e)&&!BT.test(e),Hh=()=>!1,UT=e=>VT.test(e),qT=e=>HT.test(e),YT=e=>!me(e)&&!ye(e),KT=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),GT=e=>Ir(e,Ox,Hh),me=e=>Cx.test(e),Gr=e=>Ir(e,Lx,WT),n0=e=>Ir(e,rP,Ie),XT=e=>Ir(e,Rx,Tx),QT=e=>Ir(e,Mx,Hh),r0=e=>Ir(e,Px,Hh),JT=e=>Ir(e,Ax,qT),ya=e=>Ir(e,Dx,UT),ye=e=>Ix.test(e),ds=e=>ui(e,Lx),ZT=e=>ui(e,Mx),i0=e=>ui(e,Px),eP=e=>ui(e,Ox),tP=e=>ui(e,Ax),va=e=>ui(e,Dx,!0),nP=e=>ui(e,Rx,!0),Ir=(e,t,n)=>{const i=Cx.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},ui=(e,t,n=!1)=>{const i=Ix.exec(e);return i?i[1]?t(i[1]):n:!1},Px=e=>e==="position"||e==="percentage",Ax=e=>e==="image"||e==="url",Ox=e=>e==="length"||e==="size"||e==="bg-size",Lx=e=>e==="length",rP=e=>e==="number",Mx=e=>e==="family-name",Rx=e=>e==="number"||e==="weight",Dx=e=>e==="shadow",iP=()=>{const e=it("color"),t=it("font"),n=it("text"),i=it("font-weight"),s=it("tracking"),l=it("leading"),a=it("breakpoint"),c=it("container"),f=it("spacing"),d=it("radius"),m=it("shadow"),p=it("inset-shadow"),g=it("text-shadow"),v=it("drop-shadow"),S=it("blur"),w=it("perspective"),b=it("aspect"),k=it("ease"),_=it("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...N(),ye,me],L=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],C=()=>[ye,me,f],P=()=>[Sr,"full","auto",...C()],F=()=>[Nn,"none","subgrid",ye,me],M=()=>["auto",{span:["full",Nn,ye,me]},Nn,ye,me],$=()=>[Nn,"auto",ye,me],Z=()=>["auto","min","max","fr",ye,me],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...C()],J=()=>[Sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],Y=()=>[Sr,"screen","full","dvw","lvw","svw","min","max","fit",...C()],W=()=>[Sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],B=()=>[e,ye,me],D=()=>[...N(),i0,r0,{position:[ye,me]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",eP,GT,{size:[ye,me]}],K=()=>[Wf,ds,Gr],Q=()=>["","none","full",d,ye,me],re=()=>["",Ie,ds,Gr],se=()=>["solid","dashed","dotted","double"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[Ie,Wf,i0,r0],de=()=>["","none",S,ye,me],xe=()=>["none",Ie,ye,me],he=()=>["none",Ie,ye,me],fe=()=>[Ie,ye,me],ke=()=>[Sr,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[qn],breakpoint:[qn],color:[Tx],container:[qn],"drop-shadow":[qn],ease:["in","out","in-out"],font:[YT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[qn],shadow:[qn],spacing:["px",Ie],text:[qn],"text-shadow":[qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Sr,me,ye,b]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,me]}],"container-named":[KT],columns:[{columns:[Ie,me,ye,c]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Nn,"auto",ye,me]}],basis:[{basis:[Sr,"full","auto",c,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,Sr,"auto","initial","none",me]}],grow:[{grow:["",Ie,ye,me]}],shrink:[{shrink:["",Ie,ye,me]}],order:[{order:[Nn,"first","last","none",ye,me]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...Y()]}],"min-inline-size":[{"min-inline":["auto",...Y()]}],"max-inline-size":[{"max-inline":["none",...Y()]}],"block-size":[{block:["auto",...W()]}],"min-block-size":[{"min-block":["auto",...W()]}],"max-block-size":[{"max-block":["none",...W()]}],w:[{w:[c,"screen",...J()]}],"min-w":[{"min-w":[c,"screen","none",...J()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",n,ds,Gr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,nP,XT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wf,me]}],"font-family":[{font:[ZT,QT,t]}],"font-features":[{"font-features":[me]}],"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:[s,ye,me]}],"line-clamp":[{"line-clamp":[Ie,"none",ye,n0]}],leading:[{leading:[l,...C()]}],"list-image":[{"list-image":["none",ye,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",ye,Gr]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Ie,"auto",ye,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[Nn,ye,me]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nn,ye,me],radial:["",ye,me],conic:[Nn,ye,me]},tP,JT]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,ye,me]}],"outline-w":[{outline:["",Ie,ds,Gr]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",m,va,ya]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",p,va,ya]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Ie,Gr]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",g,va,ya]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Ie,ye,me]}],"mix-blend":[{"mix-blend":[...ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[ye,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,me]}],filter:[{filter:["","none",ye,me]}],blur:[{blur:de()}],brightness:[{brightness:[Ie,ye,me]}],contrast:[{contrast:[Ie,ye,me]}],"drop-shadow":[{"drop-shadow":["","none",v,va,ya]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Ie,ye,me]}],"hue-rotate":[{"hue-rotate":[Ie,ye,me]}],invert:[{invert:["",Ie,ye,me]}],saturate:[{saturate:[Ie,ye,me]}],sepia:[{sepia:["",Ie,ye,me]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,me]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,ye,me]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,ye,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,ye,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,ye,me]}],"backdrop-invert":[{"backdrop-invert":["",Ie,ye,me]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,ye,me]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,ye,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,ye,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",ye,me]}],ease:[{ease:["linear","initial",k,ye,me]}],delay:[{delay:[Ie,ye,me]}],animate:[{animate:["none",_,ye,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ye,me]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:xe()}],"rotate-x":[{"rotate-x":xe()}],"rotate-y":[{"rotate-y":xe()}],"rotate-z":[{"rotate-z":xe()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[ye,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],zoom:[{zoom:[Nn,ye,me]}],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":B()}],"scrollbar-track-color":[{"scrollbar-track":B()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",ye,me]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Ie,ds,Gr,n0]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oP=DT(iP);function at(...e){return oP(Sx(e))}function o0(e){return e?e.replace(/^trigger\./,""):""}function sP({activeView:e,onViewChange:t,liveConnected:n,workflows:i=[],selected:s,onSelect:l,onRun:a}){return O.jsxs("aside",{className:"w-60 shrink-0 bg-bg border-r border-border flex flex-col",children:[O.jsxs("div",{className:"h-12 flex items-center gap-2 px-4 border-b border-border",children:[O.jsx("div",{className:"size-5 rounded bg-fg flex items-center justify-center text-bg text-[10px] font-mono",children:"~/"}),O.jsx("span",{className:"font-semibold tracking-tight",children:"agentic-surfaces"})]}),O.jsx("div",{className:"px-3 pt-3 pb-1 text-[11px] uppercase tracking-wider text-mutedfg",children:"Workflows"}),O.jsxs("nav",{className:"px-2 space-y-0.5",children:[i.length===0&&O.jsx("div",{className:"px-2.5 py-1.5 text-[12px] text-mutedfg",children:"No workflows loaded."}),i.map(c=>O.jsxs("div",{"data-testid":"workflow-item",className:at("group w-full px-2.5 py-1.5 rounded-md flex items-center gap-2 text-[13px] cursor-pointer",c.name===s?"bg-muted":"hover:bg-muted text-mutedfg"),onClick:()=>l==null?void 0:l(c.name),children:[O.jsx("span",{className:at("size-1.5 rounded-full flex-shrink-0",c.name===s?"bg-ok":"bg-border")}),O.jsx("span",{className:"truncate",children:c.name}),c.runnable&&a&&O.jsx("button",{"data-testid":"run-workflow",title:`Run ${c.name}`,onClick:f=>{f.stopPropagation(),a(c.name)},className:"ml-auto text-[11px] font-mono text-mutedfg hover:text-ok px-1 rounded opacity-0 group-hover:opacity-100",children:"▶ run"}),!(c.runnable&&a)&&o0(c.triggerType)&&O.jsx("span",{className:"ml-auto text-[10px] text-mutedfg font-mono",children:o0(c.triggerType)})]},c.name))]}),O.jsx("div",{className:"px-3 pt-5 pb-1 text-[11px] uppercase tracking-wider text-mutedfg",children:"View"}),O.jsxs("nav",{className:"px-2 space-y-0.5",children:[O.jsx("button",{onClick:()=>t("board"),className:at("w-full text-left px-2.5 py-1.5 rounded-md flex items-center gap-2 text-[13px]",e==="board"?"bg-muted":"hover:bg-muted text-mutedfg"),children:"Whiteboard"}),O.jsxs("button",{onClick:()=>t("runs"),className:at("w-full text-left px-2.5 py-1.5 rounded-md flex items-center gap-2 text-[13px]",e==="runs"?"bg-muted":"hover:bg-muted text-mutedfg"),children:["Runs",n&&O.jsx("span",{className:"ml-auto size-1.5 rounded-full bg-ok pulse-dot"})]})]}),O.jsxs("div",{className:"mt-auto p-3 border-t border-border text-[11px] text-mutedfg leading-relaxed",children:[O.jsxs("div",{className:"flex items-center gap-1.5",children:[O.jsx("span",{className:at("size-1.5 rounded-full",n?"bg-ok":"bg-border")}),n?"server connected":"scheduler running"]}),O.jsxs("div",{className:"mt-1 font-mono",children:["no fleet state stored —",O.jsx("br",{}),"surfaces are the source of truth"]})]})]})}function lP({workflow:e,onLoadYaml:t}){const n=(e==null?void 0:e.name)??"no workflow loaded",i=e?`workflows/${e.name}.yaml`:"",[s,l]=T.useState(!1),a=T.useRef(null),c=T.useCallback(()=>{var m;const d=((m=a.current)==null?void 0:m.value)??"";d.trim()&&(t(d),l(!1))},[t]),f=T.useCallback(()=>{l(!1)},[]);return O.jsxs(O.Fragment,{children:[O.jsxs("header",{className:"h-12 shrink-0 bg-bg border-b border-border flex items-center px-4 gap-3",children:[O.jsx("h1",{className:"font-semibold tracking-tight",children:n}),i&&O.jsx("span",{className:"text-[11px] font-mono text-mutedfg px-1.5 py-0.5 bg-muted rounded",children:i}),O.jsx("div",{className:"ml-auto",children:O.jsx("button",{onClick:()=>l(!0),className:"text-[12px] px-2.5 py-1 rounded bg-muted hover:bg-border text-fg transition-colors",children:"Paste YAML"})})]}),s&&O.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-bg/80 z-50",children:O.jsxs("div",{className:"bg-bg border border-border rounded-lg shadow-lg p-4 flex flex-col gap-3 w-[520px] max-w-[90vw]",children:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsx("span",{className:"font-semibold text-sm",children:"Paste YAML"}),O.jsx("button",{onClick:f,className:"text-mutedfg hover:text-fg text-lg leading-none","aria-label":"Close",children:"×"})]}),O.jsx("textarea",{ref:a,className:"w-full h-64 font-mono text-[12px] bg-muted border border-border rounded p-2 resize-y focus:outline-none focus:ring-1 focus:ring-primary",placeholder:"Paste your workflow YAML here...",spellCheck:!1}),O.jsxs("div",{className:"flex justify-end gap-2",children:[O.jsx("button",{onClick:f,className:"text-[12px] px-3 py-1.5 rounded bg-muted hover:bg-border text-fg transition-colors",children:"Cancel"}),O.jsx("button",{onClick:c,className:"text-[12px] px-3 py-1.5 rounded bg-primary hover:opacity-90 text-white transition-opacity",children:"Apply"})]})]})})]})}function s0({status:e}){return O.jsx("span",{"data-testid":"status-dot","data-status":e,className:at("size-1.5 rounded-full flex-shrink-0",e==="idle"&&"bg-border",e==="running"&&"bg-run pulse-dot",e==="success"&&"bg-ok",e==="failed"&&"bg-fail")})}function l0({data:e,selected:t}){const{node:n,liveStatus:i="idle"}=e;if(n.type==="agent.run"){const l=i==="running";return O.jsxs("div",{"data-testid":"agent-node","data-node-type":"agent.run","data-live-status":i,className:at("rounded-lg border overflow-hidden cursor-pointer","bg-agentbg border-agent/40",l?"agent-ring agent-live":"agent-ring"),style:{width:220,height:60},onClick:()=>{var a;return(a=e.onNodeClick)==null?void 0:a.call(e,n)},children:[O.jsx("div",{className:"h-1 bg-agent"}),O.jsxs("div",{className:"p-2.5 flex flex-col justify-center",style:{height:"calc(100% - 4px)"},children:[O.jsxs("div",{className:"flex items-center gap-1.5",children:[O.jsx(s0,{status:i}),O.jsx("span",{className:"font-medium text-agent text-[12px]",children:n.id}),O.jsx("span",{className:"ml-auto text-[9px] font-mono uppercase tracking-wide text-agent/70 bg-agent/10 px-1 rounded",children:"agent"})]}),O.jsx("div",{className:"font-mono text-[10px] text-agent/60 mt-0.5",children:n.type})]}),O.jsx(Nr,{type:"target",position:Se.Left,className:"!bg-agent/50"}),O.jsx(Nr,{type:"source",position:Se.Right,className:"!bg-agent/50"})]})}return O.jsxs("div",{"data-testid":"workflow-node","data-node-type":n.type,"data-live-status":i,className:at("rounded-lg border overflow-hidden cursor-pointer bg-bg border-border shadow-sm",t&&"ring-2 ring-fg/20"),style:{width:n.type==="task.branch"||n.type.startsWith("trigger.")?140:220,height:60},onClick:()=>{var l;return(l=e.onNodeClick)==null?void 0:l.call(e,n)},children:[O.jsx("div",{className:"h-1 bg-mutedfg/30"}),O.jsxs("div",{className:"p-2.5 flex flex-col justify-center",style:{height:"calc(100% - 4px)"},children:[O.jsxs("div",{className:"flex items-center gap-1.5",children:[O.jsx(s0,{status:i}),O.jsx("span",{className:"font-medium text-[12px]",children:n.id})]}),O.jsx("div",{className:"font-mono text-[10px] text-mutedfg mt-0.5",children:n.type})]}),O.jsx(Nr,{type:"target",position:Se.Left,className:"!bg-mutedfg/50"}),O.jsx(Nr,{type:"source",position:Se.Right,className:"!bg-mutedfg/50"})]})}var Uf,a0;function Wh(){if(a0)return Uf;a0=1;var e="\0",t="\0",n="";class i{constructor(m){Ze(this,"_isDirected",!0);Ze(this,"_isMultigraph",!1);Ze(this,"_isCompound",!1);Ze(this,"_label");Ze(this,"_defaultNodeLabelFn",()=>{});Ze(this,"_defaultEdgeLabelFn",()=>{});Ze(this,"_nodes",{});Ze(this,"_in",{});Ze(this,"_preds",{});Ze(this,"_out",{});Ze(this,"_sucs",{});Ze(this,"_edgeObjs",{});Ze(this,"_edgeLabels",{});Ze(this,"_nodeCount",0);Ze(this,"_edgeCount",0);Ze(this,"_parent");Ze(this,"_children");m&&(this._isDirected=Object.hasOwn(m,"directed")?m.directed:!0,this._isMultigraph=Object.hasOwn(m,"multigraph")?m.multigraph:!1,this._isCompound=Object.hasOwn(m,"compound")?m.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(m){return this._label=m,this}graph(){return this._label}setDefaultNodeLabel(m){return this._defaultNodeLabelFn=m,typeof m!="function"&&(this._defaultNodeLabelFn=()=>m),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var m=this;return this.nodes().filter(p=>Object.keys(m._in[p]).length===0)}sinks(){var m=this;return this.nodes().filter(p=>Object.keys(m._out[p]).length===0)}setNodes(m,p){var g=arguments,v=this;return m.forEach(function(S){g.length>1?v.setNode(S,p):v.setNode(S)}),this}setNode(m,p){return Object.hasOwn(this._nodes,m)?(arguments.length>1&&(this._nodes[m]=p),this):(this._nodes[m]=arguments.length>1?p:this._defaultNodeLabelFn(m),this._isCompound&&(this._parent[m]=t,this._children[m]={},this._children[t][m]=!0),this._in[m]={},this._preds[m]={},this._out[m]={},this._sucs[m]={},++this._nodeCount,this)}node(m){return this._nodes[m]}hasNode(m){return Object.hasOwn(this._nodes,m)}removeNode(m){var p=this;if(Object.hasOwn(this._nodes,m)){var g=v=>p.removeEdge(p._edgeObjs[v]);delete this._nodes[m],this._isCompound&&(this._removeFromParentsChildList(m),delete this._parent[m],this.children(m).forEach(function(v){p.setParent(v)}),delete this._children[m]),Object.keys(this._in[m]).forEach(g),delete this._in[m],delete this._preds[m],Object.keys(this._out[m]).forEach(g),delete this._out[m],delete this._sucs[m],--this._nodeCount}return this}setParent(m,p){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(p===void 0)p=t;else{p+="";for(var g=p;g!==void 0;g=this.parent(g))if(g===m)throw new Error("Setting "+p+" as parent of "+m+" would create a cycle");this.setNode(p)}return this.setNode(m),this._removeFromParentsChildList(m),this._parent[m]=p,this._children[p][m]=!0,this}_removeFromParentsChildList(m){delete this._children[this._parent[m]][m]}parent(m){if(this._isCompound){var p=this._parent[m];if(p!==t)return p}}children(m=t){if(this._isCompound){var p=this._children[m];if(p)return Object.keys(p)}else{if(m===t)return this.nodes();if(this.hasNode(m))return[]}}predecessors(m){var p=this._preds[m];if(p)return Object.keys(p)}successors(m){var p=this._sucs[m];if(p)return Object.keys(p)}neighbors(m){var p=this.predecessors(m);if(p){const v=new Set(p);for(var g of this.successors(m))v.add(g);return Array.from(v.values())}}isLeaf(m){var p;return this.isDirected()?p=this.successors(m):p=this.neighbors(m),p.length===0}filterNodes(m){var p=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});p.setGraph(this.graph());var g=this;Object.entries(this._nodes).forEach(function([w,b]){m(w)&&p.setNode(w,b)}),Object.values(this._edgeObjs).forEach(function(w){p.hasNode(w.v)&&p.hasNode(w.w)&&p.setEdge(w,g.edge(w))});var v={};function S(w){var b=g.parent(w);return b===void 0||p.hasNode(b)?(v[w]=b,b):b in v?v[b]:S(b)}return this._isCompound&&p.nodes().forEach(w=>p.setParent(w,S(w))),p}setDefaultEdgeLabel(m){return this._defaultEdgeLabelFn=m,typeof m!="function"&&(this._defaultEdgeLabelFn=()=>m),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(m,p){var g=this,v=arguments;return m.reduce(function(S,w){return v.length>1?g.setEdge(S,w,p):g.setEdge(S,w),w}),this}setEdge(){var m,p,g,v,S=!1,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(m=w.v,p=w.w,g=w.name,arguments.length===2&&(v=arguments[1],S=!0)):(m=w,p=arguments[1],g=arguments[3],arguments.length>2&&(v=arguments[2],S=!0)),m=""+m,p=""+p,g!==void 0&&(g=""+g);var b=a(this._isDirected,m,p,g);if(Object.hasOwn(this._edgeLabels,b))return S&&(this._edgeLabels[b]=v),this;if(g!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(m),this.setNode(p),this._edgeLabels[b]=S?v:this._defaultEdgeLabelFn(m,p,g);var k=c(this._isDirected,m,p,g);return m=k.v,p=k.w,Object.freeze(k),this._edgeObjs[b]=k,s(this._preds[p],m),s(this._sucs[m],p),this._in[p][b]=k,this._out[m][b]=k,this._edgeCount++,this}edge(m,p,g){var v=arguments.length===1?f(this._isDirected,arguments[0]):a(this._isDirected,m,p,g);return this._edgeLabels[v]}edgeAsObj(){const m=this.edge(...arguments);return typeof m!="object"?{label:m}:m}hasEdge(m,p,g){var v=arguments.length===1?f(this._isDirected,arguments[0]):a(this._isDirected,m,p,g);return Object.hasOwn(this._edgeLabels,v)}removeEdge(m,p,g){var v=arguments.length===1?f(this._isDirected,arguments[0]):a(this._isDirected,m,p,g),S=this._edgeObjs[v];return S&&(m=S.v,p=S.w,delete this._edgeLabels[v],delete this._edgeObjs[v],l(this._preds[p],m),l(this._sucs[m],p),delete this._in[p][v],delete this._out[m][v],this._edgeCount--),this}inEdges(m,p){var g=this._in[m];if(g){var v=Object.values(g);return p?v.filter(S=>S.v===p):v}}outEdges(m,p){var g=this._out[m];if(g){var v=Object.values(g);return p?v.filter(S=>S.w===p):v}}nodeEdges(m,p){var g=this.inEdges(m,p);if(g)return g.concat(this.outEdges(m,p))}}function s(d,m){d[m]?d[m]++:d[m]=1}function l(d,m){--d[m]||delete d[m]}function a(d,m,p,g){var v=""+m,S=""+p;if(!d&&v>S){var w=v;v=S,S=w}return v+n+S+n+(g===void 0?e:g)}function c(d,m,p,g){var v=""+m,S=""+p;if(!d&&v>S){var w=v;v=S,S=w}var b={v,w:S};return g&&(b.name=g),b}function f(d,m){return a(d,m.v,m.w,m.name)}return Uf=i,Uf}var qf,u0;function aP(){return u0||(u0=1,qf="2.2.4"),qf}var Yf,c0;function uP(){return c0||(c0=1,Yf={Graph:Wh(),version:aP()}),Yf}var Kf,f0;function cP(){if(f0)return Kf;f0=1;var e=Wh();Kf={write:t,read:s};function t(l){var a={options:{directed:l.isDirected(),multigraph:l.isMultigraph(),compound:l.isCompound()},nodes:n(l),edges:i(l)};return l.graph()!==void 0&&(a.value=structuredClone(l.graph())),a}function n(l){return l.nodes().map(function(a){var c=l.node(a),f=l.parent(a),d={v:a};return c!==void 0&&(d.value=c),f!==void 0&&(d.parent=f),d})}function i(l){return l.edges().map(function(a){var c=l.edge(a),f={v:a.v,w:a.w};return a.name!==void 0&&(f.name=a.name),c!==void 0&&(f.value=c),f})}function s(l){var a=new e(l.options).setGraph(l.value);return l.nodes.forEach(function(c){a.setNode(c.v,c.value),c.parent&&a.setParent(c.v,c.parent)}),l.edges.forEach(function(c){a.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),a}return Kf}var Gf,d0;function fP(){if(d0)return Gf;d0=1,Gf=e;function e(t){var n={},i=[],s;function l(a){Object.hasOwn(n,a)||(n[a]=!0,s.push(a),t.successors(a).forEach(l),t.predecessors(a).forEach(l))}return t.nodes().forEach(function(a){s=[],l(a),s.length&&i.push(s)}),i}return Gf}var Xf,h0;function jx(){if(h0)return Xf;h0=1;class e{constructor(){Ze(this,"_arr",[]);Ze(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var i=this._keyIndices[n];if(i!==void 0)return this._arr[i].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,i){var s=this._keyIndices;if(n=String(n),!Object.hasOwn(s,n)){var l=this._arr,a=l.length;return s[n]=a,l.push({key:n,priority:i}),this._decrease(a),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,i){var s=this._keyIndices[n];if(i>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[s].priority+" New: "+i);this._arr[s].priority=i,this._decrease(s)}_heapify(n){var i=this._arr,s=2*n,l=s+1,a=n;s<i.length&&(a=i[s].priority<i[a].priority?s:a,l<i.length&&(a=i[l].priority<i[a].priority?l:a),a!==n&&(this._swap(n,a),this._heapify(a)))}_decrease(n){for(var i=this._arr,s=i[n].priority,l;n!==0&&(l=n>>1,!(i[l].priority<s));)this._swap(n,l),n=l}_swap(n,i){var s=this._arr,l=this._keyIndices,a=s[n],c=s[i];s[n]=c,s[i]=a,l[c.key]=n,l[a.key]=i}}return Xf=e,Xf}var Qf,p0;function $x(){if(p0)return Qf;p0=1;var e=jx();Qf=n;var t=()=>1;function n(s,l,a,c){return i(s,String(l),a||t,c||function(f){return s.outEdges(f)})}function i(s,l,a,c){var f={},d=new e,m,p,g=function(v){var S=v.v!==m?v.v:v.w,w=f[S],b=a(v),k=p.distance+b;if(b<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+v+" Weight: "+b);k<w.distance&&(w.distance=k,w.predecessor=m,d.decrease(S,k))};for(s.nodes().forEach(function(v){var S=v===l?0:Number.POSITIVE_INFINITY;f[v]={distance:S},d.add(v,S)});d.size()>0&&(m=d.removeMin(),p=f[m],p.distance!==Number.POSITIVE_INFINITY);)c(m).forEach(g);return f}return Qf}var Jf,m0;function dP(){if(m0)return Jf;m0=1;var e=$x();Jf=t;function t(n,i,s){return n.nodes().reduce(function(l,a){return l[a]=e(n,a,i,s),l},{})}return Jf}var Zf,g0;function zx(){if(g0)return Zf;g0=1,Zf=e;function e(t){var n=0,i=[],s={},l=[];function a(c){var f=s[c]={onStack:!0,lowlink:n,index:n++};if(i.push(c),t.successors(c).forEach(function(p){Object.hasOwn(s,p)?s[p].onStack&&(f.lowlink=Math.min(f.lowlink,s[p].index)):(a(p),f.lowlink=Math.min(f.lowlink,s[p].lowlink))}),f.lowlink===f.index){var d=[],m;do m=i.pop(),s[m].onStack=!1,d.push(m);while(c!==m);l.push(d)}}return t.nodes().forEach(function(c){Object.hasOwn(s,c)||a(c)}),l}return Zf}var ed,y0;function hP(){if(y0)return ed;y0=1;var e=zx();ed=t;function t(n){return e(n).filter(function(i){return i.length>1||i.length===1&&n.hasEdge(i[0],i[0])})}return ed}var td,v0;function pP(){if(v0)return td;v0=1,td=t;var e=()=>1;function t(i,s,l){return n(i,s||e,l||function(a){return i.outEdges(a)})}function n(i,s,l){var a={},c=i.nodes();return c.forEach(function(f){a[f]={},a[f][f]={distance:0},c.forEach(function(d){f!==d&&(a[f][d]={distance:Number.POSITIVE_INFINITY})}),l(f).forEach(function(d){var m=d.v===f?d.w:d.v,p=s(d);a[f][m]={distance:p,predecessor:f}})}),c.forEach(function(f){var d=a[f];c.forEach(function(m){var p=a[m];c.forEach(function(g){var v=p[f],S=d[g],w=p[g],b=v.distance+S.distance;b<w.distance&&(w.distance=b,w.predecessor=S.predecessor)})})}),a}return td}var nd,w0;function Fx(){if(w0)return nd;w0=1;function e(n){var i={},s={},l=[];function a(c){if(Object.hasOwn(s,c))throw new t;Object.hasOwn(i,c)||(s[c]=!0,i[c]=!0,n.predecessors(c).forEach(a),delete s[c],l.push(c))}if(n.sinks().forEach(a),Object.keys(i).length!==n.nodeCount())throw new t;return l}class t extends Error{constructor(){super(...arguments)}}return nd=e,e.CycleException=t,nd}var rd,x0;function mP(){if(x0)return rd;x0=1;var e=Fx();rd=t;function t(n){try{e(n)}catch(i){if(i instanceof e.CycleException)return!1;throw i}return!0}return rd}var id,b0;function Bx(){if(b0)return id;b0=1,id=e;function e(s,l,a){Array.isArray(l)||(l=[l]);var c=s.isDirected()?p=>s.successors(p):p=>s.neighbors(p),f=a==="post"?t:n,d=[],m={};return l.forEach(p=>{if(!s.hasNode(p))throw new Error("Graph does not have node: "+p);f(p,c,m,d)}),d}function t(s,l,a,c){for(var f=[[s,!1]];f.length>0;){var d=f.pop();d[1]?c.push(d[0]):Object.hasOwn(a,d[0])||(a[d[0]]=!0,f.push([d[0],!0]),i(l(d[0]),m=>f.push([m,!1])))}}function n(s,l,a,c){for(var f=[s];f.length>0;){var d=f.pop();Object.hasOwn(a,d)||(a[d]=!0,c.push(d),i(l(d),m=>f.push(m)))}}function i(s,l){for(var a=s.length;a--;)l(s[a],a,s);return s}return id}var od,S0;function gP(){if(S0)return od;S0=1;var e=Bx();od=t;function t(n,i){return e(n,i,"post")}return od}var sd,k0;function yP(){if(k0)return sd;k0=1;var e=Bx();sd=t;function t(n,i){return e(n,i,"pre")}return sd}var ld,E0;function vP(){if(E0)return ld;E0=1;var e=Wh(),t=jx();ld=n;function n(i,s){var l=new e,a={},c=new t,f;function d(p){var g=p.v===f?p.w:p.v,v=c.priority(g);if(v!==void 0){var S=s(p);S<v&&(a[g]=f,c.decrease(g,S))}}if(i.nodeCount()===0)return l;i.nodes().forEach(function(p){c.add(p,Number.POSITIVE_INFINITY),l.setNode(p)}),c.decrease(i.nodes()[0],0);for(var m=!1;c.size()>0;){if(f=c.removeMin(),Object.hasOwn(a,f))l.setEdge(f,a[f]);else{if(m)throw new Error("Input graph is not connected: "+i);m=!0}i.nodeEdges(f).forEach(d)}return l}return ld}var ad,_0;function wP(){return _0||(_0=1,ad={components:fP(),dijkstra:$x(),dijkstraAll:dP(),findCycles:hP(),floydWarshall:pP(),isAcyclic:mP(),postorder:gP(),preorder:yP(),prim:vP(),tarjan:zx(),topsort:Fx()}),ad}var ud,N0;function mn(){if(N0)return ud;N0=1;var e=uP();return ud={Graph:e.Graph,json:cP(),alg:wP(),version:e.version},ud}var cd,C0;function xP(){if(C0)return cd;C0=1;class e{constructor(){let s={};s._next=s._prev=s,this._sentinel=s}dequeue(){let s=this._sentinel,l=s._prev;if(l!==s)return t(l),l}enqueue(s){let l=this._sentinel;s._prev&&s._next&&t(s),s._next=l._next,l._next._prev=s,l._next=s,s._prev=l}toString(){let s=[],l=this._sentinel,a=l._prev;for(;a!==l;)s.push(JSON.stringify(a,n)),a=a._prev;return"["+s.join(", ")+"]"}}function t(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function n(i,s){if(i!=="_next"&&i!=="_prev")return s}return cd=e,cd}var fd,I0;function bP(){if(I0)return fd;I0=1;let e=mn().Graph,t=xP();fd=i;let n=()=>1;function i(d,m){if(d.nodeCount()<=1)return[];let p=a(d,m||n);return s(p.graph,p.buckets,p.zeroIdx).flatMap(v=>d.outEdges(v.v,v.w))}function s(d,m,p){let g=[],v=m[m.length-1],S=m[0],w;for(;d.nodeCount();){for(;w=S.dequeue();)l(d,m,p,w);for(;w=v.dequeue();)l(d,m,p,w);if(d.nodeCount()){for(let b=m.length-2;b>0;--b)if(w=m[b].dequeue(),w){g=g.concat(l(d,m,p,w,!0));break}}}return g}function l(d,m,p,g,v){let S=v?[]:void 0;return d.inEdges(g.v).forEach(w=>{let b=d.edge(w),k=d.node(w.v);v&&S.push({v:w.v,w:w.w}),k.out-=b,c(m,p,k)}),d.outEdges(g.v).forEach(w=>{let b=d.edge(w),k=w.w,_=d.node(k);_.in-=b,c(m,p,_)}),d.removeNode(g.v),S}function a(d,m){let p=new e,g=0,v=0;d.nodes().forEach(b=>{p.setNode(b,{v:b,in:0,out:0})}),d.edges().forEach(b=>{let k=p.edge(b.v,b.w)||0,_=m(b),E=k+_;p.setEdge(b.v,b.w,E),v=Math.max(v,p.node(b.v).out+=_),g=Math.max(g,p.node(b.w).in+=_)});let S=f(v+g+3).map(()=>new t),w=g+1;return p.nodes().forEach(b=>{c(S,w,p.node(b))}),{graph:p,buckets:S,zeroIdx:w}}function c(d,m,p){p.out?p.in?d[p.out-p.in+m].enqueue(p):d[d.length-1].enqueue(p):d[0].enqueue(p)}function f(d){const m=[];for(let p=0;p<d;p++)m.push(p);return m}return fd}var dd,T0;function et(){if(T0)return dd;T0=1;let e=mn().Graph;dd={addBorderNode:m,addDummyNode:t,applyWithChunking:v,asNonCompoundGraph:i,buildLayerMatrix:c,intersectRect:a,mapValues:L,maxRank:S,normalizeRanks:f,notime:k,partition:w,pick:A,predecessorWeights:l,range:N,removeEmptyRanks:d,simplify:n,successorWeights:s,time:b,uniqueId:E,zipObject:R};function t(C,P,F,M){for(var $=M;C.hasNode($);)$=E(M);return F.dummy=P,C.setNode($,F),$}function n(C){let P=new e().setGraph(C.graph());return C.nodes().forEach(F=>P.setNode(F,C.node(F))),C.edges().forEach(F=>{let M=P.edge(F.v,F.w)||{weight:0,minlen:1},$=C.edge(F);P.setEdge(F.v,F.w,{weight:M.weight+$.weight,minlen:Math.max(M.minlen,$.minlen)})}),P}function i(C){let P=new e({multigraph:C.isMultigraph()}).setGraph(C.graph());return C.nodes().forEach(F=>{C.children(F).length||P.setNode(F,C.node(F))}),C.edges().forEach(F=>{P.setEdge(F,C.edge(F))}),P}function s(C){let P=C.nodes().map(F=>{let M={};return C.outEdges(F).forEach($=>{M[$.w]=(M[$.w]||0)+C.edge($).weight}),M});return R(C.nodes(),P)}function l(C){let P=C.nodes().map(F=>{let M={};return C.inEdges(F).forEach($=>{M[$.v]=(M[$.v]||0)+C.edge($).weight}),M});return R(C.nodes(),P)}function a(C,P){let F=C.x,M=C.y,$=P.x-F,Z=P.y-M,j=C.width/2,G=C.height/2;if(!$&&!Z)throw new Error("Not possible to find intersection inside of the rectangle");let q,J;return Math.abs(Z)*j>Math.abs($)*G?(Z<0&&(G=-G),q=G*$/Z,J=G):($<0&&(j=-j),q=j,J=j*Z/$),{x:F+q,y:M+J}}function c(C){let P=N(S(C)+1).map(()=>[]);return C.nodes().forEach(F=>{let M=C.node(F),$=M.rank;$!==void 0&&(P[$][M.order]=F)}),P}function f(C){let P=C.nodes().map(M=>{let $=C.node(M).rank;return $===void 0?Number.MAX_VALUE:$}),F=v(Math.min,P);C.nodes().forEach(M=>{let $=C.node(M);Object.hasOwn($,"rank")&&($.rank-=F)})}function d(C){let P=C.nodes().map(j=>C.node(j).rank),F=v(Math.min,P),M=[];C.nodes().forEach(j=>{let G=C.node(j).rank-F;M[G]||(M[G]=[]),M[G].push(j)});let $=0,Z=C.graph().nodeRankFactor;Array.from(M).forEach((j,G)=>{j===void 0&&G%Z!==0?--$:j!==void 0&&$&&j.forEach(q=>C.node(q).rank+=$)})}function m(C,P,F,M){let $={width:0,height:0};return arguments.length>=4&&($.rank=F,$.order=M),t(C,"border",$,P)}function p(C,P=g){const F=[];for(let M=0;M<C.length;M+=P){const $=C.slice(M,M+P);F.push($)}return F}const g=65535;function v(C,P){if(P.length>g){const F=p(P);return C.apply(null,F.map(M=>C.apply(null,M)))}else return C.apply(null,P)}function S(C){const F=C.nodes().map(M=>{let $=C.node(M).rank;return $===void 0?Number.MIN_VALUE:$});return v(Math.max,F)}function w(C,P){let F={lhs:[],rhs:[]};return C.forEach(M=>{P(M)?F.lhs.push(M):F.rhs.push(M)}),F}function b(C,P){let F=Date.now();try{return P()}finally{console.log(C+" time: "+(Date.now()-F)+"ms")}}function k(C,P){return P()}let _=0;function E(C){var P=++_;return C+(""+P)}function N(C,P,F=1){P==null&&(P=C,C=0);let M=Z=>Z<P;F<0&&(M=Z=>P<Z);const $=[];for(let Z=C;M(Z);Z+=F)$.push(Z);return $}function A(C,P){const F={};for(const M of P)C[M]!==void 0&&(F[M]=C[M]);return F}function L(C,P){let F=P;return typeof P=="string"&&(F=M=>M[P]),Object.entries(C).reduce((M,[$,Z])=>(M[$]=F(Z,$),M),{})}function R(C,P){return C.reduce((F,M,$)=>(F[M]=P[$],F),{})}return dd}var hd,P0;function SP(){if(P0)return hd;P0=1;let e=bP(),t=et().uniqueId;hd={run:n,undo:s};function n(l){(l.graph().acyclicer==="greedy"?e(l,c(l)):i(l)).forEach(f=>{let d=l.edge(f);l.removeEdge(f),d.forwardName=f.name,d.reversed=!0,l.setEdge(f.w,f.v,d,t("rev"))});function c(f){return d=>f.edge(d).weight}}function i(l){let a=[],c={},f={};function d(m){Object.hasOwn(f,m)||(f[m]=!0,c[m]=!0,l.outEdges(m).forEach(p=>{Object.hasOwn(c,p.w)?a.push(p):d(p.w)}),delete c[m])}return l.nodes().forEach(d),a}function s(l){l.edges().forEach(a=>{let c=l.edge(a);if(c.reversed){l.removeEdge(a);let f=c.forwardName;delete c.reversed,delete c.forwardName,l.setEdge(a.w,a.v,c,f)}})}return hd}var pd,A0;function kP(){if(A0)return pd;A0=1;let e=et();pd={run:t,undo:i};function t(s){s.graph().dummyChains=[],s.edges().forEach(l=>n(s,l))}function n(s,l){let a=l.v,c=s.node(a).rank,f=l.w,d=s.node(f).rank,m=l.name,p=s.edge(l),g=p.labelRank;if(d===c+1)return;s.removeEdge(l);let v,S,w;for(w=0,++c;c<d;++w,++c)p.points=[],S={width:0,height:0,edgeLabel:p,edgeObj:l,rank:c},v=e.addDummyNode(s,"edge",S,"_d"),c===g&&(S.width=p.width,S.height=p.height,S.dummy="edge-label",S.labelpos=p.labelpos),s.setEdge(a,v,{weight:p.weight},m),w===0&&s.graph().dummyChains.push(v),a=v;s.setEdge(a,f,{weight:p.weight},m)}function i(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),c=a.edgeLabel,f;for(s.setEdge(a.edgeObj,c);a.dummy;)f=s.successors(l)[0],s.removeNode(l),c.points.push({x:a.x,y:a.y}),a.dummy==="edge-label"&&(c.x=a.x,c.y=a.y,c.width=a.width,c.height=a.height),l=f,a=s.node(l)})}return pd}var md,O0;function Za(){if(O0)return md;O0=1;const{applyWithChunking:e}=et();md={longestPath:t,slack:n};function t(i){var s={};function l(a){var c=i.node(a);if(Object.hasOwn(s,a))return c.rank;s[a]=!0;let f=i.outEdges(a).map(m=>m==null?Number.POSITIVE_INFINITY:l(m.w)-i.edge(m).minlen);var d=e(Math.min,f);return d===Number.POSITIVE_INFINITY&&(d=0),c.rank=d}i.sources().forEach(l)}function n(i,s){return i.node(s.w).rank-i.node(s.v).rank-i.edge(s).minlen}return md}var gd,L0;function Vx(){if(L0)return gd;L0=1;var e=mn().Graph,t=Za().slack;gd=n;function n(a){var c=new e({directed:!1}),f=a.nodes()[0],d=a.nodeCount();c.setNode(f,{});for(var m,p;i(c,a)<d;)m=s(c,a),p=c.hasNode(m.v)?t(a,m):-t(a,m),l(c,a,p);return c}function i(a,c){function f(d){c.nodeEdges(d).forEach(m=>{var p=m.v,g=d===p?m.w:p;!a.hasNode(g)&&!t(c,m)&&(a.setNode(g,{}),a.setEdge(d,g,{}),f(g))})}return a.nodes().forEach(f),a.nodeCount()}function s(a,c){return c.edges().reduce((d,m)=>{let p=Number.POSITIVE_INFINITY;return a.hasNode(m.v)!==a.hasNode(m.w)&&(p=t(c,m)),p<d[0]?[p,m]:d},[Number.POSITIVE_INFINITY,null])[1]}function l(a,c,f){a.nodes().forEach(d=>c.node(d).rank+=f)}return gd}var yd,M0;function EP(){if(M0)return yd;M0=1;var e=Vx(),t=Za().slack,n=Za().longestPath,i=mn().alg.preorder,s=mn().alg.postorder,l=et().simplify;yd=a,a.initLowLimValues=m,a.initCutValues=c,a.calcCutValue=d,a.leaveEdge=g,a.enterEdge=v,a.exchangeEdges=S;function a(_){_=l(_),n(_);var E=e(_);m(E),c(E,_);for(var N,A;N=g(E);)A=v(E,_,N),S(E,_,N,A)}function c(_,E){var N=s(_,_.nodes());N=N.slice(0,N.length-1),N.forEach(A=>f(_,E,A))}function f(_,E,N){var A=_.node(N),L=A.parent;_.edge(N,L).cutvalue=d(_,E,N)}function d(_,E,N){var A=_.node(N),L=A.parent,R=!0,C=E.edge(N,L),P=0;return C||(R=!1,C=E.edge(L,N)),P=C.weight,E.nodeEdges(N).forEach(F=>{var M=F.v===N,$=M?F.w:F.v;if($!==L){var Z=M===R,j=E.edge(F).weight;if(P+=Z?j:-j,b(_,N,$)){var G=_.edge(N,$).cutvalue;P+=Z?-G:G}}}),P}function m(_,E){arguments.length<2&&(E=_.nodes()[0]),p(_,{},1,E)}function p(_,E,N,A,L){var R=N,C=_.node(A);return E[A]=!0,_.neighbors(A).forEach(P=>{Object.hasOwn(E,P)||(N=p(_,E,N,P,A))}),C.low=R,C.lim=N++,L?C.parent=L:delete C.parent,N}function g(_){return _.edges().find(E=>_.edge(E).cutvalue<0)}function v(_,E,N){var A=N.v,L=N.w;E.hasEdge(A,L)||(A=N.w,L=N.v);var R=_.node(A),C=_.node(L),P=R,F=!1;R.lim>C.lim&&(P=C,F=!0);var M=E.edges().filter($=>F===k(_,_.node($.v),P)&&F!==k(_,_.node($.w),P));return M.reduce(($,Z)=>t(E,Z)<t(E,$)?Z:$)}function S(_,E,N,A){var L=N.v,R=N.w;_.removeEdge(L,R),_.setEdge(A.v,A.w,{}),m(_),c(_,E),w(_,E)}function w(_,E){var N=_.nodes().find(L=>!E.node(L).parent),A=i(_,N);A=A.slice(1),A.forEach(L=>{var R=_.node(L).parent,C=E.edge(L,R),P=!1;C||(C=E.edge(R,L),P=!0),E.node(L).rank=E.node(R).rank+(P?C.minlen:-C.minlen)})}function b(_,E,N){return _.hasEdge(E,N)}function k(_,E,N){return N.low<=E.lim&&E.lim<=N.lim}return yd}var vd,R0;function _P(){if(R0)return vd;R0=1;var e=Za(),t=e.longestPath,n=Vx(),i=EP();vd=s;function s(f){var d=f.graph().ranker;if(d instanceof Function)return d(f);switch(f.graph().ranker){case"network-simplex":c(f);break;case"tight-tree":a(f);break;case"longest-path":l(f);break;case"none":break;default:c(f)}}var l=t;function a(f){t(f),n(f)}function c(f){i(f)}return vd}var wd,D0;function NP(){if(D0)return wd;D0=1,wd=e;function e(i){let s=n(i);i.graph().dummyChains.forEach(l=>{let a=i.node(l),c=a.edgeObj,f=t(i,s,c.v,c.w),d=f.path,m=f.lca,p=0,g=d[p],v=!0;for(;l!==c.w;){if(a=i.node(l),v){for(;(g=d[p])!==m&&i.node(g).maxRank<a.rank;)p++;g===m&&(v=!1)}if(!v){for(;p<d.length-1&&i.node(g=d[p+1]).minRank<=a.rank;)p++;g=d[p]}i.setParent(l,g),l=i.successors(l)[0]}})}function t(i,s,l,a){let c=[],f=[],d=Math.min(s[l].low,s[a].low),m=Math.max(s[l].lim,s[a].lim),p,g;p=l;do p=i.parent(p),c.push(p);while(p&&(s[p].low>d||m>s[p].lim));for(g=p,p=a;(p=i.parent(p))!==g;)f.push(p);return{path:c.concat(f.reverse()),lca:g}}function n(i){let s={},l=0;function a(c){let f=l;i.children(c).forEach(a),s[c]={low:f,lim:l++}}return i.children().forEach(a),s}return wd}var xd,j0;function CP(){if(j0)return xd;j0=1;let e=et();xd={run:t,cleanup:l};function t(a){let c=e.addDummyNode(a,"root",{},"_root"),f=i(a),d=Object.values(f),m=e.applyWithChunking(Math.max,d)-1,p=2*m+1;a.graph().nestingRoot=c,a.edges().forEach(v=>a.edge(v).minlen*=p);let g=s(a)+1;a.children().forEach(v=>n(a,c,p,g,m,f,v)),a.graph().nodeRankFactor=p}function n(a,c,f,d,m,p,g){let v=a.children(g);if(!v.length){g!==c&&a.setEdge(c,g,{weight:0,minlen:f});return}let S=e.addBorderNode(a,"_bt"),w=e.addBorderNode(a,"_bb"),b=a.node(g);a.setParent(S,g),b.borderTop=S,a.setParent(w,g),b.borderBottom=w,v.forEach(k=>{n(a,c,f,d,m,p,k);let _=a.node(k),E=_.borderTop?_.borderTop:k,N=_.borderBottom?_.borderBottom:k,A=_.borderTop?d:2*d,L=E!==N?1:m-p[g]+1;a.setEdge(S,E,{weight:A,minlen:L,nestingEdge:!0}),a.setEdge(N,w,{weight:A,minlen:L,nestingEdge:!0})}),a.parent(g)||a.setEdge(c,S,{weight:0,minlen:m+p[g]})}function i(a){var c={};function f(d,m){var p=a.children(d);p&&p.length&&p.forEach(g=>f(g,m+1)),c[d]=m}return a.children().forEach(d=>f(d,1)),c}function s(a){return a.edges().reduce((c,f)=>c+a.edge(f).weight,0)}function l(a){var c=a.graph();a.removeNode(c.nestingRoot),delete c.nestingRoot,a.edges().forEach(f=>{var d=a.edge(f);d.nestingEdge&&a.removeEdge(f)})}return xd}var bd,$0;function IP(){if($0)return bd;$0=1;let e=et();bd=t;function t(i){function s(l){let a=i.children(l),c=i.node(l);if(a.length&&a.forEach(s),Object.hasOwn(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(let f=c.minRank,d=c.maxRank+1;f<d;++f)n(i,"borderLeft","_bl",l,c,f),n(i,"borderRight","_br",l,c,f)}}i.children().forEach(s)}function n(i,s,l,a,c,f){let d={width:0,height:0,rank:f,borderType:s},m=c[s][f-1],p=e.addDummyNode(i,"border",d,l);c[s][f]=p,i.setParent(p,a),m&&i.setEdge(m,p,{weight:1})}return bd}var Sd,z0;function TP(){if(z0)return Sd;z0=1,Sd={adjust:e,undo:t};function e(f){let d=f.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&n(f)}function t(f){let d=f.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&s(f),(d==="lr"||d==="rl")&&(a(f),n(f))}function n(f){f.nodes().forEach(d=>i(f.node(d))),f.edges().forEach(d=>i(f.edge(d)))}function i(f){let d=f.width;f.width=f.height,f.height=d}function s(f){f.nodes().forEach(d=>l(f.node(d))),f.edges().forEach(d=>{let m=f.edge(d);m.points.forEach(l),Object.hasOwn(m,"y")&&l(m)})}function l(f){f.y=-f.y}function a(f){f.nodes().forEach(d=>c(f.node(d))),f.edges().forEach(d=>{let m=f.edge(d);m.points.forEach(c),Object.hasOwn(m,"x")&&c(m)})}function c(f){let d=f.x;f.x=f.y,f.y=d}return Sd}var kd,F0;function PP(){if(F0)return kd;F0=1;let e=et();kd=t;function t(n){let i={},s=n.nodes().filter(m=>!n.children(m).length),l=s.map(m=>n.node(m).rank),a=e.applyWithChunking(Math.max,l),c=e.range(a+1).map(()=>[]);function f(m){if(i[m])return;i[m]=!0;let p=n.node(m);c[p.rank].push(m),n.successors(m).forEach(f)}return s.sort((m,p)=>n.node(m).rank-n.node(p).rank).forEach(f),c}return kd}var Ed,B0;function AP(){if(B0)return Ed;B0=1;let e=et().zipObject;Ed=t;function t(i,s){let l=0;for(let a=1;a<s.length;++a)l+=n(i,s[a-1],s[a]);return l}function n(i,s,l){let a=e(l,l.map((g,v)=>v)),c=s.flatMap(g=>i.outEdges(g).map(v=>({pos:a[v.w],weight:i.edge(v).weight})).sort((v,S)=>v.pos-S.pos)),f=1;for(;f<l.length;)f<<=1;let d=2*f-1;f-=1;let m=new Array(d).fill(0),p=0;return c.forEach(g=>{let v=g.pos+f;m[v]+=g.weight;let S=0;for(;v>0;)v%2&&(S+=m[v+1]),v=v-1>>1,m[v]+=g.weight;p+=g.weight*S}),p}return Ed}var _d,V0;function OP(){if(V0)return _d;V0=1,_d=e;function e(t,n=[]){return n.map(i=>{let s=t.inEdges(i);if(s.length){let l=s.reduce((a,c)=>{let f=t.edge(c),d=t.node(c.v);return{sum:a.sum+f.weight*d.order,weight:a.weight+f.weight}},{sum:0,weight:0});return{v:i,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:i}})}return _d}var Nd,H0;function LP(){if(H0)return Nd;H0=1;let e=et();Nd=t;function t(s,l){let a={};s.forEach((f,d)=>{let m=a[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:d};f.barycenter!==void 0&&(m.barycenter=f.barycenter,m.weight=f.weight)}),l.edges().forEach(f=>{let d=a[f.v],m=a[f.w];d!==void 0&&m!==void 0&&(m.indegree++,d.out.push(a[f.w]))});let c=Object.values(a).filter(f=>!f.indegree);return n(c)}function n(s){let l=[];function a(f){return d=>{d.merged||(d.barycenter===void 0||f.barycenter===void 0||d.barycenter>=f.barycenter)&&i(f,d)}}function c(f){return d=>{d.in.push(f),--d.indegree===0&&s.push(d)}}for(;s.length;){let f=s.pop();l.push(f),f.in.reverse().forEach(a(f)),f.out.forEach(c(f))}return l.filter(f=>!f.merged).map(f=>e.pick(f,["vs","i","barycenter","weight"]))}function i(s,l){let a=0,c=0;s.weight&&(a+=s.barycenter*s.weight,c+=s.weight),l.weight&&(a+=l.barycenter*l.weight,c+=l.weight),s.vs=l.vs.concat(s.vs),s.barycenter=a/c,s.weight=c,s.i=Math.min(l.i,s.i),l.merged=!0}return Nd}var Cd,W0;function MP(){if(W0)return Cd;W0=1;let e=et();Cd=t;function t(s,l){let a=e.partition(s,S=>Object.hasOwn(S,"barycenter")),c=a.lhs,f=a.rhs.sort((S,w)=>w.i-S.i),d=[],m=0,p=0,g=0;c.sort(i(!!l)),g=n(d,f,g),c.forEach(S=>{g+=S.vs.length,d.push(S.vs),m+=S.barycenter*S.weight,p+=S.weight,g=n(d,f,g)});let v={vs:d.flat(!0)};return p&&(v.barycenter=m/p,v.weight=p),v}function n(s,l,a){let c;for(;l.length&&(c=l[l.length-1]).i<=a;)l.pop(),s.push(c.vs),a++;return a}function i(s){return(l,a)=>l.barycenter<a.barycenter?-1:l.barycenter>a.barycenter?1:s?a.i-l.i:l.i-a.i}return Cd}var Id,U0;function RP(){if(U0)return Id;U0=1;let e=OP(),t=LP(),n=MP();Id=i;function i(a,c,f,d){let m=a.children(c),p=a.node(c),g=p?p.borderLeft:void 0,v=p?p.borderRight:void 0,S={};g&&(m=m.filter(_=>_!==g&&_!==v));let w=e(a,m);w.forEach(_=>{if(a.children(_.v).length){let E=i(a,_.v,f,d);S[_.v]=E,Object.hasOwn(E,"barycenter")&&l(_,E)}});let b=t(w,f);s(b,S);let k=n(b,d);if(g&&(k.vs=[g,k.vs,v].flat(!0),a.predecessors(g).length)){let _=a.node(a.predecessors(g)[0]),E=a.node(a.predecessors(v)[0]);Object.hasOwn(k,"barycenter")||(k.barycenter=0,k.weight=0),k.barycenter=(k.barycenter*k.weight+_.order+E.order)/(k.weight+2),k.weight+=2}return k}function s(a,c){a.forEach(f=>{f.vs=f.vs.flatMap(d=>c[d]?c[d].vs:d)})}function l(a,c){a.barycenter!==void 0?(a.barycenter=(a.barycenter*a.weight+c.barycenter*c.weight)/(a.weight+c.weight),a.weight+=c.weight):(a.barycenter=c.barycenter,a.weight=c.weight)}return Id}var Td,q0;function DP(){if(q0)return Td;q0=1;let e=mn().Graph,t=et();Td=n;function n(s,l,a,c){c||(c=s.nodes());let f=i(s),d=new e({compound:!0}).setGraph({root:f}).setDefaultNodeLabel(m=>s.node(m));return c.forEach(m=>{let p=s.node(m),g=s.parent(m);(p.rank===l||p.minRank<=l&&l<=p.maxRank)&&(d.setNode(m),d.setParent(m,g||f),s[a](m).forEach(v=>{let S=v.v===m?v.w:v.v,w=d.edge(S,m),b=w!==void 0?w.weight:0;d.setEdge(S,m,{weight:s.edge(v).weight+b})}),Object.hasOwn(p,"minRank")&&d.setNode(m,{borderLeft:p.borderLeft[l],borderRight:p.borderRight[l]}))}),d}function i(s){for(var l;s.hasNode(l=t.uniqueId("_root")););return l}return Td}var Pd,Y0;function jP(){if(Y0)return Pd;Y0=1,Pd=e;function e(t,n,i){let s={},l;i.forEach(a=>{let c=t.parent(a),f,d;for(;c;){if(f=t.parent(c),f?(d=s[f],s[f]=c):(d=l,l=c),d&&d!==c){n.setEdge(d,c);return}c=f}})}return Pd}var Ad,K0;function $P(){if(K0)return Ad;K0=1;let e=PP(),t=AP(),n=RP(),i=DP(),s=jP(),l=mn().Graph,a=et();Ad=c;function c(p,g){if(g&&typeof g.customOrder=="function"){g.customOrder(p,c);return}let v=a.maxRank(p),S=f(p,a.range(1,v+1),"inEdges"),w=f(p,a.range(v-1,-1,-1),"outEdges"),b=e(p);if(m(p,b),g&&g.disableOptimalOrderHeuristic)return;let k=Number.POSITIVE_INFINITY,_;for(let E=0,N=0;N<4;++E,++N){d(E%2?S:w,E%4>=2),b=a.buildLayerMatrix(p);let A=t(p,b);A<k&&(N=0,_=Object.assign({},b),k=A)}m(p,_)}function f(p,g,v){const S=new Map,w=(b,k)=>{S.has(b)||S.set(b,[]),S.get(b).push(k)};for(const b of p.nodes()){const k=p.node(b);if(typeof k.rank=="number"&&w(k.rank,b),typeof k.minRank=="number"&&typeof k.maxRank=="number")for(let _=k.minRank;_<=k.maxRank;_++)_!==k.rank&&w(_,b)}return g.map(function(b){return i(p,b,v,S.get(b)||[])})}function d(p,g){let v=new l;p.forEach(function(S){let w=S.graph().root,b=n(S,w,v,g);b.vs.forEach((k,_)=>S.node(k).order=_),s(S,v,b.vs)})}function m(p,g){Object.values(g).forEach(v=>v.forEach((S,w)=>p.node(S).order=w))}return Ad}var Od,G0;function zP(){if(G0)return Od;G0=1;let e=mn().Graph,t=et();Od={positionX:v,findType1Conflicts:n,findType2Conflicts:i,addConflict:l,hasConflict:a,verticalAlignment:c,horizontalCompaction:f,alignCoordinates:p,findSmallestWidthAlignment:m,balance:g};function n(b,k){let _={};function E(N,A){let L=0,R=0,C=N.length,P=A[A.length-1];return A.forEach((F,M)=>{let $=s(b,F),Z=$?b.node($).order:C;($||F===P)&&(A.slice(R,M+1).forEach(j=>{b.predecessors(j).forEach(G=>{let q=b.node(G),J=q.order;(J<L||Z<J)&&!(q.dummy&&b.node(j).dummy)&&l(_,G,j)})}),R=M+1,L=Z)}),A}return k.length&&k.reduce(E),_}function i(b,k){let _={};function E(A,L,R,C,P){let F;t.range(L,R).forEach(M=>{F=A[M],b.node(F).dummy&&b.predecessors(F).forEach($=>{let Z=b.node($);Z.dummy&&(Z.order<C||Z.order>P)&&l(_,$,F)})})}function N(A,L){let R=-1,C,P=0;return L.forEach((F,M)=>{if(b.node(F).dummy==="border"){let $=b.predecessors(F);$.length&&(C=b.node($[0]).order,E(L,P,M,R,C),P=M,R=C)}E(L,P,L.length,C,A.length)}),L}return k.length&&k.reduce(N),_}function s(b,k){if(b.node(k).dummy)return b.predecessors(k).find(_=>b.node(_).dummy)}function l(b,k,_){if(k>_){let N=k;k=_,_=N}let E=b[k];E||(b[k]=E={}),E[_]=!0}function a(b,k,_){if(k>_){let E=k;k=_,_=E}return!!b[k]&&Object.hasOwn(b[k],_)}function c(b,k,_,E){let N={},A={},L={};return k.forEach(R=>{R.forEach((C,P)=>{N[C]=C,A[C]=C,L[C]=P})}),k.forEach(R=>{let C=-1;R.forEach(P=>{let F=E(P);if(F.length){F=F.sort(($,Z)=>L[$]-L[Z]);let M=(F.length-1)/2;for(let $=Math.floor(M),Z=Math.ceil(M);$<=Z;++$){let j=F[$];A[P]===P&&C<L[j]&&!a(_,P,j)&&(A[j]=P,A[P]=N[P]=N[j],C=L[j])}}})}),{root:N,align:A}}function f(b,k,_,E,N){let A={},L=d(b,k,_,N),R=N?"borderLeft":"borderRight";function C(M,$){let Z=L.nodes(),j=Z.pop(),G={};for(;j;)G[j]?M(j):(G[j]=!0,Z.push(j),Z=Z.concat($(j))),j=Z.pop()}function P(M){A[M]=L.inEdges(M).reduce(($,Z)=>Math.max($,A[Z.v]+L.edge(Z)),0)}function F(M){let $=L.outEdges(M).reduce((j,G)=>Math.min(j,A[G.w]-L.edge(G)),Number.POSITIVE_INFINITY),Z=b.node(M);$!==Number.POSITIVE_INFINITY&&Z.borderType!==R&&(A[M]=Math.max(A[M],$))}return C(P,L.predecessors.bind(L)),C(F,L.successors.bind(L)),Object.keys(E).forEach(M=>A[M]=A[_[M]]),A}function d(b,k,_,E){let N=new e,A=b.graph(),L=S(A.nodesep,A.edgesep,E);return k.forEach(R=>{let C;R.forEach(P=>{let F=_[P];if(N.setNode(F),C){var M=_[C],$=N.edge(M,F);N.setEdge(M,F,Math.max(L(b,P,C),$||0))}C=P})}),N}function m(b,k){return Object.values(k).reduce((_,E)=>{let N=Number.NEGATIVE_INFINITY,A=Number.POSITIVE_INFINITY;Object.entries(E).forEach(([R,C])=>{let P=w(b,R)/2;N=Math.max(C+P,N),A=Math.min(C-P,A)});const L=N-A;return L<_[0]&&(_=[L,E]),_},[Number.POSITIVE_INFINITY,null])[1]}function p(b,k){let _=Object.values(k),E=t.applyWithChunking(Math.min,_),N=t.applyWithChunking(Math.max,_);["u","d"].forEach(A=>{["l","r"].forEach(L=>{let R=A+L,C=b[R];if(C===k)return;let P=Object.values(C),F=E-t.applyWithChunking(Math.min,P);L!=="l"&&(F=N-t.applyWithChunking(Math.max,P)),F&&(b[R]=t.mapValues(C,M=>M+F))})})}function g(b,k){return t.mapValues(b.ul,(_,E)=>{if(k)return b[k.toLowerCase()][E];{let N=Object.values(b).map(A=>A[E]).sort((A,L)=>A-L);return(N[1]+N[2])/2}})}function v(b){let k=t.buildLayerMatrix(b),_=Object.assign(n(b,k),i(b,k)),E={},N;["u","d"].forEach(L=>{N=L==="u"?k:Object.values(k).reverse(),["l","r"].forEach(R=>{R==="r"&&(N=N.map(M=>Object.values(M).reverse()));let C=(L==="u"?b.predecessors:b.successors).bind(b),P=c(b,N,_,C),F=f(b,N,P.root,P.align,R==="r");R==="r"&&(F=t.mapValues(F,M=>-M)),E[L+R]=F})});let A=m(b,E);return p(E,A),g(E,b.graph().align)}function S(b,k,_){return(E,N,A)=>{let L=E.node(N),R=E.node(A),C=0,P;if(C+=L.width/2,Object.hasOwn(L,"labelpos"))switch(L.labelpos.toLowerCase()){case"l":P=-L.width/2;break;case"r":P=L.width/2;break}if(P&&(C+=_?P:-P),P=0,C+=(L.dummy?k:b)/2,C+=(R.dummy?k:b)/2,C+=R.width/2,Object.hasOwn(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":P=R.width/2;break;case"r":P=-R.width/2;break}return P&&(C+=_?P:-P),P=0,C}}function w(b,k){return b.node(k).width}return Od}var Ld,X0;function FP(){if(X0)return Ld;X0=1;let e=et(),t=zP().positionX;Ld=n;function n(s){s=e.asNonCompoundGraph(s),i(s),Object.entries(t(s)).forEach(([l,a])=>s.node(l).x=a)}function i(s){let l=e.buildLayerMatrix(s),a=s.graph().ranksep,c=0;l.forEach(f=>{const d=f.reduce((m,p)=>{const g=s.node(p).height;return m>g?m:g},0);f.forEach(m=>s.node(m).y=c+d/2),c+=d+a})}return Ld}var Md,Q0;function BP(){if(Q0)return Md;Q0=1;let e=SP(),t=kP(),n=_P(),i=et().normalizeRanks,s=NP(),l=et().removeEmptyRanks,a=CP(),c=IP(),f=TP(),d=$P(),m=FP(),p=et(),g=mn().Graph;Md=v;function v(V,K){let Q=K&&K.debugTiming?p.time:p.notime;Q("layout",()=>{let re=Q(" buildLayoutGraph",()=>C(V));Q(" runLayout",()=>S(re,Q,K)),Q(" updateInputGraph",()=>w(V,re))})}function S(V,K,Q){K(" makeSpaceForEdgeLabels",()=>P(V)),K(" removeSelfEdges",()=>Y(V)),K(" acyclic",()=>e.run(V)),K(" nestingGraph.run",()=>a.run(V)),K(" rank",()=>n(p.asNonCompoundGraph(V))),K(" injectEdgeLabelProxies",()=>F(V)),K(" removeEmptyRanks",()=>l(V)),K(" nestingGraph.cleanup",()=>a.cleanup(V)),K(" normalizeRanks",()=>i(V)),K(" assignRankMinMax",()=>M(V)),K(" removeEdgeLabelProxies",()=>$(V)),K(" normalize.run",()=>t.run(V)),K(" parentDummyChains",()=>s(V)),K(" addBorderSegments",()=>c(V)),K(" order",()=>d(V,Q)),K(" insertSelfEdges",()=>W(V)),K(" adjustCoordinateSystem",()=>f.adjust(V)),K(" position",()=>m(V)),K(" positionSelfEdges",()=>B(V)),K(" removeBorderNodes",()=>J(V)),K(" normalize.undo",()=>t.undo(V)),K(" fixupEdgeLabelCoords",()=>G(V)),K(" undoCoordinateSystem",()=>f.undo(V)),K(" translateGraph",()=>Z(V)),K(" assignNodeIntersects",()=>j(V)),K(" reversePoints",()=>q(V)),K(" acyclic.undo",()=>e.undo(V))}function w(V,K){V.nodes().forEach(Q=>{let re=V.node(Q),se=K.node(Q);re&&(re.x=se.x,re.y=se.y,re.rank=se.rank,K.children(Q).length&&(re.width=se.width,re.height=se.height))}),V.edges().forEach(Q=>{let re=V.edge(Q),se=K.edge(Q);re.points=se.points,Object.hasOwn(se,"x")&&(re.x=se.x,re.y=se.y)}),V.graph().width=K.graph().width,V.graph().height=K.graph().height}let b=["nodesep","edgesep","ranksep","marginx","marginy"],k={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],E=["width","height","rank"],N={width:0,height:0},A=["minlen","weight","width","height","labeloffset"],L={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},R=["labelpos"];function C(V){let K=new g({multigraph:!0,compound:!0}),Q=H(V.graph());return K.setGraph(Object.assign({},k,D(Q,b),p.pick(Q,_))),V.nodes().forEach(re=>{let se=H(V.node(re));const ee=D(se,E);Object.keys(N).forEach(oe=>{ee[oe]===void 0&&(ee[oe]=N[oe])}),K.setNode(re,ee),K.setParent(re,V.parent(re))}),V.edges().forEach(re=>{let se=H(V.edge(re));K.setEdge(re,Object.assign({},L,D(se,A),p.pick(se,R)))}),K}function P(V){let K=V.graph();K.ranksep/=2,V.edges().forEach(Q=>{let re=V.edge(Q);re.minlen*=2,re.labelpos.toLowerCase()!=="c"&&(K.rankdir==="TB"||K.rankdir==="BT"?re.width+=re.labeloffset:re.height+=re.labeloffset)})}function F(V){V.edges().forEach(K=>{let Q=V.edge(K);if(Q.width&&Q.height){let re=V.node(K.v),ee={rank:(V.node(K.w).rank-re.rank)/2+re.rank,e:K};p.addDummyNode(V,"edge-proxy",ee,"_ep")}})}function M(V){let K=0;V.nodes().forEach(Q=>{let re=V.node(Q);re.borderTop&&(re.minRank=V.node(re.borderTop).rank,re.maxRank=V.node(re.borderBottom).rank,K=Math.max(K,re.maxRank))}),V.graph().maxRank=K}function $(V){V.nodes().forEach(K=>{let Q=V.node(K);Q.dummy==="edge-proxy"&&(V.edge(Q.e).labelRank=Q.rank,V.removeNode(K))})}function Z(V){let K=Number.POSITIVE_INFINITY,Q=0,re=Number.POSITIVE_INFINITY,se=0,ee=V.graph(),oe=ee.marginx||0,de=ee.marginy||0;function xe(he){let fe=he.x,ke=he.y,Pe=he.width,Ae=he.height;K=Math.min(K,fe-Pe/2),Q=Math.max(Q,fe+Pe/2),re=Math.min(re,ke-Ae/2),se=Math.max(se,ke+Ae/2)}V.nodes().forEach(he=>xe(V.node(he))),V.edges().forEach(he=>{let fe=V.edge(he);Object.hasOwn(fe,"x")&&xe(fe)}),K-=oe,re-=de,V.nodes().forEach(he=>{let fe=V.node(he);fe.x-=K,fe.y-=re}),V.edges().forEach(he=>{let fe=V.edge(he);fe.points.forEach(ke=>{ke.x-=K,ke.y-=re}),Object.hasOwn(fe,"x")&&(fe.x-=K),Object.hasOwn(fe,"y")&&(fe.y-=re)}),ee.width=Q-K+oe,ee.height=se-re+de}function j(V){V.edges().forEach(K=>{let Q=V.edge(K),re=V.node(K.v),se=V.node(K.w),ee,oe;Q.points?(ee=Q.points[0],oe=Q.points[Q.points.length-1]):(Q.points=[],ee=se,oe=re),Q.points.unshift(p.intersectRect(re,ee)),Q.points.push(p.intersectRect(se,oe))})}function G(V){V.edges().forEach(K=>{let Q=V.edge(K);if(Object.hasOwn(Q,"x"))switch((Q.labelpos==="l"||Q.labelpos==="r")&&(Q.width-=Q.labeloffset),Q.labelpos){case"l":Q.x-=Q.width/2+Q.labeloffset;break;case"r":Q.x+=Q.width/2+Q.labeloffset;break}})}function q(V){V.edges().forEach(K=>{let Q=V.edge(K);Q.reversed&&Q.points.reverse()})}function J(V){V.nodes().forEach(K=>{if(V.children(K).length){let Q=V.node(K),re=V.node(Q.borderTop),se=V.node(Q.borderBottom),ee=V.node(Q.borderLeft[Q.borderLeft.length-1]),oe=V.node(Q.borderRight[Q.borderRight.length-1]);Q.width=Math.abs(oe.x-ee.x),Q.height=Math.abs(se.y-re.y),Q.x=ee.x+Q.width/2,Q.y=re.y+Q.height/2}}),V.nodes().forEach(K=>{V.node(K).dummy==="border"&&V.removeNode(K)})}function Y(V){V.edges().forEach(K=>{if(K.v===K.w){var Q=V.node(K.v);Q.selfEdges||(Q.selfEdges=[]),Q.selfEdges.push({e:K,label:V.edge(K)}),V.removeEdge(K)}})}function W(V){var K=p.buildLayerMatrix(V);K.forEach(Q=>{var re=0;Q.forEach((se,ee)=>{var oe=V.node(se);oe.order=ee+re,(oe.selfEdges||[]).forEach(de=>{p.addDummyNode(V,"selfedge",{width:de.label.width,height:de.label.height,rank:oe.rank,order:ee+ ++re,e:de.e,label:de.label},"_se")}),delete oe.selfEdges})})}function B(V){V.nodes().forEach(K=>{var Q=V.node(K);if(Q.dummy==="selfedge"){var re=V.node(Q.e.v),se=re.x+re.width/2,ee=re.y,oe=Q.x-se,de=re.height/2;V.setEdge(Q.e,Q.label),V.removeNode(K),Q.label.points=[{x:se+2*oe/3,y:ee-de},{x:se+5*oe/6,y:ee-de},{x:se+oe,y:ee},{x:se+5*oe/6,y:ee+de},{x:se+2*oe/3,y:ee+de}],Q.label.x=Q.x,Q.label.y=Q.y}})}function D(V,K){return p.mapValues(p.pick(V,K),Number)}function H(V){var K={};return V&&Object.entries(V).forEach(([Q,re])=>{typeof Q=="string"&&(Q=Q.toLowerCase()),K[Q]=re}),K}return Md}var Rd,J0;function VP(){if(J0)return Rd;J0=1;let e=et(),t=mn().Graph;Rd={debugOrdering:n};function n(i){let s=e.buildLayerMatrix(i),l=new t({compound:!0,multigraph:!0}).setGraph({});return i.nodes().forEach(a=>{l.setNode(a,{label:a}),l.setParent(a,"layer"+i.node(a).rank)}),i.edges().forEach(a=>l.setEdge(a.v,a.w,{},a.name)),s.forEach((a,c)=>{let f="layer"+c;l.setNode(f,{rank:"same"}),a.reduce((d,m)=>(l.setEdge(d,m,{style:"invis"}),m))}),l}return Rd}var Dd,Z0;function HP(){return Z0||(Z0=1,Dd="1.1.8"),Dd}var jd,ev;function WP(){return ev||(ev=1,jd={graphlib:mn(),layout:BP(),debug:VP(),util:{time:et().time,notime:et().notime},version:HP()}),jd}var UP=WP();const tv=su(UP),nv=220,rv=140,$d=60;function qP(e){return T.useMemo(()=>{if(!e)return{nodes:[],edges:[]};const t=new tv.graphlib.Graph;t.setDefaultEdgeLabel(()=>({})),t.setGraph({rankdir:"LR",nodesep:40,ranksep:80});for(const s of e.nodes){const l=s.type==="task.branch"||s.type.startsWith("trigger.")?rv:nv;t.setNode(s.id,{width:l,height:$d})}for(const s of e.edges)t.setEdge(s.from,s.to);tv.layout(t);const n=e.nodes.map(s=>{const l=t.node(s.id),a=s.type==="task.branch"||s.type.startsWith("trigger.")?rv:nv;return{id:s.id,type:s.type==="agent.run"?"agentNode":"workflowNode",position:{x:l.x-a/2,y:l.y-$d/2},data:{node:s},width:a,height:$d}}),i=e.edges.map((s,l)=>({id:`e-${l}`,source:s.from,target:s.to,label:s.when,type:"smoothstep",style:{stroke:"hsl(240 5% 65%)",strokeWidth:1.5},labelStyle:{fontSize:11,fontFamily:"JetBrains Mono, monospace"}}));return{nodes:n,edges:i}},[e])}const YP={workflowNode:l0,agentNode:l0};function KP({workflow:e,onNodeClick:t,onLoadYaml:n,nodeStatuses:i={}}){const{nodes:s,edges:l}=qP(e),[a,c]=T.useState(!1),f=s.map(v=>({...v,data:{...v.data,onNodeClick:t,liveStatus:i[v.id]??"idle"}})),d=T.useCallback((v,S)=>{const w=S.data.node;w&&t(w)},[t]),m=T.useCallback(v=>{v.preventDefault(),v.dataTransfer.dropEffect="copy",c(!0)},[]),p=T.useCallback(()=>{c(!1)},[]),g=T.useCallback(v=>{v.preventDefault(),c(!1);const S=v.dataTransfer.files[0];if(!S)return;const w=new FileReader;w.onload=b=>{var _;const k=(_=b.target)==null?void 0:_.result;typeof k=="string"&&n(k)},w.readAsText(S)},[n]);return O.jsxs("div",{className:"flex-1 relative canvas-grid overflow-hidden",style:{height:"100%"},onDragOver:m,onDragLeave:p,onDrop:g,children:[O.jsxs(BI,{nodes:f,edges:l,nodeTypes:YP,onNodeClick:d,fitView:!0,attributionPosition:"bottom-right",children:[O.jsx(qI,{variant:Gn.Dots,gap:22,size:1,color:"hsl(240 5.9% 88%)"}),O.jsx(ZI,{})]}),a&&O.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-bg/70 border-2 border-dashed border-primary pointer-events-none z-10",children:O.jsx("span",{className:"text-sm font-medium text-primary",children:"Drop YAML here"})}),O.jsx("div",{className:"absolute bottom-3 right-14 text-[10px] font-mono text-mutedfg pointer-events-none",children:"layout: auto (dagre) · positions not stored"})]})}function bt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function iv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GP(...e){return t=>{let n=!1;const i=e.map(s=>{const l=iv(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():iv(e[s],null)}}}}function Vt(...e){return T.useCallback(GP(...e),e)}function Hx(e,t=[]){let n=[];function i(l,a){const c=T.createContext(a);c.displayName=l+"Context";const f=n.length;n=[...n,a];const d=p=>{var k;const{scope:g,children:v,...S}=p,w=((k=g==null?void 0:g[e])==null?void 0:k[f])||c,b=T.useMemo(()=>S,Object.values(S));return O.jsx(w.Provider,{value:b,children:v})};d.displayName=l+"Provider";function m(p,g){var w;const v=((w=g==null?void 0:g[e])==null?void 0:w[f])||c,S=T.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[d,m]}const s=()=>{const l=n.map(a=>T.createContext(a));return function(c){const f=(c==null?void 0:c[e])||l;return T.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return s.scopeName=e,[i,XP(s,...t)]}function XP(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const a=i.reduce((c,{useScope:f,scopeName:d})=>{const p=f(l)[`__scope${d}`];return{...c,...p}},{});return T.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var ao=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},QP=Sh[" useId ".trim().toString()]||(()=>{}),JP=0;function zd(e){const[t,n]=T.useState(QP());return ao(()=>{n(i=>i??String(JP++))},[e]),e||(t?`radix-${t}`:"")}var ZP=Sh[" useInsertionEffect ".trim().toString()]||ao;function eA({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[s,l,a]=tA({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:s;{const m=T.useRef(e!==void 0);T.useEffect(()=>{const p=m.current;p!==c&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,i])}const d=T.useCallback(m=>{var p;if(c){const g=nA(m)?m(e):m;g!==e&&((p=a.current)==null||p.call(a,g))}else l(m)},[c,e,l,a]);return[f,d]}function tA({defaultProp:e,onChange:t}){const[n,i]=T.useState(e),s=T.useRef(n),l=T.useRef(t);return ZP(()=>{l.current=t},[t]),T.useEffect(()=>{var a;s.current!==n&&((a=l.current)==null||a.call(l,n),s.current=n)},[n,s]),[n,i,l]}function nA(e){return typeof e=="function"}function Wx(e){const t=T.forwardRef((n,i)=>{let{children:s,...l}=n,a=null,c=!1;const f=[];ov(s)&&typeof wa=="function"&&(s=wa(s._payload)),T.Children.forEach(s,g=>{var v;if(lA(g)){c=!0;const S=g;let w="child"in S.props?S.props.child:S.props.children;ov(w)&&typeof wa=="function"&&(w=wa(w._payload)),a=iA(S,w),f.push((v=a==null?void 0:a.props)==null?void 0:v.children)}else f.push(g)}),a?a=T.cloneElement(a,void 0,f):!c&&T.Children.count(s)===1&&T.isValidElement(s)&&(a=s);const d=a?sA(a):void 0,m=Vt(i,d);if(!a){if(s||s===0)throw new Error(c?fA(e):cA(e));return s}const p=oA(l,a.props??{});return a.type!==T.Fragment&&(p.ref=i?m:d),T.cloneElement(a,p)});return t.displayName=`${e}.Slot`,t}var rA=Symbol.for("radix.slottable"),iA=(e,t)=>{if("child"in e.props){const n=e.props.child;return T.isValidElement(n)?T.cloneElement(n,void 0,e.props.children(n.props.children)):null}return T.isValidElement(t)?t:null};function oA(e,t){const n={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?n[i]=(...c)=>{const f=l(...c);return s(...c),f}:s&&(n[i]=s):i==="style"?n[i]={...s,...l}:i==="className"&&(n[i]=[s,l].filter(Boolean).join(" "))}return{...e,...n}}function sA(e){var i,s;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function lA(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rA}var aA=Symbol.for("react.lazy");function ov(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===aA&&"_payload"in e&&uA(e._payload)}function uA(e){return typeof e=="object"&&e!==null&&"then"in e}var cA=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,fA=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,wa=Sh[" use ".trim().toString()],dA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ot=dA.reduce((e,t)=>{const n=Wx(`Primitive.${t}`),i=T.forwardRef((s,l)=>{const{asChild:a,...c}=s,f=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(f,{...c,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function hA(e,t){e&&Bw.flushSync(()=>e.dispatchEvent(t))}function Qt(e){const t=T.useRef(e);return T.useEffect(()=>{t.current=e}),T.useMemo(()=>((...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)}),[])}function pA(e,t=globalThis==null?void 0:globalThis.document){const n=Qt(e);T.useEffect(()=>{const i=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var mA="DismissableLayer",hh="dismissableLayer.update",gA="dismissableLayer.pointerDownOutside",yA="dismissableLayer.focusOutside",sv,Uh=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Ux=T.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:a,onInteractOutside:c,onDismiss:f,...d}=e,m=T.useContext(Uh),[p,g]=T.useState(null),v=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=T.useState({}),w=Vt(t,P=>g(P)),b=Array.from(m.layers),[k]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),_=b.indexOf(k),E=p?b.indexOf(p):-1,N=m.layersWithOutsidePointerEventsDisabled.size>0,A=E>=_,L=T.useRef(!1),R=bA(P=>{const F=P.target;if(!(F instanceof Node))return;const M=[...m.branches].some($=>$.contains(F));!A||M||(l==null||l(P),c==null||c(P),P.defaultPrevented||f==null||f())},{ownerDocument:v,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:L,dismissableSurfaces:m.dismissableSurfaces}),C=SA(P=>{if(i&&L.current)return;const F=P.target;[...m.branches].some($=>$.contains(F))||(a==null||a(P),c==null||c(P),P.defaultPrevented||f==null||f())},v);return pA(P=>{E===m.layers.size-1&&(s==null||s(P),!P.defaultPrevented&&f&&(P.preventDefault(),f()))},v),T.useEffect(()=>{if(p)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(sv=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(p)),m.layers.add(p),lv(),()=>{n&&(m.layersWithOutsidePointerEventsDisabled.delete(p),m.layersWithOutsidePointerEventsDisabled.size===0&&(v.body.style.pointerEvents=sv))}},[p,v,n,m]),T.useEffect(()=>()=>{p&&(m.layers.delete(p),m.layersWithOutsidePointerEventsDisabled.delete(p),lv())},[p,m]),T.useEffect(()=>{const P=()=>S({});return document.addEventListener(hh,P),()=>document.removeEventListener(hh,P)},[]),O.jsx(Ot.div,{...d,ref:w,style:{pointerEvents:N?A?"auto":"none":void 0,...e.style},onFocusCapture:bt(e.onFocusCapture,C.onFocusCapture),onBlurCapture:bt(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:bt(e.onPointerDownCapture,R.onPointerDownCapture)})});Ux.displayName=mA;var vA="DismissableLayerBranch",wA=T.forwardRef((e,t)=>{const n=T.useContext(Uh),i=T.useRef(null),s=Vt(t,i);return T.useEffect(()=>{const l=i.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),O.jsx(Ot.div,{...e,ref:s})});wA.displayName=vA;function xA(){const e=T.useContext(Uh),[t,n]=T.useState(null);return T.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function bA(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:l}=t,a=Qt(e),c=T.useRef(!1),f=T.useRef(!1),d=T.useRef(new Map),m=T.useRef(()=>{});return T.useEffect(()=>{function p(){f.current=!1,s.current=!1,d.current.clear()}function g(){return Array.from(d.current.values()).some(Boolean)}function v(_){if(!f.current)return;const E=_.target;E instanceof Node&&[...l].some(A=>A.contains(E))||d.current.set(_.type,!0),_.type==="click"&&window.setTimeout(()=>{f.current&&m.current()},0)}function S(_){f.current&&d.current.set(_.type,!1)}const w=_=>{if(_.target&&!c.current){let E=function(){n.removeEventListener("click",m.current);const A=g();p(),A||qx(gA,a,N,{discrete:!0})};const N={originalEvent:_};f.current=!0,s.current=i&&_.button===0,d.current.clear(),!i||_.button!==0?E():(n.removeEventListener("click",m.current),m.current=E,n.addEventListener("click",m.current,{once:!0}))}else n.removeEventListener("click",m.current),p();c.current=!1},b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const _ of b)n.addEventListener(_,v,!0),n.addEventListener(_,S);const k=window.setTimeout(()=>{n.addEventListener("pointerdown",w)},0);return()=>{window.clearTimeout(k),n.removeEventListener("pointerdown",w),n.removeEventListener("click",m.current);for(const _ of b)n.removeEventListener(_,v,!0),n.removeEventListener(_,S)}},[n,a,i,s,l]),{onPointerDownCapture:()=>c.current=!0}}function SA(e,t=globalThis==null?void 0:globalThis.document){const n=Qt(e),i=T.useRef(!1);return T.useEffect(()=>{const s=l=>{l.target&&!i.current&&qx(yA,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function lv(){const e=new CustomEvent(hh);document.dispatchEvent(e)}function qx(e,t,n,{discrete:i}){const s=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),i?hA(s,l):s.dispatchEvent(l)}var Fd="focusScope.autoFocusOnMount",Bd="focusScope.autoFocusOnUnmount",av={bubbles:!1,cancelable:!0},kA="FocusScope",Yx=T.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...a}=e,[c,f]=T.useState(null),d=Qt(s),m=Qt(l),p=T.useRef(null),g=Vt(t,w=>f(w)),v=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(i){let w=function(E){if(v.paused||!c)return;const N=E.target;c.contains(N)?p.current=N:kr(p.current,{select:!0})},b=function(E){if(v.paused||!c)return;const N=E.relatedTarget;N!==null&&(c.contains(N)||kr(p.current,{select:!0}))},k=function(E){if(document.activeElement===document.body)for(const A of E)A.removedNodes.length>0&&kr(c)};document.addEventListener("focusin",w),document.addEventListener("focusout",b);const _=new MutationObserver(k);return c&&_.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",b),_.disconnect()}}},[i,c,v.paused]),T.useEffect(()=>{if(c){cv.add(v);const w=document.activeElement;if(!c.contains(w)){const k=new CustomEvent(Fd,av);c.addEventListener(Fd,d),c.dispatchEvent(k),k.defaultPrevented||(EA(TA(Kx(c)),{select:!0}),document.activeElement===w&&kr(c))}return()=>{c.removeEventListener(Fd,d),setTimeout(()=>{const k=new CustomEvent(Bd,av);c.addEventListener(Bd,m),c.dispatchEvent(k),k.defaultPrevented||kr(w??document.body,{select:!0}),c.removeEventListener(Bd,m),cv.remove(v)},0)}}},[c,d,m,v]);const S=T.useCallback(w=>{if(!n&&!i||v.paused)return;const b=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,k=document.activeElement;if(b&&k){const _=w.currentTarget,[E,N]=_A(_);E&&N?!w.shiftKey&&k===N?(w.preventDefault(),n&&kr(E,{select:!0})):w.shiftKey&&k===E&&(w.preventDefault(),n&&kr(N,{select:!0})):k===_&&w.preventDefault()}},[n,i,v.paused]);return O.jsx(Ot.div,{tabIndex:-1,...a,ref:g,onKeyDown:S})});Yx.displayName=kA;function EA(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(kr(i,{select:t}),document.activeElement!==n)return}function _A(e){const t=Kx(e),n=uv(t,e),i=uv(t.reverse(),e);return[n,i]}function Kx(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uv(e,t){for(const n of e)if(!NA(n,{upTo:t}))return n}function NA(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function CA(e){return e instanceof HTMLInputElement&&"select"in e}function kr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&CA(e)&&t&&e.select()}}var cv=IA();function IA(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fv(e,t),e.unshift(t)},remove(t){var n;e=fv(e,t),(n=e[0])==null||n.resume()}}}function fv(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function TA(e){return e.filter(t=>t.tagName!=="A")}var PA="Portal",Gx=T.forwardRef((e,t)=>{var c;const{container:n,...i}=e,[s,l]=T.useState(!1);ao(()=>l(!0),[]);const a=n||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Bw.createPortal(O.jsx(Ot.div,{...i,ref:t}),a):null});Gx.displayName=PA;function AA(e,t){return T.useReducer((n,i)=>t[n][i]??n,e)}var Tr=e=>{const{present:t,children:n}=e,i=OA(t),s=typeof n=="function"?n({present:i.isPresent}):T.Children.only(n),l=LA(i.ref,MA(s));return typeof n=="function"||i.isPresent?T.cloneElement(s,{ref:l}):null};Tr.displayName="Presence";function OA(e){const[t,n]=T.useState(),i=T.useRef(null),s=T.useRef(e),l=T.useRef("none"),a=e?"mounted":"unmounted",[c,f]=AA(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const d=xa(i.current);l.current=c==="mounted"?d:"none"},[c]),ao(()=>{const d=i.current,m=s.current;if(m!==e){const g=l.current,v=xa(d);e?f("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(m&&g!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,f]),ao(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,p=v=>{const w=xa(i.current).includes(CSS.escape(v.animationName));if(v.target===t&&w&&(f("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=v=>{v.target===t&&(l.current=xa(i.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:T.useCallback(d=>{i.current=d?getComputedStyle(d):null,n(d)},[])}}function dv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function LA(...e){const t=T.useRef(e);return t.current=e,T.useCallback(n=>{const i=t.current;let s=!1;const l=i.map(a=>{const c=dv(a,n);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let a=0;a<l.length;a++){const c=l[a];typeof c=="function"?c():dv(i[a],null)}}},[])}function xa(e){return(e==null?void 0:e.animationName)||"none"}function MA(e){var i,s;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ba=0,Cn=null;function RA(){T.useEffect(()=>{Cn||(Cn={start:hv(),end:hv()});const{start:e,end:t}=Cn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),ba++,()=>{ba===1&&(Cn==null||Cn.start.remove(),Cn==null||Cn.end.remove(),Cn=null),ba=Math.max(0,ba-1)}},[])}function hv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Tn=function(){return Tn=Object.assign||function(t){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Tn.apply(this,arguments)};function Xx(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n}function DA(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var ja="right-scroll-bar-position",$a="width-before-scroll-bar",jA="with-scroll-bars-hidden",$A="--removed-body-scroll-bar-size";function Vd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function zA(e,t){var n=T.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var s=n.value;s!==i&&(n.value=i,n.callback(i,s))}}}})[0];return n.callback=t,n.facade}var FA=typeof window<"u"?T.useLayoutEffect:T.useEffect,pv=new WeakMap;function BA(e,t){var n=zA(null,function(i){return e.forEach(function(s){return Vd(s,i)})});return FA(function(){var i=pv.get(n);if(i){var s=new Set(i),l=new Set(e),a=n.current;s.forEach(function(c){l.has(c)||Vd(c,null)}),l.forEach(function(c){s.has(c)||Vd(c,a)})}pv.set(n,e)},[e]),n}function VA(e){return e}function HA(e,t){t===void 0&&(t=VA);var n=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var a=t(l,i);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(l){for(i=!0;n.length;){var a=n;n=[],a.forEach(l)}n={push:function(c){return l(c)},filter:function(){return n}}},assignMedium:function(l){i=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(l),a=n}var f=function(){var m=a;a=[],m.forEach(l)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(m){a.push(m),d()},filter:function(m){return a=a.filter(m),n}}}};return s}function WA(e){e===void 0&&(e={});var t=HA(null);return t.options=Tn({async:!0,ssr:!1},e),t}var Qx=function(e){var t=e.sideCar,n=Xx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return T.createElement(i,Tn({},n))};Qx.isSideCarExport=!0;function UA(e,t){return e.useMedium(t),Qx}var Jx=WA(),Hd=function(){},wu=T.forwardRef(function(e,t){var n=T.useRef(null),i=T.useState({onScrollCapture:Hd,onWheelCapture:Hd,onTouchMoveCapture:Hd}),s=i[0],l=i[1],a=e.forwardProps,c=e.children,f=e.className,d=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,v=e.noRelative,S=e.noIsolation,w=e.inert,b=e.allowPinchZoom,k=e.as,_=k===void 0?"div":k,E=e.gapMode,N=Xx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=g,L=BA([n,t]),R=Tn(Tn({},N),s);return T.createElement(T.Fragment,null,m&&T.createElement(A,{sideCar:Jx,removeScrollBar:d,shards:p,noRelative:v,noIsolation:S,inert:w,setCallbacks:l,allowPinchZoom:!!b,lockRef:n,gapMode:E}),a?T.cloneElement(T.Children.only(c),Tn(Tn({},R),{ref:L})):T.createElement(_,Tn({},R,{className:f,ref:L}),c))});wu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wu.classNames={fullWidth:$a,zeroRight:ja};var qA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function YA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=qA();return t&&e.setAttribute("nonce",t),e}function KA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function GA(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var XA=function(){var e=0,t=null;return{add:function(n){e==0&&(t=YA())&&(KA(t,n),GA(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},QA=function(){var e=XA();return function(t,n){T.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Zx=function(){var e=QA(),t=function(n){var i=n.styles,s=n.dynamic;return e(i,s),null};return t},JA={left:0,top:0,right:0,gap:0},Wd=function(e){return parseInt(e||"",10)||0},ZA=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Wd(n),Wd(i),Wd(s)]},eO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return JA;var t=ZA(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},tO=Zx(),Ji="data-scroll-locked",nO=function(e,t,n,i){var s=e.left,l=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
63
|
+
.`.concat(jA,` {
|
|
64
64
|
overflow: hidden `).concat(i,`;
|
|
65
65
|
padding-right: `).concat(c,"px ").concat(i,`;
|
|
66
66
|
}
|
|
@@ -77,88 +77,88 @@ Error generating stack: `+w.message+`
|
|
|
77
77
|
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.`).concat(
|
|
80
|
+
.`).concat(ja,` {
|
|
81
81
|
right: `).concat(c,"px ").concat(i,`;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
.`).concat(
|
|
84
|
+
.`).concat($a,` {
|
|
85
85
|
margin-right: `).concat(c,"px ").concat(i,`;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.`).concat(
|
|
88
|
+
.`).concat(ja," .").concat(ja,` {
|
|
89
89
|
right: 0 `).concat(i,`;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.`).concat(
|
|
92
|
+
.`).concat($a," .").concat($a,` {
|
|
93
93
|
margin-right: 0 `).concat(i,`;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
body[`).concat(Ji,`] {
|
|
97
|
-
`).concat(
|
|
97
|
+
`).concat($A,": ").concat(c,`px;
|
|
98
98
|
}
|
|
99
|
-
`)},
|
|
99
|
+
`)},mv=function(){var e=parseInt(document.body.getAttribute(Ji)||"0",10);return isFinite(e)?e:0},rO=function(){T.useEffect(function(){return document.body.setAttribute(Ji,(mv()+1).toString()),function(){var e=mv()-1;e<=0?document.body.removeAttribute(Ji):document.body.setAttribute(Ji,e.toString())}},[])},iO=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;rO();var l=T.useMemo(function(){return eO(s)},[s]);return T.createElement(tO,{styles:nO(l,!t,s,n?"":"!important")})},ph=!1;if(typeof window<"u")try{var Sa=Object.defineProperty({},"passive",{get:function(){return ph=!0,!0}});window.addEventListener("test",Sa,Sa),window.removeEventListener("test",Sa,Sa)}catch{ph=!1}var Fi=ph?{passive:!1}:!1,oO=function(e){return e.tagName==="TEXTAREA"},e1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!oO(e)&&n[t]==="visible")},sO=function(e){return e1(e,"overflowY")},lO=function(e){return e1(e,"overflowX")},gv=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=t1(e,i);if(s){var l=n1(e,i),a=l[1],c=l[2];if(a>c)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},aO=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},uO=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},t1=function(e,t){return e==="v"?sO(t):lO(t)},n1=function(e,t){return e==="v"?aO(t):uO(t)},cO=function(e,t){return e==="h"&&t==="rtl"?-1:1},fO=function(e,t,n,i,s){var l=cO(e,window.getComputedStyle(t).direction),a=l*i,c=n.target,f=t.contains(c),d=!1,m=a>0,p=0,g=0;do{if(!c)break;var v=n1(e,c),S=v[0],w=v[1],b=v[2],k=w-b-l*S;(S||k)&&t1(e,c)&&(p+=k,g+=S);var _=c.parentNode;c=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(d=!0),d},ka=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},yv=function(e){return[e.deltaX,e.deltaY]},vv=function(e){return e&&"current"in e?e.current:e},dO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hO=function(e){return`
|
|
100
100
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
101
101
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
102
|
-
`)},
|
|
102
|
+
`)},pO=0,Bi=[];function mO(e){var t=T.useRef([]),n=T.useRef([0,0]),i=T.useRef(),s=T.useState(pO++)[0],l=T.useState(Zx)[0],a=T.useRef(e);T.useEffect(function(){a.current=e},[e]),T.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var w=DA([e.lockRef.current],(e.shards||[]).map(vv),!0).filter(Boolean);return w.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),w.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=T.useCallback(function(w,b){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!a.current.allowPinchZoom;var k=ka(w),_=n.current,E="deltaX"in w?w.deltaX:_[0]-k[0],N="deltaY"in w?w.deltaY:_[1]-k[1],A,L=w.target,R=Math.abs(E)>Math.abs(N)?"h":"v";if("touches"in w&&R==="h"&&L.type==="range")return!1;var C=window.getSelection(),P=C&&C.anchorNode,F=P?P===L||P.contains(L):!1;if(F)return!1;var M=gv(R,L);if(!M)return!0;if(M?A=R:(A=R==="v"?"h":"v",M=gv(R,L)),!M)return!1;if(!i.current&&"changedTouches"in w&&(E||N)&&(i.current=A),!A)return!0;var $=i.current||A;return fO($,b,w,$==="h"?E:N)},[]),f=T.useCallback(function(w){var b=w;if(!(!Bi.length||Bi[Bi.length-1]!==l)){var k="deltaY"in b?yv(b):ka(b),_=t.current.filter(function(A){return A.name===b.type&&(A.target===b.target||b.target===A.shadowParent)&&dO(A.delta,k)})[0];if(_&&_.should){b.cancelable&&b.preventDefault();return}if(!_){var E=(a.current.shards||[]).map(vv).filter(Boolean).filter(function(A){return A.contains(b.target)}),N=E.length>0?c(b,E[0]):!a.current.noIsolation;N&&b.cancelable&&b.preventDefault()}}},[]),d=T.useCallback(function(w,b,k,_){var E={name:w,delta:b,target:k,should:_,shadowParent:gO(k)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(N){return N!==E})},1)},[]),m=T.useCallback(function(w){n.current=ka(w),i.current=void 0},[]),p=T.useCallback(function(w){d(w.type,yv(w),w.target,c(w,e.lockRef.current))},[]),g=T.useCallback(function(w){d(w.type,ka(w),w.target,c(w,e.lockRef.current))},[]);T.useEffect(function(){return Bi.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",f,Fi),document.addEventListener("touchmove",f,Fi),document.addEventListener("touchstart",m,Fi),function(){Bi=Bi.filter(function(w){return w!==l}),document.removeEventListener("wheel",f,Fi),document.removeEventListener("touchmove",f,Fi),document.removeEventListener("touchstart",m,Fi)}},[]);var v=e.removeScrollBar,S=e.inert;return T.createElement(T.Fragment,null,S?T.createElement(l,{styles:hO(s)}):null,v?T.createElement(iO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const yO=UA(Jx,mO);var r1=T.forwardRef(function(e,t){return T.createElement(wu,Tn({},e,{ref:t,sideCar:yO}))});r1.classNames=wu.classNames;var vO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vi=new WeakMap,Ea=new WeakMap,_a={},Ud=0,i1=function(e){return e&&(e.host||i1(e.parentNode))},wO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=i1(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},xO=function(e,t,n,i){var s=wO(t,Array.isArray(e)?e:[e]);_a[n]||(_a[n]=new WeakMap);var l=_a[n],a=[],c=new Set,f=new Set(s),d=function(p){!p||c.has(p)||(c.add(p),d(p.parentNode))};s.forEach(d);var m=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(g){if(c.has(g))m(g);else try{var v=g.getAttribute(i),S=v!==null&&v!=="false",w=(Vi.get(g)||0)+1,b=(l.get(g)||0)+1;Vi.set(g,w),l.set(g,b),a.push(g),w===1&&S&&Ea.set(g,!0),b===1&&g.setAttribute(n,"true"),S||g.setAttribute(i,"true")}catch(k){console.error("aria-hidden: cannot operate on ",g,k)}})};return m(t),c.clear(),Ud++,function(){a.forEach(function(p){var g=Vi.get(p)-1,v=l.get(p)-1;Vi.set(p,g),l.set(p,v),g||(Ea.has(p)||p.removeAttribute(i),Ea.delete(p)),v||p.removeAttribute(n)}),Ud--,Ud||(Vi=new WeakMap,Vi=new WeakMap,Ea=new WeakMap,_a={})}},bO=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=vO(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),xO(i,s,n,"aria-hidden")):function(){return null}},xu="Dialog",[o1]=Hx(xu),[SO,yn]=o1(xu),s1=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:s,onOpenChange:l,modal:a=!0}=e,c=T.useRef(null),f=T.useRef(null),[d,m]=eA({prop:i,defaultProp:s??!1,onChange:l,caller:xu});return O.jsx(SO,{scope:t,triggerRef:c,contentRef:f,contentId:zd(),titleId:zd(),descriptionId:zd(),open:d,onOpenChange:m,onOpenToggle:T.useCallback(()=>m(p=>!p),[m]),modal:a,children:n})};s1.displayName=xu;var l1="DialogTrigger",kO=T.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=yn(l1,n),l=Vt(t,s.triggerRef);return O.jsx(Ot.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":Xh(s.open),...i,ref:l,onClick:bt(e.onClick,s.onOpenToggle)})});kO.displayName=l1;var qh="DialogPortal",[EO,a1]=o1(qh,{forceMount:void 0}),u1=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:s}=e,l=yn(qh,t);return O.jsx(EO,{scope:t,forceMount:n,children:T.Children.map(i,a=>O.jsx(Tr,{present:n||l.open,children:O.jsx(Gx,{asChild:!0,container:s,children:a})}))})};u1.displayName=qh;var eu="DialogOverlay",Yh=T.forwardRef((e,t)=>{const n=a1(eu,e.__scopeDialog),{forceMount:i=n.forceMount,...s}=e,l=yn(eu,e.__scopeDialog);return l.modal?O.jsx(Tr,{present:i||l.open,children:O.jsx(NO,{...s,ref:t})}):null});Yh.displayName=eu;var _O=Wx("DialogOverlay.RemoveScroll"),NO=T.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=yn(eu,n),l=xA(),a=Vt(t,l);return O.jsx(r1,{as:_O,allowPinchZoom:!0,shards:[s.contentRef],children:O.jsx(Ot.div,{"data-state":Xh(s.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),uo="DialogContent",Kh=T.forwardRef((e,t)=>{const n=a1(uo,e.__scopeDialog),{forceMount:i=n.forceMount,...s}=e,l=yn(uo,e.__scopeDialog);return O.jsx(Tr,{present:i||l.open,children:l.modal?O.jsx(CO,{...s,ref:t}):O.jsx(IO,{...s,ref:t})})});Kh.displayName=uo;var CO=T.forwardRef((e,t)=>{const n=yn(uo,e.__scopeDialog),i=T.useRef(null),s=Vt(t,n.contentRef,i);return T.useEffect(()=>{const l=i.current;if(l)return bO(l)},[]),O.jsx(c1,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:bt(e.onCloseAutoFocus,l=>{var a;l.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:bt(e.onPointerDownOutside,l=>{const a=l.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&l.preventDefault()}),onFocusOutside:bt(e.onFocusOutside,l=>l.preventDefault())})}),IO=T.forwardRef((e,t)=>{const n=yn(uo,e.__scopeDialog),i=T.useRef(!1),s=T.useRef(!1);return O.jsx(c1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var a,c;(a=e.onCloseAutoFocus)==null||a.call(e,l),l.defaultPrevented||(i.current||(c=n.triggerRef.current)==null||c.focus(),l.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:l=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=l.target;((d=n.triggerRef.current)==null?void 0:d.contains(a))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()}})}),c1=T.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,...a}=e,c=yn(uo,n);return RA(),O.jsx(O.Fragment,{children:O.jsx(Yx,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:l,children:O.jsx(Ux,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Xh(c.open),...a,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),f1="DialogTitle",Gh=T.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=yn(f1,n);return O.jsx(Ot.h2,{id:s.titleId,...i,ref:t})});Gh.displayName=f1;var d1="DialogDescription",TO=T.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=yn(d1,n);return O.jsx(Ot.p,{id:s.descriptionId,...i,ref:t})});TO.displayName=d1;var h1="DialogClose",p1=T.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=yn(h1,n);return O.jsx(Ot.button,{type:"button",...i,ref:t,onClick:bt(e.onClick,()=>s.onOpenChange(!1))})});p1.displayName=h1;function Xh(e){return e?"open":"closed"}/**
|
|
103
103
|
* @license lucide-react v0.513.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const PO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),AO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),wv=e=>{const t=AO(e);return t.charAt(0).toUpperCase()+t.slice(1)},m1=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),OO=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
108
108
|
* @license lucide-react v0.513.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/var
|
|
112
|
+
*/var LO={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"};/**
|
|
113
113
|
* @license lucide-react v0.513.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
117
|
+
*/const MO=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:a,...c},f)=>T.createElement("svg",{ref:f,...LO,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:m1("lucide",s),...!l&&!OO(c)&&{"aria-hidden":"true"},...c},[...a.map(([d,m])=>T.createElement(d,m)),...Array.isArray(l)?l:[l]]));/**
|
|
118
118
|
* @license lucide-react v0.513.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const RO=(e,t)=>{const n=T.forwardRef(({className:i,...s},l)=>T.createElement(MO,{ref:l,iconNode:t,className:m1(`lucide-${PO(wv(e))}`,`lucide-${e}`,i),...s}));return n.displayName=wv(e),n};/**
|
|
123
123
|
* @license lucide-react v0.513.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const RO=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],DO=MO("x",RO),jO=ix,$O=lx,px=T.forwardRef(({className:e,...t},n)=>O.jsx(qh,{className:at("fixed inset-0 z-50 bg-black/20",e),...t,ref:n}));px.displayName=qh.displayName;const mx=T.forwardRef(({side:e="right",className:t,children:n,...i},s)=>O.jsxs($O,{children:[O.jsx(px,{}),O.jsxs(Yh,{ref:s,className:at("fixed z-50 bg-bg shadow-lg transition flex flex-col",e==="right"&&"inset-y-0 right-0 w-80 border-l border-border",e==="left"&&"inset-y-0 left-0 w-80 border-r border-border",t),...i,children:[n,O.jsxs(dx,{className:"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100",children:[O.jsx(DO,{className:"h-4 w-4"}),O.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));mx.displayName=Yh.displayName;const gx=({className:e,...t})=>O.jsx("div",{className:at("flex flex-col space-y-2 p-4 border-b border-border",e),...t});gx.displayName="SheetHeader";const yx=T.forwardRef(({className:e,...t},n)=>O.jsx(Kh,{ref:n,className:at("font-semibold",e),...t}));yx.displayName=Kh.displayName;var zO=T.createContext(void 0);function FO(e){const t=T.useContext(zO);return e||t||"ltr"}function BO(e,[t,n]){return Math.min(n,Math.max(t,e))}function VO(e,t){return T.useReducer((n,i)=>t[n][i]??n,e)}var Xh="ScrollArea",[vx]=B1(Xh),[HO,tn]=vx(Xh),wx=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:i="hover",dir:s,scrollHideDelay:l=600,...a}=e,[c,f]=T.useState(null),[d,m]=T.useState(null),[p,g]=T.useState(null),[v,S]=T.useState(null),[x,b]=T.useState(null),[k,_]=T.useState(0),[E,N]=T.useState(0),[A,L]=T.useState(!1),[R,C]=T.useState(!1),P=Vt(t,M=>f(M)),F=FO(s);return O.jsx(HO,{scope:n,type:i,dir:F,scrollHideDelay:l,scrollArea:c,viewport:d,onViewportChange:m,content:p,onContentChange:g,scrollbarX:v,onScrollbarXChange:S,scrollbarXEnabled:A,onScrollbarXEnabledChange:L,scrollbarY:x,onScrollbarYChange:b,scrollbarYEnabled:R,onScrollbarYEnabledChange:C,onCornerWidthChange:_,onCornerHeightChange:N,children:O.jsx(Ot.div,{dir:F,...a,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":k+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});wx.displayName=Xh;var xx="ScrollAreaViewport",bx=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:i,nonce:s,...l}=e,a=tn(xx,n),c=T.useRef(null),f=Vt(t,c,a.onViewportChange);return O.jsxs(O.Fragment,{children:[O.jsx(UO,{nonce:s}),O.jsx(Ot.div,{"data-radix-scroll-area-viewport":"",...l,ref:f,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:O.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});bx.displayName=xx;var UO=T.memo(({nonce:e})=>O.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),Ln="ScrollAreaScrollbar",Qh=T.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=tn(Ln,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:a}=s,c=e.orientation==="horizontal";return T.useEffect(()=>(c?l(!0):a(!0),()=>{c?l(!1):a(!1)}),[c,l,a]),s.type==="hover"?O.jsx(WO,{...i,ref:t,forceMount:n}):s.type==="scroll"?O.jsx(qO,{...i,ref:t,forceMount:n}):s.type==="auto"?O.jsx(Sx,{...i,ref:t,forceMount:n}):s.type==="always"?O.jsx(Jh,{...i,ref:t,"data-state":"visible"}):null});Qh.displayName=Ln;var WO=T.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=tn(Ln,e.__scopeScrollArea),[l,a]=T.useState(!1);return T.useEffect(()=>{const c=s.scrollArea;let f=0;if(c){const d=()=>{window.clearTimeout(f),a(!0)},m=()=>{f=window.setTimeout(()=>a(!1),s.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",m)}}},[s.scrollArea,s.scrollHideDelay]),O.jsx(Tr,{present:n||l,children:O.jsx(Sx,{"data-state":l?"visible":"hidden",...i,ref:t})})}),qO=T.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=tn(Ln,e.__scopeScrollArea),l=e.orientation==="horizontal",a=bu(()=>f("SCROLL_END"),100),[c,f]=VO("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return T.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>f("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,s.scrollHideDelay,f]),T.useEffect(()=>{const d=s.viewport,m=l?"scrollLeft":"scrollTop";if(d){let p=d[m];const g=()=>{const v=d[m];p!==v&&(f("SCROLL"),a()),p=v};return d.addEventListener("scroll",g),()=>d.removeEventListener("scroll",g)}},[s.viewport,l,f,a]),O.jsx(Tr,{present:n||c!=="hidden",children:O.jsx(Jh,{"data-state":c==="hidden"?"hidden":"visible",...i,ref:t,onPointerEnter:bt(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:bt(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),Sx=T.forwardRef((e,t)=>{const n=tn(Ln,e.__scopeScrollArea),{forceMount:i,...s}=e,[l,a]=T.useState(!1),c=e.orientation==="horizontal",f=bu(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;a(c?d:m)}},10);return co(n.viewport,f),co(n.content,f),O.jsx(Tr,{present:i||l,children:O.jsx(Jh,{"data-state":l?"visible":"hidden",...s,ref:t})})}),Jh=T.forwardRef((e,t)=>{const{orientation:n="vertical",...i}=e,s=tn(Ln,e.__scopeScrollArea),l=T.useRef(null),a=T.useRef(0),[c,f]=T.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Cx(c.viewport,c.content),m={...i,sizes:c,onSizesChange:f,hasThumb:d>0&&d<1,onThumbChange:g=>l.current=g,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:g=>a.current=g};function p(g,v){return JO(g,a.current,c,v)}return n==="horizontal"?O.jsx(YO,{...m,ref:t,onThumbPositionChange:()=>{if(s.viewport&&l.current){const g=s.viewport.scrollLeft,v=vv(g,c,s.dir);l.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollLeft=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollLeft=p(g,s.dir))}}):n==="vertical"?O.jsx(KO,{...m,ref:t,onThumbPositionChange:()=>{if(s.viewport&&l.current){const g=s.viewport.scrollTop,v=vv(g,c);l.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollTop=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollTop=p(g))}}):null}),YO=T.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...s}=e,l=tn(Ln,e.__scopeScrollArea),[a,c]=T.useState(),f=T.useRef(null),d=Vt(t,f,l.onScrollbarXChange);return T.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),O.jsx(Ex,{"data-orientation":"horizontal",...s,ref:d,sizes:n,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":xu(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,p)=>{if(l.viewport){const g=l.viewport.scrollLeft+m.deltaX;e.onWheelScroll(g),Tx(g,p)&&m.preventDefault()}},onResize:()=>{f.current&&l.viewport&&a&&i({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:tu(a.paddingLeft),paddingEnd:tu(a.paddingRight)}})}})}),KO=T.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...s}=e,l=tn(Ln,e.__scopeScrollArea),[a,c]=T.useState(),f=T.useRef(null),d=Vt(t,f,l.onScrollbarYChange);return T.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),O.jsx(Ex,{"data-orientation":"vertical",...s,ref:d,sizes:n,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":xu(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,p)=>{if(l.viewport){const g=l.viewport.scrollTop+m.deltaY;e.onWheelScroll(g),Tx(g,p)&&m.preventDefault()}},onResize:()=>{f.current&&l.viewport&&a&&i({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:tu(a.paddingTop),paddingEnd:tu(a.paddingBottom)}})}})}),[GO,kx]=vx(Ln),Ex=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:s,onThumbChange:l,onThumbPointerUp:a,onThumbPointerDown:c,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:m,onResize:p,...g}=e,v=tn(Ln,n),[S,x]=T.useState(null),b=Vt(t,P=>x(P)),k=T.useRef(null),_=T.useRef(""),E=v.viewport,N=i.content-i.viewport,A=Qt(m),L=Qt(f),R=bu(p,10);function C(P){if(k.current){const F=P.clientX-k.current.left,M=P.clientY-k.current.top;d({x:F,y:M})}}return T.useEffect(()=>{const P=F=>{const M=F.target;(S==null?void 0:S.contains(M))&&A(F,N)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[E,S,N,A]),T.useEffect(L,[i,L]),co(S,R),co(v.content,R),O.jsx(GO,{scope:n,scrollbar:S,hasThumb:s,onThumbChange:Qt(l),onThumbPointerUp:Qt(a),onThumbPositionChange:L,onThumbPointerDown:Qt(c),children:O.jsx(Ot.div,{...g,ref:b,style:{position:"absolute",...g.style},onPointerDown:bt(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),k.current=S.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),C(P))}),onPointerMove:bt(e.onPointerMove,C),onPointerUp:bt(e.onPointerUp,P=>{const F=P.target;F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=_.current,v.viewport&&(v.viewport.style.scrollBehavior=""),k.current=null})})})}),eu="ScrollAreaThumb",_x=T.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=kx(eu,e.__scopeScrollArea);return O.jsx(Tr,{present:n||s.hasThumb,children:O.jsx(XO,{ref:t,...i})})}),XO=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:i,...s}=e,l=tn(eu,n),a=kx(eu,n),{onThumbPositionChange:c}=a,f=Vt(t,p=>a.onThumbChange(p)),d=T.useRef(void 0),m=bu(()=>{d.current&&(d.current(),d.current=void 0)},100);return T.useEffect(()=>{const p=l.viewport;if(p){const g=()=>{if(m(),!d.current){const v=ZO(p,c);d.current=v,c()}};return c(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[l.viewport,m,c]),O.jsx(Ot.div,{"data-state":a.hasThumb?"visible":"hidden",...s,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:bt(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),S=p.clientX-v.left,x=p.clientY-v.top;a.onThumbPointerDown({x:S,y:x})}),onPointerUp:bt(e.onPointerUp,a.onThumbPointerUp)})});_x.displayName=eu;var Zh="ScrollAreaCorner",Nx=T.forwardRef((e,t)=>{const n=tn(Zh,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?O.jsx(QO,{...e,ref:t}):null});Nx.displayName=Zh;var QO=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,...i}=e,s=tn(Zh,n),[l,a]=T.useState(0),[c,f]=T.useState(0),d=!!(l&&c);return co(s.scrollbarX,()=>{var p;const m=((p=s.scrollbarX)==null?void 0:p.offsetHeight)||0;s.onCornerHeightChange(m),f(m)}),co(s.scrollbarY,()=>{var p;const m=((p=s.scrollbarY)==null?void 0:p.offsetWidth)||0;s.onCornerWidthChange(m),a(m)}),d?O.jsx(Ot.div,{...i,ref:t,style:{width:l,height:c,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function tu(e){return e?parseInt(e,10):0}function Cx(e,t){const n=e/t;return isNaN(n)?0:n}function xu(e){const t=Cx(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}function JO(e,t,n,i="ltr"){const s=xu(n),l=s/2,a=t||l,c=s-a,f=n.scrollbar.paddingStart+a,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,m=n.content-n.viewport,p=i==="ltr"?[0,m]:[m*-1,0];return Ix([f,d],p)(e)}function vv(e,t,n="ltr"){const i=xu(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-s,a=t.content-t.viewport,c=l-i,f=n==="ltr"?[0,a]:[a*-1,0],d=BO(e,f);return Ix([0,a],[0,c])(d)}function Ix(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}function Tx(e,t){return e>0&&e<t}var ZO=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},i=0;return(function s(){const l={left:e.scrollLeft,top:e.scrollTop},a=n.left!==l.left,c=n.top!==l.top;(a||c)&&t(),n=l,i=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(i)};function bu(e,t){const n=Qt(e),i=T.useRef(0);return T.useEffect(()=>()=>window.clearTimeout(i.current),[]),T.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}function co(e,t){const n=Qt(t);ao(()=>{let i=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(i),s.unobserve(e)}}},[e,n])}var Px=wx,eL=bx,tL=Nx;const Ax=T.forwardRef(({className:e,children:t,...n},i)=>O.jsxs(Px,{ref:i,className:at("relative overflow-hidden",e),...n,children:[O.jsx(eL,{className:"h-full w-full rounded-[inherit]",children:t}),O.jsx(Ox,{}),O.jsx(tL,{})]}));Ax.displayName=Px.displayName;const Ox=T.forwardRef(({className:e,orientation:t="vertical",...n},i)=>O.jsx(Qh,{ref:i,orientation:t,className:at("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:O.jsx(_x,{className:"relative flex-1 rounded-full bg-border"})}));Ox.displayName=Qh.displayName;const wv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xv=x1,nL=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return xv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:l}=t,a=Object.keys(s).map(d=>{const m=n==null?void 0:n[d],p=l==null?void 0:l[d];if(m===null)return null;const g=wv(m)||wv(p);return s[d][g]}),c=n&&Object.entries(n).reduce((d,m)=>{let[p,g]=m;return g===void 0||(d[p]=g),d},{}),f=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((d,m)=>{let{class:p,className:g,...v}=m;return Object.entries(v).every(S=>{let[x,b]=S;return Array.isArray(b)?b.includes({...l,...c}[x]):{...l,...c}[x]===b})?[...d,p,g]:d},[]);return xv(e,a,f,n==null?void 0:n.class,n==null?void 0:n.className)},rL=nL("inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-mono font-medium uppercase tracking-wide transition-colors",{variants:{variant:{default:"bg-fg text-bg",agent:"bg-agent/10 text-agent",muted:"bg-muted text-mutedfg"}},defaultVariants:{variant:"default"}});function iL({className:e,variant:t,...n}){return O.jsx("div",{className:at(rL({variant:t}),e),...n})}function oL({node:e,onClose:t}){const n=(e==null?void 0:e.type)==="agent.run";return O.jsx(jO,{open:!!e,onOpenChange:i=>!i&&t(),children:O.jsxs(mx,{side:"right",children:[O.jsx(gx,{children:O.jsxs(yx,{className:"flex items-center gap-2",children:[n&&O.jsx(iL,{variant:"agent",children:"agent"}),O.jsx("span",{className:n?"text-agent":void 0,children:e==null?void 0:e.id})]})}),O.jsx(Ax,{className:"flex-1 p-4",children:e&&O.jsxs("div",{className:"space-y-4",children:[O.jsxs("div",{children:[O.jsx("label",{className:"text-[11px] uppercase tracking-wider text-mutedfg",children:"Type"}),O.jsx("div",{className:"mt-1 font-mono text-[12px] px-2.5 py-1.5 bg-muted rounded-md",children:e.type})]}),O.jsxs("div",{children:[O.jsx("label",{className:"text-[11px] uppercase tracking-wider text-mutedfg",children:"ID"}),O.jsx("div",{className:"mt-1 font-mono text-[12px] px-2.5 py-1.5 bg-muted rounded-md",children:e.id})]}),O.jsxs("div",{children:[O.jsx("label",{className:"text-[11px] uppercase tracking-wider text-mutedfg",children:"Config"}),O.jsx("pre",{className:"mt-1 text-[11px] font-mono bg-muted rounded-md p-2.5 overflow-x-auto leading-relaxed whitespace-pre-wrap break-all",children:JSON.stringify(e.config,null,2)})]}),e.retry&&O.jsxs("div",{children:[O.jsx("label",{className:"text-[11px] uppercase tracking-wider text-mutedfg",children:"Retry"}),O.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[O.jsxs("div",{className:"px-2.5 py-1.5 border border-border rounded-md",children:[O.jsx("span",{className:"text-mutedfg text-[11px]",children:"attempts"})," ",O.jsx("span",{className:"font-mono",children:e.retry.maxAttempts})]}),O.jsxs("div",{className:"px-2.5 py-1.5 border border-border rounded-md",children:[O.jsx("span",{className:"text-mutedfg text-[11px]",children:"backoff"})," ",O.jsxs("span",{className:"font-mono",children:[e.retry.backoffMs,"ms"]})]})]})]})]})})]})})}function sL(e){return e==="running"?"bg-run pulse-dot":e==="success"?"bg-ok":"bg-fail"}function lL(e){return e==="running"?"running":e==="success"?"success":"failed"}function aL(e){if(!e.finishedAt)return"…";const t=e.finishedAt-e.startedAt;return t>=1e3?`${(t/1e3).toFixed(1)}s`:`${t}ms`}function uL(e){const t=Date.now()-e;return t<5e3?"just now":t<6e4?`${Math.round(t/1e3)}s ago`:t<36e5?`${Math.round(t/6e4)}m ago`:`${Math.round(t/36e5)}h ago`}function cL({runs:e,connected:t}){return O.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[O.jsxs("header",{className:"h-12 shrink-0 bg-bg border-b border-border flex items-center px-4 gap-3",children:[O.jsx("h1",{className:"font-semibold tracking-tight",children:"Runs"}),O.jsx("span",{className:"text-[11px] text-mutedfg",children:"ephemeral activity stream · nothing persisted beyond the surfaces"}),O.jsxs("div",{className:"ml-auto flex items-center gap-1.5 text-[11px] text-mutedfg",children:[O.jsx("span",{"data-testid":"live-dot",className:at("size-1.5 rounded-full",t?"bg-ok pulse-dot":"bg-border")}),t?"live":"offline"]})]}),O.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-2 max-w-3xl",children:[e.length===0&&O.jsx("div",{className:"text-[12px] text-mutedfg px-1 py-4 text-center",children:t?"No runs yet — waiting for the scheduler…":"Connect a flow-server to see live runs."}),e.map(n=>O.jsx("div",{"data-testid":"run-row","data-run-status":n.status,className:"bg-bg border border-border rounded-lg",children:O.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border",children:[O.jsx("span",{className:at("size-1.5 rounded-full flex-shrink-0",sL(n.status))}),O.jsx("span",{className:"font-medium",children:n.workflow}),O.jsxs("span",{className:"font-mono text-[11px] text-mutedfg",children:[n.id," · ",uL(n.startedAt),n.finishedAt&&` · ${aL(n)}`]}),O.jsx("span",{className:at("ml-auto text-[11px] font-medium",n.status==="running"&&"text-run",n.status==="success"&&"text-ok",n.status==="failed"&&"text-fail"),children:lL(n.status)})]})},n.id))]})]})}const ep=Symbol.for("yaml.alias"),ph=Symbol.for("yaml.document"),Cr=Symbol.for("yaml.map"),Lx=Symbol.for("yaml.pair"),An=Symbol.for("yaml.scalar"),mo=Symbol.for("yaml.seq"),en=Symbol.for("yaml.node.type"),go=e=>!!e&&typeof e=="object"&&e[en]===ep,Su=e=>!!e&&typeof e=="object"&&e[en]===ph,zs=e=>!!e&&typeof e=="object"&&e[en]===Cr,Qe=e=>!!e&&typeof e=="object"&&e[en]===Lx,je=e=>!!e&&typeof e=="object"&&e[en]===An,Fs=e=>!!e&&typeof e=="object"&&e[en]===mo;function Ge(e){if(e&&typeof e=="object")switch(e[en]){case Cr:case mo:return!0}return!1}function Xe(e){if(e&&typeof e=="object")switch(e[en]){case ep:case Cr:case An:case mo:return!0}return!1}const Mx=e=>(je(e)||Ge(e))&&!!e.anchor,Qr=Symbol("break visit"),fL=Symbol("skip children"),xs=Symbol("remove node");function yo(e,t){const n=dL(t);Su(e)?Yi(null,e.contents,n,Object.freeze([e]))===xs&&(e.contents=null):Yi(null,e,n,Object.freeze([]))}yo.BREAK=Qr;yo.SKIP=fL;yo.REMOVE=xs;function Yi(e,t,n,i){const s=hL(e,t,n,i);if(Xe(s)||Qe(s))return pL(e,i,s),Yi(e,s,n,i);if(typeof s!="symbol"){if(Ge(t)){i=Object.freeze(i.concat(t));for(let l=0;l<t.items.length;++l){const a=Yi(l,t.items[l],n,i);if(typeof a=="number")l=a-1;else{if(a===Qr)return Qr;a===xs&&(t.items.splice(l,1),l-=1)}}}else if(Qe(t)){i=Object.freeze(i.concat(t));const l=Yi("key",t.key,n,i);if(l===Qr)return Qr;l===xs&&(t.key=null);const a=Yi("value",t.value,n,i);if(a===Qr)return Qr;a===xs&&(t.value=null)}}return s}function dL(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function hL(e,t,n,i){var s,l,a,c,f;if(typeof n=="function")return n(e,t,i);if(zs(t))return(s=n.Map)==null?void 0:s.call(n,e,t,i);if(Fs(t))return(l=n.Seq)==null?void 0:l.call(n,e,t,i);if(Qe(t))return(a=n.Pair)==null?void 0:a.call(n,e,t,i);if(je(t))return(c=n.Scalar)==null?void 0:c.call(n,e,t,i);if(go(t))return(f=n.Alias)==null?void 0:f.call(n,e,t,i)}function pL(e,t,n){const i=t[t.length-1];if(Ge(i))i.items[e]=n;else if(Qe(i))e==="key"?i.key=n:i.value=n;else if(Su(i))i.contents=n;else{const s=go(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const mL={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},gL=e=>e.replace(/[!,[\]{}]/g,t=>mL[t]);class xt{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},xt.defaultYaml,t),this.tags=Object.assign({},xt.defaultTags,n)}clone(){const t=new xt(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new xt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:xt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},xt.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:xt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},xt.defaultTags),this.atNextDocument=!1);const i=t.trim().split(/[ \t]+/),s=i.shift();switch(s){case"%TAG":{if(i.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;const[l,a]=i;return this.tags[l]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[l]=i;if(l==="1.1"||l==="1.2")return this.yaml.version=l,!0;{const a=/^\d+\.\d+$/.test(l);return n(6,`Unsupported YAML version ${l}`,a),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}const[,i,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const l=this.tags[i];if(l)try{return l+decodeURIComponent(s)}catch(a){return n(String(a)),null}return i==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,i]of Object.entries(this.tags))if(t.startsWith(i))return n+gL(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);let s;if(t&&i.length>0&&Xe(t.contents)){const l={};yo(t.contents,(a,c)=>{Xe(c)&&c.tag&&(l[c.tag]=!0)}),s=Object.keys(l)}else s=[];for(const[l,a]of i)l==="!!"&&a==="tag:yaml.org,2002:"||(!t||s.some(c=>c.startsWith(a)))&&n.push(`%TAG ${l} ${a}`);return n.join(`
|
|
128
|
-
`)}}xt.defaultYaml={explicit:!1,version:"1.2"};xt.defaultTags={"!!":"tag:yaml.org,2002:"};function
|
|
127
|
+
*/const DO=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jO=RO("x",DO),$O=s1,zO=u1,g1=T.forwardRef(({className:e,...t},n)=>O.jsx(Yh,{className:at("fixed inset-0 z-50 bg-black/20",e),...t,ref:n}));g1.displayName=Yh.displayName;const y1=T.forwardRef(({side:e="right",className:t,children:n,...i},s)=>O.jsxs(zO,{children:[O.jsx(g1,{}),O.jsxs(Kh,{ref:s,className:at("fixed z-50 bg-bg shadow-lg transition flex flex-col",e==="right"&&"inset-y-0 right-0 w-80 border-l border-border",e==="left"&&"inset-y-0 left-0 w-80 border-r border-border",t),...i,children:[n,O.jsxs(p1,{className:"absolute right-4 top-4 rounded-sm opacity-70 hover:opacity-100",children:[O.jsx(jO,{className:"h-4 w-4"}),O.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));y1.displayName=Kh.displayName;const v1=({className:e,...t})=>O.jsx("div",{className:at("flex flex-col space-y-2 p-4 border-b border-border",e),...t});v1.displayName="SheetHeader";const w1=T.forwardRef(({className:e,...t},n)=>O.jsx(Gh,{ref:n,className:at("font-semibold",e),...t}));w1.displayName=Gh.displayName;var FO=T.createContext(void 0);function BO(e){const t=T.useContext(FO);return e||t||"ltr"}function VO(e,[t,n]){return Math.min(n,Math.max(t,e))}function HO(e,t){return T.useReducer((n,i)=>t[n][i]??n,e)}var Qh="ScrollArea",[x1]=Hx(Qh),[WO,tn]=x1(Qh),b1=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:i="hover",dir:s,scrollHideDelay:l=600,...a}=e,[c,f]=T.useState(null),[d,m]=T.useState(null),[p,g]=T.useState(null),[v,S]=T.useState(null),[w,b]=T.useState(null),[k,_]=T.useState(0),[E,N]=T.useState(0),[A,L]=T.useState(!1),[R,C]=T.useState(!1),P=Vt(t,M=>f(M)),F=BO(s);return O.jsx(WO,{scope:n,type:i,dir:F,scrollHideDelay:l,scrollArea:c,viewport:d,onViewportChange:m,content:p,onContentChange:g,scrollbarX:v,onScrollbarXChange:S,scrollbarXEnabled:A,onScrollbarXEnabledChange:L,scrollbarY:w,onScrollbarYChange:b,scrollbarYEnabled:R,onScrollbarYEnabledChange:C,onCornerWidthChange:_,onCornerHeightChange:N,children:O.jsx(Ot.div,{dir:F,...a,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":k+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});b1.displayName=Qh;var S1="ScrollAreaViewport",k1=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:i,nonce:s,...l}=e,a=tn(S1,n),c=T.useRef(null),f=Vt(t,c,a.onViewportChange);return O.jsxs(O.Fragment,{children:[O.jsx(UO,{nonce:s}),O.jsx(Ot.div,{"data-radix-scroll-area-viewport":"",...l,ref:f,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:O.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});k1.displayName=S1;var UO=T.memo(({nonce:e})=>O.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,t)=>e.nonce===t.nonce),Ln="ScrollAreaScrollbar",Jh=T.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=tn(Ln,e.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:a}=s,c=e.orientation==="horizontal";return T.useEffect(()=>(c?l(!0):a(!0),()=>{c?l(!1):a(!1)}),[c,l,a]),s.type==="hover"?O.jsx(qO,{...i,ref:t,forceMount:n}):s.type==="scroll"?O.jsx(YO,{...i,ref:t,forceMount:n}):s.type==="auto"?O.jsx(E1,{...i,ref:t,forceMount:n}):s.type==="always"?O.jsx(Zh,{...i,ref:t,"data-state":"visible"}):null});Jh.displayName=Ln;var qO=T.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=tn(Ln,e.__scopeScrollArea),[l,a]=T.useState(!1);return T.useEffect(()=>{const c=s.scrollArea;let f=0;if(c){const d=()=>{window.clearTimeout(f),a(!0)},m=()=>{f=window.setTimeout(()=>a(!1),s.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",m),()=>{window.clearTimeout(f),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",m)}}},[s.scrollArea,s.scrollHideDelay]),O.jsx(Tr,{present:n||l,children:O.jsx(E1,{"data-state":l?"visible":"hidden",...i,ref:t})})}),YO=T.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=tn(Ln,e.__scopeScrollArea),l=e.orientation==="horizontal",a=Su(()=>f("SCROLL_END"),100),[c,f]=HO("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return T.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>f("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,s.scrollHideDelay,f]),T.useEffect(()=>{const d=s.viewport,m=l?"scrollLeft":"scrollTop";if(d){let p=d[m];const g=()=>{const v=d[m];p!==v&&(f("SCROLL"),a()),p=v};return d.addEventListener("scroll",g),()=>d.removeEventListener("scroll",g)}},[s.viewport,l,f,a]),O.jsx(Tr,{present:n||c!=="hidden",children:O.jsx(Zh,{"data-state":c==="hidden"?"hidden":"visible",...i,ref:t,onPointerEnter:bt(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:bt(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),E1=T.forwardRef((e,t)=>{const n=tn(Ln,e.__scopeScrollArea),{forceMount:i,...s}=e,[l,a]=T.useState(!1),c=e.orientation==="horizontal",f=Su(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;a(c?d:m)}},10);return co(n.viewport,f),co(n.content,f),O.jsx(Tr,{present:i||l,children:O.jsx(Zh,{"data-state":l?"visible":"hidden",...s,ref:t})})}),Zh=T.forwardRef((e,t)=>{const{orientation:n="vertical",...i}=e,s=tn(Ln,e.__scopeScrollArea),l=T.useRef(null),a=T.useRef(0),[c,f]=T.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=T1(c.viewport,c.content),m={...i,sizes:c,onSizesChange:f,hasThumb:d>0&&d<1,onThumbChange:g=>l.current=g,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:g=>a.current=g};function p(g,v){return ZO(g,a.current,c,v)}return n==="horizontal"?O.jsx(KO,{...m,ref:t,onThumbPositionChange:()=>{if(s.viewport&&l.current){const g=s.viewport.scrollLeft,v=xv(g,c,s.dir);l.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollLeft=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollLeft=p(g,s.dir))}}):n==="vertical"?O.jsx(GO,{...m,ref:t,onThumbPositionChange:()=>{if(s.viewport&&l.current){const g=s.viewport.scrollTop,v=xv(g,c);l.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollTop=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollTop=p(g))}}):null}),KO=T.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...s}=e,l=tn(Ln,e.__scopeScrollArea),[a,c]=T.useState(),f=T.useRef(null),d=Vt(t,f,l.onScrollbarXChange);return T.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),O.jsx(N1,{"data-orientation":"horizontal",...s,ref:d,sizes:n,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":bu(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,p)=>{if(l.viewport){const g=l.viewport.scrollLeft+m.deltaX;e.onWheelScroll(g),A1(g,p)&&m.preventDefault()}},onResize:()=>{f.current&&l.viewport&&a&&i({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:nu(a.paddingLeft),paddingEnd:nu(a.paddingRight)}})}})}),GO=T.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...s}=e,l=tn(Ln,e.__scopeScrollArea),[a,c]=T.useState(),f=T.useRef(null),d=Vt(t,f,l.onScrollbarYChange);return T.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),O.jsx(N1,{"data-orientation":"vertical",...s,ref:d,sizes:n,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":bu(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,p)=>{if(l.viewport){const g=l.viewport.scrollTop+m.deltaY;e.onWheelScroll(g),A1(g,p)&&m.preventDefault()}},onResize:()=>{f.current&&l.viewport&&a&&i({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:nu(a.paddingTop),paddingEnd:nu(a.paddingBottom)}})}})}),[XO,_1]=x1(Ln),N1=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:s,onThumbChange:l,onThumbPointerUp:a,onThumbPointerDown:c,onThumbPositionChange:f,onDragScroll:d,onWheelScroll:m,onResize:p,...g}=e,v=tn(Ln,n),[S,w]=T.useState(null),b=Vt(t,P=>w(P)),k=T.useRef(null),_=T.useRef(""),E=v.viewport,N=i.content-i.viewport,A=Qt(m),L=Qt(f),R=Su(p,10);function C(P){if(k.current){const F=P.clientX-k.current.left,M=P.clientY-k.current.top;d({x:F,y:M})}}return T.useEffect(()=>{const P=F=>{const M=F.target;(S==null?void 0:S.contains(M))&&A(F,N)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[E,S,N,A]),T.useEffect(L,[i,L]),co(S,R),co(v.content,R),O.jsx(XO,{scope:n,scrollbar:S,hasThumb:s,onThumbChange:Qt(l),onThumbPointerUp:Qt(a),onThumbPositionChange:L,onThumbPointerDown:Qt(c),children:O.jsx(Ot.div,{...g,ref:b,style:{position:"absolute",...g.style},onPointerDown:bt(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),k.current=S.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),C(P))}),onPointerMove:bt(e.onPointerMove,C),onPointerUp:bt(e.onPointerUp,P=>{const F=P.target;F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=_.current,v.viewport&&(v.viewport.style.scrollBehavior=""),k.current=null})})})}),tu="ScrollAreaThumb",C1=T.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=_1(tu,e.__scopeScrollArea);return O.jsx(Tr,{present:n||s.hasThumb,children:O.jsx(QO,{ref:t,...i})})}),QO=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:i,...s}=e,l=tn(tu,n),a=_1(tu,n),{onThumbPositionChange:c}=a,f=Vt(t,p=>a.onThumbChange(p)),d=T.useRef(void 0),m=Su(()=>{d.current&&(d.current(),d.current=void 0)},100);return T.useEffect(()=>{const p=l.viewport;if(p){const g=()=>{if(m(),!d.current){const v=eL(p,c);d.current=v,c()}};return c(),p.addEventListener("scroll",g),()=>p.removeEventListener("scroll",g)}},[l.viewport,m,c]),O.jsx(Ot.div,{"data-state":a.hasThumb?"visible":"hidden",...s,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:bt(e.onPointerDownCapture,p=>{const v=p.target.getBoundingClientRect(),S=p.clientX-v.left,w=p.clientY-v.top;a.onThumbPointerDown({x:S,y:w})}),onPointerUp:bt(e.onPointerUp,a.onThumbPointerUp)})});C1.displayName=tu;var ep="ScrollAreaCorner",I1=T.forwardRef((e,t)=>{const n=tn(ep,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?O.jsx(JO,{...e,ref:t}):null});I1.displayName=ep;var JO=T.forwardRef((e,t)=>{const{__scopeScrollArea:n,...i}=e,s=tn(ep,n),[l,a]=T.useState(0),[c,f]=T.useState(0),d=!!(l&&c);return co(s.scrollbarX,()=>{var p;const m=((p=s.scrollbarX)==null?void 0:p.offsetHeight)||0;s.onCornerHeightChange(m),f(m)}),co(s.scrollbarY,()=>{var p;const m=((p=s.scrollbarY)==null?void 0:p.offsetWidth)||0;s.onCornerWidthChange(m),a(m)}),d?O.jsx(Ot.div,{...i,ref:t,style:{width:l,height:c,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function nu(e){return e?parseInt(e,10):0}function T1(e,t){const n=e/t;return isNaN(n)?0:n}function bu(e){const t=T1(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}function ZO(e,t,n,i="ltr"){const s=bu(n),l=s/2,a=t||l,c=s-a,f=n.scrollbar.paddingStart+a,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,m=n.content-n.viewport,p=i==="ltr"?[0,m]:[m*-1,0];return P1([f,d],p)(e)}function xv(e,t,n="ltr"){const i=bu(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=t.scrollbar.size-s,a=t.content-t.viewport,c=l-i,f=n==="ltr"?[0,a]:[a*-1,0],d=VO(e,f);return P1([0,a],[0,c])(d)}function P1(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}function A1(e,t){return e>0&&e<t}var eL=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},i=0;return(function s(){const l={left:e.scrollLeft,top:e.scrollTop},a=n.left!==l.left,c=n.top!==l.top;(a||c)&&t(),n=l,i=window.requestAnimationFrame(s)})(),()=>window.cancelAnimationFrame(i)};function Su(e,t){const n=Qt(e),i=T.useRef(0);return T.useEffect(()=>()=>window.clearTimeout(i.current),[]),T.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}function co(e,t){const n=Qt(t);ao(()=>{let i=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(i),s.unobserve(e)}}},[e,n])}var O1=b1,tL=k1,nL=I1;const L1=T.forwardRef(({className:e,children:t,...n},i)=>O.jsxs(O1,{ref:i,className:at("relative overflow-hidden",e),...n,children:[O.jsx(tL,{className:"h-full w-full rounded-[inherit]",children:t}),O.jsx(M1,{}),O.jsx(nL,{})]}));L1.displayName=O1.displayName;const M1=T.forwardRef(({className:e,orientation:t="vertical",...n},i)=>O.jsx(Jh,{ref:i,orientation:t,className:at("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:O.jsx(C1,{className:"relative flex-1 rounded-full bg-border"})}));M1.displayName=Jh.displayName;const bv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sv=Sx,rL=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return Sv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:l}=t,a=Object.keys(s).map(d=>{const m=n==null?void 0:n[d],p=l==null?void 0:l[d];if(m===null)return null;const g=bv(m)||bv(p);return s[d][g]}),c=n&&Object.entries(n).reduce((d,m)=>{let[p,g]=m;return g===void 0||(d[p]=g),d},{}),f=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((d,m)=>{let{class:p,className:g,...v}=m;return Object.entries(v).every(S=>{let[w,b]=S;return Array.isArray(b)?b.includes({...l,...c}[w]):{...l,...c}[w]===b})?[...d,p,g]:d},[]);return Sv(e,a,f,n==null?void 0:n.class,n==null?void 0:n.className)},iL=rL("inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-mono font-medium uppercase tracking-wide transition-colors",{variants:{variant:{default:"bg-fg text-bg",agent:"bg-agent/10 text-agent",muted:"bg-muted text-mutedfg"}},defaultVariants:{variant:"default"}});function oL({className:e,variant:t,...n}){return O.jsx("div",{className:at(iL({variant:t}),e),...n})}function sL({node:e,onClose:t}){const n=(e==null?void 0:e.type)==="agent.run";return O.jsx($O,{open:!!e,onOpenChange:i=>!i&&t(),children:O.jsxs(y1,{side:"right",children:[O.jsx(v1,{children:O.jsxs(w1,{className:"flex items-center gap-2",children:[n&&O.jsx(oL,{variant:"agent",children:"agent"}),O.jsx("span",{className:n?"text-agent":void 0,children:e==null?void 0:e.id})]})}),O.jsx(L1,{className:"flex-1 p-4",children:e&&O.jsxs("div",{className:"space-y-4",children:[O.jsxs("div",{children:[O.jsx("label",{className:"text-[11px] uppercase tracking-wider text-mutedfg",children:"Type"}),O.jsx("div",{className:"mt-1 font-mono text-[12px] px-2.5 py-1.5 bg-muted rounded-md",children:e.type})]}),O.jsxs("div",{children:[O.jsx("label",{className:"text-[11px] uppercase tracking-wider text-mutedfg",children:"ID"}),O.jsx("div",{className:"mt-1 font-mono text-[12px] px-2.5 py-1.5 bg-muted rounded-md",children:e.id})]}),O.jsxs("div",{children:[O.jsx("label",{className:"text-[11px] uppercase tracking-wider text-mutedfg",children:"Config"}),O.jsx("pre",{className:"mt-1 text-[11px] font-mono bg-muted rounded-md p-2.5 overflow-x-auto leading-relaxed whitespace-pre-wrap break-all",children:JSON.stringify(e.config,null,2)})]}),e.retry&&O.jsxs("div",{children:[O.jsx("label",{className:"text-[11px] uppercase tracking-wider text-mutedfg",children:"Retry"}),O.jsxs("div",{className:"mt-1 grid grid-cols-2 gap-2",children:[O.jsxs("div",{className:"px-2.5 py-1.5 border border-border rounded-md",children:[O.jsx("span",{className:"text-mutedfg text-[11px]",children:"attempts"})," ",O.jsx("span",{className:"font-mono",children:e.retry.maxAttempts})]}),O.jsxs("div",{className:"px-2.5 py-1.5 border border-border rounded-md",children:[O.jsx("span",{className:"text-mutedfg text-[11px]",children:"backoff"})," ",O.jsxs("span",{className:"font-mono",children:[e.retry.backoffMs,"ms"]})]})]})]})]})})]})})}function lL(e){return e==="running"?"bg-run pulse-dot":e==="success"?"bg-ok":"bg-fail"}function aL(e){return e==="running"?"running":e==="success"?"success":"failed"}function uL(e){if(!e.finishedAt)return"…";const t=e.finishedAt-e.startedAt;return t>=1e3?`${(t/1e3).toFixed(1)}s`:`${t}ms`}function cL(e){const t=Date.now()-e;return t<5e3?"just now":t<6e4?`${Math.round(t/1e3)}s ago`:t<36e5?`${Math.round(t/6e4)}m ago`:`${Math.round(t/36e5)}h ago`}function fL({runs:e,connected:t}){return O.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[O.jsxs("header",{className:"h-12 shrink-0 bg-bg border-b border-border flex items-center px-4 gap-3",children:[O.jsx("h1",{className:"font-semibold tracking-tight",children:"Runs"}),O.jsx("span",{className:"text-[11px] text-mutedfg",children:"ephemeral activity stream · nothing persisted beyond the surfaces"}),O.jsxs("div",{className:"ml-auto flex items-center gap-1.5 text-[11px] text-mutedfg",children:[O.jsx("span",{"data-testid":"live-dot",className:at("size-1.5 rounded-full",t?"bg-ok pulse-dot":"bg-border")}),t?"live":"offline"]})]}),O.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-2 max-w-3xl",children:[e.length===0&&O.jsx("div",{className:"text-[12px] text-mutedfg px-1 py-4 text-center",children:t?"No runs yet — waiting for the scheduler…":"Connect a flow-server to see live runs."}),e.map(n=>O.jsxs("div",{"data-testid":"run-row","data-run-status":n.status,className:"bg-bg border border-border rounded-lg",children:[O.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-border",children:[O.jsx("span",{className:at("size-1.5 rounded-full flex-shrink-0",lL(n.status))}),O.jsx("span",{className:"font-medium",children:n.workflow}),O.jsxs("span",{className:"font-mono text-[11px] text-mutedfg",children:[n.id," · ",cL(n.startedAt),n.finishedAt&&` · ${uL(n)}`]}),O.jsx("span",{className:at("ml-auto text-[11px] font-medium",n.status==="running"&&"text-run",n.status==="success"&&"text-ok",n.status==="failed"&&"text-fail"),children:aL(n.status)})]}),n.status==="failed"&&n.error&&O.jsx("div",{"data-testid":"run-error",className:"px-3 py-2 text-[11px] font-mono text-fail bg-fail/5 break-words",children:n.error})]},n.id))]})]})}const tp=Symbol.for("yaml.alias"),mh=Symbol.for("yaml.document"),Cr=Symbol.for("yaml.map"),R1=Symbol.for("yaml.pair"),An=Symbol.for("yaml.scalar"),mo=Symbol.for("yaml.seq"),en=Symbol.for("yaml.node.type"),go=e=>!!e&&typeof e=="object"&&e[en]===tp,ku=e=>!!e&&typeof e=="object"&&e[en]===mh,zs=e=>!!e&&typeof e=="object"&&e[en]===Cr,Qe=e=>!!e&&typeof e=="object"&&e[en]===R1,je=e=>!!e&&typeof e=="object"&&e[en]===An,Fs=e=>!!e&&typeof e=="object"&&e[en]===mo;function Ge(e){if(e&&typeof e=="object")switch(e[en]){case Cr:case mo:return!0}return!1}function Xe(e){if(e&&typeof e=="object")switch(e[en]){case tp:case Cr:case An:case mo:return!0}return!1}const D1=e=>(je(e)||Ge(e))&&!!e.anchor,Qr=Symbol("break visit"),dL=Symbol("skip children"),xs=Symbol("remove node");function yo(e,t){const n=hL(t);ku(e)?Yi(null,e.contents,n,Object.freeze([e]))===xs&&(e.contents=null):Yi(null,e,n,Object.freeze([]))}yo.BREAK=Qr;yo.SKIP=dL;yo.REMOVE=xs;function Yi(e,t,n,i){const s=pL(e,t,n,i);if(Xe(s)||Qe(s))return mL(e,i,s),Yi(e,s,n,i);if(typeof s!="symbol"){if(Ge(t)){i=Object.freeze(i.concat(t));for(let l=0;l<t.items.length;++l){const a=Yi(l,t.items[l],n,i);if(typeof a=="number")l=a-1;else{if(a===Qr)return Qr;a===xs&&(t.items.splice(l,1),l-=1)}}}else if(Qe(t)){i=Object.freeze(i.concat(t));const l=Yi("key",t.key,n,i);if(l===Qr)return Qr;l===xs&&(t.key=null);const a=Yi("value",t.value,n,i);if(a===Qr)return Qr;a===xs&&(t.value=null)}}return s}function hL(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function pL(e,t,n,i){var s,l,a,c,f;if(typeof n=="function")return n(e,t,i);if(zs(t))return(s=n.Map)==null?void 0:s.call(n,e,t,i);if(Fs(t))return(l=n.Seq)==null?void 0:l.call(n,e,t,i);if(Qe(t))return(a=n.Pair)==null?void 0:a.call(n,e,t,i);if(je(t))return(c=n.Scalar)==null?void 0:c.call(n,e,t,i);if(go(t))return(f=n.Alias)==null?void 0:f.call(n,e,t,i)}function mL(e,t,n){const i=t[t.length-1];if(Ge(i))i.items[e]=n;else if(Qe(i))e==="key"?i.key=n:i.value=n;else if(ku(i))i.contents=n;else{const s=go(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const gL={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},yL=e=>e.replace(/[!,[\]{}]/g,t=>gL[t]);class xt{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},xt.defaultYaml,t),this.tags=Object.assign({},xt.defaultTags,n)}clone(){const t=new xt(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new xt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:xt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},xt.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:xt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},xt.defaultTags),this.atNextDocument=!1);const i=t.trim().split(/[ \t]+/),s=i.shift();switch(s){case"%TAG":{if(i.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;const[l,a]=i;return this.tags[l]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[l]=i;if(l==="1.1"||l==="1.2")return this.yaml.version=l,!0;{const a=/^\d+\.\d+$/.test(l);return n(6,`Unsupported YAML version ${l}`,a),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}const[,i,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const l=this.tags[i];if(l)try{return l+decodeURIComponent(s)}catch(a){return n(String(a)),null}return i==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,i]of Object.entries(this.tags))if(t.startsWith(i))return n+yL(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags);let s;if(t&&i.length>0&&Xe(t.contents)){const l={};yo(t.contents,(a,c)=>{Xe(c)&&c.tag&&(l[c.tag]=!0)}),s=Object.keys(l)}else s=[];for(const[l,a]of i)l==="!!"&&a==="tag:yaml.org,2002:"||(!t||s.some(c=>c.startsWith(a)))&&n.push(`%TAG ${l} ${a}`);return n.join(`
|
|
128
|
+
`)}}xt.defaultYaml={explicit:!1,version:"1.2"};xt.defaultTags={"!!":"tag:yaml.org,2002:"};function j1(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function $1(e){const t=new Set;return yo(e,{Value(n,i){i.anchor&&t.add(i.anchor)}}),t}function z1(e,t){for(let n=1;;++n){const i=`${e}${n}`;if(!t.has(i))return i}}function vL(e,t){const n=[],i=new Map;let s=null;return{onAnchor:l=>{n.push(l),s??(s=$1(e));const a=z1(t,s);return s.add(a),a},setAnchors:()=>{for(const l of n){const a=i.get(l);if(typeof a=="object"&&a.anchor&&(je(a.node)||Ge(a.node)))a.node.anchor=a.anchor;else{const c=new Error("Failed to resolve repeated object (this should not happen)");throw c.source=l,c}}},sourceObjects:i}}function Ki(e,t,n,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let s=0,l=i.length;s<l;++s){const a=i[s],c=Ki(e,i,String(s),a);c===void 0?delete i[s]:c!==a&&(i[s]=c)}else if(i instanceof Map)for(const s of Array.from(i.keys())){const l=i.get(s),a=Ki(e,i,s,l);a===void 0?i.delete(s):a!==l&&i.set(s,a)}else if(i instanceof Set)for(const s of Array.from(i)){const l=Ki(e,i,s,s);l===void 0?i.delete(s):l!==s&&(i.delete(s),i.add(l))}else for(const[s,l]of Object.entries(i)){const a=Ki(e,i,s,l);a===void 0?delete i[s]:a!==l&&(i[s]=a)}return e.call(t,n,i)}function Zt(e,t,n){if(Array.isArray(e))return e.map((i,s)=>Zt(i,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!D1(e))return e.toJSON(t,n);const i={aliasCount:0,count:1,res:void 0};n.anchors.set(e,i),n.onCreate=l=>{i.res=l,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class np{constructor(t){Object.defineProperty(this,en,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:i,onAnchor:s,reviver:l}={}){if(!ku(t))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=Zt(this,"",a);if(typeof s=="function")for(const{count:f,res:d}of a.anchors.values())s(d,f);return typeof l=="function"?Ki(l,{"":c},"",c):c}}class rp extends np{constructor(t){super(tp),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if((n==null?void 0:n.maxAliasCount)===0)throw new ReferenceError("Alias resolution is disabled");let i;n!=null&&n.aliasResolveCache?i=n.aliasResolveCache:(i=[],yo(t,{Node:(l,a)=>{(go(a)||D1(a))&&i.push(a)}}),n&&(n.aliasResolveCache=i));let s;for(const l of i){if(l===this)break;l.anchor===this.source&&(s=l)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:i,doc:s,maxAliasCount:l}=n,a=this.resolve(s,n);if(!a){const f=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(f)}let c=i.get(a);if(c||(Zt(a,null,n),c=i.get(a)),(c==null?void 0:c.res)===void 0){const f="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(f)}if(l>=0&&(c.count+=1,c.aliasCount===0&&(c.aliasCount=za(s,a,i)),c.count*c.aliasCount>l)){const f="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(f)}return c.res}toString(t,n,i){const s=`*${this.source}`;if(t){if(j1(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(l)}if(t.implicitKey)return`${s} `}return s}}function za(e,t,n){if(go(t)){const i=t.resolve(e),s=n&&i&&n.get(i);return s?s.count*s.aliasCount:0}else if(Ge(t)){let i=0;for(const s of t.items){const l=za(e,s,n);l>i&&(i=l)}return i}else if(Qe(t)){const i=za(e,t.key,n),s=za(e,t.value,n);return Math.max(i,s)}return 1}const F1=e=>!e||typeof e!="function"&&typeof e!="object";class Ce extends np{constructor(t){super(An),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:Zt(this.value,t,n)}toString(){return String(this.value)}}Ce.BLOCK_FOLDED="BLOCK_FOLDED";Ce.BLOCK_LITERAL="BLOCK_LITERAL";Ce.PLAIN="PLAIN";Ce.QUOTE_DOUBLE="QUOTE_DOUBLE";Ce.QUOTE_SINGLE="QUOTE_SINGLE";const wL="tag:yaml.org,2002:";function xL(e,t,n){if(t){const i=n.filter(l=>l.tag===t),s=i.find(l=>!l.format)??i[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(i=>{var s;return((s=i.identify)==null?void 0:s.call(i,e))&&!i.format})}function As(e,t,n){var p,g,v;if(ku(e)&&(e=e.contents),Xe(e))return e;if(Qe(e)){const S=(g=(p=n.schema[Cr]).createNode)==null?void 0:g.call(p,n.schema,null,n);return S.items.push(e),S}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:i,onAnchor:s,onTagObj:l,schema:a,sourceObjects:c}=n;let f;if(i&&e&&typeof e=="object"){if(f=c.get(e),f)return f.anchor??(f.anchor=s(e)),new rp(f.anchor);f={anchor:null,node:null},c.set(e,f)}t!=null&&t.startsWith("!!")&&(t=wL+t.slice(2));let d=xL(e,t,a.tags);if(!d){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const S=new Ce(e);return f&&(f.node=S),S}d=e instanceof Map?a[Cr]:Symbol.iterator in Object(e)?a[mo]:a[Cr]}l&&(l(d),delete n.onTagObj);const m=d!=null&&d.createNode?d.createNode(n.schema,e,n):typeof((v=d==null?void 0:d.nodeClass)==null?void 0:v.from)=="function"?d.nodeClass.from(n.schema,e,n):new Ce(e);return t?m.tag=t:d.default||(m.tag=d.tag),f&&(f.node=m),m}function ru(e,t,n){let i=n;for(let s=t.length-1;s>=0;--s){const l=t[s];if(typeof l=="number"&&Number.isInteger(l)&&l>=0){const a=[];a[l]=i,i=a}else i=new Map([[l,i]])}return As(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const gs=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class B1 extends np{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(i=>Xe(i)||Qe(i)?i.clone(t):i),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(gs(t))this.add(n);else{const[i,...s]=t,l=this.get(i,!0);if(Ge(l))l.addIn(s,n);else if(l===void 0&&this.schema)this.set(i,ru(this.schema,s,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${s}`)}}deleteIn(t){const[n,...i]=t;if(i.length===0)return this.delete(n);const s=this.get(n,!0);if(Ge(s))return s.deleteIn(i);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}getIn(t,n){const[i,...s]=t,l=this.get(i,!0);return s.length===0?!n&&je(l)?l.value:l:Ge(l)?l.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Qe(n))return!1;const i=n.value;return i==null||t&&je(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){const[n,...i]=t;if(i.length===0)return this.has(n);const s=this.get(n,!0);return Ge(s)?s.hasIn(i):!1}setIn(t,n){const[i,...s]=t;if(s.length===0)this.set(i,n);else{const l=this.get(i,!0);if(Ge(l))l.setIn(s,n);else if(l===void 0&&this.schema)this.set(i,ru(this.schema,s,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${s}`)}}}const bL=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Kn(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Zr=(e,t,n)=>e.endsWith(`
|
|
129
129
|
`)?Kn(n,t):n.includes(`
|
|
130
130
|
`)?`
|
|
131
|
-
`+Kn(n,t):(e.endsWith(" ")?"":" ")+n,
|
|
132
|
-
`)n===
|
|
133
|
-
`&&v!==" "){const N=e[
|
|
134
|
-
`&&N!==" "&&(g=
|
|
135
|
-
${t}${e.slice(0,A)}`:(n===
|
|
136
|
-
${t}${e.slice(N+1,A)}`)}return _}function
|
|
137
|
-
`);i=t,s=t+1,l=e[s]}return i}const
|
|
138
|
-
`){if(l-a>i)return!0;if(a=l+1,s-a<=i)return!1}return!0}function bs(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:i}=t,s=t.options.doubleQuotedMinMultiLineLength,l=t.indent||(
|
|
131
|
+
`+Kn(n,t):(e.endsWith(" ")?"":" ")+n,V1="flow",gh="block",Fa="quoted";function Eu(e,t,n="flow",{indentAtStart:i,lineWidth:s=80,minContentWidth:l=20,onFold:a,onOverflow:c}={}){if(!s||s<0)return e;s<l&&(l=0);const f=Math.max(1+l,1+s-t.length);if(e.length<=f)return e;const d=[],m={};let p=s-t.length;typeof i=="number"&&(i>s-Math.max(2,l)?d.push(0):p=s-i);let g,v,S=!1,w=-1,b=-1,k=-1;n===gh&&(w=kv(e,w,t.length),w!==-1&&(p=w+f));for(let E;E=e[w+=1];){if(n===Fa&&E==="\\"){switch(b=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}k=w}if(E===`
|
|
132
|
+
`)n===gh&&(w=kv(e,w,t.length)),p=w+t.length+f,g=void 0;else{if(E===" "&&v&&v!==" "&&v!==`
|
|
133
|
+
`&&v!==" "){const N=e[w+1];N&&N!==" "&&N!==`
|
|
134
|
+
`&&N!==" "&&(g=w)}if(w>=p)if(g)d.push(g),p=g+f,g=void 0;else if(n===Fa){for(;v===" "||v===" ";)v=E,E=e[w+=1],S=!0;const N=w>k+1?w-2:b-1;if(m[N])return e;d.push(N),m[N]=!0,p=N+f,g=void 0}else S=!0}v=E}if(S&&c&&c(),d.length===0)return e;a&&a();let _=e.slice(0,d[0]);for(let E=0;E<d.length;++E){const N=d[E],A=d[E+1]||e.length;N===0?_=`
|
|
135
|
+
${t}${e.slice(0,A)}`:(n===Fa&&m[N]&&(_+=`${e[N]}\\`),_+=`
|
|
136
|
+
${t}${e.slice(N+1,A)}`)}return _}function kv(e,t,n){let i=t,s=t+1,l=e[s];for(;l===" "||l===" ";)if(t<s+n)l=e[++t];else{do l=e[++t];while(l&&l!==`
|
|
137
|
+
`);i=t,s=t+1,l=e[s]}return i}const _u=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Nu=e=>/^(%|---|\.\.\.)/m.test(e);function SL(e,t,n){if(!t||t<0)return!1;const i=t-n,s=e.length;if(s<=i)return!1;for(let l=0,a=0;l<s;++l)if(e[l]===`
|
|
138
|
+
`){if(l-a>i)return!0;if(a=l+1,s-a<=i)return!1}return!0}function bs(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:i}=t,s=t.options.doubleQuotedMinMultiLineLength,l=t.indent||(Nu(e)?" ":"");let a="",c=0;for(let f=0,d=n[f];d;d=n[++f])if(d===" "&&n[f+1]==="\\"&&n[f+2]==="n"&&(a+=n.slice(c,f)+"\\ ",f+=1,c=f,d="\\"),d==="\\")switch(n[f+1]){case"u":{a+=n.slice(c,f);const m=n.substr(f+2,4);switch(m){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:m.substr(0,2)==="00"?a+="\\x"+m.substr(2):a+=n.substr(f,6)}f+=5,c=f+1}break;case"n":if(i||n[f+2]==='"'||n.length<s)f+=1;else{for(a+=n.slice(c,f)+`
|
|
139
139
|
|
|
140
140
|
`;n[f+2]==="\\"&&n[f+3]==="n"&&n[f+4]!=='"';)a+=`
|
|
141
|
-
`,f+=2;a+=l,n[f+2]===" "&&(a+="\\"),f+=1,c=f+1}break;default:f+=1}return a=c?a+n.slice(c):n,i?a:
|
|
142
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return bs(e,t);const n=t.indent||(
|
|
143
|
-
${n}`)+"'";return t.implicitKey?i:
|
|
141
|
+
`,f+=2;a+=l,n[f+2]===" "&&(a+="\\"),f+=1,c=f+1}break;default:f+=1}return a=c?a+n.slice(c):n,i?a:Eu(a,l,Fa,_u(t,!1))}function yh(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
142
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return bs(e,t);const n=t.indent||(Nu(e)?" ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
143
|
+
${n}`)+"'";return t.implicitKey?i:Eu(i,n,V1,_u(t,!1))}function Gi(e,t){const{singleQuote:n}=t.options;let i;if(n===!1)i=bs;else{const s=e.includes('"'),l=e.includes("'");s&&!l?i=yh:l&&!s?i=bs:i=n?yh:bs}return i(e,t)}let vh;try{vh=new RegExp(`(^|(?<!
|
|
144
144
|
))
|
|
145
145
|
+(?!
|
|
146
|
-
|$)`,"g")}catch{
|
|
146
|
+
|$)`,"g")}catch{vh=/\n+(?!\n|$)/g}function Ba({comment:e,type:t,value:n},i,s,l){const{blockQuote:a,commentString:c,lineWidth:f}=i.options;if(!a||/\n[\t ]+$/.test(n))return Gi(n,i);const d=i.indent||(i.forceBlockIndent||Nu(n)?" ":""),m=a==="literal"?!0:a==="folded"||t===Ce.BLOCK_FOLDED?!1:t===Ce.BLOCK_LITERAL?!0:!SL(n,f,d.length);if(!n)return m?`|
|
|
147
147
|
`:`>
|
|
148
148
|
`;let p,g;for(g=n.length;g>0;--g){const A=n[g-1];if(A!==`
|
|
149
149
|
`&&A!==" "&&A!==" ")break}let v=n.substring(g);const S=v.indexOf(`
|
|
150
150
|
`);S===-1?p="-":n===v||S!==v.length-1?(p="+",l&&l()):p="",v&&(n=n.slice(0,-v.length),v[v.length-1]===`
|
|
151
|
-
`&&(v=v.slice(0,-1)),v=v.replace(
|
|
152
|
-
`)k=b;else break}let _=n.substring(0,k<b?k+1:b);_&&(n=n.substring(_.length),_=_.replace(/\n+/g,`$&${d}`));let N=(
|
|
153
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);let L=!1;const R=
|
|
151
|
+
`&&(v=v.slice(0,-1)),v=v.replace(vh,`$&${d}`));let w=!1,b,k=-1;for(b=0;b<n.length;++b){const A=n[b];if(A===" ")w=!0;else if(A===`
|
|
152
|
+
`)k=b;else break}let _=n.substring(0,k<b?k+1:b);_&&(n=n.substring(_.length),_=_.replace(/\n+/g,`$&${d}`));let N=(w?d?"2":"1":"")+p;if(e&&(N+=" "+c(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!m){const A=n.replace(/\n+/g,`
|
|
153
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);let L=!1;const R=_u(i,!0);a!=="folded"&&t!==Ce.BLOCK_FOLDED&&(R.onOverflow=()=>{L=!0});const C=Eu(`${_}${A}${v}`,d,gh,R);if(!L)return`>${N}
|
|
154
154
|
${d}${C}`}return n=n.replace(/\n+/g,`$&${d}`),`|${N}
|
|
155
|
-
${d}${_}${n}${v}`}function
|
|
155
|
+
${d}${_}${n}${v}`}function kL(e,t,n,i){const{type:s,value:l}=e,{actualString:a,implicitKey:c,indent:f,indentStep:d,inFlow:m}=t;if(c&&l.includes(`
|
|
156
156
|
`)||m&&/[[\]{},]/.test(l))return Gi(l,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return c||m||!l.includes(`
|
|
157
|
-
`)?Gi(l,t):
|
|
158
|
-
`))return
|
|
159
|
-
${f}`);if(a){const g=
|
|
160
|
-
${t.indent}${c}`:c}function
|
|
161
|
-
${c}:`):(b=`${b}:`,g&&(b+=Zr(b,n.indent,d(g))));let k,_,E;Xe(t)?(k=!!t.spaceBefore,_=t.commentBefore,E=t.comment):(k=!1,_=null,E=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!v&&!g&&je(t)&&(n.indentAtStart=b.length+1),
|
|
157
|
+
`)?Gi(l,t):Ba(e,t,n,i);if(!c&&!m&&s!==Ce.PLAIN&&l.includes(`
|
|
158
|
+
`))return Ba(e,t,n,i);if(Nu(l)){if(f==="")return t.forceBlockIndent=!0,Ba(e,t,n,i);if(c&&f===d)return Gi(l,t)}const p=l.replace(/\n+/g,`$&
|
|
159
|
+
${f}`);if(a){const g=w=>{var b;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((b=w.test)==null?void 0:b.test(p))},{compat:v,tags:S}=t.doc.schema;if(S.some(g)||v!=null&&v.some(g))return Gi(l,t)}return c?p:Eu(p,f,V1,_u(t,!1))}function ip(e,t,n,i){const{implicitKey:s,inFlow:l}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:c}=e;c!==Ce.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(c=Ce.QUOTE_DOUBLE);const f=m=>{switch(m){case Ce.BLOCK_FOLDED:case Ce.BLOCK_LITERAL:return s||l?Gi(a.value,t):Ba(a,t,n,i);case Ce.QUOTE_DOUBLE:return bs(a.value,t);case Ce.QUOTE_SINGLE:return yh(a.value,t);case Ce.PLAIN:return kL(a,t,n,i);default:return null}};let d=f(c);if(d===null){const{defaultKeyType:m,defaultStringType:p}=t.options,g=s&&m||p;if(d=f(g),d===null)throw new Error(`Unsupported default string type ${g}`)}return d}function H1(e,t){const n=Object.assign({blockQuote:!0,commentString:bL,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let i;switch(n.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:i,options:n}}function EL(e,t){var s;if(t.tag){const l=e.filter(a=>a.tag===t.tag);if(l.length>0)return l.find(a=>a.format===t.format)??l[0]}let n,i;if(je(t)){i=t.value;let l=e.filter(a=>{var c;return(c=a.identify)==null?void 0:c.call(a,i)});if(l.length>1){const a=l.filter(c=>c.test);a.length>0&&(l=a)}n=l.find(a=>a.format===t.format)??l.find(a=>!a.format)}else i=t,n=e.find(l=>l.nodeClass&&i instanceof l.nodeClass);if(!n){const l=((s=i==null?void 0:i.constructor)==null?void 0:s.name)??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${l} value`)}return n}function _L(e,t,{anchors:n,doc:i}){if(!i.directives)return"";const s=[],l=(je(e)||Ge(e))&&e.anchor;l&&j1(l)&&(n.add(l),s.push(`&${l}`));const a=e.tag??(t.default?null:t.tag);return a&&s.push(i.directives.tagString(a)),s.join(" ")}function fo(e,t,n,i){var f;if(Qe(e))return e.toString(t,n,i);if(go(e)){if(t.doc.directives)return e.toString(t);if((f=t.resolvedAliases)!=null&&f.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const l=Xe(e)?e:t.doc.createNode(e,{onTagObj:d=>s=d});s??(s=EL(t.doc.schema.tags,l));const a=_L(l,s,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const c=typeof s.stringify=="function"?s.stringify(l,t,n,i):je(l)?ip(l,t,n,i):l.toString(t,n,i);return a?je(l)||c[0]==="{"||c[0]==="["?`${a} ${c}`:`${a}
|
|
160
|
+
${t.indent}${c}`:c}function NL({key:e,value:t},n,i,s){const{allNullValues:l,doc:a,indent:c,indentStep:f,options:{commentString:d,indentSeq:m,simpleKeys:p}}=n;let g=Xe(e)&&e.comment||null;if(p){if(g)throw new Error("With simple keys, key nodes cannot have comments");if(Ge(e)||!Xe(e)&&typeof e=="object"){const R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let v=!p&&(!e||g&&t==null&&!n.inFlow||Ge(e)||(je(e)?e.type===Ce.BLOCK_FOLDED||e.type===Ce.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!v&&(p||!l),indent:c+f});let S=!1,w=!1,b=fo(e,n,()=>S=!0,()=>w=!0);if(!v&&!n.inFlow&&b.length>1024){if(p)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(n.inFlow){if(l||t==null)return S&&i&&i(),b===""?"?":v?`? ${b}`:b}else if(l&&!p||t==null&&v)return b=`? ${b}`,g&&!S?b+=Zr(b,n.indent,d(g)):w&&s&&s(),b;S&&(g=null),v?(g&&(b+=Zr(b,n.indent,d(g))),b=`? ${b}
|
|
161
|
+
${c}:`):(b=`${b}:`,g&&(b+=Zr(b,n.indent,d(g))));let k,_,E;Xe(t)?(k=!!t.spaceBefore,_=t.commentBefore,E=t.comment):(k=!1,_=null,E=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!v&&!g&&je(t)&&(n.indentAtStart=b.length+1),w=!1,!m&&f.length>=2&&!n.inFlow&&!v&&Fs(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let N=!1;const A=fo(t,n,()=>N=!0,()=>w=!0);let L=" ";if(g||k||_){if(L=k?`
|
|
162
162
|
`:"",_){const R=d(_);L+=`
|
|
163
163
|
${Kn(R,n.indent)}`}A===""&&!n.inFlow?L===`
|
|
164
164
|
`&&E&&(L=`
|
|
@@ -167,34 +167,34 @@ ${Kn(R,n.indent)}`}A===""&&!n.inFlow?L===`
|
|
|
167
167
|
${n.indent}`}else if(!v&&Ge(t)){const R=A[0],C=A.indexOf(`
|
|
168
168
|
`),P=C!==-1,F=n.inFlow??t.flow??t.items.length===0;if(P||!F){let M=!1;if(P&&(R==="&"||R==="!")){let $=A.indexOf(" ");R==="&"&&$!==-1&&$<C&&A[$+1]==="!"&&($=A.indexOf(" ",$+1)),($===-1||C<$)&&(M=!0)}M||(L=`
|
|
169
169
|
${n.indent}`)}}else(A===""||A[0]===`
|
|
170
|
-
`)&&(L="");return b+=L+A,n.inFlow?N&&i&&i():E&&!N?b+=Zr(b,n.indent,d(E)):
|
|
171
|
-
${f}${
|
|
170
|
+
`)&&(L="");return b+=L+A,n.inFlow?N&&i&&i():E&&!N?b+=Zr(b,n.indent,d(E)):w&&s&&s(),b}function W1(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Na="<<",Xn={identify:e=>e===Na||typeof e=="symbol"&&e.description===Na,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ce(Symbol(Na)),{addToJSMap:U1}),stringify:()=>Na},CL=(e,t)=>(Xn.identify(t)||je(t)&&(!t.type||t.type===Ce.PLAIN)&&Xn.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Xn.tag&&n.default));function U1(e,t,n){const i=q1(e,n);if(Fs(i))for(const s of i.items)qd(e,t,s);else if(Array.isArray(i))for(const s of i)qd(e,t,s);else qd(e,t,i)}function qd(e,t,n){const i=q1(e,n);if(!zs(i))throw new Error("Merge sources must be maps or map aliases");const s=i.toJSON(null,e,Map);for(const[l,a]of s)t instanceof Map?t.has(l)||t.set(l,a):t instanceof Set?t.add(l):Object.prototype.hasOwnProperty.call(t,l)||Object.defineProperty(t,l,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function q1(e,t){return e&&go(t)?t.resolve(e.doc,e):t}function Y1(e,t,{key:n,value:i}){if(Xe(n)&&n.addToJSMap)n.addToJSMap(e,t,i);else if(CL(e,n))U1(e,t,i);else{const s=Zt(n,"",e);if(t instanceof Map)t.set(s,Zt(i,s,e));else if(t instanceof Set)t.add(s);else{const l=IL(n,s,e),a=Zt(i,l,e);l in t?Object.defineProperty(t,l,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[l]=a}}return t}function IL(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Xe(e)&&(n!=null&&n.doc)){const i=H1(n.doc,{});i.anchors=new Set;for(const l of n.anchors.keys())i.anchors.add(l.anchor);i.inFlow=!0,i.inStringifyKey=!0;const s=e.toString(i);if(!n.mapKeyWarned){let l=JSON.stringify(s);l.length>40&&(l=l.substring(0,36)+'..."'),W1(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function op(e,t,n){const i=As(e,void 0,n),s=As(t,void 0,n);return new St(i,s)}class St{constructor(t,n=null){Object.defineProperty(this,en,{value:R1}),this.key=t,this.value=n}clone(t){let{key:n,value:i}=this;return Xe(n)&&(n=n.clone(t)),Xe(i)&&(i=i.clone(t)),new St(n,i)}toJSON(t,n){const i=n!=null&&n.mapAsMap?new Map:{};return Y1(n,i,this)}toString(t,n,i){return t!=null&&t.doc?NL(this,t,n,i):JSON.stringify(this)}}function K1(e,t,n){return(t.inFlow??e.flow?PL:TL)(e,t,n)}function TL({comment:e,items:t},n,{blockItemPrefix:i,flowChars:s,itemIndent:l,onChompKeep:a,onComment:c}){const{indent:f,options:{commentString:d}}=n,m=Object.assign({},n,{indent:l,type:null});let p=!1;const g=[];for(let S=0;S<t.length;++S){const w=t[S];let b=null;if(Xe(w))!p&&w.spaceBefore&&g.push(""),iu(n,g,w.commentBefore,p),w.comment&&(b=w.comment);else if(Qe(w)){const _=Xe(w.key)?w.key:null;_&&(!p&&_.spaceBefore&&g.push(""),iu(n,g,_.commentBefore,p))}p=!1;let k=fo(w,m,()=>b=null,()=>p=!0);b&&(k+=Zr(k,l,d(b))),p&&b&&(p=!1),g.push(i+k)}let v;if(g.length===0)v=s.start+s.end;else{v=g[0];for(let S=1;S<g.length;++S){const w=g[S];v+=w?`
|
|
171
|
+
${f}${w}`:`
|
|
172
172
|
`}}return e?(v+=`
|
|
173
|
-
`+Kn(d(e),f),c&&c()):p&&a&&a(),v}function
|
|
174
|
-
`)),S<e.length-1?k+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(d||(d=p.reduce((_,E)=>_+E.length+2,2)+(k.length+2)>t.options.lineWidth)),d&&(k+=",")),b&&(k+=Zr(k,i,c(b))),p.push(k),m=p.length}const{start:g,end:v}=n;if(p.length===0)return g+v;if(!d){const S=p.reduce((
|
|
175
|
-
${l}${s}${
|
|
173
|
+
`+Kn(d(e),f),c&&c()):p&&a&&a(),v}function PL({items:e},t,{flowChars:n,itemIndent:i}){const{indent:s,indentStep:l,flowCollectionPadding:a,options:{commentString:c}}=t;i+=l;const f=Object.assign({},t,{indent:i,inFlow:!0,type:null});let d=!1,m=0;const p=[];for(let S=0;S<e.length;++S){const w=e[S];let b=null;if(Xe(w))w.spaceBefore&&p.push(""),iu(t,p,w.commentBefore,!1),w.comment&&(b=w.comment);else if(Qe(w)){const _=Xe(w.key)?w.key:null;_&&(_.spaceBefore&&p.push(""),iu(t,p,_.commentBefore,!1),_.comment&&(d=!0));const E=Xe(w.value)?w.value:null;E?(E.comment&&(b=E.comment),E.commentBefore&&(d=!0)):w.value==null&&(_!=null&&_.comment)&&(b=_.comment)}b&&(d=!0);let k=fo(w,f,()=>b=null);d||(d=p.length>m||k.includes(`
|
|
174
|
+
`)),S<e.length-1?k+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(d||(d=p.reduce((_,E)=>_+E.length+2,2)+(k.length+2)>t.options.lineWidth)),d&&(k+=",")),b&&(k+=Zr(k,i,c(b))),p.push(k),m=p.length}const{start:g,end:v}=n;if(p.length===0)return g+v;if(!d){const S=p.reduce((w,b)=>w+b.length+2,2);d=t.options.lineWidth>0&&S>t.options.lineWidth}if(d){let S=g;for(const w of p)S+=w?`
|
|
175
|
+
${l}${s}${w}`:`
|
|
176
176
|
`;return`${S}
|
|
177
|
-
${s}${v}`}else return`${g}${a}${p.join(" ")}${a}${v}`}function
|
|
178
|
-
`:" ")}return
|
|
177
|
+
${s}${v}`}else return`${g}${a}${p.join(" ")}${a}${v}`}function iu({indent:e,options:{commentString:t}},n,i,s){if(i&&s&&(i=i.replace(/^\n+/,"")),i){const l=Kn(t(i),e);n.push(l.trimStart())}}function ei(e,t){const n=je(t)?t.value:t;for(const i of e)if(Qe(i)&&(i.key===t||i.key===n||je(i.key)&&i.key.value===n))return i}class Jt extends B1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Cr,t),this.items=[]}static from(t,n,i){const{keepUndefined:s,replacer:l}=i,a=new this(t),c=(f,d)=>{if(typeof l=="function")d=l.call(n,f,d);else if(Array.isArray(l)&&!l.includes(f))return;(d!==void 0||s)&&a.items.push(op(f,d,i))};if(n instanceof Map)for(const[f,d]of n)c(f,d);else if(n&&typeof n=="object")for(const f of Object.keys(n))c(f,n[f]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){var a;let i;Qe(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new St(t,t==null?void 0:t.value):i=new St(t.key,t.value);const s=ei(this.items,i.key),l=(a=this.schema)==null?void 0:a.sortMapEntries;if(s){if(!n)throw new Error(`Key ${i.key} already set`);je(s.value)&&F1(i.value)?s.value.value=i.value:s.value=i.value}else if(l){const c=this.items.findIndex(f=>l(i,f)<0);c===-1?this.items.push(i):this.items.splice(c,0,i)}else this.items.push(i)}delete(t){const n=ei(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const i=ei(this.items,t),s=i==null?void 0:i.value;return(!n&&je(s)?s.value:s)??void 0}has(t){return!!ei(this.items,t)}set(t,n){this.add(new St(t,n),!0)}toJSON(t,n,i){const s=i?new i:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const l of this.items)Y1(n,s,l);return s}toString(t,n,i){if(!t)return JSON.stringify(this);for(const s of this.items)if(!Qe(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),K1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:n})}}const vo={collection:"map",default:!0,nodeClass:Jt,tag:"tag:yaml.org,2002:map",resolve(e,t){return zs(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Jt.from(e,t,n)};class ai extends B1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(mo,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Ca(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const i=Ca(t);if(typeof i!="number")return;const s=this.items[i];return!n&&je(s)?s.value:s}has(t){const n=Ca(t);return typeof n=="number"&&n<this.items.length}set(t,n){const i=Ca(t);if(typeof i!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[i];je(s)&&F1(n)?s.value=n:this.items[i]=n}toJSON(t,n){const i=[];n!=null&&n.onCreate&&n.onCreate(i);let s=0;for(const l of this.items)i.push(Zt(l,String(s++),n));return i}toString(t,n,i){return t?K1(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:i,onComment:n}):JSON.stringify(this)}static from(t,n,i){const{replacer:s}=i,l=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let c of n){if(typeof s=="function"){const f=n instanceof Set?c:String(a++);c=s.call(n,f,c)}l.items.push(As(c,void 0,i))}}return l}}function Ca(e){let t=je(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const wo={collection:"seq",default:!0,nodeClass:ai,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Fs(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>ai.from(e,t,n)},Cu={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,i){return t=Object.assign({actualString:!0},t),ip(e,t,n,i)}},Iu={identify:e=>e==null,createNode:()=>new Ce(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ce(null),stringify:({source:e},t)=>typeof e=="string"&&Iu.test.test(e)?e:t.options.nullStr},sp={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Ce(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&sp.test.test(e)){const i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?n.options.trueStr:n.options.falseStr}};function vn({format:e,minFractionDigits:t,tag:n,value:i}){if(typeof i=="bigint")return String(i);const s=typeof i=="number"?i:Number(i);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let l=Object.is(i,-0)?"-0":JSON.stringify(i);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(l)&&!l.includes("e")){let a=l.indexOf(".");a<0&&(a=l.length,l+=".");let c=t-(l.length-a-1);for(;c-- >0;)l+="0"}return l}const G1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:vn},X1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():vn(e)}},Q1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Ce(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:vn},Tu=e=>typeof e=="bigint"||Number.isInteger(e),lp=(e,t,n,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),n);function J1(e,t,n){const{value:i}=e;return Tu(i)&&i>=0?n+i.toString(t):vn(e)}const Z1={identify:e=>Tu(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>lp(e,2,8,n),stringify:e=>J1(e,8,"0o")},eb={identify:Tu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>lp(e,0,10,n),stringify:vn},tb={identify:e=>Tu(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>lp(e,2,16,n),stringify:e=>J1(e,16,"0x")},AL=[vo,wo,Cu,Iu,sp,Z1,eb,tb,G1,X1,Q1];function Ev(e){return typeof e=="bigint"||Number.isInteger(e)}const Ia=({value:e})=>JSON.stringify(e),OL=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Ia},{identify:e=>e==null,createNode:()=>new Ce(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Ia},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Ia},{identify:Ev,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Ev(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Ia}],LL={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},ML=[vo,wo].concat(OL,LL),ap={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(n.length);for(let s=0;s<n.length;++s)i[s]=n.charCodeAt(s);return i}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},i,s,l){if(!n)return"";const a=n;let c;if(typeof btoa=="function"){let f="";for(let d=0;d<a.length;++d)f+=String.fromCharCode(a[d]);c=btoa(f)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Ce.BLOCK_LITERAL),t!==Ce.QUOTE_DOUBLE){const f=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),d=Math.ceil(c.length/f),m=new Array(d);for(let p=0,g=0;p<d;++p,g+=f)m[p]=c.substr(g,f);c=m.join(t===Ce.BLOCK_LITERAL?`
|
|
178
|
+
`:" ")}return ip({comment:e,type:t,value:c},i,s,l)}};function nb(e,t){if(Fs(e))for(let n=0;n<e.items.length;++n){let i=e.items[n];if(!Qe(i)){if(zs(i)){i.items.length>1&&t("Each pair must have its own sequence indicator");const s=i.items[0]||new St(new Ce(null));if(i.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${i.commentBefore}
|
|
179
179
|
${s.key.commentBefore}`:i.commentBefore),i.comment){const l=s.value??s.key;l.comment=l.comment?`${i.comment}
|
|
180
|
-
${l.comment}`:i.comment}i=s}e.items[n]=Qe(i)?i:new St(i)}}else t("Expected a sequence for this tag");return e}function
|
|
180
|
+
${l.comment}`:i.comment}i=s}e.items[n]=Qe(i)?i:new St(i)}}else t("Expected a sequence for this tag");return e}function rb(e,t,n){const{replacer:i}=n,s=new ai(e);s.tag="tag:yaml.org,2002:pairs";let l=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof i=="function"&&(a=i.call(t,String(l++),a));let c,f;if(Array.isArray(a))if(a.length===2)c=a[0],f=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const d=Object.keys(a);if(d.length===1)c=d[0],f=a[c];else throw new TypeError(`Expected tuple with one key, not ${d.length} keys`)}else c=a;s.items.push(op(c,f,n))}return s}const up={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:nb,createNode:rb};class Zi extends ai{constructor(){super(),this.add=Jt.prototype.add.bind(this),this.delete=Jt.prototype.delete.bind(this),this.get=Jt.prototype.get.bind(this),this.has=Jt.prototype.has.bind(this),this.set=Jt.prototype.set.bind(this),this.tag=Zi.tag}toJSON(t,n){if(!n)return super.toJSON(t);const i=new Map;n!=null&&n.onCreate&&n.onCreate(i);for(const s of this.items){let l,a;if(Qe(s)?(l=Zt(s.key,"",n),a=Zt(s.value,l,n)):l=Zt(s,"",n),i.has(l))throw new Error("Ordered maps must not include duplicate keys");i.set(l,a)}return i}static from(t,n,i){const s=rb(t,n,i),l=new this;return l.items=s.items,l}}Zi.tag="tag:yaml.org,2002:omap";const cp={collection:"seq",identify:e=>e instanceof Map,nodeClass:Zi,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=nb(e,t),i=[];for(const{key:s}of n.items)je(s)&&(i.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):i.push(s.value));return Object.assign(new Zi,n)},createNode:(e,t,n)=>Zi.from(e,t,n)};function ib({value:e,source:t},n){return t&&(e?ob:sb).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const ob={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Ce(!0),stringify:ib},sb={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Ce(!1),stringify:ib},RL={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:vn},DL={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():vn(e)}},jL={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Ce(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const i=e.substring(n+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:vn},Bs=e=>typeof e=="bigint"||Number.isInteger(e);function Pu(e,t,n,{intAsBigInt:i}){const s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const a=BigInt(e);return s==="-"?BigInt(-1)*a:a}const l=parseInt(e,n);return s==="-"?-1*l:l}function fp(e,t,n){const{value:i}=e;if(Bs(i)){const s=i.toString(t);return i<0?"-"+n+s.substr(1):n+s}return vn(e)}const $L={identify:Bs,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Pu(e,2,2,n),stringify:e=>fp(e,2,"0b")},zL={identify:Bs,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Pu(e,1,8,n),stringify:e=>fp(e,8,"0")},FL={identify:Bs,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Pu(e,0,10,n),stringify:vn},BL={identify:Bs,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Pu(e,2,16,n),stringify:e=>fp(e,16,"0x")};class eo extends Jt{constructor(t){super(t),this.tag=eo.tag}add(t){let n;Qe(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new St(t.key,null):n=new St(t,null),ei(this.items,n.key)||this.items.push(n)}get(t,n){const i=ei(this.items,t);return!n&&Qe(i)?je(i.key)?i.key.value:i.key:i}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const i=ei(this.items,t);i&&!n?this.items.splice(this.items.indexOf(i),1):!i&&n&&this.items.push(new St(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,i);throw new Error("Set items must all have null values")}static from(t,n,i){const{replacer:s}=i,l=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof s=="function"&&(a=s.call(n,a,a)),l.items.push(op(a,null,i));return l}}eo.tag="tag:yaml.org,2002:set";const dp={collection:"map",identify:e=>e instanceof Set,nodeClass:eo,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>eo.from(e,t,n),resolve(e,t){if(zs(e)){if(e.hasAllNullValues(!0))return Object.assign(new eo,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function hp(e,t){const n=e[0],i=n==="-"||n==="+"?e.substring(1):e,s=a=>t?BigInt(a):Number(a),l=i.replace(/_/g,"").split(":").reduce((a,c)=>a*s(60)+s(c),s(0));return n==="-"?s(-1)*l:l}function lb(e){let{value:t}=e,n=a=>a;if(typeof t=="bigint")n=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return vn(e);let i="";t<0&&(i="-",t*=n(-1));const s=n(60),l=[t%s];return t<60?l.unshift(0):(t=(t-l[0])/s,l.unshift(t%s),t>=60&&(t=(t-l[0])/s,l.unshift(t))),i+l.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const ab={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>hp(e,n),stringify:lb},ub={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>hp(e,!1),stringify:lb},Au={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Au.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,i,s,l,a,c]=t.map(Number),f=t[7]?Number((t[7]+"00").substr(1,3)):0;let d=Date.UTC(n,i-1,s,l||0,a||0,c||0,f);const m=t[8];if(m&&m!=="Z"){let p=hp(m,!1);Math.abs(p)<30&&(p*=60),d-=6e4*p}return new Date(d)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},_v=[vo,wo,Cu,Iu,ob,sb,$L,zL,FL,BL,RL,DL,jL,ap,Xn,cp,up,dp,ab,ub,Au],Nv=new Map([["core",AL],["failsafe",[vo,wo,Cu]],["json",ML],["yaml11",_v],["yaml-1.1",_v]]),Cv={binary:ap,bool:sp,float:Q1,floatExp:X1,floatNaN:G1,floatTime:ub,int:eb,intHex:tb,intOct:Z1,intTime:ab,map:vo,merge:Xn,null:Iu,omap:cp,pairs:up,seq:wo,set:dp,timestamp:Au},VL={"tag:yaml.org,2002:binary":ap,"tag:yaml.org,2002:merge":Xn,"tag:yaml.org,2002:omap":cp,"tag:yaml.org,2002:pairs":up,"tag:yaml.org,2002:set":dp,"tag:yaml.org,2002:timestamp":Au};function Yd(e,t,n){const i=Nv.get(t);if(i&&!e)return n&&!i.includes(Xn)?i.concat(Xn):i.slice();let s=i;if(!s)if(Array.isArray(e))s=[];else{const l=Array.from(Nv.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${l} or define customTags array`)}if(Array.isArray(e))for(const l of e)s=s.concat(l);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(Xn)),s.reduce((l,a)=>{const c=typeof a=="string"?Cv[a]:a;if(!c){const f=JSON.stringify(a),d=Object.keys(Cv).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${f}; use one of ${d}`)}return l.includes(c)||l.push(c),l},[])}const HL=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class pp{constructor({compat:t,customTags:n,merge:i,resolveKnownTags:s,schema:l,sortMapEntries:a,toStringDefaults:c}){this.compat=Array.isArray(t)?Yd(t,"compat"):t?Yd(null,t):null,this.name=typeof l=="string"&&l||"core",this.knownTags=s?VL:{},this.tags=Yd(n,this.name,i),this.toStringOptions=c??null,Object.defineProperty(this,Cr,{value:vo}),Object.defineProperty(this,An,{value:Cu}),Object.defineProperty(this,mo,{value:wo}),this.sortMapEntries=typeof a=="function"?a:a===!0?HL:null}clone(){const t=Object.create(pp.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function WL(e,t){var f;const n=[];let i=t.directives===!0;if(t.directives!==!1&&e.directives){const d=e.directives.toString(e);d?(n.push(d),i=!0):e.directives.docStart&&(i=!0)}i&&n.push("---");const s=H1(e,t),{commentString:l}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const d=l(e.commentBefore);n.unshift(Kn(d,""))}let a=!1,c=null;if(e.contents){if(Xe(e.contents)){if(e.contents.spaceBefore&&i&&n.push(""),e.contents.commentBefore){const p=l(e.contents.commentBefore);n.push(Kn(p,""))}s.forceBlockIndent=!!e.comment,c=e.contents.comment}const d=c?void 0:()=>a=!0;let m=fo(e.contents,s,()=>c=null,d);c&&(m+=Zr(m,"",l(c))),(m[0]==="|"||m[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${m}`:n.push(m)}else n.push(fo(e.contents,s));if((f=e.directives)!=null&&f.docEnd)if(e.comment){const d=l(e.comment);d.includes(`
|
|
181
181
|
`)?(n.push("..."),n.push(Kn(d,""))):n.push(`... ${d}`)}else n.push("...");else{let d=e.comment;d&&a&&(d=d.replace(/^\n+/,"")),d&&((!a||c)&&n[n.length-1]!==""&&n.push(""),n.push(Kn(l(d),"")))}return n.join(`
|
|
182
182
|
`)+`
|
|
183
|
-
`}class
|
|
183
|
+
`}class Ou{constructor(t,n,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,en,{value:mh});let s=null;typeof n=="function"||Array.isArray(n)?s=n:i===void 0&&n&&(i=n,n=void 0);const l=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=l;let{version:a}=l;i!=null&&i._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new xt({version:a}),this.setSchema(a,i),this.contents=t===void 0?null:this.createNode(t,s,i)}clone(){const t=Object.create(Ou.prototype,{[en]:{value:mh}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Xe(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Hi(this.contents)&&this.contents.add(t)}addIn(t,n){Hi(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const i=$1(this);t.anchor=!n||i.has(n)?z1(n||"a",i):n}return new rp(t.anchor)}createNode(t,n,i){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const b=_=>typeof _=="number"||_ instanceof String||_ instanceof Number,k=n.filter(b).map(String);k.length>0&&(n=n.concat(k)),s=n}else i===void 0&&n&&(i=n,n=void 0);const{aliasDuplicateObjects:l,anchorPrefix:a,flow:c,keepUndefined:f,onTagObj:d,tag:m}=i??{},{onAnchor:p,setAnchors:g,sourceObjects:v}=vL(this,a||"a"),S={aliasDuplicateObjects:l??!0,keepUndefined:f??!1,onAnchor:p,onTagObj:d,replacer:s,schema:this.schema,sourceObjects:v},w=As(t,m,S);return c&&Ge(w)&&(w.flow=!0),g(),w}createPair(t,n,i={}){const s=this.createNode(t,null,i),l=this.createNode(n,null,i);return new St(s,l)}delete(t){return Hi(this.contents)?this.contents.delete(t):!1}deleteIn(t){return gs(t)?this.contents==null?!1:(this.contents=null,!0):Hi(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Ge(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return gs(t)?!n&&je(this.contents)?this.contents.value:this.contents:Ge(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Ge(this.contents)?this.contents.has(t):!1}hasIn(t){return gs(t)?this.contents!==void 0:Ge(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=ru(this.schema,[t],n):Hi(this.contents)&&this.contents.set(t,n)}setIn(t,n){gs(t)?this.contents=n:this.contents==null?this.contents=ru(this.schema,Array.from(t),n):Hi(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new xt({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new xt({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(i)this.schema=new pp(Object.assign(i,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:i,maxAliasCount:s,onAnchor:l,reviver:a}={}){const c={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=Zt(this.contents,n??"",c);if(typeof l=="function")for(const{count:d,res:m}of c.anchors.values())l(m,d);return typeof a=="function"?Ki(a,{"":f},"",f):f}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return WL(this,t)}}function Hi(e){if(Ge(e))return!0;throw new Error("Expected a YAML collection as document contents")}class cb extends Error{constructor(t,n,i,s){super(),this.name=t,this.code=i,this.message=s,this.pos=n}}class ys extends cb{constructor(t,n,i){super("YAMLParseError",t,n,i)}}class UL extends cb{constructor(t,n,i){super("YAMLWarning",t,n,i)}}const Iv=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(c=>t.linePos(c));const{line:i,col:s}=n.linePos[0];n.message+=` at line ${i}, column ${s}`;let l=s-1,a=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(l>=60&&a.length>80){const c=Math.min(l-39,a.length-79);a="…"+a.substring(c),l-=c-1}if(a.length>80&&(a=a.substring(0,79)+"…"),i>1&&/^ *$/.test(a.substring(0,l))){let c=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);c.length>80&&(c=c.substring(0,79)+`…
|
|
184
184
|
`),a=c+a}if(/[^ ]/.test(a)){let c=1;const f=n.linePos[1];(f==null?void 0:f.line)===i&&f.col>s&&(c=Math.max(1,Math.min(f.col-s,80-l)));const d=" ".repeat(l)+"^".repeat(c);n.message+=`:
|
|
185
185
|
|
|
186
186
|
${a}
|
|
187
187
|
${d}
|
|
188
|
-
`}};function ho(e,{flow:t,indicator:n,next:i,offset:s,onError:l,parentIndent:a,startOnNewline:c}){let f=!1,d=c,m=c,p="",g="",v=!1,S=!1,
|
|
189
|
-
`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(Os(t.key)||Os(t.value))return!0}return!1;default:return!0}}function
|
|
190
|
-
`+b.comment:c.comment=b.comment);continue}(b.newlineAfterProp||Os(v))&&s(v??g[g.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=b.found)==null?void 0:m.indent)!==i.indent&&s(f,"BAD_INDENT",
|
|
191
|
-
`+N.comment:E.comment=N.comment);const A=new St(E);n.options.keepSourceTokens&&(A.srcToken=p),c.items.push(A)}}return d&&d<f&&s(d,"IMPOSSIBLE","Map comment with trailing content"),c.range=[i.offset,f,d??f],c}function
|
|
188
|
+
`}};function ho(e,{flow:t,indicator:n,next:i,offset:s,onError:l,parentIndent:a,startOnNewline:c}){let f=!1,d=c,m=c,p="",g="",v=!1,S=!1,w=null,b=null,k=null,_=null,E=null,N=null,A=null;for(const C of e)switch(S&&(C.type!=="space"&&C.type!=="newline"&&C.type!=="comma"&&l(C.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),w&&(d&&C.type!=="comment"&&C.type!=="newline"&&l(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),C.type){case"space":!t&&(n!=="doc-start"||(i==null?void 0:i.type)!=="flow-collection")&&C.source.includes(" ")&&(w=C),m=!0;break;case"comment":{m||l(C,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const P=C.source.substring(1)||" ";p?p+=g+P:p=P,g="",d=!1;break}case"newline":d?p?p+=C.source:(!N||n!=="seq-item-ind")&&(f=!0):g+=C.source,d=!0,v=!0,(b||k)&&(_=C),m=!0;break;case"anchor":b&&l(C,"MULTIPLE_ANCHORS","A node can have at most one anchor"),C.source.endsWith(":")&&l(C.offset+C.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),b=C,A??(A=C.offset),d=!1,m=!1,S=!0;break;case"tag":{k&&l(C,"MULTIPLE_TAGS","A node can have at most one tag"),k=C,A??(A=C.offset),d=!1,m=!1,S=!0;break}case n:(b||k)&&l(C,"BAD_PROP_ORDER",`Anchors and tags must be after the ${C.source} indicator`),N&&l(C,"UNEXPECTED_TOKEN",`Unexpected ${C.source} in ${t??"collection"}`),N=C,d=n==="seq-item-ind"||n==="explicit-key-ind",m=!1;break;case"comma":if(t){E&&l(C,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),E=C,d=!1,m=!1;break}default:l(C,"UNEXPECTED_TOKEN",`Unexpected ${C.type} token`),d=!1,m=!1}const L=e[e.length-1],R=L?L.offset+L.source.length:s;return S&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&l(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(d&&w.indent<=a||(i==null?void 0:i.type)==="block-map"||(i==null?void 0:i.type)==="block-seq")&&l(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:N,spaceBefore:f,comment:p,hasNewline:v,anchor:b,tag:k,newlineAfterProp:_,end:R,start:A??R}}function Os(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
189
|
+
`))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(Os(t.key)||Os(t.value))return!0}return!1;default:return!0}}function wh(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&Os(t)&&n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function fb(e,t,n){const{uniqueKeys:i}=e.options;if(i===!1)return!1;const s=typeof i=="function"?i:(l,a)=>l===a||je(l)&&je(a)&&l.value===a.value;return t.some(l=>s(l.key,n))}const Tv="All mapping items must start at the same column";function qL({composeNode:e,composeEmptyNode:t},n,i,s,l){var m;const a=(l==null?void 0:l.nodeClass)??Jt,c=new a(n.schema);n.atRoot&&(n.atRoot=!1);let f=i.offset,d=null;for(const p of i.items){const{start:g,key:v,sep:S,value:w}=p,b=ho(g,{indicator:"explicit-key-ind",next:v??(S==null?void 0:S[0]),offset:f,onError:s,parentIndent:i.indent,startOnNewline:!0}),k=!b.found;if(k){if(v&&(v.type==="block-seq"?s(f,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==i.indent&&s(f,"BAD_INDENT",Tv)),!b.anchor&&!b.tag&&!S){d=b.end,b.comment&&(c.comment?c.comment+=`
|
|
190
|
+
`+b.comment:c.comment=b.comment);continue}(b.newlineAfterProp||Os(v))&&s(v??g[g.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=b.found)==null?void 0:m.indent)!==i.indent&&s(f,"BAD_INDENT",Tv);n.atKey=!0;const _=b.end,E=v?e(n,v,b,s):t(n,_,g,null,b,s);n.schema.compat&&wh(i.indent,v,s),n.atKey=!1,fb(n,c.items,E)&&s(_,"DUPLICATE_KEY","Map keys must be unique");const N=ho(S??[],{indicator:"map-value-ind",next:w,offset:E.range[2],onError:s,parentIndent:i.indent,startOnNewline:!v||v.type==="block-scalar"});if(f=N.end,N.found){k&&((w==null?void 0:w.type)==="block-map"&&!N.hasNewline&&s(f,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&b.start<N.found.offset-1024&&s(E.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const A=w?e(n,w,N,s):t(n,f,S,null,N,s);n.schema.compat&&wh(i.indent,w,s),f=A.range[2];const L=new St(E,A);n.options.keepSourceTokens&&(L.srcToken=p),c.items.push(L)}else{k&&s(E.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),N.comment&&(E.comment?E.comment+=`
|
|
191
|
+
`+N.comment:E.comment=N.comment);const A=new St(E);n.options.keepSourceTokens&&(A.srcToken=p),c.items.push(A)}}return d&&d<f&&s(d,"IMPOSSIBLE","Map comment with trailing content"),c.range=[i.offset,f,d??f],c}function YL({composeNode:e,composeEmptyNode:t},n,i,s,l){const a=(l==null?void 0:l.nodeClass)??ai,c=new a(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=i.offset,d=null;for(const{start:m,value:p}of i.items){const g=ho(m,{indicator:"seq-item-ind",next:p,offset:f,onError:s,parentIndent:i.indent,startOnNewline:!0});if(!g.found)if(g.anchor||g.tag||p)(p==null?void 0:p.type)==="block-seq"?s(g.end,"BAD_INDENT","All sequence items must start at the same column"):s(f,"MISSING_CHAR","Sequence item without - indicator");else{d=g.end,g.comment&&(c.comment=g.comment);continue}const v=p?e(n,p,g,s):t(n,g.end,m,null,g,s);n.schema.compat&&wh(i.indent,p,s),f=v.range[2],c.items.push(v)}return c.range=[i.offset,f,d??f],c}function Vs(e,t,n,i){let s="";if(e){let l=!1,a="";for(const c of e){const{source:f,type:d}=c;switch(d){case"space":l=!0;break;case"comment":{n&&!l&&i(c,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=f.substring(1)||" ";s?s+=a+m:s=m,a="";break}case"newline":s&&(a+=f),l=!0;break;default:i(c,"UNEXPECTED_TOKEN",`Unexpected ${d} at node end`)}t+=f.length}}return{comment:s,offset:t}}const Kd="Block collections are not allowed within flow collections",Gd=e=>e&&(e.type==="block-map"||e.type==="block-seq");function KL({composeNode:e,composeEmptyNode:t},n,i,s,l){var b;const a=i.start.source==="{",c=a?"flow map":"flow sequence",f=(l==null?void 0:l.nodeClass)??(a?Jt:ai),d=new f(n.schema);d.flow=!0;const m=n.atRoot;m&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let p=i.offset+i.start.source.length;for(let k=0;k<i.items.length;++k){const _=i.items[k],{start:E,key:N,sep:A,value:L}=_,R=ho(E,{flow:c,indicator:"explicit-key-ind",next:N??(A==null?void 0:A[0]),offset:p,onError:s,parentIndent:i.indent,startOnNewline:!1});if(!R.found){if(!R.anchor&&!R.tag&&!A&&!L){k===0&&R.comma?s(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${c}`):k<i.items.length-1&&s(R.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${c}`),R.comment&&(d.comment?d.comment+=`
|
|
192
192
|
`+R.comment:d.comment=R.comment),p=R.end;continue}!a&&n.options.strict&&Os(N)&&s(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)R.comma&&s(R.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${c}`);else if(R.comma||s(R.start,"MISSING_CHAR",`Missing , between ${c} items`),R.comment){let C="";e:for(const P of E)switch(P.type){case"comma":case"space":break;case"comment":C=P.source.substring(1);break e;default:break e}if(C){let P=d.items[d.items.length-1];Qe(P)&&(P=P.value??P.key),P.comment?P.comment+=`
|
|
193
|
-
`+C:P.comment=C,R.comment=R.comment.substring(C.length+1)}}if(!a&&!A&&!R.found){const C=L?e(n,L,R,s):t(n,R.end,A,null,R,s);d.items.push(C),p=C.range[2],
|
|
194
|
-
`+F.comment:P.comment=F.comment);const $=new St(P,M);if(n.options.keepSourceTokens&&($.srcToken=_),a){const Z=d;
|
|
195
|
-
`+k.comment:d.comment=k.comment),d.range=[i.offset,
|
|
196
|
-
`.repeat(Math.max(1,a.length-1)):"";let b=i+s.length;return t.source&&(b+=t.source.length),{value:
|
|
197
|
-
`;for(let
|
|
193
|
+
`+C:P.comment=C,R.comment=R.comment.substring(C.length+1)}}if(!a&&!A&&!R.found){const C=L?e(n,L,R,s):t(n,R.end,A,null,R,s);d.items.push(C),p=C.range[2],Gd(L)&&s(C.range,"BLOCK_IN_FLOW",Kd)}else{n.atKey=!0;const C=R.end,P=N?e(n,N,R,s):t(n,C,E,null,R,s);Gd(N)&&s(P.range,"BLOCK_IN_FLOW",Kd),n.atKey=!1;const F=ho(A??[],{flow:c,indicator:"map-value-ind",next:L,offset:P.range[2],onError:s,parentIndent:i.indent,startOnNewline:!1});if(F.found){if(!a&&!R.found&&n.options.strict){if(A)for(const Z of A){if(Z===F.found)break;if(Z.type==="newline"){s(Z,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}R.start<F.found.offset-1024&&s(F.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else L&&("source"in L&&((b=L.source)==null?void 0:b[0])===":"?s(L,"MISSING_CHAR",`Missing space after : in ${c}`):s(F.start,"MISSING_CHAR",`Missing , or : between ${c} items`));const M=L?e(n,L,F,s):F.found?t(n,F.end,A,null,F,s):null;M?Gd(L)&&s(M.range,"BLOCK_IN_FLOW",Kd):F.comment&&(P.comment?P.comment+=`
|
|
194
|
+
`+F.comment:P.comment=F.comment);const $=new St(P,M);if(n.options.keepSourceTokens&&($.srcToken=_),a){const Z=d;fb(n,Z.items,P)&&s(C,"DUPLICATE_KEY","Map keys must be unique"),Z.items.push($)}else{const Z=new Jt(n.schema);Z.flow=!0,Z.items.push($);const j=(M??P).range;Z.range=[P.range[0],j[1],j[2]],d.items.push(Z)}p=M?M.range[2]:F.end}}const g=a?"}":"]",[v,...S]=i.end;let w=p;if((v==null?void 0:v.source)===g)w=v.offset+v.source.length;else{const k=c[0].toUpperCase()+c.substring(1),_=m?`${k} must end with a ${g}`:`${k} in block collection must be sufficiently indented and end with a ${g}`;s(p,m?"MISSING_CHAR":"BAD_INDENT",_),v&&v.source.length!==1&&S.unshift(v)}if(S.length>0){const k=Vs(S,w,n.options.strict,s);k.comment&&(d.comment?d.comment+=`
|
|
195
|
+
`+k.comment:d.comment=k.comment),d.range=[i.offset,w,k.offset]}else d.range=[i.offset,w,w];return d}function Xd(e,t,n,i,s,l){const a=n.type==="block-map"?qL(e,t,n,i,l):n.type==="block-seq"?YL(e,t,n,i,l):KL(e,t,n,i,l),c=a.constructor;return s==="!"||s===c.tagName?(a.tag=c.tagName,a):(s&&(a.tag=s),a)}function GL(e,t,n,i,s){var g;const l=i.tag,a=l?t.directives.tagName(l.source,v=>s(l,"TAG_RESOLVE_FAILED",v)):null;if(n.type==="block-seq"){const{anchor:v,newlineAfterProp:S}=i,w=v&&l?v.offset>l.offset?v:l:v??l;w&&(!S||S.offset<w.offset)&&s(w,"MISSING_CHAR","Missing newline after block sequence props")}const c=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!a||a==="!"||a===Jt.tagName&&c==="map"||a===ai.tagName&&c==="seq")return Xd(e,t,n,s,a);let f=t.schema.tags.find(v=>v.tag===a&&v.collection===c);if(!f){const v=t.schema.knownTags[a];if((v==null?void 0:v.collection)===c)t.schema.tags.push(Object.assign({},v,{default:!1})),f=v;else return v?s(l,"BAD_COLLECTION_TYPE",`${v.tag} used for ${c} collection, but expects ${v.collection??"scalar"}`,!0):s(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),Xd(e,t,n,s,a)}const d=Xd(e,t,n,s,a,f),m=((g=f.resolve)==null?void 0:g.call(f,d,v=>s(l,"TAG_RESOLVE_FAILED",v),t.options))??d,p=Xe(m)?m:new Ce(m);return p.range=d.range,p.tag=a,f!=null&&f.format&&(p.format=f.format),p}function XL(e,t,n){const i=t.offset,s=QL(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[i,i,i]};const l=s.mode===">"?Ce.BLOCK_FOLDED:Ce.BLOCK_LITERAL,a=t.source?JL(t.source):[];let c=a.length;for(let w=a.length-1;w>=0;--w){const b=a[w][1];if(b===""||b==="\r")c=w;else break}if(c===0){const w=s.chomp==="+"&&a.length>0?`
|
|
196
|
+
`.repeat(Math.max(1,a.length-1)):"";let b=i+s.length;return t.source&&(b+=t.source.length),{value:w,type:l,comment:s.comment,range:[i,b,b]}}let f=t.indent+s.indent,d=t.offset+s.length,m=0;for(let w=0;w<c;++w){const[b,k]=a[w];if(k===""||k==="\r")s.indent===0&&b.length>f&&(f=b.length);else{b.length<f&&n(d+b.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(f=b.length),m=w,f===0&&!e.atRoot&&n(d,"BAD_INDENT","Block scalar values in collections must be indented");break}d+=b.length+k.length+1}for(let w=a.length-1;w>=c;--w)a[w][0].length>f&&(c=w+1);let p="",g="",v=!1;for(let w=0;w<m;++w)p+=a[w][0].slice(f)+`
|
|
197
|
+
`;for(let w=m;w<c;++w){let[b,k]=a[w];d+=b.length+k.length+1;const _=k[k.length-1]==="\r";if(_&&(k=k.slice(0,-1)),k&&b.length<f){const N=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(d-k.length-(_?2:1),"BAD_INDENT",N),b=""}l===Ce.BLOCK_LITERAL?(p+=g+b.slice(f)+k,g=`
|
|
198
198
|
`):b.length>f||k[0]===" "?(g===" "?g=`
|
|
199
199
|
`:!v&&g===`
|
|
200
200
|
`&&(g=`
|
|
@@ -203,58 +203,58 @@ ${d}
|
|
|
203
203
|
`,v=!0):k===""?g===`
|
|
204
204
|
`?p+=`
|
|
205
205
|
`:g=`
|
|
206
|
-
`:(p+=g+k,g=" ",v=!1)}switch(s.chomp){case"-":break;case"+":for(let
|
|
207
|
-
`+a[
|
|
206
|
+
`:(p+=g+k,g=" ",v=!1)}switch(s.chomp){case"-":break;case"+":for(let w=c;w<a.length;++w)p+=`
|
|
207
|
+
`+a[w][0].slice(f);p[p.length-1]!==`
|
|
208
208
|
`&&(p+=`
|
|
209
209
|
`);break;default:p+=`
|
|
210
|
-
`}const S=i+s.length+t.source.length;return{value:p,type:l,comment:s.comment,range:[i,S,S]}}function
|
|
210
|
+
`}const S=i+s.length+t.source.length;return{value:p,type:l,comment:s.comment,range:[i,S,S]}}function QL({offset:e,props:t},n,i){if(t[0].type!=="block-scalar-header")return i(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],l=s[0];let a=0,c="",f=-1;for(let g=1;g<s.length;++g){const v=s[g];if(!c&&(v==="-"||v==="+"))c=v;else{const S=Number(v);!a&&S?a=S:f===-1&&(f=e+g)}}f!==-1&&i(f,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let d=!1,m="",p=s.length;for(let g=1;g<t.length;++g){const v=t[g];switch(v.type){case"space":d=!0;case"newline":p+=v.source.length;break;case"comment":n&&!d&&i(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=v.source.length,m=v.source.substring(1);break;case"error":i(v,"UNEXPECTED_TOKEN",v.message),p+=v.source.length;break;default:{const S=`Unexpected token in block scalar header: ${v.type}`;i(v,"UNEXPECTED_TOKEN",S);const w=v.source;w&&typeof w=="string"&&(p+=w.length)}}}return{mode:l,indent:a,chomp:c,comment:m,length:p}}function JL(e){const t=e.split(/\n( *)/),n=t[0],i=n.match(/^( *)/),l=[i!=null&&i[1]?[i[1],n.slice(i[1].length)]:["",n]];for(let a=1;a<t.length;a+=2)l.push([t[a],t[a+1]]);return l}function ZL(e,t,n){const{offset:i,type:s,source:l,end:a}=e;let c,f;const d=(g,v,S)=>n(i+g,v,S);switch(s){case"scalar":c=Ce.PLAIN,f=eM(l,d);break;case"single-quoted-scalar":c=Ce.QUOTE_SINGLE,f=tM(l,d);break;case"double-quoted-scalar":c=Ce.QUOTE_DOUBLE,f=nM(l,d);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[i,i+l.length,i+l.length]}}const m=i+l.length,p=Vs(a,m,t,n);return{value:f,type:c,comment:p.comment,range:[i,m,p.offset]}}function eM(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),db(e)}function tM(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),db(e.slice(1,-1)).replace(/''/g,"'")}function db(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
211
211
|
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
212
212
|
`,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=t.exec(e);if(!i)return e;let s=i[1],l=" ",a=t.lastIndex;for(n.lastIndex=a;i=n.exec(e);)i[1]===""?l===`
|
|
213
213
|
`?s+=l:l=`
|
|
214
|
-
`:(s+=l+i[1],l=" "),a=n.lastIndex;const c=/[ \t]*(.*)/sy;return c.lastIndex=a,i=c.exec(e),s+l+((i==null?void 0:i[1])??"")}function
|
|
214
|
+
`:(s+=l+i[1],l=" "),a=n.lastIndex;const c=/[ \t]*(.*)/sy;return c.lastIndex=a,i=c.exec(e),s+l+((i==null?void 0:i[1])??"")}function nM(e,t){let n="";for(let i=1;i<e.length-1;++i){const s=e[i];if(!(s==="\r"&&e[i+1]===`
|
|
215
215
|
`))if(s===`
|
|
216
|
-
`){const{fold:l,offset:a}=
|
|
216
|
+
`){const{fold:l,offset:a}=rM(e,i);n+=l,i=a}else if(s==="\\"){let l=e[++i];const a=iM[l];if(a)n+=a;else if(l===`
|
|
217
217
|
`)for(l=e[i+1];l===" "||l===" ";)l=e[++i+1];else if(l==="\r"&&e[i+1]===`
|
|
218
|
-
`)for(l=e[++i+1];l===" "||l===" ";)l=e[++i+1];else if(l==="x"||l==="u"||l==="U"){const c=l==="x"?2:l==="u"?4:8;n+=
|
|
218
|
+
`)for(l=e[++i+1];l===" "||l===" ";)l=e[++i+1];else if(l==="x"||l==="u"||l==="U"){const c=l==="x"?2:l==="u"?4:8;n+=oM(e,i+1,c,t),i+=c}else{const c=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${c}`),n+=c}}else if(s===" "||s===" "){const l=i;let a=e[i+1];for(;a===" "||a===" ";)a=e[++i+1];a!==`
|
|
219
219
|
`&&!(a==="\r"&&e[i+2]===`
|
|
220
|
-
`)&&(n+=i>l?e.slice(l,i+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function
|
|
220
|
+
`)&&(n+=i>l?e.slice(l,i+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function rM(e,t){let n="",i=e[t+1];for(;(i===" "||i===" "||i===`
|
|
221
221
|
`||i==="\r")&&!(i==="\r"&&e[t+2]!==`
|
|
222
222
|
`);)i===`
|
|
223
223
|
`&&(n+=`
|
|
224
|
-
`),t+=1,i=e[t+1];return n||(n=" "),{fold:n,offset:t}}const
|
|
225
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function
|
|
224
|
+
`),t+=1,i=e[t+1];return n||(n=" "),{fold:n,offset:t}}const iM={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
225
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function oM(e,t,n,i){const s=e.substr(t,n),a=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;try{return String.fromCodePoint(a)}catch{const c=e.substr(t-2,n+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${c}`),c}}function hb(e,t,n,i){const{value:s,type:l,comment:a,range:c}=t.type==="block-scalar"?XL(e,t,i):ZL(t,e.options.strict,i),f=n?e.directives.tagName(n.source,p=>i(n,"TAG_RESOLVE_FAILED",p)):null;let d;e.options.stringKeys&&e.atKey?d=e.schema[An]:f?d=sM(e.schema,s,f,n,i):t.type==="scalar"?d=lM(e,s,t,i):d=e.schema[An];let m;try{const p=d.resolve(s,g=>i(n??t,"TAG_RESOLVE_FAILED",g),e.options);m=je(p)?p:new Ce(p)}catch(p){const g=p instanceof Error?p.message:String(p);i(n??t,"TAG_RESOLVE_FAILED",g),m=new Ce(s)}return m.range=c,m.source=s,l&&(m.type=l),f&&(m.tag=f),d.format&&(m.format=d.format),a&&(m.comment=a),m}function sM(e,t,n,i,s){var c;if(n==="!")return e[An];const l=[];for(const f of e.tags)if(!f.collection&&f.tag===n)if(f.default&&f.test)l.push(f);else return f;for(const f of l)if((c=f.test)!=null&&c.test(t))return f;const a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(s(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[An])}function lM({atKey:e,directives:t,schema:n},i,s,l){const a=n.tags.find(c=>{var f;return(c.default===!0||e&&c.default==="key")&&((f=c.test)==null?void 0:f.test(i))})||n[An];if(n.compat){const c=n.compat.find(f=>{var d;return f.default&&((d=f.test)==null?void 0:d.test(i))})??n[An];if(a.tag!==c.tag){const f=t.tagString(a.tag),d=t.tagString(c.tag),m=`Value may be parsed as either ${f} or ${d}`;l(s,"TAG_RESOLVE_FAILED",m,!0)}}return a}function aM(e,t,n){if(t){n??(n=t.length);for(let i=n-1;i>=0;--i){let s=t[i];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++i];(s==null?void 0:s.type)==="space";)e+=s.source.length,s=t[++i];break}}return e}const uM={composeNode:pb,composeEmptyNode:mp};function pb(e,t,n,i){const s=e.atKey,{spaceBefore:l,comment:a,anchor:c,tag:f}=n;let d,m=!0;switch(t.type){case"alias":d=cM(e,t,i),(c||f)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":d=hb(e,t,f,i),c&&(d.anchor=c.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{d=GL(uM,e,t,n,i),c&&(d.anchor=c.source.substring(1))}catch(p){const g=p instanceof Error?p.message:String(p);i(t,"RESOURCE_EXHAUSTION",g)}break;default:{const p=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",p),m=!1}}return d??(d=mp(e,t.offset,void 0,null,n,i)),c&&d.anchor===""&&i(c,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!je(d)||typeof d.value!="string"||d.tag&&d.tag!=="tag:yaml.org,2002:str")&&i(f??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),l&&(d.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?d.comment=a:d.commentBefore=a),e.options.keepSourceTokens&&m&&(d.srcToken=t),d}function mp(e,t,n,i,{spaceBefore:s,comment:l,anchor:a,tag:c,end:f},d){const m={type:"scalar",offset:aM(t,n,i),indent:-1,source:""},p=hb(e,m,c,d);return a&&(p.anchor=a.source.substring(1),p.anchor===""&&d(a,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(p.spaceBefore=!0),l&&(p.comment=l,p.range[2]=f),p}function cM({options:e},{offset:t,source:n,end:i},s){const l=new rp(n.substring(1));l.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),l.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const a=t+n.length,c=Vs(i,a,e.strict,s);return l.range=[t,a,c.offset],c.comment&&(l.comment=c.comment),l}function fM(e,t,{offset:n,start:i,value:s,end:l},a){const c=Object.assign({_directives:t},e),f=new Ou(void 0,c),d={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.schema},m=ho(i,{indicator:"doc-start",next:s??(l==null?void 0:l[0]),offset:n,onError:a,parentIndent:0,startOnNewline:!0});m.found&&(f.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!m.hasNewline&&a(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),f.contents=s?pb(d,s,m,a):mp(d,m.end,i,null,m,a);const p=f.contents.range[2],g=Vs(l,p,!1,a);return g.comment&&(f.comment=g.comment),f.range=[n,p,g.offset],f}function hs(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function Pv(e){var s;let t="",n=!1,i=!1;for(let l=0;l<e.length;++l){const a=e[l];switch(a[0]){case"#":t+=(t===""?"":i?`
|
|
226
226
|
|
|
227
227
|
`:`
|
|
228
|
-
`)+(a.substring(1)||" "),n=!0,i=!1;break;case"%":((s=e[l+1])==null?void 0:s[0])!=="#"&&(l+=1),n=!1;break;default:n||(i=!0),n=!1}}return{comment:t,afterEmptyLine:i}}class
|
|
228
|
+
`)+(a.substring(1)||" "),n=!0,i=!1;break;case"%":((s=e[l+1])==null?void 0:s[0])!=="#"&&(l+=1),n=!1;break;default:n||(i=!0),n=!1}}return{comment:t,afterEmptyLine:i}}class dM{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,i,s,l)=>{const a=hs(n);l?this.warnings.push(new UL(a,i,s)):this.errors.push(new ys(a,i,s))},this.directives=new xt({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:i,afterEmptyLine:s}=Pv(this.prelude);if(i){const l=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
229
229
|
${i}`:i;else if(s||t.directives.docStart||!l)t.commentBefore=i;else if(Ge(l)&&!l.flow&&l.items.length>0){let a=l.items[0];Qe(a)&&(a=a.key);const c=a.commentBefore;a.commentBefore=c?`${i}
|
|
230
230
|
${c}`:i}else{const a=l.commentBefore;l.commentBefore=a?`${i}
|
|
231
|
-
${a}`:i}}if(n){for(let l=0;l<this.errors.length;++l)t.errors.push(this.errors[l]);for(let l=0;l<this.warnings.length;++l)t.warnings.push(this.warnings[l])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:
|
|
232
|
-
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new ys(hs(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const i=Object.assign({_directives:this.directives},this.options),s=new
|
|
231
|
+
${a}`:i}}if(n){for(let l=0;l<this.errors.length;++l)t.errors.push(this.errors[l]);for(let l=0;l<this.warnings.length;++l)t.warnings.push(this.warnings[l])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Pv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,i=-1){for(const s of t)yield*this.next(s);yield*this.end(n,i)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,i,s)=>{const l=hs(t);l[0]+=n,this.onError(l,"BAD_DIRECTIVE",i,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=fM(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new ys(hs(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){const i="Unexpected doc-end without preceding document";this.errors.push(new ys(hs(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;const n=Vs(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const i=this.doc.comment;this.doc.comment=i?`${i}
|
|
232
|
+
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new ys(hs(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const i=Object.assign({_directives:this.directives},this.options),s=new Ou(void 0,i);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}const mb="\uFEFF",gb="",yb="",xh="";function hM(e){switch(e){case mb:return"byte-order-mark";case gb:return"doc-mode";case yb:return"flow-error-end";case xh:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
233
233
|
`:case`\r
|
|
234
234
|
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function un(e){switch(e){case void 0:case" ":case`
|
|
235
|
-
`:case"\r":case" ":return!0;default:return!1}}const
|
|
236
|
-
\r `),
|
|
235
|
+
`:case"\r":case" ":return!0;default:return!1}}const Av=new Set("0123456789ABCDEFabcdef"),pM=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ta=new Set(",[]{}"),mM=new Set(` ,[]{}
|
|
236
|
+
\r `),Qd=e=>!e||mM.has(e);class gM{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let i=this.next??"stream";for(;i&&(n||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
|
|
237
237
|
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
238
238
|
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let i=0;for(;n===" ";)n=this.buffer[++i+t];if(n==="\r"){const s=this.buffer[i+t+1];if(s===`
|
|
239
239
|
`||!s&&!this.atEnd)return t+i+1}return n===`
|
|
240
240
|
`||i>=this.indentNext||!n&&!this.atEnd?t+i:-1}if(n==="-"||n==="."){const i=this.buffer.substr(t,3);if((i==="---"||i==="...")&&un(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
241
|
-
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===
|
|
241
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===mb&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,i=t.indexOf("#");for(;i!==-1;){const l=t[i-1];if(l===" "||l===" "){n=i-1;break}else i=t.indexOf("#",i+1)}for(;;){const l=t[n-1];if(l===" "||l===" ")n-=1;else break}const s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield gb,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&un(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!un(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&un(n)){const i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Qd),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,i=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=i=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&s[0]!=="#"||i===0&&(s.startsWith("---")||s.startsWith("..."))&&un(s[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield yb,yield*this.parseLineStart();let l=0;for(;s[l]===",";)l+=yield*this.pushCount(1),l+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(l+=yield*this.pushIndicators(),s[l]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-l),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Qd),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const a=this.charAt(1);if(this.flowKey||un(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let l=0;for(;this.buffer[n-1-l]==="\\";)l+=1;if(l%2===0)break;n=this.buffer.indexOf('"',n+1)}const i=this.buffer.substring(0,n);let s=i.indexOf(`
|
|
242
242
|
`,this.pos);if(s!==-1){for(;s!==-1;){const l=this.continueScalar(s+1);if(l===-1)break;s=i.indexOf(`
|
|
243
243
|
`,l)}s!==-1&&(n=s-(i[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>un(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,i;e:for(let l=this.pos;i=this.buffer[l];++l)switch(i){case" ":n+=1;break;case`
|
|
244
244
|
`:t=l,n=0;break;case"\r":{const a=this.buffer[l+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
245
245
|
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const l=this.continueScalar(t+1);if(l===-1)break;t=this.buffer.indexOf(`
|
|
246
246
|
`,l)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let s=t+1;for(i=this.buffer[s];i===" ";)i=this.buffer[++s];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
|
|
247
247
|
`;)i=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let l=t-1,a=this.buffer[l];a==="\r"&&(a=this.buffer[--l]);const c=l;for(;a===" ";)a=this.buffer[--l];if(a===`
|
|
248
|
-
`&&l>=this.pos&&l+1+n>c)t=l;else break}while(!0);return yield
|
|
248
|
+
`&&l>=this.pos&&l+1+n>c)t=l;else break}while(!0);return yield xh,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,i=this.pos-1,s;for(;s=this.buffer[++i];)if(s===":"){const l=this.buffer[i+1];if(un(l)||t&&Ta.has(l))break;n=i}else if(un(s)){let l=this.buffer[i+1];if(s==="\r"&&(l===`
|
|
249
249
|
`?(i+=1,s=`
|
|
250
250
|
`,l=this.buffer[i+1]):n=i),l==="#"||t&&Ta.has(l))break;if(s===`
|
|
251
|
-
`){const a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(t&&Ta.has(s))break;n=i}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield
|
|
251
|
+
`){const a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(t&&Ta.has(s))break;n=i}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield xh,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(n&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(Qd),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{const n=this.flowLevel>0,i=this.charAt(1);if(un(i)||n&&Ta.has(i)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!un(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(pM.has(n))n=this.buffer[++t];else if(n==="%"&&Av.has(this.buffer[t+1])&&Av.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
|
|
252
252
|
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
253
|
-
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,i;do i=this.buffer[++n];while(i===" "||t&&i===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,i=this.buffer[n];for(;!t(i);)i=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class
|
|
253
|
+
`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,i;do i=this.buffer[++n];while(i===" "||t&&i===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,i=this.buffer[n];for(;!t(i);)i=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class yM{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,i=this.lineStarts.length;for(;n<i;){const l=n+i>>1;this.lineStarts[l]<t?n=l+1:i=l}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const s=this.lineStarts[n-1];return{line:n,col:t-s+1}}}}function Er(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Ov(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function vb(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Pa(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Wi(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function ou(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function Lv(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!Er(t.start,"explicit-key-ind")&&!Er(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,vb(t.value)?t.value.end?ou(t.value.end,t.sep):t.value.end=t.sep:ou(t.start,t.sep),delete t.sep)}class vM{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new gM,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const i of this.lexer.lex(t,n))yield*this.next(i);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=hM(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const i=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const i=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in i?i.indent:0:n.type==="flow-collection"&&i.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Lv(n),i.type){case"document":i.value=n;break;case"block-scalar":i.props.push(n);break;case"block-map":{const s=i.items[i.items.length-1];if(s.value){i.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=i.items[i.items.length-1];s.value?i.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=i.items[i.items.length-1];!s||s.value?i.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&Ov(s.start)===-1&&(n.indent===0||s.start.every(l=>l.type!=="comment"||l.indent<n.indent))&&(i.type==="document"?i.end=s.start:i.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{Ov(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const n=Pa(this.peek(2)),i=Wi(n);let s;t.end?(s=t.end,s.push(this.sourceToken),delete t.end):s=[this.sourceToken];const l={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
254
254
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
255
|
-
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var i;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,l=Array.isArray(s)?s[s.length-1]:void 0;(l==null?void 0:l.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],l=(i=s==null?void 0:s.value)==null?void 0:i.end;if(Array.isArray(l)){
|
|
255
|
+
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var i;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,l=Array.isArray(s)?s[s.length-1]:void 0;(l==null?void 0:l.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],l=(i=s==null?void 0:s.value)==null?void 0:i.end;if(Array.isArray(l)){ou(l,n.start),l.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const s=!this.onKeyLine&&this.indent===t.indent,l=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let a=[];if(l&&n.sep&&!n.value){const c=[];for(let f=0;f<n.sep.length;++f){const d=n.sep[f];switch(d.type){case"newline":c.push(f);break;case"space":break;case"comment":d.indent>t.indent&&(c.length=0);break;default:c.length=0}}c.length>=2&&(a=n.sep.splice(c[1]))}switch(this.type){case"anchor":case"tag":l||n.value?(a.push(this.sourceToken),t.items.push({start:a}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):l||n.value?(a.push(this.sourceToken),t.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Er(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(vb(n.key)&&!Er(n.sep,"newline")){const c=Wi(n.start),f=n.key,d=n.sep;d.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:f,sep:d}]})}else a.length>0?n.sep=n.sep.concat(a,this.sourceToken):n.sep.push(this.sourceToken);else if(Er(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const c=Wi(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?t.items.push({start:a,key:null,sep:[this.sourceToken]}):Er(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const c=this.flowScalar(this.type);l||n.value?(t.items.push({start:a,key:c,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(c):(Object.assign(n,{key:c,sep:[]}),this.onKeyLine=!0);return}default:{const c=this.startBlockValue(t);if(c){if(c.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Er(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&t.items.push({start:a});this.stack.push(c);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var i;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,l=Array.isArray(s)?s[s.length-1]:void 0;(l==null?void 0:l.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],l=(i=s==null?void 0:s.value)==null?void 0:i.end;if(Array.isArray(l)){ou(l,n.start),l.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||Er(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while((i==null?void 0:i.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{const i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){const s=Pa(i),l=Wi(s);Lv(t);const a=t.end.splice(1,t.end.length);a.push(this.sourceToken);const c={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:l,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=c}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
256
256
|
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
257
|
-
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Pa(t),i=
|
|
257
|
+
`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Pa(t),i=Wi(n);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Pa(t),i=Wi(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function wM(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new yM||null,prettyErrors:t}}function xM(e,t={}){const{lineCounter:n,prettyErrors:i}=wM(t),s=new vM(n==null?void 0:n.addNewLine),l=new dM(t);let a=null;for(const c of l.compose(s.parse(e),!0,e.length))if(!a)a=c;else if(a.options.logLevel!=="silent"){a.errors.push(new ys(c.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&n&&(a.errors.forEach(Iv(e,n)),a.warnings.forEach(Iv(e,n))),a}function bM(e,t,n){let i;const s=xM(e,n);if(!s)return null;if(s.warnings.forEach(l=>W1(s.options.logLevel,l)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:i},n))}const SM=`name: jpd-comment-triage
|
|
258
258
|
nodes:
|
|
259
259
|
- id: hourly
|
|
260
260
|
type: trigger.cron
|
|
@@ -295,4 +295,4 @@ edges:
|
|
|
295
295
|
- { from: unhandled, to: gate }
|
|
296
296
|
- { from: gate, to: interpret, when: "true" }
|
|
297
297
|
- { from: interpret, to: reply }
|
|
298
|
-
`;function
|
|
298
|
+
`;function kM(){const[e,t]=T.useState(null),[n,i]=T.useState(null),s=T.useCallback(c=>{try{const f=bM(c);t(f),i(null)}catch(f){i(f instanceof Error?f.message:"Failed to parse YAML")}},[]),l=T.useCallback(c=>{t(c),i(null)},[]),a=T.useCallback(()=>{s(SM)},[s]);return{workflow:e,error:n,loadFromString:s,loadFromObject:l,loadDefault:a}}function EM(e){const[t,n]=T.useState({}),[i,s]=T.useState({}),[l,a]=T.useState([]),[c,f]=T.useState(!1),[d,m]=T.useState([]),p=T.useRef(0),g=T.useRef(null),v=T.useRef(null),S=T.useCallback(w=>{var b;if(m(k=>[...k,w]),w.type==="run:start"){const k=`run_${(++p.current).toString(16).padStart(4,"0")}`;g.current=k,v.current=null,a(_=>[{id:k,workflow:w.workflow,status:"running",startedAt:w.ts},..._]),n({}),s({})}else if(w.type==="node:start"&&w.nodeId)n(k=>({...k,[w.nodeId]:"running"}));else if(w.type==="node:finish"&&w.nodeId){const k=w.status==="failed";if(n(_=>({..._,[w.nodeId]:k?"failed":"success"})),k){const _=(b=w.meta)==null?void 0:b.error;_&&(s(E=>({...E,[w.nodeId]:_})),v.current||(v.current=`${w.nodeId}: ${_}`))}}else if(w.type==="run:finish"){const k=w.status==="failed"?"failed":"success",_=g.current,E=v.current??void 0;_&&a(N=>N.map(A=>A.id===_?{...A,status:k,finishedAt:w.ts,error:k==="failed"?E:void 0}:A))}},[]);return T.useEffect(()=>{if(!e)return;let w;try{w=new EventSource(`${e}/api/events`)}catch{return}return w.onopen=()=>f(!0),w.onmessage=b=>{try{const k=JSON.parse(b.data);S(k)}catch{}},w.onerror=()=>{f(!1)},()=>{w.close(),f(!1)}},[e,S]),{nodeStatuses:t,nodeErrors:i,runs:l,connected:c,events:d}}function _M(e){const[t,n]=T.useState([]);return T.useEffect(()=>{if(!e)return;let i=!1;return fetch(`${e}/api/workflows`).then(s=>s.ok?s.json():[]).then(s=>{!i&&Array.isArray(s)&&n(s)}).catch(()=>{}),()=>{i=!0}},[e]),{workflows:t}}async function NM(e,t){await fetch(`${e}/api/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workflow:t})})}const Aa=typeof window<"u"&&window.location.protocol.startsWith("http")?window.location.origin:void 0;function CM(){const{workflow:e,loadDefault:t,loadFromString:n,loadFromObject:i}=kM(),[s,l]=T.useState(null),[a,c]=T.useState("board"),[f,d]=T.useState(null),{nodeStatuses:m,runs:p,connected:g,events:v}=EM(Aa),{workflows:S}=_M(Aa);T.useEffect(()=>{if(S.length===0){t();return}const E=S.find(N=>N.name===f)??S[0];E.name!==f&&d(E.name),i(E)},[S,f,t,i]);const w=T.useCallback(E=>{d(E)},[]),b=T.useCallback(E=>{Aa&&NM(Aa,E)},[]),k=T.useCallback(E=>{l(E)},[]),_=T.useCallback(()=>{l(null)},[]);return O.jsxs("div",{className:"h-screen w-screen flex overflow-hidden bg-muted text-fg font-sans text-[13px] antialiased relative",children:[O.jsx(sP,{activeView:a,onViewChange:c,liveConnected:g,workflows:S,selected:f,onSelect:w,onRun:b}),O.jsx("main",{className:"flex-1 flex flex-col min-w-0",children:a==="board"?O.jsxs(O.Fragment,{children:[O.jsx(lP,{workflow:e,onLoadYaml:n}),O.jsx("div",{className:"flex-1 flex min-h-0",children:O.jsx(yx,{children:O.jsx(KP,{workflow:e,onNodeClick:k,onLoadYaml:n,nodeStatuses:m})})})]}):O.jsx(fL,{runs:p,events:v,connected:g})}),O.jsx(sL,{node:s,onClose:_})]})}ak.createRoot(document.getElementById("root")).render(O.jsx(bh.StrictMode,{children:O.jsx(CM,{})}));
|