@xand0dev/traceflow 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +58 -2
- package/dist/cli.js +41264 -0
- package/dist/parser.py +825 -0
- package/dist/web/app.css +1 -0
- package/dist/web/app.js +76 -0
- package/dist/web/index.html +14 -0
- package/package.json +64 -4
package/dist/web/app.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var Oy=Object.create;var Cd=Object.defineProperty;var Ry=Object.getOwnPropertyDescriptor;var Ly=Object.getOwnPropertyNames;var $y=Object.getPrototypeOf,Fy=Object.prototype.hasOwnProperty;var Qe=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}};var Hy=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ly(t))!Fy.call(e,o)&&o!==n&&Cd(e,o,{get:()=>t[o],enumerable:!(r=Ry(t,o))||r.enumerable});return e};var at=(e,t,n)=>(n=e!=null?Oy($y(e)):{},Hy(t||!e||!e.__esModule?Cd(n,"default",{value:e,enumerable:!0}):n,e));var $d=Qe(Z=>{"use strict";var So=Symbol.for("react.element"),By=Symbol.for("react.portal"),Vy=Symbol.for("react.fragment"),Uy=Symbol.for("react.strict_mode"),jy=Symbol.for("react.profiler"),Wy=Symbol.for("react.provider"),Yy=Symbol.for("react.context"),Xy=Symbol.for("react.forward_ref"),Ky=Symbol.for("react.suspense"),Zy=Symbol.for("react.memo"),Qy=Symbol.for("react.lazy"),Md=Symbol.iterator;function Gy(e){return e===null||typeof e!="object"?null:(e=Md&&e[Md]||e["@@iterator"],typeof e=="function"?e:null)}var Pd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Td=Object.assign,Id={};function kr(e,t,n){this.props=e,this.context=t,this.refs=Id,this.updater=n||Pd}kr.prototype.isReactComponent={};kr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};kr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dd(){}Dd.prototype=kr.prototype;function Ys(e,t,n){this.props=e,this.context=t,this.refs=Id,this.updater=n||Pd}var Xs=Ys.prototype=new Dd;Xs.constructor=Ys;Td(Xs,kr.prototype);Xs.isPureReactComponent=!0;var bd=Array.isArray,Ad=Object.prototype.hasOwnProperty,Ks={current:null},Od={key:!0,ref:!0,__self:!0,__source:!0};function Rd(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Ad.call(t,r)&&!Od.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var a=Array(s),u=0;u<s;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return{$$typeof:So,type:e,key:i,ref:l,props:o,_owner:Ks.current}}function qy(e,t){return{$$typeof:So,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zs(e){return typeof e=="object"&&e!==null&&e.$$typeof===So}function Jy(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var zd=/\/+/g;function Ws(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Jy(""+e.key):t.toString(36)}function Oi(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case So:case By:l=!0}}if(l)return l=e,o=o(l),e=r===""?"."+Ws(l,0):r,bd(o)?(n="",e!=null&&(n=e.replace(zd,"$&/")+"/"),Oi(o,t,n,"",function(u){return u})):o!=null&&(Zs(o)&&(o=qy(o,n+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(zd,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=r===""?".":r+":",bd(e))for(var s=0;s<e.length;s++){i=e[s];var a=r+Ws(i,s);l+=Oi(i,t,n,a,o)}else if(a=Gy(e),typeof a=="function")for(e=a.call(e),s=0;!(i=e.next()).done;)i=i.value,a=r+Ws(i,s++),l+=Oi(i,t,n,a,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Ai(e,t,n){if(e==null)return e;var r=[],o=0;return Oi(e,r,"","",function(i){return t.call(n,i,o++)}),r}function ev(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Le={current:null},Ri={transition:null},tv={ReactCurrentDispatcher:Le,ReactCurrentBatchConfig:Ri,ReactCurrentOwner:Ks};function Ld(){throw Error("act(...) is not supported in production builds of React.")}Z.Children={map:Ai,forEach:function(e,t,n){Ai(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ai(e,function(){t++}),t},toArray:function(e){return Ai(e,function(t){return t})||[]},only:function(e){if(!Zs(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Z.Component=kr;Z.Fragment=Vy;Z.Profiler=jy;Z.PureComponent=Ys;Z.StrictMode=Uy;Z.Suspense=Ky;Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tv;Z.act=Ld;Z.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Td({},e.props),o=e.key,i=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,l=Ks.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)Ad.call(t,a)&&!Od.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&s!==void 0?s[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){s=Array(a);for(var u=0;u<a;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:So,type:e.type,key:o,ref:i,props:r,_owner:l}};Z.createContext=function(e){return e={$$typeof:Yy,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Wy,_context:e},e.Consumer=e};Z.createElement=Rd;Z.createFactory=function(e){var t=Rd.bind(null,e);return t.type=e,t};Z.createRef=function(){return{current:null}};Z.forwardRef=function(e){return{$$typeof:Xy,render:e}};Z.isValidElement=Zs;Z.lazy=function(e){return{$$typeof:Qy,_payload:{_status:-1,_result:e},_init:ev}};Z.memo=function(e,t){return{$$typeof:Zy,type:e,compare:t===void 0?null:t}};Z.startTransition=function(e){var t=Ri.transition;Ri.transition={};try{e()}finally{Ri.transition=t}};Z.unstable_act=Ld;Z.useCallback=function(e,t){return Le.current.useCallback(e,t)};Z.useContext=function(e){return Le.current.useContext(e)};Z.useDebugValue=function(){};Z.useDeferredValue=function(e){return Le.current.useDeferredValue(e)};Z.useEffect=function(e,t){return Le.current.useEffect(e,t)};Z.useId=function(){return Le.current.useId()};Z.useImperativeHandle=function(e,t,n){return Le.current.useImperativeHandle(e,t,n)};Z.useInsertionEffect=function(e,t){return Le.current.useInsertionEffect(e,t)};Z.useLayoutEffect=function(e,t){return Le.current.useLayoutEffect(e,t)};Z.useMemo=function(e,t){return Le.current.useMemo(e,t)};Z.useReducer=function(e,t,n){return Le.current.useReducer(e,t,n)};Z.useRef=function(e){return Le.current.useRef(e)};Z.useState=function(e){return Le.current.useState(e)};Z.useSyncExternalStore=function(e,t,n){return Le.current.useSyncExternalStore(e,t,n)};Z.useTransition=function(){return Le.current.useTransition()};Z.version="18.3.1"});var xt=Qe((Sk,Fd)=>{"use strict";Fd.exports=$d()});var Zd=Qe(re=>{"use strict";function Js(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<Li(o,t))e[r]=t,e[n]=o,n=r;else break e}}function _t(e){return e.length===0?null:e[0]}function Fi(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var l=2*(r+1)-1,s=e[l],a=l+1,u=e[a];if(0>Li(s,n))a<o&&0>Li(u,s)?(e[r]=u,e[a]=n,r=a):(e[r]=s,e[l]=n,r=l);else if(a<o&&0>Li(u,n))e[r]=u,e[a]=n,r=a;else break e}}return t}function Li(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Hd=performance,re.unstable_now=function(){return Hd.now()}):(Qs=Date,Bd=Qs.now(),re.unstable_now=function(){return Qs.now()-Bd});var Hd,Qs,Bd,At=[],un=[],nv=1,ut=null,Ie=3,Hi=!1,Wn=!1,ko=!1,jd=typeof setTimeout=="function"?setTimeout:null,Wd=typeof clearTimeout=="function"?clearTimeout:null,Vd=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ea(e){for(var t=_t(un);t!==null;){if(t.callback===null)Fi(un);else if(t.startTime<=e)Fi(un),t.sortIndex=t.expirationTime,Js(At,t);else break;t=_t(un)}}function ta(e){if(ko=!1,ea(e),!Wn)if(_t(At)!==null)Wn=!0,ra(na);else{var t=_t(un);t!==null&&oa(ta,t.startTime-e)}}function na(e,t){Wn=!1,ko&&(ko=!1,Wd(No),No=-1),Hi=!0;var n=Ie;try{for(ea(t),ut=_t(At);ut!==null&&(!(ut.expirationTime>t)||e&&!Kd());){var r=ut.callback;if(typeof r=="function"){ut.callback=null,Ie=ut.priorityLevel;var o=r(ut.expirationTime<=t);t=re.unstable_now(),typeof o=="function"?ut.callback=o:ut===_t(At)&&Fi(At),ea(t)}else Fi(At);ut=_t(At)}if(ut!==null)var i=!0;else{var l=_t(un);l!==null&&oa(ta,l.startTime-t),i=!1}return i}finally{ut=null,Ie=n,Hi=!1}}var Bi=!1,$i=null,No=-1,Yd=5,Xd=-1;function Kd(){return!(re.unstable_now()-Xd<Yd)}function Gs(){if($i!==null){var e=re.unstable_now();Xd=e;var t=!0;try{t=$i(!0,e)}finally{t?Eo():(Bi=!1,$i=null)}}else Bi=!1}var Eo;typeof Vd=="function"?Eo=function(){Vd(Gs)}:typeof MessageChannel<"u"?(qs=new MessageChannel,Ud=qs.port2,qs.port1.onmessage=Gs,Eo=function(){Ud.postMessage(null)}):Eo=function(){jd(Gs,0)};var qs,Ud;function ra(e){$i=e,Bi||(Bi=!0,Eo())}function oa(e,t){No=jd(function(){e(re.unstable_now())},t)}re.unstable_IdlePriority=5;re.unstable_ImmediatePriority=1;re.unstable_LowPriority=4;re.unstable_NormalPriority=3;re.unstable_Profiling=null;re.unstable_UserBlockingPriority=2;re.unstable_cancelCallback=function(e){e.callback=null};re.unstable_continueExecution=function(){Wn||Hi||(Wn=!0,ra(na))};re.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Yd=0<e?Math.floor(1e3/e):5};re.unstable_getCurrentPriorityLevel=function(){return Ie};re.unstable_getFirstCallbackNode=function(){return _t(At)};re.unstable_next=function(e){switch(Ie){case 1:case 2:case 3:var t=3;break;default:t=Ie}var n=Ie;Ie=t;try{return e()}finally{Ie=n}};re.unstable_pauseExecution=function(){};re.unstable_requestPaint=function(){};re.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ie;Ie=e;try{return t()}finally{Ie=n}};re.unstable_scheduleCallback=function(e,t,n){var r=re.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:nv++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Js(un,e),_t(At)===null&&e===_t(un)&&(ko?(Wd(No),No=-1):ko=!0,oa(ta,n-r))):(e.sortIndex=o,Js(At,e),Wn||Hi||(Wn=!0,ra(na))),e};re.unstable_shouldYield=Kd;re.unstable_wrapCallback=function(e){var t=Ie;return function(){var n=Ie;Ie=t;try{return e.apply(this,arguments)}finally{Ie=n}}}});var Gd=Qe((kk,Qd)=>{"use strict";Qd.exports=Zd()});var nm=Qe(nt=>{"use strict";var rv=xt(),et=Gd();function O(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var ip=new Set,Xo={};function or(e,t){Wr(e,t),Wr(e+"Capture",t)}function Wr(e,t){for(Xo[e]=t,e=0;e<t.length;e++)ip.add(t[e])}var qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ma=Object.prototype.hasOwnProperty,ov=/^[: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]*$/,qd={},Jd={};function iv(e){return Ma.call(Jd,e)?!0:Ma.call(qd,e)?!1:ov.test(e)?Jd[e]=!0:(qd[e]=!0,!1)}function lv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function sv(e,t,n,r){if(t===null||typeof t>"u"||lv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function He(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new He(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new He(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Pe[e]=new He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var wu=/[\-:]([a-z])/g;function xu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(wu,xu);Pe[t]=new He(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(wu,xu);Pe[t]=new He(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(wu,xu);Pe[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function _u(e,t,n,r){var o=Pe.hasOwnProperty(t)?Pe[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(sv(t,n,o,r)&&(n=null),r||o===null?iv(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var nn=rv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vi=Symbol.for("react.element"),Mr=Symbol.for("react.portal"),br=Symbol.for("react.fragment"),Su=Symbol.for("react.strict_mode"),ba=Symbol.for("react.profiler"),lp=Symbol.for("react.provider"),sp=Symbol.for("react.context"),Eu=Symbol.for("react.forward_ref"),za=Symbol.for("react.suspense"),Pa=Symbol.for("react.suspense_list"),ku=Symbol.for("react.memo"),dn=Symbol.for("react.lazy"),ap=Symbol.for("react.offscreen"),ef=Symbol.iterator;function Co(e){return e===null||typeof e!="object"?null:(e=ef&&e[ef]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Object.assign,ia;function Ao(e){if(ia===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ia=t&&t[1]||""}return`
|
|
2
|
+
`+ia+e}var la=!1;function sa(e,t){if(!e||la)return"";la=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
3
|
+
`),i=r.stack.split(`
|
|
4
|
+
`),l=o.length-1,s=i.length-1;1<=l&&0<=s&&o[l]!==i[s];)s--;for(;1<=l&&0<=s;l--,s--)if(o[l]!==i[s]){if(l!==1||s!==1)do if(l--,s--,0>s||o[l]!==i[s]){var a=`
|
|
5
|
+
`+o[l].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{la=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ao(e):""}function av(e){switch(e.tag){case 5:return Ao(e.type);case 16:return Ao("Lazy");case 13:return Ao("Suspense");case 19:return Ao("SuspenseList");case 0:case 2:case 15:return e=sa(e.type,!1),e;case 11:return e=sa(e.type.render,!1),e;case 1:return e=sa(e.type,!0),e;default:return""}}function Ta(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case br:return"Fragment";case Mr:return"Portal";case ba:return"Profiler";case Su:return"StrictMode";case za:return"Suspense";case Pa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case sp:return(e.displayName||"Context")+".Consumer";case lp:return(e._context.displayName||"Context")+".Provider";case Eu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ku:return t=e.displayName||null,t!==null?t:Ta(e.type)||"Memo";case dn:t=e._payload,e=e._init;try{return Ta(e(t))}catch{}}return null}function uv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ta(t);case 8:return t===Su?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Nn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function up(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cv(e){var t=up(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ui(e){e._valueTracker||(e._valueTracker=cv(e))}function cp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=up(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ia(e,t){var n=t.checked;return pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function tf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Nn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dp(e,t){t=t.checked,t!=null&&_u(e,"checked",t,!1)}function Da(e,t){dp(e,t);var n=Nn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Aa(e,t.type,n):t.hasOwnProperty("defaultValue")&&Aa(e,t.type,Nn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function nf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Aa(e,t,n){(t!=="number"||yl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Oo=Array.isArray;function Fr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Nn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Oa(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function rf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(O(92));if(Oo(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Nn(n)}}function fp(e,t){var n=Nn(t.value),r=Nn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function of(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function pp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ra(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?pp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ji,hp=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ji=ji||document.createElement("div"),ji.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ji.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ko(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $o={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dv=["Webkit","ms","Moz","O"];Object.keys($o).forEach(function(e){dv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),$o[t]=$o[e]})});function mp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||$o.hasOwnProperty(e)&&$o[e]?(""+t).trim():t+"px"}function gp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=mp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var fv=pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function La(e,t){if(t){if(fv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function $a(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Fa=null;function Nu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ha=null,Hr=null,Br=null;function lf(e){if(e=fi(e)){if(typeof Ha!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Wl(t),Ha(e.stateNode,e.type,t))}}function yp(e){Hr?Br?Br.push(e):Br=[e]:Hr=e}function vp(){if(Hr){var e=Hr,t=Br;if(Br=Hr=null,lf(e),t)for(e=0;e<t.length;e++)lf(t[e])}}function wp(e,t){return e(t)}function xp(){}var aa=!1;function _p(e,t,n){if(aa)return e(t,n);aa=!0;try{return wp(e,t,n)}finally{aa=!1,(Hr!==null||Br!==null)&&(xp(),vp())}}function Zo(e,t){var n=e.stateNode;if(n===null)return null;var r=Wl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(O(231,t,typeof n));return n}var Ba=!1;if(qt)try{Nr={},Object.defineProperty(Nr,"passive",{get:function(){Ba=!0}}),window.addEventListener("test",Nr,Nr),window.removeEventListener("test",Nr,Nr)}catch{Ba=!1}var Nr;function pv(e,t,n,r,o,i,l,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Fo=!1,vl=null,wl=!1,Va=null,hv={onError:function(e){Fo=!0,vl=e}};function mv(e,t,n,r,o,i,l,s,a){Fo=!1,vl=null,pv.apply(hv,arguments)}function gv(e,t,n,r,o,i,l,s,a){if(mv.apply(this,arguments),Fo){if(Fo){var u=vl;Fo=!1,vl=null}else throw Error(O(198));wl||(wl=!0,Va=u)}}function ir(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Sp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function sf(e){if(ir(e)!==e)throw Error(O(188))}function yv(e){var t=e.alternate;if(!t){if(t=ir(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return sf(o),e;if(i===r)return sf(o),t;i=i.sibling}throw Error(O(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,s=o.child;s;){if(s===n){l=!0,n=o,r=i;break}if(s===r){l=!0,r=o,n=i;break}s=s.sibling}if(!l){for(s=i.child;s;){if(s===n){l=!0,n=i,r=o;break}if(s===r){l=!0,r=i,n=o;break}s=s.sibling}if(!l)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function Ep(e){return e=yv(e),e!==null?kp(e):null}function kp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=kp(e);if(t!==null)return t;e=e.sibling}return null}var Np=et.unstable_scheduleCallback,af=et.unstable_cancelCallback,vv=et.unstable_shouldYield,wv=et.unstable_requestPaint,ye=et.unstable_now,xv=et.unstable_getCurrentPriorityLevel,Cu=et.unstable_ImmediatePriority,Cp=et.unstable_UserBlockingPriority,xl=et.unstable_NormalPriority,_v=et.unstable_LowPriority,Mp=et.unstable_IdlePriority,Bl=null,$t=null;function Sv(e){if($t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(Bl,e,void 0,(e.current.flags&128)===128)}catch{}}var Ct=Math.clz32?Math.clz32:Nv,Ev=Math.log,kv=Math.LN2;function Nv(e){return e>>>=0,e===0?32:31-(Ev(e)/kv|0)|0}var Wi=64,Yi=4194304;function Ro(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _l(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=Ro(s):(i&=l,i!==0&&(r=Ro(i)))}else l=n&~o,l!==0?r=Ro(l):i!==0&&(r=Ro(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ct(t),o=1<<n,r|=e[n],t&=~o;return r}function Cv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Mv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-Ct(i),s=1<<l,a=o[l];a===-1?((s&n)===0||(s&r)!==0)&&(o[l]=Cv(s,t)):a<=t&&(e.expiredLanes|=s),i&=~s}}function Ua(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bp(){var e=Wi;return Wi<<=1,(Wi&4194240)===0&&(Wi=64),e}function ua(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ci(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ct(t),e[t]=n}function bv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Ct(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Mu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ct(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ee=0;function zp(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Pp,bu,Tp,Ip,Dp,ja=!1,Xi=[],yn=null,vn=null,wn=null,Qo=new Map,Go=new Map,pn=[],zv="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function uf(e,t){switch(e){case"focusin":case"focusout":yn=null;break;case"dragenter":case"dragleave":vn=null;break;case"mouseover":case"mouseout":wn=null;break;case"pointerover":case"pointerout":Qo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Go.delete(t.pointerId)}}function Mo(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=fi(t),t!==null&&bu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Pv(e,t,n,r,o){switch(t){case"focusin":return yn=Mo(yn,e,t,n,r,o),!0;case"dragenter":return vn=Mo(vn,e,t,n,r,o),!0;case"mouseover":return wn=Mo(wn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Qo.set(i,Mo(Qo.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Go.set(i,Mo(Go.get(i)||null,e,t,n,r,o)),!0}return!1}function Ap(e){var t=Kn(e.target);if(t!==null){var n=ir(t);if(n!==null){if(t=n.tag,t===13){if(t=Sp(n),t!==null){e.blockedOn=t,Dp(e.priority,function(){Tp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wa(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Fa=r,n.target.dispatchEvent(r),Fa=null}else return t=fi(n),t!==null&&bu(t),e.blockedOn=n,!1;t.shift()}return!0}function cf(e,t,n){sl(e)&&n.delete(t)}function Tv(){ja=!1,yn!==null&&sl(yn)&&(yn=null),vn!==null&&sl(vn)&&(vn=null),wn!==null&&sl(wn)&&(wn=null),Qo.forEach(cf),Go.forEach(cf)}function bo(e,t){e.blockedOn===t&&(e.blockedOn=null,ja||(ja=!0,et.unstable_scheduleCallback(et.unstable_NormalPriority,Tv)))}function qo(e){function t(o){return bo(o,e)}if(0<Xi.length){bo(Xi[0],e);for(var n=1;n<Xi.length;n++){var r=Xi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(yn!==null&&bo(yn,e),vn!==null&&bo(vn,e),wn!==null&&bo(wn,e),Qo.forEach(t),Go.forEach(t),n=0;n<pn.length;n++)r=pn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<pn.length&&(n=pn[0],n.blockedOn===null);)Ap(n),n.blockedOn===null&&pn.shift()}var Vr=nn.ReactCurrentBatchConfig,Sl=!0;function Iv(e,t,n,r){var o=ee,i=Vr.transition;Vr.transition=null;try{ee=1,zu(e,t,n,r)}finally{ee=o,Vr.transition=i}}function Dv(e,t,n,r){var o=ee,i=Vr.transition;Vr.transition=null;try{ee=4,zu(e,t,n,r)}finally{ee=o,Vr.transition=i}}function zu(e,t,n,r){if(Sl){var o=Wa(e,t,n,r);if(o===null)ga(e,t,r,El,n),uf(e,r);else if(Pv(o,e,t,n,r))r.stopPropagation();else if(uf(e,r),t&4&&-1<zv.indexOf(e)){for(;o!==null;){var i=fi(o);if(i!==null&&Pp(i),i=Wa(e,t,n,r),i===null&&ga(e,t,r,El,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else ga(e,t,r,null,n)}}var El=null;function Wa(e,t,n,r){if(El=null,e=Nu(r),e=Kn(e),e!==null)if(t=ir(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Sp(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return El=e,null}function Op(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(xv()){case Cu:return 1;case Cp:return 4;case xl:case _v:return 16;case Mp:return 536870912;default:return 16}default:return 16}}var mn=null,Pu=null,al=null;function Rp(){if(al)return al;var e,t=Pu,n=t.length,r,o="value"in mn?mn.value:mn.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===o[i-r];r++);return al=o.slice(e,1<r?1-r:void 0)}function ul(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ki(){return!0}function df(){return!1}function tt(e){function t(n,r,o,i,l){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ki:df,this.isPropagationStopped=df,this}return pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ki)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ki)},persist:function(){},isPersistent:Ki}),t}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tu=tt(qr),di=pe({},qr,{view:0,detail:0}),Av=tt(di),ca,da,zo,Vl=pe({},di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iu,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!==zo&&(zo&&e.type==="mousemove"?(ca=e.screenX-zo.screenX,da=e.screenY-zo.screenY):da=ca=0,zo=e),ca)},movementY:function(e){return"movementY"in e?e.movementY:da}}),ff=tt(Vl),Ov=pe({},Vl,{dataTransfer:0}),Rv=tt(Ov),Lv=pe({},di,{relatedTarget:0}),fa=tt(Lv),$v=pe({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),Fv=tt($v),Hv=pe({},qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bv=tt(Hv),Vv=pe({},qr,{data:0}),pf=tt(Vv),Uv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jv={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"},Wv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wv[e])?!!t[e]:!1}function Iu(){return Yv}var Xv=pe({},di,{key:function(e){if(e.key){var t=Uv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ul(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iu,charCode:function(e){return e.type==="keypress"?ul(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ul(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Kv=tt(Xv),Zv=pe({},Vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hf=tt(Zv),Qv=pe({},di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iu}),Gv=tt(Qv),qv=pe({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jv=tt(qv),e1=pe({},Vl,{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}),t1=tt(e1),n1=[9,13,27,32],Du=qt&&"CompositionEvent"in window,Ho=null;qt&&"documentMode"in document&&(Ho=document.documentMode);var r1=qt&&"TextEvent"in window&&!Ho,Lp=qt&&(!Du||Ho&&8<Ho&&11>=Ho),mf=" ",gf=!1;function $p(e,t){switch(e){case"keyup":return n1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zr=!1;function o1(e,t){switch(e){case"compositionend":return Fp(t);case"keypress":return t.which!==32?null:(gf=!0,mf);case"textInput":return e=t.data,e===mf&&gf?null:e;default:return null}}function i1(e,t){if(zr)return e==="compositionend"||!Du&&$p(e,t)?(e=Rp(),al=Pu=mn=null,zr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Lp&&t.locale!=="ko"?null:t.data;default:return null}}var l1={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 yf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!l1[e.type]:t==="textarea"}function Hp(e,t,n,r){yp(r),t=kl(t,"onChange"),0<t.length&&(n=new Tu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Bo=null,Jo=null;function s1(e){Gp(e,0)}function Ul(e){var t=Ir(e);if(cp(t))return e}function a1(e,t){if(e==="change")return t}var Bp=!1;qt&&(qt?(Qi="oninput"in document,Qi||(pa=document.createElement("div"),pa.setAttribute("oninput","return;"),Qi=typeof pa.oninput=="function"),Zi=Qi):Zi=!1,Bp=Zi&&(!document.documentMode||9<document.documentMode));var Zi,Qi,pa;function vf(){Bo&&(Bo.detachEvent("onpropertychange",Vp),Jo=Bo=null)}function Vp(e){if(e.propertyName==="value"&&Ul(Jo)){var t=[];Hp(t,Jo,e,Nu(e)),_p(s1,t)}}function u1(e,t,n){e==="focusin"?(vf(),Bo=t,Jo=n,Bo.attachEvent("onpropertychange",Vp)):e==="focusout"&&vf()}function c1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ul(Jo)}function d1(e,t){if(e==="click")return Ul(t)}function f1(e,t){if(e==="input"||e==="change")return Ul(t)}function p1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bt=typeof Object.is=="function"?Object.is:p1;function ei(e,t){if(bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Ma.call(t,o)||!bt(e[o],t[o]))return!1}return!0}function wf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xf(e,t){var n=wf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=wf(n)}}function Up(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Up(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jp(){for(var e=window,t=yl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=yl(e.document)}return t}function Au(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function h1(e){var t=jp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Up(n.ownerDocument.documentElement,n)){if(r!==null&&Au(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=xf(n,i);var l=xf(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var m1=qt&&"documentMode"in document&&11>=document.documentMode,Pr=null,Ya=null,Vo=null,Xa=!1;function _f(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xa||Pr==null||Pr!==yl(r)||(r=Pr,"selectionStart"in r&&Au(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vo&&ei(Vo,r)||(Vo=r,r=kl(Ya,"onSelect"),0<r.length&&(t=new Tu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Pr)))}function Gi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Tr={animationend:Gi("Animation","AnimationEnd"),animationiteration:Gi("Animation","AnimationIteration"),animationstart:Gi("Animation","AnimationStart"),transitionend:Gi("Transition","TransitionEnd")},ha={},Wp={};qt&&(Wp=document.createElement("div").style,"AnimationEvent"in window||(delete Tr.animationend.animation,delete Tr.animationiteration.animation,delete Tr.animationstart.animation),"TransitionEvent"in window||delete Tr.transitionend.transition);function jl(e){if(ha[e])return ha[e];if(!Tr[e])return e;var t=Tr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wp)return ha[e]=t[n];return e}var Yp=jl("animationend"),Xp=jl("animationiteration"),Kp=jl("animationstart"),Zp=jl("transitionend"),Qp=new Map,Sf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mn(e,t){Qp.set(e,t),or(t,[e])}for(qi=0;qi<Sf.length;qi++)Ji=Sf[qi],Ef=Ji.toLowerCase(),kf=Ji[0].toUpperCase()+Ji.slice(1),Mn(Ef,"on"+kf);var Ji,Ef,kf,qi;Mn(Yp,"onAnimationEnd");Mn(Xp,"onAnimationIteration");Mn(Kp,"onAnimationStart");Mn("dblclick","onDoubleClick");Mn("focusin","onFocus");Mn("focusout","onBlur");Mn(Zp,"onTransitionEnd");Wr("onMouseEnter",["mouseout","mouseover"]);Wr("onMouseLeave",["mouseout","mouseover"]);Wr("onPointerEnter",["pointerout","pointerover"]);Wr("onPointerLeave",["pointerout","pointerover"]);or("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));or("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));or("onBeforeInput",["compositionend","keypress","textInput","paste"]);or("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));or("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));or("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lo="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(" "),g1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lo));function Nf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,gv(r,t,void 0,e),e.currentTarget=null}function Gp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var s=r[l],a=s.instance,u=s.currentTarget;if(s=s.listener,a!==i&&o.isPropagationStopped())break e;Nf(o,s,u),i=a}else for(l=0;l<r.length;l++){if(s=r[l],a=s.instance,u=s.currentTarget,s=s.listener,a!==i&&o.isPropagationStopped())break e;Nf(o,s,u),i=a}}}if(wl)throw e=Va,wl=!1,Va=null,e}function se(e,t){var n=t[qa];n===void 0&&(n=t[qa]=new Set);var r=e+"__bubble";n.has(r)||(qp(t,e,2,!1),n.add(r))}function ma(e,t,n){var r=0;t&&(r|=4),qp(n,e,r,t)}var el="_reactListening"+Math.random().toString(36).slice(2);function ti(e){if(!e[el]){e[el]=!0,ip.forEach(function(n){n!=="selectionchange"&&(g1.has(n)||ma(n,!1,e),ma(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[el]||(t[el]=!0,ma("selectionchange",!1,t))}}function qp(e,t,n,r){switch(Op(t)){case 1:var o=Iv;break;case 4:o=Dv;break;default:o=zu}n=o.bind(null,t,n,e),o=void 0,!Ba||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ga(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var s=r.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;l=l.return}for(;s!==null;){if(l=Kn(s),l===null)return;if(a=l.tag,a===5||a===6){r=i=l;continue e}s=s.parentNode}}r=r.return}_p(function(){var u=i,c=Nu(n),f=[];e:{var h=Qp.get(e);if(h!==void 0){var g=Tu,_=e;switch(e){case"keypress":if(ul(n)===0)break e;case"keydown":case"keyup":g=Kv;break;case"focusin":_="focus",g=fa;break;case"focusout":_="blur",g=fa;break;case"beforeblur":case"afterblur":g=fa;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=ff;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Rv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=Gv;break;case Yp:case Xp:case Kp:g=Fv;break;case Zp:g=Jv;break;case"scroll":g=Av;break;case"wheel":g=t1;break;case"copy":case"cut":case"paste":g=Bv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=hf}var w=(t&4)!==0,E=!w&&e==="scroll",d=w?h!==null?h+"Capture":null:h;w=[];for(var p=u,m;p!==null;){m=p;var y=m.stateNode;if(m.tag===5&&y!==null&&(m=y,d!==null&&(y=Zo(p,d),y!=null&&w.push(ni(p,y,m)))),E)break;p=p.return}0<w.length&&(h=new g(h,_,null,n,c),f.push({event:h,listeners:w}))}}if((t&7)===0){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&n!==Fa&&(_=n.relatedTarget||n.fromElement)&&(Kn(_)||_[Jt]))break e;if((g||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,g?(_=n.relatedTarget||n.toElement,g=u,_=_?Kn(_):null,_!==null&&(E=ir(_),_!==E||_.tag!==5&&_.tag!==6)&&(_=null)):(g=null,_=u),g!==_)){if(w=ff,y="onMouseLeave",d="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(w=hf,y="onPointerLeave",d="onPointerEnter",p="pointer"),E=g==null?h:Ir(g),m=_==null?h:Ir(_),h=new w(y,p+"leave",g,n,c),h.target=E,h.relatedTarget=m,y=null,Kn(c)===u&&(w=new w(d,p+"enter",_,n,c),w.target=m,w.relatedTarget=E,y=w),E=y,g&&_)t:{for(w=g,d=_,p=0,m=w;m;m=Cr(m))p++;for(m=0,y=d;y;y=Cr(y))m++;for(;0<p-m;)w=Cr(w),p--;for(;0<m-p;)d=Cr(d),m--;for(;p--;){if(w===d||d!==null&&w===d.alternate)break t;w=Cr(w),d=Cr(d)}w=null}else w=null;g!==null&&Cf(f,h,g,w,!1),_!==null&&E!==null&&Cf(f,E,_,w,!0)}}e:{if(h=u?Ir(u):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var k=a1;else if(yf(h))if(Bp)k=f1;else{k=c1;var C=u1}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=d1);if(k&&(k=k(e,u))){Hp(f,k,n,c);break e}C&&C(e,h,u),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&Aa(h,"number",h.value)}switch(C=u?Ir(u):window,e){case"focusin":(yf(C)||C.contentEditable==="true")&&(Pr=C,Ya=u,Vo=null);break;case"focusout":Vo=Ya=Pr=null;break;case"mousedown":Xa=!0;break;case"contextmenu":case"mouseup":case"dragend":Xa=!1,_f(f,n,c);break;case"selectionchange":if(m1)break;case"keydown":case"keyup":_f(f,n,c)}var P;if(Du)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else zr?$p(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Lp&&n.locale!=="ko"&&(zr||N!=="onCompositionStart"?N==="onCompositionEnd"&&zr&&(P=Rp()):(mn=c,Pu="value"in mn?mn.value:mn.textContent,zr=!0)),C=kl(u,N),0<C.length&&(N=new pf(N,e,null,n,c),f.push({event:N,listeners:C}),P?N.data=P:(P=Fp(n),P!==null&&(N.data=P)))),(P=r1?o1(e,n):i1(e,n))&&(u=kl(u,"onBeforeInput"),0<u.length&&(c=new pf("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=P))}Gp(f,t)})}function ni(e,t,n){return{instance:e,listener:t,currentTarget:n}}function kl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Zo(e,n),i!=null&&r.unshift(ni(e,i,o)),i=Zo(e,t),i!=null&&r.push(ni(e,i,o))),e=e.return}return r}function Cr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Cf(e,t,n,r,o){for(var i=t._reactName,l=[];n!==null&&n!==r;){var s=n,a=s.alternate,u=s.stateNode;if(a!==null&&a===r)break;s.tag===5&&u!==null&&(s=u,o?(a=Zo(n,i),a!=null&&l.unshift(ni(n,a,s))):o||(a=Zo(n,i),a!=null&&l.push(ni(n,a,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var y1=/\r\n?/g,v1=/\u0000|\uFFFD/g;function Mf(e){return(typeof e=="string"?e:""+e).replace(y1,`
|
|
6
|
+
`).replace(v1,"")}function tl(e,t,n){if(t=Mf(t),Mf(e)!==t&&n)throw Error(O(425))}function Nl(){}var Ka=null,Za=null;function Qa(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ga=typeof setTimeout=="function"?setTimeout:void 0,w1=typeof clearTimeout=="function"?clearTimeout:void 0,bf=typeof Promise=="function"?Promise:void 0,x1=typeof queueMicrotask=="function"?queueMicrotask:typeof bf<"u"?function(e){return bf.resolve(null).then(e).catch(_1)}:Ga;function _1(e){setTimeout(function(){throw e})}function ya(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),qo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);qo(t)}function xn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function zf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Jr=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Jr,ri="__reactProps$"+Jr,Jt="__reactContainer$"+Jr,qa="__reactEvents$"+Jr,S1="__reactListeners$"+Jr,E1="__reactHandles$"+Jr;function Kn(e){var t=e[Lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jt]||n[Lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=zf(e);e!==null;){if(n=e[Lt])return n;e=zf(e)}return t}e=n,n=e.parentNode}return null}function fi(e){return e=e[Lt]||e[Jt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ir(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function Wl(e){return e[ri]||null}var Ja=[],Dr=-1;function bn(e){return{current:e}}function ae(e){0>Dr||(e.current=Ja[Dr],Ja[Dr]=null,Dr--)}function oe(e,t){Dr++,Ja[Dr]=e.current,e.current=t}var Cn={},Re=bn(Cn),je=bn(!1),Jn=Cn;function Yr(e,t){var n=e.type.contextTypes;if(!n)return Cn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function We(e){return e=e.childContextTypes,e!=null}function Cl(){ae(je),ae(Re)}function Pf(e,t,n){if(Re.current!==Cn)throw Error(O(168));oe(Re,t),oe(je,n)}function Jp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(O(108,uv(e)||"Unknown",o));return pe({},n,r)}function Ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cn,Jn=Re.current,oe(Re,e),oe(je,je.current),!0}function Tf(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=Jp(e,t,Jn),r.__reactInternalMemoizedMergedChildContext=e,ae(je),ae(Re),oe(Re,e)):ae(je),oe(je,n)}var Kt=null,Yl=!1,va=!1;function eh(e){Kt===null?Kt=[e]:Kt.push(e)}function k1(e){Yl=!0,eh(e)}function zn(){if(!va&&Kt!==null){va=!0;var e=0,t=ee;try{var n=Kt;for(ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Kt=null,Yl=!1}catch(o){throw Kt!==null&&(Kt=Kt.slice(e+1)),Np(Cu,zn),o}finally{ee=t,va=!1}}return null}var Ar=[],Or=0,bl=null,zl=0,ct=[],dt=0,er=null,Zt=1,Qt="";function Yn(e,t){Ar[Or++]=zl,Ar[Or++]=bl,bl=e,zl=t}function th(e,t,n){ct[dt++]=Zt,ct[dt++]=Qt,ct[dt++]=er,er=e;var r=Zt;e=Qt;var o=32-Ct(r)-1;r&=~(1<<o),n+=1;var i=32-Ct(t)+o;if(30<i){var l=o-o%5;i=(r&(1<<l)-1).toString(32),r>>=l,o-=l,Zt=1<<32-Ct(t)+o|n<<o|r,Qt=i+e}else Zt=1<<i|n<<o|r,Qt=e}function Ou(e){e.return!==null&&(Yn(e,1),th(e,1,0))}function Ru(e){for(;e===bl;)bl=Ar[--Or],Ar[Or]=null,zl=Ar[--Or],Ar[Or]=null;for(;e===er;)er=ct[--dt],ct[dt]=null,Qt=ct[--dt],ct[dt]=null,Zt=ct[--dt],ct[dt]=null}var Je=null,qe=null,ce=!1,Nt=null;function nh(e,t){var n=ft(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function If(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Je=e,qe=xn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Je=e,qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=er!==null?{id:Zt,overflow:Qt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ft(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Je=e,qe=null,!0):!1;default:return!1}}function eu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function tu(e){if(ce){var t=qe;if(t){var n=t;if(!If(e,t)){if(eu(e))throw Error(O(418));t=xn(n.nextSibling);var r=Je;t&&If(e,t)?nh(r,n):(e.flags=e.flags&-4097|2,ce=!1,Je=e)}}else{if(eu(e))throw Error(O(418));e.flags=e.flags&-4097|2,ce=!1,Je=e}}}function Df(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Je=e}function nl(e){if(e!==Je)return!1;if(!ce)return Df(e),ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Qa(e.type,e.memoizedProps)),t&&(t=qe)){if(eu(e))throw rh(),Error(O(418));for(;t;)nh(e,t),t=xn(t.nextSibling)}if(Df(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){qe=xn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qe=null}}else qe=Je?xn(e.stateNode.nextSibling):null;return!0}function rh(){for(var e=qe;e;)e=xn(e.nextSibling)}function Xr(){qe=Je=null,ce=!1}function Lu(e){Nt===null?Nt=[e]:Nt.push(e)}var N1=nn.ReactCurrentBatchConfig;function Po(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(O(309));var r=n.stateNode}if(!r)throw Error(O(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var s=o.refs;l===null?delete s[i]:s[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function rl(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Af(e){var t=e._init;return t(e._payload)}function oh(e){function t(d,p){if(e){var m=d.deletions;m===null?(d.deletions=[p],d.flags|=16):m.push(p)}}function n(d,p){if(!e)return null;for(;p!==null;)t(d,p),p=p.sibling;return null}function r(d,p){for(d=new Map;p!==null;)p.key!==null?d.set(p.key,p):d.set(p.index,p),p=p.sibling;return d}function o(d,p){return d=kn(d,p),d.index=0,d.sibling=null,d}function i(d,p,m){return d.index=m,e?(m=d.alternate,m!==null?(m=m.index,m<p?(d.flags|=2,p):m):(d.flags|=2,p)):(d.flags|=1048576,p)}function l(d){return e&&d.alternate===null&&(d.flags|=2),d}function s(d,p,m,y){return p===null||p.tag!==6?(p=Na(m,d.mode,y),p.return=d,p):(p=o(p,m),p.return=d,p)}function a(d,p,m,y){var k=m.type;return k===br?c(d,p,m.props.children,y,m.key):p!==null&&(p.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===dn&&Af(k)===p.type)?(y=o(p,m.props),y.ref=Po(d,p,m),y.return=d,y):(y=gl(m.type,m.key,m.props,null,d.mode,y),y.ref=Po(d,p,m),y.return=d,y)}function u(d,p,m,y){return p===null||p.tag!==4||p.stateNode.containerInfo!==m.containerInfo||p.stateNode.implementation!==m.implementation?(p=Ca(m,d.mode,y),p.return=d,p):(p=o(p,m.children||[]),p.return=d,p)}function c(d,p,m,y,k){return p===null||p.tag!==7?(p=qn(m,d.mode,y,k),p.return=d,p):(p=o(p,m),p.return=d,p)}function f(d,p,m){if(typeof p=="string"&&p!==""||typeof p=="number")return p=Na(""+p,d.mode,m),p.return=d,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Vi:return m=gl(p.type,p.key,p.props,null,d.mode,m),m.ref=Po(d,null,p),m.return=d,m;case Mr:return p=Ca(p,d.mode,m),p.return=d,p;case dn:var y=p._init;return f(d,y(p._payload),m)}if(Oo(p)||Co(p))return p=qn(p,d.mode,m,null),p.return=d,p;rl(d,p)}return null}function h(d,p,m,y){var k=p!==null?p.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return k!==null?null:s(d,p,""+m,y);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Vi:return m.key===k?a(d,p,m,y):null;case Mr:return m.key===k?u(d,p,m,y):null;case dn:return k=m._init,h(d,p,k(m._payload),y)}if(Oo(m)||Co(m))return k!==null?null:c(d,p,m,y,null);rl(d,m)}return null}function g(d,p,m,y,k){if(typeof y=="string"&&y!==""||typeof y=="number")return d=d.get(m)||null,s(p,d,""+y,k);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Vi:return d=d.get(y.key===null?m:y.key)||null,a(p,d,y,k);case Mr:return d=d.get(y.key===null?m:y.key)||null,u(p,d,y,k);case dn:var C=y._init;return g(d,p,m,C(y._payload),k)}if(Oo(y)||Co(y))return d=d.get(m)||null,c(p,d,y,k,null);rl(p,y)}return null}function _(d,p,m,y){for(var k=null,C=null,P=p,N=p=0,T=null;P!==null&&N<m.length;N++){P.index>N?(T=P,P=null):T=P.sibling;var I=h(d,P,m[N],y);if(I===null){P===null&&(P=T);break}e&&P&&I.alternate===null&&t(d,P),p=i(I,p,N),C===null?k=I:C.sibling=I,C=I,P=T}if(N===m.length)return n(d,P),ce&&Yn(d,N),k;if(P===null){for(;N<m.length;N++)P=f(d,m[N],y),P!==null&&(p=i(P,p,N),C===null?k=P:C.sibling=P,C=P);return ce&&Yn(d,N),k}for(P=r(d,P);N<m.length;N++)T=g(P,d,N,m[N],y),T!==null&&(e&&T.alternate!==null&&P.delete(T.key===null?N:T.key),p=i(T,p,N),C===null?k=T:C.sibling=T,C=T);return e&&P.forEach(function(R){return t(d,R)}),ce&&Yn(d,N),k}function w(d,p,m,y){var k=Co(m);if(typeof k!="function")throw Error(O(150));if(m=k.call(m),m==null)throw Error(O(151));for(var C=k=null,P=p,N=p=0,T=null,I=m.next();P!==null&&!I.done;N++,I=m.next()){P.index>N?(T=P,P=null):T=P.sibling;var R=h(d,P,I.value,y);if(R===null){P===null&&(P=T);break}e&&P&&R.alternate===null&&t(d,P),p=i(R,p,N),C===null?k=R:C.sibling=R,C=R,P=T}if(I.done)return n(d,P),ce&&Yn(d,N),k;if(P===null){for(;!I.done;N++,I=m.next())I=f(d,I.value,y),I!==null&&(p=i(I,p,N),C===null?k=I:C.sibling=I,C=I);return ce&&Yn(d,N),k}for(P=r(d,P);!I.done;N++,I=m.next())I=g(P,d,N,I.value,y),I!==null&&(e&&I.alternate!==null&&P.delete(I.key===null?N:I.key),p=i(I,p,N),C===null?k=I:C.sibling=I,C=I);return e&&P.forEach(function(B){return t(d,B)}),ce&&Yn(d,N),k}function E(d,p,m,y){if(typeof m=="object"&&m!==null&&m.type===br&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Vi:e:{for(var k=m.key,C=p;C!==null;){if(C.key===k){if(k=m.type,k===br){if(C.tag===7){n(d,C.sibling),p=o(C,m.props.children),p.return=d,d=p;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===dn&&Af(k)===C.type){n(d,C.sibling),p=o(C,m.props),p.ref=Po(d,C,m),p.return=d,d=p;break e}n(d,C);break}else t(d,C);C=C.sibling}m.type===br?(p=qn(m.props.children,d.mode,y,m.key),p.return=d,d=p):(y=gl(m.type,m.key,m.props,null,d.mode,y),y.ref=Po(d,p,m),y.return=d,d=y)}return l(d);case Mr:e:{for(C=m.key;p!==null;){if(p.key===C)if(p.tag===4&&p.stateNode.containerInfo===m.containerInfo&&p.stateNode.implementation===m.implementation){n(d,p.sibling),p=o(p,m.children||[]),p.return=d,d=p;break e}else{n(d,p);break}else t(d,p);p=p.sibling}p=Ca(m,d.mode,y),p.return=d,d=p}return l(d);case dn:return C=m._init,E(d,p,C(m._payload),y)}if(Oo(m))return _(d,p,m,y);if(Co(m))return w(d,p,m,y);rl(d,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,p!==null&&p.tag===6?(n(d,p.sibling),p=o(p,m),p.return=d,d=p):(n(d,p),p=Na(m,d.mode,y),p.return=d,d=p),l(d)):n(d,p)}return E}var Kr=oh(!0),ih=oh(!1),Pl=bn(null),Tl=null,Rr=null,$u=null;function Fu(){$u=Rr=Tl=null}function Hu(e){var t=Pl.current;ae(Pl),e._currentValue=t}function nu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ur(e,t){Tl=e,$u=Rr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ue=!0),e.firstContext=null)}function ht(e){var t=e._currentValue;if($u!==e)if(e={context:e,memoizedValue:t,next:null},Rr===null){if(Tl===null)throw Error(O(308));Rr=e,Tl.dependencies={lanes:0,firstContext:e}}else Rr=Rr.next=e;return t}var Zn=null;function Bu(e){Zn===null?Zn=[e]:Zn.push(e)}function lh(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Bu(t)):(n.next=o.next,o.next=n),t.interleaved=n,en(e,r)}function en(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fn=!1;function Vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function _n(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Q&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,en(e,n)}return o=r.interleaved,o===null?(t.next=t,Bu(r)):(t.next=o.next,o.next=t),r.interleaved=t,en(e,n)}function cl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mu(e,n)}}function Of(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Il(e,t,n,r){var o=e.updateQueue;fn=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?i=u:l.next=u,l=a;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==l&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=a))}if(i!==null){var f=o.baseState;l=0,c=u=a=null,s=i;do{var h=s.lane,g=s.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var _=e,w=s;switch(h=t,g=n,w.tag){case 1:if(_=w.payload,typeof _=="function"){f=_.call(g,f,h);break e}f=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=w.payload,h=typeof _=="function"?_.call(g,f,h):_,h==null)break e;f=pe({},f,h);break e;case 2:fn=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[s]:h.push(s))}else g={eventTime:g,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=g,a=f):c=c.next=g,l|=h;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;h=s,s=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}}while(!0);if(c===null&&(a=f),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);nr|=l,e.lanes=l,e.memoizedState=f}}function Rf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(O(191,o));o.call(r)}}}var pi={},Ft=bn(pi),oi=bn(pi),ii=bn(pi);function Qn(e){if(e===pi)throw Error(O(174));return e}function Uu(e,t){switch(oe(ii,t),oe(oi,e),oe(Ft,pi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ra(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ra(t,e)}ae(Ft),oe(Ft,t)}function Zr(){ae(Ft),ae(oi),ae(ii)}function ah(e){Qn(ii.current);var t=Qn(Ft.current),n=Ra(t,e.type);t!==n&&(oe(oi,e),oe(Ft,n))}function ju(e){oi.current===e&&(ae(Ft),ae(oi))}var de=bn(0);function Dl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wa=[];function Wu(){for(var e=0;e<wa.length;e++)wa[e]._workInProgressVersionPrimary=null;wa.length=0}var dl=nn.ReactCurrentDispatcher,xa=nn.ReactCurrentBatchConfig,tr=0,fe=null,_e=null,Ne=null,Al=!1,Uo=!1,li=0,C1=0;function De(){throw Error(O(321))}function Yu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!bt(e[n],t[n]))return!1;return!0}function Xu(e,t,n,r,o,i){if(tr=i,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,dl.current=e===null||e.memoizedState===null?P1:T1,e=n(r,o),Uo){i=0;do{if(Uo=!1,li=0,25<=i)throw Error(O(301));i+=1,Ne=_e=null,t.updateQueue=null,dl.current=I1,e=n(r,o)}while(Uo)}if(dl.current=Ol,t=_e!==null&&_e.next!==null,tr=0,Ne=_e=fe=null,Al=!1,t)throw Error(O(300));return e}function Ku(){var e=li!==0;return li=0,e}function Rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ne===null?fe.memoizedState=Ne=e:Ne=Ne.next=e,Ne}function mt(){if(_e===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Ne===null?fe.memoizedState:Ne.next;if(t!==null)Ne=t,_e=e;else{if(e===null)throw Error(O(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Ne===null?fe.memoizedState=Ne=e:Ne=Ne.next=e}return Ne}function si(e,t){return typeof t=="function"?t(e):t}function _a(e){var t=mt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=_e,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var s=l=null,a=null,u=i;do{var c=u.lane;if((tr&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(s=a=f,l=r):a=a.next=f,fe.lanes|=c,nr|=c}u=u.next}while(u!==null&&u!==i);a===null?l=r:a.next=s,bt(r,t.memoizedState)||(Ue=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,fe.lanes|=i,nr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Sa(e){var t=mt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var l=o=o.next;do i=e(i,l.action),l=l.next;while(l!==o);bt(i,t.memoizedState)||(Ue=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function uh(){}function ch(e,t){var n=fe,r=mt(),o=t(),i=!bt(r.memoizedState,o);if(i&&(r.memoizedState=o,Ue=!0),r=r.queue,Zu(ph.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ne!==null&&Ne.memoizedState.tag&1){if(n.flags|=2048,ai(9,fh.bind(null,n,r,o,t),void 0,null),Ce===null)throw Error(O(349));(tr&30)!==0||dh(n,t,o)}return o}function dh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function fh(e,t,n,r){t.value=n,t.getSnapshot=r,hh(t)&&mh(e)}function ph(e,t,n){return n(function(){hh(t)&&mh(e)})}function hh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!bt(e,n)}catch{return!0}}function mh(e){var t=en(e,1);t!==null&&Mt(t,e,1,-1)}function Lf(e){var t=Rt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:e},t.queue=e,e=e.dispatch=z1.bind(null,fe,e),[t.memoizedState,e]}function ai(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=fe.updateQueue,t===null?(t={lastEffect:null,stores:null},fe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function gh(){return mt().memoizedState}function fl(e,t,n,r){var o=Rt();fe.flags|=e,o.memoizedState=ai(1|t,n,void 0,r===void 0?null:r)}function Xl(e,t,n,r){var o=mt();r=r===void 0?null:r;var i=void 0;if(_e!==null){var l=_e.memoizedState;if(i=l.destroy,r!==null&&Yu(r,l.deps)){o.memoizedState=ai(t,n,i,r);return}}fe.flags|=e,o.memoizedState=ai(1|t,n,i,r)}function $f(e,t){return fl(8390656,8,e,t)}function Zu(e,t){return Xl(2048,8,e,t)}function yh(e,t){return Xl(4,2,e,t)}function vh(e,t){return Xl(4,4,e,t)}function wh(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xh(e,t,n){return n=n!=null?n.concat([e]):null,Xl(4,4,wh.bind(null,t,e),n)}function Qu(){}function _h(e,t){var n=mt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sh(e,t){var n=mt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Eh(e,t,n){return(tr&21)===0?(e.baseState&&(e.baseState=!1,Ue=!0),e.memoizedState=n):(bt(n,t)||(n=bp(),fe.lanes|=n,nr|=n,e.baseState=!0),t)}function M1(e,t){var n=ee;ee=n!==0&&4>n?n:4,e(!0);var r=xa.transition;xa.transition={};try{e(!1),t()}finally{ee=n,xa.transition=r}}function kh(){return mt().memoizedState}function b1(e,t,n){var r=En(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Nh(e))Ch(t,n);else if(n=lh(e,t,n,r),n!==null){var o=Fe();Mt(n,e,r,o),Mh(n,t,r)}}function z1(e,t,n){var r=En(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Nh(e))Ch(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,bt(s,l)){var a=t.interleaved;a===null?(o.next=o,Bu(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}n=lh(e,t,o,r),n!==null&&(o=Fe(),Mt(n,e,r,o),Mh(n,t,r))}}function Nh(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Ch(e,t){Uo=Al=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Mh(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mu(e,n)}}var Ol={readContext:ht,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},P1={readContext:ht,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:$f,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,fl(4194308,4,wh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fl(4194308,4,e,t)},useInsertionEffect:function(e,t){return fl(4,2,e,t)},useMemo:function(e,t){var n=Rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=b1.bind(null,fe,e),[r.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:Lf,useDebugValue:Qu,useDeferredValue:function(e){return Rt().memoizedState=e},useTransition:function(){var e=Lf(!1),t=e[0];return e=M1.bind(null,e[1]),Rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fe,o=Rt();if(ce){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Ce===null)throw Error(O(349));(tr&30)!==0||dh(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,$f(ph.bind(null,r,i,e),[e]),r.flags|=2048,ai(9,fh.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Rt(),t=Ce.identifierPrefix;if(ce){var n=Qt,r=Zt;n=(r&~(1<<32-Ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=li++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=C1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},T1={readContext:ht,useCallback:_h,useContext:ht,useEffect:Zu,useImperativeHandle:xh,useInsertionEffect:yh,useLayoutEffect:vh,useMemo:Sh,useReducer:_a,useRef:gh,useState:function(){return _a(si)},useDebugValue:Qu,useDeferredValue:function(e){var t=mt();return Eh(t,_e.memoizedState,e)},useTransition:function(){var e=_a(si)[0],t=mt().memoizedState;return[e,t]},useMutableSource:uh,useSyncExternalStore:ch,useId:kh,unstable_isNewReconciler:!1},I1={readContext:ht,useCallback:_h,useContext:ht,useEffect:Zu,useImperativeHandle:xh,useInsertionEffect:yh,useLayoutEffect:vh,useMemo:Sh,useReducer:Sa,useRef:gh,useState:function(){return Sa(si)},useDebugValue:Qu,useDeferredValue:function(e){var t=mt();return _e===null?t.memoizedState=e:Eh(t,_e.memoizedState,e)},useTransition:function(){var e=Sa(si)[0],t=mt().memoizedState;return[e,t]},useMutableSource:uh,useSyncExternalStore:ch,useId:kh,unstable_isNewReconciler:!1};function Et(e,t){if(e&&e.defaultProps){t=pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ru(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Kl={isMounted:function(e){return(e=e._reactInternals)?ir(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fe(),o=En(e),i=Gt(r,o);i.payload=t,n!=null&&(i.callback=n),t=_n(e,i,o),t!==null&&(Mt(t,e,o,r),cl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fe(),o=En(e),i=Gt(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=_n(e,i,o),t!==null&&(Mt(t,e,o,r),cl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fe(),r=En(e),o=Gt(n,r);o.tag=2,t!=null&&(o.callback=t),t=_n(e,o,r),t!==null&&(Mt(t,e,r,n),cl(t,e,r))}};function Ff(e,t,n,r,o,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!ei(n,r)||!ei(o,i):!0}function bh(e,t,n){var r=!1,o=Cn,i=t.contextType;return typeof i=="object"&&i!==null?i=ht(i):(o=We(t)?Jn:Re.current,r=t.contextTypes,i=(r=r!=null)?Yr(e,o):Cn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Kl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Hf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Kl.enqueueReplaceState(t,t.state,null)}function ou(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Vu(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ht(i):(i=We(t)?Jn:Re.current,o.context=Yr(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ru(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Kl.enqueueReplaceState(o,o.state,null),Il(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Qr(e,t){try{var n="",r=t;do n+=av(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
7
|
+
Error generating stack: `+i.message+`
|
|
8
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Ea(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function iu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var D1=typeof WeakMap=="function"?WeakMap:Map;function zh(e,t,n){n=Gt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ll||(Ll=!0,mu=r),iu(e,t)},n}function Ph(e,t,n){n=Gt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){iu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){iu(e,t),typeof r!="function"&&(Sn===null?Sn=new Set([this]):Sn.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Bf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new D1;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=X1.bind(null,e,t,n),t.then(e,e))}function Vf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Uf(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Gt(-1,1),t.tag=2,_n(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var A1=nn.ReactCurrentOwner,Ue=!1;function $e(e,t,n,r){t.child=e===null?ih(t,null,n,r):Kr(t,e.child,n,r)}function jf(e,t,n,r,o){n=n.render;var i=t.ref;return Ur(t,o),r=Xu(e,t,n,r,i,o),n=Ku(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,tn(e,t,o)):(ce&&n&&Ou(t),t.flags|=1,$e(e,t,r,o),t.child)}function Wf(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!oc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Th(e,t,i,r,o)):(e=gl(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:ei,n(l,r)&&e.ref===t.ref)return tn(e,t,o)}return t.flags|=1,e=kn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Th(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(ei(i,r)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Ue=!0);else return t.lanes=e.lanes,tn(e,t,o)}return lu(e,t,n,r,o)}function Ih(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe($r,Ge),Ge|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe($r,Ge),Ge|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,oe($r,Ge),Ge|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,oe($r,Ge),Ge|=r;return $e(e,t,o,n),t.child}function Dh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function lu(e,t,n,r,o){var i=We(n)?Jn:Re.current;return i=Yr(t,i),Ur(t,o),n=Xu(e,t,n,r,i,o),r=Ku(),e!==null&&!Ue?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,tn(e,t,o)):(ce&&r&&Ou(t),t.flags|=1,$e(e,t,n,o),t.child)}function Yf(e,t,n,r,o){if(We(n)){var i=!0;Ml(t)}else i=!1;if(Ur(t,o),t.stateNode===null)pl(e,t),bh(t,n,r),ou(t,n,r,o),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var a=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=ht(u):(u=We(n)?Jn:Re.current,u=Yr(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||a!==u)&&Hf(t,l,r,u),fn=!1;var h=t.memoizedState;l.state=h,Il(t,r,l,o),a=t.memoizedState,s!==r||h!==a||je.current||fn?(typeof c=="function"&&(ru(t,n,c,r),a=t.memoizedState),(s=fn||Ff(t,n,s,r,h,a,u))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),l.props=r,l.state=a,l.context=u,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,sh(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Et(t.type,s),l.props=u,f=t.pendingProps,h=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=ht(a):(a=We(n)?Jn:Re.current,a=Yr(t,a));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==f||h!==a)&&Hf(t,l,r,a),fn=!1,h=t.memoizedState,l.state=h,Il(t,r,l,o);var _=t.memoizedState;s!==f||h!==_||je.current||fn?(typeof g=="function"&&(ru(t,n,g,r),_=t.memoizedState),(u=fn||Ff(t,n,u,r,h,_,a)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,_,a),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,_,a)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=_),l.props=r,l.state=_,l.context=a,r=u):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return su(e,t,n,r,i,o)}function su(e,t,n,r,o,i){Dh(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return o&&Tf(t,n,!1),tn(e,t,i);r=t.stateNode,A1.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Kr(t,e.child,null,i),t.child=Kr(t,null,s,i)):$e(e,t,s,i),t.memoizedState=r.state,o&&Tf(t,n,!0),t.child}function Ah(e){var t=e.stateNode;t.pendingContext?Pf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Pf(e,t.context,!1),Uu(e,t.containerInfo)}function Xf(e,t,n,r,o){return Xr(),Lu(o),t.flags|=256,$e(e,t,n,r),t.child}var au={dehydrated:null,treeContext:null,retryLane:0};function uu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oh(e,t,n){var r=t.pendingProps,o=de.current,i=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),oe(de,o&1),e===null)return tu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(l=r.children,e=r.fallback,i?(r=t.mode,i=t.child,l={mode:"hidden",children:l},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=l):i=Gl(l,r,0,null),e=qn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=uu(n),t.memoizedState=au,e):Gu(t,l));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return O1(e,t,l,r,s,o,n);if(i){i=r.fallback,l=t.mode,o=e.child,s=o.sibling;var a={mode:"hidden",children:r.children};return(l&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=kn(o,a),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=kn(s,i):(i=qn(i,l,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,l=e.child.memoizedState,l=l===null?uu(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~n,t.memoizedState=au,r}return i=e.child,e=i.sibling,r=kn(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Gu(e,t){return t=Gl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ol(e,t,n,r){return r!==null&&Lu(r),Kr(t,e.child,null,n),e=Gu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function O1(e,t,n,r,o,i,l){if(n)return t.flags&256?(t.flags&=-257,r=Ea(Error(O(422))),ol(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Gl({mode:"visible",children:r.children},o,0,null),i=qn(i,o,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Kr(t,e.child,null,l),t.child.memoizedState=uu(l),t.memoizedState=au,i);if((t.mode&1)===0)return ol(e,t,l,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(O(419)),r=Ea(i,r,void 0),ol(e,t,l,r)}if(s=(l&e.childLanes)!==0,Ue||s){if(r=Ce,r!==null){switch(l&-l){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|l))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,en(e,o),Mt(r,e,o,-1))}return rc(),r=Ea(Error(O(421))),ol(e,t,l,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=K1.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,qe=xn(o.nextSibling),Je=t,ce=!0,Nt=null,e!==null&&(ct[dt++]=Zt,ct[dt++]=Qt,ct[dt++]=er,Zt=e.id,Qt=e.overflow,er=t),t=Gu(t,r.children),t.flags|=4096,t)}function Kf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),nu(e.return,t,n)}function ka(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Rh(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if($e(e,t,r.children,n),r=de.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kf(e,n,t);else if(e.tag===19)Kf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oe(de,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Dl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ka(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Dl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ka(t,!0,n,null,i);break;case"together":ka(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function pl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function tn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=kn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=kn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function R1(e,t,n){switch(t.tag){case 3:Ah(t),Xr();break;case 5:ah(t);break;case 1:We(t.type)&&Ml(t);break;case 4:Uu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;oe(Pl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(oe(de,de.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Oh(e,t,n):(oe(de,de.current&1),e=tn(e,t,n),e!==null?e.sibling:null);oe(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Rh(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),oe(de,de.current),r)break;return null;case 22:case 23:return t.lanes=0,Ih(e,t,n)}return tn(e,t,n)}var Lh,cu,$h,Fh;Lh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};cu=function(){};$h=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Qn(Ft.current);var i=null;switch(n){case"input":o=Ia(e,o),r=Ia(e,r),i=[];break;case"select":o=pe({},o,{value:void 0}),r=pe({},r,{value:void 0}),i=[];break;case"textarea":o=Oa(e,o),r=Oa(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Nl)}La(n,r);var l;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var s=o[u];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Xo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(s=o?.[u],r.hasOwnProperty(u)&&a!==s&&(a!=null||s!=null))if(u==="style")if(s){for(l in s)!s.hasOwnProperty(l)||a&&a.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in a)a.hasOwnProperty(l)&&s[l]!==a[l]&&(n||(n={}),n[l]=a[l])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Xo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&se("scroll",e),i||s===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Fh=function(e,t,n,r){n!==r&&(t.flags|=4)};function To(e,t){if(!ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ae(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function L1(e,t,n){var r=t.pendingProps;switch(Ru(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(t),null;case 1:return We(t.type)&&Cl(),Ae(t),null;case 3:return r=t.stateNode,Zr(),ae(je),ae(Re),Wu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(nl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nt!==null&&(vu(Nt),Nt=null))),cu(e,t),Ae(t),null;case 5:ju(t);var o=Qn(ii.current);if(n=t.type,e!==null&&t.stateNode!=null)$h(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ae(t),null}if(e=Qn(Ft.current),nl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Lt]=t,r[ri]=i,e=(t.mode&1)!==0,n){case"dialog":se("cancel",r),se("close",r);break;case"iframe":case"object":case"embed":se("load",r);break;case"video":case"audio":for(o=0;o<Lo.length;o++)se(Lo[o],r);break;case"source":se("error",r);break;case"img":case"image":case"link":se("error",r),se("load",r);break;case"details":se("toggle",r);break;case"input":tf(r,i),se("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},se("invalid",r);break;case"textarea":rf(r,i),se("invalid",r)}La(n,i),o=null;for(var l in i)if(i.hasOwnProperty(l)){var s=i[l];l==="children"?typeof s=="string"?r.textContent!==s&&(i.suppressHydrationWarning!==!0&&tl(r.textContent,s,e),o=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&tl(r.textContent,s,e),o=["children",""+s]):Xo.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&se("scroll",r)}switch(n){case"input":Ui(r),nf(r,i,!0);break;case"textarea":Ui(r),of(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Nl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=pp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Lt]=t,e[ri]=r,Lh(e,t,!1,!1),t.stateNode=e;e:{switch(l=$a(n,r),n){case"dialog":se("cancel",e),se("close",e),o=r;break;case"iframe":case"object":case"embed":se("load",e),o=r;break;case"video":case"audio":for(o=0;o<Lo.length;o++)se(Lo[o],e);o=r;break;case"source":se("error",e),o=r;break;case"img":case"image":case"link":se("error",e),se("load",e),o=r;break;case"details":se("toggle",e),o=r;break;case"input":tf(e,r),o=Ia(e,r),se("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=pe({},r,{value:void 0}),se("invalid",e);break;case"textarea":rf(e,r),o=Oa(e,r),se("invalid",e);break;default:o=r}La(n,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="style"?gp(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&hp(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Ko(e,a):typeof a=="number"&&Ko(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Xo.hasOwnProperty(i)?a!=null&&i==="onScroll"&&se("scroll",e):a!=null&&_u(e,i,a,l))}switch(n){case"input":Ui(e),nf(e,r,!1);break;case"textarea":Ui(e),of(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Nn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Fr(e,!!r.multiple,i,!1):r.defaultValue!=null&&Fr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Nl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ae(t),null;case 6:if(e&&t.stateNode!=null)Fh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=Qn(ii.current),Qn(Ft.current),nl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Lt]=t,(i=r.nodeValue!==n)&&(e=Je,e!==null))switch(e.tag){case 3:tl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&tl(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Lt]=t,t.stateNode=r}return Ae(t),null;case 13:if(ae(de),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ce&&qe!==null&&(t.mode&1)!==0&&(t.flags&128)===0)rh(),Xr(),t.flags|=98560,i=!1;else if(i=nl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(O(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[Lt]=t}else Xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ae(t),i=!1}else Nt!==null&&(vu(Nt),Nt=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(de.current&1)!==0?Se===0&&(Se=3):rc())),t.updateQueue!==null&&(t.flags|=4),Ae(t),null);case 4:return Zr(),cu(e,t),e===null&&ti(t.stateNode.containerInfo),Ae(t),null;case 10:return Hu(t.type._context),Ae(t),null;case 17:return We(t.type)&&Cl(),Ae(t),null;case 19:if(ae(de),i=t.memoizedState,i===null)return Ae(t),null;if(r=(t.flags&128)!==0,l=i.rendering,l===null)if(r)To(i,!1);else{if(Se!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(l=Dl(e),l!==null){for(t.flags|=128,To(i,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,l=i.alternate,l===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oe(de,de.current&1|2),t.child}e=e.sibling}i.tail!==null&&ye()>Gr&&(t.flags|=128,r=!0,To(i,!1),t.lanes=4194304)}else{if(!r)if(e=Dl(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),To(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!ce)return Ae(t),null}else 2*ye()-i.renderingStartTime>Gr&&n!==1073741824&&(t.flags|=128,r=!0,To(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ye(),t.sibling=null,n=de.current,oe(de,r?n&1|2:n&1),t):(Ae(t),null);case 22:case 23:return nc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Ge&1073741824)!==0&&(Ae(t),t.subtreeFlags&6&&(t.flags|=8192)):Ae(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function $1(e,t){switch(Ru(t),t.tag){case 1:return We(t.type)&&Cl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zr(),ae(je),ae(Re),Wu(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ju(t),null;case 13:if(ae(de),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(de),null;case 4:return Zr(),null;case 10:return Hu(t.type._context),null;case 22:case 23:return nc(),null;case 24:return null;default:return null}}var il=!1,Oe=!1,F1=typeof WeakSet=="function"?WeakSet:Set,V=null;function Lr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){me(e,t,r)}else n.current=null}function du(e,t,n){try{n()}catch(r){me(e,t,r)}}var Zf=!1;function H1(e,t){if(Ka=Sl,e=jp(),Au(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,c=0,f=e,h=null;t:for(;;){for(var g;f!==n||o!==0&&f.nodeType!==3||(s=l+o),f!==i||r!==0&&f.nodeType!==3||(a=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(g=f.firstChild)!==null;)h=f,f=g;for(;;){if(f===e)break t;if(h===n&&++u===o&&(s=l),h===i&&++c===r&&(a=l),(g=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=g}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Za={focusedElem:e,selectionRange:n},Sl=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var _=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var w=_.memoizedProps,E=_.memoizedState,d=t.stateNode,p=d.getSnapshotBeforeUpdate(t.elementType===t.type?w:Et(t.type,w),E);d.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(y){me(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return _=Zf,Zf=!1,_}function jo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&du(t,n,i)}o=o.next}while(o!==r)}}function Zl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function fu(e){var t=e.ref;if(t!==null){var n=e.stateNode;e.tag,e=n,typeof t=="function"?t(e):t.current=e}}function Hh(e){var t=e.alternate;t!==null&&(e.alternate=null,Hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Lt],delete t[ri],delete t[qa],delete t[S1],delete t[E1])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Bh(e){return e.tag===5||e.tag===3||e.tag===4}function Qf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Nl));else if(r!==4&&(e=e.child,e!==null))for(pu(e,t,n),e=e.sibling;e!==null;)pu(e,t,n),e=e.sibling}function hu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(hu(e,t,n),e=e.sibling;e!==null;)hu(e,t,n),e=e.sibling}var be=null,kt=!1;function cn(e,t,n){for(n=n.child;n!==null;)Vh(e,t,n),n=n.sibling}function Vh(e,t,n){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(Bl,n)}catch{}switch(n.tag){case 5:Oe||Lr(n,t);case 6:var r=be,o=kt;be=null,cn(e,t,n),be=r,kt=o,be!==null&&(kt?(e=be,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):be.removeChild(n.stateNode));break;case 18:be!==null&&(kt?(e=be,n=n.stateNode,e.nodeType===8?ya(e.parentNode,n):e.nodeType===1&&ya(e,n),qo(e)):ya(be,n.stateNode));break;case 4:r=be,o=kt,be=n.stateNode.containerInfo,kt=!0,cn(e,t,n),be=r,kt=o;break;case 0:case 11:case 14:case 15:if(!Oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&((i&2)!==0||(i&4)!==0)&&du(n,t,l),o=o.next}while(o!==r)}cn(e,t,n);break;case 1:if(!Oe&&(Lr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){me(n,t,s)}cn(e,t,n);break;case 21:cn(e,t,n);break;case 22:n.mode&1?(Oe=(r=Oe)||n.memoizedState!==null,cn(e,t,n),Oe=r):cn(e,t,n);break;default:cn(e,t,n)}}function Gf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new F1),t.forEach(function(r){var o=Z1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function St(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:be=s.stateNode,kt=!1;break e;case 3:be=s.stateNode.containerInfo,kt=!0;break e;case 4:be=s.stateNode.containerInfo,kt=!0;break e}s=s.return}if(be===null)throw Error(O(160));Vh(i,l,o),be=null,kt=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){me(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Uh(t,e),t=t.sibling}function Uh(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(St(t,e),Ot(e),r&4){try{jo(3,e,e.return),Zl(3,e)}catch(w){me(e,e.return,w)}try{jo(5,e,e.return)}catch(w){me(e,e.return,w)}}break;case 1:St(t,e),Ot(e),r&512&&n!==null&&Lr(n,n.return);break;case 5:if(St(t,e),Ot(e),r&512&&n!==null&&Lr(n,n.return),e.flags&32){var o=e.stateNode;try{Ko(o,"")}catch(w){me(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,l=n!==null?n.memoizedProps:i,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&dp(o,i),$a(s,l);var u=$a(s,i);for(l=0;l<a.length;l+=2){var c=a[l],f=a[l+1];c==="style"?gp(o,f):c==="dangerouslySetInnerHTML"?hp(o,f):c==="children"?Ko(o,f):_u(o,c,f,u)}switch(s){case"input":Da(o,i);break;case"textarea":fp(o,i);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var g=i.value;g!=null?Fr(o,!!i.multiple,g,!1):h!==!!i.multiple&&(i.defaultValue!=null?Fr(o,!!i.multiple,i.defaultValue,!0):Fr(o,!!i.multiple,i.multiple?[]:"",!1))}o[ri]=i}catch(w){me(e,e.return,w)}}break;case 6:if(St(t,e),Ot(e),r&4){if(e.stateNode===null)throw Error(O(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){me(e,e.return,w)}}break;case 3:if(St(t,e),Ot(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{qo(t.containerInfo)}catch(w){me(e,e.return,w)}break;case 4:St(t,e),Ot(e);break;case 13:St(t,e),Ot(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(ec=ye())),r&4&&Gf(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Oe=(u=Oe)||c,St(t,e),Oe=u):St(t,e),Ot(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&(e.mode&1)!==0)for(V=e,c=e.child;c!==null;){for(f=V=c;V!==null;){switch(h=V,g=h.child,h.tag){case 0:case 11:case 14:case 15:jo(4,h,h.return);break;case 1:Lr(h,h.return);var _=h.stateNode;if(typeof _.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,_.props=t.memoizedProps,_.state=t.memoizedState,_.componentWillUnmount()}catch(w){me(r,n,w)}}break;case 5:Lr(h,h.return);break;case 22:if(h.memoizedState!==null){Jf(f);continue}}g!==null?(g.return=h,V=g):Jf(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{o=f.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=f.stateNode,a=f.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=mp("display",l))}catch(w){me(e,e.return,w)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(w){me(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:St(t,e),Ot(e),r&4&&Gf(e);break;case 21:break;default:St(t,e),Ot(e)}}function Ot(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Bh(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Ko(o,""),r.flags&=-33);var i=Qf(e);hu(e,i,o);break;case 3:case 4:var l=r.stateNode.containerInfo,s=Qf(e);pu(e,s,l);break;default:throw Error(O(161))}}catch(a){me(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function B1(e,t,n){V=e,jh(e,t,n)}function jh(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var o=V,i=o.child;if(o.tag===22&&r){var l=o.memoizedState!==null||il;if(!l){var s=o.alternate,a=s!==null&&s.memoizedState!==null||Oe;s=il;var u=Oe;if(il=l,(Oe=a)&&!u)for(V=o;V!==null;)l=V,a=l.child,l.tag===22&&l.memoizedState!==null?ep(o):a!==null?(a.return=l,V=a):ep(o);for(;i!==null;)V=i,jh(i,t,n),i=i.sibling;V=o,il=s,Oe=u}qf(e,t,n)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,V=i):qf(e,t,n)}}function qf(e){for(;V!==null;){var t=V;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Oe||Zl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Oe)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Et(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Rf(t,i,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Rf(t,l,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&qo(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}Oe||t.flags&512&&fu(t)}catch(h){me(t,t.return,h)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function Jf(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function ep(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Zl(4,t)}catch(a){me(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){me(t,o,a)}}var i=t.return;try{fu(t)}catch(a){me(t,i,a)}break;case 5:var l=t.return;try{fu(t)}catch(a){me(t,l,a)}}}catch(a){me(t,t.return,a)}if(t===e){V=null;break}var s=t.sibling;if(s!==null){s.return=t.return,V=s;break}V=t.return}}var V1=Math.ceil,Rl=nn.ReactCurrentDispatcher,qu=nn.ReactCurrentOwner,pt=nn.ReactCurrentBatchConfig,Q=0,Ce=null,ve=null,ze=0,Ge=0,$r=bn(0),Se=0,ui=null,nr=0,Ql=0,Ju=0,Wo=null,Ve=null,ec=0,Gr=1/0,Xt=null,Ll=!1,mu=null,Sn=null,ll=!1,gn=null,$l=0,Yo=0,gu=null,hl=-1,ml=0;function Fe(){return(Q&6)!==0?ye():hl!==-1?hl:hl=ye()}function En(e){return(e.mode&1)===0?1:(Q&2)!==0&&ze!==0?ze&-ze:N1.transition!==null?(ml===0&&(ml=bp()),ml):(e=ee,e!==0||(e=window.event,e=e===void 0?16:Op(e.type)),e)}function Mt(e,t,n,r){if(50<Yo)throw Yo=0,gu=null,Error(O(185));ci(e,n,r),((Q&2)===0||e!==Ce)&&(e===Ce&&((Q&2)===0&&(Ql|=n),Se===4&&hn(e,ze)),Ye(e,r),n===1&&Q===0&&(t.mode&1)===0&&(Gr=ye()+500,Yl&&zn()))}function Ye(e,t){var n=e.callbackNode;Mv(e,t);var r=_l(e,e===Ce?ze:0);if(r===0)n!==null&&af(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&af(n),t===1)e.tag===0?k1(tp.bind(null,e)):eh(tp.bind(null,e)),x1(function(){(Q&6)===0&&zn()}),n=null;else{switch(zp(r)){case 1:n=Cu;break;case 4:n=Cp;break;case 16:n=xl;break;case 536870912:n=Mp;break;default:n=xl}n=qh(n,Wh.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Wh(e,t){if(hl=-1,ml=0,(Q&6)!==0)throw Error(O(327));var n=e.callbackNode;if(jr()&&e.callbackNode!==n)return null;var r=_l(e,e===Ce?ze:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Fl(e,r);else{t=r;var o=Q;Q|=2;var i=Xh();(Ce!==e||ze!==t)&&(Xt=null,Gr=ye()+500,Gn(e,t));do try{W1();break}catch(s){Yh(e,s)}while(!0);Fu(),Rl.current=i,Q=o,ve!==null?t=0:(Ce=null,ze=0,t=Se)}if(t!==0){if(t===2&&(o=Ua(e),o!==0&&(r=o,t=yu(e,o))),t===1)throw n=ui,Gn(e,0),hn(e,r),Ye(e,ye()),n;if(t===6)hn(e,r);else{if(o=e.current.alternate,(r&30)===0&&!U1(o)&&(t=Fl(e,r),t===2&&(i=Ua(e),i!==0&&(r=i,t=yu(e,i))),t===1))throw n=ui,Gn(e,0),hn(e,r),Ye(e,ye()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:Xn(e,Ve,Xt);break;case 3:if(hn(e,r),(r&130023424)===r&&(t=ec+500-ye(),10<t)){if(_l(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Fe(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ga(Xn.bind(null,e,Ve,Xt),t);break}Xn(e,Ve,Xt);break;case 4:if(hn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-Ct(r);i=1<<l,l=t[l],l>o&&(o=l),r&=~i}if(r=o,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*V1(r/1960))-r,10<r){e.timeoutHandle=Ga(Xn.bind(null,e,Ve,Xt),r);break}Xn(e,Ve,Xt);break;case 5:Xn(e,Ve,Xt);break;default:throw Error(O(329))}}}return Ye(e,ye()),e.callbackNode===n?Wh.bind(null,e):null}function yu(e,t){var n=Wo;return e.current.memoizedState.isDehydrated&&(Gn(e,t).flags|=256),e=Fl(e,t),e!==2&&(t=Ve,Ve=n,t!==null&&vu(t)),e}function vu(e){Ve===null?Ve=e:Ve.push.apply(Ve,e)}function U1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!bt(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function hn(e,t){for(t&=~Ju,t&=~Ql,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ct(t),r=1<<n;e[n]=-1,t&=~r}}function tp(e){if((Q&6)!==0)throw Error(O(327));jr();var t=_l(e,0);if((t&1)===0)return Ye(e,ye()),null;var n=Fl(e,t);if(e.tag!==0&&n===2){var r=Ua(e);r!==0&&(t=r,n=yu(e,r))}if(n===1)throw n=ui,Gn(e,0),hn(e,t),Ye(e,ye()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xn(e,Ve,Xt),Ye(e,ye()),null}function tc(e,t){var n=Q;Q|=1;try{return e(t)}finally{Q=n,Q===0&&(Gr=ye()+500,Yl&&zn())}}function rr(e){gn!==null&&gn.tag===0&&(Q&6)===0&&jr();var t=Q;Q|=1;var n=pt.transition,r=ee;try{if(pt.transition=null,ee=1,e)return e()}finally{ee=r,pt.transition=n,Q=t,(Q&6)===0&&zn()}}function nc(){Ge=$r.current,ae($r)}function Gn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,w1(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(Ru(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Cl();break;case 3:Zr(),ae(je),ae(Re),Wu();break;case 5:ju(r);break;case 4:Zr();break;case 13:ae(de);break;case 19:ae(de);break;case 10:Hu(r.type._context);break;case 22:case 23:nc()}n=n.return}if(Ce=e,ve=e=kn(e.current,null),ze=Ge=t,Se=0,ui=null,Ju=Ql=nr=0,Ve=Wo=null,Zn!==null){for(t=0;t<Zn.length;t++)if(n=Zn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var l=i.next;i.next=o,r.next=l}n.pending=r}Zn=null}return e}function Yh(e,t){do{var n=ve;try{if(Fu(),dl.current=Ol,Al){for(var r=fe.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Al=!1}if(tr=0,Ne=_e=fe=null,Uo=!1,li=0,qu.current=null,n===null||n.return===null){Se=1,ui=t,ve=null;break}e:{var i=e,l=n.return,s=n,a=t;if(t=ze,s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=s,f=c.tag;if((c.mode&1)===0&&(f===0||f===11||f===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=Vf(l);if(g!==null){g.flags&=-257,Uf(g,l,s,i,t),g.mode&1&&Bf(i,u,t),t=g,a=u;var _=t.updateQueue;if(_===null){var w=new Set;w.add(a),t.updateQueue=w}else _.add(a);break e}else{if((t&1)===0){Bf(i,u,t),rc();break e}a=Error(O(426))}}else if(ce&&s.mode&1){var E=Vf(l);if(E!==null){(E.flags&65536)===0&&(E.flags|=256),Uf(E,l,s,i,t),Lu(Qr(a,s));break e}}i=a=Qr(a,s),Se!==4&&(Se=2),Wo===null?Wo=[i]:Wo.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var d=zh(i,a,t);Of(i,d);break e;case 1:s=a;var p=i.type,m=i.stateNode;if((i.flags&128)===0&&(typeof p.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Sn===null||!Sn.has(m)))){i.flags|=65536,t&=-t,i.lanes|=t;var y=Ph(i,s,t);Of(i,y);break e}}i=i.return}while(i!==null)}Zh(n)}catch(k){t=k,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(!0)}function Xh(){var e=Rl.current;return Rl.current=Ol,e===null?Ol:e}function rc(){(Se===0||Se===3||Se===2)&&(Se=4),Ce===null||(nr&268435455)===0&&(Ql&268435455)===0||hn(Ce,ze)}function Fl(e,t){var n=Q;Q|=2;var r=Xh();(Ce!==e||ze!==t)&&(Xt=null,Gn(e,t));do try{j1();break}catch(o){Yh(e,o)}while(!0);if(Fu(),Q=n,Rl.current=r,ve!==null)throw Error(O(261));return Ce=null,ze=0,Se}function j1(){for(;ve!==null;)Kh(ve)}function W1(){for(;ve!==null&&!vv();)Kh(ve)}function Kh(e){var t=Gh(e.alternate,e,Ge);e.memoizedProps=e.pendingProps,t===null?Zh(e):ve=t,qu.current=null}function Zh(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=L1(n,t,Ge),n!==null){ve=n;return}}else{if(n=$1(n,t),n!==null){n.flags&=32767,ve=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Se=6,ve=null;return}}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Se===0&&(Se=5)}function Xn(e,t,n){var r=ee,o=pt.transition;try{pt.transition=null,ee=1,Y1(e,t,n,r)}finally{pt.transition=o,ee=r}return null}function Y1(e,t,n,r){do jr();while(gn!==null);if((Q&6)!==0)throw Error(O(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(O(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(bv(e,i),e===Ce&&(ve=Ce=null,ze=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||ll||(ll=!0,qh(xl,function(){return jr(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=pt.transition,pt.transition=null;var l=ee;ee=1;var s=Q;Q|=4,qu.current=null,H1(e,n),Uh(n,e),h1(Za),Sl=!!Ka,Za=Ka=null,e.current=n,B1(n,e,o),wv(),Q=s,ee=l,pt.transition=i}else e.current=n;if(ll&&(ll=!1,gn=e,$l=o),i=e.pendingLanes,i===0&&(Sn=null),Sv(n.stateNode,r),Ye(e,ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ll)throw Ll=!1,e=mu,mu=null,e;return($l&1)!==0&&e.tag!==0&&jr(),i=e.pendingLanes,(i&1)!==0?e===gu?Yo++:(Yo=0,gu=e):Yo=0,zn(),null}function jr(){if(gn!==null){var e=zp($l),t=pt.transition,n=ee;try{if(pt.transition=null,ee=16>e?16:e,gn===null)var r=!1;else{if(e=gn,gn=null,$l=0,(Q&6)!==0)throw Error(O(331));var o=Q;for(Q|=4,V=e.current;V!==null;){var i=V,l=i.child;if((V.flags&16)!==0){var s=i.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(V=u;V!==null;){var c=V;switch(c.tag){case 0:case 11:case 15:jo(8,c,i)}var f=c.child;if(f!==null)f.return=c,V=f;else for(;V!==null;){c=V;var h=c.sibling,g=c.return;if(Hh(c),c===u){V=null;break}if(h!==null){h.return=g,V=h;break}V=g}}}var _=i.alternate;if(_!==null){var w=_.child;if(w!==null){_.child=null;do{var E=w.sibling;w.sibling=null,w=E}while(w!==null)}}V=i}}if((i.subtreeFlags&2064)!==0&&l!==null)l.return=i,V=l;else e:for(;V!==null;){if(i=V,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:jo(9,i,i.return)}var d=i.sibling;if(d!==null){d.return=i.return,V=d;break e}V=i.return}}var p=e.current;for(V=p;V!==null;){l=V;var m=l.child;if((l.subtreeFlags&2064)!==0&&m!==null)m.return=l,V=m;else e:for(l=p;V!==null;){if(s=V,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:Zl(9,s)}}catch(k){me(s,s.return,k)}if(s===l){V=null;break e}var y=s.sibling;if(y!==null){y.return=s.return,V=y;break e}V=s.return}}if(Q=o,zn(),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(Bl,e)}catch{}r=!0}return r}finally{ee=n,pt.transition=t}}return!1}function np(e,t,n){t=Qr(n,t),t=zh(e,t,1),e=_n(e,t,1),t=Fe(),e!==null&&(ci(e,1,t),Ye(e,t))}function me(e,t,n){if(e.tag===3)np(e,e,n);else for(;t!==null;){if(t.tag===3){np(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Sn===null||!Sn.has(r))){e=Qr(n,e),e=Ph(t,e,1),t=_n(t,e,1),e=Fe(),t!==null&&(ci(t,1,e),Ye(t,e));break}}t=t.return}}function X1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&n,Ce===e&&(ze&n)===n&&(Se===4||Se===3&&(ze&130023424)===ze&&500>ye()-ec?Gn(e,0):Ju|=n),Ye(e,t)}function Qh(e,t){t===0&&((e.mode&1)===0?t=1:(t=Yi,Yi<<=1,(Yi&130023424)===0&&(Yi=4194304)));var n=Fe();e=en(e,t),e!==null&&(ci(e,t,n),Ye(e,n))}function K1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qh(e,n)}function Z1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(O(314))}r!==null&&r.delete(t),Qh(e,n)}var Gh;Gh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||je.current)Ue=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ue=!1,R1(e,t,n);Ue=(e.flags&131072)!==0}else Ue=!1,ce&&(t.flags&1048576)!==0&&th(t,zl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pl(e,t),e=t.pendingProps;var o=Yr(t,Re.current);Ur(t,n),o=Xu(null,t,r,e,o,n);var i=Ku();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,We(r)?(i=!0,Ml(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Vu(t),o.updater=Kl,t.stateNode=o,o._reactInternals=t,ou(t,r,e,n),t=su(null,t,r,!0,i,n)):(t.tag=0,ce&&i&&Ou(t),$e(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=G1(r),e=Et(r,e),o){case 0:t=lu(null,t,r,e,n);break e;case 1:t=Yf(null,t,r,e,n);break e;case 11:t=jf(null,t,r,e,n);break e;case 14:t=Wf(null,t,r,Et(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Et(r,o),lu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Et(r,o),Yf(e,t,r,o,n);case 3:e:{if(Ah(t),e===null)throw Error(O(387));r=t.pendingProps,i=t.memoizedState,o=i.element,sh(e,t),Il(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Qr(Error(O(423)),t),t=Xf(e,t,r,n,o);break e}else if(r!==o){o=Qr(Error(O(424)),t),t=Xf(e,t,r,n,o);break e}else for(qe=xn(t.stateNode.containerInfo.firstChild),Je=t,ce=!0,Nt=null,n=ih(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Xr(),r===o){t=tn(e,t,n);break e}$e(e,t,r,n)}t=t.child}return t;case 5:return ah(t),e===null&&tu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,Qa(r,o)?l=null:i!==null&&Qa(r,i)&&(t.flags|=32),Dh(e,t),$e(e,t,l,n),t.child;case 6:return e===null&&tu(t),null;case 13:return Oh(e,t,n);case 4:return Uu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Kr(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Et(r,o),jf(e,t,r,o,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,oe(Pl,r._currentValue),r._currentValue=l,i!==null)if(bt(i.value,l)){if(i.children===o.children&&!je.current){t=tn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Gt(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),nu(i.return,n,t),s.lanes|=n;break}a=a.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(O(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),nu(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}$e(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ur(t,n),o=ht(o),r=r(o),t.flags|=1,$e(e,t,r,n),t.child;case 14:return r=t.type,o=Et(r,t.pendingProps),o=Et(r.type,o),Wf(e,t,r,o,n);case 15:return Th(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Et(r,o),pl(e,t),t.tag=1,We(r)?(e=!0,Ml(t)):e=!1,Ur(t,n),bh(t,r,o),ou(t,r,o,n),su(null,t,r,!0,e,n);case 19:return Rh(e,t,n);case 22:return Ih(e,t,n)}throw Error(O(156,t.tag))};function qh(e,t){return Np(e,t)}function Q1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ft(e,t,n,r){return new Q1(e,t,n,r)}function oc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function G1(e){if(typeof e=="function")return oc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Eu)return 11;if(e===ku)return 14}return 2}function kn(e,t){var n=e.alternate;return n===null?(n=ft(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function gl(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")oc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case br:return qn(n.children,o,i,t);case Su:l=8,o|=8;break;case ba:return e=ft(12,n,t,o|2),e.elementType=ba,e.lanes=i,e;case za:return e=ft(13,n,t,o),e.elementType=za,e.lanes=i,e;case Pa:return e=ft(19,n,t,o),e.elementType=Pa,e.lanes=i,e;case ap:return Gl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case lp:l=10;break e;case sp:l=9;break e;case Eu:l=11;break e;case ku:l=14;break e;case dn:l=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=ft(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function qn(e,t,n,r){return e=ft(7,e,r,t),e.lanes=n,e}function Gl(e,t,n,r){return e=ft(22,e,r,t),e.elementType=ap,e.lanes=n,e.stateNode={isHidden:!1},e}function Na(e,t,n){return e=ft(6,e,null,t),e.lanes=n,e}function Ca(e,t,n){return t=ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function q1(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ua(0),this.expirationTimes=ua(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ua(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ic(e,t,n,r,o,i,l,s,a){return e=new q1(e,t,n,s,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ft(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Vu(i),e}function J1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Mr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Jh(e){if(!e)return Cn;e=e._reactInternals;e:{if(ir(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(We(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var n=e.type;if(We(n))return Jp(e,n,t)}return t}function em(e,t,n,r,o,i,l,s,a){return e=ic(n,r,!0,e,o,i,l,s,a),e.context=Jh(null),n=e.current,r=Fe(),o=En(n),i=Gt(r,o),i.callback=t??null,_n(n,i,o),e.current.lanes=o,ci(e,o,r),Ye(e,r),e}function ql(e,t,n,r){var o=t.current,i=Fe(),l=En(o);return n=Jh(n),t.context===null?t.context=n:t.pendingContext=n,t=Gt(i,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=_n(o,t,l),e!==null&&(Mt(e,o,l,i),cl(e,o,l)),l}function Hl(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lc(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ew(){return null}var tm=typeof reportError=="function"?reportError:function(e){console.error(e)};function sc(e){this._internalRoot=e}Jl.prototype.render=sc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));ql(e,t,null,null)};Jl.prototype.unmount=sc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rr(function(){ql(null,e,null,null)}),t[Jt]=null}};function Jl(e){this._internalRoot=e}Jl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ip();e={blockedOn:null,target:e,priority:t};for(var n=0;n<pn.length&&t!==0&&t<pn[n].priority;n++);pn.splice(n,0,e),n===0&&Ap(e)}};function ac(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function es(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function op(){}function tw(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=Hl(l);i.call(u)}}var l=em(t,r,e,0,null,!1,!1,"",op);return e._reactRootContainer=l,e[Jt]=l.current,ti(e.nodeType===8?e.parentNode:e),rr(),l}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var s=r;r=function(){var u=Hl(a);s.call(u)}}var a=ic(e,0,!1,null,null,!1,!1,"",op);return e._reactRootContainer=a,e[Jt]=a.current,ti(e.nodeType===8?e.parentNode:e),rr(function(){ql(t,a,n,r)}),a}function ts(e,t,n,r,o){var i=n._reactRootContainer;if(i){var l=i;if(typeof o=="function"){var s=o;o=function(){var a=Hl(l);s.call(a)}}ql(t,l,e,o)}else l=tw(n,t,e,o,r);return Hl(l)}Pp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ro(t.pendingLanes);n!==0&&(Mu(t,n|1),Ye(t,ye()),(Q&6)===0&&(Gr=ye()+500,zn()))}break;case 13:rr(function(){var r=en(e,1);if(r!==null){var o=Fe();Mt(r,e,1,o)}}),lc(e,1)}};bu=function(e){if(e.tag===13){var t=en(e,134217728);if(t!==null){var n=Fe();Mt(t,e,134217728,n)}lc(e,134217728)}};Tp=function(e){if(e.tag===13){var t=En(e),n=en(e,t);if(n!==null){var r=Fe();Mt(n,e,t,r)}lc(e,t)}};Ip=function(){return ee};Dp=function(e,t){var n=ee;try{return ee=e,t()}finally{ee=n}};Ha=function(e,t,n){switch(t){case"input":if(Da(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Wl(r);if(!o)throw Error(O(90));cp(r),Da(r,o)}}}break;case"textarea":fp(e,n);break;case"select":t=n.value,t!=null&&Fr(e,!!n.multiple,t,!1)}};wp=tc;xp=rr;var nw={usingClientEntryPoint:!1,Events:[fi,Ir,Wl,yp,vp,tc]},Io={findFiberByHostInstance:Kn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},rw={bundleType:Io.bundleType,version:Io.version,rendererPackageName:Io.rendererPackageName,rendererConfig:Io.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:nn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ep(e),e===null?null:e.stateNode},findFiberByHostInstance:Io.findFiberByHostInstance||ew,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Do=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Do.isDisabled&&Do.supportsFiber))try{Bl=Do.inject(rw),$t=Do}catch{}var Do;nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nw;nt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ac(t))throw Error(O(200));return J1(e,t,null,n)};nt.createRoot=function(e,t){if(!ac(e))throw Error(O(299));var n=!1,r="",o=tm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ic(e,1,!1,null,null,n,!1,r,o),e[Jt]=t.current,ti(e.nodeType===8?e.parentNode:e),new sc(t)};nt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=Ep(t),e=e===null?null:e.stateNode,e};nt.flushSync=function(e){return rr(e)};nt.hydrate=function(e,t,n){if(!es(t))throw Error(O(200));return ts(null,e,t,!0,n)};nt.hydrateRoot=function(e,t,n){if(!ac(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",l=tm;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=em(t,null,e,1,n??null,o,!1,i,l),e[Jt]=t.current,ti(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Jl(t)};nt.render=function(e,t,n){if(!es(t))throw Error(O(200));return ts(null,e,t,!1,n)};nt.unmountComponentAtNode=function(e){if(!es(e))throw Error(O(40));return e._reactRootContainer?(rr(function(){ts(null,null,e,!1,function(){e._reactRootContainer=null,e[Jt]=null})}),!0):!1};nt.unstable_batchedUpdates=tc;nt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!es(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return ts(e,t,n,!1,r)};nt.version="18.3.1-next-f1338f8080-20240426"});var ns=Qe((Ck,om)=>{"use strict";function rm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(rm)}catch(e){console.error(e)}}rm(),om.exports=nm()});var lm=Qe(uc=>{"use strict";var im=ns();uc.createRoot=im.createRoot,uc.hydrateRoot=im.hydrateRoot;var Mk});var am=Qe(sm=>{"use strict";var eo=xt();function ow(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var iw=typeof Object.is=="function"?Object.is:ow,lw=eo.useState,sw=eo.useEffect,aw=eo.useLayoutEffect,uw=eo.useDebugValue;function cw(e,t){var n=t(),r=lw({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return aw(function(){o.value=n,o.getSnapshot=t,cc(o)&&i({inst:o})},[e,n,t]),sw(function(){return cc(o)&&i({inst:o}),e(function(){cc(o)&&i({inst:o})})},[e]),uw(n),n}function cc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!iw(e,n)}catch{return!0}}function dw(e,t){return t()}var fw=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?dw:cw;sm.useSyncExternalStore=eo.useSyncExternalStore!==void 0?eo.useSyncExternalStore:fw});var cm=Qe((Tk,um)=>{"use strict";um.exports=am()});var fm=Qe(dm=>{"use strict";var rs=xt(),pw=cm();function hw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mw=typeof Object.is=="function"?Object.is:hw,gw=pw.useSyncExternalStore,yw=rs.useRef,vw=rs.useEffect,ww=rs.useMemo,xw=rs.useDebugValue;dm.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=yw(null);if(i.current===null){var l={hasValue:!1,value:null};i.current=l}else l=i.current;i=ww(function(){function a(g){if(!u){if(u=!0,c=g,g=r(g),o!==void 0&&l.hasValue){var _=l.value;if(o(_,g))return f=_}return f=g}if(_=f,mw(c,g))return _;var w=r(g);return o!==void 0&&o(_,w)?(c=g,_):(c=g,f=w)}var u=!1,c,f,h=n===void 0?null:n;return[function(){return a(t())},h===null?void 0:function(){return a(h())}]},[t,n,r,o]);var s=gw(e,i[0],i[1]);return vw(function(){l.hasValue=!0,l.value=s},[s]),xw(s),s}});var hm=Qe((Dk,pm)=>{"use strict";pm.exports=fm()});var Q0=Qe(Fs=>{"use strict";var ok=xt(),ik=Symbol.for("react.element"),lk=Symbol.for("react.fragment"),sk=Object.prototype.hasOwnProperty,ak=ok.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uk={key:!0,ref:!0,__self:!0,__source:!0};function Z0(e,t,n){var r,o={},i=null,l=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)sk.call(t,r)&&!uk.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:ik,type:e,key:i,ref:l,props:o,_owner:ak.current}}Fs.Fragment=lk;Fs.jsx=Z0;Fs.jsxs=Z0});var _d=Qe((pC,G0)=>{"use strict";G0.exports=Q0()});var q0=at(lm(),1),ne=at(xt(),1);var x=at(xt(),1);function we(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=we(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var vm=at(xt(),1),wm=at(hm(),1);var mm=e=>{let t,n=new Set,r=(c,f)=>{let h=typeof c=="function"?c(t):c;if(!Object.is(h,t)){let g=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(_=>_(t,g))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(import.meta.env?import.meta.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,a);return a},gm=e=>e?mm(e):mm;var{useDebugValue:_w}=vm.default,{useSyncExternalStoreWithSelector:Sw}=wm.default,Ew=e=>e;function dc(e,t=Ew,n){let r=Sw(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return _w(r),r}var ym=(e,t)=>{let n=gm(e),r=(o,i=t)=>dc(n,o,i);return Object.assign(r,n),r},xm=(e,t)=>e?ym(e,t):ym;function Ee(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var kw={value:()=>{}};function lr(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new os(n)}function os(e){this._=e}function Nw(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}os.prototype=lr.prototype={constructor:os,on:function(e,t){var n=this._,r=Nw(e+"",n),o,i=-1,l=r.length;if(arguments.length<2){for(;++i<l;)if((o=(e=r[i]).type)&&(o=Cw(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<l;)if(o=(e=r[i]).type)n[o]=_m(n[o],e.name,t);else if(t==null)for(o in n)n[o]=_m(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new os(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function Cw(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function _m(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=kw,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var fc="http://www.w3.org/1999/xhtml",Sm={svg:"http://www.w3.org/2000/svg",xhtml:fc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function hi(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Sm.hasOwnProperty(t)?{space:Sm[t],local:e}:e}function Mw(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===fc&&t.documentElement.namespaceURI===fc?t.createElement(e):t.createElementNS(n,e)}}function bw(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Em(e){var t=hi(e);return(t.local?bw:Mw)(t)}function zw(){}function ls(e){return e==null?zw:function(){return this.querySelector(e)}}function Pw(e){typeof e!="function"&&(e=ls(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],l=i.length,s=r[o]=new Array(l),a,u,c=0;c<l;++c)(a=i[c])&&(u=e.call(a,a.__data__,c,i))&&("__data__"in a&&(u.__data__=a.__data__),s[c]=u);return new rt(r,this._parents)}function Tw(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Iw(){return[]}function hc(e){return e==null?Iw:function(){return this.querySelectorAll(e)}}function Dw(e){return function(){return Tw(e.apply(this,arguments))}}function Aw(e){typeof e=="function"?e=Dw(e):e=hc(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var l=t[i],s=l.length,a,u=0;u<s;++u)(a=l[u])&&(r.push(e.call(a,a.__data__,u,l)),o.push(a));return new rt(r,o)}function mc(e){return function(){return this.matches(e)}}function km(e){return function(t){return t.matches(e)}}var Ow=Array.prototype.find;function Rw(e){return function(){return Ow.call(this.children,e)}}function Lw(){return this.firstElementChild}function $w(e){return this.select(e==null?Lw:Rw(typeof e=="function"?e:km(e)))}var Fw=Array.prototype.filter;function Hw(){return Array.from(this.children)}function Bw(e){return function(){return Fw.call(this.children,e)}}function Vw(e){return this.selectAll(e==null?Hw:Bw(typeof e=="function"?e:km(e)))}function Uw(e){typeof e!="function"&&(e=mc(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],l=i.length,s=r[o]=[],a,u=0;u<l;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&s.push(a);return new rt(r,this._parents)}function Nm(e){return new Array(e.length)}function jw(){return new rt(this._enter||this._groups.map(Nm),this._parents)}function is(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}is.prototype={constructor:is,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ww(e){return function(){return e}}function Yw(e,t,n,r,o,i){for(var l=0,s,a=t.length,u=i.length;l<u;++l)(s=t[l])?(s.__data__=i[l],r[l]=s):n[l]=new is(e,i[l]);for(;l<a;++l)(s=t[l])&&(o[l]=s)}function Xw(e,t,n,r,o,i,l){var s,a,u=new Map,c=t.length,f=i.length,h=new Array(c),g;for(s=0;s<c;++s)(a=t[s])&&(h[s]=g=l.call(a,a.__data__,s,t)+"",u.has(g)?o[s]=a:u.set(g,a));for(s=0;s<f;++s)g=l.call(e,i[s],s,i)+"",(a=u.get(g))?(r[s]=a,a.__data__=i[s],u.delete(g)):n[s]=new is(e,i[s]);for(s=0;s<c;++s)(a=t[s])&&u.get(h[s])===a&&(o[s]=a)}function Kw(e){return e.__data__}function Zw(e,t){if(!arguments.length)return Array.from(this,Kw);var n=t?Xw:Yw,r=this._parents,o=this._groups;typeof e!="function"&&(e=Ww(e));for(var i=o.length,l=new Array(i),s=new Array(i),a=new Array(i),u=0;u<i;++u){var c=r[u],f=o[u],h=f.length,g=Qw(e.call(c,c&&c.__data__,u,r)),_=g.length,w=s[u]=new Array(_),E=l[u]=new Array(_),d=a[u]=new Array(h);n(c,f,w,E,d,g,t);for(var p=0,m=0,y,k;p<_;++p)if(y=w[p]){for(p>=m&&(m=p+1);!(k=E[m])&&++m<_;);y._next=k||null}}return l=new rt(l,r),l._enter=s,l._exit=a,l}function Qw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Gw(){return new rt(this._exit||this._groups.map(Nm),this._parents)}function qw(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function Jw(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,l=Math.min(o,i),s=new Array(o),a=0;a<l;++a)for(var u=n[a],c=r[a],f=u.length,h=s[a]=new Array(f),g,_=0;_<f;++_)(g=u[_]||c[_])&&(h[_]=g);for(;a<o;++a)s[a]=n[a];return new rt(s,this._parents)}function ex(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],l;--o>=0;)(l=r[o])&&(i&&l.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(l,i),i=l);return this}function tx(e){e||(e=nx);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var l=n[i],s=l.length,a=o[i]=new Array(s),u,c=0;c<s;++c)(u=l[c])&&(a[c]=u);a.sort(t)}return new rt(o,this._parents).order()}function nx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function rx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ox(){return Array.from(this)}function ix(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var l=r[o];if(l)return l}return null}function lx(){let e=0;for(let t of this)++e;return e}function sx(){return!this.node()}function ax(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,l=o.length,s;i<l;++i)(s=o[i])&&e.call(s,s.__data__,i,o);return this}function ux(e){return function(){this.removeAttribute(e)}}function cx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dx(e,t){return function(){this.setAttribute(e,t)}}function fx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function px(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function hx(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function mx(e,t){var n=hi(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?cx:ux:typeof t=="function"?n.local?hx:px:n.local?fx:dx)(n,t))}function Cm(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function gx(e){return function(){this.style.removeProperty(e)}}function yx(e,t,n){return function(){this.style.setProperty(e,t,n)}}function vx(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function wx(e,t,n){return arguments.length>1?this.each((t==null?gx:typeof t=="function"?vx:yx)(e,t,n??"")):sr(this.node(),e)}function sr(e,t){return e.style.getPropertyValue(t)||Cm(e).getComputedStyle(e,null).getPropertyValue(t)}function xx(e){return function(){delete this[e]}}function _x(e,t){return function(){this[e]=t}}function Sx(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ex(e,t){return arguments.length>1?this.each((t==null?xx:typeof t=="function"?Sx:_x)(e,t)):this.node()[e]}function Mm(e){return e.trim().split(/^|\s+/)}function gc(e){return e.classList||new bm(e)}function bm(e){this._node=e,this._names=Mm(e.getAttribute("class")||"")}bm.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function zm(e,t){for(var n=gc(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Pm(e,t){for(var n=gc(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function kx(e){return function(){zm(this,e)}}function Nx(e){return function(){Pm(this,e)}}function Cx(e,t){return function(){(t.apply(this,arguments)?zm:Pm)(this,e)}}function Mx(e,t){var n=Mm(e+"");if(arguments.length<2){for(var r=gc(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Cx:t?kx:Nx)(n,t))}function bx(){this.textContent=""}function zx(e){return function(){this.textContent=e}}function Px(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Tx(e){return arguments.length?this.each(e==null?bx:(typeof e=="function"?Px:zx)(e)):this.node().textContent}function Ix(){this.innerHTML=""}function Dx(e){return function(){this.innerHTML=e}}function Ax(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ox(e){return arguments.length?this.each(e==null?Ix:(typeof e=="function"?Ax:Dx)(e)):this.node().innerHTML}function Rx(){this.nextSibling&&this.parentNode.appendChild(this)}function Lx(){return this.each(Rx)}function $x(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Fx(){return this.each($x)}function Hx(e){var t=typeof e=="function"?e:Em(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Bx(){return null}function Vx(e,t){var n=typeof e=="function"?e:Em(e),r=t==null?Bx:typeof t=="function"?t:ls(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Ux(){var e=this.parentNode;e&&e.removeChild(this)}function jx(){return this.each(Ux)}function Wx(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Yx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Xx(e){return this.select(e?Yx:Wx)}function Kx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Zx(e){return function(t){e.call(this,t,this.__data__)}}function Qx(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Gx(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function qx(e,t,n){return function(){var r=this.__on,o,i=Zx(t);if(r){for(var l=0,s=r.length;l<s;++l)if((o=r[l]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function Jx(e,t,n){var r=Qx(e+""),o,i=r.length,l;if(arguments.length<2){var s=this.node().__on;if(s){for(var a=0,u=s.length,c;a<u;++a)for(o=0,c=s[a];o<i;++o)if((l=r[o]).type===c.type&&l.name===c.name)return c.value}return}for(s=t?qx:Gx,o=0;o<i;++o)this.each(s(r[o],t,n));return this}function Tm(e,t,n){var r=Cm(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function e_(e,t){return function(){return Tm(this,e,t)}}function t_(e,t){return function(){return Tm(this,e,t.apply(this,arguments))}}function n_(e,t){return this.each((typeof t=="function"?t_:e_)(e,t))}function*r_(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,l;o<i;++o)(l=r[o])&&(yield l)}var Im=[null];function rt(e,t){this._groups=e,this._parents=t}function ar(){return new rt([[document.documentElement]],Im)}function o_(){return this}rt.prototype=ar.prototype={constructor:rt,select:Pw,selectAll:Aw,selectChild:$w,selectChildren:Vw,filter:Uw,data:Zw,enter:jw,exit:Gw,join:qw,merge:Jw,selection:o_,order:ex,sort:tx,call:rx,nodes:ox,node:ix,size:lx,empty:sx,each:ax,attr:mx,style:wx,property:Ex,classed:Mx,text:Tx,html:Ox,raise:Lx,lower:Fx,append:Hx,insert:Vx,remove:jx,clone:Xx,datum:Kx,on:Jx,dispatch:n_,[Symbol.iterator]:r_};function Xe(e){return typeof e=="string"?new rt([[document.querySelector(e)]],[document.documentElement]):new rt([[e]],Im)}var i_=0;function l_(){return new pc}function pc(){this._="@"+(++i_).toString(36)}pc.prototype=l_.prototype={constructor:pc,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function s_(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ot(e,t){if(e=s_(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}var a_={passive:!1},mi={capture:!0,passive:!1};function yc(e){e.stopImmediatePropagation()}function to(e){e.preventDefault(),e.stopImmediatePropagation()}function wc(e){var t=e.document.documentElement,n=Xe(e).on("dragstart.drag",to,mi);"onselectstart"in t?n.on("selectstart.drag",to,mi):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function xc(e,t){var n=e.document.documentElement,r=Xe(e).on("dragstart.drag",null);t&&(r.on("click.drag",to,mi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var ss=e=>()=>e;function vc(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:l,y:s,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}vc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function u_(e){return!e.ctrlKey&&!e.button}function c_(){return this.parentNode}function d_(e,t){return t??{x:e.x,y:e.y}}function f_(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dm(){var e=u_,t=c_,n=d_,r=f_,o={},i=lr("start","drag","end"),l=0,s,a,u,c,f=0;function h(y){y.on("mousedown.drag",g).filter(r).on("touchstart.drag",E).on("touchmove.drag",d,a_).on("touchend.drag touchcancel.drag",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(y,k){if(!(c||!e.call(this,y,k))){var C=m(this,t.call(this,y,k),y,k,"mouse");C&&(Xe(y.view).on("mousemove.drag",_,mi).on("mouseup.drag",w,mi),wc(y.view),yc(y),u=!1,s=y.clientX,a=y.clientY,C("start",y))}}function _(y){if(to(y),!u){var k=y.clientX-s,C=y.clientY-a;u=k*k+C*C>f}o.mouse("drag",y)}function w(y){Xe(y.view).on("mousemove.drag mouseup.drag",null),xc(y.view,u),to(y),o.mouse("end",y)}function E(y,k){if(e.call(this,y,k)){var C=y.changedTouches,P=t.call(this,y,k),N=C.length,T,I;for(T=0;T<N;++T)(I=m(this,P,y,k,C[T].identifier,C[T]))&&(yc(y),I("start",y,C[T]))}}function d(y){var k=y.changedTouches,C=k.length,P,N;for(P=0;P<C;++P)(N=o[k[P].identifier])&&(to(y),N("drag",y,k[P]))}function p(y){var k=y.changedTouches,C=k.length,P,N;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),P=0;P<C;++P)(N=o[k[P].identifier])&&(yc(y),N("end",y,k[P]))}function m(y,k,C,P,N,T){var I=i.copy(),R=ot(T||C,k),B,H,v;if((v=n.call(y,new vc("beforestart",{sourceEvent:C,target:h,identifier:N,active:l,x:R[0],y:R[1],dx:0,dy:0,dispatch:I}),P))!=null)return B=v.x-R[0]||0,H=v.y-R[1]||0,function z(M,D,$){var b=R,A;switch(M){case"start":o[N]=z,A=l++;break;case"end":delete o[N],--l;case"drag":R=ot($||D,k),A=l;break}I.call(M,y,new vc(M,{sourceEvent:D,subject:v,target:h,identifier:N,active:A,x:R[0]+B,y:R[1]+H,dx:R[0]-b[0],dy:R[1]-b[1],dispatch:I}),P)}}return h.filter=function(y){return arguments.length?(e=typeof y=="function"?y:ss(!!y),h):e},h.container=function(y){return arguments.length?(t=typeof y=="function"?y:ss(y),h):t},h.subject=function(y){return arguments.length?(n=typeof y=="function"?y:ss(y),h):n},h.touchable=function(y){return arguments.length?(r=typeof y=="function"?y:ss(!!y),h):r},h.on=function(){var y=i.on.apply(i,arguments);return y===i?h:y},h.clickDistance=function(y){return arguments.length?(f=(y=+y)*y,h):Math.sqrt(f)},h}function io(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function vi(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Pn(){}var fr=.7,oo=1/fr,no="\\s*([+-]?\\d+)\\s*",gi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",p_=/^#([0-9a-f]{3,8})$/,h_=new RegExp(`^rgb\\(${no},${no},${no}\\)$`),m_=new RegExp(`^rgb\\(${Ht},${Ht},${Ht}\\)$`),g_=new RegExp(`^rgba\\(${no},${no},${no},${gi}\\)$`),y_=new RegExp(`^rgba\\(${Ht},${Ht},${Ht},${gi}\\)$`),v_=new RegExp(`^hsl\\(${gi},${Ht},${Ht}\\)$`),w_=new RegExp(`^hsla\\(${gi},${Ht},${Ht},${gi}\\)$`),Am={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};io(Pn,pr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Om,formatHex:Om,formatHex8:x_,formatHsl:__,formatRgb:Rm,toString:Rm});function Om(){return this.rgb().formatHex()}function x_(){return this.rgb().formatHex8()}function __(){return Wm(this).formatHsl()}function Rm(){return this.rgb().formatRgb()}function pr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=p_.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Lm(t):n===3?new Me(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?as(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?as(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=h_.exec(e))?new Me(t[1],t[2],t[3],1):(t=m_.exec(e))?new Me(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=g_.exec(e))?as(t[1],t[2],t[3],t[4]):(t=y_.exec(e))?as(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=v_.exec(e))?Hm(t[1],t[2]/100,t[3]/100,1):(t=w_.exec(e))?Hm(t[1],t[2]/100,t[3]/100,t[4]):Am.hasOwnProperty(e)?Lm(Am[e]):e==="transparent"?new Me(NaN,NaN,NaN,0):null}function Lm(e){return new Me(e>>16&255,e>>8&255,e&255,1)}function as(e,t,n,r){return r<=0&&(e=t=n=NaN),new Me(e,t,n,r)}function Cc(e){return e instanceof Pn||(e=pr(e)),e?(e=e.rgb(),new Me(e.r,e.g,e.b,e.opacity)):new Me}function wi(e,t,n,r){return arguments.length===1?Cc(e):new Me(e,t,n,r??1)}function Me(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}io(Me,wi,vi(Pn,{brighter(e){return e=e==null?oo:Math.pow(oo,e),new Me(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fr:Math.pow(fr,e),new Me(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Me(cr(this.r),cr(this.g),cr(this.b),cs(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:$m,formatHex:$m,formatHex8:S_,formatRgb:Fm,toString:Fm}));function $m(){return`#${ur(this.r)}${ur(this.g)}${ur(this.b)}`}function S_(){return`#${ur(this.r)}${ur(this.g)}${ur(this.b)}${ur((isNaN(this.opacity)?1:this.opacity)*255)}`}function Fm(){let e=cs(this.opacity);return`${e===1?"rgb(":"rgba("}${cr(this.r)}, ${cr(this.g)}, ${cr(this.b)}${e===1?")":`, ${e})`}`}function cs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ur(e){return e=cr(e),(e<16?"0":"")+e.toString(16)}function Hm(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new zt(e,t,n,r)}function Wm(e){if(e instanceof zt)return new zt(e.h,e.s,e.l,e.opacity);if(e instanceof Pn||(e=pr(e)),!e)return new zt;if(e instanceof zt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),l=NaN,s=i-o,a=(i+o)/2;return s?(t===i?l=(n-r)/s+(n<r)*6:n===i?l=(r-t)/s+2:l=(t-n)/s+4,s/=a<.5?i+o:2-i-o,l*=60):s=a>0&&a<1?0:l,new zt(l,s,a,e.opacity)}function fs(e,t,n,r){return arguments.length===1?Wm(e):new zt(e,t,n,r??1)}function zt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}io(zt,fs,vi(Pn,{brighter(e){return e=e==null?oo:Math.pow(oo,e),new zt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fr:Math.pow(fr,e),new zt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Me(_c(e>=240?e-240:e+120,o,r),_c(e,o,r),_c(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new zt(Bm(this.h),us(this.s),us(this.l),cs(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(){let e=cs(this.opacity);return`${e===1?"hsl(":"hsla("}${Bm(this.h)}, ${us(this.s)*100}%, ${us(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Bm(e){return e=(e||0)%360,e<0?e+360:e}function us(e){return Math.max(0,Math.min(1,e||0))}function _c(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Ym=Math.PI/180,Xm=180/Math.PI,ds=18,Km=.96422,Zm=1,Qm=.82521,Gm=4/29,ro=6/29,qm=3*ro*ro,E_=ro*ro*ro;function Jm(e){if(e instanceof Bt)return new Bt(e.l,e.a,e.b,e.opacity);if(e instanceof rn)return tg(e);e instanceof Me||(e=Cc(e));var t=Nc(e.r),n=Nc(e.g),r=Nc(e.b),o=Sc((.2225045*t+.7168786*n+.0606169*r)/Zm),i,l;return t===n&&n===r?i=l=o:(i=Sc((.4360747*t+.3850649*n+.1430804*r)/Km),l=Sc((.0139322*t+.0971045*n+.7141733*r)/Qm)),new Bt(116*o-16,500*(i-o),200*(o-l),e.opacity)}function eg(e,t,n,r){return arguments.length===1?Jm(e):new Bt(e,t,n,r??1)}function Bt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}io(Bt,eg,vi(Pn,{brighter(e){return new Bt(this.l+ds*(e??1),this.a,this.b,this.opacity)},darker(e){return new Bt(this.l-ds*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Km*Ec(t),e=Zm*Ec(e),n=Qm*Ec(n),new Me(kc(3.1338561*t-1.6168667*e-.4906146*n),kc(-.9787684*t+1.9161415*e+.033454*n),kc(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Sc(e){return e>E_?Math.pow(e,1/3):e/qm+Gm}function Ec(e){return e>ro?e*e*e:qm*(e-Gm)}function kc(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Nc(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function k_(e){if(e instanceof rn)return new rn(e.h,e.c,e.l,e.opacity);if(e instanceof Bt||(e=Jm(e)),e.a===0&&e.b===0)return new rn(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Xm;return new rn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ps(e,t,n,r){return arguments.length===1?k_(e):new rn(e,t,n,r??1)}function rn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function tg(e){if(isNaN(e.h))return new Bt(e.l,0,0,e.opacity);var t=e.h*Ym;return new Bt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}io(rn,ps,vi(Pn,{brighter(e){return new rn(this.h,this.c,this.l+ds*(e??1),this.opacity)},darker(e){return new rn(this.h,this.c,this.l-ds*(e??1),this.opacity)},rgb(){return tg(this).rgb()}}));var ng=-.14861,Mc=1.78277,bc=-.29227,hs=-.90649,yi=1.97294,Vm=yi*hs,Um=yi*Mc,jm=Mc*bc-hs*ng;function N_(e){if(e instanceof dr)return new dr(e.h,e.s,e.l,e.opacity);e instanceof Me||(e=Cc(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(jm*r+Vm*t-Um*n)/(jm+Vm-Um),i=r-o,l=(yi*(n-o)-bc*i)/hs,s=Math.sqrt(l*l+i*i)/(yi*o*(1-o)),a=s?Math.atan2(l,i)*Xm-120:NaN;return new dr(a<0?a+360:a,s,o,e.opacity)}function ms(e,t,n,r){return arguments.length===1?N_(e):new dr(e,t,n,r??1)}function dr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}io(dr,ms,vi(Pn,{brighter(e){return e=e==null?oo:Math.pow(oo,e),new dr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fr:Math.pow(fr,e),new dr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Ym,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Me(255*(t+n*(ng*r+Mc*o)),255*(t+n*(bc*r+hs*o)),255*(t+n*(yi*r)),this.opacity)}}));function ig(e,t,n,r,o){var i=e*e,l=i*e;return((1-3*e+3*i-l)*t+(4-6*i+3*l)*n+(1+3*e+3*i-3*l)*r+l*o)/6}function C_(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],l=r>0?e[r-1]:2*o-i,s=r<t-1?e[r+2]:2*i-o;return ig((n-r/t)*t,l,o,i,s)}}function M_(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],l=e[(r+1)%t],s=e[(r+2)%t];return ig((n-r/t)*t,o,i,l,s)}}var Ic=e=>()=>e;function lg(e,t){return function(n){return e+n*t}}function b_(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Dc(e,t){var n=t-e;return n?lg(e,n>180||n<-180?n-360*Math.round(n/360):n):Ic(isNaN(e)?t:e)}function z_(e){return(e=+e)==1?Ke:function(t,n){return n-t?b_(t,n,e):Ic(isNaN(t)?n:t)}}function Ke(e,t){var n=t-e;return n?lg(e,n):Ic(isNaN(e)?t:e)}var Ac=(function e(t){var n=z_(t);function r(o,i){var l=n((o=wi(o)).r,(i=wi(i)).r),s=n(o.g,i.g),a=n(o.b,i.b),u=Ke(o.opacity,i.opacity);return function(c){return o.r=l(c),o.g=s(c),o.b=a(c),o.opacity=u(c),o+""}}return r.gamma=e,r})(1);function sg(e){return function(t){var n=t.length,r=new Array(n),o=new Array(n),i=new Array(n),l,s;for(l=0;l<n;++l)s=wi(t[l]),r[l]=s.r||0,o[l]=s.g||0,i[l]=s.b||0;return r=e(r),o=e(o),i=e(i),s.opacity=1,function(a){return s.r=r(a),s.g=o(a),s.b=i(a),s+""}}}var Wk=sg(C_),Yk=sg(M_);function on(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Pc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zc=new RegExp(Pc.source,"g");function P_(e){return function(){return e}}function T_(e){return function(t){return e(t)+""}}function ag(e,t){var n=Pc.lastIndex=zc.lastIndex=0,r,o,i,l=-1,s=[],a=[];for(e=e+"",t=t+"";(r=Pc.exec(e))&&(o=zc.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),s[l]?s[l]+=i:s[++l]=i),(r=r[0])===(o=o[0])?s[l]?s[l]+=o:s[++l]=o:(s[++l]=null,a.push({i:l,x:on(r,o)})),n=zc.lastIndex;return n<t.length&&(i=t.slice(n),s[l]?s[l]+=i:s[++l]=i),s.length<2?a[0]?T_(a[0].x):P_(t):(t=a.length,function(u){for(var c=0,f;c<t;++c)s[(f=a[c]).i]=f.x(u);return s.join("")})}var rg=180/Math.PI,Tc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ug(e,t,n,r,o,i){var l,s,a;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,a/=s),e*r<t*n&&(e=-e,t=-t,a=-a,l=-l),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*rg,skewX:Math.atan(a)*rg,scaleX:l,scaleY:s}}var gs;function I_(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Tc:ug(t.a,t.b,t.c,t.d,t.e,t.f)}function D_(e){return e==null||(gs||(gs=document.createElementNS("http://www.w3.org/2000/svg","g")),gs.setAttribute("transform",e),!(e=gs.transform.baseVal.consolidate()))?Tc:(e=e.matrix,ug(e.a,e.b,e.c,e.d,e.e,e.f))}function cg(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,c,f,h,g,_){if(u!==f||c!==h){var w=g.push("translate(",null,t,null,n);_.push({i:w-4,x:on(u,f)},{i:w-2,x:on(c,h)})}else(f||h)&&g.push("translate("+f+t+h+n)}function l(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(o(f)+"rotate(",null,r)-2,x:on(u,c)})):c&&f.push(o(f)+"rotate("+c+r)}function s(u,c,f,h){u!==c?h.push({i:f.push(o(f)+"skewX(",null,r)-2,x:on(u,c)}):c&&f.push(o(f)+"skewX("+c+r)}function a(u,c,f,h,g,_){if(u!==f||c!==h){var w=g.push(o(g)+"scale(",null,",",null,")");_.push({i:w-4,x:on(u,f)},{i:w-2,x:on(c,h)})}else(f!==1||h!==1)&&g.push(o(g)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,h),l(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(g){for(var _=-1,w=h.length,E;++_<w;)f[(E=h[_]).i]=E.x(g);return f.join("")}}}var dg=cg(I_,"px, ","px)","deg)"),fg=cg(D_,", ",")",")"),A_=1e-12;function og(e){return((e=Math.exp(e))+1/e)/2}function O_(e){return((e=Math.exp(e))-1/e)/2}function R_(e){return((e=Math.exp(2*e))-1)/(e+1)}var pg=(function e(t,n,r){function o(i,l){var s=i[0],a=i[1],u=i[2],c=l[0],f=l[1],h=l[2],g=c-s,_=f-a,w=g*g+_*_,E,d;if(w<A_)d=Math.log(h/u)/t,E=function(P){return[s+P*g,a+P*_,u*Math.exp(t*P*d)]};else{var p=Math.sqrt(w),m=(h*h-u*u+r*w)/(2*u*n*p),y=(h*h-u*u-r*w)/(2*h*n*p),k=Math.log(Math.sqrt(m*m+1)-m),C=Math.log(Math.sqrt(y*y+1)-y);d=(C-k)/t,E=function(P){var N=P*d,T=og(k),I=u/(n*p)*(T*R_(t*N+k)-O_(k));return[s+I*g,a+I*_,u*T/og(t*N+k)]}}return E.duration=Math.abs(d)*1e3*t/Math.SQRT2,E}return o.rho=function(i){var l=Math.max(.001,+i),s=l*l,a=s*s;return e(l,s,a)},o})(Math.SQRT2,2,4);function hg(e){return function(t,n){var r=e((t=fs(t)).h,(n=fs(n)).h),o=Ke(t.s,n.s),i=Ke(t.l,n.l),l=Ke(t.opacity,n.opacity);return function(s){return t.h=r(s),t.s=o(s),t.l=i(s),t.opacity=l(s),t+""}}}var Xk=hg(Dc),Kk=hg(Ke);function mg(e){return function(t,n){var r=e((t=ps(t)).h,(n=ps(n)).h),o=Ke(t.c,n.c),i=Ke(t.l,n.l),l=Ke(t.opacity,n.opacity);return function(s){return t.h=r(s),t.c=o(s),t.l=i(s),t.opacity=l(s),t+""}}}var Zk=mg(Dc),Qk=mg(Ke);function gg(e){return(function t(n){n=+n;function r(o,i){var l=e((o=ms(o)).h,(i=ms(i)).h),s=Ke(o.s,i.s),a=Ke(o.l,i.l),u=Ke(o.opacity,i.opacity);return function(c){return o.h=l(c),o.s=s(c),o.l=a(Math.pow(c,n)),o.opacity=u(c),o+""}}return r.gamma=t,r})(1)}var Gk=gg(Dc),qk=gg(Ke);var lo=0,_i=0,xi=0,vg=1e3,ys,Si,vs=0,hr=0,xs=0,Ei=typeof performance=="object"&&performance.now?performance:Date,wg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _s(){return hr||(wg(L_),hr=Ei.now()+xs)}function L_(){hr=0}function ws(){this._call=this._time=this._next=null}ws.prototype=Rc.prototype={constructor:ws,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_s():+n)+(t==null?0:+t),!this._next&&Si!==this&&(Si?Si._next=this:ys=this,Si=this),this._call=e,this._time=n,Oc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Oc())}};function Rc(e,t,n){var r=new ws;return r.restart(e,t,n),r}function $_(){_s(),++lo;for(var e=ys,t;e;)(t=hr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--lo}function yg(){hr=(vs=Ei.now())+xs,lo=_i=0;try{$_()}finally{lo=0,H_(),hr=0}}function F_(){var e=Ei.now(),t=e-vs;t>vg&&(xs-=t,vs=e)}function H_(){for(var e,t=ys,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ys=n);Si=e,Oc(r)}function Oc(e){if(!lo){_i&&(_i=clearTimeout(_i));var t=e-hr;t>24?(e<1/0&&(_i=setTimeout(yg,Math.ceil(e-Ei.now()-xs)+1)),xi&&(xi=clearInterval(xi))):(xi||(vs=Ei.now(),xi=setInterval(F_,vg)),lo=1,wg(yg))}}function Lc(e,t,n){var r=new ws;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}function _g(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var $c=3,tN=(function e(t){t=+t;function n(r){return Math.pow(r,t)}return n.exponent=e,n})($c),nN=(function e(t){t=+t;function n(r){return 1-Math.pow(1-r,t)}return n.exponent=e,n})($c),rN=(function e(t){t=+t;function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return n.exponent=e,n})($c),B_=Math.PI,oN=B_/2;function Ss(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}var xg=4/11,iN=6/11,lN=8/11,sN=3/4,aN=9/11,uN=10/11,cN=15/16,dN=21/22,fN=63/64,pN=1/xg/xg;var Fc=1.70158,hN=(function e(t){t=+t;function n(r){return(r=+r)*r*(t*(r-1)+r)}return n.overshoot=e,n})(Fc),mN=(function e(t){t=+t;function n(r){return--r*r*((r+1)*t+r)+1}return n.overshoot=e,n})(Fc),gN=(function e(t){t=+t;function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return n.overshoot=e,n})(Fc),so=2*Math.PI,Hc=1,Bc=.3,yN=(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=so);function o(i){return t*Ss(- --i)*Math.sin((r-i)/n)}return o.amplitude=function(i){return e(i,n*so)},o.period=function(i){return e(t,i)},o})(Hc,Bc),vN=(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=so);function o(i){return 1-t*Ss(i=+i)*Math.sin((i+r)/n)}return o.amplitude=function(i){return e(i,n*so)},o.period=function(i){return e(t,i)},o})(Hc,Bc),wN=(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=so);function o(i){return((i=i*2-1)<0?t*Ss(-i)*Math.sin((r-i)/n):2-t*Ss(i)*Math.sin((r+i)/n))/2}return o.amplitude=function(i){return e(i,n*so)},o.period=function(i){return e(t,i)},o})(Hc,Bc);var V_=lr("start","end","cancel","interrupt"),U_=[],kg=0,Sg=1,Vc=2,Es=3,Eg=4,Uc=5,ks=6;function Ns(e,t,n,r,o,i){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;j_(e,n,{name:t,index:r,group:o,on:V_,tween:U_,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:kg})}function jc(e,t){var n=Pt(e,t);if(n.state>kg)throw new Error("too late; already scheduled");return n}function Vt(e,t){var n=Pt(e,t);if(n.state>Es)throw new Error("too late; already running");return n}function Pt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function j_(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=Rc(i,0,n.time);function i(u){n.state=Sg,n.timer.restart(l,n.delay,n.time),n.delay<=u&&l(u-n.delay)}function l(u){var c,f,h,g;if(n.state!==Sg)return a();for(c in r)if(g=r[c],g.name===n.name){if(g.state===Es)return Lc(l);g.state===Eg?(g.state=ks,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[c]):+c<t&&(g.state=ks,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[c])}if(Lc(function(){n.state===Es&&(n.state=Eg,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Vc,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Vc){for(n.state=Es,o=new Array(h=n.tween.length),c=0,f=-1;c<h;++c)(g=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(o[++f]=g);o.length=f+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=Uc,1),f=-1,h=o.length;++f<h;)o[f].call(e,c);n.state===Uc&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=ks,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function ki(e,t){var n=e.__transition,r,o,i=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((r=n[l]).name!==t){i=!1;continue}o=r.state>Vc&&r.state<Uc,r.state=ks,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[l]}i&&delete e.__transition}}function W_(e){return this.each(function(){ki(this,e)})}function Y_(e,t){var n,r;return function(){var o=Vt(this,e),i=o.tween;if(i!==n){r=n=i;for(var l=0,s=r.length;l<s;++l)if(r[l].name===t){r=r.slice(),r.splice(l,1);break}}o.tween=r}}function X_(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Vt(this,e),l=i.tween;if(l!==r){o=(r=l).slice();for(var s={name:t,value:n},a=0,u=o.length;a<u;++a)if(o[a].name===t){o[a]=s;break}a===u&&o.push(s)}i.tween=o}}function K_(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Pt(this.node(),n).tween,o=0,i=r.length,l;o<i;++o)if((l=r[o]).name===e)return l.value;return null}return this.each((t==null?Y_:X_)(n,e,t))}function Wc(e,t,n){var r=e._id;return e.each(function(){var o=Vt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Pt(o,r).value[t]}}function Ng(e,t){var n;return(typeof t=="number"?on:t instanceof pr?Ac:(n=pr(t))?(t=n,Ac):ag)(e,t)}function Z_(e){return function(){this.removeAttribute(e)}}function Q_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function G_(e,t,n){var r,o=n+"",i;return function(){var l=this.getAttribute(e);return l===o?null:l===r?i:i=t(r=l,n)}}function q_(e,t,n){var r,o=n+"",i;return function(){var l=this.getAttributeNS(e.space,e.local);return l===o?null:l===r?i:i=t(r=l,n)}}function J_(e,t,n){var r,o,i;return function(){var l,s=n(this),a;return s==null?void this.removeAttribute(e):(l=this.getAttribute(e),a=s+"",l===a?null:l===r&&a===o?i:(o=a,i=t(r=l,s)))}}function eS(e,t,n){var r,o,i;return function(){var l,s=n(this),a;return s==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),a=s+"",l===a?null:l===r&&a===o?i:(o=a,i=t(r=l,s)))}}function tS(e,t){var n=hi(e),r=n==="transform"?fg:Ng;return this.attrTween(e,typeof t=="function"?(n.local?eS:J_)(n,r,Wc(this,"attr."+e,t)):t==null?(n.local?Q_:Z_)(n):(n.local?q_:G_)(n,r,t))}function nS(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function rS(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function oS(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&rS(e,i)),n}return o._value=t,o}function iS(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&nS(e,i)),n}return o._value=t,o}function lS(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=hi(e);return this.tween(n,(r.local?oS:iS)(r,t))}function sS(e,t){return function(){jc(this,e).delay=+t.apply(this,arguments)}}function aS(e,t){return t=+t,function(){jc(this,e).delay=t}}function uS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?sS:aS)(t,e)):Pt(this.node(),t).delay}function cS(e,t){return function(){Vt(this,e).duration=+t.apply(this,arguments)}}function dS(e,t){return t=+t,function(){Vt(this,e).duration=t}}function fS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?cS:dS)(t,e)):Pt(this.node(),t).duration}function pS(e,t){if(typeof t!="function")throw new Error;return function(){Vt(this,e).ease=t}}function hS(e){var t=this._id;return arguments.length?this.each(pS(t,e)):Pt(this.node(),t).ease}function mS(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Vt(this,e).ease=n}}function gS(e){if(typeof e!="function")throw new Error;return this.each(mS(this._id,e))}function yS(e){typeof e!="function"&&(e=mc(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],l=i.length,s=r[o]=[],a,u=0;u<l;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&s.push(a);return new sn(r,this._parents,this._name,this._id)}function vS(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),l=new Array(r),s=0;s<i;++s)for(var a=t[s],u=n[s],c=a.length,f=l[s]=new Array(c),h,g=0;g<c;++g)(h=a[g]||u[g])&&(f[g]=h);for(;s<r;++s)l[s]=t[s];return new sn(l,this._parents,this._name,this._id)}function wS(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function xS(e,t,n){var r,o,i=wS(t)?jc:Vt;return function(){var l=i(this,e),s=l.on;s!==r&&(o=(r=s).copy()).on(t,n),l.on=o}}function _S(e,t){var n=this._id;return arguments.length<2?Pt(this.node(),n).on.on(e):this.each(xS(n,e,t))}function SS(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ES(){return this.on("end.remove",SS(this._id))}function kS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ls(e));for(var r=this._groups,o=r.length,i=new Array(o),l=0;l<o;++l)for(var s=r[l],a=s.length,u=i[l]=new Array(a),c,f,h=0;h<a;++h)(c=s[h])&&(f=e.call(c,c.__data__,h,s))&&("__data__"in c&&(f.__data__=c.__data__),u[h]=f,Ns(u[h],t,n,h,u,Pt(c,n)));return new sn(i,this._parents,t,n)}function NS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=hc(e));for(var r=this._groups,o=r.length,i=[],l=[],s=0;s<o;++s)for(var a=r[s],u=a.length,c,f=0;f<u;++f)if(c=a[f]){for(var h=e.call(c,c.__data__,f,a),g,_=Pt(c,n),w=0,E=h.length;w<E;++w)(g=h[w])&&Ns(g,t,n,w,h,_);i.push(h),l.push(c)}return new sn(i,l,t,n)}var CS=ar.prototype.constructor;function MS(){return new CS(this._groups,this._parents)}function bS(e,t){var n,r,o;return function(){var i=sr(this,e),l=(this.style.removeProperty(e),sr(this,e));return i===l?null:i===n&&l===r?o:o=t(n=i,r=l)}}function Cg(e){return function(){this.style.removeProperty(e)}}function zS(e,t,n){var r,o=n+"",i;return function(){var l=sr(this,e);return l===o?null:l===r?i:i=t(r=l,n)}}function PS(e,t,n){var r,o,i;return function(){var l=sr(this,e),s=n(this),a=s+"";return s==null&&(a=s=(this.style.removeProperty(e),sr(this,e))),l===a?null:l===r&&a===o?i:(o=a,i=t(r=l,s))}}function TS(e,t){var n,r,o,i="style."+t,l="end."+i,s;return function(){var a=Vt(this,e),u=a.on,c=a.value[i]==null?s||(s=Cg(t)):void 0;(u!==n||o!==c)&&(r=(n=u).copy()).on(l,o=c),a.on=r}}function IS(e,t,n){var r=(e+="")=="transform"?dg:Ng;return t==null?this.styleTween(e,bS(e,r)).on("end.style."+e,Cg(e)):typeof t=="function"?this.styleTween(e,PS(e,r,Wc(this,"style."+e,t))).each(TS(this._id,e)):this.styleTween(e,zS(e,r,t),n).on("end.style."+e,null)}function DS(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function AS(e,t,n){var r,o;function i(){var l=t.apply(this,arguments);return l!==o&&(r=(o=l)&&DS(e,l,n)),r}return i._value=t,i}function OS(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,AS(e,t,n??""))}function RS(e){return function(){this.textContent=e}}function LS(e){return function(){var t=e(this);this.textContent=t??""}}function $S(e){return this.tween("text",typeof e=="function"?LS(Wc(this,"text",e)):RS(e==null?"":e+""))}function FS(e){return function(t){this.textContent=e.call(this,t)}}function HS(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&FS(o)),t}return r._value=e,r}function BS(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,HS(e))}function VS(){for(var e=this._name,t=this._id,n=Mg(),r=this._groups,o=r.length,i=0;i<o;++i)for(var l=r[i],s=l.length,a,u=0;u<s;++u)if(a=l[u]){var c=Pt(a,t);Ns(a,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new sn(r,this._parents,e,n)}function US(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,l){var s={value:l},a={value:function(){--o===0&&i()}};n.each(function(){var u=Vt(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(a)),u.on=t}),o===0&&i()})}var jS=0;function sn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function WS(e){return ar().transition(e)}function Mg(){return++jS}var ln=ar.prototype;sn.prototype=WS.prototype={constructor:sn,select:kS,selectAll:NS,selectChild:ln.selectChild,selectChildren:ln.selectChildren,filter:yS,merge:vS,selection:MS,transition:VS,call:ln.call,nodes:ln.nodes,node:ln.node,size:ln.size,empty:ln.empty,each:ln.each,on:_S,attr:tS,attrTween:lS,style:IS,styleTween:OS,text:$S,textTween:BS,remove:ES,tween:K_,delay:uS,duration:fS,ease:hS,easeVarying:gS,end:US,[Symbol.iterator]:ln[Symbol.iterator]};var YS={time:null,delay:0,duration:250,ease:_g};function XS(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function KS(e){var t,n;e instanceof sn?(t=e._id,e=e._name):(t=Mg(),(n=YS).time=_s(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var l=r[i],s=l.length,a,u=0;u<s;++u)(a=l[u])&&Ns(a,e,t,u,l,n||XS(a,t));return new sn(r,this._parents,e,t)}ar.prototype.interrupt=W_;ar.prototype.transition=KS;var Cs=e=>()=>e;function ZS(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function an(e,t,n){this.k=e,this.x=t,this.y=n}an.prototype={constructor:an,scale:function(e){return e===1?this:new an(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new an(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ut=new an(1,0,0);QS.prototype=an.prototype;function QS(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ut;return e.__zoom}function Yc(e){e.stopImmediatePropagation()}function Ni(e){e.preventDefault(),e.stopImmediatePropagation()}function GS(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function qS(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function bg(){return this.__zoom||Ut}function JS(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function eE(){return navigator.maxTouchPoints||"ontouchstart"in this}function tE(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),l>i?(i+l)/2:Math.min(0,i)||Math.max(0,l))}function zg(){var e=GS,t=qS,n=tE,r=JS,o=eE,i=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],s=250,a=pg,u=lr("start","zoom","end"),c,f,h,g=500,_=150,w=0,E=10;function d(v){v.property("__zoom",bg).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",I).filter(o).on("touchstart.zoom",R).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",H).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}d.transform=function(v,z,M,D){var $=v.selection?v.selection():v;$.property("__zoom",bg),v!==$?k(v,z,M,D):$.interrupt().each(function(){C(this,arguments).event(D).start().zoom(null,typeof z=="function"?z.apply(this,arguments):z).end()})},d.scaleBy=function(v,z,M,D){d.scaleTo(v,function(){var $=this.__zoom.k,b=typeof z=="function"?z.apply(this,arguments):z;return $*b},M,D)},d.scaleTo=function(v,z,M,D){d.transform(v,function(){var $=t.apply(this,arguments),b=this.__zoom,A=M==null?y($):typeof M=="function"?M.apply(this,arguments):M,L=b.invert(A),F=typeof z=="function"?z.apply(this,arguments):z;return n(m(p(b,F),A,L),$,l)},M,D)},d.translateBy=function(v,z,M,D){d.transform(v,function(){return n(this.__zoom.translate(typeof z=="function"?z.apply(this,arguments):z,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),l)},null,D)},d.translateTo=function(v,z,M,D,$){d.transform(v,function(){var b=t.apply(this,arguments),A=this.__zoom,L=D==null?y(b):typeof D=="function"?D.apply(this,arguments):D;return n(Ut.translate(L[0],L[1]).scale(A.k).translate(typeof z=="function"?-z.apply(this,arguments):-z,typeof M=="function"?-M.apply(this,arguments):-M),b,l)},D,$)};function p(v,z){return z=Math.max(i[0],Math.min(i[1],z)),z===v.k?v:new an(z,v.x,v.y)}function m(v,z,M){var D=z[0]-M[0]*v.k,$=z[1]-M[1]*v.k;return D===v.x&&$===v.y?v:new an(v.k,D,$)}function y(v){return[(+v[0][0]+ +v[1][0])/2,(+v[0][1]+ +v[1][1])/2]}function k(v,z,M,D){v.on("start.zoom",function(){C(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(D).end()}).tween("zoom",function(){var $=this,b=arguments,A=C($,b).event(D),L=t.apply($,b),F=M==null?y(L):typeof M=="function"?M.apply($,b):M,j=Math.max(L[1][0]-L[0][0],L[1][1]-L[0][1]),U=$.__zoom,X=typeof z=="function"?z.apply($,b):z,G=a(U.invert(F).concat(j/U.k),X.invert(F).concat(j/X.k));return function(J){if(J===1)J=X;else{var te=G(J),he=j/te[2];J=new an(he,F[0]-te[0]*he,F[1]-te[1]*he)}A.zoom(null,J)}})}function C(v,z,M){return!M&&v.__zooming||new P(v,z)}function P(v,z){this.that=v,this.args=z,this.active=0,this.sourceEvent=null,this.extent=t.apply(v,z),this.taps=0}P.prototype={event:function(v){return v&&(this.sourceEvent=v),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(v,z){return this.mouse&&v!=="mouse"&&(this.mouse[1]=z.invert(this.mouse[0])),this.touch0&&v!=="touch"&&(this.touch0[1]=z.invert(this.touch0[0])),this.touch1&&v!=="touch"&&(this.touch1[1]=z.invert(this.touch1[0])),this.that.__zoom=z,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(v){var z=Xe(this.that).datum();u.call(v,this.that,new ZS(v,{sourceEvent:this.sourceEvent,target:d,transform:this.that.__zoom,dispatch:u}),z)}};function N(v,...z){if(!e.apply(this,arguments))return;var M=C(this,z).event(v),D=this.__zoom,$=Math.max(i[0],Math.min(i[1],D.k*Math.pow(2,r.apply(this,arguments)))),b=ot(v);if(M.wheel)(M.mouse[0][0]!==b[0]||M.mouse[0][1]!==b[1])&&(M.mouse[1]=D.invert(M.mouse[0]=b)),clearTimeout(M.wheel);else{if(D.k===$)return;M.mouse=[b,D.invert(b)],ki(this),M.start()}Ni(v),M.wheel=setTimeout(A,_),M.zoom("mouse",n(m(p(D,$),M.mouse[0],M.mouse[1]),M.extent,l));function A(){M.wheel=null,M.end()}}function T(v,...z){if(h||!e.apply(this,arguments))return;var M=v.currentTarget,D=C(this,z,!0).event(v),$=Xe(v.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",j,!0),b=ot(v,M),A=v.clientX,L=v.clientY;wc(v.view),Yc(v),D.mouse=[b,this.__zoom.invert(b)],ki(this),D.start();function F(U){if(Ni(U),!D.moved){var X=U.clientX-A,G=U.clientY-L;D.moved=X*X+G*G>w}D.event(U).zoom("mouse",n(m(D.that.__zoom,D.mouse[0]=ot(U,M),D.mouse[1]),D.extent,l))}function j(U){$.on("mousemove.zoom mouseup.zoom",null),xc(U.view,D.moved),Ni(U),D.event(U).end()}}function I(v,...z){if(e.apply(this,arguments)){var M=this.__zoom,D=ot(v.changedTouches?v.changedTouches[0]:v,this),$=M.invert(D),b=M.k*(v.shiftKey?.5:2),A=n(m(p(M,b),D,$),t.apply(this,z),l);Ni(v),s>0?Xe(this).transition().duration(s).call(k,A,D,v):Xe(this).call(d.transform,A,D,v)}}function R(v,...z){if(e.apply(this,arguments)){var M=v.touches,D=M.length,$=C(this,z,v.changedTouches.length===D).event(v),b,A,L,F;for(Yc(v),A=0;A<D;++A)L=M[A],F=ot(L,this),F=[F,this.__zoom.invert(F),L.identifier],$.touch0?!$.touch1&&$.touch0[2]!==F[2]&&($.touch1=F,$.taps=0):($.touch0=F,b=!0,$.taps=1+!!c);c&&(c=clearTimeout(c)),b&&($.taps<2&&(f=F[0],c=setTimeout(function(){c=null},g)),ki(this),$.start())}}function B(v,...z){if(this.__zooming){var M=C(this,z).event(v),D=v.changedTouches,$=D.length,b,A,L,F;for(Ni(v),b=0;b<$;++b)A=D[b],L=ot(A,this),M.touch0&&M.touch0[2]===A.identifier?M.touch0[0]=L:M.touch1&&M.touch1[2]===A.identifier&&(M.touch1[0]=L);if(A=M.that.__zoom,M.touch1){var j=M.touch0[0],U=M.touch0[1],X=M.touch1[0],G=M.touch1[1],J=(J=X[0]-j[0])*J+(J=X[1]-j[1])*J,te=(te=G[0]-U[0])*te+(te=G[1]-U[1])*te;A=p(A,Math.sqrt(J/te)),L=[(j[0]+X[0])/2,(j[1]+X[1])/2],F=[(U[0]+G[0])/2,(U[1]+G[1])/2]}else if(M.touch0)L=M.touch0[0],F=M.touch0[1];else return;M.zoom("touch",n(m(A,L,F),M.extent,l))}}function H(v,...z){if(this.__zooming){var M=C(this,z).event(v),D=v.changedTouches,$=D.length,b,A;for(Yc(v),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),b=0;b<$;++b)A=D[b],M.touch0&&M.touch0[2]===A.identifier?delete M.touch0:M.touch1&&M.touch1[2]===A.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(A=ot(A,this),Math.hypot(f[0]-A[0],f[1]-A[1])<E)){var L=Xe(this).on("dblclick.zoom");L&&L.apply(this,arguments)}}}return d.wheelDelta=function(v){return arguments.length?(r=typeof v=="function"?v:Cs(+v),d):r},d.filter=function(v){return arguments.length?(e=typeof v=="function"?v:Cs(!!v),d):e},d.touchable=function(v){return arguments.length?(o=typeof v=="function"?v:Cs(!!v),d):o},d.extent=function(v){return arguments.length?(t=typeof v=="function"?v:Cs([[+v[0][0],+v[0][1]],[+v[1][0],+v[1][1]]]),d):t},d.scaleExtent=function(v){return arguments.length?(i[0]=+v[0],i[1]=+v[1],d):[i[0],i[1]]},d.translateExtent=function(v){return arguments.length?(l[0][0]=+v[0][0],l[1][0]=+v[1][0],l[0][1]=+v[0][1],l[1][1]=+v[1][1],d):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},d.constrain=function(v){return arguments.length?(n=v,d):n},d.duration=function(v){return arguments.length?(s=+v,d):s},d.interpolate=function(v){return arguments.length?(a=v,d):a},d.on=function(){var v=u.on.apply(u,arguments);return v===u?d:v},d.clickDistance=function(v){return arguments.length?(w=(v=+v)*v,d):Math.sqrt(w)},d.tapDistance=function(v){return arguments.length?(E=+v,d):E},d}var nE=at(ns(),1),As=(0,x.createContext)(null),rE=As.Provider,jt={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},Jg=jt.error001();function ue(e,t){let n=(0,x.useContext)(As);if(n===null)throw new Error(Jg);return dc(n,e,t)}var ke=()=>{let e=(0,x.useContext)(As);if(e===null)throw new Error(Jg);return(0,x.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},oE=e=>e.userSelectionActive?"none":"all";function ld({position:e,children:t,className:n,style:r,...o}){let i=ue(oE),l=`${e}`.split("-");return x.default.createElement("div",{className:we(["react-flow__panel",n,...l]),style:{...r,pointerEvents:i},...o},t)}function iE({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:x.default.createElement(ld,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},x.default.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}var lE=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:i={},labelBgPadding:l=[2,4],labelBgBorderRadius:s=2,children:a,className:u,...c})=>{let f=(0,x.useRef)(null),[h,g]=(0,x.useState)({x:0,y:0,width:0,height:0}),_=we(["react-flow__edge-textwrapper",u]);return(0,x.useEffect)(()=>{if(f.current){let w=f.current.getBBox();g({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),typeof n>"u"||!n?null:x.default.createElement("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:_,visibility:h.width?"visible":"hidden",...c},o&&x.default.createElement("rect",{width:h.width+2*l[0],x:-l[0],y:-l[1],height:h.height+2*l[1],className:"react-flow__edge-textbg",style:i,rx:s,ry:s}),x.default.createElement("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:f,style:r},n),a)},sE=(0,x.memo)(lE),sd=e=>({width:e.offsetWidth,height:e.offsetHeight}),go=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ad=(e={x:0,y:0},t)=>({x:go(e.x,t[0][0],t[1][0]),y:go(e.y,t[0][1],t[1][1])}),Pg=(e,t,n)=>e<t?go(Math.abs(e-t),1,50)/50:e>n?-go(Math.abs(e-n),1,50)/50:0,e0=(e,t)=>{let n=Pg(e.x,35,t.width-35)*20,r=Pg(e.y,35,t.height-35)*20;return[n,r]},t0=e=>e.getRootNode?.()||window?.document,aE=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),ud=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),uE=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Tg=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0});var qc=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},cE=e=>gt(e.width)&>(e.height)&>(e.x)&>(e.y),gt=e=>!isNaN(e)&&isFinite(e),ge=Symbol.for("internals"),n0=["Enter"," ","Escape"],r0=(e,t)=>{},dE=e=>"nativeEvent"in e;function Jc(e){let n=(dE(e)?e.nativeEvent:e).composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable")||!!n?.closest(".nokey")}var o0=e=>"clientX"in e,An=(e,t)=>{let n=o0(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},Ts=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,Ti=({id:e,path:t,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,markerEnd:f,markerStart:h,interactionWidth:g=20})=>x.default.createElement(x.default.Fragment,null,x.default.createElement("path",{id:e,style:c,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:h}),g&&x.default.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:g,className:"react-flow__edge-interaction"}),o&>(n)&>(r)?x.default.createElement(sE,{x:n,y:r,label:o,labelStyle:i,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u}):null);Ti.displayName="BaseEdge";function Ci(e,t,n){return n===void 0?n:r=>{let o=t().edges.find(i=>i.id===e);o&&n(r,{...o})}}function i0({sourceX:e,sourceY:t,targetX:n,targetY:r}){let o=Math.abs(n-e)/2,i=n<e?n+o:n-o,l=Math.abs(r-t)/2,s=r<t?r+l:r-l;return[i,s,o,l]}function l0({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:l,targetControlY:s}){let a=e*.125+o*.375+l*.375+n*.125,u=t*.125+i*.375+s*.375+r*.125,c=Math.abs(a-e),f=Math.abs(u-t);return[a,u,c,f]}var yr;(function(e){e.Strict="strict",e.Loose="loose"})(yr||(yr={}));var gr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(gr||(gr={}));var zi;(function(e){e.Partial="partial",e.Full="full"})(zi||(zi={}));var Dn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Dn||(Dn={}));var Is;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Is||(Is={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));function Ig({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===W.Left||e===W.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function s0({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:r,targetY:o,targetPosition:i=W.Top}){let[l,s]=Ig({pos:n,x1:e,y1:t,x2:r,y2:o}),[a,u]=Ig({pos:i,x1:r,y1:o,x2:e,y2:t}),[c,f,h,g]=l0({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:s,targetControlX:a,targetControlY:u});return[`M${e},${t} C${l},${s} ${a},${u} ${r},${o}`,c,f,h,g]}var cd=(0,x.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=W.Bottom,targetPosition:i=W.Top,label:l,labelStyle:s,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:h,markerEnd:g,markerStart:_,interactionWidth:w})=>{let[E,d,p]=s0({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i});return x.default.createElement(Ti,{path:E,labelX:d,labelY:p,label:l,labelStyle:s,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:h,markerEnd:g,markerStart:_,interactionWidth:w})});cd.displayName="SimpleBezierEdge";var Dg={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},fE=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Ag=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function pE({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:r=W.Top,center:o,offset:i}){let l=Dg[t],s=Dg[r],a={x:e.x+l.x*i,y:e.y+l.y*i},u={x:n.x+s.x*i,y:n.y+s.y*i},c=fE({source:a,sourcePosition:t,target:u}),f=c.x!==0?"x":"y",h=c[f],g=[],_,w,E={x:0,y:0},d={x:0,y:0},[p,m,y,k]=i0({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[f]*s[f]===-1){_=o.x??p,w=o.y??m;let P=[{x:_,y:a.y},{x:_,y:u.y}],N=[{x:a.x,y:w},{x:u.x,y:w}];l[f]===h?g=f==="x"?P:N:g=f==="x"?N:P}else{let P=[{x:a.x,y:u.y}],N=[{x:u.x,y:a.y}];if(f==="x"?g=l.x===h?N:P:g=l.y===h?P:N,t===r){let H=Math.abs(e[f]-n[f]);if(H<=i){let v=Math.min(i-1,i-H);l[f]===h?E[f]=(a[f]>e[f]?-1:1)*v:d[f]=(u[f]>n[f]?-1:1)*v}}if(t!==r){let H=f==="x"?"y":"x",v=l[f]===s[H],z=a[H]>u[H],M=a[H]<u[H];(l[f]===1&&(!v&&z||v&&M)||l[f]!==1&&(!v&&M||v&&z))&&(g=f==="x"?P:N)}let T={x:a.x+E.x,y:a.y+E.y},I={x:u.x+d.x,y:u.y+d.y},R=Math.max(Math.abs(T.x-g[0].x),Math.abs(I.x-g[0].x)),B=Math.max(Math.abs(T.y-g[0].y),Math.abs(I.y-g[0].y));R>=B?(_=(T.x+I.x)/2,w=g[0].y):(_=g[0].x,w=(T.y+I.y)/2)}return[[e,{x:a.x+E.x,y:a.y+E.y},...g,{x:u.x+d.x,y:u.y+d.y},n],_,w,y,k]}function hE(e,t,n,r){let o=Math.min(Ag(e,t)/2,Ag(t,n)/2,r),{x:i,y:l}=t;if(e.x===i&&i===n.x||e.y===l&&l===n.y)return`L${i} ${l}`;if(e.y===l){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${i+o*u},${l}Q ${i},${l} ${i},${l+o*c}`}let s=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${i},${l+o*a}Q ${i},${l} ${i+o*s},${l}`}function ed({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:r,targetY:o,targetPosition:i=W.Top,borderRadius:l=5,centerX:s,centerY:a,offset:u=20}){let[c,f,h,g,_]=pE({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:s,y:a},offset:u});return[c.reduce((E,d,p)=>{let m="";return p>0&&p<c.length-1?m=hE(c[p-1],d,c[p+1],l):m=`${p===0?"M":"L"}${d.x} ${d.y}`,E+=m,E},""),f,h,g,_]}var Os=(0,x.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,sourcePosition:f=W.Bottom,targetPosition:h=W.Top,markerEnd:g,markerStart:_,pathOptions:w,interactionWidth:E})=>{let[d,p,m]=ed({sourceX:e,sourceY:t,sourcePosition:f,targetX:n,targetY:r,targetPosition:h,borderRadius:w?.borderRadius,offset:w?.offset});return x.default.createElement(Ti,{path:d,labelX:p,labelY:m,label:o,labelStyle:i,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,markerEnd:g,markerStart:_,interactionWidth:E})});Os.displayName="SmoothStepEdge";var dd=(0,x.memo)(e=>x.default.createElement(Os,{...e,pathOptions:(0,x.useMemo)(()=>({borderRadius:0,offset:e.pathOptions?.offset}),[e.pathOptions?.offset])}));dd.displayName="StepEdge";function mE({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[o,i,l,s]=i0({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,l,s]}var fd=(0,x.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:i,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,markerEnd:f,markerStart:h,interactionWidth:g})=>{let[_,w,E]=mE({sourceX:e,sourceY:t,targetX:n,targetY:r});return x.default.createElement(Ti,{path:_,labelX:w,labelY:E,label:o,labelStyle:i,labelShowBg:l,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:u,style:c,markerEnd:f,markerStart:h,interactionWidth:g})});fd.displayName="StraightEdge";function Ms(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Og({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case W.Left:return[t-Ms(t-r,i),n];case W.Right:return[t+Ms(r-t,i),n];case W.Top:return[t,n-Ms(n-o,i)];case W.Bottom:return[t,n+Ms(o-n,i)]}}function Rs({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:r,targetY:o,targetPosition:i=W.Top,curvature:l=.25}){let[s,a]=Og({pos:n,x1:e,y1:t,x2:r,y2:o,c:l}),[u,c]=Og({pos:i,x1:r,y1:o,x2:e,y2:t,c:l}),[f,h,g,_]=l0({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${e},${t} C${s},${a} ${u},${c} ${r},${o}`,f,h,g,_]}var Ds=(0,x.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=W.Bottom,targetPosition:i=W.Top,label:l,labelStyle:s,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:h,markerEnd:g,markerStart:_,pathOptions:w,interactionWidth:E})=>{let[d,p,m]=Rs({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:i,curvature:w?.curvature});return x.default.createElement(Ti,{path:d,labelX:p,labelY:m,label:l,labelStyle:s,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:h,markerEnd:g,markerStart:_,interactionWidth:E})});Ds.displayName="BezierEdge";var pd=(0,x.createContext)(null),gE=pd.Provider;pd.Consumer;var yE=()=>(0,x.useContext)(pd),vE=e=>"id"in e&&"source"in e&&"target"in e;var wE=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,td=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,xE=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),_E=(e,t)=>{if(!e.source||!e.target)return r0("006",jt.error006()),t;let n;return vE(e)?n={...e}:n={...e,id:wE(e)},xE(n,t)?t:t.concat(n)};var nd=({x:e,y:t},[n,r,o],i,[l,s])=>{let a={x:(e-n)/o,y:(t-r)/o};return i?{x:l*Math.round(a.x/l),y:s*Math.round(a.y/s)}:a},a0=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),ho=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};let n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},hd=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((r,o)=>{let{x:i,y:l}=ho(o,t).positionAbsolute;return aE(r,ud({x:i,y:l,width:o.width||0,height:o.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return uE(n)};var u0=(e,t,[n,r,o]=[0,0,1],i=!1,l=!1,s=[0,0])=>{let a={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},u=[];return e.forEach(c=>{let{width:f,height:h,selectable:g=!0,hidden:_=!1}=c;if(l&&!g||_)return!1;let{positionAbsolute:w}=ho(c,s),E={x:w.x,y:w.y,width:f||0,height:h||0},d=qc(a,E),p=typeof f>"u"||typeof h>"u"||f===null||h===null,m=i&&d>0,y=(f||0)*(h||0);(p||m||d>=y||c.dragging)&&u.push(c)}),u},c0=(e,t)=>{let n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))};var d0=(e,t,n,r,o,i=.1)=>{let l=t/(e.width*(1+i)),s=n/(e.height*(1+i)),a=Math.min(l,s),u=go(a,r,o),c=e.x+e.width/2,f=e.y+e.height/2,h=t/2-c*u,g=n/2-f*u;return{x:h,y:g,zoom:u}},mr=(e,t=0)=>e.transition().duration(t);function Rg(e,t,n,r){return(t[n]||[]).reduce((o,i)=>(`${e.id}-${i.id}-${n}`!==r&&o.push({id:i.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+i.x+i.width/2,y:(e.positionAbsolute?.y??0)+i.y+i.height/2}),o),[])}function SE(e,t,n,r,o,i){let{x:l,y:s}=An(e),u=t.elementsFromPoint(l,s).find(_=>_.classList.contains("react-flow__handle"));if(u){let _=u.getAttribute("data-nodeid");if(_){let w=md(void 0,u),E=u.getAttribute("data-handleid"),d=i({nodeId:_,id:E,type:w});if(d){let p=o.find(m=>m.nodeId===_&&m.type===w&&m.id===E);return{handle:{id:E,type:w,nodeId:_,x:p?.x||n.x,y:p?.y||n.y},validHandleResult:d}}}}let c=[],f=1/0;if(o.forEach(_=>{let w=Math.sqrt((_.x-n.x)**2+(_.y-n.y)**2);if(w<=r){let E=i(_);w<=f&&(w<f?c=[{handle:_,validHandleResult:E}]:w===f&&c.push({handle:_,validHandleResult:E}),f=w)}}),!c.length)return{handle:null,validHandleResult:f0()};if(c.length===1)return c[0];let h=c.some(({validHandleResult:_})=>_.isValid),g=c.some(({handle:_})=>_.type==="target");return c.find(({handle:_,validHandleResult:w})=>g?_.type==="target":h?w.isValid:!0)||c[0]}var EE={source:null,target:null,sourceHandle:null,targetHandle:null},f0=()=>({handleDomNode:null,isValid:!1,connection:EE,endHandle:null});function p0(e,t,n,r,o,i,l){let s=o==="target",a=l.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),u={...f0(),handleDomNode:a};if(a){let c=md(void 0,a),f=a.getAttribute("data-nodeid"),h=a.getAttribute("data-handleid"),g=a.classList.contains("connectable"),_=a.classList.contains("connectableend"),w={source:s?f:n,sourceHandle:s?h:r,target:s?n:f,targetHandle:s?r:h};u.connection=w,g&&_&&(t===yr.Strict?s&&c==="source"||!s&&c==="target":f!==n||h!==r)&&(u.endHandle={nodeId:f,handleId:h,type:c},u.isValid=i(w))}return u}function kE({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((o,i)=>{if(i[ge]){let{handleBounds:l}=i[ge],s=[],a=[];l&&(s=Rg(i,l,"source",`${t}-${n}-${r}`),a=Rg(i,l,"target",`${t}-${n}-${r}`)),o.push(...s,...a)}return o},[])}function md(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Xc(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function NE(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function h0({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:l,isValidConnection:s,edgeUpdaterType:a,onReconnectEnd:u}){let c=t0(e.target),{connectionMode:f,domNode:h,autoPanOnConnect:g,connectionRadius:_,onConnectStart:w,panBy:E,getNodes:d,cancelConnection:p}=i(),m=0,y,{x:k,y:C}=An(e),P=c?.elementFromPoint(k,C),N=md(a,P),T=h?.getBoundingClientRect();if(!T||!N)return;let I,R=An(e,T),B=!1,H=null,v=!1,z=null,M=kE({nodes:d(),nodeId:n,handleId:t,handleType:N}),D=()=>{if(!g)return;let[A,L]=e0(R,T);E({x:A,y:L}),m=requestAnimationFrame(D)};l({connectionPosition:R,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:N,connectionStartHandle:{nodeId:n,handleId:t,type:N},connectionEndHandle:null}),w?.(e,{nodeId:n,handleId:t,handleType:N});function $(A){let{transform:L}=i();R=An(A,T);let{handle:F,validHandleResult:j}=SE(A,c,nd(R,L,!1,[1,1]),_,M,U=>p0(U,f,n,t,o?"target":"source",s,c));if(y=F,B||(D(),B=!0),z=j.handleDomNode,H=j.connection,v=j.isValid,l({connectionPosition:y&&v?a0({x:y.x,y:y.y},L):R,connectionStatus:NE(!!y,v),connectionEndHandle:j.endHandle}),!y&&!v&&!z)return Xc(I);H.source!==H.target&&z&&(Xc(I),I=z,z.classList.add("connecting","react-flow__handle-connecting"),z.classList.toggle("valid",v),z.classList.toggle("react-flow__handle-valid",v))}function b(A){(y||z)&&H&&v&&r?.(H),i().onConnectEnd?.(A),a&&u?.(A),Xc(I),p(),cancelAnimationFrame(m),B=!1,v=!1,H=null,z=null,c.removeEventListener("mousemove",$),c.removeEventListener("mouseup",b),c.removeEventListener("touchmove",$),c.removeEventListener("touchend",b)}c.addEventListener("mousemove",$),c.addEventListener("mouseup",b),c.addEventListener("touchmove",$),c.addEventListener("touchend",b)}var Lg=()=>!0,CE=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),ME=(e,t,n)=>r=>{let{connectionStartHandle:o,connectionEndHandle:i,connectionClickStartHandle:l}=r;return{connecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n||i?.nodeId===e&&i?.handleId===t&&i?.type===n,clickConnecting:l?.nodeId===e&&l?.handleId===t&&l?.type===n}},m0=(0,x.forwardRef)(({type:e="source",position:t=W.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:l,onConnect:s,children:a,className:u,onMouseDown:c,onTouchStart:f,...h},g)=>{let _=l||null,w=e==="target",E=ke(),d=yE(),{connectOnClick:p,noPanClassName:m}=ue(CE,Ee),{connecting:y,clickConnecting:k}=ue(ME(d,_,e),Ee);d||E.getState().onError?.("010",jt.error010());let C=T=>{let{defaultEdgeOptions:I,onConnect:R,hasDefaultEdges:B}=E.getState(),H={...I,...T};if(B){let{edges:v,setEdges:z}=E.getState();z(_E(H,v))}R?.(H),s?.(H)},P=T=>{if(!d)return;let I=o0(T);o&&(I&&T.button===0||!I)&&h0({event:T,handleId:_,nodeId:d,onConnect:C,isTarget:w,getState:E.getState,setState:E.setState,isValidConnection:n||E.getState().isValidConnection||Lg}),I?c?.(T):f?.(T)},N=T=>{let{onClickConnectStart:I,onClickConnectEnd:R,connectionClickStartHandle:B,connectionMode:H,isValidConnection:v}=E.getState();if(!d||!B&&!o)return;if(!B){I?.(T,{nodeId:d,handleId:_,handleType:e}),E.setState({connectionClickStartHandle:{nodeId:d,type:e,handleId:_}});return}let z=t0(T.target),M=n||v||Lg,{connection:D,isValid:$}=p0({nodeId:d,id:_,type:e},H,B.nodeId,B.handleId||null,B.type,M,z);$&&C(D),R?.(T),E.setState({connectionClickStartHandle:null})};return x.default.createElement("div",{"data-handleid":_,"data-nodeid":d,"data-handlepos":t,"data-id":`${d}-${_}-${e}`,className:we(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:i,connecting:k,connectionindicator:r&&(o&&!y||i&&y)}]),onMouseDown:P,onTouchStart:P,onClick:p?N:void 0,ref:g,...h},a)});m0.displayName="Handle";var On=(0,x.memo)(m0),g0=({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:r=W.Bottom})=>x.default.createElement(x.default.Fragment,null,x.default.createElement(On,{type:"target",position:n,isConnectable:t}),e?.label,x.default.createElement(On,{type:"source",position:r,isConnectable:t}));g0.displayName="DefaultNode";var rd=(0,x.memo)(g0),y0=({data:e,isConnectable:t,sourcePosition:n=W.Bottom})=>x.default.createElement(x.default.Fragment,null,e?.label,x.default.createElement(On,{type:"source",position:n,isConnectable:t}));y0.displayName="InputNode";var v0=(0,x.memo)(y0),w0=({data:e,isConnectable:t,targetPosition:n=W.Top})=>x.default.createElement(x.default.Fragment,null,x.default.createElement(On,{type:"target",position:n,isConnectable:t}),e?.label);w0.displayName="OutputNode";var x0=(0,x.memo)(w0),gd=()=>null;gd.displayName="GroupNode";var bE=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),bs=e=>e.id;function zE(e,t){return Ee(e.selectedNodes.map(bs),t.selectedNodes.map(bs))&&Ee(e.selectedEdges.map(bs),t.selectedEdges.map(bs))}var _0=(0,x.memo)(({onSelectionChange:e})=>{let t=ke(),{selectedNodes:n,selectedEdges:r}=ue(bE,zE);return(0,x.useEffect)(()=>{let o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChange.forEach(i=>i(o))},[n,r,e]),null});_0.displayName="SelectionListener";var PE=e=>!!e.onSelectionChange;function TE({onSelectionChange:e}){let t=ue(PE);return e||t?x.default.createElement(_0,{onSelectionChange:e}):null}var IE=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function ao(e,t){(0,x.useEffect)(()=>{typeof e<"u"&&t(e)},[e])}function K(e,t,n){(0,x.useEffect)(()=>{typeof t<"u"&&n({[e]:t})},[t])}var DE=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:l,onClickConnectStart:s,onClickConnectEnd:a,nodesDraggable:u,nodesConnectable:c,nodesFocusable:f,edgesFocusable:h,edgesUpdatable:g,elevateNodesOnSelect:_,minZoom:w,maxZoom:E,nodeExtent:d,onNodesChange:p,onEdgesChange:m,elementsSelectable:y,connectionMode:k,snapGrid:C,snapToGrid:P,translateExtent:N,connectOnClick:T,defaultEdgeOptions:I,fitView:R,fitViewOptions:B,onNodesDelete:H,onEdgesDelete:v,onNodeDrag:z,onNodeDragStart:M,onNodeDragStop:D,onSelectionDrag:$,onSelectionDragStart:b,onSelectionDragStop:A,noPanClassName:L,nodeOrigin:F,rfId:j,autoPanOnConnect:U,autoPanOnNodeDrag:X,onError:G,connectionRadius:J,isValidConnection:te,nodeDragThreshold:he})=>{let{setNodes:ie,setEdges:vt,setDefaultNodesAndEdges:lt,setMinZoom:wt,setMaxZoom:st,setTranslateExtent:xe,setNodeExtent:Tt,reset:le}=ue(IE,Ee),Y=ke();return(0,x.useEffect)(()=>{let Ze=r?.map($n=>({...$n,...I}));return lt(n,Ze),()=>{le()}},[]),K("defaultEdgeOptions",I,Y.setState),K("connectionMode",k,Y.setState),K("onConnect",o,Y.setState),K("onConnectStart",i,Y.setState),K("onConnectEnd",l,Y.setState),K("onClickConnectStart",s,Y.setState),K("onClickConnectEnd",a,Y.setState),K("nodesDraggable",u,Y.setState),K("nodesConnectable",c,Y.setState),K("nodesFocusable",f,Y.setState),K("edgesFocusable",h,Y.setState),K("edgesUpdatable",g,Y.setState),K("elementsSelectable",y,Y.setState),K("elevateNodesOnSelect",_,Y.setState),K("snapToGrid",P,Y.setState),K("snapGrid",C,Y.setState),K("onNodesChange",p,Y.setState),K("onEdgesChange",m,Y.setState),K("connectOnClick",T,Y.setState),K("fitViewOnInit",R,Y.setState),K("fitViewOnInitOptions",B,Y.setState),K("onNodesDelete",H,Y.setState),K("onEdgesDelete",v,Y.setState),K("onNodeDrag",z,Y.setState),K("onNodeDragStart",M,Y.setState),K("onNodeDragStop",D,Y.setState),K("onSelectionDrag",$,Y.setState),K("onSelectionDragStart",b,Y.setState),K("onSelectionDragStop",A,Y.setState),K("noPanClassName",L,Y.setState),K("nodeOrigin",F,Y.setState),K("rfId",j,Y.setState),K("autoPanOnConnect",U,Y.setState),K("autoPanOnNodeDrag",X,Y.setState),K("onError",G,Y.setState),K("connectionRadius",J,Y.setState),K("isValidConnection",te,Y.setState),K("nodeDragThreshold",he,Y.setState),ao(e,ie),ao(t,vt),ao(w,wt),ao(E,st),ao(N,xe),ao(d,Tt),null},$g={display:"none"},AE={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},S0="react-flow__node-desc",E0="react-flow__edge-desc",OE="react-flow__aria-live",RE=e=>e.ariaLiveMessage;function LE({rfId:e}){let t=ue(RE);return x.default.createElement("div",{id:`${OE}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:AE},t)}function $E({rfId:e,disableKeyboardA11y:t}){return x.default.createElement(x.default.Fragment,null,x.default.createElement("div",{id:`${S0}-${e}`,style:$g},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),x.default.createElement("div",{id:`${E0}-${e}`,style:$g},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&x.default.createElement(LE,{rfId:e}))}var Pi=(e=null,t={actInsideInputWithModifier:!0})=>{let[n,r]=(0,x.useState)(!1),o=(0,x.useRef)(!1),i=(0,x.useRef)(new Set([])),[l,s]=(0,x.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.split("+")),c=u.reduce((f,h)=>f.concat(...h),[]);return[u,c]}return[[],[]]},[e]);return(0,x.useEffect)(()=>{let a=typeof document<"u"?document:null,u=t?.target||a;if(e!==null){let c=g=>{if(o.current=g.ctrlKey||g.metaKey||g.shiftKey,(!o.current||o.current&&!t.actInsideInputWithModifier)&&Jc(g))return!1;let w=Hg(g.code,s);i.current.add(g[w]),Fg(l,i.current,!1)&&(g.preventDefault(),r(!0))},f=g=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&Jc(g))return!1;let w=Hg(g.code,s);Fg(l,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(g[w]),g.key==="Meta"&&i.current.clear(),o.current=!1},h=()=>{i.current.clear(),r(!1)};return u?.addEventListener("keydown",c),u?.addEventListener("keyup",f),window.addEventListener("blur",h),()=>{u?.removeEventListener("keydown",c),u?.removeEventListener("keyup",f),window.removeEventListener("blur",h)}}},[e,r]),n};function Fg(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Hg(e,t){return t.includes(e)?"code":"key"}function k0(e,t,n,r){let o=e.parentNode||e.parentId;if(!o)return n;let i=t.get(o),l=ho(i,r);return k0(i,t,{x:(n.x??0)+l.x,y:(n.y??0)+l.y,z:(i[ge]?.z??0)>(n.z??0)?i[ge]?.z??0:n.z??0},r)}function N0(e,t,n){e.forEach(r=>{let o=r.parentNode||r.parentId;if(o&&!e.has(o))throw new Error(`Parent node ${o} not found`);if(o||n?.[r.id]){let{x:i,y:l,z:s}=k0(r,e,{...r.position,z:r[ge]?.z??0},t);r.positionAbsolute={x:i,y:l},r[ge].z=s,n?.[r.id]&&(r[ge].isParent=!0)}})}function Kc(e,t,n,r){let o=new Map,i={},l=r?1e3:0;return e.forEach(s=>{let a=(gt(s.zIndex)?s.zIndex:0)+(s.selected?l:0),u=t.get(s.id),c={...s,positionAbsolute:{x:s.position.x,y:s.position.y}},f=s.parentNode||s.parentId;f&&(i[f]=!0);let h=u?.type&&u?.type!==s.type;Object.defineProperty(c,ge,{enumerable:!1,value:{handleBounds:h?void 0:u?.[ge]?.handleBounds,z:a}}),o.set(s.id,c)}),N0(o,n,i),o}function C0(e,t={}){let{getNodes:n,width:r,height:o,minZoom:i,maxZoom:l,d3Zoom:s,d3Selection:a,fitViewOnInitDone:u,fitViewOnInit:c,nodeOrigin:f}=e(),h=t.initial&&!u&&c;if(s&&a&&(h||!t.initial)){let _=n().filter(E=>{let d=t.includeHiddenNodes?E.width&&E.height:!E.hidden;return t.nodes?.length?d&&t.nodes.some(p=>p.id===E.id):d}),w=_.every(E=>E.width&&E.height);if(_.length>0&&w){let E=hd(_,f),{x:d,y:p,zoom:m}=d0(E,r,o,t.minZoom??i,t.maxZoom??l,t.padding??.1),y=Ut.translate(d,p).scale(m);return typeof t.duration=="number"&&t.duration>0?s.transform(mr(a,t.duration),y):s.transform(a,y),!0}}return!1}function FE(e,t){return e.forEach(n=>{let r=t.get(n.id);r&&t.set(r.id,{...r,[ge]:r[ge],selected:n.selected})}),new Map(t)}function HE(e,t){return t.map(n=>{let r=e.find(o=>o.id===n.id);return r&&(n.selected=r.selected),n})}function zs({changedNodes:e,changedEdges:t,get:n,set:r}){let{nodeInternals:o,edges:i,onNodesChange:l,onEdgesChange:s,hasDefaultNodes:a,hasDefaultEdges:u}=n();e?.length&&(a&&r({nodeInternals:FE(e,o)}),l?.(e)),t?.length&&(u&&r({edges:HE(t,i)}),s?.(t))}var uo=()=>{},BE={zoomIn:uo,zoomOut:uo,zoomTo:uo,getZoom:()=>1,setViewport:uo,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:uo,fitBounds:uo,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},VE=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),UE=()=>{let e=ke(),{d3Zoom:t,d3Selection:n}=ue(VE,Ee);return(0,x.useMemo)(()=>n&&t?{zoomIn:o=>t.scaleBy(mr(n,o?.duration),1.2),zoomOut:o=>t.scaleBy(mr(n,o?.duration),1/1.2),zoomTo:(o,i)=>t.scaleTo(mr(n,i?.duration),o),getZoom:()=>e.getState().transform[2],setViewport:(o,i)=>{let[l,s,a]=e.getState().transform,u=Ut.translate(o.x??l,o.y??s).scale(o.zoom??a);t.transform(mr(n,i?.duration),u)},getViewport:()=>{let[o,i,l]=e.getState().transform;return{x:o,y:i,zoom:l}},fitView:o=>C0(e.getState,o),setCenter:(o,i,l)=>{let{width:s,height:a,maxZoom:u}=e.getState(),c=typeof l?.zoom<"u"?l.zoom:u,f=s/2-o*c,h=a/2-i*c,g=Ut.translate(f,h).scale(c);t.transform(mr(n,l?.duration),g)},fitBounds:(o,i)=>{let{width:l,height:s,minZoom:a,maxZoom:u}=e.getState(),{x:c,y:f,zoom:h}=d0(o,l,s,a,u,i?.padding??.1),g=Ut.translate(c,f).scale(h);t.transform(mr(n,i?.duration),g)},project:o=>{let{transform:i,snapToGrid:l,snapGrid:s}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),nd(o,i,l,s)},screenToFlowPosition:o=>{let{transform:i,snapToGrid:l,snapGrid:s,domNode:a}=e.getState();if(!a)return o;let{x:u,y:c}=a.getBoundingClientRect(),f={x:o.x-u,y:o.y-c};return nd(f,i,l,s)},flowToScreenPosition:o=>{let{transform:i,domNode:l}=e.getState();if(!l)return o;let{x:s,y:a}=l.getBoundingClientRect(),u=a0(o,i);return{x:u.x+s,y:u.y+a}},viewportInitialized:!0}:BE,[t,n])};function yo(){let e=UE(),t=ke(),n=(0,x.useCallback)(()=>t.getState().getNodes().map(w=>({...w})),[]),r=(0,x.useCallback)(w=>t.getState().nodeInternals.get(w),[]),o=(0,x.useCallback)(()=>{let{edges:w=[]}=t.getState();return w.map(E=>({...E}))},[]),i=(0,x.useCallback)(w=>{let{edges:E=[]}=t.getState();return E.find(d=>d.id===w)},[]),l=(0,x.useCallback)(w=>{let{getNodes:E,setNodes:d,hasDefaultNodes:p,onNodesChange:m}=t.getState(),y=E(),k=typeof w=="function"?w(y):w;if(p)d(k);else if(m){let C=k.length===0?y.map(P=>({type:"remove",id:P.id})):k.map(P=>({item:P,type:"reset"}));m(C)}},[]),s=(0,x.useCallback)(w=>{let{edges:E=[],setEdges:d,hasDefaultEdges:p,onEdgesChange:m}=t.getState(),y=typeof w=="function"?w(E):w;if(p)d(y);else if(m){let k=y.length===0?E.map(C=>({type:"remove",id:C.id})):y.map(C=>({item:C,type:"reset"}));m(k)}},[]),a=(0,x.useCallback)(w=>{let E=Array.isArray(w)?w:[w],{getNodes:d,setNodes:p,hasDefaultNodes:m,onNodesChange:y}=t.getState();if(m){let C=[...d(),...E];p(C)}else if(y){let k=E.map(C=>({item:C,type:"add"}));y(k)}},[]),u=(0,x.useCallback)(w=>{let E=Array.isArray(w)?w:[w],{edges:d=[],setEdges:p,hasDefaultEdges:m,onEdgesChange:y}=t.getState();if(m)p([...d,...E]);else if(y){let k=E.map(C=>({item:C,type:"add"}));y(k)}},[]),c=(0,x.useCallback)(()=>{let{getNodes:w,edges:E=[],transform:d}=t.getState(),[p,m,y]=d;return{nodes:w().map(k=>({...k})),edges:E.map(k=>({...k})),viewport:{x:p,y:m,zoom:y}}},[]),f=(0,x.useCallback)(({nodes:w,edges:E})=>{let{nodeInternals:d,getNodes:p,edges:m,hasDefaultNodes:y,hasDefaultEdges:k,onNodesDelete:C,onEdgesDelete:P,onNodesChange:N,onEdgesChange:T}=t.getState(),I=(w||[]).map(z=>z.id),R=(E||[]).map(z=>z.id),B=p().reduce((z,M)=>{let D=M.parentNode||M.parentId,$=!I.includes(M.id)&&D&&z.find(A=>A.id===D);return(typeof M.deletable!="boolean"||M.deletable)&&(I.includes(M.id)||$)&&z.push(M),z},[]),H=m.filter(z=>typeof z.deletable=="boolean"?z.deletable:!0),v=H.filter(z=>R.includes(z.id));if(B||v){let z=c0(B,H),M=[...v,...z],D=M.reduce(($,b)=>($.includes(b.id)||$.push(b.id),$),[]);if((k||y)&&(k&&t.setState({edges:m.filter($=>!D.includes($.id))}),y&&(B.forEach($=>{d.delete($.id)}),t.setState({nodeInternals:new Map(d)}))),D.length>0&&(P?.(M),T&&T(D.map($=>({id:$,type:"remove"})))),B.length>0&&(C?.(B),N)){let $=B.map(b=>({id:b.id,type:"remove"}));N($)}}},[]),h=(0,x.useCallback)(w=>{let E=cE(w),d=E?null:t.getState().nodeInternals.get(w.id);return!E&&!d?[null,null,E]:[E?w:Tg(d),d,E]},[]),g=(0,x.useCallback)((w,E=!0,d)=>{let[p,m,y]=h(w);return p?(d||t.getState().getNodes()).filter(k=>{if(!y&&(k.id===m.id||!k.positionAbsolute))return!1;let C=Tg(k),P=qc(C,p);return E&&P>0||P>=p.width*p.height}):[]},[]),_=(0,x.useCallback)((w,E,d=!0)=>{let[p]=h(w);if(!p)return!1;let m=qc(p,E);return d&&m>0||m>=p.width*p.height},[]);return(0,x.useMemo)(()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:l,setEdges:s,addNodes:a,addEdges:u,toObject:c,deleteElements:f,getIntersectingNodes:g,isNodeIntersecting:_}),[e,n,r,o,i,l,s,a,u,c,f,g,_])}var jE={actInsideInputWithModifier:!1},WE=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{let n=ke(),{deleteElements:r}=yo(),o=Pi(e,jE),i=Pi(t);(0,x.useEffect)(()=>{if(o){let{edges:l,getNodes:s}=n.getState(),a=s().filter(c=>c.selected),u=l.filter(c=>c.selected);r({nodes:a,edges:u}),n.setState({nodesSelectionActive:!1})}},[o]),(0,x.useEffect)(()=>{n.setState({multiSelectionActive:i})},[i])};function YE(e){let t=ke();(0,x.useEffect)(()=>{let n,r=()=>{if(!e.current)return;let o=sd(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",jt.error004()),t.setState({width:o.width||500,height:o.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}var yd={position:"absolute",width:"100%",height:"100%",top:0,left:0},XE=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Ps=e=>({x:e.x,y:e.y,zoom:e.k}),co=(e,t)=>e.target.closest(`.${t}`),Bg=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Vg=e=>{let t=e.ctrlKey&&Ts()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},KE=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),ZE=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:i=!0,panOnScroll:l=!1,panOnScrollSpeed:s=.5,panOnScrollMode:a=gr.Free,zoomOnDoubleClick:u=!0,elementsSelectable:c,panOnDrag:f=!0,defaultViewport:h,translateExtent:g,minZoom:_,maxZoom:w,zoomActivationKeyCode:E,preventScrolling:d=!0,children:p,noWheelClassName:m,noPanClassName:y})=>{let k=(0,x.useRef)(),C=ke(),P=(0,x.useRef)(!1),N=(0,x.useRef)(!1),T=(0,x.useRef)(null),I=(0,x.useRef)({x:0,y:0,zoom:0}),{d3Zoom:R,d3Selection:B,d3ZoomHandler:H,userSelectionActive:v}=ue(KE,Ee),z=Pi(E),M=(0,x.useRef)(0),D=(0,x.useRef)(!1),$=(0,x.useRef)();return YE(T),(0,x.useEffect)(()=>{if(T.current){let b=T.current.getBoundingClientRect(),A=zg().scaleExtent([_,w]).translateExtent(g),L=Xe(T.current).call(A),F=Ut.translate(h.x,h.y).scale(go(h.zoom,_,w)),j=[[0,0],[b.width,b.height]],U=A.constrain()(F,j,g);A.transform(L,U),A.wheelDelta(Vg),C.setState({d3Zoom:A,d3Selection:L,d3ZoomHandler:L.on("wheel.zoom"),transform:[U.x,U.y,U.k],domNode:T.current.closest(".react-flow")})}},[]),(0,x.useEffect)(()=>{B&&R&&(l&&!z&&!v?B.on("wheel.zoom",b=>{if(co(b,m))return!1;b.preventDefault(),b.stopImmediatePropagation();let A=B.property("__zoom").k||1;if(b.ctrlKey&&i){let te=ot(b),he=Vg(b),ie=A*Math.pow(2,he);R.scaleTo(B,ie,te,b);return}let L=b.deltaMode===1?20:1,F=a===gr.Vertical?0:b.deltaX*L,j=a===gr.Horizontal?0:b.deltaY*L;!Ts()&&b.shiftKey&&a!==gr.Vertical&&(F=b.deltaY*L,j=0),R.translateBy(B,-(F/A)*s,-(j/A)*s,{internal:!0});let U=Ps(B.property("__zoom")),{onViewportChangeStart:X,onViewportChange:G,onViewportChangeEnd:J}=C.getState();clearTimeout($.current),D.current||(D.current=!0,t?.(b,U),X?.(U)),D.current&&(e?.(b,U),G?.(U),$.current=setTimeout(()=>{n?.(b,U),J?.(U),D.current=!1},150))},{passive:!1}):typeof H<"u"&&B.on("wheel.zoom",function(b,A){if(!d&&b.type==="wheel"&&!b.ctrlKey||co(b,m))return null;b.preventDefault(),H.call(this,b,A)},{passive:!1}))},[v,l,a,B,R,H,z,i,d,m,t,e,n]),(0,x.useEffect)(()=>{R&&R.on("start",b=>{if(!b.sourceEvent||b.sourceEvent.internal)return null;M.current=b.sourceEvent?.button;let{onViewportChangeStart:A}=C.getState(),L=Ps(b.transform);P.current=!0,I.current=L,b.sourceEvent?.type==="mousedown"&&C.setState({paneDragging:!0}),A?.(L),t?.(b.sourceEvent,L)})},[R,t]),(0,x.useEffect)(()=>{R&&(v&&!P.current?R.on("zoom",null):v||R.on("zoom",b=>{let{onViewportChange:A}=C.getState();if(C.setState({transform:[b.transform.x,b.transform.y,b.transform.k]}),N.current=!!(r&&Bg(f,M.current??0)),(e||A)&&!b.sourceEvent?.internal){let L=Ps(b.transform);A?.(L),e?.(b.sourceEvent,L)}}))},[v,R,e,f,r]),(0,x.useEffect)(()=>{R&&R.on("end",b=>{if(!b.sourceEvent||b.sourceEvent.internal)return null;let{onViewportChangeEnd:A}=C.getState();if(P.current=!1,C.setState({paneDragging:!1}),r&&Bg(f,M.current??0)&&!N.current&&r(b.sourceEvent),N.current=!1,(n||A)&&XE(I.current,b.transform)){let L=Ps(b.transform);I.current=L,clearTimeout(k.current),k.current=setTimeout(()=>{A?.(L),n?.(b.sourceEvent,L)},l?150:0)}})},[R,l,f,n,r]),(0,x.useEffect)(()=>{R&&R.filter(b=>{let A=z||o,L=i&&b.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&b.button===1&&b.type==="mousedown"&&(co(b,"react-flow__node")||co(b,"react-flow__edge")))return!0;if(!f&&!A&&!l&&!u&&!i||v||!u&&b.type==="dblclick"||co(b,m)&&b.type==="wheel"||co(b,y)&&(b.type!=="wheel"||l&&b.type==="wheel"&&!z)||!i&&b.ctrlKey&&b.type==="wheel"||!A&&!l&&!L&&b.type==="wheel"||!f&&(b.type==="mousedown"||b.type==="touchstart")||Array.isArray(f)&&!f.includes(b.button)&&b.type==="mousedown")return!1;let F=Array.isArray(f)&&f.includes(b.button)||!b.button||b.button<=1;return(!b.ctrlKey||b.type==="wheel")&&F})},[v,R,o,i,l,u,f,c,z]),x.default.createElement("div",{className:"react-flow__renderer",ref:T,style:yd},p)},QE=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function GE(){let{userSelectionActive:e,userSelectionRect:t}=ue(QE,Ee);return e&&t?x.default.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function Ug(e,t){let n=t.parentNode||t.parentId,r=e.find(o=>o.id===n);if(r){let o=t.position.x+t.width-r.width,i=t.position.y+t.height-r.height;if(o>0||i>0||t.position.x<0||t.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,o>0&&(r.style.width+=o),i>0&&(r.style.height+=i),t.position.x<0){let l=Math.abs(t.position.x);r.position.x=r.position.x-l,r.style.width+=l,t.position.x=0}if(t.position.y<0){let l=Math.abs(t.position.y);r.position.y=r.position.y-l,r.style.height+=l,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function M0(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);let n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,o)=>{let i=e.filter(s=>s.id===o.id);if(i.length===0)return r.push(o),r;let l={...o};for(let s of i)if(s)switch(s.type){case"select":{l.selected=s.selected;break}case"position":{typeof s.position<"u"&&(l.position=s.position),typeof s.positionAbsolute<"u"&&(l.positionAbsolute=s.positionAbsolute),typeof s.dragging<"u"&&(l.dragging=s.dragging),l.expandParent&&Ug(r,l);break}case"dimensions":{typeof s.dimensions<"u"&&(l.width=s.dimensions.width,l.height=s.dimensions.height),typeof s.updateStyle<"u"&&(l.style={...l.style||{},...s.dimensions}),typeof s.resizing=="boolean"&&(l.resizing=s.resizing),l.expandParent&&Ug(r,l);break}case"remove":return r}return r.push(l),r},n)}function b0(e,t){return M0(e,t)}function qE(e,t){return M0(e,t)}var In=(e,t)=>({id:e,type:"select",selected:t});function po(e,t){return e.reduce((n,r)=>{let o=t.includes(r.id);return!r.selected&&o?(r.selected=!0,n.push(In(r.id,!0))):r.selected&&!o&&(r.selected=!1,n.push(In(r.id,!1))),n},[])}var Zc=(e,t)=>n=>{n.target===t.current&&e?.(n)},JE=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),z0=(0,x.memo)(({isSelecting:e,selectionMode:t=zi.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:i,onPaneContextMenu:l,onPaneScroll:s,onPaneMouseEnter:a,onPaneMouseMove:u,onPaneMouseLeave:c,children:f})=>{let h=(0,x.useRef)(null),g=ke(),_=(0,x.useRef)(0),w=(0,x.useRef)(0),E=(0,x.useRef)(),{userSelectionActive:d,elementsSelectable:p,dragging:m}=ue(JE,Ee),y=()=>{g.setState({userSelectionActive:!1,userSelectionRect:null}),_.current=0,w.current=0},k=H=>{i?.(H),g.getState().resetSelectedElements(),g.setState({nodesSelectionActive:!1})},C=H=>{if(Array.isArray(n)&&n?.includes(2)){H.preventDefault();return}l?.(H)},P=s?H=>s(H):void 0,N=H=>{let{resetSelectedElements:v,domNode:z}=g.getState();if(E.current=z?.getBoundingClientRect(),!p||!e||H.button!==0||H.target!==h.current||!E.current)return;let{x:M,y:D}=An(H,E.current);v(),g.setState({userSelectionRect:{width:0,height:0,startX:M,startY:D,x:M,y:D}}),r?.(H)},T=H=>{let{userSelectionRect:v,nodeInternals:z,edges:M,transform:D,onNodesChange:$,onEdgesChange:b,nodeOrigin:A,getNodes:L}=g.getState();if(!e||!E.current||!v)return;g.setState({userSelectionActive:!0,nodesSelectionActive:!1});let F=An(H,E.current),j=v.startX??0,U=v.startY??0,X={...v,x:F.x<j?F.x:j,y:F.y<U?F.y:U,width:Math.abs(F.x-j),height:Math.abs(F.y-U)},G=L(),J=u0(z,X,D,t===zi.Partial,!0,A),te=c0(J,M).map(ie=>ie.id),he=J.map(ie=>ie.id);if(_.current!==he.length){_.current=he.length;let ie=po(G,he);ie.length&&$?.(ie)}if(w.current!==te.length){w.current=te.length;let ie=po(M,te);ie.length&&b?.(ie)}g.setState({userSelectionRect:X})},I=H=>{if(H.button!==0)return;let{userSelectionRect:v}=g.getState();!d&&v&&H.target===h.current&&k?.(H),g.setState({nodesSelectionActive:_.current>0}),y(),o?.(H)},R=H=>{d&&(g.setState({nodesSelectionActive:_.current>0}),o?.(H)),y()},B=p&&(e||d);return x.default.createElement("div",{className:we(["react-flow__pane",{dragging:m,selection:e}]),onClick:B?void 0:Zc(k,h),onContextMenu:Zc(C,h),onWheel:Zc(P,h),onMouseEnter:B?void 0:a,onMouseDown:B?N:void 0,onMouseMove:B?T:u,onMouseUp:B?I:void 0,onMouseLeave:B?R:c,ref:h,style:yd},f,x.default.createElement(GE,null))});z0.displayName="Pane";function P0(e,t){let n=e.parentNode||e.parentId;if(!n)return!1;let r=t.get(n);return r?r.selected?!0:P0(r,t):!1}function jg(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function e2(e,t,n,r){return Array.from(e.values()).filter(o=>(o.selected||o.id===r)&&(!o.parentNode||o.parentId||!P0(o,e))&&(o.draggable||t&&typeof o.draggable>"u")).map(o=>({id:o.id,position:o.position||{x:0,y:0},positionAbsolute:o.positionAbsolute||{x:0,y:0},distance:{x:n.x-(o.positionAbsolute?.x??0),y:n.y-(o.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:o.extent,parentNode:o.parentNode||o.parentId,parentId:o.parentNode||o.parentId,width:o.width,height:o.height,expandParent:o.expandParent}))}function t2(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function T0(e,t,n,r,o=[0,0],i){let l=t2(e,e.extent||r),s=l,a=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(a&&e.width&&e.height){let f=n.get(a),{x:h,y:g}=ho(f,o).positionAbsolute;s=f&>(h)&>(g)&>(f.width)&>(f.height)?[[h+e.width*o[0],g+e.height*o[1]],[h+f.width-e.width+e.width*o[0],g+f.height-e.height+e.height*o[1]]]:s}else i?.("005",jt.error005()),s=l;else if(e.extent&&a&&e.extent!=="parent"){let f=n.get(a),{x:h,y:g}=ho(f,o).positionAbsolute;s=[[e.extent[0][0]+h,e.extent[0][1]+g],[e.extent[1][0]+h,e.extent[1][1]+g]]}let u={x:0,y:0};if(a){let f=n.get(a);u=ho(f,o).positionAbsolute}let c=s&&s!=="parent"?ad(t,s):t;return{position:{x:c.x-u.x,y:c.y-u.y},positionAbsolute:c}}function Qc({nodeId:e,dragItems:t,nodeInternals:n}){let r=t.map(o=>({...n.get(o.id),position:o.position,positionAbsolute:o.positionAbsolute}));return[e?r.find(o=>o.id===e):r[0],r]}var Wg=(e,t,n,r)=>{let o=t.querySelectorAll(e);if(!o||!o.length)return null;let i=Array.from(o),l=t.getBoundingClientRect(),s={x:l.width*r[0],y:l.height*r[1]};return i.map(a=>{let u=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),position:a.getAttribute("data-handlepos"),x:(u.left-l.left-s.x)/n,y:(u.top-l.top-s.y)/n,...sd(a)}})};function Mi(e,t,n){return n===void 0?n:r=>{let o=t().nodeInternals.get(e);o&&n(r,{...o})}}function od({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:l,nodeInternals:s,onError:a}=t.getState(),u=s.get(e);if(!u){a?.("012",jt.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):o([e])}function n2(){let e=ke();return(0,x.useCallback)(({sourceEvent:n})=>{let{transform:r,snapGrid:o,snapToGrid:i}=e.getState(),l=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,a={x:(l-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:i?o[0]*Math.round(a.x/o[0]):a.x,ySnapped:i?o[1]*Math.round(a.y/o[1]):a.y,...a}},[])}function Gc(e){return(t,n,r)=>e?.(t,r)}function I0({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:l}){let s=ke(),[a,u]=(0,x.useState)(!1),c=(0,x.useRef)([]),f=(0,x.useRef)({x:null,y:null}),h=(0,x.useRef)(0),g=(0,x.useRef)(null),_=(0,x.useRef)({x:0,y:0}),w=(0,x.useRef)(null),E=(0,x.useRef)(!1),d=(0,x.useRef)(!1),p=(0,x.useRef)(!1),m=n2();return(0,x.useEffect)(()=>{if(e?.current){let y=Xe(e.current),k=({x:N,y:T})=>{let{nodeInternals:I,onNodeDrag:R,onSelectionDrag:B,updateNodePositions:H,nodeExtent:v,snapGrid:z,snapToGrid:M,nodeOrigin:D,onError:$}=s.getState();f.current={x:N,y:T};let b=!1,A={x:0,y:0,x2:0,y2:0};if(c.current.length>1&&v){let F=hd(c.current,D);A=ud(F)}if(c.current=c.current.map(F=>{let j={x:N-F.distance.x,y:T-F.distance.y};M&&(j.x=z[0]*Math.round(j.x/z[0]),j.y=z[1]*Math.round(j.y/z[1]));let U=[[v[0][0],v[0][1]],[v[1][0],v[1][1]]];c.current.length>1&&v&&!F.extent&&(U[0][0]=F.positionAbsolute.x-A.x+v[0][0],U[1][0]=F.positionAbsolute.x+(F.width??0)-A.x2+v[1][0],U[0][1]=F.positionAbsolute.y-A.y+v[0][1],U[1][1]=F.positionAbsolute.y+(F.height??0)-A.y2+v[1][1]);let X=T0(F,j,I,U,D,$);return b=b||F.position.x!==X.position.x||F.position.y!==X.position.y,F.position=X.position,F.positionAbsolute=X.positionAbsolute,F}),!b)return;H(c.current,!0,!0),u(!0);let L=o?R:Gc(B);if(L&&w.current){let[F,j]=Qc({nodeId:o,dragItems:c.current,nodeInternals:I});L(w.current,F,j)}},C=()=>{if(!g.current)return;let[N,T]=e0(_.current,g.current);if(N!==0||T!==0){let{transform:I,panBy:R}=s.getState();f.current.x=(f.current.x??0)-N/I[2],f.current.y=(f.current.y??0)-T/I[2],R({x:N,y:T})&&k(f.current)}h.current=requestAnimationFrame(C)},P=N=>{let{nodeInternals:T,multiSelectionActive:I,nodesDraggable:R,unselectNodesAndEdges:B,onNodeDragStart:H,onSelectionDragStart:v}=s.getState();d.current=!0;let z=o?H:Gc(v);(!l||!i)&&!I&&o&&(T.get(o)?.selected||B()),o&&i&&l&&od({id:o,store:s,nodeRef:e});let M=m(N);if(f.current=M,c.current=e2(T,R,M,o),z&&c.current){let[D,$]=Qc({nodeId:o,dragItems:c.current,nodeInternals:T});z(N.sourceEvent,D,$)}};if(t)y.on(".drag",null);else{let N=Dm().on("start",T=>{let{domNode:I,nodeDragThreshold:R}=s.getState();R===0&&P(T),p.current=!1;let B=m(T);f.current=B,g.current=I?.getBoundingClientRect()||null,_.current=An(T.sourceEvent,g.current)}).on("drag",T=>{let I=m(T),{autoPanOnNodeDrag:R,nodeDragThreshold:B}=s.getState();if(T.sourceEvent.type==="touchmove"&&T.sourceEvent.touches.length>1&&(p.current=!0),!p.current){if(!E.current&&d.current&&R&&(E.current=!0,C()),!d.current){let H=I.xSnapped-(f?.current?.x??0),v=I.ySnapped-(f?.current?.y??0);Math.sqrt(H*H+v*v)>B&&P(T)}(f.current.x!==I.xSnapped||f.current.y!==I.ySnapped)&&c.current&&d.current&&(w.current=T.sourceEvent,_.current=An(T.sourceEvent,g.current),k(I))}}).on("end",T=>{if(!(!d.current||p.current)&&(u(!1),E.current=!1,d.current=!1,cancelAnimationFrame(h.current),c.current)){let{updateNodePositions:I,nodeInternals:R,onNodeDragStop:B,onSelectionDragStop:H}=s.getState(),v=o?B:Gc(H);if(I(c.current,!1,!1),v){let[z,M]=Qc({nodeId:o,dragItems:c.current,nodeInternals:R});v(T.sourceEvent,z,M)}}}).filter(T=>{let I=T.target;return!T.button&&(!n||!jg(I,`.${n}`,e))&&(!r||jg(I,r,e))});return y.call(N),()=>{y.on(".drag",null)}}}},[e,t,n,r,i,s,o,l,m]),a}function D0(){let e=ke();return(0,x.useCallback)(n=>{let{nodeInternals:r,nodeExtent:o,updateNodePositions:i,getNodes:l,snapToGrid:s,snapGrid:a,onError:u,nodesDraggable:c}=e.getState(),f=l().filter(p=>p.selected&&(p.draggable||c&&typeof p.draggable>"u")),h=s?a[0]:5,g=s?a[1]:5,_=n.isShiftPressed?4:1,w=n.x*h*_,E=n.y*g*_,d=f.map(p=>{if(p.positionAbsolute){let m={x:p.positionAbsolute.x+w,y:p.positionAbsolute.y+E};s&&(m.x=a[0]*Math.round(m.x/a[0]),m.y=a[1]*Math.round(m.y/a[1]));let{positionAbsolute:y,position:k}=T0(p,m,r,o,void 0,u);p.position=k,p.positionAbsolute=y}return p});i(d,!0,!1)},[])}var mo={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},bi=e=>{let t=({id:n,type:r,data:o,xPos:i,yPos:l,xPosOrigin:s,yPosOrigin:a,selected:u,onClick:c,onMouseEnter:f,onMouseMove:h,onMouseLeave:g,onContextMenu:_,onDoubleClick:w,style:E,className:d,isDraggable:p,isSelectable:m,isConnectable:y,isFocusable:k,selectNodesOnDrag:C,sourcePosition:P,targetPosition:N,hidden:T,resizeObserver:I,dragHandle:R,zIndex:B,isParent:H,noDragClassName:v,noPanClassName:z,initialized:M,disableKeyboardA11y:D,ariaLabel:$,rfId:b,hasHandleBounds:A})=>{let L=ke(),F=(0,x.useRef)(null),j=(0,x.useRef)(null),U=(0,x.useRef)(P),X=(0,x.useRef)(N),G=(0,x.useRef)(r),J=m||p||c||f||h||g,te=D0(),he=Mi(n,L.getState,f),ie=Mi(n,L.getState,h),vt=Mi(n,L.getState,g),lt=Mi(n,L.getState,_),wt=Mi(n,L.getState,w),st=le=>{let{nodeDragThreshold:Y}=L.getState();if(m&&(!C||!p||Y>0)&&od({id:n,store:L,nodeRef:F}),c){let Ze=L.getState().nodeInternals.get(n);Ze&&c(le,{...Ze})}},xe=le=>{if(!Jc(le)&&!D)if(n0.includes(le.key)&&m){let Y=le.key==="Escape";od({id:n,store:L,unselect:Y,nodeRef:F})}else p&&u&&Object.prototype.hasOwnProperty.call(mo,le.key)&&(L.setState({ariaLiveMessage:`Moved selected node ${le.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~l}`}),te({x:mo[le.key].x,y:mo[le.key].y,isShiftPressed:le.shiftKey}))};(0,x.useEffect)(()=>()=>{j.current&&(I?.unobserve(j.current),j.current=null)},[]),(0,x.useEffect)(()=>{if(F.current&&!T){let le=F.current;(!M||!A||j.current!==le)&&(j.current&&I?.unobserve(j.current),I?.observe(le),j.current=le)}},[T,M,A]),(0,x.useEffect)(()=>{let le=G.current!==r,Y=U.current!==P,Ze=X.current!==N;F.current&&(le||Y||Ze)&&(le&&(G.current=r),Y&&(U.current=P),Ze&&(X.current=N),L.getState().updateNodeDimensions([{id:n,nodeElement:F.current,forceUpdate:!0}]))},[n,r,P,N]);let Tt=I0({nodeRef:F,disabled:T||!p,noDragClassName:v,handleSelector:R,nodeId:n,isSelectable:m,selectNodesOnDrag:C});return T?null:x.default.createElement("div",{className:we(["react-flow__node",`react-flow__node-${r}`,{[z]:p},d,{selected:u,selectable:m,parent:H,dragging:Tt}]),ref:F,style:{zIndex:B,transform:`translate(${s}px,${a}px)`,pointerEvents:J?"all":"none",visibility:M?"visible":"hidden",...E},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:he,onMouseMove:ie,onMouseLeave:vt,onContextMenu:lt,onClick:st,onDoubleClick:wt,onKeyDown:k?xe:void 0,tabIndex:k?0:void 0,role:k?"button":void 0,"aria-describedby":D?void 0:`${S0}-${b}`,"aria-label":$},x.default.createElement(gE,{value:n},x.default.createElement(e,{id:n,data:o,type:r,xPos:i,yPos:l,selected:u,isConnectable:y,sourcePosition:P,targetPosition:N,dragging:Tt,dragHandle:R,zIndex:B})))};return t.displayName="NodeWrapper",(0,x.memo)(t)},r2=e=>{let t=e.getNodes().filter(n=>n.selected);return{...hd(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function o2({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=ke(),{width:o,height:i,x:l,y:s,transformString:a,userSelectionActive:u}=ue(r2,Ee),c=D0(),f=(0,x.useRef)(null);if((0,x.useEffect)(()=>{n||f.current?.focus({preventScroll:!0})},[n]),I0({nodeRef:f}),u||!o||!i)return null;let h=e?_=>{let w=r.getState().getNodes().filter(E=>E.selected);e(_,w)}:void 0,g=_=>{Object.prototype.hasOwnProperty.call(mo,_.key)&&c({x:mo[_.key].x,y:mo[_.key].y,isShiftPressed:_.shiftKey})};return x.default.createElement("div",{className:we(["react-flow__nodesselection","react-flow__container",t]),style:{transform:a}},x.default.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:o,height:i,top:s,left:l}}))}var i2=(0,x.memo)(o2),l2=e=>e.nodesSelectionActive,A0=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:l,deleteKeyCode:s,onMove:a,onMoveStart:u,onMoveEnd:c,selectionKeyCode:f,selectionOnDrag:h,selectionMode:g,onSelectionStart:_,onSelectionEnd:w,multiSelectionKeyCode:E,panActivationKeyCode:d,zoomActivationKeyCode:p,elementsSelectable:m,zoomOnScroll:y,zoomOnPinch:k,panOnScroll:C,panOnScrollSpeed:P,panOnScrollMode:N,zoomOnDoubleClick:T,panOnDrag:I,defaultViewport:R,translateExtent:B,minZoom:H,maxZoom:v,preventScrolling:z,onSelectionContextMenu:M,noWheelClassName:D,noPanClassName:$,disableKeyboardA11y:b})=>{let A=ue(l2),L=Pi(f),F=Pi(d),j=F||I,U=F||C,X=L||h&&j!==!0;return WE({deleteKeyCode:s,multiSelectionKeyCode:E}),x.default.createElement(ZE,{onMove:a,onMoveStart:u,onMoveEnd:c,onPaneContextMenu:i,elementsSelectable:m,zoomOnScroll:y,zoomOnPinch:k,panOnScroll:U,panOnScrollSpeed:P,panOnScrollMode:N,zoomOnDoubleClick:T,panOnDrag:!L&&j,defaultViewport:R,translateExtent:B,minZoom:H,maxZoom:v,zoomActivationKeyCode:p,preventScrolling:z,noWheelClassName:D,noPanClassName:$},x.default.createElement(z0,{onSelectionStart:_,onSelectionEnd:w,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:l,panOnDrag:j,isSelecting:!!X,selectionMode:g},e,A&&x.default.createElement(i2,{onSelectionContextMenu:M,noPanClassName:$,disableKeyboardA11y:b})))};A0.displayName="FlowRenderer";var s2=(0,x.memo)(A0);function a2(e){return ue((0,x.useCallback)(n=>e?u0(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function u2(e){let t={input:bi(e.input||v0),default:bi(e.default||rd),output:bi(e.output||x0),group:bi(e.group||gd)},n={},r=Object.keys(e).filter(o=>!["input","default","output","group"].includes(o)).reduce((o,i)=>(o[i]=bi(e[i]||rd),o),n);return{...t,...r}}var c2=({x:e,y:t,width:n,height:r,origin:o})=>!n||!r?{x:e,y:t}:o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]},d2=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),O0=e=>{let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:i,onError:l}=ue(d2,Ee),s=a2(e.onlyRenderVisibleElements),a=(0,x.useRef)(),u=(0,x.useMemo)(()=>{if(typeof ResizeObserver>"u")return null;let c=new ResizeObserver(f=>{let h=f.map(g=>({id:g.target.getAttribute("data-id"),nodeElement:g.target,forceUpdate:!0}));i(h)});return a.current=c,c},[]);return(0,x.useEffect)(()=>()=>{a?.current?.disconnect()},[]),x.default.createElement("div",{className:"react-flow__nodes",style:yd},s.map(c=>{let f=c.type||"default";e.nodeTypes[f]||(l?.("003",jt.error003(f)),f="default");let h=e.nodeTypes[f]||e.nodeTypes.default,g=!!(c.draggable||t&&typeof c.draggable>"u"),_=!!(c.selectable||o&&typeof c.selectable>"u"),w=!!(c.connectable||n&&typeof c.connectable>"u"),E=!!(c.focusable||r&&typeof c.focusable>"u"),d=e.nodeExtent?ad(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,p=d?.x??0,m=d?.y??0,y=c2({x:p,y:m,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return x.default.createElement(h,{key:c.id,id:c.id,className:c.className,style:c.style,type:f,data:c.data,sourcePosition:c.sourcePosition||W.Bottom,targetPosition:c.targetPosition||W.Top,hidden:c.hidden,xPos:p,yPos:m,xPosOrigin:y.x,yPosOrigin:y.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!c.selected,isDraggable:g,isSelectable:_,isConnectable:w,isFocusable:E,resizeObserver:u,dragHandle:c.dragHandle,zIndex:c[ge]?.z??0,isParent:!!c[ge]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel,hasHandleBounds:!!c[ge]?.handleBounds})}))};O0.displayName="NodeRenderer";var f2=(0,x.memo)(O0),p2=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,h2=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,Yg="react-flow__edgeupdater",Xg=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:l,type:s})=>x.default.createElement("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:l,className:we([Yg,`${Yg}-${s}`]),cx:p2(t,r,e),cy:h2(n,r,e),r,stroke:"transparent",fill:"transparent"}),m2=()=>!0,fo=e=>{let t=({id:n,className:r,type:o,data:i,onClick:l,onEdgeDoubleClick:s,selected:a,animated:u,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:g,labelBgPadding:_,labelBgBorderRadius:w,style:E,source:d,target:p,sourceX:m,sourceY:y,targetX:k,targetY:C,sourcePosition:P,targetPosition:N,elementsSelectable:T,hidden:I,sourceHandleId:R,targetHandleId:B,onContextMenu:H,onMouseEnter:v,onMouseMove:z,onMouseLeave:M,reconnectRadius:D,onReconnect:$,onReconnectStart:b,onReconnectEnd:A,markerEnd:L,markerStart:F,rfId:j,ariaLabel:U,isFocusable:X,isReconnectable:G,pathOptions:J,interactionWidth:te,disableKeyboardA11y:he})=>{let ie=(0,x.useRef)(null),[vt,lt]=(0,x.useState)(!1),[wt,st]=(0,x.useState)(!1),xe=ke(),Tt=(0,x.useMemo)(()=>`url('#${td(F,j)}')`,[F,j]),le=(0,x.useMemo)(()=>`url('#${td(L,j)}')`,[L,j]);if(I)return null;let Y=Te=>{let{edges:It,addSelectedEdges:Bn,unselectNodesAndEdges:Vn,multiSelectionActive:Er}=xe.getState(),Dt=It.find(Un=>Un.id===n);Dt&&(T&&(xe.setState({nodesSelectionActive:!1}),Dt.selected&&Er?(Vn({nodes:[],edges:[Dt]}),ie.current?.blur()):Bn([n])),l&&l(Te,Dt))},Ze=Ci(n,xe.getState,s),$n=Ci(n,xe.getState,H),wo=Ci(n,xe.getState,v),vr=Ci(n,xe.getState,z),wr=Ci(n,xe.getState,M),Yt=(Te,It)=>{if(Te.button!==0)return;let{edges:Bn,isValidConnection:Vn}=xe.getState(),Er=It?p:d,Dt=(It?B:R)||null,Un=It?"target":"source",Bs=Vn||m2,Vs=It,_o=Bn.find(jn=>jn.id===n);st(!0),b?.(Te,_o,Un);let Us=jn=>{st(!1),A?.(jn,_o,Un)};h0({event:Te,handleId:Dt,nodeId:Er,onConnect:jn=>$?.(_o,jn),isTarget:Vs,getState:xe.getState,setState:xe.setState,isValidConnection:Bs,edgeUpdaterType:Un,onReconnectEnd:Us})},xr=Te=>Yt(Te,!0),Fn=Te=>Yt(Te,!1),Hn=()=>lt(!0),_r=()=>lt(!1),Sr=!T&&!l,xo=Te=>{if(!he&&n0.includes(Te.key)&&T){let{unselectNodesAndEdges:It,addSelectedEdges:Bn,edges:Vn}=xe.getState();Te.key==="Escape"?(ie.current?.blur(),It({edges:[Vn.find(Dt=>Dt.id===n)]})):Bn([n])}};return x.default.createElement("g",{className:we(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:a,animated:u,inactive:Sr,updating:vt}]),onClick:Y,onDoubleClick:Ze,onContextMenu:$n,onMouseEnter:wo,onMouseMove:vr,onMouseLeave:wr,onKeyDown:X?xo:void 0,tabIndex:X?0:void 0,role:X?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":U===null?void 0:U||`Edge from ${d} to ${p}`,"aria-describedby":X?`${E0}-${j}`:void 0,ref:ie},!wt&&x.default.createElement(e,{id:n,source:d,target:p,selected:a,animated:u,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:g,labelBgPadding:_,labelBgBorderRadius:w,data:i,style:E,sourceX:m,sourceY:y,targetX:k,targetY:C,sourcePosition:P,targetPosition:N,sourceHandleId:R,targetHandleId:B,markerStart:Tt,markerEnd:le,pathOptions:J,interactionWidth:te}),G&&x.default.createElement(x.default.Fragment,null,(G==="source"||G===!0)&&x.default.createElement(Xg,{position:P,centerX:m,centerY:y,radius:D,onMouseDown:xr,onMouseEnter:Hn,onMouseOut:_r,type:"source"}),(G==="target"||G===!0)&&x.default.createElement(Xg,{position:N,centerX:k,centerY:C,radius:D,onMouseDown:Fn,onMouseEnter:Hn,onMouseOut:_r,type:"target"})))};return t.displayName="EdgeWrapper",(0,x.memo)(t)};function g2(e){let t={default:fo(e.default||Ds),straight:fo(e.bezier||fd),step:fo(e.step||dd),smoothstep:fo(e.step||Os),simplebezier:fo(e.simplebezier||cd)},n={},r=Object.keys(e).filter(o=>!["default","bezier"].includes(o)).reduce((o,i)=>(o[i]=fo(e[i]||Ds),o),n);return{...t,...r}}function Kg(e,t,n=null){let r=(n?.x||0)+t.x,o=(n?.y||0)+t.y,i=n?.width||t.width,l=n?.height||t.height;switch(e){case W.Top:return{x:r+i/2,y:o};case W.Right:return{x:r+i,y:o+l/2};case W.Bottom:return{x:r+i/2,y:o+l};case W.Left:return{x:r,y:o+l/2}}}function Zg(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}var y2=(e,t,n,r,o,i)=>{let l=Kg(n,e,t),s=Kg(i,r,o);return{sourceX:l.x,sourceY:l.y,targetX:s.x,targetY:s.y}};function v2({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:i,width:l,height:s,transform:a}){let u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+i)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);let c=ud({x:(0-a[0])/a[2],y:(0-a[1])/a[2],width:l/a[2],height:s/a[2]}),f=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),h=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(f*h)>0}function Qg(e){let t=e?.[ge]?.handleBounds||null,n=t&&e?.width&&e?.height&&typeof e?.positionAbsolute?.x<"u"&&typeof e?.positionAbsolute?.y<"u";return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}var w2=[{level:0,isMaxLevel:!0,edges:[]}];function x2(e,t,n=!1){let r=-1,o=e.reduce((l,s)=>{let a=gt(s.zIndex),u=a?s.zIndex:0;if(n){let c=t.get(s.target),f=t.get(s.source),h=s.selected||c?.selected||f?.selected,g=Math.max(f?.[ge]?.z||0,c?.[ge]?.z||0,1e3);u=(a?s.zIndex:0)+(h?g:0)}return l[u]?l[u].push(s):l[u]=[s],r=u>r?u:r,l},{}),i=Object.entries(o).map(([l,s])=>{let a=+l;return{edges:s,level:a,isMaxLevel:a===r}});return i.length===0?w2:i}function _2(e,t,n){let r=ue((0,x.useCallback)(o=>e?o.edges.filter(i=>{let l=t.get(i.source),s=t.get(i.target);return l?.width&&l?.height&&s?.width&&s?.height&&v2({sourcePos:l.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:l.width,sourceHeight:l.height,targetWidth:s.width,targetHeight:s.height,width:o.width,height:o.height,transform:o.transform})}):o.edges,[e,t]));return x2(r,t,n)}var S2=({color:e="none",strokeWidth:t=1})=>x.default.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),E2=({color:e="none",strokeWidth:t=1})=>x.default.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Gg={[Is.Arrow]:S2,[Is.ArrowClosed]:E2};function k2(e){let t=ke();return(0,x.useMemo)(()=>Object.prototype.hasOwnProperty.call(Gg,e)?Gg[e]:(t.getState().onError?.("009",jt.error009(e)),null),[e])}var N2=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:l,orient:s="auto-start-reverse"})=>{let a=k2(t);return a?x.default.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:s,refX:"0",refY:"0"},x.default.createElement(a,{color:n,strokeWidth:l})):null},C2=({defaultColor:e,rfId:t})=>n=>{let r=[];return n.edges.reduce((o,i)=>([i.markerStart,i.markerEnd].forEach(l=>{if(l&&typeof l=="object"){let s=td(l,t);r.includes(s)||(o.push({id:s,color:l.color||e,...l}),r.push(s))}}),o),[]).sort((o,i)=>o.id.localeCompare(i.id))},R0=({defaultColor:e,rfId:t})=>{let n=ue((0,x.useCallback)(C2({defaultColor:e,rfId:t}),[e,t]),(r,o)=>!(r.length!==o.length||r.some((i,l)=>i.id!==o[l].id)));return x.default.createElement("defs",null,n.map(r=>x.default.createElement(N2,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};R0.displayName="MarkerDefinitions";var M2=(0,x.memo)(R0),b2=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),L0=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:i,onEdgeContextMenu:l,onEdgeMouseEnter:s,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:c,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:g,onReconnectEnd:_,reconnectRadius:w,children:E,disableKeyboardA11y:d})=>{let{edgesFocusable:p,edgesUpdatable:m,elementsSelectable:y,width:k,height:C,connectionMode:P,nodeInternals:N,onError:T}=ue(b2,Ee),I=_2(t,N,n);return k?x.default.createElement(x.default.Fragment,null,I.map(({level:R,edges:B,isMaxLevel:H})=>x.default.createElement("svg",{key:R,style:{zIndex:R},width:k,height:C,className:"react-flow__edges react-flow__container"},H&&x.default.createElement(M2,{defaultColor:e,rfId:r}),x.default.createElement("g",null,B.map(v=>{let[z,M,D]=Qg(N.get(v.source)),[$,b,A]=Qg(N.get(v.target));if(!D||!A)return null;let L=v.type||"default";o[L]||(T?.("011",jt.error011(L)),L="default");let F=o[L]||o.default,j=P===yr.Strict?b.target:(b.target??[]).concat(b.source??[]),U=Zg(M.source,v.sourceHandle),X=Zg(j,v.targetHandle),G=U?.position||W.Bottom,J=X?.position||W.Top,te=!!(v.focusable||p&&typeof v.focusable>"u"),he=v.reconnectable||v.updatable,ie=typeof h<"u"&&(he||m&&typeof he>"u");if(!U||!X)return T?.("008",jt.error008(U,v)),null;let{sourceX:vt,sourceY:lt,targetX:wt,targetY:st}=y2(z,U,G,$,X,J);return x.default.createElement(F,{key:v.id,id:v.id,className:we([v.className,i]),type:L,data:v.data,selected:!!v.selected,animated:!!v.animated,hidden:!!v.hidden,label:v.label,labelStyle:v.labelStyle,labelShowBg:v.labelShowBg,labelBgStyle:v.labelBgStyle,labelBgPadding:v.labelBgPadding,labelBgBorderRadius:v.labelBgBorderRadius,style:v.style,source:v.source,target:v.target,sourceHandleId:v.sourceHandle,targetHandleId:v.targetHandle,markerEnd:v.markerEnd,markerStart:v.markerStart,sourceX:vt,sourceY:lt,targetX:wt,targetY:st,sourcePosition:G,targetPosition:J,elementsSelectable:y,onContextMenu:l,onMouseEnter:s,onMouseMove:a,onMouseLeave:u,onClick:c,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:g,onReconnectEnd:_,reconnectRadius:w,rfId:r,ariaLabel:v.ariaLabel,isFocusable:te,isReconnectable:ie,pathOptions:"pathOptions"in v?v.pathOptions:void 0,interactionWidth:v.interactionWidth,disableKeyboardA11y:d})})))),E):null};L0.displayName="EdgeRenderer";var z2=(0,x.memo)(L0),P2=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function T2({children:e}){let t=ue(P2);return x.default.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function I2(e){let t=yo(),n=(0,x.useRef)(!1);(0,x.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var D2={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top},$0=({nodeId:e,handleType:t,style:n,type:r=Dn.Bezier,CustomComponent:o,connectionStatus:i})=>{let{fromNode:l,handleId:s,toX:a,toY:u,connectionMode:c}=ue((0,x.useCallback)(C=>({fromNode:C.nodeInternals.get(e),handleId:C.connectionHandleId,toX:(C.connectionPosition.x-C.transform[0])/C.transform[2],toY:(C.connectionPosition.y-C.transform[1])/C.transform[2],connectionMode:C.connectionMode}),[e]),Ee),f=l?.[ge]?.handleBounds,h=f?.[t];if(c===yr.Loose&&(h=h||f?.[t==="source"?"target":"source"]),!l||!h)return null;let g=s?h.find(C=>C.id===s):h[0],_=g?g.x+g.width/2:(l.width??0)/2,w=g?g.y+g.height/2:l.height??0,E=(l.positionAbsolute?.x??0)+_,d=(l.positionAbsolute?.y??0)+w,p=g?.position,m=p?D2[p]:null;if(!p||!m)return null;if(o)return x.default.createElement(o,{connectionLineType:r,connectionLineStyle:n,fromNode:l,fromHandle:g,fromX:E,fromY:d,toX:a,toY:u,fromPosition:p,toPosition:m,connectionStatus:i});let y="",k={sourceX:E,sourceY:d,sourcePosition:p,targetX:a,targetY:u,targetPosition:m};return r===Dn.Bezier?[y]=Rs(k):r===Dn.Step?[y]=ed({...k,borderRadius:0}):r===Dn.SmoothStep?[y]=ed(k):r===Dn.SimpleBezier?[y]=s0(k):y=`M${E},${d} ${a},${u}`,x.default.createElement("path",{d:y,fill:"none",className:"react-flow__connection-path",style:n})};$0.displayName="ConnectionLine";var A2=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function O2({containerStyle:e,style:t,type:n,component:r}){let{nodeId:o,handleType:i,nodesConnectable:l,width:s,height:a,connectionStatus:u}=ue(A2,Ee);return!(o&&i&&s&&l)?null:x.default.createElement("svg",{style:e,width:s,height:a,className:"react-flow__edges react-flow__connectionline react-flow__container"},x.default.createElement("g",{className:we(["react-flow__connection",u])},x.default.createElement($0,{nodeId:o,handleType:i,style:t,type:n,CustomComponent:r,connectionStatus:u})))}function qg(e,t){let n=(0,x.useRef)(null),r=ke();return(0,x.useMemo)(()=>t(e),[e])}var F0=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:i,onNodeClick:l,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:g,onSelectionContextMenu:_,onSelectionStart:w,onSelectionEnd:E,connectionLineType:d,connectionLineStyle:p,connectionLineComponent:m,connectionLineContainerStyle:y,selectionKeyCode:k,selectionOnDrag:C,selectionMode:P,multiSelectionKeyCode:N,panActivationKeyCode:T,zoomActivationKeyCode:I,deleteKeyCode:R,onlyRenderVisibleElements:B,elementsSelectable:H,selectNodesOnDrag:v,defaultViewport:z,translateExtent:M,minZoom:D,maxZoom:$,preventScrolling:b,defaultMarkerColor:A,zoomOnScroll:L,zoomOnPinch:F,panOnScroll:j,panOnScrollSpeed:U,panOnScrollMode:X,zoomOnDoubleClick:G,panOnDrag:J,onPaneClick:te,onPaneMouseEnter:he,onPaneMouseMove:ie,onPaneMouseLeave:vt,onPaneScroll:lt,onPaneContextMenu:wt,onEdgeContextMenu:st,onEdgeMouseEnter:xe,onEdgeMouseMove:Tt,onEdgeMouseLeave:le,onReconnect:Y,onReconnectStart:Ze,onReconnectEnd:$n,reconnectRadius:wo,noDragClassName:vr,noWheelClassName:wr,noPanClassName:Yt,elevateEdgesOnSelect:xr,disableKeyboardA11y:Fn,nodeOrigin:Hn,nodeExtent:_r,rfId:Sr})=>{let xo=qg(e,u2),Te=qg(t,g2);return I2(i),x.default.createElement(s2,{onPaneClick:te,onPaneMouseEnter:he,onPaneMouseMove:ie,onPaneMouseLeave:vt,onPaneContextMenu:wt,onPaneScroll:lt,deleteKeyCode:R,selectionKeyCode:k,selectionOnDrag:C,selectionMode:P,onSelectionStart:w,onSelectionEnd:E,multiSelectionKeyCode:N,panActivationKeyCode:T,zoomActivationKeyCode:I,elementsSelectable:H,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:L,zoomOnPinch:F,zoomOnDoubleClick:G,panOnScroll:j,panOnScrollSpeed:U,panOnScrollMode:X,panOnDrag:J,defaultViewport:z,translateExtent:M,minZoom:D,maxZoom:$,onSelectionContextMenu:_,preventScrolling:b,noDragClassName:vr,noWheelClassName:wr,noPanClassName:Yt,disableKeyboardA11y:Fn},x.default.createElement(T2,null,x.default.createElement(z2,{edgeTypes:Te,onEdgeClick:s,onEdgeDoubleClick:u,onlyRenderVisibleElements:B,onEdgeContextMenu:st,onEdgeMouseEnter:xe,onEdgeMouseMove:Tt,onEdgeMouseLeave:le,onReconnect:Y,onReconnectStart:Ze,onReconnectEnd:$n,reconnectRadius:wo,defaultMarkerColor:A,noPanClassName:Yt,elevateEdgesOnSelect:!!xr,disableKeyboardA11y:Fn,rfId:Sr},x.default.createElement(O2,{style:p,type:d,component:m,containerStyle:y})),x.default.createElement("div",{className:"react-flow__edgelabel-renderer"}),x.default.createElement(f2,{nodeTypes:xo,onNodeClick:l,onNodeDoubleClick:a,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:g,selectNodesOnDrag:v,onlyRenderVisibleElements:B,noPanClassName:Yt,noDragClassName:vr,disableKeyboardA11y:Fn,nodeOrigin:Hn,nodeExtent:_r,rfId:Sr})))};F0.displayName="GraphView";var R2=(0,x.memo)(F0),id=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Tn={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:id,nodeExtent:id,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:yr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:r0,isValidConnection:void 0},L2=()=>xm((e,t)=>({...Tn,setNodes:n=>{let{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:Kc(n,r,o,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{let{defaultEdgeOptions:r={}}=t();e({edges:n.map(o=>({...r,...o}))})},setDefaultNodesAndEdges:(n,r)=>{let o=typeof n<"u",i=typeof r<"u",l=o?Kc(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:l,edges:i?r:[],hasDefaultNodes:o,hasDefaultEdges:i})},updateNodeDimensions:n=>{let{onNodesChange:r,nodeInternals:o,fitViewOnInit:i,fitViewOnInitDone:l,fitViewOnInitOptions:s,domNode:a,nodeOrigin:u}=t(),c=a?.querySelector(".react-flow__viewport");if(!c)return;let f=window.getComputedStyle(c),{m22:h}=new window.DOMMatrixReadOnly(f.transform),g=n.reduce((w,E)=>{let d=o.get(E.id);if(d?.hidden)o.set(d.id,{...d,[ge]:{...d[ge],handleBounds:void 0}});else if(d){let p=sd(E.nodeElement);p.width&&p.height&&(d.width!==p.width||d.height!==p.height||E.forceUpdate)&&(o.set(d.id,{...d,[ge]:{...d[ge],handleBounds:{source:Wg(".source",E.nodeElement,h,u),target:Wg(".target",E.nodeElement,h,u)}},...p}),w.push({id:d.id,type:"dimensions",dimensions:p}))}return w},[]);N0(o,u);let _=l||i&&!l&&C0(t,{initial:!0,...s});e({nodeInternals:new Map(o),fitViewOnInitDone:_}),g?.length>0&&r?.(g)},updateNodePositions:(n,r=!0,o=!1)=>{let{triggerNodeChanges:i}=t(),l=n.map(s=>{let a={id:s.id,type:"position",dragging:o};return r&&(a.positionAbsolute=s.positionAbsolute,a.position=s.position),a});i(l)},triggerNodeChanges:n=>{let{onNodesChange:r,nodeInternals:o,hasDefaultNodes:i,nodeOrigin:l,getNodes:s,elevateNodesOnSelect:a}=t();if(n?.length){if(i){let u=b0(n,s()),c=Kc(u,o,l,a);e({nodeInternals:c})}r?.(n)}},addSelectedNodes:n=>{let{multiSelectionActive:r,edges:o,getNodes:i}=t(),l,s=null;r?l=n.map(a=>In(a,!0)):(l=po(i(),n),s=po(o,[])),zs({changedNodes:l,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{let{multiSelectionActive:r,edges:o,getNodes:i}=t(),l,s=null;r?l=n.map(a=>In(a,!0)):(l=po(o,n),s=po(i(),[])),zs({changedNodes:s,changedEdges:l,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{let{edges:o,getNodes:i}=t(),l=n||i(),s=r||o,a=l.map(c=>(c.selected=!1,In(c.id,!1))),u=s.map(c=>In(c.id,!1));zs({changedNodes:a,changedEdges:u,get:t,set:e})},setMinZoom:n=>{let{d3Zoom:r,maxZoom:o}=t();r?.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{let{d3Zoom:r,minZoom:o}=t();r?.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{let{edges:n,getNodes:r}=t(),i=r().filter(s=>s.selected).map(s=>In(s.id,!1)),l=n.filter(s=>s.selected).map(s=>In(s.id,!1));zs({changedNodes:i,changedEdges:l,get:t,set:e})},setNodeExtent:n=>{let{nodeInternals:r}=t();r.forEach(o=>{o.positionAbsolute=ad(o.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{let{transform:r,width:o,height:i,d3Zoom:l,d3Selection:s,translateExtent:a}=t();if(!l||!s||!n.x&&!n.y)return!1;let u=Ut.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[o,i]],f=l?.constrain()(u,c,a);return l.transform(s,f),r[0]!==f.x||r[1]!==f.y||r[2]!==f.k},cancelConnection:()=>e({connectionNodeId:Tn.connectionNodeId,connectionHandleId:Tn.connectionHandleId,connectionHandleType:Tn.connectionHandleType,connectionStatus:Tn.connectionStatus,connectionStartHandle:Tn.connectionStartHandle,connectionEndHandle:Tn.connectionEndHandle}),reset:()=>e({...Tn})}),Object.is),Ls=({children:e})=>{let t=(0,x.useRef)(null);return t.current||(t.current=L2()),x.default.createElement(rE,{value:t.current},e)};Ls.displayName="ReactFlowProvider";var H0=({children:e})=>(0,x.useContext)(As)?x.default.createElement(x.default.Fragment,null,e):x.default.createElement(Ls,null,e);H0.displayName="ReactFlowWrapper";var $2={input:v0,default:rd,output:x0,group:gd},F2={default:Ds,straight:fd,step:dd,smoothstep:Os,simplebezier:cd},H2=[0,0],B2=[15,15],V2={x:0,y:0,zoom:1},U2={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},$s=(0,x.forwardRef)(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i=$2,edgeTypes:l=F2,onNodeClick:s,onEdgeClick:a,onInit:u,onMove:c,onMoveStart:f,onMoveEnd:h,onConnect:g,onConnectStart:_,onConnectEnd:w,onClickConnectStart:E,onClickConnectEnd:d,onNodeMouseEnter:p,onNodeMouseMove:m,onNodeMouseLeave:y,onNodeContextMenu:k,onNodeDoubleClick:C,onNodeDragStart:P,onNodeDrag:N,onNodeDragStop:T,onNodesDelete:I,onEdgesDelete:R,onSelectionChange:B,onSelectionDragStart:H,onSelectionDrag:v,onSelectionDragStop:z,onSelectionContextMenu:M,onSelectionStart:D,onSelectionEnd:$,connectionMode:b=yr.Strict,connectionLineType:A=Dn.Bezier,connectionLineStyle:L,connectionLineComponent:F,connectionLineContainerStyle:j,deleteKeyCode:U="Backspace",selectionKeyCode:X="Shift",selectionOnDrag:G=!1,selectionMode:J=zi.Full,panActivationKeyCode:te="Space",multiSelectionKeyCode:he=Ts()?"Meta":"Control",zoomActivationKeyCode:ie=Ts()?"Meta":"Control",snapToGrid:vt=!1,snapGrid:lt=B2,onlyRenderVisibleElements:wt=!1,selectNodesOnDrag:st=!0,nodesDraggable:xe,nodesConnectable:Tt,nodesFocusable:le,nodeOrigin:Y=H2,edgesFocusable:Ze,edgesUpdatable:$n,elementsSelectable:wo,defaultViewport:vr=V2,minZoom:wr=.5,maxZoom:Yt=2,translateExtent:xr=id,preventScrolling:Fn=!0,nodeExtent:Hn,defaultMarkerColor:_r="#b1b1b7",zoomOnScroll:Sr=!0,zoomOnPinch:xo=!0,panOnScroll:Te=!1,panOnScrollSpeed:It=.5,panOnScrollMode:Bn=gr.Free,zoomOnDoubleClick:Vn=!0,panOnDrag:Er=!0,onPaneClick:Dt,onPaneMouseEnter:Un,onPaneMouseMove:Bs,onPaneMouseLeave:Vs,onPaneScroll:_o,onPaneContextMenu:Us,children:Sd,onEdgeContextMenu:jn,onEdgeDoubleClick:ny,onEdgeMouseEnter:ry,onEdgeMouseMove:oy,onEdgeMouseLeave:iy,onEdgeUpdate:ly,onEdgeUpdateStart:sy,onEdgeUpdateEnd:ay,onReconnect:uy,onReconnectStart:cy,onReconnectEnd:dy,reconnectRadius:fy=10,edgeUpdaterRadius:py=10,onNodesChange:hy,onEdgesChange:my,noDragClassName:gy="nodrag",noWheelClassName:yy="nowheel",noPanClassName:Ed="nopan",fitView:vy=!1,fitViewOptions:wy,connectOnClick:xy=!0,attributionPosition:_y,proOptions:Sy,defaultEdgeOptions:Ey,elevateNodesOnSelect:ky=!0,elevateEdgesOnSelect:Ny=!1,disableKeyboardA11y:kd=!1,autoPanOnConnect:Cy=!0,autoPanOnNodeDrag:My=!0,connectionRadius:by=20,isValidConnection:zy,onError:Py,style:Ty,id:Nd,nodeDragThreshold:Iy,...Dy},Ay)=>{let js=Nd||"1";return x.default.createElement("div",{...Dy,style:{...Ty,...U2},ref:Ay,className:we(["react-flow",o]),"data-testid":"rf__wrapper",id:Nd},x.default.createElement(H0,null,x.default.createElement(R2,{onInit:u,onMove:c,onMoveStart:f,onMoveEnd:h,onNodeClick:s,onEdgeClick:a,onNodeMouseEnter:p,onNodeMouseMove:m,onNodeMouseLeave:y,onNodeContextMenu:k,onNodeDoubleClick:C,nodeTypes:i,edgeTypes:l,connectionLineType:A,connectionLineStyle:L,connectionLineComponent:F,connectionLineContainerStyle:j,selectionKeyCode:X,selectionOnDrag:G,selectionMode:J,deleteKeyCode:U,multiSelectionKeyCode:he,panActivationKeyCode:te,zoomActivationKeyCode:ie,onlyRenderVisibleElements:wt,selectNodesOnDrag:st,defaultViewport:vr,translateExtent:xr,minZoom:wr,maxZoom:Yt,preventScrolling:Fn,zoomOnScroll:Sr,zoomOnPinch:xo,zoomOnDoubleClick:Vn,panOnScroll:Te,panOnScrollSpeed:It,panOnScrollMode:Bn,panOnDrag:Er,onPaneClick:Dt,onPaneMouseEnter:Un,onPaneMouseMove:Bs,onPaneMouseLeave:Vs,onPaneScroll:_o,onPaneContextMenu:Us,onSelectionContextMenu:M,onSelectionStart:D,onSelectionEnd:$,onEdgeContextMenu:jn,onEdgeDoubleClick:ny,onEdgeMouseEnter:ry,onEdgeMouseMove:oy,onEdgeMouseLeave:iy,onReconnect:uy??ly,onReconnectStart:cy??sy,onReconnectEnd:dy??ay,reconnectRadius:fy??py,defaultMarkerColor:_r,noDragClassName:gy,noWheelClassName:yy,noPanClassName:Ed,elevateEdgesOnSelect:Ny,rfId:js,disableKeyboardA11y:kd,nodeOrigin:Y,nodeExtent:Hn}),x.default.createElement(DE,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:_,onConnectEnd:w,onClickConnectStart:E,onClickConnectEnd:d,nodesDraggable:xe,nodesConnectable:Tt,nodesFocusable:le,edgesFocusable:Ze,edgesUpdatable:$n,elementsSelectable:wo,elevateNodesOnSelect:ky,minZoom:wr,maxZoom:Yt,nodeExtent:Hn,onNodesChange:hy,onEdgesChange:my,snapToGrid:vt,snapGrid:lt,connectionMode:b,translateExtent:xr,connectOnClick:xy,defaultEdgeOptions:Ey,fitView:vy,fitViewOptions:wy,onNodesDelete:I,onEdgesDelete:R,onNodeDragStart:P,onNodeDrag:N,onNodeDragStop:T,onSelectionDrag:v,onSelectionDragStart:H,onSelectionDragStop:z,noPanClassName:Ed,nodeOrigin:Y,rfId:js,autoPanOnConnect:Cy,autoPanOnNodeDrag:My,onError:Py,connectionRadius:by,isValidConnection:zy,nodeDragThreshold:Iy}),x.default.createElement(TE,{onSelectionChange:B}),Sd,x.default.createElement(iE,{proOptions:Sy,position:_y}),x.default.createElement($E,{rfId:js,disableKeyboardA11y:kd})))});$s.displayName="ReactFlow";function B0(e){return t=>{let[n,r]=(0,x.useState)(t),o=(0,x.useCallback)(i=>r(l=>e(i,l)),[]);return[n,r,o]}}var HN=B0(b0),BN=B0(qE);var q=at(xt(),1);function j2(){return q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},q.default.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function W2(){return q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},q.default.createElement("path",{d:"M0 0h32v4.2H0z"}))}function Y2(){return q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},q.default.createElement("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 X2(){return q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},q.default.createElement("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 K2(){return q.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},q.default.createElement("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"}))}var Ii=({children:e,className:t,...n})=>q.default.createElement("button",{type:"button",className:we(["react-flow__controls-button",t]),...n},e);Ii.displayName="ControlButton";var Z2=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),V0=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:l,onFitView:s,onInteractiveChange:a,className:u,children:c,position:f="bottom-left"})=>{let h=ke(),[g,_]=(0,q.useState)(!1),{isInteractive:w,minZoomReached:E,maxZoomReached:d}=ue(Z2,Ee),{zoomIn:p,zoomOut:m,fitView:y}=yo();if((0,q.useEffect)(()=>{_(!0)},[]),!g)return null;let k=()=>{p(),i?.()},C=()=>{m(),l?.()},P=()=>{y(o),s?.()},N=()=>{h.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),a?.(!w)};return q.default.createElement(ld,{className:we(["react-flow__controls",u]),position:f,style:e,"data-testid":"rf__controls"},t&&q.default.createElement(q.default.Fragment,null,q.default.createElement(Ii,{onClick:k,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:d},q.default.createElement(j2,null)),q.default.createElement(Ii,{onClick:C,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:E},q.default.createElement(W2,null))),n&&q.default.createElement(Ii,{className:"react-flow__controls-fitview",onClick:P,title:"fit view","aria-label":"fit view"},q.default.createElement(Y2,null)),r&&q.default.createElement(Ii,{className:"react-flow__controls-interactive",onClick:N,title:"toggle interactivity","aria-label":"toggle interactivity"},w?q.default.createElement(K2,null):q.default.createElement(X2,null)),c)};V0.displayName="Controls";var U0=(0,q.memo)(V0);var yt=at(xt(),1);var it;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(it||(it={}));function Q2({color:e,dimensions:t,lineWidth:n}){return yt.default.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function G2({color:e,radius:t}){return yt.default.createElement("circle",{cx:t,cy:t,r:t,fill:e})}var q2={[it.Dots]:"#91919a",[it.Lines]:"#eee",[it.Cross]:"#e2e2e2"},J2={[it.Dots]:1,[it.Lines]:1,[it.Cross]:6},ek=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function j0({id:e,variant:t=it.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=2,color:l,style:s,className:a}){let u=(0,yt.useRef)(null),{transform:c,patternId:f}=ue(ek,Ee),h=l||q2[t],g=r||J2[t],_=t===it.Dots,w=t===it.Cross,E=Array.isArray(n)?n:[n,n],d=[E[0]*c[2]||1,E[1]*c[2]||1],p=g*c[2],m=w?[p,p]:d,y=_?[p/i,p/i]:[m[0]/i,m[1]/i];return yt.default.createElement("svg",{className:we(["react-flow__background",a]),style:{...s,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:u,"data-testid":"rf__background"},yt.default.createElement("pattern",{id:f+e,x:c[0]%d[0],y:c[1]%d[1],width:d[0],height:d[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${y[0]},-${y[1]})`},_?yt.default.createElement(G2,{color:h,radius:p/i}):yt.default.createElement(Q2,{dimensions:m,color:h,lineWidth:o})),yt.default.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${f+e})`}))}j0.displayName="Background";var W0=(0,yt.memo)(j0);var Y0=at(xt(),1);var tk=at(ns(),1);var vd={web:0,api:400,db:820},vo={page:300,endpoint:320,model:250},Rn={page:58,endpoint:54,model:58},Ln=12,Di=58,Wt=18,nk=36;function X0(e){let t=e.graph,n=new Map;for(let d of e.diff.changes)n.set(d.id,d.kind);let r=[...t.pages,...e.diff.removed.pages],o=[...t.endpoints,...e.diff.removed.endpoints],i=[...t.models,...e.diff.removed.models];o.sort((d,p)=>d.group.localeCompare(p.group)||d.path.localeCompare(p.path));let l=new Map(o.map((d,p)=>[d.id,p])),s=d=>d.length?d.reduce((p,m)=>p+m,0)/d.length:1e9;r.sort((d,p)=>s(d.calls.map(m=>l.get(m.endpoint)??1e9))-s(p.calls.map(m=>l.get(m.endpoint)??1e9)));let a=d=>s(o.filter(p=>p.models.includes(d.name)).map(p=>l.get(p.id)));i.sort((d,p)=>a(d)-a(p));let u=[],c=[],f=0,h=t.services.filter(d=>d.type==="frontend");for(let d of h){let p=r.filter(y=>y.service===d.id),m=Di+p.length*(Rn.page+Ln)-Ln+Wt;u.push(wd(d.id,d.subtype==="mobile"?"mobile":"web",d.name,d.subtype==="mobile"?"Mobile app":"Web app",p.length,vd.web,f,vo.page+Wt*2,Math.max(m,110))),p.forEach((y,k)=>{u.push(xd(y.id,d.id,Wt,Di+k*(Rn.page+Ln),vo.page,Rn.page,{kind:"page",title:y.path??y.name,subtitle:y.component,status:n.get(y.id),item:y}))}),f+=Math.max(m,110)+nk}let g=t.services.find(d=>d.type==="backend");if(o.length){let d=Di,p="",m=[];for(let y of o)y.group!==p&&(p&&(d+=14),m.push(rk(`label:${y.group}`,"api",Wt,d,y.group)),d+=24,p=y.group),m.push(xd(y.id,"api",Wt,d,vo.endpoint,Rn.endpoint,{kind:"endpoint",title:y.path,subtitle:y.view,methods:y.methods,status:n.get(y.id),item:y})),d+=Rn.endpoint+Ln;u.push(wd("api","api",g?.name??"API","Backend",o.length,vd.api,0,vo.endpoint+Wt*2,d-Ln+Wt)),u.push(...m)}if(i.length){let d=t.services.find(m=>m.type==="database"),p=Di+i.length*(Rn.model+Ln)-Ln+Wt;u.push(wd("database","db",d?.name??"Database","Data",i.length,vd.db,0,vo.model+Wt*2,p)),i.forEach((m,y)=>{u.push(xd(m.id,"database",Wt,Di+y*(Rn.model+Ln),vo.model,Rn.model,{kind:"model",title:m.name,subtitle:`${m.fields.length} field${m.fields.length===1?"":"s"}`,status:n.get(m.id),item:m}))})}let _=new Set(u.map(d=>d.id)),w=new Set(e.diff.addedEdges),E=(d,p,m,y)=>{if(!_.has(d)||!_.has(p))return;let k=`${d}->${p}`;c.some(C=>C.id===k)||c.push({id:k,source:d,target:p,type:"flow",zIndex:1,data:{kind:m,method:y,isNew:w.has(k)}})};for(let d of r)for(let p of d.calls)E(d.id,p.endpoint,"calls",p.method);for(let d of h)for(let p of d.calls??[])E(d.id,p.endpoint,"calls",p.method);for(let d of o)for(let p of d.models)E(d.id,`model:${p}`,"uses");return{nodes:u,edges:c}}function wd(e,t,n,r,o,i,l,s,a){return{id:e,type:"zone",position:{x:i,y:l},data:{kind:t,title:n,subtitle:r,count:o},style:{width:s,height:a},draggable:!1,selectable:!1}}function xd(e,t,n,r,o,i,l){return{id:e,type:"card",parentNode:t,extent:"parent",position:{x:n,y:r},data:l,style:{width:o,height:i},draggable:!1}}function rk(e,t,n,r,o){return{id:e,type:"label",parentNode:t,position:{x:n,y:r},data:{text:o},draggable:!1,selectable:!1}}function K0(e,t){let n=new Set([t]),r=i=>e.filter(l=>l.source===i).forEach(l=>{n.has(l.target)||(n.add(l.target),r(l.target))}),o=i=>e.filter(l=>l.target===i).forEach(l=>{n.has(l.source)||(n.add(l.source),o(l.source))});return r(t),o(t),n}var S=at(_d(),1),Be={pulses:[],hits:new Map,listeners:new Set,emit(){this.listeners.forEach(e=>e())}};function Hs(){let[,e]=(0,ne.useState)(0);(0,ne.useEffect)(()=>{let t=()=>e(n=>n+1);return Be.listeners.add(t),()=>{Be.listeners.delete(t)}},[])}var J0=e=>{let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<5?"now":t<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:`${Math.floor(t/3600)}h ago`},ey={added:"NEW",changed:"CHANGED",removed:"REMOVED"},ck=(0,ne.memo)(({id:e,data:t,selected:n})=>{Hs();let r=Be.hits.get(e),o=r&&Date.now()-r.ts<1400,i=r&&r.status>=500&&Date.now()-r.ts<12e3,l=["card",`card-${t.kind}`,t.status&&`is-${t.status}`,o&&"is-hit",i&&"is-failing",n&&"is-selected"].filter(Boolean).join(" ");return(0,S.jsxs)("div",{className:l,children:[(0,S.jsx)(On,{type:"target",position:W.Left,isConnectable:!1}),(0,S.jsxs)("div",{className:"card-top",children:[t.methods&&(0,S.jsx)("span",{className:"methods",children:t.methods.map(s=>(0,S.jsx)("i",{className:`m-${s.toLowerCase()}`,children:s},s))}),(0,S.jsx)("span",{className:"card-title",children:t.title}),t.status&&(0,S.jsx)("span",{className:`tag tag-${t.status}`,children:ey[t.status]})]}),(0,S.jsxs)("div",{className:"card-sub",children:[(0,S.jsx)("span",{children:t.subtitle}),r&&(0,S.jsxs)("span",{className:`hit ${r.status>=400?"bad":""}`,children:[r.status," \xB7 ",r.count,"\xD7"]})]}),(0,S.jsx)(On,{type:"source",position:W.Right,isConnectable:!1})]})}),dk=(0,ne.memo)(({data:e})=>(0,S.jsxs)("div",{className:`group group-${e.kind}`,children:[(0,S.jsx)(On,{type:"source",position:W.Right,isConnectable:!1,style:{top:28}}),(0,S.jsxs)("div",{className:"group-head",children:[(0,S.jsx)("span",{className:"group-kind",children:e.subtitle}),(0,S.jsx)("span",{className:"group-title",children:e.title}),(0,S.jsx)("span",{className:"group-count",children:e.count})]})]})),fk=(0,ne.memo)(({data:e})=>(0,S.jsx)("div",{className:"area-label",children:e.text})),pk=(0,ne.memo)(({id:e,sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:l,data:s,style:a})=>{Hs();let[u]=Rs({sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:l,curvature:.35}),c=Be.pulses.filter(h=>h.edge===e),f=["flow",s?.isNew&&"is-new",c.length&&"is-active"].filter(Boolean).join(" ");return(0,S.jsxs)("g",{className:f,style:a,children:[(0,S.jsx)("path",{d:u,className:"flow-line",fill:"none"}),c.map(h=>(0,S.jsx)("circle",{r:3.5,className:h.error?"dot dot-err":"dot",style:{offsetPath:`path('${u}')`}},h.id))]})}),hk={card:ck,zone:dk,label:fk},mk={flow:pk};function gk(){let[e,t]=(0,ne.useState)(null),[n,r]=(0,ne.useState)([]),[o,i]=(0,ne.useState)(!1),[l,s]=(0,ne.useState)("changes"),[a,u]=(0,ne.useState)(null),c=yo(),f=(0,ne.useMemo)(()=>e?X0(e):{nodes:[],edges:[]},[e]),h=(0,ne.useRef)(f.edges);h.current=f.edges;let g=(0,ne.useRef)(!1),_=(0,ne.useCallback)(N=>{if(r(z=>[...z.slice(-399),N]),!N.endpoint)return;let T=Be.hits.get(N.endpoint);Be.hits.set(N.endpoint,{status:N.status,ts:Date.now(),count:(T?.count??0)+1});let I=N.status>=500,R=h.current.filter(z=>z.target===N.endpoint&&(!z.data?.method||z.data.method===N.method)),B=R.length?R:h.current.filter(z=>z.target===N.endpoint),H=h.current.filter(z=>z.source===N.endpoint),v=[];B.forEach(z=>v.push({id:Math.random(),edge:z.id,error:I})),Be.pulses.push(...v),Be.emit(),setTimeout(()=>{let z=I?[]:H.map(M=>({id:Math.random(),edge:M.id,error:!1}));Be.pulses=Be.pulses.filter(M=>!v.includes(M)).concat(z),Be.emit(),setTimeout(()=>{Be.pulses=Be.pulses.filter(M=>!z.includes(M)),Be.emit()},900)},900)},[]);(0,ne.useEffect)(()=>{let N=new EventSource("/api/events");N.addEventListener("open",()=>i(!0)),N.addEventListener("error",()=>i(!1)),N.addEventListener("state",I=>{let R=JSON.parse(I.data);t(R),r(B=>B.length?B:R.traffic)}),N.addEventListener("traffic",I=>_(JSON.parse(I.data)));let T=setInterval(()=>Be.emit(),1e3);return()=>{N.close(),clearInterval(T)}},[_]);let w=(0,ne.useRef)(!1);(0,ne.useEffect)(()=>{if(!f.nodes.length||g.current&&w.current)return;g.current=!0;let N=setTimeout(()=>c.fitView({padding:.08,duration:400}),80);return()=>clearTimeout(N)},[f.nodes.length,c]);let E=(0,ne.useMemo)(()=>a?K0(f.edges,a):null,[a,f.edges]),d=(0,ne.useMemo)(()=>f.nodes.map(N=>({...N,selected:N.id===a,className:E&&N.type==="card"&&!E.has(N.id)?"is-dim":void 0})),[f.nodes,E,a]),p=(0,ne.useMemo)(()=>f.edges.map(N=>({...N,style:E&&!(E.has(N.source)&&E.has(N.target))?{opacity:.12}:void 0})),[f.edges,E]),m=N=>{u(N),s("details");let T=c.getNode(N);T?.positionAbsolute&&(w.current=!0,c.setCenter(T.positionAbsolute.x+(T.width??300)/2,T.positionAbsolute.y+(T.height??56)/2,{zoom:Math.max(c.getZoom(),.9),duration:500}))};if(!e)return(0,S.jsxs)("div",{className:"boot",children:[(0,S.jsx)("span",{className:"pulse-dot"})," Scanning project\u2026"]});let y=e.graph,k=!y.pages.length&&!y.endpoints.length&&!y.models.length,C=e.diff.changes,P=n.filter(N=>N.status>=500&&Date.now()-N.ts<6e4).length;return(0,S.jsxs)("div",{className:"app",children:[(0,S.jsxs)("header",{className:"top",children:[(0,S.jsxs)("div",{className:"brand",children:[(0,S.jsx)("span",{className:"pulse-dot"})," TRACEFLOW"]}),(0,S.jsxs)("div",{className:"project",children:[(0,S.jsx)("b",{children:y.project}),(0,S.jsx)("span",{className:"stack",children:y.stack.map(N=>(0,S.jsx)("i",{children:N},N))})]}),(0,S.jsx)("div",{className:`status ${o?"":"off"}`,children:o?`live \xB7 scanned ${J0(e.scannedAt)} \xB7 ${e.scanMs} ms`:"reconnecting\u2026"})]}),(0,S.jsxs)("main",{className:"body",children:[(0,S.jsxs)("section",{className:"map",children:[k?(0,S.jsxs)("div",{className:"empty",children:[(0,S.jsx)("h2",{children:"Nothing to draw yet"}),(0,S.jsxs)("p",{children:["No Django backend or React app found in ",(0,S.jsx)("code",{children:y.root}),". Point TraceFlow at a project folder."]})]}):(0,S.jsxs)($s,{nodes:d,edges:p,nodeTypes:hk,edgeTypes:mk,onNodeClick:(N,T)=>T.type==="card"&&m(T.id),onPaneClick:()=>u(null),onMoveStart:N=>{N&&(w.current=!0)},minZoom:.15,maxZoom:2,nodesConnectable:!1,nodesDraggable:!1,proOptions:{hideAttribution:!0},children:[(0,S.jsx)(W0,{variant:it.Lines,gap:48,color:"#101114"}),(0,S.jsx)(U0,{showInteractive:!1,position:"bottom-left"})]}),(0,S.jsxs)("div",{className:"legend",children:[(0,S.jsxs)("span",{children:[(0,S.jsx)("i",{className:"lg lg-new"})," new"]}),(0,S.jsxs)("span",{children:[(0,S.jsx)("i",{className:"lg lg-changed"})," changed"]}),(0,S.jsxs)("span",{children:[(0,S.jsx)("i",{className:"lg lg-removed"})," removed"]}),(0,S.jsxs)("span",{children:[(0,S.jsx)("i",{className:"lg lg-live"})," request"]})]})]}),(0,S.jsxs)("aside",{className:"side",children:[(0,S.jsxs)("nav",{className:"tabs",children:[(0,S.jsxs)("button",{className:l==="changes"?"on":"",onClick:()=>s("changes"),children:["Changes ",(0,S.jsx)("b",{className:C.length?"red":"",children:C.length})]}),(0,S.jsxs)("button",{className:l==="live"?"on":"",onClick:()=>s("live"),children:["Live ",(0,S.jsx)("b",{className:P?"red":"",children:n.length})]}),(0,S.jsx)("button",{className:l==="details"?"on":"",onClick:()=>s("details"),children:"Details"})]}),(0,S.jsxs)("div",{className:"panel",children:[l==="changes"&&(0,S.jsx)(yk,{state:e,onFocus:m}),l==="live"&&(0,S.jsx)(vk,{traffic:n,state:e,onFocus:m}),l==="details"&&(0,S.jsx)(wk,{state:e,id:a,traffic:n})]})]})]})]})}var ty=(e,t,n)=>t?`vscode://file/${e}/${t}:${n??1}`:void 0;function yk({state:e,onFocus:t}){Hs();let{changes:n,since:r}=e.diff;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("div",{className:"panel-head",children:[(0,S.jsxs)("span",{children:["Since ",new Date(r).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]}),(0,S.jsx)("button",{className:"ghost",onClick:()=>fetch("/api/baseline",{method:"POST"}),children:"Start over"})]}),!n.length&&(0,S.jsxs)("div",{className:"hint",children:[(0,S.jsx)("p",{children:"No architecture changes yet."}),(0,S.jsx)("p",{children:"Ask your agent to build something. New pages, endpoints and models light up here and on the map as files are saved."})]}),(0,S.jsx)("ul",{className:"changes",children:n.map(o=>(0,S.jsxs)("li",{className:`ch ch-${o.kind}`,onClick:()=>o.kind!=="removed"&&t(o.id),children:[(0,S.jsxs)("div",{className:"ch-top",children:[(0,S.jsx)("span",{className:`tag tag-${o.kind}`,children:ey[o.kind]}),(0,S.jsx)("span",{className:"ch-entity",children:o.entity}),(0,S.jsx)("span",{className:"ch-time",children:J0(o.at)})]}),(0,S.jsx)("div",{className:"ch-label",children:o.label}),o.detail.length>0&&(0,S.jsx)("div",{className:"ch-detail",children:o.detail.slice(0,5).map(i=>(0,S.jsx)("div",{children:i},i))}),o.file&&(0,S.jsxs)("a",{className:"loc",href:ty(e.graph.root,o.file,o.line),onClick:i=>i.stopPropagation(),children:[o.file,":",o.line]})]},o.kind+o.id))})]})}function vk({traffic:e,state:t,onFocus:n}){Hs();let r=e.filter(s=>Date.now()-s.ts<6e4),o=r.filter(s=>s.status>=500).length,i=r.map(s=>s.durationMs).filter(s=>s!=null).sort((s,a)=>s-a),l=i.length?Math.round(i[Math.floor(i.length/2)]):null;return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("div",{className:"stats",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("b",{children:r.length}),(0,S.jsx)("span",{children:"req / min"})]}),(0,S.jsxs)("div",{className:o?"bad":"",children:[(0,S.jsx)("b",{children:o}),(0,S.jsx)("span",{children:"5xx / min"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("b",{children:l??"\u2014"}),(0,S.jsx)("span",{children:"p50 ms"})]})]}),!e.length&&(0,S.jsxs)("div",{className:"hint",children:[(0,S.jsx)("p",{children:"No requests yet."}),(0,S.jsxs)("p",{children:["Add ",(0,S.jsx)("code",{children:"TraceFlowMiddleware"})," to Django or call ",(0,S.jsx)("code",{children:"initTraceFlow()"})," in your React app (both in ",(0,S.jsx)("code",{children:"sdk/"}),"), then click around. Or run ",(0,S.jsx)("code",{children:"traceflow simulate"}),"."]})]}),(0,S.jsx)("ul",{className:"log",children:e.slice().reverse().slice(0,120).map(s=>(0,S.jsxs)("li",{className:s.status>=500?"bad":s.status>=400?"warn":"",onClick:()=>s.endpoint&&n(s.endpoint),children:[(0,S.jsx)("span",{className:"st",children:s.status}),(0,S.jsx)("span",{className:"mt",children:s.method}),(0,S.jsx)("span",{className:"pt",children:s.path}),(0,S.jsx)("span",{className:"ms",children:s.durationMs!=null?`${Math.round(s.durationMs)}ms`:""}),!s.endpoint&&t.graph.endpoints.length>0&&(0,S.jsx)("span",{className:"unk",title:"Not found in code",children:"?"})]},s.id))})]})}function wk({state:e,id:t,traffic:n}){let r=e.graph,o=r.root;if(!t)return(0,S.jsxs)("div",{className:"overview",children:[(0,S.jsxs)("div",{className:"counts",children:[(0,S.jsxs)("div",{children:[(0,S.jsx)("b",{children:r.pages.length}),(0,S.jsx)("span",{children:"pages"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("b",{children:r.endpoints.length}),(0,S.jsx)("span",{children:"endpoints"})]}),(0,S.jsxs)("div",{children:[(0,S.jsx)("b",{children:r.models.length}),(0,S.jsx)("span",{children:"models"})]})]}),(0,S.jsx)("p",{className:"hint",children:"Click anything on the map to see where it lives, what it calls and what calls it."}),r.unmatchedCalls.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("h4",{children:"Calls with no endpoint in code"}),(0,S.jsx)("ul",{className:"plain",children:r.unmatchedCalls.slice(0,8).map((u,c)=>(0,S.jsxs)("li",{children:[(0,S.jsxs)("code",{children:[u.method," ",u.path]})," from ",u.from]},c))})]})]});let i=[...r.pages,...e.diff.removed.pages].find(u=>u.id===t),l=[...r.endpoints,...e.diff.removed.endpoints].find(u=>u.id===t),s=[...r.models,...e.diff.removed.models].find(u=>u.id===t),a=(u,c)=>u&&(0,S.jsxs)("a",{className:"loc",href:ty(o,u,c),children:[u,":",c]});if(i)return(0,S.jsxs)("div",{className:"details",children:[(0,S.jsx)("span",{className:"kicker",children:"Page"}),(0,S.jsx)("h3",{children:i.path??i.name}),(0,S.jsxs)("p",{children:[i.component," ",a(i.file,i.line)]}),(0,S.jsx)("h4",{children:"Calls"}),(0,S.jsx)("ul",{className:"plain",children:i.calls.length?i.calls.map(u=>(0,S.jsxs)("li",{children:[(0,S.jsxs)("code",{children:[u.method," ",r.endpoints.find(c=>c.id===u.endpoint)?.path]})," ",a(u.file,u.line)]},u.endpoint+u.method)):(0,S.jsx)("li",{children:"No API calls found"})})]});if(l){let u=r.pages.filter(f=>f.calls.some(h=>h.endpoint===l.id)),c=n.filter(f=>f.endpoint===l.id);return(0,S.jsxs)("div",{className:"details",children:[(0,S.jsx)("span",{className:"kicker",children:"Endpoint"}),(0,S.jsx)("h3",{children:l.path}),(0,S.jsx)("p",{children:l.methods.join(" \xB7 ")}),(0,S.jsx)("h4",{children:"Code"}),(0,S.jsxs)("ul",{className:"plain",children:[(0,S.jsxs)("li",{children:["route ",a(l.file,l.line)]}),(0,S.jsxs)("li",{children:["view ",(0,S.jsx)("code",{children:l.view})," ",a(l.viewFile,l.viewLine)]})]}),(0,S.jsx)("h4",{children:"Uses"}),(0,S.jsx)("ul",{className:"plain",children:l.models.length?l.models.map(f=>(0,S.jsx)("li",{children:(0,S.jsx)("code",{children:f})},f)):(0,S.jsx)("li",{children:"No models detected"})}),(0,S.jsx)("h4",{children:"Called by"}),(0,S.jsx)("ul",{className:"plain",children:u.length?u.map(f=>(0,S.jsx)("li",{children:f.path??f.name},f.id)):(0,S.jsx)("li",{children:"No page calls it"})}),(0,S.jsx)("h4",{children:"Traffic"}),(0,S.jsxs)("p",{children:[c.length," requests \xB7 ",c.filter(f=>f.status>=500).length," errors"]})]})}if(s){let u=r.endpoints.filter(c=>c.models.includes(s.name));return(0,S.jsxs)("div",{className:"details",children:[(0,S.jsx)("span",{className:"kicker",children:"Model"}),(0,S.jsx)("h3",{children:s.name}),(0,S.jsx)("p",{children:a(s.file,s.line)}),(0,S.jsx)("h4",{children:"Fields"}),(0,S.jsx)("ul",{className:"plain",children:s.fields.map(c=>(0,S.jsx)("li",{children:(0,S.jsx)("code",{children:c})},c))}),s.relations.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("h4",{children:"Links"}),(0,S.jsx)("ul",{className:"plain",children:s.relations.map(c=>(0,S.jsxs)("li",{children:[(0,S.jsx)("code",{children:c.field})," \u2192 ",c.target]},c.field))})]}),(0,S.jsx)("h4",{children:"Used by"}),(0,S.jsx)("ul",{className:"plain",children:u.length?u.map(c=>(0,S.jsx)("li",{children:(0,S.jsxs)("code",{children:[c.methods.join("/")," ",c.path]})},c.id)):(0,S.jsx)("li",{children:"No endpoint uses it"})})]})}return(0,S.jsx)("p",{className:"hint",children:"That item is no longer in the project."})}(0,q0.createRoot)(document.getElementById("root")).render((0,S.jsx)(Ls,{children:(0,S.jsx)(gk,{})}));
|
|
9
|
+
/*! Bundled license information:
|
|
10
|
+
|
|
11
|
+
react/cjs/react.production.min.js:
|
|
12
|
+
(**
|
|
13
|
+
* @license React
|
|
14
|
+
* react.production.min.js
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*)
|
|
21
|
+
|
|
22
|
+
scheduler/cjs/scheduler.production.min.js:
|
|
23
|
+
(**
|
|
24
|
+
* @license React
|
|
25
|
+
* scheduler.production.min.js
|
|
26
|
+
*
|
|
27
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
*)
|
|
32
|
+
|
|
33
|
+
react-dom/cjs/react-dom.production.min.js:
|
|
34
|
+
(**
|
|
35
|
+
* @license React
|
|
36
|
+
* react-dom.production.min.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*)
|
|
43
|
+
|
|
44
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
45
|
+
(**
|
|
46
|
+
* @license React
|
|
47
|
+
* use-sync-external-store-shim.production.js
|
|
48
|
+
*
|
|
49
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the MIT license found in the
|
|
52
|
+
* LICENSE file in the root directory of this source tree.
|
|
53
|
+
*)
|
|
54
|
+
|
|
55
|
+
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
|
|
56
|
+
(**
|
|
57
|
+
* @license React
|
|
58
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
59
|
+
*
|
|
60
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the MIT license found in the
|
|
63
|
+
* LICENSE file in the root directory of this source tree.
|
|
64
|
+
*)
|
|
65
|
+
|
|
66
|
+
react/cjs/react-jsx-runtime.production.min.js:
|
|
67
|
+
(**
|
|
68
|
+
* @license React
|
|
69
|
+
* react-jsx-runtime.production.min.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*)
|
|
76
|
+
*/
|