emviz 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,171 +0,0 @@
1
- (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const c of r)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function s(r){const c={};return r.integrity&&(c.integrity=r.integrity),r.referrerPolicy&&(c.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?c.credentials="include":r.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(r){if(r.ep)return;r.ep=!0;const c=s(r);fetch(r.href,c)}})();function Mv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Od={exports:{}},Ja={};var Gy;function Ex(){if(Gy)return Ja;Gy=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(a,r,c){var u=null;if(c!==void 0&&(u=""+c),r.key!==void 0&&(u=""+r.key),"key"in r){c={};for(var h in r)h!=="key"&&(c[h]=r[h])}else c=r;return r=c.ref,{$$typeof:t,type:a,key:u,ref:r!==void 0?r:null,props:c}}return Ja.Fragment=i,Ja.jsx=s,Ja.jsxs=s,Ja}var Xy;function _x(){return Xy||(Xy=1,Od.exports=Ex()),Od.exports}var M=_x(),zd={exports:{}},Ee={};var Ky;function Nx(){if(Ky)return Ee;Ky=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),y=Symbol.iterator;function w(z){return z===null||typeof z!="object"?null:(z=y&&z[y]||z["@@iterator"],typeof z=="function"?z:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,N={};function S(z,$,P){this.props=z,this.context=$,this.refs=N,this.updater=P||_}S.prototype.isReactComponent={},S.prototype.setState=function(z,$){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,$,"setState")},S.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function C(){}C.prototype=S.prototype;function x(z,$,P){this.props=z,this.context=$,this.refs=N,this.updater=P||_}var T=x.prototype=new C;T.constructor=x,E(T,S.prototype),T.isPureReactComponent=!0;var L=Array.isArray;function D(){}var R={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function q(z,$,P){var ee=P.ref;return{$$typeof:t,type:z,key:$,ref:ee!==void 0?ee:null,props:P}}function le(z,$){return q(z.type,$,z.props)}function X(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function I(z){var $={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(P){return $[P]})}var ae=/\/+/g;function k(z,$){return typeof z=="object"&&z!==null&&z.key!=null?I(""+z.key):$.toString(36)}function Y(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(D,D):(z.status="pending",z.then(function($){z.status==="pending"&&(z.status="fulfilled",z.value=$)},function($){z.status==="pending"&&(z.status="rejected",z.reason=$)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function O(z,$,P,ee,ce){var he=typeof z;(he==="undefined"||he==="boolean")&&(z=null);var ue=!1;if(z===null)ue=!0;else switch(he){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(z.$$typeof){case t:case i:ue=!0;break;case v:return ue=z._init,O(ue(z._payload),$,P,ee,ce)}}if(ue)return ce=ce(z),ue=ee===""?"."+k(z,0):ee,L(ce)?(P="",ue!=null&&(P=ue.replace(ae,"$&/")+"/"),O(ce,$,P,"",function(we){return we})):ce!=null&&(X(ce)&&(ce=le(ce,P+(ce.key==null||z&&z.key===ce.key?"":(""+ce.key).replace(ae,"$&/")+"/")+ue)),$.push(ce)),1;ue=0;var te=ee===""?".":ee+":";if(L(z))for(var de=0;de<z.length;de++)ee=z[de],he=te+k(ee,de),ue+=O(ee,$,P,he,ce);else if(de=w(z),typeof de=="function")for(z=de.call(z),de=0;!(ee=z.next()).done;)ee=ee.value,he=te+k(ee,de++),ue+=O(ee,$,P,he,ce);else if(he==="object"){if(typeof z.then=="function")return O(Y(z),$,P,ee,ce);throw $=String(z),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return ue}function B(z,$,P){if(z==null)return z;var ee=[],ce=0;return O(z,ee,"","",function(he){return $.call(P,he,ce++)}),ee}function G(z){if(z._status===-1){var $=z._result;$=$(),$.then(function(P){(z._status===0||z._status===-1)&&(z._status=1,z._result=P)},function(P){(z._status===0||z._status===-1)&&(z._status=2,z._result=P)}),z._status===-1&&(z._status=0,z._result=$)}if(z._status===1)return z._result.default;throw z._result}var K=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},ne={map:B,forEach:function(z,$,P){B(z,function(){$.apply(this,arguments)},P)},count:function(z){var $=0;return B(z,function(){$++}),$},toArray:function(z){return B(z,function($){return $})||[]},only:function(z){if(!X(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Ee.Activity=p,Ee.Children=ne,Ee.Component=S,Ee.Fragment=s,Ee.Profiler=r,Ee.PureComponent=x,Ee.StrictMode=a,Ee.Suspense=m,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(z){return R.H.useMemoCache(z)}},Ee.cache=function(z){return function(){return z.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(z,$,P){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ee=E({},z.props),ce=z.key;if($!=null)for(he in $.key!==void 0&&(ce=""+$.key),$)!j.call($,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&$.ref===void 0||(ee[he]=$[he]);var he=arguments.length-2;if(he===1)ee.children=P;else if(1<he){for(var ue=Array(he),te=0;te<he;te++)ue[te]=arguments[te+2];ee.children=ue}return q(z.type,ce,ee)},Ee.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:c,_context:z},z},Ee.createElement=function(z,$,P){var ee,ce={},he=null;if($!=null)for(ee in $.key!==void 0&&(he=""+$.key),$)j.call($,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ce[ee]=$[ee]);var ue=arguments.length-2;if(ue===1)ce.children=P;else if(1<ue){for(var te=Array(ue),de=0;de<ue;de++)te[de]=arguments[de+2];ce.children=te}if(z&&z.defaultProps)for(ee in ue=z.defaultProps,ue)ce[ee]===void 0&&(ce[ee]=ue[ee]);return q(z,he,ce)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(z){return{$$typeof:h,render:z}},Ee.isValidElement=X,Ee.lazy=function(z){return{$$typeof:v,_payload:{_status:-1,_result:z},_init:G}},Ee.memo=function(z,$){return{$$typeof:g,type:z,compare:$===void 0?null:$}},Ee.startTransition=function(z){var $=R.T,P={};R.T=P;try{var ee=z(),ce=R.S;ce!==null&&ce(P,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(D,K)}catch(he){K(he)}finally{$!==null&&P.types!==null&&($.types=P.types),R.T=$}},Ee.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Ee.use=function(z){return R.H.use(z)},Ee.useActionState=function(z,$,P){return R.H.useActionState(z,$,P)},Ee.useCallback=function(z,$){return R.H.useCallback(z,$)},Ee.useContext=function(z){return R.H.useContext(z)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(z,$){return R.H.useDeferredValue(z,$)},Ee.useEffect=function(z,$){return R.H.useEffect(z,$)},Ee.useEffectEvent=function(z){return R.H.useEffectEvent(z)},Ee.useId=function(){return R.H.useId()},Ee.useImperativeHandle=function(z,$,P){return R.H.useImperativeHandle(z,$,P)},Ee.useInsertionEffect=function(z,$){return R.H.useInsertionEffect(z,$)},Ee.useLayoutEffect=function(z,$){return R.H.useLayoutEffect(z,$)},Ee.useMemo=function(z,$){return R.H.useMemo(z,$)},Ee.useOptimistic=function(z,$){return R.H.useOptimistic(z,$)},Ee.useReducer=function(z,$,P){return R.H.useReducer(z,$,P)},Ee.useRef=function(z){return R.H.useRef(z)},Ee.useState=function(z){return R.H.useState(z)},Ee.useSyncExternalStore=function(z,$,P){return R.H.useSyncExternalStore(z,$,P)},Ee.useTransition=function(){return R.H.useTransition()},Ee.version="19.2.7",Ee}var Zy;function xo(){return Zy||(Zy=1,zd.exports=Nx()),zd.exports}var J=xo();const Cv=Mv(J);var Dd={exports:{}},Fa={},Ld={exports:{}},jd={};var Iy;function Ax(){return Iy||(Iy=1,(function(t){function i(O,B){var G=O.length;O.push(B);e:for(;0<G;){var K=G-1>>>1,ne=O[K];if(0<r(ne,B))O[K]=B,O[G]=ne,G=K;else break e}}function s(O){return O.length===0?null:O[0]}function a(O){if(O.length===0)return null;var B=O[0],G=O.pop();if(G!==B){O[0]=G;e:for(var K=0,ne=O.length,z=ne>>>1;K<z;){var $=2*(K+1)-1,P=O[$],ee=$+1,ce=O[ee];if(0>r(P,G))ee<ne&&0>r(ce,P)?(O[K]=ce,O[ee]=G,K=ee):(O[K]=P,O[$]=G,K=$);else if(ee<ne&&0>r(ce,G))O[K]=ce,O[ee]=G,K=ee;else break e}}return B}function r(O,B){var G=O.sortIndex-B.sortIndex;return G!==0?G:O.id-B.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();t.unstable_now=function(){return u.now()-h}}var m=[],g=[],v=1,p=null,y=3,w=!1,_=!1,E=!1,N=!1,S=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function T(O){for(var B=s(g);B!==null;){if(B.callback===null)a(g);else if(B.startTime<=O)a(g),B.sortIndex=B.expirationTime,i(m,B);else break;B=s(g)}}function L(O){if(E=!1,T(O),!_)if(s(m)!==null)_=!0,D||(D=!0,I());else{var B=s(g);B!==null&&Y(L,B.startTime-O)}}var D=!1,R=-1,j=5,q=-1;function le(){return N?!0:!(t.unstable_now()-q<j)}function X(){if(N=!1,D){var O=t.unstable_now();q=O;var B=!0;try{e:{_=!1,E&&(E=!1,C(R),R=-1),w=!0;var G=y;try{t:{for(T(O),p=s(m);p!==null&&!(p.expirationTime>O&&le());){var K=p.callback;if(typeof K=="function"){p.callback=null,y=p.priorityLevel;var ne=K(p.expirationTime<=O);if(O=t.unstable_now(),typeof ne=="function"){p.callback=ne,T(O),B=!0;break t}p===s(m)&&a(m),T(O)}else a(m);p=s(m)}if(p!==null)B=!0;else{var z=s(g);z!==null&&Y(L,z.startTime-O),B=!1}}break e}finally{p=null,y=G,w=!1}B=void 0}}finally{B?I():D=!1}}}var I;if(typeof x=="function")I=function(){x(X)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,k=ae.port2;ae.port1.onmessage=X,I=function(){k.postMessage(null)}}else I=function(){S(X,0)};function Y(O,B){R=S(function(){O(t.unstable_now())},B)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(O){O.callback=null},t.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<O?Math.floor(1e3/O):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(O){switch(y){case 1:case 2:case 3:var B=3;break;default:B=y}var G=y;y=B;try{return O()}finally{y=G}},t.unstable_requestPaint=function(){N=!0},t.unstable_runWithPriority=function(O,B){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var G=y;y=O;try{return B()}finally{y=G}},t.unstable_scheduleCallback=function(O,B,G){var K=t.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?K+G:K):G=K,O){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=G+ne,O={id:v++,callback:B,priorityLevel:O,startTime:G,expirationTime:ne,sortIndex:-1},G>K?(O.sortIndex=G,i(g,O),s(m)===null&&O===s(g)&&(E?(C(R),R=-1):E=!0,Y(L,G-K))):(O.sortIndex=ne,i(m,O),_||w||(_=!0,D||(D=!0,I()))),O},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(O){var B=y;return function(){var G=y;y=B;try{return O.apply(this,arguments)}finally{y=G}}}})(jd)),jd}var Qy;function Tx(){return Qy||(Qy=1,Ld.exports=Ax()),Ld.exports}var Rd={exports:{}},bt={};var Jy;function Mx(){if(Jy)return bt;Jy=1;var t=xo();function i(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)g+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var a={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},r=Symbol.for("react.portal");function c(m,g,v){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:p==null?null:""+p,children:m,containerInfo:g,implementation:v}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,bt.createPortal=function(m,g){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(i(299));return c(m,g,null,v)},bt.flushSync=function(m){var g=u.T,v=a.p;try{if(u.T=null,a.p=2,m)return m()}finally{u.T=g,a.p=v,a.d.f()}},bt.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,a.d.C(m,g))},bt.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},bt.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var v=g.as,p=h(v,g.crossOrigin),y=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;v==="style"?a.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:y,fetchPriority:w}):v==="script"&&a.d.X(m,{crossOrigin:p,integrity:y,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},bt.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var v=h(g.as,g.crossOrigin);a.d.M(m,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&a.d.M(m)},bt.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var v=g.as,p=h(v,g.crossOrigin);a.d.L(m,v,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},bt.preloadModule=function(m,g){if(typeof m=="string")if(g){var v=h(g.as,g.crossOrigin);a.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else a.d.m(m)},bt.requestFormReset=function(m){a.d.r(m)},bt.unstable_batchedUpdates=function(m,g){return m(g)},bt.useFormState=function(m,g,v){return u.H.useFormState(m,g,v)},bt.useFormStatus=function(){return u.H.useHostTransitionStatus()},bt.version="19.2.7",bt}var Fy;function Ov(){if(Fy)return Rd.exports;Fy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Rd.exports=Mx(),Rd.exports}var Wy;function Cx(){if(Wy)return Fa;Wy=1;var t=Tx(),i=xo(),s=Ov();function a(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function u(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(c(e)!==e)throw Error(a(188))}function g(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(a(188));return n!==e?null:e}for(var l=e,o=n;;){var f=l.return;if(f===null)break;var d=f.alternate;if(d===null){if(o=f.return,o!==null){l=o;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===l)return m(f),e;if(d===o)return m(f),n;d=d.sibling}throw Error(a(188))}if(l.return!==o.return)l=f,o=d;else{for(var b=!1,A=f.child;A;){if(A===l){b=!0,l=f,o=d;break}if(A===o){b=!0,o=f,l=d;break}A=A.sibling}if(!b){for(A=d.child;A;){if(A===l){b=!0,l=d,o=f;break}if(A===o){b=!0,o=d,l=f;break}A=A.sibling}if(!b)throw Error(a(189))}}if(l.alternate!==o)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?e:n}function v(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=v(e),n!==null)return n;e=e.sibling}return null}var p=Object.assign,y=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),x=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function I(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Symbol.for("react.client.reference");function k(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case S:return"Profiler";case N:return"StrictMode";case L:return"Suspense";case D:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case x:return e.displayName||"Context";case C:return(e._context.displayName||"Context")+".Consumer";case T:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return n=e.displayName||null,n!==null?n:k(e.type)||"Memo";case j:n=e._payload,e=e._init;try{return k(e(n))}catch{}}return null}var Y=Array.isArray,O=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},K=[],ne=-1;function z(e){return{current:e}}function $(e){0>ne||(e.current=K[ne],K[ne]=null,ne--)}function P(e,n){ne++,K[ne]=e.current,e.current=n}var ee=z(null),ce=z(null),he=z(null),ue=z(null);function te(e,n){switch(P(he,n),P(ce,e),P(ee,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?hy(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=hy(n),e=my(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(ee),P(ee,e)}function de(){$(ee),$(ce),$(he)}function we(e){e.memoizedState!==null&&P(ue,e);var n=ee.current,l=my(n,e.type);n!==l&&(P(ce,e),P(ee,l))}function Se(e){ce.current===e&&($(ee),$(ce)),ue.current===e&&($(ue),Ka._currentValue=G)}var re,fe;function ye(e){if(re===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);re=n&&n[1]||"",fe=-1<l.stack.indexOf(`
2
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+re+e+fe}var xe=!1;function ke(e,n){if(!e||xe)return"";xe=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(W){var F=W}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(W){F=W}e.call(oe.prototype)}}else{try{throw Error()}catch(W){F=W}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(W){if(W&&F&&typeof W.stack=="string")return[W.stack,F.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),b=d[0],A=d[1];if(b&&A){var H=b.split(`
4
- `),Q=A.split(`
5
- `);for(f=o=0;o<H.length&&!H[o].includes("DetermineComponentFrameRoot");)o++;for(;f<Q.length&&!Q[f].includes("DetermineComponentFrameRoot");)f++;if(o===H.length||f===Q.length)for(o=H.length-1,f=Q.length-1;1<=o&&0<=f&&H[o]!==Q[f];)f--;for(;1<=o&&0<=f;o--,f--)if(H[o]!==Q[f]){if(o!==1||f!==1)do if(o--,f--,0>f||H[o]!==Q[f]){var ie=`
6
- `+H[o].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=o&&0<=f);break}}}finally{xe=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?ye(l):""}function ut(e,n){switch(e.tag){case 26:case 27:case 5:return ye(e.type);case 16:return ye("Lazy");case 13:return e.child!==n&&n!==null?ye("Suspense Fallback"):ye("Suspense");case 19:return ye("SuspenseList");case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return ye("Activity");default:return""}}function Nt(e){try{var n="",l=null;do n+=ut(e,l),l=e,e=e.return;while(e);return n}catch(o){return`
7
- Error generating stack: `+o.message+`
8
- `+o.stack}}var At=Object.prototype.hasOwnProperty,Tt=t.unstable_scheduleCallback,Ht=t.unstable_cancelCallback,Ii=t.unstable_shouldYield,Rn=t.unstable_requestPaint,tt=t.unstable_now,$t=t.unstable_getCurrentPriorityLevel,Jt=t.unstable_ImmediatePriority,Ft=t.unstable_UserBlockingPriority,Wt=t.unstable_NormalPriority,hu=t.unstable_LowPriority,Ds=t.unstable_IdlePriority,mu=t.log,gu=t.unstable_setDisableYieldValue,Qi=null,wt=null;function _n(e){if(typeof mu=="function"&&gu(e),wt&&typeof wt.setStrictMode=="function")try{wt.setStrictMode(Qi,e)}catch{}}var xt=Math.clz32?Math.clz32:vu,pu=Math.log,yu=Math.LN2;function vu(e){return e>>>=0,e===0?32:31-(pu(e)/yu|0)|0}var Ls=256,js=262144,Rs=4194304;function kn(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ks(e,n,l){var o=e.pendingLanes;if(o===0)return 0;var f=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var A=o&134217727;return A!==0?(o=A&~d,o!==0?f=kn(o):(b&=A,b!==0?f=kn(b):l||(l=A&~e,l!==0&&(f=kn(l))))):(A=o&~d,A!==0?f=kn(A):b!==0?f=kn(b):l||(l=o&~e,l!==0&&(f=kn(l)))),f===0?0:n!==0&&n!==f&&(n&d)===0&&(d=f&-f,l=n&-n,d>=l||d===32&&(l&4194048)!==0)?n:f}function Ji(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function bu(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Do(){var e=Rs;return Rs<<=1,(Rs&62914560)===0&&(Rs=4194304),e}function Pl(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function Fi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Su(e,n,l,o,f,d){var b=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var A=e.entanglements,H=e.expirationTimes,Q=e.hiddenUpdates;for(l=b&~l;0<l;){var ie=31-xt(l),oe=1<<ie;A[ie]=0,H[ie]=-1;var F=Q[ie];if(F!==null)for(Q[ie]=null,ie=0;ie<F.length;ie++){var W=F[ie];W!==null&&(W.lane&=-536870913)}l&=~oe}o!==0&&Lo(e,o,0),d!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~n))}function Lo(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-xt(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|l&261930}function jo(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var o=31-xt(l),f=1<<o;f&n|e[o]&n&&(e[o]|=n),l&=~f}}function Ro(e,n){var l=n&-n;return l=(l&42)!==0?1:ea(l),(l&(e.suspendedLanes|n))!==0?0:l}function ea(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ta(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ko(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:By(e.type))}function Bo(e,n){var l=B.p;try{return B.p=e,n()}finally{B.p=l}}var Nn=Math.random().toString(36).slice(2),ft="__reactFiber$"+Nn,vt="__reactProps$"+Nn,Bn="__reactContainer$"+Nn,Bs="__reactEvents$"+Nn,Ho="__reactListeners$"+Nn,wu="__reactHandles$"+Nn,$o="__reactResources$"+Nn,Wi="__reactMarker$"+Nn;function na(e){delete e[ft],delete e[vt],delete e[Bs],delete e[Ho],delete e[wu]}function ci(e){var n=e[ft];if(n)return n;for(var l=e.parentNode;l;){if(n=l[Bn]||l[ft]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=wy(e);e!==null;){if(l=e[ft])return l;e=wy(e)}return n}e=l,l=e.parentNode}return null}function ui(e){if(e=e[ft]||e[Bn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function fi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(a(33))}function di(e){var n=e[$o];return n||(n=e[$o]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function st(e){e[Wi]=!0}var Uo=new Set,qo={};function Hn(e,n){hi(e,n),hi(e+"Capture",n)}function hi(e,n){for(qo[e]=n,e=0;e<n.length;e++)Uo.add(n[e])}var xu=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Vo={},ia={};function Eu(e){return At.call(ia,e)?!0:At.call(Vo,e)?!1:xu.test(e)?ia[e]=!0:(Vo[e]=!0,!1)}function Hs(e,n,l){if(Eu(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function $s(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function fn(e,n,l,o){if(o===null)e.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+o)}}function Mt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yo(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function _u(e,n,l){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,d=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(b){l=""+b,d.call(this,b)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function sa(e){if(!e._valueTracker){var n=Yo(e)?"checked":"value";e._valueTracker=_u(e,n,""+e[n])}}function la(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),o="";return e&&(o=Yo(e)?e.checked?"true":"false":e.value),e=o,e!==l?(n.setValue(e),!0):!1}function Us(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Go=/[\n"\\]/g;function Ct(e){return e.replace(Go,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function aa(e,n,l,o,f,d,b,A){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Mt(n)):e.value!==""+Mt(n)&&(e.value=""+Mt(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?oa(e,b,Mt(n)):l!=null?oa(e,b,Mt(l)):o!=null&&e.removeAttribute("value"),f==null&&d!=null&&(e.defaultChecked=!!d),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.name=""+Mt(A):e.removeAttribute("name")}function qs(e,n,l,o,f,d,b,A){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){sa(e);return}l=l!=null?""+Mt(l):"",n=n!=null?""+Mt(n):l,A||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=A?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),sa(e)}function oa(e,n,l){n==="number"&&Us(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function mi(e,n,l,o){if(e=e.options,n){n={};for(var f=0;f<l.length;f++)n["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=n.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&o&&(e[l].defaultSelected=!0)}else{for(l=""+Mt(l),n=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function ra(e,n,l){if(n!=null&&(n=""+Mt(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+Mt(l):""}function cm(e,n,l,o){if(n==null){if(o!=null){if(l!=null)throw Error(a(92));if(Y(o)){if(1<o.length)throw Error(a(93));o=o[0]}l=o}l==null&&(l=""),n=l}l=Mt(n),e.defaultValue=l,o=e.textContent,o===l&&o!==""&&o!==null&&(e.value=o),sa(e)}function Vs(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var vS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function um(e,n,l){var o=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,l):typeof l!="number"||l===0||vS.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function fm(e,n,l){if(n!=null&&typeof n!="object")throw Error(a(62));if(e=e.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&l[f]!==o&&um(e,f,o)}else for(var d in n)n.hasOwnProperty(d)&&um(e,d,n[d])}function Nu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),SS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Xo(e){return SS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $n(){}var Au=null;function Tu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ys=null,Gs=null;function dm(e){var n=ui(e);if(n&&(e=n.stateNode)){var l=e[vt]||null;e:switch(e=n.stateNode,n.type){case"input":if(aa(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Ct(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var o=l[n];if(o!==e&&o.form===e.form){var f=o[vt]||null;if(!f)throw Error(a(90));aa(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<l.length;n++)o=l[n],o.form===e.form&&la(o)}break e;case"textarea":ra(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&mi(e,!!l.multiple,n,!1)}}}var Mu=!1;function hm(e,n,l){if(Mu)return e(n,l);Mu=!0;try{var o=e(n);return o}finally{if(Mu=!1,(Ys!==null||Gs!==null)&&(Dr(),Ys&&(n=Ys,e=Gs,Gs=Ys=null,dm(n),e)))for(n=0;n<e.length;n++)dm(e[n])}}function ca(e,n){var l=e.stateNode;if(l===null)return null;var o=l[vt]||null;if(o===null)return null;l=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(a(231,n,typeof l));return l}var Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cu=!1;if(Un)try{var ua={};Object.defineProperty(ua,"passive",{get:function(){Cu=!0}}),window.addEventListener("test",ua,ua),window.removeEventListener("test",ua,ua)}catch{Cu=!1}var gi=null,Ou=null,Ko=null;function mm(){if(Ko)return Ko;var e,n=Ou,l=n.length,o,f="value"in gi?gi.value:gi.textContent,d=f.length;for(e=0;e<l&&n[e]===f[e];e++);var b=l-e;for(o=1;o<=b&&n[l-o]===f[d-o];o++);return Ko=f.slice(e,1<o?1-o:void 0)}function Zo(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Io(){return!0}function gm(){return!1}function Ot(e){function n(l,o,f,d,b){this._reactName=l,this._targetInst=f,this.type=o,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var A in e)e.hasOwnProperty(A)&&(l=e[A],this[A]=l?l(d):d[A]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Io:gm,this.isPropagationStopped=gm,this}return p(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Io)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Io)},persist:function(){},isPersistent:Io}),n}var Pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qo=Ot(Pi),fa=p({},Pi,{view:0,detail:0}),wS=Ot(fa),zu,Du,da,Jo=p({},fa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ju,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==da&&(da&&e.type==="mousemove"?(zu=e.screenX-da.screenX,Du=e.screenY-da.screenY):Du=zu=0,da=e),zu)},movementY:function(e){return"movementY"in e?e.movementY:Du}}),pm=Ot(Jo),xS=p({},Jo,{dataTransfer:0}),ES=Ot(xS),_S=p({},fa,{relatedTarget:0}),Lu=Ot(_S),NS=p({},Pi,{animationName:0,elapsedTime:0,pseudoElement:0}),AS=Ot(NS),TS=p({},Pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),MS=Ot(TS),CS=p({},Pi,{data:0}),ym=Ot(CS),OS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zS={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"},DS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LS(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=DS[e])?!!n[e]:!1}function ju(){return LS}var jS=p({},fa,{key:function(e){if(e.key){var n=OS[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Zo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ju,charCode:function(e){return e.type==="keypress"?Zo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),RS=Ot(jS),kS=p({},Jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vm=Ot(kS),BS=p({},fa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ju}),HS=Ot(BS),$S=p({},Pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),US=Ot($S),qS=p({},Jo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),VS=Ot(qS),YS=p({},Pi,{newState:0,oldState:0}),GS=Ot(YS),XS=[9,13,27,32],Ru=Un&&"CompositionEvent"in window,ha=null;Un&&"documentMode"in document&&(ha=document.documentMode);var KS=Un&&"TextEvent"in window&&!ha,bm=Un&&(!Ru||ha&&8<ha&&11>=ha),Sm=" ",wm=!1;function xm(e,n){switch(e){case"keyup":return XS.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Em(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xs=!1;function ZS(e,n){switch(e){case"compositionend":return Em(n);case"keypress":return n.which!==32?null:(wm=!0,Sm);case"textInput":return e=n.data,e===Sm&&wm?null:e;default:return null}}function IS(e,n){if(Xs)return e==="compositionend"||!Ru&&xm(e,n)?(e=mm(),Ko=Ou=gi=null,Xs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return bm&&n.locale!=="ko"?null:n.data;default:return null}}var QS={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 _m(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!QS[e.type]:n==="textarea"}function Nm(e,n,l,o){Ys?Gs?Gs.push(o):Gs=[o]:Ys=o,n=$r(n,"onChange"),0<n.length&&(l=new Qo("onChange","change",null,l,o),e.push({event:l,listeners:n}))}var ma=null,ga=null;function JS(e){oy(e,0)}function Fo(e){var n=fi(e);if(la(n))return e}function Am(e,n){if(e==="change")return n}var Tm=!1;if(Un){var ku;if(Un){var Bu="oninput"in document;if(!Bu){var Mm=document.createElement("div");Mm.setAttribute("oninput","return;"),Bu=typeof Mm.oninput=="function"}ku=Bu}else ku=!1;Tm=ku&&(!document.documentMode||9<document.documentMode)}function Cm(){ma&&(ma.detachEvent("onpropertychange",Om),ga=ma=null)}function Om(e){if(e.propertyName==="value"&&Fo(ga)){var n=[];Nm(n,ga,e,Tu(e)),hm(JS,n)}}function FS(e,n,l){e==="focusin"?(Cm(),ma=n,ga=l,ma.attachEvent("onpropertychange",Om)):e==="focusout"&&Cm()}function WS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fo(ga)}function PS(e,n){if(e==="click")return Fo(n)}function ew(e,n){if(e==="input"||e==="change")return Fo(n)}function tw(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Ut=typeof Object.is=="function"?Object.is:tw;function pa(e,n){if(Ut(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),o=Object.keys(n);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var f=l[o];if(!At.call(n,f)||!Ut(e[f],n[f]))return!1}return!0}function zm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dm(e,n){var l=zm(e);e=0;for(var o;l;){if(l.nodeType===3){if(o=e+l.textContent.length,e<=n&&o>=n)return{node:l,offset:n-e};e=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=zm(l)}}function Lm(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Lm(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function jm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Us(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=Us(e.document)}return n}function Hu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var nw=Un&&"documentMode"in document&&11>=document.documentMode,Ks=null,$u=null,ya=null,Uu=!1;function Rm(e,n,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Uu||Ks==null||Ks!==Us(o)||(o=Ks,"selectionStart"in o&&Hu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),ya&&pa(ya,o)||(ya=o,o=$r($u,"onSelect"),0<o.length&&(n=new Qo("onSelect","select",null,n,l),e.push({event:n,listeners:o}),n.target=Ks)))}function es(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var Zs={animationend:es("Animation","AnimationEnd"),animationiteration:es("Animation","AnimationIteration"),animationstart:es("Animation","AnimationStart"),transitionrun:es("Transition","TransitionRun"),transitionstart:es("Transition","TransitionStart"),transitioncancel:es("Transition","TransitionCancel"),transitionend:es("Transition","TransitionEnd")},qu={},km={};Un&&(km=document.createElement("div").style,"AnimationEvent"in window||(delete Zs.animationend.animation,delete Zs.animationiteration.animation,delete Zs.animationstart.animation),"TransitionEvent"in window||delete Zs.transitionend.transition);function ts(e){if(qu[e])return qu[e];if(!Zs[e])return e;var n=Zs[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in km)return qu[e]=n[l];return e}var Bm=ts("animationend"),Hm=ts("animationiteration"),$m=ts("animationstart"),iw=ts("transitionrun"),sw=ts("transitionstart"),lw=ts("transitioncancel"),Um=ts("transitionend"),qm=new Map,Vu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Vu.push("scrollEnd");function dn(e,n){qm.set(e,n),Hn(n,[e])}var Wo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Pt=[],Is=0,Yu=0;function Po(){for(var e=Is,n=Yu=Is=0;n<e;){var l=Pt[n];Pt[n++]=null;var o=Pt[n];Pt[n++]=null;var f=Pt[n];Pt[n++]=null;var d=Pt[n];if(Pt[n++]=null,o!==null&&f!==null){var b=o.pending;b===null?f.next=f:(f.next=b.next,b.next=f),o.pending=f}d!==0&&Vm(l,f,d)}}function er(e,n,l,o){Pt[Is++]=e,Pt[Is++]=n,Pt[Is++]=l,Pt[Is++]=o,Yu|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Gu(e,n,l,o){return er(e,n,l,o),tr(e)}function ns(e,n){return er(e,null,null,n),tr(e)}function Vm(e,n,l){e.lanes|=l;var o=e.alternate;o!==null&&(o.lanes|=l);for(var f=!1,d=e.return;d!==null;)d.childLanes|=l,o=d.alternate,o!==null&&(o.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(f=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,f&&n!==null&&(f=31-xt(l),e=d.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=l|536870912),d):null}function tr(e){if(50<$a)throw $a=0,ed=null,Error(a(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Qs={};function aw(e,n,l,o){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,n,l,o){return new aw(e,n,l,o)}function Xu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qn(e,n){var l=e.alternate;return l===null?(l=qt(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Ym(e,n){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function nr(e,n,l,o,f,d){var b=0;if(o=e,typeof e=="function")Xu(e)&&(b=1);else if(typeof e=="string")b=fx(e,l,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case q:return e=qt(31,l,n,f),e.elementType=q,e.lanes=d,e;case E:return is(l.children,f,d,n);case N:b=8,f|=24;break;case S:return e=qt(12,l,n,f|2),e.elementType=S,e.lanes=d,e;case L:return e=qt(13,l,n,f),e.elementType=L,e.lanes=d,e;case D:return e=qt(19,l,n,f),e.elementType=D,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case x:b=10;break e;case C:b=9;break e;case T:b=11;break e;case R:b=14;break e;case j:b=16,o=null;break e}b=29,l=Error(a(130,e===null?"null":typeof e,"")),o=null}return n=qt(b,l,n,f),n.elementType=e,n.type=o,n.lanes=d,n}function is(e,n,l,o){return e=qt(7,e,o,n),e.lanes=l,e}function Ku(e,n,l){return e=qt(6,e,null,n),e.lanes=l,e}function Gm(e){var n=qt(18,null,null,0);return n.stateNode=e,n}function Zu(e,n,l){return n=qt(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Xm=new WeakMap;function en(e,n){if(typeof e=="object"&&e!==null){var l=Xm.get(e);return l!==void 0?l:(n={value:e,source:n,stack:Nt(n)},Xm.set(e,n),n)}return{value:e,source:n,stack:Nt(n)}}var Js=[],Fs=0,ir=null,va=0,tn=[],nn=0,pi=null,An=1,Tn="";function Vn(e,n){Js[Fs++]=va,Js[Fs++]=ir,ir=e,va=n}function Km(e,n,l){tn[nn++]=An,tn[nn++]=Tn,tn[nn++]=pi,pi=e;var o=An;e=Tn;var f=32-xt(o)-1;o&=~(1<<f),l+=1;var d=32-xt(n)+f;if(30<d){var b=f-f%5;d=(o&(1<<b)-1).toString(32),o>>=b,f-=b,An=1<<32-xt(n)+f|l<<f|o,Tn=d+e}else An=1<<d|l<<f|o,Tn=e}function Iu(e){e.return!==null&&(Vn(e,1),Km(e,1,0))}function Qu(e){for(;e===ir;)ir=Js[--Fs],Js[Fs]=null,va=Js[--Fs],Js[Fs]=null;for(;e===pi;)pi=tn[--nn],tn[nn]=null,Tn=tn[--nn],tn[nn]=null,An=tn[--nn],tn[nn]=null}function Zm(e,n){tn[nn++]=An,tn[nn++]=Tn,tn[nn++]=pi,An=n.id,Tn=n.overflow,pi=e}var mt=null,Xe=null,ze=!1,yi=null,sn=!1,Ju=Error(a(519));function vi(e){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ba(en(n,e)),Ju}function Im(e){var n=e.stateNode,l=e.type,o=e.memoizedProps;switch(n[ft]=e,n[vt]=o,l){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(l=0;l<qa.length;l++)Me(qa[l],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":Me("invalid",n),qs(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Me("invalid",n);break;case"textarea":Me("invalid",n),cm(n,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||o.suppressHydrationWarning===!0||fy(n.textContent,l)?(o.popover!=null&&(Me("beforetoggle",n),Me("toggle",n)),o.onScroll!=null&&Me("scroll",n),o.onScrollEnd!=null&&Me("scrollend",n),o.onClick!=null&&(n.onclick=$n),n=!0):n=!1,n||vi(e,!0)}function Qm(e){for(mt=e.return;mt;)switch(mt.tag){case 5:case 31:case 13:sn=!1;return;case 27:case 3:sn=!0;return;default:mt=mt.return}}function Ws(e){if(e!==mt)return!1;if(!ze)return Qm(e),ze=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||gd(e.type,e.memoizedProps)),l=!l),l&&Xe&&vi(e),Qm(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));Xe=Sy(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));Xe=Sy(e)}else n===27?(n=Xe,Di(e.type)?(e=Sd,Sd=null,Xe=e):Xe=n):Xe=mt?an(e.stateNode.nextSibling):null;return!0}function ss(){Xe=mt=null,ze=!1}function Fu(){var e=yi;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),yi=null),e}function ba(e){yi===null?yi=[e]:yi.push(e)}var Wu=z(null),ls=null,Yn=null;function bi(e,n,l){P(Wu,n._currentValue),n._currentValue=l}function Gn(e){e._currentValue=Wu.current,$(Wu)}function Pu(e,n,l){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===l)break;e=e.return}}function ef(e,n,l,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var d=f.dependencies;if(d!==null){var b=f.child;d=d.firstContext;e:for(;d!==null;){var A=d;d=f;for(var H=0;H<n.length;H++)if(A.context===n[H]){d.lanes|=l,A=d.alternate,A!==null&&(A.lanes|=l),Pu(d.return,l,e),o||(b=null);break e}d=A.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(a(341));b.lanes|=l,d=b.alternate,d!==null&&(d.lanes|=l),Pu(b,l,e),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===e){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function Ps(e,n,l,o){e=null;for(var f=n,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(a(387));if(b=b.memoizedProps,b!==null){var A=f.type;Ut(f.pendingProps.value,b.value)||(e!==null?e.push(A):e=[A])}}else if(f===ue.current){if(b=f.alternate,b===null)throw Error(a(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Ka):e=[Ka])}f=f.return}e!==null&&ef(n,e,l,o),n.flags|=262144}function sr(e){for(e=e.firstContext;e!==null;){if(!Ut(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function as(e){ls=e,Yn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return Jm(ls,e)}function lr(e,n){return ls===null&&as(e),Jm(e,n)}function Jm(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},Yn===null){if(e===null)throw Error(a(308));Yn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Yn=Yn.next=n;return l}var ow=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},rw=t.unstable_scheduleCallback,cw=t.unstable_NormalPriority,lt={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tf(){return{controller:new ow,data:new Map,refCount:0}}function Sa(e){e.refCount--,e.refCount===0&&rw(cw,function(){e.controller.abort()})}var wa=null,nf=0,el=0,tl=null;function uw(e,n){if(wa===null){var l=wa=[];nf=0,el=ad(),tl={status:"pending",value:void 0,then:function(o){l.push(o)}}}return nf++,n.then(Fm,Fm),n}function Fm(){if(--nf===0&&wa!==null){tl!==null&&(tl.status="fulfilled");var e=wa;wa=null,el=0,tl=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function fw(e,n){var l=[],o={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<l.length;f++)(0,l[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),o}var Wm=O.S;O.S=function(e,n){Rp=tt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&uw(e,n),Wm!==null&&Wm(e,n)};var os=z(null);function sf(){var e=os.current;return e!==null?e:Ye.pooledCache}function ar(e,n){n===null?P(os,os.current):P(os,n.pool)}function Pm(){var e=sf();return e===null?null:{parent:lt._currentValue,pool:e}}var nl=Error(a(460)),lf=Error(a(474)),or=Error(a(542)),rr={then:function(){}};function eg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function tg(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then($n,$n),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,ig(e),e;default:if(typeof n.status=="string")n.then($n,$n);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,ig(e),e}throw cs=n,nl}}function rs(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(cs=l,nl):l}}var cs=null;function ng(){if(cs===null)throw Error(a(459));var e=cs;return cs=null,e}function ig(e){if(e===nl||e===or)throw Error(a(483))}var il=null,xa=0;function cr(e){var n=xa;return xa+=1,il===null&&(il=[]),tg(il,e,n)}function Ea(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function ur(e,n){throw n.$$typeof===y?Error(a(525)):(e=Object.prototype.toString.call(n),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function sg(e){function n(V,U){if(e){var Z=V.deletions;Z===null?(V.deletions=[U],V.flags|=16):Z.push(U)}}function l(V,U){if(!e)return null;for(;U!==null;)n(V,U),U=U.sibling;return null}function o(V){for(var U=new Map;V!==null;)V.key!==null?U.set(V.key,V):U.set(V.index,V),V=V.sibling;return U}function f(V,U){return V=qn(V,U),V.index=0,V.sibling=null,V}function d(V,U,Z){return V.index=Z,e?(Z=V.alternate,Z!==null?(Z=Z.index,Z<U?(V.flags|=67108866,U):Z):(V.flags|=67108866,U)):(V.flags|=1048576,U)}function b(V){return e&&V.alternate===null&&(V.flags|=67108866),V}function A(V,U,Z,se){return U===null||U.tag!==6?(U=Ku(Z,V.mode,se),U.return=V,U):(U=f(U,Z),U.return=V,U)}function H(V,U,Z,se){var ve=Z.type;return ve===E?ie(V,U,Z.props.children,se,Z.key):U!==null&&(U.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===j&&rs(ve)===U.type)?(U=f(U,Z.props),Ea(U,Z),U.return=V,U):(U=nr(Z.type,Z.key,Z.props,null,V.mode,se),Ea(U,Z),U.return=V,U)}function Q(V,U,Z,se){return U===null||U.tag!==4||U.stateNode.containerInfo!==Z.containerInfo||U.stateNode.implementation!==Z.implementation?(U=Zu(Z,V.mode,se),U.return=V,U):(U=f(U,Z.children||[]),U.return=V,U)}function ie(V,U,Z,se,ve){return U===null||U.tag!==7?(U=is(Z,V.mode,se,ve),U.return=V,U):(U=f(U,Z),U.return=V,U)}function oe(V,U,Z){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=Ku(""+U,V.mode,Z),U.return=V,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case w:return Z=nr(U.type,U.key,U.props,null,V.mode,Z),Ea(Z,U),Z.return=V,Z;case _:return U=Zu(U,V.mode,Z),U.return=V,U;case j:return U=rs(U),oe(V,U,Z)}if(Y(U)||I(U))return U=is(U,V.mode,Z,null),U.return=V,U;if(typeof U.then=="function")return oe(V,cr(U),Z);if(U.$$typeof===x)return oe(V,lr(V,U),Z);ur(V,U)}return null}function F(V,U,Z,se){var ve=U!==null?U.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return ve!==null?null:A(V,U,""+Z,se);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:return Z.key===ve?H(V,U,Z,se):null;case _:return Z.key===ve?Q(V,U,Z,se):null;case j:return Z=rs(Z),F(V,U,Z,se)}if(Y(Z)||I(Z))return ve!==null?null:ie(V,U,Z,se,null);if(typeof Z.then=="function")return F(V,U,cr(Z),se);if(Z.$$typeof===x)return F(V,U,lr(V,Z),se);ur(V,Z)}return null}function W(V,U,Z,se,ve){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return V=V.get(Z)||null,A(U,V,""+se,ve);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case w:return V=V.get(se.key===null?Z:se.key)||null,H(U,V,se,ve);case _:return V=V.get(se.key===null?Z:se.key)||null,Q(U,V,se,ve);case j:return se=rs(se),W(V,U,Z,se,ve)}if(Y(se)||I(se))return V=V.get(Z)||null,ie(U,V,se,ve,null);if(typeof se.then=="function")return W(V,U,Z,cr(se),ve);if(se.$$typeof===x)return W(V,U,Z,lr(U,se),ve);ur(U,se)}return null}function ge(V,U,Z,se){for(var ve=null,Le=null,pe=U,Ae=U=0,Oe=null;pe!==null&&Ae<Z.length;Ae++){pe.index>Ae?(Oe=pe,pe=null):Oe=pe.sibling;var je=F(V,pe,Z[Ae],se);if(je===null){pe===null&&(pe=Oe);break}e&&pe&&je.alternate===null&&n(V,pe),U=d(je,U,Ae),Le===null?ve=je:Le.sibling=je,Le=je,pe=Oe}if(Ae===Z.length)return l(V,pe),ze&&Vn(V,Ae),ve;if(pe===null){for(;Ae<Z.length;Ae++)pe=oe(V,Z[Ae],se),pe!==null&&(U=d(pe,U,Ae),Le===null?ve=pe:Le.sibling=pe,Le=pe);return ze&&Vn(V,Ae),ve}for(pe=o(pe);Ae<Z.length;Ae++)Oe=W(pe,V,Ae,Z[Ae],se),Oe!==null&&(e&&Oe.alternate!==null&&pe.delete(Oe.key===null?Ae:Oe.key),U=d(Oe,U,Ae),Le===null?ve=Oe:Le.sibling=Oe,Le=Oe);return e&&pe.forEach(function(Bi){return n(V,Bi)}),ze&&Vn(V,Ae),ve}function be(V,U,Z,se){if(Z==null)throw Error(a(151));for(var ve=null,Le=null,pe=U,Ae=U=0,Oe=null,je=Z.next();pe!==null&&!je.done;Ae++,je=Z.next()){pe.index>Ae?(Oe=pe,pe=null):Oe=pe.sibling;var Bi=F(V,pe,je.value,se);if(Bi===null){pe===null&&(pe=Oe);break}e&&pe&&Bi.alternate===null&&n(V,pe),U=d(Bi,U,Ae),Le===null?ve=Bi:Le.sibling=Bi,Le=Bi,pe=Oe}if(je.done)return l(V,pe),ze&&Vn(V,Ae),ve;if(pe===null){for(;!je.done;Ae++,je=Z.next())je=oe(V,je.value,se),je!==null&&(U=d(je,U,Ae),Le===null?ve=je:Le.sibling=je,Le=je);return ze&&Vn(V,Ae),ve}for(pe=o(pe);!je.done;Ae++,je=Z.next())je=W(pe,V,Ae,je.value,se),je!==null&&(e&&je.alternate!==null&&pe.delete(je.key===null?Ae:je.key),U=d(je,U,Ae),Le===null?ve=je:Le.sibling=je,Le=je);return e&&pe.forEach(function(xx){return n(V,xx)}),ze&&Vn(V,Ae),ve}function Ve(V,U,Z,se){if(typeof Z=="object"&&Z!==null&&Z.type===E&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:e:{for(var ve=Z.key;U!==null;){if(U.key===ve){if(ve=Z.type,ve===E){if(U.tag===7){l(V,U.sibling),se=f(U,Z.props.children),se.return=V,V=se;break e}}else if(U.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===j&&rs(ve)===U.type){l(V,U.sibling),se=f(U,Z.props),Ea(se,Z),se.return=V,V=se;break e}l(V,U);break}else n(V,U);U=U.sibling}Z.type===E?(se=is(Z.props.children,V.mode,se,Z.key),se.return=V,V=se):(se=nr(Z.type,Z.key,Z.props,null,V.mode,se),Ea(se,Z),se.return=V,V=se)}return b(V);case _:e:{for(ve=Z.key;U!==null;){if(U.key===ve)if(U.tag===4&&U.stateNode.containerInfo===Z.containerInfo&&U.stateNode.implementation===Z.implementation){l(V,U.sibling),se=f(U,Z.children||[]),se.return=V,V=se;break e}else{l(V,U);break}else n(V,U);U=U.sibling}se=Zu(Z,V.mode,se),se.return=V,V=se}return b(V);case j:return Z=rs(Z),Ve(V,U,Z,se)}if(Y(Z))return ge(V,U,Z,se);if(I(Z)){if(ve=I(Z),typeof ve!="function")throw Error(a(150));return Z=ve.call(Z),be(V,U,Z,se)}if(typeof Z.then=="function")return Ve(V,U,cr(Z),se);if(Z.$$typeof===x)return Ve(V,U,lr(V,Z),se);ur(V,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,U!==null&&U.tag===6?(l(V,U.sibling),se=f(U,Z),se.return=V,V=se):(l(V,U),se=Ku(Z,V.mode,se),se.return=V,V=se),b(V)):l(V,U)}return function(V,U,Z,se){try{xa=0;var ve=Ve(V,U,Z,se);return il=null,ve}catch(pe){if(pe===nl||pe===or)throw pe;var Le=qt(29,pe,null,V.mode);return Le.lanes=se,Le.return=V,Le}}}var us=sg(!0),lg=sg(!1),Si=!1;function af(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function of(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function wi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xi(e,n,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Re&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=tr(e),Vm(e,null,l),n}return er(e,o,n,l),tr(e)}function _a(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,jo(e,l)}}function rf(e,n){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var f=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?f=d=b:d=d.next=b,l=l.next}while(l!==null);d===null?f=d=n:d=d.next=n}else f=d=n;l={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var cf=!1;function Na(){if(cf){var e=tl;if(e!==null)throw e}}function Aa(e,n,l,o){cf=!1;var f=e.updateQueue;Si=!1;var d=f.firstBaseUpdate,b=f.lastBaseUpdate,A=f.shared.pending;if(A!==null){f.shared.pending=null;var H=A,Q=H.next;H.next=null,b===null?d=Q:b.next=Q,b=H;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,A=ie.lastBaseUpdate,A!==b&&(A===null?ie.firstBaseUpdate=Q:A.next=Q,ie.lastBaseUpdate=H))}if(d!==null){var oe=f.baseState;b=0,ie=Q=H=null,A=d;do{var F=A.lane&-536870913,W=F!==A.lane;if(W?(Ce&F)===F:(o&F)===F){F!==0&&F===el&&(cf=!0),ie!==null&&(ie=ie.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var ge=e,be=A;F=n;var Ve=l;switch(be.tag){case 1:if(ge=be.payload,typeof ge=="function"){oe=ge.call(Ve,oe,F);break e}oe=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=be.payload,F=typeof ge=="function"?ge.call(Ve,oe,F):ge,F==null)break e;oe=p({},oe,F);break e;case 2:Si=!0}}F=A.callback,F!==null&&(e.flags|=64,W&&(e.flags|=8192),W=f.callbacks,W===null?f.callbacks=[F]:W.push(F))}else W={lane:F,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ie===null?(Q=ie=W,H=oe):ie=ie.next=W,b|=F;if(A=A.next,A===null){if(A=f.shared.pending,A===null)break;W=A,A=W.next,W.next=null,f.lastBaseUpdate=W,f.shared.pending=null}}while(!0);ie===null&&(H=oe),f.baseState=H,f.firstBaseUpdate=Q,f.lastBaseUpdate=ie,d===null&&(f.shared.lanes=0),Ti|=b,e.lanes=b,e.memoizedState=oe}}function ag(e,n){if(typeof e!="function")throw Error(a(191,e));e.call(n)}function og(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ag(l[e],n)}var sl=z(null),fr=z(0);function rg(e,n){e=Pn,P(fr,e),P(sl,n),Pn=e|n.baseLanes}function uf(){P(fr,Pn),P(sl,sl.current)}function ff(){Pn=fr.current,$(sl),$(fr)}var Vt=z(null),ln=null;function Ei(e){var n=e.alternate;P(nt,nt.current&1),P(Vt,e),ln===null&&(n===null||sl.current!==null||n.memoizedState!==null)&&(ln=e)}function df(e){P(nt,nt.current),P(Vt,e),ln===null&&(ln=e)}function cg(e){e.tag===22?(P(nt,nt.current),P(Vt,e),ln===null&&(ln=e)):_i()}function _i(){P(nt,nt.current),P(Vt,Vt.current)}function Yt(e){$(Vt),ln===e&&(ln=null),$(nt)}var nt=z(0);function dr(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||vd(l)||bd(l)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Xn=0,Ne=null,Ue=null,at=null,hr=!1,ll=!1,fs=!1,mr=0,Ta=0,al=null,dw=0;function Pe(){throw Error(a(321))}function hf(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Ut(e[l],n[l]))return!1;return!0}function mf(e,n,l,o,f,d){return Xn=d,Ne=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,O.H=e===null||e.memoizedState===null?Kg:Cf,fs=!1,d=l(o,f),fs=!1,ll&&(d=fg(n,l,o,f)),ug(e),d}function ug(e){O.H=Oa;var n=Ue!==null&&Ue.next!==null;if(Xn=0,at=Ue=Ne=null,hr=!1,Ta=0,al=null,n)throw Error(a(300));e===null||ot||(e=e.dependencies,e!==null&&sr(e)&&(ot=!0))}function fg(e,n,l,o){Ne=e;var f=0;do{if(ll&&(al=null),Ta=0,ll=!1,25<=f)throw Error(a(301));if(f+=1,at=Ue=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}O.H=Zg,d=n(l,o)}while(ll);return d}function hw(){var e=O.H,n=e.useState()[0];return n=typeof n.then=="function"?Ma(n):n,e=e.useState()[0],(Ue!==null?Ue.memoizedState:null)!==e&&(Ne.flags|=1024),n}function gf(){var e=mr!==0;return mr=0,e}function pf(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function yf(e){if(hr){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}hr=!1}Xn=0,at=Ue=Ne=null,ll=!1,Ta=mr=0,al=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?Ne.memoizedState=at=e:at=at.next=e,at}function it(){if(Ue===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var n=at===null?Ne.memoizedState:at.next;if(n!==null)at=n,Ue=e;else{if(e===null)throw Ne.alternate===null?Error(a(467)):Error(a(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},at===null?Ne.memoizedState=at=e:at=at.next=e}return at}function gr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ma(e){var n=Ta;return Ta+=1,al===null&&(al=[]),e=tg(al,e,n),n=Ne,(at===null?n.memoizedState:at.next)===null&&(n=n.alternate,O.H=n===null||n.memoizedState===null?Kg:Cf),e}function pr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ma(e);if(e.$$typeof===x)return gt(e)}throw Error(a(438,String(e)))}function vf(e){var n=null,l=Ne.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var o=Ne.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=gr(),Ne.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),o=0;o<e;o++)l[o]=le;return n.index++,l}function Kn(e,n){return typeof n=="function"?n(e):n}function yr(e){var n=it();return bf(n,Ue,e)}function bf(e,n,l){var o=e.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=l;var f=e.baseQueue,d=o.pending;if(d!==null){if(f!==null){var b=f.next;f.next=d.next,d.next=b}n.baseQueue=f=d,o.pending=null}if(d=e.baseState,f===null)e.memoizedState=d;else{n=f.next;var A=b=null,H=null,Q=n,ie=!1;do{var oe=Q.lane&-536870913;if(oe!==Q.lane?(Ce&oe)===oe:(Xn&oe)===oe){var F=Q.revertLane;if(F===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),oe===el&&(ie=!0);else if((Xn&F)===F){Q=Q.next,F===el&&(ie=!0);continue}else oe={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},H===null?(A=H=oe,b=d):H=H.next=oe,Ne.lanes|=F,Ti|=F;oe=Q.action,fs&&l(d,oe),d=Q.hasEagerState?Q.eagerState:l(d,oe)}else F={lane:oe,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},H===null?(A=H=F,b=d):H=H.next=F,Ne.lanes|=oe,Ti|=oe;Q=Q.next}while(Q!==null&&Q!==n);if(H===null?b=d:H.next=A,!Ut(d,e.memoizedState)&&(ot=!0,ie&&(l=tl,l!==null)))throw l;e.memoizedState=d,e.baseState=b,e.baseQueue=H,o.lastRenderedState=d}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Sf(e){var n=it(),l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var o=l.dispatch,f=l.pending,d=n.memoizedState;if(f!==null){l.pending=null;var b=f=f.next;do d=e(d,b.action),b=b.next;while(b!==f);Ut(d,n.memoizedState)||(ot=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,o]}function dg(e,n,l){var o=Ne,f=it(),d=ze;if(d){if(l===void 0)throw Error(a(407));l=l()}else l=n();var b=!Ut((Ue||f).memoizedState,l);if(b&&(f.memoizedState=l,ot=!0),f=f.queue,Ef(gg.bind(null,o,f,e),[e]),f.getSnapshot!==n||b||at!==null&&at.memoizedState.tag&1){if(o.flags|=2048,ol(9,{destroy:void 0},mg.bind(null,o,f,l,n),null),Ye===null)throw Error(a(349));d||(Xn&127)!==0||hg(o,n,l)}return l}function hg(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Ne.updateQueue,n===null?(n=gr(),Ne.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function mg(e,n,l,o){n.value=l,n.getSnapshot=o,pg(n)&&yg(e)}function gg(e,n,l){return l(function(){pg(n)&&yg(e)})}function pg(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Ut(e,l)}catch{return!0}}function yg(e){var n=ns(e,2);n!==null&&Rt(n,e,2)}function wf(e){var n=Et();if(typeof e=="function"){var l=e;if(e=l(),fs){_n(!0);try{l()}finally{_n(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},n}function vg(e,n,l,o){return e.baseState=l,bf(e,Ue,typeof o=="function"?o:Kn)}function mw(e,n,l,o,f){if(Sr(e))throw Error(a(485));if(e=n.action,e!==null){var d={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};O.T!==null?l(!0):d.isTransition=!1,o(d),l=n.pending,l===null?(d.next=n.pending=d,bg(n,d)):(d.next=l.next,n.pending=l.next=d)}}function bg(e,n){var l=n.action,o=n.payload,f=e.state;if(n.isTransition){var d=O.T,b={};O.T=b;try{var A=l(f,o),H=O.S;H!==null&&H(b,A),Sg(e,n,A)}catch(Q){xf(e,n,Q)}finally{d!==null&&b.types!==null&&(d.types=b.types),O.T=d}}else try{d=l(f,o),Sg(e,n,d)}catch(Q){xf(e,n,Q)}}function Sg(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){wg(e,n,o)},function(o){return xf(e,n,o)}):wg(e,n,l)}function wg(e,n,l){n.status="fulfilled",n.value=l,xg(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,bg(e,l)))}function xf(e,n,l){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=l,xg(n),n=n.next;while(n!==o)}e.action=null}function xg(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Eg(e,n){return n}function _g(e,n){if(ze){var l=Ye.formState;if(l!==null){e:{var o=Ne;if(ze){if(Xe){t:{for(var f=Xe,d=sn;f.nodeType!==8;){if(!d){f=null;break t}if(f=an(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){Xe=an(f.nextSibling),o=f.data==="F!";break e}}vi(o)}o=!1}o&&(n=l[0])}}return l=Et(),l.memoizedState=l.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eg,lastRenderedState:n},l.queue=o,l=Yg.bind(null,Ne,o),o.dispatch=l,o=wf(!1),d=Mf.bind(null,Ne,!1,o.queue),o=Et(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,l=mw.bind(null,Ne,f,d,l),f.dispatch=l,o.memoizedState=e,[n,l,!1]}function Ng(e){var n=it();return Ag(n,Ue,e)}function Ag(e,n,l){if(n=bf(e,n,Eg)[0],e=yr(Kn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=Ma(n)}catch(b){throw b===nl?or:b}else o=n;n=it();var f=n.queue,d=f.dispatch;return l!==n.memoizedState&&(Ne.flags|=2048,ol(9,{destroy:void 0},gw.bind(null,f,l),null)),[o,d,e]}function gw(e,n){e.action=n}function Tg(e){var n=it(),l=Ue;if(l!==null)return Ag(n,l,e);it(),n=n.memoizedState,l=it();var o=l.queue.dispatch;return l.memoizedState=e,[n,o,!1]}function ol(e,n,l,o){return e={tag:e,create:l,deps:o,inst:n,next:null},n=Ne.updateQueue,n===null&&(n=gr(),Ne.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(o=l.next,l.next=e,e.next=o,n.lastEffect=e),e}function Mg(){return it().memoizedState}function vr(e,n,l,o){var f=Et();Ne.flags|=e,f.memoizedState=ol(1|n,{destroy:void 0},l,o===void 0?null:o)}function br(e,n,l,o){var f=it();o=o===void 0?null:o;var d=f.memoizedState.inst;Ue!==null&&o!==null&&hf(o,Ue.memoizedState.deps)?f.memoizedState=ol(n,d,l,o):(Ne.flags|=e,f.memoizedState=ol(1|n,d,l,o))}function Cg(e,n){vr(8390656,8,e,n)}function Ef(e,n){br(2048,8,e,n)}function pw(e){Ne.flags|=4;var n=Ne.updateQueue;if(n===null)n=gr(),Ne.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function Og(e){var n=it().memoizedState;return pw({ref:n,nextImpl:e}),function(){if((Re&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function zg(e,n){return br(4,2,e,n)}function Dg(e,n){return br(4,4,e,n)}function Lg(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function jg(e,n,l){l=l!=null?l.concat([e]):null,br(4,4,Lg.bind(null,n,e),l)}function _f(){}function Rg(e,n){var l=it();n=n===void 0?null:n;var o=l.memoizedState;return n!==null&&hf(n,o[1])?o[0]:(l.memoizedState=[e,n],e)}function kg(e,n){var l=it();n=n===void 0?null:n;var o=l.memoizedState;if(n!==null&&hf(n,o[1]))return o[0];if(o=e(),fs){_n(!0);try{e()}finally{_n(!1)}}return l.memoizedState=[o,n],o}function Nf(e,n,l){return l===void 0||(Xn&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=Bp(),Ne.lanes|=e,Ti|=e,l)}function Bg(e,n,l,o){return Ut(l,n)?l:sl.current!==null?(e=Nf(e,l,o),Ut(e,n)||(ot=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(Ce&261930)===0?(ot=!0,e.memoizedState=l):(e=Bp(),Ne.lanes|=e,Ti|=e,n)}function Hg(e,n,l,o,f){var d=B.p;B.p=d!==0&&8>d?d:8;var b=O.T,A={};O.T=A,Mf(e,!1,n,l);try{var H=f(),Q=O.S;if(Q!==null&&Q(A,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var ie=fw(H,o);Ca(e,n,ie,Kt(e))}else Ca(e,n,o,Kt(e))}catch(oe){Ca(e,n,{then:function(){},status:"rejected",reason:oe},Kt())}finally{B.p=d,b!==null&&A.types!==null&&(b.types=A.types),O.T=b}}function yw(){}function Af(e,n,l,o){if(e.tag!==5)throw Error(a(476));var f=$g(e).queue;Hg(e,f,n,G,l===null?yw:function(){return Ug(e),l(o)})}function $g(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:G},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Ug(e){var n=$g(e);n.next===null&&(n=e.alternate.memoizedState),Ca(e,n.next.queue,{},Kt())}function Tf(){return gt(Ka)}function qg(){return it().memoizedState}function Vg(){return it().memoizedState}function vw(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=Kt();e=wi(l);var o=xi(n,e,l);o!==null&&(Rt(o,n,l),_a(o,n,l)),n={cache:tf()},e.payload=n;return}n=n.return}}function bw(e,n,l){var o=Kt();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Sr(e)?Gg(n,l):(l=Gu(e,n,l,o),l!==null&&(Rt(l,e,o),Xg(l,n,o)))}function Yg(e,n,l){var o=Kt();Ca(e,n,l,o)}function Ca(e,n,l,o){var f={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Sr(e))Gg(n,f);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var b=n.lastRenderedState,A=d(b,l);if(f.hasEagerState=!0,f.eagerState=A,Ut(A,b))return er(e,n,f,0),Ye===null&&Po(),!1}catch{}if(l=Gu(e,n,f,o),l!==null)return Rt(l,e,o),Xg(l,n,o),!0}return!1}function Mf(e,n,l,o){if(o={lane:2,revertLane:ad(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Sr(e)){if(n)throw Error(a(479))}else n=Gu(e,l,o,2),n!==null&&Rt(n,e,2)}function Sr(e){var n=e.alternate;return e===Ne||n!==null&&n===Ne}function Gg(e,n){ll=hr=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Xg(e,n,l){if((l&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,jo(e,l)}}var Oa={readContext:gt,use:pr,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe};Oa.useEffectEvent=Pe;var Kg={readContext:gt,use:pr,useCallback:function(e,n){return Et().memoizedState=[e,n===void 0?null:n],e},useContext:gt,useEffect:Cg,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,vr(4194308,4,Lg.bind(null,n,e),l)},useLayoutEffect:function(e,n){return vr(4194308,4,e,n)},useInsertionEffect:function(e,n){vr(4,2,e,n)},useMemo:function(e,n){var l=Et();n=n===void 0?null:n;var o=e();if(fs){_n(!0);try{e()}finally{_n(!1)}}return l.memoizedState=[o,n],o},useReducer:function(e,n,l){var o=Et();if(l!==void 0){var f=l(n);if(fs){_n(!0);try{l(n)}finally{_n(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=bw.bind(null,Ne,e),[o.memoizedState,e]},useRef:function(e){var n=Et();return e={current:e},n.memoizedState=e},useState:function(e){e=wf(e);var n=e.queue,l=Yg.bind(null,Ne,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:_f,useDeferredValue:function(e,n){var l=Et();return Nf(l,e,n)},useTransition:function(){var e=wf(!1);return e=Hg.bind(null,Ne,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var o=Ne,f=Et();if(ze){if(l===void 0)throw Error(a(407));l=l()}else{if(l=n(),Ye===null)throw Error(a(349));(Ce&127)!==0||hg(o,n,l)}f.memoizedState=l;var d={value:l,getSnapshot:n};return f.queue=d,Cg(gg.bind(null,o,d,e),[e]),o.flags|=2048,ol(9,{destroy:void 0},mg.bind(null,o,d,l,n),null),l},useId:function(){var e=Et(),n=Ye.identifierPrefix;if(ze){var l=Tn,o=An;l=(o&~(1<<32-xt(o)-1)).toString(32)+l,n="_"+n+"R_"+l,l=mr++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=dw++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Tf,useFormState:_g,useActionState:_g,useOptimistic:function(e){var n=Et();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=Mf.bind(null,Ne,!0,l),l.dispatch=n,[e,n]},useMemoCache:vf,useCacheRefresh:function(){return Et().memoizedState=vw.bind(null,Ne)},useEffectEvent:function(e){var n=Et(),l={impl:e};return n.memoizedState=l,function(){if((Re&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},Cf={readContext:gt,use:pr,useCallback:Rg,useContext:gt,useEffect:Ef,useImperativeHandle:jg,useInsertionEffect:zg,useLayoutEffect:Dg,useMemo:kg,useReducer:yr,useRef:Mg,useState:function(){return yr(Kn)},useDebugValue:_f,useDeferredValue:function(e,n){var l=it();return Bg(l,Ue.memoizedState,e,n)},useTransition:function(){var e=yr(Kn)[0],n=it().memoizedState;return[typeof e=="boolean"?e:Ma(e),n]},useSyncExternalStore:dg,useId:qg,useHostTransitionStatus:Tf,useFormState:Ng,useActionState:Ng,useOptimistic:function(e,n){var l=it();return vg(l,Ue,e,n)},useMemoCache:vf,useCacheRefresh:Vg};Cf.useEffectEvent=Og;var Zg={readContext:gt,use:pr,useCallback:Rg,useContext:gt,useEffect:Ef,useImperativeHandle:jg,useInsertionEffect:zg,useLayoutEffect:Dg,useMemo:kg,useReducer:Sf,useRef:Mg,useState:function(){return Sf(Kn)},useDebugValue:_f,useDeferredValue:function(e,n){var l=it();return Ue===null?Nf(l,e,n):Bg(l,Ue.memoizedState,e,n)},useTransition:function(){var e=Sf(Kn)[0],n=it().memoizedState;return[typeof e=="boolean"?e:Ma(e),n]},useSyncExternalStore:dg,useId:qg,useHostTransitionStatus:Tf,useFormState:Tg,useActionState:Tg,useOptimistic:function(e,n){var l=it();return Ue!==null?vg(l,Ue,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:vf,useCacheRefresh:Vg};Zg.useEffectEvent=Og;function Of(e,n,l,o){n=e.memoizedState,l=l(o,n),l=l==null?n:p({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var zf={enqueueSetState:function(e,n,l){e=e._reactInternals;var o=Kt(),f=wi(o);f.payload=n,l!=null&&(f.callback=l),n=xi(e,f,o),n!==null&&(Rt(n,e,o),_a(n,e,o))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var o=Kt(),f=wi(o);f.tag=1,f.payload=n,l!=null&&(f.callback=l),n=xi(e,f,o),n!==null&&(Rt(n,e,o),_a(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=Kt(),o=wi(l);o.tag=2,n!=null&&(o.callback=n),n=xi(e,o,l),n!==null&&(Rt(n,e,l),_a(n,e,l))}};function Ig(e,n,l,o,f,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,b):n.prototype&&n.prototype.isPureReactComponent?!pa(l,o)||!pa(f,d):!0}function Qg(e,n,l,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,o),n.state!==e&&zf.enqueueReplaceState(n,n.state,null)}function ds(e,n){var l=n;if("ref"in n){l={};for(var o in n)o!=="ref"&&(l[o]=n[o])}if(e=e.defaultProps){l===n&&(l=p({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}function Jg(e){Wo(e)}function Fg(e){console.error(e)}function Wg(e){Wo(e)}function wr(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Pg(e,n,l){try{var o=e.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Df(e,n,l){return l=wi(l),l.tag=3,l.payload={element:null},l.callback=function(){wr(e,n)},l}function ep(e){return e=wi(e),e.tag=3,e}function tp(e,n,l,o){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var d=o.value;e.payload=function(){return f(d)},e.callback=function(){Pg(n,l,o)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Pg(n,l,o),typeof f!="function"&&(Mi===null?Mi=new Set([this]):Mi.add(this));var A=o.stack;this.componentDidCatch(o.value,{componentStack:A!==null?A:""})})}function Sw(e,n,l,o,f){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=l.alternate,n!==null&&Ps(n,l,f,!0),l=Vt.current,l!==null){switch(l.tag){case 31:case 13:return ln===null?Lr():l.alternate===null&&et===0&&(et=3),l.flags&=-257,l.flags|=65536,l.lanes=f,o===rr?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([o]):n.add(o),id(e,o,f)),!1;case 22:return l.flags|=65536,o===rr?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([o]):l.add(o)),id(e,o,f)),!1}throw Error(a(435,l.tag))}return id(e,o,f),Lr(),!1}if(ze)return n=Vt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==Ju&&(e=Error(a(422),{cause:o}),ba(en(e,l)))):(o!==Ju&&(n=Error(a(423),{cause:o}),ba(en(n,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=en(o,l),f=Df(e.stateNode,o,f),rf(e,f),et!==4&&(et=2)),!1;var d=Error(a(520),{cause:o});if(d=en(d,l),Ha===null?Ha=[d]:Ha.push(d),et!==4&&(et=2),n===null)return!0;o=en(o,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=Df(l.stateNode,o,e),rf(l,e),!1;case 1:if(n=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Mi===null||!Mi.has(d))))return l.flags|=65536,f&=-f,l.lanes|=f,f=ep(f),tp(f,e,l,o),rf(l,f),!1}l=l.return}while(l!==null);return!1}var Lf=Error(a(461)),ot=!1;function pt(e,n,l,o){n.child=e===null?lg(n,null,l,o):us(n,e.child,l,o)}function np(e,n,l,o,f){l=l.render;var d=n.ref;if("ref"in o){var b={};for(var A in o)A!=="ref"&&(b[A]=o[A])}else b=o;return as(n),o=mf(e,n,l,b,d,f),A=gf(),e!==null&&!ot?(pf(e,n,f),Zn(e,n,f)):(ze&&A&&Iu(n),n.flags|=1,pt(e,n,o,f),n.child)}function ip(e,n,l,o,f){if(e===null){var d=l.type;return typeof d=="function"&&!Xu(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,sp(e,n,d,o,f)):(e=nr(l.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!qf(e,f)){var b=d.memoizedProps;if(l=l.compare,l=l!==null?l:pa,l(b,o)&&e.ref===n.ref)return Zn(e,n,f)}return n.flags|=1,e=qn(d,o),e.ref=n.ref,e.return=n,n.child=e}function sp(e,n,l,o,f){if(e!==null){var d=e.memoizedProps;if(pa(d,o)&&e.ref===n.ref)if(ot=!1,n.pendingProps=o=d,qf(e,f))(e.flags&131072)!==0&&(ot=!0);else return n.lanes=e.lanes,Zn(e,n,f)}return jf(e,n,l,o,f)}function lp(e,n,l,o){var f=o.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~d}else o=0,n.child=null;return ap(e,n,d,l,o)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&ar(n,d!==null?d.cachePool:null),d!==null?rg(n,d):uf(),cg(n);else return o=n.lanes=536870912,ap(e,n,d!==null?d.baseLanes|l:l,l,o)}else d!==null?(ar(n,d.cachePool),rg(n,d),_i(),n.memoizedState=null):(e!==null&&ar(n,null),uf(),_i());return pt(e,n,f,l),n.child}function za(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ap(e,n,l,o,f){var d=sf();return d=d===null?null:{parent:lt._currentValue,pool:d},n.memoizedState={baseLanes:l,cachePool:d},e!==null&&ar(n,null),uf(),cg(n),e!==null&&Ps(e,n,o,!0),n.childLanes=f,null}function xr(e,n){return n=_r({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function op(e,n,l){return us(n,e.child,null,l),e=xr(n,n.pendingProps),e.flags|=2,Yt(n),n.memoizedState=null,e}function ww(e,n,l){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(ze){if(o.mode==="hidden")return e=xr(n,o),n.lanes=536870912,za(null,e);if(df(n),(e=Xe)?(e=by(e,sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:pi!==null?{id:An,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},l=Gm(e),l.return=n,n.child=l,mt=n,Xe=null)):e=null,e===null)throw vi(n);return n.lanes=536870912,null}return xr(n,o)}var d=e.memoizedState;if(d!==null){var b=d.dehydrated;if(df(n),f)if(n.flags&256)n.flags&=-257,n=op(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(a(558));else if(ot||Ps(e,n,l,!1),f=(l&e.childLanes)!==0,ot||f){if(o=Ye,o!==null&&(b=Ro(o,l),b!==0&&b!==d.retryLane))throw d.retryLane=b,ns(e,b),Rt(o,e,b),Lf;Lr(),n=op(e,n,l)}else e=d.treeContext,Xe=an(b.nextSibling),mt=n,ze=!0,yi=null,sn=!1,e!==null&&Zm(n,e),n=xr(n,o),n.flags|=4096;return n}return e=qn(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Er(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function jf(e,n,l,o,f){return as(n),l=mf(e,n,l,o,void 0,f),o=gf(),e!==null&&!ot?(pf(e,n,f),Zn(e,n,f)):(ze&&o&&Iu(n),n.flags|=1,pt(e,n,l,f),n.child)}function rp(e,n,l,o,f,d){return as(n),n.updateQueue=null,l=fg(n,o,l,f),ug(e),o=gf(),e!==null&&!ot?(pf(e,n,d),Zn(e,n,d)):(ze&&o&&Iu(n),n.flags|=1,pt(e,n,l,d),n.child)}function cp(e,n,l,o,f){if(as(n),n.stateNode===null){var d=Qs,b=l.contextType;typeof b=="object"&&b!==null&&(d=gt(b)),d=new l(o,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=zf,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=o,d.state=n.memoizedState,d.refs={},af(n),b=l.contextType,d.context=typeof b=="object"&&b!==null?gt(b):Qs,d.state=n.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(Of(n,l,b,o),d.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&zf.enqueueReplaceState(d,d.state,null),Aa(n,o,d,f),Na(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){d=n.stateNode;var A=n.memoizedProps,H=ds(l,A);d.props=H;var Q=d.context,ie=l.contextType;b=Qs,typeof ie=="object"&&ie!==null&&(b=gt(ie));var oe=l.getDerivedStateFromProps;ie=typeof oe=="function"||typeof d.getSnapshotBeforeUpdate=="function",A=n.pendingProps!==A,ie||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(A||Q!==b)&&Qg(n,d,o,b),Si=!1;var F=n.memoizedState;d.state=F,Aa(n,o,d,f),Na(),Q=n.memoizedState,A||F!==Q||Si?(typeof oe=="function"&&(Of(n,l,oe,o),Q=n.memoizedState),(H=Si||Ig(n,l,H,o,F,Q,b))?(ie||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=Q),d.props=o,d.state=Q,d.context=b,o=H):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{d=n.stateNode,of(e,n),b=n.memoizedProps,ie=ds(l,b),d.props=ie,oe=n.pendingProps,F=d.context,Q=l.contextType,H=Qs,typeof Q=="object"&&Q!==null&&(H=gt(Q)),A=l.getDerivedStateFromProps,(Q=typeof A=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==oe||F!==H)&&Qg(n,d,o,H),Si=!1,F=n.memoizedState,d.state=F,Aa(n,o,d,f),Na();var W=n.memoizedState;b!==oe||F!==W||Si||e!==null&&e.dependencies!==null&&sr(e.dependencies)?(typeof A=="function"&&(Of(n,l,A,o),W=n.memoizedState),(ie=Si||Ig(n,l,ie,o,F,W,H)||e!==null&&e.dependencies!==null&&sr(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,W,H),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,W,H)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=W),d.props=o,d.state=W,d.context=H,o=ie):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(n.flags|=1024),o=!1)}return d=o,Er(e,n),o=(n.flags&128)!==0,d||o?(d=n.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&o?(n.child=us(n,e.child,null,f),n.child=us(n,null,l,f)):pt(e,n,l,f),n.memoizedState=d.state,e=n.child):e=Zn(e,n,f),e}function up(e,n,l,o){return ss(),n.flags|=256,pt(e,n,l,o),n.child}var Rf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kf(e){return{baseLanes:e,cachePool:Pm()}}function Bf(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=Xt),e}function fp(e,n,l){var o=n.pendingProps,f=!1,d=(n.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),b&&(f=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(ze){if(f?Ei(n):_i(),(e=Xe)?(e=by(e,sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:pi!==null?{id:An,overflow:Tn}:null,retryLane:536870912,hydrationErrors:null},l=Gm(e),l.return=n,n.child=l,mt=n,Xe=null)):e=null,e===null)throw vi(n);return bd(e)?n.lanes=32:n.lanes=536870912,null}var A=o.children;return o=o.fallback,f?(_i(),f=n.mode,A=_r({mode:"hidden",children:A},f),o=is(o,f,l,null),A.return=n,o.return=n,A.sibling=o,n.child=A,o=n.child,o.memoizedState=kf(l),o.childLanes=Bf(e,b,l),n.memoizedState=Rf,za(null,o)):(Ei(n),Hf(n,A))}var H=e.memoizedState;if(H!==null&&(A=H.dehydrated,A!==null)){if(d)n.flags&256?(Ei(n),n.flags&=-257,n=$f(e,n,l)):n.memoizedState!==null?(_i(),n.child=e.child,n.flags|=128,n=null):(_i(),A=o.fallback,f=n.mode,o=_r({mode:"visible",children:o.children},f),A=is(A,f,l,null),A.flags|=2,o.return=n,A.return=n,o.sibling=A,n.child=o,us(n,e.child,null,l),o=n.child,o.memoizedState=kf(l),o.childLanes=Bf(e,b,l),n.memoizedState=Rf,n=za(null,o));else if(Ei(n),bd(A)){if(b=A.nextSibling&&A.nextSibling.dataset,b)var Q=b.dgst;b=Q,o=Error(a(419)),o.stack="",o.digest=b,ba({value:o,source:null,stack:null}),n=$f(e,n,l)}else if(ot||Ps(e,n,l,!1),b=(l&e.childLanes)!==0,ot||b){if(b=Ye,b!==null&&(o=Ro(b,l),o!==0&&o!==H.retryLane))throw H.retryLane=o,ns(e,o),Rt(b,e,o),Lf;vd(A)||Lr(),n=$f(e,n,l)}else vd(A)?(n.flags|=192,n.child=e.child,n=null):(e=H.treeContext,Xe=an(A.nextSibling),mt=n,ze=!0,yi=null,sn=!1,e!==null&&Zm(n,e),n=Hf(n,o.children),n.flags|=4096);return n}return f?(_i(),A=o.fallback,f=n.mode,H=e.child,Q=H.sibling,o=qn(H,{mode:"hidden",children:o.children}),o.subtreeFlags=H.subtreeFlags&65011712,Q!==null?A=qn(Q,A):(A=is(A,f,l,null),A.flags|=2),A.return=n,o.return=n,o.sibling=A,n.child=o,za(null,o),o=n.child,A=e.child.memoizedState,A===null?A=kf(l):(f=A.cachePool,f!==null?(H=lt._currentValue,f=f.parent!==H?{parent:H,pool:H}:f):f=Pm(),A={baseLanes:A.baseLanes|l,cachePool:f}),o.memoizedState=A,o.childLanes=Bf(e,b,l),n.memoizedState=Rf,za(e.child,o)):(Ei(n),l=e.child,e=l.sibling,l=qn(l,{mode:"visible",children:o.children}),l.return=n,l.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=l,n.memoizedState=null,l)}function Hf(e,n){return n=_r({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function _r(e,n){return e=qt(22,e,null,n),e.lanes=0,e}function $f(e,n,l){return us(n,e.child,null,l),e=Hf(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function dp(e,n,l){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Pu(e.return,n,l)}function Uf(e,n,l,o,f,d){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:f,treeForkCount:d}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=l,b.tailMode=f,b.treeForkCount=d)}function hp(e,n,l){var o=n.pendingProps,f=o.revealOrder,d=o.tail;o=o.children;var b=nt.current,A=(b&2)!==0;if(A?(b=b&1|2,n.flags|=128):b&=1,P(nt,b),pt(e,n,o,l),o=ze?va:0,!A&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dp(e,l,n);else if(e.tag===19)dp(e,l,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(l=n.child,f=null;l!==null;)e=l.alternate,e!==null&&dr(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),Uf(n,!1,f,l,d,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&dr(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}Uf(n,!0,l,null,d,o);break;case"together":Uf(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Zn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Ti|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Ps(e,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(a(153));if(n.child!==null){for(e=n.child,l=qn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=qn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function qf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&sr(e)))}function xw(e,n,l){switch(n.tag){case 3:te(n,n.stateNode.containerInfo),bi(n,lt,e.memoizedState.cache),ss();break;case 27:case 5:we(n);break;case 4:te(n,n.stateNode.containerInfo);break;case 10:bi(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,df(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Ei(n),n.flags|=128,null):(l&n.child.childLanes)!==0?fp(e,n,l):(Ei(n),e=Zn(e,n,l),e!==null?e.sibling:null);Ei(n);break;case 19:var f=(e.flags&128)!==0;if(o=(l&n.childLanes)!==0,o||(Ps(e,n,l,!1),o=(l&n.childLanes)!==0),f){if(o)return hp(e,n,l);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),P(nt,nt.current),o)break;return null;case 22:return n.lanes=0,lp(e,n,l,n.pendingProps);case 24:bi(n,lt,e.memoizedState.cache)}return Zn(e,n,l)}function mp(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)ot=!0;else{if(!qf(e,l)&&(n.flags&128)===0)return ot=!1,xw(e,n,l);ot=(e.flags&131072)!==0}else ot=!1,ze&&(n.flags&1048576)!==0&&Km(n,va,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=rs(n.elementType),n.type=e,typeof e=="function")Xu(e)?(o=ds(e,o),n.tag=1,n=cp(null,n,e,o,l)):(n.tag=0,n=jf(null,n,e,o,l));else{if(e!=null){var f=e.$$typeof;if(f===T){n.tag=11,n=np(null,n,e,o,l);break e}else if(f===R){n.tag=14,n=ip(null,n,e,o,l);break e}}throw n=k(e)||e,Error(a(306,n,""))}}return n;case 0:return jf(e,n,n.type,n.pendingProps,l);case 1:return o=n.type,f=ds(o,n.pendingProps),cp(e,n,o,f,l);case 3:e:{if(te(n,n.stateNode.containerInfo),e===null)throw Error(a(387));o=n.pendingProps;var d=n.memoizedState;f=d.element,of(e,n),Aa(n,o,null,l);var b=n.memoizedState;if(o=b.cache,bi(n,lt,o),o!==d.cache&&ef(n,[lt],l,!0),Na(),o=b.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=up(e,n,o,l);break e}else if(o!==f){f=en(Error(a(424)),n),ba(f),n=up(e,n,o,l);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Xe=an(e.firstChild),mt=n,ze=!0,yi=null,sn=!0,l=lg(n,null,o,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ss(),o===f){n=Zn(e,n,l);break e}pt(e,n,o,l)}n=n.child}return n;case 26:return Er(e,n),e===null?(l=Ny(n.type,null,n.pendingProps,null))?n.memoizedState=l:ze||(l=n.type,e=n.pendingProps,o=Ur(he.current).createElement(l),o[ft]=n,o[vt]=e,yt(o,l,e),st(o),n.stateNode=o):n.memoizedState=Ny(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return we(n),e===null&&ze&&(o=n.stateNode=xy(n.type,n.pendingProps,he.current),mt=n,sn=!0,f=Xe,Di(n.type)?(Sd=f,Xe=an(o.firstChild)):Xe=f),pt(e,n,n.pendingProps.children,l),Er(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&ze&&((f=o=Xe)&&(o=Ww(o,n.type,n.pendingProps,sn),o!==null?(n.stateNode=o,mt=n,Xe=an(o.firstChild),sn=!1,f=!0):f=!1),f||vi(n)),we(n),f=n.type,d=n.pendingProps,b=e!==null?e.memoizedProps:null,o=d.children,gd(f,d)?o=null:b!==null&&gd(f,b)&&(n.flags|=32),n.memoizedState!==null&&(f=mf(e,n,hw,null,null,l),Ka._currentValue=f),Er(e,n),pt(e,n,o,l),n.child;case 6:return e===null&&ze&&((e=l=Xe)&&(l=Pw(l,n.pendingProps,sn),l!==null?(n.stateNode=l,mt=n,Xe=null,e=!0):e=!1),e||vi(n)),null;case 13:return fp(e,n,l);case 4:return te(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=us(n,null,o,l):pt(e,n,o,l),n.child;case 11:return np(e,n,n.type,n.pendingProps,l);case 7:return pt(e,n,n.pendingProps,l),n.child;case 8:return pt(e,n,n.pendingProps.children,l),n.child;case 12:return pt(e,n,n.pendingProps.children,l),n.child;case 10:return o=n.pendingProps,bi(n,n.type,o.value),pt(e,n,o.children,l),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,as(n),f=gt(f),o=o(f),n.flags|=1,pt(e,n,o,l),n.child;case 14:return ip(e,n,n.type,n.pendingProps,l);case 15:return sp(e,n,n.type,n.pendingProps,l);case 19:return hp(e,n,l);case 31:return ww(e,n,l);case 22:return lp(e,n,l,n.pendingProps);case 24:return as(n),o=gt(lt),e===null?(f=sf(),f===null&&(f=Ye,d=tf(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=l),f=d),n.memoizedState={parent:o,cache:f},af(n),bi(n,lt,f)):((e.lanes&l)!==0&&(of(e,n),Aa(n,null,null,l),Na()),f=e.memoizedState,d=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),bi(n,lt,o)):(o=d.cache,bi(n,lt,o),o!==f.cache&&ef(n,[lt],l,!0))),pt(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function In(e){e.flags|=4}function Vf(e,n,l,o,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(qp())e.flags|=8192;else throw cs=rr,lf}else e.flags&=-16777217}function gp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Oy(n))if(qp())e.flags|=8192;else throw cs=rr,lf}function Nr(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Do():536870912,e.lanes|=n,fl|=n)}function Da(e,n){if(!ze)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ke(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,o=0;if(n)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=l,n}function Ew(e,n,l){var o=n.pendingProps;switch(Qu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(n),null;case 1:return Ke(n),null;case 3:return l=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Gn(lt),de(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ws(n)?In(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Fu())),Ke(n),null;case 26:var f=n.type,d=n.memoizedState;return e===null?(In(n),d!==null?(Ke(n),gp(n,d)):(Ke(n),Vf(n,f,null,o,l))):d?d!==e.memoizedState?(In(n),Ke(n),gp(n,d)):(Ke(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&In(n),Ke(n),Vf(n,f,e,o,l)),null;case 27:if(Se(n),l=he.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&In(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return Ke(n),null}e=ee.current,Ws(n)?Im(n):(e=xy(f,o,l),n.stateNode=e,In(n))}return Ke(n),null;case 5:if(Se(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&In(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return Ke(n),null}if(d=ee.current,Ws(n))Im(n);else{var b=Ur(he.current);switch(d){case 1:d=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:d=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":d=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":d=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":d=b.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?b.createElement(f,{is:o.is}):b.createElement(f)}}d[ft]=n,d[vt]=o;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)d.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=d;e:switch(yt(d,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&In(n)}}return Ke(n),Vf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&In(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(a(166));if(e=he.current,Ws(n)){if(e=n.stateNode,l=n.memoizedProps,o=null,f=mt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[ft]=n,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||fy(e.nodeValue,l)),e||vi(n,!0)}else e=Ur(e).createTextNode(o),e[ft]=n,n.stateNode=e}return Ke(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(o=Ws(n),l!==null){if(e===null){if(!o)throw Error(a(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[ft]=n}else ss(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),e=!1}else l=Fu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(Yt(n),n):(Yt(n),null);if((n.flags&128)!==0)throw Error(a(558))}return Ke(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Ws(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[ft]=n}else ss(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ke(n),f=!1}else f=Fu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(Yt(n),n):(Yt(n),null)}return Yt(n),(n.flags&128)!==0?(n.lanes=l,n):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==f&&(o.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Nr(n,n.updateQueue),Ke(n),null);case 4:return de(),e===null&&ud(n.stateNode.containerInfo),Ke(n),null;case 10:return Gn(n.type),Ke(n),null;case 19:if($(nt),o=n.memoizedState,o===null)return Ke(n),null;if(f=(n.flags&128)!==0,d=o.rendering,d===null)if(f)Da(o,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=dr(e),d!==null){for(n.flags|=128,Da(o,!1),e=d.updateQueue,n.updateQueue=e,Nr(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)Ym(l,e),l=l.sibling;return P(nt,nt.current&1|2),ze&&Vn(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&tt()>Or&&(n.flags|=128,f=!0,Da(o,!1),n.lanes=4194304)}else{if(!f)if(e=dr(d),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Nr(n,e),Da(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!ze)return Ke(n),null}else 2*tt()-o.renderingStartTime>Or&&l!==536870912&&(n.flags|=128,f=!0,Da(o,!1),n.lanes=4194304);o.isBackwards?(d.sibling=n.child,n.child=d):(e=o.last,e!==null?e.sibling=d:n.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=tt(),e.sibling=null,l=nt.current,P(nt,f?l&1|2:l&1),ze&&Vn(n,o.treeForkCount),e):(Ke(n),null);case 22:case 23:return Yt(n),ff(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(l&536870912)!==0&&(n.flags&128)===0&&(Ke(n),n.subtreeFlags&6&&(n.flags|=8192)):Ke(n),l=n.updateQueue,l!==null&&Nr(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==l&&(n.flags|=2048),e!==null&&$(os),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Gn(lt),Ke(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function _w(e,n){switch(Qu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Gn(lt),de(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Se(n),null;case 31:if(n.memoizedState!==null){if(Yt(n),n.alternate===null)throw Error(a(340));ss()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Yt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(a(340));ss()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return $(nt),null;case 4:return de(),null;case 10:return Gn(n.type),null;case 22:case 23:return Yt(n),ff(),e!==null&&$(os),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Gn(lt),null;case 25:return null;default:return null}}function pp(e,n){switch(Qu(n),n.tag){case 3:Gn(lt),de();break;case 26:case 27:case 5:Se(n);break;case 4:de();break;case 31:n.memoizedState!==null&&Yt(n);break;case 13:Yt(n);break;case 19:$(nt);break;case 10:Gn(n.type);break;case 22:case 23:Yt(n),ff(),e!==null&&$(os);break;case 24:Gn(lt)}}function La(e,n){try{var l=n.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&e)===e){o=void 0;var d=l.create,b=l.inst;o=d(),b.destroy=o}l=l.next}while(l!==f)}}catch(A){He(n,n.return,A)}}function Ni(e,n,l){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var d=f.next;o=d;do{if((o.tag&e)===e){var b=o.inst,A=b.destroy;if(A!==void 0){b.destroy=void 0,f=n;var H=l,Q=A;try{Q()}catch(ie){He(f,H,ie)}}}o=o.next}while(o!==d)}}catch(ie){He(n,n.return,ie)}}function yp(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{og(n,l)}catch(o){He(e,e.return,o)}}}function vp(e,n,l){l.props=ds(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){He(e,n,o)}}function ja(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof l=="function"?e.refCleanup=l(o):l.current=o}}catch(f){He(e,n,f)}}function Mn(e,n){var l=e.ref,o=e.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(f){He(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){He(e,n,f)}else l.current=null}function bp(e){var n=e.type,l=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break e;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(f){He(e,e.return,f)}}function Yf(e,n,l){try{var o=e.stateNode;Kw(o,e.type,l,n),o[vt]=n}catch(f){He(e,e.return,f)}}function Sp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Di(e.type)||e.tag===4}function Gf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Di(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xf(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=$n));else if(o!==4&&(o===27&&Di(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(Xf(e,n,l),e=e.sibling;e!==null;)Xf(e,n,l),e=e.sibling}function Ar(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(o!==4&&(o===27&&Di(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Ar(e,n,l),e=e.sibling;e!==null;)Ar(e,n,l),e=e.sibling}function wp(e){var n=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);yt(n,o,l),n[ft]=e,n[vt]=l}catch(d){He(e,e.return,d)}}var Qn=!1,rt=!1,Kf=!1,xp=typeof WeakSet=="function"?WeakSet:Set,ht=null;function Nw(e,n){if(e=e.containerInfo,hd=Zr,e=jm(e),Hu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var f=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var b=0,A=-1,H=-1,Q=0,ie=0,oe=e,F=null;t:for(;;){for(var W;oe!==l||f!==0&&oe.nodeType!==3||(A=b+f),oe!==d||o!==0&&oe.nodeType!==3||(H=b+o),oe.nodeType===3&&(b+=oe.nodeValue.length),(W=oe.firstChild)!==null;)F=oe,oe=W;for(;;){if(oe===e)break t;if(F===l&&++Q===f&&(A=b),F===d&&++ie===o&&(H=b),(W=oe.nextSibling)!==null)break;oe=F,F=oe.parentNode}oe=W}l=A===-1||H===-1?null:{start:A,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(md={focusedElem:e,selectionRange:l},Zr=!1,ht=n;ht!==null;)if(n=ht,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ht=e;else for(;ht!==null;){switch(n=ht,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)f=e[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=n,f=d.memoizedProps,d=d.memoizedState,o=l.stateNode;try{var ge=ds(l.type,f);e=o.getSnapshotBeforeUpdate(ge,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(be){He(l,l.return,be)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)yd(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":yd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=n.sibling,e!==null){e.return=n.return,ht=e;break}ht=n.return}}function Ep(e,n,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:Fn(e,l),o&4&&La(5,l);break;case 1:if(Fn(e,l),o&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(b){He(l,l.return,b)}else{var f=ds(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){He(l,l.return,b)}}o&64&&yp(l),o&512&&ja(l,l.return);break;case 3:if(Fn(e,l),o&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{og(e,n)}catch(b){He(l,l.return,b)}}break;case 27:n===null&&o&4&&wp(l);case 26:case 5:Fn(e,l),n===null&&o&4&&bp(l),o&512&&ja(l,l.return);break;case 12:Fn(e,l);break;case 31:Fn(e,l),o&4&&Ap(e,l);break;case 13:Fn(e,l),o&4&&Tp(e,l),o&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=jw.bind(null,l),ex(e,l))));break;case 22:if(o=l.memoizedState!==null||Qn,!o){n=n!==null&&n.memoizedState!==null||rt,f=Qn;var d=rt;Qn=o,(rt=n)&&!d?Wn(e,l,(l.subtreeFlags&8772)!==0):Fn(e,l),Qn=f,rt=d}break;case 30:break;default:Fn(e,l)}}function _p(e){var n=e.alternate;n!==null&&(e.alternate=null,_p(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&na(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ze=null,zt=!1;function Jn(e,n,l){for(l=l.child;l!==null;)Np(e,n,l),l=l.sibling}function Np(e,n,l){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Qi,l)}catch{}switch(l.tag){case 26:rt||Mn(l,n),Jn(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:rt||Mn(l,n);var o=Ze,f=zt;Di(l.type)&&(Ze=l.stateNode,zt=!1),Jn(e,n,l),Ya(l.stateNode),Ze=o,zt=f;break;case 5:rt||Mn(l,n);case 6:if(o=Ze,f=zt,Ze=null,Jn(e,n,l),Ze=o,zt=f,Ze!==null)if(zt)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(l.stateNode)}catch(d){He(l,n,d)}else try{Ze.removeChild(l.stateNode)}catch(d){He(l,n,d)}break;case 18:Ze!==null&&(zt?(e=Ze,yy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),bl(e)):yy(Ze,l.stateNode));break;case 4:o=Ze,f=zt,Ze=l.stateNode.containerInfo,zt=!0,Jn(e,n,l),Ze=o,zt=f;break;case 0:case 11:case 14:case 15:Ni(2,l,n),rt||Ni(4,l,n),Jn(e,n,l);break;case 1:rt||(Mn(l,n),o=l.stateNode,typeof o.componentWillUnmount=="function"&&vp(l,n,o)),Jn(e,n,l);break;case 21:Jn(e,n,l);break;case 22:rt=(o=rt)||l.memoizedState!==null,Jn(e,n,l),rt=o;break;default:Jn(e,n,l)}}function Ap(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{bl(e)}catch(l){He(n,n.return,l)}}}function Tp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{bl(e)}catch(l){He(n,n.return,l)}}function Aw(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new xp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new xp),n;default:throw Error(a(435,e.tag))}}function Tr(e,n){var l=Aw(e);n.forEach(function(o){if(!l.has(o)){l.add(o);var f=Rw.bind(null,e,o);o.then(f,f)}})}function Dt(e,n){var l=n.deletions;if(l!==null)for(var o=0;o<l.length;o++){var f=l[o],d=e,b=n,A=b;e:for(;A!==null;){switch(A.tag){case 27:if(Di(A.type)){Ze=A.stateNode,zt=!1;break e}break;case 5:Ze=A.stateNode,zt=!1;break e;case 3:case 4:Ze=A.stateNode.containerInfo,zt=!0;break e}A=A.return}if(Ze===null)throw Error(a(160));Np(d,b,f),Ze=null,zt=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Mp(n,e),n=n.sibling}var hn=null;function Mp(e,n){var l=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dt(n,e),Lt(e),o&4&&(Ni(3,e,e.return),La(3,e),Ni(5,e,e.return));break;case 1:Dt(n,e),Lt(e),o&512&&(rt||l===null||Mn(l,l.return)),o&64&&Qn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var f=hn;if(Dt(n,e),Lt(e),o&512&&(rt||l===null||Mn(l,l.return)),o&4){var d=l!==null?l.memoizedState:null;if(o=e.memoizedState,l===null)if(o===null)if(e.stateNode===null){e:{o=e.type,l=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":d=f.getElementsByTagName("title")[0],(!d||d[Wi]||d[ft]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(o),f.head.insertBefore(d,f.querySelector("head > title"))),yt(d,o,l),d[ft]=e,st(d),o=d;break e;case"link":var b=My("link","href",f).get(o+(l.href||""));if(b){for(var A=0;A<b.length;A++)if(d=b[A],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(A,1);break t}}d=f.createElement(o),yt(d,o,l),f.head.appendChild(d);break;case"meta":if(b=My("meta","content",f).get(o+(l.content||""))){for(A=0;A<b.length;A++)if(d=b[A],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(A,1);break t}}d=f.createElement(o),yt(d,o,l),f.head.appendChild(d);break;default:throw Error(a(468,o))}d[ft]=e,st(d),o=d}e.stateNode=o}else Cy(f,e.type,e.stateNode);else e.stateNode=Ty(f,o,e.memoizedProps);else d!==o?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,o===null?Cy(f,e.type,e.stateNode):Ty(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Yf(e,e.memoizedProps,l.memoizedProps)}break;case 27:Dt(n,e),Lt(e),o&512&&(rt||l===null||Mn(l,l.return)),l!==null&&o&4&&Yf(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Dt(n,e),Lt(e),o&512&&(rt||l===null||Mn(l,l.return)),e.flags&32){f=e.stateNode;try{Vs(f,"")}catch(ge){He(e,e.return,ge)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,Yf(e,f,l!==null?l.memoizedProps:f)),o&1024&&(Kf=!0);break;case 6:if(Dt(n,e),Lt(e),o&4){if(e.stateNode===null)throw Error(a(162));o=e.memoizedProps,l=e.stateNode;try{l.nodeValue=o}catch(ge){He(e,e.return,ge)}}break;case 3:if(Yr=null,f=hn,hn=qr(n.containerInfo),Dt(n,e),hn=f,Lt(e),o&4&&l!==null&&l.memoizedState.isDehydrated)try{bl(n.containerInfo)}catch(ge){He(e,e.return,ge)}Kf&&(Kf=!1,Cp(e));break;case 4:o=hn,hn=qr(e.stateNode.containerInfo),Dt(n,e),Lt(e),hn=o;break;case 12:Dt(n,e),Lt(e);break;case 31:Dt(n,e),Lt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Tr(e,o)));break;case 13:Dt(n,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Cr=tt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Tr(e,o)));break;case 22:f=e.memoizedState!==null;var H=l!==null&&l.memoizedState!==null,Q=Qn,ie=rt;if(Qn=Q||f,rt=ie||H,Dt(n,e),rt=ie,Qn=Q,Lt(e),o&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(l===null||H||Qn||rt||hs(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){H=l=n;try{if(d=H.stateNode,f)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{A=H.stateNode;var oe=H.memoizedProps.style,F=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;A.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(ge){He(H,H.return,ge)}}}else if(n.tag===6){if(l===null){H=n;try{H.stateNode.nodeValue=f?"":H.memoizedProps}catch(ge){He(H,H.return,ge)}}}else if(n.tag===18){if(l===null){H=n;try{var W=H.stateNode;f?vy(W,!0):vy(H.stateNode,!1)}catch(ge){He(H,H.return,ge)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,Tr(e,l))));break;case 19:Dt(n,e),Lt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Tr(e,o)));break;case 30:break;case 21:break;default:Dt(n,e),Lt(e)}}function Lt(e){var n=e.flags;if(n&2){try{for(var l,o=e.return;o!==null;){if(Sp(o)){l=o;break}o=o.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var f=l.stateNode,d=Gf(e);Ar(e,d,f);break;case 5:var b=l.stateNode;l.flags&32&&(Vs(b,""),l.flags&=-33);var A=Gf(e);Ar(e,A,b);break;case 3:case 4:var H=l.stateNode.containerInfo,Q=Gf(e);Xf(e,Q,H);break;default:throw Error(a(161))}}catch(ie){He(e,e.return,ie)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Cp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Cp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Fn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Ep(e,n.alternate,n),n=n.sibling}function hs(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Ni(4,n,n.return),hs(n);break;case 1:Mn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&vp(n,n.return,l),hs(n);break;case 27:Ya(n.stateNode);case 26:case 5:Mn(n,n.return),hs(n);break;case 22:n.memoizedState===null&&hs(n);break;case 30:hs(n);break;default:hs(n)}e=e.sibling}}function Wn(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,d=n,b=d.flags;switch(d.tag){case 0:case 11:case 15:Wn(f,d,l),La(4,d);break;case 1:if(Wn(f,d,l),o=d,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(Q){He(o,o.return,Q)}if(o=d,f=o.updateQueue,f!==null){var A=o.stateNode;try{var H=f.shared.hiddenCallbacks;if(H!==null)for(f.shared.hiddenCallbacks=null,f=0;f<H.length;f++)ag(H[f],A)}catch(Q){He(o,o.return,Q)}}l&&b&64&&yp(d),ja(d,d.return);break;case 27:wp(d);case 26:case 5:Wn(f,d,l),l&&o===null&&b&4&&bp(d),ja(d,d.return);break;case 12:Wn(f,d,l);break;case 31:Wn(f,d,l),l&&b&4&&Ap(f,d);break;case 13:Wn(f,d,l),l&&b&4&&Tp(f,d);break;case 22:d.memoizedState===null&&Wn(f,d,l),ja(d,d.return);break;case 30:break;default:Wn(f,d,l)}n=n.sibling}}function Zf(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Sa(l))}function If(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Sa(e))}function mn(e,n,l,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Op(e,n,l,o),n=n.sibling}function Op(e,n,l,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:mn(e,n,l,o),f&2048&&La(9,n);break;case 1:mn(e,n,l,o);break;case 3:mn(e,n,l,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Sa(e)));break;case 12:if(f&2048){mn(e,n,l,o),e=n.stateNode;try{var d=n.memoizedProps,b=d.id,A=d.onPostCommit;typeof A=="function"&&A(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(H){He(n,n.return,H)}}else mn(e,n,l,o);break;case 31:mn(e,n,l,o);break;case 13:mn(e,n,l,o);break;case 23:break;case 22:d=n.stateNode,b=n.alternate,n.memoizedState!==null?d._visibility&2?mn(e,n,l,o):Ra(e,n):d._visibility&2?mn(e,n,l,o):(d._visibility|=2,rl(e,n,l,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&Zf(b,n);break;case 24:mn(e,n,l,o),f&2048&&If(n.alternate,n);break;default:mn(e,n,l,o)}}function rl(e,n,l,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,b=n,A=l,H=o,Q=b.flags;switch(b.tag){case 0:case 11:case 15:rl(d,b,A,H,f),La(8,b);break;case 23:break;case 22:var ie=b.stateNode;b.memoizedState!==null?ie._visibility&2?rl(d,b,A,H,f):Ra(d,b):(ie._visibility|=2,rl(d,b,A,H,f)),f&&Q&2048&&Zf(b.alternate,b);break;case 24:rl(d,b,A,H,f),f&&Q&2048&&If(b.alternate,b);break;default:rl(d,b,A,H,f)}n=n.sibling}}function Ra(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,o=n,f=o.flags;switch(o.tag){case 22:Ra(l,o),f&2048&&Zf(o.alternate,o);break;case 24:Ra(l,o),f&2048&&If(o.alternate,o);break;default:Ra(l,o)}n=n.sibling}}var ka=8192;function cl(e,n,l){if(e.subtreeFlags&ka)for(e=e.child;e!==null;)zp(e,n,l),e=e.sibling}function zp(e,n,l){switch(e.tag){case 26:cl(e,n,l),e.flags&ka&&e.memoizedState!==null&&dx(l,hn,e.memoizedState,e.memoizedProps);break;case 5:cl(e,n,l);break;case 3:case 4:var o=hn;hn=qr(e.stateNode.containerInfo),cl(e,n,l),hn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=ka,ka=16777216,cl(e,n,l),ka=o):cl(e,n,l));break;default:cl(e,n,l)}}function Dp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Ba(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];ht=o,jp(o,e)}Dp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lp(e),e=e.sibling}function Lp(e){switch(e.tag){case 0:case 11:case 15:Ba(e),e.flags&2048&&Ni(9,e,e.return);break;case 3:Ba(e);break;case 12:Ba(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Mr(e)):Ba(e);break;default:Ba(e)}}function Mr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];ht=o,jp(o,e)}Dp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Ni(8,n,n.return),Mr(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Mr(n));break;default:Mr(n)}e=e.sibling}}function jp(e,n){for(;ht!==null;){var l=ht;switch(l.tag){case 0:case 11:case 15:Ni(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Sa(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,ht=o;else e:for(l=e;ht!==null;){o=ht;var f=o.sibling,d=o.return;if(_p(o),o===l){ht=null;break e}if(f!==null){f.return=d,ht=f;break e}ht=d}}}var Tw={getCacheForType:function(e){var n=gt(lt),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return gt(lt).controller.signal}},Mw=typeof WeakMap=="function"?WeakMap:Map,Re=0,Ye=null,Te=null,Ce=0,Be=0,Gt=null,Ai=!1,ul=!1,Qf=!1,Pn=0,et=0,Ti=0,ms=0,Jf=0,Xt=0,fl=0,Ha=null,jt=null,Ff=!1,Cr=0,Rp=0,Or=1/0,zr=null,Mi=null,dt=0,Ci=null,dl=null,ei=0,Wf=0,Pf=null,kp=null,$a=0,ed=null;function Kt(){return(Re&2)!==0&&Ce!==0?Ce&-Ce:O.T!==null?ad():ko()}function Bp(){if(Xt===0)if((Ce&536870912)===0||ze){var e=js;js<<=1,(js&3932160)===0&&(js=262144),Xt=e}else Xt=536870912;return e=Vt.current,e!==null&&(e.flags|=32),Xt}function Rt(e,n,l){(e===Ye&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(hl(e,0),Oi(e,Ce,Xt,!1)),Fi(e,l),((Re&2)===0||e!==Ye)&&(e===Ye&&((Re&2)===0&&(ms|=l),et===4&&Oi(e,Ce,Xt,!1)),Cn(e))}function Hp(e,n,l){if((Re&6)!==0)throw Error(a(327));var o=!l&&(n&127)===0&&(n&e.expiredLanes)===0||Ji(e,n),f=o?zw(e,n):nd(e,n,!0),d=o;do{if(f===0){ul&&!o&&Oi(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!Cw(l)){f=nd(e,n,!1),d=!1;continue}if(f===2){if(d=n,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var A=e;f=Ha;var H=A.current.memoizedState.isDehydrated;if(H&&(hl(A,b).flags|=256),b=nd(A,b,!1),b!==2){if(Qf&&!H){A.errorRecoveryDisabledLanes|=d,ms|=d,f=4;break e}d=jt,jt=f,d!==null&&(jt===null?jt=d:jt.push.apply(jt,d))}f=b}if(d=!1,f!==2)continue}}if(f===1){hl(e,0),Oi(e,n,0,!0);break}e:{switch(o=e,d=f,d){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:Oi(o,n,Xt,!Ai);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(f=Cr+300-tt(),10<f)){if(Oi(o,n,Xt,!Ai),ks(o,0,!0)!==0)break e;ei=n,o.timeoutHandle=gy($p.bind(null,o,l,jt,zr,Ff,n,Xt,ms,fl,Ai,d,"Throttled",-0,0),f);break e}$p(o,l,jt,zr,Ff,n,Xt,ms,fl,Ai,d,null,-0,0)}}break}while(!0);Cn(e)}function $p(e,n,l,o,f,d,b,A,H,Q,ie,oe,F,W){if(e.timeoutHandle=-1,oe=n.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$n},zp(n,d,oe);var ge=(d&62914560)===d?Cr-tt():(d&4194048)===d?Rp-tt():0;if(ge=hx(oe,ge),ge!==null){ei=d,e.cancelPendingCommit=ge(Zp.bind(null,e,n,d,l,o,f,b,A,H,ie,oe,null,F,W)),Oi(e,d,b,!Q);return}}Zp(e,n,d,l,o,f,b,A,H)}function Cw(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var f=l[o],d=f.getSnapshot;f=f.value;try{if(!Ut(d(),f))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Oi(e,n,l,o){n&=~Jf,n&=~ms,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var d=31-xt(f),b=1<<d;o[d]=-1,f&=~b}l!==0&&Lo(e,l,n)}function Dr(){return(Re&6)===0?(Ua(0),!1):!0}function td(){if(Te!==null){if(Be===0)var e=Te.return;else e=Te,Yn=ls=null,yf(e),il=null,xa=0,e=Te;for(;e!==null;)pp(e.alternate,e),e=e.return;Te=null}}function hl(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Qw(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ei=0,td(),Ye=e,Te=l=qn(e.current,null),Ce=n,Be=0,Gt=null,Ai=!1,ul=Ji(e,n),Qf=!1,fl=Xt=Jf=ms=Ti=et=0,jt=Ha=null,Ff=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-xt(o),d=1<<f;n|=e[f],o&=~d}return Pn=n,Po(),l}function Up(e,n){Ne=null,O.H=Oa,n===nl||n===or?(n=ng(),Be=3):n===lf?(n=ng(),Be=4):Be=n===Lf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Gt=n,Te===null&&(et=1,wr(e,en(n,e.current)))}function qp(){var e=Vt.current;return e===null?!0:(Ce&4194048)===Ce?ln===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===ln:!1}function Vp(){var e=O.H;return O.H=Oa,e===null?Oa:e}function Yp(){var e=O.A;return O.A=Tw,e}function Lr(){et=4,Ai||(Ce&4194048)!==Ce&&Vt.current!==null||(ul=!0),(Ti&134217727)===0&&(ms&134217727)===0||Ye===null||Oi(Ye,Ce,Xt,!1)}function nd(e,n,l){var o=Re;Re|=2;var f=Vp(),d=Yp();(Ye!==e||Ce!==n)&&(zr=null,hl(e,n)),n=!1;var b=et;e:do try{if(Be!==0&&Te!==null){var A=Te,H=Gt;switch(Be){case 8:td(),b=6;break e;case 3:case 2:case 9:case 6:Vt.current===null&&(n=!0);var Q=Be;if(Be=0,Gt=null,ml(e,A,H,Q),l&&ul){b=0;break e}break;default:Q=Be,Be=0,Gt=null,ml(e,A,H,Q)}}Ow(),b=et;break}catch(ie){Up(e,ie)}while(!0);return n&&e.shellSuspendCounter++,Yn=ls=null,Re=o,O.H=f,O.A=d,Te===null&&(Ye=null,Ce=0,Po()),b}function Ow(){for(;Te!==null;)Gp(Te)}function zw(e,n){var l=Re;Re|=2;var o=Vp(),f=Yp();Ye!==e||Ce!==n?(zr=null,Or=tt()+500,hl(e,n)):ul=Ji(e,n);e:do try{if(Be!==0&&Te!==null){n=Te;var d=Gt;t:switch(Be){case 1:Be=0,Gt=null,ml(e,n,d,1);break;case 2:case 9:if(eg(d)){Be=0,Gt=null,Xp(n);break}n=function(){Be!==2&&Be!==9||Ye!==e||(Be=7),Cn(e)},d.then(n,n);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:eg(d)?(Be=0,Gt=null,Xp(n)):(Be=0,Gt=null,ml(e,n,d,7));break;case 5:var b=null;switch(Te.tag){case 26:b=Te.memoizedState;case 5:case 27:var A=Te;if(b?Oy(b):A.stateNode.complete){Be=0,Gt=null;var H=A.sibling;if(H!==null)Te=H;else{var Q=A.return;Q!==null?(Te=Q,jr(Q)):Te=null}break t}}Be=0,Gt=null,ml(e,n,d,5);break;case 6:Be=0,Gt=null,ml(e,n,d,6);break;case 8:td(),et=6;break e;default:throw Error(a(462))}}Dw();break}catch(ie){Up(e,ie)}while(!0);return Yn=ls=null,O.H=o,O.A=f,Re=l,Te!==null?0:(Ye=null,Ce=0,Po(),et)}function Dw(){for(;Te!==null&&!Ii();)Gp(Te)}function Gp(e){var n=mp(e.alternate,e,Pn);e.memoizedProps=e.pendingProps,n===null?jr(e):Te=n}function Xp(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=rp(l,n,n.pendingProps,n.type,void 0,Ce);break;case 11:n=rp(l,n,n.pendingProps,n.type.render,n.ref,Ce);break;case 5:yf(n);default:pp(l,n),n=Te=Ym(n,Pn),n=mp(l,n,Pn)}e.memoizedProps=e.pendingProps,n===null?jr(e):Te=n}function ml(e,n,l,o){Yn=ls=null,yf(n),il=null,xa=0;var f=n.return;try{if(Sw(e,f,n,l,Ce)){et=1,wr(e,en(l,e.current)),Te=null;return}}catch(d){if(f!==null)throw Te=f,d;et=1,wr(e,en(l,e.current)),Te=null;return}n.flags&32768?(ze||o===1?e=!0:ul||(Ce&536870912)!==0?e=!1:(Ai=e=!0,(o===2||o===9||o===3||o===6)&&(o=Vt.current,o!==null&&o.tag===13&&(o.flags|=16384))),Kp(n,e)):jr(n)}function jr(e){var n=e;do{if((n.flags&32768)!==0){Kp(n,Ai);return}e=n.return;var l=Ew(n.alternate,n,Pn);if(l!==null){Te=l;return}if(n=n.sibling,n!==null){Te=n;return}Te=n=e}while(n!==null);et===0&&(et=5)}function Kp(e,n){do{var l=_w(e.alternate,e);if(l!==null){l.flags&=32767,Te=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){Te=e;return}Te=e=l}while(e!==null);et=6,Te=null}function Zp(e,n,l,o,f,d,b,A,H){e.cancelPendingCommit=null;do Rr();while(dt!==0);if((Re&6)!==0)throw Error(a(327));if(n!==null){if(n===e.current)throw Error(a(177));if(d=n.lanes|n.childLanes,d|=Yu,Su(e,l,d,b,A,H),e===Ye&&(Te=Ye=null,Ce=0),dl=n,Ci=e,ei=l,Wf=d,Pf=f,kp=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,kw(Wt,function(){return Wp(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=O.T,O.T=null,f=B.p,B.p=2,b=Re,Re|=4;try{Nw(e,n,l)}finally{Re=b,B.p=f,O.T=o}}dt=1,Ip(),Qp(),Jp()}}function Ip(){if(dt===1){dt=0;var e=Ci,n=dl,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=O.T,O.T=null;var o=B.p;B.p=2;var f=Re;Re|=4;try{Mp(n,e);var d=md,b=jm(e.containerInfo),A=d.focusedElem,H=d.selectionRange;if(b!==A&&A&&A.ownerDocument&&Lm(A.ownerDocument.documentElement,A)){if(H!==null&&Hu(A)){var Q=H.start,ie=H.end;if(ie===void 0&&(ie=Q),"selectionStart"in A)A.selectionStart=Q,A.selectionEnd=Math.min(ie,A.value.length);else{var oe=A.ownerDocument||document,F=oe&&oe.defaultView||window;if(F.getSelection){var W=F.getSelection(),ge=A.textContent.length,be=Math.min(H.start,ge),Ve=H.end===void 0?be:Math.min(H.end,ge);!W.extend&&be>Ve&&(b=Ve,Ve=be,be=b);var V=Dm(A,be),U=Dm(A,Ve);if(V&&U&&(W.rangeCount!==1||W.anchorNode!==V.node||W.anchorOffset!==V.offset||W.focusNode!==U.node||W.focusOffset!==U.offset)){var Z=oe.createRange();Z.setStart(V.node,V.offset),W.removeAllRanges(),be>Ve?(W.addRange(Z),W.extend(U.node,U.offset)):(Z.setEnd(U.node,U.offset),W.addRange(Z))}}}}for(oe=[],W=A;W=W.parentNode;)W.nodeType===1&&oe.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<oe.length;A++){var se=oe[A];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Zr=!!hd,md=hd=null}finally{Re=f,B.p=o,O.T=l}}e.current=n,dt=2}}function Qp(){if(dt===2){dt=0;var e=Ci,n=dl,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=O.T,O.T=null;var o=B.p;B.p=2;var f=Re;Re|=4;try{Ep(e,n.alternate,n)}finally{Re=f,B.p=o,O.T=l}}dt=3}}function Jp(){if(dt===4||dt===3){dt=0,Rn();var e=Ci,n=dl,l=ei,o=kp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?dt=5:(dt=0,dl=Ci=null,Fp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Mi=null),ta(l),n=n.stateNode,wt&&typeof wt.onCommitFiberRoot=="function")try{wt.onCommitFiberRoot(Qi,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=O.T,f=B.p,B.p=2,O.T=null;try{for(var d=e.onRecoverableError,b=0;b<o.length;b++){var A=o[b];d(A.value,{componentStack:A.stack})}}finally{O.T=n,B.p=f}}(ei&3)!==0&&Rr(),Cn(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===ed?$a++:($a=0,ed=e):$a=0,Ua(0)}}function Fp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Sa(n)))}function Rr(){return Ip(),Qp(),Jp(),Wp()}function Wp(){if(dt!==5)return!1;var e=Ci,n=Wf;Wf=0;var l=ta(ei),o=O.T,f=B.p;try{B.p=32>l?32:l,O.T=null,l=Pf,Pf=null;var d=Ci,b=ei;if(dt=0,dl=Ci=null,ei=0,(Re&6)!==0)throw Error(a(331));var A=Re;if(Re|=4,Lp(d.current),Op(d,d.current,b,l),Re=A,Ua(0,!1),wt&&typeof wt.onPostCommitFiberRoot=="function")try{wt.onPostCommitFiberRoot(Qi,d)}catch{}return!0}finally{B.p=f,O.T=o,Fp(e,n)}}function Pp(e,n,l){n=en(l,n),n=Df(e.stateNode,n,2),e=xi(e,n,2),e!==null&&(Fi(e,2),Cn(e))}function He(e,n,l){if(e.tag===3)Pp(e,e,l);else for(;n!==null;){if(n.tag===3){Pp(n,e,l);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Mi===null||!Mi.has(o))){e=en(l,e),l=ep(2),o=xi(n,l,2),o!==null&&(tp(l,o,n,e),Fi(o,2),Cn(o));break}}n=n.return}}function id(e,n,l){var o=e.pingCache;if(o===null){o=e.pingCache=new Mw;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(l)||(Qf=!0,f.add(l),e=Lw.bind(null,e,n,l),n.then(e,e))}function Lw(e,n,l){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ye===e&&(Ce&l)===l&&(et===4||et===3&&(Ce&62914560)===Ce&&300>tt()-Cr?(Re&2)===0&&hl(e,0):Jf|=l,fl===Ce&&(fl=0)),Cn(e)}function ey(e,n){n===0&&(n=Do()),e=ns(e,n),e!==null&&(Fi(e,n),Cn(e))}function jw(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),ey(e,l)}function Rw(e,n){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(n),ey(e,l)}function kw(e,n){return Tt(e,n)}var kr=null,gl=null,sd=!1,Br=!1,ld=!1,zi=0;function Cn(e){e!==gl&&e.next===null&&(gl===null?kr=gl=e:gl=gl.next=e),Br=!0,sd||(sd=!0,Hw())}function Ua(e,n){if(!ld&&Br){ld=!0;do for(var l=!1,o=kr;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var d=0;else{var b=o.suspendedLanes,A=o.pingedLanes;d=(1<<31-xt(42|e)+1)-1,d&=f&~(b&~A),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,sy(o,d))}else d=Ce,d=ks(o,o===Ye?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Ji(o,d)||(l=!0,sy(o,d));o=o.next}while(l);ld=!1}}function Bw(){ty()}function ty(){Br=sd=!1;var e=0;zi!==0&&Iw()&&(e=zi);for(var n=tt(),l=null,o=kr;o!==null;){var f=o.next,d=ny(o,n);d===0?(o.next=null,l===null?kr=f:l.next=f,f===null&&(gl=l)):(l=o,(e!==0||(d&3)!==0)&&(Br=!0)),o=f}dt!==0&&dt!==5||Ua(e),zi!==0&&(zi=0)}function ny(e,n){for(var l=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-xt(d),A=1<<b,H=f[b];H===-1?((A&l)===0||(A&o)!==0)&&(f[b]=bu(A,n)):H<=n&&(e.expiredLanes|=A),d&=~A}if(n=Ye,l=Ce,l=ks(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,l===0||e===n&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Ht(o),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ji(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(o!==null&&Ht(o),ta(l)){case 2:case 8:l=Ft;break;case 32:l=Wt;break;case 268435456:l=Ds;break;default:l=Wt}return o=iy.bind(null,e),l=Tt(l,o),e.callbackPriority=n,e.callbackNode=l,n}return o!==null&&o!==null&&Ht(o),e.callbackPriority=2,e.callbackNode=null,2}function iy(e,n){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Rr()&&e.callbackNode!==l)return null;var o=Ce;return o=ks(e,e===Ye?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Hp(e,o,n),ny(e,tt()),e.callbackNode!=null&&e.callbackNode===l?iy.bind(null,e):null)}function sy(e,n){if(Rr())return null;Hp(e,n,!0)}function Hw(){Jw(function(){(Re&6)!==0?Tt(Jt,Bw):ty()})}function ad(){if(zi===0){var e=el;e===0&&(e=Ls,Ls<<=1,(Ls&261888)===0&&(Ls=256)),zi=e}return zi}function ly(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Xo(""+e)}function ay(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function $w(e,n,l,o,f){if(n==="submit"&&l&&l.stateNode===f){var d=ly((f[vt]||null).action),b=o.submitter;b&&(n=(n=b[vt]||null)?ly(n.formAction):b.getAttribute("formAction"),n!==null&&(d=n,b=null));var A=new Qo("action","action",null,o,f);e.push({event:A,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(zi!==0){var H=b?ay(f,b):new FormData(f);Af(l,{pending:!0,data:H,method:f.method,action:d},null,H)}}else typeof d=="function"&&(A.preventDefault(),H=b?ay(f,b):new FormData(f),Af(l,{pending:!0,data:H,method:f.method,action:d},d,H))},currentTarget:f}]})}}for(var od=0;od<Vu.length;od++){var rd=Vu[od],Uw=rd.toLowerCase(),qw=rd[0].toUpperCase()+rd.slice(1);dn(Uw,"on"+qw)}dn(Bm,"onAnimationEnd"),dn(Hm,"onAnimationIteration"),dn($m,"onAnimationStart"),dn("dblclick","onDoubleClick"),dn("focusin","onFocus"),dn("focusout","onBlur"),dn(iw,"onTransitionRun"),dn(sw,"onTransitionStart"),dn(lw,"onTransitionCancel"),dn(Um,"onTransitionEnd"),hi("onMouseEnter",["mouseout","mouseover"]),hi("onMouseLeave",["mouseout","mouseover"]),hi("onPointerEnter",["pointerout","pointerover"]),hi("onPointerLeave",["pointerout","pointerover"]),Hn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qa="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(" "),Vw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qa));function oy(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var o=e[l],f=o.event;o=o.listeners;e:{var d=void 0;if(n)for(var b=o.length-1;0<=b;b--){var A=o[b],H=A.instance,Q=A.currentTarget;if(A=A.listener,H!==d&&f.isPropagationStopped())break e;d=A,f.currentTarget=Q;try{d(f)}catch(ie){Wo(ie)}f.currentTarget=null,d=H}else for(b=0;b<o.length;b++){if(A=o[b],H=A.instance,Q=A.currentTarget,A=A.listener,H!==d&&f.isPropagationStopped())break e;d=A,f.currentTarget=Q;try{d(f)}catch(ie){Wo(ie)}f.currentTarget=null,d=H}}}}function Me(e,n){var l=n[Bs];l===void 0&&(l=n[Bs]=new Set);var o=e+"__bubble";l.has(o)||(ry(n,e,2,!1),l.add(o))}function cd(e,n,l){var o=0;n&&(o|=4),ry(l,e,o,n)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function ud(e){if(!e[Hr]){e[Hr]=!0,Uo.forEach(function(l){l!=="selectionchange"&&(Vw.has(l)||cd(l,!1,e),cd(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Hr]||(n[Hr]=!0,cd("selectionchange",!1,n))}}function ry(e,n,l,o){switch(By(n)){case 2:var f=px;break;case 8:f=yx;break;default:f=Nd}l=f.bind(null,n,l,e),f=void 0,!Cu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,l,{capture:!0,passive:f}):e.addEventListener(n,l,!0):f!==void 0?e.addEventListener(n,l,{passive:f}):e.addEventListener(n,l,!1)}function fd(e,n,l,o,f){var d=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var A=o.stateNode.containerInfo;if(A===f)break;if(b===4)for(b=o.return;b!==null;){var H=b.tag;if((H===3||H===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;A!==null;){if(b=ci(A),b===null)return;if(H=b.tag,H===5||H===6||H===26||H===27){o=d=b;continue e}A=A.parentNode}}o=o.return}hm(function(){var Q=d,ie=Tu(l),oe=[];e:{var F=qm.get(e);if(F!==void 0){var W=Qo,ge=e;switch(e){case"keypress":if(Zo(l)===0)break e;case"keydown":case"keyup":W=RS;break;case"focusin":ge="focus",W=Lu;break;case"focusout":ge="blur",W=Lu;break;case"beforeblur":case"afterblur":W=Lu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=pm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=ES;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=HS;break;case Bm:case Hm:case $m:W=AS;break;case Um:W=US;break;case"scroll":case"scrollend":W=wS;break;case"wheel":W=VS;break;case"copy":case"cut":case"paste":W=MS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=vm;break;case"toggle":case"beforetoggle":W=GS}var be=(n&4)!==0,Ve=!be&&(e==="scroll"||e==="scrollend"),V=be?F!==null?F+"Capture":null:F;be=[];for(var U=Q,Z;U!==null;){var se=U;if(Z=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||Z===null||V===null||(se=ca(U,V),se!=null&&be.push(Va(U,se,Z))),Ve)break;U=U.return}0<be.length&&(F=new W(F,ge,null,l,ie),oe.push({event:F,listeners:be}))}}if((n&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",W=e==="mouseout"||e==="pointerout",F&&l!==Au&&(ge=l.relatedTarget||l.fromElement)&&(ci(ge)||ge[Bn]))break e;if((W||F)&&(F=ie.window===ie?ie:(F=ie.ownerDocument)?F.defaultView||F.parentWindow:window,W?(ge=l.relatedTarget||l.toElement,W=Q,ge=ge?ci(ge):null,ge!==null&&(Ve=c(ge),be=ge.tag,ge!==Ve||be!==5&&be!==27&&be!==6)&&(ge=null)):(W=null,ge=Q),W!==ge)){if(be=pm,se="onMouseLeave",V="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(be=vm,se="onPointerLeave",V="onPointerEnter",U="pointer"),Ve=W==null?F:fi(W),Z=ge==null?F:fi(ge),F=new be(se,U+"leave",W,l,ie),F.target=Ve,F.relatedTarget=Z,se=null,ci(ie)===Q&&(be=new be(V,U+"enter",ge,l,ie),be.target=Z,be.relatedTarget=Ve,se=be),Ve=se,W&&ge)t:{for(be=Yw,V=W,U=ge,Z=0,se=V;se;se=be(se))Z++;se=0;for(var ve=U;ve;ve=be(ve))se++;for(;0<Z-se;)V=be(V),Z--;for(;0<se-Z;)U=be(U),se--;for(;Z--;){if(V===U||U!==null&&V===U.alternate){be=V;break t}V=be(V),U=be(U)}be=null}else be=null;W!==null&&cy(oe,F,W,be,!1),ge!==null&&Ve!==null&&cy(oe,Ve,ge,be,!0)}}e:{if(F=Q?fi(Q):window,W=F.nodeName&&F.nodeName.toLowerCase(),W==="select"||W==="input"&&F.type==="file")var Le=Am;else if(_m(F))if(Tm)Le=ew;else{Le=WS;var pe=FS}else W=F.nodeName,!W||W.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?Q&&Nu(Q.elementType)&&(Le=Am):Le=PS;if(Le&&(Le=Le(e,Q))){Nm(oe,Le,l,ie);break e}pe&&pe(e,F,Q),e==="focusout"&&Q&&F.type==="number"&&Q.memoizedProps.value!=null&&oa(F,"number",F.value)}switch(pe=Q?fi(Q):window,e){case"focusin":(_m(pe)||pe.contentEditable==="true")&&(Ks=pe,$u=Q,ya=null);break;case"focusout":ya=$u=Ks=null;break;case"mousedown":Uu=!0;break;case"contextmenu":case"mouseup":case"dragend":Uu=!1,Rm(oe,l,ie);break;case"selectionchange":if(nw)break;case"keydown":case"keyup":Rm(oe,l,ie)}var Ae;if(Ru)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Xs?xm(e,l)&&(Oe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Oe="onCompositionStart");Oe&&(bm&&l.locale!=="ko"&&(Xs||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Xs&&(Ae=mm()):(gi=ie,Ou="value"in gi?gi.value:gi.textContent,Xs=!0)),pe=$r(Q,Oe),0<pe.length&&(Oe=new ym(Oe,e,null,l,ie),oe.push({event:Oe,listeners:pe}),Ae?Oe.data=Ae:(Ae=Em(l),Ae!==null&&(Oe.data=Ae)))),(Ae=KS?ZS(e,l):IS(e,l))&&(Oe=$r(Q,"onBeforeInput"),0<Oe.length&&(pe=new ym("onBeforeInput","beforeinput",null,l,ie),oe.push({event:pe,listeners:Oe}),pe.data=Ae)),$w(oe,e,Q,l,ie)}oy(oe,n)})}function Va(e,n,l){return{instance:e,listener:n,currentTarget:l}}function $r(e,n){for(var l=n+"Capture",o=[];e!==null;){var f=e,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=ca(e,l),f!=null&&o.unshift(Va(e,f,d)),f=ca(e,n),f!=null&&o.push(Va(e,f,d))),e.tag===3)return o;e=e.return}return[]}function Yw(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cy(e,n,l,o,f){for(var d=n._reactName,b=[];l!==null&&l!==o;){var A=l,H=A.alternate,Q=A.stateNode;if(A=A.tag,H!==null&&H===o)break;A!==5&&A!==26&&A!==27||Q===null||(H=Q,f?(Q=ca(l,d),Q!=null&&b.unshift(Va(l,Q,H))):f||(Q=ca(l,d),Q!=null&&b.push(Va(l,Q,H)))),l=l.return}b.length!==0&&e.push({event:n,listeners:b})}var Gw=/\r\n?/g,Xw=/\u0000|\uFFFD/g;function uy(e){return(typeof e=="string"?e:""+e).replace(Gw,`
9
- `).replace(Xw,"")}function fy(e,n){return n=uy(n),uy(e)===n}function qe(e,n,l,o,f,d){switch(l){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Vs(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Vs(e,""+o);break;case"className":$s(e,"class",o);break;case"tabIndex":$s(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":$s(e,l,o);break;case"style":fm(e,o,d);break;case"data":if(n!=="object"){$s(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=Xo(""+o),e.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="formAction"?(n!=="input"&&qe(e,n,"name",f.name,f,null),qe(e,n,"formEncType",f.formEncType,f,null),qe(e,n,"formMethod",f.formMethod,f,null),qe(e,n,"formTarget",f.formTarget,f,null)):(qe(e,n,"encType",f.encType,f,null),qe(e,n,"method",f.method,f,null),qe(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=Xo(""+o),e.setAttribute(l,o);break;case"onClick":o!=null&&(e.onclick=$n);break;case"onScroll":o!=null&&Me("scroll",e);break;case"onScrollEnd":o!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}l=Xo(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""+o):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":o===!0?e.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,o):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(l,o):e.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(l):e.setAttribute(l,o);break;case"popover":Me("beforetoggle",e),Me("toggle",e),Hs(e,"popover",o);break;case"xlinkActuate":fn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":fn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":fn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":fn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":fn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":fn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":fn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":fn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":fn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Hs(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=bS.get(l)||l,Hs(e,l,o))}}function dd(e,n,l,o,f,d){switch(l){case"style":fm(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"children":typeof o=="string"?Vs(e,o):(typeof o=="number"||typeof o=="bigint")&&Vs(e,""+o);break;case"onScroll":o!=null&&Me("scroll",e);break;case"onScrollEnd":o!=null&&Me("scrollend",e);break;case"onClick":o!=null&&(e.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qo.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),n=l.slice(2,f?l.length-7:void 0),d=e[vt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(n,d,f),typeof o=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,o,f);break e}l in e?e[l]=o:o===!0?e.setAttribute(l,""):Hs(e,l,o)}}}function yt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var o=!1,f=!1,d;for(d in l)if(l.hasOwnProperty(d)){var b=l[d];if(b!=null)switch(d){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:qe(e,n,d,b,l,null)}}f&&qe(e,n,"srcSet",l.srcSet,l,null),o&&qe(e,n,"src",l.src,l,null);return;case"input":Me("invalid",e);var A=d=b=f=null,H=null,Q=null;for(o in l)if(l.hasOwnProperty(o)){var ie=l[o];if(ie!=null)switch(o){case"name":f=ie;break;case"type":b=ie;break;case"checked":H=ie;break;case"defaultChecked":Q=ie;break;case"value":d=ie;break;case"defaultValue":A=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,n));break;default:qe(e,n,o,ie,l,null)}}qs(e,d,A,H,Q,b,f,!1);return;case"select":Me("invalid",e),o=b=d=null;for(f in l)if(l.hasOwnProperty(f)&&(A=l[f],A!=null))switch(f){case"value":d=A;break;case"defaultValue":b=A;break;case"multiple":o=A;default:qe(e,n,f,A,l,null)}n=d,l=b,e.multiple=!!o,n!=null?mi(e,!!o,n,!1):l!=null&&mi(e,!!o,l,!0);return;case"textarea":Me("invalid",e),d=f=o=null;for(b in l)if(l.hasOwnProperty(b)&&(A=l[b],A!=null))switch(b){case"value":o=A;break;case"defaultValue":f=A;break;case"children":d=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(a(91));break;default:qe(e,n,b,A,l,null)}cm(e,o,f,d);return;case"option":for(H in l)l.hasOwnProperty(H)&&(o=l[H],o!=null)&&(H==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":qe(e,n,H,o,l,null));return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(o=0;o<qa.length;o++)Me(qa[o],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in l)if(l.hasOwnProperty(Q)&&(o=l[Q],o!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:qe(e,n,Q,o,l,null)}return;default:if(Nu(n)){for(ie in l)l.hasOwnProperty(ie)&&(o=l[ie],o!==void 0&&dd(e,n,ie,o,l,void 0));return}}for(A in l)l.hasOwnProperty(A)&&(o=l[A],o!=null&&qe(e,n,A,o,l,null))}function Kw(e,n,l,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,d=null,b=null,A=null,H=null,Q=null,ie=null;for(W in l){var oe=l[W];if(l.hasOwnProperty(W)&&oe!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":H=oe;default:o.hasOwnProperty(W)||qe(e,n,W,null,o,oe)}}for(var F in o){var W=o[F];if(oe=l[F],o.hasOwnProperty(F)&&(W!=null||oe!=null))switch(F){case"type":d=W;break;case"name":f=W;break;case"checked":Q=W;break;case"defaultChecked":ie=W;break;case"value":b=W;break;case"defaultValue":A=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,n));break;default:W!==oe&&qe(e,n,F,W,o,oe)}}aa(e,b,A,H,Q,ie,d,f);return;case"select":W=b=A=F=null;for(d in l)if(H=l[d],l.hasOwnProperty(d)&&H!=null)switch(d){case"value":break;case"multiple":W=H;default:o.hasOwnProperty(d)||qe(e,n,d,null,o,H)}for(f in o)if(d=o[f],H=l[f],o.hasOwnProperty(f)&&(d!=null||H!=null))switch(f){case"value":F=d;break;case"defaultValue":A=d;break;case"multiple":b=d;default:d!==H&&qe(e,n,f,d,o,H)}n=A,l=b,o=W,F!=null?mi(e,!!l,F,!1):!!o!=!!l&&(n!=null?mi(e,!!l,n,!0):mi(e,!!l,l?[]:"",!1));return;case"textarea":W=F=null;for(A in l)if(f=l[A],l.hasOwnProperty(A)&&f!=null&&!o.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:qe(e,n,A,null,o,f)}for(b in o)if(f=o[b],d=l[b],o.hasOwnProperty(b)&&(f!=null||d!=null))switch(b){case"value":F=f;break;case"defaultValue":W=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==d&&qe(e,n,b,f,o,d)}ra(e,F,W);return;case"option":for(var ge in l)F=l[ge],l.hasOwnProperty(ge)&&F!=null&&!o.hasOwnProperty(ge)&&(ge==="selected"?e.selected=!1:qe(e,n,ge,null,o,F));for(H in o)F=o[H],W=l[H],o.hasOwnProperty(H)&&F!==W&&(F!=null||W!=null)&&(H==="selected"?e.selected=F&&typeof F!="function"&&typeof F!="symbol":qe(e,n,H,F,o,W));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var be in l)F=l[be],l.hasOwnProperty(be)&&F!=null&&!o.hasOwnProperty(be)&&qe(e,n,be,null,o,F);for(Q in o)if(F=o[Q],W=l[Q],o.hasOwnProperty(Q)&&F!==W&&(F!=null||W!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(a(137,n));break;default:qe(e,n,Q,F,o,W)}return;default:if(Nu(n)){for(var Ve in l)F=l[Ve],l.hasOwnProperty(Ve)&&F!==void 0&&!o.hasOwnProperty(Ve)&&dd(e,n,Ve,void 0,o,F);for(ie in o)F=o[ie],W=l[ie],!o.hasOwnProperty(ie)||F===W||F===void 0&&W===void 0||dd(e,n,ie,F,o,W);return}}for(var V in l)F=l[V],l.hasOwnProperty(V)&&F!=null&&!o.hasOwnProperty(V)&&qe(e,n,V,null,o,F);for(oe in o)F=o[oe],W=l[oe],!o.hasOwnProperty(oe)||F===W||F==null&&W==null||qe(e,n,oe,F,o,W)}function dy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zw(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var f=l[o],d=f.transferSize,b=f.initiatorType,A=f.duration;if(d&&A&&dy(b)){for(b=0,A=f.responseEnd,o+=1;o<l.length;o++){var H=l[o],Q=H.startTime;if(Q>A)break;var ie=H.transferSize,oe=H.initiatorType;ie&&dy(oe)&&(H=H.responseEnd,b+=ie*(H<A?1:(A-Q)/(H-Q)))}if(--o,n+=8*(d+b)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var hd=null,md=null;function Ur(e){return e.nodeType===9?e:e.ownerDocument}function hy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function my(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function gd(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var pd=null;function Iw(){var e=window.event;return e&&e.type==="popstate"?e===pd?!1:(pd=e,!0):(pd=null,!1)}var gy=typeof setTimeout=="function"?setTimeout:void 0,Qw=typeof clearTimeout=="function"?clearTimeout:void 0,py=typeof Promise=="function"?Promise:void 0,Jw=typeof queueMicrotask=="function"?queueMicrotask:typeof py<"u"?function(e){return py.resolve(null).then(e).catch(Fw)}:gy;function Fw(e){setTimeout(function(){throw e})}function Di(e){return e==="head"}function yy(e,n){var l=n,o=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(o===0){e.removeChild(f),bl(n);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")Ya(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ya(l);for(var d=l.firstChild;d;){var b=d.nextSibling,A=d.nodeName;d[Wi]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=b}}else l==="body"&&Ya(e.ownerDocument.body);l=f}while(l);bl(n)}function vy(e,n){var l=e;e=0;do{var o=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=o}while(l)}function yd(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":yd(l),na(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Ww(e,n,l,o){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Wi])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=an(e.nextSibling),e===null)break}return null}function Pw(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=an(e.nextSibling),e===null))return null;return e}function by(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=an(e.nextSibling),e===null))return null;return e}function vd(e){return e.data==="$?"||e.data==="$~"}function bd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ex(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var o=function(){n(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function an(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Sd=null;function Sy(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return an(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function wy(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function xy(e,n,l){switch(n=Ur(l),e){case"html":if(e=n.documentElement,!e)throw Error(a(452));return e;case"head":if(e=n.head,!e)throw Error(a(453));return e;case"body":if(e=n.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Ya(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);na(e)}var on=new Map,Ey=new Set;function qr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ti=B.d;B.d={f:tx,r:nx,D:ix,C:sx,L:lx,m:ax,X:rx,S:ox,M:cx};function tx(){var e=ti.f(),n=Dr();return e||n}function nx(e){var n=ui(e);n!==null&&n.tag===5&&n.type==="form"?Ug(n):ti.r(e)}var pl=typeof document>"u"?null:document;function _y(e,n,l){var o=pl;if(o&&typeof n=="string"&&n){var f=Ct(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),Ey.has(f)||(Ey.add(f),e={rel:e,crossOrigin:l,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),yt(n,"link",e),st(n),o.head.appendChild(n)))}}function ix(e){ti.D(e),_y("dns-prefetch",e,null)}function sx(e,n){ti.C(e,n),_y("preconnect",e,n)}function lx(e,n,l){ti.L(e,n,l);var o=pl;if(o&&e&&n){var f='link[rel="preload"][as="'+Ct(n)+'"]';n==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+Ct(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+Ct(l.imageSizes)+'"]')):f+='[href="'+Ct(e)+'"]';var d=f;switch(n){case"style":d=yl(e);break;case"script":d=vl(e)}on.has(d)||(e=p({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),on.set(d,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(Ga(d))||n==="script"&&o.querySelector(Xa(d))||(n=o.createElement("link"),yt(n,"link",e),st(n),o.head.appendChild(n)))}}function ax(e,n){ti.m(e,n);var l=pl;if(l&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Ct(o)+'"][href="'+Ct(e)+'"]',d=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=vl(e)}if(!on.has(d)&&(e=p({rel:"modulepreload",href:e},n),on.set(d,e),l.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Xa(d)))return}o=l.createElement("link"),yt(o,"link",e),st(o),l.head.appendChild(o)}}}function ox(e,n,l){ti.S(e,n,l);var o=pl;if(o&&e){var f=di(o).hoistableStyles,d=yl(e);n=n||"default";var b=f.get(d);if(!b){var A={loading:0,preload:null};if(b=o.querySelector(Ga(d)))A.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":n},l),(l=on.get(d))&&wd(e,l);var H=b=o.createElement("link");st(H),yt(H,"link",e),H._p=new Promise(function(Q,ie){H.onload=Q,H.onerror=ie}),H.addEventListener("load",function(){A.loading|=1}),H.addEventListener("error",function(){A.loading|=2}),A.loading|=4,Vr(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:A},f.set(d,b)}}}function rx(e,n){ti.X(e,n);var l=pl;if(l&&e){var o=di(l).hoistableScripts,f=vl(e),d=o.get(f);d||(d=l.querySelector(Xa(f)),d||(e=p({src:e,async:!0},n),(n=on.get(f))&&xd(e,n),d=l.createElement("script"),st(d),yt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function cx(e,n){ti.M(e,n);var l=pl;if(l&&e){var o=di(l).hoistableScripts,f=vl(e),d=o.get(f);d||(d=l.querySelector(Xa(f)),d||(e=p({src:e,async:!0,type:"module"},n),(n=on.get(f))&&xd(e,n),d=l.createElement("script"),st(d),yt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(f,d))}}function Ny(e,n,l,o){var f=(f=he.current)?qr(f):null;if(!f)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=yl(l.href),l=di(f).hoistableStyles,o=l.get(n),o||(o={type:"style",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=yl(l.href);var d=di(f).hoistableStyles,b=d.get(e);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=f.querySelector(Ga(e)))&&!d._p&&(b.instance=d,b.state.loading=5),on.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},on.set(e,l),d||ux(f,e,l,b.state))),n&&o===null)throw Error(a(528,""));return b}if(n&&o!==null)throw Error(a(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=vl(l),l=di(f).hoistableScripts,o=l.get(n),o||(o={type:"script",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function yl(e){return'href="'+Ct(e)+'"'}function Ga(e){return'link[rel="stylesheet"]['+e+"]"}function Ay(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function ux(e,n,l,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),yt(n,"link",l),st(n),e.head.appendChild(n))}function vl(e){return'[src="'+Ct(e)+'"]'}function Xa(e){return"script[async]"+e}function Ty(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Ct(l.href)+'"]');if(o)return n.instance=o,st(o),o;var f=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),st(o),yt(o,"style",f),Vr(o,l.precedence,e),n.instance=o;case"stylesheet":f=yl(l.href);var d=e.querySelector(Ga(f));if(d)return n.state.loading|=4,n.instance=d,st(d),d;o=Ay(l),(f=on.get(f))&&wd(o,f),d=(e.ownerDocument||e).createElement("link"),st(d);var b=d;return b._p=new Promise(function(A,H){b.onload=A,b.onerror=H}),yt(d,"link",o),n.state.loading|=4,Vr(d,l.precedence,e),n.instance=d;case"script":return d=vl(l.src),(f=e.querySelector(Xa(d)))?(n.instance=f,st(f),f):(o=l,(f=on.get(d))&&(o=p({},l),xd(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),st(f),yt(f,"link",o),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Vr(o,l.precedence,e));return n.instance}function Vr(e,n,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,d=f,b=0;b<o.length;b++){var A=o[b];if(A.dataset.precedence===n)d=A;else if(d!==f)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function wd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function xd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Yr=null;function My(e,n,l){if(Yr===null){var o=new Map,f=Yr=new Map;f.set(l,o)}else f=Yr,o=f.get(l),o||(o=new Map,f.set(l,o));if(o.has(e))return o;for(o.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var d=l[f];if(!(d[Wi]||d[ft]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(n)||"";b=e+b;var A=o.get(b);A?A.push(d):o.set(b,[d])}}return o}function Cy(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function fx(e,n,l){if(l===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Oy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function dx(e,n,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=yl(o.href),d=n.querySelector(Ga(f));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Gr.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=d,st(d);return}d=n.ownerDocument||n,o=Ay(o),(f=on.get(f))&&wd(o,f),d=d.createElement("link"),st(d);var b=d;b._p=new Promise(function(A,H){b.onload=A,b.onerror=H}),yt(d,"link",o),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Gr.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var Ed=0;function hx(e,n){return e.stylesheets&&e.count===0&&Kr(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var o=setTimeout(function(){if(e.stylesheets&&Kr(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Ed===0&&(Ed=62500*Zw());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Kr(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Ed?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Gr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Kr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xr=null;function Kr(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xr=new Map,n.forEach(mx,e),Xr=null,Gr.call(e))}function mx(e,n){if(!(n.state.loading&4)){var l=Xr.get(e);if(l)var o=l.get(null);else{l=new Map,Xr.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var b=f[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),o=b)}o&&l.set(null,o)}f=n.instance,b=f.getAttribute("data-precedence"),d=l.get(b)||o,d===o&&l.set(null,f),l.set(b,f),this.count++,o=Gr.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),d?d.parentNode.insertBefore(f,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Ka={$$typeof:x,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function gx(e,n,l,o,f,d,b,A,H){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pl(0),this.hiddenUpdates=Pl(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function zy(e,n,l,o,f,d,b,A,H,Q,ie,oe){return e=new gx(e,n,l,b,H,Q,ie,oe,A),n=1,d===!0&&(n|=24),d=qt(3,null,null,n),e.current=d,d.stateNode=e,n=tf(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:o,isDehydrated:l,cache:n},af(d),e}function Dy(e){return e?(e=Qs,e):Qs}function Ly(e,n,l,o,f,d){f=Dy(f),o.context===null?o.context=f:o.pendingContext=f,o=wi(n),o.payload={element:l},d=d===void 0?null:d,d!==null&&(o.callback=d),l=xi(e,o,n),l!==null&&(Rt(l,e,n),_a(l,e,n))}function jy(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function _d(e,n){jy(e,n),(e=e.alternate)&&jy(e,n)}function Ry(e){if(e.tag===13||e.tag===31){var n=ns(e,67108864);n!==null&&Rt(n,e,67108864),_d(e,67108864)}}function ky(e){if(e.tag===13||e.tag===31){var n=Kt();n=ea(n);var l=ns(e,n);l!==null&&Rt(l,e,n),_d(e,n)}}var Zr=!0;function px(e,n,l,o){var f=O.T;O.T=null;var d=B.p;try{B.p=2,Nd(e,n,l,o)}finally{B.p=d,O.T=f}}function yx(e,n,l,o){var f=O.T;O.T=null;var d=B.p;try{B.p=8,Nd(e,n,l,o)}finally{B.p=d,O.T=f}}function Nd(e,n,l,o){if(Zr){var f=Ad(o);if(f===null)fd(e,n,o,Ir,l),Hy(e,o);else if(bx(f,e,n,l,o))o.stopPropagation();else if(Hy(e,o),n&4&&-1<vx.indexOf(e)){for(;f!==null;){var d=ui(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=kn(d.pendingLanes);if(b!==0){var A=d;for(A.pendingLanes|=2,A.entangledLanes|=2;b;){var H=1<<31-xt(b);A.entanglements[1]|=H,b&=~H}Cn(d),(Re&6)===0&&(Or=tt()+500,Ua(0))}}break;case 31:case 13:A=ns(d,2),A!==null&&Rt(A,d,2),Dr(),_d(d,2)}if(d=Ad(o),d===null&&fd(e,n,o,Ir,l),d===f)break;f=d}f!==null&&o.stopPropagation()}else fd(e,n,o,null,l)}}function Ad(e){return e=Tu(e),Td(e)}var Ir=null;function Td(e){if(Ir=null,e=ci(e),e!==null){var n=c(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=u(n),e!==null)return e;e=null}else if(l===31){if(e=h(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Ir=e,null}function By(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($t()){case Jt:return 2;case Ft:return 8;case Wt:case hu:return 32;case Ds:return 268435456;default:return 32}default:return 32}}var Md=!1,Li=null,ji=null,Ri=null,Za=new Map,Ia=new Map,ki=[],vx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Hy(e,n){switch(e){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":ji=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":Za.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ia.delete(n.pointerId)}}function Qa(e,n,l,o,f,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:l,eventSystemFlags:o,nativeEvent:d,targetContainers:[f]},n!==null&&(n=ui(n),n!==null&&Ry(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function bx(e,n,l,o,f){switch(n){case"focusin":return Li=Qa(Li,e,n,l,o,f),!0;case"dragenter":return ji=Qa(ji,e,n,l,o,f),!0;case"mouseover":return Ri=Qa(Ri,e,n,l,o,f),!0;case"pointerover":var d=f.pointerId;return Za.set(d,Qa(Za.get(d)||null,e,n,l,o,f)),!0;case"gotpointercapture":return d=f.pointerId,Ia.set(d,Qa(Ia.get(d)||null,e,n,l,o,f)),!0}return!1}function $y(e){var n=ci(e.target);if(n!==null){var l=c(n);if(l!==null){if(n=l.tag,n===13){if(n=u(l),n!==null){e.blockedOn=n,Bo(e.priority,function(){ky(l)});return}}else if(n===31){if(n=h(l),n!==null){e.blockedOn=n,Bo(e.priority,function(){ky(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qr(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=Ad(e.nativeEvent);if(l===null){l=e.nativeEvent;var o=new l.constructor(l.type,l);Au=o,l.target.dispatchEvent(o),Au=null}else return n=ui(l),n!==null&&Ry(n),e.blockedOn=l,!1;n.shift()}return!0}function Uy(e,n,l){Qr(e)&&l.delete(n)}function Sx(){Md=!1,Li!==null&&Qr(Li)&&(Li=null),ji!==null&&Qr(ji)&&(ji=null),Ri!==null&&Qr(Ri)&&(Ri=null),Za.forEach(Uy),Ia.forEach(Uy)}function Jr(e,n){e.blockedOn===n&&(e.blockedOn=null,Md||(Md=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Sx)))}var Fr=null;function qy(e){Fr!==e&&(Fr=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Fr===e&&(Fr=null);for(var n=0;n<e.length;n+=3){var l=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(Td(o||l)===null)continue;break}var d=ui(l);d!==null&&(e.splice(n,3),n-=3,Af(d,{pending:!0,data:f,method:l.method,action:o},o,f))}}))}function bl(e){function n(H){return Jr(H,e)}Li!==null&&Jr(Li,e),ji!==null&&Jr(ji,e),Ri!==null&&Jr(Ri,e),Za.forEach(n),Ia.forEach(n);for(var l=0;l<ki.length;l++){var o=ki[l];o.blockedOn===e&&(o.blockedOn=null)}for(;0<ki.length&&(l=ki[0],l.blockedOn===null);)$y(l),l.blockedOn===null&&ki.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var f=l[o],d=l[o+1],b=f[vt]||null;if(typeof d=="function")b||qy(l);else if(b){var A=null;if(d&&d.hasAttribute("formAction")){if(f=d,b=d[vt]||null)A=b.formAction;else if(Td(f)!==null)continue}else A=b.action;typeof A=="function"?l[o+1]=A:(l.splice(o,3),o-=3),qy(l)}}}function Vy(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function Cd(e){this._internalRoot=e}Wr.prototype.render=Cd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(a(409));var l=n.current,o=Kt();Ly(l,o,e,n,null,null)},Wr.prototype.unmount=Cd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Ly(e.current,2,null,e,null,null),Dr(),n[Bn]=null}};function Wr(e){this._internalRoot=e}Wr.prototype.unstable_scheduleHydration=function(e){if(e){var n=ko();e={blockedOn:null,target:e,priority:n};for(var l=0;l<ki.length&&n!==0&&n<ki[l].priority;l++);ki.splice(l,0,e),l===0&&$y(e)}};var Yy=i.version;if(Yy!=="19.2.7")throw Error(a(527,Yy,"19.2.7"));B.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=g(n),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var wx={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pr.isDisabled&&Pr.supportsFiber)try{Qi=Pr.inject(wx),wt=Pr}catch{}}return Fa.createRoot=function(e,n){if(!r(e))throw Error(a(299));var l=!1,o="",f=Jg,d=Fg,b=Wg;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=zy(e,1,!1,null,null,l,o,null,f,d,b,Vy),e[Bn]=n.current,ud(e),new Cd(n)},Fa.hydrateRoot=function(e,n,l){if(!r(e))throw Error(a(299));var o=!1,f="",d=Jg,b=Fg,A=Wg,H=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(A=l.onRecoverableError),l.formState!==void 0&&(H=l.formState)),n=zy(e,1,!0,n,l??null,o,f,H,d,b,A,Vy),n.context=Dy(null),l=n.current,o=Kt(),o=ea(o),f=wi(o),f.callback=null,xi(l,f,o),l=o,n.current.lanes=l,Fi(n,l),Cn(n),e[Bn]=n.current,ud(e),new Wr(n)},Fa.version="19.2.7",Fa}var Py;function Ox(){if(Py)return Dd.exports;Py=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Dd.exports=Cx(),Dd.exports}var zx=Ox();function ct(t){if(typeof t=="string"||typeof t=="number")return""+t;let i="";if(Array.isArray(t))for(let s=0,a;s<t.length;s++)(a=ct(t[s]))!==""&&(i+=(i&&" ")+a);else for(let s in t)t[s]&&(i+=(i&&" ")+s);return i}var Dx={value:()=>{}};function Uc(){for(var t=0,i=arguments.length,s={},a;t<i;++t){if(!(a=arguments[t]+"")||a in s||/[\s.]/.test(a))throw new Error("illegal type: "+a);s[a]=[]}return new gc(s)}function gc(t){this._=t}function Lx(t,i){return t.trim().split(/^|\s+/).map(function(s){var a="",r=s.indexOf(".");if(r>=0&&(a=s.slice(r+1),s=s.slice(0,r)),s&&!i.hasOwnProperty(s))throw new Error("unknown type: "+s);return{type:s,name:a}})}gc.prototype=Uc.prototype={constructor:gc,on:function(t,i){var s=this._,a=Lx(t+"",s),r,c=-1,u=a.length;if(arguments.length<2){for(;++c<u;)if((r=(t=a[c]).type)&&(r=jx(s[r],t.name)))return r;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++c<u;)if(r=(t=a[c]).type)s[r]=e0(s[r],t.name,i);else if(i==null)for(r in s)s[r]=e0(s[r],t.name,null);return this},copy:function(){var t={},i=this._;for(var s in i)t[s]=i[s].slice();return new gc(t)},call:function(t,i){if((r=arguments.length-2)>0)for(var s=new Array(r),a=0,r,c;a<r;++a)s[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(c=this._[t],a=0,r=c.length;a<r;++a)c[a].value.apply(i,s)},apply:function(t,i,s){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var a=this._[t],r=0,c=a.length;r<c;++r)a[r].value.apply(i,s)}};function jx(t,i){for(var s=0,a=t.length,r;s<a;++s)if((r=t[s]).name===i)return r.value}function e0(t,i,s){for(var a=0,r=t.length;a<r;++a)if(t[a].name===i){t[a]=Dx,t=t.slice(0,a).concat(t.slice(a+1));break}return s!=null&&t.push({name:i,value:s}),t}var ah="http://www.w3.org/1999/xhtml";const t0={svg:"http://www.w3.org/2000/svg",xhtml:ah,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function qc(t){var i=t+="",s=i.indexOf(":");return s>=0&&(i=t.slice(0,s))!=="xmlns"&&(t=t.slice(s+1)),t0.hasOwnProperty(i)?{space:t0[i],local:t}:t}function Rx(t){return function(){var i=this.ownerDocument,s=this.namespaceURI;return s===ah&&i.documentElement.namespaceURI===ah?i.createElement(t):i.createElementNS(s,t)}}function kx(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function zv(t){var i=qc(t);return(i.local?kx:Rx)(i)}function Bx(){}function Oh(t){return t==null?Bx:function(){return this.querySelector(t)}}function Hx(t){typeof t!="function"&&(t=Oh(t));for(var i=this._groups,s=i.length,a=new Array(s),r=0;r<s;++r)for(var c=i[r],u=c.length,h=a[r]=new Array(u),m,g,v=0;v<u;++v)(m=c[v])&&(g=t.call(m,m.__data__,v,c))&&("__data__"in m&&(g.__data__=m.__data__),h[v]=g);return new Qt(a,this._parents)}function $x(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Ux(){return[]}function Dv(t){return t==null?Ux:function(){return this.querySelectorAll(t)}}function qx(t){return function(){return $x(t.apply(this,arguments))}}function Vx(t){typeof t=="function"?t=qx(t):t=Dv(t);for(var i=this._groups,s=i.length,a=[],r=[],c=0;c<s;++c)for(var u=i[c],h=u.length,m,g=0;g<h;++g)(m=u[g])&&(a.push(t.call(m,m.__data__,g,u)),r.push(m));return new Qt(a,r)}function Lv(t){return function(){return this.matches(t)}}function jv(t){return function(i){return i.matches(t)}}var Yx=Array.prototype.find;function Gx(t){return function(){return Yx.call(this.children,t)}}function Xx(){return this.firstElementChild}function Kx(t){return this.select(t==null?Xx:Gx(typeof t=="function"?t:jv(t)))}var Zx=Array.prototype.filter;function Ix(){return Array.from(this.children)}function Qx(t){return function(){return Zx.call(this.children,t)}}function Jx(t){return this.selectAll(t==null?Ix:Qx(typeof t=="function"?t:jv(t)))}function Fx(t){typeof t!="function"&&(t=Lv(t));for(var i=this._groups,s=i.length,a=new Array(s),r=0;r<s;++r)for(var c=i[r],u=c.length,h=a[r]=[],m,g=0;g<u;++g)(m=c[g])&&t.call(m,m.__data__,g,c)&&h.push(m);return new Qt(a,this._parents)}function Rv(t){return new Array(t.length)}function Wx(){return new Qt(this._enter||this._groups.map(Rv),this._parents)}function Nc(t,i){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=i}Nc.prototype={constructor:Nc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,i){return this._parent.insertBefore(t,i)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Px(t){return function(){return t}}function eE(t,i,s,a,r,c){for(var u=0,h,m=i.length,g=c.length;u<g;++u)(h=i[u])?(h.__data__=c[u],a[u]=h):s[u]=new Nc(t,c[u]);for(;u<m;++u)(h=i[u])&&(r[u]=h)}function tE(t,i,s,a,r,c,u){var h,m,g=new Map,v=i.length,p=c.length,y=new Array(v),w;for(h=0;h<v;++h)(m=i[h])&&(y[h]=w=u.call(m,m.__data__,h,i)+"",g.has(w)?r[h]=m:g.set(w,m));for(h=0;h<p;++h)w=u.call(t,c[h],h,c)+"",(m=g.get(w))?(a[h]=m,m.__data__=c[h],g.delete(w)):s[h]=new Nc(t,c[h]);for(h=0;h<v;++h)(m=i[h])&&g.get(y[h])===m&&(r[h]=m)}function nE(t){return t.__data__}function iE(t,i){if(!arguments.length)return Array.from(this,nE);var s=i?tE:eE,a=this._parents,r=this._groups;typeof t!="function"&&(t=Px(t));for(var c=r.length,u=new Array(c),h=new Array(c),m=new Array(c),g=0;g<c;++g){var v=a[g],p=r[g],y=p.length,w=sE(t.call(v,v&&v.__data__,g,a)),_=w.length,E=h[g]=new Array(_),N=u[g]=new Array(_),S=m[g]=new Array(y);s(v,p,E,N,S,w,i);for(var C=0,x=0,T,L;C<_;++C)if(T=E[C]){for(C>=x&&(x=C+1);!(L=N[x])&&++x<_;);T._next=L||null}}return u=new Qt(u,a),u._enter=h,u._exit=m,u}function sE(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lE(){return new Qt(this._exit||this._groups.map(Rv),this._parents)}function aE(t,i,s){var a=this.enter(),r=this,c=this.exit();return typeof t=="function"?(a=t(a),a&&(a=a.selection())):a=a.append(t+""),i!=null&&(r=i(r),r&&(r=r.selection())),s==null?c.remove():s(c),a&&r?a.merge(r).order():r}function oE(t){for(var i=t.selection?t.selection():t,s=this._groups,a=i._groups,r=s.length,c=a.length,u=Math.min(r,c),h=new Array(r),m=0;m<u;++m)for(var g=s[m],v=a[m],p=g.length,y=h[m]=new Array(p),w,_=0;_<p;++_)(w=g[_]||v[_])&&(y[_]=w);for(;m<r;++m)h[m]=s[m];return new Qt(h,this._parents)}function rE(){for(var t=this._groups,i=-1,s=t.length;++i<s;)for(var a=t[i],r=a.length-1,c=a[r],u;--r>=0;)(u=a[r])&&(c&&u.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(u,c),c=u);return this}function cE(t){t||(t=uE);function i(p,y){return p&&y?t(p.__data__,y.__data__):!p-!y}for(var s=this._groups,a=s.length,r=new Array(a),c=0;c<a;++c){for(var u=s[c],h=u.length,m=r[c]=new Array(h),g,v=0;v<h;++v)(g=u[v])&&(m[v]=g);m.sort(i)}return new Qt(r,this._parents).order()}function uE(t,i){return t<i?-1:t>i?1:t>=i?0:NaN}function fE(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function dE(){return Array.from(this)}function hE(){for(var t=this._groups,i=0,s=t.length;i<s;++i)for(var a=t[i],r=0,c=a.length;r<c;++r){var u=a[r];if(u)return u}return null}function mE(){let t=0;for(const i of this)++t;return t}function gE(){return!this.node()}function pE(t){for(var i=this._groups,s=0,a=i.length;s<a;++s)for(var r=i[s],c=0,u=r.length,h;c<u;++c)(h=r[c])&&t.call(h,h.__data__,c,r);return this}function yE(t){return function(){this.removeAttribute(t)}}function vE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function bE(t,i){return function(){this.setAttribute(t,i)}}function SE(t,i){return function(){this.setAttributeNS(t.space,t.local,i)}}function wE(t,i){return function(){var s=i.apply(this,arguments);s==null?this.removeAttribute(t):this.setAttribute(t,s)}}function xE(t,i){return function(){var s=i.apply(this,arguments);s==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,s)}}function EE(t,i){var s=qc(t);if(arguments.length<2){var a=this.node();return s.local?a.getAttributeNS(s.space,s.local):a.getAttribute(s)}return this.each((i==null?s.local?vE:yE:typeof i=="function"?s.local?xE:wE:s.local?SE:bE)(s,i))}function kv(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function _E(t){return function(){this.style.removeProperty(t)}}function NE(t,i,s){return function(){this.style.setProperty(t,i,s)}}function AE(t,i,s){return function(){var a=i.apply(this,arguments);a==null?this.style.removeProperty(t):this.style.setProperty(t,a,s)}}function TE(t,i,s){return arguments.length>1?this.each((i==null?_E:typeof i=="function"?AE:NE)(t,i,s??"")):Bl(this.node(),t)}function Bl(t,i){return t.style.getPropertyValue(i)||kv(t).getComputedStyle(t,null).getPropertyValue(i)}function ME(t){return function(){delete this[t]}}function CE(t,i){return function(){this[t]=i}}function OE(t,i){return function(){var s=i.apply(this,arguments);s==null?delete this[t]:this[t]=s}}function zE(t,i){return arguments.length>1?this.each((i==null?ME:typeof i=="function"?OE:CE)(t,i)):this.node()[t]}function Bv(t){return t.trim().split(/^|\s+/)}function zh(t){return t.classList||new Hv(t)}function Hv(t){this._node=t,this._names=Bv(t.getAttribute("class")||"")}Hv.prototype={add:function(t){var i=this._names.indexOf(t);i<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var i=this._names.indexOf(t);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function $v(t,i){for(var s=zh(t),a=-1,r=i.length;++a<r;)s.add(i[a])}function Uv(t,i){for(var s=zh(t),a=-1,r=i.length;++a<r;)s.remove(i[a])}function DE(t){return function(){$v(this,t)}}function LE(t){return function(){Uv(this,t)}}function jE(t,i){return function(){(i.apply(this,arguments)?$v:Uv)(this,t)}}function RE(t,i){var s=Bv(t+"");if(arguments.length<2){for(var a=zh(this.node()),r=-1,c=s.length;++r<c;)if(!a.contains(s[r]))return!1;return!0}return this.each((typeof i=="function"?jE:i?DE:LE)(s,i))}function kE(){this.textContent=""}function BE(t){return function(){this.textContent=t}}function HE(t){return function(){var i=t.apply(this,arguments);this.textContent=i??""}}function $E(t){return arguments.length?this.each(t==null?kE:(typeof t=="function"?HE:BE)(t)):this.node().textContent}function UE(){this.innerHTML=""}function qE(t){return function(){this.innerHTML=t}}function VE(t){return function(){var i=t.apply(this,arguments);this.innerHTML=i??""}}function YE(t){return arguments.length?this.each(t==null?UE:(typeof t=="function"?VE:qE)(t)):this.node().innerHTML}function GE(){this.nextSibling&&this.parentNode.appendChild(this)}function XE(){return this.each(GE)}function KE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ZE(){return this.each(KE)}function IE(t){var i=typeof t=="function"?t:zv(t);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function QE(){return null}function JE(t,i){var s=typeof t=="function"?t:zv(t),a=i==null?QE:typeof i=="function"?i:Oh(i);return this.select(function(){return this.insertBefore(s.apply(this,arguments),a.apply(this,arguments)||null)})}function FE(){var t=this.parentNode;t&&t.removeChild(this)}function WE(){return this.each(FE)}function PE(){var t=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function e2(){var t=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function t2(t){return this.select(t?e2:PE)}function n2(t){return arguments.length?this.property("__data__",t):this.node().__data__}function i2(t){return function(i){t.call(this,i,this.__data__)}}function s2(t){return t.trim().split(/^|\s+/).map(function(i){var s="",a=i.indexOf(".");return a>=0&&(s=i.slice(a+1),i=i.slice(0,a)),{type:i,name:s}})}function l2(t){return function(){var i=this.__on;if(i){for(var s=0,a=-1,r=i.length,c;s<r;++s)c=i[s],(!t.type||c.type===t.type)&&c.name===t.name?this.removeEventListener(c.type,c.listener,c.options):i[++a]=c;++a?i.length=a:delete this.__on}}}function a2(t,i,s){return function(){var a=this.__on,r,c=i2(i);if(a){for(var u=0,h=a.length;u<h;++u)if((r=a[u]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=c,r.options=s),r.value=i;return}}this.addEventListener(t.type,c,s),r={type:t.type,name:t.name,value:i,listener:c,options:s},a?a.push(r):this.__on=[r]}}function o2(t,i,s){var a=s2(t+""),r,c=a.length,u;if(arguments.length<2){var h=this.node().__on;if(h){for(var m=0,g=h.length,v;m<g;++m)for(r=0,v=h[m];r<c;++r)if((u=a[r]).type===v.type&&u.name===v.name)return v.value}return}for(h=i?a2:l2,r=0;r<c;++r)this.each(h(a[r],i,s));return this}function qv(t,i,s){var a=kv(t),r=a.CustomEvent;typeof r=="function"?r=new r(i,s):(r=a.document.createEvent("Event"),s?(r.initEvent(i,s.bubbles,s.cancelable),r.detail=s.detail):r.initEvent(i,!1,!1)),t.dispatchEvent(r)}function r2(t,i){return function(){return qv(this,t,i)}}function c2(t,i){return function(){return qv(this,t,i.apply(this,arguments))}}function u2(t,i){return this.each((typeof i=="function"?c2:r2)(t,i))}function*f2(){for(var t=this._groups,i=0,s=t.length;i<s;++i)for(var a=t[i],r=0,c=a.length,u;r<c;++r)(u=a[r])&&(yield u)}var Vv=[null];function Qt(t,i){this._groups=t,this._parents=i}function Eo(){return new Qt([[document.documentElement]],Vv)}function d2(){return this}Qt.prototype=Eo.prototype={constructor:Qt,select:Hx,selectAll:Vx,selectChild:Kx,selectChildren:Jx,filter:Fx,data:iE,enter:Wx,exit:lE,join:aE,merge:oE,selection:d2,order:rE,sort:cE,call:fE,nodes:dE,node:hE,size:mE,empty:gE,each:pE,attr:EE,style:TE,property:zE,classed:RE,text:$E,html:YE,raise:XE,lower:ZE,append:IE,insert:JE,remove:WE,clone:t2,datum:n2,on:o2,dispatch:u2,[Symbol.iterator]:f2};function Zt(t){return typeof t=="string"?new Qt([[document.querySelector(t)]],[document.documentElement]):new Qt([[t]],Vv)}function h2(t){let i;for(;i=t.sourceEvent;)t=i;return t}function yn(t,i){if(t=h2(t),i===void 0&&(i=t.currentTarget),i){var s=i.ownerSVGElement||i;if(s.createSVGPoint){var a=s.createSVGPoint();return a.x=t.clientX,a.y=t.clientY,a=a.matrixTransform(i.getScreenCTM().inverse()),[a.x,a.y]}if(i.getBoundingClientRect){var r=i.getBoundingClientRect();return[t.clientX-r.left-i.clientLeft,t.clientY-r.top-i.clientTop]}}return[t.pageX,t.pageY]}const m2={passive:!1},ro={capture:!0,passive:!1};function kd(t){t.stopImmediatePropagation()}function zl(t){t.preventDefault(),t.stopImmediatePropagation()}function Yv(t){var i=t.document.documentElement,s=Zt(t).on("dragstart.drag",zl,ro);"onselectstart"in i?s.on("selectstart.drag",zl,ro):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function Gv(t,i){var s=t.document.documentElement,a=Zt(t).on("dragstart.drag",null);i&&(a.on("click.drag",zl,ro),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in s?a.on("selectstart.drag",null):(s.style.MozUserSelect=s.__noselect,delete s.__noselect)}const ec=t=>()=>t;function oh(t,{sourceEvent:i,subject:s,target:a,identifier:r,active:c,x:u,y:h,dx:m,dy:g,dispatch:v}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:s,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:m,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:v}})}oh.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function g2(t){return!t.ctrlKey&&!t.button}function p2(){return this.parentNode}function y2(t,i){return i??{x:t.x,y:t.y}}function v2(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xv(){var t=g2,i=p2,s=y2,a=v2,r={},c=Uc("start","drag","end"),u=0,h,m,g,v,p=0;function y(T){T.on("mousedown.drag",w).filter(a).on("touchstart.drag",N).on("touchmove.drag",S,m2).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(T,L){if(!(v||!t.call(this,T,L))){var D=x(this,i.call(this,T,L),T,L,"mouse");D&&(Zt(T.view).on("mousemove.drag",_,ro).on("mouseup.drag",E,ro),Yv(T.view),kd(T),g=!1,h=T.clientX,m=T.clientY,D("start",T))}}function _(T){if(zl(T),!g){var L=T.clientX-h,D=T.clientY-m;g=L*L+D*D>p}r.mouse("drag",T)}function E(T){Zt(T.view).on("mousemove.drag mouseup.drag",null),Gv(T.view,g),zl(T),r.mouse("end",T)}function N(T,L){if(t.call(this,T,L)){var D=T.changedTouches,R=i.call(this,T,L),j=D.length,q,le;for(q=0;q<j;++q)(le=x(this,R,T,L,D[q].identifier,D[q]))&&(kd(T),le("start",T,D[q]))}}function S(T){var L=T.changedTouches,D=L.length,R,j;for(R=0;R<D;++R)(j=r[L[R].identifier])&&(zl(T),j("drag",T,L[R]))}function C(T){var L=T.changedTouches,D=L.length,R,j;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),R=0;R<D;++R)(j=r[L[R].identifier])&&(kd(T),j("end",T,L[R]))}function x(T,L,D,R,j,q){var le=c.copy(),X=yn(q||D,L),I,ae,k;if((k=s.call(T,new oh("beforestart",{sourceEvent:D,target:y,identifier:j,active:u,x:X[0],y:X[1],dx:0,dy:0,dispatch:le}),R))!=null)return I=k.x-X[0]||0,ae=k.y-X[1]||0,function Y(O,B,G){var K=X,ne;switch(O){case"start":r[j]=Y,ne=u++;break;case"end":delete r[j],--u;case"drag":X=yn(G||B,L),ne=u;break}le.call(O,T,new oh(O,{sourceEvent:B,subject:k,target:y,identifier:j,active:ne,x:X[0]+I,y:X[1]+ae,dx:X[0]-K[0],dy:X[1]-K[1],dispatch:le}),R)}}return y.filter=function(T){return arguments.length?(t=typeof T=="function"?T:ec(!!T),y):t},y.container=function(T){return arguments.length?(i=typeof T=="function"?T:ec(T),y):i},y.subject=function(T){return arguments.length?(s=typeof T=="function"?T:ec(T),y):s},y.touchable=function(T){return arguments.length?(a=typeof T=="function"?T:ec(!!T),y):a},y.on=function(){var T=c.on.apply(c,arguments);return T===c?y:T},y.clickDistance=function(T){return arguments.length?(p=(T=+T)*T,y):Math.sqrt(p)},y}function Dh(t,i,s){t.prototype=i.prototype=s,s.constructor=t}function Kv(t,i){var s=Object.create(t.prototype);for(var a in i)s[a]=i[a];return s}function _o(){}var co=.7,Ac=1/co,Dl="\\s*([+-]?\\d+)\\s*",uo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",zn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b2=/^#([0-9a-f]{3,8})$/,S2=new RegExp(`^rgb\\(${Dl},${Dl},${Dl}\\)$`),w2=new RegExp(`^rgb\\(${zn},${zn},${zn}\\)$`),x2=new RegExp(`^rgba\\(${Dl},${Dl},${Dl},${uo}\\)$`),E2=new RegExp(`^rgba\\(${zn},${zn},${zn},${uo}\\)$`),_2=new RegExp(`^hsl\\(${uo},${zn},${zn}\\)$`),N2=new RegExp(`^hsla\\(${uo},${zn},${zn},${uo}\\)$`),n0={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};Dh(_o,Es,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:i0,formatHex:i0,formatHex8:A2,formatHsl:T2,formatRgb:s0,toString:s0});function i0(){return this.rgb().formatHex()}function A2(){return this.rgb().formatHex8()}function T2(){return Zv(this).formatHsl()}function s0(){return this.rgb().formatRgb()}function Es(t){var i,s;return t=(t+"").trim().toLowerCase(),(i=b2.exec(t))?(s=i[1].length,i=parseInt(i[1],16),s===6?l0(i):s===3?new Bt(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):s===8?tc(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):s===4?tc(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=S2.exec(t))?new Bt(i[1],i[2],i[3],1):(i=w2.exec(t))?new Bt(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=x2.exec(t))?tc(i[1],i[2],i[3],i[4]):(i=E2.exec(t))?tc(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=_2.exec(t))?r0(i[1],i[2]/100,i[3]/100,1):(i=N2.exec(t))?r0(i[1],i[2]/100,i[3]/100,i[4]):n0.hasOwnProperty(t)?l0(n0[t]):t==="transparent"?new Bt(NaN,NaN,NaN,0):null}function l0(t){return new Bt(t>>16&255,t>>8&255,t&255,1)}function tc(t,i,s,a){return a<=0&&(t=i=s=NaN),new Bt(t,i,s,a)}function M2(t){return t instanceof _o||(t=Es(t)),t?(t=t.rgb(),new Bt(t.r,t.g,t.b,t.opacity)):new Bt}function rh(t,i,s,a){return arguments.length===1?M2(t):new Bt(t,i,s,a??1)}function Bt(t,i,s,a){this.r=+t,this.g=+i,this.b=+s,this.opacity=+a}Dh(Bt,rh,Kv(_o,{brighter(t){return t=t==null?Ac:Math.pow(Ac,t),new Bt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?co:Math.pow(co,t),new Bt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Bt(ws(this.r),ws(this.g),ws(this.b),Tc(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:a0,formatHex:a0,formatHex8:C2,formatRgb:o0,toString:o0}));function a0(){return`#${ps(this.r)}${ps(this.g)}${ps(this.b)}`}function C2(){return`#${ps(this.r)}${ps(this.g)}${ps(this.b)}${ps((isNaN(this.opacity)?1:this.opacity)*255)}`}function o0(){const t=Tc(this.opacity);return`${t===1?"rgb(":"rgba("}${ws(this.r)}, ${ws(this.g)}, ${ws(this.b)}${t===1?")":`, ${t})`}`}function Tc(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ws(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ps(t){return t=ws(t),(t<16?"0":"")+t.toString(16)}function r0(t,i,s,a){return a<=0?t=i=s=NaN:s<=0||s>=1?t=i=NaN:i<=0&&(t=NaN),new vn(t,i,s,a)}function Zv(t){if(t instanceof vn)return new vn(t.h,t.s,t.l,t.opacity);if(t instanceof _o||(t=Es(t)),!t)return new vn;if(t instanceof vn)return t;t=t.rgb();var i=t.r/255,s=t.g/255,a=t.b/255,r=Math.min(i,s,a),c=Math.max(i,s,a),u=NaN,h=c-r,m=(c+r)/2;return h?(i===c?u=(s-a)/h+(s<a)*6:s===c?u=(a-i)/h+2:u=(i-s)/h+4,h/=m<.5?c+r:2-c-r,u*=60):h=m>0&&m<1?0:u,new vn(u,h,m,t.opacity)}function O2(t,i,s,a){return arguments.length===1?Zv(t):new vn(t,i,s,a??1)}function vn(t,i,s,a){this.h=+t,this.s=+i,this.l=+s,this.opacity=+a}Dh(vn,O2,Kv(_o,{brighter(t){return t=t==null?Ac:Math.pow(Ac,t),new vn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?co:Math.pow(co,t),new vn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,i=isNaN(t)||isNaN(this.s)?0:this.s,s=this.l,a=s+(s<.5?s:1-s)*i,r=2*s-a;return new Bt(Bd(t>=240?t-240:t+120,r,a),Bd(t,r,a),Bd(t<120?t+240:t-120,r,a),this.opacity)},clamp(){return new vn(c0(this.h),nc(this.s),nc(this.l),Tc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Tc(this.opacity);return`${t===1?"hsl(":"hsla("}${c0(this.h)}, ${nc(this.s)*100}%, ${nc(this.l)*100}%${t===1?")":`, ${t})`}`}}));function c0(t){return t=(t||0)%360,t<0?t+360:t}function nc(t){return Math.max(0,Math.min(1,t||0))}function Bd(t,i,s){return(t<60?i+(s-i)*t/60:t<180?s:t<240?i+(s-i)*(240-t)/60:i)*255}const Lh=t=>()=>t;function z2(t,i){return function(s){return t+s*i}}function D2(t,i,s){return t=Math.pow(t,s),i=Math.pow(i,s)-t,s=1/s,function(a){return Math.pow(t+a*i,s)}}function L2(t){return(t=+t)==1?Iv:function(i,s){return s-i?D2(i,s,t):Lh(isNaN(i)?s:i)}}function Iv(t,i){var s=i-t;return s?z2(t,s):Lh(isNaN(t)?i:t)}const Mc=(function t(i){var s=L2(i);function a(r,c){var u=s((r=rh(r)).r,(c=rh(c)).r),h=s(r.g,c.g),m=s(r.b,c.b),g=Iv(r.opacity,c.opacity);return function(v){return r.r=u(v),r.g=h(v),r.b=m(v),r.opacity=g(v),r+""}}return a.gamma=t,a})(1);function j2(t,i){i||(i=[]);var s=t?Math.min(i.length,t.length):0,a=i.slice(),r;return function(c){for(r=0;r<s;++r)a[r]=t[r]*(1-c)+i[r]*c;return a}}function R2(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function k2(t,i){var s=i?i.length:0,a=t?Math.min(s,t.length):0,r=new Array(a),c=new Array(s),u;for(u=0;u<a;++u)r[u]=so(t[u],i[u]);for(;u<s;++u)c[u]=i[u];return function(h){for(u=0;u<a;++u)c[u]=r[u](h);return c}}function B2(t,i){var s=new Date;return t=+t,i=+i,function(a){return s.setTime(t*(1-a)+i*a),s}}function On(t,i){return t=+t,i=+i,function(s){return t*(1-s)+i*s}}function H2(t,i){var s={},a={},r;(t===null||typeof t!="object")&&(t={}),(i===null||typeof i!="object")&&(i={});for(r in i)r in t?s[r]=so(t[r],i[r]):a[r]=i[r];return function(c){for(r in s)a[r]=s[r](c);return a}}var ch=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hd=new RegExp(ch.source,"g");function $2(t){return function(){return t}}function U2(t){return function(i){return t(i)+""}}function Qv(t,i){var s=ch.lastIndex=Hd.lastIndex=0,a,r,c,u=-1,h=[],m=[];for(t=t+"",i=i+"";(a=ch.exec(t))&&(r=Hd.exec(i));)(c=r.index)>s&&(c=i.slice(s,c),h[u]?h[u]+=c:h[++u]=c),(a=a[0])===(r=r[0])?h[u]?h[u]+=r:h[++u]=r:(h[++u]=null,m.push({i:u,x:On(a,r)})),s=Hd.lastIndex;return s<i.length&&(c=i.slice(s),h[u]?h[u]+=c:h[++u]=c),h.length<2?m[0]?U2(m[0].x):$2(i):(i=m.length,function(g){for(var v=0,p;v<i;++v)h[(p=m[v]).i]=p.x(g);return h.join("")})}function so(t,i){var s=typeof i,a;return i==null||s==="boolean"?Lh(i):(s==="number"?On:s==="string"?(a=Es(i))?(i=a,Mc):Qv:i instanceof Es?Mc:i instanceof Date?B2:R2(i)?j2:Array.isArray(i)?k2:typeof i.valueOf!="function"&&typeof i.toString!="function"||isNaN(i)?H2:On)(t,i)}var u0=180/Math.PI,uh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jv(t,i,s,a,r,c){var u,h,m;return(u=Math.sqrt(t*t+i*i))&&(t/=u,i/=u),(m=t*s+i*a)&&(s-=t*m,a-=i*m),(h=Math.sqrt(s*s+a*a))&&(s/=h,a/=h,m/=h),t*a<i*s&&(t=-t,i=-i,m=-m,u=-u),{translateX:r,translateY:c,rotate:Math.atan2(i,t)*u0,skewX:Math.atan(m)*u0,scaleX:u,scaleY:h}}var ic;function q2(t){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return i.isIdentity?uh:Jv(i.a,i.b,i.c,i.d,i.e,i.f)}function V2(t){return t==null||(ic||(ic=document.createElementNS("http://www.w3.org/2000/svg","g")),ic.setAttribute("transform",t),!(t=ic.transform.baseVal.consolidate()))?uh:(t=t.matrix,Jv(t.a,t.b,t.c,t.d,t.e,t.f))}function Fv(t,i,s,a){function r(g){return g.length?g.pop()+" ":""}function c(g,v,p,y,w,_){if(g!==p||v!==y){var E=w.push("translate(",null,i,null,s);_.push({i:E-4,x:On(g,p)},{i:E-2,x:On(v,y)})}else(p||y)&&w.push("translate("+p+i+y+s)}function u(g,v,p,y){g!==v?(g-v>180?v+=360:v-g>180&&(g+=360),y.push({i:p.push(r(p)+"rotate(",null,a)-2,x:On(g,v)})):v&&p.push(r(p)+"rotate("+v+a)}function h(g,v,p,y){g!==v?y.push({i:p.push(r(p)+"skewX(",null,a)-2,x:On(g,v)}):v&&p.push(r(p)+"skewX("+v+a)}function m(g,v,p,y,w,_){if(g!==p||v!==y){var E=w.push(r(w)+"scale(",null,",",null,")");_.push({i:E-4,x:On(g,p)},{i:E-2,x:On(v,y)})}else(p!==1||y!==1)&&w.push(r(w)+"scale("+p+","+y+")")}return function(g,v){var p=[],y=[];return g=t(g),v=t(v),c(g.translateX,g.translateY,v.translateX,v.translateY,p,y),u(g.rotate,v.rotate,p,y),h(g.skewX,v.skewX,p,y),m(g.scaleX,g.scaleY,v.scaleX,v.scaleY,p,y),g=v=null,function(w){for(var _=-1,E=y.length,N;++_<E;)p[(N=y[_]).i]=N.x(w);return p.join("")}}}var Y2=Fv(q2,"px, ","px)","deg)"),G2=Fv(V2,", ",")",")"),X2=1e-12;function f0(t){return((t=Math.exp(t))+1/t)/2}function K2(t){return((t=Math.exp(t))-1/t)/2}function Z2(t){return((t=Math.exp(2*t))-1)/(t+1)}const pc=(function t(i,s,a){function r(c,u){var h=c[0],m=c[1],g=c[2],v=u[0],p=u[1],y=u[2],w=v-h,_=p-m,E=w*w+_*_,N,S;if(E<X2)S=Math.log(y/g)/i,N=function(R){return[h+R*w,m+R*_,g*Math.exp(i*R*S)]};else{var C=Math.sqrt(E),x=(y*y-g*g+a*E)/(2*g*s*C),T=(y*y-g*g-a*E)/(2*y*s*C),L=Math.log(Math.sqrt(x*x+1)-x),D=Math.log(Math.sqrt(T*T+1)-T);S=(D-L)/i,N=function(R){var j=R*S,q=f0(L),le=g/(s*C)*(q*Z2(i*j+L)-K2(L));return[h+le*w,m+le*_,g*q/f0(i*j+L)]}}return N.duration=S*1e3*i/Math.SQRT2,N}return r.rho=function(c){var u=Math.max(.001,+c),h=u*u,m=h*h;return t(u,h,m)},r})(Math.SQRT2,2,4);var Hl=0,to=0,Wa=0,Wv=1e3,Cc,no,Oc=0,_s=0,Vc=0,fo=typeof performance=="object"&&performance.now?performance:Date,Pv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function jh(){return _s||(Pv(I2),_s=fo.now()+Vc)}function I2(){_s=0}function zc(){this._call=this._time=this._next=null}zc.prototype=e1.prototype={constructor:zc,restart:function(t,i,s){if(typeof t!="function")throw new TypeError("callback is not a function");s=(s==null?jh():+s)+(i==null?0:+i),!this._next&&no!==this&&(no?no._next=this:Cc=this,no=this),this._call=t,this._time=s,fh()},stop:function(){this._call&&(this._call=null,this._time=1/0,fh())}};function e1(t,i,s){var a=new zc;return a.restart(t,i,s),a}function Q2(){jh(),++Hl;for(var t=Cc,i;t;)(i=_s-t._time)>=0&&t._call.call(void 0,i),t=t._next;--Hl}function d0(){_s=(Oc=fo.now())+Vc,Hl=to=0;try{Q2()}finally{Hl=0,F2(),_s=0}}function J2(){var t=fo.now(),i=t-Oc;i>Wv&&(Vc-=i,Oc=t)}function F2(){for(var t,i=Cc,s,a=1/0;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(s=i._next,i._next=null,i=t?t._next=s:Cc=s);no=t,fh(a)}function fh(t){if(!Hl){to&&(to=clearTimeout(to));var i=t-_s;i>24?(t<1/0&&(to=setTimeout(d0,t-fo.now()-Vc)),Wa&&(Wa=clearInterval(Wa))):(Wa||(Oc=fo.now(),Wa=setInterval(J2,Wv)),Hl=1,Pv(d0))}}function h0(t,i,s){var a=new zc;return i=i==null?0:+i,a.restart(r=>{a.stop(),t(r+i)},i,s),a}var W2=Uc("start","end","cancel","interrupt"),P2=[],t1=0,m0=1,dh=2,yc=3,g0=4,hh=5,vc=6;function Yc(t,i,s,a,r,c){var u=t.__transition;if(!u)t.__transition={};else if(s in u)return;e_(t,s,{name:i,index:a,group:r,on:W2,tween:P2,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:t1})}function Rh(t,i){var s=xn(t,i);if(s.state>t1)throw new Error("too late; already scheduled");return s}function jn(t,i){var s=xn(t,i);if(s.state>yc)throw new Error("too late; already running");return s}function xn(t,i){var s=t.__transition;if(!s||!(s=s[i]))throw new Error("transition not found");return s}function e_(t,i,s){var a=t.__transition,r;a[i]=s,s.timer=e1(c,0,s.time);function c(g){s.state=m0,s.timer.restart(u,s.delay,s.time),s.delay<=g&&u(g-s.delay)}function u(g){var v,p,y,w;if(s.state!==m0)return m();for(v in a)if(w=a[v],w.name===s.name){if(w.state===yc)return h0(u);w.state===g0?(w.state=vc,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete a[v]):+v<i&&(w.state=vc,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete a[v])}if(h0(function(){s.state===yc&&(s.state=g0,s.timer.restart(h,s.delay,s.time),h(g))}),s.state=dh,s.on.call("start",t,t.__data__,s.index,s.group),s.state===dh){for(s.state=yc,r=new Array(y=s.tween.length),v=0,p=-1;v<y;++v)(w=s.tween[v].value.call(t,t.__data__,s.index,s.group))&&(r[++p]=w);r.length=p+1}}function h(g){for(var v=g<s.duration?s.ease.call(null,g/s.duration):(s.timer.restart(m),s.state=hh,1),p=-1,y=r.length;++p<y;)r[p].call(t,v);s.state===hh&&(s.on.call("end",t,t.__data__,s.index,s.group),m())}function m(){s.state=vc,s.timer.stop(),delete a[i];for(var g in a)return;delete t.__transition}}function bc(t,i){var s=t.__transition,a,r,c=!0,u;if(s){i=i==null?null:i+"";for(u in s){if((a=s[u]).name!==i){c=!1;continue}r=a.state>dh&&a.state<hh,a.state=vc,a.timer.stop(),a.on.call(r?"interrupt":"cancel",t,t.__data__,a.index,a.group),delete s[u]}c&&delete t.__transition}}function t_(t){return this.each(function(){bc(this,t)})}function n_(t,i){var s,a;return function(){var r=jn(this,t),c=r.tween;if(c!==s){a=s=c;for(var u=0,h=a.length;u<h;++u)if(a[u].name===i){a=a.slice(),a.splice(u,1);break}}r.tween=a}}function i_(t,i,s){var a,r;if(typeof s!="function")throw new Error;return function(){var c=jn(this,t),u=c.tween;if(u!==a){r=(a=u).slice();for(var h={name:i,value:s},m=0,g=r.length;m<g;++m)if(r[m].name===i){r[m]=h;break}m===g&&r.push(h)}c.tween=r}}function s_(t,i){var s=this._id;if(t+="",arguments.length<2){for(var a=xn(this.node(),s).tween,r=0,c=a.length,u;r<c;++r)if((u=a[r]).name===t)return u.value;return null}return this.each((i==null?n_:i_)(s,t,i))}function kh(t,i,s){var a=t._id;return t.each(function(){var r=jn(this,a);(r.value||(r.value={}))[i]=s.apply(this,arguments)}),function(r){return xn(r,a).value[i]}}function n1(t,i){var s;return(typeof i=="number"?On:i instanceof Es?Mc:(s=Es(i))?(i=s,Mc):Qv)(t,i)}function l_(t){return function(){this.removeAttribute(t)}}function a_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function o_(t,i,s){var a,r=s+"",c;return function(){var u=this.getAttribute(t);return u===r?null:u===a?c:c=i(a=u,s)}}function r_(t,i,s){var a,r=s+"",c;return function(){var u=this.getAttributeNS(t.space,t.local);return u===r?null:u===a?c:c=i(a=u,s)}}function c_(t,i,s){var a,r,c;return function(){var u,h=s(this),m;return h==null?void this.removeAttribute(t):(u=this.getAttribute(t),m=h+"",u===m?null:u===a&&m===r?c:(r=m,c=i(a=u,h)))}}function u_(t,i,s){var a,r,c;return function(){var u,h=s(this),m;return h==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),m=h+"",u===m?null:u===a&&m===r?c:(r=m,c=i(a=u,h)))}}function f_(t,i){var s=qc(t),a=s==="transform"?G2:n1;return this.attrTween(t,typeof i=="function"?(s.local?u_:c_)(s,a,kh(this,"attr."+t,i)):i==null?(s.local?a_:l_)(s):(s.local?r_:o_)(s,a,i))}function d_(t,i){return function(s){this.setAttribute(t,i.call(this,s))}}function h_(t,i){return function(s){this.setAttributeNS(t.space,t.local,i.call(this,s))}}function m_(t,i){var s,a;function r(){var c=i.apply(this,arguments);return c!==a&&(s=(a=c)&&h_(t,c)),s}return r._value=i,r}function g_(t,i){var s,a;function r(){var c=i.apply(this,arguments);return c!==a&&(s=(a=c)&&d_(t,c)),s}return r._value=i,r}function p_(t,i){var s="attr."+t;if(arguments.length<2)return(s=this.tween(s))&&s._value;if(i==null)return this.tween(s,null);if(typeof i!="function")throw new Error;var a=qc(t);return this.tween(s,(a.local?m_:g_)(a,i))}function y_(t,i){return function(){Rh(this,t).delay=+i.apply(this,arguments)}}function v_(t,i){return i=+i,function(){Rh(this,t).delay=i}}function b_(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?y_:v_)(i,t)):xn(this.node(),i).delay}function S_(t,i){return function(){jn(this,t).duration=+i.apply(this,arguments)}}function w_(t,i){return i=+i,function(){jn(this,t).duration=i}}function x_(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?S_:w_)(i,t)):xn(this.node(),i).duration}function E_(t,i){if(typeof i!="function")throw new Error;return function(){jn(this,t).ease=i}}function __(t){var i=this._id;return arguments.length?this.each(E_(i,t)):xn(this.node(),i).ease}function N_(t,i){return function(){var s=i.apply(this,arguments);if(typeof s!="function")throw new Error;jn(this,t).ease=s}}function A_(t){if(typeof t!="function")throw new Error;return this.each(N_(this._id,t))}function T_(t){typeof t!="function"&&(t=Lv(t));for(var i=this._groups,s=i.length,a=new Array(s),r=0;r<s;++r)for(var c=i[r],u=c.length,h=a[r]=[],m,g=0;g<u;++g)(m=c[g])&&t.call(m,m.__data__,g,c)&&h.push(m);return new oi(a,this._parents,this._name,this._id)}function M_(t){if(t._id!==this._id)throw new Error;for(var i=this._groups,s=t._groups,a=i.length,r=s.length,c=Math.min(a,r),u=new Array(a),h=0;h<c;++h)for(var m=i[h],g=s[h],v=m.length,p=u[h]=new Array(v),y,w=0;w<v;++w)(y=m[w]||g[w])&&(p[w]=y);for(;h<a;++h)u[h]=i[h];return new oi(u,this._parents,this._name,this._id)}function C_(t){return(t+"").trim().split(/^|\s+/).every(function(i){var s=i.indexOf(".");return s>=0&&(i=i.slice(0,s)),!i||i==="start"})}function O_(t,i,s){var a,r,c=C_(i)?Rh:jn;return function(){var u=c(this,t),h=u.on;h!==a&&(r=(a=h).copy()).on(i,s),u.on=r}}function z_(t,i){var s=this._id;return arguments.length<2?xn(this.node(),s).on.on(t):this.each(O_(s,t,i))}function D_(t){return function(){var i=this.parentNode;for(var s in this.__transition)if(+s!==t)return;i&&i.removeChild(this)}}function L_(){return this.on("end.remove",D_(this._id))}function j_(t){var i=this._name,s=this._id;typeof t!="function"&&(t=Oh(t));for(var a=this._groups,r=a.length,c=new Array(r),u=0;u<r;++u)for(var h=a[u],m=h.length,g=c[u]=new Array(m),v,p,y=0;y<m;++y)(v=h[y])&&(p=t.call(v,v.__data__,y,h))&&("__data__"in v&&(p.__data__=v.__data__),g[y]=p,Yc(g[y],i,s,y,g,xn(v,s)));return new oi(c,this._parents,i,s)}function R_(t){var i=this._name,s=this._id;typeof t!="function"&&(t=Dv(t));for(var a=this._groups,r=a.length,c=[],u=[],h=0;h<r;++h)for(var m=a[h],g=m.length,v,p=0;p<g;++p)if(v=m[p]){for(var y=t.call(v,v.__data__,p,m),w,_=xn(v,s),E=0,N=y.length;E<N;++E)(w=y[E])&&Yc(w,i,s,E,y,_);c.push(y),u.push(v)}return new oi(c,u,i,s)}var k_=Eo.prototype.constructor;function B_(){return new k_(this._groups,this._parents)}function H_(t,i){var s,a,r;return function(){var c=Bl(this,t),u=(this.style.removeProperty(t),Bl(this,t));return c===u?null:c===s&&u===a?r:r=i(s=c,a=u)}}function i1(t){return function(){this.style.removeProperty(t)}}function $_(t,i,s){var a,r=s+"",c;return function(){var u=Bl(this,t);return u===r?null:u===a?c:c=i(a=u,s)}}function U_(t,i,s){var a,r,c;return function(){var u=Bl(this,t),h=s(this),m=h+"";return h==null&&(m=h=(this.style.removeProperty(t),Bl(this,t))),u===m?null:u===a&&m===r?c:(r=m,c=i(a=u,h))}}function q_(t,i){var s,a,r,c="style."+i,u="end."+c,h;return function(){var m=jn(this,t),g=m.on,v=m.value[c]==null?h||(h=i1(i)):void 0;(g!==s||r!==v)&&(a=(s=g).copy()).on(u,r=v),m.on=a}}function V_(t,i,s){var a=(t+="")=="transform"?Y2:n1;return i==null?this.styleTween(t,H_(t,a)).on("end.style."+t,i1(t)):typeof i=="function"?this.styleTween(t,U_(t,a,kh(this,"style."+t,i))).each(q_(this._id,t)):this.styleTween(t,$_(t,a,i),s).on("end.style."+t,null)}function Y_(t,i,s){return function(a){this.style.setProperty(t,i.call(this,a),s)}}function G_(t,i,s){var a,r;function c(){var u=i.apply(this,arguments);return u!==r&&(a=(r=u)&&Y_(t,u,s)),a}return c._value=i,c}function X_(t,i,s){var a="style."+(t+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(i==null)return this.tween(a,null);if(typeof i!="function")throw new Error;return this.tween(a,G_(t,i,s??""))}function K_(t){return function(){this.textContent=t}}function Z_(t){return function(){var i=t(this);this.textContent=i??""}}function I_(t){return this.tween("text",typeof t=="function"?Z_(kh(this,"text",t)):K_(t==null?"":t+""))}function Q_(t){return function(i){this.textContent=t.call(this,i)}}function J_(t){var i,s;function a(){var r=t.apply(this,arguments);return r!==s&&(i=(s=r)&&Q_(r)),i}return a._value=t,a}function F_(t){var i="text";if(arguments.length<1)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,J_(t))}function W_(){for(var t=this._name,i=this._id,s=s1(),a=this._groups,r=a.length,c=0;c<r;++c)for(var u=a[c],h=u.length,m,g=0;g<h;++g)if(m=u[g]){var v=xn(m,i);Yc(m,t,s,g,u,{time:v.time+v.delay+v.duration,delay:0,duration:v.duration,ease:v.ease})}return new oi(a,this._parents,t,s)}function P_(){var t,i,s=this,a=s._id,r=s.size();return new Promise(function(c,u){var h={value:u},m={value:function(){--r===0&&c()}};s.each(function(){var g=jn(this,a),v=g.on;v!==t&&(i=(t=v).copy(),i._.cancel.push(h),i._.interrupt.push(h),i._.end.push(m)),g.on=i}),r===0&&c()})}var eN=0;function oi(t,i,s,a){this._groups=t,this._parents=i,this._name=s,this._id=a}function s1(){return++eN}var ni=Eo.prototype;oi.prototype={constructor:oi,select:j_,selectAll:R_,selectChild:ni.selectChild,selectChildren:ni.selectChildren,filter:T_,merge:M_,selection:B_,transition:W_,call:ni.call,nodes:ni.nodes,node:ni.node,size:ni.size,empty:ni.empty,each:ni.each,on:z_,attr:f_,attrTween:p_,style:V_,styleTween:X_,text:I_,textTween:F_,remove:L_,tween:s_,delay:b_,duration:x_,ease:__,easeVarying:A_,end:P_,[Symbol.iterator]:ni[Symbol.iterator]};function tN(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var nN={time:null,delay:0,duration:250,ease:tN};function iN(t,i){for(var s;!(s=t.__transition)||!(s=s[i]);)if(!(t=t.parentNode))throw new Error(`transition ${i} not found`);return s}function sN(t){var i,s;t instanceof oi?(i=t._id,t=t._name):(i=s1(),(s=nN).time=jh(),t=t==null?null:t+"");for(var a=this._groups,r=a.length,c=0;c<r;++c)for(var u=a[c],h=u.length,m,g=0;g<h;++g)(m=u[g])&&Yc(m,t,i,g,u,s||iN(m,i));return new oi(a,this._parents,t,i)}Eo.prototype.interrupt=t_;Eo.prototype.transition=sN;const sc=t=>()=>t;function lN(t,{sourceEvent:i,target:s,transform:a,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:r}})}function si(t,i,s){this.k=t,this.x=i,this.y=s}si.prototype={constructor:si,scale:function(t){return t===1?this:new si(this.k*t,this.x,this.y)},translate:function(t,i){return t===0&i===0?this:new si(this.k,this.x+this.k*t,this.y+this.k*i)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Gc=new si(1,0,0);l1.prototype=si.prototype;function l1(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Gc;return t.__zoom}function $d(t){t.stopImmediatePropagation()}function Pa(t){t.preventDefault(),t.stopImmediatePropagation()}function aN(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function oN(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function p0(){return this.__zoom||Gc}function rN(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function cN(){return navigator.maxTouchPoints||"ontouchstart"in this}function uN(t,i,s){var a=t.invertX(i[0][0])-s[0][0],r=t.invertX(i[1][0])-s[1][0],c=t.invertY(i[0][1])-s[0][1],u=t.invertY(i[1][1])-s[1][1];return t.translate(r>a?(a+r)/2:Math.min(0,a)||Math.max(0,r),u>c?(c+u)/2:Math.min(0,c)||Math.max(0,u))}function a1(){var t=aN,i=oN,s=uN,a=rN,r=cN,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],h=250,m=pc,g=Uc("start","zoom","end"),v,p,y,w=500,_=150,E=0,N=10;function S(k){k.property("__zoom",p0).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",q).on("dblclick.zoom",le).filter(r).on("touchstart.zoom",X).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",ae).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(k,Y,O,B){var G=k.selection?k.selection():k;G.property("__zoom",p0),k!==G?L(k,Y,O,B):G.interrupt().each(function(){D(this,arguments).event(B).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},S.scaleBy=function(k,Y,O,B){S.scaleTo(k,function(){var G=this.__zoom.k,K=typeof Y=="function"?Y.apply(this,arguments):Y;return G*K},O,B)},S.scaleTo=function(k,Y,O,B){S.transform(k,function(){var G=i.apply(this,arguments),K=this.__zoom,ne=O==null?T(G):typeof O=="function"?O.apply(this,arguments):O,z=K.invert(ne),$=typeof Y=="function"?Y.apply(this,arguments):Y;return s(x(C(K,$),ne,z),G,u)},O,B)},S.translateBy=function(k,Y,O,B){S.transform(k,function(){return s(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof O=="function"?O.apply(this,arguments):O),i.apply(this,arguments),u)},null,B)},S.translateTo=function(k,Y,O,B,G){S.transform(k,function(){var K=i.apply(this,arguments),ne=this.__zoom,z=B==null?T(K):typeof B=="function"?B.apply(this,arguments):B;return s(Gc.translate(z[0],z[1]).scale(ne.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof O=="function"?-O.apply(this,arguments):-O),K,u)},B,G)};function C(k,Y){return Y=Math.max(c[0],Math.min(c[1],Y)),Y===k.k?k:new si(Y,k.x,k.y)}function x(k,Y,O){var B=Y[0]-O[0]*k.k,G=Y[1]-O[1]*k.k;return B===k.x&&G===k.y?k:new si(k.k,B,G)}function T(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function L(k,Y,O,B){k.on("start.zoom",function(){D(this,arguments).event(B).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(B).end()}).tween("zoom",function(){var G=this,K=arguments,ne=D(G,K).event(B),z=i.apply(G,K),$=O==null?T(z):typeof O=="function"?O.apply(G,K):O,P=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),ee=G.__zoom,ce=typeof Y=="function"?Y.apply(G,K):Y,he=m(ee.invert($).concat(P/ee.k),ce.invert($).concat(P/ce.k));return function(ue){if(ue===1)ue=ce;else{var te=he(ue),de=P/te[2];ue=new si(de,$[0]-te[0]*de,$[1]-te[1]*de)}ne.zoom(null,ue)}})}function D(k,Y,O){return!O&&k.__zooming||new R(k,Y)}function R(k,Y){this.that=k,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=i.apply(k,Y),this.taps=0}R.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,Y){return this.mouse&&k!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var Y=Zt(this.that).datum();g.call(k,this.that,new lN(k,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:g}),Y)}};function j(k,...Y){if(!t.apply(this,arguments))return;var O=D(this,Y).event(k),B=this.__zoom,G=Math.max(c[0],Math.min(c[1],B.k*Math.pow(2,a.apply(this,arguments)))),K=yn(k);if(O.wheel)(O.mouse[0][0]!==K[0]||O.mouse[0][1]!==K[1])&&(O.mouse[1]=B.invert(O.mouse[0]=K)),clearTimeout(O.wheel);else{if(B.k===G)return;O.mouse=[K,B.invert(K)],bc(this),O.start()}Pa(k),O.wheel=setTimeout(ne,_),O.zoom("mouse",s(x(C(B,G),O.mouse[0],O.mouse[1]),O.extent,u));function ne(){O.wheel=null,O.end()}}function q(k,...Y){if(y||!t.apply(this,arguments))return;var O=k.currentTarget,B=D(this,Y,!0).event(k),G=Zt(k.view).on("mousemove.zoom",$,!0).on("mouseup.zoom",P,!0),K=yn(k,O),ne=k.clientX,z=k.clientY;Yv(k.view),$d(k),B.mouse=[K,this.__zoom.invert(K)],bc(this),B.start();function $(ee){if(Pa(ee),!B.moved){var ce=ee.clientX-ne,he=ee.clientY-z;B.moved=ce*ce+he*he>E}B.event(ee).zoom("mouse",s(x(B.that.__zoom,B.mouse[0]=yn(ee,O),B.mouse[1]),B.extent,u))}function P(ee){G.on("mousemove.zoom mouseup.zoom",null),Gv(ee.view,B.moved),Pa(ee),B.event(ee).end()}}function le(k,...Y){if(t.apply(this,arguments)){var O=this.__zoom,B=yn(k.changedTouches?k.changedTouches[0]:k,this),G=O.invert(B),K=O.k*(k.shiftKey?.5:2),ne=s(x(C(O,K),B,G),i.apply(this,Y),u);Pa(k),h>0?Zt(this).transition().duration(h).call(L,ne,B,k):Zt(this).call(S.transform,ne,B,k)}}function X(k,...Y){if(t.apply(this,arguments)){var O=k.touches,B=O.length,G=D(this,Y,k.changedTouches.length===B).event(k),K,ne,z,$;for($d(k),ne=0;ne<B;++ne)z=O[ne],$=yn(z,this),$=[$,this.__zoom.invert($),z.identifier],G.touch0?!G.touch1&&G.touch0[2]!==$[2]&&(G.touch1=$,G.taps=0):(G.touch0=$,K=!0,G.taps=1+!!v);v&&(v=clearTimeout(v)),K&&(G.taps<2&&(p=$[0],v=setTimeout(function(){v=null},w)),bc(this),G.start())}}function I(k,...Y){if(this.__zooming){var O=D(this,Y).event(k),B=k.changedTouches,G=B.length,K,ne,z,$;for(Pa(k),K=0;K<G;++K)ne=B[K],z=yn(ne,this),O.touch0&&O.touch0[2]===ne.identifier?O.touch0[0]=z:O.touch1&&O.touch1[2]===ne.identifier&&(O.touch1[0]=z);if(ne=O.that.__zoom,O.touch1){var P=O.touch0[0],ee=O.touch0[1],ce=O.touch1[0],he=O.touch1[1],ue=(ue=ce[0]-P[0])*ue+(ue=ce[1]-P[1])*ue,te=(te=he[0]-ee[0])*te+(te=he[1]-ee[1])*te;ne=C(ne,Math.sqrt(ue/te)),z=[(P[0]+ce[0])/2,(P[1]+ce[1])/2],$=[(ee[0]+he[0])/2,(ee[1]+he[1])/2]}else if(O.touch0)z=O.touch0[0],$=O.touch0[1];else return;O.zoom("touch",s(x(ne,z,$),O.extent,u))}}function ae(k,...Y){if(this.__zooming){var O=D(this,Y).event(k),B=k.changedTouches,G=B.length,K,ne;for($d(k),y&&clearTimeout(y),y=setTimeout(function(){y=null},w),K=0;K<G;++K)ne=B[K],O.touch0&&O.touch0[2]===ne.identifier?delete O.touch0:O.touch1&&O.touch1[2]===ne.identifier&&delete O.touch1;if(O.touch1&&!O.touch0&&(O.touch0=O.touch1,delete O.touch1),O.touch0)O.touch0[1]=this.__zoom.invert(O.touch0[0]);else if(O.end(),O.taps===2&&(ne=yn(ne,this),Math.hypot(p[0]-ne[0],p[1]-ne[1])<N)){var z=Zt(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return S.wheelDelta=function(k){return arguments.length?(a=typeof k=="function"?k:sc(+k),S):a},S.filter=function(k){return arguments.length?(t=typeof k=="function"?k:sc(!!k),S):t},S.touchable=function(k){return arguments.length?(r=typeof k=="function"?k:sc(!!k),S):r},S.extent=function(k){return arguments.length?(i=typeof k=="function"?k:sc([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),S):i},S.scaleExtent=function(k){return arguments.length?(c[0]=+k[0],c[1]=+k[1],S):[c[0],c[1]]},S.translateExtent=function(k){return arguments.length?(u[0][0]=+k[0][0],u[1][0]=+k[1][0],u[0][1]=+k[0][1],u[1][1]=+k[1][1],S):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},S.constrain=function(k){return arguments.length?(s=k,S):s},S.duration=function(k){return arguments.length?(h=+k,S):h},S.interpolate=function(k){return arguments.length?(m=k,S):m},S.on=function(){var k=g.on.apply(g,arguments);return k===g?S:k},S.clickDistance=function(k){return arguments.length?(E=(k=+k)*k,S):Math.sqrt(E)},S.tapDistance=function(k){return arguments.length?(N=+k,S):N},S}const wn={error001:(t="react")=>`Seems like you have not used zustand provider as an ancestor. Help: https://${t}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:i,sourceHandle:s,targetHandle:a})=>`Couldn't create edge for ${t} handle id: "${t==="source"?s:a}", edge id: ${i}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:t=>`Edge with id "${t}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},ho=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],o1=["Enter"," ","Escape"],r1={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:i,y:s})=>`Moved selected node ${t}. New position, x: ${i}, y: ${s}`,"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 $l;(function(t){t.Strict="strict",t.Loose="loose"})($l||($l={}));var xs;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(xs||(xs={}));var mo;(function(t){t.Partial="partial",t.Full="full"})(mo||(mo={}));const c1={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Yi;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Yi||(Yi={}));var go;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(go||(go={}));var me;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(me||(me={}));const y0={[me.Left]:me.Right,[me.Right]:me.Left,[me.Top]:me.Bottom,[me.Bottom]:me.Top};function u1(t){return t===null?null:t?"valid":"invalid"}const f1=t=>"id"in t&&"source"in t&&"target"in t,fN=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),Bh=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),No=(t,i=[0,0])=>{const{width:s,height:a}=ri(t),r=t.origin??i,c=s*r[0],u=a*r[1];return{x:t.position.x-c,y:t.position.y-u}},dN=(t,i={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const s=t.reduce((a,r)=>{const c=typeof r=="string";let u=!i.nodeLookup&&!c?r:void 0;i.nodeLookup&&(u=c?i.nodeLookup.get(r):Bh(r)?r:i.nodeLookup.get(r.id));const h=u?Dc(u,i.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Xc(a,h)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Kc(s)},Ao=(t,i={})=>{let s={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return t.forEach(r=>{(i.filter===void 0||i.filter(r))&&(s=Xc(s,Dc(r)),a=!0)}),a?Kc(s):{x:0,y:0,width:0,height:0}},Hh=(t,i,[s,a,r]=[0,0,1],c=!1,u=!1)=>{const h={...Kl(i,[s,a,r]),width:i.width/r,height:i.height/r},m=[];for(const g of t.values()){const{measured:v,selectable:p=!0,hidden:y=!1}=g;if(u&&!p||y)continue;const w=v.width??g.width??g.initialWidth??null,_=v.height??g.height??g.initialHeight??null,E=po(h,ql(g)),N=(w??0)*(_??0),S=c&&E>0;(!g.internals.handleBounds||S||E>=N||g.dragging)&&m.push(g)}return m},hN=(t,i)=>{const s=new Set;return t.forEach(a=>{s.add(a.id)}),i.filter(a=>s.has(a.source)||s.has(a.target))};function mN(t,i){const s=new Map,a=i?.nodes?new Set(i.nodes.map(r=>r.id)):null;return t.forEach(r=>{r.measured.width&&r.measured.height&&(i?.includeHiddenNodes||!r.hidden)&&(!a||a.has(r.id))&&s.set(r.id,r)}),s}async function gN({nodes:t,width:i,height:s,panZoom:a,minZoom:r,maxZoom:c},u){if(t.size===0)return!0;const h=mN(t,u),m=Ao(h),g=Uh(m,i,s,u?.minZoom??r,u?.maxZoom??c,u?.padding??.1);return await a.setViewport(g,{duration:u?.duration,ease:u?.ease,interpolate:u?.interpolate}),!0}function d1({nodeId:t,nextPosition:i,nodeLookup:s,nodeOrigin:a=[0,0],nodeExtent:r,onError:c}){const u=s.get(t),h=u.parentId?s.get(u.parentId):void 0,{x:m,y:g}=h?h.internals.positionAbsolute:{x:0,y:0},v=u.origin??a;let p=u.extent||r;if(u.extent==="parent"&&!u.expandParent)if(!h)c?.("005",wn.error005());else{const w=h.measured.width,_=h.measured.height;w&&_&&(p=[[m,g],[m+w,g+_]])}else h&&As(u.extent)&&(p=[[u.extent[0][0]+m,u.extent[0][1]+g],[u.extent[1][0]+m,u.extent[1][1]+g]]);const y=As(p)?Ns(i,p,u.measured):i;return(u.measured.width===void 0||u.measured.height===void 0)&&c?.("015",wn.error015()),{position:{x:y.x-m+(u.measured.width??0)*v[0],y:y.y-g+(u.measured.height??0)*v[1]},positionAbsolute:y}}async function pN({nodesToRemove:t=[],edgesToRemove:i=[],nodes:s,edges:a,onBeforeDelete:r}){const c=new Set(t.map(y=>y.id)),u=[];for(const y of s){if(y.deletable===!1)continue;const w=c.has(y.id),_=!w&&y.parentId&&u.find(E=>E.id===y.parentId);(w||_)&&u.push(y)}const h=new Set(i.map(y=>y.id)),m=a.filter(y=>y.deletable!==!1),v=hN(u,m);for(const y of m)h.has(y.id)&&!v.find(_=>_.id===y.id)&&v.push(y);if(!r)return{edges:v,nodes:u};const p=await r({nodes:u,edges:v});return typeof p=="boolean"?p?{edges:v,nodes:u}:{edges:[],nodes:[]}:p}const Ul=(t,i=0,s=1)=>Math.min(Math.max(t,i),s),Ns=(t={x:0,y:0},i,s)=>({x:Ul(t.x,i[0][0],i[1][0]-(s?.width??0)),y:Ul(t.y,i[0][1],i[1][1]-(s?.height??0))});function h1(t,i,s){const{width:a,height:r}=ri(s),{x:c,y:u}=s.internals.positionAbsolute;return Ns(t,[[c,u],[c+a,u+r]],i)}const v0=(t,i,s)=>t<i?Ul(Math.abs(t-i),1,i)/i:t>s?-Ul(Math.abs(t-s),1,i)/i:0,$h=(t,i,s=15,a=40)=>{const r=v0(t.x,a,i.width-a)*s,c=v0(t.y,a,i.height-a)*s;return[r,c]},Xc=(t,i)=>({x:Math.min(t.x,i.x),y:Math.min(t.y,i.y),x2:Math.max(t.x2,i.x2),y2:Math.max(t.y2,i.y2)}),mh=({x:t,y:i,width:s,height:a})=>({x:t,y:i,x2:t+s,y2:i+a}),Kc=({x:t,y:i,x2:s,y2:a})=>({x:t,y:i,width:s-t,height:a-i}),ql=(t,i=[0,0])=>{const{x:s,y:a}=Bh(t)?t.internals.positionAbsolute:No(t,i);return{x:s,y:a,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},Dc=(t,i=[0,0])=>{const{x:s,y:a}=Bh(t)?t.internals.positionAbsolute:No(t,i);return{x:s,y:a,x2:s+(t.measured?.width??t.width??t.initialWidth??0),y2:a+(t.measured?.height??t.height??t.initialHeight??0)}},m1=(t,i)=>Kc(Xc(mh(t),mh(i))),po=(t,i)=>{const s=Math.max(0,Math.min(t.x+t.width,i.x+i.width)-Math.max(t.x,i.x)),a=Math.max(0,Math.min(t.y+t.height,i.y+i.height)-Math.max(t.y,i.y));return Math.ceil(s*a)},b0=t=>bn(t.width)&&bn(t.height)&&bn(t.x)&&bn(t.y),bn=t=>!isNaN(t)&&isFinite(t),g1=(t,i)=>(s,a)=>{},To=(t,i=[1,1])=>({x:i[0]*Math.round(t.x/i[0]),y:i[1]*Math.round(t.y/i[1])}),Kl=({x:t,y:i},[s,a,r],c=!1,u=[1,1])=>{const h={x:(t-s)/r,y:(i-a)/r};return c?To(h,u):h},Vl=({x:t,y:i},[s,a,r])=>({x:t*r+s,y:i*r+a});function Sl(t,i){if(typeof t=="number")return Math.floor((i-i/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const s=parseFloat(t);if(!Number.isNaN(s))return Math.floor(s)}if(typeof t=="string"&&t.endsWith("%")){const s=parseFloat(t);if(!Number.isNaN(s))return Math.floor(i*s*.01)}return console.error(`The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function yN(t,i,s){if(typeof t=="string"||typeof t=="number"){const a=Sl(t,s),r=Sl(t,i);return{top:a,right:r,bottom:a,left:r,x:r*2,y:a*2}}if(typeof t=="object"){const a=Sl(t.top??t.y??0,s),r=Sl(t.bottom??t.y??0,s),c=Sl(t.left??t.x??0,i),u=Sl(t.right??t.x??0,i);return{top:a,right:u,bottom:r,left:c,x:c+u,y:a+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function vN(t,i,s,a,r,c){const{x:u,y:h}=Vl(t,[i,s,a]),{x:m,y:g}=Vl({x:t.x+t.width,y:t.y+t.height},[i,s,a]),v=r-m,p=c-g;return{left:Math.floor(u),top:Math.floor(h),right:Math.floor(v),bottom:Math.floor(p)}}const Uh=(t,i,s,a,r,c)=>{const u=yN(c,i,s),h=(i-u.x)/t.width,m=(s-u.y)/t.height,g=Math.min(h,m),v=Ul(g,a,r),p=t.x+t.width/2,y=t.y+t.height/2,w=i/2-p*v,_=s/2-y*v,E=vN(t,w,_,v,i,s),N={left:Math.min(E.left-u.left,0),top:Math.min(E.top-u.top,0),right:Math.min(E.right-u.right,0),bottom:Math.min(E.bottom-u.bottom,0)};return{x:w-N.left+N.right,y:_-N.top+N.bottom,zoom:v}},yo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function As(t){return t!=null&&t!=="parent"}function ri(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function p1(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function y1(t,i={width:0,height:0},s,a,r){const c={...t},u=a.get(s);if(u){const h=u.origin||r;c.x+=u.internals.positionAbsolute.x-(i.width??0)*h[0],c.y+=u.internals.positionAbsolute.y-(i.height??0)*h[1]}return c}function S0(t,i){if(t.size!==i.size)return!1;for(const s of t)if(!i.has(s))return!1;return!0}function bN(){let t,i;return{promise:new Promise((a,r)=>{t=a,i=r}),resolve:t,reject:i}}function SN(t){return{...r1,...t||{}}}function lo(t,{snapGrid:i=[0,0],snapToGrid:s=!1,transform:a,containerBounds:r}){const{x:c,y:u}=Sn(t),h=Kl({x:c-(r?.left??0),y:u-(r?.top??0)},a),{x:m,y:g}=s?To(h,i):h;return{xSnapped:m,ySnapped:g,...h}}const qh=t=>({width:t.offsetWidth,height:t.offsetHeight}),v1=t=>t?.getRootNode?.()||window?.document,wN=["INPUT","SELECT","TEXTAREA"];function b1(t){const i=t.composedPath?.()?.[0]||t.target;return i?.nodeType!==1?!1:wN.includes(i.nodeName)||i.hasAttribute("contenteditable")||!!i.closest(".nokey")}const S1=t=>"clientX"in t,Sn=(t,i)=>{const s=S1(t),a=s?t.clientX:t.touches?.[0].clientX,r=s?t.clientY:t.touches?.[0].clientY;return{x:a-(i?.left??0),y:r-(i?.top??0)}},w0=(t,i,s,a,r)=>{const c=i.querySelectorAll(`.${t}`);return!c||!c.length?null:Array.from(c).map(u=>{const h=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:t,nodeId:r,position:u.getAttribute("data-handlepos"),x:(h.left-s.left)/a,y:(h.top-s.top)/a,...qh(u)}})};function w1({sourceX:t,sourceY:i,targetX:s,targetY:a,sourceControlX:r,sourceControlY:c,targetControlX:u,targetControlY:h}){const m=t*.125+r*.375+u*.375+s*.125,g=i*.125+c*.375+h*.375+a*.125,v=Math.abs(m-t),p=Math.abs(g-i);return[m,g,v,p]}function lc(t,i){return t>=0?.5*t:i*25*Math.sqrt(-t)}function x0({pos:t,x1:i,y1:s,x2:a,y2:r,c}){switch(t){case me.Left:return[i-lc(i-a,c),s];case me.Right:return[i+lc(a-i,c),s];case me.Top:return[i,s-lc(s-r,c)];case me.Bottom:return[i,s+lc(r-s,c)]}}function x1({sourceX:t,sourceY:i,sourcePosition:s=me.Bottom,targetX:a,targetY:r,targetPosition:c=me.Top,curvature:u=.25}){const[h,m]=x0({pos:s,x1:t,y1:i,x2:a,y2:r,c:u}),[g,v]=x0({pos:c,x1:a,y1:r,x2:t,y2:i,c:u}),[p,y,w,_]=w1({sourceX:t,sourceY:i,targetX:a,targetY:r,sourceControlX:h,sourceControlY:m,targetControlX:g,targetControlY:v});return[`M${t},${i} C${h},${m} ${g},${v} ${a},${r}`,p,y,w,_]}function E1({sourceX:t,sourceY:i,targetX:s,targetY:a}){const r=Math.abs(s-t)/2,c=s<t?s+r:s-r,u=Math.abs(a-i)/2,h=a<i?a+u:a-u;return[c,h,r,u]}function xN({sourceNode:t,targetNode:i,selected:s=!1,zIndex:a=0,elevateOnSelect:r=!1,zIndexMode:c="basic"}){if(c==="manual")return a;const u=r&&s?a+1e3:a,h=Math.max(t.parentId||r&&t.selected?t.internals.z:0,i.parentId||r&&i.selected?i.internals.z:0);return u+h}function EN({sourceNode:t,targetNode:i,width:s,height:a,transform:r}){const c=Xc(Dc(t),Dc(i));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u={x:-r[0]/r[2],y:-r[1]/r[2],width:s/r[2],height:a/r[2]};return po(u,Kc(c))>0}const _N=({source:t,sourceHandle:i,target:s,targetHandle:a})=>`xy-edge__${t}${i||""}-${s}${a||""}`,NN=(t,i)=>i.some(s=>s.source===t.source&&s.target===t.target&&(s.sourceHandle===t.sourceHandle||!s.sourceHandle&&!t.sourceHandle)&&(s.targetHandle===t.targetHandle||!s.targetHandle&&!t.targetHandle)),AN=(t,i,s={})=>{if(!t.source||!t.target)return s.onError?.("006",wn.error006()),i;const a=s.getEdgeId||_N;let r;return f1(t)?r={...t}:r={...t,id:a(t)},NN(r,i)?i:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,i.concat(r))};function _1({sourceX:t,sourceY:i,targetX:s,targetY:a}){const[r,c,u,h]=E1({sourceX:t,sourceY:i,targetX:s,targetY:a});return[`M ${t},${i}L ${s},${a}`,r,c,u,h]}const E0={[me.Left]:{x:-1,y:0},[me.Right]:{x:1,y:0},[me.Top]:{x:0,y:-1},[me.Bottom]:{x:0,y:1}},TN=({source:t,sourcePosition:i=me.Bottom,target:s})=>i===me.Left||i===me.Right?t.x<s.x?{x:1,y:0}:{x:-1,y:0}:t.y<s.y?{x:0,y:1}:{x:0,y:-1},_0=(t,i)=>Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));function MN({source:t,sourcePosition:i=me.Bottom,target:s,targetPosition:a=me.Top,center:r,offset:c,stepPosition:u}){const h=E0[i],m=E0[a],g={x:t.x+h.x*c,y:t.y+h.y*c},v={x:s.x+m.x*c,y:s.y+m.y*c},p=TN({source:g,sourcePosition:i,target:v}),y=p.x!==0?"x":"y",w=p[y];let _=[],E,N;const S={x:0,y:0},C={x:0,y:0},[,,x,T]=E1({sourceX:t.x,sourceY:t.y,targetX:s.x,targetY:s.y});if(h[y]*m[y]===-1){y==="x"?(E=r.x??g.x+(v.x-g.x)*u,N=r.y??(g.y+v.y)/2):(E=r.x??(g.x+v.x)/2,N=r.y??g.y+(v.y-g.y)*u);const j=[{x:E,y:g.y},{x:E,y:v.y}],q=[{x:g.x,y:N},{x:v.x,y:N}];h[y]===w?_=y==="x"?j:q:_=y==="x"?q:j}else{const j=[{x:g.x,y:v.y}],q=[{x:v.x,y:g.y}];if(y==="x"?_=h.x===w?q:j:_=h.y===w?j:q,i===a){const k=Math.abs(t[y]-s[y]);if(k<=c){const Y=Math.min(c-1,c-k);h[y]===w?S[y]=(g[y]>t[y]?-1:1)*Y:C[y]=(v[y]>s[y]?-1:1)*Y}}if(i!==a){const k=y==="x"?"y":"x",Y=h[y]===m[k],O=g[k]>v[k],B=g[k]<v[k];(h[y]===1&&(!Y&&O||Y&&B)||h[y]!==1&&(!Y&&B||Y&&O))&&(_=y==="x"?j:q)}const le={x:g.x+S.x,y:g.y+S.y},X={x:v.x+C.x,y:v.y+C.y},I=Math.max(Math.abs(le.x-_[0].x),Math.abs(X.x-_[0].x)),ae=Math.max(Math.abs(le.y-_[0].y),Math.abs(X.y-_[0].y));I>=ae?(E=(le.x+X.x)/2,N=_[0].y):(E=_[0].x,N=(le.y+X.y)/2)}const L={x:g.x+S.x,y:g.y+S.y},D={x:v.x+C.x,y:v.y+C.y};return[[t,...L.x!==_[0].x||L.y!==_[0].y?[L]:[],..._,...D.x!==_[_.length-1].x||D.y!==_[_.length-1].y?[D]:[],s],E,N,x,T]}function CN(t,i,s,a){const r=Math.min(_0(t,i)/2,_0(i,s)/2,a),{x:c,y:u}=i;if(t.x===c&&c===s.x||t.y===u&&u===s.y)return`L${c} ${u}`;if(t.y===u){const g=t.x<s.x?-1:1,v=t.y<s.y?1:-1;return`L ${c+r*g},${u}Q ${c},${u} ${c},${u+r*v}`}const h=t.x<s.x?1:-1,m=t.y<s.y?-1:1;return`L ${c},${u+r*m}Q ${c},${u} ${c+r*h},${u}`}function gh({sourceX:t,sourceY:i,sourcePosition:s=me.Bottom,targetX:a,targetY:r,targetPosition:c=me.Top,borderRadius:u=5,centerX:h,centerY:m,offset:g=20,stepPosition:v=.5}){const[p,y,w,_,E]=MN({source:{x:t,y:i},sourcePosition:s,target:{x:a,y:r},targetPosition:c,center:{x:h,y:m},offset:g,stepPosition:v});let N=`M${p[0].x} ${p[0].y}`;for(let S=1;S<p.length-1;S++)N+=CN(p[S-1],p[S],p[S+1],u);return N+=`L${p[p.length-1].x} ${p[p.length-1].y}`,[N,y,w,_,E]}function N0(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function ON(t){const{sourceNode:i,targetNode:s}=t;if(!N0(i)||!N0(s))return null;const a=i.internals.handleBounds||A0(i.handles),r=s.internals.handleBounds||A0(s.handles),c=T0(a?.source??[],t.sourceHandle),u=T0(t.connectionMode===$l.Strict?r?.target??[]:(r?.target??[]).concat(r?.source??[]),t.targetHandle);if(!c||!u)return t.onError?.("008",wn.error008(c?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const h=c?.position||me.Bottom,m=u?.position||me.Top,g=Ts(i,c,h),v=Ts(s,u,m);return{sourceX:g.x,sourceY:g.y,targetX:v.x,targetY:v.y,sourcePosition:h,targetPosition:m}}function A0(t){if(!t)return null;const i=[],s=[];for(const a of t)a.width=a.width??1,a.height=a.height??1,a.type==="source"?i.push(a):a.type==="target"&&s.push(a);return{source:i,target:s}}function Ts(t,i,s=me.Left,a=!1){const r=(i?.x??0)+t.internals.positionAbsolute.x,c=(i?.y??0)+t.internals.positionAbsolute.y,{width:u,height:h}=i??ri(t);if(a)return{x:r+u/2,y:c+h/2};switch(i?.position??s){case me.Top:return{x:r+u/2,y:c};case me.Right:return{x:r+u,y:c+h/2};case me.Bottom:return{x:r+u/2,y:c+h};case me.Left:return{x:r,y:c+h/2}}}function T0(t,i){return t&&(i?t.find(s=>s.id===i):t[0])||null}function ph(t,i){return t?typeof t=="string"?t:`${i?`${i}__`:""}${Object.keys(t).sort().map(a=>`${a}=${t[a]}`).join("&")}`:""}function zN(t,{id:i,defaultColor:s,defaultMarkerStart:a,defaultMarkerEnd:r}){const c=new Set;return t.reduce((u,h)=>([h.markerStart||a,h.markerEnd||r].forEach(m=>{if(m&&typeof m=="object"){const g=ph(m,i);c.has(g)||(u.push({id:g,color:m.color||s,...m}),c.add(g))}}),u),[]).sort((u,h)=>u.id.localeCompare(h.id))}const N1=1e3,DN=10,Vh={nodeOrigin:[0,0],nodeExtent:ho,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},LN={...Vh,checkEquality:!0};function Yh(t,i){const s={...t};for(const a in i)i[a]!==void 0&&(s[a]=i[a]);return s}function jN(t,i,s){const a=Yh(Vh,s);for(const r of t.values())if(r.parentId)Xh(r,t,i,a);else{const c=No(r,a.nodeOrigin),u=As(r.extent)?r.extent:a.nodeExtent,h=Ns(c,u,ri(r));r.internals.positionAbsolute=h}}function RN(t,i){if(!t.handles)return t.measured?i?.internals.handleBounds:void 0;const s=[],a=[];for(const r of t.handles){const c={id:r.id,width:r.width??1,height:r.height??1,nodeId:t.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?s.push(c):r.type==="target"&&a.push(c)}return{source:s,target:a}}function Gh(t){return t==="manual"}function yh(t,i,s,a={}){const r=Yh(LN,a),c={i:0},u=new Map(i),h=r?.elevateNodesOnSelect&&!Gh(r.zIndexMode)?N1:0;let m=t.length>0,g=!1;i.clear(),s.clear();for(const v of t){let p=u.get(v.id);if(r.checkEquality&&v===p?.internals.userNode)i.set(v.id,p);else{const y=No(v,r.nodeOrigin),w=As(v.extent)?v.extent:r.nodeExtent,_=Ns(y,w,ri(v));p={...r.defaults,...v,measured:{width:v.measured?.width,height:v.measured?.height},internals:{positionAbsolute:_,handleBounds:RN(v,p),z:A1(v,h,r.zIndexMode),userNode:v}},i.set(v.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(m=!1),v.parentId&&Xh(p,i,s,a,c),g||=v.selected??!1}return{nodesInitialized:m,hasSelectedNodes:g}}function kN(t,i){if(!t.parentId)return;const s=i.get(t.parentId);s?s.set(t.id,t):i.set(t.parentId,new Map([[t.id,t]]))}function Xh(t,i,s,a,r){const{elevateNodesOnSelect:c,nodeOrigin:u,nodeExtent:h,zIndexMode:m}=Yh(Vh,a),g=t.parentId,v=i.get(g);if(!v){console.warn(`Parent node ${g} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}kN(t,s),r&&!v.parentId&&v.internals.rootParentIndex===void 0&&m==="auto"&&(v.internals.rootParentIndex=++r.i,v.internals.z=v.internals.z+r.i*DN),r&&v.internals.rootParentIndex!==void 0&&(r.i=v.internals.rootParentIndex);const p=c&&!Gh(m)?N1:0,{x:y,y:w,z:_}=BN(t,v,u,h,p,m),{positionAbsolute:E}=t.internals,N=y!==E.x||w!==E.y;(N||_!==t.internals.z)&&i.set(t.id,{...t,internals:{...t.internals,positionAbsolute:N?{x:y,y:w}:E,z:_}})}function A1(t,i,s){const a=bn(t.zIndex)?t.zIndex:0;return Gh(s)?a:a+(t.selected?i:0)}function BN(t,i,s,a,r,c){const{x:u,y:h}=i.internals.positionAbsolute,m=ri(t),g=No(t,s),v=As(t.extent)?Ns(g,t.extent,m):g;let p=Ns({x:u+v.x,y:h+v.y},a,m);t.extent==="parent"&&(p=h1(p,m,i));const y=A1(t,r,c),w=i.internals.z??0;return{x:p.x,y:p.y,z:w>=y?w+1:y}}function Kh(t,i,s,a=[0,0]){const r=[],c=new Map;for(const u of t){const h=i.get(u.parentId);if(!h)continue;const m=c.get(u.parentId)?.expandedRect??ql(h),g=m1(m,u.rect);c.set(u.parentId,{expandedRect:g,parent:h})}return c.size>0&&c.forEach(({expandedRect:u,parent:h},m)=>{const g=h.internals.positionAbsolute,v=ri(h),p=h.origin??a,y=u.x<g.x?Math.round(Math.abs(g.x-u.x)):0,w=u.y<g.y?Math.round(Math.abs(g.y-u.y)):0,_=Math.max(v.width,Math.round(u.width)),E=Math.max(v.height,Math.round(u.height)),N=(_-v.width)*p[0],S=(E-v.height)*p[1];(y>0||w>0||N||S)&&(r.push({id:m,type:"position",position:{x:h.position.x-y+N,y:h.position.y-w+S}}),s.get(m)?.forEach(C=>{t.some(x=>x.id===C.id)||r.push({id:C.id,type:"position",position:{x:C.position.x+y,y:C.position.y+w}})})),(v.width<u.width||v.height<u.height||y||w)&&r.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:_+(y?p[0]*y-N:0),height:E+(w?p[1]*w-S:0)}})}),r}function HN(t,i,s,a,r,c,u){const h=a?.querySelector(".xyflow__viewport");let m=!1;if(!h)return{changes:[],updatedInternals:m};const g=[],v=window.getComputedStyle(h),{m22:p}=new window.DOMMatrixReadOnly(v.transform),y=[];for(const w of t.values()){const _=i.get(w.id);if(!_)continue;if(_.hidden){i.set(_.id,{..._,internals:{..._.internals,handleBounds:void 0}}),m=!0;continue}const E=qh(w.nodeElement),N=_.measured.width!==E.width||_.measured.height!==E.height;if(!!(E.width&&E.height&&(N||!_.internals.handleBounds||w.force))){const C=w.nodeElement.getBoundingClientRect(),x=As(_.extent)?_.extent:c;let{positionAbsolute:T}=_.internals;_.parentId&&_.extent==="parent"?T=h1(T,E,i.get(_.parentId)):x&&(T=Ns(T,x,E));const L={..._,measured:E,internals:{..._.internals,positionAbsolute:T,handleBounds:{source:w0("source",w.nodeElement,C,p,_.id),target:w0("target",w.nodeElement,C,p,_.id)}}};i.set(_.id,L),_.parentId&&Xh(L,i,s,{nodeOrigin:r,zIndexMode:u}),m=!0,N&&(g.push({id:_.id,type:"dimensions",dimensions:E}),_.expandParent&&_.parentId&&y.push({id:_.id,parentId:_.parentId,rect:ql(L,r)}))}}if(y.length>0){const w=Kh(y,i,s,r);g.push(...w)}return{changes:g,updatedInternals:m}}async function $N({delta:t,panZoom:i,transform:s,translateExtent:a,width:r,height:c}){if(!i||!t.x&&!t.y)return!1;const u=await i.setViewportConstrained({x:s[0]+t.x,y:s[1]+t.y,zoom:s[2]},[[0,0],[r,c]],a);return!!u&&(u.x!==s[0]||u.y!==s[1]||u.k!==s[2])}function M0(t,i,s,a,r,c){let u=r;const h=a.get(u)||new Map;a.set(u,h.set(s,i)),u=`${r}-${t}`;const m=a.get(u)||new Map;if(a.set(u,m.set(s,i)),c){u=`${r}-${t}-${c}`;const g=a.get(u)||new Map;a.set(u,g.set(s,i))}}function T1(t,i,s){t.clear(),i.clear();for(const a of s){const{source:r,target:c,sourceHandle:u=null,targetHandle:h=null}=a,m={edgeId:a.id,source:r,target:c,sourceHandle:u,targetHandle:h},g=`${r}-${u}--${c}-${h}`,v=`${c}-${h}--${r}-${u}`;M0("source",m,v,t,r,u),M0("target",m,g,t,c,h),i.set(a.id,a)}}function M1(t,i){if(!t.parentId)return!1;const s=i.get(t.parentId);return s?s.selected?!0:M1(s,i):!1}function C0(t,i,s){let a=t;do{if(a?.matches?.(i))return!0;if(a===s)return!1;a=a?.parentElement}while(a);return!1}function UN(t,i,s,a){const r=new Map;for(const[c,u]of t)if((u.selected||u.id===a)&&(!u.parentId||!M1(u,t))&&(u.draggable||i&&typeof u.draggable>"u")){const h=t.get(c);h&&r.set(c,{id:c,position:h.position||{x:0,y:0},distance:{x:s.x-h.internals.positionAbsolute.x,y:s.y-h.internals.positionAbsolute.y},extent:h.extent,parentId:h.parentId,origin:h.origin,expandParent:h.expandParent,internals:{positionAbsolute:h.internals.positionAbsolute||{x:0,y:0}},measured:{width:h.measured.width??0,height:h.measured.height??0}})}return r}function Ud({nodeId:t,dragItems:i,nodeLookup:s,dragging:a=!0}){const r=[];for(const[u,h]of i){const m=s.get(u)?.internals.userNode;m&&r.push({...m,position:h.position,dragging:a})}if(!t)return[r[0],r];const c=s.get(t)?.internals.userNode;return[c?{...c,position:i.get(t)?.position||c.position,dragging:a}:r[0],r]}function qN({dragItems:t,snapGrid:i,x:s,y:a}){const r=t.values().next().value;if(!r)return null;const c={x:s-r.distance.x,y:a-r.distance.y},u=To(c,i);return{x:u.x-c.x,y:u.y-c.y}}function VN({onNodeMouseDown:t,getStoreItems:i,onDragStart:s,onDrag:a,onDragStop:r}){let c={x:null,y:null},u=0,h=new Map,m=!1,g={x:0,y:0},v=null,p=!1,y=null,w=!1,_=!1,E=null;function N({noDragClassName:C,handleSelector:x,domNode:T,isSelectable:L,nodeId:D,nodeClickDistance:R=0}){y=Zt(T);function j({x:I,y:ae}){const{nodeLookup:k,nodeExtent:Y,snapGrid:O,snapToGrid:B,nodeOrigin:G,onNodeDrag:K,onSelectionDrag:ne,onError:z,updateNodePositions:$}=i();c={x:I,y:ae};let P=!1;const ee=h.size>1,ce=ee&&Y?mh(Ao(h)):null,he=ee&&B?qN({dragItems:h,snapGrid:O,x:I,y:ae}):null;for(const[ue,te]of h){if(!k.has(ue))continue;let de={x:I-te.distance.x,y:ae-te.distance.y};B&&(de=he?{x:Math.round(de.x+he.x),y:Math.round(de.y+he.y)}:To(de,O));let we=null;if(ee&&Y&&!te.extent&&ce){const{positionAbsolute:fe}=te.internals,ye=fe.x-ce.x+Y[0][0],xe=fe.x+te.measured.width-ce.x2+Y[1][0],ke=fe.y-ce.y+Y[0][1],ut=fe.y+te.measured.height-ce.y2+Y[1][1];we=[[ye,ke],[xe,ut]]}const{position:Se,positionAbsolute:re}=d1({nodeId:ue,nextPosition:de,nodeLookup:k,nodeExtent:we||Y,nodeOrigin:G,onError:z});P=P||te.position.x!==Se.x||te.position.y!==Se.y,te.position=Se,te.internals.positionAbsolute=re}if(_=_||P,!!P&&($(h,!0),E&&(a||K||!D&&ne))){const[ue,te]=Ud({nodeId:D,dragItems:h,nodeLookup:k});a?.(E,h,ue,te),K?.(E,ue,te),D||ne?.(E,te)}}async function q(){if(!v)return;const{transform:I,panBy:ae,autoPanSpeed:k,autoPanOnNodeDrag:Y}=i();if(!Y){m=!1,cancelAnimationFrame(u);return}const[O,B]=$h(g,v,k);(O!==0||B!==0)&&(c.x=(c.x??0)-O/I[2],c.y=(c.y??0)-B/I[2],await ae({x:O,y:B})&&j(c)),u=requestAnimationFrame(q)}function le(I){const{nodeLookup:ae,multiSelectionActive:k,nodesDraggable:Y,transform:O,snapGrid:B,snapToGrid:G,selectNodesOnDrag:K,onNodeDragStart:ne,onSelectionDragStart:z,unselectNodesAndEdges:$}=i();p=!0,(!K||!L)&&!k&&D&&(ae.get(D)?.selected||$()),L&&K&&D&&t?.(D);const P=lo(I.sourceEvent,{transform:O,snapGrid:B,snapToGrid:G,containerBounds:v});if(c=P,h=UN(ae,Y,P,D),h.size>0&&(s||ne||!D&&z)){const[ee,ce]=Ud({nodeId:D,dragItems:h,nodeLookup:ae});s?.(I.sourceEvent,h,ee,ce),ne?.(I.sourceEvent,ee,ce),D||z?.(I.sourceEvent,ce)}}const X=Xv().clickDistance(R).on("start",I=>{const{domNode:ae,nodeDragThreshold:k,transform:Y,snapGrid:O,snapToGrid:B}=i();v=ae?.getBoundingClientRect()||null,w=!1,_=!1,E=I.sourceEvent,k===0&&le(I),c=lo(I.sourceEvent,{transform:Y,snapGrid:O,snapToGrid:B,containerBounds:v}),g=Sn(I.sourceEvent,v)}).on("drag",I=>{const{autoPanOnNodeDrag:ae,transform:k,snapGrid:Y,snapToGrid:O,nodeDragThreshold:B,nodeLookup:G}=i(),K=lo(I.sourceEvent,{transform:k,snapGrid:Y,snapToGrid:O,containerBounds:v});if(E=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||D&&!G.has(D))&&(w=!0),!w){if(!m&&ae&&p&&(m=!0,q()),!p){const ne=Sn(I.sourceEvent,v),z=ne.x-g.x,$=ne.y-g.y;Math.sqrt(z*z+$*$)>B&&le(I)}(c.x!==K.xSnapped||c.y!==K.ySnapped)&&h&&p&&(g=Sn(I.sourceEvent,v),j(K))}}).on("end",I=>{if(!p||w){w&&h.size>0&&i().updateNodePositions(h,!1);return}if(m=!1,p=!1,cancelAnimationFrame(u),h.size>0){const{nodeLookup:ae,updateNodePositions:k,onNodeDragStop:Y,onSelectionDragStop:O}=i();if(_&&(k(h,!1),_=!1),r||Y||!D&&O){const[B,G]=Ud({nodeId:D,dragItems:h,nodeLookup:ae,dragging:!1});r?.(I.sourceEvent,h,B,G),Y?.(I.sourceEvent,B,G),D||O?.(I.sourceEvent,G)}}}).filter(I=>{const ae=I.target;return!I.button&&(!C||!C0(ae,`.${C}`,T))&&(!x||C0(ae,x,T))});y.call(X)}function S(){y?.on(".drag",null)}return{update:N,destroy:S}}function YN(t,i,s){const a=[],r={x:t.x-s,y:t.y-s,width:s*2,height:s*2};for(const c of i.values())po(r,ql(c))>0&&a.push(c);return a}const GN=250;function XN(t,i,s,a){let r=[],c=1/0;const u=YN(t,s,i+GN);for(const h of u){const m=[...h.internals.handleBounds?.source??[],...h.internals.handleBounds?.target??[]];for(const g of m){if(a.nodeId===g.nodeId&&a.type===g.type&&a.id===g.id)continue;const{x:v,y:p}=Ts(h,g,g.position,!0),y=Math.sqrt(Math.pow(v-t.x,2)+Math.pow(p-t.y,2));y>i||(y<c?(r=[{...g,x:v,y:p}],c=y):y===c&&r.push({...g,x:v,y:p}))}}if(!r.length)return null;if(r.length>1){const h=a.type==="source"?"target":"source";return r.find(m=>m.type===h)??r[0]}return r[0]}function C1(t,i,s,a,r,c=!1){const u=a.get(t);if(!u)return null;const h=r==="strict"?u.internals.handleBounds?.[i]:[...u.internals.handleBounds?.source??[],...u.internals.handleBounds?.target??[]],m=(s?h?.find(g=>g.id===s):h?.[0])??null;return m&&c?{...m,...Ts(u,m,m.position,!0)}:m}function O1(t,i){return t||(i?.classList.contains("target")?"target":i?.classList.contains("source")?"source":null)}function KN(t,i){let s=null;return i?s=!0:t&&!i&&(s=!1),s}const z1=()=>!0;function ZN(t,{connectionMode:i,connectionRadius:s,handleId:a,nodeId:r,edgeUpdaterType:c,isTarget:u,domNode:h,nodeLookup:m,lib:g,autoPanOnConnect:v,flowId:p,panBy:y,cancelConnection:w,onConnectStart:_,onConnect:E,onConnectEnd:N,isValidConnection:S=z1,onReconnectEnd:C,updateConnection:x,getTransform:T,getFromHandle:L,autoPanSpeed:D,dragThreshold:R=1,handleDomNode:j}){const q=v1(t.target);let le=0,X;const{x:I,y:ae}=Sn(t),k=O1(c,j),Y=h?.getBoundingClientRect();let O=!1;if(!Y||!k)return;const B=C1(r,k,a,m,i);if(!B)return;let G=Sn(t,Y),K=!1,ne=null,z=!1,$=null;function P(){if(!v||!Y)return;const[Se,re]=$h(G,Y,D);y({x:Se,y:re}),le=requestAnimationFrame(P)}const ee={...B,nodeId:r,type:k,position:B.position},ce=m.get(r);let ue={inProgress:!0,isValid:null,from:Ts(ce,ee,me.Left,!0),fromHandle:ee,fromPosition:ee.position,fromNode:ce,to:G,toHandle:null,toPosition:y0[ee.position],toNode:null,pointer:G};function te(){O=!0,x(ue),_?.(t,{nodeId:r,handleId:a,handleType:k})}R===0&&te();function de(Se){if(!O){const{x:ut,y:Nt}=Sn(Se),At=ut-I,Tt=Nt-ae;if(!(At*At+Tt*Tt>R*R))return;te()}if(!L()||!ee){we(Se);return}const re=T();G=Sn(Se,Y),X=XN(Kl(G,re,!1,[1,1]),s,m,ee),K||(P(),K=!0);const fe=D1(Se,{handle:X,connectionMode:i,fromNodeId:r,fromHandleId:a,fromType:u?"target":"source",isValidConnection:S,doc:q,lib:g,flowId:p,nodeLookup:m});$=fe.handleDomNode,ne=fe.connection,z=KN(!!X,fe.isValid);const ye=m.get(r),xe=ye?Ts(ye,ee,me.Left,!0):ue.from,ke={...ue,from:xe,isValid:z,to:fe.toHandle&&z?Vl({x:fe.toHandle.x,y:fe.toHandle.y},re):G,toHandle:fe.toHandle,toPosition:z&&fe.toHandle?fe.toHandle.position:y0[ee.position],toNode:fe.toHandle?m.get(fe.toHandle.nodeId):null,pointer:G};x(ke),ue=ke}function we(Se){if(!("touches"in Se&&Se.touches.length>0)){if(O){(X||$)&&ne&&z&&E?.(ne);const{inProgress:re,...fe}=ue,ye={...fe,toPosition:ue.toHandle?ue.toPosition:null};N?.(Se,ye),c&&C?.(Se,ye)}w(),cancelAnimationFrame(le),K=!1,z=!1,ne=null,$=null,q.removeEventListener("mousemove",de),q.removeEventListener("mouseup",we),q.removeEventListener("touchmove",de),q.removeEventListener("touchend",we)}}q.addEventListener("mousemove",de),q.addEventListener("mouseup",we),q.addEventListener("touchmove",de),q.addEventListener("touchend",we)}function D1(t,{handle:i,connectionMode:s,fromNodeId:a,fromHandleId:r,fromType:c,doc:u,lib:h,flowId:m,isValidConnection:g=z1,nodeLookup:v}){const p=c==="target",y=i?u.querySelector(`.${h}-flow__handle[data-id="${m}-${i?.nodeId}-${i?.id}-${i?.type}"]`):null,{x:w,y:_}=Sn(t),E=u.elementFromPoint(w,_),N=E?.classList.contains(`${h}-flow__handle`)?E:y,S={handleDomNode:N,isValid:!1,connection:null,toHandle:null};if(N){const C=O1(void 0,N),x=N.getAttribute("data-nodeid"),T=N.getAttribute("data-handleid"),L=N.classList.contains("connectable"),D=N.classList.contains("connectableend");if(!x||!C)return S;const R={source:p?x:a,sourceHandle:p?T:r,target:p?a:x,targetHandle:p?r:T};S.connection=R;const q=L&&D&&(s===$l.Strict?p&&C==="source"||!p&&C==="target":x!==a||T!==r);S.isValid=q&&g(R),S.toHandle=C1(x,C,T,v,s,!0)}return S}const vh={onPointerDown:ZN,isValid:D1};function IN({domNode:t,panZoom:i,getTransform:s,getViewScale:a}){const r=Zt(t);function c({translateExtent:h,width:m,height:g,zoomStep:v=1,pannable:p=!0,zoomable:y=!0,inversePan:w=!1}){const _=x=>{if(x.sourceEvent.type!=="wheel"||!i)return;const T=s(),L=x.sourceEvent.ctrlKey&&yo()?10:1,D=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*v,R=T[2]*Math.pow(2,D*L);i.scaleTo(R)};let E=[0,0];const N=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(E=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},S=x=>{const T=s();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!i)return;const L=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],D=[L[0]-E[0],L[1]-E[1]];E=L;const R=a()*Math.max(T[2],Math.log(T[2]))*(w?-1:1),j={x:T[0]-D[0]*R,y:T[1]-D[1]*R},q=[[0,0],[m,g]];i.setViewportConstrained({x:j.x,y:j.y,zoom:T[2]},q,h)},C=a1().on("start",N).on("zoom",p?S:null).on("zoom.wheel",y?_:null);r.call(C,{})}function u(){r.on("zoom",null)}return{update:c,destroy:u,pointer:yn}}const Zc=t=>({x:t.x,y:t.y,zoom:t.k}),qd=({x:t,y:i,zoom:s})=>Gc.translate(t,i).scale(s),Nl=(t,i)=>t.target.closest(`.${i}`),L1=(t,i)=>i===2&&Array.isArray(t)&&t.includes(2),QN=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,Vd=(t,i=0,s=QN,a=()=>{})=>{const r=typeof i=="number"&&i>0;return r||a(),r?t.transition().duration(i).ease(s).on("end",a):t},j1=t=>{const i=t.ctrlKey&&yo()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*i};function JN({zoomPanValues:t,noWheelClassName:i,d3Selection:s,d3Zoom:a,panOnScrollMode:r,panOnScrollSpeed:c,zoomOnPinch:u,onPanZoomStart:h,onPanZoom:m,onPanZoomEnd:g}){return v=>{if(Nl(v,i))return v.ctrlKey&&v.preventDefault(),!1;v.preventDefault(),v.stopImmediatePropagation();const p=s.property("__zoom").k||1;if(v.ctrlKey&&u){const N=yn(v),S=j1(v),C=p*Math.pow(2,S);a.scaleTo(s,C,N,v);return}const y=v.deltaMode===1?20:1;let w=r===xs.Vertical?0:v.deltaX*y,_=r===xs.Horizontal?0:v.deltaY*y;!yo()&&v.shiftKey&&r!==xs.Vertical&&(w=v.deltaY*y,_=0),a.translateBy(s,-(w/p)*c,-(_/p)*c,{internal:!0});const E=Zc(s.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(m?.(v,E),t.panScrollTimeout=setTimeout(()=>{g?.(v,E),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,h?.(v,E))}}function FN({noWheelClassName:t,preventScrolling:i,d3ZoomHandler:s}){return function(a,r){const c=a.type==="wheel",u=!i&&c&&!a.ctrlKey,h=Nl(a,t);if(a.ctrlKey&&c&&h&&a.preventDefault(),u||h)return null;a.preventDefault(),s.call(this,a,r)}}function WN({zoomPanValues:t,onDraggingChange:i,onPanZoomStart:s}){return a=>{if(a.sourceEvent?.internal)return;const r=Zc(a.transform);t.mouseButton=a.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=r,a.sourceEvent?.type==="mousedown"&&i(!0),s&&s?.(a.sourceEvent,r)}}function PN({zoomPanValues:t,panOnDrag:i,onPaneContextMenu:s,onTransformChange:a,onPanZoom:r}){return c=>{t.usedRightMouseButton=!!(s&&L1(i,t.mouseButton??0)),c.sourceEvent?.sync||a([c.transform.x,c.transform.y,c.transform.k]),r&&!c.sourceEvent?.internal&&r?.(c.sourceEvent,Zc(c.transform))}}function eA({zoomPanValues:t,panOnDrag:i,panOnScroll:s,onDraggingChange:a,onPanZoomEnd:r,onPaneContextMenu:c}){return u=>{if(!u.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,c&&L1(i,t.mouseButton??0)&&!t.usedRightMouseButton&&u.sourceEvent&&c(u.sourceEvent),t.usedRightMouseButton=!1,a(!1),r)){const h=Zc(u.transform);t.prevViewport=h,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{r?.(u.sourceEvent,h)},s?150:0)}}}function tA({zoomActivationKeyPressed:t,zoomOnScroll:i,zoomOnPinch:s,panOnDrag:a,panOnScroll:r,zoomOnDoubleClick:c,userSelectionActive:u,noWheelClassName:h,noPanClassName:m,lib:g,connectionInProgress:v}){return p=>{const y=t||i,w=s&&p.ctrlKey,_=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Nl(p,`${g}-flow__node`)||Nl(p,`${g}-flow__edge`)))return!0;if(!a&&!y&&!r&&!c&&!s||u||v&&!_||Nl(p,h)&&_||Nl(p,m)&&(!_||r&&_&&!t)||!s&&p.ctrlKey&&_)return!1;if(!s&&p.type==="touchstart"&&p.touches?.length>1)return p.preventDefault(),!1;if(!y&&!r&&!w&&_||!a&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(a)&&!a.includes(p.button)&&p.type==="mousedown")return!1;const E=Array.isArray(a)&&a.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||_)&&E}}function nA({domNode:t,minZoom:i,maxZoom:s,translateExtent:a,viewport:r,onPanZoom:c,onPanZoomStart:u,onPanZoomEnd:h,onDraggingChange:m}){const g={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},v=t.getBoundingClientRect(),p=a1().scaleExtent([i,s]).translateExtent(a),y=Zt(t).call(p);C({x:r.x,y:r.y,zoom:Ul(r.zoom,i,s)},[[0,0],[v.width,v.height]],a);const w=y.on("wheel.zoom"),_=y.on("dblclick.zoom");p.wheelDelta(j1);async function E(X,I){return y?new Promise(ae=>{p?.interpolate(I?.interpolate==="linear"?so:pc).transform(Vd(y,I?.duration,I?.ease,()=>ae(!0)),X)}):!1}function N({noWheelClassName:X,noPanClassName:I,onPaneContextMenu:ae,userSelectionActive:k,panOnScroll:Y,panOnDrag:O,panOnScrollMode:B,panOnScrollSpeed:G,preventScrolling:K,zoomOnPinch:ne,zoomOnScroll:z,zoomOnDoubleClick:$,zoomActivationKeyPressed:P,lib:ee,onTransformChange:ce,connectionInProgress:he,paneClickDistance:ue,selectionOnDrag:te}){k&&!g.isZoomingOrPanning&&S();const de=Y&&!P&&!k;p.clickDistance(te?1/0:!bn(ue)||ue<0?0:ue);const we=de?JN({zoomPanValues:g,noWheelClassName:X,d3Selection:y,d3Zoom:p,panOnScrollMode:B,panOnScrollSpeed:G,zoomOnPinch:ne,onPanZoomStart:u,onPanZoom:c,onPanZoomEnd:h}):FN({noWheelClassName:X,preventScrolling:K,d3ZoomHandler:w});y.on("wheel.zoom",we,{passive:!1});const Se=WN({zoomPanValues:g,onDraggingChange:m,onPanZoomStart:u});p.on("start",Se);const re=PN({zoomPanValues:g,panOnDrag:O,onPaneContextMenu:!!ae,onPanZoom:c,onTransformChange:ce});p.on("zoom",re);const fe=eA({zoomPanValues:g,panOnDrag:O,panOnScroll:Y,onPaneContextMenu:ae,onPanZoomEnd:h,onDraggingChange:m});p.on("end",fe);const ye=tA({zoomActivationKeyPressed:P,panOnDrag:O,zoomOnScroll:z,panOnScroll:Y,zoomOnDoubleClick:$,zoomOnPinch:ne,userSelectionActive:k,noPanClassName:I,noWheelClassName:X,lib:ee,connectionInProgress:he});p.filter(ye),$?y.on("dblclick.zoom",_):y.on("dblclick.zoom",null)}function S(){p.on("zoom",null)}async function C(X,I,ae){const k=qd(X),Y=p?.constrain()(k,I,ae);return Y&&await E(Y),Y}async function x(X,I){const ae=qd(X);return await E(ae,I),ae}function T(X){if(y){const I=qd(X),ae=y.property("__zoom");(ae.k!==X.zoom||ae.x!==X.x||ae.y!==X.y)&&p?.transform(y,I,null,{sync:!0})}}function L(){const X=y?l1(y.node()):{x:0,y:0,k:1};return{x:X.x,y:X.y,zoom:X.k}}async function D(X,I){return y?new Promise(ae=>{p?.interpolate(I?.interpolate==="linear"?so:pc).scaleTo(Vd(y,I?.duration,I?.ease,()=>ae(!0)),X)}):!1}async function R(X,I){return y?new Promise(ae=>{p?.interpolate(I?.interpolate==="linear"?so:pc).scaleBy(Vd(y,I?.duration,I?.ease,()=>ae(!0)),X)}):!1}function j(X){p?.scaleExtent(X)}function q(X){p?.translateExtent(X)}function le(X){const I=!bn(X)||X<0?0:X;p?.clickDistance(I)}return{update:N,destroy:S,setViewport:x,setViewportConstrained:C,getViewport:L,scaleTo:D,scaleBy:R,setScaleExtent:j,setTranslateExtent:q,syncViewport:T,setClickDistance:le}}var Yl;(function(t){t.Line="line",t.Handle="handle"})(Yl||(Yl={}));function iA({width:t,prevWidth:i,height:s,prevHeight:a,affectsX:r,affectsY:c}){const u=t-i,h=s-a,m=[u>0?1:u<0?-1:0,h>0?1:h<0?-1:0];return u&&r&&(m[0]=m[0]*-1),h&&c&&(m[1]=m[1]*-1),m}function O0(t){const i=t.includes("right")||t.includes("left"),s=t.includes("bottom")||t.includes("top"),a=t.includes("left"),r=t.includes("top");return{isHorizontal:i,isVertical:s,affectsX:a,affectsY:r}}function Hi(t,i){return Math.max(0,i-t)}function $i(t,i){return Math.max(0,t-i)}function ac(t,i,s){return Math.max(0,i-t,t-s)}function z0(t,i){return t?!i:i}function sA(t,i,s,a,r,c,u,h){let{affectsX:m,affectsY:g}=i;const{isHorizontal:v,isVertical:p}=i,y=v&&p,{xSnapped:w,ySnapped:_}=s,{minWidth:E,maxWidth:N,minHeight:S,maxHeight:C}=a,{x,y:T,width:L,height:D,aspectRatio:R}=t;let j=Math.floor(v?w-t.pointerX:0),q=Math.floor(p?_-t.pointerY:0);const le=L+(m?-j:j),X=D+(g?-q:q),I=-c[0]*L,ae=-c[1]*D;let k=ac(le,E,N),Y=ac(X,S,C);if(u){let G=0,K=0;m&&j<0?G=Hi(x+j+I,u[0][0]):!m&&j>0&&(G=$i(x+le+I,u[1][0])),g&&q<0?K=Hi(T+q+ae,u[0][1]):!g&&q>0&&(K=$i(T+X+ae,u[1][1])),k=Math.max(k,G),Y=Math.max(Y,K)}if(h){let G=0,K=0;m&&j>0?G=$i(x+j,h[0][0]):!m&&j<0&&(G=Hi(x+le,h[1][0])),g&&q>0?K=$i(T+q,h[0][1]):!g&&q<0&&(K=Hi(T+X,h[1][1])),k=Math.max(k,G),Y=Math.max(Y,K)}if(r){if(v){const G=ac(le/R,S,C)*R;if(k=Math.max(k,G),u){let K=0;!m&&!g||m&&!g&&y?K=$i(T+ae+le/R,u[1][1])*R:K=Hi(T+ae+(m?j:-j)/R,u[0][1])*R,k=Math.max(k,K)}if(h){let K=0;!m&&!g||m&&!g&&y?K=Hi(T+le/R,h[1][1])*R:K=$i(T+(m?j:-j)/R,h[0][1])*R,k=Math.max(k,K)}}if(p){const G=ac(X*R,E,N)/R;if(Y=Math.max(Y,G),u){let K=0;!m&&!g||g&&!m&&y?K=$i(x+X*R+I,u[1][0])/R:K=Hi(x+(g?q:-q)*R+I,u[0][0])/R,Y=Math.max(Y,K)}if(h){let K=0;!m&&!g||g&&!m&&y?K=Hi(x+X*R,h[1][0])/R:K=$i(x+(g?q:-q)*R,h[0][0])/R,Y=Math.max(Y,K)}}}q=q+(q<0?Y:-Y),j=j+(j<0?k:-k),r&&(y?le>X*R?q=(z0(m,g)?-j:j)/R:j=(z0(m,g)?-q:q)*R:v?(q=j/R,g=m):(j=q*R,m=g));const O=m?x+j:x,B=g?T+q:T;return{width:L+(m?-j:j),height:D+(g?-q:q),x:c[0]*j*(m?-1:1)+O,y:c[1]*q*(g?-1:1)+B}}const R1={width:0,height:0,x:0,y:0},lA={...R1,pointerX:0,pointerY:0,aspectRatio:1};function aA(t,i,s){const a=i.position.x+t.position.x,r=i.position.y+t.position.y,c=t.measured.width??0,u=t.measured.height??0,h=s[0]*c,m=s[1]*u;return[[a-h,r-m],[a+c-h,r+u-m]]}function oA({domNode:t,nodeId:i,getStoreItems:s,onChange:a,onEnd:r}){const c=Zt(t);let u={controlDirection:O0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:g,boundaries:v,keepAspectRatio:p,resizeDirection:y,onResizeStart:w,onResize:_,onResizeEnd:E,shouldResize:N}){let S={...R1},C={...lA};u={boundaries:v,resizeDirection:y,keepAspectRatio:p,controlDirection:O0(g)};let x,T=null,L=[],D,R,j,q=!1;const le=Xv().on("start",X=>{const{nodeLookup:I,transform:ae,snapGrid:k,snapToGrid:Y,nodeOrigin:O,paneDomNode:B}=s();if(x=I.get(i),!x)return;T=B?.getBoundingClientRect()??null;const{xSnapped:G,ySnapped:K}=lo(X.sourceEvent,{transform:ae,snapGrid:k,snapToGrid:Y,containerBounds:T});S={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},C={...S,pointerX:G,pointerY:K,aspectRatio:S.width/S.height},D=void 0,R=As(x.extent)?x.extent:void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(D=I.get(x.parentId)),D&&x.extent==="parent"&&(R=[[0,0],[D.measured.width,D.measured.height]]),L=[],j=void 0;for(const[ne,z]of I)if(z.parentId===i&&(L.push({id:ne,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const $=aA(z,x,z.origin??O);j?j=[[Math.min($[0][0],j[0][0]),Math.min($[0][1],j[0][1])],[Math.max($[1][0],j[1][0]),Math.max($[1][1],j[1][1])]]:j=$}w?.(X,{...S})}).on("drag",X=>{const{transform:I,snapGrid:ae,snapToGrid:k,nodeOrigin:Y}=s(),O=lo(X.sourceEvent,{transform:I,snapGrid:ae,snapToGrid:k,containerBounds:T}),B=[];if(!x)return;const{x:G,y:K,width:ne,height:z}=S,$={},P=x.origin??Y,{width:ee,height:ce,x:he,y:ue}=sA(C,u.controlDirection,O,u.boundaries,u.keepAspectRatio,P,R,j),te=ee!==ne,de=ce!==z,we=he!==G&&te,Se=ue!==K&&de;if(!we&&!Se&&!te&&!de)return;if((we||Se||P[0]===1||P[1]===1)&&($.x=we?he:S.x,$.y=Se?ue:S.y,S.x=$.x,S.y=$.y,L.length>0)){const xe=he-G,ke=ue-K;for(const ut of L)ut.position={x:ut.position.x-xe+P[0]*(ee-ne),y:ut.position.y-ke+P[1]*(ce-z)},B.push(ut)}if((te||de)&&($.width=te&&(!u.resizeDirection||u.resizeDirection==="horizontal")?ee:S.width,$.height=de&&(!u.resizeDirection||u.resizeDirection==="vertical")?ce:S.height,S.width=$.width,S.height=$.height),D&&x.expandParent){const xe=P[0]*($.width??0);$.x&&$.x<xe&&(S.x=xe,C.x=C.x-($.x-xe));const ke=P[1]*($.height??0);$.y&&$.y<ke&&(S.y=ke,C.y=C.y-($.y-ke))}const re=iA({width:S.width,prevWidth:ne,height:S.height,prevHeight:z,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),fe={...S,direction:re};N?.(X,fe)!==!1&&(q=!0,_?.(X,fe),a($,B))}).on("end",X=>{q&&(E?.(X,{...S}),r?.({...S}),q=!1)});c.call(le)}function m(){c.on(".drag",null)}return{update:h,destroy:m}}var Yd={exports:{}},Gd={},Xd={exports:{}},Kd={};var D0;function rA(){if(D0)return Kd;D0=1;var t=xo();function i(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var s=typeof Object.is=="function"?Object.is:i,a=t.useState,r=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue;function h(p,y){var w=y(),_=a({inst:{value:w,getSnapshot:y}}),E=_[0].inst,N=_[1];return c(function(){E.value=w,E.getSnapshot=y,m(E)&&N({inst:E})},[p,w,y]),r(function(){return m(E)&&N({inst:E}),p(function(){m(E)&&N({inst:E})})},[p]),u(w),w}function m(p){var y=p.getSnapshot;p=p.value;try{var w=y();return!s(p,w)}catch{return!0}}function g(p,y){return y()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:h;return Kd.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,Kd}var L0;function cA(){return L0||(L0=1,Xd.exports=rA()),Xd.exports}var j0;function uA(){if(j0)return Gd;j0=1;var t=xo(),i=cA();function s(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var a=typeof Object.is=="function"?Object.is:s,r=i.useSyncExternalStore,c=t.useRef,u=t.useEffect,h=t.useMemo,m=t.useDebugValue;return Gd.useSyncExternalStoreWithSelector=function(g,v,p,y,w){var _=c(null);if(_.current===null){var E={hasValue:!1,value:null};_.current=E}else E=_.current;_=h(function(){function S(D){if(!C){if(C=!0,x=D,D=y(D),w!==void 0&&E.hasValue){var R=E.value;if(w(R,D))return T=R}return T=D}if(R=T,a(x,D))return R;var j=y(D);return w!==void 0&&w(R,j)?(x=D,R):(x=D,T=j)}var C=!1,x,T,L=p===void 0?null:p;return[function(){return S(v())},L===null?void 0:function(){return S(L())}]},[v,p,y,w]);var N=r(g,_[0],_[1]);return u(function(){E.hasValue=!0,E.value=N},[N]),m(N),N},Gd}var R0;function fA(){return R0||(R0=1,Yd.exports=uA()),Yd.exports}var dA=fA();const hA=Mv(dA),mA={},k0=t=>{let i;const s=new Set,a=(v,p)=>{const y=typeof v=="function"?v(i):v;if(!Object.is(y,i)){const w=i;i=p??(typeof y!="object"||y===null)?y:Object.assign({},i,y),s.forEach(_=>_(i,w))}},r=()=>i,m={setState:a,getState:r,getInitialState:()=>g,subscribe:v=>(s.add(v),()=>s.delete(v)),destroy:()=>{(mA?"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."),s.clear()}},g=i=t(a,r,m);return m},gA=t=>t?k0(t):k0,{useDebugValue:pA}=Cv,{useSyncExternalStoreWithSelector:yA}=hA,vA=t=>t;function k1(t,i=vA,s){const a=yA(t.subscribe,t.getState,t.getServerState||t.getInitialState,i,s);return pA(a),a}const B0=(t,i)=>{const s=gA(t),a=(r,c=i)=>k1(s,r,c);return Object.assign(a,s),a},bA=(t,i)=>t?B0(t,i):B0;function Ie(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[a,r]of t)if(!Object.is(r,i.get(a)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const a of t)if(!i.has(a))return!1;return!0}const s=Object.keys(t);if(s.length!==Object.keys(i).length)return!1;for(const a of s)if(!Object.prototype.hasOwnProperty.call(i,a)||!Object.is(t[a],i[a]))return!1;return!0}var SA=Ov();const Ic=J.createContext(null),wA=Ic.Provider,B1=wn.error001("react");function De(t,i){const s=J.useContext(Ic);if(s===null)throw new Error(B1);return k1(s,t,i)}function Je(){const t=J.useContext(Ic);if(t===null)throw new Error(B1);return J.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const H0={display:"none"},xA={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},H1="react-flow__node-desc",$1="react-flow__edge-desc",EA="react-flow__aria-live",_A=t=>t.ariaLiveMessage,NA=t=>t.ariaLabelConfig;function AA({rfId:t}){const i=De(_A);return M.jsx("div",{id:`${EA}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:xA,children:i})}function TA({rfId:t,disableKeyboardA11y:i}){const s=De(NA);return M.jsxs(M.Fragment,{children:[M.jsx("div",{id:`${H1}-${t}`,style:H0,children:i?s["node.a11yDescription.default"]:s["node.a11yDescription.keyboardDisabled"]}),M.jsx("div",{id:`${$1}-${t}`,style:H0,children:s["edge.a11yDescription.default"]}),!i&&M.jsx(AA,{rfId:t})]})}const Qc=J.forwardRef(({position:t="top-left",children:i,className:s,style:a,...r},c)=>{const u=`${t}`.split("-");return M.jsx("div",{className:ct(["react-flow__panel",s,...u]),style:a,ref:c,...r,children:i})});Qc.displayName="Panel";function MA({proOptions:t,position:i="bottom-right"}){return t?.hideAttribution?null:M.jsx(Qc,{position:i,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:M.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const CA=t=>{const i=[],s=[];for(const[,a]of t.nodeLookup)a.selected&&i.push(a.internals.userNode);for(const[,a]of t.edgeLookup)a.selected&&s.push(a);return{selectedNodes:i,selectedEdges:s}},oc=t=>t.id;function OA(t,i){return Ie(t.selectedNodes.map(oc),i.selectedNodes.map(oc))&&Ie(t.selectedEdges.map(oc),i.selectedEdges.map(oc))}function zA({onSelectionChange:t}){const i=Je(),{selectedNodes:s,selectedEdges:a}=De(CA,OA);return J.useEffect(()=>{const r={nodes:s,edges:a};t?.(r),i.getState().onSelectionChangeHandlers.forEach(c=>c(r))},[s,a,t]),null}const DA=t=>!!t.onSelectionChangeHandlers;function LA({onSelectionChange:t}){const i=De(DA);return t||i?M.jsx(zA,{onSelectionChange:t}):null}const U1=[0,0],jA={x:0,y:0,zoom:1},RA=["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"],$0=[...RA,"rfId"],kA=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),U0={translateExtent:ho,nodeOrigin:U1,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function BA(t){const{setNodes:i,setEdges:s,setMinZoom:a,setMaxZoom:r,setTranslateExtent:c,setNodeExtent:u,reset:h,setDefaultNodesAndEdges:m}=De(kA,Ie),g=Je();J.useEffect(()=>(m(t.defaultNodes,t.defaultEdges),()=>{v.current=U0,h()}),[]);const v=J.useRef(U0);return J.useEffect(()=>{for(const p of $0){const y=t[p],w=v.current[p];y!==w&&(typeof t[p]>"u"||(p==="nodes"?i(y):p==="edges"?s(y):p==="minZoom"?a(y):p==="maxZoom"?r(y):p==="translateExtent"?c(y):p==="nodeExtent"?u(y):p==="ariaLabelConfig"?g.setState({ariaLabelConfig:SN(y)}):p==="fitView"?g.setState({fitViewQueued:y}):p==="fitViewOptions"?g.setState({fitViewOptions:y}):g.setState({[p]:y})))}v.current=t},$0.map(p=>t[p])),null}function q0(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function HA(t){const[i,s]=J.useState(t==="system"?null:t);return J.useEffect(()=>{if(t!=="system"){s(t);return}const a=q0(),r=()=>s(a?.matches?"dark":"light");return r(),a?.addEventListener("change",r),()=>{a?.removeEventListener("change",r)}},[t]),i!==null?i:q0()?.matches?"dark":"light"}const V0=typeof document<"u"?document:null;function vo(t=null,i={target:V0,actInsideInputWithModifier:!0}){const[s,a]=J.useState(!1),r=J.useRef(!1),c=J.useRef(new Set([])),[u,h]=J.useMemo(()=>{if(t!==null){const g=(Array.isArray(t)?t:[t]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
10
- `).replace(`
11
-
12
- `,`
13
- +`).split(`
14
- `)),v=g.reduce((p,y)=>p.concat(...y),[]);return[g,v]}return[[],[]]},[t]);return J.useEffect(()=>{const m=i?.target??V0,g=i?.actInsideInputWithModifier??!0;if(t!==null){const v=w=>{if(r.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!r.current||r.current&&!g)&&b1(w))return!1;const E=G0(w.code,h);if(c.current.add(w[E]),Y0(u,c.current,!1)){const N=w.composedPath?.()?.[0]||w.target,S=N?.nodeName==="BUTTON"||N?.nodeName==="A";i.preventDefault!==!1&&(r.current||!S)&&w.preventDefault(),a(!0)}},p=w=>{const _=G0(w.code,h);Y0(u,c.current,!0)?(a(!1),c.current.clear()):c.current.delete(w[_]),w.key==="Meta"&&c.current.clear(),r.current=!1},y=()=>{c.current.clear(),a(!1)};return m?.addEventListener("keydown",v),m?.addEventListener("keyup",p),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{m?.removeEventListener("keydown",v),m?.removeEventListener("keyup",p),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[t,a]),s}function Y0(t,i,s){return t.filter(a=>s||a.length===i.size).some(a=>a.every(r=>i.has(r)))}function G0(t,i){return i.includes(t)?"code":"key"}const $A=()=>{const t=Je();return J.useMemo(()=>({zoomIn:async i=>{const{panZoom:s}=t.getState();return s?s.scaleBy(1.2,i):!1},zoomOut:async i=>{const{panZoom:s}=t.getState();return s?s.scaleBy(1/1.2,i):!1},zoomTo:async(i,s)=>{const{panZoom:a}=t.getState();return a?a.scaleTo(i,s):!1},getZoom:()=>t.getState().transform[2],setViewport:async(i,s)=>{const{transform:[a,r,c],panZoom:u}=t.getState();return u?(await u.setViewport({x:i.x??a,y:i.y??r,zoom:i.zoom??c},s),!0):!1},getViewport:()=>{const[i,s,a]=t.getState().transform;return{x:i,y:s,zoom:a}},setCenter:async(i,s,a)=>t.getState().setCenter(i,s,a),fitBounds:async(i,s)=>{const{width:a,height:r,minZoom:c,maxZoom:u,panZoom:h}=t.getState(),m=Uh(i,a,r,c,u,s?.padding??.1);return h?(await h.setViewport(m,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),!0):!1},screenToFlowPosition:(i,s={})=>{const{transform:a,snapGrid:r,snapToGrid:c,domNode:u}=t.getState();if(!u)return i;const{x:h,y:m}=u.getBoundingClientRect(),g={x:i.x-h,y:i.y-m},v=s.snapGrid??r,p=s.snapToGrid??c;return Kl(g,a,p,v)},flowToScreenPosition:i=>{const{transform:s,domNode:a}=t.getState();if(!a)return i;const{x:r,y:c}=a.getBoundingClientRect(),u=Vl(i,s);return{x:u.x+r,y:u.y+c}}}),[])};function q1(t,i){const s=[],a=new Map,r=[];for(const c of t)if(c.type==="add"){r.push(c);continue}else if(c.type==="remove"||c.type==="replace")a.set(c.id,[c]);else{const u=a.get(c.id);u?u.push(c):a.set(c.id,[c])}for(const c of i){const u=a.get(c.id);if(!u){s.push(c);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){s.push({...u[0].item});continue}const h={...c};for(const m of u)UA(m,h);s.push(h)}return r.length&&r.forEach(c=>{c.index!==void 0?s.splice(c.index,0,{...c.item}):s.push({...c.item})}),s}function UA(t,i){switch(t.type){case"select":{i.selected=t.selected;break}case"position":{typeof t.position<"u"&&(i.position=t.position),typeof t.dragging<"u"&&(i.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(i.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(i.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(i.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(i.resizing=t.resizing);break}}}function qA(t,i){return q1(t,i)}function VA(t,i){return q1(t,i)}function gs(t,i){return{id:t,type:"select",selected:i}}function Al(t,i=new Set,s=!1){const a=[];for(const[r,c]of t){const u=i.has(r);!(c.selected===void 0&&!u)&&c.selected!==u&&(s&&(c.selected=u),a.push(gs(c.id,u)))}return a}function X0({items:t=[],lookup:i}){const s=[],a=new Map(t.map(r=>[r.id,r]));for(const[r,c]of t.entries()){const u=i.get(c.id),h=u?.internals?.userNode??u;h!==void 0&&h!==c&&s.push({id:c.id,item:c,type:"replace"}),h===void 0&&s.push({item:c,type:"add",index:r})}for(const[r]of i)a.get(r)===void 0&&s.push({id:r,type:"remove"});return s}function K0(t){return{id:t.id,type:"remove"}}const YA=g1();function GA(t,i,s={}){return AN(t,i,{...s,onError:s.onError??YA})}const Z0=t=>fN(t),XA=t=>f1(t);function V1(t){return J.forwardRef(t)}const KA=typeof window<"u"?J.useLayoutEffect:J.useEffect;function I0(t){const[i,s]=J.useState(BigInt(0)),[a]=J.useState(()=>ZA(()=>s(r=>r+BigInt(1))));return KA(()=>{const r=a.get();r.length&&(t(r),a.reset())},[i]),a}function ZA(t){let i=[];return{get:()=>i,reset:()=>{i=[]},push:s=>{i.push(s),t()}}}const Y1=J.createContext(null);function IA({children:t}){const i=Je(),s=J.useCallback(h=>{const{nodes:m=[],setNodes:g,hasDefaultNodes:v,onNodesChange:p,nodeLookup:y,fitViewQueued:w,onNodesChangeMiddlewareMap:_}=i.getState();let E=m;for(const S of h)E=typeof S=="function"?S(E):S;let N=X0({items:E,lookup:y});for(const S of _.values())N=S(N);v&&g(E),N.length>0?p?.(N):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:S,nodes:C,setNodes:x}=i.getState();S&&x(C)})},[]),a=I0(s),r=J.useCallback(h=>{const{edges:m=[],setEdges:g,hasDefaultEdges:v,onEdgesChange:p,edgeLookup:y}=i.getState();let w=m;for(const _ of h)w=typeof _=="function"?_(w):_;v?g(w):p&&p(X0({items:w,lookup:y}))},[]),c=I0(r),u=J.useMemo(()=>({nodeQueue:a,edgeQueue:c}),[]);return M.jsx(Y1.Provider,{value:u,children:t})}function QA(){const t=J.useContext(Y1);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const JA=t=>!!t.panZoom;function Jc(){const t=$A(),i=Je(),s=QA(),a=De(JA),r=J.useMemo(()=>{const c=p=>i.getState().nodeLookup.get(p),u=p=>{s.nodeQueue.push(p)},h=p=>{s.edgeQueue.push(p)},m=p=>{const{nodeLookup:y,nodeOrigin:w}=i.getState(),_=Z0(p)?p:y.get(p.id),E=_.parentId?y1(_.position,_.measured,_.parentId,y,w):_.position,N={..._,position:E,width:_.measured?.width??_.width,height:_.measured?.height??_.height};return ql(N)},g=(p,y,w={replace:!1})=>{u(_=>_.map(E=>{if(E.id===p){const N=typeof y=="function"?y(E):y;return w.replace&&Z0(N)?N:{...E,...N}}return E}))},v=(p,y,w={replace:!1})=>{h(_=>_.map(E=>{if(E.id===p){const N=typeof y=="function"?y(E):y;return w.replace&&XA(N)?N:{...E,...N}}return E}))};return{getNodes:()=>i.getState().nodes.map(p=>({...p})),getNode:p=>c(p)?.internals.userNode,getInternalNode:c,getEdges:()=>{const{edges:p=[]}=i.getState();return p.map(y=>({...y}))},getEdge:p=>i.getState().edgeLookup.get(p),setNodes:u,setEdges:h,addNodes:p=>{const y=Array.isArray(p)?p:[p];s.nodeQueue.push(w=>[...w,...y])},addEdges:p=>{const y=Array.isArray(p)?p:[p];s.edgeQueue.push(w=>[...w,...y])},toObject:()=>{const{nodes:p=[],edges:y=[],transform:w}=i.getState(),[_,E,N]=w;return{nodes:p.map(S=>({...S})),edges:y.map(S=>({...S})),viewport:{x:_,y:E,zoom:N}}},deleteElements:async({nodes:p=[],edges:y=[]})=>{const{nodes:w,edges:_,onNodesDelete:E,onEdgesDelete:N,triggerNodeChanges:S,triggerEdgeChanges:C,onDelete:x,onBeforeDelete:T}=i.getState(),{nodes:L,edges:D}=await pN({nodesToRemove:p,edgesToRemove:y,nodes:w,edges:_,onBeforeDelete:T}),R=D.length>0,j=L.length>0;if(R){const q=D.map(K0);N?.(D),C(q)}if(j){const q=L.map(K0);E?.(L),S(q)}return(j||R)&&x?.({nodes:L,edges:D}),{deletedNodes:L,deletedEdges:D}},getIntersectingNodes:(p,y=!0,w)=>{const _=b0(p),E=_?p:m(p),N=w!==void 0;return E?(w||i.getState().nodes).filter(S=>{const C=i.getState().nodeLookup.get(S.id);if(C&&!_&&(S.id===p.id||!C.internals.positionAbsolute))return!1;const x=ql(N?S:C),T=po(x,E);return y&&T>0||T>=x.width*x.height||T>=E.width*E.height}):[]},isNodeIntersecting:(p,y,w=!0)=>{const E=b0(p)?p:m(p);if(!E)return!1;const N=po(E,y);return w&&N>0||N>=y.width*y.height||N>=E.width*E.height},updateNode:g,updateNodeData:(p,y,w={replace:!1})=>{g(p,_=>{const E=typeof y=="function"?y(_):y;return w.replace?{..._,data:E}:{..._,data:{..._.data,...E}}},w)},updateEdge:v,updateEdgeData:(p,y,w={replace:!1})=>{v(p,_=>{const E=typeof y=="function"?y(_):y;return w.replace?{..._,data:E}:{..._,data:{..._.data,...E}}},w)},getNodesBounds:p=>{const{nodeLookup:y,nodeOrigin:w}=i.getState();return dN(p,{nodeLookup:y,nodeOrigin:w})},getHandleConnections:({type:p,id:y,nodeId:w})=>Array.from(i.getState().connectionLookup.get(`${w}-${p}${y?`-${y}`:""}`)?.values()??[]),getNodeConnections:({type:p,handleId:y,nodeId:w})=>Array.from(i.getState().connectionLookup.get(`${w}${p?y?`-${p}-${y}`:`-${p}`:""}`)?.values()??[]),fitView:async p=>{const y=i.getState().fitViewResolver??bN();return i.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:y}),s.nodeQueue.push(w=>[...w]),y.promise}}},[]);return J.useMemo(()=>({...r,...t,viewportInitialized:a}),[a])}const Q0=t=>t.selected,FA=typeof window<"u"?window:void 0;function WA({deleteKeyCode:t,multiSelectionKeyCode:i}){const s=Je(),{deleteElements:a}=Jc(),r=vo(t,{actInsideInputWithModifier:!1}),c=vo(i,{target:FA});J.useEffect(()=>{if(r){const{edges:u,nodes:h}=s.getState();a({nodes:h.filter(Q0),edges:u.filter(Q0)}),s.setState({nodesSelectionActive:!1})}},[r]),J.useEffect(()=>{s.setState({multiSelectionActive:c})},[c])}function PA(t){const i=Je();J.useEffect(()=>{const s=()=>{if(!t.current||!(t.current.checkVisibility?.()??!0))return!1;const a=qh(t.current);(a.height===0||a.width===0)&&i.getState().onError?.("004",wn.error004()),i.setState({width:a.width||500,height:a.height||500})};if(t.current){s(),window.addEventListener("resize",s);const a=new ResizeObserver(()=>s());return a.observe(t.current),()=>{window.removeEventListener("resize",s),a&&t.current&&a.unobserve(t.current)}}},[])}const Fc={position:"absolute",width:"100%",height:"100%",top:0,left:0},eT=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function tT({onPaneContextMenu:t,zoomOnScroll:i=!0,zoomOnPinch:s=!0,panOnScroll:a=!1,panOnScrollSpeed:r=.5,panOnScrollMode:c=xs.Free,zoomOnDoubleClick:u=!0,panOnDrag:h=!0,defaultViewport:m,translateExtent:g,minZoom:v,maxZoom:p,zoomActivationKeyCode:y,preventScrolling:w=!0,children:_,noWheelClassName:E,noPanClassName:N,onViewportChange:S,isControlledViewport:C,paneClickDistance:x,selectionOnDrag:T}){const L=Je(),D=J.useRef(null),{userSelectionActive:R,lib:j,connectionInProgress:q}=De(eT,Ie),le=vo(y),X=J.useRef();PA(D);const I=J.useCallback(ae=>{S?.({x:ae[0],y:ae[1],zoom:ae[2]}),C||L.setState({transform:ae})},[S,C]);return J.useEffect(()=>{if(D.current){X.current=nA({domNode:D.current,minZoom:v,maxZoom:p,translateExtent:g,viewport:m,onDraggingChange:O=>L.setState(B=>B.paneDragging===O?B:{paneDragging:O}),onPanZoomStart:(O,B)=>{const{onViewportChangeStart:G,onMoveStart:K}=L.getState();K?.(O,B),G?.(B)},onPanZoom:(O,B)=>{const{onViewportChange:G,onMove:K}=L.getState();K?.(O,B),G?.(B)},onPanZoomEnd:(O,B)=>{const{onViewportChangeEnd:G,onMoveEnd:K}=L.getState();K?.(O,B),G?.(B)}});const{x:ae,y:k,zoom:Y}=X.current.getViewport();return L.setState({panZoom:X.current,transform:[ae,k,Y],domNode:D.current.closest(".react-flow")}),()=>{X.current?.destroy()}}},[]),J.useEffect(()=>{X.current?.update({onPaneContextMenu:t,zoomOnScroll:i,zoomOnPinch:s,panOnScroll:a,panOnScrollSpeed:r,panOnScrollMode:c,zoomOnDoubleClick:u,panOnDrag:h,zoomActivationKeyPressed:le,preventScrolling:w,noPanClassName:N,userSelectionActive:R,noWheelClassName:E,lib:j,onTransformChange:I,connectionInProgress:q,selectionOnDrag:T,paneClickDistance:x})},[t,i,s,a,r,c,u,h,le,w,N,R,E,j,I,q,T,x]),M.jsx("div",{className:"react-flow__renderer",ref:D,style:Fc,children:_})}const nT=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function iT(){const{userSelectionActive:t,userSelectionRect:i}=De(nT,Ie);return t&&i?M.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:i.width,height:i.height,transform:`translate(${i.x}px, ${i.y}px)`}}):null}const Zd=(t,i)=>s=>{s.target===i.current&&t?.(s)},sT=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging,panBy:t.panBy,autoPanSpeed:t.autoPanSpeed});function lT({isSelecting:t,selectionKeyPressed:i,selectionMode:s=mo.Full,panOnDrag:a,autoPanOnSelection:r,paneClickDistance:c,selectionOnDrag:u,onSelectionStart:h,onSelectionEnd:m,onPaneClick:g,onPaneContextMenu:v,onPaneScroll:p,onPaneMouseEnter:y,onPaneMouseMove:w,onPaneMouseLeave:_,children:E}){const N=J.useRef(0),S=Je(),{userSelectionActive:C,elementsSelectable:x,dragging:T,connectionInProgress:L,panBy:D,autoPanSpeed:R}=De(sT,Ie),j=x&&(t||C),q=J.useRef(null),le=J.useRef(),X=J.useRef(new Set),I=J.useRef(new Set),ae=J.useRef(!1),k=J.useRef({x:0,y:0}),Y=J.useRef(!1),O=te=>{if(ae.current||L){ae.current=!1;return}g?.(te),S.getState().resetSelectedElements(),S.setState({nodesSelectionActive:!1})},B=te=>{if(Array.isArray(a)&&a?.includes(2)){te.preventDefault();return}v?.(te)},G=p?te=>p(te):void 0,K=te=>{ae.current&&(te.stopPropagation(),ae.current=!1)},ne=te=>{const{domNode:de,transform:we}=S.getState();if(le.current=de?.getBoundingClientRect(),!le.current)return;const Se=te.target===q.current;if(!Se&&!!te.target.closest(".nokey")||!t||!(u&&Se||i)||te.button!==0||!te.isPrimary)return;te.target?.setPointerCapture?.(te.pointerId),ae.current=!1;const{x:ye,y:xe}=Sn(te.nativeEvent,le.current),ke=Kl({x:ye,y:xe},we);S.setState({userSelectionRect:{width:0,height:0,startX:ke.x,startY:ke.y,x:ye,y:xe}}),Se||(te.stopPropagation(),te.preventDefault())};function z(te,de){const{userSelectionRect:we}=S.getState();if(!we)return;const{transform:Se,nodeLookup:re,edgeLookup:fe,connectionLookup:ye,triggerNodeChanges:xe,triggerEdgeChanges:ke,defaultEdgeOptions:ut}=S.getState(),Nt={x:we.startX,y:we.startY},{x:At,y:Tt}=Vl(Nt,Se),Ht={startX:Nt.x,startY:Nt.y,x:te<At?te:At,y:de<Tt?de:Tt,width:Math.abs(te-At),height:Math.abs(de-Tt)},Ii=X.current,Rn=I.current;X.current=new Set(Hh(re,Ht,Se,s===mo.Partial,!0).map($t=>$t.id)),I.current=new Set;const tt=ut?.selectable??!0;for(const $t of X.current){const Jt=ye.get($t);if(Jt)for(const{edgeId:Ft}of Jt.values()){const Wt=fe.get(Ft);Wt&&(Wt.selectable??tt)&&I.current.add(Ft)}}if(!S0(Ii,X.current)){const $t=Al(re,X.current,!0);xe($t)}if(!S0(Rn,I.current)){const $t=Al(fe,I.current);ke($t)}S.setState({userSelectionRect:Ht,userSelectionActive:!0,nodesSelectionActive:!1})}function $(){if(!r||!le.current)return;const[te,de]=$h(k.current,le.current,R);D({x:te,y:de}).then(we=>{if(!ae.current||!we){N.current=requestAnimationFrame($);return}const{x:Se,y:re}=k.current;z(Se,re),N.current=requestAnimationFrame($)})}const P=()=>{cancelAnimationFrame(N.current),N.current=0,Y.current=!1};J.useEffect(()=>()=>P(),[]);const ee=te=>{const{userSelectionRect:de,transform:we,resetSelectedElements:Se}=S.getState();if(!le.current||!de)return;const{x:re,y:fe}=Sn(te.nativeEvent,le.current);k.current={x:re,y:fe};const ye=Vl({x:de.startX,y:de.startY},we);if(!ae.current){const xe=i?0:c;if(Math.hypot(re-ye.x,fe-ye.y)<=xe)return;Se(),h?.(te)}ae.current=!0,Y.current||($(),Y.current=!0),z(re,fe)},ce=te=>{te.button===0&&(te.target?.releasePointerCapture?.(te.pointerId),!C&&te.target===q.current&&S.getState().userSelectionRect&&O?.(te),S.setState({userSelectionActive:!1,userSelectionRect:null}),ae.current&&(m?.(te),S.setState({nodesSelectionActive:X.current.size>0})),P())},he=te=>{te.target?.releasePointerCapture?.(te.pointerId),P()},ue=a===!0||Array.isArray(a)&&a.includes(0);return M.jsxs("div",{className:ct(["react-flow__pane",{draggable:ue,dragging:T,selection:t}]),onClick:j?void 0:Zd(O,q),onContextMenu:Zd(B,q),onWheel:Zd(G,q),onPointerEnter:j?void 0:y,onPointerMove:j?ee:w,onPointerUp:j?ce:void 0,onPointerCancel:j?he:void 0,onPointerDownCapture:j?ne:void 0,onClickCapture:j?K:void 0,onPointerLeave:_,ref:q,style:Fc,children:[E,M.jsx(iT,{})]})}function bh({id:t,store:i,unselect:s=!1,nodeRef:a}){const{addSelectedNodes:r,unselectNodesAndEdges:c,multiSelectionActive:u,nodeLookup:h,onError:m}=i.getState(),g=h.get(t);if(!g){m?.("012",wn.error012(t));return}i.setState({nodesSelectionActive:!1}),g.selected?(s||g.selected&&u)&&(c({nodes:[g],edges:[]}),requestAnimationFrame(()=>a?.current?.blur())):r([t])}function G1({nodeRef:t,disabled:i=!1,noDragClassName:s,handleSelector:a,nodeId:r,isSelectable:c,nodeClickDistance:u}){const h=Je(),[m,g]=J.useState(!1),v=J.useRef();return J.useEffect(()=>{v.current=VN({getStoreItems:()=>h.getState(),onNodeMouseDown:p=>{bh({id:p,store:h,nodeRef:t})},onDragStart:()=>{g(!0)},onDragStop:()=>{g(!1)}})},[]),J.useEffect(()=>{if(!(i||!t.current||!v.current))return v.current.update({noDragClassName:s,handleSelector:a,domNode:t.current,isSelectable:c,nodeId:r,nodeClickDistance:u}),()=>{v.current?.destroy()}},[s,a,i,c,t,r,u]),m}const aT=t=>i=>i.selected&&(i.draggable||t&&typeof i.draggable>"u");function X1(){const t=Je();return J.useCallback(s=>{const{nodeExtent:a,snapToGrid:r,snapGrid:c,nodesDraggable:u,onError:h,updateNodePositions:m,nodeLookup:g,nodeOrigin:v}=t.getState(),p=new Map,y=aT(u),w=r?c[0]:5,_=r?c[1]:5,E=s.direction.x*w*s.factor,N=s.direction.y*_*s.factor;for(const[,S]of g){if(!y(S))continue;let C={x:S.internals.positionAbsolute.x+E,y:S.internals.positionAbsolute.y+N};r&&(C=To(C,c));const{position:x,positionAbsolute:T}=d1({nodeId:S.id,nextPosition:C,nodeLookup:g,nodeExtent:a,nodeOrigin:v,onError:h});S.position=x,S.internals.positionAbsolute=T,p.set(S.id,S)}m(p)},[])}const Zh=J.createContext(null),oT=Zh.Provider;Zh.Consumer;const K1=()=>J.useContext(Zh),rT=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),cT=(t,i,s)=>a=>{const{connectionClickStartHandle:r,connectionMode:c,connection:u}=a,{fromHandle:h,toHandle:m,isValid:g}=u,v=m?.nodeId===t&&m?.id===i&&m?.type===s;return{connectingFrom:h?.nodeId===t&&h?.id===i&&h?.type===s,connectingTo:v,clickConnecting:r?.nodeId===t&&r?.id===i&&r?.type===s,isPossibleEndHandle:c===$l.Strict?h?.type!==s:t!==h?.nodeId||i!==h?.id,connectionInProcess:!!h,clickConnectionInProcess:!!r,valid:v&&g}};function uT({type:t="source",position:i=me.Top,isValidConnection:s,isConnectable:a=!0,isConnectableStart:r=!0,isConnectableEnd:c=!0,id:u,onConnect:h,children:m,className:g,onMouseDown:v,onTouchStart:p,...y},w){const _=u||null,E=t==="target",N=Je(),S=K1(),{connectOnClick:C,noPanClassName:x,rfId:T}=De(rT,Ie),{connectingFrom:L,connectingTo:D,clickConnecting:R,isPossibleEndHandle:j,connectionInProcess:q,clickConnectionInProcess:le,valid:X}=De(cT(S,_,t),Ie);S||N.getState().onError?.("010",wn.error010());const I=Y=>{const{defaultEdgeOptions:O,onConnect:B,hasDefaultEdges:G}=N.getState(),K={...O,...Y};if(G){const{edges:ne,setEdges:z,onError:$}=N.getState();z(GA(K,ne,{onError:$}))}B?.(K),h?.(K)},ae=Y=>{if(!S)return;const O=S1(Y.nativeEvent);if(r&&(O&&Y.button===0||!O)){const B=N.getState();vh.onPointerDown(Y.nativeEvent,{handleDomNode:Y.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:E,handleId:_,nodeId:S,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:(...G)=>N.getState().onConnectEnd?.(...G),updateConnection:B.updateConnection,onConnect:I,isValidConnection:s||((...G)=>N.getState().isValidConnection?.(...G)??!0),getTransform:()=>N.getState().transform,getFromHandle:()=>N.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}O?v?.(Y):p?.(Y)},k=Y=>{const{onClickConnectStart:O,onClickConnectEnd:B,connectionClickStartHandle:G,connectionMode:K,isValidConnection:ne,lib:z,rfId:$,nodeLookup:P,connection:ee}=N.getState();if(!S||!G&&!r)return;if(!G){O?.(Y.nativeEvent,{nodeId:S,handleId:_,handleType:t}),N.setState({connectionClickStartHandle:{nodeId:S,type:t,id:_}});return}const ce=v1(Y.target),he=s||ne,{connection:ue,isValid:te}=vh.isValid(Y.nativeEvent,{handle:{nodeId:S,id:_,type:t},connectionMode:K,fromNodeId:G.nodeId,fromHandleId:G.id||null,fromType:G.type,isValidConnection:he,flowId:$,doc:ce,lib:z,nodeLookup:P});te&&ue&&I(ue);const de=structuredClone(ee);delete de.inProgress,de.toPosition=de.toHandle?de.toHandle.position:null,B?.(Y,de),N.setState({connectionClickStartHandle:null})};return M.jsx("div",{"data-handleid":_,"data-nodeid":S,"data-handlepos":i,"data-id":`${T}-${S}-${_}-${t}`,className:ct(["react-flow__handle",`react-flow__handle-${i}`,"nodrag",x,g,{source:!E,target:E,connectable:a,connectablestart:r,connectableend:c,clickconnecting:R,connectingfrom:L,connectingto:D,valid:X,connectionindicator:a&&(!q||j)&&(q||le?c:r)}]),onMouseDown:ae,onTouchStart:ae,onClick:C?k:void 0,ref:w,...y,children:m})}const rn=J.memo(V1(uT));function fT({data:t,isConnectable:i,sourcePosition:s=me.Bottom}){return M.jsxs(M.Fragment,{children:[t?.label,M.jsx(rn,{type:"source",position:s,isConnectable:i})]})}function dT({data:t,isConnectable:i,targetPosition:s=me.Top,sourcePosition:a=me.Bottom}){return M.jsxs(M.Fragment,{children:[M.jsx(rn,{type:"target",position:s,isConnectable:i}),t?.label,M.jsx(rn,{type:"source",position:a,isConnectable:i})]})}function hT(){return null}function mT({data:t,isConnectable:i,targetPosition:s=me.Top}){return M.jsxs(M.Fragment,{children:[M.jsx(rn,{type:"target",position:s,isConnectable:i}),t?.label]})}const Lc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},J0={input:fT,default:dT,output:mT,group:hT};function gT(t){return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??t.style?.width,height:t.height??t.initialHeight??t.style?.height}:{width:t.width??t.style?.width,height:t.height??t.style?.height}}const pT=t=>{const{width:i,height:s,x:a,y:r}=Ao(t.nodeLookup,{filter:c=>!!c.selected});return{width:bn(i)?i:null,height:bn(s)?s:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${a}px,${r}px)`}};function yT({onSelectionContextMenu:t,noPanClassName:i,disableKeyboardA11y:s}){const a=Je(),{width:r,height:c,transformString:u,userSelectionActive:h}=De(pT,Ie),m=X1(),g=J.useRef(null);J.useEffect(()=>{s||g.current?.focus({preventScroll:!0})},[s]);const v=!h&&r!==null&&c!==null;if(G1({nodeRef:g,disabled:!v}),!v)return null;const p=t?w=>{const _=a.getState().nodes.filter(E=>E.selected);t(w,_)}:void 0,y=w=>{Object.prototype.hasOwnProperty.call(Lc,w.key)&&(w.preventDefault(),m({direction:Lc[w.key],factor:w.shiftKey?4:1}))};return M.jsx("div",{className:ct(["react-flow__nodesselection","react-flow__container",i]),style:{transform:u},children:M.jsx("div",{ref:g,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:s?void 0:-1,onKeyDown:s?void 0:y,style:{width:r,height:c}})})}const F0=typeof window<"u"?window:void 0,vT=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function Z1({children:t,onPaneClick:i,onPaneMouseEnter:s,onPaneMouseMove:a,onPaneMouseLeave:r,onPaneContextMenu:c,onPaneScroll:u,paneClickDistance:h,deleteKeyCode:m,selectionKeyCode:g,selectionOnDrag:v,selectionMode:p,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:_,panActivationKeyCode:E,zoomActivationKeyCode:N,elementsSelectable:S,zoomOnScroll:C,zoomOnPinch:x,panOnScroll:T,panOnScrollSpeed:L,panOnScrollMode:D,zoomOnDoubleClick:R,panOnDrag:j,autoPanOnSelection:q,defaultViewport:le,translateExtent:X,minZoom:I,maxZoom:ae,preventScrolling:k,onSelectionContextMenu:Y,noWheelClassName:O,noPanClassName:B,disableKeyboardA11y:G,onViewportChange:K,isControlledViewport:ne}){const{nodesSelectionActive:z,userSelectionActive:$}=De(vT,Ie),P=vo(g,{target:F0}),ee=vo(E,{target:F0}),ce=ee||j,he=ee||T,ue=v&&ce!==!0,te=P||$||ue;return WA({deleteKeyCode:m,multiSelectionKeyCode:_}),M.jsx(tT,{onPaneContextMenu:c,elementsSelectable:S,zoomOnScroll:C,zoomOnPinch:x,panOnScroll:he,panOnScrollSpeed:L,panOnScrollMode:D,zoomOnDoubleClick:R,panOnDrag:!P&&ce,defaultViewport:le,translateExtent:X,minZoom:I,maxZoom:ae,zoomActivationKeyCode:N,preventScrolling:k,noWheelClassName:O,noPanClassName:B,onViewportChange:K,isControlledViewport:ne,paneClickDistance:h,selectionOnDrag:ue,children:M.jsxs(lT,{onSelectionStart:y,onSelectionEnd:w,onPaneClick:i,onPaneMouseEnter:s,onPaneMouseMove:a,onPaneMouseLeave:r,onPaneContextMenu:c,onPaneScroll:u,panOnDrag:ce,autoPanOnSelection:q,isSelecting:!!te,selectionMode:p,selectionKeyPressed:P,paneClickDistance:h,selectionOnDrag:ue,children:[t,z&&M.jsx(yT,{onSelectionContextMenu:Y,noPanClassName:B,disableKeyboardA11y:G})]})})}Z1.displayName="FlowRenderer";const bT=J.memo(Z1),ST=t=>i=>t?Hh(i.nodeLookup,{x:0,y:0,width:i.width,height:i.height},i.transform,!0).map(s=>s.id):Array.from(i.nodeLookup.keys());function wT(t){return De(J.useCallback(ST(t),[t]),Ie)}const xT=t=>t.updateNodeInternals;function ET(){const t=De(xT),[i]=J.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(s=>{const a=new Map;s.forEach(r=>{const c=r.target.getAttribute("data-id");a.set(c,{id:c,nodeElement:r.target,force:!0})}),t(a)}));return J.useEffect(()=>()=>{i?.disconnect()},[i]),i}function _T({node:t,nodeType:i,hasDimensions:s,resizeObserver:a}){const r=Je(),c=J.useRef(null),u=J.useRef(null),h=J.useRef(t.sourcePosition),m=J.useRef(t.targetPosition),g=J.useRef(i),v=s&&!!t.internals.handleBounds;return J.useEffect(()=>{c.current&&!t.hidden&&(!v||u.current!==c.current)&&(u.current&&a?.unobserve(u.current),a?.observe(c.current),u.current=c.current)},[v,t.hidden]),J.useEffect(()=>()=>{u.current&&(a?.unobserve(u.current),u.current=null)},[]),J.useEffect(()=>{if(c.current){const p=g.current!==i,y=h.current!==t.sourcePosition,w=m.current!==t.targetPosition;(p||y||w)&&(g.current=i,h.current=t.sourcePosition,m.current=t.targetPosition,r.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:c.current,force:!0}]])))}},[t.id,i,t.sourcePosition,t.targetPosition]),c}function NT({id:t,onClick:i,onMouseEnter:s,onMouseMove:a,onMouseLeave:r,onContextMenu:c,onDoubleClick:u,nodesDraggable:h,elementsSelectable:m,nodesConnectable:g,nodesFocusable:v,resizeObserver:p,noDragClassName:y,noPanClassName:w,disableKeyboardA11y:_,rfId:E,nodeTypes:N,nodeClickDistance:S,onError:C}){const{node:x,internals:T,isParent:L}=De(te=>{const de=te.nodeLookup.get(t),we=te.parentLookup.has(t);return{node:de,internals:de.internals,isParent:we}},Ie);let D=x.type||"default",R=N?.[D]||J0[D];R===void 0&&(C?.("003",wn.error003(D)),D="default",R=N?.default||J0.default);const j=!!(x.draggable||h&&typeof x.draggable>"u"),q=!!(x.selectable||m&&typeof x.selectable>"u"),le=!!(x.connectable||g&&typeof x.connectable>"u"),X=!!(x.focusable||v&&typeof x.focusable>"u"),I=Je(),ae=p1(x),k=_T({node:x,nodeType:D,hasDimensions:ae,resizeObserver:p}),Y=G1({nodeRef:k,disabled:x.hidden||!j,noDragClassName:y,handleSelector:x.dragHandle,nodeId:t,isSelectable:q,nodeClickDistance:S}),O=X1();if(x.hidden)return null;const B=ri(x),G=gT(x),K=q||j||i||s||a||r,ne=s?te=>s(te,{...T.userNode}):void 0,z=a?te=>a(te,{...T.userNode}):void 0,$=r?te=>r(te,{...T.userNode}):void 0,P=c?te=>c(te,{...T.userNode}):void 0,ee=u?te=>u(te,{...T.userNode}):void 0,ce=te=>{const{selectNodesOnDrag:de,nodeDragThreshold:we}=I.getState();q&&(!de||!j||we>0)&&bh({id:t,store:I,nodeRef:k}),i&&i(te,{...T.userNode})},he=te=>{if(!(b1(te.nativeEvent)||_)){if(o1.includes(te.key)&&q){const de=te.key==="Escape";bh({id:t,store:I,unselect:de,nodeRef:k})}else if(j&&x.selected&&Object.prototype.hasOwnProperty.call(Lc,te.key)){te.preventDefault();const{ariaLabelConfig:de}=I.getState();I.setState({ariaLiveMessage:de["node.a11yDescription.ariaLiveMessage"]({direction:te.key.replace("Arrow","").toLowerCase(),x:~~T.positionAbsolute.x,y:~~T.positionAbsolute.y})}),O({direction:Lc[te.key],factor:te.shiftKey?4:1})}}},ue=()=>{if(_||!k.current?.matches(":focus-visible"))return;const{transform:te,width:de,height:we,autoPanOnNodeFocus:Se,setCenter:re}=I.getState();if(!Se)return;Hh(new Map([[t,x]]),{x:0,y:0,width:de,height:we},te,!0).length>0||re(x.position.x+B.width/2,x.position.y+B.height/2,{zoom:te[2]})};return M.jsx("div",{className:ct(["react-flow__node",`react-flow__node-${D}`,{[w]:j},x.className,{selected:x.selected,selectable:q,parent:L,draggable:j,dragging:Y}]),ref:k,style:{zIndex:T.z,transform:`translate(${T.positionAbsolute.x}px,${T.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:ae?"visible":"hidden",...x.style,...G},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:ne,onMouseMove:z,onMouseLeave:$,onContextMenu:P,onClick:ce,onDoubleClick:ee,onKeyDown:X?he:void 0,tabIndex:X?0:void 0,onFocus:X?ue:void 0,role:x.ariaRole??(X?"group":void 0),"aria-roledescription":"node","aria-describedby":_?void 0:`${H1}-${E}`,"aria-label":x.ariaLabel,...x.domAttributes,children:M.jsx(oT,{value:t,children:M.jsx(R,{id:t,data:x.data,type:D,positionAbsoluteX:T.positionAbsolute.x,positionAbsoluteY:T.positionAbsolute.y,selected:x.selected??!1,selectable:q,draggable:j,deletable:x.deletable??!0,isConnectable:le,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:Y,dragHandle:x.dragHandle,zIndex:T.z,parentId:x.parentId,...B})})})}var AT=J.memo(NT);const TT=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function I1(t){const{nodesDraggable:i,nodesConnectable:s,nodesFocusable:a,elementsSelectable:r,onError:c}=De(TT,Ie),u=wT(t.onlyRenderVisibleElements),h=ET();return M.jsx("div",{className:"react-flow__nodes",style:Fc,children:u.map(m=>M.jsx(AT,{id:m,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:h,nodesDraggable:i,nodesConnectable:s,nodesFocusable:a,elementsSelectable:r,nodeClickDistance:t.nodeClickDistance,onError:c},m))})}I1.displayName="NodeRenderer";const MT=J.memo(I1);function CT(t){return De(J.useCallback(s=>{if(!t)return s.edges.map(r=>r.id);const a=[];if(s.width&&s.height)for(const r of s.edges){const c=s.nodeLookup.get(r.source),u=s.nodeLookup.get(r.target);c&&u&&EN({sourceNode:c,targetNode:u,width:s.width,height:s.height,transform:s.transform})&&a.push(r.id)}return a},[t]),Ie)}const OT=({color:t="none",strokeWidth:i=1})=>{const s={strokeWidth:i,...t&&{stroke:t}};return M.jsx("polyline",{className:"arrow",style:s,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},zT=({color:t="none",strokeWidth:i=1})=>{const s={strokeWidth:i,...t&&{stroke:t,fill:t}};return M.jsx("polyline",{className:"arrowclosed",style:s,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},W0={[go.Arrow]:OT,[go.ArrowClosed]:zT};function DT(t){const i=Je();return J.useMemo(()=>Object.prototype.hasOwnProperty.call(W0,t)?W0[t]:(i.getState().onError?.("009",wn.error009(t)),null),[t])}const LT=({id:t,type:i,color:s,width:a=12.5,height:r=12.5,markerUnits:c="strokeWidth",strokeWidth:u,orient:h="auto-start-reverse"})=>{const m=DT(i);return m?M.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${a}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:c,orient:h,refX:"0",refY:"0",children:M.jsx(m,{color:s,strokeWidth:u})}):null},Q1=({defaultColor:t,rfId:i})=>{const s=De(c=>c.edges),a=De(c=>c.defaultEdgeOptions),r=J.useMemo(()=>zN(s,{id:i,defaultColor:t,defaultMarkerStart:a?.markerStart,defaultMarkerEnd:a?.markerEnd}),[s,a,i,t]);return r.length?M.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:M.jsx("defs",{children:r.map(c=>M.jsx(LT,{id:c.id,type:c.type,color:c.color,width:c.width,height:c.height,markerUnits:c.markerUnits,strokeWidth:c.strokeWidth,orient:c.orient},c.id))})}):null};Q1.displayName="MarkerDefinitions";var jT=J.memo(Q1);function J1({x:t,y:i,label:s,labelStyle:a,labelShowBg:r=!0,labelBgStyle:c,labelBgPadding:u=[2,4],labelBgBorderRadius:h=2,children:m,className:g,...v}){const[p,y]=J.useState({x:1,y:0,width:0,height:0}),w=ct(["react-flow__edge-textwrapper",g]),_=J.useRef(null);return J.useEffect(()=>{if(_.current){const E=_.current.getBBox();y({x:E.x,y:E.y,width:E.width,height:E.height})}},[s]),s?M.jsxs("g",{transform:`translate(${t-p.width/2} ${i-p.height/2})`,className:w,visibility:p.width?"visible":"hidden",...v,children:[r&&M.jsx("rect",{width:p.width+2*u[0],x:-u[0],y:-u[1],height:p.height+2*u[1],className:"react-flow__edge-textbg",style:c,rx:h,ry:h}),M.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:_,style:a,children:s}),m]}):null}J1.displayName="EdgeText";const RT=J.memo(J1);function Mo({path:t,labelX:i,labelY:s,label:a,labelStyle:r,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:m,interactionWidth:g=20,...v}){return M.jsxs(M.Fragment,{children:[M.jsx("path",{...v,d:t,fill:"none",className:ct(["react-flow__edge-path",v.className])}),g?M.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:g,className:"react-flow__edge-interaction"}):null,a&&bn(i)&&bn(s)?M.jsx(RT,{x:i,y:s,label:a,labelStyle:r,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:m}):null]})}function P0({pos:t,x1:i,y1:s,x2:a,y2:r}){return t===me.Left||t===me.Right?[.5*(i+a),s]:[i,.5*(s+r)]}function F1({sourceX:t,sourceY:i,sourcePosition:s=me.Bottom,targetX:a,targetY:r,targetPosition:c=me.Top}){const[u,h]=P0({pos:s,x1:t,y1:i,x2:a,y2:r}),[m,g]=P0({pos:c,x1:a,y1:r,x2:t,y2:i}),[v,p,y,w]=w1({sourceX:t,sourceY:i,targetX:a,targetY:r,sourceControlX:u,sourceControlY:h,targetControlX:m,targetControlY:g});return[`M${t},${i} C${u},${h} ${m},${g} ${a},${r}`,v,p,y,w]}function W1(t){return J.memo(({id:i,sourceX:s,sourceY:a,targetX:r,targetY:c,sourcePosition:u,targetPosition:h,label:m,labelStyle:g,labelShowBg:v,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:E,markerStart:N,interactionWidth:S})=>{const[C,x,T]=F1({sourceX:s,sourceY:a,sourcePosition:u,targetX:r,targetY:c,targetPosition:h}),L=t.isInternal?void 0:i;return M.jsx(Mo,{id:L,path:C,labelX:x,labelY:T,label:m,labelStyle:g,labelShowBg:v,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:E,markerStart:N,interactionWidth:S})})}const kT=W1({isInternal:!1}),P1=W1({isInternal:!0});kT.displayName="SimpleBezierEdge";P1.displayName="SimpleBezierEdgeInternal";function eb(t){return J.memo(({id:i,sourceX:s,sourceY:a,targetX:r,targetY:c,label:u,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:v,labelBgBorderRadius:p,style:y,sourcePosition:w=me.Bottom,targetPosition:_=me.Top,markerEnd:E,markerStart:N,pathOptions:S,interactionWidth:C})=>{const[x,T,L]=gh({sourceX:s,sourceY:a,sourcePosition:w,targetX:r,targetY:c,targetPosition:_,borderRadius:S?.borderRadius,offset:S?.offset,stepPosition:S?.stepPosition}),D=t.isInternal?void 0:i;return M.jsx(Mo,{id:D,path:x,labelX:T,labelY:L,label:u,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:v,labelBgBorderRadius:p,style:y,markerEnd:E,markerStart:N,interactionWidth:C})})}const tb=eb({isInternal:!1}),nb=eb({isInternal:!0});tb.displayName="SmoothStepEdge";nb.displayName="SmoothStepEdgeInternal";function ib(t){return J.memo(({id:i,...s})=>{const a=t.isInternal?void 0:i;return M.jsx(tb,{...s,id:a,pathOptions:J.useMemo(()=>({borderRadius:0,offset:s.pathOptions?.offset}),[s.pathOptions?.offset])})})}const BT=ib({isInternal:!1}),sb=ib({isInternal:!0});BT.displayName="StepEdge";sb.displayName="StepEdgeInternal";function lb(t){return J.memo(({id:i,sourceX:s,sourceY:a,targetX:r,targetY:c,label:u,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:v,labelBgBorderRadius:p,style:y,markerEnd:w,markerStart:_,interactionWidth:E})=>{const[N,S,C]=_1({sourceX:s,sourceY:a,targetX:r,targetY:c}),x=t.isInternal?void 0:i;return M.jsx(Mo,{id:x,path:N,labelX:S,labelY:C,label:u,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:v,labelBgBorderRadius:p,style:y,markerEnd:w,markerStart:_,interactionWidth:E})})}const HT=lb({isInternal:!1}),ab=lb({isInternal:!0});HT.displayName="StraightEdge";ab.displayName="StraightEdgeInternal";function ob(t){return J.memo(({id:i,sourceX:s,sourceY:a,targetX:r,targetY:c,sourcePosition:u=me.Bottom,targetPosition:h=me.Top,label:m,labelStyle:g,labelShowBg:v,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:E,markerStart:N,pathOptions:S,interactionWidth:C})=>{const[x,T,L]=x1({sourceX:s,sourceY:a,sourcePosition:u,targetX:r,targetY:c,targetPosition:h,curvature:S?.curvature}),D=t.isInternal?void 0:i;return M.jsx(Mo,{id:D,path:x,labelX:T,labelY:L,label:m,labelStyle:g,labelShowBg:v,labelBgStyle:p,labelBgPadding:y,labelBgBorderRadius:w,style:_,markerEnd:E,markerStart:N,interactionWidth:C})})}const $T=ob({isInternal:!1}),rb=ob({isInternal:!0});$T.displayName="BezierEdge";rb.displayName="BezierEdgeInternal";const ev={default:rb,straight:ab,step:sb,smoothstep:nb,simplebezier:P1},tv={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},UT=(t,i,s)=>s===me.Left?t-i:s===me.Right?t+i:t,qT=(t,i,s)=>s===me.Top?t-i:s===me.Bottom?t+i:t,nv="react-flow__edgeupdater";function iv({position:t,centerX:i,centerY:s,radius:a=10,onMouseDown:r,onMouseEnter:c,onMouseOut:u,type:h}){return M.jsx("circle",{onMouseDown:r,onMouseEnter:c,onMouseOut:u,className:ct([nv,`${nv}-${h}`]),cx:UT(i,a,t),cy:qT(s,a,t),r:a,stroke:"transparent",fill:"transparent"})}function VT({isReconnectable:t,reconnectRadius:i,edge:s,sourceX:a,sourceY:r,targetX:c,targetY:u,sourcePosition:h,targetPosition:m,onReconnect:g,onReconnectStart:v,onReconnectEnd:p,setReconnecting:y,setUpdateHover:w}){const _=Je(),E=(T,L)=>{if(T.button!==0)return;const{autoPanOnConnect:D,domNode:R,connectionMode:j,connectionRadius:q,lib:le,onConnectStart:X,cancelConnection:I,nodeLookup:ae,rfId:k,panBy:Y,updateConnection:O}=_.getState(),B=L.type==="target",G=(z,$)=>{y(!1),p?.(z,s,L.type,$)},K=z=>g?.(s,z),ne=(z,$)=>{y(!0),v?.(T,s,L.type),X?.(z,$)};vh.onPointerDown(T.nativeEvent,{autoPanOnConnect:D,connectionMode:j,connectionRadius:q,domNode:R,handleId:L.id,nodeId:L.nodeId,nodeLookup:ae,isTarget:B,edgeUpdaterType:L.type,lib:le,flowId:k,cancelConnection:I,panBy:Y,isValidConnection:(...z)=>_.getState().isValidConnection?.(...z)??!0,onConnect:K,onConnectStart:ne,onConnectEnd:(...z)=>_.getState().onConnectEnd?.(...z),onReconnectEnd:G,updateConnection:O,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,dragThreshold:_.getState().connectionDragThreshold,handleDomNode:T.currentTarget})},N=T=>E(T,{nodeId:s.target,id:s.targetHandle??null,type:"target"}),S=T=>E(T,{nodeId:s.source,id:s.sourceHandle??null,type:"source"}),C=()=>w(!0),x=()=>w(!1);return M.jsxs(M.Fragment,{children:[(t===!0||t==="source")&&M.jsx(iv,{position:h,centerX:a,centerY:r,radius:i,onMouseDown:N,onMouseEnter:C,onMouseOut:x,type:"source"}),(t===!0||t==="target")&&M.jsx(iv,{position:m,centerX:c,centerY:u,radius:i,onMouseDown:S,onMouseEnter:C,onMouseOut:x,type:"target"})]})}function YT({id:t,edgesFocusable:i,edgesReconnectable:s,elementsSelectable:a,onClick:r,onDoubleClick:c,onContextMenu:u,onMouseEnter:h,onMouseMove:m,onMouseLeave:g,reconnectRadius:v,onReconnect:p,onReconnectStart:y,onReconnectEnd:w,rfId:_,edgeTypes:E,noPanClassName:N,onError:S,disableKeyboardA11y:C}){let x=De(re=>re.edgeLookup.get(t));const T=De(re=>re.defaultEdgeOptions);x=T?{...T,...x}:x;let L=x.type||"default",D=E?.[L]||ev[L];D===void 0&&(S?.("011",wn.error011(L)),L="default",D=E?.default||ev.default);const R=!!(x.focusable||i&&typeof x.focusable>"u"),j=typeof p<"u"&&(x.reconnectable||s&&typeof x.reconnectable>"u"),q=!!(x.selectable||a&&typeof x.selectable>"u"),le=J.useRef(null),[X,I]=J.useState(!1),[ae,k]=J.useState(!1),Y=Je(),{zIndex:O,sourceX:B,sourceY:G,targetX:K,targetY:ne,sourcePosition:z,targetPosition:$}=De(J.useCallback(re=>{const fe=re.nodeLookup.get(x.source),ye=re.nodeLookup.get(x.target);if(!fe||!ye)return{zIndex:x.zIndex,...tv};const xe=ON({id:t,sourceNode:fe,targetNode:ye,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:re.connectionMode,onError:S});return{zIndex:xN({selected:x.selected,zIndex:x.zIndex,sourceNode:fe,targetNode:ye,elevateOnSelect:re.elevateEdgesOnSelect,zIndexMode:re.zIndexMode}),...xe||tv}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Ie),P=J.useMemo(()=>x.markerStart?`url('#${ph(x.markerStart,_)}')`:void 0,[x.markerStart,_]),ee=J.useMemo(()=>x.markerEnd?`url('#${ph(x.markerEnd,_)}')`:void 0,[x.markerEnd,_]);if(x.hidden||B===null||G===null||K===null||ne===null)return null;const ce=re=>{const{addSelectedEdges:fe,unselectNodesAndEdges:ye,multiSelectionActive:xe}=Y.getState();q&&(Y.setState({nodesSelectionActive:!1}),x.selected&&xe?(ye({nodes:[],edges:[x]}),le.current?.blur()):fe([t])),r&&r(re,x)},he=c?re=>{c(re,{...x})}:void 0,ue=u?re=>{u(re,{...x})}:void 0,te=h?re=>{h(re,{...x})}:void 0,de=m?re=>{m(re,{...x})}:void 0,we=g?re=>{g(re,{...x})}:void 0,Se=re=>{if(!C&&o1.includes(re.key)&&q){const{unselectNodesAndEdges:fe,addSelectedEdges:ye}=Y.getState();re.key==="Escape"?(le.current?.blur(),fe({edges:[x]})):ye([t])}};return M.jsx("svg",{style:{zIndex:O},children:M.jsxs("g",{className:ct(["react-flow__edge",`react-flow__edge-${L}`,x.className,N,{selected:x.selected,animated:x.animated,inactive:!q&&!r,updating:X,selectable:q}]),onClick:ce,onDoubleClick:he,onContextMenu:ue,onMouseEnter:te,onMouseMove:de,onMouseLeave:we,onKeyDown:R?Se:void 0,tabIndex:R?0:void 0,role:x.ariaRole??(R?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":R?`${$1}-${_}`:void 0,ref:le,...x.domAttributes,children:[!ae&&M.jsx(D,{id:t,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:q,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:B,sourceY:G,targetX:K,targetY:ne,sourcePosition:z,targetPosition:$,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:P,markerEnd:ee,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),j&&M.jsx(VT,{edge:x,isReconnectable:j,reconnectRadius:v,onReconnect:p,onReconnectStart:y,onReconnectEnd:w,sourceX:B,sourceY:G,targetX:K,targetY:ne,sourcePosition:z,targetPosition:$,setUpdateHover:I,setReconnecting:k})]})})}var GT=J.memo(YT);const XT=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function cb({defaultMarkerColor:t,onlyRenderVisibleElements:i,rfId:s,edgeTypes:a,noPanClassName:r,onReconnect:c,onEdgeContextMenu:u,onEdgeMouseEnter:h,onEdgeMouseMove:m,onEdgeMouseLeave:g,onEdgeClick:v,reconnectRadius:p,onEdgeDoubleClick:y,onReconnectStart:w,onReconnectEnd:_,disableKeyboardA11y:E}){const{edgesFocusable:N,edgesReconnectable:S,elementsSelectable:C,onError:x}=De(XT,Ie),T=CT(i);return M.jsxs("div",{className:"react-flow__edges",children:[M.jsx(jT,{defaultColor:t,rfId:s}),T.map(L=>M.jsx(GT,{id:L,edgesFocusable:N,edgesReconnectable:S,elementsSelectable:C,noPanClassName:r,onReconnect:c,onContextMenu:u,onMouseEnter:h,onMouseMove:m,onMouseLeave:g,onClick:v,reconnectRadius:p,onDoubleClick:y,onReconnectStart:w,onReconnectEnd:_,rfId:s,onError:x,edgeTypes:a,disableKeyboardA11y:E},L))]})}cb.displayName="EdgeRenderer";const KT=J.memo(cb),ZT=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function IT({children:t}){const i=De(ZT);return M.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:i},children:t})}function QT(t){const i=Jc(),s=J.useRef(!1);J.useEffect(()=>{!s.current&&i.viewportInitialized&&t&&(setTimeout(()=>t(i),1),s.current=!0)},[t,i.viewportInitialized])}const JT=t=>t.panZoom?.syncViewport;function FT(t){const i=De(JT),s=Je();return J.useEffect(()=>{t&&(i?.(t),s.setState({transform:[t.x,t.y,t.zoom]}))},[t,i]),null}function WT(t){return t.connection.inProgress?{...t.connection,to:Kl(t.connection.to,t.transform)}:{...t.connection}}function PT(t){return WT}function eM(t){const i=PT();return De(i,Ie)}const tM=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function nM({containerStyle:t,style:i,type:s,component:a}){const{nodesConnectable:r,width:c,height:u,isValid:h,inProgress:m}=De(tM,Ie);return!(c&&r&&m)?null:M.jsx("svg",{style:t,width:c,height:u,className:"react-flow__connectionline react-flow__container",children:M.jsx("g",{className:ct(["react-flow__connection",u1(h)]),children:M.jsx(ub,{style:i,type:s,CustomComponent:a,isValid:h})})})}const ub=({style:t,type:i=Yi.Bezier,CustomComponent:s,isValid:a})=>{const{inProgress:r,from:c,fromNode:u,fromHandle:h,fromPosition:m,to:g,toNode:v,toHandle:p,toPosition:y,pointer:w}=eM();if(!r)return;if(s)return M.jsx(s,{connectionLineType:i,connectionLineStyle:t,fromNode:u,fromHandle:h,fromX:c.x,fromY:c.y,toX:g.x,toY:g.y,fromPosition:m,toPosition:y,connectionStatus:u1(a),toNode:v,toHandle:p,pointer:w});let _="";const E={sourceX:c.x,sourceY:c.y,sourcePosition:m,targetX:g.x,targetY:g.y,targetPosition:y};switch(i){case Yi.Bezier:[_]=x1(E);break;case Yi.SimpleBezier:[_]=F1(E);break;case Yi.Step:[_]=gh({...E,borderRadius:0});break;case Yi.SmoothStep:[_]=gh(E);break;default:[_]=_1(E)}return M.jsx("path",{d:_,fill:"none",className:"react-flow__connection-path",style:t})};ub.displayName="ConnectionLine";const iM={};function sv(t=iM){J.useRef(t),Je(),J.useEffect(()=>{},[t])}function sM(){Je(),J.useRef(!1),J.useEffect(()=>{},[])}function fb({nodeTypes:t,edgeTypes:i,onInit:s,onNodeClick:a,onEdgeClick:r,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:h,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:v,onSelectionContextMenu:p,onSelectionStart:y,onSelectionEnd:w,connectionLineType:_,connectionLineStyle:E,connectionLineComponent:N,connectionLineContainerStyle:S,selectionKeyCode:C,selectionOnDrag:x,selectionMode:T,multiSelectionKeyCode:L,panActivationKeyCode:D,zoomActivationKeyCode:R,deleteKeyCode:j,onlyRenderVisibleElements:q,elementsSelectable:le,defaultViewport:X,translateExtent:I,minZoom:ae,maxZoom:k,preventScrolling:Y,defaultMarkerColor:O,zoomOnScroll:B,zoomOnPinch:G,panOnScroll:K,panOnScrollSpeed:ne,panOnScrollMode:z,zoomOnDoubleClick:$,panOnDrag:P,autoPanOnSelection:ee,onPaneClick:ce,onPaneMouseEnter:he,onPaneMouseMove:ue,onPaneMouseLeave:te,onPaneScroll:de,onPaneContextMenu:we,paneClickDistance:Se,nodeClickDistance:re,onEdgeContextMenu:fe,onEdgeMouseEnter:ye,onEdgeMouseMove:xe,onEdgeMouseLeave:ke,reconnectRadius:ut,onReconnect:Nt,onReconnectStart:At,onReconnectEnd:Tt,noDragClassName:Ht,noWheelClassName:Ii,noPanClassName:Rn,disableKeyboardA11y:tt,nodeExtent:$t,rfId:Jt,viewport:Ft,onViewportChange:Wt}){return sv(t),sv(i),sM(),QT(s),FT(Ft),M.jsx(bT,{onPaneClick:ce,onPaneMouseEnter:he,onPaneMouseMove:ue,onPaneMouseLeave:te,onPaneContextMenu:we,onPaneScroll:de,paneClickDistance:Se,deleteKeyCode:j,selectionKeyCode:C,selectionOnDrag:x,selectionMode:T,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:L,panActivationKeyCode:D,zoomActivationKeyCode:R,elementsSelectable:le,zoomOnScroll:B,zoomOnPinch:G,zoomOnDoubleClick:$,panOnScroll:K,panOnScrollSpeed:ne,panOnScrollMode:z,panOnDrag:P,autoPanOnSelection:ee,defaultViewport:X,translateExtent:I,minZoom:ae,maxZoom:k,onSelectionContextMenu:p,preventScrolling:Y,noDragClassName:Ht,noWheelClassName:Ii,noPanClassName:Rn,disableKeyboardA11y:tt,onViewportChange:Wt,isControlledViewport:!!Ft,children:M.jsxs(IT,{children:[M.jsx(KT,{edgeTypes:i,onEdgeClick:r,onEdgeDoubleClick:u,onReconnect:Nt,onReconnectStart:At,onReconnectEnd:Tt,onlyRenderVisibleElements:q,onEdgeContextMenu:fe,onEdgeMouseEnter:ye,onEdgeMouseMove:xe,onEdgeMouseLeave:ke,reconnectRadius:ut,defaultMarkerColor:O,noPanClassName:Rn,disableKeyboardA11y:tt,rfId:Jt}),M.jsx(nM,{style:E,type:_,component:N,containerStyle:S}),M.jsx("div",{className:"react-flow__edgelabel-renderer"}),M.jsx(MT,{nodeTypes:t,onNodeClick:a,onNodeDoubleClick:c,onNodeMouseEnter:h,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:v,nodeClickDistance:re,onlyRenderVisibleElements:q,noPanClassName:Rn,noDragClassName:Ht,disableKeyboardA11y:tt,nodeExtent:$t,rfId:Jt}),M.jsx("div",{className:"react-flow__viewport-portal"})]})})}fb.displayName="GraphView";const lM=J.memo(fb),aM=g1(),lv=({nodes:t,edges:i,defaultNodes:s,defaultEdges:a,width:r,height:c,fitView:u,fitViewOptions:h,minZoom:m=.5,maxZoom:g=2,nodeOrigin:v,nodeExtent:p,zIndexMode:y="basic"}={})=>{const w=new Map,_=new Map,E=new Map,N=new Map,S=a??i??[],C=s??t??[],x=v??[0,0],T=p??ho;T1(E,N,S);const{nodesInitialized:L}=yh(C,w,_,{nodeOrigin:x,nodeExtent:T,zIndexMode:y});let D=[0,0,1];if(u&&r&&c){const R=Ao(w,{filter:X=>!!((X.width||X.initialWidth)&&(X.height||X.initialHeight))}),{x:j,y:q,zoom:le}=Uh(R,r,c,m,g,h?.padding??.1);D=[j,q,le]}return{rfId:"1",width:r??0,height:c??0,transform:D,nodes:C,nodesInitialized:L,nodeLookup:w,parentLookup:_,edges:S,edgeLookup:N,connectionLookup:E,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:s!==void 0,hasDefaultEdges:a!==void 0,panZoom:null,minZoom:m,maxZoom:g,translateExtent:ho,nodeExtent:T,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:$l.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:u??!1,fitViewOptions:h,fitViewResolver:null,connection:{...c1},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:aM,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:r1,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},oM=({nodes:t,edges:i,defaultNodes:s,defaultEdges:a,width:r,height:c,fitView:u,fitViewOptions:h,minZoom:m,maxZoom:g,nodeOrigin:v,nodeExtent:p,zIndexMode:y})=>bA((w,_)=>{async function E(){const{nodeLookup:N,panZoom:S,fitViewOptions:C,fitViewResolver:x,width:T,height:L,minZoom:D,maxZoom:R}=_();S&&(await gN({nodes:N,width:T,height:L,panZoom:S,minZoom:D,maxZoom:R},C),x?.resolve(!0),w({fitViewResolver:null}))}return{...lv({nodes:t,edges:i,width:r,height:c,fitView:u,fitViewOptions:h,minZoom:m,maxZoom:g,nodeOrigin:v,nodeExtent:p,defaultNodes:s,defaultEdges:a,zIndexMode:y}),setNodes:N=>{const{nodeLookup:S,parentLookup:C,nodeOrigin:x,elevateNodesOnSelect:T,fitViewQueued:L,zIndexMode:D,nodesSelectionActive:R}=_(),{nodesInitialized:j,hasSelectedNodes:q}=yh(N,S,C,{nodeOrigin:x,nodeExtent:p,elevateNodesOnSelect:T,checkEquality:!0,zIndexMode:D}),le=R&&q;L&&j?(E(),w({nodes:N,nodesInitialized:j,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:le})):w({nodes:N,nodesInitialized:j,nodesSelectionActive:le})},setEdges:N=>{const{connectionLookup:S,edgeLookup:C}=_();T1(S,C,N),w({edges:N})},setDefaultNodesAndEdges:(N,S)=>{if(N){const{setNodes:C}=_();C(N),w({hasDefaultNodes:!0})}if(S){const{setEdges:C}=_();C(S),w({hasDefaultEdges:!0})}},updateNodeInternals:N=>{const{triggerNodeChanges:S,nodeLookup:C,parentLookup:x,domNode:T,nodeOrigin:L,nodeExtent:D,debug:R,fitViewQueued:j,zIndexMode:q}=_(),{changes:le,updatedInternals:X}=HN(N,C,x,T,L,D,q);X&&(jN(C,x,{nodeOrigin:L,nodeExtent:D,zIndexMode:q}),j?(E(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),le?.length>0&&(R&&console.log("React Flow: trigger node changes",le),S?.(le)))},updateNodePositions:(N,S=!1)=>{const C=[];let x=[];const{nodeLookup:T,triggerNodeChanges:L,connection:D,updateConnection:R,onNodesChangeMiddlewareMap:j}=_();for(const[q,le]of N){const X=T.get(q),I=!!(X?.expandParent&&X?.parentId&&le?.position),ae={id:q,type:"position",position:I?{x:Math.max(0,le.position.x),y:Math.max(0,le.position.y)}:le.position,dragging:S};if(X&&D.inProgress&&D.fromNode.id===X.id){const k=Ts(X,D.fromHandle,me.Left,!0);R({...D,from:k})}I&&X.parentId&&C.push({id:q,parentId:X.parentId,rect:{...le.internals.positionAbsolute,width:le.measured.width??0,height:le.measured.height??0}}),x.push(ae)}if(C.length>0){const{parentLookup:q,nodeOrigin:le}=_(),X=Kh(C,T,q,le);x.push(...X)}for(const q of j.values())x=q(x);L(x)},triggerNodeChanges:N=>{const{onNodesChange:S,setNodes:C,nodes:x,hasDefaultNodes:T,debug:L}=_();if(N?.length){if(T){const D=qA(N,x);C(D)}L&&console.log("React Flow: trigger node changes",N),S?.(N)}},triggerEdgeChanges:N=>{const{onEdgesChange:S,setEdges:C,edges:x,hasDefaultEdges:T,debug:L}=_();if(N?.length){if(T){const D=VA(N,x);C(D)}L&&console.log("React Flow: trigger edge changes",N),S?.(N)}},addSelectedNodes:N=>{const{multiSelectionActive:S,edgeLookup:C,nodeLookup:x,triggerNodeChanges:T,triggerEdgeChanges:L}=_();if(S){const D=N.map(R=>gs(R,!0));T(D);return}T(Al(x,new Set([...N]),!0)),L(Al(C))},addSelectedEdges:N=>{const{multiSelectionActive:S,edgeLookup:C,nodeLookup:x,triggerNodeChanges:T,triggerEdgeChanges:L}=_();if(S){const D=N.map(R=>gs(R,!0));L(D);return}L(Al(C,new Set([...N]))),T(Al(x,new Set,!0))},unselectNodesAndEdges:({nodes:N,edges:S}={})=>{const{edges:C,nodes:x,nodeLookup:T,triggerNodeChanges:L,triggerEdgeChanges:D}=_(),R=N||x,j=S||C,q=[];for(const X of R){if(!X.selected)continue;const I=T.get(X.id);I&&(I.selected=!1),q.push(gs(X.id,!1))}const le=[];for(const X of j)X.selected&&le.push(gs(X.id,!1));L(q),D(le)},setMinZoom:N=>{const{panZoom:S,maxZoom:C}=_();S?.setScaleExtent([N,C]),w({minZoom:N})},setMaxZoom:N=>{const{panZoom:S,minZoom:C}=_();S?.setScaleExtent([C,N]),w({maxZoom:N})},setTranslateExtent:N=>{_().panZoom?.setTranslateExtent(N),w({translateExtent:N})},resetSelectedElements:()=>{const{edges:N,nodes:S,triggerNodeChanges:C,triggerEdgeChanges:x,elementsSelectable:T}=_();if(!T)return;const L=S.reduce((R,j)=>j.selected?[...R,gs(j.id,!1)]:R,[]),D=N.reduce((R,j)=>j.selected?[...R,gs(j.id,!1)]:R,[]);C(L),x(D)},setNodeExtent:N=>{const{nodes:S,nodeLookup:C,parentLookup:x,nodeOrigin:T,elevateNodesOnSelect:L,nodeExtent:D,zIndexMode:R}=_();N[0][0]===D[0][0]&&N[0][1]===D[0][1]&&N[1][0]===D[1][0]&&N[1][1]===D[1][1]||(yh(S,C,x,{nodeOrigin:T,nodeExtent:N,elevateNodesOnSelect:L,checkEquality:!1,zIndexMode:R}),w({nodeExtent:N}))},panBy:N=>{const{transform:S,width:C,height:x,panZoom:T,translateExtent:L}=_();return $N({delta:N,panZoom:T,transform:S,translateExtent:L,width:C,height:x})},setCenter:async(N,S,C)=>{const{width:x,height:T,maxZoom:L,panZoom:D}=_();if(!D)return!1;const R=typeof C?.zoom<"u"?C.zoom:L;return await D.setViewport({x:x/2-N*R,y:T/2-S*R,zoom:R},{duration:C?.duration,ease:C?.ease,interpolate:C?.interpolate}),!0},cancelConnection:()=>{w({connection:{...c1}})},updateConnection:N=>{w({connection:N})},reset:()=>w({...lv()})}},Object.is);function db({initialNodes:t,initialEdges:i,defaultNodes:s,defaultEdges:a,initialWidth:r,initialHeight:c,initialMinZoom:u,initialMaxZoom:h,initialFitViewOptions:m,fitView:g,nodeOrigin:v,nodeExtent:p,zIndexMode:y,children:w}){const[_]=J.useState(()=>oM({nodes:t,edges:i,defaultNodes:s,defaultEdges:a,width:r,height:c,fitView:g,minZoom:u,maxZoom:h,fitViewOptions:m,nodeOrigin:v,nodeExtent:p,zIndexMode:y}));return M.jsx(wA,{value:_,children:M.jsx(IA,{children:w})})}function rM({children:t,nodes:i,edges:s,defaultNodes:a,defaultEdges:r,width:c,height:u,fitView:h,fitViewOptions:m,minZoom:g,maxZoom:v,nodeOrigin:p,nodeExtent:y,zIndexMode:w}){return J.useContext(Ic)?M.jsx(M.Fragment,{children:t}):M.jsx(db,{initialNodes:i,initialEdges:s,defaultNodes:a,defaultEdges:r,initialWidth:c,initialHeight:u,fitView:h,initialFitViewOptions:m,initialMinZoom:g,initialMaxZoom:v,nodeOrigin:p,nodeExtent:y,zIndexMode:w,children:t})}const cM={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function uM({nodes:t,edges:i,defaultNodes:s,defaultEdges:a,className:r,nodeTypes:c,edgeTypes:u,onNodeClick:h,onEdgeClick:m,onInit:g,onMove:v,onMoveStart:p,onMoveEnd:y,onConnect:w,onConnectStart:_,onConnectEnd:E,onClickConnectStart:N,onClickConnectEnd:S,onNodeMouseEnter:C,onNodeMouseMove:x,onNodeMouseLeave:T,onNodeContextMenu:L,onNodeDoubleClick:D,onNodeDragStart:R,onNodeDrag:j,onNodeDragStop:q,onNodesDelete:le,onEdgesDelete:X,onDelete:I,onSelectionChange:ae,onSelectionDragStart:k,onSelectionDrag:Y,onSelectionDragStop:O,onSelectionContextMenu:B,onSelectionStart:G,onSelectionEnd:K,onBeforeDelete:ne,connectionMode:z,connectionLineType:$=Yi.Bezier,connectionLineStyle:P,connectionLineComponent:ee,connectionLineContainerStyle:ce,deleteKeyCode:he="Backspace",selectionKeyCode:ue="Shift",selectionOnDrag:te=!1,selectionMode:de=mo.Full,panActivationKeyCode:we="Space",multiSelectionKeyCode:Se=yo()?"Meta":"Control",zoomActivationKeyCode:re=yo()?"Meta":"Control",snapToGrid:fe,snapGrid:ye,onlyRenderVisibleElements:xe=!1,selectNodesOnDrag:ke,nodesDraggable:ut,autoPanOnNodeFocus:Nt,nodesConnectable:At,nodesFocusable:Tt,nodeOrigin:Ht=U1,edgesFocusable:Ii,edgesReconnectable:Rn,elementsSelectable:tt=!0,defaultViewport:$t=jA,minZoom:Jt=.5,maxZoom:Ft=2,translateExtent:Wt=ho,preventScrolling:hu=!0,nodeExtent:Ds,defaultMarkerColor:mu="#b1b1b7",zoomOnScroll:gu=!0,zoomOnPinch:Qi=!0,panOnScroll:wt=!1,panOnScrollSpeed:_n=.5,panOnScrollMode:xt=xs.Free,zoomOnDoubleClick:pu=!0,panOnDrag:yu=!0,onPaneClick:vu,onPaneMouseEnter:Ls,onPaneMouseMove:js,onPaneMouseLeave:Rs,onPaneScroll:kn,onPaneContextMenu:ks,paneClickDistance:Ji=1,nodeClickDistance:bu=0,children:Do,onReconnect:Pl,onReconnectStart:Fi,onReconnectEnd:Su,onEdgeContextMenu:Lo,onEdgeDoubleClick:jo,onEdgeMouseEnter:Ro,onEdgeMouseMove:ea,onEdgeMouseLeave:ta,reconnectRadius:ko=10,onNodesChange:Bo,onEdgesChange:Nn,noDragClassName:ft="nodrag",noWheelClassName:vt="nowheel",noPanClassName:Bn="nopan",fitView:Bs,fitViewOptions:Ho,connectOnClick:wu,attributionPosition:$o,proOptions:Wi,defaultEdgeOptions:na,elevateNodesOnSelect:ci=!0,elevateEdgesOnSelect:ui=!1,disableKeyboardA11y:fi=!1,autoPanOnConnect:di,autoPanOnNodeDrag:st,autoPanOnSelection:Uo=!0,autoPanSpeed:qo,connectionRadius:Hn,isValidConnection:hi,onError:xu,style:Vo,id:ia,nodeDragThreshold:Eu,connectionDragThreshold:Hs,viewport:$s,onViewportChange:fn,width:Mt,height:Yo,colorMode:_u="light",debug:sa,onScroll:la,ariaLabelConfig:Us,zIndexMode:Go="basic",...Ct},aa){const qs=ia||"1",oa=HA(_u),mi=J.useCallback(ra=>{ra.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),la?.(ra)},[la]);return M.jsx("div",{"data-testid":"rf__wrapper",...Ct,onScroll:mi,style:{...Vo,...cM},ref:aa,className:ct(["react-flow",r,oa]),id:ia,role:"application",children:M.jsxs(rM,{nodes:t,edges:i,width:Mt,height:Yo,fitView:Bs,fitViewOptions:Ho,minZoom:Jt,maxZoom:Ft,nodeOrigin:Ht,nodeExtent:Ds,zIndexMode:Go,children:[M.jsx(BA,{nodes:t,edges:i,defaultNodes:s,defaultEdges:a,onConnect:w,onConnectStart:_,onConnectEnd:E,onClickConnectStart:N,onClickConnectEnd:S,nodesDraggable:ut,autoPanOnNodeFocus:Nt,nodesConnectable:At,nodesFocusable:Tt,edgesFocusable:Ii,edgesReconnectable:Rn,elementsSelectable:tt,elevateNodesOnSelect:ci,elevateEdgesOnSelect:ui,minZoom:Jt,maxZoom:Ft,nodeExtent:Ds,onNodesChange:Bo,onEdgesChange:Nn,snapToGrid:fe,snapGrid:ye,connectionMode:z,translateExtent:Wt,connectOnClick:wu,defaultEdgeOptions:na,fitView:Bs,fitViewOptions:Ho,onNodesDelete:le,onEdgesDelete:X,onDelete:I,onNodeDragStart:R,onNodeDrag:j,onNodeDragStop:q,onSelectionDrag:Y,onSelectionDragStart:k,onSelectionDragStop:O,onMove:v,onMoveStart:p,onMoveEnd:y,noPanClassName:Bn,nodeOrigin:Ht,rfId:qs,autoPanOnConnect:di,autoPanOnNodeDrag:st,autoPanSpeed:qo,onError:xu,connectionRadius:Hn,isValidConnection:hi,selectNodesOnDrag:ke,nodeDragThreshold:Eu,connectionDragThreshold:Hs,onBeforeDelete:ne,debug:sa,ariaLabelConfig:Us,zIndexMode:Go}),M.jsx(lM,{onInit:g,onNodeClick:h,onEdgeClick:m,onNodeMouseEnter:C,onNodeMouseMove:x,onNodeMouseLeave:T,onNodeContextMenu:L,onNodeDoubleClick:D,nodeTypes:c,edgeTypes:u,connectionLineType:$,connectionLineStyle:P,connectionLineComponent:ee,connectionLineContainerStyle:ce,selectionKeyCode:ue,selectionOnDrag:te,selectionMode:de,deleteKeyCode:he,multiSelectionKeyCode:Se,panActivationKeyCode:we,zoomActivationKeyCode:re,onlyRenderVisibleElements:xe,defaultViewport:$t,translateExtent:Wt,minZoom:Jt,maxZoom:Ft,preventScrolling:hu,zoomOnScroll:gu,zoomOnPinch:Qi,zoomOnDoubleClick:pu,panOnScroll:wt,panOnScrollSpeed:_n,panOnScrollMode:xt,panOnDrag:yu,autoPanOnSelection:Uo,onPaneClick:vu,onPaneMouseEnter:Ls,onPaneMouseMove:js,onPaneMouseLeave:Rs,onPaneScroll:kn,onPaneContextMenu:ks,paneClickDistance:Ji,nodeClickDistance:bu,onSelectionContextMenu:B,onSelectionStart:G,onSelectionEnd:K,onReconnect:Pl,onReconnectStart:Fi,onReconnectEnd:Su,onEdgeContextMenu:Lo,onEdgeDoubleClick:jo,onEdgeMouseEnter:Ro,onEdgeMouseMove:ea,onEdgeMouseLeave:ta,reconnectRadius:ko,defaultMarkerColor:mu,noDragClassName:ft,noWheelClassName:vt,noPanClassName:Bn,rfId:qs,disableKeyboardA11y:fi,nodeExtent:Ds,viewport:$s,onViewportChange:fn}),M.jsx(LA,{onSelectionChange:ae}),Do,M.jsx(MA,{proOptions:Wi,position:$o}),M.jsx(TA,{rfId:qs,disableKeyboardA11y:fi})]})})}var fM=V1(uM);const dM=t=>t.domNode?.querySelector(".react-flow__edgelabel-renderer");function hM({children:t}){const i=De(dM);return i?SA.createPortal(t,i):null}function mM({dimensions:t,lineWidth:i,variant:s,className:a}){return M.jsx("path",{strokeWidth:i,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:ct(["react-flow__background-pattern",s,a])})}function gM({radius:t,className:i}){return M.jsx("circle",{cx:t,cy:t,r:t,className:ct(["react-flow__background-pattern","dots",i])})}var Gi;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Gi||(Gi={}));const pM={[Gi.Dots]:1,[Gi.Lines]:1,[Gi.Cross]:6},yM=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function hb({id:t,variant:i=Gi.Dots,gap:s=20,size:a,lineWidth:r=1,offset:c=0,color:u,bgColor:h,style:m,className:g,patternClassName:v}){const p=J.useRef(null),{transform:y,patternId:w}=De(yM,Ie),_=a||pM[i],E=i===Gi.Dots,N=i===Gi.Cross,S=Array.isArray(s)?s:[s,s],C=[S[0]*y[2]||1,S[1]*y[2]||1],x=_*y[2],T=Array.isArray(c)?c:[c,c],L=N?[x,x]:C,D=[T[0]*y[2]||1+L[0]/2,T[1]*y[2]||1+L[1]/2],R=`${w}${t||""}`;return M.jsxs("svg",{className:ct(["react-flow__background",g]),style:{...m,...Fc,"--xy-background-color-props":h,"--xy-background-pattern-color-props":u},ref:p,"data-testid":"rf__background",children:[M.jsx("pattern",{id:R,x:y[0]%C[0],y:y[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${D[0]},-${D[1]})`,children:E?M.jsx(gM,{radius:x/2,className:v}):M.jsx(mM,{dimensions:L,lineWidth:r,variant:i,className:v})}),M.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${R})`})]})}hb.displayName="Background";const vM=J.memo(hb);function bM(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:M.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function SM(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:M.jsx("path",{d:"M0 0h32v4.2H0z"})})}function wM(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:M.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 xM(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:M.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 EM(){return M.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:M.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 rc({children:t,className:i,...s}){return M.jsx("button",{type:"button",className:ct(["react-flow__controls-button",i]),...s,children:t})}const _M=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function mb({style:t,showZoom:i=!0,showFitView:s=!0,showInteractive:a=!0,fitViewOptions:r,onZoomIn:c,onZoomOut:u,onFitView:h,onInteractiveChange:m,className:g,children:v,position:p="bottom-left",orientation:y="vertical","aria-label":w}){const _=Je(),{isInteractive:E,minZoomReached:N,maxZoomReached:S,ariaLabelConfig:C}=De(_M,Ie),{zoomIn:x,zoomOut:T,fitView:L}=Jc(),D=()=>{x(),c?.()},R=()=>{T(),u?.()},j=()=>{L(r),h?.()},q=()=>{_.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),m?.(!E)},le=y==="horizontal"?"horizontal":"vertical";return M.jsxs(Qc,{className:ct(["react-flow__controls",le,g]),position:p,style:t,"data-testid":"rf__controls","aria-label":w??C["controls.ariaLabel"],children:[i&&M.jsxs(M.Fragment,{children:[M.jsx(rc,{onClick:D,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:S,children:M.jsx(bM,{})}),M.jsx(rc,{onClick:R,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:N,children:M.jsx(SM,{})})]}),s&&M.jsx(rc,{className:"react-flow__controls-fitview",onClick:j,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:M.jsx(wM,{})}),a&&M.jsx(rc,{className:"react-flow__controls-interactive",onClick:q,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:E?M.jsx(EM,{}):M.jsx(xM,{})}),v]})}mb.displayName="Controls";const NM=J.memo(mb);function AM({id:t,x:i,y:s,width:a,height:r,style:c,color:u,strokeColor:h,strokeWidth:m,className:g,borderRadius:v,shapeRendering:p,selected:y,onClick:w}){const{background:_,backgroundColor:E}=c||{},N=u||_||E;return M.jsx("rect",{className:ct(["react-flow__minimap-node",{selected:y},g]),x:i,y:s,rx:v,ry:v,width:a,height:r,style:{fill:N,stroke:h,strokeWidth:m},shapeRendering:p,onClick:w?S=>w(S,t):void 0})}const TM=J.memo(AM),MM=t=>t.nodes.map(i=>i.id),Id=t=>t instanceof Function?t:()=>t;function CM({nodeStrokeColor:t,nodeColor:i,nodeClassName:s="",nodeBorderRadius:a=5,nodeStrokeWidth:r,nodeComponent:c=TM,onClick:u}){const h=De(MM,Ie),m=Id(i),g=Id(t),v=Id(s),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return M.jsx(M.Fragment,{children:h.map(y=>M.jsx(zM,{id:y,nodeColorFunc:m,nodeStrokeColorFunc:g,nodeClassNameFunc:v,nodeBorderRadius:a,nodeStrokeWidth:r,NodeComponent:c,onClick:u,shapeRendering:p},y))})}function OM({id:t,nodeColorFunc:i,nodeStrokeColorFunc:s,nodeClassNameFunc:a,nodeBorderRadius:r,nodeStrokeWidth:c,shapeRendering:u,NodeComponent:h,onClick:m}){const{node:g,x:v,y:p,width:y,height:w}=De(_=>{const E=_.nodeLookup.get(t);if(!E)return{node:void 0,x:0,y:0,width:0,height:0};const N=E.internals.userNode,{x:S,y:C}=E.internals.positionAbsolute,{width:x,height:T}=ri(N);return{node:N,x:S,y:C,width:x,height:T}},Ie);return!g||g.hidden||!p1(g)?null:M.jsx(h,{x:v,y:p,width:y,height:w,style:g.style,selected:!!g.selected,className:a(g),color:i(g),borderRadius:r,strokeColor:s(g),strokeWidth:c,shapeRendering:u,onClick:m,id:g.id})}const zM=J.memo(OM);var DM=J.memo(CM);const LM=200,jM=150,RM=t=>!t.hidden,kM=t=>{const i={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:i,boundingRect:t.nodeLookup.size>0?m1(Ao(t.nodeLookup,{filter:RM}),i):i,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},BM="react-flow__minimap-desc";function gb({style:t,className:i,nodeStrokeColor:s,nodeColor:a,nodeClassName:r="",nodeBorderRadius:c=5,nodeStrokeWidth:u,nodeComponent:h,bgColor:m,maskColor:g,maskStrokeColor:v,maskStrokeWidth:p,position:y="bottom-right",onClick:w,onNodeClick:_,pannable:E=!1,zoomable:N=!1,ariaLabel:S,inversePan:C,zoomStep:x=1,offsetScale:T=5}){const L=Je(),D=J.useRef(null),{boundingRect:R,viewBB:j,rfId:q,panZoom:le,translateExtent:X,flowWidth:I,flowHeight:ae,ariaLabelConfig:k}=De(kM,Ie),Y=t?.width??LM,O=t?.height??jM,B=R.width/Y,G=R.height/O,K=Math.max(B,G),ne=K*Y,z=K*O,$=T*K,P=R.x-(ne-R.width)/2-$,ee=R.y-(z-R.height)/2-$,ce=ne+$*2,he=z+$*2,ue=`${BM}-${q}`,te=J.useRef(0),de=J.useRef();te.current=K,J.useEffect(()=>{if(D.current&&le)return de.current=IN({domNode:D.current,panZoom:le,getTransform:()=>L.getState().transform,getViewScale:()=>te.current}),()=>{de.current?.destroy()}},[le]),J.useEffect(()=>{de.current?.update({translateExtent:X,width:I,height:ae,inversePan:C,pannable:E,zoomStep:x,zoomable:N})},[E,N,C,x,X,I,ae]);const we=w?fe=>{const[ye,xe]=de.current?.pointer(fe)||[0,0];w(fe,{x:ye,y:xe})}:void 0,Se=_?J.useCallback((fe,ye)=>{const xe=L.getState().nodeLookup.get(ye).internals.userNode;_(fe,xe)},[]):void 0,re=S??k["minimap.ariaLabel"];return M.jsx(Qc,{position:y,style:{...t,"--xy-minimap-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-color-props":typeof v=="string"?v:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*K:void 0,"--xy-minimap-node-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-node-stroke-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:ct(["react-flow__minimap",i]),"data-testid":"rf__minimap",children:M.jsxs("svg",{width:Y,height:O,viewBox:`${P} ${ee} ${ce} ${he}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ue,ref:D,onClick:we,children:[re&&M.jsx("title",{id:ue,children:re}),M.jsx(DM,{onClick:Se,nodeColor:a,nodeStrokeColor:s,nodeBorderRadius:c,nodeClassName:r,nodeStrokeWidth:u,nodeComponent:h}),M.jsx("path",{className:"react-flow__minimap-mask",d:`M${P-$},${ee-$}h${ce+$*2}v${he+$*2}h${-ce-$*2}z
15
- M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}gb.displayName="MiniMap";J.memo(gb);const HM=t=>i=>t?`${Math.max(1/i.transform[2],1)}`:void 0,$M={[Yl.Line]:"right",[Yl.Handle]:"bottom-right"};function UM({nodeId:t,position:i,variant:s=Yl.Handle,className:a,style:r=void 0,children:c,color:u,minWidth:h=10,minHeight:m=10,maxWidth:g=Number.MAX_VALUE,maxHeight:v=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:y,autoScale:w=!0,shouldResize:_,onResizeStart:E,onResize:N,onResizeEnd:S}){const C=K1(),x=typeof t=="string"?t:C,T=Je(),L=J.useRef(null),D=s===Yl.Handle,R=De(J.useCallback(HM(D&&w),[D,w]),Ie),j=J.useRef(null),q=i??$M[s];J.useEffect(()=>{if(!(!L.current||!x))return j.current||(j.current=oA({domNode:L.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:X,transform:I,snapGrid:ae,snapToGrid:k,nodeOrigin:Y,domNode:O}=T.getState();return{nodeLookup:X,transform:I,snapGrid:ae,snapToGrid:k,nodeOrigin:Y,paneDomNode:O}},onChange:(X,I)=>{const{triggerNodeChanges:ae,nodeLookup:k,parentLookup:Y,nodeOrigin:O}=T.getState(),B=[],G={x:X.x,y:X.y},K=k.get(x);if(K&&K.expandParent&&K.parentId){const ne=K.origin??O,z=X.width??K.measured.width??0,$=X.height??K.measured.height??0,P={id:K.id,parentId:K.parentId,rect:{width:z,height:$,...y1({x:X.x??K.position.x,y:X.y??K.position.y},{width:z,height:$},K.parentId,k,ne)}},ee=Kh([P],k,Y,O);B.push(...ee),G.x=X.x?Math.max(ne[0]*z,X.x):void 0,G.y=X.y?Math.max(ne[1]*$,X.y):void 0}if(G.x!==void 0&&G.y!==void 0){const ne={id:x,type:"position",position:{...G}};B.push(ne)}if(X.width!==void 0&&X.height!==void 0){const z={id:x,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:X.width,height:X.height}};B.push(z)}for(const ne of I){const z={...ne,type:"position"};B.push(z)}ae(B)},onEnd:({width:X,height:I})=>{const ae={id:x,type:"dimensions",resizing:!1,dimensions:{width:X,height:I}};T.getState().triggerNodeChanges([ae])}})),j.current.update({controlPosition:q,boundaries:{minWidth:h,minHeight:m,maxWidth:g,maxHeight:v},keepAspectRatio:p,resizeDirection:y,onResizeStart:E,onResize:N,onResizeEnd:S,shouldResize:_}),()=>{j.current?.destroy()}},[q,h,m,g,v,p,E,N,S,_]);const le=q.split("-");return M.jsx("div",{className:ct(["react-flow__resize-control","nodrag",...le,s,a]),ref:L,style:{...r,scale:R,...u&&{[D?"backgroundColor":"borderColor"]:u}},children:c})}J.memo(UM);const av=3,qM=new Set(["command-event","event-query"]);function pb(t){return[...new Set(t)]}function yb(t){return t?.trim()?pb(t.split(/\r?\n/).map(i=>VM(i)).filter(i=>!!i)):[]}function VM(t){const i=t.trim();return i?i.replace(/^[-*+]\s+/,"").replace(/^\d+[.)]\s+/,"").trim().match(/^`?([A-Za-z_][A-Za-z0-9_.-]*)`?(?=\s*(?::|-|=|\(|,|$))/)?.[1]:void 0}function YM(t){const i=new Map(t.nodes.map(r=>[r.id,r])),s=new Map(t.nodes.map(r=>[r.id,yb(r.fields)])),a=new Map;for(const r of t.edges){if(!qM.has(r.kind))continue;const c=i.get(r.source),u=i.get(r.target);if(!ov(c)||!ov(u))continue;const h=s.get(r.source)??[],m=s.get(r.target)??[],g=new Set(m),v=h.filter(w=>g.has(w)),p=r.kind==="event-query"?XM(c,m,v):[],y=pb([...v,...p]);a.set(r.id,{sourceFieldNames:h,targetFieldNames:m,sharedFieldNames:v,derivedFieldNames:p,visibleFieldNames:y.slice(0,av),remainingCount:Math.max(0,y.length-av),sourceMissingFields:h.length===0,targetMissingFields:m.length===0})}return a}function GM(t,i){if(!i)return;const s=[...t.entries()].filter(([,a])=>a.sharedFieldNames.includes(i)||a.derivedFieldNames.includes(i)).map(([a])=>a);return s.length>0?new Set(s):void 0}function ov(t){return t?.type==="command"||t?.type==="event"||t?.type==="query"}function XM(t,i,s){const a=rv(t.label),r=new Set(s);return i.filter(c=>!r.has(c)&&rv(c).includes(a))}function rv(t){return t.replace(/^(has|is|was|were)/i,"").replace(/been/gi,"").replace(/[^A-Za-z0-9]/g,"").toLowerCase()}const Ui=180,qi=80,vb=80,ii=430,Ll=390,bb=130,pn=178,KM=92,Sh=300,wh=170,jc=18,xh=48,Qd=30,Sc=92,Sb=38,ZM=42,cv=154,uv=278,wb=408;function IM(t){return t==="slice-screen"||t==="story-slice"?"#cbd5e1":"#64748b"}function QM(t){if(t==="added")return"#15803d";if(t==="removed")return"#b91c1c";if(t==="changed")return"#b45309"}function JM(t){return t.type==="event"?{sourcePosition:me.Right,targetPosition:me.Left}:{sourcePosition:me.Bottom,targetPosition:me.Top}}function FM(t){return new Map(t.stories.map((i,s)=>[i.name,s]))}function ys(t,i){return t===0?0:t*i+(t-1)*jc}function Jd(t,i,s){return t.nodes.filter(a=>a.sliceTitle===i&&a.type===s)}function WM(t,i,s){return[...new Set(t.edges.filter(r=>r.kind==="command-event"&&i.get(r.source)?.sliceTitle===s).map(r=>r.target))].map(r=>i.get(r)).filter(r=>!!r)}function PM(t,i){return new Map(t.slices.map(s=>{const a=Jd(t,s.title,"query"),r=Jd(t,s.title,"command"),c=WM(t,i,s.title),u=Jd(t,s.title,"gwt"),h=ys(a.length,pn),m=ys(r.length,pn),g=h+m+(h>0&&m>0?xh:0),v=ys(c.length,pn),p=ys(u.length,Sh),y=Math.max(ii,g+Qd*2,v+Qd*2,p+Qd*2),w=u.length>0?wb+wh+36:Ll;return[s.title,{width:y,height:w,queryIds:a.map(_=>_.id),commandIds:r.map(_=>_.id),eventIds:c.map(_=>_.id),gwtIds:u.map(_=>_.id)}]}))}function eC(t,i){const s=new Map;let a=qi;for(const r of t.stories){const c=t.slices.filter(v=>v.storyName===r.name),u=c.reduce((v,p)=>v+(i.get(p.title)?.width??ii),0),h=Math.max(u+Math.max(c.length-1,0)*bb,ii),m=Math.max(...c.map(v=>i.get(v.title)?.height??Ll),Ll),g=Sc+m+Sb;s.set(r.name,{y:a,width:h,height:g}),a+=g+vb}return s}function fv(t,i,s,a,r,c){const u=ys(t.length,c),h=s.x+(a-u)/2;t.forEach((m,g)=>{i.set(m,{x:h+g*(c+jc),y:s.y+r})})}function tC(t){return t==="essential"?new Set(["command-event","event-query"]):t==="normal"?new Set(["query-screen","screen-command","command-event","event-query"]):new Set(["story-slice","slice-screen","query-screen","screen-command","command-event","event-query"])}function nC(t,i,s="all"){if(!i||s==="all")return new Set(t.stories.map(u=>u.name));if(s==="story")return new Set([i]);const a=new Set([i]),r=new Set(t.nodes.filter(u=>u.storyName===i).map(u=>u.id)),c=new Set(t.edges.filter(u=>r.has(u.source)||r.has(u.target)).flatMap(u=>[u.source,u.target]).filter(u=>t.nodes.find(h=>h.id===u)?.type==="event"));for(const u of t.edges){if(!c.has(u.source)&&!c.has(u.target))continue;const h=t.nodes.find(g=>g.id===u.source),m=t.nodes.find(g=>g.id===u.target);h?.storyName&&a.add(h.storyName),m?.storyName&&a.add(m.storyName)}return a}function iC(t){return t==="event-query"?{sourceSide:"top",targetSide:"bottom"}:t==="query-screen"?{sourceSide:"top",targetSide:"bottom"}:t==="screen-command"?{sourceSide:"bottom",targetSide:"top"}:t==="command-event"?{sourceSide:"bottom",targetSide:"top"}:t==="slice-screen"?{sourceSide:"bottom",targetSide:"top"}:{sourceSide:"right",targetSide:"left"}}function sC(t,i,s,a,r){const c=iC(t),u=i?.sliceTitle&&i.sliceTitle===s?.sliceTitle;if(t==="event-query"&&u)return{...c,route:"same-slice-read"};if(!(t==="event-query"&&i?.sliceTitle!==s?.sliceTitle)||!a||!r)return{...c,route:"semantic"};const m=a.x+a.width/2,g=a.y+a.height/2,v=r.x+r.width/2,p=r.y+r.height/2;return{sourceSide:i?.storyName&&i.storyName===s?.storyName||p>=g?"bottom":"top",targetSide:v>=m?"left":"right",route:"event-read"}}function lC(t,i,s={}){const a=FM(t),r=new Map(t.nodes.map(S=>[S.id,S])),c=PM(t,r),u=eC(t,c),h=new Map,m=new Map,g=new Map,v=new Set,p=nC(t,s.focusedStory,s.scope??"all"),y=tC(s.edgeDetail??"normal");if(i){v.add(i);for(const S of t.edges)S.source===i&&v.add(S.target),S.target===i&&v.add(S.source)}const w=new Map;for(const S of t.stories)w.set(S.name,Ui);for(const S of t.stories)for(const C of S.slices){const x=t.slices.find(D=>D.path===C);if(!x)continue;const T=u.get(S.name)??{y:qi},L=w.get(S.name)??Ui;g.set(x.title,{x:L,y:T.y+Sc}),w.set(S.name,L+(c.get(x.title)?.width??ii)+bb)}for(const S of t.slices){if(g.has(S.title))continue;const C=qi+(a.get(S.storyName??"")??0)*(Ll+Sc+Sb+vb),x=Ui;g.set(S.title,{x,y:C+Sc})}for(const S of t.nodes){if(S.type==="story"&&h.set(S.id,{x:Ui-20,y:u.get(S.label)?.y??qi}),S.type==="slice"){const C=g.get(S.label)??{x:Ui,y:qi};h.set(S.id,C)}if(S.type==="screen"||S.type==="processor"){const C=g.get(S.sliceTitle??"")??{x:Ui,y:qi},T=c.get(S.sliceTitle??"")?.width??ii;h.set(S.id,{x:C.x+(T-pn)/2,y:C.y+ZM})}}for(const S of t.slices){const C=g.get(S.title)??{x:Ui,y:qi},x=c.get(S.title),T=x?.width??ii;if(!x)continue;const L=ys(x.queryIds.length,pn),D=ys(x.commandIds.length,pn),R=L+D+(L>0&&D>0?xh:0);let j=C.x+(T-R)/2;x.queryIds.forEach((q,le)=>{h.set(q,{x:j+le*(pn+jc),y:C.y+cv})}),L>0&&(j+=L+(D>0?xh:0)),x.commandIds.forEach((q,le)=>{h.set(q,{x:j+le*(pn+jc),y:C.y+cv})}),fv(x.eventIds,h,C,T,uv,pn),fv(x.gwtIds,h,C,T,wb,Sh)}for(const S of t.nodes.filter(C=>C.type==="event")){const C=t.edges.find(T=>T.kind==="command-event"&&T.target===S.id),x=C?r.get(C.source):void 0;if(!h.has(S.id)){const T=g.get(x?.sliceTitle??"")??{x:Ui,y:qi},L=c.get(x?.sliceTitle??"");h.set(S.id,{x:T.x+((L?.width??ii)-pn)/2,y:T.y+uv})}S.storyName=x?.storyName}const _=t.nodes.map(S=>{const C=h.get(S.id)??{x:0,y:0},x=S.type==="story"||S.type==="slice",T=S.type==="story"?u.get(S.label)?.width??ii:c.get(S.label)?.width??ii,L=S.type==="story"?u.get(S.label)?.height??Ll:c.get(S.label)?.height??Ll,D=x?T:S.type==="gwt"?Sh:pn,R=x?L:S.type==="gwt"?wh:KM;return m.set(S.id,{x:C.x,y:C.y,width:D,height:R}),{id:S.id,type:x?"groupNode":"eventModelNode",position:C,selectable:!0,draggable:!1,data:{projectNode:S,selected:S.id===i,connected:v.has(S.id),diffStatus:s.diffNodeStatus?.[S.id]},hidden:!!(S.storyName&&!p.has(S.storyName))||!!(s.diffFilter&&s.diffFilter!=="all"&&s.diffNodeStatus?.[S.id]!==s.diffFilter),style:x?{width:T,height:L,zIndex:S.type==="story"?-20:-10,opacity:S.storyName&&!p.has(S.storyName)?.18:1}:{width:D,height:S.type==="gwt"?wh:void 0,opacity:S.storyName&&!p.has(S.storyName)?.18:1},...JM(S)}}),N=t.edges.filter(S=>y.has(S.kind)).filter(S=>{const C=r.get(S.source),x=r.get(S.target),T=!C?.storyName||p.has(C.storyName),L=!x?.storyName||p.has(x.storyName);return T&&L}).map(S=>{const C=r.get(S.source),x=r.get(S.target),T=!!s.focusedEdgeIds?.has(S.id),L=s.diffEdgeStatus?.[S.id],D=QM(L),{sourceSide:R,targetSide:j,route:q}=sC(S.kind,C,x,m.get(S.source),m.get(S.target));return{id:S.id,source:S.source,target:S.target,type:"eventModelEdge",sourceHandle:`${R}-source`,targetHandle:`${j}-target`,data:{kind:S.kind,route:q,active:T,diffStatus:L,fieldFlow:s.edgeFieldFlows?.get(S.id),selectedFieldName:s.selectedFieldName,onSelectField:s.onSelectField},markerEnd:{type:go.ArrowClosed,color:T?"#111827":D??IM(S.kind)},label:s.edgeDetail==="verbose"?S.label:void 0,className:`edge ${T?"edge-active":""} ${L?`edge-diff-${L}`:""}`,hidden:!!(s.diffFilter&&s.diffFilter!=="all"&&L!==s.diffFilter),animated:T}});return{nodes:_,edges:N}}const Ih=Symbol.for("yaml.alias"),Eh=Symbol.for("yaml.document"),Xi=Symbol.for("yaml.map"),xb=Symbol.for("yaml.pair"),Ln=Symbol.for("yaml.scalar"),Zl=Symbol.for("yaml.seq"),un=Symbol.for("yaml.node.type"),Cs=t=>!!t&&typeof t=="object"&&t[un]===Ih,Os=t=>!!t&&typeof t=="object"&&t[un]===Eh,Il=t=>!!t&&typeof t=="object"&&t[un]===Xi,Qe=t=>!!t&&typeof t=="object"&&t[un]===xb,Ge=t=>!!t&&typeof t=="object"&&t[un]===Ln,Ql=t=>!!t&&typeof t=="object"&&t[un]===Zl;function Fe(t){if(t&&typeof t=="object")switch(t[un]){case Xi:case Zl:return!0}return!1}function We(t){if(t&&typeof t=="object")switch(t[un]){case Ih:case Xi:case Ln:case Zl:return!0}return!1}const Eb=t=>(Ge(t)||Fe(t))&&!!t.anchor,kt=Symbol("break visit"),_b=Symbol("skip children"),Dn=Symbol("remove node");function zs(t,i){const s=Nb(i);Os(t)?Tl(null,t.contents,s,Object.freeze([t]))===Dn&&(t.contents=null):Tl(null,t,s,Object.freeze([]))}zs.BREAK=kt;zs.SKIP=_b;zs.REMOVE=Dn;function Tl(t,i,s,a){const r=Ab(t,i,s,a);if(We(r)||Qe(r))return Tb(t,a,r),Tl(t,r,s,a);if(typeof r!="symbol"){if(Fe(i)){a=Object.freeze(a.concat(i));for(let c=0;c<i.items.length;++c){const u=Tl(c,i.items[c],s,a);if(typeof u=="number")c=u-1;else{if(u===kt)return kt;u===Dn&&(i.items.splice(c,1),c-=1)}}}else if(Qe(i)){a=Object.freeze(a.concat(i));const c=Tl("key",i.key,s,a);if(c===kt)return kt;c===Dn&&(i.key=null);const u=Tl("value",i.value,s,a);if(u===kt)return kt;u===Dn&&(i.value=null)}}return r}async function Wc(t,i){const s=Nb(i);Os(t)?await Ml(null,t.contents,s,Object.freeze([t]))===Dn&&(t.contents=null):await Ml(null,t,s,Object.freeze([]))}Wc.BREAK=kt;Wc.SKIP=_b;Wc.REMOVE=Dn;async function Ml(t,i,s,a){const r=await Ab(t,i,s,a);if(We(r)||Qe(r))return Tb(t,a,r),Ml(t,r,s,a);if(typeof r!="symbol"){if(Fe(i)){a=Object.freeze(a.concat(i));for(let c=0;c<i.items.length;++c){const u=await Ml(c,i.items[c],s,a);if(typeof u=="number")c=u-1;else{if(u===kt)return kt;u===Dn&&(i.items.splice(c,1),c-=1)}}}else if(Qe(i)){a=Object.freeze(a.concat(i));const c=await Ml("key",i.key,s,a);if(c===kt)return kt;c===Dn&&(i.key=null);const u=await Ml("value",i.value,s,a);if(u===kt)return kt;u===Dn&&(i.value=null)}}return r}function Nb(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Ab(t,i,s,a){if(typeof s=="function")return s(t,i,a);if(Il(i))return s.Map?.(t,i,a);if(Ql(i))return s.Seq?.(t,i,a);if(Qe(i))return s.Pair?.(t,i,a);if(Ge(i))return s.Scalar?.(t,i,a);if(Cs(i))return s.Alias?.(t,i,a)}function Tb(t,i,s){const a=i[i.length-1];if(Fe(a))a.items[t]=s;else if(Qe(a))t==="key"?a.key=s:a.value=s;else if(Os(a))a.contents=s;else{const r=Cs(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}const aC={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},oC=t=>t.replace(/[!,[\]{}]/g,i=>aC[i]);class _t{constructor(i,s){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},_t.defaultYaml,i),this.tags=Object.assign({},_t.defaultTags,s)}clone(){const i=new _t(this.yaml,this.tags);return i.docStart=this.docStart,i}atDocument(){const i=new _t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:_t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},_t.defaultTags);break}return i}add(i,s){this.atNextDocument&&(this.yaml={explicit:_t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},_t.defaultTags),this.atNextDocument=!1);const a=i.trim().split(/[ \t]+/),r=a.shift();switch(r){case"%TAG":{if(a.length!==2&&(s(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;const[c,u]=a;return this.tags[c]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return s(0,"%YAML directive should contain exactly one part"),!1;const[c]=a;if(c==="1.1"||c==="1.2")return this.yaml.version=c,!0;{const u=/^\d+\.\d+$/.test(c);return s(6,`Unsupported YAML version ${c}`,u),!1}}default:return s(0,`Unknown directive ${r}`,!0),!1}}tagName(i,s){if(i==="!")return"!";if(i[0]!=="!")return s(`Not a valid tag: ${i}`),null;if(i[1]==="<"){const u=i.slice(2,-1);return u==="!"||u==="!!"?(s(`Verbatim tags aren't resolved, so ${i} is invalid.`),null):(i[i.length-1]!==">"&&s("Verbatim tags must end with a >"),u)}const[,a,r]=i.match(/^(.*!)([^!]*)$/s);r||s(`The ${i} tag has no suffix`);const c=this.tags[a];if(c)try{return c+decodeURIComponent(r)}catch(u){return s(String(u)),null}return a==="!"?i:(s(`Could not resolve tag: ${i}`),null)}tagString(i){for(const[s,a]of Object.entries(this.tags))if(i.startsWith(a))return s+oC(i.substring(a.length));return i[0]==="!"?i:`!<${i}>`}toString(i){const s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],a=Object.entries(this.tags);let r;if(i&&a.length>0&&We(i.contents)){const c={};zs(i.contents,(u,h)=>{We(h)&&h.tag&&(c[h.tag]=!0)}),r=Object.keys(c)}else r=[];for(const[c,u]of a)c==="!!"&&u==="tag:yaml.org,2002:"||(!i||r.some(h=>h.startsWith(u)))&&s.push(`%TAG ${c} ${u}`);return s.join(`
16
- `)}}_t.defaultYaml={explicit:!1,version:"1.2"};_t.defaultTags={"!!":"tag:yaml.org,2002:"};function Mb(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const s=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(s)}return!0}function Cb(t){const i=new Set;return zs(t,{Value(s,a){a.anchor&&i.add(a.anchor)}}),i}function Ob(t,i){for(let s=1;;++s){const a=`${t}${s}`;if(!i.has(a))return a}}function rC(t,i){const s=[],a=new Map;let r=null;return{onAnchor:c=>{s.push(c),r??(r=Cb(t));const u=Ob(i,r);return r.add(u),u},setAnchors:()=>{for(const c of s){const u=a.get(c);if(typeof u=="object"&&u.anchor&&(Ge(u.node)||Fe(u.node)))u.node.anchor=u.anchor;else{const h=new Error("Failed to resolve repeated object (this should not happen)");throw h.source=c,h}}},sourceObjects:a}}function Cl(t,i,s,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let r=0,c=a.length;r<c;++r){const u=a[r],h=Cl(t,a,String(r),u);h===void 0?delete a[r]:h!==u&&(a[r]=h)}else if(a instanceof Map)for(const r of Array.from(a.keys())){const c=a.get(r),u=Cl(t,a,r,c);u===void 0?a.delete(r):u!==c&&a.set(r,u)}else if(a instanceof Set)for(const r of Array.from(a)){const c=Cl(t,a,r,r);c===void 0?a.delete(r):c!==r&&(a.delete(r),a.add(c))}else for(const[r,c]of Object.entries(a)){const u=Cl(t,a,r,c);u===void 0?delete a[r]:u!==c&&(a[r]=u)}return t.call(i,s,a)}function cn(t,i,s){if(Array.isArray(t))return t.map((a,r)=>cn(a,String(r),s));if(t&&typeof t.toJSON=="function"){if(!s||!Eb(t))return t.toJSON(i,s);const a={aliasCount:0,count:1,res:void 0};s.anchors.set(t,a),s.onCreate=c=>{a.res=c,delete s.onCreate};const r=t.toJSON(i,s);return s.onCreate&&s.onCreate(r),r}return typeof t=="bigint"&&!s?.keep?Number(t):t}class Qh{constructor(i){Object.defineProperty(this,un,{value:i})}clone(){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(i.range=this.range.slice()),i}toJS(i,{mapAsMap:s,maxAliasCount:a,onAnchor:r,reviver:c}={}){if(!Os(i))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:i,keep:!0,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},h=cn(this,"",u);if(typeof r=="function")for(const{count:m,res:g}of u.anchors.values())r(g,m);return typeof c=="function"?Cl(c,{"":h},"",h):h}}class Pc extends Qh{constructor(i){super(Ih),this.source=i,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(i,s){if(s?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let a;s?.aliasResolveCache?a=s.aliasResolveCache:(a=[],zs(i,{Node:(c,u)=>{(Cs(u)||Eb(u))&&a.push(u)}}),s&&(s.aliasResolveCache=a));let r;for(const c of a){if(c===this)break;c.anchor===this.source&&(r=c)}return r}toJSON(i,s){if(!s)return{source:this.source};const{anchors:a,doc:r,maxAliasCount:c}=s,u=this.resolve(r,s);if(!u){const m=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(m)}let h=a.get(u);if(h||(cn(u,null,s),h=a.get(u)),h?.res===void 0){const m="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(m)}if(c>=0&&(h.count+=1,h.aliasCount===0&&(h.aliasCount=wc(r,u,a)),h.count*h.aliasCount>c)){const m="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(m)}return h.res}toString(i,s,a){const r=`*${this.source}`;if(i){if(Mb(this.source),i.options.verifyAliasOrder&&!i.anchors.has(this.source)){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(c)}if(i.implicitKey)return`${r} `}return r}}function wc(t,i,s){if(Cs(i)){const a=i.resolve(t),r=s&&a&&s.get(a);return r?r.count*r.aliasCount:0}else if(Fe(i)){let a=0;for(const r of i.items){const c=wc(t,r,s);c>a&&(a=c)}return a}else if(Qe(i)){const a=wc(t,i.key,s),r=wc(t,i.value,s);return Math.max(a,r)}return 1}const zb=t=>!t||typeof t!="function"&&typeof t!="object";class _e extends Qh{constructor(i){super(Ln),this.value=i}toJSON(i,s){return s?.keep?this.value:cn(this.value,i,s)}toString(){return String(this.value)}}_e.BLOCK_FOLDED="BLOCK_FOLDED";_e.BLOCK_LITERAL="BLOCK_LITERAL";_e.PLAIN="PLAIN";_e.QUOTE_DOUBLE="QUOTE_DOUBLE";_e.QUOTE_SINGLE="QUOTE_SINGLE";const cC="tag:yaml.org,2002:";function uC(t,i,s){if(i){const a=s.filter(c=>c.tag===i),r=a.find(c=>!c.format)??a[0];if(!r)throw new Error(`Tag ${i} not found`);return r}return s.find(a=>a.identify?.(t)&&!a.format)}function bo(t,i,s){if(Os(t)&&(t=t.contents),We(t))return t;if(Qe(t)){const p=s.schema[Xi].createNode?.(s.schema,null,s);return p.items.push(t),p}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:a,onAnchor:r,onTagObj:c,schema:u,sourceObjects:h}=s;let m;if(a&&t&&typeof t=="object"){if(m=h.get(t),m)return m.anchor??(m.anchor=r(t)),new Pc(m.anchor);m={anchor:null,node:null},h.set(t,m)}i?.startsWith("!!")&&(i=cC+i.slice(2));let g=uC(t,i,u.tags);if(!g){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const p=new _e(t);return m&&(m.node=p),p}g=t instanceof Map?u[Xi]:Symbol.iterator in Object(t)?u[Zl]:u[Xi]}c&&(c(g),delete s.onTagObj);const v=g?.createNode?g.createNode(s.schema,t,s):typeof g?.nodeClass?.from=="function"?g.nodeClass.from(s.schema,t,s):new _e(t);return i?v.tag=i:g.default||(v.tag=g.tag),m&&(m.node=v),v}function Rc(t,i,s){let a=s;for(let r=i.length-1;r>=0;--r){const c=i[r];if(typeof c=="number"&&Number.isInteger(c)&&c>=0){const u=[];u[c]=a,a=u}else a=new Map([[c,a]])}return bo(a,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const io=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class Db extends Qh{constructor(i,s){super(i),Object.defineProperty(this,"schema",{value:s,configurable:!0,enumerable:!1,writable:!0})}clone(i){const s=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return i&&(s.schema=i),s.items=s.items.map(a=>We(a)||Qe(a)?a.clone(i):a),this.range&&(s.range=this.range.slice()),s}addIn(i,s){if(io(i))this.add(s);else{const[a,...r]=i,c=this.get(a,!0);if(Fe(c))c.addIn(r,s);else if(c===void 0&&this.schema)this.set(a,Rc(this.schema,r,s));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${r}`)}}deleteIn(i){const[s,...a]=i;if(a.length===0)return this.delete(s);const r=this.get(s,!0);if(Fe(r))return r.deleteIn(a);throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}getIn(i,s){const[a,...r]=i,c=this.get(a,!0);return r.length===0?!s&&Ge(c)?c.value:c:Fe(c)?c.getIn(r,s):void 0}hasAllNullValues(i){return this.items.every(s=>{if(!Qe(s))return!1;const a=s.value;return a==null||i&&Ge(a)&&a.value==null&&!a.commentBefore&&!a.comment&&!a.tag})}hasIn(i){const[s,...a]=i;if(a.length===0)return this.has(s);const r=this.get(s,!0);return Fe(r)?r.hasIn(a):!1}setIn(i,s){const[a,...r]=i;if(r.length===0)this.set(a,s);else{const c=this.get(a,!0);if(Fe(c))c.setIn(r,s);else if(c===void 0&&this.schema)this.set(a,Rc(this.schema,r,s));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${r}`)}}}const fC=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function li(t,i){return/^\n+$/.test(t)?t.substring(1):i?t.replace(/^(?! *$)/gm,i):t}const vs=(t,i,s)=>t.endsWith(`
17
- `)?li(s,i):s.includes(`
18
- `)?`
19
- `+li(s,i):(t.endsWith(" ")?"":" ")+s,Lb="flow",_h="block",xc="quoted";function eu(t,i,s="flow",{indentAtStart:a,lineWidth:r=80,minContentWidth:c=20,onFold:u,onOverflow:h}={}){if(!r||r<0)return t;r<c&&(c=0);const m=Math.max(1+c,1+r-i.length);if(t.length<=m)return t;const g=[],v={};let p=r-i.length;typeof a=="number"&&(a>r-Math.max(2,c)?g.push(0):p=r-a);let y,w,_=!1,E=-1,N=-1,S=-1;s===_h&&(E=dv(t,E,i.length),E!==-1&&(p=E+m));for(let x;x=t[E+=1];){if(s===xc&&x==="\\"){switch(N=E,t[E+1]){case"x":E+=3;break;case"u":E+=5;break;case"U":E+=9;break;default:E+=1}S=E}if(x===`
20
- `)s===_h&&(E=dv(t,E,i.length)),p=E+i.length+m,y=void 0;else{if(x===" "&&w&&w!==" "&&w!==`
21
- `&&w!==" "){const T=t[E+1];T&&T!==" "&&T!==`
22
- `&&T!==" "&&(y=E)}if(E>=p)if(y)g.push(y),p=y+m,y=void 0;else if(s===xc){for(;w===" "||w===" ";)w=x,x=t[E+=1],_=!0;const T=E>S+1?E-2:N-1;if(v[T])return t;g.push(T),v[T]=!0,p=T+m,y=void 0}else _=!0}w=x}if(_&&h&&h(),g.length===0)return t;u&&u();let C=t.slice(0,g[0]);for(let x=0;x<g.length;++x){const T=g[x],L=g[x+1]||t.length;T===0?C=`
23
- ${i}${t.slice(0,L)}`:(s===xc&&v[T]&&(C+=`${t[T]}\\`),C+=`
24
- ${i}${t.slice(T+1,L)}`)}return C}function dv(t,i,s){let a=i,r=i+1,c=t[r];for(;c===" "||c===" ";)if(i<r+s)c=t[++i];else{do c=t[++i];while(c&&c!==`
25
- `);a=i,r=i+1,c=t[r]}return a}const tu=(t,i)=>({indentAtStart:i?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),nu=t=>/^(%|---|\.\.\.)/m.test(t);function dC(t,i,s){if(!i||i<0)return!1;const a=i-s,r=t.length;if(r<=a)return!1;for(let c=0,u=0;c<r;++c)if(t[c]===`
26
- `){if(c-u>a)return!0;if(u=c+1,r-u<=a)return!1}return!0}function ao(t,i){const s=JSON.stringify(t);if(i.options.doubleQuotedAsJSON)return s;const{implicitKey:a}=i,r=i.options.doubleQuotedMinMultiLineLength,c=i.indent||(nu(t)?" ":"");let u="",h=0;for(let m=0,g=s[m];g;g=s[++m])if(g===" "&&s[m+1]==="\\"&&s[m+2]==="n"&&(u+=s.slice(h,m)+"\\ ",m+=1,h=m,g="\\"),g==="\\")switch(s[m+1]){case"u":{u+=s.slice(h,m);const v=s.substr(m+2,4);switch(v){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:v.substr(0,2)==="00"?u+="\\x"+v.substr(2):u+=s.substr(m,6)}m+=5,h=m+1}break;case"n":if(a||s[m+2]==='"'||s.length<r)m+=1;else{for(u+=s.slice(h,m)+`
27
-
28
- `;s[m+2]==="\\"&&s[m+3]==="n"&&s[m+4]!=='"';)u+=`
29
- `,m+=2;u+=c,s[m+2]===" "&&(u+="\\"),m+=1,h=m+1}break;default:m+=1}return u=h?u+s.slice(h):s,a?u:eu(u,c,xc,tu(i,!1))}function Nh(t,i){if(i.options.singleQuote===!1||i.implicitKey&&t.includes(`
30
- `)||/[ \t]\n|\n[ \t]/.test(t))return ao(t,i);const s=i.indent||(nu(t)?" ":""),a="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
31
- ${s}`)+"'";return i.implicitKey?a:eu(a,s,Lb,tu(i,!1))}function Ol(t,i){const{singleQuote:s}=i.options;let a;if(s===!1)a=ao;else{const r=t.includes('"'),c=t.includes("'");r&&!c?a=Nh:c&&!r?a=ao:a=s?Nh:ao}return a(t,i)}let Ah;try{Ah=new RegExp(`(^|(?<!
32
- ))
33
- +(?!
34
- |$)`,"g")}catch{Ah=/\n+(?!\n|$)/g}function Ec({comment:t,type:i,value:s},a,r,c){const{blockQuote:u,commentString:h,lineWidth:m}=a.options;if(!u||/\n[\t ]+$/.test(s))return Ol(s,a);const g=a.indent||(a.forceBlockIndent||nu(s)?" ":""),v=u==="literal"?!0:u==="folded"||i===_e.BLOCK_FOLDED?!1:i===_e.BLOCK_LITERAL?!0:!dC(s,m,g.length);if(!s)return v?`|
35
- `:`>
36
- `;let p,y;for(y=s.length;y>0;--y){const L=s[y-1];if(L!==`
37
- `&&L!==" "&&L!==" ")break}let w=s.substring(y);const _=w.indexOf(`
38
- `);_===-1?p="-":s===w||_!==w.length-1?(p="+",c&&c()):p="",w&&(s=s.slice(0,-w.length),w[w.length-1]===`
39
- `&&(w=w.slice(0,-1)),w=w.replace(Ah,`$&${g}`));let E=!1,N,S=-1;for(N=0;N<s.length;++N){const L=s[N];if(L===" ")E=!0;else if(L===`
40
- `)S=N;else break}let C=s.substring(0,S<N?S+1:N);C&&(s=s.substring(C.length),C=C.replace(/\n+/g,`$&${g}`));let T=(E?g?"2":"1":"")+p;if(t&&(T+=" "+h(t.replace(/ ?[\r\n]+/g," ")),r&&r()),!v){const L=s.replace(/\n+/g,`
41
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let D=!1;const R=tu(a,!0);u!=="folded"&&i!==_e.BLOCK_FOLDED&&(R.onOverflow=()=>{D=!0});const j=eu(`${C}${L}${w}`,g,_h,R);if(!D)return`>${T}
42
- ${g}${j}`}return s=s.replace(/\n+/g,`$&${g}`),`|${T}
43
- ${g}${C}${s}${w}`}function hC(t,i,s,a){const{type:r,value:c}=t,{actualString:u,implicitKey:h,indent:m,indentStep:g,inFlow:v}=i;if(h&&c.includes(`
44
- `)||v&&/[[\]{},]/.test(c))return Ol(c,i);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(c))return h||v||!c.includes(`
45
- `)?Ol(c,i):Ec(t,i,s,a);if(!h&&!v&&r!==_e.PLAIN&&c.includes(`
46
- `))return Ec(t,i,s,a);if(nu(c)){if(m==="")return i.forceBlockIndent=!0,Ec(t,i,s,a);if(h&&m===g)return Ol(c,i)}const p=c.replace(/\n+/g,`$&
47
- ${m}`);if(u){const y=E=>E.default&&E.tag!=="tag:yaml.org,2002:str"&&E.test?.test(p),{compat:w,tags:_}=i.doc.schema;if(_.some(y)||w?.some(y))return Ol(c,i)}return h?p:eu(p,m,Lb,tu(i,!1))}function Co(t,i,s,a){const{implicitKey:r,inFlow:c}=i,u=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:h}=t;h!==_e.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(h=_e.QUOTE_DOUBLE);const m=v=>{switch(v){case _e.BLOCK_FOLDED:case _e.BLOCK_LITERAL:return r||c?Ol(u.value,i):Ec(u,i,s,a);case _e.QUOTE_DOUBLE:return ao(u.value,i);case _e.QUOTE_SINGLE:return Nh(u.value,i);case _e.PLAIN:return hC(u,i,s,a);default:return null}};let g=m(h);if(g===null){const{defaultKeyType:v,defaultStringType:p}=i.options,y=r&&v||p;if(g=m(y),g===null)throw new Error(`Unsupported default string type ${y}`)}return g}function jb(t,i){const s=Object.assign({blockQuote:!0,commentString:fC,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},t.schema.toStringOptions,i);let a;switch(s.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:t,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:typeof s.indent=="number"?" ".repeat(s.indent):" ",inFlow:a,options:s}}function mC(t,i){if(i.tag){const r=t.filter(c=>c.tag===i.tag);if(r.length>0)return r.find(c=>c.format===i.format)??r[0]}let s,a;if(Ge(i)){a=i.value;let r=t.filter(c=>c.identify?.(a));if(r.length>1){const c=r.filter(u=>u.test);c.length>0&&(r=c)}s=r.find(c=>c.format===i.format)??r.find(c=>!c.format)}else a=i,s=t.find(r=>r.nodeClass&&a instanceof r.nodeClass);if(!s){const r=a?.constructor?.name??(a===null?"null":typeof a);throw new Error(`Tag not resolved for ${r} value`)}return s}function gC(t,i,{anchors:s,doc:a}){if(!a.directives)return"";const r=[],c=(Ge(t)||Fe(t))&&t.anchor;c&&Mb(c)&&(s.add(c),r.push(`&${c}`));const u=t.tag??(i.default?null:i.tag);return u&&r.push(a.directives.tagString(u)),r.join(" ")}function Gl(t,i,s,a){if(Qe(t))return t.toString(i,s,a);if(Cs(t)){if(i.doc.directives)return t.toString(i);if(i.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");i.resolvedAliases?i.resolvedAliases.add(t):i.resolvedAliases=new Set([t]),t=t.resolve(i.doc)}let r;const c=We(t)?t:i.doc.createNode(t,{onTagObj:m=>r=m});r??(r=mC(i.doc.schema.tags,c));const u=gC(c,r,i);u.length>0&&(i.indentAtStart=(i.indentAtStart??0)+u.length+1);const h=typeof r.stringify=="function"?r.stringify(c,i,s,a):Ge(c)?Co(c,i,s,a):c.toString(i,s,a);return u?Ge(c)||h[0]==="{"||h[0]==="["?`${u} ${h}`:`${u}
48
- ${i.indent}${h}`:h}function pC({key:t,value:i},s,a,r){const{allNullValues:c,doc:u,indent:h,indentStep:m,options:{commentString:g,indentSeq:v,simpleKeys:p}}=s;let y=We(t)&&t.comment||null;if(p){if(y)throw new Error("With simple keys, key nodes cannot have comments");if(Fe(t)||!We(t)&&typeof t=="object"){const R="With simple keys, collection cannot be used as a key value";throw new Error(R)}}let w=!p&&(!t||y&&i==null&&!s.inFlow||Fe(t)||(Ge(t)?t.type===_e.BLOCK_FOLDED||t.type===_e.BLOCK_LITERAL:typeof t=="object"));s=Object.assign({},s,{allNullValues:!1,implicitKey:!w&&(p||!c),indent:h+m});let _=!1,E=!1,N=Gl(t,s,()=>_=!0,()=>E=!0);if(!w&&!s.inFlow&&N.length>1024){if(p)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");w=!0}if(s.inFlow){if(c||i==null)return _&&a&&a(),N===""?"?":w?`? ${N}`:N}else if(c&&!p||i==null&&w)return N=`? ${N}`,y&&!_?N+=vs(N,s.indent,g(y)):E&&r&&r(),N;_&&(y=null),w?(y&&(N+=vs(N,s.indent,g(y))),N=`? ${N}
49
- ${h}:`):(N=`${N}:`,y&&(N+=vs(N,s.indent,g(y))));let S,C,x;We(i)?(S=!!i.spaceBefore,C=i.commentBefore,x=i.comment):(S=!1,C=null,x=null,i&&typeof i=="object"&&(i=u.createNode(i))),s.implicitKey=!1,!w&&!y&&Ge(i)&&(s.indentAtStart=N.length+1),E=!1,!v&&m.length>=2&&!s.inFlow&&!w&&Ql(i)&&!i.flow&&!i.tag&&!i.anchor&&(s.indent=s.indent.substring(2));let T=!1;const L=Gl(i,s,()=>T=!0,()=>E=!0);let D=" ";if(y||S||C){if(D=S?`
50
- `:"",C){const R=g(C);D+=`
51
- ${li(R,s.indent)}`}L===""&&!s.inFlow?D===`
52
- `&&x&&(D=`
53
-
54
- `):D+=`
55
- ${s.indent}`}else if(!w&&Fe(i)){const R=L[0],j=L.indexOf(`
56
- `),q=j!==-1,le=s.inFlow??i.flow??i.items.length===0;if(q||!le){let X=!1;if(q&&(R==="&"||R==="!")){let I=L.indexOf(" ");R==="&"&&I!==-1&&I<j&&L[I+1]==="!"&&(I=L.indexOf(" ",I+1)),(I===-1||j<I)&&(X=!0)}X||(D=`
57
- ${s.indent}`)}}else(L===""||L[0]===`
58
- `)&&(D="");return N+=D+L,s.inFlow?T&&a&&a():x&&!T?N+=vs(N,s.indent,g(x)):E&&r&&r(),N}function Rb(t,i){(t==="debug"||t==="warn")&&console.warn(i)}const cc="<<",ai={identify:t=>t===cc||typeof t=="symbol"&&t.description===cc,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new _e(Symbol(cc)),{addToJSMap:kb}),stringify:()=>cc},yC=(t,i)=>(ai.identify(i)||Ge(i)&&(!i.type||i.type===_e.PLAIN)&&ai.identify(i.value))&&t?.doc.schema.tags.some(s=>s.tag===ai.tag&&s.default);function kb(t,i,s){const a=Bb(t,s);if(Ql(a))for(const r of a.items)Fd(t,i,r);else if(Array.isArray(a))for(const r of a)Fd(t,i,r);else Fd(t,i,a)}function Fd(t,i,s){const a=Bb(t,s);if(!Il(a))throw new Error("Merge sources must be maps or map aliases");const r=a.toJSON(null,t,Map);for(const[c,u]of r)i instanceof Map?i.has(c)||i.set(c,u):i instanceof Set?i.add(c):Object.prototype.hasOwnProperty.call(i,c)||Object.defineProperty(i,c,{value:u,writable:!0,enumerable:!0,configurable:!0});return i}function Bb(t,i){return t&&Cs(i)?i.resolve(t.doc,t):i}function Hb(t,i,{key:s,value:a}){if(We(s)&&s.addToJSMap)s.addToJSMap(t,i,a);else if(yC(t,s))kb(t,i,a);else{const r=cn(s,"",t);if(i instanceof Map)i.set(r,cn(a,r,t));else if(i instanceof Set)i.add(r);else{const c=vC(s,r,t),u=cn(a,c,t);c in i?Object.defineProperty(i,c,{value:u,writable:!0,enumerable:!0,configurable:!0}):i[c]=u}}return i}function vC(t,i,s){if(i===null)return"";if(typeof i!="object")return String(i);if(We(t)&&s?.doc){const a=jb(s.doc,{});a.anchors=new Set;for(const c of s.anchors.keys())a.anchors.add(c.anchor);a.inFlow=!0,a.inStringifyKey=!0;const r=t.toString(a);if(!s.mapKeyWarned){let c=JSON.stringify(r);c.length>40&&(c=c.substring(0,36)+'..."'),Rb(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${c}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return r}return JSON.stringify(i)}function Jh(t,i,s){const a=bo(t,void 0,s),r=bo(i,void 0,s);return new St(a,r)}class St{constructor(i,s=null){Object.defineProperty(this,un,{value:xb}),this.key=i,this.value=s}clone(i){let{key:s,value:a}=this;return We(s)&&(s=s.clone(i)),We(a)&&(a=a.clone(i)),new St(s,a)}toJSON(i,s){const a=s?.mapAsMap?new Map:{};return Hb(s,a,this)}toString(i,s,a){return i?.doc?pC(this,i,s,a):JSON.stringify(this)}}function $b(t,i,s){return(i.inFlow??t.flow?SC:bC)(t,i,s)}function bC({comment:t,items:i},s,{blockItemPrefix:a,flowChars:r,itemIndent:c,onChompKeep:u,onComment:h}){const{indent:m,options:{commentString:g}}=s,v=Object.assign({},s,{indent:c,type:null});let p=!1;const y=[];for(let _=0;_<i.length;++_){const E=i[_];let N=null;if(We(E))!p&&E.spaceBefore&&y.push(""),kc(s,y,E.commentBefore,p),E.comment&&(N=E.comment);else if(Qe(E)){const C=We(E.key)?E.key:null;C&&(!p&&C.spaceBefore&&y.push(""),kc(s,y,C.commentBefore,p))}p=!1;let S=Gl(E,v,()=>N=null,()=>p=!0);N&&(S+=vs(S,c,g(N))),p&&N&&(p=!1),y.push(a+S)}let w;if(y.length===0)w=r.start+r.end;else{w=y[0];for(let _=1;_<y.length;++_){const E=y[_];w+=E?`
59
- ${m}${E}`:`
60
- `}}return t?(w+=`
61
- `+li(g(t),m),h&&h()):p&&u&&u(),w}function SC({items:t},i,{flowChars:s,itemIndent:a}){const{indent:r,indentStep:c,flowCollectionPadding:u,options:{commentString:h}}=i;a+=c;const m=Object.assign({},i,{indent:a,inFlow:!0,type:null});let g=!1,v=0;const p=[];for(let _=0;_<t.length;++_){const E=t[_];let N=null;if(We(E))E.spaceBefore&&p.push(""),kc(i,p,E.commentBefore,!1),E.comment&&(N=E.comment);else if(Qe(E)){const C=We(E.key)?E.key:null;C&&(C.spaceBefore&&p.push(""),kc(i,p,C.commentBefore,!1),C.comment&&(g=!0));const x=We(E.value)?E.value:null;x?(x.comment&&(N=x.comment),x.commentBefore&&(g=!0)):E.value==null&&C?.comment&&(N=C.comment)}N&&(g=!0);let S=Gl(E,m,()=>N=null);g||(g=p.length>v||S.includes(`
62
- `)),_<t.length-1?S+=",":i.options.trailingComma&&(i.options.lineWidth>0&&(g||(g=p.reduce((C,x)=>C+x.length+2,2)+(S.length+2)>i.options.lineWidth)),g&&(S+=",")),N&&(S+=vs(S,a,h(N))),p.push(S),v=p.length}const{start:y,end:w}=s;if(p.length===0)return y+w;if(!g){const _=p.reduce((E,N)=>E+N.length+2,2);g=i.options.lineWidth>0&&_>i.options.lineWidth}if(g){let _=y;for(const E of p)_+=E?`
63
- ${c}${r}${E}`:`
64
- `;return`${_}
65
- ${r}${w}`}else return`${y}${u}${p.join(" ")}${u}${w}`}function kc({indent:t,options:{commentString:i}},s,a,r){if(a&&r&&(a=a.replace(/^\n+/,"")),a){const c=li(i(a),t);s.push(c.trimStart())}}function bs(t,i){const s=Ge(i)?i.value:i;for(const a of t)if(Qe(a)&&(a.key===i||a.key===s||Ge(a.key)&&a.key.value===s))return a}class It extends Db{static get tagName(){return"tag:yaml.org,2002:map"}constructor(i){super(Xi,i),this.items=[]}static from(i,s,a){const{keepUndefined:r,replacer:c}=a,u=new this(i),h=(m,g)=>{if(typeof c=="function")g=c.call(s,m,g);else if(Array.isArray(c)&&!c.includes(m))return;(g!==void 0||r)&&u.items.push(Jh(m,g,a))};if(s instanceof Map)for(const[m,g]of s)h(m,g);else if(s&&typeof s=="object")for(const m of Object.keys(s))h(m,s[m]);return typeof i.sortMapEntries=="function"&&u.items.sort(i.sortMapEntries),u}add(i,s){let a;Qe(i)?a=i:!i||typeof i!="object"||!("key"in i)?a=new St(i,i?.value):a=new St(i.key,i.value);const r=bs(this.items,a.key),c=this.schema?.sortMapEntries;if(r){if(!s)throw new Error(`Key ${a.key} already set`);Ge(r.value)&&zb(a.value)?r.value.value=a.value:r.value=a.value}else if(c){const u=this.items.findIndex(h=>c(a,h)<0);u===-1?this.items.push(a):this.items.splice(u,0,a)}else this.items.push(a)}delete(i){const s=bs(this.items,i);return s?this.items.splice(this.items.indexOf(s),1).length>0:!1}get(i,s){const r=bs(this.items,i)?.value;return(!s&&Ge(r)?r.value:r)??void 0}has(i){return!!bs(this.items,i)}set(i,s){this.add(new St(i,s),!0)}toJSON(i,s,a){const r=a?new a:s?.mapAsMap?new Map:{};s?.onCreate&&s.onCreate(r);for(const c of this.items)Hb(s,r,c);return r}toString(i,s,a){if(!i)return JSON.stringify(this);for(const r of this.items)if(!Qe(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!i.allNullValues&&this.hasAllNullValues(!1)&&(i=Object.assign({},i,{allNullValues:!0})),$b(this,i,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:i.indent||"",onChompKeep:a,onComment:s})}}const Jl={collection:"map",default:!0,nodeClass:It,tag:"tag:yaml.org,2002:map",resolve(t,i){return Il(t)||i("Expected a mapping for this tag"),t},createNode:(t,i,s)=>It.from(t,i,s)};class Ki extends Db{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(i){super(Zl,i),this.items=[]}add(i){this.items.push(i)}delete(i){const s=uc(i);return typeof s!="number"?!1:this.items.splice(s,1).length>0}get(i,s){const a=uc(i);if(typeof a!="number")return;const r=this.items[a];return!s&&Ge(r)?r.value:r}has(i){const s=uc(i);return typeof s=="number"&&s<this.items.length}set(i,s){const a=uc(i);if(typeof a!="number")throw new Error(`Expected a valid index, not ${i}.`);const r=this.items[a];Ge(r)&&zb(s)?r.value=s:this.items[a]=s}toJSON(i,s){const a=[];s?.onCreate&&s.onCreate(a);let r=0;for(const c of this.items)a.push(cn(c,String(r++),s));return a}toString(i,s,a){return i?$b(this,i,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(i.indent||"")+" ",onChompKeep:a,onComment:s}):JSON.stringify(this)}static from(i,s,a){const{replacer:r}=a,c=new this(i);if(s&&Symbol.iterator in Object(s)){let u=0;for(let h of s){if(typeof r=="function"){const m=s instanceof Set?h:String(u++);h=r.call(s,m,h)}c.items.push(bo(h,void 0,a))}}return c}}function uc(t){let i=Ge(t)?t.value:t;return i&&typeof i=="string"&&(i=Number(i)),typeof i=="number"&&Number.isInteger(i)&&i>=0?i:null}const Fl={collection:"seq",default:!0,nodeClass:Ki,tag:"tag:yaml.org,2002:seq",resolve(t,i){return Ql(t)||i("Expected a sequence for this tag"),t},createNode:(t,i,s)=>Ki.from(t,i,s)},iu={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,i,s,a){return i=Object.assign({actualString:!0},i),Co(t,i,s,a)}},su={identify:t=>t==null,createNode:()=>new _e(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new _e(null),stringify:({source:t},i)=>typeof t=="string"&&su.test.test(t)?t:i.options.nullStr},Fh={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new _e(t[0]==="t"||t[0]==="T"),stringify({source:t,value:i},s){if(t&&Fh.test.test(t)){const a=t[0]==="t"||t[0]==="T";if(i===a)return t}return i?s.options.trueStr:s.options.falseStr}};function En({format:t,minFractionDigits:i,tag:s,value:a}){if(typeof a=="bigint")return String(a);const r=typeof a=="number"?a:Number(a);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let c=Object.is(a,-0)?"-0":JSON.stringify(a);if(!t&&i&&(!s||s==="tag:yaml.org,2002:float")&&/^-?\d/.test(c)&&!c.includes("e")){let u=c.indexOf(".");u<0&&(u=c.length,c+=".");let h=i-(c.length-u-1);for(;h-- >0;)c+="0"}return c}const Ub={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:En},qb={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const i=Number(t.value);return isFinite(i)?i.toExponential():En(t)}},Vb={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const i=new _e(parseFloat(t)),s=t.indexOf(".");return s!==-1&&t[t.length-1]==="0"&&(i.minFractionDigits=t.length-s-1),i},stringify:En},lu=t=>typeof t=="bigint"||Number.isInteger(t),Wh=(t,i,s,{intAsBigInt:a})=>a?BigInt(t):parseInt(t.substring(i),s);function Yb(t,i,s){const{value:a}=t;return lu(a)&&a>=0?s+a.toString(i):En(t)}const Gb={identify:t=>lu(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,i,s)=>Wh(t,2,8,s),stringify:t=>Yb(t,8,"0o")},Xb={identify:lu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,i,s)=>Wh(t,0,10,s),stringify:En},Kb={identify:t=>lu(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,i,s)=>Wh(t,2,16,s),stringify:t=>Yb(t,16,"0x")},wC=[Jl,Fl,iu,su,Fh,Gb,Xb,Kb,Ub,qb,Vb];function hv(t){return typeof t=="bigint"||Number.isInteger(t)}const fc=({value:t})=>JSON.stringify(t),xC=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:fc},{identify:t=>t==null,createNode:()=>new _e(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:fc},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:fc},{identify:hv,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,i,{intAsBigInt:s})=>s?BigInt(t):parseInt(t,10),stringify:({value:t})=>hv(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:fc}],EC={default:!0,tag:"",test:/^/,resolve(t,i){return i(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},_C=[Jl,Fl].concat(xC,EC),Ph={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,i){if(typeof atob=="function"){const s=atob(t.replace(/[\n\r]/g,"")),a=new Uint8Array(s.length);for(let r=0;r<s.length;++r)a[r]=s.charCodeAt(r);return a}else return i("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:i,value:s},a,r,c){if(!s)return"";const u=s;let h;if(typeof btoa=="function"){let m="";for(let g=0;g<u.length;++g)m+=String.fromCharCode(u[g]);h=btoa(m)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(i??(i=_e.BLOCK_LITERAL),i!==_e.QUOTE_DOUBLE){const m=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),g=Math.ceil(h.length/m),v=new Array(g);for(let p=0,y=0;p<g;++p,y+=m)v[p]=h.substr(y,m);h=v.join(i===_e.BLOCK_LITERAL?`
66
- `:" ")}return Co({comment:t,type:i,value:h},a,r,c)}};function Zb(t,i){if(Ql(t))for(let s=0;s<t.items.length;++s){let a=t.items[s];if(!Qe(a)){if(Il(a)){a.items.length>1&&i("Each pair must have its own sequence indicator");const r=a.items[0]||new St(new _e(null));if(a.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${a.commentBefore}
67
- ${r.key.commentBefore}`:a.commentBefore),a.comment){const c=r.value??r.key;c.comment=c.comment?`${a.comment}
68
- ${c.comment}`:a.comment}a=r}t.items[s]=Qe(a)?a:new St(a)}}else i("Expected a sequence for this tag");return t}function Ib(t,i,s){const{replacer:a}=s,r=new Ki(t);r.tag="tag:yaml.org,2002:pairs";let c=0;if(i&&Symbol.iterator in Object(i))for(let u of i){typeof a=="function"&&(u=a.call(i,String(c++),u));let h,m;if(Array.isArray(u))if(u.length===2)h=u[0],m=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){const g=Object.keys(u);if(g.length===1)h=g[0],m=u[h];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else h=u;r.items.push(Jh(h,m,s))}return r}const em={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Zb,createNode:Ib};class jl extends Ki{constructor(){super(),this.add=It.prototype.add.bind(this),this.delete=It.prototype.delete.bind(this),this.get=It.prototype.get.bind(this),this.has=It.prototype.has.bind(this),this.set=It.prototype.set.bind(this),this.tag=jl.tag}toJSON(i,s){if(!s)return super.toJSON(i);const a=new Map;s?.onCreate&&s.onCreate(a);for(const r of this.items){let c,u;if(Qe(r)?(c=cn(r.key,"",s),u=cn(r.value,c,s)):c=cn(r,"",s),a.has(c))throw new Error("Ordered maps must not include duplicate keys");a.set(c,u)}return a}static from(i,s,a){const r=Ib(i,s,a),c=new this;return c.items=r.items,c}}jl.tag="tag:yaml.org,2002:omap";const tm={collection:"seq",identify:t=>t instanceof Map,nodeClass:jl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,i){const s=Zb(t,i),a=[];for(const{key:r}of s.items)Ge(r)&&(a.includes(r.value)?i(`Ordered maps must not include duplicate keys: ${r.value}`):a.push(r.value));return Object.assign(new jl,s)},createNode:(t,i,s)=>jl.from(t,i,s)};function Qb({value:t,source:i},s){return i&&(t?Jb:Fb).test.test(i)?i:t?s.options.trueStr:s.options.falseStr}const Jb={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new _e(!0),stringify:Qb},Fb={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new _e(!1),stringify:Qb},NC={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:En},AC={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const i=Number(t.value);return isFinite(i)?i.toExponential():En(t)}},TC={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const i=new _e(parseFloat(t.replace(/_/g,""))),s=t.indexOf(".");if(s!==-1){const a=t.substring(s+1).replace(/_/g,"");a[a.length-1]==="0"&&(i.minFractionDigits=a.length)}return i},stringify:En},Oo=t=>typeof t=="bigint"||Number.isInteger(t);function au(t,i,s,{intAsBigInt:a}){const r=t[0];if((r==="-"||r==="+")&&(i+=1),t=t.substring(i).replace(/_/g,""),a){switch(s){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const u=BigInt(t);return r==="-"?BigInt(-1)*u:u}const c=parseInt(t,s);return r==="-"?-1*c:c}function nm(t,i,s){const{value:a}=t;if(Oo(a)){const r=a.toString(i);return a<0?"-"+s+r.substr(1):s+r}return En(t)}const MC={identify:Oo,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,i,s)=>au(t,2,2,s),stringify:t=>nm(t,2,"0b")},CC={identify:Oo,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,i,s)=>au(t,1,8,s),stringify:t=>nm(t,8,"0")},OC={identify:Oo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,i,s)=>au(t,0,10,s),stringify:En},zC={identify:Oo,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,i,s)=>au(t,2,16,s),stringify:t=>nm(t,16,"0x")};class Rl extends It{constructor(i){super(i),this.tag=Rl.tag}add(i){let s;Qe(i)?s=i:i&&typeof i=="object"&&"key"in i&&"value"in i&&i.value===null?s=new St(i.key,null):s=new St(i,null),bs(this.items,s.key)||this.items.push(s)}get(i,s){const a=bs(this.items,i);return!s&&Qe(a)?Ge(a.key)?a.key.value:a.key:a}set(i,s){if(typeof s!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof s}`);const a=bs(this.items,i);a&&!s?this.items.splice(this.items.indexOf(a),1):!a&&s&&this.items.push(new St(i))}toJSON(i,s){return super.toJSON(i,s,Set)}toString(i,s,a){if(!i)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},i,{allNullValues:!0}),s,a);throw new Error("Set items must all have null values")}static from(i,s,a){const{replacer:r}=a,c=new this(i);if(s&&Symbol.iterator in Object(s))for(let u of s)typeof r=="function"&&(u=r.call(s,u,u)),c.items.push(Jh(u,null,a));return c}}Rl.tag="tag:yaml.org,2002:set";const im={collection:"map",identify:t=>t instanceof Set,nodeClass:Rl,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,i,s)=>Rl.from(t,i,s),resolve(t,i){if(Il(t)){if(t.hasAllNullValues(!0))return Object.assign(new Rl,t);i("Set items must all have null values")}else i("Expected a mapping for this tag");return t}};function sm(t,i){const s=t[0],a=s==="-"||s==="+"?t.substring(1):t,r=u=>i?BigInt(u):Number(u),c=a.replace(/_/g,"").split(":").reduce((u,h)=>u*r(60)+r(h),r(0));return s==="-"?r(-1)*c:c}function Wb(t){let{value:i}=t,s=u=>u;if(typeof i=="bigint")s=u=>BigInt(u);else if(isNaN(i)||!isFinite(i))return En(t);let a="";i<0&&(a="-",i*=s(-1));const r=s(60),c=[i%r];return i<60?c.unshift(0):(i=(i-c[0])/r,c.unshift(i%r),i>=60&&(i=(i-c[0])/r,c.unshift(i))),a+c.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Pb={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,i,{intAsBigInt:s})=>sm(t,s),stringify:Wb},eS={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>sm(t,!1),stringify:Wb},ou={identify:t=>t 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(t){const i=t.match(ou.test);if(!i)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,s,a,r,c,u,h]=i.map(Number),m=i[7]?Number((i[7]+"00").substr(1,3)):0;let g=Date.UTC(s,a-1,r,c||0,u||0,h||0,m);const v=i[8];if(v&&v!=="Z"){let p=sm(v,!1);Math.abs(p)<30&&(p*=60),g-=6e4*p}return new Date(g)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},mv=[Jl,Fl,iu,su,Jb,Fb,MC,CC,OC,zC,NC,AC,TC,Ph,ai,tm,em,im,Pb,eS,ou],gv=new Map([["core",wC],["failsafe",[Jl,Fl,iu]],["json",_C],["yaml11",mv],["yaml-1.1",mv]]),pv={binary:Ph,bool:Fh,float:Vb,floatExp:qb,floatNaN:Ub,floatTime:eS,int:Xb,intHex:Kb,intOct:Gb,intTime:Pb,map:Jl,merge:ai,null:su,omap:tm,pairs:em,seq:Fl,set:im,timestamp:ou},DC={"tag:yaml.org,2002:binary":Ph,"tag:yaml.org,2002:merge":ai,"tag:yaml.org,2002:omap":tm,"tag:yaml.org,2002:pairs":em,"tag:yaml.org,2002:set":im,"tag:yaml.org,2002:timestamp":ou};function Wd(t,i,s){const a=gv.get(i);if(a&&!t)return s&&!a.includes(ai)?a.concat(ai):a.slice();let r=a;if(!r)if(Array.isArray(t))r=[];else{const c=Array.from(gv.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${i}"; use one of ${c} or define customTags array`)}if(Array.isArray(t))for(const c of t)r=r.concat(c);else typeof t=="function"&&(r=t(r.slice()));return s&&(r=r.concat(ai)),r.reduce((c,u)=>{const h=typeof u=="string"?pv[u]:u;if(!h){const m=JSON.stringify(u),g=Object.keys(pv).map(v=>JSON.stringify(v)).join(", ");throw new Error(`Unknown custom tag ${m}; use one of ${g}`)}return c.includes(h)||c.push(h),c},[])}const LC=(t,i)=>t.key<i.key?-1:t.key>i.key?1:0;class ru{constructor({compat:i,customTags:s,merge:a,resolveKnownTags:r,schema:c,sortMapEntries:u,toStringDefaults:h}){this.compat=Array.isArray(i)?Wd(i,"compat"):i?Wd(null,i):null,this.name=typeof c=="string"&&c||"core",this.knownTags=r?DC:{},this.tags=Wd(s,this.name,a),this.toStringOptions=h??null,Object.defineProperty(this,Xi,{value:Jl}),Object.defineProperty(this,Ln,{value:iu}),Object.defineProperty(this,Zl,{value:Fl}),this.sortMapEntries=typeof u=="function"?u:u===!0?LC:null}clone(){const i=Object.create(ru.prototype,Object.getOwnPropertyDescriptors(this));return i.tags=this.tags.slice(),i}}function jC(t,i){const s=[];let a=i.directives===!0;if(i.directives!==!1&&t.directives){const m=t.directives.toString(t);m?(s.push(m),a=!0):t.directives.docStart&&(a=!0)}a&&s.push("---");const r=jb(t,i),{commentString:c}=r.options;if(t.commentBefore){s.length!==1&&s.unshift("");const m=c(t.commentBefore);s.unshift(li(m,""))}let u=!1,h=null;if(t.contents){if(We(t.contents)){if(t.contents.spaceBefore&&a&&s.push(""),t.contents.commentBefore){const v=c(t.contents.commentBefore);s.push(li(v,""))}r.forceBlockIndent=!!t.comment,h=t.contents.comment}const m=h?void 0:()=>u=!0;let g=Gl(t.contents,r,()=>h=null,m);h&&(g+=vs(g,"",c(h))),(g[0]==="|"||g[0]===">")&&s[s.length-1]==="---"?s[s.length-1]=`--- ${g}`:s.push(g)}else s.push(Gl(t.contents,r));if(t.directives?.docEnd)if(t.comment){const m=c(t.comment);m.includes(`
69
- `)?(s.push("..."),s.push(li(m,""))):s.push(`... ${m}`)}else s.push("...");else{let m=t.comment;m&&u&&(m=m.replace(/^\n+/,"")),m&&((!u||h)&&s[s.length-1]!==""&&s.push(""),s.push(li(c(m),"")))}return s.join(`
70
- `)+`
71
- `}class Wl{constructor(i,s,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,un,{value:Eh});let r=null;typeof s=="function"||Array.isArray(s)?r=s:a===void 0&&s&&(a=s,s=void 0);const c=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=c;let{version:u}=c;a?._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new _t({version:u}),this.setSchema(u,a),this.contents=i===void 0?null:this.createNode(i,r,a)}clone(){const i=Object.create(Wl.prototype,{[un]:{value:Eh}});return i.commentBefore=this.commentBefore,i.comment=this.comment,i.errors=this.errors.slice(),i.warnings=this.warnings.slice(),i.options=Object.assign({},this.options),this.directives&&(i.directives=this.directives.clone()),i.schema=this.schema.clone(),i.contents=We(this.contents)?this.contents.clone(i.schema):this.contents,this.range&&(i.range=this.range.slice()),i}add(i){wl(this.contents)&&this.contents.add(i)}addIn(i,s){wl(this.contents)&&this.contents.addIn(i,s)}createAlias(i,s){if(!i.anchor){const a=Cb(this);i.anchor=!s||a.has(s)?Ob(s||"a",a):s}return new Pc(i.anchor)}createNode(i,s,a){let r;if(typeof s=="function")i=s.call({"":i},"",i),r=s;else if(Array.isArray(s)){const N=C=>typeof C=="number"||C instanceof String||C instanceof Number,S=s.filter(N).map(String);S.length>0&&(s=s.concat(S)),r=s}else a===void 0&&s&&(a=s,s=void 0);const{aliasDuplicateObjects:c,anchorPrefix:u,flow:h,keepUndefined:m,onTagObj:g,tag:v}=a??{},{onAnchor:p,setAnchors:y,sourceObjects:w}=rC(this,u||"a"),_={aliasDuplicateObjects:c??!0,keepUndefined:m??!1,onAnchor:p,onTagObj:g,replacer:r,schema:this.schema,sourceObjects:w},E=bo(i,v,_);return h&&Fe(E)&&(E.flow=!0),y(),E}createPair(i,s,a={}){const r=this.createNode(i,null,a),c=this.createNode(s,null,a);return new St(r,c)}delete(i){return wl(this.contents)?this.contents.delete(i):!1}deleteIn(i){return io(i)?this.contents==null?!1:(this.contents=null,!0):wl(this.contents)?this.contents.deleteIn(i):!1}get(i,s){return Fe(this.contents)?this.contents.get(i,s):void 0}getIn(i,s){return io(i)?!s&&Ge(this.contents)?this.contents.value:this.contents:Fe(this.contents)?this.contents.getIn(i,s):void 0}has(i){return Fe(this.contents)?this.contents.has(i):!1}hasIn(i){return io(i)?this.contents!==void 0:Fe(this.contents)?this.contents.hasIn(i):!1}set(i,s){this.contents==null?this.contents=Rc(this.schema,[i],s):wl(this.contents)&&this.contents.set(i,s)}setIn(i,s){io(i)?this.contents=s:this.contents==null?this.contents=Rc(this.schema,Array.from(i),s):wl(this.contents)&&this.contents.setIn(i,s)}setSchema(i,s={}){typeof i=="number"&&(i=String(i));let a;switch(i){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new _t({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=i:this.directives=new _t({version:i}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{const r=JSON.stringify(i);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(s.schema instanceof Object)this.schema=s.schema;else if(a)this.schema=new ru(Object.assign(a,s));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:i,jsonArg:s,mapAsMap:a,maxAliasCount:r,onAnchor:c,reviver:u}={}){const h={anchors:new Map,doc:this,keep:!i,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},m=cn(this.contents,s??"",h);if(typeof c=="function")for(const{count:g,res:v}of h.anchors.values())c(v,g);return typeof u=="function"?Cl(u,{"":m},"",m):m}toJSON(i,s){return this.toJS({json:!0,jsonArg:i,mapAsMap:!1,onAnchor:s})}toString(i={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in i&&(!Number.isInteger(i.indent)||Number(i.indent)<=0)){const s=JSON.stringify(i.indent);throw new Error(`"indent" option must be a positive integer, not ${s}`)}return jC(this,i)}}function wl(t){if(Fe(t))return!0;throw new Error("Expected a YAML collection as document contents")}class lm extends Error{constructor(i,s,a,r){super(),this.name=i,this.code=a,this.message=r,this.pos=s}}class Ss extends lm{constructor(i,s,a){super("YAMLParseError",i,s,a)}}class tS extends lm{constructor(i,s,a){super("YAMLWarning",i,s,a)}}const Bc=(t,i)=>s=>{if(s.pos[0]===-1)return;s.linePos=s.pos.map(h=>i.linePos(h));const{line:a,col:r}=s.linePos[0];s.message+=` at line ${a}, column ${r}`;let c=r-1,u=t.substring(i.lineStarts[a-1],i.lineStarts[a]).replace(/[\n\r]+$/,"");if(c>=60&&u.length>80){const h=Math.min(c-39,u.length-79);u="…"+u.substring(h),c-=h-1}if(u.length>80&&(u=u.substring(0,79)+"…"),a>1&&/^ *$/.test(u.substring(0,c))){let h=t.substring(i.lineStarts[a-2],i.lineStarts[a-1]);h.length>80&&(h=h.substring(0,79)+`…
72
- `),u=h+u}if(/[^ ]/.test(u)){let h=1;const m=s.linePos[1];m?.line===a&&m.col>r&&(h=Math.max(1,Math.min(m.col-r,80-c)));const g=" ".repeat(c)+"^".repeat(h);s.message+=`:
73
-
74
- ${u}
75
- ${g}
76
- `}};function Xl(t,{flow:i,indicator:s,next:a,offset:r,onError:c,parentIndent:u,startOnNewline:h}){let m=!1,g=h,v=h,p="",y="",w=!1,_=!1,E=null,N=null,S=null,C=null,x=null,T=null,L=null;for(const j of t)switch(_&&(j.type!=="space"&&j.type!=="newline"&&j.type!=="comma"&&c(j.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),_=!1),E&&(g&&j.type!=="comment"&&j.type!=="newline"&&c(E,"TAB_AS_INDENT","Tabs are not allowed as indentation"),E=null),j.type){case"space":!i&&(s!=="doc-start"||a?.type!=="flow-collection")&&j.source.includes(" ")&&(E=j),v=!0;break;case"comment":{v||c(j,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const q=j.source.substring(1)||" ";p?p+=y+q:p=q,y="",g=!1;break}case"newline":g?p?p+=j.source:(!T||s!=="seq-item-ind")&&(m=!0):y+=j.source,g=!0,w=!0,(N||S)&&(C=j),v=!0;break;case"anchor":N&&c(j,"MULTIPLE_ANCHORS","A node can have at most one anchor"),j.source.endsWith(":")&&c(j.offset+j.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),N=j,L??(L=j.offset),g=!1,v=!1,_=!0;break;case"tag":{S&&c(j,"MULTIPLE_TAGS","A node can have at most one tag"),S=j,L??(L=j.offset),g=!1,v=!1,_=!0;break}case s:(N||S)&&c(j,"BAD_PROP_ORDER",`Anchors and tags must be after the ${j.source} indicator`),T&&c(j,"UNEXPECTED_TOKEN",`Unexpected ${j.source} in ${i??"collection"}`),T=j,g=s==="seq-item-ind"||s==="explicit-key-ind",v=!1;break;case"comma":if(i){x&&c(j,"UNEXPECTED_TOKEN",`Unexpected , in ${i}`),x=j,g=!1,v=!1;break}default:c(j,"UNEXPECTED_TOKEN",`Unexpected ${j.type} token`),g=!1,v=!1}const D=t[t.length-1],R=D?D.offset+D.source.length:r;return _&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&c(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E&&(g&&E.indent<=u||a?.type==="block-map"||a?.type==="block-seq")&&c(E,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:x,found:T,spaceBefore:m,comment:p,hasNewline:w,anchor:N,tag:S,newlineAfterProp:C,end:R,start:L??R}}function So(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
77
- `))return!0;if(t.end){for(const i of t.end)if(i.type==="newline")return!0}return!1;case"flow-collection":for(const i of t.items){for(const s of i.start)if(s.type==="newline")return!0;if(i.sep){for(const s of i.sep)if(s.type==="newline")return!0}if(So(i.key)||So(i.value))return!0}return!1;default:return!0}}function Th(t,i,s){if(i?.type==="flow-collection"){const a=i.end[0];a.indent===t&&(a.source==="]"||a.source==="}")&&So(i)&&s(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function nS(t,i,s){const{uniqueKeys:a}=t.options;if(a===!1)return!1;const r=typeof a=="function"?a:(c,u)=>c===u||Ge(c)&&Ge(u)&&c.value===u.value;return i.some(c=>r(c.key,s))}const yv="All mapping items must start at the same column";function RC({composeNode:t,composeEmptyNode:i},s,a,r,c){const u=c?.nodeClass??It,h=new u(s.schema);s.atRoot&&(s.atRoot=!1);let m=a.offset,g=null;for(const v of a.items){const{start:p,key:y,sep:w,value:_}=v,E=Xl(p,{indicator:"explicit-key-ind",next:y??w?.[0],offset:m,onError:r,parentIndent:a.indent,startOnNewline:!0}),N=!E.found;if(N){if(y&&(y.type==="block-seq"?r(m,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==a.indent&&r(m,"BAD_INDENT",yv)),!E.anchor&&!E.tag&&!w){g=E.end,E.comment&&(h.comment?h.comment+=`
78
- `+E.comment:h.comment=E.comment);continue}(E.newlineAfterProp||So(y))&&r(y??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else E.found?.indent!==a.indent&&r(m,"BAD_INDENT",yv);s.atKey=!0;const S=E.end,C=y?t(s,y,E,r):i(s,S,p,null,E,r);s.schema.compat&&Th(a.indent,y,r),s.atKey=!1,nS(s,h.items,C)&&r(S,"DUPLICATE_KEY","Map keys must be unique");const x=Xl(w??[],{indicator:"map-value-ind",next:_,offset:C.range[2],onError:r,parentIndent:a.indent,startOnNewline:!y||y.type==="block-scalar"});if(m=x.end,x.found){N&&(_?.type==="block-map"&&!x.hasNewline&&r(m,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),s.options.strict&&E.start<x.found.offset-1024&&r(C.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const T=_?t(s,_,x,r):i(s,m,w,null,x,r);s.schema.compat&&Th(a.indent,_,r),m=T.range[2];const L=new St(C,T);s.options.keepSourceTokens&&(L.srcToken=v),h.items.push(L)}else{N&&r(C.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),x.comment&&(C.comment?C.comment+=`
79
- `+x.comment:C.comment=x.comment);const T=new St(C);s.options.keepSourceTokens&&(T.srcToken=v),h.items.push(T)}}return g&&g<m&&r(g,"IMPOSSIBLE","Map comment with trailing content"),h.range=[a.offset,m,g??m],h}function kC({composeNode:t,composeEmptyNode:i},s,a,r,c){const u=c?.nodeClass??Ki,h=new u(s.schema);s.atRoot&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let m=a.offset,g=null;for(const{start:v,value:p}of a.items){const y=Xl(v,{indicator:"seq-item-ind",next:p,offset:m,onError:r,parentIndent:a.indent,startOnNewline:!0});if(!y.found)if(y.anchor||y.tag||p)p?.type==="block-seq"?r(y.end,"BAD_INDENT","All sequence items must start at the same column"):r(m,"MISSING_CHAR","Sequence item without - indicator");else{g=y.end,y.comment&&(h.comment=y.comment);continue}const w=p?t(s,p,y,r):i(s,y.end,v,null,y,r);s.schema.compat&&Th(a.indent,p,r),m=w.range[2],h.items.push(w)}return h.range=[a.offset,m,g??m],h}function zo(t,i,s,a){let r="";if(t){let c=!1,u="";for(const h of t){const{source:m,type:g}=h;switch(g){case"space":c=!0;break;case"comment":{s&&!c&&a(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const v=m.substring(1)||" ";r?r+=u+v:r=v,u="";break}case"newline":r&&(u+=m),c=!0;break;default:a(h,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}i+=m.length}}return{comment:r,offset:i}}const Pd="Block collections are not allowed within flow collections",eh=t=>t&&(t.type==="block-map"||t.type==="block-seq");function BC({composeNode:t,composeEmptyNode:i},s,a,r,c){const u=a.start.source==="{",h=u?"flow map":"flow sequence",m=c?.nodeClass??(u?It:Ki),g=new m(s.schema);g.flow=!0;const v=s.atRoot;v&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let p=a.offset+a.start.source.length;for(let N=0;N<a.items.length;++N){const S=a.items[N],{start:C,key:x,sep:T,value:L}=S,D=Xl(C,{flow:h,indicator:"explicit-key-ind",next:x??T?.[0],offset:p,onError:r,parentIndent:a.indent,startOnNewline:!1});if(!D.found){if(!D.anchor&&!D.tag&&!T&&!L){N===0&&D.comma?r(D.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`):N<a.items.length-1&&r(D.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${h}`),D.comment&&(g.comment?g.comment+=`
80
- `+D.comment:g.comment=D.comment),p=D.end;continue}!u&&s.options.strict&&So(x)&&r(x,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(N===0)D.comma&&r(D.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`);else if(D.comma||r(D.start,"MISSING_CHAR",`Missing , between ${h} items`),D.comment){let R="";e:for(const j of C)switch(j.type){case"comma":case"space":break;case"comment":R=j.source.substring(1);break e;default:break e}if(R){let j=g.items[g.items.length-1];Qe(j)&&(j=j.value??j.key),j.comment?j.comment+=`
81
- `+R:j.comment=R,D.comment=D.comment.substring(R.length+1)}}if(!u&&!T&&!D.found){const R=L?t(s,L,D,r):i(s,D.end,T,null,D,r);g.items.push(R),p=R.range[2],eh(L)&&r(R.range,"BLOCK_IN_FLOW",Pd)}else{s.atKey=!0;const R=D.end,j=x?t(s,x,D,r):i(s,R,C,null,D,r);eh(x)&&r(j.range,"BLOCK_IN_FLOW",Pd),s.atKey=!1;const q=Xl(T??[],{flow:h,indicator:"map-value-ind",next:L,offset:j.range[2],onError:r,parentIndent:a.indent,startOnNewline:!1});if(q.found){if(!u&&!D.found&&s.options.strict){if(T)for(const I of T){if(I===q.found)break;if(I.type==="newline"){r(I,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}D.start<q.found.offset-1024&&r(q.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&&L.source?.[0]===":"?r(L,"MISSING_CHAR",`Missing space after : in ${h}`):r(q.start,"MISSING_CHAR",`Missing , or : between ${h} items`));const le=L?t(s,L,q,r):q.found?i(s,q.end,T,null,q,r):null;le?eh(L)&&r(le.range,"BLOCK_IN_FLOW",Pd):q.comment&&(j.comment?j.comment+=`
82
- `+q.comment:j.comment=q.comment);const X=new St(j,le);if(s.options.keepSourceTokens&&(X.srcToken=S),u){const I=g;nS(s,I.items,j)&&r(R,"DUPLICATE_KEY","Map keys must be unique"),I.items.push(X)}else{const I=new It(s.schema);I.flow=!0,I.items.push(X);const ae=(le??j).range;I.range=[j.range[0],ae[1],ae[2]],g.items.push(I)}p=le?le.range[2]:q.end}}const y=u?"}":"]",[w,..._]=a.end;let E=p;if(w?.source===y)E=w.offset+w.source.length;else{const N=h[0].toUpperCase()+h.substring(1),S=v?`${N} must end with a ${y}`:`${N} in block collection must be sufficiently indented and end with a ${y}`;r(p,v?"MISSING_CHAR":"BAD_INDENT",S),w&&w.source.length!==1&&_.unshift(w)}if(_.length>0){const N=zo(_,E,s.options.strict,r);N.comment&&(g.comment?g.comment+=`
83
- `+N.comment:g.comment=N.comment),g.range=[a.offset,E,N.offset]}else g.range=[a.offset,E,E];return g}function th(t,i,s,a,r,c){const u=s.type==="block-map"?RC(t,i,s,a,c):s.type==="block-seq"?kC(t,i,s,a,c):BC(t,i,s,a,c),h=u.constructor;return r==="!"||r===h.tagName?(u.tag=h.tagName,u):(r&&(u.tag=r),u)}function HC(t,i,s,a,r){const c=a.tag,u=c?i.directives.tagName(c.source,y=>r(c,"TAG_RESOLVE_FAILED",y)):null;if(s.type==="block-seq"){const{anchor:y,newlineAfterProp:w}=a,_=y&&c?y.offset>c.offset?y:c:y??c;_&&(!w||w.offset<_.offset)&&r(_,"MISSING_CHAR","Missing newline after block sequence props")}const h=s.type==="block-map"?"map":s.type==="block-seq"?"seq":s.start.source==="{"?"map":"seq";if(!c||!u||u==="!"||u===It.tagName&&h==="map"||u===Ki.tagName&&h==="seq")return th(t,i,s,r,u);let m=i.schema.tags.find(y=>y.tag===u&&y.collection===h);if(!m){const y=i.schema.knownTags[u];if(y?.collection===h)i.schema.tags.push(Object.assign({},y,{default:!1})),m=y;else return y?r(c,"BAD_COLLECTION_TYPE",`${y.tag} used for ${h} collection, but expects ${y.collection??"scalar"}`,!0):r(c,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),th(t,i,s,r,u)}const g=th(t,i,s,r,u,m),v=m.resolve?.(g,y=>r(c,"TAG_RESOLVE_FAILED",y),i.options)??g,p=We(v)?v:new _e(v);return p.range=g.range,p.tag=u,m?.format&&(p.format=m.format),p}function iS(t,i,s){const a=i.offset,r=$C(i,t.options.strict,s);if(!r)return{value:"",type:null,comment:"",range:[a,a,a]};const c=r.mode===">"?_e.BLOCK_FOLDED:_e.BLOCK_LITERAL,u=i.source?UC(i.source):[];let h=u.length;for(let E=u.length-1;E>=0;--E){const N=u[E][1];if(N===""||N==="\r")h=E;else break}if(h===0){const E=r.chomp==="+"&&u.length>0?`
84
- `.repeat(Math.max(1,u.length-1)):"";let N=a+r.length;return i.source&&(N+=i.source.length),{value:E,type:c,comment:r.comment,range:[a,N,N]}}let m=i.indent+r.indent,g=i.offset+r.length,v=0;for(let E=0;E<h;++E){const[N,S]=u[E];if(S===""||S==="\r")r.indent===0&&N.length>m&&(m=N.length);else{N.length<m&&s(g+N.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(m=N.length),v=E,m===0&&!t.atRoot&&s(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=N.length+S.length+1}for(let E=u.length-1;E>=h;--E)u[E][0].length>m&&(h=E+1);let p="",y="",w=!1;for(let E=0;E<v;++E)p+=u[E][0].slice(m)+`
85
- `;for(let E=v;E<h;++E){let[N,S]=u[E];g+=N.length+S.length+1;const C=S[S.length-1]==="\r";if(C&&(S=S.slice(0,-1)),S&&N.length<m){const T=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;s(g-S.length-(C?2:1),"BAD_INDENT",T),N=""}c===_e.BLOCK_LITERAL?(p+=y+N.slice(m)+S,y=`
86
- `):N.length>m||S[0]===" "?(y===" "?y=`
87
- `:!w&&y===`
88
- `&&(y=`
89
-
90
- `),p+=y+N.slice(m)+S,y=`
91
- `,w=!0):S===""?y===`
92
- `?p+=`
93
- `:y=`
94
- `:(p+=y+S,y=" ",w=!1)}switch(r.chomp){case"-":break;case"+":for(let E=h;E<u.length;++E)p+=`
95
- `+u[E][0].slice(m);p[p.length-1]!==`
96
- `&&(p+=`
97
- `);break;default:p+=`
98
- `}const _=a+r.length+i.source.length;return{value:p,type:c,comment:r.comment,range:[a,_,_]}}function $C({offset:t,props:i},s,a){if(i[0].type!=="block-scalar-header")return a(i[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:r}=i[0],c=r[0];let u=0,h="",m=-1;for(let y=1;y<r.length;++y){const w=r[y];if(!h&&(w==="-"||w==="+"))h=w;else{const _=Number(w);!u&&_?u=_:m===-1&&(m=t+y)}}m!==-1&&a(m,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let g=!1,v="",p=r.length;for(let y=1;y<i.length;++y){const w=i[y];switch(w.type){case"space":g=!0;case"newline":p+=w.source.length;break;case"comment":s&&!g&&a(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),p+=w.source.length,v=w.source.substring(1);break;case"error":a(w,"UNEXPECTED_TOKEN",w.message),p+=w.source.length;break;default:{const _=`Unexpected token in block scalar header: ${w.type}`;a(w,"UNEXPECTED_TOKEN",_);const E=w.source;E&&typeof E=="string"&&(p+=E.length)}}}return{mode:c,indent:u,chomp:h,comment:v,length:p}}function UC(t){const i=t.split(/\n( *)/),s=i[0],a=s.match(/^( *)/),c=[a?.[1]?[a[1],s.slice(a[1].length)]:["",s]];for(let u=1;u<i.length;u+=2)c.push([i[u],i[u+1]]);return c}function sS(t,i,s){const{offset:a,type:r,source:c,end:u}=t;let h,m;const g=(y,w,_)=>s(a+y,w,_);switch(r){case"scalar":h=_e.PLAIN,m=qC(c,g);break;case"single-quoted-scalar":h=_e.QUOTE_SINGLE,m=VC(c,g);break;case"double-quoted-scalar":h=_e.QUOTE_DOUBLE,m=YC(c,g);break;default:return s(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[a,a+c.length,a+c.length]}}const v=a+c.length,p=zo(u,v,i,s);return{value:m,type:h,comment:p.comment,range:[a,v,p.offset]}}function qC(t,i){let s="";switch(t[0]){case" ":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":{s=`block scalar indicator ${t[0]}`;break}case"@":case"`":{s=`reserved character ${t[0]}`;break}}return s&&i(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`),lS(t)}function VC(t,i){return(t[t.length-1]!=="'"||t.length===1)&&i(t.length,"MISSING_CHAR","Missing closing 'quote"),lS(t.slice(1,-1)).replace(/''/g,"'")}function lS(t){let i,s;try{i=new RegExp(`(.*?)(?<![ ])[ ]*\r?
99
- `,"sy"),s=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
100
- `,"sy")}catch{i=/(.*?)[ \t]*\r?\n/sy,s=/[ \t]*(.*?)[ \t]*\r?\n/sy}let a=i.exec(t);if(!a)return t;let r=a[1],c=" ",u=i.lastIndex;for(s.lastIndex=u;a=s.exec(t);)a[1]===""?c===`
101
- `?r+=c:c=`
102
- `:(r+=c+a[1],c=" "),u=s.lastIndex;const h=/[ \t]*(.*)/sy;return h.lastIndex=u,a=h.exec(t),r+c+(a?.[1]??"")}function YC(t,i){let s="";for(let a=1;a<t.length-1;++a){const r=t[a];if(!(r==="\r"&&t[a+1]===`
103
- `))if(r===`
104
- `){const{fold:c,offset:u}=GC(t,a);s+=c,a=u}else if(r==="\\"){let c=t[++a];const u=XC[c];if(u)s+=u;else if(c===`
105
- `)for(c=t[a+1];c===" "||c===" ";)c=t[++a+1];else if(c==="\r"&&t[a+1]===`
106
- `)for(c=t[++a+1];c===" "||c===" ";)c=t[++a+1];else if(c==="x"||c==="u"||c==="U"){const h=c==="x"?2:c==="u"?4:8;s+=KC(t,a+1,h,i),a+=h}else{const h=t.substr(a-1,2);i(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),s+=h}}else if(r===" "||r===" "){const c=a;let u=t[a+1];for(;u===" "||u===" ";)u=t[++a+1];u!==`
107
- `&&!(u==="\r"&&t[a+2]===`
108
- `)&&(s+=a>c?t.slice(c,a+1):r)}else s+=r}return(t[t.length-1]!=='"'||t.length===1)&&i(t.length,"MISSING_CHAR",'Missing closing "quote'),s}function GC(t,i){let s="",a=t[i+1];for(;(a===" "||a===" "||a===`
109
- `||a==="\r")&&!(a==="\r"&&t[i+2]!==`
110
- `);)a===`
111
- `&&(s+=`
112
- `),i+=1,a=t[i+1];return s||(s=" "),{fold:s,offset:i}}const XC={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
113
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function KC(t,i,s,a){const r=t.substr(i,s),u=r.length===s&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(u)}catch{const h=t.substr(i-2,s+2);return a(i-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),h}}function aS(t,i,s,a){const{value:r,type:c,comment:u,range:h}=i.type==="block-scalar"?iS(t,i,a):sS(i,t.options.strict,a),m=s?t.directives.tagName(s.source,p=>a(s,"TAG_RESOLVE_FAILED",p)):null;let g;t.options.stringKeys&&t.atKey?g=t.schema[Ln]:m?g=ZC(t.schema,r,m,s,a):i.type==="scalar"?g=IC(t,r,i,a):g=t.schema[Ln];let v;try{const p=g.resolve(r,y=>a(s??i,"TAG_RESOLVE_FAILED",y),t.options);v=Ge(p)?p:new _e(p)}catch(p){const y=p instanceof Error?p.message:String(p);a(s??i,"TAG_RESOLVE_FAILED",y),v=new _e(r)}return v.range=h,v.source=r,c&&(v.type=c),m&&(v.tag=m),g.format&&(v.format=g.format),u&&(v.comment=u),v}function ZC(t,i,s,a,r){if(s==="!")return t[Ln];const c=[];for(const h of t.tags)if(!h.collection&&h.tag===s)if(h.default&&h.test)c.push(h);else return h;for(const h of c)if(h.test?.test(i))return h;const u=t.knownTags[s];return u&&!u.collection?(t.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(r(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,s!=="tag:yaml.org,2002:str"),t[Ln])}function IC({atKey:t,directives:i,schema:s},a,r,c){const u=s.tags.find(h=>(h.default===!0||t&&h.default==="key")&&h.test?.test(a))||s[Ln];if(s.compat){const h=s.compat.find(m=>m.default&&m.test?.test(a))??s[Ln];if(u.tag!==h.tag){const m=i.tagString(u.tag),g=i.tagString(h.tag),v=`Value may be parsed as either ${m} or ${g}`;c(r,"TAG_RESOLVE_FAILED",v,!0)}}return u}function QC(t,i,s){if(i){s??(s=i.length);for(let a=s-1;a>=0;--a){let r=i[a];switch(r.type){case"space":case"comment":case"newline":t-=r.source.length;continue}for(r=i[++a];r?.type==="space";)t+=r.source.length,r=i[++a];break}}return t}const JC={composeNode:oS,composeEmptyNode:am};function oS(t,i,s,a){const r=t.atKey,{spaceBefore:c,comment:u,anchor:h,tag:m}=s;let g,v=!0;switch(i.type){case"alias":g=FC(t,i,a),(h||m)&&a(i,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=aS(t,i,m,a),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{g=HC(JC,t,i,s,a),h&&(g.anchor=h.source.substring(1))}catch(p){const y=p instanceof Error?p.message:String(p);a(i,"RESOURCE_EXHAUSTION",y)}break;default:{const p=i.type==="error"?i.message:`Unsupported token (type: ${i.type})`;a(i,"UNEXPECTED_TOKEN",p),v=!1}}return g??(g=am(t,i.offset,void 0,null,s,a)),h&&g.anchor===""&&a(h,"BAD_ALIAS","Anchor cannot be an empty string"),r&&t.options.stringKeys&&(!Ge(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&a(m??i,"NON_STRING_KEY","With stringKeys, all keys must be strings"),c&&(g.spaceBefore=!0),u&&(i.type==="scalar"&&i.source===""?g.comment=u:g.commentBefore=u),t.options.keepSourceTokens&&v&&(g.srcToken=i),g}function am(t,i,s,a,{spaceBefore:r,comment:c,anchor:u,tag:h,end:m},g){const v={type:"scalar",offset:QC(i,s,a),indent:-1,source:""},p=aS(t,v,h,g);return u&&(p.anchor=u.source.substring(1),p.anchor===""&&g(u,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(p.spaceBefore=!0),c&&(p.comment=c,p.range[2]=m),p}function FC({options:t},{offset:i,source:s,end:a},r){const c=new Pc(s.substring(1));c.source===""&&r(i,"BAD_ALIAS","Alias cannot be an empty string"),c.source.endsWith(":")&&r(i+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=i+s.length,h=zo(a,u,t.strict,r);return c.range=[i,u,h.offset],h.comment&&(c.comment=h.comment),c}function WC(t,i,{offset:s,start:a,value:r,end:c},u){const h=Object.assign({_directives:i},t),m=new Wl(void 0,h),g={atKey:!1,atRoot:!0,directives:m.directives,options:m.options,schema:m.schema},v=Xl(a,{indicator:"doc-start",next:r??c?.[0],offset:s,onError:u,parentIndent:0,startOnNewline:!0});v.found&&(m.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!v.hasNewline&&u(v.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),m.contents=r?oS(g,r,v,u):am(g,v.end,a,null,v,u);const p=m.contents.range[2],y=zo(c,p,!1,u);return y.comment&&(m.comment=y.comment),m.range=[s,p,y.offset],m}function eo(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:i,source:s}=t;return[i,i+(typeof s=="string"?s.length:1)]}function vv(t){let i="",s=!1,a=!1;for(let r=0;r<t.length;++r){const c=t[r];switch(c[0]){case"#":i+=(i===""?"":a?`
114
-
115
- `:`
116
- `)+(c.substring(1)||" "),s=!0,a=!1;break;case"%":t[r+1]?.[0]!=="#"&&(r+=1),s=!1;break;default:s||(a=!0),s=!1}}return{comment:i,afterEmptyLine:a}}class om{constructor(i={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(s,a,r,c)=>{const u=eo(s);c?this.warnings.push(new tS(u,a,r)):this.errors.push(new Ss(u,a,r))},this.directives=new _t({version:i.version||"1.2"}),this.options=i}decorate(i,s){const{comment:a,afterEmptyLine:r}=vv(this.prelude);if(a){const c=i.contents;if(s)i.comment=i.comment?`${i.comment}
117
- ${a}`:a;else if(r||i.directives.docStart||!c)i.commentBefore=a;else if(Fe(c)&&!c.flow&&c.items.length>0){let u=c.items[0];Qe(u)&&(u=u.key);const h=u.commentBefore;u.commentBefore=h?`${a}
118
- ${h}`:a}else{const u=c.commentBefore;c.commentBefore=u?`${a}
119
- ${u}`:a}}if(s){for(let c=0;c<this.errors.length;++c)i.errors.push(this.errors[c]);for(let c=0;c<this.warnings.length;++c)i.warnings.push(this.warnings[c])}else i.errors=this.errors,i.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:vv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(i,s=!1,a=-1){for(const r of i)yield*this.next(r);yield*this.end(s,a)}*next(i){switch(i.type){case"directive":this.directives.add(i.source,(s,a,r)=>{const c=eo(i);c[0]+=s,this.onError(c,"BAD_DIRECTIVE",a,r)}),this.prelude.push(i.source),this.atDirectives=!0;break;case"document":{const s=WC(this.options,this.directives,i,this.onError);this.atDirectives&&!s.directives.docStart&&this.onError(i,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(s,!1),this.doc&&(yield this.doc),this.doc=s,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(i.source);break;case"error":{const s=i.source?`${i.message}: ${JSON.stringify(i.source)}`:i.message,a=new Ss(eo(i),"UNEXPECTED_TOKEN",s);this.atDirectives||!this.doc?this.errors.push(a):this.doc.errors.push(a);break}case"doc-end":{if(!this.doc){const a="Unexpected doc-end without preceding document";this.errors.push(new Ss(eo(i),"UNEXPECTED_TOKEN",a));break}this.doc.directives.docEnd=!0;const s=zo(i.end,i.offset+i.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),s.comment){const a=this.doc.comment;this.doc.comment=a?`${a}
120
- ${s.comment}`:s.comment}this.doc.range[2]=s.offset;break}default:this.errors.push(new Ss(eo(i),"UNEXPECTED_TOKEN",`Unsupported token ${i.type}`))}}*end(i=!1,s=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(i){const a=Object.assign({_directives:this.directives},this.options),r=new Wl(void 0,a);this.atDirectives&&this.onError(s,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,s,s],this.decorate(r,!1),yield r}}}function PC(t,i=!0,s){if(t){const a=(r,c,u)=>{const h=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(s)s(h,c,u);else throw new Ss([h,h+1],c,u)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return sS(t,i,a);case"block-scalar":return iS({options:{strict:i}},t,a)}}return null}function eO(t,i){const{implicitKey:s=!1,indent:a,inFlow:r=!1,offset:c=-1,type:u="PLAIN"}=i,h=Co({type:u,value:t},{implicitKey:s,indent:a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),m=i.end??[{type:"newline",offset:-1,indent:a,source:`
121
- `}];switch(h[0]){case"|":case">":{const g=h.indexOf(`
122
- `),v=h.substring(0,g),p=h.substring(g+1)+`
123
- `,y=[{type:"block-scalar-header",offset:c,indent:a,source:v}];return rS(y,m)||y.push({type:"newline",offset:-1,indent:a,source:`
124
- `}),{type:"block-scalar",offset:c,indent:a,props:y,source:p}}case'"':return{type:"double-quoted-scalar",offset:c,indent:a,source:h,end:m};case"'":return{type:"single-quoted-scalar",offset:c,indent:a,source:h,end:m};default:return{type:"scalar",offset:c,indent:a,source:h,end:m}}}function tO(t,i,s={}){let{afterKey:a=!1,implicitKey:r=!1,inFlow:c=!1,type:u}=s,h="indent"in t?t.indent:null;if(a&&typeof h=="number"&&(h+=2),!u)switch(t.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const g=t.props[0];if(g.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=g.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const m=Co({type:u,value:i},{implicitKey:r||h===null,indent:h!==null&&h>0?" ".repeat(h):"",inFlow:c,options:{blockQuote:!0,lineWidth:-1}});switch(m[0]){case"|":case">":nO(t,m);break;case'"':nh(t,m,"double-quoted-scalar");break;case"'":nh(t,m,"single-quoted-scalar");break;default:nh(t,m,"scalar")}}function nO(t,i){const s=i.indexOf(`
125
- `),a=i.substring(0,s),r=i.substring(s+1)+`
126
- `;if(t.type==="block-scalar"){const c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c.source=a,t.source=r}else{const{offset:c}=t,u="indent"in t?t.indent:-1,h=[{type:"block-scalar-header",offset:c,indent:u,source:a}];rS(h,"end"in t?t.end:void 0)||h.push({type:"newline",offset:-1,indent:u,source:`
127
- `});for(const m of Object.keys(t))m!=="type"&&m!=="offset"&&delete t[m];Object.assign(t,{type:"block-scalar",indent:u,props:h,source:r})}}function rS(t,i){if(i)for(const s of i)switch(s.type){case"space":case"comment":t.push(s);break;case"newline":return t.push(s),!0}return!1}function nh(t,i,s){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=s,t.source=i;break;case"block-scalar":{const a=t.props.slice(1);let r=i.length;t.props[0].type==="block-scalar-header"&&(r-=t.props[0].source.length);for(const c of a)c.offset+=r;delete t.props,Object.assign(t,{type:s,source:i,end:a});break}case"block-map":case"block-seq":{const r={type:"newline",offset:t.offset+i.length,indent:t.indent,source:`
128
- `};delete t.items,Object.assign(t,{type:s,source:i,end:[r]});break}default:{const a="indent"in t?t.indent:-1,r="end"in t&&Array.isArray(t.end)?t.end.filter(c=>c.type==="space"||c.type==="comment"||c.type==="newline"):[];for(const c of Object.keys(t))c!=="type"&&c!=="offset"&&delete t[c];Object.assign(t,{type:s,indent:a,source:i,end:r})}}}const iO=t=>"type"in t?Hc(t):_c(t);function Hc(t){switch(t.type){case"block-scalar":{let i="";for(const s of t.props)i+=Hc(s);return i+t.source}case"block-map":case"block-seq":{let i="";for(const s of t.items)i+=_c(s);return i}case"flow-collection":{let i=t.start.source;for(const s of t.items)i+=_c(s);for(const s of t.end)i+=s.source;return i}case"document":{let i=_c(t);if(t.end)for(const s of t.end)i+=s.source;return i}default:{let i=t.source;if("end"in t&&t.end)for(const s of t.end)i+=s.source;return i}}}function _c({start:t,key:i,sep:s,value:a}){let r="";for(const c of t)r+=c.source;if(i&&(r+=Hc(i)),s)for(const c of s)r+=c.source;return a&&(r+=Hc(a)),r}const Mh=Symbol("break visit"),sO=Symbol("skip children"),cS=Symbol("remove item");function Ms(t,i){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),uS(Object.freeze([]),t,i)}Ms.BREAK=Mh;Ms.SKIP=sO;Ms.REMOVE=cS;Ms.itemAtPath=(t,i)=>{let s=t;for(const[a,r]of i){const c=s?.[a];if(c&&"items"in c)s=c.items[r];else return}return s};Ms.parentCollection=(t,i)=>{const s=Ms.itemAtPath(t,i.slice(0,-1)),a=i[i.length-1][0],r=s?.[a];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function uS(t,i,s){let a=s(i,t);if(typeof a=="symbol")return a;for(const r of["key","value"]){const c=i[r];if(c&&"items"in c){for(let u=0;u<c.items.length;++u){const h=uS(Object.freeze(t.concat([[r,u]])),c.items[u],s);if(typeof h=="number")u=h-1;else{if(h===Mh)return Mh;h===cS&&(c.items.splice(u,1),u-=1)}}typeof a=="function"&&r==="key"&&(a=a(i,t))}}return typeof a=="function"?a(i,t):a}const cu="\uFEFF",uu="",fu="",wo="",lO=t=>!!t&&"items"in t,aO=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function oO(t){switch(t){case cu:return"<BOM>";case uu:return"<DOC>";case fu:return"<FLOW_END>";case wo:return"<SCALAR>";default:return JSON.stringify(t)}}function fS(t){switch(t){case cu:return"byte-order-mark";case uu:return"doc-mode";case fu:return"flow-error-end";case wo:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
129
- `:case`\r
130
- `: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(t[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}const rO=Object.freeze(Object.defineProperty({__proto__:null,BOM:cu,DOCUMENT:uu,FLOW_END:fu,SCALAR:wo,createScalarToken:eO,isCollection:lO,isScalar:aO,prettyToken:oO,resolveAsScalar:PC,setScalarValue:tO,stringify:iO,tokenType:fS,visit:Ms},Symbol.toStringTag,{value:"Module"}));function gn(t){switch(t){case void 0:case" ":case`
131
- `:case"\r":case" ":return!0;default:return!1}}const bv=new Set("0123456789ABCDEFabcdef"),cO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),dc=new Set(",[]{}"),uO=new Set(` ,[]{}
132
- \r `),ih=t=>!t||uO.has(t);class dS{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(i,s=!1){if(i){if(typeof i!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+i:i,this.lineEndPos=null}this.atEnd=!s;let a=this.next??"stream";for(;a&&(s||this.hasChars(1));)a=yield*this.parseNext(a)}atLineEnd(){let i=this.pos,s=this.buffer[i];for(;s===" "||s===" ";)s=this.buffer[++i];return!s||s==="#"||s===`
133
- `?!0:s==="\r"?this.buffer[i+1]===`
134
- `:!1}charAt(i){return this.buffer[this.pos+i]}continueScalar(i){let s=this.buffer[i];if(this.indentNext>0){let a=0;for(;s===" ";)s=this.buffer[++a+i];if(s==="\r"){const r=this.buffer[a+i+1];if(r===`
135
- `||!r&&!this.atEnd)return i+a+1}return s===`
136
- `||a>=this.indentNext||!s&&!this.atEnd?i+a:-1}if(s==="-"||s==="."){const a=this.buffer.substr(i,3);if((a==="---"||a==="...")&&gn(this.buffer[i+3]))return-1}return i}getLine(){let i=this.lineEndPos;return(typeof i!="number"||i!==-1&&i<this.pos)&&(i=this.buffer.indexOf(`
137
- `,this.pos),this.lineEndPos=i),i===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[i-1]==="\r"&&(i-=1),this.buffer.substring(this.pos,i))}hasChars(i){return this.pos+i<=this.buffer.length}setNext(i){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=i,null}peek(i){return this.buffer.substr(this.pos,i)}*parseNext(i){switch(i){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 i=this.getLine();if(i===null)return this.setNext("stream");if(i[0]===cu&&(yield*this.pushCount(1),i=i.substring(1)),i[0]==="%"){let s=i.length,a=i.indexOf("#");for(;a!==-1;){const c=i[a-1];if(c===" "||c===" "){s=a-1;break}else a=i.indexOf("#",a+1)}for(;;){const c=i[s-1];if(c===" "||c===" ")s-=1;else break}const r=(yield*this.pushCount(s))+(yield*this.pushSpaces(!0));return yield*this.pushCount(i.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){const s=yield*this.pushSpaces(!0);return yield*this.pushCount(i.length-s),yield*this.pushNewline(),"stream"}return yield uu,yield*this.parseLineStart()}*parseLineStart(){const i=this.charAt(0);if(!i&&!this.atEnd)return this.setNext("line-start");if(i==="-"||i==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const s=this.peek(3);if((s==="---"||s==="...")&&gn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,s==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!gn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[i,s]=this.peek(2);if(!s&&!this.atEnd)return this.setNext("block-start");if((i==="-"||i==="?"||i===":")&&gn(s)){const a=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=a,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const i=this.getLine();if(i===null)return this.setNext("doc");let s=yield*this.pushIndicators();switch(i[s]){case"#":yield*this.pushCount(i.length-s);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(ih),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return s+=yield*this.parseBlockScalarHeader(),s+=yield*this.pushSpaces(!0),yield*this.pushCount(i.length-s),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let i,s,a=-1;do i=yield*this.pushNewline(),i>0?(s=yield*this.pushSpaces(!1),this.indentValue=a=s):s=0,s+=yield*this.pushSpaces(!0);while(i+s>0);const r=this.getLine();if(r===null)return this.setNext("flow");if((a!==-1&&a<this.indentNext&&r[0]!=="#"||a===0&&(r.startsWith("---")||r.startsWith("..."))&&gn(r[3]))&&!(a===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield fu,yield*this.parseLineStart();let c=0;for(;r[c]===",";)c+=yield*this.pushCount(1),c+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(c+=yield*this.pushIndicators(),r[c]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-c),"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(ih),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||gn(u)||u===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const i=this.charAt(0);let s=this.buffer.indexOf(i,this.pos+1);if(i==="'")for(;s!==-1&&this.buffer[s+1]==="'";)s=this.buffer.indexOf("'",s+2);else for(;s!==-1;){let c=0;for(;this.buffer[s-1-c]==="\\";)c+=1;if(c%2===0)break;s=this.buffer.indexOf('"',s+1)}const a=this.buffer.substring(0,s);let r=a.indexOf(`
138
- `,this.pos);if(r!==-1){for(;r!==-1;){const c=this.continueScalar(r+1);if(c===-1)break;r=a.indexOf(`
139
- `,c)}r!==-1&&(s=r-(a[r-1]==="\r"?2:1))}if(s===-1){if(!this.atEnd)return this.setNext("quoted-scalar");s=this.buffer.length}return yield*this.pushToIndex(s+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let i=this.pos;for(;;){const s=this.buffer[++i];if(s==="+")this.blockScalarKeep=!0;else if(s>"0"&&s<="9")this.blockScalarIndent=Number(s)-1;else if(s!=="-")break}return yield*this.pushUntil(s=>gn(s)||s==="#")}*parseBlockScalar(){let i=this.pos-1,s=0,a;e:for(let c=this.pos;a=this.buffer[c];++c)switch(a){case" ":s+=1;break;case`
140
- `:i=c,s=0;break;case"\r":{const u=this.buffer[c+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
141
- `)break}default:break e}if(!a&&!this.atEnd)return this.setNext("block-scalar");if(s>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=s:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const c=this.continueScalar(i+1);if(c===-1)break;i=this.buffer.indexOf(`
142
- `,c)}while(i!==-1);if(i===-1){if(!this.atEnd)return this.setNext("block-scalar");i=this.buffer.length}}let r=i+1;for(a=this.buffer[r];a===" ";)a=this.buffer[++r];if(a===" "){for(;a===" "||a===" "||a==="\r"||a===`
143
- `;)a=this.buffer[++r];i=r-1}else if(!this.blockScalarKeep)do{let c=i-1,u=this.buffer[c];u==="\r"&&(u=this.buffer[--c]);const h=c;for(;u===" ";)u=this.buffer[--c];if(u===`
144
- `&&c>=this.pos&&c+1+s>h)i=c;else break}while(!0);return yield wo,yield*this.pushToIndex(i+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const i=this.flowLevel>0;let s=this.pos-1,a=this.pos-1,r;for(;r=this.buffer[++a];)if(r===":"){const c=this.buffer[a+1];if(gn(c)||i&&dc.has(c))break;s=a}else if(gn(r)){let c=this.buffer[a+1];if(r==="\r"&&(c===`
145
- `?(a+=1,r=`
146
- `,c=this.buffer[a+1]):s=a),c==="#"||i&&dc.has(c))break;if(r===`
147
- `){const u=this.continueScalar(a+1);if(u===-1)break;a=Math.max(a,u-2)}}else{if(i&&dc.has(r))break;s=a}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield wo,yield*this.pushToIndex(s+1,!0),i?"flow":"doc")}*pushCount(i){return i>0?(yield this.buffer.substr(this.pos,i),this.pos+=i,i):0}*pushToIndex(i,s){const a=this.buffer.slice(this.pos,i);return a?(yield a,this.pos+=a.length,a.length):(s&&(yield""),0)}*pushIndicators(){let i=0;e:for(;;){switch(this.charAt(0)){case"!":i+=yield*this.pushTag(),i+=yield*this.pushSpaces(!0);continue e;case"&":i+=yield*this.pushUntil(ih),i+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{const s=this.flowLevel>0,a=this.charAt(1);if(gn(a)||s&&dc.has(a)){s?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0);continue e}}}break e}return i}*pushTag(){if(this.charAt(1)==="<"){let i=this.pos+2,s=this.buffer[i];for(;!gn(s)&&s!==">";)s=this.buffer[++i];return yield*this.pushToIndex(s===">"?i+1:i,!1)}else{let i=this.pos+1,s=this.buffer[i];for(;s;)if(cO.has(s))s=this.buffer[++i];else if(s==="%"&&bv.has(this.buffer[i+1])&&bv.has(this.buffer[i+2]))s=this.buffer[i+=3];else break;return yield*this.pushToIndex(i,!1)}}*pushNewline(){const i=this.buffer[this.pos];return i===`
148
- `?yield*this.pushCount(1):i==="\r"&&this.charAt(1)===`
149
- `?yield*this.pushCount(2):0}*pushSpaces(i){let s=this.pos-1,a;do a=this.buffer[++s];while(a===" "||i&&a===" ");const r=s-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=s),r}*pushUntil(i){let s=this.pos,a=this.buffer[s];for(;!i(a);)a=this.buffer[++s];return yield*this.pushToIndex(s,!1)}}class hS{constructor(){this.lineStarts=[],this.addNewLine=i=>this.lineStarts.push(i),this.linePos=i=>{let s=0,a=this.lineStarts.length;for(;s<a;){const c=s+a>>1;this.lineStarts[c]<i?s=c+1:a=c}if(this.lineStarts[s]===i)return{line:s+1,col:1};if(s===0)return{line:0,col:i};const r=this.lineStarts[s-1];return{line:s,col:i-r+1}}}}function Vi(t,i){for(let s=0;s<t.length;++s)if(t[s].type===i)return!0;return!1}function Sv(t){for(let i=0;i<t.length;++i)switch(t[i].type){case"space":case"comment":case"newline":break;default:return i}return-1}function mS(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function hc(t){switch(t.type){case"document":return t.start;case"block-map":{const i=t.items[t.items.length-1];return i.sep??i.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function xl(t){if(t.length===0)return[];let i=t.length;e:for(;--i>=0;)switch(t[i].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++i]?.type==="space";);return t.splice(i,t.length)}function $c(t,i){if(i.length<1e5)Array.prototype.push.apply(t,i);else for(let s=0;s<i.length;++s)t.push(i[s])}function wv(t){if(t.start.type==="flow-seq-start")for(const i of t.items)i.sep&&!i.value&&!Vi(i.start,"explicit-key-ind")&&!Vi(i.sep,"map-value-ind")&&(i.key&&(i.value=i.key),delete i.key,mS(i.value)?i.value.end?$c(i.value.end,i.sep):i.value.end=i.sep:$c(i.start,i.sep),delete i.sep)}class rm{constructor(i){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new dS,this.onNewLine=i}*parse(i,s=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const a of this.lexer.lex(i,s))yield*this.next(a);s||(yield*this.end())}*next(i){if(this.source=i,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=i.length;return}const s=fS(i);if(s)if(s==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=s,yield*this.step(),s){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+i.length);break;case"space":this.atNewLine&&i[0]===" "&&(this.indent+=i.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=i.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=i.length}else{const a=`Not a YAML token: ${i}`;yield*this.pop({type:"error",offset:this.offset,message:a,source:i}),this.offset+=i.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 i=this.peek(1);if(this.type==="doc-end"&&i?.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(!i)return yield*this.stream();switch(i.type){case"document":return yield*this.document(i);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(i);case"block-scalar":return yield*this.blockScalar(i);case"block-map":return yield*this.blockMap(i);case"block-seq":return yield*this.blockSequence(i);case"flow-collection":return yield*this.flowCollection(i);case"doc-end":return yield*this.documentEnd(i)}yield*this.pop()}peek(i){return this.stack[this.stack.length-i]}*pop(i){const s=i??this.stack.pop();if(!s)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield s;else{const a=this.peek(1);switch(s.type==="block-scalar"?s.indent="indent"in a?a.indent:0:s.type==="flow-collection"&&a.type==="document"&&(s.indent=0),s.type==="flow-collection"&&wv(s),a.type){case"document":a.value=s;break;case"block-scalar":a.props.push(s);break;case"block-map":{const r=a.items[a.items.length-1];if(r.value){a.items.push({start:[],key:s,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=s;else{Object.assign(r,{key:s,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{const r=a.items[a.items.length-1];r.value?a.items.push({start:[],value:s}):r.value=s;break}case"flow-collection":{const r=a.items[a.items.length-1];!r||r.value?a.items.push({start:[],key:s,sep:[]}):r.sep?r.value=s:Object.assign(r,{key:s,sep:[]});return}default:yield*this.pop(),yield*this.pop(s)}if((a.type==="document"||a.type==="block-map"||a.type==="block-seq")&&(s.type==="block-map"||s.type==="block-seq")){const r=s.items[s.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&Sv(r.start)===-1&&(s.indent===0||r.start.every(c=>c.type!=="comment"||c.indent<s.indent))&&(a.type==="document"?a.end=r.start:a.items.push({start:r.start}),s.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 i={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&i.start.push(this.sourceToken),this.stack.push(i);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(i){if(i.value)return yield*this.lineEnd(i);switch(this.type){case"doc-start":{Sv(i.start)!==-1?(yield*this.pop(),yield*this.step()):i.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":i.start.push(this.sourceToken);return}const s=this.startBlockValue(i);s?this.stack.push(s):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(i){if(this.type==="map-value-ind"){const s=hc(this.peek(2)),a=xl(s);let r;i.end?(r=i.end,r.push(this.sourceToken),delete i.end):r=[this.sourceToken];const c={type:"block-map",offset:i.offset,indent:i.indent,items:[{start:a,key:i,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=c}else yield*this.lineEnd(i)}*blockScalar(i){switch(this.type){case"space":case"comment":case"newline":i.props.push(this.sourceToken);return;case"scalar":if(i.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let s=this.source.indexOf(`
150
- `)+1;for(;s!==0;)this.onNewLine(this.offset+s),s=this.source.indexOf(`
151
- `,s)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(i){const s=i.items[i.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,s.value){const a="end"in s.value?s.value.end:void 0;(Array.isArray(a)?a[a.length-1]:void 0)?.type==="comment"?a?.push(this.sourceToken):i.items.push({start:[this.sourceToken]})}else s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)i.items.push({start:[this.sourceToken]});else if(s.sep)s.sep.push(this.sourceToken);else{if(this.atIndentedComment(s.start,i.indent)){const r=i.items[i.items.length-2]?.value?.end;if(Array.isArray(r)){$c(r,s.start),r.push(this.sourceToken),i.items.pop();return}}s.start.push(this.sourceToken)}return}if(this.indent>=i.indent){const a=!this.onKeyLine&&this.indent===i.indent,r=a&&(s.sep||s.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(r&&s.sep&&!s.value){const u=[];for(let h=0;h<s.sep.length;++h){const m=s.sep[h];switch(m.type){case"newline":u.push(h);break;case"space":break;case"comment":m.indent>i.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(c=s.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":r||s.value?(c.push(this.sourceToken),i.items.push({start:c}),this.onKeyLine=!0):s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"explicit-key-ind":!s.sep&&!s.explicitKey?(s.start.push(this.sourceToken),s.explicitKey=!0):r||s.value?(c.push(this.sourceToken),i.items.push({start:c,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(s.explicitKey)if(s.sep)if(s.value)i.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Vi(s.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(mS(s.key)&&!Vi(s.sep,"newline")){const u=xl(s.start),h=s.key,m=s.sep;m.push(this.sourceToken),delete s.key,delete s.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:h,sep:m}]})}else c.length>0?s.sep=s.sep.concat(c,this.sourceToken):s.sep.push(this.sourceToken);else if(Vi(s.start,"newline"))Object.assign(s,{key:null,sep:[this.sourceToken]});else{const u=xl(s.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else s.sep?s.value||r?i.items.push({start:c,key:null,sep:[this.sourceToken]}):Vi(s.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):s.sep.push(this.sourceToken):Object.assign(s,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);r||s.value?(i.items.push({start:c,key:u,sep:[]}),this.onKeyLine=!0):s.sep?this.stack.push(u):(Object.assign(s,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(i);if(u){if(u.type==="block-seq"){if(!s.explicitKey&&s.sep&&!Vi(s.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 a&&i.items.push({start:c});this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(i){const s=i.items[i.items.length-1];switch(this.type){case"newline":if(s.value){const a="end"in s.value?s.value.end:void 0;(Array.isArray(a)?a[a.length-1]:void 0)?.type==="comment"?a?.push(this.sourceToken):i.items.push({start:[this.sourceToken]})}else s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)i.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(s.start,i.indent)){const r=i.items[i.items.length-2]?.value?.end;if(Array.isArray(r)){$c(r,s.start),r.push(this.sourceToken),i.items.pop();return}}s.start.push(this.sourceToken)}return;case"anchor":case"tag":if(s.value||this.indent<=i.indent)break;s.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==i.indent)break;s.value||Vi(s.start,"seq-item-ind")?i.items.push({start:[this.sourceToken]}):s.start.push(this.sourceToken);return}if(this.indent>i.indent){const a=this.startBlockValue(i);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(i){const s=i.items[i.items.length-1];if(this.type==="flow-error-end"){let a;do yield*this.pop(),a=this.peek(1);while(a?.type==="flow-collection")}else if(i.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!s||s.sep?i.items.push({start:[this.sourceToken]}):s.start.push(this.sourceToken);return;case"map-value-ind":!s||s.value?i.items.push({start:[],key:null,sep:[this.sourceToken]}):s.sep?s.sep.push(this.sourceToken):Object.assign(s,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!s||s.value?i.items.push({start:[this.sourceToken]}):s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);!s||s.value?i.items.push({start:[],key:r,sep:[]}):s.sep?this.stack.push(r):Object.assign(s,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":i.end.push(this.sourceToken);return}const a=this.startBlockValue(i);a?this.stack.push(a):(yield*this.pop(),yield*this.step())}else{const a=this.peek(2);if(a.type==="block-map"&&(this.type==="map-value-ind"&&a.indent===i.indent||this.type==="newline"&&!a.items[a.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&a.type!=="flow-collection"){const r=hc(a),c=xl(r);wv(i);const u=i.end.splice(1,i.end.length);u.push(this.sourceToken);const h={type:"block-map",offset:i.offset,indent:i.indent,items:[{start:c,key:i,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=h}else yield*this.lineEnd(i)}}flowScalar(i){if(this.onNewLine){let s=this.source.indexOf(`
152
- `)+1;for(;s!==0;)this.onNewLine(this.offset+s),s=this.source.indexOf(`
153
- `,s)+1}return{type:i,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(i){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 s=hc(i),a=xl(s);return a.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const s=hc(i),a=xl(s);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(i,s){return this.type!=="comment"||this.indent<=s?!1:i.every(a=>a.type==="newline"||a.type==="space")}*documentEnd(i){this.type!=="doc-mode"&&(i.end?i.end.push(this.sourceToken):i.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(i){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;default:i.end?i.end.push(this.sourceToken):i.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function gS(t){const i=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||i&&new hS||null,prettyErrors:i}}function fO(t,i={}){const{lineCounter:s,prettyErrors:a}=gS(i),r=new rm(s?.addNewLine),c=new om(i),u=Array.from(c.compose(r.parse(t)));if(a&&s)for(const h of u)h.errors.forEach(Bc(t,s)),h.warnings.forEach(Bc(t,s));return u.length>0?u:Object.assign([],{empty:!0},c.streamInfo())}function pS(t,i={}){const{lineCounter:s,prettyErrors:a}=gS(i),r=new rm(s?.addNewLine),c=new om(i);let u=null;for(const h of c.compose(r.parse(t),!0,t.length))if(!u)u=h;else if(u.options.logLevel!=="silent"){u.errors.push(new Ss(h.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&s&&(u.errors.forEach(Bc(t,s)),u.warnings.forEach(Bc(t,s))),u}function dO(t,i,s){let a;typeof i=="function"?a=i:s===void 0&&i&&typeof i=="object"&&(s=i);const r=pS(t,s);if(!r)return null;if(r.warnings.forEach(c=>Rb(r.options.logLevel,c)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:a},s))}function hO(t,i,s){let a=null;if(typeof i=="function"||Array.isArray(i)?a=i:s===void 0&&i&&(s=i),typeof s=="string"&&(s=s.length),typeof s=="number"){const r=Math.round(s);s=r<1?void 0:r>8?{indent:8}:{indent:r}}if(t===void 0){const{keepUndefined:r}=s??i??{};if(!r)return}return Os(t)&&!a?t.toString(s):new Wl(t,a,s).toString(s)}const du=Object.freeze(Object.defineProperty({__proto__:null,Alias:Pc,CST:rO,Composer:om,Document:Wl,Lexer:dS,LineCounter:hS,Pair:St,Parser:rm,Scalar:_e,Schema:ru,YAMLError:lm,YAMLMap:It,YAMLParseError:Ss,YAMLSeq:Ki,YAMLWarning:tS,isAlias:Cs,isCollection:Fe,isDocument:Os,isMap:Il,isNode:We,isPair:Qe,isScalar:Ge,isSeq:Ql,parse:dO,parseAllDocuments:fO,parseDocument:pS,stringify:hO,visit:zs,visitAsync:Wc},Symbol.toStringTag,{value:"Module"}));function Zi(t){return t.normalize("NFKC").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").toLowerCase()||"unnamed"}function xv(t){return`story_${Zi(t).replaceAll("-","_")}`}function mO(t){return`slc_${Zi(t).replaceAll("-","_")}`}function gO(t){return`scr_${Zi(t).replaceAll("-","_")}`}function pO(t){return`cmd_${Zi(t).replaceAll("-","_")}`}function yO(t){return`qry_${Zi(t).replaceAll("-","_")}`}function sh(t){return`evt_${Zi(t).replaceAll("-","_")}`}function vO(t,i,s){const a=s?Zi(s):`case-${i+1}`;return`gwt_${Zi(t).replaceAll("-","_")}_${a.replaceAll("-","_")}`}function El(t,i,s){return`${t}:${i}->${s}`}function oo(t){return t.replaceAll("\\","/").replace(/^\/+/,"")}function yS(t,i=""){const s=oo(t).split("/").at(-1)??t;return i&&s.endsWith(i)?s.slice(0,-i.length):s}function kl(t){return Array.isArray(t)?t.filter(i=>typeof i=="string"):[]}function bO(t,i){const s=du.parse(i),a=s?.events&&typeof s.events=="object"?s.events:s??{};return Object.entries(a).map(([r,c])=>({name:r,fields:typeof c?.fields=="string"?c.fields:void 0,description:typeof c?.description=="string"?c.description:void 0,sourcePath:t}))}function SO(t,i){const s=du.parse(i);return{name:typeof s?.name=="string"?s.name:yS(t,".yaml"),description:typeof s?.description=="string"?s.description:"",path:t,slices:kl(s?.slices).map(oo)}}function wO(t){return Array.isArray(t)?t.filter(i=>!!i&&typeof i=="object").map(i=>({name:typeof i.name=="string"?i.name:"",fields:typeof i.fields=="string"?i.fields:void 0,notes:typeof i.notes=="string"?i.notes:void 0,produces:kl(i.produces)})):[]}function xO(t){return Array.isArray(t)?t.filter(i=>!!i&&typeof i=="object").map(i=>({name:typeof i.name=="string"?i.name:"",fields:typeof i.fields=="string"?i.fields:void 0,notes:typeof i.notes=="string"?i.notes:void 0,fromEvents:kl(i.from_events)})):[]}function EO(t){return Array.isArray(t)?t.filter(i=>!!i&&typeof i=="object").map(i=>({name:typeof i.name=="string"?i.name:void 0,description:typeof i.description=="string"?i.description:void 0,given:Array.isArray(i.given)?i.given:[],when:Array.isArray(i.when)?i.when:[],then:Array.isArray(i.then)?i.then:[]})):[]}function _O(t){return{type:t?.type==="system"?"system":"user",name:typeof t?.name=="string"?t.name:void 0,actors:kl(t?.actors),reads:kl(t?.reads),executes:kl(t?.executes)}}function NO(t,i,s){const a=du.parse(i);return{title:typeof a?.slice=="string"?a.slice:yS(t),path:t,storyName:s.get(t),screen:_O(a?.screen),commands:wO(a?.commands),queries:xO(a?.queries),gwt:EO(a?.gwt),raw:i}}function AO(t){const i=[],s=[],a=new Map,r=new Map;for(const c of t.stories){const u=xv(c.path);r.set(c.name,u),i.push({id:u,type:"story",label:c.name,sourcePath:c.path,description:c.description})}for(const c of t.events){const u=sh(c.name);a.set(c.name,u),i.push({id:u,type:"event",label:c.name,sourceName:c.name,sourcePath:c.sourcePath,fields:c.fields,description:c.description})}for(const c of t.slices){const u=mO(c.path),h=gO(c.path),m=c.screen.type==="system"?"processor":"screen";if(i.push({id:u,type:"slice",label:c.title,storyName:c.storyName,sliceTitle:c.title,sourcePath:c.path,raw:c.raw}),c.storyName){const g=r.get(c.storyName)??xv(c.storyName);s.push({id:El("story-slice",g,u),kind:"story-slice",source:g,target:u})}i.push({id:h,type:m,label:c.screen.name??(c.screen.type==="system"?"Processor":"Screen"),storyName:c.storyName,sliceTitle:c.title,sourcePath:c.path,actors:c.screen.actors,screenType:c.screen.type,raw:c.raw}),s.push({id:El("slice-screen",u,h),kind:"slice-screen",source:u,target:h});for(const g of c.queries){const v=yO(g.name);i.push({id:v,type:"query",label:g.name,storyName:c.storyName,sliceTitle:c.title,sourceName:g.name,sourcePath:c.path,fields:g.fields,raw:c.raw}),c.screen.reads.includes(g.name)&&s.push({id:El("query-screen",v,h),kind:"query-screen",source:v,target:h});for(const p of g.fromEvents){const y=a.get(p)??sh(p);s.push({id:El("event-query",y,v),kind:"event-query",source:y,target:v,label:p})}}for(const g of c.commands){const v=pO(g.name);i.push({id:v,type:"command",label:g.name,storyName:c.storyName,sliceTitle:c.title,sourceName:g.name,sourcePath:c.path,fields:g.fields,raw:c.raw}),c.screen.executes.includes(g.name)&&s.push({id:El("screen-command",h,v),kind:"screen-command",source:h,target:v});for(const p of g.produces){const y=a.get(p)??sh(p);s.push({id:El("command-event",v,y),kind:"command-event",source:v,target:y,label:p})}}c.gwt.forEach((g,v)=>{i.push({id:vO(c.path,v,g.name),type:"gwt",label:g.name??`Case ${v+1}`,storyName:c.storyName,sliceTitle:c.title,sourceName:g.name,sourcePath:c.path,description:g.description,given:g.given,when:g.when,then:g.then,raw:c.raw})})}return{nodes:i,edges:s}}function TO(t,i={}){const s=new Map(t.map(T=>[oo(T.path),T.content])),a=s.get(".event-modeling/config.yaml"),r=a?du.parse(a):null,c=r?.paths?.event_model_dir??"event-model",u=r?.paths?.features_dir??"event-model/features",h=r?.paths?.slice_extension??".slice.yaml",m=r?.paths?.events_file??`${c}/events.yaml`,g=r?.paths?.stories_dir??`${c}/stories`,v=s.get(m);if(!v)throw new Error(`Missing events file: ${m}`);const p=bO(m,v),y=[...s.entries()].filter(([T])=>T.startsWith(`${g}/`)&&T.endsWith(".yaml")).sort(([T],[L])=>T.localeCompare(L)).map(([T,L])=>SO(T,L)),w=new Map;for(const T of y)for(const L of T.slices)w.set(oo(L),T.name);const _=y.flatMap(T=>T.slices.map(oo)),E=[...s.keys()].filter(T=>T.startsWith(`${u}/`)&&T.endsWith(h)),S=[...new Set([..._,...E])].sort().filter(T=>s.has(T)).map(T=>NO(T,s.get(T)??"",w)),C={root:i.root??"browser-import",config:{language:r?.language,paths:{eventModelDir:c,featuresDir:u,sliceExtension:h,eventsFile:m,storiesDir:g}},events:p,stories:y,slices:S},x=AO(C);return{...C,...x}}function $e(t,i,s,a,r){return{id:`${i}:${a??"project"}:${s}`,severity:t,check:i,message:s,path:a,nodeId:r}}function _l(t){const i=new Set,s=new Set;for(const a of t){const r=a.trim().toLowerCase();r&&(i.has(r)&&s.add(a),i.add(r))}return[...s]}const MO=new Set(["sent","built","made","paid","booked","cancelled","canceled","submitted","recorded","created","updated","deleted","placed","notified"]);function CO(t){return t.match(/[A-Z]+(?=[A-Z][a-z]|$)|[A-Z]?[a-z]+|\d+/g)??[t]}function OO(t){const i=t.toLowerCase();return MO.has(i)||/(ed|en|d)$/i.test(t)}function zO(t){return CO(t).some(OO)}function Ev(t){return/(Requested|Triggered|Scheduled|Enqueued|Dispatched|Required)$/.test(t)}function DO(t){return["Selected","Shown","Viewed","Clicked","Opened","Closed","Ticked","Incremented","Reached","Displayed","Navigated"].find(i=>t.includes(i))}function LO(t){const i=new Set(t.nodes.map(c=>c.id)),s=new Map;for(const c of i)s.set(c,new Set);for(const c of t.edges)!i.has(c.source)||!i.has(c.target)||(s.get(c.source)?.add(c.target),s.get(c.target)?.add(c.source));let a=0;const r=new Set;for(const c of i){if(r.has(c))continue;a+=1;const u=[c];for(r.add(c);u.length>0;){const h=u.shift();if(h)for(const m of s.get(h)??[])r.has(m)||(r.add(m),u.push(m))}}return a}function jO(t){const i=[],s=new Set(t.events.map(m=>m.name)),a=new Set(t.slices.map(m=>m.path)),r=new Map,c=new Map;for(const m of t.stories){m.slices.length>15&&i.push($e("warning","S4",`Story "${m.name}" has ${m.slices.length} slices; consider splitting it.`,m.path));for(const g of m.slices)a.has(g)||i.push($e("error","S2",`Story "${m.name}" lists missing slice "${g}".`,m.path))}for(const m of t.events){m.fields?.trim()||i.push($e("error","C4",`Event "${m.name}" has no fields block.`,m.sourcePath)),!zO(m.name)&&!Ev(m.name)&&i.push($e("warning","C3",`Event "${m.name}" does not obviously read as a past-tense domain event.`,m.sourcePath));const g=DO(m.name);g&&i.push($e("warning","D1",`Event "${m.name}" contains red-flag verb "${g}"; confirm this is persisted domain state.`,m.sourcePath))}for(const m of t.slices){const g=m.commands.map(p=>p.name),v=m.queries.map(p=>p.name);for(const p of _l(g))i.push($e("error","L9",`Command "${p}" is duplicated within slice "${m.title}".`,m.path));for(const p of _l(v))i.push($e("error","L9",`Query "${p}" is duplicated within slice "${m.title}".`,m.path));for(const p of _l(m.screen.reads))i.push($e("error","L9",`screen.reads lists "${p}" more than once.`,m.path));for(const p of _l(m.screen.executes))i.push($e("error","L9",`screen.executes lists "${p}" more than once.`,m.path));for(const p of m.screen.reads)v.includes(p)||i.push($e("error","W2",`screen.reads references missing local query "${p}".`,m.path));for(const p of m.screen.executes)g.includes(p)||i.push($e("error","W1",`screen.executes references missing local command "${p}".`,m.path));m.screen.type==="system"&&m.screen.actors.length>0&&i.push($e("error","L5",`System slice "${m.title}" must not declare screen.actors.`,m.path)),m.storyName||i.push($e("warning","M2",`Slice "${m.title}" is not listed by any story.`,m.path)),m.commands.length>0&&m.gwt.length===0&&i.push($e("warning","M1",`Command slice "${m.title}" has no GWT scenarios.`,m.path));for(const p of m.commands){p.fields?.trim()||i.push($e("warning","L6",`Command "${p.name}" has no fields block.`,m.path));for(const y of p.produces)s.has(y)||i.push($e("error","G1",`Command "${p.name}" produces unregistered event "${y}".`,m.path)),r.set(y,[...r.get(y)??[],`${m.title}.${p.name}`])}for(const p of m.queries){p.fields?.trim()||i.push($e("warning","L7",`Query "${p.name}" has no fields block.`,m.path)),p.name.includes("For")||i.push($e("warning","N1",`Query "${p.name}" should use a descriptive <Thing>For<UseCaseOrScreen> name.`,m.path));for(const y of p.fromEvents)s.has(y)||i.push($e("error","G2",`Query "${p.name}" reads unregistered event "${y}".`,m.path)),c.set(y,[...c.get(y)??[],`${m.title}.${p.name}`])}for(const p of m.gwt)for(const y of[...p.given,...p.when,...p.then])(!y.type||!["event","command","query","error"].includes(y.type))&&i.push($e("error","L8",`GWT scenario "${p.name??"Unnamed"}" has invalid item type "${y.type??""}".`,m.path)),y.name||i.push($e("error","L8",`GWT scenario "${p.name??"Unnamed"}" has an item without a name.`,m.path))}for(const m of s){const g=r.get(m)??[],v=c.get(m)??[];g.length===0&&i.push($e("error","G3",`Event "${m}" is registered but no command produces it.`)),g.length>1&&i.push($e("warning","G8",`Event "${m}" has multiple producers: ${g.join(", ")}.`)),g.length>0&&v.length===0&&i.push($e("warning",Ev(m)?"G4b":"G4a",`Event "${m}" is produced but no query consumes it.`))}for(const[m,g]of c.entries())(r.get(m)??[]).length===0&&i.push($e("error","G3",`Event "${m}" is read by ${g.join(", ")} but no command produces it.`));for(const m of _l(t.slices.flatMap(g=>g.commands.map(v=>v.name))))i.push($e("warning","M5",`Command name "${m}" is used in multiple slices; command names should be globally unique.`));for(const m of _l(t.slices.flatMap(g=>g.queries.map(v=>v.name))))i.push($e("warning","G7",`Query name "${m}" is used in multiple slices; query names should be globally unique.`));const u=t.slices.filter(m=>m.commands.length>0).length;u>0&&t.events.length/u>2&&i.push($e("warning","M4",`The model has ${(t.events.length/u).toFixed(1)} events per command slice; check for UI/runtime events leaking into the model.`));const h=LO(t);return h>1&&i.push($e("info","I3",`The graph has ${h} disconnected islands.`)),{errors:i.filter(m=>m.severity==="error").length,warnings:i.filter(m=>m.severity==="warning").length,findings:i}}function _v(){return M.jsxs(M.Fragment,{children:[M.jsx(rn,{id:"top-target",type:"target",position:me.Top,style:{left:"46%"}}),M.jsx(rn,{id:"top-source",type:"source",position:me.Top,style:{left:"54%"}}),M.jsx(rn,{id:"bottom-target",type:"target",position:me.Bottom,style:{left:"46%"}}),M.jsx(rn,{id:"bottom-source",type:"source",position:me.Bottom,style:{left:"54%"}}),M.jsx(rn,{id:"left-target",type:"target",position:me.Left,style:{top:"46%"}}),M.jsx(rn,{id:"left-source",type:"source",position:me.Left,style:{top:"54%"}}),M.jsx(rn,{id:"right-target",type:"target",position:me.Right,style:{top:"46%"}}),M.jsx(rn,{id:"right-source",type:"source",position:me.Right,style:{top:"54%"}})]})}function lh({title:t,items:i}){const s=i&&i.length>0?i:[{type:"empty",name:"empty"}];return M.jsxs("div",{className:"gwt-step",children:[M.jsx("div",{className:"gwt-step-title",children:t}),M.jsx("div",{className:"gwt-step-items",children:s.map((a,r)=>M.jsxs("div",{className:`gwt-step-item gwt-step-item-${a.type??"empty"}`,children:[M.jsx("span",{children:a.type??"empty"}),M.jsx("strong",{children:a.name??"empty"})]},`${a.type??"empty"}-${a.name??r}`))})]})}function RO({data:t}){const i=t,s=i.projectNode,a=i.diffStatus&&i.diffStatus!=="unchanged"?M.jsx("div",{className:`diff-badge diff-badge-${i.diffStatus}`,children:i.diffStatus}):null;return s.type==="gwt"?M.jsxs("div",{className:`em-node em-node-${s.type} ${i.selected?"selected":""} ${i.connected?"connected":""} ${i.diffStatus?`diff-node-${i.diffStatus}`:""}`,children:[M.jsx(_v,{}),a,M.jsx("div",{className:"node-type",children:"GWT case"}),M.jsx("div",{className:"node-label",children:s.label}),s.description?M.jsx("div",{className:"gwt-description",children:s.description}):null,M.jsxs("div",{className:"gwt-steps",children:[M.jsx(lh,{title:"Given",items:s.given}),M.jsx(lh,{title:"When",items:s.when}),M.jsx(lh,{title:"Then",items:s.then})]})]}):M.jsxs("div",{className:`em-node em-node-${s.type} ${i.selected?"selected":""} ${i.connected?"connected":""} ${i.diffStatus?`diff-node-${i.diffStatus}`:""}`,children:[M.jsx(_v,{}),a,M.jsx("div",{className:"node-type",children:s.type}),M.jsx("div",{className:"node-label",children:s.label}),s.actors&&s.actors.length>0?M.jsx("div",{className:"chips",children:s.actors.map(r=>M.jsx("span",{children:r},r))}):null]})}function kO({data:t}){const i=t,s=i.projectNode;return M.jsxs("div",{className:`group-node group-${s.type} ${i.selected?"selected":""} ${i.diffStatus?`diff-node-${i.diffStatus}`:""}`,children:[i.diffStatus&&i.diffStatus!=="unchanged"?M.jsx("div",{className:`diff-badge diff-badge-${i.diffStatus}`,children:i.diffStatus}):null,M.jsx("div",{className:"group-title",children:s.label}),s.description?M.jsx("div",{className:"group-description",children:s.description}):null]})}const BO={eventModelNode:RO,groupNode:kO};function Nv(t){return t===me.Top?{x:0,y:-1}:t===me.Right?{x:1,y:0}:t===me.Bottom?{x:0,y:1}:{x:-1,y:0}}function HO({sourceX:t,sourceY:i,targetX:s,targetY:a,sourcePosition:r,targetPosition:c,data:u}){const h=u,m=s-t,g=a-i,v=Math.max(56,Math.min(180,Math.abs(g)*.42)),p=Math.max(70,Math.min(180,Math.abs(m)*.38)),y=Math.max(72,Math.min(180,Math.max(Math.abs(m),Math.abs(g))*.38));if(h?.route==="same-slice-read"){const E=r===me.Top?-1:1,N=c===me.Bottom?1:-1,S=Math.max(72,Math.min(150,Math.abs(g)*.65));return`M ${t},${i} C ${t},${i+E*S} ${s},${a+N*S} ${s},${a}`}if(h?.route==="event-read"){const E=Nv(r),N=Nv(c);return`M ${t},${i} C ${t+E.x*y},${i+E.y*y} ${s+N.x*y},${a+N.y*y} ${s},${a}`}if(r===me.Bottom||r===me.Top){const E=r===me.Top?-1:1,N=c===me.Top?-1:1;return`M ${t},${i} C ${t},${i+E*v} ${s},${a+N*v} ${s},${a}`}const w=r===me.Left?-1:1,_=c===me.Left?-1:1;return`M ${t},${i} C ${t+w*p},${i} ${s+_*p},${a} ${s},${a}`}function $O(t){const i=t.data,s=i?.diffStatus==="added"?"#15803d":i?.diffStatus==="removed"?"#b91c1c":i?.diffStatus==="changed"?"#b45309":void 0,a=i?.active?"#111827":s??"#64748b",r=i?.fieldFlow,c=!!(i?.selectedFieldName&&(r?.sharedFieldNames.includes(i.selectedFieldName)||r?.derivedFieldNames.includes(i.selectedFieldName))),u=(t.sourceX+t.targetX)/2,h=(t.sourceY+t.targetY)/2;return M.jsxs(M.Fragment,{children:[M.jsx(Mo,{path:HO(t),markerEnd:t.markerEnd,style:{...t.style,stroke:a,strokeDasharray:i?.diffStatus==="removed"?"7 5":void 0,strokeWidth:i?.diffStatus&&i.diffStatus!=="unchanged"?2.4:void 0},className:i?.active?"edge-path-active":"edge-path"}),r&&r.visibleFieldNames.length>0&&(i?.active||c)?M.jsx(hM,{children:M.jsxs("div",{className:`edge-field-label nodrag nopan ${i?.active?"active":""} ${c?"field-selected":""}`,style:{transform:`translate(-50%, -50%) translate(${u}px, ${h}px)`},children:[r.visibleFieldNames.map(m=>M.jsx("button",{type:"button",onClick:()=>i?.onSelectField?.(m),children:m},m)),r.remainingCount>0?M.jsxs("span",{children:["+",r.remainingCount]}):null]})}):null]})}const UO={eventModelEdge:$O};function mc({label:t,description:i,value:s,copiedKey:a,onCopy:r}){return M.jsx("button",{type:"button",className:"copy-action",onClick:()=>r(a,s),children:M.jsxs("span",{children:[M.jsx("strong",{children:t}),M.jsx("small",{children:i})]})})}function Ch(t){return t==="query-screen"||t==="screen-command"||t==="command-event"||t==="event-query"}function qO(t){return JSON.stringify(t).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function VO(t){return(t.graphSidecar?.model?.name??t.graphSidecar?.model?.id??"event-model").toLowerCase().replace(/[^a-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"")||"event-model"}async function Av(t){const i=await fetch(t);if(!i.ok)throw new Error(`Failed to fetch ${t}: ${i.status}`);return i.text()}async function YO(t,i,s){const a=Array.from(document.querySelectorAll('script[type="module"][src]')).map(g=>new URL(g.src,window.location.href)).filter(g=>!g.pathname.includes("/@vite/")&&!g.pathname.endsWith("/@react-refresh"));if(a.length===0||a.some(g=>g.pathname.includes("/src/")||g.pathname.endsWith(".tsx")))throw new Error("Standalone export requires a built emviz app. Run the packaged CLI or `pnpm --filter @emviz/app build` and open the built app.");const r=Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).map(g=>new URL(g.href,window.location.href)),c=await Promise.all(r.map(g=>Av(g.href))),u=Array.from(document.querySelectorAll("style")).map(g=>g.textContent??"").filter(Boolean),h=await Promise.all(a.map(g=>Av(g.href))),m={project:t,report:i,diff:s,exportedAt:new Date().toISOString()};return["<!doctype html>",'<html lang="en">'," <head>",' <meta charset="UTF-8" />',' <meta name="viewport" content="width=device-width, initial-scale=1.0" />',` <title>emviz - ${t.graphSidecar?.model?.name??"export"}</title>`,` <style>${[...c,...u].join(`
154
-
155
- `)}</style>`," </head>"," <body>",' <div id="root"></div>',` <script>window.__EMVIZ_EXPORT__ = ${qO(m)};<\/script>`,` <script type="module">${h.join(`
156
-
157
- `)}<\/script>`," </body>","</html>"].join(`
158
- `)}function GO({diff:t,filter:i,onFilter:s,onSelect:a}){const r=Object.entries(t.nodeStatus).filter(([,c])=>c!=="unchanged").slice(0,80);return M.jsxs("aside",{className:"panel diff-panel",children:[M.jsx("h2",{children:"Diff"}),M.jsxs("div",{className:"diff-range",children:[M.jsx("code",{children:t.base.label}),M.jsx("span",{children:"to"}),M.jsx("code",{children:t.target.label})]}),M.jsxs("div",{className:"diff-counts",children:[M.jsxs("button",{type:"button",className:i==="added"?"active added":"added",onClick:()=>s(i==="added"?"all":"added"),children:[M.jsx("strong",{children:t.summary.nodes.added}),M.jsx("span",{children:"Added"})]}),M.jsxs("button",{type:"button",className:i==="removed"?"active removed":"removed",onClick:()=>s(i==="removed"?"all":"removed"),children:[M.jsx("strong",{children:t.summary.nodes.removed}),M.jsx("span",{children:"Removed"})]}),M.jsxs("button",{type:"button",className:i==="changed"?"active changed":"changed",onClick:()=>s(i==="changed"?"all":"changed"),children:[M.jsx("strong",{children:t.summary.nodes.changed}),M.jsx("span",{children:"Changed"})]})]}),i!=="all"?M.jsx("button",{type:"button",className:"clear-diff-filter",onClick:()=>s("all"),children:"Show full graph"}):null,M.jsx("h3",{children:"Changed Nodes"}),M.jsx("div",{className:"diff-list",children:r.length===0?M.jsx("p",{className:"muted",children:"No node changes."}):r.map(([c,u])=>M.jsxs("button",{type:"button",className:`diff-list-item ${u}`,onClick:()=>a(c),children:[M.jsx("span",{children:c}),M.jsx("strong",{children:u})]},c))})]})}function XO(t,i){const s=URL.createObjectURL(new Blob([i],{type:"text/html;charset=utf-8"})),a=document.createElement("a");a.href=s,a.download=t,a.click(),URL.revokeObjectURL(s)}async function KO(t){return await Promise.all(Array.from(t).filter(s=>/\.(ya?ml|json)$/i.test(s.name)).map(async s=>({path:s.webkitRelativePath||s.name,content:await s.text()})))}function ZO(t){const i=t.find(s=>s.path===".event-modeling/graph.json"||s.path.endsWith("/.event-modeling/graph.json"));if(i)try{return JSON.parse(i.content)}catch{return}}function IO(t){return t.type==="story"?{name:t.label}:t.type==="slice"?{slice:t.label}:t.type==="screen"||t.type==="processor"?{slice:t.sliceTitle??t.label}:t.type==="command"||t.type==="query"?{slice:t.sliceTitle??"",name:t.sourceName??t.label}:{name:t.sourceName??t.label}}function QO(t){const i=t.graphSidecar?.nodes;return i?Object.entries(i).flatMap(([s,a])=>{const r=a,c=t.nodes.filter(u=>{if(r.type==="screen"&&u.type!=="screen"&&u.type!=="processor"||r.type!=="screen"&&r.type!==u.type)return!1;const h=IO(u);return Object.entries(r.selector??{}).every(([m,g])=>h[m]===g)});return c.length===0?[{id:`V1:.event-modeling/graph.json:${s}`,severity:"warning",check:"V1",message:`graph.json node "${s}" selector does not resolve.`,path:".event-modeling/graph.json",nodeId:s}]:c.length>1?[{id:`V2:.event-modeling/graph.json:${s}`,severity:"warning",check:"V2",message:`graph.json node "${s}" selector resolves to ${c.length} nodes.`,path:".event-modeling/graph.json",nodeId:s}]:[]}):[]}function Tv({edge:t,flow:i,selectedNode:s,peer:a}){if(!i||!a)return[];const c=t.target===s.id?a:s;return[...i.sharedFieldNames.map(u=>({fieldName:u,source:`${c.label}.${u}`,kind:"field"})),...i.derivedFieldNames.map(u=>({fieldName:u,source:c.type==="event"?`${c.label} occurred`:c.label,kind:"event"}))]}function JO({onImport:t,error:i}){return M.jsx("div",{className:"import-panel",children:M.jsxs("div",{className:"import-card",children:[M.jsx("h1",{children:"emviz"}),M.jsx("p",{children:"Import an Event Modeling project folder or select YAML/JSON files to visualize the model."}),M.jsxs("div",{className:"import-actions",children:[M.jsxs("label",{children:["Import folder",M.jsx("input",{type:"file",multiple:!0,webkitdirectory:"",directory:"",onChange:s=>s.currentTarget.files&&t(s.currentTarget.files)})]}),M.jsxs("label",{children:["Import files",M.jsx("input",{type:"file",multiple:!0,accept:".yaml,.yml,.json",onChange:s=>s.currentTarget.files&&t(s.currentTarget.files)})]})]}),i?M.jsx("p",{className:"import-error",children:i}):null]})})}function FO({project:t,selectedNode:i,findings:s,fieldFlows:a,selectedFieldName:r,onSelect:c,onSelectField:u,onClearField:h,onPreviewConnection:m,onClearPreview:g}){const[v,p]=J.useState(),y=J.useCallback((D,R)=>{navigator.clipboard?.writeText(R).then(()=>{p(D),window.setTimeout(()=>p(j=>j===D?void 0:j),1400)})},[]);if(!i)return M.jsxs("aside",{className:"panel panel-right",children:[M.jsx("h2",{children:"Selection"}),M.jsx("p",{className:"muted",children:"Select a node to inspect source and connections."})]});const w=t.edges.filter(D=>D.target===i.id&&Ch(D.kind)),_=t.edges.filter(D=>D.source===i.id&&Ch(D.kind)),E=yb(i.fields),N=new Map(t.nodes.map(D=>[D.id,D])),C=`em://${t.graphSidecar?.model?.id??"event_model"}/${i.id}`,x=i.raw??i.fields??i.description??i.label,T=[`Reference: ${C}`,`Node: ${i.label} (${i.type})`,`Source: ${i.sourcePath??"unknown"}`,"","Incoming:",...w.length===0?["- none"]:w.map(D=>`- ${N.get(D.source)?.label??D.source} -> ${i.label}`),"","Outgoing:",..._.length===0?["- none"]:_.map(D=>`- ${i.label} -> ${N.get(D.target)?.label??D.target}`),"","Source excerpt:",x].join(`
159
- `),L=`Please update this event model node.
160
-
161
- Reference:
162
- ${C}
163
-
164
- Source path:
165
- ${i.sourcePath??"unknown"}
166
-
167
- Current context:
168
- ${x}
169
-
170
- Goal:
171
- `;return M.jsxs("aside",{className:"panel panel-right",children:[M.jsxs("div",{className:"panel-heading",children:[M.jsx("h2",{children:i.label}),M.jsx("button",{type:"button",className:"icon-button",onClick:()=>c(i.id),"aria-label":"Focus selected node",title:"Focus selected node",children:M.jsx("span",{className:"target-icon","aria-hidden":"true"})})]}),M.jsxs("div",{className:"meta-row",children:[M.jsx("span",{children:"Type"}),M.jsx("strong",{children:i.type})]}),M.jsxs("div",{className:"meta-row",children:[M.jsx("span",{children:"Reference"}),M.jsx("code",{children:C})]}),i.sourcePath?M.jsxs("div",{className:"meta-row",children:[M.jsx("span",{children:"Source"}),M.jsx("code",{children:i.sourcePath})]}):null,M.jsxs("details",{className:"copy-section",children:[M.jsxs("summary",{children:[M.jsx("span",{children:"Copy for LLM"}),v?M.jsxs("strong",{className:"copy-feedback","aria-live":"polite",children:["Copied ",v]}):null]}),M.jsxs("div",{className:"copy-actions",children:[M.jsx(mc,{label:"Reference",description:"Stable em:// node handle",value:C,copiedKey:"reference",onCopy:y}),M.jsx(mc,{label:"YAML",description:"Source excerpt for this node",value:x,copiedKey:"YAML",onCopy:y}),M.jsx(mc,{label:"Context",description:"Reference plus incoming/outgoing links",value:T,copiedKey:"context",onCopy:y}),M.jsx(mc,{label:"Edit prompt",description:"Prompt scaffold for asking an LLM to edit",value:L,copiedKey:"prompt",onCopy:y})]})]}),M.jsx("h3",{children:"Connections"}),M.jsxs("div",{className:"connection-list",children:[M.jsx("strong",{children:"Incoming"}),w.length===0?M.jsx("p",{className:"muted",children:"None"}):w.map(D=>{const R=N.get(D.source),j=Tv({edge:D,flow:a.get(D.id),selectedNode:i,peer:R});return M.jsxs("button",{type:"button",className:"connection-button",onClick:()=>c(D.source),onMouseEnter:()=>m(D.id),onMouseLeave:g,onFocus:()=>m(D.id),onBlur:g,children:[M.jsx("span",{children:R?.label??D.source}),j.length>0?M.jsx("span",{className:"provenance-rows",children:j.map(q=>M.jsxs("span",{className:r===q.fieldName?"selected":"",children:[M.jsx("b",{children:q.fieldName}),M.jsx("span",{"aria-hidden":"true",children:"←"}),M.jsx("em",{children:q.source})]},`${D.id}-${q.fieldName}-${q.source}`))}):null]},D.id)}),M.jsx("strong",{children:"Outgoing"}),_.length===0?M.jsx("p",{className:"muted",children:"None"}):_.map(D=>{const R=N.get(D.target),j=Tv({edge:D,flow:a.get(D.id),selectedNode:i,peer:R});return M.jsxs("button",{type:"button",className:"connection-button",onClick:()=>c(D.target),onMouseEnter:()=>m(D.id),onMouseLeave:g,onFocus:()=>m(D.id),onBlur:g,children:[M.jsx("span",{children:R?.label??D.target}),j.length>0?M.jsx("span",{className:"provenance-rows",children:j.map(q=>M.jsxs("span",{className:r===q.fieldName?"selected":"",children:[M.jsx("b",{children:q.fieldName}),M.jsx("span",{"aria-hidden":"true",children:"←"}),M.jsx("em",{children:q.source})]},`${D.id}-${q.fieldName}-${q.source}`))}):null]},D.id)})]}),i.type==="command"||i.type==="event"||i.type==="query"?M.jsxs(M.Fragment,{children:[M.jsx("h3",{children:"Fields"}),M.jsxs("div",{className:"field-panel",children:[E.length===0?M.jsx("p",{className:"field-empty",children:"No fields documented."}):M.jsx("div",{className:"field-list",children:E.map(D=>M.jsx("button",{type:"button",className:r===D?"selected":"",onClick:()=>u(D),children:D},D))}),r?M.jsx("button",{type:"button",className:"clear-field",onClick:h,children:"Clear field focus"}):null]})]}):null,M.jsx("h3",{children:"Findings"}),s.length===0?M.jsx("p",{className:"muted",children:"No findings for this node."}):s.map(D=>M.jsxs("div",{className:`finding finding-${D.severity}`,children:[M.jsx("strong",{children:D.check}),M.jsx("span",{children:D.message})]},D.id)),M.jsx("h3",{children:"Source"}),M.jsx("pre",{children:x})]})}function WO({report:t,onSelect:i,open:s,onOpen:a,onClose:r}){const c=t?.errors??0,u=t?.warnings??0,h=c+u;return M.jsxs(M.Fragment,{children:[M.jsxs("button",{type:"button",className:`validation-fab ${c>0?"has-errors":u>0?"has-warnings":""}`,onClick:a,"aria-expanded":s,"aria-controls":"validation-panel",title:"Open validation",children:[M.jsx("span",{"aria-hidden":"true",children:"!"}),h>0?M.jsx("strong",{"aria-label":`${h} validation findings`,children:h}):null]}),s?M.jsxs("aside",{className:"panel validation-drawer",id:"validation-panel",children:[M.jsxs("div",{className:"panel-heading",children:[M.jsx("h2",{children:"Validation"}),M.jsx("button",{type:"button",className:"panel-close",onClick:r,"aria-label":"Close validation",children:"Close"})]}),t?M.jsxs(M.Fragment,{children:[M.jsxs("div",{className:"status-row",children:[M.jsxs("span",{className:"status error",children:[t.errors," errors"]}),M.jsxs("span",{className:"status warning",children:[t.warnings," warnings"]})]}),M.jsx("div",{className:"findings-list",children:t.findings.length===0?M.jsx("p",{className:"muted",children:"No validation findings."}):t.findings.map(m=>M.jsxs("div",{className:`finding finding-${m.severity}`,children:[M.jsxs("div",{className:"finding-header",children:[M.jsx("strong",{children:m.check}),m.nodeId?M.jsx("button",{type:"button",onClick:()=>i(m.nodeId),children:"Focus"}):null]}),M.jsx("span",{children:m.message}),m.path?M.jsx("code",{children:m.path}):null]},m.id))})]}):M.jsx("p",{className:"muted",children:"Loading validation..."})]}):null]})}function PO(){const[t,i]=J.useState(),[s,a]=J.useState(),[r,c]=J.useState(),[u,h]=J.useState("all"),[m,g]=J.useState("loading"),[v,p]=J.useState(),[y,w]=J.useState(!1),[_,E]=J.useState("idle"),[N,S]=J.useState(),[C,x]=J.useState(),[T,L]=J.useState([]),[D,R]=J.useState([]),[j,q]=J.useState(""),[le,X]=J.useState(),[I,ae]=J.useState(),[k,Y]=J.useState(!1),{setCenter:O,fitView:B}=Jc();J.useEffect(()=>{if(window.__EMVIZ_EXPORT__?.project){i(window.__EMVIZ_EXPORT__.project),a(window.__EMVIZ_EXPORT__.report),c(window.__EMVIZ_EXPORT__.diff),g("ready"),window.setTimeout(()=>{B({padding:.18,duration:300})},50);return}Promise.all([fetch("/api/model").then(re=>re.json()),fetch("/api/validation").then(re=>re.ok?re.json():void 0).catch(()=>{}),fetch("/api/diff").then(re=>re.ok?re.json():void 0).catch(()=>{})]).then(([re,fe,ye])=>{i(re),a(fe),c(ye),g("ready"),window.setTimeout(()=>{B({padding:.18,duration:300})},50)}).catch(()=>{g("import")})},[B]);const G=J.useMemo(()=>t?.nodes.find(re=>re.id===C),[t,C]),K=J.useMemo(()=>s?.findings.filter(re=>re.nodeId===C)??[],[s,C]),ne=J.useMemo(()=>t?YM(t):new Map,[t]),z=J.useMemo(()=>{if(le)return new Set([le]);const re=GM(ne,I);if(re)return re;if(!t||!C)return;const fe=new Set;for(const ye of t.edges)Ch(ye.kind)&&(ye.source===C||ye.target===C)&&fe.add(ye.id);return fe},[ne,le,t,I,C]),$=J.useMemo(()=>t?lC(t,C,{focusedEdgeIds:z,edgeFieldFlows:ne,selectedFieldName:I,onSelectField:ae,diffNodeStatus:r?.nodeStatus,diffEdgeStatus:r?.edgeStatus,diffFilter:u}):{nodes:[],edges:[]},[r?.edgeStatus,r?.nodeStatus,u,ne,z,t,I,C]),P=J.useMemo(()=>{if(!t||j.trim().length<2)return[];const re=j.trim().toLowerCase();return t.nodes.filter(fe=>`${fe.label} ${fe.type} ${fe.sourcePath??""}`.toLowerCase().includes(re)).slice(0,8)},[t,j]),ee=J.useCallback((re,fe=!0)=>{const ye=$.nodes.find(xe=>xe.id===re);X(void 0),fe&&C&&C!==re&&(L(xe=>[...xe,C]),R([])),x(re),ye&&O(ye.position.x+80,ye.position.y+60,{zoom:1.2,duration:350})},[$.nodes,C,O]),ce=J.useCallback(()=>{x(void 0),X(void 0),ae(void 0)},[]),he=J.useCallback(re=>{const fe=t?.edges.find(xe=>xe.id===re);if(!fe)return;X(re);const ye=$.nodes.filter(xe=>xe.id===fe.source||xe.id===fe.target);ye.length>0&&B({nodes:ye,padding:.36,duration:260,maxZoom:1.25})},[B,$.nodes,t?.edges]),ue=J.useCallback(()=>{X(void 0)},[]),te=J.useCallback(()=>{t&&(E("exporting"),S(void 0),w(!1),YO(t,s,r).then(re=>{XO(`${VO(t)}.emviz.html`,re)}).catch(re=>{S(re instanceof Error?re.message:String(re))}).finally(()=>E("idle")))},[r,t,s]);J.useEffect(()=>{const re=fe=>{fe.key==="Escape"&&(w(!1),ce())};return window.addEventListener("keydown",re),()=>window.removeEventListener("keydown",re)},[ce]);const de=J.useCallback(()=>{const re=T.at(-1);re&&(L(fe=>fe.slice(0,-1)),C&&R(fe=>[...fe,C]),ee(re,!1))},[T,ee,C]),we=J.useCallback(()=>{const re=D.at(-1);re&&(R(fe=>fe.slice(0,-1)),C&&L(fe=>[...fe,C]),ee(re,!1))},[ee,D,C]),Se=J.useCallback(re=>{KO(re).then(fe=>{const ye=TO(fe),xe=ye;xe.graphSidecar=ZO(fe)??{model:{id:"browser_import",name:"Browser Import"}},i(xe);const ke=jO(ye),ut=QO(xe);a({errors:ke.errors,warnings:ke.warnings+ut.filter(Nt=>Nt.severity==="warning").length,findings:[...ke.findings,...ut]}),c(void 0),h("all"),x(void 0),X(void 0),ae(void 0),L([]),R([]),g("ready"),p(void 0),window.setTimeout(()=>{B({padding:.18,duration:300})},50)}).catch(fe=>{p(fe instanceof Error?fe.message:String(fe)),g("import")})},[B]);return m==="import"?M.jsx(JO,{onImport:Se,error:v}):t?M.jsxs("div",{className:`app-shell ${r?"diff-mode":""}`,children:[M.jsxs("header",{className:"toolbar",children:[M.jsxs("div",{className:"model-summary",children:[M.jsx("strong",{children:"emviz"}),M.jsxs("span",{children:[t.stories.length," stories"]}),M.jsxs("span",{children:[t.slices.length," slices"]}),M.jsxs("span",{children:[t.nodes.filter(re=>re.type==="event").length," events"]})]}),M.jsxs("div",{className:"segmented toolbar-history","aria-label":"Selection history",children:[M.jsx("button",{type:"button",disabled:T.length===0,onClick:de,"aria-label":"Back",title:"Back",children:"←"}),M.jsx("button",{type:"button",disabled:D.length===0,onClick:we,"aria-label":"Forward",title:"Forward",children:"→"})]}),M.jsxs("div",{className:"search-box",children:[M.jsx("input",{"aria-label":"Search event model",value:j,onChange:re=>q(re.target.value),placeholder:"Search nodes by name or type..."}),P.length>0?M.jsx("div",{className:"search-results",children:P.map(re=>M.jsxs("button",{type:"button",onClick:()=>{ee(re.id),q("")},children:[M.jsx("span",{children:re.label}),M.jsx("small",{children:re.type})]},re.id))}):null]}),M.jsxs("div",{className:"toolbar-menu",children:[M.jsx("button",{type:"button",className:"menu-trigger",onClick:()=>w(re=>!re),"aria-haspopup":"menu","aria-expanded":y,"aria-label":"Open menu",title:"Open menu",children:"..."}),y?M.jsx("div",{className:"menu-popover",role:"menu",children:M.jsx("button",{type:"button",role:"menuitem",onClick:te,disabled:_==="exporting",children:_==="exporting"?"Exporting...":"Export"})}):null]}),N?M.jsx("div",{className:"toolbar-error",role:"alert",children:N}):null]}),M.jsx(WO,{report:s,onSelect:ee,open:k,onOpen:()=>Y(!0),onClose:()=>Y(!1)}),r?M.jsx(GO,{diff:r,filter:u,onFilter:h,onSelect:ee}):null,M.jsx(FO,{project:t,selectedNode:G,findings:K,fieldFlows:ne,selectedFieldName:I,onSelect:ee,onSelectField:ae,onClearField:()=>ae(void 0),onPreviewConnection:he,onClearPreview:ue}),M.jsx("main",{className:"canvas",children:M.jsxs(fM,{nodes:$.nodes,edges:$.edges,nodeTypes:BO,edgeTypes:UO,onNodeClick:(re,fe)=>ee(fe.id),fitView:!0,minZoom:.2,maxZoom:1.8,nodesDraggable:!1,colorMode:"light",children:[M.jsx(vM,{gap:18,size:1}),M.jsx(NM,{})]})})]}):M.jsx("div",{className:"loading",children:"Loading event model..."})}function e3(){return M.jsx(db,{children:M.jsx(PO,{})})}zx.createRoot(document.getElementById("root")).render(M.jsx(Cv.StrictMode,{children:M.jsx(e3,{})}));