@salesforce/metadata-plugins 1.12.0 → 1.14.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/README.md +16 -7
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/plugins/agent/ui/assets/VibeEditComposer-D5GykTkw.js +1 -0
- package/dist/plugins/agent/ui/assets/index-nYWtX5pm.js +72 -0
- package/dist/plugins/agent/ui/index.html +1 -1
- package/dist/plugins/flexipage/ui/assets/VibeEditComposer-CwNZdtC5.js +1 -0
- package/dist/plugins/flexipage/ui/assets/index-hFZPLB6p.js +49 -0
- package/dist/plugins/flexipage/ui/index.html +1 -1
- package/dist/plugins/flow/ui/assets/VibeEditComposer-C36-RsSl.js +1 -0
- package/dist/plugins/flow/ui/assets/index-CdpIq7gH.js +49 -0
- package/dist/plugins/flow/ui/index.html +1 -1
- package/dist/plugins/flowintent/ui/assets/{index-keTVUkzt.js → index-CzlE9StJ.js} +10 -10
- package/dist/plugins/flowintent/ui/index.html +1 -1
- package/dist/plugins/keyvaluetable/KeyValueTableParser.d.ts +36 -0
- package/dist/plugins/keyvaluetable/KeyValueTableParser.d.ts.map +1 -0
- package/dist/plugins/keyvaluetable/KeyValueTableParser.js +429 -0
- package/dist/plugins/keyvaluetable/KeyValueTableVisualizer.d.ts +29 -0
- package/dist/plugins/keyvaluetable/KeyValueTableVisualizer.d.ts.map +1 -0
- package/dist/plugins/keyvaluetable/KeyValueTableVisualizer.js +63 -0
- package/dist/plugins/keyvaluetable/humanize.d.ts +9 -0
- package/dist/plugins/keyvaluetable/humanize.d.ts.map +1 -0
- package/dist/plugins/keyvaluetable/humanize.js +15 -0
- package/dist/plugins/keyvaluetable/types/KeyValueTableData.d.ts +78 -0
- package/dist/plugins/keyvaluetable/types/KeyValueTableData.d.ts.map +1 -0
- package/dist/plugins/keyvaluetable/types/KeyValueTableData.js +7 -0
- package/dist/plugins/keyvaluetable/ui/assets/index-BMYDJ7MA.js +50 -0
- package/dist/plugins/keyvaluetable/ui/assets/index-CxfJGu2l.css +1 -0
- package/dist/plugins/keyvaluetable/ui/index.html +14 -0
- package/dist/plugins/permissionset/ui/assets/VibeEditComposer-HYu9RPHQ.js +1 -0
- package/dist/plugins/permissionset/ui/assets/index-DilBd-cG.js +49 -0
- package/dist/plugins/permissionset/ui/index.html +1 -1
- package/dist/plugins/schema/ui/assets/VibeEditComposer-Ce9dBbb3.js +1 -0
- package/dist/plugins/schema/ui/assets/index-DSSQ6K8b.js +71 -0
- package/dist/plugins/schema/ui/index.html +1 -1
- package/package.json +3 -3
- package/dist/plugins/agent/ui/assets/VibeEditComposer-DUcVZj7o.js +0 -1
- package/dist/plugins/agent/ui/assets/index-CQBR1py8.js +0 -72
- package/dist/plugins/flexipage/ui/assets/VibeEditComposer-D_ghyOEX.js +0 -1
- package/dist/plugins/flexipage/ui/assets/index-Drx_jFoz.js +0 -49
- package/dist/plugins/flow/ui/assets/VibeEditComposer-BQFkBtQQ.js +0 -1
- package/dist/plugins/flow/ui/assets/index-Bf5YooV4.js +0 -49
- package/dist/plugins/permissionset/ui/assets/VibeEditComposer-5LPv39S7.js +0 -1
- package/dist/plugins/permissionset/ui/assets/index-B8VEt8Sy.js +0 -49
- package/dist/plugins/schema/ui/assets/VibeEditComposer-BDtlZdpl.js +0 -1
- package/dist/plugins/schema/ui/assets/index-D0sqEMwp.js +0 -71
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./VibeEditComposer-BDtlZdpl.js","./VibeEditComposer-BQeSigSs.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function qd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jd={exports:{}},As={},eh={exports:{}},oe={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var Ho=Symbol.for("react.element"),h1=Symbol.for("react.portal"),p1=Symbol.for("react.fragment"),g1=Symbol.for("react.strict_mode"),m1=Symbol.for("react.profiler"),y1=Symbol.for("react.provider"),v1=Symbol.for("react.context"),w1=Symbol.for("react.forward_ref"),x1=Symbol.for("react.suspense"),E1=Symbol.for("react.memo"),_1=Symbol.for("react.lazy"),Tc=Symbol.iterator;function S1(e){return e===null||typeof e!="object"?null:(e=Tc&&e[Tc]||e["@@iterator"],typeof e=="function"?e:null)}var th={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nh=Object.assign,rh={};function Lr(e,t,n){this.props=e,this.context=t,this.refs=rh,this.updater=n||th}Lr.prototype.isReactComponent={};Lr.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")};Lr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function oh(){}oh.prototype=Lr.prototype;function lu(e,t,n){this.props=e,this.context=t,this.refs=rh,this.updater=n||th}var au=lu.prototype=new oh;au.constructor=lu;nh(au,Lr.prototype);au.isPureReactComponent=!0;var bc=Array.isArray,ih=Object.prototype.hasOwnProperty,uu={current:null},sh={key:!0,ref:!0,__self:!0,__source:!0};function lh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)ih.call(t,r)&&!sh.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Ho,type:e,key:i,ref:s,props:o,_owner:uu.current}}function C1(e,t){return{$$typeof:Ho,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function cu(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ho}function k1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Lc=/\/+/g;function fl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?k1(""+e.key):t.toString(36)}function Li(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ho:case h1:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+fl(s,0):r,bc(o)?(n="",e!=null&&(n=e.replace(Lc,"$&/")+"/"),Li(o,t,n,"",function(u){return u})):o!=null&&(cu(o)&&(o=C1(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Lc,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",bc(e))for(var l=0;l<e.length;l++){i=e[l];var a=r+fl(i,l);s+=Li(i,t,n,a,o)}else if(a=S1(e),typeof a=="function")for(e=a.call(e),l=0;!(i=e.next()).done;)i=i.value,a=r+fl(i,l++),s+=Li(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 s}function ri(e,t,n){if(e==null)return e;var r=[],o=0;return Li(e,r,"","",function(i){return t.call(n,i,o++)}),r}function N1(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 $e={current:null},Ri={transition:null},M1={ReactCurrentDispatcher:$e,ReactCurrentBatchConfig:Ri,ReactCurrentOwner:uu};function ah(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:ri,forEach:function(e,t,n){ri(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ri(e,function(){t++}),t},toArray:function(e){return ri(e,function(t){return t})||[]},only:function(e){if(!cu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};oe.Component=Lr;oe.Fragment=p1;oe.Profiler=m1;oe.PureComponent=lu;oe.StrictMode=g1;oe.Suspense=x1;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M1;oe.act=ah;oe.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=nh({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=uu.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)ih.call(t,a)&&!sh.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Ho,type:e.type,key:o,ref:i,props:r,_owner:s}};oe.createContext=function(e){return e={$$typeof:v1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:y1,_context:e},e.Consumer=e};oe.createElement=lh;oe.createFactory=function(e){var t=lh.bind(null,e);return t.type=e,t};oe.createRef=function(){return{current:null}};oe.forwardRef=function(e){return{$$typeof:w1,render:e}};oe.isValidElement=cu;oe.lazy=function(e){return{$$typeof:_1,_payload:{_status:-1,_result:e},_init:N1}};oe.memo=function(e,t){return{$$typeof:E1,type:e,compare:t===void 0?null:t}};oe.startTransition=function(e){var t=Ri.transition;Ri.transition={};try{e()}finally{Ri.transition=t}};oe.unstable_act=ah;oe.useCallback=function(e,t){return $e.current.useCallback(e,t)};oe.useContext=function(e){return $e.current.useContext(e)};oe.useDebugValue=function(){};oe.useDeferredValue=function(e){return $e.current.useDeferredValue(e)};oe.useEffect=function(e,t){return $e.current.useEffect(e,t)};oe.useId=function(){return $e.current.useId()};oe.useImperativeHandle=function(e,t,n){return $e.current.useImperativeHandle(e,t,n)};oe.useInsertionEffect=function(e,t){return $e.current.useInsertionEffect(e,t)};oe.useLayoutEffect=function(e,t){return $e.current.useLayoutEffect(e,t)};oe.useMemo=function(e,t){return $e.current.useMemo(e,t)};oe.useReducer=function(e,t,n){return $e.current.useReducer(e,t,n)};oe.useRef=function(e){return $e.current.useRef(e)};oe.useState=function(e){return $e.current.useState(e)};oe.useSyncExternalStore=function(e,t,n){return $e.current.useSyncExternalStore(e,t,n)};oe.useTransition=function(){return $e.current.useTransition()};oe.version="18.3.1";eh.exports=oe;var U=eh.exports;const se=qd(U);/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var I1=U,P1=Symbol.for("react.element"),T1=Symbol.for("react.fragment"),b1=Object.prototype.hasOwnProperty,L1=I1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,R1={key:!0,ref:!0,__self:!0,__source:!0};function uh(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)b1.call(t,r)&&!R1.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:P1,type:e,key:i,ref:s,props:o,_owner:L1.current}}As.Fragment=T1;As.jsx=uh;As.jsxs=uh;Jd.exports=As;var F=Jd.exports;function Se(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=Se(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var A1={value:()=>{}};function Os(){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 Ai(n)}function Ai(e){this._=e}function O1(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}})}Ai.prototype=Os.prototype={constructor:Ai,on:function(e,t){var n=this._,r=O1(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=z1(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=Rc(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Rc(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 Ai(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 z1(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Rc(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=A1,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var ql="http://www.w3.org/1999/xhtml";const Ac={svg:"http://www.w3.org/2000/svg",xhtml:ql,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function zs(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Ac.hasOwnProperty(t)?{space:Ac[t],local:e}:e}function j1(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ql&&t.documentElement.namespaceURI===ql?t.createElement(e):t.createElementNS(n,e)}}function $1(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ch(e){var t=zs(e);return(t.local?$1:j1)(t)}function D1(){}function fu(e){return e==null?D1:function(){return this.querySelector(e)}}function F1(e){typeof e!="function"&&(e=fu(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=new Array(s),a,u,f=0;f<s;++f)(a=i[f])&&(u=e.call(a,a.__data__,f,i))&&("__data__"in a&&(u.__data__=a.__data__),l[f]=u);return new Ke(r,this._parents)}function V1(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function H1(){return[]}function fh(e){return e==null?H1:function(){return this.querySelectorAll(e)}}function B1(e){return function(){return V1(e.apply(this,arguments))}}function U1(e){typeof e=="function"?e=B1(e):e=fh(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(r.push(e.call(a,a.__data__,u,s)),o.push(a));return new Ke(r,o)}function dh(e){return function(){return this.matches(e)}}function hh(e){return function(t){return t.matches(e)}}var W1=Array.prototype.find;function Y1(e){return function(){return W1.call(this.children,e)}}function X1(){return this.firstElementChild}function G1(e){return this.select(e==null?X1:Y1(typeof e=="function"?e:hh(e)))}var Q1=Array.prototype.filter;function K1(){return Array.from(this.children)}function Z1(e){return function(){return Q1.call(this.children,e)}}function q1(e){return this.selectAll(e==null?K1:Z1(typeof e=="function"?e:hh(e)))}function J1(e){typeof e!="function"&&(e=dh(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new Ke(r,this._parents)}function ph(e){return new Array(e.length)}function ey(){return new Ke(this._enter||this._groups.map(ph),this._parents)}function Zi(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Zi.prototype={constructor:Zi,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 ty(e){return function(){return e}}function ny(e,t,n,r,o,i){for(var s=0,l,a=t.length,u=i.length;s<u;++s)(l=t[s])?(l.__data__=i[s],r[s]=l):n[s]=new Zi(e,i[s]);for(;s<a;++s)(l=t[s])&&(o[s]=l)}function ry(e,t,n,r,o,i,s){var l,a,u=new Map,f=t.length,c=i.length,d=new Array(f),h;for(l=0;l<f;++l)(a=t[l])&&(d[l]=h=s.call(a,a.__data__,l,t)+"",u.has(h)?o[l]=a:u.set(h,a));for(l=0;l<c;++l)h=s.call(e,i[l],l,i)+"",(a=u.get(h))?(r[l]=a,a.__data__=i[l],u.delete(h)):n[l]=new Zi(e,i[l]);for(l=0;l<f;++l)(a=t[l])&&u.get(d[l])===a&&(o[l]=a)}function oy(e){return e.__data__}function iy(e,t){if(!arguments.length)return Array.from(this,oy);var n=t?ry:ny,r=this._parents,o=this._groups;typeof e!="function"&&(e=ty(e));for(var i=o.length,s=new Array(i),l=new Array(i),a=new Array(i),u=0;u<i;++u){var f=r[u],c=o[u],d=c.length,h=sy(e.call(f,f&&f.__data__,u,r)),y=h.length,w=l[u]=new Array(y),x=s[u]=new Array(y),m=a[u]=new Array(d);n(f,c,w,x,m,h,t);for(var g=0,p=0,v,_;g<y;++g)if(v=w[g]){for(g>=p&&(p=g+1);!(_=x[p])&&++p<y;);v._next=_||null}}return s=new Ke(s,r),s._enter=l,s._exit=a,s}function sy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ly(){return new Ke(this._exit||this._groups.map(ph),this._parents)}function ay(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 uy(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),l=new Array(o),a=0;a<s;++a)for(var u=n[a],f=r[a],c=u.length,d=l[a]=new Array(c),h,y=0;y<c;++y)(h=u[y]||f[y])&&(d[y]=h);for(;a<o;++a)l[a]=n[a];return new Ke(l,this._parents)}function cy(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function fy(e){e||(e=dy);function t(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],l=s.length,a=o[i]=new Array(l),u,f=0;f<l;++f)(u=s[f])&&(a[f]=u);a.sort(t)}return new Ke(o,this._parents).order()}function dy(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function hy(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function py(){return Array.from(this)}function gy(){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 s=r[o];if(s)return s}return null}function my(){let e=0;for(const t of this)++e;return e}function yy(){return!this.node()}function vy(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,l;i<s;++i)(l=o[i])&&e.call(l,l.__data__,i,o);return this}function wy(e){return function(){this.removeAttribute(e)}}function xy(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ey(e,t){return function(){this.setAttribute(e,t)}}function _y(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Sy(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Cy(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 ky(e,t){var n=zs(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?xy:wy:typeof t=="function"?n.local?Cy:Sy:n.local?_y:Ey)(n,t))}function gh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ny(e){return function(){this.style.removeProperty(e)}}function My(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Iy(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Py(e,t,n){return arguments.length>1?this.each((t==null?Ny:typeof t=="function"?Iy:My)(e,t,n??"")):pr(this.node(),e)}function pr(e,t){return e.style.getPropertyValue(t)||gh(e).getComputedStyle(e,null).getPropertyValue(t)}function Ty(e){return function(){delete this[e]}}function by(e,t){return function(){this[e]=t}}function Ly(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ry(e,t){return arguments.length>1?this.each((t==null?Ty:typeof t=="function"?Ly:by)(e,t)):this.node()[e]}function mh(e){return e.trim().split(/^|\s+/)}function du(e){return e.classList||new yh(e)}function yh(e){this._node=e,this._names=mh(e.getAttribute("class")||"")}yh.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 vh(e,t){for(var n=du(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function wh(e,t){for(var n=du(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Ay(e){return function(){vh(this,e)}}function Oy(e){return function(){wh(this,e)}}function zy(e,t){return function(){(t.apply(this,arguments)?vh:wh)(this,e)}}function jy(e,t){var n=mh(e+"");if(arguments.length<2){for(var r=du(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?zy:t?Ay:Oy)(n,t))}function $y(){this.textContent=""}function Dy(e){return function(){this.textContent=e}}function Fy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Vy(e){return arguments.length?this.each(e==null?$y:(typeof e=="function"?Fy:Dy)(e)):this.node().textContent}function Hy(){this.innerHTML=""}function By(e){return function(){this.innerHTML=e}}function Uy(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Wy(e){return arguments.length?this.each(e==null?Hy:(typeof e=="function"?Uy:By)(e)):this.node().innerHTML}function Yy(){this.nextSibling&&this.parentNode.appendChild(this)}function Xy(){return this.each(Yy)}function Gy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qy(){return this.each(Gy)}function Ky(e){var t=typeof e=="function"?e:ch(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Zy(){return null}function qy(e,t){var n=typeof e=="function"?e:ch(e),r=t==null?Zy:typeof t=="function"?t:fu(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Jy(){var e=this.parentNode;e&&e.removeChild(this)}function ev(){return this.each(Jy)}function tv(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function nv(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function rv(e){return this.select(e?nv:tv)}function ov(e){return arguments.length?this.property("__data__",e):this.node().__data__}function iv(e){return function(t){e.call(this,t,this.__data__)}}function sv(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 lv(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 av(e,t,n){return function(){var r=this.__on,o,i=iv(t);if(r){for(var s=0,l=r.length;s<l;++s)if((o=r[s]).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 uv(e,t,n){var r=sv(e+""),o,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,f;a<u;++a)for(o=0,f=l[a];o<i;++o)if((s=r[o]).type===f.type&&s.name===f.name)return f.value}return}for(l=t?av:lv,o=0;o<i;++o)this.each(l(r[o],t,n));return this}function xh(e,t,n){var r=gh(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 cv(e,t){return function(){return xh(this,e,t)}}function fv(e,t){return function(){return xh(this,e,t.apply(this,arguments))}}function dv(e,t){return this.each((typeof t=="function"?fv:cv)(e,t))}function*hv(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var Eh=[null];function Ke(e,t){this._groups=e,this._parents=t}function Bo(){return new Ke([[document.documentElement]],Eh)}function pv(){return this}Ke.prototype=Bo.prototype={constructor:Ke,select:F1,selectAll:U1,selectChild:G1,selectChildren:q1,filter:J1,data:iy,enter:ey,exit:ly,join:ay,merge:uy,selection:pv,order:cy,sort:fy,call:hy,nodes:py,node:gy,size:my,empty:yy,each:vy,attr:ky,style:Py,property:Ry,classed:jy,text:Vy,html:Wy,raise:Xy,lower:Qy,append:Ky,insert:qy,remove:ev,clone:rv,datum:ov,on:uv,dispatch:dv,[Symbol.iterator]:hv};function Xe(e){return typeof e=="string"?new Ke([[document.querySelector(e)]],[document.documentElement]):new Ke([[e]],Eh)}function gv(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ft(e,t){if(e=gv(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]}const mv={passive:!1},mo={capture:!0,passive:!1};function dl(e){e.stopImmediatePropagation()}function sr(e){e.preventDefault(),e.stopImmediatePropagation()}function _h(e){var t=e.document.documentElement,n=Xe(e).on("dragstart.drag",sr,mo);"onselectstart"in t?n.on("selectstart.drag",sr,mo):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Sh(e,t){var n=e.document.documentElement,r=Xe(e).on("dragstart.drag",null);t&&(r.on("click.drag",sr,mo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const oi=e=>()=>e;function Jl(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:l,dx:a,dy:u,dispatch:f}){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:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Jl.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function yv(e){return!e.ctrlKey&&!e.button}function vv(){return this.parentNode}function wv(e,t){return t??{x:e.x,y:e.y}}function xv(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ch(){var e=yv,t=vv,n=wv,r=xv,o={},i=Os("start","drag","end"),s=0,l,a,u,f,c=0;function d(v){v.on("mousedown.drag",h).filter(r).on("touchstart.drag",x).on("touchmove.drag",m,mv).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(v,_){if(!(f||!e.call(this,v,_))){var S=p(this,t.call(this,v,_),v,_,"mouse");S&&(Xe(v.view).on("mousemove.drag",y,mo).on("mouseup.drag",w,mo),_h(v.view),dl(v),u=!1,l=v.clientX,a=v.clientY,S("start",v))}}function y(v){if(sr(v),!u){var _=v.clientX-l,S=v.clientY-a;u=_*_+S*S>c}o.mouse("drag",v)}function w(v){Xe(v.view).on("mousemove.drag mouseup.drag",null),Sh(v.view,u),sr(v),o.mouse("end",v)}function x(v,_){if(e.call(this,v,_)){var S=v.changedTouches,T=t.call(this,v,_),R=S.length,H,L;for(H=0;H<R;++H)(L=p(this,T,v,_,S[H].identifier,S[H]))&&(dl(v),L("start",v,S[H]))}}function m(v){var _=v.changedTouches,S=_.length,T,R;for(T=0;T<S;++T)(R=o[_[T].identifier])&&(sr(v),R("drag",v,_[T]))}function g(v){var _=v.changedTouches,S=_.length,T,R;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),T=0;T<S;++T)(R=o[_[T].identifier])&&(dl(v),R("end",v,_[T]))}function p(v,_,S,T,R,H){var L=i.copy(),b=ft(H||S,_),$,V,E;if((E=n.call(v,new Jl("beforestart",{sourceEvent:S,target:d,identifier:R,active:s,x:b[0],y:b[1],dx:0,dy:0,dispatch:L}),T))!=null)return $=E.x-b[0]||0,V=E.y-b[1]||0,function j(P,O,N){var I=b,C;switch(P){case"start":o[R]=j,C=s++;break;case"end":delete o[R],--s;case"drag":b=ft(N||O,_),C=s;break}L.call(P,v,new Jl(P,{sourceEvent:O,subject:E,target:d,identifier:R,active:C,x:b[0]+$,y:b[1]+V,dx:b[0]-I[0],dy:b[1]-I[1],dispatch:L}),T)}}return d.filter=function(v){return arguments.length?(e=typeof v=="function"?v:oi(!!v),d):e},d.container=function(v){return arguments.length?(t=typeof v=="function"?v:oi(v),d):t},d.subject=function(v){return arguments.length?(n=typeof v=="function"?v:oi(v),d):n},d.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:oi(!!v),d):r},d.on=function(){var v=i.on.apply(i,arguments);return v===i?d:v},d.clickDistance=function(v){return arguments.length?(c=(v=+v)*v,d):Math.sqrt(c)},d}function hu(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function kh(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Uo(){}var yo=.7,qi=1/yo,lr="\\s*([+-]?\\d+)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Nt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ev=/^#([0-9a-f]{3,8})$/,_v=new RegExp(`^rgb\\(${lr},${lr},${lr}\\)$`),Sv=new RegExp(`^rgb\\(${Nt},${Nt},${Nt}\\)$`),Cv=new RegExp(`^rgba\\(${lr},${lr},${lr},${vo}\\)$`),kv=new RegExp(`^rgba\\(${Nt},${Nt},${Nt},${vo}\\)$`),Nv=new RegExp(`^hsl\\(${vo},${Nt},${Nt}\\)$`),Mv=new RegExp(`^hsla\\(${vo},${Nt},${Nt},${vo}\\)$`),Oc={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};hu(Uo,Tn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:zc,formatHex:zc,formatHex8:Iv,formatHsl:Pv,formatRgb:jc,toString:jc});function zc(){return this.rgb().formatHex()}function Iv(){return this.rgb().formatHex8()}function Pv(){return Nh(this).formatHsl()}function jc(){return this.rgb().formatRgb()}function Tn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ev.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$c(t):n===3?new Ve(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ii(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ii(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=_v.exec(e))?new Ve(t[1],t[2],t[3],1):(t=Sv.exec(e))?new Ve(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Cv.exec(e))?ii(t[1],t[2],t[3],t[4]):(t=kv.exec(e))?ii(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Nv.exec(e))?Vc(t[1],t[2]/100,t[3]/100,1):(t=Mv.exec(e))?Vc(t[1],t[2]/100,t[3]/100,t[4]):Oc.hasOwnProperty(e)?$c(Oc[e]):e==="transparent"?new Ve(NaN,NaN,NaN,0):null}function $c(e){return new Ve(e>>16&255,e>>8&255,e&255,1)}function ii(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ve(e,t,n,r)}function Tv(e){return e instanceof Uo||(e=Tn(e)),e?(e=e.rgb(),new Ve(e.r,e.g,e.b,e.opacity)):new Ve}function ea(e,t,n,r){return arguments.length===1?Tv(e):new Ve(e,t,n,r??1)}function Ve(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}hu(Ve,ea,kh(Uo,{brighter(e){return e=e==null?qi:Math.pow(qi,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yo:Math.pow(yo,e),new Ve(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ve(Nn(this.r),Nn(this.g),Nn(this.b),Ji(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:Dc,formatHex:Dc,formatHex8:bv,formatRgb:Fc,toString:Fc}));function Dc(){return`#${_n(this.r)}${_n(this.g)}${_n(this.b)}`}function bv(){return`#${_n(this.r)}${_n(this.g)}${_n(this.b)}${_n((isNaN(this.opacity)?1:this.opacity)*255)}`}function Fc(){const e=Ji(this.opacity);return`${e===1?"rgb(":"rgba("}${Nn(this.r)}, ${Nn(this.g)}, ${Nn(this.b)}${e===1?")":`, ${e})`}`}function Ji(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Nn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _n(e){return e=Nn(e),(e<16?"0":"")+e.toString(16)}function Vc(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pt(e,t,n,r)}function Nh(e){if(e instanceof pt)return new pt(e.h,e.s,e.l,e.opacity);if(e instanceof Uo||(e=Tn(e)),!e)return new pt;if(e instanceof pt)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),s=NaN,l=i-o,a=(i+o)/2;return l?(t===i?s=(n-r)/l+(n<r)*6:n===i?s=(r-t)/l+2:s=(t-n)/l+4,l/=a<.5?i+o:2-i-o,s*=60):l=a>0&&a<1?0:s,new pt(s,l,a,e.opacity)}function Lv(e,t,n,r){return arguments.length===1?Nh(e):new pt(e,t,n,r??1)}function pt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}hu(pt,Lv,kh(Uo,{brighter(e){return e=e==null?qi:Math.pow(qi,e),new pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yo:Math.pow(yo,e),new pt(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 Ve(hl(e>=240?e-240:e+120,o,r),hl(e,o,r),hl(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new pt(Hc(this.h),si(this.s),si(this.l),Ji(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ji(this.opacity);return`${e===1?"hsl(":"hsla("}${Hc(this.h)}, ${si(this.s)*100}%, ${si(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Hc(e){return e=(e||0)%360,e<0?e+360:e}function si(e){return Math.max(0,Math.min(1,e||0))}function hl(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const pu=e=>()=>e;function Rv(e,t){return function(n){return e+n*t}}function Av(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 Ov(e){return(e=+e)==1?Mh:function(t,n){return n-t?Av(t,n,e):pu(isNaN(t)?n:t)}}function Mh(e,t){var n=t-e;return n?Rv(e,n):pu(isNaN(e)?t:e)}const es=function e(t){var n=Ov(t);function r(o,i){var s=n((o=ea(o)).r,(i=ea(i)).r),l=n(o.g,i.g),a=n(o.b,i.b),u=Mh(o.opacity,i.opacity);return function(f){return o.r=s(f),o.g=l(f),o.b=a(f),o.opacity=u(f),o+""}}return r.gamma=e,r}(1);function zv(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function jv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $v(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=ro(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<r;++s)i[s]=o[s](l);return i}}function Dv(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ct(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Fv(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=ro(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var ta=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pl=new RegExp(ta.source,"g");function Vv(e){return function(){return e}}function Hv(e){return function(t){return e(t)+""}}function Ih(e,t){var n=ta.lastIndex=pl.lastIndex=0,r,o,i,s=-1,l=[],a=[];for(e=e+"",t=t+"";(r=ta.exec(e))&&(o=pl.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(r=r[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,a.push({i:s,x:Ct(r,o)})),n=pl.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?a[0]?Hv(a[0].x):Vv(t):(t=a.length,function(u){for(var f=0,c;f<t;++f)l[(c=a[f]).i]=c.x(u);return l.join("")})}function ro(e,t){var n=typeof t,r;return t==null||n==="boolean"?pu(t):(n==="number"?Ct:n==="string"?(r=Tn(t))?(t=r,es):Ih:t instanceof Tn?es:t instanceof Date?Dv:jv(t)?zv:Array.isArray(t)?$v:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Fv:Ct)(e,t)}var Bc=180/Math.PI,na={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ph(e,t,n,r,o,i){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,a/=l),e*r<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Bc,skewX:Math.atan(a)*Bc,scaleX:s,scaleY:l}}var li;function Bv(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?na:Ph(t.a,t.b,t.c,t.d,t.e,t.f)}function Uv(e){return e==null||(li||(li=document.createElementNS("http://www.w3.org/2000/svg","g")),li.setAttribute("transform",e),!(e=li.transform.baseVal.consolidate()))?na:(e=e.matrix,Ph(e.a,e.b,e.c,e.d,e.e,e.f))}function Th(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,f,c,d,h,y){if(u!==c||f!==d){var w=h.push("translate(",null,t,null,n);y.push({i:w-4,x:Ct(u,c)},{i:w-2,x:Ct(f,d)})}else(c||d)&&h.push("translate("+c+t+d+n)}function s(u,f,c,d){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),d.push({i:c.push(o(c)+"rotate(",null,r)-2,x:Ct(u,f)})):f&&c.push(o(c)+"rotate("+f+r)}function l(u,f,c,d){u!==f?d.push({i:c.push(o(c)+"skewX(",null,r)-2,x:Ct(u,f)}):f&&c.push(o(c)+"skewX("+f+r)}function a(u,f,c,d,h,y){if(u!==c||f!==d){var w=h.push(o(h)+"scale(",null,",",null,")");y.push({i:w-4,x:Ct(u,c)},{i:w-2,x:Ct(f,d)})}else(c!==1||d!==1)&&h.push(o(h)+"scale("+c+","+d+")")}return function(u,f){var c=[],d=[];return u=e(u),f=e(f),i(u.translateX,u.translateY,f.translateX,f.translateY,c,d),s(u.rotate,f.rotate,c,d),l(u.skewX,f.skewX,c,d),a(u.scaleX,u.scaleY,f.scaleX,f.scaleY,c,d),u=f=null,function(h){for(var y=-1,w=d.length,x;++y<w;)c[(x=d[y]).i]=x.x(h);return c.join("")}}}var Wv=Th(Bv,"px, ","px)","deg)"),Yv=Th(Uv,", ",")",")"),Xv=1e-12;function Uc(e){return((e=Math.exp(e))+1/e)/2}function Gv(e){return((e=Math.exp(e))-1/e)/2}function Qv(e){return((e=Math.exp(2*e))-1)/(e+1)}const Oi=function e(t,n,r){function o(i,s){var l=i[0],a=i[1],u=i[2],f=s[0],c=s[1],d=s[2],h=f-l,y=c-a,w=h*h+y*y,x,m;if(w<Xv)m=Math.log(d/u)/t,x=function(T){return[l+T*h,a+T*y,u*Math.exp(t*T*m)]};else{var g=Math.sqrt(w),p=(d*d-u*u+r*w)/(2*u*n*g),v=(d*d-u*u-r*w)/(2*d*n*g),_=Math.log(Math.sqrt(p*p+1)-p),S=Math.log(Math.sqrt(v*v+1)-v);m=(S-_)/t,x=function(T){var R=T*m,H=Uc(_),L=u/(n*g)*(H*Qv(t*R+_)-Gv(_));return[l+L*h,a+L*y,u*H/Uc(t*R+_)]}}return x.duration=m*1e3*t/Math.SQRT2,x}return o.rho=function(i){var s=Math.max(.001,+i),l=s*s,a=l*l;return e(s,l,a)},o}(Math.SQRT2,2,4);var gr=0,Kr=0,Dr=0,bh=1e3,ts,Zr,ns=0,bn=0,js=0,wo=typeof performance=="object"&&performance.now?performance:Date,Lh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function gu(){return bn||(Lh(Kv),bn=wo.now()+js)}function Kv(){bn=0}function rs(){this._call=this._time=this._next=null}rs.prototype=Rh.prototype={constructor:rs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?gu():+n)+(t==null?0:+t),!this._next&&Zr!==this&&(Zr?Zr._next=this:ts=this,Zr=this),this._call=e,this._time=n,ra()},stop:function(){this._call&&(this._call=null,this._time=1/0,ra())}};function Rh(e,t,n){var r=new rs;return r.restart(e,t,n),r}function Zv(){gu(),++gr;for(var e=ts,t;e;)(t=bn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--gr}function Wc(){bn=(ns=wo.now())+js,gr=Kr=0;try{Zv()}finally{gr=0,Jv(),bn=0}}function qv(){var e=wo.now(),t=e-ns;t>bh&&(js-=t,ns=e)}function Jv(){for(var e,t=ts,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:ts=n);Zr=e,ra(r)}function ra(e){if(!gr){Kr&&(Kr=clearTimeout(Kr));var t=e-bn;t>24?(e<1/0&&(Kr=setTimeout(Wc,e-wo.now()-js)),Dr&&(Dr=clearInterval(Dr))):(Dr||(ns=wo.now(),Dr=setInterval(qv,bh)),gr=1,Lh(Wc))}}function Yc(e,t,n){var r=new rs;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var ew=Os("start","end","cancel","interrupt"),tw=[],Ah=0,Xc=1,oa=2,zi=3,Gc=4,ia=5,ji=6;function $s(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;nw(e,n,{name:t,index:r,group:o,on:ew,tween:tw,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Ah})}function mu(e,t){var n=Et(e,t);if(n.state>Ah)throw new Error("too late; already scheduled");return n}function Tt(e,t){var n=Et(e,t);if(n.state>zi)throw new Error("too late; already running");return n}function Et(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function nw(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=Rh(i,0,n.time);function i(u){n.state=Xc,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var f,c,d,h;if(n.state!==Xc)return a();for(f in r)if(h=r[f],h.name===n.name){if(h.state===zi)return Yc(s);h.state===Gc?(h.state=ji,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[f]):+f<t&&(h.state=ji,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[f])}if(Yc(function(){n.state===zi&&(n.state=Gc,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=oa,n.on.call("start",e,e.__data__,n.index,n.group),n.state===oa){for(n.state=zi,o=new Array(d=n.tween.length),f=0,c=-1;f<d;++f)(h=n.tween[f].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=h);o.length=c+1}}function l(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=ia,1),c=-1,d=o.length;++c<d;)o[c].call(e,f);n.state===ia&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=ji,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function $i(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>oa&&r.state<ia,r.state=ji,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function rw(e){return this.each(function(){$i(this,e)})}function ow(e,t){var n,r;return function(){var o=Tt(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function iw(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Tt(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var l={name:t,value:n},a=0,u=o.length;a<u;++a)if(o[a].name===t){o[a]=l;break}a===u&&o.push(l)}i.tween=o}}function sw(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Et(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?ow:iw)(n,e,t))}function yu(e,t,n){var r=e._id;return e.each(function(){var o=Tt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Et(o,r).value[t]}}function Oh(e,t){var n;return(typeof t=="number"?Ct:t instanceof Tn?es:(n=Tn(t))?(t=n,es):Ih)(e,t)}function lw(e){return function(){this.removeAttribute(e)}}function aw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function uw(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function cw(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function fw(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function dw(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function hw(e,t){var n=zs(e),r=n==="transform"?Yv:Oh;return this.attrTween(e,typeof t=="function"?(n.local?dw:fw)(n,r,yu(this,"attr."+e,t)):t==null?(n.local?aw:lw)(n):(n.local?cw:uw)(n,r,t))}function pw(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function gw(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function mw(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&gw(e,i)),n}return o._value=t,o}function yw(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&pw(e,i)),n}return o._value=t,o}function vw(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=zs(e);return this.tween(n,(r.local?mw:yw)(r,t))}function ww(e,t){return function(){mu(this,e).delay=+t.apply(this,arguments)}}function xw(e,t){return t=+t,function(){mu(this,e).delay=t}}function Ew(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ww:xw)(t,e)):Et(this.node(),t).delay}function _w(e,t){return function(){Tt(this,e).duration=+t.apply(this,arguments)}}function Sw(e,t){return t=+t,function(){Tt(this,e).duration=t}}function Cw(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?_w:Sw)(t,e)):Et(this.node(),t).duration}function kw(e,t){if(typeof t!="function")throw new Error;return function(){Tt(this,e).ease=t}}function Nw(e){var t=this._id;return arguments.length?this.each(kw(t,e)):Et(this.node(),t).ease}function Mw(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Tt(this,e).ease=n}}function Iw(e){if(typeof e!="function")throw new Error;return this.each(Mw(this._id,e))}function Pw(e){typeof e!="function"&&(e=dh(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new Ft(r,this._parents,this._name,this._id)}function Tw(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),s=new Array(r),l=0;l<i;++l)for(var a=t[l],u=n[l],f=a.length,c=s[l]=new Array(f),d,h=0;h<f;++h)(d=a[h]||u[h])&&(c[h]=d);for(;l<r;++l)s[l]=t[l];return new Ft(s,this._parents,this._name,this._id)}function bw(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 Lw(e,t,n){var r,o,i=bw(t)?mu:Tt;return function(){var s=i(this,e),l=s.on;l!==r&&(o=(r=l).copy()).on(t,n),s.on=o}}function Rw(e,t){var n=this._id;return arguments.length<2?Et(this.node(),n).on.on(e):this.each(Lw(n,e,t))}function Aw(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Ow(){return this.on("end.remove",Aw(this._id))}function zw(e){var t=this._name,n=this._id;typeof e!="function"&&(e=fu(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var l=r[s],a=l.length,u=i[s]=new Array(a),f,c,d=0;d<a;++d)(f=l[d])&&(c=e.call(f,f.__data__,d,l))&&("__data__"in f&&(c.__data__=f.__data__),u[d]=c,$s(u[d],t,n,d,u,Et(f,n)));return new Ft(i,this._parents,t,n)}function jw(e){var t=this._name,n=this._id;typeof e!="function"&&(e=fh(e));for(var r=this._groups,o=r.length,i=[],s=[],l=0;l<o;++l)for(var a=r[l],u=a.length,f,c=0;c<u;++c)if(f=a[c]){for(var d=e.call(f,f.__data__,c,a),h,y=Et(f,n),w=0,x=d.length;w<x;++w)(h=d[w])&&$s(h,t,n,w,d,y);i.push(d),s.push(f)}return new Ft(i,s,t,n)}var $w=Bo.prototype.constructor;function Dw(){return new $w(this._groups,this._parents)}function Fw(e,t){var n,r,o;return function(){var i=pr(this,e),s=(this.style.removeProperty(e),pr(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function zh(e){return function(){this.style.removeProperty(e)}}function Vw(e,t,n){var r,o=n+"",i;return function(){var s=pr(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function Hw(e,t,n){var r,o,i;return function(){var s=pr(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),pr(this,e))),s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l))}}function Bw(e,t){var n,r,o,i="style."+t,s="end."+i,l;return function(){var a=Tt(this,e),u=a.on,f=a.value[i]==null?l||(l=zh(t)):void 0;(u!==n||o!==f)&&(r=(n=u).copy()).on(s,o=f),a.on=r}}function Uw(e,t,n){var r=(e+="")=="transform"?Wv:Oh;return t==null?this.styleTween(e,Fw(e,r)).on("end.style."+e,zh(e)):typeof t=="function"?this.styleTween(e,Hw(e,r,yu(this,"style."+e,t))).each(Bw(this._id,e)):this.styleTween(e,Vw(e,r,t),n).on("end.style."+e,null)}function Ww(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Yw(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&Ww(e,s,n)),r}return i._value=t,i}function Xw(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,Yw(e,t,n??""))}function Gw(e){return function(){this.textContent=e}}function Qw(e){return function(){var t=e(this);this.textContent=t??""}}function Kw(e){return this.tween("text",typeof e=="function"?Qw(yu(this,"text",e)):Gw(e==null?"":e+""))}function Zw(e){return function(t){this.textContent=e.call(this,t)}}function qw(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&Zw(o)),t}return r._value=e,r}function Jw(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,qw(e))}function e2(){for(var e=this._name,t=this._id,n=jh(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var f=Et(a,t);$s(a,e,n,u,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Ft(r,this._parents,e,n)}function t2(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var l={value:s},a={value:function(){--o===0&&i()}};n.each(function(){var u=Tt(this,r),f=u.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),o===0&&i()})}var n2=0;function Ft(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function jh(){return++n2}var Lt=Bo.prototype;Ft.prototype={constructor:Ft,select:zw,selectAll:jw,selectChild:Lt.selectChild,selectChildren:Lt.selectChildren,filter:Pw,merge:Tw,selection:Dw,transition:e2,call:Lt.call,nodes:Lt.nodes,node:Lt.node,size:Lt.size,empty:Lt.empty,each:Lt.each,on:Rw,attr:hw,attrTween:vw,style:Uw,styleTween:Xw,text:Kw,textTween:Jw,remove:Ow,tween:sw,delay:Ew,duration:Cw,ease:Nw,easeVarying:Iw,end:t2,[Symbol.iterator]:Lt[Symbol.iterator]};function r2(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var o2={time:null,delay:0,duration:250,ease:r2};function i2(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 s2(e){var t,n;e instanceof Ft?(t=e._id,e=e._name):(t=jh(),(n=o2).time=gu(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&$s(a,e,t,u,s,n||i2(a,t));return new Ft(r,this._parents,e,t)}Bo.prototype.interrupt=rw;Bo.prototype.transition=s2;const ai=e=>()=>e;function l2(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 Ot(e,t,n){this.k=e,this.x=t,this.y=n}Ot.prototype={constructor:Ot,scale:function(e){return e===1?this:new Ot(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ot(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 Ds=new Ot(1,0,0);$h.prototype=Ot.prototype;function $h(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ds;return e.__zoom}function gl(e){e.stopImmediatePropagation()}function Fr(e){e.preventDefault(),e.stopImmediatePropagation()}function a2(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function u2(){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 Qc(){return this.__zoom||Ds}function c2(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function f2(){return navigator.maxTouchPoints||"ontouchstart"in this}function d2(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],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function Dh(){var e=a2,t=u2,n=d2,r=c2,o=f2,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=Oi,u=Os("start","zoom","end"),f,c,d,h=500,y=150,w=0,x=10;function m(E){E.property("__zoom",Qc).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",H).on("dblclick.zoom",L).filter(o).on("touchstart.zoom",b).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(E,j,P,O){var N=E.selection?E.selection():E;N.property("__zoom",Qc),E!==N?_(E,j,P,O):N.interrupt().each(function(){S(this,arguments).event(O).start().zoom(null,typeof j=="function"?j.apply(this,arguments):j).end()})},m.scaleBy=function(E,j,P,O){m.scaleTo(E,function(){var N=this.__zoom.k,I=typeof j=="function"?j.apply(this,arguments):j;return N*I},P,O)},m.scaleTo=function(E,j,P,O){m.transform(E,function(){var N=t.apply(this,arguments),I=this.__zoom,C=P==null?v(N):typeof P=="function"?P.apply(this,arguments):P,M=I.invert(C),z=typeof j=="function"?j.apply(this,arguments):j;return n(p(g(I,z),C,M),N,s)},P,O)},m.translateBy=function(E,j,P,O){m.transform(E,function(){return n(this.__zoom.translate(typeof j=="function"?j.apply(this,arguments):j,typeof P=="function"?P.apply(this,arguments):P),t.apply(this,arguments),s)},null,O)},m.translateTo=function(E,j,P,O,N){m.transform(E,function(){var I=t.apply(this,arguments),C=this.__zoom,M=O==null?v(I):typeof O=="function"?O.apply(this,arguments):O;return n(Ds.translate(M[0],M[1]).scale(C.k).translate(typeof j=="function"?-j.apply(this,arguments):-j,typeof P=="function"?-P.apply(this,arguments):-P),I,s)},O,N)};function g(E,j){return j=Math.max(i[0],Math.min(i[1],j)),j===E.k?E:new Ot(j,E.x,E.y)}function p(E,j,P){var O=j[0]-P[0]*E.k,N=j[1]-P[1]*E.k;return O===E.x&&N===E.y?E:new Ot(E.k,O,N)}function v(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function _(E,j,P,O){E.on("start.zoom",function(){S(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(O).end()}).tween("zoom",function(){var N=this,I=arguments,C=S(N,I).event(O),M=t.apply(N,I),z=P==null?v(M):typeof P=="function"?P.apply(N,I):P,Y=Math.max(M[1][0]-M[0][0],M[1][1]-M[0][1]),A=N.__zoom,k=typeof j=="function"?j.apply(N,I):j,D=a(A.invert(z).concat(Y/A.k),k.invert(z).concat(Y/k.k));return function(B){if(B===1)B=k;else{var W=D(B),X=Y/W[2];B=new Ot(X,z[0]-W[0]*X,z[1]-W[1]*X)}C.zoom(null,B)}})}function S(E,j,P){return!P&&E.__zooming||new T(E,j)}function T(E,j){this.that=E,this.args=j,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,j),this.taps=0}T.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,j){return this.mouse&&E!=="mouse"&&(this.mouse[1]=j.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=j.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=j.invert(this.touch1[0])),this.that.__zoom=j,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var j=Xe(this.that).datum();u.call(E,this.that,new l2(E,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:u}),j)}};function R(E,...j){if(!e.apply(this,arguments))return;var P=S(this,j).event(E),O=this.__zoom,N=Math.max(i[0],Math.min(i[1],O.k*Math.pow(2,r.apply(this,arguments)))),I=ft(E);if(P.wheel)(P.mouse[0][0]!==I[0]||P.mouse[0][1]!==I[1])&&(P.mouse[1]=O.invert(P.mouse[0]=I)),clearTimeout(P.wheel);else{if(O.k===N)return;P.mouse=[I,O.invert(I)],$i(this),P.start()}Fr(E),P.wheel=setTimeout(C,y),P.zoom("mouse",n(p(g(O,N),P.mouse[0],P.mouse[1]),P.extent,s));function C(){P.wheel=null,P.end()}}function H(E,...j){if(d||!e.apply(this,arguments))return;var P=E.currentTarget,O=S(this,j,!0).event(E),N=Xe(E.view).on("mousemove.zoom",z,!0).on("mouseup.zoom",Y,!0),I=ft(E,P),C=E.clientX,M=E.clientY;_h(E.view),gl(E),O.mouse=[I,this.__zoom.invert(I)],$i(this),O.start();function z(A){if(Fr(A),!O.moved){var k=A.clientX-C,D=A.clientY-M;O.moved=k*k+D*D>w}O.event(A).zoom("mouse",n(p(O.that.__zoom,O.mouse[0]=ft(A,P),O.mouse[1]),O.extent,s))}function Y(A){N.on("mousemove.zoom mouseup.zoom",null),Sh(A.view,O.moved),Fr(A),O.event(A).end()}}function L(E,...j){if(e.apply(this,arguments)){var P=this.__zoom,O=ft(E.changedTouches?E.changedTouches[0]:E,this),N=P.invert(O),I=P.k*(E.shiftKey?.5:2),C=n(p(g(P,I),O,N),t.apply(this,j),s);Fr(E),l>0?Xe(this).transition().duration(l).call(_,C,O,E):Xe(this).call(m.transform,C,O,E)}}function b(E,...j){if(e.apply(this,arguments)){var P=E.touches,O=P.length,N=S(this,j,E.changedTouches.length===O).event(E),I,C,M,z;for(gl(E),C=0;C<O;++C)M=P[C],z=ft(M,this),z=[z,this.__zoom.invert(z),M.identifier],N.touch0?!N.touch1&&N.touch0[2]!==z[2]&&(N.touch1=z,N.taps=0):(N.touch0=z,I=!0,N.taps=1+!!f);f&&(f=clearTimeout(f)),I&&(N.taps<2&&(c=z[0],f=setTimeout(function(){f=null},h)),$i(this),N.start())}}function $(E,...j){if(this.__zooming){var P=S(this,j).event(E),O=E.changedTouches,N=O.length,I,C,M,z;for(Fr(E),I=0;I<N;++I)C=O[I],M=ft(C,this),P.touch0&&P.touch0[2]===C.identifier?P.touch0[0]=M:P.touch1&&P.touch1[2]===C.identifier&&(P.touch1[0]=M);if(C=P.that.__zoom,P.touch1){var Y=P.touch0[0],A=P.touch0[1],k=P.touch1[0],D=P.touch1[1],B=(B=k[0]-Y[0])*B+(B=k[1]-Y[1])*B,W=(W=D[0]-A[0])*W+(W=D[1]-A[1])*W;C=g(C,Math.sqrt(B/W)),M=[(Y[0]+k[0])/2,(Y[1]+k[1])/2],z=[(A[0]+D[0])/2,(A[1]+D[1])/2]}else if(P.touch0)M=P.touch0[0],z=P.touch0[1];else return;P.zoom("touch",n(p(C,M,z),P.extent,s))}}function V(E,...j){if(this.__zooming){var P=S(this,j).event(E),O=E.changedTouches,N=O.length,I,C;for(gl(E),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),I=0;I<N;++I)C=O[I],P.touch0&&P.touch0[2]===C.identifier?delete P.touch0:P.touch1&&P.touch1[2]===C.identifier&&delete P.touch1;if(P.touch1&&!P.touch0&&(P.touch0=P.touch1,delete P.touch1),P.touch0)P.touch0[1]=this.__zoom.invert(P.touch0[0]);else if(P.end(),P.taps===2&&(C=ft(C,this),Math.hypot(c[0]-C[0],c[1]-C[1])<x)){var M=Xe(this).on("dblclick.zoom");M&&M.apply(this,arguments)}}}return m.wheelDelta=function(E){return arguments.length?(r=typeof E=="function"?E:ai(+E),m):r},m.filter=function(E){return arguments.length?(e=typeof E=="function"?E:ai(!!E),m):e},m.touchable=function(E){return arguments.length?(o=typeof E=="function"?E:ai(!!E),m):o},m.extent=function(E){return arguments.length?(t=typeof E=="function"?E:ai([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),m):t},m.scaleExtent=function(E){return arguments.length?(i[0]=+E[0],i[1]=+E[1],m):[i[0],i[1]]},m.translateExtent=function(E){return arguments.length?(s[0][0]=+E[0][0],s[1][0]=+E[1][0],s[0][1]=+E[0][1],s[1][1]=+E[1][1],m):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},m.constrain=function(E){return arguments.length?(n=E,m):n},m.duration=function(E){return arguments.length?(l=+E,m):l},m.interpolate=function(E){return arguments.length?(a=E,m):a},m.on=function(){var E=u.on.apply(u,arguments);return E===u?m:E},m.clickDistance=function(E){return arguments.length?(w=(E=+E)*E,m):Math.sqrt(w)},m.tapDistance=function(E){return arguments.length?(x=+E,m):x},m}const Pt={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,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},xo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Fh=["Enter"," ","Escape"],Vh={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var mr;(function(e){e.Strict="strict",e.Loose="loose"})(mr||(mr={}));var Mn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Mn||(Mn={}));var Eo;(function(e){e.Partial="partial",e.Full="full"})(Eo||(Eo={}));const Hh={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var qt;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(qt||(qt={}));var os;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(os||(os={}));var J;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(J||(J={}));const Kc={[J.Left]:J.Right,[J.Right]:J.Left,[J.Top]:J.Bottom,[J.Bottom]:J.Top};function Bh(e){return e===null?null:e?"valid":"invalid"}const Uh=e=>"id"in e&&"source"in e&&"target"in e,h2=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),vu=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Wo=(e,t=[0,0])=>{const{width:n,height:r}=Wt(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},p2=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const i=typeof o=="string";let s=!t.nodeLookup&&!i?o:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(o):vu(o)?o:t.nodeLookup.get(o.id));const l=s?is(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Fs(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Vs(n)},Yo=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=Fs(n,is(o)),r=!0)}),r?Vs(n):{x:0,y:0,width:0,height:0}},wu=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const l={...Go(t,[n,r,o]),width:t.width/o,height:t.height/o},a=[];for(const u of e.values()){const{measured:f,selectable:c=!0,hidden:d=!1}=u;if(s&&!c||d)continue;const h=f.width??u.width??u.initialWidth??null,y=f.height??u.height??u.initialHeight??null,w=_o(l,vr(u)),x=(h??0)*(y??0),m=i&&w>0;(!u.internals.handleBounds||m||w>=x||u.dragging)&&a.push(u)}return a},g2=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function m2(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!o.hidden)&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function y2({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=m2(e,s),a=Yo(l),u=xu(a,t,n,(s==null?void 0:s.minZoom)??o,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(u,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function Wh({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:a,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},f=s.origin??r;let c=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!l)i==null||i("005",Pt.error005());else{const h=l.measured.width,y=l.measured.height;h&&y&&(c=[[a,u],[a+h,u+y]])}else l&&wr(s.extent)&&(c=[[s.extent[0][0]+a,s.extent[0][1]+u],[s.extent[1][0]+a,s.extent[1][1]+u]]);const d=wr(c)?Ln(t,c,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",Pt.error015())),{position:{x:d.x-a+(s.measured.width??0)*f[0],y:d.y-u+(s.measured.height??0)*f[1]},positionAbsolute:d}}async function v2({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const i=new Set(e.map(d=>d.id)),s=[];for(const d of n){if(d.deletable===!1)continue;const h=i.has(d.id),y=!h&&d.parentId&&s.find(w=>w.id===d.parentId);(h||y)&&s.push(d)}const l=new Set(t.map(d=>d.id)),a=r.filter(d=>d.deletable!==!1),f=g2(s,a);for(const d of a)l.has(d.id)&&!f.find(y=>y.id===d.id)&&f.push(d);if(!o)return{edges:f,nodes:s};const c=await o({nodes:s,edges:f});return typeof c=="boolean"?c?{edges:f,nodes:s}:{edges:[],nodes:[]}:c}const yr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ln=(e={x:0,y:0},t,n)=>({x:yr(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:yr(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Yh(e,t,n){const{width:r,height:o}=Wt(n),{x:i,y:s}=n.internals.positionAbsolute;return Ln(e,[[i,s],[i+r,s+o]],t)}const Zc=(e,t,n)=>e<t?yr(Math.abs(e-t),1,t)/t:e>n?-yr(Math.abs(e-n),1,t)/t:0,Xh=(e,t,n=15,r=40)=>{const o=Zc(e.x,r,t.width-r)*n,i=Zc(e.y,r,t.height-r)*n;return[o,i]},Fs=(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)}),sa=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Vs=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),vr=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=vu(e)?e.internals.positionAbsolute:Wo(e,t);return{x:n,y:r,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},is=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=vu(e)?e.internals.positionAbsolute:Wo(e,t);return{x:n,y:r,x2:n+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},Gh=(e,t)=>Vs(Fs(sa(e),sa(t))),_o=(e,t)=>{const 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)},qc=e=>gt(e.width)&>(e.height)&>(e.x)&>(e.y),gt=e=>!isNaN(e)&&isFinite(e),w2=(e,t)=>{},Xo=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Go=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?Xo(l,s):l},ss=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function Un(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function x2(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Un(e,n),o=Un(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=Un(e.top??e.y??0,n),o=Un(e.bottom??e.y??0,n),i=Un(e.left??e.x??0,t),s=Un(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function E2(e,t,n,r,o,i){const{x:s,y:l}=ss(e,[t,n,r]),{x:a,y:u}=ss({x:e.x+e.width,y:e.y+e.height},[t,n,r]),f=o-a,c=i-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(f),bottom:Math.floor(c)}}const xu=(e,t,n,r,o,i)=>{const s=x2(i,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),f=yr(u,r,o),c=e.x+e.width/2,d=e.y+e.height/2,h=t/2-c*f,y=n/2-d*f,w=E2(e,h,y,f,t,n),x={left:Math.min(w.left-s.left,0),top:Math.min(w.top-s.top,0),right:Math.min(w.right-s.right,0),bottom:Math.min(w.bottom-s.bottom,0)};return{x:h-x.left+x.right,y:y-x.top+x.bottom,zoom:f}},So=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function wr(e){return e!=null&&e!=="parent"}function Wt(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Qh(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Kh(e,t={width:0,height:0},n,r,o){const i={...e},s=r.get(n);if(s){const l=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function Jc(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function _2(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function S2(e){return{...Vh,...e||{}}}function oo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=mt(e),l=Go({x:i-((o==null?void 0:o.left)??0),y:s-((o==null?void 0:o.top)??0)},r),{x:a,y:u}=n?Xo(l,t):l;return{xSnapped:a,ySnapped:u,...l}}const Eu=e=>({width:e.offsetWidth,height:e.offsetHeight}),Zh=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},C2=["INPUT","SELECT","TEXTAREA"];function qh(e){var r,o;const t=((o=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:o[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:C2.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Jh=e=>"clientX"in e,mt=(e,t)=>{var i,s;const n=Jh(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},ef=(e,t,n,r,o)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...Eu(s)}})};function ep({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:l}){const a=e*.125+o*.375+s*.375+n*.125,u=t*.125+i*.375+l*.375+r*.125,f=Math.abs(a-e),c=Math.abs(u-t);return[a,u,f,c]}function ui(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function tf({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case J.Left:return[t-ui(t-r,i),n];case J.Right:return[t+ui(r-t,i),n];case J.Top:return[t,n-ui(n-o,i)];case J.Bottom:return[t,n+ui(o-n,i)]}}function tp({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:r,targetY:o,targetPosition:i=J.Top,curvature:s=.25}){const[l,a]=tf({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,f]=tf({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[c,d,h,y]=ep({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:f});return[`M${e},${t} C${l},${a} ${u},${f} ${r},${o}`,c,d,h,y]}function np({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[i,l,o,s]}function k2({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=o&&n?r+1e3:r,l=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+l}function N2({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=Fs(is(e),is(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return _o(s,Vs(i))>0}const M2=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,I2=(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)),P2=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||M2;let o;return Uh(e)?o={...e}:o={...e,id:r(e)},I2(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function rp({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,l]=np({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,l]}const nf={[J.Left]:{x:-1,y:0},[J.Right]:{x:1,y:0},[J.Top]:{x:0,y:-1},[J.Bottom]:{x:0,y:1}},T2=({source:e,sourcePosition:t=J.Bottom,target:n})=>t===J.Left||t===J.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},rf=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function b2({source:e,sourcePosition:t=J.Bottom,target:n,targetPosition:r=J.Top,center:o,offset:i,stepPosition:s}){const l=nf[t],a=nf[r],u={x:e.x+l.x*i,y:e.y+l.y*i},f={x:n.x+a.x*i,y:n.y+a.y*i},c=T2({source:u,sourcePosition:t,target:f}),d=c.x!==0?"x":"y",h=c[d];let y=[],w,x;const m={x:0,y:0},g={x:0,y:0},[,,p,v]=np({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[d]*a[d]===-1){d==="x"?(w=o.x??u.x+(f.x-u.x)*s,x=o.y??(u.y+f.y)/2):(w=o.x??(u.x+f.x)/2,x=o.y??u.y+(f.y-u.y)*s);const R=[{x:w,y:u.y},{x:w,y:f.y}],H=[{x:u.x,y:x},{x:f.x,y:x}];l[d]===h?y=d==="x"?R:H:y=d==="x"?H:R}else{const R=[{x:u.x,y:f.y}],H=[{x:f.x,y:u.y}];if(d==="x"?y=l.x===h?H:R:y=l.y===h?R:H,t===r){const E=Math.abs(e[d]-n[d]);if(E<=i){const j=Math.min(i-1,i-E);l[d]===h?m[d]=(u[d]>e[d]?-1:1)*j:g[d]=(f[d]>n[d]?-1:1)*j}}if(t!==r){const E=d==="x"?"y":"x",j=l[d]===a[E],P=u[E]>f[E],O=u[E]<f[E];(l[d]===1&&(!j&&P||j&&O)||l[d]!==1&&(!j&&O||j&&P))&&(y=d==="x"?R:H)}const L={x:u.x+m.x,y:u.y+m.y},b={x:f.x+g.x,y:f.y+g.y},$=Math.max(Math.abs(L.x-y[0].x),Math.abs(b.x-y[0].x)),V=Math.max(Math.abs(L.y-y[0].y),Math.abs(b.y-y[0].y));$>=V?(w=(L.x+b.x)/2,x=y[0].y):(w=y[0].x,x=(L.y+b.y)/2)}const _={x:u.x+m.x,y:u.y+m.y},S={x:f.x+g.x,y:f.y+g.y};return[[e,..._.x!==y[0].x||_.y!==y[0].y?[_]:[],...y,...S.x!==y[y.length-1].x||S.y!==y[y.length-1].y?[S]:[],n],w,x,p,v]}function L2(e,t,n,r){const o=Math.min(rf(e,t)/2,rf(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,f=e.y<n.y?1:-1;return`L ${i+o*u},${s}Q ${i},${s} ${i},${s+o*f}`}const l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${i},${s+o*a}Q ${i},${s} ${i+o*l},${s}`}function ls({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:r,targetY:o,targetPosition:i=J.Top,borderRadius:s=5,centerX:l,centerY:a,offset:u=20,stepPosition:f=.5}){const[c,d,h,y,w]=b2({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:a},offset:u,stepPosition:f});let x=`M${c[0].x} ${c[0].y}`;for(let m=1;m<c.length-1;m++)x+=L2(c[m-1],c[m],c[m+1],s);return x+=`L${c[c.length-1].x} ${c[c.length-1].y}`,[x,d,h,y,w]}function of(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function R2(e){var c;const{sourceNode:t,targetNode:n}=e;if(!of(t)||!of(n))return null;const r=t.internals.handleBounds||sf(t.handles),o=n.internals.handleBounds||sf(n.handles),i=lf((r==null?void 0:r.source)??[],e.sourceHandle),s=lf(e.connectionMode===mr.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!i||!s)return(c=e.onError)==null||c.call(e,"008",Pt.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||J.Bottom,a=(s==null?void 0:s.position)||J.Top,u=Rn(t,i,l),f=Rn(n,s,a);return{sourceX:u.x,sourceY:u.y,targetX:f.x,targetY:f.y,sourcePosition:l,targetPosition:a}}function sf(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Rn(e,t,n=J.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??Wt(e);if(r)return{x:o+s/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case J.Top:return{x:o+s/2,y:i};case J.Right:return{x:o+s,y:i+l/2};case J.Bottom:return{x:o+s/2,y:i+l};case J.Left:return{x:o,y:i+l/2}}}function lf(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function la(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function A2(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const i=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||o].forEach(a=>{if(a&&typeof a=="object"){const u=la(a,t);i.has(u)||(s.push({id:u,color:a.color||n,...a}),i.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}const op=1e3,O2=10,_u={nodeOrigin:[0,0],nodeExtent:xo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},z2={..._u,checkEquality:!0};function Su(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function j2(e,t,n){const r=Su(_u,n);for(const o of e.values())if(o.parentId)ku(o,e,t,r);else{const i=Wo(o,r.nodeOrigin),s=wr(o.extent)?o.extent:r.nodeExtent,l=Ln(i,s,Wt(o));o.internals.positionAbsolute=l}}function $2(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const o of e.handles){const i={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function Cu(e){return e==="manual"}function aa(e,t,n,r={}){var f,c;const o=Su(z2,r),i={i:0},s=new Map(t),l=o!=null&&o.elevateNodesOnSelect&&!Cu(o.zIndexMode)?op:0;let a=e.length>0,u=!1;t.clear(),n.clear();for(const d of e){let h=s.get(d.id);if(o.checkEquality&&d===(h==null?void 0:h.internals.userNode))t.set(d.id,h);else{const y=Wo(d,o.nodeOrigin),w=wr(d.extent)?d.extent:o.nodeExtent,x=Ln(y,w,Wt(d));h={...o.defaults,...d,measured:{width:(f=d.measured)==null?void 0:f.width,height:(c=d.measured)==null?void 0:c.height},internals:{positionAbsolute:x,handleBounds:$2(d,h),z:ip(d,l,o.zIndexMode),userNode:d}},t.set(d.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(a=!1),d.parentId&&ku(h,t,n,r,i),u||(u=d.selected??!1)}return{nodesInitialized:a,hasSelectedNodes:u}}function D2(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function ku(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:a}=Su(_u,r),u=e.parentId,f=t.get(u);if(!f){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}D2(e,n),o&&!f.parentId&&f.internals.rootParentIndex===void 0&&a==="auto"&&(f.internals.rootParentIndex=++o.i,f.internals.z=f.internals.z+o.i*O2),o&&f.internals.rootParentIndex!==void 0&&(o.i=f.internals.rootParentIndex);const c=i&&!Cu(a)?op:0,{x:d,y:h,z:y}=F2(e,f,s,l,c,a),{positionAbsolute:w}=e.internals,x=d!==w.x||h!==w.y;(x||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:d,y:h}:w,z:y}})}function ip(e,t,n){const r=gt(e.zIndex)?e.zIndex:0;return Cu(n)?r:r+(e.selected?t:0)}function F2(e,t,n,r,o,i){const{x:s,y:l}=t.internals.positionAbsolute,a=Wt(e),u=Wo(e,n),f=wr(e.extent)?Ln(u,e.extent,a):u;let c=Ln({x:s+f.x,y:l+f.y},r,a);e.extent==="parent"&&(c=Yh(c,a,t));const d=ip(e,o,i),h=t.internals.z??0;return{x:c.x,y:c.y,z:h>=d?h+1:d}}function Nu(e,t,n,r=[0,0]){var s;const o=[],i=new Map;for(const l of e){const a=t.get(l.parentId);if(!a)continue;const u=((s=i.get(l.parentId))==null?void 0:s.expandedRect)??vr(a),f=Gh(u,l.rect);i.set(l.parentId,{expandedRect:f,parent:a})}return i.size>0&&i.forEach(({expandedRect:l,parent:a},u)=>{var p;const f=a.internals.positionAbsolute,c=Wt(a),d=a.origin??r,h=l.x<f.x?Math.round(Math.abs(f.x-l.x)):0,y=l.y<f.y?Math.round(Math.abs(f.y-l.y)):0,w=Math.max(c.width,Math.round(l.width)),x=Math.max(c.height,Math.round(l.height)),m=(w-c.width)*d[0],g=(x-c.height)*d[1];(h>0||y>0||m||g)&&(o.push({id:u,type:"position",position:{x:a.position.x-h+m,y:a.position.y-y+g}}),(p=n.get(u))==null||p.forEach(v=>{e.some(_=>_.id===v.id)||o.push({id:v.id,type:"position",position:{x:v.position.x+h,y:v.position.y+y}})})),(c.width<l.width||c.height<l.height||h||y)&&o.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:w+(h?d[0]*h-m:0),height:x+(y?d[1]*y-g:0)}})}),o}function V2(e,t,n,r,o,i,s){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let a=!1;if(!l)return{changes:[],updatedInternals:a};const u=[],f=window.getComputedStyle(l),{m22:c}=new window.DOMMatrixReadOnly(f.transform),d=[];for(const h of e.values()){const y=t.get(h.id);if(!y)continue;if(y.hidden){t.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),a=!0;continue}const w=Eu(h.nodeElement),x=y.measured.width!==w.width||y.measured.height!==w.height;if(!!(w.width&&w.height&&(x||!y.internals.handleBounds||h.force))){const g=h.nodeElement.getBoundingClientRect(),p=wr(y.extent)?y.extent:i;let{positionAbsolute:v}=y.internals;y.parentId&&y.extent==="parent"?v=Yh(v,w,t.get(y.parentId)):p&&(v=Ln(v,p,w));const _={...y,measured:w,internals:{...y.internals,positionAbsolute:v,handleBounds:{source:ef("source",h.nodeElement,g,c,y.id),target:ef("target",h.nodeElement,g,c,y.id)}}};t.set(y.id,_),y.parentId&&ku(_,t,n,{nodeOrigin:o,zIndexMode:s}),a=!0,x&&(u.push({id:y.id,type:"dimensions",dimensions:w}),y.expandParent&&y.parentId&&d.push({id:y.id,parentId:y.parentId,rect:vr(_,o)}))}}if(d.length>0){const h=Nu(d,t,n,o);u.push(...h)}return{changes:u,updatedInternals:a}}async function H2({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function af(e,t,n,r,o,i){let s=o;const l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${o}-${e}`;const a=r.get(s)||new Map;if(r.set(s,a.set(n,t)),i){s=`${o}-${e}-${i}`;const u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function sp(e,t,n){e.clear(),t.clear();for(const r of n){const{source:o,target:i,sourceHandle:s=null,targetHandle:l=null}=r,a={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:l},u=`${o}-${s}--${i}-${l}`,f=`${i}-${l}--${o}-${s}`;af("source",a,f,e,o,s),af("target",a,u,e,i,l),t.set(r.id,r)}}function lp(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:lp(n,t):!1}function uf(e,t,n){var o;let r=e;do{if((o=r==null?void 0:r.matches)!=null&&o.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function B2(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!lp(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const l=e.get(i);l&&o.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return o}function ml({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,l,a;const o=[];for(const[u,f]of t){const c=(s=n.get(u))==null?void 0:s.internals.userNode;c&&o.push({...c,position:f.position,dragging:r})}if(!e)return[o[0],o];const i=(l=n.get(e))==null?void 0:l.internals.userNode;return[i?{...i,position:((a=t.get(e))==null?void 0:a.position)||i.position,dragging:r}:o[0],o]}function U2({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const i={x:n-o.distance.x,y:r-o.distance.y},s=Xo(i,t);return{x:s.x-i.x,y:s.y-i.y}}function W2({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,l=new Map,a=!1,u={x:0,y:0},f=null,c=!1,d=null,h=!1,y=!1,w=null;function x({noDragClassName:g,handleSelector:p,domNode:v,isSelectable:_,nodeId:S,nodeClickDistance:T=0}){d=Xe(v);function R({x:$,y:V}){const{nodeLookup:E,nodeExtent:j,snapGrid:P,snapToGrid:O,nodeOrigin:N,onNodeDrag:I,onSelectionDrag:C,onError:M,updateNodePositions:z}=t();i={x:$,y:V};let Y=!1;const A=l.size>1,k=A&&j?sa(Yo(l)):null,D=A&&O?U2({dragItems:l,snapGrid:P,x:$,y:V}):null;for(const[B,W]of l){if(!E.has(B))continue;let X={x:$-W.distance.x,y:V-W.distance.y};O&&(X=D?{x:Math.round(X.x+D.x),y:Math.round(X.y+D.y)}:Xo(X,P));let G=null;if(A&&j&&!W.extent&&k){const{positionAbsolute:ee}=W.internals,te=ee.x-k.x+j[0][0],ne=ee.x+W.measured.width-k.x2+j[1][0],re=ee.y-k.y+j[0][1],Ce=ee.y+W.measured.height-k.y2+j[1][1];G=[[te,re],[ne,Ce]]}const{position:Q,positionAbsolute:Z}=Wh({nodeId:B,nextPosition:X,nodeLookup:E,nodeExtent:G||j,nodeOrigin:N,onError:M});Y=Y||W.position.x!==Q.x||W.position.y!==Q.y,W.position=Q,W.internals.positionAbsolute=Z}if(y=y||Y,!!Y&&(z(l,!0),w&&(r||I||!S&&C))){const[B,W]=ml({nodeId:S,dragItems:l,nodeLookup:E});r==null||r(w,l,B,W),I==null||I(w,B,W),S||C==null||C(w,W)}}async function H(){if(!f)return;const{transform:$,panBy:V,autoPanSpeed:E,autoPanOnNodeDrag:j}=t();if(!j){a=!1,cancelAnimationFrame(s);return}const[P,O]=Xh(u,f,E);(P!==0||O!==0)&&(i.x=(i.x??0)-P/$[2],i.y=(i.y??0)-O/$[2],await V({x:P,y:O})&&R(i)),s=requestAnimationFrame(H)}function L($){var A;const{nodeLookup:V,multiSelectionActive:E,nodesDraggable:j,transform:P,snapGrid:O,snapToGrid:N,selectNodesOnDrag:I,onNodeDragStart:C,onSelectionDragStart:M,unselectNodesAndEdges:z}=t();c=!0,(!I||!_)&&!E&&S&&((A=V.get(S))!=null&&A.selected||z()),_&&I&&S&&(e==null||e(S));const Y=oo($.sourceEvent,{transform:P,snapGrid:O,snapToGrid:N,containerBounds:f});if(i=Y,l=B2(V,j,Y,S),l.size>0&&(n||C||!S&&M)){const[k,D]=ml({nodeId:S,dragItems:l,nodeLookup:V});n==null||n($.sourceEvent,l,k,D),C==null||C($.sourceEvent,k,D),S||M==null||M($.sourceEvent,D)}}const b=Ch().clickDistance(T).on("start",$=>{const{domNode:V,nodeDragThreshold:E,transform:j,snapGrid:P,snapToGrid:O}=t();f=(V==null?void 0:V.getBoundingClientRect())||null,h=!1,y=!1,w=$.sourceEvent,E===0&&L($),i=oo($.sourceEvent,{transform:j,snapGrid:P,snapToGrid:O,containerBounds:f}),u=mt($.sourceEvent,f)}).on("drag",$=>{const{autoPanOnNodeDrag:V,transform:E,snapGrid:j,snapToGrid:P,nodeDragThreshold:O,nodeLookup:N}=t(),I=oo($.sourceEvent,{transform:E,snapGrid:j,snapToGrid:P,containerBounds:f});if(w=$.sourceEvent,($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||S&&!N.has(S))&&(h=!0),!h){if(!a&&V&&c&&(a=!0,H()),!c){const C=mt($.sourceEvent,f),M=C.x-u.x,z=C.y-u.y;Math.sqrt(M*M+z*z)>O&&L($)}(i.x!==I.xSnapped||i.y!==I.ySnapped)&&l&&c&&(u=mt($.sourceEvent,f),R(I))}}).on("end",$=>{if(!(!c||h)&&(a=!1,c=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:V,updateNodePositions:E,onNodeDragStop:j,onSelectionDragStop:P}=t();if(y&&(E(l,!1),y=!1),o||j||!S&&P){const[O,N]=ml({nodeId:S,dragItems:l,nodeLookup:V,dragging:!1});o==null||o($.sourceEvent,l,O,N),j==null||j($.sourceEvent,O,N),S||P==null||P($.sourceEvent,N)}}}).filter($=>{const V=$.target;return!$.button&&(!g||!uf(V,`.${g}`,v))&&(!p||uf(V,p,v))});d.call(b)}function m(){d==null||d.on(".drag",null)}return{update:x,destroy:m}}function Y2(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())_o(o,vr(i))>0&&r.push(i);return r}const X2=250;function G2(e,t,n,r){var l,a;let o=[],i=1/0;const s=Y2(e,n,t+X2);for(const u of s){const f=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((a=u.internals.handleBounds)==null?void 0:a.target)??[]];for(const c of f){if(r.nodeId===c.nodeId&&r.type===c.type&&r.id===c.id)continue;const{x:d,y:h}=Rn(u,c,c.position,!0),y=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(h-e.y,2));y>t||(y<i?(o=[{...c,x:d,y:h}],i=y):y===i&&o.push({...c,x:d,y:h}))}}if(!o.length)return null;if(o.length>1){const u=r.type==="source"?"target":"source";return o.find(f=>f.type===u)??o[0]}return o[0]}function ap(e,t,n,r,o,i=!1){var u,f,c;const s=r.get(e);if(!s)return null;const l=o==="strict"?(u=s.internals.handleBounds)==null?void 0:u[t]:[...((f=s.internals.handleBounds)==null?void 0:f.source)??[],...((c=s.internals.handleBounds)==null?void 0:c.target)??[]],a=(n?l==null?void 0:l.find(d=>d.id===n):l==null?void 0:l[0])??null;return a&&i?{...a,...Rn(s,a,a.position,!0)}:a}function up(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Q2(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const cp=()=>!0;function K2(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:f,flowId:c,panBy:d,cancelConnection:h,onConnectStart:y,onConnect:w,onConnectEnd:x,isValidConnection:m=cp,onReconnectEnd:g,updateConnection:p,getTransform:v,getFromHandle:_,autoPanSpeed:S,dragThreshold:T=1,handleDomNode:R}){const H=Zh(e.target);let L=0,b;const{x:$,y:V}=mt(e),E=up(i,R),j=l==null?void 0:l.getBoundingClientRect();let P=!1;if(!j||!E)return;const O=ap(o,E,r,a,t);if(!O)return;let N=mt(e,j),I=!1,C=null,M=!1,z=null;function Y(){if(!f||!j)return;const[Q,Z]=Xh(N,j,S);d({x:Q,y:Z}),L=requestAnimationFrame(Y)}const A={...O,nodeId:o,type:E,position:O.position},k=a.get(o);let B={inProgress:!0,isValid:null,from:Rn(k,A,J.Left,!0),fromHandle:A,fromPosition:A.position,fromNode:k,to:N,toHandle:null,toPosition:Kc[A.position],toNode:null,pointer:N};function W(){P=!0,p(B),y==null||y(e,{nodeId:o,handleId:r,handleType:E})}T===0&&W();function X(Q){if(!P){const{x:Ce,y:lt}=mt(Q),bt=Ce-$,vn=lt-V;if(!(bt*bt+vn*vn>T*T))return;W()}if(!_()||!A){G(Q);return}const Z=v();N=mt(Q,j),b=G2(Go(N,Z,!1,[1,1]),n,a,A),I||(Y(),I=!0);const ee=fp(Q,{handle:b,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:m,doc:H,lib:u,flowId:c,nodeLookup:a});z=ee.handleDomNode,C=ee.connection,M=Q2(!!b,ee.isValid);const te=a.get(o),ne=te?Rn(te,A,J.Left,!0):B.from,re={...B,from:ne,isValid:M,to:ee.toHandle&&M?ss({x:ee.toHandle.x,y:ee.toHandle.y},Z):N,toHandle:ee.toHandle,toPosition:M&&ee.toHandle?ee.toHandle.position:Kc[A.position],toNode:ee.toHandle?a.get(ee.toHandle.nodeId):null,pointer:N};p(re),B=re}function G(Q){if(!("touches"in Q&&Q.touches.length>0)){if(P){(b||z)&&C&&M&&(w==null||w(C));const{inProgress:Z,...ee}=B,te={...ee,toPosition:B.toHandle?B.toPosition:null};x==null||x(Q,te),i&&(g==null||g(Q,te))}h(),cancelAnimationFrame(L),I=!1,M=!1,C=null,z=null,H.removeEventListener("mousemove",X),H.removeEventListener("mouseup",G),H.removeEventListener("touchmove",X),H.removeEventListener("touchend",G)}}H.addEventListener("mousemove",X),H.addEventListener("mouseup",G),H.addEventListener("touchmove",X),H.addEventListener("touchend",G)}function fp(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:l,flowId:a,isValidConnection:u=cp,nodeLookup:f}){const c=i==="target",d=t?s.querySelector(`.${l}-flow__handle[data-id="${a}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:h,y}=mt(e),w=s.elementFromPoint(h,y),x=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:d,m={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const g=up(void 0,x),p=x.getAttribute("data-nodeid"),v=x.getAttribute("data-handleid"),_=x.classList.contains("connectable"),S=x.classList.contains("connectableend");if(!p||!g)return m;const T={source:c?p:r,sourceHandle:c?v:o,target:c?r:p,targetHandle:c?o:v};m.connection=T;const H=_&&S&&(n===mr.Strict?c&&g==="source"||!c&&g==="target":p!==r||v!==o);m.isValid=H&&u(T),m.toHandle=ap(p,g,v,f,n,!0)}return m}const ua={onPointerDown:K2,isValid:fp};function Z2({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=Xe(e);function i({translateExtent:l,width:a,height:u,zoomStep:f=1,pannable:c=!0,zoomable:d=!0,inversePan:h=!1}){const y=p=>{if(p.sourceEvent.type!=="wheel"||!t)return;const v=n(),_=p.sourceEvent.ctrlKey&&So()?10:1,S=-p.sourceEvent.deltaY*(p.sourceEvent.deltaMode===1?.05:p.sourceEvent.deltaMode?1:.002)*f,T=v[2]*Math.pow(2,S*_);t.scaleTo(T)};let w=[0,0];const x=p=>{(p.sourceEvent.type==="mousedown"||p.sourceEvent.type==="touchstart")&&(w=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY])},m=p=>{const v=n();if(p.sourceEvent.type!=="mousemove"&&p.sourceEvent.type!=="touchmove"||!t)return;const _=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY],S=[_[0]-w[0],_[1]-w[1]];w=_;const T=r()*Math.max(v[2],Math.log(v[2]))*(h?-1:1),R={x:v[0]-S[0]*T,y:v[1]-S[1]*T},H=[[0,0],[a,u]];t.setViewportConstrained({x:R.x,y:R.y,zoom:v[2]},H,l)},g=Dh().on("start",x).on("zoom",c?m:null).on("zoom.wheel",d?y:null);o.call(g,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:ft}}const Hs=e=>({x:e.x,y:e.y,zoom:e.k}),yl=({x:e,y:t,zoom:n})=>Ds.translate(e,t).scale(n),Yn=(e,t)=>e.target.closest(`.${t}`),dp=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),q2=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,vl=(e,t=0,n=q2,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},hp=e=>{const t=e.ctrlKey&&So()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function J2({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return f=>{if(Yn(f,t))return f.ctrlKey&&f.preventDefault(),!1;f.preventDefault(),f.stopImmediatePropagation();const c=n.property("__zoom").k||1;if(f.ctrlKey&&s){const x=ft(f),m=hp(f),g=c*Math.pow(2,m);r.scaleTo(n,g,x,f);return}const d=f.deltaMode===1?20:1;let h=o===Mn.Vertical?0:f.deltaX*d,y=o===Mn.Horizontal?0:f.deltaY*d;!So()&&f.shiftKey&&o!==Mn.Vertical&&(h=f.deltaY*d,y=0),r.translateBy(n,-(h/c)*i,-(y/c)*i,{internal:!0});const w=Hs(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(a==null||a(f,w),e.panScrollTimeout=setTimeout(()=>{u==null||u(f,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(f,w))}}function ex({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=Yn(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,o)}}function tx({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,l;if((i=r.sourceEvent)!=null&&i.internal)return;const o=Hs(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,o))}}function nx({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{var s,l;e.usedRightMouseButton=!!(n&&dp(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!((l=i.sourceEvent)!=null&&l.internal)&&(o==null||o(i.sourceEvent,Hs(i.transform)))}}function rx({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{var l;if(!((l=s.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,i&&dp(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const a=Hs(s.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(s.sourceEvent,a)},n?150:0)}}}function ox({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:a,lib:u,connectionInProgress:f}){return c=>{var x;const d=e||t,h=n&&c.ctrlKey,y=c.type==="wheel";if(c.button===1&&c.type==="mousedown"&&(Yn(c,`${u}-flow__node`)||Yn(c,`${u}-flow__edge`)))return!0;if(!r&&!d&&!o&&!i&&!n||s||f&&!y||Yn(c,l)&&y||Yn(c,a)&&(!y||o&&y&&!e)||!n&&c.ctrlKey&&y)return!1;if(!n&&c.type==="touchstart"&&((x=c.touches)==null?void 0:x.length)>1)return c.preventDefault(),!1;if(!d&&!o&&!h&&y||!r&&(c.type==="mousedown"||c.type==="touchstart")||Array.isArray(r)&&!r.includes(c.button)&&c.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(c.button)||!c.button||c.button<=1;return(!c.ctrlKey||y)&&w}}function ix({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:a}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},f=e.getBoundingClientRect(),c=Dh().scaleExtent([t,n]).translateExtent(r),d=Xe(e).call(c);g({x:o.x,y:o.y,zoom:yr(o.zoom,t,n)},[[0,0],[f.width,f.height]],r);const h=d.on("wheel.zoom"),y=d.on("dblclick.zoom");c.wheelDelta(hp);function w(b,$){return d?new Promise(V=>{c==null||c.interpolate(($==null?void 0:$.interpolate)==="linear"?ro:Oi).transform(vl(d,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>V(!0)),b)}):Promise.resolve(!1)}function x({noWheelClassName:b,noPanClassName:$,onPaneContextMenu:V,userSelectionActive:E,panOnScroll:j,panOnDrag:P,panOnScrollMode:O,panOnScrollSpeed:N,preventScrolling:I,zoomOnPinch:C,zoomOnScroll:M,zoomOnDoubleClick:z,zoomActivationKeyPressed:Y,lib:A,onTransformChange:k,connectionInProgress:D,paneClickDistance:B,selectionOnDrag:W}){E&&!u.isZoomingOrPanning&&m();const X=j&&!Y&&!E;c.clickDistance(W?1/0:!gt(B)||B<0?0:B);const G=X?J2({zoomPanValues:u,noWheelClassName:b,d3Selection:d,d3Zoom:c,panOnScrollMode:O,panOnScrollSpeed:N,zoomOnPinch:C,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):ex({noWheelClassName:b,preventScrolling:I,d3ZoomHandler:h});if(d.on("wheel.zoom",G,{passive:!1}),!E){const Z=tx({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:s});c.on("start",Z);const ee=nx({zoomPanValues:u,panOnDrag:P,onPaneContextMenu:!!V,onPanZoom:i,onTransformChange:k});c.on("zoom",ee);const te=rx({zoomPanValues:u,panOnDrag:P,panOnScroll:j,onPaneContextMenu:V,onPanZoomEnd:l,onDraggingChange:a});c.on("end",te)}const Q=ox({zoomActivationKeyPressed:Y,panOnDrag:P,zoomOnScroll:M,panOnScroll:j,zoomOnDoubleClick:z,zoomOnPinch:C,userSelectionActive:E,noPanClassName:$,noWheelClassName:b,lib:A,connectionInProgress:D});c.filter(Q),z?d.on("dblclick.zoom",y):d.on("dblclick.zoom",null)}function m(){c.on("zoom",null)}async function g(b,$,V){const E=yl(b),j=c==null?void 0:c.constrain()(E,$,V);return j&&await w(j),new Promise(P=>P(j))}async function p(b,$){const V=yl(b);return await w(V,$),new Promise(E=>E(V))}function v(b){if(d){const $=yl(b),V=d.property("__zoom");(V.k!==b.zoom||V.x!==b.x||V.y!==b.y)&&(c==null||c.transform(d,$,null,{sync:!0}))}}function _(){const b=d?$h(d.node()):{x:0,y:0,k:1};return{x:b.x,y:b.y,zoom:b.k}}function S(b,$){return d?new Promise(V=>{c==null||c.interpolate(($==null?void 0:$.interpolate)==="linear"?ro:Oi).scaleTo(vl(d,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>V(!0)),b)}):Promise.resolve(!1)}function T(b,$){return d?new Promise(V=>{c==null||c.interpolate(($==null?void 0:$.interpolate)==="linear"?ro:Oi).scaleBy(vl(d,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>V(!0)),b)}):Promise.resolve(!1)}function R(b){c==null||c.scaleExtent(b)}function H(b){c==null||c.translateExtent(b)}function L(b){const $=!gt(b)||b<0?0:b;c==null||c.clickDistance($)}return{update:x,destroy:m,setViewport:p,setViewportConstrained:g,getViewport:_,scaleTo:S,scaleBy:T,setScaleExtent:R,setTranslateExtent:H,syncViewport:v,setClickDistance:L}}var xr;(function(e){e.Line="line",e.Handle="handle"})(xr||(xr={}));function sx({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:i}){const s=e-t,l=n-r,a=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&o&&(a[0]=a[0]*-1),l&&i&&(a[1]=a[1]*-1),a}function cf(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:o}}function Xt(e,t){return Math.max(0,t-e)}function Gt(e,t){return Math.max(0,e-t)}function ci(e,t,n){return Math.max(0,t-e,e-n)}function ff(e,t){return e?!t:t}function lx(e,t,n,r,o,i,s,l){let{affectsX:a,affectsY:u}=t;const{isHorizontal:f,isVertical:c}=t,d=f&&c,{xSnapped:h,ySnapped:y}=n,{minWidth:w,maxWidth:x,minHeight:m,maxHeight:g}=r,{x:p,y:v,width:_,height:S,aspectRatio:T}=e;let R=Math.floor(f?h-e.pointerX:0),H=Math.floor(c?y-e.pointerY:0);const L=_+(a?-R:R),b=S+(u?-H:H),$=-i[0]*_,V=-i[1]*S;let E=ci(L,w,x),j=ci(b,m,g);if(s){let N=0,I=0;a&&R<0?N=Xt(p+R+$,s[0][0]):!a&&R>0&&(N=Gt(p+L+$,s[1][0])),u&&H<0?I=Xt(v+H+V,s[0][1]):!u&&H>0&&(I=Gt(v+b+V,s[1][1])),E=Math.max(E,N),j=Math.max(j,I)}if(l){let N=0,I=0;a&&R>0?N=Gt(p+R,l[0][0]):!a&&R<0&&(N=Xt(p+L,l[1][0])),u&&H>0?I=Gt(v+H,l[0][1]):!u&&H<0&&(I=Xt(v+b,l[1][1])),E=Math.max(E,N),j=Math.max(j,I)}if(o){if(f){const N=ci(L/T,m,g)*T;if(E=Math.max(E,N),s){let I=0;!a&&!u||a&&!u&&d?I=Gt(v+V+L/T,s[1][1])*T:I=Xt(v+V+(a?R:-R)/T,s[0][1])*T,E=Math.max(E,I)}if(l){let I=0;!a&&!u||a&&!u&&d?I=Xt(v+L/T,l[1][1])*T:I=Gt(v+(a?R:-R)/T,l[0][1])*T,E=Math.max(E,I)}}if(c){const N=ci(b*T,w,x)/T;if(j=Math.max(j,N),s){let I=0;!a&&!u||u&&!a&&d?I=Gt(p+b*T+$,s[1][0])/T:I=Xt(p+(u?H:-H)*T+$,s[0][0])/T,j=Math.max(j,I)}if(l){let I=0;!a&&!u||u&&!a&&d?I=Xt(p+b*T,l[1][0])/T:I=Gt(p+(u?H:-H)*T,l[0][0])/T,j=Math.max(j,I)}}}H=H+(H<0?j:-j),R=R+(R<0?E:-E),o&&(d?L>b*T?H=(ff(a,u)?-R:R)/T:R=(ff(a,u)?-H:H)*T:f?(H=R/T,u=a):(R=H*T,a=u));const P=a?p+R:p,O=u?v+H:v;return{width:_+(a?-R:R),height:S+(u?-H:H),x:i[0]*R*(a?-1:1)+P,y:i[1]*H*(u?-1:1)+O}}const pp={width:0,height:0,x:0,y:0},ax={...pp,pointerX:0,pointerY:0,aspectRatio:1};function ux(e){return[[0,0],[e.measured.width,e.measured.height]]}function cx(e,t,n){const r=t.position.x+e.position.x,o=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,a=n[1]*s;return[[r-l,o-a],[r+i-l,o+s-a]]}function fx({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const i=Xe(e);let s={controlDirection:cf("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:f,keepAspectRatio:c,resizeDirection:d,onResizeStart:h,onResize:y,onResizeEnd:w,shouldResize:x}){let m={...pp},g={...ax};s={boundaries:f,resizeDirection:d,keepAspectRatio:c,controlDirection:cf(u)};let p,v=null,_=[],S,T,R,H=!1;const L=Ch().on("start",b=>{const{nodeLookup:$,transform:V,snapGrid:E,snapToGrid:j,nodeOrigin:P,paneDomNode:O}=n();if(p=$.get(t),!p)return;v=(O==null?void 0:O.getBoundingClientRect())??null;const{xSnapped:N,ySnapped:I}=oo(b.sourceEvent,{transform:V,snapGrid:E,snapToGrid:j,containerBounds:v});m={width:p.measured.width??0,height:p.measured.height??0,x:p.position.x??0,y:p.position.y??0},g={...m,pointerX:N,pointerY:I,aspectRatio:m.width/m.height},S=void 0,p.parentId&&(p.extent==="parent"||p.expandParent)&&(S=$.get(p.parentId),T=S&&p.extent==="parent"?ux(S):void 0),_=[],R=void 0;for(const[C,M]of $)if(M.parentId===t&&(_.push({id:C,position:{...M.position},extent:M.extent}),M.extent==="parent"||M.expandParent)){const z=cx(M,p,M.origin??P);R?R=[[Math.min(z[0][0],R[0][0]),Math.min(z[0][1],R[0][1])],[Math.max(z[1][0],R[1][0]),Math.max(z[1][1],R[1][1])]]:R=z}h==null||h(b,{...m})}).on("drag",b=>{const{transform:$,snapGrid:V,snapToGrid:E,nodeOrigin:j}=n(),P=oo(b.sourceEvent,{transform:$,snapGrid:V,snapToGrid:E,containerBounds:v}),O=[];if(!p)return;const{x:N,y:I,width:C,height:M}=m,z={},Y=p.origin??j,{width:A,height:k,x:D,y:B}=lx(g,s.controlDirection,P,s.boundaries,s.keepAspectRatio,Y,T,R),W=A!==C,X=k!==M,G=D!==N&&W,Q=B!==I&&X;if(!G&&!Q&&!W&&!X)return;if((G||Q||Y[0]===1||Y[1]===1)&&(z.x=G?D:m.x,z.y=Q?B:m.y,m.x=z.x,m.y=z.y,_.length>0)){const ne=D-N,re=B-I;for(const Ce of _)Ce.position={x:Ce.position.x-ne+Y[0]*(A-C),y:Ce.position.y-re+Y[1]*(k-M)},O.push(Ce)}if((W||X)&&(z.width=W&&(!s.resizeDirection||s.resizeDirection==="horizontal")?A:m.width,z.height=X&&(!s.resizeDirection||s.resizeDirection==="vertical")?k:m.height,m.width=z.width,m.height=z.height),S&&p.expandParent){const ne=Y[0]*(z.width??0);z.x&&z.x<ne&&(m.x=ne,g.x=g.x-(z.x-ne));const re=Y[1]*(z.height??0);z.y&&z.y<re&&(m.y=re,g.y=g.y-(z.y-re))}const Z=sx({width:m.width,prevWidth:C,height:m.height,prevHeight:M,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ee={...m,direction:Z};(x==null?void 0:x(b,ee))!==!1&&(H=!0,y==null||y(b,ee),r(z,O))}).on("end",b=>{H&&(w==null||w(b,{...m}),o==null||o({...m}),H=!1)});i.call(L)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var gp={exports:{}},mp={},yp={exports:{}},vp={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* use-sync-external-store-shim.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Er=U;function dx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hx=typeof Object.is=="function"?Object.is:dx,px=Er.useState,gx=Er.useEffect,mx=Er.useLayoutEffect,yx=Er.useDebugValue;function vx(e,t){var n=t(),r=px({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return mx(function(){o.value=n,o.getSnapshot=t,wl(o)&&i({inst:o})},[e,n,t]),gx(function(){return wl(o)&&i({inst:o}),e(function(){wl(o)&&i({inst:o})})},[e]),yx(n),n}function wl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hx(e,n)}catch{return!0}}function wx(e,t){return t()}var xx=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wx:vx;vp.useSyncExternalStore=Er.useSyncExternalStore!==void 0?Er.useSyncExternalStore:xx;yp.exports=vp;var Ex=yp.exports;/**
|
|
27
|
-
* @license React
|
|
28
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var Bs=U,_x=Ex;function Sx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cx=typeof Object.is=="function"?Object.is:Sx,kx=_x.useSyncExternalStore,Nx=Bs.useRef,Mx=Bs.useEffect,Ix=Bs.useMemo,Px=Bs.useDebugValue;mp.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Nx(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Ix(function(){function a(h){if(!u){if(u=!0,f=h,h=r(h),o!==void 0&&s.hasValue){var y=s.value;if(o(y,h))return c=y}return c=h}if(y=c,Cx(f,h))return y;var w=r(h);return o!==void 0&&o(y,w)?(f=h,y):(f=h,c=w)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return a(t())},d===null?void 0:function(){return a(d())}]},[t,n,r,o]);var l=kx(e,i[0],i[1]);return Mx(function(){s.hasValue=!0,s.value=l},[l]),Px(l),l};gp.exports=mp;var Tx=gp.exports;const bx=qd(Tx),Lx={},df=e=>{let t;const n=new Set,r=(f,c)=>{const d=typeof f=="function"?f(t):f;if(!Object.is(d,t)){const h=t;t=c??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(y=>y(t,h))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(Lx?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,a);return a},Rx=e=>e?df(e):df,{useDebugValue:Ax}=se,{useSyncExternalStoreWithSelector:Ox}=bx,zx=e=>e;function wp(e,t=zx,n){const r=Ox(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ax(r),r}const hf=(e,t)=>{const n=Rx(e),r=(o,i=t)=>wp(n,o,i);return Object.assign(r,n),r},jx=(e,t)=>e?hf(e,t):hf;function he(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[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(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var xp={exports:{}},qe={},Ep={exports:{}},_p={};/**
|
|
35
|
-
* @license React
|
|
36
|
-
* scheduler.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
|
-
*/(function(e){function t(N,I){var C=N.length;N.push(I);e:for(;0<C;){var M=C-1>>>1,z=N[M];if(0<o(z,I))N[M]=I,N[C]=z,C=M;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var I=N[0],C=N.pop();if(C!==I){N[0]=C;e:for(var M=0,z=N.length,Y=z>>>1;M<Y;){var A=2*(M+1)-1,k=N[A],D=A+1,B=N[D];if(0>o(k,C))D<z&&0>o(B,k)?(N[M]=B,N[D]=C,M=D):(N[M]=k,N[A]=C,M=A);else if(D<z&&0>o(B,C))N[M]=B,N[D]=C,M=D;else break e}}return I}function o(N,I){var C=N.sortIndex-I.sortIndex;return C!==0?C:N.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],f=1,c=null,d=3,h=!1,y=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(N){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=N)r(u),I.sortIndex=I.expirationTime,t(a,I);else break;I=n(u)}}function v(N){if(w=!1,p(N),!y)if(n(a)!==null)y=!0,P(_);else{var I=n(u);I!==null&&O(v,I.startTime-N)}}function _(N,I){y=!1,w&&(w=!1,m(R),R=-1),h=!0;var C=d;try{for(p(I),c=n(a);c!==null&&(!(c.expirationTime>I)||N&&!b());){var M=c.callback;if(typeof M=="function"){c.callback=null,d=c.priorityLevel;var z=M(c.expirationTime<=I);I=e.unstable_now(),typeof z=="function"?c.callback=z:c===n(a)&&r(a),p(I)}else r(a);c=n(a)}if(c!==null)var Y=!0;else{var A=n(u);A!==null&&O(v,A.startTime-I),Y=!1}return Y}finally{c=null,d=C,h=!1}}var S=!1,T=null,R=-1,H=5,L=-1;function b(){return!(e.unstable_now()-L<H)}function $(){if(T!==null){var N=e.unstable_now();L=N;var I=!0;try{I=T(!0,N)}finally{I?V():(S=!1,T=null)}}else S=!1}var V;if(typeof g=="function")V=function(){g($)};else if(typeof MessageChannel<"u"){var E=new MessageChannel,j=E.port2;E.port1.onmessage=$,V=function(){j.postMessage(null)}}else V=function(){x($,0)};function P(N){T=N,S||(S=!0,V())}function O(N,I){R=x(function(){N(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){y||h||(y=!0,P(_))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(N){switch(d){case 1:case 2:case 3:var I=3;break;default:I=d}var C=d;d=I;try{return N()}finally{d=C}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,I){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var C=d;d=N;try{return I()}finally{d=C}},e.unstable_scheduleCallback=function(N,I,C){var M=e.unstable_now();switch(typeof C=="object"&&C!==null?(C=C.delay,C=typeof C=="number"&&0<C?M+C:M):C=M,N){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=C+z,N={id:f++,callback:I,priorityLevel:N,startTime:C,expirationTime:z,sortIndex:-1},C>M?(N.sortIndex=C,t(u,N),n(a)===null&&N===n(u)&&(w?(m(R),R=-1):w=!0,O(v,C-M))):(N.sortIndex=z,t(a,N),y||h||(y=!0,P(_))),N},e.unstable_shouldYield=b,e.unstable_wrapCallback=function(N){var I=d;return function(){var C=d;d=I;try{return N.apply(this,arguments)}finally{d=C}}}})(_p);Ep.exports=_p;var $x=Ep.exports;/**
|
|
43
|
-
* @license React
|
|
44
|
-
* react-dom.production.min.js
|
|
45
|
-
*
|
|
46
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the MIT license found in the
|
|
49
|
-
* LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/var Dx=U,Ze=$x;function K(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 Sp=new Set,Co={};function Vn(e,t){_r(e,t),_r(e+"Capture",t)}function _r(e,t){for(Co[e]=t,e=0;e<t.length;e++)Sp.add(t[e])}var Vt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ca=Object.prototype.hasOwnProperty,Fx=/^[: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]*$/,pf={},gf={};function Vx(e){return ca.call(gf,e)?!0:ca.call(pf,e)?!1:Fx.test(e)?gf[e]=!0:(pf[e]=!0,!1)}function Hx(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 Bx(e,t,n,r){if(t===null||typeof t>"u"||Hx(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 De(e,t,n,r,o,i,s){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=s}var be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){be[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];be[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){be[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){be[e]=new De(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){be[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){be[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){be[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){be[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){be[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var Mu=/[\-:]([a-z])/g;function Iu(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(Mu,Iu);be[t]=new De(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(Mu,Iu);be[t]=new De(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(Mu,Iu);be[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){be[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});be.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){be[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function Pu(e,t,n,r){var o=be.hasOwnProperty(t)?be[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Bx(t,n,o,r)&&(n=null),r||o===null?Vx(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 Yt=Dx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fi=Symbol.for("react.element"),Xn=Symbol.for("react.portal"),Gn=Symbol.for("react.fragment"),Tu=Symbol.for("react.strict_mode"),fa=Symbol.for("react.profiler"),Cp=Symbol.for("react.provider"),kp=Symbol.for("react.context"),bu=Symbol.for("react.forward_ref"),da=Symbol.for("react.suspense"),ha=Symbol.for("react.suspense_list"),Lu=Symbol.for("react.memo"),Kt=Symbol.for("react.lazy"),Np=Symbol.for("react.offscreen"),mf=Symbol.iterator;function Vr(e){return e===null||typeof e!="object"?null:(e=mf&&e[mf]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Object.assign,xl;function qr(e){if(xl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);xl=t&&t[1]||""}return`
|
|
51
|
-
`+xl+e}var El=!1;function _l(e,t){if(!e||El)return"";El=!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(`
|
|
52
|
-
`),i=r.stack.split(`
|
|
53
|
-
`),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var a=`
|
|
54
|
-
`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{El=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qr(e):""}function Ux(e){switch(e.tag){case 5:return qr(e.type);case 16:return qr("Lazy");case 13:return qr("Suspense");case 19:return qr("SuspenseList");case 0:case 2:case 15:return e=_l(e.type,!1),e;case 11:return e=_l(e.type.render,!1),e;case 1:return e=_l(e.type,!0),e;default:return""}}function pa(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 Gn:return"Fragment";case Xn:return"Portal";case fa:return"Profiler";case Tu:return"StrictMode";case da:return"Suspense";case ha:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kp:return(e.displayName||"Context")+".Consumer";case Cp:return(e._context.displayName||"Context")+".Provider";case bu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Lu:return t=e.displayName||null,t!==null?t:pa(e.type)||"Memo";case Kt:t=e._payload,e=e._init;try{return pa(e(t))}catch{}}return null}function Wx(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 pa(t);case 8:return t===Tu?"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 dn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mp(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yx(e){var t=Mp(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(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function di(e){e._valueTracker||(e._valueTracker=Yx(e))}function Ip(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Mp(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function as(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 ga(e,t){var n=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function yf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=dn(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 Pp(e,t){t=t.checked,t!=null&&Pu(e,"checked",t,!1)}function ma(e,t){Pp(e,t);var n=dn(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")?ya(e,t.type,n):t.hasOwnProperty("defaultValue")&&ya(e,t.type,dn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vf(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 ya(e,t,n){(t!=="number"||as(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jr=Array.isArray;function ar(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=""+dn(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 va(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(K(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function wf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(K(92));if(Jr(n)){if(1<n.length)throw Error(K(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:dn(n)}}function Tp(e,t){var n=dn(t.value),r=dn(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 xf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function bp(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 wa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?bp(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hi,Lp=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(hi=hi||document.createElement("div"),hi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hi.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 io={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},Xx=["Webkit","ms","Moz","O"];Object.keys(io).forEach(function(e){Xx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),io[t]=io[e]})});function Rp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||io.hasOwnProperty(e)&&io[e]?(""+t).trim():t+"px"}function Ap(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Rp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Gx=ve({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 xa(e,t){if(t){if(Gx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Ea(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 _a=null;function Ru(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sa=null,ur=null,cr=null;function Ef(e){if(e=Zo(e)){if(typeof Sa!="function")throw Error(K(280));var t=e.stateNode;t&&(t=Gs(t),Sa(e.stateNode,e.type,t))}}function Op(e){ur?cr?cr.push(e):cr=[e]:ur=e}function zp(){if(ur){var e=ur,t=cr;if(cr=ur=null,Ef(e),t)for(e=0;e<t.length;e++)Ef(t[e])}}function jp(e,t){return e(t)}function $p(){}var Sl=!1;function Dp(e,t,n){if(Sl)return e(t,n);Sl=!0;try{return jp(e,t,n)}finally{Sl=!1,(ur!==null||cr!==null)&&($p(),zp())}}function No(e,t){var n=e.stateNode;if(n===null)return null;var r=Gs(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(K(231,t,typeof n));return n}var Ca=!1;if(Vt)try{var Hr={};Object.defineProperty(Hr,"passive",{get:function(){Ca=!0}}),window.addEventListener("test",Hr,Hr),window.removeEventListener("test",Hr,Hr)}catch{Ca=!1}function Qx(e,t,n,r,o,i,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var so=!1,us=null,cs=!1,ka=null,Kx={onError:function(e){so=!0,us=e}};function Zx(e,t,n,r,o,i,s,l,a){so=!1,us=null,Qx.apply(Kx,arguments)}function qx(e,t,n,r,o,i,s,l,a){if(Zx.apply(this,arguments),so){if(so){var u=us;so=!1,us=null}else throw Error(K(198));cs||(cs=!0,ka=u)}}function Hn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Fp(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 _f(e){if(Hn(e)!==e)throw Error(K(188))}function Jx(e){var t=e.alternate;if(!t){if(t=Hn(e),t===null)throw Error(K(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 _f(o),e;if(i===r)return _f(o),t;i=i.sibling}throw Error(K(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(K(189))}}if(n.alternate!==r)throw Error(K(190))}if(n.tag!==3)throw Error(K(188));return n.stateNode.current===n?e:t}function Vp(e){return e=Jx(e),e!==null?Hp(e):null}function Hp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Hp(e);if(t!==null)return t;e=e.sibling}return null}var Bp=Ze.unstable_scheduleCallback,Sf=Ze.unstable_cancelCallback,e3=Ze.unstable_shouldYield,t3=Ze.unstable_requestPaint,xe=Ze.unstable_now,n3=Ze.unstable_getCurrentPriorityLevel,Au=Ze.unstable_ImmediatePriority,Up=Ze.unstable_UserBlockingPriority,fs=Ze.unstable_NormalPriority,r3=Ze.unstable_LowPriority,Wp=Ze.unstable_IdlePriority,Us=null,Mt=null;function o3(e){if(Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Us,e,void 0,(e.current.flags&128)===128)}catch{}}var yt=Math.clz32?Math.clz32:l3,i3=Math.log,s3=Math.LN2;function l3(e){return e>>>=0,e===0?32:31-(i3(e)/s3|0)|0}var pi=64,gi=4194304;function eo(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 ds(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=eo(l):(i&=s,i!==0&&(r=eo(i)))}else s=n&~o,s!==0?r=eo(s):i!==0&&(r=eo(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-yt(t),o=1<<n,r|=e[n],t&=~o;return r}function a3(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 u3(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-yt(i),l=1<<s,a=o[s];a===-1?(!(l&n)||l&r)&&(o[s]=a3(l,t)):a<=t&&(e.expiredLanes|=l),i&=~l}}function Na(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Yp(){var e=pi;return pi<<=1,!(pi&4194240)&&(pi=64),e}function Cl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yt(t),e[t]=n}function c3(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-yt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Ou(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-yt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ae=0;function Xp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Gp,zu,Qp,Kp,Zp,Ma=!1,mi=[],rn=null,on=null,sn=null,Mo=new Map,Io=new Map,Jt=[],f3="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 Cf(e,t){switch(e){case"focusin":case"focusout":rn=null;break;case"dragenter":case"dragleave":on=null;break;case"mouseover":case"mouseout":sn=null;break;case"pointerover":case"pointerout":Mo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Io.delete(t.pointerId)}}function Br(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=Zo(t),t!==null&&zu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function d3(e,t,n,r,o){switch(t){case"focusin":return rn=Br(rn,e,t,n,r,o),!0;case"dragenter":return on=Br(on,e,t,n,r,o),!0;case"mouseover":return sn=Br(sn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Mo.set(i,Br(Mo.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Io.set(i,Br(Io.get(i)||null,e,t,n,r,o)),!0}return!1}function qp(e){var t=Sn(e.target);if(t!==null){var n=Hn(t);if(n!==null){if(t=n.tag,t===13){if(t=Fp(n),t!==null){e.blockedOn=t,Zp(e.priority,function(){Qp(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 Di(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ia(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_a=r,n.target.dispatchEvent(r),_a=null}else return t=Zo(n),t!==null&&zu(t),e.blockedOn=n,!1;t.shift()}return!0}function kf(e,t,n){Di(e)&&n.delete(t)}function h3(){Ma=!1,rn!==null&&Di(rn)&&(rn=null),on!==null&&Di(on)&&(on=null),sn!==null&&Di(sn)&&(sn=null),Mo.forEach(kf),Io.forEach(kf)}function Ur(e,t){e.blockedOn===t&&(e.blockedOn=null,Ma||(Ma=!0,Ze.unstable_scheduleCallback(Ze.unstable_NormalPriority,h3)))}function Po(e){function t(o){return Ur(o,e)}if(0<mi.length){Ur(mi[0],e);for(var n=1;n<mi.length;n++){var r=mi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rn!==null&&Ur(rn,e),on!==null&&Ur(on,e),sn!==null&&Ur(sn,e),Mo.forEach(t),Io.forEach(t),n=0;n<Jt.length;n++)r=Jt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Jt.length&&(n=Jt[0],n.blockedOn===null);)qp(n),n.blockedOn===null&&Jt.shift()}var fr=Yt.ReactCurrentBatchConfig,hs=!0;function p3(e,t,n,r){var o=ae,i=fr.transition;fr.transition=null;try{ae=1,ju(e,t,n,r)}finally{ae=o,fr.transition=i}}function g3(e,t,n,r){var o=ae,i=fr.transition;fr.transition=null;try{ae=4,ju(e,t,n,r)}finally{ae=o,fr.transition=i}}function ju(e,t,n,r){if(hs){var o=Ia(e,t,n,r);if(o===null)Al(e,t,r,ps,n),Cf(e,r);else if(d3(o,e,t,n,r))r.stopPropagation();else if(Cf(e,r),t&4&&-1<f3.indexOf(e)){for(;o!==null;){var i=Zo(o);if(i!==null&&Gp(i),i=Ia(e,t,n,r),i===null&&Al(e,t,r,ps,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Al(e,t,r,null,n)}}var ps=null;function Ia(e,t,n,r){if(ps=null,e=Ru(r),e=Sn(e),e!==null)if(t=Hn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Fp(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 ps=e,null}function Jp(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(n3()){case Au:return 1;case Up:return 4;case fs:case r3:return 16;case Wp:return 536870912;default:return 16}default:return 16}}var tn=null,$u=null,Fi=null;function eg(){if(Fi)return Fi;var e,t=$u,n=t.length,r,o="value"in tn?tn.value:tn.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Fi=o.slice(e,1<r?1-r:void 0)}function Vi(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 yi(){return!0}function Nf(){return!1}function Je(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?yi:Nf,this.isPropagationStopped=Nf,this}return ve(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=yi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yi)},persist:function(){},isPersistent:yi}),t}var Rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Du=Je(Rr),Ko=ve({},Rr,{view:0,detail:0}),m3=Je(Ko),kl,Nl,Wr,Ws=ve({},Ko,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fu,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!==Wr&&(Wr&&e.type==="mousemove"?(kl=e.screenX-Wr.screenX,Nl=e.screenY-Wr.screenY):Nl=kl=0,Wr=e),kl)},movementY:function(e){return"movementY"in e?e.movementY:Nl}}),Mf=Je(Ws),y3=ve({},Ws,{dataTransfer:0}),v3=Je(y3),w3=ve({},Ko,{relatedTarget:0}),Ml=Je(w3),x3=ve({},Rr,{animationName:0,elapsedTime:0,pseudoElement:0}),E3=Je(x3),_3=ve({},Rr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S3=Je(_3),C3=ve({},Rr,{data:0}),If=Je(C3),k3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N3={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"},M3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function I3(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=M3[e])?!!t[e]:!1}function Fu(){return I3}var P3=ve({},Ko,{key:function(e){if(e.key){var t=k3[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?N3[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fu,charCode:function(e){return e.type==="keypress"?Vi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),T3=Je(P3),b3=ve({},Ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pf=Je(b3),L3=ve({},Ko,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fu}),R3=Je(L3),A3=ve({},Rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),O3=Je(A3),z3=ve({},Ws,{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}),j3=Je(z3),$3=[9,13,27,32],Vu=Vt&&"CompositionEvent"in window,lo=null;Vt&&"documentMode"in document&&(lo=document.documentMode);var D3=Vt&&"TextEvent"in window&&!lo,tg=Vt&&(!Vu||lo&&8<lo&&11>=lo),Tf=" ",bf=!1;function ng(e,t){switch(e){case"keyup":return $3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qn=!1;function F3(e,t){switch(e){case"compositionend":return rg(t);case"keypress":return t.which!==32?null:(bf=!0,Tf);case"textInput":return e=t.data,e===Tf&&bf?null:e;default:return null}}function V3(e,t){if(Qn)return e==="compositionend"||!Vu&&ng(e,t)?(e=eg(),Fi=$u=tn=null,Qn=!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 tg&&t.locale!=="ko"?null:t.data;default:return null}}var H3={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 Lf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!H3[e.type]:t==="textarea"}function og(e,t,n,r){Op(r),t=gs(t,"onChange"),0<t.length&&(n=new Du("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ao=null,To=null;function B3(e){gg(e,0)}function Ys(e){var t=qn(e);if(Ip(t))return e}function U3(e,t){if(e==="change")return t}var ig=!1;if(Vt){var Il;if(Vt){var Pl="oninput"in document;if(!Pl){var Rf=document.createElement("div");Rf.setAttribute("oninput","return;"),Pl=typeof Rf.oninput=="function"}Il=Pl}else Il=!1;ig=Il&&(!document.documentMode||9<document.documentMode)}function Af(){ao&&(ao.detachEvent("onpropertychange",sg),To=ao=null)}function sg(e){if(e.propertyName==="value"&&Ys(To)){var t=[];og(t,To,e,Ru(e)),Dp(B3,t)}}function W3(e,t,n){e==="focusin"?(Af(),ao=t,To=n,ao.attachEvent("onpropertychange",sg)):e==="focusout"&&Af()}function Y3(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ys(To)}function X3(e,t){if(e==="click")return Ys(t)}function G3(e,t){if(e==="input"||e==="change")return Ys(t)}function Q3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:Q3;function bo(e,t){if(wt(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(!ca.call(t,o)||!wt(e[o],t[o]))return!1}return!0}function Of(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zf(e,t){var n=Of(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=Of(n)}}function lg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ag(){for(var e=window,t=as();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=as(e.document)}return t}function Hu(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 K3(e){var t=ag(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&lg(n.ownerDocument.documentElement,n)){if(r!==null&&Hu(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=zf(n,i);var s=zf(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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 Z3=Vt&&"documentMode"in document&&11>=document.documentMode,Kn=null,Pa=null,uo=null,Ta=!1;function jf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ta||Kn==null||Kn!==as(r)||(r=Kn,"selectionStart"in r&&Hu(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}),uo&&bo(uo,r)||(uo=r,r=gs(Pa,"onSelect"),0<r.length&&(t=new Du("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Kn)))}function vi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zn={animationend:vi("Animation","AnimationEnd"),animationiteration:vi("Animation","AnimationIteration"),animationstart:vi("Animation","AnimationStart"),transitionend:vi("Transition","TransitionEnd")},Tl={},ug={};Vt&&(ug=document.createElement("div").style,"AnimationEvent"in window||(delete Zn.animationend.animation,delete Zn.animationiteration.animation,delete Zn.animationstart.animation),"TransitionEvent"in window||delete Zn.transitionend.transition);function Xs(e){if(Tl[e])return Tl[e];if(!Zn[e])return e;var t=Zn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ug)return Tl[e]=t[n];return e}var cg=Xs("animationend"),fg=Xs("animationiteration"),dg=Xs("animationstart"),hg=Xs("transitionend"),pg=new Map,$f="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 gn(e,t){pg.set(e,t),Vn(t,[e])}for(var bl=0;bl<$f.length;bl++){var Ll=$f[bl],q3=Ll.toLowerCase(),J3=Ll[0].toUpperCase()+Ll.slice(1);gn(q3,"on"+J3)}gn(cg,"onAnimationEnd");gn(fg,"onAnimationIteration");gn(dg,"onAnimationStart");gn("dblclick","onDoubleClick");gn("focusin","onFocus");gn("focusout","onBlur");gn(hg,"onTransitionEnd");_r("onMouseEnter",["mouseout","mouseover"]);_r("onMouseLeave",["mouseout","mouseover"]);_r("onPointerEnter",["pointerout","pointerover"]);_r("onPointerLeave",["pointerout","pointerover"]);Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var to="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(" "),eE=new Set("cancel close invalid load scroll toggle".split(" ").concat(to));function Df(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,qx(r,t,void 0,e),e.currentTarget=null}function gg(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 s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==i&&o.isPropagationStopped())break e;Df(o,l,u),i=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==i&&o.isPropagationStopped())break e;Df(o,l,u),i=a}}}if(cs)throw e=ka,cs=!1,ka=null,e}function fe(e,t){var n=t[Oa];n===void 0&&(n=t[Oa]=new Set);var r=e+"__bubble";n.has(r)||(mg(t,e,2,!1),n.add(r))}function Rl(e,t,n){var r=0;t&&(r|=4),mg(n,e,r,t)}var wi="_reactListening"+Math.random().toString(36).slice(2);function Lo(e){if(!e[wi]){e[wi]=!0,Sp.forEach(function(n){n!=="selectionchange"&&(eE.has(n)||Rl(n,!1,e),Rl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wi]||(t[wi]=!0,Rl("selectionchange",!1,t))}}function mg(e,t,n,r){switch(Jp(t)){case 1:var o=p3;break;case 4:o=g3;break;default:o=ju}n=o.bind(null,t,n,e),o=void 0,!Ca||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 Al(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;s=s.return}for(;l!==null;){if(s=Sn(l),s===null)return;if(a=s.tag,a===5||a===6){r=i=s;continue e}l=l.parentNode}}r=r.return}Dp(function(){var u=i,f=Ru(n),c=[];e:{var d=pg.get(e);if(d!==void 0){var h=Du,y=e;switch(e){case"keypress":if(Vi(n)===0)break e;case"keydown":case"keyup":h=T3;break;case"focusin":y="focus",h=Ml;break;case"focusout":y="blur",h=Ml;break;case"beforeblur":case"afterblur":h=Ml;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":h=Mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=v3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=R3;break;case cg:case fg:case dg:h=E3;break;case hg:h=O3;break;case"scroll":h=m3;break;case"wheel":h=j3;break;case"copy":case"cut":case"paste":h=S3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Pf}var w=(t&4)!==0,x=!w&&e==="scroll",m=w?d!==null?d+"Capture":null:d;w=[];for(var g=u,p;g!==null;){p=g;var v=p.stateNode;if(p.tag===5&&v!==null&&(p=v,m!==null&&(v=No(g,m),v!=null&&w.push(Ro(g,v,p)))),x)break;g=g.return}0<w.length&&(d=new h(d,y,null,n,f),c.push({event:d,listeners:w}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==_a&&(y=n.relatedTarget||n.fromElement)&&(Sn(y)||y[Ht]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?Sn(y):null,y!==null&&(x=Hn(y),y!==x||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=u),h!==y)){if(w=Mf,v="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(w=Pf,v="onPointerLeave",m="onPointerEnter",g="pointer"),x=h==null?d:qn(h),p=y==null?d:qn(y),d=new w(v,g+"leave",h,n,f),d.target=x,d.relatedTarget=p,v=null,Sn(f)===u&&(w=new w(m,g+"enter",y,n,f),w.target=p,w.relatedTarget=x,v=w),x=v,h&&y)t:{for(w=h,m=y,g=0,p=w;p;p=Wn(p))g++;for(p=0,v=m;v;v=Wn(v))p++;for(;0<g-p;)w=Wn(w),g--;for(;0<p-g;)m=Wn(m),p--;for(;g--;){if(w===m||m!==null&&w===m.alternate)break t;w=Wn(w),m=Wn(m)}w=null}else w=null;h!==null&&Ff(c,d,h,w,!1),y!==null&&x!==null&&Ff(c,x,y,w,!0)}}e:{if(d=u?qn(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var _=U3;else if(Lf(d))if(ig)_=G3;else{_=Y3;var S=W3}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(_=X3);if(_&&(_=_(e,u))){og(c,_,n,f);break e}S&&S(e,d,u),e==="focusout"&&(S=d._wrapperState)&&S.controlled&&d.type==="number"&&ya(d,"number",d.value)}switch(S=u?qn(u):window,e){case"focusin":(Lf(S)||S.contentEditable==="true")&&(Kn=S,Pa=u,uo=null);break;case"focusout":uo=Pa=Kn=null;break;case"mousedown":Ta=!0;break;case"contextmenu":case"mouseup":case"dragend":Ta=!1,jf(c,n,f);break;case"selectionchange":if(Z3)break;case"keydown":case"keyup":jf(c,n,f)}var T;if(Vu)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else Qn?ng(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(tg&&n.locale!=="ko"&&(Qn||R!=="onCompositionStart"?R==="onCompositionEnd"&&Qn&&(T=eg()):(tn=f,$u="value"in tn?tn.value:tn.textContent,Qn=!0)),S=gs(u,R),0<S.length&&(R=new If(R,e,null,n,f),c.push({event:R,listeners:S}),T?R.data=T:(T=rg(n),T!==null&&(R.data=T)))),(T=D3?F3(e,n):V3(e,n))&&(u=gs(u,"onBeforeInput"),0<u.length&&(f=new If("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=T))}gg(c,t)})}function Ro(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gs(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=No(e,n),i!=null&&r.unshift(Ro(e,i,o)),i=No(e,t),i!=null&&r.push(Ro(e,i,o))),e=e.return}return r}function Wn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ff(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,o?(a=No(n,i),a!=null&&s.unshift(Ro(n,a,l))):o||(a=No(n,i),a!=null&&s.push(Ro(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var tE=/\r\n?/g,nE=/\u0000|\uFFFD/g;function Vf(e){return(typeof e=="string"?e:""+e).replace(tE,`
|
|
55
|
-
`).replace(nE,"")}function xi(e,t,n){if(t=Vf(t),Vf(e)!==t&&n)throw Error(K(425))}function ms(){}var ba=null,La=null;function Ra(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 Aa=typeof setTimeout=="function"?setTimeout:void 0,rE=typeof clearTimeout=="function"?clearTimeout:void 0,Hf=typeof Promise=="function"?Promise:void 0,oE=typeof queueMicrotask=="function"?queueMicrotask:typeof Hf<"u"?function(e){return Hf.resolve(null).then(e).catch(iE)}:Aa;function iE(e){setTimeout(function(){throw e})}function Ol(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),Po(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Po(t)}function ln(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 Bf(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 Ar=Math.random().toString(36).slice(2),kt="__reactFiber$"+Ar,Ao="__reactProps$"+Ar,Ht="__reactContainer$"+Ar,Oa="__reactEvents$"+Ar,sE="__reactListeners$"+Ar,lE="__reactHandles$"+Ar;function Sn(e){var t=e[kt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ht]||n[kt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bf(e);e!==null;){if(n=e[kt])return n;e=Bf(e)}return t}e=n,n=e.parentNode}return null}function Zo(e){return e=e[kt]||e[Ht],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function qn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(K(33))}function Gs(e){return e[Ao]||null}var za=[],Jn=-1;function mn(e){return{current:e}}function de(e){0>Jn||(e.current=za[Jn],za[Jn]=null,Jn--)}function ce(e,t){Jn++,za[Jn]=e.current,e.current=t}var hn={},Oe=mn(hn),Be=mn(!1),An=hn;function Sr(e,t){var n=e.type.contextTypes;if(!n)return hn;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 Ue(e){return e=e.childContextTypes,e!=null}function ys(){de(Be),de(Oe)}function Uf(e,t,n){if(Oe.current!==hn)throw Error(K(168));ce(Oe,t),ce(Be,n)}function yg(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(K(108,Wx(e)||"Unknown",o));return ve({},n,r)}function vs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hn,An=Oe.current,ce(Oe,e),ce(Be,Be.current),!0}function Wf(e,t,n){var r=e.stateNode;if(!r)throw Error(K(169));n?(e=yg(e,t,An),r.__reactInternalMemoizedMergedChildContext=e,de(Be),de(Oe),ce(Oe,e)):de(Be),ce(Be,n)}var At=null,Qs=!1,zl=!1;function vg(e){At===null?At=[e]:At.push(e)}function aE(e){Qs=!0,vg(e)}function yn(){if(!zl&&At!==null){zl=!0;var e=0,t=ae;try{var n=At;for(ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}At=null,Qs=!1}catch(o){throw At!==null&&(At=At.slice(e+1)),Bp(Au,yn),o}finally{ae=t,zl=!1}}return null}var er=[],tr=0,ws=null,xs=0,tt=[],nt=0,On=null,zt=1,jt="";function wn(e,t){er[tr++]=xs,er[tr++]=ws,ws=e,xs=t}function wg(e,t,n){tt[nt++]=zt,tt[nt++]=jt,tt[nt++]=On,On=e;var r=zt;e=jt;var o=32-yt(r)-1;r&=~(1<<o),n+=1;var i=32-yt(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,zt=1<<32-yt(t)+o|n<<o|r,jt=i+e}else zt=1<<i|n<<o|r,jt=e}function Bu(e){e.return!==null&&(wn(e,1),wg(e,1,0))}function Uu(e){for(;e===ws;)ws=er[--tr],er[tr]=null,xs=er[--tr],er[tr]=null;for(;e===On;)On=tt[--nt],tt[nt]=null,jt=tt[--nt],tt[nt]=null,zt=tt[--nt],tt[nt]=null}var Qe=null,Ge=null,pe=!1,ht=null;function xg(e,t){var n=rt(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 Yf(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,Qe=e,Ge=ln(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Qe=e,Ge=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=On!==null?{id:zt,overflow:jt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=rt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Qe=e,Ge=null,!0):!1;default:return!1}}function ja(e){return(e.mode&1)!==0&&(e.flags&128)===0}function $a(e){if(pe){var t=Ge;if(t){var n=t;if(!Yf(e,t)){if(ja(e))throw Error(K(418));t=ln(n.nextSibling);var r=Qe;t&&Yf(e,t)?xg(r,n):(e.flags=e.flags&-4097|2,pe=!1,Qe=e)}}else{if(ja(e))throw Error(K(418));e.flags=e.flags&-4097|2,pe=!1,Qe=e}}}function Xf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Qe=e}function Ei(e){if(e!==Qe)return!1;if(!pe)return Xf(e),pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ra(e.type,e.memoizedProps)),t&&(t=Ge)){if(ja(e))throw Eg(),Error(K(418));for(;t;)xg(e,t),t=ln(t.nextSibling)}if(Xf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(K(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ge=ln(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ge=null}}else Ge=Qe?ln(e.stateNode.nextSibling):null;return!0}function Eg(){for(var e=Ge;e;)e=ln(e.nextSibling)}function Cr(){Ge=Qe=null,pe=!1}function Wu(e){ht===null?ht=[e]:ht.push(e)}var uE=Yt.ReactCurrentBatchConfig;function Yr(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(K(309));var r=n.stateNode}if(!r)throw Error(K(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(s){var l=o.refs;s===null?delete l[i]:l[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(K(284));if(!n._owner)throw Error(K(290,e))}return e}function _i(e,t){throw e=Object.prototype.toString.call(t),Error(K(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Gf(e){var t=e._init;return t(e._payload)}function _g(e){function t(m,g){if(e){var p=m.deletions;p===null?(m.deletions=[g],m.flags|=16):p.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function o(m,g){return m=fn(m,g),m.index=0,m.sibling=null,m}function i(m,g,p){return m.index=p,e?(p=m.alternate,p!==null?(p=p.index,p<g?(m.flags|=2,g):p):(m.flags|=2,g)):(m.flags|=1048576,g)}function s(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,g,p,v){return g===null||g.tag!==6?(g=Bl(p,m.mode,v),g.return=m,g):(g=o(g,p),g.return=m,g)}function a(m,g,p,v){var _=p.type;return _===Gn?f(m,g,p.props.children,v,p.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Kt&&Gf(_)===g.type)?(v=o(g,p.props),v.ref=Yr(m,g,p),v.return=m,v):(v=Gi(p.type,p.key,p.props,null,m.mode,v),v.ref=Yr(m,g,p),v.return=m,v)}function u(m,g,p,v){return g===null||g.tag!==4||g.stateNode.containerInfo!==p.containerInfo||g.stateNode.implementation!==p.implementation?(g=Ul(p,m.mode,v),g.return=m,g):(g=o(g,p.children||[]),g.return=m,g)}function f(m,g,p,v,_){return g===null||g.tag!==7?(g=Pn(p,m.mode,v,_),g.return=m,g):(g=o(g,p),g.return=m,g)}function c(m,g,p){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Bl(""+g,m.mode,p),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case fi:return p=Gi(g.type,g.key,g.props,null,m.mode,p),p.ref=Yr(m,null,g),p.return=m,p;case Xn:return g=Ul(g,m.mode,p),g.return=m,g;case Kt:var v=g._init;return c(m,v(g._payload),p)}if(Jr(g)||Vr(g))return g=Pn(g,m.mode,p,null),g.return=m,g;_i(m,g)}return null}function d(m,g,p,v){var _=g!==null?g.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return _!==null?null:l(m,g,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case fi:return p.key===_?a(m,g,p,v):null;case Xn:return p.key===_?u(m,g,p,v):null;case Kt:return _=p._init,d(m,g,_(p._payload),v)}if(Jr(p)||Vr(p))return _!==null?null:f(m,g,p,v,null);_i(m,p)}return null}function h(m,g,p,v,_){if(typeof v=="string"&&v!==""||typeof v=="number")return m=m.get(p)||null,l(g,m,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case fi:return m=m.get(v.key===null?p:v.key)||null,a(g,m,v,_);case Xn:return m=m.get(v.key===null?p:v.key)||null,u(g,m,v,_);case Kt:var S=v._init;return h(m,g,p,S(v._payload),_)}if(Jr(v)||Vr(v))return m=m.get(p)||null,f(g,m,v,_,null);_i(g,v)}return null}function y(m,g,p,v){for(var _=null,S=null,T=g,R=g=0,H=null;T!==null&&R<p.length;R++){T.index>R?(H=T,T=null):H=T.sibling;var L=d(m,T,p[R],v);if(L===null){T===null&&(T=H);break}e&&T&&L.alternate===null&&t(m,T),g=i(L,g,R),S===null?_=L:S.sibling=L,S=L,T=H}if(R===p.length)return n(m,T),pe&&wn(m,R),_;if(T===null){for(;R<p.length;R++)T=c(m,p[R],v),T!==null&&(g=i(T,g,R),S===null?_=T:S.sibling=T,S=T);return pe&&wn(m,R),_}for(T=r(m,T);R<p.length;R++)H=h(T,m,R,p[R],v),H!==null&&(e&&H.alternate!==null&&T.delete(H.key===null?R:H.key),g=i(H,g,R),S===null?_=H:S.sibling=H,S=H);return e&&T.forEach(function(b){return t(m,b)}),pe&&wn(m,R),_}function w(m,g,p,v){var _=Vr(p);if(typeof _!="function")throw Error(K(150));if(p=_.call(p),p==null)throw Error(K(151));for(var S=_=null,T=g,R=g=0,H=null,L=p.next();T!==null&&!L.done;R++,L=p.next()){T.index>R?(H=T,T=null):H=T.sibling;var b=d(m,T,L.value,v);if(b===null){T===null&&(T=H);break}e&&T&&b.alternate===null&&t(m,T),g=i(b,g,R),S===null?_=b:S.sibling=b,S=b,T=H}if(L.done)return n(m,T),pe&&wn(m,R),_;if(T===null){for(;!L.done;R++,L=p.next())L=c(m,L.value,v),L!==null&&(g=i(L,g,R),S===null?_=L:S.sibling=L,S=L);return pe&&wn(m,R),_}for(T=r(m,T);!L.done;R++,L=p.next())L=h(T,m,R,L.value,v),L!==null&&(e&&L.alternate!==null&&T.delete(L.key===null?R:L.key),g=i(L,g,R),S===null?_=L:S.sibling=L,S=L);return e&&T.forEach(function($){return t(m,$)}),pe&&wn(m,R),_}function x(m,g,p,v){if(typeof p=="object"&&p!==null&&p.type===Gn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case fi:e:{for(var _=p.key,S=g;S!==null;){if(S.key===_){if(_=p.type,_===Gn){if(S.tag===7){n(m,S.sibling),g=o(S,p.props.children),g.return=m,m=g;break e}}else if(S.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Kt&&Gf(_)===S.type){n(m,S.sibling),g=o(S,p.props),g.ref=Yr(m,S,p),g.return=m,m=g;break e}n(m,S);break}else t(m,S);S=S.sibling}p.type===Gn?(g=Pn(p.props.children,m.mode,v,p.key),g.return=m,m=g):(v=Gi(p.type,p.key,p.props,null,m.mode,v),v.ref=Yr(m,g,p),v.return=m,m=v)}return s(m);case Xn:e:{for(S=p.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===p.containerInfo&&g.stateNode.implementation===p.implementation){n(m,g.sibling),g=o(g,p.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=Ul(p,m.mode,v),g.return=m,m=g}return s(m);case Kt:return S=p._init,x(m,g,S(p._payload),v)}if(Jr(p))return y(m,g,p,v);if(Vr(p))return w(m,g,p,v);_i(m,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,g!==null&&g.tag===6?(n(m,g.sibling),g=o(g,p),g.return=m,m=g):(n(m,g),g=Bl(p,m.mode,v),g.return=m,m=g),s(m)):n(m,g)}return x}var kr=_g(!0),Sg=_g(!1),Es=mn(null),_s=null,nr=null,Yu=null;function Xu(){Yu=nr=_s=null}function Gu(e){var t=Es.current;de(Es),e._currentValue=t}function Da(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 dr(e,t){_s=e,Yu=nr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(He=!0),e.firstContext=null)}function it(e){var t=e._currentValue;if(Yu!==e)if(e={context:e,memoizedValue:t,next:null},nr===null){if(_s===null)throw Error(K(308));nr=e,_s.dependencies={lanes:0,firstContext:e}}else nr=nr.next=e;return t}var Cn=null;function Qu(e){Cn===null?Cn=[e]:Cn.push(e)}function Cg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Qu(t)):(n.next=o.next,o.next=n),t.interleaved=n,Bt(e,r)}function Bt(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 Zt=!1;function Ku(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kg(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 $t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function an(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Bt(e,n)}return o=r.interleaved,o===null?(t.next=t,Qu(r)):(t.next=o.next,o.next=t),r.interleaved=t,Bt(e,n)}function Hi(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,Ou(e,n)}}function Qf(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 s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,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 Ss(e,t,n,r){var o=e.updateQueue;Zt=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==s&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=a))}if(i!==null){var c=o.baseState;s=0,f=u=a=null,l=i;do{var d=l.lane,h=l.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var y=e,w=l;switch(d=t,h=n,w.tag){case 1:if(y=w.payload,typeof y=="function"){c=y.call(h,c,d);break e}c=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=w.payload,d=typeof y=="function"?y.call(h,c,d):y,d==null)break e;c=ve({},c,d);break e;case 2:Zt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[l]:d.push(l))}else h={eventTime:h,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=h,a=c):f=f.next=h,s|=d;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;d=l,l=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(f===null&&(a=c),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=f,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);jn|=s,e.lanes=s,e.memoizedState=c}}function Kf(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(K(191,o));o.call(r)}}}var qo={},It=mn(qo),Oo=mn(qo),zo=mn(qo);function kn(e){if(e===qo)throw Error(K(174));return e}function Zu(e,t){switch(ce(zo,t),ce(Oo,e),ce(It,qo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:wa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=wa(t,e)}de(It),ce(It,t)}function Nr(){de(It),de(Oo),de(zo)}function Ng(e){kn(zo.current);var t=kn(It.current),n=wa(t,e.type);t!==n&&(ce(Oo,e),ce(It,n))}function qu(e){Oo.current===e&&(de(It),de(Oo))}var me=mn(0);function Cs(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)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 jl=[];function Ju(){for(var e=0;e<jl.length;e++)jl[e]._workInProgressVersionPrimary=null;jl.length=0}var Bi=Yt.ReactCurrentDispatcher,$l=Yt.ReactCurrentBatchConfig,zn=0,ye=null,ke=null,Me=null,ks=!1,co=!1,jo=0,cE=0;function Le(){throw Error(K(321))}function ec(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wt(e[n],t[n]))return!1;return!0}function tc(e,t,n,r,o,i){if(zn=i,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bi.current=e===null||e.memoizedState===null?pE:gE,e=n(r,o),co){i=0;do{if(co=!1,jo=0,25<=i)throw Error(K(301));i+=1,Me=ke=null,t.updateQueue=null,Bi.current=mE,e=n(r,o)}while(co)}if(Bi.current=Ns,t=ke!==null&&ke.next!==null,zn=0,Me=ke=ye=null,ks=!1,t)throw Error(K(300));return e}function nc(){var e=jo!==0;return jo=0,e}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?ye.memoizedState=Me=e:Me=Me.next=e,Me}function st(){if(ke===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=Me===null?ye.memoizedState:Me.next;if(t!==null)Me=t,ke=e;else{if(e===null)throw Error(K(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},Me===null?ye.memoizedState=Me=e:Me=Me.next=e}return Me}function $o(e,t){return typeof t=="function"?t(e):t}function Dl(e){var t=st(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=ke,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=s=null,a=null,u=i;do{var f=u.lane;if((zn&f)===f)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 c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=c,s=r):a=a.next=c,ye.lanes|=f,jn|=f}u=u.next}while(u!==null&&u!==i);a===null?s=r:a.next=l,wt(r,t.memoizedState)||(He=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,ye.lanes|=i,jn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Fl(e){var t=st(),n=t.queue;if(n===null)throw Error(K(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);wt(i,t.memoizedState)||(He=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Mg(){}function Ig(e,t){var n=ye,r=st(),o=t(),i=!wt(r.memoizedState,o);if(i&&(r.memoizedState=o,He=!0),r=r.queue,rc(bg.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Me!==null&&Me.memoizedState.tag&1){if(n.flags|=2048,Do(9,Tg.bind(null,n,r,o,t),void 0,null),Ie===null)throw Error(K(349));zn&30||Pg(n,t,o)}return o}function Pg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ye.updateQueue,t===null?(t={lastEffect:null,stores:null},ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Tg(e,t,n,r){t.value=n,t.getSnapshot=r,Lg(t)&&Rg(e)}function bg(e,t,n){return n(function(){Lg(t)&&Rg(e)})}function Lg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wt(e,n)}catch{return!0}}function Rg(e){var t=Bt(e,1);t!==null&&vt(t,e,1,-1)}function Zf(e){var t=St();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:e},t.queue=e,e=e.dispatch=hE.bind(null,ye,e),[t.memoizedState,e]}function Do(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ye.updateQueue,t===null?(t={lastEffect:null,stores:null},ye.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 Ag(){return st().memoizedState}function Ui(e,t,n,r){var o=St();ye.flags|=e,o.memoizedState=Do(1|t,n,void 0,r===void 0?null:r)}function Ks(e,t,n,r){var o=st();r=r===void 0?null:r;var i=void 0;if(ke!==null){var s=ke.memoizedState;if(i=s.destroy,r!==null&&ec(r,s.deps)){o.memoizedState=Do(t,n,i,r);return}}ye.flags|=e,o.memoizedState=Do(1|t,n,i,r)}function qf(e,t){return Ui(8390656,8,e,t)}function rc(e,t){return Ks(2048,8,e,t)}function Og(e,t){return Ks(4,2,e,t)}function zg(e,t){return Ks(4,4,e,t)}function jg(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 $g(e,t,n){return n=n!=null?n.concat([e]):null,Ks(4,4,jg.bind(null,t,e),n)}function oc(){}function Dg(e,t){var n=st();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ec(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Fg(e,t){var n=st();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ec(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Vg(e,t,n){return zn&21?(wt(n,t)||(n=Yp(),ye.lanes|=n,jn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,He=!0),e.memoizedState=n)}function fE(e,t){var n=ae;ae=n!==0&&4>n?n:4,e(!0);var r=$l.transition;$l.transition={};try{e(!1),t()}finally{ae=n,$l.transition=r}}function Hg(){return st().memoizedState}function dE(e,t,n){var r=cn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Bg(e))Ug(t,n);else if(n=Cg(e,t,n,r),n!==null){var o=je();vt(n,e,r,o),Wg(n,t,r)}}function hE(e,t,n){var r=cn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bg(e))Ug(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,wt(l,s)){var a=t.interleaved;a===null?(o.next=o,Qu(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=Cg(e,t,o,r),n!==null&&(o=je(),vt(n,e,r,o),Wg(n,t,r))}}function Bg(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Ug(e,t){co=ks=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ou(e,n)}}var Ns={readContext:it,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useInsertionEffect:Le,useLayoutEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useMutableSource:Le,useSyncExternalStore:Le,useId:Le,unstable_isNewReconciler:!1},pE={readContext:it,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:qf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ui(4194308,4,jg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ui(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ui(4,2,e,t)},useMemo:function(e,t){var n=St();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=St();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=dE.bind(null,ye,e),[r.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:Zf,useDebugValue:oc,useDeferredValue:function(e){return St().memoizedState=e},useTransition:function(){var e=Zf(!1),t=e[0];return e=fE.bind(null,e[1]),St().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ye,o=St();if(pe){if(n===void 0)throw Error(K(407));n=n()}else{if(n=t(),Ie===null)throw Error(K(349));zn&30||Pg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,qf(bg.bind(null,r,i,e),[e]),r.flags|=2048,Do(9,Tg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=St(),t=Ie.identifierPrefix;if(pe){var n=jt,r=zt;n=(r&~(1<<32-yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=cE++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},gE={readContext:it,useCallback:Dg,useContext:it,useEffect:rc,useImperativeHandle:$g,useInsertionEffect:Og,useLayoutEffect:zg,useMemo:Fg,useReducer:Dl,useRef:Ag,useState:function(){return Dl($o)},useDebugValue:oc,useDeferredValue:function(e){var t=st();return Vg(t,ke.memoizedState,e)},useTransition:function(){var e=Dl($o)[0],t=st().memoizedState;return[e,t]},useMutableSource:Mg,useSyncExternalStore:Ig,useId:Hg,unstable_isNewReconciler:!1},mE={readContext:it,useCallback:Dg,useContext:it,useEffect:rc,useImperativeHandle:$g,useInsertionEffect:Og,useLayoutEffect:zg,useMemo:Fg,useReducer:Fl,useRef:Ag,useState:function(){return Fl($o)},useDebugValue:oc,useDeferredValue:function(e){var t=st();return ke===null?t.memoizedState=e:Vg(t,ke.memoizedState,e)},useTransition:function(){var e=Fl($o)[0],t=st().memoizedState;return[e,t]},useMutableSource:Mg,useSyncExternalStore:Ig,useId:Hg,unstable_isNewReconciler:!1};function ut(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Fa(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zs={isMounted:function(e){return(e=e._reactInternals)?Hn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=je(),o=cn(e),i=$t(r,o);i.payload=t,n!=null&&(i.callback=n),t=an(e,i,o),t!==null&&(vt(t,e,o,r),Hi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=je(),o=cn(e),i=$t(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=an(e,i,o),t!==null&&(vt(t,e,o,r),Hi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=je(),r=cn(e),o=$t(n,r);o.tag=2,t!=null&&(o.callback=t),t=an(e,o,r),t!==null&&(vt(t,e,r,n),Hi(t,e,r))}};function Jf(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!bo(n,r)||!bo(o,i):!0}function Yg(e,t,n){var r=!1,o=hn,i=t.contextType;return typeof i=="object"&&i!==null?i=it(i):(o=Ue(t)?An:Oe.current,r=t.contextTypes,i=(r=r!=null)?Sr(e,o):hn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ed(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&&Zs.enqueueReplaceState(t,t.state,null)}function Va(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ku(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=it(i):(i=Ue(t)?An:Oe.current,o.context=Sr(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Fa(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&&Zs.enqueueReplaceState(o,o.state,null),Ss(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Mr(e,t){try{var n="",r=t;do n+=Ux(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
56
|
-
Error generating stack: `+i.message+`
|
|
57
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Vl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ha(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var yE=typeof WeakMap=="function"?WeakMap:Map;function Xg(e,t,n){n=$t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Is||(Is=!0,qa=r),Ha(e,t)},n}function Gg(e,t,n){n=$t(-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(){Ha(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Ha(e,t),typeof r!="function"&&(un===null?un=new Set([this]):un.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function td(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new yE;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=bE.bind(null,e,t,n),t.then(e,e))}function nd(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 rd(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$t(-1,1),t.tag=2,an(n,t,1))),n.lanes|=1),e)}var vE=Yt.ReactCurrentOwner,He=!1;function ze(e,t,n,r){t.child=e===null?Sg(t,null,n,r):kr(t,e.child,n,r)}function od(e,t,n,r,o){n=n.render;var i=t.ref;return dr(t,o),r=tc(e,t,n,r,i,o),n=nc(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ut(e,t,o)):(pe&&n&&Bu(t),t.flags|=1,ze(e,t,r,o),t.child)}function id(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!dc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Qg(e,t,i,r,o)):(e=Gi(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)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:bo,n(s,r)&&e.ref===t.ref)return Ut(e,t,o)}return t.flags|=1,e=fn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Qg(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(bo(i,r)&&e.ref===t.ref)if(He=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(He=!0);else return t.lanes=e.lanes,Ut(e,t,o)}return Ba(e,t,n,r,o)}function Kg(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ce(or,Ye),Ye|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ce(or,Ye),Ye|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ce(or,Ye),Ye|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ce(or,Ye),Ye|=r;return ze(e,t,o,n),t.child}function Zg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ba(e,t,n,r,o){var i=Ue(n)?An:Oe.current;return i=Sr(t,i),dr(t,o),n=tc(e,t,n,r,i,o),r=nc(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ut(e,t,o)):(pe&&r&&Bu(t),t.flags|=1,ze(e,t,n,o),t.child)}function sd(e,t,n,r,o){if(Ue(n)){var i=!0;vs(t)}else i=!1;if(dr(t,o),t.stateNode===null)Wi(e,t),Yg(t,n,r),Va(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=it(u):(u=Ue(n)?An:Oe.current,u=Sr(t,u));var f=n.getDerivedStateFromProps,c=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";c||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&ed(t,s,r,u),Zt=!1;var d=t.memoizedState;s.state=d,Ss(t,r,s,o),a=t.memoizedState,l!==r||d!==a||Be.current||Zt?(typeof f=="function"&&(Fa(t,n,f,r),a=t.memoizedState),(l=Zt||Jf(t,n,l,r,d,a,u))?(c||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,kg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ut(t.type,l),s.props=u,c=t.pendingProps,d=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=it(a):(a=Ue(n)?An:Oe.current,a=Sr(t,a));var h=n.getDerivedStateFromProps;(f=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==c||d!==a)&&ed(t,s,r,a),Zt=!1,d=t.memoizedState,s.state=d,Ss(t,r,s,o);var y=t.memoizedState;l!==c||d!==y||Be.current||Zt?(typeof h=="function"&&(Fa(t,n,h,r),y=t.memoizedState),(u=Zt||Jf(t,n,u,r,d,y,a)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Ua(e,t,n,r,i,o)}function Ua(e,t,n,r,o,i){Zg(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Wf(t,n,!1),Ut(e,t,i);r=t.stateNode,vE.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=kr(t,e.child,null,i),t.child=kr(t,null,l,i)):ze(e,t,l,i),t.memoizedState=r.state,o&&Wf(t,n,!0),t.child}function qg(e){var t=e.stateNode;t.pendingContext?Uf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Uf(e,t.context,!1),Zu(e,t.containerInfo)}function ld(e,t,n,r,o){return Cr(),Wu(o),t.flags|=256,ze(e,t,n,r),t.child}var Wa={dehydrated:null,treeContext:null,retryLane:0};function Ya(e){return{baseLanes:e,cachePool:null,transitions:null}}function Jg(e,t,n){var r=t.pendingProps,o=me.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ce(me,o&1),e===null)return $a(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=el(s,r,0,null),e=Pn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ya(n),t.memoizedState=Wa,e):ic(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return wE(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=fn(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=fn(l,i):(i=Pn(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Ya(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Wa,r}return i=e.child,e=i.sibling,r=fn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(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 ic(e,t){return t=el({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Si(e,t,n,r){return r!==null&&Wu(r),kr(t,e.child,null,n),e=ic(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wE(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Vl(Error(K(422))),Si(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=el({mode:"visible",children:r.children},o,0,null),i=Pn(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&kr(t,e.child,null,s),t.child.memoizedState=Ya(s),t.memoizedState=Wa,i);if(!(t.mode&1))return Si(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(K(419)),r=Vl(i,r,void 0),Si(e,t,s,r)}if(l=(s&e.childLanes)!==0,He||l){if(r=Ie,r!==null){switch(s&-s){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|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Bt(e,o),vt(r,e,o,-1))}return fc(),r=Vl(Error(K(421))),Si(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=LE.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ge=ln(o.nextSibling),Qe=t,pe=!0,ht=null,e!==null&&(tt[nt++]=zt,tt[nt++]=jt,tt[nt++]=On,zt=e.id,jt=e.overflow,On=t),t=ic(t,r.children),t.flags|=4096,t)}function ad(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Da(e.return,t,n)}function Hl(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 em(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ze(e,t,r.children,n),r=me.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ad(e,n,t);else if(e.tag===19)ad(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(ce(me,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Cs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Hl(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&&Cs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Hl(t,!0,n,null,i);break;case"together":Hl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Wi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ut(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),jn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(K(153));if(t.child!==null){for(e=t.child,n=fn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xE(e,t,n){switch(t.tag){case 3:qg(t),Cr();break;case 5:Ng(t);break;case 1:Ue(t.type)&&vs(t);break;case 4:Zu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ce(Es,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ce(me,me.current&1),t.flags|=128,null):n&t.child.childLanes?Jg(e,t,n):(ce(me,me.current&1),e=Ut(e,t,n),e!==null?e.sibling:null);ce(me,me.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return em(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ce(me,me.current),r)break;return null;case 22:case 23:return t.lanes=0,Kg(e,t,n)}return Ut(e,t,n)}var tm,Xa,nm,rm;tm=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}};Xa=function(){};nm=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,kn(It.current);var i=null;switch(n){case"input":o=ga(e,o),r=ga(e,r),i=[];break;case"select":o=ve({},o,{value:void 0}),r=ve({},r,{value:void 0}),i=[];break;case"textarea":o=va(e,o),r=va(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ms)}xa(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Co.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Co.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&fe("scroll",e),i||l===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};rm=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xr(e,t){if(!pe)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 Re(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 EE(e,t,n){var r=t.pendingProps;switch(Uu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return Ue(t.type)&&ys(),Re(t),null;case 3:return r=t.stateNode,Nr(),de(Be),de(Oe),Ju(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ei(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ht!==null&&(tu(ht),ht=null))),Xa(e,t),Re(t),null;case 5:qu(t);var o=kn(zo.current);if(n=t.type,e!==null&&t.stateNode!=null)nm(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(K(166));return Re(t),null}if(e=kn(It.current),Ei(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[kt]=t,r[Ao]=i,e=(t.mode&1)!==0,n){case"dialog":fe("cancel",r),fe("close",r);break;case"iframe":case"object":case"embed":fe("load",r);break;case"video":case"audio":for(o=0;o<to.length;o++)fe(to[o],r);break;case"source":fe("error",r);break;case"img":case"image":case"link":fe("error",r),fe("load",r);break;case"details":fe("toggle",r);break;case"input":yf(r,i),fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},fe("invalid",r);break;case"textarea":wf(r,i),fe("invalid",r)}xa(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];s==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&xi(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&xi(r.textContent,l,e),o=["children",""+l]):Co.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&fe("scroll",r)}switch(n){case"input":di(r),vf(r,i,!0);break;case"textarea":di(r),xf(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ms)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=bp(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[kt]=t,e[Ao]=r,tm(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ea(n,r),n){case"dialog":fe("cancel",e),fe("close",e),o=r;break;case"iframe":case"object":case"embed":fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<to.length;o++)fe(to[o],e);o=r;break;case"source":fe("error",e),o=r;break;case"img":case"image":case"link":fe("error",e),fe("load",e),o=r;break;case"details":fe("toggle",e),o=r;break;case"input":yf(e,r),o=ga(e,r),fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ve({},r,{value:void 0}),fe("invalid",e);break;case"textarea":wf(e,r),o=va(e,r),fe("invalid",e);break;default:o=r}xa(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var a=l[i];i==="style"?Ap(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Lp(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"&&(Co.hasOwnProperty(i)?a!=null&&i==="onScroll"&&fe("scroll",e):a!=null&&Pu(e,i,a,s))}switch(n){case"input":di(e),vf(e,r,!1);break;case"textarea":di(e),xf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+dn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ar(e,!!r.multiple,i,!1):r.defaultValue!=null&&ar(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ms)}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 Re(t),null;case 6:if(e&&t.stateNode!=null)rm(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(K(166));if(n=kn(zo.current),kn(It.current),Ei(t)){if(r=t.stateNode,n=t.memoizedProps,r[kt]=t,(i=r.nodeValue!==n)&&(e=Qe,e!==null))switch(e.tag){case 3:xi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&xi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[kt]=t,t.stateNode=r}return Re(t),null;case 13:if(de(me),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(pe&&Ge!==null&&t.mode&1&&!(t.flags&128))Eg(),Cr(),t.flags|=98560,i=!1;else if(i=Ei(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(K(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(K(317));i[kt]=t}else Cr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),i=!1}else ht!==null&&(tu(ht),ht=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||me.current&1?Ne===0&&(Ne=3):fc())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return Nr(),Xa(e,t),e===null&&Lo(t.stateNode.containerInfo),Re(t),null;case 10:return Gu(t.type._context),Re(t),null;case 17:return Ue(t.type)&&ys(),Re(t),null;case 19:if(de(me),i=t.memoizedState,i===null)return Re(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Xr(i,!1);else{if(Ne!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Cs(e),s!==null){for(t.flags|=128,Xr(i,!1),r=s.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,s=i.alternate,s===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=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ce(me,me.current&1|2),t.child}e=e.sibling}i.tail!==null&&xe()>Ir&&(t.flags|=128,r=!0,Xr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Cs(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!pe)return Re(t),null}else 2*xe()-i.renderingStartTime>Ir&&n!==1073741824&&(t.flags|=128,r=!0,Xr(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=xe(),t.sibling=null,n=me.current,ce(me,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return cc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ye&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function _E(e,t){switch(Uu(t),t.tag){case 1:return Ue(t.type)&&ys(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nr(),de(Be),de(Oe),Ju(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qu(t),null;case 13:if(de(me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));Cr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(me),null;case 4:return Nr(),null;case 10:return Gu(t.type._context),null;case 22:case 23:return cc(),null;case 24:return null;default:return null}}var Ci=!1,Ae=!1,SE=typeof WeakSet=="function"?WeakSet:Set,q=null;function rr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function Ga(e,t,n){try{n()}catch(r){we(e,t,r)}}var ud=!1;function CE(e,t){if(ba=hs,e=ag(),Hu(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 s=0,l=-1,a=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||o!==0&&c.nodeType!==3||(l=s+o),c!==i||r!==0&&c.nodeType!==3||(a=s+r),c.nodeType===3&&(s+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===o&&(l=s),d===i&&++f===r&&(a=s),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(La={focusedElem:e,selectionRange:n},hs=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var w=y.memoizedProps,x=y.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:ut(t.type,w),x);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(v){we(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return y=ud,ud=!1,y}function fo(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&&Ga(t,n,i)}o=o.next}while(o!==r)}}function qs(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 Qa(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function om(e){var t=e.alternate;t!==null&&(e.alternate=null,om(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[kt],delete t[Ao],delete t[Oa],delete t[sE],delete t[lE])),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 im(e){return e.tag===5||e.tag===3||e.tag===4}function cd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||im(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 Ka(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=ms));else if(r!==4&&(e=e.child,e!==null))for(Ka(e,t,n),e=e.sibling;e!==null;)Ka(e,t,n),e=e.sibling}function Za(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(Za(e,t,n),e=e.sibling;e!==null;)Za(e,t,n),e=e.sibling}var Pe=null,dt=!1;function Qt(e,t,n){for(n=n.child;n!==null;)sm(e,t,n),n=n.sibling}function sm(e,t,n){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Us,n)}catch{}switch(n.tag){case 5:Ae||rr(n,t);case 6:var r=Pe,o=dt;Pe=null,Qt(e,t,n),Pe=r,dt=o,Pe!==null&&(dt?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(dt?(e=Pe,n=n.stateNode,e.nodeType===8?Ol(e.parentNode,n):e.nodeType===1&&Ol(e,n),Po(e)):Ol(Pe,n.stateNode));break;case 4:r=Pe,o=dt,Pe=n.stateNode.containerInfo,dt=!0,Qt(e,t,n),Pe=r,dt=o;break;case 0:case 11:case 14:case 15:if(!Ae&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Ga(n,t,s),o=o.next}while(o!==r)}Qt(e,t,n);break;case 1:if(!Ae&&(rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){we(n,t,l)}Qt(e,t,n);break;case 21:Qt(e,t,n);break;case 22:n.mode&1?(Ae=(r=Ae)||n.memoizedState!==null,Qt(e,t,n),Ae=r):Qt(e,t,n);break;default:Qt(e,t,n)}}function fd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new SE),t.forEach(function(r){var o=RE.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function at(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,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:Pe=l.stateNode,dt=!1;break e;case 3:Pe=l.stateNode.containerInfo,dt=!0;break e;case 4:Pe=l.stateNode.containerInfo,dt=!0;break e}l=l.return}if(Pe===null)throw Error(K(160));sm(i,s,o),Pe=null,dt=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){we(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)lm(t,e),t=t.sibling}function lm(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(at(t,e),_t(e),r&4){try{fo(3,e,e.return),qs(3,e)}catch(w){we(e,e.return,w)}try{fo(5,e,e.return)}catch(w){we(e,e.return,w)}}break;case 1:at(t,e),_t(e),r&512&&n!==null&&rr(n,n.return);break;case 5:if(at(t,e),_t(e),r&512&&n!==null&&rr(n,n.return),e.flags&32){var o=e.stateNode;try{ko(o,"")}catch(w){we(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&Pp(o,i),Ea(l,s);var u=Ea(l,i);for(s=0;s<a.length;s+=2){var f=a[s],c=a[s+1];f==="style"?Ap(o,c):f==="dangerouslySetInnerHTML"?Lp(o,c):f==="children"?ko(o,c):Pu(o,f,c,u)}switch(l){case"input":ma(o,i);break;case"textarea":Tp(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?ar(o,!!i.multiple,h,!1):d!==!!i.multiple&&(i.defaultValue!=null?ar(o,!!i.multiple,i.defaultValue,!0):ar(o,!!i.multiple,i.multiple?[]:"",!1))}o[Ao]=i}catch(w){we(e,e.return,w)}}break;case 6:if(at(t,e),_t(e),r&4){if(e.stateNode===null)throw Error(K(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){we(e,e.return,w)}}break;case 3:if(at(t,e),_t(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Po(t.containerInfo)}catch(w){we(e,e.return,w)}break;case 4:at(t,e),_t(e);break;case 13:at(t,e),_t(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(ac=xe())),r&4&&fd(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Ae=(u=Ae)||f,at(t,e),Ae=u):at(t,e),_t(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(q=e,f=e.child;f!==null;){for(c=q=f;q!==null;){switch(d=q,h=d.child,d.tag){case 0:case 11:case 14:case 15:fo(4,d,d.return);break;case 1:rr(d,d.return);var y=d.stateNode;if(typeof y.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(w){we(r,n,w)}}break;case 5:rr(d,d.return);break;case 22:if(d.memoizedState!==null){hd(c);continue}}h!==null?(h.return=d,q=h):hd(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{o=c.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=c.stateNode,a=c.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Rp("display",s))}catch(w){we(e,e.return,w)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(w){we(e,e.return,w)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:at(t,e),_t(e),r&4&&fd(e);break;case 21:break;default:at(t,e),_t(e)}}function _t(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(im(n)){var r=n;break e}n=n.return}throw Error(K(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ko(o,""),r.flags&=-33);var i=cd(e);Za(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=cd(e);Ka(e,l,s);break;default:throw Error(K(161))}}catch(a){we(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kE(e,t,n){q=e,am(e)}function am(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Ci;if(!s){var l=o.alternate,a=l!==null&&l.memoizedState!==null||Ae;l=Ci;var u=Ae;if(Ci=s,(Ae=a)&&!u)for(q=o;q!==null;)s=q,a=s.child,s.tag===22&&s.memoizedState!==null?pd(o):a!==null?(a.return=s,q=a):pd(o);for(;i!==null;)q=i,am(i),i=i.sibling;q=o,Ci=l,Ae=u}dd(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,q=i):dd(e)}}function dd(e){for(;q!==null;){var t=q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ae||qs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ae)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:ut(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Kf(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Kf(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;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 f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&Po(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(K(163))}Ae||t.flags&512&&Qa(t)}catch(d){we(t,t.return,d)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function hd(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function pd(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{qs(4,t)}catch(a){we(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){we(t,o,a)}}var i=t.return;try{Qa(t)}catch(a){we(t,i,a)}break;case 5:var s=t.return;try{Qa(t)}catch(a){we(t,s,a)}}}catch(a){we(t,t.return,a)}if(t===e){q=null;break}var l=t.sibling;if(l!==null){l.return=t.return,q=l;break}q=t.return}}var NE=Math.ceil,Ms=Yt.ReactCurrentDispatcher,sc=Yt.ReactCurrentOwner,ot=Yt.ReactCurrentBatchConfig,le=0,Ie=null,Ee=null,Te=0,Ye=0,or=mn(0),Ne=0,Fo=null,jn=0,Js=0,lc=0,ho=null,Fe=null,ac=0,Ir=1/0,Rt=null,Is=!1,qa=null,un=null,ki=!1,nn=null,Ps=0,po=0,Ja=null,Yi=-1,Xi=0;function je(){return le&6?xe():Yi!==-1?Yi:Yi=xe()}function cn(e){return e.mode&1?le&2&&Te!==0?Te&-Te:uE.transition!==null?(Xi===0&&(Xi=Yp()),Xi):(e=ae,e!==0||(e=window.event,e=e===void 0?16:Jp(e.type)),e):1}function vt(e,t,n,r){if(50<po)throw po=0,Ja=null,Error(K(185));Qo(e,n,r),(!(le&2)||e!==Ie)&&(e===Ie&&(!(le&2)&&(Js|=n),Ne===4&&en(e,Te)),We(e,r),n===1&&le===0&&!(t.mode&1)&&(Ir=xe()+500,Qs&&yn()))}function We(e,t){var n=e.callbackNode;u3(e,t);var r=ds(e,e===Ie?Te:0);if(r===0)n!==null&&Sf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Sf(n),t===1)e.tag===0?aE(gd.bind(null,e)):vg(gd.bind(null,e)),oE(function(){!(le&6)&&yn()}),n=null;else{switch(Xp(r)){case 1:n=Au;break;case 4:n=Up;break;case 16:n=fs;break;case 536870912:n=Wp;break;default:n=fs}n=mm(n,um.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function um(e,t){if(Yi=-1,Xi=0,le&6)throw Error(K(327));var n=e.callbackNode;if(hr()&&e.callbackNode!==n)return null;var r=ds(e,e===Ie?Te:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ts(e,r);else{t=r;var o=le;le|=2;var i=fm();(Ie!==e||Te!==t)&&(Rt=null,Ir=xe()+500,In(e,t));do try{PE();break}catch(l){cm(e,l)}while(!0);Xu(),Ms.current=i,le=o,Ee!==null?t=0:(Ie=null,Te=0,t=Ne)}if(t!==0){if(t===2&&(o=Na(e),o!==0&&(r=o,t=eu(e,o))),t===1)throw n=Fo,In(e,0),en(e,r),We(e,xe()),n;if(t===6)en(e,r);else{if(o=e.current.alternate,!(r&30)&&!ME(o)&&(t=Ts(e,r),t===2&&(i=Na(e),i!==0&&(r=i,t=eu(e,i))),t===1))throw n=Fo,In(e,0),en(e,r),We(e,xe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(K(345));case 2:xn(e,Fe,Rt);break;case 3:if(en(e,r),(r&130023424)===r&&(t=ac+500-xe(),10<t)){if(ds(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){je(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Aa(xn.bind(null,e,Fe,Rt),t);break}xn(e,Fe,Rt);break;case 4:if(en(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-yt(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*NE(r/1960))-r,10<r){e.timeoutHandle=Aa(xn.bind(null,e,Fe,Rt),r);break}xn(e,Fe,Rt);break;case 5:xn(e,Fe,Rt);break;default:throw Error(K(329))}}}return We(e,xe()),e.callbackNode===n?um.bind(null,e):null}function eu(e,t){var n=ho;return e.current.memoizedState.isDehydrated&&(In(e,t).flags|=256),e=Ts(e,t),e!==2&&(t=Fe,Fe=n,t!==null&&tu(t)),e}function tu(e){Fe===null?Fe=e:Fe.push.apply(Fe,e)}function ME(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(!wt(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 en(e,t){for(t&=~lc,t&=~Js,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-yt(t),r=1<<n;e[n]=-1,t&=~r}}function gd(e){if(le&6)throw Error(K(327));hr();var t=ds(e,0);if(!(t&1))return We(e,xe()),null;var n=Ts(e,t);if(e.tag!==0&&n===2){var r=Na(e);r!==0&&(t=r,n=eu(e,r))}if(n===1)throw n=Fo,In(e,0),en(e,t),We(e,xe()),n;if(n===6)throw Error(K(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xn(e,Fe,Rt),We(e,xe()),null}function uc(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(Ir=xe()+500,Qs&&yn())}}function $n(e){nn!==null&&nn.tag===0&&!(le&6)&&hr();var t=le;le|=1;var n=ot.transition,r=ae;try{if(ot.transition=null,ae=1,e)return e()}finally{ae=r,ot.transition=n,le=t,!(le&6)&&yn()}}function cc(){Ye=or.current,de(or)}function In(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,rE(n)),Ee!==null)for(n=Ee.return;n!==null;){var r=n;switch(Uu(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ys();break;case 3:Nr(),de(Be),de(Oe),Ju();break;case 5:qu(r);break;case 4:Nr();break;case 13:de(me);break;case 19:de(me);break;case 10:Gu(r.type._context);break;case 22:case 23:cc()}n=n.return}if(Ie=e,Ee=e=fn(e.current,null),Te=Ye=t,Ne=0,Fo=null,lc=Js=jn=0,Fe=ho=null,Cn!==null){for(t=0;t<Cn.length;t++)if(n=Cn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Cn=null}return e}function cm(e,t){do{var n=Ee;try{if(Xu(),Bi.current=Ns,ks){for(var r=ye.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ks=!1}if(zn=0,Me=ke=ye=null,co=!1,jo=0,sc.current=null,n===null||n.return===null){Ne=1,Fo=t,Ee=null;break}e:{var i=e,s=n.return,l=n,a=t;if(t=Te,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,f=l,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=nd(s);if(h!==null){h.flags&=-257,rd(h,s,l,i,t),h.mode&1&&td(i,u,t),t=h,a=u;var y=t.updateQueue;if(y===null){var w=new Set;w.add(a),t.updateQueue=w}else y.add(a);break e}else{if(!(t&1)){td(i,u,t),fc();break e}a=Error(K(426))}}else if(pe&&l.mode&1){var x=nd(s);if(x!==null){!(x.flags&65536)&&(x.flags|=256),rd(x,s,l,i,t),Wu(Mr(a,l));break e}}i=a=Mr(a,l),Ne!==4&&(Ne=2),ho===null?ho=[i]:ho.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=Xg(i,a,t);Qf(i,m);break e;case 1:l=a;var g=i.type,p=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(un===null||!un.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var v=Gg(i,l,t);Qf(i,v);break e}}i=i.return}while(i!==null)}hm(n)}catch(_){t=_,Ee===n&&n!==null&&(Ee=n=n.return);continue}break}while(!0)}function fm(){var e=Ms.current;return Ms.current=Ns,e===null?Ns:e}function fc(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Ie===null||!(jn&268435455)&&!(Js&268435455)||en(Ie,Te)}function Ts(e,t){var n=le;le|=2;var r=fm();(Ie!==e||Te!==t)&&(Rt=null,In(e,t));do try{IE();break}catch(o){cm(e,o)}while(!0);if(Xu(),le=n,Ms.current=r,Ee!==null)throw Error(K(261));return Ie=null,Te=0,Ne}function IE(){for(;Ee!==null;)dm(Ee)}function PE(){for(;Ee!==null&&!e3();)dm(Ee)}function dm(e){var t=gm(e.alternate,e,Ye);e.memoizedProps=e.pendingProps,t===null?hm(e):Ee=t,sc.current=null}function hm(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_E(n,t),n!==null){n.flags&=32767,Ee=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,Ee=null;return}}else if(n=EE(n,t,Ye),n!==null){Ee=n;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);Ne===0&&(Ne=5)}function xn(e,t,n){var r=ae,o=ot.transition;try{ot.transition=null,ae=1,TE(e,t,n,r)}finally{ot.transition=o,ae=r}return null}function TE(e,t,n,r){do hr();while(nn!==null);if(le&6)throw Error(K(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(K(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(c3(e,i),e===Ie&&(Ee=Ie=null,Te=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ki||(ki=!0,mm(fs,function(){return hr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=ot.transition,ot.transition=null;var s=ae;ae=1;var l=le;le|=4,sc.current=null,CE(e,n),lm(n,e),K3(La),hs=!!ba,La=ba=null,e.current=n,kE(n),t3(),le=l,ae=s,ot.transition=i}else e.current=n;if(ki&&(ki=!1,nn=e,Ps=o),i=e.pendingLanes,i===0&&(un=null),o3(n.stateNode),We(e,xe()),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(Is)throw Is=!1,e=qa,qa=null,e;return Ps&1&&e.tag!==0&&hr(),i=e.pendingLanes,i&1?e===Ja?po++:(po=0,Ja=e):po=0,yn(),null}function hr(){if(nn!==null){var e=Xp(Ps),t=ot.transition,n=ae;try{if(ot.transition=null,ae=16>e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Ps=0,le&6)throw Error(K(331));var o=le;for(le|=4,q=e.current;q!==null;){var i=q,s=i.child;if(q.flags&16){var l=i.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(q=u;q!==null;){var f=q;switch(f.tag){case 0:case 11:case 15:fo(8,f,i)}var c=f.child;if(c!==null)c.return=f,q=c;else for(;q!==null;){f=q;var d=f.sibling,h=f.return;if(om(f),f===u){q=null;break}if(d!==null){d.return=h,q=d;break}q=h}}}var y=i.alternate;if(y!==null){var w=y.child;if(w!==null){y.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}q=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,q=s;else e:for(;q!==null;){if(i=q,i.flags&2048)switch(i.tag){case 0:case 11:case 15:fo(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,q=m;break e}q=i.return}}var g=e.current;for(q=g;q!==null;){s=q;var p=s.child;if(s.subtreeFlags&2064&&p!==null)p.return=s,q=p;else e:for(s=g;q!==null;){if(l=q,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:qs(9,l)}}catch(_){we(l,l.return,_)}if(l===s){q=null;break e}var v=l.sibling;if(v!==null){v.return=l.return,q=v;break e}q=l.return}}if(le=o,yn(),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Us,e)}catch{}r=!0}return r}finally{ae=n,ot.transition=t}}return!1}function md(e,t,n){t=Mr(n,t),t=Xg(e,t,1),e=an(e,t,1),t=je(),e!==null&&(Qo(e,1,t),We(e,t))}function we(e,t,n){if(e.tag===3)md(e,e,n);else for(;t!==null;){if(t.tag===3){md(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(un===null||!un.has(r))){e=Mr(n,e),e=Gg(t,e,1),t=an(t,e,1),e=je(),t!==null&&(Qo(t,1,e),We(t,e));break}}t=t.return}}function bE(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=je(),e.pingedLanes|=e.suspendedLanes&n,Ie===e&&(Te&n)===n&&(Ne===4||Ne===3&&(Te&130023424)===Te&&500>xe()-ac?In(e,0):lc|=n),We(e,t)}function pm(e,t){t===0&&(e.mode&1?(t=gi,gi<<=1,!(gi&130023424)&&(gi=4194304)):t=1);var n=je();e=Bt(e,t),e!==null&&(Qo(e,t,n),We(e,n))}function LE(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pm(e,n)}function RE(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(K(314))}r!==null&&r.delete(t),pm(e,n)}var gm;gm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Be.current)He=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return He=!1,xE(e,t,n);He=!!(e.flags&131072)}else He=!1,pe&&t.flags&1048576&&wg(t,xs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Wi(e,t),e=t.pendingProps;var o=Sr(t,Oe.current);dr(t,n),o=tc(null,t,r,e,o,n);var i=nc();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,Ue(r)?(i=!0,vs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ku(t),o.updater=Zs,t.stateNode=o,o._reactInternals=t,Va(t,r,e,n),t=Ua(null,t,r,!0,i,n)):(t.tag=0,pe&&i&&Bu(t),ze(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Wi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=OE(r),e=ut(r,e),o){case 0:t=Ba(null,t,r,e,n);break e;case 1:t=sd(null,t,r,e,n);break e;case 11:t=od(null,t,r,e,n);break e;case 14:t=id(null,t,r,ut(r.type,e),n);break e}throw Error(K(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),Ba(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),sd(e,t,r,o,n);case 3:e:{if(qg(t),e===null)throw Error(K(387));r=t.pendingProps,i=t.memoizedState,o=i.element,kg(e,t),Ss(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Mr(Error(K(423)),t),t=ld(e,t,r,n,o);break e}else if(r!==o){o=Mr(Error(K(424)),t),t=ld(e,t,r,n,o);break e}else for(Ge=ln(t.stateNode.containerInfo.firstChild),Qe=t,pe=!0,ht=null,n=Sg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Cr(),r===o){t=Ut(e,t,n);break e}ze(e,t,r,n)}t=t.child}return t;case 5:return Ng(t),e===null&&$a(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Ra(r,o)?s=null:i!==null&&Ra(r,i)&&(t.flags|=32),Zg(e,t),ze(e,t,s,n),t.child;case 6:return e===null&&$a(t),null;case 13:return Jg(e,t,n);case 4:return Zu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=kr(t,null,r,n):ze(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),od(e,t,r,o,n);case 7:return ze(e,t,t.pendingProps,n),t.child;case 8:return ze(e,t,t.pendingProps.children,n),t.child;case 12:return ze(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,ce(Es,r._currentValue),r._currentValue=s,i!==null)if(wt(i.value,s)){if(i.children===o.children&&!Be.current){t=Ut(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=$t(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Da(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(K(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Da(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}ze(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,dr(t,n),o=it(o),r=r(o),t.flags|=1,ze(e,t,r,n),t.child;case 14:return r=t.type,o=ut(r,t.pendingProps),o=ut(r.type,o),id(e,t,r,o,n);case 15:return Qg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:ut(r,o),Wi(e,t),t.tag=1,Ue(r)?(e=!0,vs(t)):e=!1,dr(t,n),Yg(t,r,o),Va(t,r,o,n),Ua(null,t,r,!0,e,n);case 19:return em(e,t,n);case 22:return Kg(e,t,n)}throw Error(K(156,t.tag))};function mm(e,t){return Bp(e,t)}function AE(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 rt(e,t,n,r){return new AE(e,t,n,r)}function dc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OE(e){if(typeof e=="function")return dc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===bu)return 11;if(e===Lu)return 14}return 2}function fn(e,t){var n=e.alternate;return n===null?(n=rt(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 Gi(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")dc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Gn:return Pn(n.children,o,i,t);case Tu:s=8,o|=8;break;case fa:return e=rt(12,n,t,o|2),e.elementType=fa,e.lanes=i,e;case da:return e=rt(13,n,t,o),e.elementType=da,e.lanes=i,e;case ha:return e=rt(19,n,t,o),e.elementType=ha,e.lanes=i,e;case Np:return el(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Cp:s=10;break e;case kp:s=9;break e;case bu:s=11;break e;case Lu:s=14;break e;case Kt:s=16,r=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=rt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Pn(e,t,n,r){return e=rt(7,e,r,t),e.lanes=n,e}function el(e,t,n,r){return e=rt(22,e,r,t),e.elementType=Np,e.lanes=n,e.stateNode={isHidden:!1},e}function Bl(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function Ul(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zE(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=Cl(0),this.expirationTimes=Cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function hc(e,t,n,r,o,i,s,l,a){return e=new zE(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=rt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ku(i),e}function jE(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ym(e){if(!e)return hn;e=e._reactInternals;e:{if(Hn(e)!==e||e.tag!==1)throw Error(K(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ue(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(K(171))}if(e.tag===1){var n=e.type;if(Ue(n))return yg(e,n,t)}return t}function vm(e,t,n,r,o,i,s,l,a){return e=hc(n,r,!0,e,o,i,s,l,a),e.context=ym(null),n=e.current,r=je(),o=cn(n),i=$t(r,o),i.callback=t??null,an(n,i,o),e.current.lanes=o,Qo(e,o,r),We(e,r),e}function tl(e,t,n,r){var o=t.current,i=je(),s=cn(o);return n=ym(n),t.context===null?t.context=n:t.pendingContext=n,t=$t(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=an(o,t,s),e!==null&&(vt(e,o,s,i),Hi(e,o,s)),s}function bs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function yd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pc(e,t){yd(e,t),(e=e.alternate)&&yd(e,t)}function $E(){return null}var wm=typeof reportError=="function"?reportError:function(e){console.error(e)};function gc(e){this._internalRoot=e}nl.prototype.render=gc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(K(409));tl(e,t,null,null)};nl.prototype.unmount=gc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;$n(function(){tl(null,e,null,null)}),t[Ht]=null}};function nl(e){this._internalRoot=e}nl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Jt.length&&t!==0&&t<Jt[n].priority;n++);Jt.splice(n,0,e),n===0&&qp(e)}};function mc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function rl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vd(){}function DE(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=bs(s);i.call(u)}}var s=vm(t,r,e,0,null,!1,!1,"",vd);return e._reactRootContainer=s,e[Ht]=s.current,Lo(e.nodeType===8?e.parentNode:e),$n(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=bs(a);l.call(u)}}var a=hc(e,0,!1,null,null,!1,!1,"",vd);return e._reactRootContainer=a,e[Ht]=a.current,Lo(e.nodeType===8?e.parentNode:e),$n(function(){tl(t,a,n,r)}),a}function ol(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var l=o;o=function(){var a=bs(s);l.call(a)}}tl(t,s,e,o)}else s=DE(n,t,e,o,r);return bs(s)}Gp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=eo(t.pendingLanes);n!==0&&(Ou(t,n|1),We(t,xe()),!(le&6)&&(Ir=xe()+500,yn()))}break;case 13:$n(function(){var r=Bt(e,1);if(r!==null){var o=je();vt(r,e,1,o)}}),pc(e,1)}};zu=function(e){if(e.tag===13){var t=Bt(e,134217728);if(t!==null){var n=je();vt(t,e,134217728,n)}pc(e,134217728)}};Qp=function(e){if(e.tag===13){var t=cn(e),n=Bt(e,t);if(n!==null){var r=je();vt(n,e,t,r)}pc(e,t)}};Kp=function(){return ae};Zp=function(e,t){var n=ae;try{return ae=e,t()}finally{ae=n}};Sa=function(e,t,n){switch(t){case"input":if(ma(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=Gs(r);if(!o)throw Error(K(90));Ip(r),ma(r,o)}}}break;case"textarea":Tp(e,n);break;case"select":t=n.value,t!=null&&ar(e,!!n.multiple,t,!1)}};jp=uc;$p=$n;var FE={usingClientEntryPoint:!1,Events:[Zo,qn,Gs,Op,zp,uc]},Gr={findFiberByHostInstance:Sn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},VE={bundleType:Gr.bundleType,version:Gr.version,rendererPackageName:Gr.rendererPackageName,rendererConfig:Gr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Vp(e),e===null?null:e.stateNode},findFiberByHostInstance:Gr.findFiberByHostInstance||$E,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ni=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ni.isDisabled&&Ni.supportsFiber)try{Us=Ni.inject(VE),Mt=Ni}catch{}}qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=FE;qe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mc(t))throw Error(K(200));return jE(e,t,null,n)};qe.createRoot=function(e,t){if(!mc(e))throw Error(K(299));var n=!1,r="",o=wm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=hc(e,1,!1,null,null,n,!1,r,o),e[Ht]=t.current,Lo(e.nodeType===8?e.parentNode:e),new gc(t)};qe.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(K(188)):(e=Object.keys(e).join(","),Error(K(268,e)));return e=Vp(t),e=e===null?null:e.stateNode,e};qe.flushSync=function(e){return $n(e)};qe.hydrate=function(e,t,n){if(!rl(t))throw Error(K(200));return ol(null,e,t,!0,n)};qe.hydrateRoot=function(e,t,n){if(!mc(e))throw Error(K(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=wm;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=vm(t,null,e,1,n??null,o,!1,i,s),e[Ht]=t.current,Lo(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 nl(t)};qe.render=function(e,t,n){if(!rl(t))throw Error(K(200));return ol(null,e,t,!1,n)};qe.unmountComponentAtNode=function(e){if(!rl(e))throw Error(K(40));return e._reactRootContainer?($n(function(){ol(null,null,e,!1,function(){e._reactRootContainer=null,e[Ht]=null})}),!0):!1};qe.unstable_batchedUpdates=uc;qe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!rl(n))throw Error(K(200));if(e==null||e._reactInternals===void 0)throw Error(K(38));return ol(e,t,n,!1,r)};qe.version="18.3.1-next-f1338f8080-20240426";function xm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xm)}catch(e){console.error(e)}}xm(),xp.exports=qe;var yc=xp.exports;const il=U.createContext(null),HE=il.Provider,Em=Pt.error001();function ie(e,t){const n=U.useContext(il);if(n===null)throw new Error(Em);return wp(n,e,t)}function ge(){const e=U.useContext(il);if(e===null)throw new Error(Em);return U.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const wd={display:"none"},BE={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},_m="react-flow__node-desc",Sm="react-flow__edge-desc",UE="react-flow__aria-live",WE=e=>e.ariaLiveMessage,YE=e=>e.ariaLabelConfig;function XE({rfId:e}){const t=ie(WE);return F.jsx("div",{id:`${UE}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:BE,children:t})}function GE({rfId:e,disableKeyboardA11y:t}){const n=ie(YE);return F.jsxs(F.Fragment,{children:[F.jsx("div",{id:`${_m}-${e}`,style:wd,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),F.jsx("div",{id:`${Sm}-${e}`,style:wd,children:n["edge.a11yDescription.default"]}),!t&&F.jsx(XE,{rfId:e})]})}const Jo=U.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{const s=`${e}`.split("-");return F.jsx("div",{className:Se(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});Jo.displayName="Panel";function QE({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:F.jsx(Jo,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:F.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const KE=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Mi=e=>e.id;function ZE(e,t){return he(e.selectedNodes.map(Mi),t.selectedNodes.map(Mi))&&he(e.selectedEdges.map(Mi),t.selectedEdges.map(Mi))}function qE({onSelectionChange:e}){const t=ge(),{selectedNodes:n,selectedEdges:r}=ie(KE,ZE);return U.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}const JE=e=>!!e.onSelectionChangeHandlers;function e_({onSelectionChange:e}){const t=ie(JE);return e||t?F.jsx(qE,{onSelectionChange:e}):null}const nu=typeof window<"u"?U.useLayoutEffect:U.useEffect,Cm=[0,0],t_={x:0,y:0,zoom:1},n_=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],xd=[...n_,"rfId"],r_=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Ed={translateExtent:xo,nodeOrigin:Cm,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function o_(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:a}=ie(r_,he),u=ge();nu(()=>(a(e.defaultNodes,e.defaultEdges),()=>{f.current=Ed,l()}),[]);const f=U.useRef(Ed);return nu(()=>{for(const c of xd){const d=e[c],h=f.current[c];d!==h&&(typeof e[c]>"u"||(c==="nodes"?t(d):c==="edges"?n(d):c==="minZoom"?r(d):c==="maxZoom"?o(d):c==="translateExtent"?i(d):c==="nodeExtent"?s(d):c==="ariaLabelConfig"?u.setState({ariaLabelConfig:S2(d)}):c==="fitView"?u.setState({fitViewQueued:d}):c==="fitViewOptions"?u.setState({fitViewOptions:d}):u.setState({[c]:d})))}f.current=e},xd.map(c=>e[c])),null}function _d(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function i_(e){var r;const[t,n]=U.useState(e==="system"?null:e);return U.useEffect(()=>{if(e!=="system"){n(e);return}const o=_d(),i=()=>n(o!=null&&o.matches?"dark":"light");return i(),o==null||o.addEventListener("change",i),()=>{o==null||o.removeEventListener("change",i)}},[e]),t!==null?t:(r=_d())!=null&&r.matches?"dark":"light"}const Sd=typeof document<"u"?document:null;function Vo(e=null,t={target:Sd,actInsideInputWithModifier:!0}){const[n,r]=U.useState(!1),o=U.useRef(!1),i=U.useRef(new Set([])),[s,l]=U.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(c=>typeof c=="string").map(c=>c.replace("+",`
|
|
58
|
-
`).replace(`
|
|
59
|
-
|
|
60
|
-
`,`
|
|
61
|
-
+`).split(`
|
|
62
|
-
`)),f=u.reduce((c,d)=>c.concat(...d),[]);return[u,f]}return[[],[]]},[e]);return U.useEffect(()=>{const a=(t==null?void 0:t.target)??Sd,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const f=h=>{var x,m;if(o.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!o.current||o.current&&!u)&&qh(h))return!1;const w=kd(h.code,l);if(i.current.add(h[w]),Cd(s,i.current,!1)){const g=((m=(x=h.composedPath)==null?void 0:x.call(h))==null?void 0:m[0])||h.target,p=(g==null?void 0:g.nodeName)==="BUTTON"||(g==null?void 0:g.nodeName)==="A";t.preventDefault!==!1&&(o.current||!p)&&h.preventDefault(),r(!0)}},c=h=>{const y=kd(h.code,l);Cd(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(h[y]),h.key==="Meta"&&i.current.clear(),o.current=!1},d=()=>{i.current.clear(),r(!1)};return a==null||a.addEventListener("keydown",f),a==null||a.addEventListener("keyup",c),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{a==null||a.removeEventListener("keydown",f),a==null||a.removeEventListener("keyup",c),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function Cd(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function kd(e,t){return t.includes(e)?"code":"key"}const s_=()=>{const e=ge();return U.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,o,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:o,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),a=xu(t,r,o,i,s,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(a,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:o,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:l,y:a}=s.getBoundingClientRect(),u={x:t.x-l,y:t.y-a},f=n.snapGrid??o,c=n.snapToGrid??i;return Go(u,r,c,f)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),s=ss(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function km(e,t){const n=[],r=new Map,o=[];for(const i of e)if(i.type==="add"){o.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const l={...i};for(const a of s)l_(a,l);n.push(l)}return o.length&&o.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function l_(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Nm(e,t){return km(e,t)}function Mm(e,t){return km(e,t)}function En(e,t){return{id:e,type:"select",selected:t}}function ir(e,t=new Set,n=!1){const r=[];for(const[o,i]of e){const s=t.has(o);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(En(i.id,s)))}return r}function Nd({items:e=[],lookup:t}){var o;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const l=t.get(s.id),a=((o=l==null?void 0:l.internals)==null?void 0:o.userNode)??l;a!==void 0&&a!==s&&n.push({id:s.id,item:s,type:"replace"}),a===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function Md(e){return{id:e.id,type:"remove"}}const Id=e=>h2(e),a_=e=>Uh(e);function Im(e){return U.forwardRef(e)}function Pd(e){const[t,n]=U.useState(BigInt(0)),[r]=U.useState(()=>u_(()=>n(o=>o+BigInt(1))));return nu(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function u_(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const Pm=U.createContext(null);function c_({children:e}){const t=ge(),n=U.useCallback(l=>{const{nodes:a=[],setNodes:u,hasDefaultNodes:f,onNodesChange:c,nodeLookup:d,fitViewQueued:h,onNodesChangeMiddlewareMap:y}=t.getState();let w=a;for(const m of l)w=typeof m=="function"?m(w):m;let x=Nd({items:w,lookup:d});for(const m of y.values())x=m(x);f&&u(w),x.length>0?c==null||c(x):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:m,nodes:g,setNodes:p}=t.getState();m&&p(g)})},[]),r=Pd(n),o=U.useCallback(l=>{const{edges:a=[],setEdges:u,hasDefaultEdges:f,onEdgesChange:c,edgeLookup:d}=t.getState();let h=a;for(const y of l)h=typeof y=="function"?y(h):y;f?u(h):c&&c(Nd({items:h,lookup:d}))},[]),i=Pd(o),s=U.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return F.jsx(Pm.Provider,{value:s,children:e})}function f_(){const e=U.useContext(Pm);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const d_=e=>!!e.panZoom;function sl(){const e=s_(),t=ge(),n=f_(),r=ie(d_),o=U.useMemo(()=>{const i=c=>t.getState().nodeLookup.get(c),s=c=>{n.nodeQueue.push(c)},l=c=>{n.edgeQueue.push(c)},a=c=>{var m,g;const{nodeLookup:d,nodeOrigin:h}=t.getState(),y=Id(c)?c:d.get(c.id),w=y.parentId?Kh(y.position,y.measured,y.parentId,d,h):y.position,x={...y,position:w,width:((m=y.measured)==null?void 0:m.width)??y.width,height:((g=y.measured)==null?void 0:g.height)??y.height};return vr(x)},u=(c,d,h={replace:!1})=>{s(y=>y.map(w=>{if(w.id===c){const x=typeof d=="function"?d(w):d;return h.replace&&Id(x)?x:{...w,...x}}return w}))},f=(c,d,h={replace:!1})=>{l(y=>y.map(w=>{if(w.id===c){const x=typeof d=="function"?d(w):d;return h.replace&&a_(x)?x:{...w,...x}}return w}))};return{getNodes:()=>t.getState().nodes.map(c=>({...c})),getNode:c=>{var d;return(d=i(c))==null?void 0:d.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:c=[]}=t.getState();return c.map(d=>({...d}))},getEdge:c=>t.getState().edgeLookup.get(c),setNodes:s,setEdges:l,addNodes:c=>{const d=Array.isArray(c)?c:[c];n.nodeQueue.push(h=>[...h,...d])},addEdges:c=>{const d=Array.isArray(c)?c:[c];n.edgeQueue.push(h=>[...h,...d])},toObject:()=>{const{nodes:c=[],edges:d=[],transform:h}=t.getState(),[y,w,x]=h;return{nodes:c.map(m=>({...m})),edges:d.map(m=>({...m})),viewport:{x:y,y:w,zoom:x}}},deleteElements:async({nodes:c=[],edges:d=[]})=>{const{nodes:h,edges:y,onNodesDelete:w,onEdgesDelete:x,triggerNodeChanges:m,triggerEdgeChanges:g,onDelete:p,onBeforeDelete:v}=t.getState(),{nodes:_,edges:S}=await v2({nodesToRemove:c,edgesToRemove:d,nodes:h,edges:y,onBeforeDelete:v}),T=S.length>0,R=_.length>0;if(T){const H=S.map(Md);x==null||x(S),g(H)}if(R){const H=_.map(Md);w==null||w(_),m(H)}return(R||T)&&(p==null||p({nodes:_,edges:S})),{deletedNodes:_,deletedEdges:S}},getIntersectingNodes:(c,d=!0,h)=>{const y=qc(c),w=y?c:a(c),x=h!==void 0;return w?(h||t.getState().nodes).filter(m=>{const g=t.getState().nodeLookup.get(m.id);if(g&&!y&&(m.id===c.id||!g.internals.positionAbsolute))return!1;const p=vr(x?m:g),v=_o(p,w);return d&&v>0||v>=p.width*p.height||v>=w.width*w.height}):[]},isNodeIntersecting:(c,d,h=!0)=>{const w=qc(c)?c:a(c);if(!w)return!1;const x=_o(w,d);return h&&x>0||x>=d.width*d.height||x>=w.width*w.height},updateNode:u,updateNodeData:(c,d,h={replace:!1})=>{u(c,y=>{const w=typeof d=="function"?d(y):d;return h.replace?{...y,data:w}:{...y,data:{...y.data,...w}}},h)},updateEdge:f,updateEdgeData:(c,d,h={replace:!1})=>{f(c,y=>{const w=typeof d=="function"?d(y):d;return h.replace?{...y,data:w}:{...y,data:{...y.data,...w}}},h)},getNodesBounds:c=>{const{nodeLookup:d,nodeOrigin:h}=t.getState();return p2(c,{nodeLookup:d,nodeOrigin:h})},getHandleConnections:({type:c,id:d,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}-${c}${d?`-${d}`:""}`))==null?void 0:y.values())??[])},getNodeConnections:({type:c,handleId:d,nodeId:h})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${h}${c?d?`-${c}-${d}`:`-${c}`:""}`))==null?void 0:y.values())??[])},fitView:async c=>{const d=t.getState().fitViewResolver??_2();return t.setState({fitViewQueued:!0,fitViewOptions:c,fitViewResolver:d}),n.nodeQueue.push(h=>[...h]),d.promise}}},[]);return U.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const Td=e=>e.selected,h_=typeof window<"u"?window:void 0;function p_({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ge(),{deleteElements:r}=sl(),o=Vo(e,{actInsideInputWithModifier:!1}),i=Vo(t,{target:h_});U.useEffect(()=>{if(o){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(Td),edges:s.filter(Td)}),n.setState({nodesSelectionActive:!1})}},[o]),U.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function g_(e){const t=ge();U.useEffect(()=>{const n=()=>{var o,i,s,l;if(!e.current||!(((i=(o=e.current).checkVisibility)==null?void 0:i.call(o))??!0))return!1;const r=Eu(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",Pt.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const ll={position:"absolute",width:"100%",height:"100%",top:0,left:0},m_=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function y_({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:i=Mn.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:a,translateExtent:u,minZoom:f,maxZoom:c,zoomActivationKeyCode:d,preventScrolling:h=!0,children:y,noWheelClassName:w,noPanClassName:x,onViewportChange:m,isControlledViewport:g,paneClickDistance:p,selectionOnDrag:v}){const _=ge(),S=U.useRef(null),{userSelectionActive:T,lib:R,connectionInProgress:H}=ie(m_,he),L=Vo(d),b=U.useRef();g_(S);const $=U.useCallback(V=>{m==null||m({x:V[0],y:V[1],zoom:V[2]}),g||_.setState({transform:V})},[m,g]);return U.useEffect(()=>{if(S.current){b.current=ix({domNode:S.current,minZoom:f,maxZoom:c,translateExtent:u,viewport:a,onDraggingChange:P=>_.setState(O=>O.paneDragging===P?O:{paneDragging:P}),onPanZoomStart:(P,O)=>{const{onViewportChangeStart:N,onMoveStart:I}=_.getState();I==null||I(P,O),N==null||N(O)},onPanZoom:(P,O)=>{const{onViewportChange:N,onMove:I}=_.getState();I==null||I(P,O),N==null||N(O)},onPanZoomEnd:(P,O)=>{const{onViewportChangeEnd:N,onMoveEnd:I}=_.getState();I==null||I(P,O),N==null||N(O)}});const{x:V,y:E,zoom:j}=b.current.getViewport();return _.setState({panZoom:b.current,transform:[V,E,j],domNode:S.current.closest(".react-flow")}),()=>{var P;(P=b.current)==null||P.destroy()}}},[]),U.useEffect(()=>{var V;(V=b.current)==null||V.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:L,preventScrolling:h,noPanClassName:x,userSelectionActive:T,noWheelClassName:w,lib:R,onTransformChange:$,connectionInProgress:H,selectionOnDrag:v,paneClickDistance:p})},[e,t,n,r,o,i,s,l,L,h,x,T,w,R,$,H,v,p]),F.jsx("div",{className:"react-flow__renderer",ref:S,style:ll,children:y})}const v_=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function w_(){const{userSelectionActive:e,userSelectionRect:t}=ie(v_,he);return e&&t?F.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Wl=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},x_=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function E_({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Eo.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:l,onPaneClick:a,onPaneContextMenu:u,onPaneScroll:f,onPaneMouseEnter:c,onPaneMouseMove:d,onPaneMouseLeave:h,children:y}){const w=ge(),{userSelectionActive:x,elementsSelectable:m,dragging:g,connectionInProgress:p}=ie(x_,he),v=m&&(e||x),_=U.useRef(null),S=U.useRef(),T=U.useRef(new Set),R=U.useRef(new Set),H=U.useRef(!1),L=N=>{if(H.current||p){H.current=!1;return}a==null||a(N),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},b=N=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){N.preventDefault();return}u==null||u(N)},$=f?N=>f(N):void 0,V=N=>{H.current&&(N.stopPropagation(),H.current=!1)},E=N=>{var k,D;const{domNode:I}=w.getState();if(S.current=I==null?void 0:I.getBoundingClientRect(),!S.current)return;const C=N.target===_.current;if(!C&&!!N.target.closest(".nokey")||!e||!(i&&C||t)||N.button!==0||!N.isPrimary)return;(D=(k=N.target)==null?void 0:k.setPointerCapture)==null||D.call(k,N.pointerId),H.current=!1;const{x:Y,y:A}=mt(N.nativeEvent,S.current);w.setState({userSelectionRect:{width:0,height:0,startX:Y,startY:A,x:Y,y:A}}),C||(N.stopPropagation(),N.preventDefault())},j=N=>{const{userSelectionRect:I,transform:C,nodeLookup:M,edgeLookup:z,connectionLookup:Y,triggerNodeChanges:A,triggerEdgeChanges:k,defaultEdgeOptions:D,resetSelectedElements:B}=w.getState();if(!S.current||!I)return;const{x:W,y:X}=mt(N.nativeEvent,S.current),{startX:G,startY:Q}=I;if(!H.current){const re=t?0:o;if(Math.hypot(W-G,X-Q)<=re)return;B(),s==null||s(N)}H.current=!0;const Z={startX:G,startY:Q,x:W<G?W:G,y:X<Q?X:Q,width:Math.abs(W-G),height:Math.abs(X-Q)},ee=T.current,te=R.current;T.current=new Set(wu(M,Z,C,n===Eo.Partial,!0).map(re=>re.id)),R.current=new Set;const ne=(D==null?void 0:D.selectable)??!0;for(const re of T.current){const Ce=Y.get(re);if(Ce)for(const{edgeId:lt}of Ce.values()){const bt=z.get(lt);bt&&(bt.selectable??ne)&&R.current.add(lt)}}if(!Jc(ee,T.current)){const re=ir(M,T.current,!0);A(re)}if(!Jc(te,R.current)){const re=ir(z,R.current);k(re)}w.setState({userSelectionRect:Z,userSelectionActive:!0,nodesSelectionActive:!1})},P=N=>{var I,C;N.button===0&&((C=(I=N.target)==null?void 0:I.releasePointerCapture)==null||C.call(I,N.pointerId),!x&&N.target===_.current&&w.getState().userSelectionRect&&(L==null||L(N)),w.setState({userSelectionActive:!1,userSelectionRect:null}),H.current&&(l==null||l(N),w.setState({nodesSelectionActive:T.current.size>0})))},O=r===!0||Array.isArray(r)&&r.includes(0);return F.jsxs("div",{className:Se(["react-flow__pane",{draggable:O,dragging:g,selection:e}]),onClick:v?void 0:Wl(L,_),onContextMenu:Wl(b,_),onWheel:Wl($,_),onPointerEnter:v?void 0:c,onPointerMove:v?j:d,onPointerUp:v?P:void 0,onPointerDownCapture:v?E:void 0,onClickCapture:v?V:void 0,onPointerLeave:h,ref:_,style:ll,children:[y,F.jsx(w_,{})]})}function ru({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:a}=t.getState(),u=l.get(e);if(!u){a==null||a("012",Pt.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var f;return(f=r==null?void 0:r.current)==null?void 0:f.blur()})):o([e])}function Tm({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){const l=ge(),[a,u]=U.useState(!1),f=U.useRef();return U.useEffect(()=>{f.current=W2({getStoreItems:()=>l.getState(),onNodeMouseDown:c=>{ru({id:c,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),U.useEffect(()=>{if(!(t||!e.current||!f.current))return f.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s}),()=>{var c;(c=f.current)==null||c.destroy()}},[n,r,t,i,e,o,s]),a}const __=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function bm(){const e=ge();return U.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:f}=e.getState(),c=new Map,d=__(s),h=o?i[0]:5,y=o?i[1]:5,w=n.direction.x*h*n.factor,x=n.direction.y*y*n.factor;for(const[,m]of u){if(!d(m))continue;let g={x:m.internals.positionAbsolute.x+w,y:m.internals.positionAbsolute.y+x};o&&(g=Xo(g,i));const{position:p,positionAbsolute:v}=Wh({nodeId:m.id,nextPosition:g,nodeLookup:u,nodeExtent:r,nodeOrigin:f,onError:l});m.position=p,m.internals.positionAbsolute=v,c.set(m.id,m)}a(c)},[])}const vc=U.createContext(null),S_=vc.Provider;vc.Consumer;const Lm=()=>U.useContext(vc),C_=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),k_=(e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:a,isValid:u}=s,f=(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:f,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:i===mr.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!o,valid:f&&u}};function N_({type:e="source",position:t=J.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:a,className:u,onMouseDown:f,onTouchStart:c,...d},h){var j,P;const y=s||null,w=e==="target",x=ge(),m=Lm(),{connectOnClick:g,noPanClassName:p,rfId:v}=ie(C_,he),{connectingFrom:_,connectingTo:S,clickConnecting:T,isPossibleEndHandle:R,connectionInProcess:H,clickConnectionInProcess:L,valid:b}=ie(k_(m,y,e),he);m||(P=(j=x.getState()).onError)==null||P.call(j,"010",Pt.error010());const $=O=>{const{defaultEdgeOptions:N,onConnect:I,hasDefaultEdges:C}=x.getState(),M={...N,...O};if(C){const{edges:z,setEdges:Y}=x.getState();Y(P2(M,z))}I==null||I(M),l==null||l(M)},V=O=>{if(!m)return;const N=Jh(O.nativeEvent);if(o&&(N&&O.button===0||!N)){const I=x.getState();ua.onPointerDown(O.nativeEvent,{handleDomNode:O.currentTarget,autoPanOnConnect:I.autoPanOnConnect,connectionMode:I.connectionMode,connectionRadius:I.connectionRadius,domNode:I.domNode,nodeLookup:I.nodeLookup,lib:I.lib,isTarget:w,handleId:y,nodeId:m,flowId:I.rfId,panBy:I.panBy,cancelConnection:I.cancelConnection,onConnectStart:I.onConnectStart,onConnectEnd:(...C)=>{var M,z;return(z=(M=x.getState()).onConnectEnd)==null?void 0:z.call(M,...C)},updateConnection:I.updateConnection,onConnect:$,isValidConnection:n||((...C)=>{var M,z;return((z=(M=x.getState()).isValidConnection)==null?void 0:z.call(M,...C))??!0}),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:I.autoPanSpeed,dragThreshold:I.connectionDragThreshold})}N?f==null||f(O):c==null||c(O)},E=O=>{const{onClickConnectStart:N,onClickConnectEnd:I,connectionClickStartHandle:C,connectionMode:M,isValidConnection:z,lib:Y,rfId:A,nodeLookup:k,connection:D}=x.getState();if(!m||!C&&!o)return;if(!C){N==null||N(O.nativeEvent,{nodeId:m,handleId:y,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:m,type:e,id:y}});return}const B=Zh(O.target),W=n||z,{connection:X,isValid:G}=ua.isValid(O.nativeEvent,{handle:{nodeId:m,id:y,type:e},connectionMode:M,fromNodeId:C.nodeId,fromHandleId:C.id||null,fromType:C.type,isValidConnection:W,flowId:A,doc:B,lib:Y,nodeLookup:k});G&&X&&$(X);const Q=structuredClone(D);delete Q.inProgress,Q.toPosition=Q.toHandle?Q.toHandle.position:null,I==null||I(O,Q),x.setState({connectionClickStartHandle:null})};return F.jsx("div",{"data-handleid":y,"data-nodeid":m,"data-handlepos":t,"data-id":`${v}-${m}-${y}-${e}`,className:Se(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",p,u,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:i,clickconnecting:T,connectingfrom:_,connectingto:S,valid:b,connectionindicator:r&&(!H||R)&&(H||L?i:o)}]),onMouseDown:V,onTouchStart:V,onClick:g?E:void 0,ref:h,...d,children:a})}const Dn=U.memo(Im(N_));function M_({data:e,isConnectable:t,sourcePosition:n=J.Bottom}){return F.jsxs(F.Fragment,{children:[e==null?void 0:e.label,F.jsx(Dn,{type:"source",position:n,isConnectable:t})]})}function I_({data:e,isConnectable:t,targetPosition:n=J.Top,sourcePosition:r=J.Bottom}){return F.jsxs(F.Fragment,{children:[F.jsx(Dn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,F.jsx(Dn,{type:"source",position:r,isConnectable:t})]})}function P_(){return null}function T_({data:e,isConnectable:t,targetPosition:n=J.Top}){return F.jsxs(F.Fragment,{children:[F.jsx(Dn,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ls={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},bd={input:M_,default:I_,output:T_,group:P_};function b_(e){var t,n,r,o;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((o=e.style)==null?void 0:o.height)}}const L_=e=>{const{width:t,height:n,x:r,y:o}=Yo(e.nodeLookup,{filter:i=>!!i.selected});return{width:gt(t)?t:null,height:gt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function R_({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=ge(),{width:o,height:i,transformString:s,userSelectionActive:l}=ie(L_,he),a=bm(),u=U.useRef(null);U.useEffect(()=>{var h;n||(h=u.current)==null||h.focus({preventScroll:!0})},[n]);const f=!l&&o!==null&&i!==null;if(Tm({nodeRef:u,disabled:!f}),!f)return null;const c=e?h=>{const y=r.getState().nodes.filter(w=>w.selected);e(h,y)}:void 0,d=h=>{Object.prototype.hasOwnProperty.call(Ls,h.key)&&(h.preventDefault(),a({direction:Ls[h.key],factor:h.shiftKey?4:1}))};return F.jsx("div",{className:Se(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:F.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:c,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:o,height:i}})})}const Ld=typeof window<"u"?window:void 0,A_=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function Rm({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:a,selectionKeyCode:u,selectionOnDrag:f,selectionMode:c,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:y,panActivationKeyCode:w,zoomActivationKeyCode:x,elementsSelectable:m,zoomOnScroll:g,zoomOnPinch:p,panOnScroll:v,panOnScrollSpeed:_,panOnScrollMode:S,zoomOnDoubleClick:T,panOnDrag:R,defaultViewport:H,translateExtent:L,minZoom:b,maxZoom:$,preventScrolling:V,onSelectionContextMenu:E,noWheelClassName:j,noPanClassName:P,disableKeyboardA11y:O,onViewportChange:N,isControlledViewport:I}){const{nodesSelectionActive:C,userSelectionActive:M}=ie(A_,he),z=Vo(u,{target:Ld}),Y=Vo(w,{target:Ld}),A=Y||R,k=Y||v,D=f&&A!==!0,B=z||M||D;return p_({deleteKeyCode:a,multiSelectionKeyCode:y}),F.jsx(y_,{onPaneContextMenu:i,elementsSelectable:m,zoomOnScroll:g,zoomOnPinch:p,panOnScroll:k,panOnScrollSpeed:_,panOnScrollMode:S,zoomOnDoubleClick:T,panOnDrag:!z&&A,defaultViewport:H,translateExtent:L,minZoom:b,maxZoom:$,zoomActivationKeyCode:x,preventScrolling:V,noWheelClassName:j,noPanClassName:P,onViewportChange:N,isControlledViewport:I,paneClickDistance:l,selectionOnDrag:D,children:F.jsxs(E_,{onSelectionStart:d,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:A,isSelecting:!!B,selectionMode:c,selectionKeyPressed:z,paneClickDistance:l,selectionOnDrag:D,children:[e,C&&F.jsx(R_,{onSelectionContextMenu:E,noPanClassName:P,disableKeyboardA11y:O})]})})}Rm.displayName="FlowRenderer";const O_=U.memo(Rm),z_=e=>t=>e?wu(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function j_(e){return ie(U.useCallback(z_(e),[e]),he)}const $_=e=>e.updateNodeInternals;function D_(){const e=ie($_),[t]=U.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(o=>{const i=o.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:o.target,force:!0})}),e(r)}));return U.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function F_({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=ge(),i=U.useRef(null),s=U.useRef(null),l=U.useRef(e.sourcePosition),a=U.useRef(e.targetPosition),u=U.useRef(t),f=n&&!!e.internals.handleBounds;return U.useEffect(()=>{i.current&&!e.hidden&&(!f||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[f,e.hidden]),U.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),U.useEffect(()=>{if(i.current){const c=u.current!==t,d=l.current!==e.sourcePosition,h=a.current!==e.targetPosition;(c||d||h)&&(u.current=t,l.current=e.sourcePosition,a.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function V_({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:a,nodesConnectable:u,nodesFocusable:f,resizeObserver:c,noDragClassName:d,noPanClassName:h,disableKeyboardA11y:y,rfId:w,nodeTypes:x,nodeClickDistance:m,onError:g}){const{node:p,internals:v,isParent:_}=ie(W=>{const X=W.nodeLookup.get(e),G=W.parentLookup.has(e);return{node:X,internals:X.internals,isParent:G}},he);let S=p.type||"default",T=(x==null?void 0:x[S])||bd[S];T===void 0&&(g==null||g("003",Pt.error003(S)),S="default",T=(x==null?void 0:x.default)||bd.default);const R=!!(p.draggable||l&&typeof p.draggable>"u"),H=!!(p.selectable||a&&typeof p.selectable>"u"),L=!!(p.connectable||u&&typeof p.connectable>"u"),b=!!(p.focusable||f&&typeof p.focusable>"u"),$=ge(),V=Qh(p),E=F_({node:p,nodeType:S,hasDimensions:V,resizeObserver:c}),j=Tm({nodeRef:E,disabled:p.hidden||!R,noDragClassName:d,handleSelector:p.dragHandle,nodeId:e,isSelectable:H,nodeClickDistance:m}),P=bm();if(p.hidden)return null;const O=Wt(p),N=b_(p),I=H||R||t||n||r||o,C=n?W=>n(W,{...v.userNode}):void 0,M=r?W=>r(W,{...v.userNode}):void 0,z=o?W=>o(W,{...v.userNode}):void 0,Y=i?W=>i(W,{...v.userNode}):void 0,A=s?W=>s(W,{...v.userNode}):void 0,k=W=>{const{selectNodesOnDrag:X,nodeDragThreshold:G}=$.getState();H&&(!X||!R||G>0)&&ru({id:e,store:$,nodeRef:E}),t&&t(W,{...v.userNode})},D=W=>{if(!(qh(W.nativeEvent)||y)){if(Fh.includes(W.key)&&H){const X=W.key==="Escape";ru({id:e,store:$,unselect:X,nodeRef:E})}else if(R&&p.selected&&Object.prototype.hasOwnProperty.call(Ls,W.key)){W.preventDefault();const{ariaLabelConfig:X}=$.getState();$.setState({ariaLiveMessage:X["node.a11yDescription.ariaLiveMessage"]({direction:W.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),P({direction:Ls[W.key],factor:W.shiftKey?4:1})}}},B=()=>{var te;if(y||!((te=E.current)!=null&&te.matches(":focus-visible")))return;const{transform:W,width:X,height:G,autoPanOnNodeFocus:Q,setCenter:Z}=$.getState();if(!Q)return;wu(new Map([[e,p]]),{x:0,y:0,width:X,height:G},W,!0).length>0||Z(p.position.x+O.width/2,p.position.y+O.height/2,{zoom:W[2]})};return F.jsx("div",{className:Se(["react-flow__node",`react-flow__node-${S}`,{[h]:R},p.className,{selected:p.selected,selectable:H,parent:_,draggable:R,dragging:j}]),ref:E,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:I?"all":"none",visibility:V?"visible":"hidden",...p.style,...N},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:C,onMouseMove:M,onMouseLeave:z,onContextMenu:Y,onClick:k,onDoubleClick:A,onKeyDown:b?D:void 0,tabIndex:b?0:void 0,onFocus:b?B:void 0,role:p.ariaRole??(b?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${_m}-${w}`,"aria-label":p.ariaLabel,...p.domAttributes,children:F.jsx(S_,{value:e,children:F.jsx(T,{id:e,data:p.data,type:S,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:p.selected??!1,selectable:H,draggable:R,deletable:p.deletable??!0,isConnectable:L,sourcePosition:p.sourcePosition,targetPosition:p.targetPosition,dragging:j,dragHandle:p.dragHandle,zIndex:v.z,parentId:p.parentId,...O})})})}var H_=U.memo(V_);const B_=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Am(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:i}=ie(B_,he),s=j_(e.onlyRenderVisibleElements),l=D_();return F.jsx("div",{className:"react-flow__nodes",style:ll,children:s.map(a=>F.jsx(H_,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}Am.displayName="NodeRenderer";const U_=U.memo(Am);function W_(e){return ie(U.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const r=[];if(n.width&&n.height)for(const o of n.edges){const i=n.nodeLookup.get(o.source),s=n.nodeLookup.get(o.target);i&&s&&N2({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),he)}const Y_=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return F.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},X_=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return F.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Rd={[os.Arrow]:Y_,[os.ArrowClosed]:X_};function G_(e){const t=ge();return U.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(Rd,e)?Rd[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",Pt.error009(e)),null)},[e])}const Q_=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{const a=G_(t);return a?F.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:F.jsx(a,{color:n,strokeWidth:s})}):null},Om=({defaultColor:e,rfId:t})=>{const n=ie(i=>i.edges),r=ie(i=>i.defaultEdgeOptions),o=U.useMemo(()=>A2(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return o.length?F.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:F.jsx("defs",{children:o.map(i=>F.jsx(Q_,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};Om.displayName="MarkerDefinitions";var K_=U.memo(Om);function zm({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:a,className:u,...f}){const[c,d]=U.useState({x:1,y:0,width:0,height:0}),h=Se(["react-flow__edge-textwrapper",u]),y=U.useRef(null);return U.useEffect(()=>{if(y.current){const w=y.current.getBBox();d({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?F.jsxs("g",{transform:`translate(${e-c.width/2} ${t-c.height/2})`,className:h,visibility:c.width?"visible":"hidden",...f,children:[o&&F.jsx("rect",{width:c.width+2*s[0],x:-s[0],y:-s[1],height:c.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),F.jsx("text",{className:"react-flow__edge-text",y:c.height/2,dy:"0.3em",ref:y,style:r,children:n}),a]}):null}zm.displayName="EdgeText";const Z_=U.memo(zm);function ei({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...f}){return F.jsxs(F.Fragment,{children:[F.jsx("path",{...f,d:e,fill:"none",className:Se(["react-flow__edge-path",f.className])}),u?F.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&>(t)&>(n)?F.jsx(Z_,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function Ad({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===J.Left||e===J.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function jm({sourceX:e,sourceY:t,sourcePosition:n=J.Bottom,targetX:r,targetY:o,targetPosition:i=J.Top}){const[s,l]=Ad({pos:n,x1:e,y1:t,x2:r,y2:o}),[a,u]=Ad({pos:i,x1:r,y1:o,x2:e,y2:t}),[f,c,d,h]=ep({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${e},${t} C${s},${l} ${a},${u} ${r},${o}`,f,c,d,h]}function $m(e){return U.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:y,markerEnd:w,markerStart:x,interactionWidth:m})=>{const[g,p,v]=jm({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),_=e.isInternal?void 0:t;return F.jsx(ei,{id:_,path:g,labelX:p,labelY:v,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:y,markerEnd:w,markerStart:x,interactionWidth:m})})}const q_=$m({isInternal:!1}),Dm=$m({isInternal:!0});q_.displayName="SimpleBezierEdge";Dm.displayName="SimpleBezierEdgeInternal";function Fm(e){return U.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,sourcePosition:h=J.Bottom,targetPosition:y=J.Top,markerEnd:w,markerStart:x,pathOptions:m,interactionWidth:g})=>{const[p,v,_]=ls({sourceX:n,sourceY:r,sourcePosition:h,targetX:o,targetY:i,targetPosition:y,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset,stepPosition:m==null?void 0:m.stepPosition}),S=e.isInternal?void 0:t;return F.jsx(ei,{id:S,path:p,labelX:v,labelY:_,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:w,markerStart:x,interactionWidth:g})})}const Vm=Fm({isInternal:!1}),Hm=Fm({isInternal:!0});Vm.displayName="SmoothStepEdge";Hm.displayName="SmoothStepEdgeInternal";function Bm(e){return U.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return F.jsx(Vm,{...n,id:r,pathOptions:U.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const J_=Bm({isInternal:!1}),Um=Bm({isInternal:!0});J_.displayName="StepEdge";Um.displayName="StepEdgeInternal";function Wm(e){return U.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:h,markerStart:y,interactionWidth:w})=>{const[x,m,g]=rp({sourceX:n,sourceY:r,targetX:o,targetY:i}),p=e.isInternal?void 0:t;return F.jsx(ei,{id:p,path:x,labelX:m,labelY:g,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:h,markerStart:y,interactionWidth:w})})}const e4=Wm({isInternal:!1}),Ym=Wm({isInternal:!0});e4.displayName="StraightEdge";Ym.displayName="StraightEdgeInternal";function Xm(e){return U.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=J.Bottom,targetPosition:l=J.Top,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:y,markerEnd:w,markerStart:x,pathOptions:m,interactionWidth:g})=>{const[p,v,_]=tp({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l,curvature:m==null?void 0:m.curvature}),S=e.isInternal?void 0:t;return F.jsx(ei,{id:S,path:p,labelX:v,labelY:_,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:y,markerEnd:w,markerStart:x,interactionWidth:g})})}const t4=Xm({isInternal:!1}),Gm=Xm({isInternal:!0});t4.displayName="BezierEdge";Gm.displayName="BezierEdgeInternal";const Od={default:Gm,straight:Ym,step:Um,smoothstep:Hm,simplebezier:Dm},zd={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},n4=(e,t,n)=>n===J.Left?e-t:n===J.Right?e+t:e,r4=(e,t,n)=>n===J.Top?e-t:n===J.Bottom?e+t:e,jd="react-flow__edgeupdater";function $d({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:l}){return F.jsx("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:Se([jd,`${jd}-${l}`]),cx:n4(t,r,e),cy:r4(n,r,e),r,stroke:"transparent",fill:"transparent"})}function o4({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:l,targetPosition:a,onReconnect:u,onReconnectStart:f,onReconnectEnd:c,setReconnecting:d,setUpdateHover:h}){const y=ge(),w=(v,_)=>{if(v.button!==0)return;const{autoPanOnConnect:S,domNode:T,connectionMode:R,connectionRadius:H,lib:L,onConnectStart:b,cancelConnection:$,nodeLookup:V,rfId:E,panBy:j,updateConnection:P}=y.getState(),O=_.type==="target",N=(M,z)=>{d(!1),c==null||c(M,n,_.type,z)},I=M=>u==null?void 0:u(n,M),C=(M,z)=>{d(!0),f==null||f(v,n,_.type),b==null||b(M,z)};ua.onPointerDown(v.nativeEvent,{autoPanOnConnect:S,connectionMode:R,connectionRadius:H,domNode:T,handleId:_.id,nodeId:_.nodeId,nodeLookup:V,isTarget:O,edgeUpdaterType:_.type,lib:L,flowId:E,cancelConnection:$,panBy:j,isValidConnection:(...M)=>{var z,Y;return((Y=(z=y.getState()).isValidConnection)==null?void 0:Y.call(z,...M))??!0},onConnect:I,onConnectStart:C,onConnectEnd:(...M)=>{var z,Y;return(Y=(z=y.getState()).onConnectEnd)==null?void 0:Y.call(z,...M)},onReconnectEnd:N,updateConnection:P,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:v.currentTarget})},x=v=>w(v,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),m=v=>w(v,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),g=()=>h(!0),p=()=>h(!1);return F.jsxs(F.Fragment,{children:[(e===!0||e==="source")&&F.jsx($d,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:x,onMouseEnter:g,onMouseOut:p,type:"source"}),(e===!0||e==="target")&&F.jsx($d,{position:a,centerX:i,centerY:s,radius:t,onMouseDown:m,onMouseEnter:g,onMouseOut:p,type:"target"})]})}function i4({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,reconnectRadius:f,onReconnect:c,onReconnectStart:d,onReconnectEnd:h,rfId:y,edgeTypes:w,noPanClassName:x,onError:m,disableKeyboardA11y:g}){let p=ie(Z=>Z.edgeLookup.get(e));const v=ie(Z=>Z.defaultEdgeOptions);p=v?{...v,...p}:p;let _=p.type||"default",S=(w==null?void 0:w[_])||Od[_];S===void 0&&(m==null||m("011",Pt.error011(_)),_="default",S=(w==null?void 0:w.default)||Od.default);const T=!!(p.focusable||t&&typeof p.focusable>"u"),R=typeof c<"u"&&(p.reconnectable||n&&typeof p.reconnectable>"u"),H=!!(p.selectable||r&&typeof p.selectable>"u"),L=U.useRef(null),[b,$]=U.useState(!1),[V,E]=U.useState(!1),j=ge(),{zIndex:P,sourceX:O,sourceY:N,targetX:I,targetY:C,sourcePosition:M,targetPosition:z}=ie(U.useCallback(Z=>{const ee=Z.nodeLookup.get(p.source),te=Z.nodeLookup.get(p.target);if(!ee||!te)return{zIndex:p.zIndex,...zd};const ne=R2({id:e,sourceNode:ee,targetNode:te,sourceHandle:p.sourceHandle||null,targetHandle:p.targetHandle||null,connectionMode:Z.connectionMode,onError:m});return{zIndex:k2({selected:p.selected,zIndex:p.zIndex,sourceNode:ee,targetNode:te,elevateOnSelect:Z.elevateEdgesOnSelect,zIndexMode:Z.zIndexMode}),...ne||zd}},[p.source,p.target,p.sourceHandle,p.targetHandle,p.selected,p.zIndex]),he),Y=U.useMemo(()=>p.markerStart?`url('#${la(p.markerStart,y)}')`:void 0,[p.markerStart,y]),A=U.useMemo(()=>p.markerEnd?`url('#${la(p.markerEnd,y)}')`:void 0,[p.markerEnd,y]);if(p.hidden||O===null||N===null||I===null||C===null)return null;const k=Z=>{var re;const{addSelectedEdges:ee,unselectNodesAndEdges:te,multiSelectionActive:ne}=j.getState();H&&(j.setState({nodesSelectionActive:!1}),p.selected&&ne?(te({nodes:[],edges:[p]}),(re=L.current)==null||re.blur()):ee([e])),o&&o(Z,p)},D=i?Z=>{i(Z,{...p})}:void 0,B=s?Z=>{s(Z,{...p})}:void 0,W=l?Z=>{l(Z,{...p})}:void 0,X=a?Z=>{a(Z,{...p})}:void 0,G=u?Z=>{u(Z,{...p})}:void 0,Q=Z=>{var ee;if(!g&&Fh.includes(Z.key)&&H){const{unselectNodesAndEdges:te,addSelectedEdges:ne}=j.getState();Z.key==="Escape"?((ee=L.current)==null||ee.blur(),te({edges:[p]})):ne([e])}};return F.jsx("svg",{style:{zIndex:P},children:F.jsxs("g",{className:Se(["react-flow__edge",`react-flow__edge-${_}`,p.className,x,{selected:p.selected,animated:p.animated,inactive:!H&&!o,updating:b,selectable:H}]),onClick:k,onDoubleClick:D,onContextMenu:B,onMouseEnter:W,onMouseMove:X,onMouseLeave:G,onKeyDown:T?Q:void 0,tabIndex:T?0:void 0,role:p.ariaRole??(T?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":p.ariaLabel===null?void 0:p.ariaLabel||`Edge from ${p.source} to ${p.target}`,"aria-describedby":T?`${Sm}-${y}`:void 0,ref:L,...p.domAttributes,children:[!V&&F.jsx(S,{id:e,source:p.source,target:p.target,type:p.type,selected:p.selected,animated:p.animated,selectable:H,deletable:p.deletable??!0,label:p.label,labelStyle:p.labelStyle,labelShowBg:p.labelShowBg,labelBgStyle:p.labelBgStyle,labelBgPadding:p.labelBgPadding,labelBgBorderRadius:p.labelBgBorderRadius,sourceX:O,sourceY:N,targetX:I,targetY:C,sourcePosition:M,targetPosition:z,data:p.data,style:p.style,sourceHandleId:p.sourceHandle,targetHandleId:p.targetHandle,markerStart:Y,markerEnd:A,pathOptions:"pathOptions"in p?p.pathOptions:void 0,interactionWidth:p.interactionWidth}),R&&F.jsx(o4,{edge:p,isReconnectable:R,reconnectRadius:f,onReconnect:c,onReconnectStart:d,onReconnectEnd:h,sourceX:O,sourceY:N,targetX:I,targetY:C,sourcePosition:M,targetPosition:z,setUpdateHover:$,setReconnecting:E})]})})}var s4=U.memo(i4);const l4=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Qm({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:f,reconnectRadius:c,onEdgeDoubleClick:d,onReconnectStart:h,onReconnectEnd:y,disableKeyboardA11y:w}){const{edgesFocusable:x,edgesReconnectable:m,elementsSelectable:g,onError:p}=ie(l4,he),v=W_(t);return F.jsxs("div",{className:"react-flow__edges",children:[F.jsx(K_,{defaultColor:e,rfId:n}),v.map(_=>F.jsx(s4,{id:_,edgesFocusable:x,edgesReconnectable:m,elementsSelectable:g,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:f,reconnectRadius:c,onDoubleClick:d,onReconnectStart:h,onReconnectEnd:y,rfId:n,onError:p,edgeTypes:r,disableKeyboardA11y:w},_))]})}Qm.displayName="EdgeRenderer";const a4=U.memo(Qm),u4=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function c4({children:e}){const t=ie(u4);return F.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function f4(e){const t=sl(),n=U.useRef(!1);U.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const d4=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function h4(e){const t=ie(d4),n=ge();return U.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function p4(e){return e.connection.inProgress?{...e.connection,to:Go(e.connection.to,e.transform)}:{...e.connection}}function g4(e){return p4}function m4(e){const t=g4();return ie(t,he)}const y4=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function v4({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:i,height:s,isValid:l,inProgress:a}=ie(y4,he);return!(i&&o&&a)?null:F.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:F.jsx("g",{className:Se(["react-flow__connection",Bh(l)]),children:F.jsx(Km,{style:t,type:n,CustomComponent:r,isValid:l})})})}const Km=({style:e,type:t=qt.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:i,fromNode:s,fromHandle:l,fromPosition:a,to:u,toNode:f,toHandle:c,toPosition:d,pointer:h}=m4();if(!o)return;if(n)return F.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:a,toPosition:d,connectionStatus:Bh(r),toNode:f,toHandle:c,pointer:h});let y="";const w={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:d};switch(t){case qt.Bezier:[y]=tp(w);break;case qt.SimpleBezier:[y]=jm(w);break;case qt.Step:[y]=ls({...w,borderRadius:0});break;case qt.SmoothStep:[y]=ls(w);break;default:[y]=rp(w)}return F.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};Km.displayName="ConnectionLine";const w4={};function Dd(e=w4){U.useRef(e),ge(),U.useEffect(()=>{},[e])}function x4(){ge(),U.useRef(!1),U.useEffect(()=>{},[])}function Zm({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:f,onSelectionContextMenu:c,onSelectionStart:d,onSelectionEnd:h,connectionLineType:y,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:m,selectionKeyCode:g,selectionOnDrag:p,selectionMode:v,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:T,deleteKeyCode:R,onlyRenderVisibleElements:H,elementsSelectable:L,defaultViewport:b,translateExtent:$,minZoom:V,maxZoom:E,preventScrolling:j,defaultMarkerColor:P,zoomOnScroll:O,zoomOnPinch:N,panOnScroll:I,panOnScrollSpeed:C,panOnScrollMode:M,zoomOnDoubleClick:z,panOnDrag:Y,onPaneClick:A,onPaneMouseEnter:k,onPaneMouseMove:D,onPaneMouseLeave:B,onPaneScroll:W,onPaneContextMenu:X,paneClickDistance:G,nodeClickDistance:Q,onEdgeContextMenu:Z,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,reconnectRadius:re,onReconnect:Ce,onReconnectStart:lt,onReconnectEnd:bt,noDragClassName:vn,noWheelClassName:Or,noPanClassName:zr,disableKeyboardA11y:jr,nodeExtent:al,rfId:ti,viewport:Bn,onViewportChange:$r}){return Dd(e),Dd(t),x4(),f4(n),h4(Bn),F.jsx(O_,{onPaneClick:A,onPaneMouseEnter:k,onPaneMouseMove:D,onPaneMouseLeave:B,onPaneContextMenu:X,onPaneScroll:W,paneClickDistance:G,deleteKeyCode:R,selectionKeyCode:g,selectionOnDrag:p,selectionMode:v,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:T,elementsSelectable:L,zoomOnScroll:O,zoomOnPinch:N,zoomOnDoubleClick:z,panOnScroll:I,panOnScrollSpeed:C,panOnScrollMode:M,panOnDrag:Y,defaultViewport:b,translateExtent:$,minZoom:V,maxZoom:E,onSelectionContextMenu:c,preventScrolling:j,noDragClassName:vn,noWheelClassName:Or,noPanClassName:zr,disableKeyboardA11y:jr,onViewportChange:$r,isControlledViewport:!!Bn,children:F.jsxs(c4,{children:[F.jsx(a4,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:Ce,onReconnectStart:lt,onReconnectEnd:bt,onlyRenderVisibleElements:H,onEdgeContextMenu:Z,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,reconnectRadius:re,defaultMarkerColor:P,noPanClassName:zr,disableKeyboardA11y:jr,rfId:ti}),F.jsx(v4,{style:w,type:y,component:x,containerStyle:m}),F.jsx("div",{className:"react-flow__edgelabel-renderer"}),F.jsx(U_,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:f,nodeClickDistance:Q,onlyRenderVisibleElements:H,noPanClassName:zr,noDragClassName:vn,disableKeyboardA11y:jr,nodeExtent:al,rfId:ti}),F.jsx("div",{className:"react-flow__viewport-portal"})]})})}Zm.displayName="GraphView";const E4=U.memo(Zm),Fd=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a=.5,maxZoom:u=2,nodeOrigin:f,nodeExtent:c,zIndexMode:d="basic"}={})=>{const h=new Map,y=new Map,w=new Map,x=new Map,m=r??t??[],g=n??e??[],p=f??[0,0],v=c??xo;sp(w,x,m);const{nodesInitialized:_}=aa(g,h,y,{nodeOrigin:p,nodeExtent:v,zIndexMode:d});let S=[0,0,1];if(s&&o&&i){const T=Yo(h,{filter:b=>!!((b.width||b.initialWidth)&&(b.height||b.initialHeight))}),{x:R,y:H,zoom:L}=xu(T,o,i,a,u,(l==null?void 0:l.padding)??.1);S=[R,H,L]}return{rfId:"1",width:o??0,height:i??0,transform:S,nodes:g,nodesInitialized:_,nodeLookup:h,parentLookup:y,edges:m,edgeLookup:x,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:xo,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:mr.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:p,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...Hh},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:w2,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Vh,zIndexMode:d,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},_4=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:f,nodeExtent:c,zIndexMode:d})=>jx((h,y)=>{async function w(){const{nodeLookup:x,panZoom:m,fitViewOptions:g,fitViewResolver:p,width:v,height:_,minZoom:S,maxZoom:T}=y();m&&(await y2({nodes:x,width:v,height:_,panZoom:m,minZoom:S,maxZoom:T},g),p==null||p.resolve(!0),h({fitViewResolver:null}))}return{...Fd({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:f,nodeExtent:c,defaultNodes:n,defaultEdges:r,zIndexMode:d}),setNodes:x=>{const{nodeLookup:m,parentLookup:g,nodeOrigin:p,elevateNodesOnSelect:v,fitViewQueued:_,zIndexMode:S,nodesSelectionActive:T}=y(),{nodesInitialized:R,hasSelectedNodes:H}=aa(x,m,g,{nodeOrigin:p,nodeExtent:c,elevateNodesOnSelect:v,checkEquality:!0,zIndexMode:S}),L=T&&H;_&&R?(w(),h({nodes:x,nodesInitialized:R,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:L})):h({nodes:x,nodesInitialized:R,nodesSelectionActive:L})},setEdges:x=>{const{connectionLookup:m,edgeLookup:g}=y();sp(m,g,x),h({edges:x})},setDefaultNodesAndEdges:(x,m)=>{if(x){const{setNodes:g}=y();g(x),h({hasDefaultNodes:!0})}if(m){const{setEdges:g}=y();g(m),h({hasDefaultEdges:!0})}},updateNodeInternals:x=>{const{triggerNodeChanges:m,nodeLookup:g,parentLookup:p,domNode:v,nodeOrigin:_,nodeExtent:S,debug:T,fitViewQueued:R,zIndexMode:H}=y(),{changes:L,updatedInternals:b}=V2(x,g,p,v,_,S,H);b&&(j2(g,p,{nodeOrigin:_,nodeExtent:S,zIndexMode:H}),R?(w(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),(L==null?void 0:L.length)>0&&(T&&console.log("React Flow: trigger node changes",L),m==null||m(L)))},updateNodePositions:(x,m=!1)=>{const g=[];let p=[];const{nodeLookup:v,triggerNodeChanges:_,connection:S,updateConnection:T,onNodesChangeMiddlewareMap:R}=y();for(const[H,L]of x){const b=v.get(H),$=!!(b!=null&&b.expandParent&&(b!=null&&b.parentId)&&(L!=null&&L.position)),V={id:H,type:"position",position:$?{x:Math.max(0,L.position.x),y:Math.max(0,L.position.y)}:L.position,dragging:m};if(b&&S.inProgress&&S.fromNode.id===b.id){const E=Rn(b,S.fromHandle,J.Left,!0);T({...S,from:E})}$&&b.parentId&&g.push({id:H,parentId:b.parentId,rect:{...L.internals.positionAbsolute,width:L.measured.width??0,height:L.measured.height??0}}),p.push(V)}if(g.length>0){const{parentLookup:H,nodeOrigin:L}=y(),b=Nu(g,v,H,L);p.push(...b)}for(const H of R.values())p=H(p);_(p)},triggerNodeChanges:x=>{const{onNodesChange:m,setNodes:g,nodes:p,hasDefaultNodes:v,debug:_}=y();if(x!=null&&x.length){if(v){const S=Nm(x,p);g(S)}_&&console.log("React Flow: trigger node changes",x),m==null||m(x)}},triggerEdgeChanges:x=>{const{onEdgesChange:m,setEdges:g,edges:p,hasDefaultEdges:v,debug:_}=y();if(x!=null&&x.length){if(v){const S=Mm(x,p);g(S)}_&&console.log("React Flow: trigger edge changes",x),m==null||m(x)}},addSelectedNodes:x=>{const{multiSelectionActive:m,edgeLookup:g,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:_}=y();if(m){const S=x.map(T=>En(T,!0));v(S);return}v(ir(p,new Set([...x]),!0)),_(ir(g))},addSelectedEdges:x=>{const{multiSelectionActive:m,edgeLookup:g,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:_}=y();if(m){const S=x.map(T=>En(T,!0));_(S);return}_(ir(g,new Set([...x]))),v(ir(p,new Set,!0))},unselectNodesAndEdges:({nodes:x,edges:m}={})=>{const{edges:g,nodes:p,nodeLookup:v,triggerNodeChanges:_,triggerEdgeChanges:S}=y(),T=x||p,R=m||g,H=[];for(const b of T){if(!b.selected)continue;const $=v.get(b.id);$&&($.selected=!1),H.push(En(b.id,!1))}const L=[];for(const b of R)b.selected&&L.push(En(b.id,!1));_(H),S(L)},setMinZoom:x=>{const{panZoom:m,maxZoom:g}=y();m==null||m.setScaleExtent([x,g]),h({minZoom:x})},setMaxZoom:x=>{const{panZoom:m,minZoom:g}=y();m==null||m.setScaleExtent([g,x]),h({maxZoom:x})},setTranslateExtent:x=>{var m;(m=y().panZoom)==null||m.setTranslateExtent(x),h({translateExtent:x})},resetSelectedElements:()=>{const{edges:x,nodes:m,triggerNodeChanges:g,triggerEdgeChanges:p,elementsSelectable:v}=y();if(!v)return;const _=m.reduce((T,R)=>R.selected?[...T,En(R.id,!1)]:T,[]),S=x.reduce((T,R)=>R.selected?[...T,En(R.id,!1)]:T,[]);g(_),p(S)},setNodeExtent:x=>{const{nodes:m,nodeLookup:g,parentLookup:p,nodeOrigin:v,elevateNodesOnSelect:_,nodeExtent:S,zIndexMode:T}=y();x[0][0]===S[0][0]&&x[0][1]===S[0][1]&&x[1][0]===S[1][0]&&x[1][1]===S[1][1]||(aa(m,g,p,{nodeOrigin:v,nodeExtent:x,elevateNodesOnSelect:_,checkEquality:!1,zIndexMode:T}),h({nodeExtent:x}))},panBy:x=>{const{transform:m,width:g,height:p,panZoom:v,translateExtent:_}=y();return H2({delta:x,panZoom:v,transform:m,translateExtent:_,width:g,height:p})},setCenter:async(x,m,g)=>{const{width:p,height:v,maxZoom:_,panZoom:S}=y();if(!S)return Promise.resolve(!1);const T=typeof(g==null?void 0:g.zoom)<"u"?g.zoom:_;return await S.setViewport({x:p/2-x*T,y:v/2-m*T,zoom:T},{duration:g==null?void 0:g.duration,ease:g==null?void 0:g.ease,interpolate:g==null?void 0:g.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...Hh}})},updateConnection:x=>{h({connection:x})},reset:()=>h({...Fd()})}},Object.is);function qm({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:a,fitView:u,nodeOrigin:f,nodeExtent:c,zIndexMode:d,children:h}){const[y]=U.useState(()=>_4({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:a,nodeOrigin:f,nodeExtent:c,zIndexMode:d}));return F.jsx(HE,{value:y,children:F.jsx(c_,{children:h})})}function S4({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:l,fitViewOptions:a,minZoom:u,maxZoom:f,nodeOrigin:c,nodeExtent:d,zIndexMode:h}){return U.useContext(il)?F.jsx(F.Fragment,{children:e}):F.jsx(qm,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:f,nodeOrigin:c,nodeExtent:d,zIndexMode:h,children:e})}const C4={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function k4({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:a,onInit:u,onMove:f,onMoveStart:c,onMoveEnd:d,onConnect:h,onConnectStart:y,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:m,onNodeMouseEnter:g,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:S,onNodeDragStart:T,onNodeDrag:R,onNodeDragStop:H,onNodesDelete:L,onEdgesDelete:b,onDelete:$,onSelectionChange:V,onSelectionDragStart:E,onSelectionDrag:j,onSelectionDragStop:P,onSelectionContextMenu:O,onSelectionStart:N,onSelectionEnd:I,onBeforeDelete:C,connectionMode:M,connectionLineType:z=qt.Bezier,connectionLineStyle:Y,connectionLineComponent:A,connectionLineContainerStyle:k,deleteKeyCode:D="Backspace",selectionKeyCode:B="Shift",selectionOnDrag:W=!1,selectionMode:X=Eo.Full,panActivationKeyCode:G="Space",multiSelectionKeyCode:Q=So()?"Meta":"Control",zoomActivationKeyCode:Z=So()?"Meta":"Control",snapToGrid:ee,snapGrid:te,onlyRenderVisibleElements:ne=!1,selectNodesOnDrag:re,nodesDraggable:Ce,autoPanOnNodeFocus:lt,nodesConnectable:bt,nodesFocusable:vn,nodeOrigin:Or=Cm,edgesFocusable:zr,edgesReconnectable:jr,elementsSelectable:al=!0,defaultViewport:ti=t_,minZoom:Bn=.5,maxZoom:$r=2,translateExtent:_c=xo,preventScrolling:c0=!0,nodeExtent:ul,defaultMarkerColor:f0="#b1b1b7",zoomOnScroll:d0=!0,zoomOnPinch:h0=!0,panOnScroll:p0=!1,panOnScrollSpeed:g0=.5,panOnScrollMode:m0=Mn.Free,zoomOnDoubleClick:y0=!0,panOnDrag:v0=!0,onPaneClick:w0,onPaneMouseEnter:x0,onPaneMouseMove:E0,onPaneMouseLeave:_0,onPaneScroll:S0,onPaneContextMenu:C0,paneClickDistance:k0=1,nodeClickDistance:N0=0,children:M0,onReconnect:I0,onReconnectStart:P0,onReconnectEnd:T0,onEdgeContextMenu:b0,onEdgeDoubleClick:L0,onEdgeMouseEnter:R0,onEdgeMouseMove:A0,onEdgeMouseLeave:O0,reconnectRadius:z0=10,onNodesChange:j0,onEdgesChange:$0,noDragClassName:D0="nodrag",noWheelClassName:F0="nowheel",noPanClassName:Sc="nopan",fitView:Cc,fitViewOptions:kc,connectOnClick:V0,attributionPosition:H0,proOptions:B0,defaultEdgeOptions:U0,elevateNodesOnSelect:W0=!0,elevateEdgesOnSelect:Y0=!1,disableKeyboardA11y:Nc=!1,autoPanOnConnect:X0,autoPanOnNodeDrag:G0,autoPanSpeed:Q0,connectionRadius:K0,isValidConnection:Z0,onError:q0,style:J0,id:Mc,nodeDragThreshold:e1,connectionDragThreshold:t1,viewport:n1,onViewportChange:r1,width:o1,height:i1,colorMode:s1="light",debug:l1,onScroll:ni,ariaLabelConfig:a1,zIndexMode:Ic="basic",...u1},c1){const cl=Mc||"1",f1=i_(s1),d1=U.useCallback(Pc=>{Pc.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ni==null||ni(Pc)},[ni]);return F.jsx("div",{"data-testid":"rf__wrapper",...u1,onScroll:d1,style:{...J0,...C4},ref:c1,className:Se(["react-flow",o,f1]),id:Mc,role:"application",children:F.jsxs(S4,{nodes:e,edges:t,width:o1,height:i1,fitView:Cc,fitViewOptions:kc,minZoom:Bn,maxZoom:$r,nodeOrigin:Or,nodeExtent:ul,zIndexMode:Ic,children:[F.jsx(o_,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:y,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:m,nodesDraggable:Ce,autoPanOnNodeFocus:lt,nodesConnectable:bt,nodesFocusable:vn,edgesFocusable:zr,edgesReconnectable:jr,elementsSelectable:al,elevateNodesOnSelect:W0,elevateEdgesOnSelect:Y0,minZoom:Bn,maxZoom:$r,nodeExtent:ul,onNodesChange:j0,onEdgesChange:$0,snapToGrid:ee,snapGrid:te,connectionMode:M,translateExtent:_c,connectOnClick:V0,defaultEdgeOptions:U0,fitView:Cc,fitViewOptions:kc,onNodesDelete:L,onEdgesDelete:b,onDelete:$,onNodeDragStart:T,onNodeDrag:R,onNodeDragStop:H,onSelectionDrag:j,onSelectionDragStart:E,onSelectionDragStop:P,onMove:f,onMoveStart:c,onMoveEnd:d,noPanClassName:Sc,nodeOrigin:Or,rfId:cl,autoPanOnConnect:X0,autoPanOnNodeDrag:G0,autoPanSpeed:Q0,onError:q0,connectionRadius:K0,isValidConnection:Z0,selectNodesOnDrag:re,nodeDragThreshold:e1,connectionDragThreshold:t1,onBeforeDelete:C,debug:l1,ariaLabelConfig:a1,zIndexMode:Ic}),F.jsx(E4,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:g,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:_,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:z,connectionLineStyle:Y,connectionLineComponent:A,connectionLineContainerStyle:k,selectionKeyCode:B,selectionOnDrag:W,selectionMode:X,deleteKeyCode:D,multiSelectionKeyCode:Q,panActivationKeyCode:G,zoomActivationKeyCode:Z,onlyRenderVisibleElements:ne,defaultViewport:ti,translateExtent:_c,minZoom:Bn,maxZoom:$r,preventScrolling:c0,zoomOnScroll:d0,zoomOnPinch:h0,zoomOnDoubleClick:y0,panOnScroll:p0,panOnScrollSpeed:g0,panOnScrollMode:m0,panOnDrag:v0,onPaneClick:w0,onPaneMouseEnter:x0,onPaneMouseMove:E0,onPaneMouseLeave:_0,onPaneScroll:S0,onPaneContextMenu:C0,paneClickDistance:k0,nodeClickDistance:N0,onSelectionContextMenu:O,onSelectionStart:N,onSelectionEnd:I,onReconnect:I0,onReconnectStart:P0,onReconnectEnd:T0,onEdgeContextMenu:b0,onEdgeDoubleClick:L0,onEdgeMouseEnter:R0,onEdgeMouseMove:A0,onEdgeMouseLeave:O0,reconnectRadius:z0,defaultMarkerColor:f0,noDragClassName:D0,noWheelClassName:F0,noPanClassName:Sc,rfId:cl,disableKeyboardA11y:Nc,nodeExtent:ul,viewport:n1,onViewportChange:r1}),F.jsx(e_,{onSelectionChange:V}),M0,F.jsx(QE,{proOptions:B0,position:H0}),F.jsx(GE,{rfId:cl,disableKeyboardA11y:Nc})]})})}var N4=Im(k4);const M4=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});function I4(){return ie(M4,he)}function P4(e){const[t,n]=U.useState(e),r=U.useCallback(o=>n(i=>Nm(o,i)),[]);return[t,n,r]}function T4(e){const[t,n]=U.useState(e),r=U.useCallback(o=>n(i=>Mm(o,i)),[]);return[t,n,r]}function b4({dimensions:e,lineWidth:t,variant:n,className:r}){return F.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Se(["react-flow__background-pattern",n,r])})}function L4({radius:e,className:t}){return F.jsx("circle",{cx:e,cy:e,r:e,className:Se(["react-flow__background-pattern","dots",t])})}var Dt;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Dt||(Dt={}));const R4={[Dt.Dots]:1,[Dt.Lines]:1,[Dt.Cross]:6},A4=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Jm({id:e,variant:t=Dt.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:l,style:a,className:u,patternClassName:f}){const c=U.useRef(null),{transform:d,patternId:h}=ie(A4,he),y=r||R4[t],w=t===Dt.Dots,x=t===Dt.Cross,m=Array.isArray(n)?n:[n,n],g=[m[0]*d[2]||1,m[1]*d[2]||1],p=y*d[2],v=Array.isArray(i)?i:[i,i],_=x?[p,p]:g,S=[v[0]*d[2]||1+_[0]/2,v[1]*d[2]||1+_[1]/2],T=`${h}${e||""}`;return F.jsxs("svg",{className:Se(["react-flow__background",u]),style:{...a,...ll,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:c,"data-testid":"rf__background",children:[F.jsx("pattern",{id:T,x:d[0]%g[0],y:d[1]%g[1],width:g[0],height:g[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:w?F.jsx(L4,{radius:p/2,className:f}):F.jsx(b4,{dimensions:_,lineWidth:o,variant:t,className:f})}),F.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${T})`})]})}Jm.displayName="Background";const O4=U.memo(Jm);function z4(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:F.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function j4(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:F.jsx("path",{d:"M0 0h32v4.2H0z"})})}function $4(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:F.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function D4(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:F.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function F4(){return F.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:F.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Ii({children:e,className:t,...n}){return F.jsx("button",{type:"button",className:Se(["react-flow__controls-button",t]),...n,children:e})}const V4=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function e0({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:a,className:u,children:f,position:c="bottom-left",orientation:d="vertical","aria-label":h}){const y=ge(),{isInteractive:w,minZoomReached:x,maxZoomReached:m,ariaLabelConfig:g}=ie(V4,he),{zoomIn:p,zoomOut:v,fitView:_}=sl(),S=()=>{p(),i==null||i()},T=()=>{v(),s==null||s()},R=()=>{_(o),l==null||l()},H=()=>{y.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),a==null||a(!w)},L=d==="horizontal"?"horizontal":"vertical";return F.jsxs(Jo,{className:Se(["react-flow__controls",L,u]),position:c,style:e,"data-testid":"rf__controls","aria-label":h??g["controls.ariaLabel"],children:[t&&F.jsxs(F.Fragment,{children:[F.jsx(Ii,{onClick:S,className:"react-flow__controls-zoomin",title:g["controls.zoomIn.ariaLabel"],"aria-label":g["controls.zoomIn.ariaLabel"],disabled:m,children:F.jsx(z4,{})}),F.jsx(Ii,{onClick:T,className:"react-flow__controls-zoomout",title:g["controls.zoomOut.ariaLabel"],"aria-label":g["controls.zoomOut.ariaLabel"],disabled:x,children:F.jsx(j4,{})})]}),n&&F.jsx(Ii,{className:"react-flow__controls-fitview",onClick:R,title:g["controls.fitView.ariaLabel"],"aria-label":g["controls.fitView.ariaLabel"],children:F.jsx($4,{})}),r&&F.jsx(Ii,{className:"react-flow__controls-interactive",onClick:H,title:g["controls.interactive.ariaLabel"],"aria-label":g["controls.interactive.ariaLabel"],children:w?F.jsx(F4,{}):F.jsx(D4,{})}),f]})}e0.displayName="Controls";U.memo(e0);function H4({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:l,strokeWidth:a,className:u,borderRadius:f,shapeRendering:c,selected:d,onClick:h}){const{background:y,backgroundColor:w}=i||{},x=s||y||w;return F.jsx("rect",{className:Se(["react-flow__minimap-node",{selected:d},u]),x:t,y:n,rx:f,ry:f,width:r,height:o,style:{fill:x,stroke:l,strokeWidth:a},shapeRendering:c,onClick:h?m=>h(m,e):void 0})}const B4=U.memo(H4),U4=e=>e.nodes.map(t=>t.id),Yl=e=>e instanceof Function?e:()=>e;function W4({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=B4,onClick:s}){const l=ie(U4,he),a=Yl(t),u=Yl(e),f=Yl(n),c=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return F.jsx(F.Fragment,{children:l.map(d=>F.jsx(X4,{id:d,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:f,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:c},d))})}function Y4({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:a}){const{node:u,x:f,y:c,width:d,height:h}=ie(y=>{const w=y.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const x=w.internals.userNode,{x:m,y:g}=w.internals.positionAbsolute,{width:p,height:v}=Wt(x);return{node:x,x:m,y:g,width:p,height:v}},he);return!u||u.hidden||!Qh(u)?null:F.jsx(l,{x:f,y:c,width:d,height:h,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:o,strokeColor:n(u),strokeWidth:i,shapeRendering:s,onClick:a,id:u.id})}const X4=U.memo(Y4);var G4=U.memo(W4);const Q4=200,K4=150,Z4=e=>!e.hidden,q4=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Gh(Yo(e.nodeLookup,{filter:Z4}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},J4="react-flow__minimap-desc";function t0({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:a,maskColor:u,maskStrokeColor:f,maskStrokeWidth:c,position:d="bottom-right",onClick:h,onNodeClick:y,pannable:w=!1,zoomable:x=!1,ariaLabel:m,inversePan:g,zoomStep:p=1,offsetScale:v=5}){const _=ge(),S=U.useRef(null),{boundingRect:T,viewBB:R,rfId:H,panZoom:L,translateExtent:b,flowWidth:$,flowHeight:V,ariaLabelConfig:E}=ie(q4,he),j=(e==null?void 0:e.width)??Q4,P=(e==null?void 0:e.height)??K4,O=T.width/j,N=T.height/P,I=Math.max(O,N),C=I*j,M=I*P,z=v*I,Y=T.x-(C-T.width)/2-z,A=T.y-(M-T.height)/2-z,k=C+z*2,D=M+z*2,B=`${J4}-${H}`,W=U.useRef(0),X=U.useRef();W.current=I,U.useEffect(()=>{if(S.current&&L)return X.current=Z2({domNode:S.current,panZoom:L,getTransform:()=>_.getState().transform,getViewScale:()=>W.current}),()=>{var ee;(ee=X.current)==null||ee.destroy()}},[L]),U.useEffect(()=>{var ee;(ee=X.current)==null||ee.update({translateExtent:b,width:$,height:V,inversePan:g,pannable:w,zoomStep:p,zoomable:x})},[w,x,g,p,b,$,V]);const G=h?ee=>{var re;const[te,ne]=((re=X.current)==null?void 0:re.pointer(ee))||[0,0];h(ee,{x:te,y:ne})}:void 0,Q=y?U.useCallback((ee,te)=>{const ne=_.getState().nodeLookup.get(te).internals.userNode;y(ee,ne)},[]):void 0,Z=m??E["minimap.ariaLabel"];return F.jsx(Jo,{position:d,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-width-props":typeof c=="number"?c*I:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Se(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:F.jsxs("svg",{width:j,height:P,viewBox:`${Y} ${A} ${k} ${D}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":B,ref:S,onClick:G,children:[Z&&F.jsx("title",{id:B,children:Z}),F.jsx(G4,{onClick:Q,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:l}),F.jsx("path",{className:"react-flow__minimap-mask",d:`M${Y-z},${A-z}h${k+z*2}v${D+z*2}h${-k-z*2}z
|
|
63
|
-
M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}t0.displayName="MiniMap";U.memo(t0);const eS=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,tS={[xr.Line]:"right",[xr.Handle]:"bottom-right"};function nS({nodeId:e,position:t,variant:n=xr.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:f=Number.MAX_VALUE,keepAspectRatio:c=!1,resizeDirection:d,autoScale:h=!0,shouldResize:y,onResizeStart:w,onResize:x,onResizeEnd:m}){const g=Lm(),p=typeof e=="string"?e:g,v=ge(),_=U.useRef(null),S=n===xr.Handle,T=ie(U.useCallback(eS(S&&h),[S,h]),he),R=U.useRef(null),H=t??tS[n];U.useEffect(()=>{if(!(!_.current||!p))return R.current||(R.current=fx({domNode:_.current,nodeId:p,getStoreItems:()=>{const{nodeLookup:b,transform:$,snapGrid:V,snapToGrid:E,nodeOrigin:j,domNode:P}=v.getState();return{nodeLookup:b,transform:$,snapGrid:V,snapToGrid:E,nodeOrigin:j,paneDomNode:P}},onChange:(b,$)=>{const{triggerNodeChanges:V,nodeLookup:E,parentLookup:j,nodeOrigin:P}=v.getState(),O=[],N={x:b.x,y:b.y},I=E.get(p);if(I&&I.expandParent&&I.parentId){const C=I.origin??P,M=b.width??I.measured.width??0,z=b.height??I.measured.height??0,Y={id:I.id,parentId:I.parentId,rect:{width:M,height:z,...Kh({x:b.x??I.position.x,y:b.y??I.position.y},{width:M,height:z},I.parentId,E,C)}},A=Nu([Y],E,j,P);O.push(...A),N.x=b.x?Math.max(C[0]*M,b.x):void 0,N.y=b.y?Math.max(C[1]*z,b.y):void 0}if(N.x!==void 0&&N.y!==void 0){const C={id:p,type:"position",position:{...N}};O.push(C)}if(b.width!==void 0&&b.height!==void 0){const M={id:p,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:b.width,height:b.height}};O.push(M)}for(const C of $){const M={...C,type:"position"};O.push(M)}V(O)},onEnd:({width:b,height:$})=>{const V={id:p,type:"dimensions",resizing:!1,dimensions:{width:b,height:$}};v.getState().triggerNodeChanges([V])}})),R.current.update({controlPosition:H,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:f},keepAspectRatio:c,resizeDirection:d,onResizeStart:w,onResize:x,onResizeEnd:m,shouldResize:y}),()=>{var b;(b=R.current)==null||b.destroy()}},[H,l,a,u,f,c,w,x,m,y]);const L=H.split("-");return F.jsx("div",{className:Se(["react-flow__resize-control","nodrag",...L,n,r]),ref:_,style:{...o,scale:T,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}U.memo(nS);var Pr;(function(e){e.Parsing="Parsing",e.Validation="Validation",e.Network="Network",e.Dependency="Dependency",e.Rendering="Rendering",e.Timeout="Timeout",e.Permission="Permission",e.Configuration="Configuration",e.Runtime="Runtime"})(Pr||(Pr={}));var Vd;(function(e){e.Debug="debug",e.Info="info",e.Warn="warn",e.Error="error",e.Success="success"})(Vd||(Vd={}));const pn={PLUGIN_ERROR:"PLUGIN_ERROR",RETRY_VISUALIZATION:"RETRY_VISUALIZATION",CLOSE_VISUALIZER:"CLOSE_VISUALIZER",COPY_STACK_TRACE:"COPY_STACK_TRACE",OPEN_SETTINGS:"openSettings",REQUEST_PLUGIN_DATA:"REQUEST_PLUGIN_DATA",PLUGIN_DATA_RESPONSE:"PLUGIN_DATA_RESPONSE",PLUGIN_DATA_UPDATE:"PLUGIN_DATA_UPDATE",SUBMIT_EDIT:"SUBMIT_EDIT",SUBMIT_EDIT_RESULT:"SUBMIT_EDIT_RESULT"};new Set(Object.values(pn));let Qr=null;function Qi(){return typeof window<"u"&&typeof window.getHostApi=="function"}function wc(e){const t=window.__ExtensionHostExpectedRenderId;return t===void 0||e.renderId===t}function n0(e){if(typeof window>"u")return console.error("[sendToHost] Not in browser context"),!1;if(typeof window.__ExtensionHostPostMessage=="function")try{return window.__ExtensionHostPostMessage(e),!0}catch(t){console.error("[sendToHost] Error sending via __ExtensionHostPostMessage:",t)}if(window.parent&&window.parent!==window)try{const t=typeof window.location<"u"&&window.location.origin?window.location.origin:"*";return window.parent.postMessage(e,t),!0}catch(t){console.error("[sendToHost] Error sending via window.parent:",t)}return console.error("[sendToHost] No host communication channel available"),!1}function rS(e){var n,r;if(!Qi()||typeof window.__ExtensionHostPostMessage!="function")return Promise.reject(new Error("vibe-edit: acknowledged submission is only available in VS Code"));const t=((r=(n=globalThis.crypto)==null?void 0:n.randomUUID)==null?void 0:r.call(n))??`${Date.now()}-${Math.random()}`;return new Promise((o,i)=>{const s=window.setTimeout(()=>{l(),i(new Error("vibe-edit: host acknowledgement timed out; the edit may still be pending"))},12e4),l=()=>{clearTimeout(s),window.removeEventListener("message",a)},a=u=>{if(!xc(u))return;const f=u.data,c=f.payload;f.type!==pn.SUBMIT_EDIT_RESULT||!wc(f)||(c==null?void 0:c.requestId)!==t||(l(),c.result.delivered?o(c):i(new Error(c.result.detail??"vibe-edit: host did not deliver the edit")))};window.addEventListener("message",a);try{window.__ExtensionHostPostMessage({type:pn.SUBMIT_EDIT,payload:e,requestId:t})}catch(u){l(),i(u)}})}async function oS(e=5e3){return typeof window.__ExtensionHostPostMessage!="function"?(console.error("[getPluginData] Extension host postMessage not available. Ensure platform bootstrap has run."),Promise.resolve(null)):(Qr!==null||(Qr=new Promise(t=>{let n=0;const r=i=>{if(!xc(i))return;const s=i.data;s.type===pn.PLUGIN_DATA_RESPONSE&&wc(s)&&(o(),t(s.payload))};function o(){n&&(clearTimeout(n),n=0),window.removeEventListener("message",r),Qr=null}window.addEventListener("message",r),n=window.setTimeout(()=>{console.error("[getPluginData] Timeout waiting for plugin data"),o(),t(null)},e),window.__ExtensionHostPostMessage({type:pn.REQUEST_PLUGIN_DATA})})),Qr)}function xc(e){var t,n;return e.source===null?!0:typeof window>"u"?!1:window.parent!==window&&e.source===window.parent||window.parent===window&&((n=(t=e.source)==null?void 0:t.constructor)==null?void 0:n.name)==="Window"}function iS(e){const t=n=>{if(!xc(n))return;const r=n.data;if(r.type===pn.PLUGIN_DATA_UPDATE&&wc(r)){const o=r.payload;e(o)}};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}}class Fn{constructor(){this.error={}}static create(){return new Fn}category(t){return this.error.category=t,this}message(t){return this.error.message=t,this}stackTrace(t){return this.error.stackTrace=t,this}context(t){return this.error.context={...this.error.context,...t},this}build(){if(!this.error.category)throw new Error("ErrorBuilder: category is required");if(!this.error.message)throw new Error("ErrorBuilder: message is required");return this.error}send(){const t=this.build();n0({type:pn.PLUGIN_ERROR,payload:t})||console.error("[ErrorBuilder] Unable to send error to host:",t)}static fromError(t,n,r){const o=Fn.create().category(t);return n instanceof Error?(o.message(n.message),o.stackTrace(n.stack)):o.message(String(n)),r&&o.context(r),o}}function sS(){typeof window>"u"||(window.addEventListener("error",e=>{const t=e.error;Fn.create().category(Pr.Runtime).message(e.message||"An error occurred").stackTrace(t==null?void 0:t.stack).context({lineno:e.lineno,colno:e.colno,filename:e.filename}).send()}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;let n;if(t instanceof Error)n=t.message;else if(t!=null&&typeof t=="object")try{n=JSON.stringify(t)}catch{n=String(t)}else n=t!=null?String(t):"Unhandled promise rejection";Fn.create().category(Pr.Runtime).message(n).stackTrace(t instanceof Error?t.stack:void 0).send()}))}const Tr="data-mv-selectable",br="data-mv-type",ou="data-mv-id",Hd="data-mv-selected",Bd="data-mv-hover",r0=.5,lS=5;function Pi(e,t,n,r){return{left:Math.min(e,n),top:Math.min(t,r),right:Math.max(e,n),bottom:Math.max(t,r)}}function aS(e,t){const n=Math.max(0,Math.min(e.right,t.right)-Math.max(e.left,t.left)),r=Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top));return n*r}function uS(e){return Math.max(0,e.right-e.left)*Math.max(0,e.bottom-e.top)}function o0(e,t){const n=uS(t);return n<=0?0:aS(e,t)/n}function Ec(e){const t=e.getAttribute(br),n=e.getAttribute(ou);return!t||!n?null:{type:t,id:n}}function Ki(e){return`${e.type}::${e.id}`}function cS(e,t,n=r0){const o=Array.from(e.querySelectorAll(`[${Tr}]`)).filter(l=>{const a=l.getBoundingClientRect();return o0(t,{left:a.left,top:a.top,right:a.right,bottom:a.bottom})>=n}),i=new Set(o),s=[];for(const l of o){let a=l.parentElement,u=!1;for(;a;){if(i.has(a)){u=!0;break}a=a.parentElement}if(u)continue;const f=Ec(l);f&&s.push(f)}return s}function fS(e,t,n=r0){const r=Array.from(e.querySelectorAll(`[${Tr}]`)),o=[];for(const i of r){const s=i.getBoundingClientRect();if(o0(t,{left:s.left,top:s.top,right:s.right,bottom:s.bottom})>=n){const l=Ec(i);l&&o.push(l)}}return o}function Xl(e,t,n){const r=Array.from(e.querySelectorAll(`[${Tr}]`));let o=null;for(const i of r){const s=i.getBoundingClientRect();if(t<s.left||t>s.right||n<s.top||n>s.bottom)continue;const l=(s.right-s.left)*(s.bottom-s.top);(!o||l<o.area)&&(o={el:i,area:l})}return o?Ec(o.el):null}function dS(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24))>>>0;return t.toString(16).padStart(8,"0")}function i0(e,t,n,r=0){return`${t}_${dS(`${e}/${t}:${n}#${r}`)}`}function s0(e){return i0("","object",e)}function hS(e,t){return i0(s0(e),"field",t)}const pS=()=>F.jsx("svg",{className:"field-row__icon",viewBox:"0 0 52 52",width:"14",height:"14","aria-label":"Identity field",children:F.jsx("path",{fill:"currentColor",d:"M46 8H34.9l.1 1a7 7 0 0 1-7 7h-6a7 7 0 0 1-7-7l.1-1H6a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h40a4 4 0 0 0 4-4V12a4 4 0 0 0-4-4M21.7 38H10.3C9 38 8 36.8 8 35.5c0-2 2.1-3.1 4.3-4 1.5-.6 1.7-1.2 1.7-1.9 0-.6-.4-1.2-.9-1.7-.9-.8-1.4-2-1.4-3.3 0-2.5 1.5-4.6 4.2-4.6s4.2 2.1 4.2 4.6c0 1.3-.5 2.5-1.4 3.3-.5.5-.9 1.1-.9 1.7s.2 1.2 1.7 1.9c2.2.9 4.3 2 4.3 4 .2 1.3-.8 2.5-2.1 2.5M44 34a.94.94 0 0 1-1 1H29a.94.94 0 0 1-1-1v-2a.94.94 0 0 1 1-1h14a.94.94 0 0 1 1 1zm2-8a.94.94 0 0 1-1 1H29a.94.94 0 0 1-1-1v-2a.94.94 0 0 1 1-1h16a.94.94 0 0 1 1 1zM22 12h6c1.7 0 3-1.3 3-3s-1.3-3-3-3h-6c-1.7 0-3 1.3-3 3s1.3 3 3 3"})}),Gl=({field:e,isNameField:t,objectApiName:n})=>{const[r,o]=U.useState(!1),[i,s]=U.useState({top:0,left:0}),l=U.useRef(null),a=e.description||e.helpText,u=()=>{if(!a||!l.current)return;const h=l.current.getBoundingClientRect();s({top:h.top,left:h.left+h.width/2}),o(!0)},f=["field-row",a?"field-row--hoverable":"",r?"field-row--hovered":""].filter(Boolean).join(" "),c=e.isRelationship?`${e.apiName}`:void 0,d=hS(n,e.apiName);return F.jsxs("div",{ref:l,className:f,"data-mv-id":d,onMouseEnter:u,onMouseLeave:()=>o(!1),children:[e.isRelationship&&c&&F.jsx(Dn,{type:"source",position:J.Right,id:c,className:"field-row__handle"}),F.jsxs("div",{className:"field-row__name",children:[t&&F.jsx(pS,{}),e.isExternalId&&F.jsx("span",{className:"field-row__ext-tag",children:"[EXT]"}),F.jsx("span",{className:`field-row__api-name ${e.isRelationship?"field-row__api-name--relationship":""}`,children:e.apiName})]}),F.jsx("span",{className:"field-row__type",children:e.dataType}),r&&a&&yc.createPortal(F.jsxs("div",{className:"field-row__tooltip",style:{top:i.top,left:i.left},children:[e.description&&F.jsxs("div",{children:[F.jsx("strong",{children:"Description:"})," ",e.description]}),e.helpText&&F.jsxs("div",{style:{marginTop:e.description?4:0},children:[F.jsx("strong",{children:"Help Text:"})," ",e.helpText]})]}),document.body)]})},gS=({data:e})=>{const t=e.type==="standard"?"standard":"custom",n=e.isActive?"object-card--active":"",r=e.isInactive?"object-card--inactive":"",o={apiName:"Name",label:"Name",dataType:e.nameFieldType==="AutoNumber"?"Auto-Number":"Text (255)",isRelationship:!1},i=e.fields.filter(l=>l.isRelationship),s=e.fields.filter(l=>!l.isRelationship);return F.jsxs("div",{className:`object-card object-card--${t} ${n} ${r}`,"data-mv-id":s0(e.apiName),children:[e.isActive&&F.jsxs("div",{className:"object-card__active-badge",children:[e.apiName,".object-meta.xml"]}),F.jsxs("div",{className:"object-card__header",children:[F.jsx("div",{className:"object-card__title",title:"API Name",children:e.apiName}),F.jsxs("div",{className:"object-card__subtitle",title:"Master Label",children:[F.jsx("span",{className:"object-card__subtitle-prefix",children:"Label: "}),e.label]})]}),F.jsxs("div",{className:"object-card__fields nowheel",children:[F.jsx(Gl,{field:o,isNameField:!0,objectApiName:e.apiName}),i.map(l=>F.jsx(Gl,{field:l,objectApiName:e.apiName},l.apiName)),s.map(l=>F.jsx(Gl,{field:l,objectApiName:e.apiName},l.apiName))]}),F.jsx(Dn,{type:"target",position:J.Left,className:`object-card__handle object-card__handle--${t}`}),F.jsx(Dn,{type:"source",position:J.Right,className:`object-card__handle object-card__handle--${t}`})]})},mS=({id:e,sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:s,data:l,markerEnd:a})=>{const u=l,f=(u==null?void 0:u.relType)==="MasterDetail",[c]=ls({sourceX:t,sourceY:n,targetX:r,targetY:o,sourcePosition:i,targetPosition:s,borderRadius:16}),d="var(--mv-edge-neutral)",h=(u==null?void 0:u.sourceType)==="standard"?"var(--mv-accent-logic)":"var(--mv-accent-data)",y=(u==null?void 0:u.targetType)==="standard"?"var(--mv-accent-logic)":"var(--mv-accent-data)";return F.jsxs(F.Fragment,{children:[F.jsx(ei,{id:e,path:c,markerEnd:a,style:{stroke:d,strokeWidth:f?2.5:2,strokeDasharray:f?"none":"8 4"}}),F.jsx("circle",{cx:t,cy:n,r:6,fill:h,stroke:"var(--mv-bg-surface)",strokeWidth:2}),F.jsx("circle",{cx:r,cy:o,r:6,fill:y,stroke:"var(--mv-bg-surface)",strokeWidth:2}),F.jsxs("g",{transform:`translate(${r-16}, ${o})`,children:[F.jsx("line",{x1:"0",y1:"-6",x2:"12",y2:"0",style:{stroke:d},strokeWidth:"1.5"}),F.jsx("line",{x1:"0",y1:"6",x2:"12",y2:"0",style:{stroke:d},strokeWidth:"1.5"}),F.jsx("line",{x1:"0",y1:"0",x2:"12",y2:"0",style:{stroke:d},strokeWidth:"1.5"})]})]})},yS={searchQuery:"",showStandard:!0,showCustom:!0,showNamespaced:!1,showOrphaned:!1,displayRelationships:!0,autoLayout:!0},vS=()=>F.jsxs("div",{className:"legend-panel",children:[F.jsx("div",{className:"legend-panel__header",children:"LEGEND"}),F.jsxs("div",{className:"legend-panel__body",children:[F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__swatch legend-panel__swatch--standard"})}),"Standard Object"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__swatch legend-panel__swatch--custom"})}),"Custom Object"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__swatch legend-panel__swatch--active"})}),"Active File"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__line--lookup"})}),"Lookup"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__line--master-detail"})}),"Master Detail"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("svg",{viewBox:"0 0 52 52",width:"16",height:"16",className:"legend-panel__svg--identity",children:F.jsx("path",{fill:"currentColor",d:"M46 8H34.9l.1 1a7 7 0 0 1-7 7h-6a7 7 0 0 1-7-7l.1-1H6a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h40a4 4 0 0 0 4-4V12a4 4 0 0 0-4-4M21.7 38H10.3C9 38 8 36.8 8 35.5c0-2 2.1-3.1 4.3-4 1.5-.6 1.7-1.2 1.7-1.9 0-.6-.4-1.2-.9-1.7-.9-.8-1.4-2-1.4-3.3 0-2.5 1.5-4.6 4.2-4.6s4.2 2.1 4.2 4.6c0 1.3-.5 2.5-1.4 3.3-.5.5-.9 1.1-.9 1.7s.2 1.2 1.7 1.9c2.2.9 4.3 2 4.3 4 .2 1.3-.8 2.5-2.1 2.5M44 34a.94.94 0 0 1-1 1H29a.94.94 0 0 1-1-1v-2a.94.94 0 0 1 1-1h14a.94.94 0 0 1 1 1zm2-8a.94.94 0 0 1-1 1H29a.94.94 0 0 1-1-1v-2a.94.94 0 0 1 1-1h16a.94.94 0 0 1 1 1zM22 12h6c1.7 0 3-1.3 3-3s-1.3-3-3-3h-6c-1.7 0-3 1.3-3 3s1.3 3 3 3"})})}),"Identity (Name)"]}),F.jsxs("div",{className:"legend-panel__item",children:[F.jsx("span",{className:"legend-panel__icon",children:F.jsx("span",{className:"legend-panel__ext-tag",children:"[EXT]"})}),"External ID"]})]})]});var ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xt=ue((e,t)=>{var n=Object.defineProperty,r=(V,E,j)=>E in V?n(V,E,{enumerable:!0,configurable:!0,writable:!0,value:j}):V[E]=j,o=(V,E)=>()=>(E||V((E={exports:{}}).exports,E),E.exports),i=(V,E,j)=>r(V,typeof E!="symbol"?E+"":E,j),s=o((V,E)=>{var j="\0",P="\0",O="",N=class{constructor(A){i(this,"_isDirected",!0),i(this,"_isMultigraph",!1),i(this,"_isCompound",!1),i(this,"_label"),i(this,"_defaultNodeLabelFn",()=>{}),i(this,"_defaultEdgeLabelFn",()=>{}),i(this,"_nodes",{}),i(this,"_in",{}),i(this,"_preds",{}),i(this,"_out",{}),i(this,"_sucs",{}),i(this,"_edgeObjs",{}),i(this,"_edgeLabels",{}),i(this,"_nodeCount",0),i(this,"_edgeCount",0),i(this,"_parent"),i(this,"_children"),A&&(this._isDirected=Object.hasOwn(A,"directed")?A.directed:!0,this._isMultigraph=Object.hasOwn(A,"multigraph")?A.multigraph:!1,this._isCompound=Object.hasOwn(A,"compound")?A.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[P]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(A){return this._label=A,this}graph(){return this._label}setDefaultNodeLabel(A){return this._defaultNodeLabelFn=A,typeof A!="function"&&(this._defaultNodeLabelFn=()=>A),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var A=this;return this.nodes().filter(k=>Object.keys(A._in[k]).length===0)}sinks(){var A=this;return this.nodes().filter(k=>Object.keys(A._out[k]).length===0)}setNodes(A,k){var D=arguments,B=this;return A.forEach(function(W){D.length>1?B.setNode(W,k):B.setNode(W)}),this}setNode(A,k){return Object.hasOwn(this._nodes,A)?(arguments.length>1&&(this._nodes[A]=k),this):(this._nodes[A]=arguments.length>1?k:this._defaultNodeLabelFn(A),this._isCompound&&(this._parent[A]=P,this._children[A]={},this._children[P][A]=!0),this._in[A]={},this._preds[A]={},this._out[A]={},this._sucs[A]={},++this._nodeCount,this)}node(A){return this._nodes[A]}hasNode(A){return Object.hasOwn(this._nodes,A)}removeNode(A){var k=this;if(Object.hasOwn(this._nodes,A)){var D=B=>k.removeEdge(k._edgeObjs[B]);delete this._nodes[A],this._isCompound&&(this._removeFromParentsChildList(A),delete this._parent[A],this.children(A).forEach(function(B){k.setParent(B)}),delete this._children[A]),Object.keys(this._in[A]).forEach(D),delete this._in[A],delete this._preds[A],Object.keys(this._out[A]).forEach(D),delete this._out[A],delete this._sucs[A],--this._nodeCount}return this}setParent(A,k){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(k===void 0)k=P;else{k+="";for(var D=k;D!==void 0;D=this.parent(D))if(D===A)throw new Error("Setting "+k+" as parent of "+A+" would create a cycle");this.setNode(k)}return this.setNode(A),this._removeFromParentsChildList(A),this._parent[A]=k,this._children[k][A]=!0,this}_removeFromParentsChildList(A){delete this._children[this._parent[A]][A]}parent(A){if(this._isCompound){var k=this._parent[A];if(k!==P)return k}}children(A=P){if(this._isCompound){var k=this._children[A];if(k)return Object.keys(k)}else{if(A===P)return this.nodes();if(this.hasNode(A))return[]}}predecessors(A){var k=this._preds[A];if(k)return Object.keys(k)}successors(A){var k=this._sucs[A];if(k)return Object.keys(k)}neighbors(A){var k=this.predecessors(A);if(k){let B=new Set(k);for(var D of this.successors(A))B.add(D);return Array.from(B.values())}}isLeaf(A){var k;return this.isDirected()?k=this.successors(A):k=this.neighbors(A),k.length===0}filterNodes(A){var k=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});k.setGraph(this.graph());var D=this;Object.entries(this._nodes).forEach(function([X,G]){A(X)&&k.setNode(X,G)}),Object.values(this._edgeObjs).forEach(function(X){k.hasNode(X.v)&&k.hasNode(X.w)&&k.setEdge(X,D.edge(X))});var B={};function W(X){var G=D.parent(X);return G===void 0||k.hasNode(G)?(B[X]=G,G):G in B?B[G]:W(G)}return this._isCompound&&k.nodes().forEach(X=>k.setParent(X,W(X))),k}setDefaultEdgeLabel(A){return this._defaultEdgeLabelFn=A,typeof A!="function"&&(this._defaultEdgeLabelFn=()=>A),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(A,k){var D=this,B=arguments;return A.reduce(function(W,X){return B.length>1?D.setEdge(W,X,k):D.setEdge(W,X),X}),this}setEdge(){var A,k,D,B,W=!1,X=arguments[0];typeof X=="object"&&X!==null&&"v"in X?(A=X.v,k=X.w,D=X.name,arguments.length===2&&(B=arguments[1],W=!0)):(A=X,k=arguments[1],D=arguments[3],arguments.length>2&&(B=arguments[2],W=!0)),A=""+A,k=""+k,D!==void 0&&(D=""+D);var G=M(this._isDirected,A,k,D);if(Object.hasOwn(this._edgeLabels,G))return W&&(this._edgeLabels[G]=B),this;if(D!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(A),this.setNode(k),this._edgeLabels[G]=W?B:this._defaultEdgeLabelFn(A,k,D);var Q=z(this._isDirected,A,k,D);return A=Q.v,k=Q.w,Object.freeze(Q),this._edgeObjs[G]=Q,I(this._preds[k],A),I(this._sucs[A],k),this._in[k][G]=Q,this._out[A][G]=Q,this._edgeCount++,this}edge(A,k,D){var B=arguments.length===1?Y(this._isDirected,arguments[0]):M(this._isDirected,A,k,D);return this._edgeLabels[B]}edgeAsObj(){let A=this.edge(...arguments);return typeof A!="object"?{label:A}:A}hasEdge(A,k,D){var B=arguments.length===1?Y(this._isDirected,arguments[0]):M(this._isDirected,A,k,D);return Object.hasOwn(this._edgeLabels,B)}removeEdge(A,k,D){var B=arguments.length===1?Y(this._isDirected,arguments[0]):M(this._isDirected,A,k,D),W=this._edgeObjs[B];return W&&(A=W.v,k=W.w,delete this._edgeLabels[B],delete this._edgeObjs[B],C(this._preds[k],A),C(this._sucs[A],k),delete this._in[k][B],delete this._out[A][B],this._edgeCount--),this}inEdges(A,k){return this.isDirected()?this.filterEdges(this._in[A],A,k):this.nodeEdges(A,k)}outEdges(A,k){return this.isDirected()?this.filterEdges(this._out[A],A,k):this.nodeEdges(A,k)}nodeEdges(A,k){if(A in this._nodes)return this.filterEdges({...this._in[A],...this._out[A]},A,k)}filterEdges(A,k,D){if(A){var B=Object.values(A);return D?B.filter(function(W){return W.v===k&&W.w===D||W.v===D&&W.w===k}):B}}};function I(A,k){A[k]?A[k]++:A[k]=1}function C(A,k){--A[k]||delete A[k]}function M(A,k,D,B){var W=""+k,X=""+D;if(!A&&W>X){var G=W;W=X,X=G}return W+O+X+O+(B===void 0?j:B)}function z(A,k,D,B){var W=""+k,X=""+D;if(!A&&W>X){var G=W;W=X,X=G}var Q={v:W,w:X};return B&&(Q.name=B),Q}function Y(A,k){return M(A,k.v,k.w,k.name)}E.exports=N}),l=o((V,E)=>{E.exports="3.0.2"}),a=o((V,E)=>{E.exports={Graph:s(),version:l()}}),u=o((V,E)=>{var j=s();E.exports={write:P,read:I};function P(C){var M={options:{directed:C.isDirected(),multigraph:C.isMultigraph(),compound:C.isCompound()},nodes:O(C),edges:N(C)};return C.graph()!==void 0&&(M.value=structuredClone(C.graph())),M}function O(C){return C.nodes().map(function(M){var z=C.node(M),Y=C.parent(M),A={v:M};return z!==void 0&&(A.value=z),Y!==void 0&&(A.parent=Y),A})}function N(C){return C.edges().map(function(M){var z=C.edge(M),Y={v:M.v,w:M.w};return M.name!==void 0&&(Y.name=M.name),z!==void 0&&(Y.value=z),Y})}function I(C){var M=new j(C.options).setGraph(C.value);return C.nodes.forEach(function(z){M.setNode(z.v,z.value),z.parent&&M.setParent(z.v,z.parent)}),C.edges.forEach(function(z){M.setEdge({v:z.v,w:z.w,name:z.name},z.value)}),M}}),f=o((V,E)=>{E.exports=P;var j=()=>1;function P(N,I,C,M){return O(N,String(I),C||j,M||function(z){return N.outEdges(z)})}function O(N,I,C,M){var z={},Y=!0,A=0,k=N.nodes(),D=function(G){var Q=C(G);z[G.v].distance+Q<z[G.w].distance&&(z[G.w]={distance:z[G.v].distance+Q,predecessor:G.v},Y=!0)},B=function(){k.forEach(function(G){M(G).forEach(function(Q){var Z=Q.v===G?Q.v:Q.w,ee=Z===Q.v?Q.w:Q.v;D({v:Z,w:ee})})})};k.forEach(function(G){var Q=G===I?0:Number.POSITIVE_INFINITY;z[G]={distance:Q}});for(var W=k.length,X=1;X<W&&(Y=!1,A++,B(),!!Y);X++);if(A===W-1&&(Y=!1,B(),Y))throw new Error("The graph contains a negative weight cycle");return z}}),c=o((V,E)=>{E.exports=j;function j(P){var O={},N=[],I;function C(M){Object.hasOwn(O,M)||(O[M]=!0,I.push(M),P.successors(M).forEach(C),P.predecessors(M).forEach(C))}return P.nodes().forEach(function(M){I=[],C(M),I.length&&N.push(I)}),N}}),d=o((V,E)=>{var j=class{constructor(){i(this,"_arr",[]),i(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(P){return P.key})}has(P){return Object.hasOwn(this._keyIndices,P)}priority(P){var O=this._keyIndices[P];if(O!==void 0)return this._arr[O].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(P,O){var N=this._keyIndices;if(P=String(P),!Object.hasOwn(N,P)){var I=this._arr,C=I.length;return N[P]=C,I.push({key:P,priority:O}),this._decrease(C),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var P=this._arr.pop();return delete this._keyIndices[P.key],this._heapify(0),P.key}decrease(P,O){var N=this._keyIndices[P];if(O>this._arr[N].priority)throw new Error("New priority is greater than current priority. Key: "+P+" Old: "+this._arr[N].priority+" New: "+O);this._arr[N].priority=O,this._decrease(N)}_heapify(P){var O=this._arr,N=2*P,I=N+1,C=P;N<O.length&&(C=O[N].priority<O[C].priority?N:C,I<O.length&&(C=O[I].priority<O[C].priority?I:C),C!==P&&(this._swap(P,C),this._heapify(C)))}_decrease(P){for(var O=this._arr,N=O[P].priority,I;P!==0&&(I=P>>1,!(O[I].priority<N));)this._swap(P,I),P=I}_swap(P,O){var N=this._arr,I=this._keyIndices,C=N[P],M=N[O];N[P]=M,N[O]=C,I[M.key]=P,I[C.key]=O}};E.exports=j}),h=o((V,E)=>{var j=d();E.exports=O;var P=()=>1;function O(I,C,M,z){var Y=function(A){return I.outEdges(A)};return N(I,String(C),M||P,z||Y)}function N(I,C,M,z){var Y={},A=new j,k,D,B=function(W){var X=W.v!==k?W.v:W.w,G=Y[X],Q=M(W),Z=D.distance+Q;if(Q<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+W+" Weight: "+Q);Z<G.distance&&(G.distance=Z,G.predecessor=k,A.decrease(X,Z))};for(I.nodes().forEach(function(W){var X=W===C?0:Number.POSITIVE_INFINITY;Y[W]={distance:X},A.add(W,X)});A.size()>0&&(k=A.removeMin(),D=Y[k],D.distance!==Number.POSITIVE_INFINITY);)z(k).forEach(B);return Y}}),y=o((V,E)=>{var j=h();E.exports=P;function P(O,N,I){return O.nodes().reduce(function(C,M){return C[M]=j(O,M,N,I),C},{})}}),w=o((V,E)=>{E.exports=j;function j(O,N,I){if(O[N].predecessor!==void 0)throw new Error("Invalid source vertex");if(O[I].predecessor===void 0&&I!==N)throw new Error("Invalid destination vertex");return{weight:O[I].distance,path:P(O,N,I)}}function P(O,N,I){for(var C=[],M=I;M!==N;)C.push(M),M=O[M].predecessor;return C.push(N),C.reverse()}}),x=o((V,E)=>{E.exports=j;function j(P){var O=0,N=[],I={},C=[];function M(z){var Y=I[z]={onStack:!0,lowlink:O,index:O++};if(N.push(z),P.successors(z).forEach(function(D){Object.hasOwn(I,D)?I[D].onStack&&(Y.lowlink=Math.min(Y.lowlink,I[D].index)):(M(D),Y.lowlink=Math.min(Y.lowlink,I[D].lowlink))}),Y.lowlink===Y.index){var A=[],k;do k=N.pop(),I[k].onStack=!1,A.push(k);while(z!==k);C.push(A)}}return P.nodes().forEach(function(z){Object.hasOwn(I,z)||M(z)}),C}}),m=o((V,E)=>{var j=x();E.exports=P;function P(O){return j(O).filter(function(N){return N.length>1||N.length===1&&O.hasEdge(N[0],N[0])})}}),g=o((V,E)=>{E.exports=P;var j=()=>1;function P(N,I,C){return O(N,I||j,C||function(M){return N.outEdges(M)})}function O(N,I,C){var M={},z=N.nodes();return z.forEach(function(Y){M[Y]={},M[Y][Y]={distance:0},z.forEach(function(A){Y!==A&&(M[Y][A]={distance:Number.POSITIVE_INFINITY})}),C(Y).forEach(function(A){var k=A.v===Y?A.w:A.v,D=I(A);M[Y][k]={distance:D,predecessor:Y}})}),z.forEach(function(Y){var A=M[Y];z.forEach(function(k){var D=M[k];z.forEach(function(B){var W=D[Y],X=A[B],G=D[B],Q=W.distance+X.distance;Q<G.distance&&(G.distance=Q,G.predecessor=X.predecessor)})})}),M}}),p=o((V,E)=>{function j(O){var N={},I={},C=[];function M(z){if(Object.hasOwn(I,z))throw new P;Object.hasOwn(N,z)||(I[z]=!0,N[z]=!0,O.predecessors(z).forEach(M),delete I[z],C.push(z))}if(O.sinks().forEach(M),Object.keys(N).length!==O.nodeCount())throw new P;return C}var P=class extends Error{constructor(){super(...arguments)}};E.exports=j,j.CycleException=P}),v=o((V,E)=>{var j=p();E.exports=P;function P(O){try{j(O)}catch(N){if(N instanceof j.CycleException)return!1;throw N}return!0}}),_=o((V,E)=>{E.exports=j;function j(O,N,I,C,M){Array.isArray(N)||(N=[N]);var z=(O.isDirected()?O.successors:O.neighbors).bind(O),Y={};return N.forEach(function(A){if(!O.hasNode(A))throw new Error("Graph does not have node: "+A);M=P(O,A,I==="post",Y,z,C,M)}),M}function P(O,N,I,C,M,z,Y){return Object.hasOwn(C,N)||(C[N]=!0,I||(Y=z(Y,N)),M(N).forEach(function(A){Y=P(O,A,I,C,M,z,Y)}),I&&(Y=z(Y,N))),Y}}),S=o((V,E)=>{var j=_();E.exports=P;function P(O,N,I){return j(O,N,I,function(C,M){return C.push(M),C},[])}}),T=o((V,E)=>{var j=S();E.exports=P;function P(O,N){return j(O,N,"post")}}),R=o((V,E)=>{var j=S();E.exports=P;function P(O,N){return j(O,N,"pre")}}),H=o((V,E)=>{var j=s(),P=d();E.exports=O;function O(N,I){var C=new j,M={},z=new P,Y;function A(D){var B=D.v===Y?D.w:D.v,W=z.priority(B);if(W!==void 0){var X=I(D);X<W&&(M[B]=Y,z.decrease(B,X))}}if(N.nodeCount()===0)return C;N.nodes().forEach(function(D){z.add(D,Number.POSITIVE_INFINITY),C.setNode(D)}),z.decrease(N.nodes()[0],0);for(var k=!1;z.size()>0;){if(Y=z.removeMin(),Object.hasOwn(M,Y))C.setEdge(Y,M[Y]);else{if(k)throw new Error("Input graph is not connected: "+N);k=!0}N.nodeEdges(Y).forEach(A)}return C}}),L=o((V,E)=>{var j=h(),P=f();E.exports=O;function O(I,C,M,z){return N(I,C,M,z||function(Y){return I.outEdges(Y)})}function N(I,C,M,z){if(M===void 0)return j(I,C,M,z);for(var Y=!1,A=I.nodes(),k=0;k<A.length;k++){for(var D=z(A[k]),B=0;B<D.length;B++){var W=D[B],X=W.v===A[k]?W.v:W.w,G=X===W.v?W.w:W.v;M({v:X,w:G})<0&&(Y=!0)}if(Y)return P(I,C,M,z)}return j(I,C,M,z)}}),b=o((V,E)=>{E.exports={bellmanFord:f(),components:c(),dijkstra:h(),dijkstraAll:y(),extractPath:w(),findCycles:m(),floydWarshall:g(),isAcyclic:v(),postorder:T(),preorder:R(),prim:H(),shortestPaths:L(),reduce:_(),tarjan:x(),topsort:p()}}),$=a();t.exports={Graph:$.Graph,json:u(),alg:b(),version:$.version}}),wS=ue((e,t)=>{var n=class{constructor(){let i={};i._next=i._prev=i,this._sentinel=i}dequeue(){let i=this._sentinel,s=i._prev;if(s!==i)return r(s),s}enqueue(i){let s=this._sentinel;i._prev&&i._next&&r(i),i._next=s._next,s._next._prev=i,s._next=i,i._prev=s}toString(){let i=[],s=this._sentinel,l=s._prev;for(;l!==s;)i.push(JSON.stringify(l,o)),l=l._prev;return"["+i.join(", ")+"]"}};function r(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function o(i,s){if(i!=="_next"&&i!=="_prev")return s}t.exports=n}),xS=ue((e,t)=>{var n=xt().Graph,r=wS();t.exports=i;var o=()=>1;function i(c,d){if(c.nodeCount()<=1)return[];let h=a(c,d||o);return s(h.graph,h.buckets,h.zeroIdx).flatMap(y=>c.outEdges(y.v,y.w))}function s(c,d,h){let y=[],w=d[d.length-1],x=d[0],m;for(;c.nodeCount();){for(;m=x.dequeue();)l(c,d,h,m);for(;m=w.dequeue();)l(c,d,h,m);if(c.nodeCount()){for(let g=d.length-2;g>0;--g)if(m=d[g].dequeue(),m){y=y.concat(l(c,d,h,m,!0));break}}}return y}function l(c,d,h,y,w){let x=w?[]:void 0;return c.inEdges(y.v).forEach(m=>{let g=c.edge(m),p=c.node(m.v);w&&x.push({v:m.v,w:m.w}),p.out-=g,u(d,h,p)}),c.outEdges(y.v).forEach(m=>{let g=c.edge(m),p=m.w,v=c.node(p);v.in-=g,u(d,h,v)}),c.removeNode(y.v),x}function a(c,d){let h=new n,y=0,w=0;c.nodes().forEach(g=>{h.setNode(g,{v:g,in:0,out:0})}),c.edges().forEach(g=>{let p=h.edge(g.v,g.w)||0,v=d(g),_=p+v;h.setEdge(g.v,g.w,_),w=Math.max(w,h.node(g.v).out+=v),y=Math.max(y,h.node(g.w).in+=v)});let x=f(w+y+3).map(()=>new r),m=y+1;return h.nodes().forEach(g=>{u(x,m,h.node(g))}),{graph:h,buckets:x,zeroIdx:m}}function u(c,d,h){h.out?h.in?c[h.out-h.in+d].enqueue(h):c[c.length-1].enqueue(h):c[0].enqueue(h)}function f(c){let d=[];for(let h=0;h<c;h++)d.push(h);return d}}),_e=ue((e,t)=>{var n=xt().Graph;t.exports={addBorderNode:d,addDummyNode:r,applyWithChunking:w,asNonCompoundGraph:i,buildLayerMatrix:u,intersectRect:a,mapValues:R,maxRank:x,normalizeRanks:f,notime:p,partition:m,pick:T,predecessorWeights:l,range:S,removeEmptyRanks:c,simplify:o,successorWeights:s,time:g,uniqueId:_,zipObject:H};function r(L,b,$,V){for(var E=V;L.hasNode(E);)E=_(V);return $.dummy=b,L.setNode(E,$),E}function o(L){let b=new n().setGraph(L.graph());return L.nodes().forEach($=>b.setNode($,L.node($))),L.edges().forEach($=>{let V=b.edge($.v,$.w)||{weight:0,minlen:1},E=L.edge($);b.setEdge($.v,$.w,{weight:V.weight+E.weight,minlen:Math.max(V.minlen,E.minlen)})}),b}function i(L){let b=new n({multigraph:L.isMultigraph()}).setGraph(L.graph());return L.nodes().forEach($=>{L.children($).length||b.setNode($,L.node($))}),L.edges().forEach($=>{b.setEdge($,L.edge($))}),b}function s(L){let b=L.nodes().map($=>{let V={};return L.outEdges($).forEach(E=>{V[E.w]=(V[E.w]||0)+L.edge(E).weight}),V});return H(L.nodes(),b)}function l(L){let b=L.nodes().map($=>{let V={};return L.inEdges($).forEach(E=>{V[E.v]=(V[E.v]||0)+L.edge(E).weight}),V});return H(L.nodes(),b)}function a(L,b){let $=L.x,V=L.y,E=b.x-$,j=b.y-V,P=L.width/2,O=L.height/2;if(!E&&!j)throw new Error("Not possible to find intersection inside of the rectangle");let N,I;return Math.abs(j)*P>Math.abs(E)*O?(j<0&&(O=-O),N=O*E/j,I=O):(E<0&&(P=-P),N=P,I=P*j/E),{x:$+N,y:V+I}}function u(L){let b=S(x(L)+1).map(()=>[]);return L.nodes().forEach($=>{let V=L.node($),E=V.rank;E!==void 0&&(b[E][V.order]=$)}),b}function f(L){let b=L.nodes().map(V=>{let E=L.node(V).rank;return E===void 0?Number.MAX_VALUE:E}),$=w(Math.min,b);L.nodes().forEach(V=>{let E=L.node(V);Object.hasOwn(E,"rank")&&(E.rank-=$)})}function c(L){let b=L.nodes().map(P=>L.node(P).rank).filter(P=>P!==void 0),$=w(Math.min,b),V=[];L.nodes().forEach(P=>{let O=L.node(P).rank-$;V[O]||(V[O]=[]),V[O].push(P)});let E=0,j=L.graph().nodeRankFactor;Array.from(V).forEach((P,O)=>{P===void 0&&O%j!==0?--E:P!==void 0&&E&&P.forEach(N=>L.node(N).rank+=E)})}function d(L,b,$,V){let E={width:0,height:0};return arguments.length>=4&&(E.rank=$,E.order=V),r(L,"border",E,b)}function h(L,b=y){let $=[];for(let V=0;V<L.length;V+=b){let E=L.slice(V,V+b);$.push(E)}return $}var y=65535;function w(L,b){if(b.length>y){let $=h(b);return L.apply(null,$.map(V=>L.apply(null,V)))}else return L.apply(null,b)}function x(L){let b=L.nodes().map($=>{let V=L.node($).rank;return V===void 0?Number.MIN_VALUE:V});return w(Math.max,b)}function m(L,b){let $={lhs:[],rhs:[]};return L.forEach(V=>{b(V)?$.lhs.push(V):$.rhs.push(V)}),$}function g(L,b){let $=Date.now();try{return b()}finally{console.log(L+" time: "+(Date.now()-$)+"ms")}}function p(L,b){return b()}var v=0;function _(L){var b=++v;return L+(""+b)}function S(L,b,$=1){b==null&&(b=L,L=0);let V=j=>j<b;$<0&&(V=j=>b<j);let E=[];for(let j=L;V(j);j+=$)E.push(j);return E}function T(L,b){let $={};for(let V of b)L[V]!==void 0&&($[V]=L[V]);return $}function R(L,b){let $=b;return typeof b=="string"&&($=V=>V[b]),Object.entries(L).reduce((V,[E,j])=>(V[E]=$(j,E),V),{})}function H(L,b){return L.reduce(($,V,E)=>($[V]=b[E],$),{})}}),ES=ue((e,t)=>{var n=xS(),r=_e().uniqueId;t.exports={run:o,undo:s};function o(l){(l.graph().acyclicer==="greedy"?n(l,a(l)):i(l)).forEach(u=>{let f=l.edge(u);l.removeEdge(u),f.forwardName=u.name,f.reversed=!0,l.setEdge(u.w,u.v,f,r("rev"))});function a(u){return f=>u.edge(f).weight}}function i(l){let a=[],u={},f={};function c(d){Object.hasOwn(f,d)||(f[d]=!0,u[d]=!0,l.outEdges(d).forEach(h=>{Object.hasOwn(u,h.w)?a.push(h):c(h.w)}),delete u[d])}return l.nodes().forEach(c),a}function s(l){l.edges().forEach(a=>{let u=l.edge(a);if(u.reversed){l.removeEdge(a);let f=u.forwardName;delete u.reversed,delete u.forwardName,l.setEdge(a.w,a.v,u,f)}})}}),_S=ue((e,t)=>{var n=_e();t.exports={run:r,undo:i};function r(s){s.graph().dummyChains=[],s.edges().forEach(l=>o(s,l))}function o(s,l){let a=l.v,u=s.node(a).rank,f=l.w,c=s.node(f).rank,d=l.name,h=s.edge(l),y=h.labelRank;if(c===u+1)return;s.removeEdge(l);let w,x,m;for(m=0,++u;u<c;++m,++u)h.points=[],x={width:0,height:0,edgeLabel:h,edgeObj:l,rank:u},w=n.addDummyNode(s,"edge",x,"_d"),u===y&&(x.width=h.width,x.height=h.height,x.dummy="edge-label",x.labelpos=h.labelpos),s.setEdge(a,w,{weight:h.weight},d),m===0&&s.graph().dummyChains.push(w),a=w;s.setEdge(a,f,{weight:h.weight},d)}function i(s){s.graph().dummyChains.forEach(l=>{let a=s.node(l),u=a.edgeLabel,f;for(s.setEdge(a.edgeObj,u);a.dummy;)f=s.successors(l)[0],s.removeNode(l),u.points.push({x:a.x,y:a.y}),a.dummy==="edge-label"&&(u.x=a.x,u.y=a.y,u.width=a.width,u.height=a.height),l=f,a=s.node(l)})}}),Rs=ue((e,t)=>{var{applyWithChunking:n}=_e();t.exports={longestPath:r,slack:o};function r(i){var s={};function l(a){var u=i.node(a);if(Object.hasOwn(s,a))return u.rank;s[a]=!0;let f=i.outEdges(a).map(d=>d==null?Number.POSITIVE_INFINITY:l(d.w)-i.edge(d).minlen);var c=n(Math.min,f);return c===Number.POSITIVE_INFINITY&&(c=0),u.rank=c}i.sources().forEach(l)}function o(i,s){return i.node(s.w).rank-i.node(s.v).rank-i.edge(s).minlen}}),l0=ue((e,t)=>{var n=xt().Graph,r=Rs().slack;t.exports=o;function o(a){var u=new n({directed:!1}),f=a.nodes()[0],c=a.nodeCount();u.setNode(f,{});for(var d,h;i(u,a)<c;)d=s(u,a),h=u.hasNode(d.v)?r(a,d):-r(a,d),l(u,a,h);return u}function i(a,u){function f(c){u.nodeEdges(c).forEach(d=>{var h=d.v,y=c===h?d.w:h;!a.hasNode(y)&&!r(u,d)&&(a.setNode(y,{}),a.setEdge(c,y,{}),f(y))})}return a.nodes().forEach(f),a.nodeCount()}function s(a,u){return u.edges().reduce((f,c)=>{let d=Number.POSITIVE_INFINITY;return a.hasNode(c.v)!==a.hasNode(c.w)&&(d=r(u,c)),d<f[0]?[d,c]:f},[Number.POSITIVE_INFINITY,null])[1]}function l(a,u,f){a.nodes().forEach(c=>u.node(c).rank+=f)}}),SS=ue((e,t)=>{var n=l0(),r=Rs().slack,o=Rs().longestPath,i=xt().alg.preorder,s=xt().alg.postorder,l=_e().simplify;t.exports=a,a.initLowLimValues=d,a.initCutValues=u,a.calcCutValue=c,a.leaveEdge=y,a.enterEdge=w,a.exchangeEdges=x;function a(v){v=l(v),o(v);var _=n(v);d(_),u(_,v);for(var S,T;S=y(_);)T=w(_,v,S),x(_,v,S,T)}function u(v,_){var S=s(v,v.nodes());S=S.slice(0,S.length-1),S.forEach(T=>f(v,_,T))}function f(v,_,S){var T=v.node(S),R=T.parent;v.edge(S,R).cutvalue=c(v,_,S)}function c(v,_,S){var T=v.node(S),R=T.parent,H=!0,L=_.edge(S,R),b=0;return L||(H=!1,L=_.edge(R,S)),b=L.weight,_.nodeEdges(S).forEach($=>{var V=$.v===S,E=V?$.w:$.v;if(E!==R){var j=V===H,P=_.edge($).weight;if(b+=j?P:-P,g(v,S,E)){var O=v.edge(S,E).cutvalue;b+=j?-O:O}}}),b}function d(v,_){arguments.length<2&&(_=v.nodes()[0]),h(v,{},1,_)}function h(v,_,S,T,R){var H=S,L=v.node(T);return _[T]=!0,v.neighbors(T).forEach(b=>{Object.hasOwn(_,b)||(S=h(v,_,S,b,T))}),L.low=H,L.lim=S++,R?L.parent=R:delete L.parent,S}function y(v){return v.edges().find(_=>v.edge(_).cutvalue<0)}function w(v,_,S){var T=S.v,R=S.w;_.hasEdge(T,R)||(T=S.w,R=S.v);var H=v.node(T),L=v.node(R),b=H,$=!1;H.lim>L.lim&&(b=L,$=!0);var V=_.edges().filter(E=>$===p(v,v.node(E.v),b)&&$!==p(v,v.node(E.w),b));return V.reduce((E,j)=>r(_,j)<r(_,E)?j:E)}function x(v,_,S,T){var R=S.v,H=S.w;v.removeEdge(R,H),v.setEdge(T.v,T.w,{}),d(v),u(v,_),m(v,_)}function m(v,_){var S=v.nodes().find(R=>!_.node(R).parent),T=i(v,S);T=T.slice(1),T.forEach(R=>{var H=v.node(R).parent,L=_.edge(R,H),b=!1;L||(L=_.edge(H,R),b=!0),_.node(R).rank=_.node(H).rank+(b?L.minlen:-L.minlen)})}function g(v,_,S){return v.hasEdge(_,S)}function p(v,_,S){return S.low<=_.lim&&_.lim<=S.lim}}),CS=ue((e,t)=>{var n=Rs(),r=n.longestPath,o=l0(),i=SS();t.exports=s;function s(f){var c=f.graph().ranker;if(c instanceof Function)return c(f);switch(f.graph().ranker){case"network-simplex":u(f);break;case"tight-tree":a(f);break;case"longest-path":l(f);break;case"none":break;default:u(f)}}var l=r;function a(f){r(f),o(f)}function u(f){i(f)}}),kS=ue((e,t)=>{t.exports=n;function n(i){let s=o(i);i.graph().dummyChains.forEach(l=>{let a=i.node(l),u=a.edgeObj,f=r(i,s,u.v,u.w),c=f.path,d=f.lca,h=0,y=c[h],w=!0;for(;l!==u.w;){if(a=i.node(l),w){for(;(y=c[h])!==d&&i.node(y).maxRank<a.rank;)h++;y===d&&(w=!1)}if(!w){for(;h<c.length-1&&i.node(y=c[h+1]).minRank<=a.rank;)h++;y=c[h]}i.setParent(l,y),l=i.successors(l)[0]}})}function r(i,s,l,a){let u=[],f=[],c=Math.min(s[l].low,s[a].low),d=Math.max(s[l].lim,s[a].lim),h,y;h=l;do h=i.parent(h),u.push(h);while(h&&(s[h].low>c||d>s[h].lim));for(y=h,h=a;(h=i.parent(h))!==y;)f.push(h);return{path:u.concat(f.reverse()),lca:y}}function o(i){let s={},l=0;function a(u){let f=l;i.children(u).forEach(a),s[u]={low:f,lim:l++}}return i.children().forEach(a),s}}),NS=ue((e,t)=>{var n=_e();t.exports={run:r,cleanup:l};function r(a){let u=n.addDummyNode(a,"root",{},"_root"),f=i(a),c=Object.values(f),d=n.applyWithChunking(Math.max,c)-1,h=2*d+1;a.graph().nestingRoot=u,a.edges().forEach(w=>a.edge(w).minlen*=h);let y=s(a)+1;a.children().forEach(w=>o(a,u,h,y,d,f,w)),a.graph().nodeRankFactor=h}function o(a,u,f,c,d,h,y){let w=a.children(y);if(!w.length){y!==u&&a.setEdge(u,y,{weight:0,minlen:f});return}let x=n.addBorderNode(a,"_bt"),m=n.addBorderNode(a,"_bb"),g=a.node(y);a.setParent(x,y),g.borderTop=x,a.setParent(m,y),g.borderBottom=m,w.forEach(p=>{o(a,u,f,c,d,h,p);let v=a.node(p),_=v.borderTop?v.borderTop:p,S=v.borderBottom?v.borderBottom:p,T=v.borderTop?c:2*c,R=_!==S?1:d-h[y]+1;a.setEdge(x,_,{weight:T,minlen:R,nestingEdge:!0}),a.setEdge(S,m,{weight:T,minlen:R,nestingEdge:!0})}),a.parent(y)||a.setEdge(u,x,{weight:0,minlen:d+h[y]})}function i(a){var u={};function f(c,d){var h=a.children(c);h&&h.length&&h.forEach(y=>f(y,d+1)),u[c]=d}return a.children().forEach(c=>f(c,1)),u}function s(a){return a.edges().reduce((u,f)=>u+a.edge(f).weight,0)}function l(a){var u=a.graph();a.removeNode(u.nestingRoot),delete u.nestingRoot,a.edges().forEach(f=>{var c=a.edge(f);c.nestingEdge&&a.removeEdge(f)})}}),MS=ue((e,t)=>{var n=_e();t.exports=r;function r(i){function s(l){let a=i.children(l),u=i.node(l);if(a.length&&a.forEach(s),Object.hasOwn(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(let f=u.minRank,c=u.maxRank+1;f<c;++f)o(i,"borderLeft","_bl",l,u,f),o(i,"borderRight","_br",l,u,f)}}i.children().forEach(s)}function o(i,s,l,a,u,f){let c={width:0,height:0,rank:f,borderType:s},d=u[s][f-1],h=n.addDummyNode(i,"border",c,l);u[s][f]=h,i.setParent(h,a),d&&i.setEdge(d,h,{weight:1})}}),IS=ue((e,t)=>{t.exports={adjust:n,undo:r};function n(f){let c=f.graph().rankdir.toLowerCase();(c==="lr"||c==="rl")&&o(f)}function r(f){let c=f.graph().rankdir.toLowerCase();(c==="bt"||c==="rl")&&s(f),(c==="lr"||c==="rl")&&(a(f),o(f))}function o(f){f.nodes().forEach(c=>i(f.node(c))),f.edges().forEach(c=>i(f.edge(c)))}function i(f){let c=f.width;f.width=f.height,f.height=c}function s(f){f.nodes().forEach(c=>l(f.node(c))),f.edges().forEach(c=>{let d=f.edge(c);d.points.forEach(l),Object.hasOwn(d,"y")&&l(d)})}function l(f){f.y=-f.y}function a(f){f.nodes().forEach(c=>u(f.node(c))),f.edges().forEach(c=>{let d=f.edge(c);d.points.forEach(u),Object.hasOwn(d,"x")&&u(d)})}function u(f){let c=f.x;f.x=f.y,f.y=c}}),PS=ue((e,t)=>{var n=_e();t.exports=r;function r(o){let i={},s=o.nodes().filter(c=>!o.children(c).length),l=s.map(c=>o.node(c).rank),a=n.applyWithChunking(Math.max,l),u=n.range(a+1).map(()=>[]);function f(c){if(i[c])return;i[c]=!0;let d=o.node(c);u[d.rank].push(c),o.successors(c).forEach(f)}return s.sort((c,d)=>o.node(c).rank-o.node(d).rank).forEach(f),u}}),TS=ue((e,t)=>{var n=_e().zipObject;t.exports=r;function r(i,s){let l=0;for(let a=1;a<s.length;++a)l+=o(i,s[a-1],s[a]);return l}function o(i,s,l){let a=n(l,l.map((y,w)=>w)),u=s.flatMap(y=>i.outEdges(y).map(w=>({pos:a[w.w],weight:i.edge(w).weight})).sort((w,x)=>w.pos-x.pos)),f=1;for(;f<l.length;)f<<=1;let c=2*f-1;f-=1;let d=new Array(c).fill(0),h=0;return u.forEach(y=>{let w=y.pos+f;d[w]+=y.weight;let x=0;for(;w>0;)w%2&&(x+=d[w+1]),w=w-1>>1,d[w]+=y.weight;h+=y.weight*x}),h}}),bS=ue((e,t)=>{t.exports=n;function n(r,o=[]){return o.map(i=>{let s=r.inEdges(i);if(s.length){let l=s.reduce((a,u)=>{let f=r.edge(u),c=r.node(u.v);return{sum:a.sum+f.weight*c.order,weight:a.weight+f.weight}},{sum:0,weight:0});return{v:i,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:i}})}}),LS=ue((e,t)=>{var n=_e();t.exports=r;function r(s,l){let a={};s.forEach((f,c)=>{let d=a[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:c};f.barycenter!==void 0&&(d.barycenter=f.barycenter,d.weight=f.weight)}),l.edges().forEach(f=>{let c=a[f.v],d=a[f.w];c!==void 0&&d!==void 0&&(d.indegree++,c.out.push(a[f.w]))});let u=Object.values(a).filter(f=>!f.indegree);return o(u)}function o(s){let l=[];function a(f){return c=>{c.merged||(c.barycenter===void 0||f.barycenter===void 0||c.barycenter>=f.barycenter)&&i(f,c)}}function u(f){return c=>{c.in.push(f),--c.indegree===0&&s.push(c)}}for(;s.length;){let f=s.pop();l.push(f),f.in.reverse().forEach(a(f)),f.out.forEach(u(f))}return l.filter(f=>!f.merged).map(f=>n.pick(f,["vs","i","barycenter","weight"]))}function i(s,l){let a=0,u=0;s.weight&&(a+=s.barycenter*s.weight,u+=s.weight),l.weight&&(a+=l.barycenter*l.weight,u+=l.weight),s.vs=l.vs.concat(s.vs),s.barycenter=a/u,s.weight=u,s.i=Math.min(l.i,s.i),l.merged=!0}}),RS=ue((e,t)=>{var n=_e();t.exports=r;function r(s,l){let a=n.partition(s,x=>Object.hasOwn(x,"barycenter")),u=a.lhs,f=a.rhs.sort((x,m)=>m.i-x.i),c=[],d=0,h=0,y=0;u.sort(i(!!l)),y=o(c,f,y),u.forEach(x=>{y+=x.vs.length,c.push(x.vs),d+=x.barycenter*x.weight,h+=x.weight,y=o(c,f,y)});let w={vs:c.flat(!0)};return h&&(w.barycenter=d/h,w.weight=h),w}function o(s,l,a){let u;for(;l.length&&(u=l[l.length-1]).i<=a;)l.pop(),s.push(u.vs),a++;return a}function i(s){return(l,a)=>l.barycenter<a.barycenter?-1:l.barycenter>a.barycenter?1:s?a.i-l.i:l.i-a.i}}),AS=ue((e,t)=>{var n=bS(),r=LS(),o=RS();t.exports=i;function i(a,u,f,c){let d=a.children(u),h=a.node(u),y=h?h.borderLeft:void 0,w=h?h.borderRight:void 0,x={};y&&(d=d.filter(v=>v!==y&&v!==w));let m=n(a,d);m.forEach(v=>{if(a.children(v.v).length){let _=i(a,v.v,f,c);x[v.v]=_,Object.hasOwn(_,"barycenter")&&l(v,_)}});let g=r(m,f);s(g,x);let p=o(g,c);if(y&&(p.vs=[y,p.vs,w].flat(!0),a.predecessors(y).length)){let v=a.node(a.predecessors(y)[0]),_=a.node(a.predecessors(w)[0]);Object.hasOwn(p,"barycenter")||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+v.order+_.order)/(p.weight+2),p.weight+=2}return p}function s(a,u){a.forEach(f=>{f.vs=f.vs.flatMap(c=>u[c]?u[c].vs:c)})}function l(a,u){a.barycenter!==void 0?(a.barycenter=(a.barycenter*a.weight+u.barycenter*u.weight)/(a.weight+u.weight),a.weight+=u.weight):(a.barycenter=u.barycenter,a.weight=u.weight)}}),OS=ue((e,t)=>{var n=xt().Graph,r=_e();t.exports=o;function o(s,l,a,u){u||(u=s.nodes());let f=i(s),c=new n({compound:!0}).setGraph({root:f}).setDefaultNodeLabel(d=>s.node(d));return u.forEach(d=>{let h=s.node(d),y=s.parent(d);(h.rank===l||h.minRank<=l&&l<=h.maxRank)&&(c.setNode(d),c.setParent(d,y||f),s[a](d).forEach(w=>{let x=w.v===d?w.w:w.v,m=c.edge(x,d),g=m!==void 0?m.weight:0;c.setEdge(x,d,{weight:s.edge(w).weight+g})}),Object.hasOwn(h,"minRank")&&c.setNode(d,{borderLeft:h.borderLeft[l],borderRight:h.borderRight[l]}))}),c}function i(s){for(var l;s.hasNode(l=r.uniqueId("_root")););return l}}),zS=ue((e,t)=>{t.exports=n;function n(r,o,i){let s={},l;i.forEach(a=>{let u=r.parent(a),f,c;for(;u;){if(f=r.parent(u),f?(c=s[f],s[f]=u):(c=l,l=u),c&&c!==u){o.setEdge(c,u);return}u=f}})}}),jS=ue((e,t)=>{var n=PS(),r=TS(),o=AS(),i=OS(),s=zS(),l=xt().Graph,a=_e();t.exports=u;function u(h,y={}){if(typeof y.customOrder=="function"){y.customOrder(h,u);return}let w=a.maxRank(h),x=f(h,a.range(1,w+1),"inEdges"),m=f(h,a.range(w-1,-1,-1),"outEdges"),g=n(h);if(d(h,g),y.disableOptimalOrderHeuristic)return;let p=Number.POSITIVE_INFINITY,v,_=y.constraints||[];for(let S=0,T=0;T<4;++S,++T){c(S%2?x:m,S%4>=2,_),g=a.buildLayerMatrix(h);let R=r(h,g);R<p?(T=0,v=Object.assign({},g),p=R):R===p&&(v=structuredClone(g))}d(h,v)}function f(h,y,w){let x=new Map,m=(g,p)=>{x.has(g)||x.set(g,[]),x.get(g).push(p)};for(let g of h.nodes()){let p=h.node(g);if(typeof p.rank=="number"&&m(p.rank,g),typeof p.minRank=="number"&&typeof p.maxRank=="number")for(let v=p.minRank;v<=p.maxRank;v++)v!==p.rank&&m(v,g)}return y.map(function(g){return i(h,g,w,x.get(g)||[])})}function c(h,y,w){let x=new l;h.forEach(function(m){w.forEach(v=>x.setEdge(v.left,v.right));let g=m.graph().root,p=o(m,g,x,y);p.vs.forEach((v,_)=>m.node(v).order=_),s(m,x,p.vs)})}function d(h,y){Object.values(y).forEach(w=>w.forEach((x,m)=>h.node(x).order=m))}}),$S=ue((e,t)=>{var n=xt().Graph,r=_e();t.exports={positionX:w,findType1Conflicts:o,findType2Conflicts:i,addConflict:l,hasConflict:a,verticalAlignment:u,horizontalCompaction:f,alignCoordinates:h,findSmallestWidthAlignment:d,balance:y};function o(g,p){let v={};function _(S,T){let R=0,H=0,L=S.length,b=T[T.length-1];return T.forEach(($,V)=>{let E=s(g,$),j=E?g.node(E).order:L;(E||$===b)&&(T.slice(H,V+1).forEach(P=>{g.predecessors(P).forEach(O=>{let N=g.node(O),I=N.order;(I<R||j<I)&&!(N.dummy&&g.node(P).dummy)&&l(v,O,P)})}),H=V+1,R=j)}),T}return p.length&&p.reduce(_),v}function i(g,p){let v={};function _(T,R,H,L,b){let $;r.range(R,H).forEach(V=>{$=T[V],g.node($).dummy&&g.predecessors($).forEach(E=>{let j=g.node(E);j.dummy&&(j.order<L||j.order>b)&&l(v,E,$)})})}function S(T,R){let H=-1,L,b=0;return R.forEach(($,V)=>{if(g.node($).dummy==="border"){let E=g.predecessors($);E.length&&(L=g.node(E[0]).order,_(R,b,V,H,L),b=V,H=L)}_(R,b,R.length,L,T.length)}),R}return p.length&&p.reduce(S),v}function s(g,p){if(g.node(p).dummy)return g.predecessors(p).find(v=>g.node(v).dummy)}function l(g,p,v){if(p>v){let S=p;p=v,v=S}let _=g[p];_||(g[p]=_={}),_[v]=!0}function a(g,p,v){if(p>v){let _=p;p=v,v=_}return!!g[p]&&Object.hasOwn(g[p],v)}function u(g,p,v,_){let S={},T={},R={};return p.forEach(H=>{H.forEach((L,b)=>{S[L]=L,T[L]=L,R[L]=b})}),p.forEach(H=>{let L=-1;H.forEach(b=>{let $=_(b);if($.length){$=$.sort((E,j)=>R[E]-R[j]);let V=($.length-1)/2;for(let E=Math.floor(V),j=Math.ceil(V);E<=j;++E){let P=$[E];T[b]===b&&L<R[P]&&!a(v,b,P)&&(T[P]=b,T[b]=S[b]=S[P],L=R[P])}}})}),{root:S,align:T}}function f(g,p,v,_,S){let T={},R=c(g,p,v,S),H=S?"borderLeft":"borderRight";function L(V,E){let j=R.nodes().slice(),P={},O=j.pop();for(;O;){if(P[O])V(O);else{P[O]=!0,j.push(O);for(let N of E(O))j.push(N)}O=j.pop()}}function b(V){T[V]=R.inEdges(V).reduce((E,j)=>Math.max(E,T[j.v]+R.edge(j)),0)}function $(V){let E=R.outEdges(V).reduce((P,O)=>Math.min(P,T[O.w]-R.edge(O)),Number.POSITIVE_INFINITY),j=g.node(V);E!==Number.POSITIVE_INFINITY&&j.borderType!==H&&(T[V]=Math.max(T[V],E))}return L(b,R.predecessors.bind(R)),L($,R.successors.bind(R)),Object.keys(_).forEach(V=>T[V]=T[v[V]]),T}function c(g,p,v,_){let S=new n,T=g.graph(),R=x(T.nodesep,T.edgesep,_);return p.forEach(H=>{let L;H.forEach(b=>{let $=v[b];if(S.setNode($),L){var V=v[L],E=S.edge(V,$);S.setEdge(V,$,Math.max(R(g,b,L),E||0))}L=b})}),S}function d(g,p){return Object.values(p).reduce((v,_)=>{let S=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;Object.entries(_).forEach(([H,L])=>{let b=m(g,H)/2;S=Math.max(L+b,S),T=Math.min(L-b,T)});let R=S-T;return R<v[0]&&(v=[R,_]),v},[Number.POSITIVE_INFINITY,null])[1]}function h(g,p){let v=Object.values(p),_=r.applyWithChunking(Math.min,v),S=r.applyWithChunking(Math.max,v);["u","d"].forEach(T=>{["l","r"].forEach(R=>{let H=T+R,L=g[H];if(L===p)return;let b=Object.values(L),$=_-r.applyWithChunking(Math.min,b);R!=="l"&&($=S-r.applyWithChunking(Math.max,b)),$&&(g[H]=r.mapValues(L,V=>V+$))})})}function y(g,p){return r.mapValues(g.ul,(v,_)=>{if(p)return g[p.toLowerCase()][_];{let S=Object.values(g).map(T=>T[_]).sort((T,R)=>T-R);return(S[1]+S[2])/2}})}function w(g){let p=r.buildLayerMatrix(g),v=Object.assign(o(g,p),i(g,p)),_={},S;["u","d"].forEach(R=>{S=R==="u"?p:Object.values(p).reverse(),["l","r"].forEach(H=>{H==="r"&&(S=S.map(V=>Object.values(V).reverse()));let L=(R==="u"?g.predecessors:g.successors).bind(g),b=u(g,S,v,L),$=f(g,S,b.root,b.align,H==="r");H==="r"&&($=r.mapValues($,V=>-V)),_[R+H]=$})});let T=d(g,_);return h(_,T),y(_,g.graph().align)}function x(g,p,v){return(_,S,T)=>{let R=_.node(S),H=_.node(T),L=0,b;if(L+=R.width/2,Object.hasOwn(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":b=-R.width/2;break;case"r":b=R.width/2;break}if(b&&(L+=v?b:-b),b=0,L+=(R.dummy?p:g)/2,L+=(H.dummy?p:g)/2,L+=H.width/2,Object.hasOwn(H,"labelpos"))switch(H.labelpos.toLowerCase()){case"l":b=H.width/2;break;case"r":b=-H.width/2;break}return b&&(L+=v?b:-b),b=0,L}}function m(g,p){return g.node(p).width}}),DS=ue((e,t)=>{var n=_e(),r=$S().positionX;t.exports=o;function o(s){s=n.asNonCompoundGraph(s),i(s),Object.entries(r(s)).forEach(([l,a])=>s.node(l).x=a)}function i(s){let l=n.buildLayerMatrix(s),a=s.graph().ranksep,u=s.graph().rankalign,f=0;l.forEach(c=>{let d=c.reduce((h,y)=>{let w=s.node(y).height;return h>w?h:w},0);c.forEach(h=>{let y=s.node(h);u==="top"?y.y=f+y.height/2:u==="bottom"?y.y=f+d-y.height/2:y.y=f+d/2}),f+=d+a})}}),FS=ue((e,t)=>{var n=ES(),r=_S(),o=CS(),i=_e().normalizeRanks,s=kS(),l=_e().removeEmptyRanks,a=NS(),u=MS(),f=IS(),c=jS(),d=DS(),h=_e(),y=xt().Graph;t.exports=w;function w(k,D={}){let B=D.debugTiming?h.time:h.notime;return B("layout",()=>{let W=B(" buildLayoutGraph",()=>L(k));return B(" runLayout",()=>x(W,B,D)),B(" updateInputGraph",()=>m(k,W)),W})}function x(k,D,B){D(" makeSpaceForEdgeLabels",()=>b(k)),D(" removeSelfEdges",()=>C(k)),D(" acyclic",()=>n.run(k)),D(" nestingGraph.run",()=>a.run(k)),D(" rank",()=>o(h.asNonCompoundGraph(k))),D(" injectEdgeLabelProxies",()=>$(k)),D(" removeEmptyRanks",()=>l(k)),D(" nestingGraph.cleanup",()=>a.cleanup(k)),D(" normalizeRanks",()=>i(k)),D(" assignRankMinMax",()=>V(k)),D(" removeEdgeLabelProxies",()=>E(k)),D(" normalize.run",()=>r.run(k)),D(" parentDummyChains",()=>s(k)),D(" addBorderSegments",()=>u(k)),D(" order",()=>c(k,B)),D(" insertSelfEdges",()=>M(k)),D(" adjustCoordinateSystem",()=>f.adjust(k)),D(" position",()=>d(k)),D(" positionSelfEdges",()=>z(k)),D(" removeBorderNodes",()=>I(k)),D(" normalize.undo",()=>r.undo(k)),D(" fixupEdgeLabelCoords",()=>O(k)),D(" undoCoordinateSystem",()=>f.undo(k)),D(" translateGraph",()=>j(k)),D(" assignNodeIntersects",()=>P(k)),D(" reversePoints",()=>N(k)),D(" acyclic.undo",()=>n.undo(k))}function m(k,D){k.nodes().forEach(B=>{let W=k.node(B),X=D.node(B);W&&(W.x=X.x,W.y=X.y,W.order=X.order,W.rank=X.rank,D.children(B).length&&(W.width=X.width,W.height=X.height))}),k.edges().forEach(B=>{let W=k.edge(B),X=D.edge(B);W.points=X.points,Object.hasOwn(X,"x")&&(W.x=X.x,W.y=X.y)}),k.graph().width=D.graph().width,k.graph().height=D.graph().height}var g=["nodesep","edgesep","ranksep","marginx","marginy"],p={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},v=["acyclicer","ranker","rankdir","align","rankalign"],_=["width","height","rank"],S={width:0,height:0},T=["minlen","weight","width","height","labeloffset"],R={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},H=["labelpos"];function L(k){let D=new y({multigraph:!0,compound:!0}),B=A(k.graph());return D.setGraph(Object.assign({},p,Y(B,g),h.pick(B,v))),k.nodes().forEach(W=>{let X=A(k.node(W)),G=Y(X,_);Object.keys(S).forEach(Q=>{G[Q]===void 0&&(G[Q]=S[Q])}),D.setNode(W,G),D.setParent(W,k.parent(W))}),k.edges().forEach(W=>{let X=A(k.edge(W));D.setEdge(W,Object.assign({},R,Y(X,T),h.pick(X,H)))}),D}function b(k){let D=k.graph();D.ranksep/=2,k.edges().forEach(B=>{let W=k.edge(B);W.minlen*=2,W.labelpos.toLowerCase()!=="c"&&(D.rankdir==="TB"||D.rankdir==="BT"?W.width+=W.labeloffset:W.height+=W.labeloffset)})}function $(k){k.edges().forEach(D=>{let B=k.edge(D);if(B.width&&B.height){let W=k.node(D.v),X={rank:(k.node(D.w).rank-W.rank)/2+W.rank,e:D};h.addDummyNode(k,"edge-proxy",X,"_ep")}})}function V(k){let D=0;k.nodes().forEach(B=>{let W=k.node(B);W.borderTop&&(W.minRank=k.node(W.borderTop).rank,W.maxRank=k.node(W.borderBottom).rank,D=Math.max(D,W.maxRank))}),k.graph().maxRank=D}function E(k){k.nodes().forEach(D=>{let B=k.node(D);B.dummy==="edge-proxy"&&(k.edge(B.e).labelRank=B.rank,k.removeNode(D))})}function j(k){let D=Number.POSITIVE_INFINITY,B=0,W=Number.POSITIVE_INFINITY,X=0,G=k.graph(),Q=G.marginx||0,Z=G.marginy||0;function ee(te){let ne=te.x,re=te.y,Ce=te.width,lt=te.height;D=Math.min(D,ne-Ce/2),B=Math.max(B,ne+Ce/2),W=Math.min(W,re-lt/2),X=Math.max(X,re+lt/2)}k.nodes().forEach(te=>ee(k.node(te))),k.edges().forEach(te=>{let ne=k.edge(te);Object.hasOwn(ne,"x")&&ee(ne)}),D-=Q,W-=Z,k.nodes().forEach(te=>{let ne=k.node(te);ne.x-=D,ne.y-=W}),k.edges().forEach(te=>{let ne=k.edge(te);ne.points.forEach(re=>{re.x-=D,re.y-=W}),Object.hasOwn(ne,"x")&&(ne.x-=D),Object.hasOwn(ne,"y")&&(ne.y-=W)}),G.width=B-D+Q,G.height=X-W+Z}function P(k){k.edges().forEach(D=>{let B=k.edge(D),W=k.node(D.v),X=k.node(D.w),G,Q;B.points?(G=B.points[0],Q=B.points[B.points.length-1]):(B.points=[],G=X,Q=W),B.points.unshift(h.intersectRect(W,G)),B.points.push(h.intersectRect(X,Q))})}function O(k){k.edges().forEach(D=>{let B=k.edge(D);if(Object.hasOwn(B,"x"))switch((B.labelpos==="l"||B.labelpos==="r")&&(B.width-=B.labeloffset),B.labelpos){case"l":B.x-=B.width/2+B.labeloffset;break;case"r":B.x+=B.width/2+B.labeloffset;break}})}function N(k){k.edges().forEach(D=>{let B=k.edge(D);B.reversed&&B.points.reverse()})}function I(k){k.nodes().forEach(D=>{if(k.children(D).length){let B=k.node(D),W=k.node(B.borderTop),X=k.node(B.borderBottom),G=k.node(B.borderLeft[B.borderLeft.length-1]),Q=k.node(B.borderRight[B.borderRight.length-1]);B.width=Math.abs(Q.x-G.x),B.height=Math.abs(X.y-W.y),B.x=G.x+B.width/2,B.y=W.y+B.height/2}}),k.nodes().forEach(D=>{k.node(D).dummy==="border"&&k.removeNode(D)})}function C(k){k.edges().forEach(D=>{if(D.v===D.w){var B=k.node(D.v);B.selfEdges||(B.selfEdges=[]),B.selfEdges.push({e:D,label:k.edge(D)}),k.removeEdge(D)}})}function M(k){var D=h.buildLayerMatrix(k);D.forEach(B=>{var W=0;B.forEach((X,G)=>{var Q=k.node(X);Q.order=G+W,(Q.selfEdges||[]).forEach(Z=>{h.addDummyNode(k,"selfedge",{width:Z.label.width,height:Z.label.height,rank:Q.rank,order:G+ ++W,e:Z.e,label:Z.label},"_se")}),delete Q.selfEdges})})}function z(k){k.nodes().forEach(D=>{var B=k.node(D);if(B.dummy==="selfedge"){var W=k.node(B.e.v),X=W.x+W.width/2,G=W.y,Q=B.x-X,Z=W.height/2;k.setEdge(B.e,B.label),k.removeNode(D),B.label.points=[{x:X+2*Q/3,y:G-Z},{x:X+5*Q/6,y:G-Z},{x:X+Q,y:G},{x:X+5*Q/6,y:G+Z},{x:X+2*Q/3,y:G+Z}],B.label.x=B.x,B.label.y=B.y}})}function Y(k,D){return h.mapValues(h.pick(k,D),Number)}function A(k){var D={};return k&&Object.entries(k).forEach(([B,W])=>{typeof B=="string"&&(B=B.toLowerCase()),D[B]=W}),D}}),VS=ue((e,t)=>{var n=_e(),r=xt().Graph;t.exports={debugOrdering:o};function o(i){let s=n.buildLayerMatrix(i),l=new r({compound:!0,multigraph:!0}).setGraph({});return i.nodes().forEach(a=>{l.setNode(a,{label:a}),l.setParent(a,"layer"+i.node(a).rank)}),i.edges().forEach(a=>l.setEdge(a.v,a.w,{},a.name)),s.forEach((a,u)=>{let f="layer"+u;l.setNode(f,{rank:"same"}),a.reduce((c,d)=>(l.setEdge(c,d,{style:"invis"}),d))}),l}}),HS=ue((e,t)=>{t.exports="2.0.4"}),BS=ue((e,t)=>{t.exports={graphlib:xt(),layout:FS(),debug:VS(),util:{time:_e().time,notime:_e().notime},version:HS()}});const Ud=BS();/*! For license information please see dagre.esm.js.LEGAL.txt */function US(e,t,n="LR"){var s,l,a;const r=new Ud.graphlib.Graph().setDefaultEdgeLabel(()=>({}));r.setGraph({rankdir:n,nodesep:220,ranksep:400,edgesep:100,marginx:80,marginy:80,ranker:"network-simplex"});const o=290;for(const u of e){const c=(((s=u.data.fields)==null?void 0:s.length)??0)+1,d=Math.min(80+c*36,o),h=40,y=((l=u.measured)==null?void 0:l.width)??260,w=((a=u.measured)==null?void 0:a.height)??d;r.setNode(u.id,{width:y+h*2,height:w+h*2})}for(const u of t)r.setEdge(u.source,u.target);return Ud.layout(r),{nodes:e.map(u=>{var p,v,_;const f=r.node(u.id),d=(((p=u.data.fields)==null?void 0:p.length)??0)+1,h=Math.min(80+d*36,o),y=((v=u.measured)==null?void 0:v.width)??260,w=((_=u.measured)==null?void 0:_.height)??h,x=40,m=y+x*2,g=w+x*2;return{...u,position:{x:f.x-m/2+x,y:f.y-g/2+x}}}),edges:t}}const WS="modulepreload",YS=function(e,t){return new URL(e,t).href},Wd={},XS=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),a=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=Promise.allSettled(n.map(u=>{if(u=YS(u,r),u in Wd)return;Wd[u]=!0;const f=u.endsWith(".css"),c=f?'[rel="stylesheet"]':"";if(!!r)for(let y=s.length-1;y>=0;y--){const w=s[y];if(w.href===u&&(!f||w.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${c}`))return;const h=document.createElement("link");if(h.rel=f?"stylesheet":WS,f||(h.as="script"),h.crossOrigin="",h.href=u,a&&h.setAttribute("nonce",a),document.head.appendChild(h),f)return new Promise((y,w)=>{h.addEventListener("load",y),h.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return o.then(s=>{for(const l of s||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};function GS(e,t,n){if(n)return{changed:!1,key:e,item:null};const r=t?Ki(t):null;return r===e?{changed:!1,key:r,item:null}:{changed:!0,key:r,item:t}}const QS=({active:e,selected:t,onReplace:n,onAdd:r,onToggle:o,onClear:i,onActivate:s,onHover:l,onMarqueePreview:a})=>{var I;const u=U.useRef(null),f=U.useRef(null),[c,d]=U.useState(null),[h,y]=U.useState(!1),w=U.useRef(!1),x=U.useRef(null),m=U.useRef(null),g=U.useRef(null),p=U.useRef(null),v=U.useCallback(()=>{var C;return((C=u.current)==null?void 0:C.parentElement)??null},[]),_=U.useCallback(()=>{var M;const C=x.current;C!==null&&((M=u.current)!=null&&M.hasPointerCapture(C))&&u.current.releasePointerCapture(C),x.current=null,f.current=null,d(null),a==null||a([])},[a]),S=U.useCallback(C=>{w.current=C,y(C),C&&_()},[_]),T=U.useCallback(C=>{C.code==="Space"&&!C.nativeEvent.isComposing&&(C.preventDefault(),S(!0))},[S]),R=U.useCallback(C=>{C.code==="Space"&&S(!1)},[S]),H=U.useCallback(C=>{var M;!e||w.current||C.button!==0||(C.currentTarget.focus(),f.current={x:C.clientX,y:C.clientY,additive:C.shiftKey||C.metaKey||C.ctrlKey},d(Pi(C.clientX,C.clientY,C.clientX,C.clientY)),(M=u.current)==null||M.setPointerCapture(C.pointerId),x.current=C.pointerId,m.current!==null&&(cancelAnimationFrame(m.current),m.current=null),p.current!==null&&(p.current=null,l==null||l(null)))},[e,l]),L=U.useCallback(C=>{if(f.current){const M=f.current,z=Pi(M.x,M.y,C.clientX,C.clientY);d(z),a&&(g.current={x:C.clientX,y:C.clientY},m.current===null&&(m.current=requestAnimationFrame(()=>{m.current=null;const Y=f.current,A=g.current,k=v();!Y||!A||!k||a(fS(k,Pi(Y.x,Y.y,A.x,A.y)))})));return}l&&(g.current={x:C.clientX,y:C.clientY},m.current===null&&(m.current=requestAnimationFrame(()=>{m.current=null;const M=g.current,z=v();if(!M||!z)return;const Y=Xl(z,M.x,M.y),A=GS(p.current,Y,f.current!==null);A.changed&&(p.current=A.key,l(A.item))})))},[l,a,v]),b=U.useCallback(C=>{var D;const M=f.current;if(f.current=null,x.current=null,d(null),m.current!==null&&(cancelAnimationFrame(m.current),m.current=null),a==null||a([]),!M)return;(D=u.current)==null||D.releasePointerCapture(C.pointerId);const z=v();if(!z)return;if(Math.hypot(C.clientX-M.x,C.clientY-M.y)<lS){const B=Xl(z,C.clientX,C.clientY);B?o(B):M.additive||i();return}const A=Pi(M.x,M.y,C.clientX,C.clientY),k=cS(z,A);M.additive?r(k):n(k)},[v,r,n,o,i,a]),$=U.useCallback(C=>{if(!e||!s)return;const M=v();if(!M)return;const z=Xl(M,C.clientX,C.clientY);z&&s(z)},[e,s,v]),V=U.useCallback(()=>{f.current||(m.current!==null&&(cancelAnimationFrame(m.current),m.current=null),p.current!==null&&(p.current=null,l==null||l(null)))},[l]),E=U.useCallback(()=>{_()},[_]),j=U.useRef(l);j.current=l;const P=U.useRef(a);if(P.current=a,U.useEffect(()=>()=>{var C,M;m.current!==null&&(cancelAnimationFrame(m.current),m.current=null),p.current!==null&&(p.current=null,(C=j.current)==null||C.call(j,null)),(M=P.current)==null||M.call(P,[])},[]),!e)return null;const O=(I=u.current)==null?void 0:I.getBoundingClientRect(),N=c&&O?{left:c.left-O.left,top:c.top-O.top,width:c.right-c.left,height:c.bottom-c.top}:void 0;return se.createElement("div",{ref:u,className:`mv-marquee-overlay${h?" mv-marquee-overlay--panning":""}`,tabIndex:0,"aria-label":"Metadata selection canvas",onKeyDown:T,onKeyUp:R,onBlur:()=>S(!1),onPointerDown:H,onPointerMove:L,onPointerUp:b,onPointerCancel:E,onLostPointerCapture:E,onPointerLeave:V,onDoubleClick:$},N&&se.createElement("div",{className:"mv-marquee-box",style:N}),se.createElement("span",{hidden:!0},t.size))};function KS(){const[e,t]=U.useState(new Map),n=U.useCallback(a=>{const u=new Map;for(const f of a)u.set(Ki(f),f);t(u)},[]),r=U.useCallback(a=>{t(u=>{const f=new Map(u);for(const c of a)f.set(Ki(c),c);return f})},[]),o=U.useCallback(a=>{t(u=>{const f=new Map(u),c=Ki(a);return f.has(c)?f.delete(c):f.set(c,a),f})},[]),i=U.useCallback(()=>t(new Map),[]),s=U.useCallback((a,u)=>e.has(`${a}::${u}`),[e]),l=U.useMemo(()=>Array.from(e.values()),[e]);return{selected:e,items:l,replace:n,add:r,toggle:o,clear:i,isSelected:s}}function a0(e){const t=new Map;for(const n of e)n.id&&!t.has(n.id)&&t.set(n.id,n);return t}function ZS(e,t){if(typeof document>"u")return;const n=new Map,r=document.querySelectorAll(`[${ou}]`);for(let o=0;o<r.length;o++){const i=r.item(o),s=i.getAttribute(ou)??"",l=e.get(s);l&&(i.setAttribute(Tr,""),i.setAttribute(br,l.type),n.set(s,i))}for(const[o,i]of t)n.get(o)!==i&&(i.removeAttribute(Tr),i.removeAttribute(br));t.clear(),n.forEach((o,i)=>t.set(i,o))}function Yd(e){for(const t of e.values())t.removeAttribute(Tr),t.removeAttribute(br);e.clear()}function qS(e,t){const n=a0(e),r=()=>ZS(n,t);if(typeof document>"u"||typeof MutationObserver>"u")return r(),()=>Yd(t);r();const o=new MutationObserver(()=>r());return o.observe(document.documentElement,{childList:!0,subtree:!0}),()=>{o.disconnect(),Yd(t)}}function JS(e,t,n){var l;const r=e.parentId?(l=t.get(e.parentId))==null?void 0:l.apiName:void 0,o={elementType:e.type,apiName:e.apiName};r&&(o.parent=r),e.attributes&&Object.keys(e.attributes).length>0&&(o.attributes=e.attributes),e.filePath&&(o.filePath=e.filePath);const s=(e.filePath?e.filePath.split("/").pop():void 0)||n;return s&&(o.fileName=s),o}function Ql(e,t,n){const r=a0(t),o=[];for(const i of e){const s=r.get(i.id);s&&o.push(JS(s,r,n))}return o}function eC(){return se.createElement("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true"},se.createElement("path",{d:"M14.5 1.5L7 9M14.5 1.5L10 14.5l-3-5.5-5.5-3L14.5 1.5z",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}))}const tC=({chips:e,onSubmit:t,onClear:n,onRemove:r,placeholder:o})=>{const[i,s]=U.useState(""),[l,a]=U.useState(!1),u=U.useRef(null),f=e.length,c=f===0;U.useEffect(()=>{var x;c||(x=u.current)==null||x.focus()},[c]);const d=e.map(x=>x.title??x.label).join("|");if(U.useEffect(()=>{a(!1)},[d]),c)return null;const h=i.trim().length>0,y=()=>{if(!h)return;t(i)&&(a(!0),s(""))},w=x=>{(x.metaKey||x.ctrlKey)&&x.key==="Enter"&&(x.preventDefault(),y())};return se.createElement("div",{className:"vibe-edit-panel",role:"dialog","aria-label":"Edit selected metadata with AI"},se.createElement("div",{className:"vibe-edit-panel__header"},se.createElement("span",{className:"vibe-edit-panel__title"},"Edit Element (",f," Selected)"),se.createElement("button",{className:"vibe-edit-panel__close",onClick:n,"aria-label":"Clear selection",type:"button"},"✕")),se.createElement("div",{className:"vibe-edit-panel__chips"},e.map((x,m)=>se.createElement("span",{className:`vibe-edit-panel__chip ${x.variant==="primary"?"vibe-edit-panel__chip--field":""}`,key:`${x.title??x.label}:${m}`,title:x.title??x.label},se.createElement("span",{className:"vibe-edit-panel__chip-label"},x.label),r&&se.createElement("button",{type:"button",className:"vibe-edit-panel__chip-remove","aria-label":`Remove ${x.label} from selection`,onClick:()=>r(m)},"✕")))),se.createElement("div",{className:"vibe-edit-panel__input-wrap"},se.createElement("textarea",{ref:u,className:"vibe-edit-panel__input",value:i,onChange:x=>s(x.target.value),onKeyDown:w,placeholder:o??"Describe the change you want…",rows:3}),se.createElement("button",{className:"vibe-edit-panel__submit",onClick:y,disabled:!h,type:"button"},se.createElement(eC,null),se.createElement("span",null,"Send to Agent"))),se.createElement("div",{className:"vibe-edit-panel__footer"},se.createElement("span",{className:"vibe-edit-panel__hint",role:"status","aria-live":"polite"},l?"✓ Sent to agent":"⌘/Ctrl + Enter to send")))},nC=["M11.5 2H10.5C10.3674 2 10.2402 2.05268 10.1464 2.14645C10.0527 2.24021 10 2.36739 10 2.5C10 2.63261 10.0527 2.75979 10.1464 2.85355C10.2402 2.94732 10.3674 3 10.5 3H11V3.5C11 3.63261 11.0527 3.75979 11.1464 3.85355C11.2402 3.94732 11.3674 4 11.5 4C11.6326 4 11.7598 3.94732 11.8536 3.85355C11.9473 3.75979 12 3.63261 12 3.5V2.5C12 2.36739 11.9473 2.24021 11.8536 2.14645C11.7598 2.05268 11.6326 2 11.5 2V2Z","M2.5 8C2.63261 8 2.75979 7.94732 2.85355 7.85355C2.94732 7.75979 3 7.63261 3 7.5V6.5C3 6.36739 2.94732 6.24021 2.85355 6.14645C2.75979 6.05268 2.63261 6 2.5 6C2.36739 6 2.24021 6.05268 2.14645 6.14645C2.05268 6.24021 2 6.36739 2 6.5V7.5C2 7.63261 2.05268 7.75979 2.14645 7.85355C2.24021 7.94732 2.36739 8 2.5 8Z","M11.5 6C11.3674 6 11.2402 6.05268 11.1464 6.14645C11.0527 6.24021 11 6.36739 11 6.5V7.5C11 7.63261 11.0527 7.75979 11.1464 7.85355C11.2402 7.94732 11.3674 8 11.5 8C11.6326 8 11.7598 7.94732 11.8536 7.85355C11.9473 7.75979 12 7.63261 12 7.5V6.5C12 6.36739 11.9473 6.24021 11.8536 6.14645C11.7598 6.05268 11.6326 6 11.5 6Z","M3.5 2H2.5C2.36739 2 2.24021 2.05268 2.14645 2.14645C2.05268 2.24021 2 2.36739 2 2.5V3.5C2 3.63261 2.05268 3.75979 2.14645 3.85355C2.24021 3.94732 2.36739 4 2.5 4C2.63261 4 2.75979 3.94732 2.85355 3.85355C2.94732 3.75979 3 3.63261 3 3.5V3H3.5C3.63261 3 3.75979 2.94732 3.85355 2.85355C3.94732 2.75979 4 2.63261 4 2.5C4 2.36739 3.94732 2.24021 3.85355 2.14645C3.75979 2.05268 3.63261 2 3.5 2V2Z","M6.5 3H7.5C7.63261 3 7.75979 2.94732 7.85355 2.85355C7.94732 2.75979 8 2.63261 8 2.5C8 2.36739 7.94732 2.24021 7.85355 2.14645C7.75979 2.05268 7.63261 2 7.5 2H6.5C6.36739 2 6.24021 2.05268 6.14645 2.14645C6.05268 2.24021 6 2.36739 6 2.5C6 2.63261 6.05268 2.75979 6.14645 2.85355C6.24021 2.94732 6.36739 3 6.5 3V3Z","M3.5 11H3V10.5C3 10.3674 2.94732 10.2402 2.85355 10.1464C2.75979 10.0527 2.63261 10 2.5 10C2.36739 10 2.24021 10.0527 2.14645 10.1464C2.05268 10.2402 2 10.3674 2 10.5V11.5C2 11.6326 2.05268 11.7598 2.14645 11.8536C2.24021 11.9473 2.36739 12 2.5 12H3.5C3.63261 12 3.75979 11.9473 3.85355 11.8536C3.94732 11.7598 4 11.6326 4 11.5C4 11.3674 3.94732 11.2402 3.85355 11.1464C3.75979 11.0527 3.63261 11 3.5 11Z","M6.85002 5.18144C6.78805 5.10177 6.70208 5.04416 6.60483 5.01715C6.50757 4.99013 6.40421 4.99514 6.31002 5.03144C6.21214 5.07132 6.1294 5.14119 6.07371 5.23102C6.01801 5.32086 5.99221 5.42603 6.00002 5.53144V12.5314C6.00052 12.6302 6.03022 12.7265 6.08539 12.8084C6.14055 12.8902 6.21872 12.9539 6.31002 12.9914C6.37257 13.0056 6.43748 13.0056 6.50002 12.9914C6.5656 12.9922 6.63062 12.9793 6.6909 12.9535C6.75117 12.9276 6.80538 12.8895 6.85002 12.8414L8.71002 11.0314H11.5C11.5987 11.0309 11.6951 11.0012 11.777 10.9461C11.8588 10.8909 11.9225 10.8127 11.96 10.7214C12.0009 10.6313 12.0122 10.5306 11.9925 10.4336C11.9727 10.3367 11.9229 10.2484 11.85 10.1814L6.85002 5.18144ZM8.50002 10.0314C8.43445 10.0306 8.36943 10.0436 8.30915 10.0694C8.24888 10.0952 8.19467 10.1334 8.15002 10.1814L7.00002 11.3214V6.74144L10.29 10.0314H8.50002Z"],NC=["M9.00527 7.75427C11.1465 7.75427 12.8824 6.01842 12.8824 3.87714C12.8824 1.73585 11.1465 0 9.00527 0C6.86401 0 5.12817 1.73585 5.12817 3.87714C5.12817 6.01842 6.86401 7.75427 9.00527 7.75427Z","M30.9978 7.75427C33.139 7.75427 34.8749 6.01842 34.8749 3.87714C34.8749 1.73585 33.139 0 30.9978 0C28.8565 0 27.1207 1.73585 27.1207 3.87714C27.1207 6.01842 28.8565 7.75427 30.9978 7.75427Z","M20.0013 48.3291C11.2613 48.3291 1.47456 43.1867 0.331247 41.5454C-0.00920626 41.0575 -0.0905088 40.4732 0.102584 39.9396C0.813978 37.9934 2.15038 34.157 3.07011 30.3154C3.54268 28.3387 3.85265 26.5805 3.98985 25.0815L4.00509 24.9392C4.04066 24.5226 4.07623 24.05 4.1118 23.5164C4.37603 19.8222 4.81811 13.6381 6.38318 10.264C7.69418 7.44893 10.4229 4.21205 19.9962 4.21205C29.4933 4.21205 32.1509 7.11864 33.6093 10.264C35.1743 13.6381 35.6164 19.8222 35.8806 23.5164C35.9213 24.05 35.9518 24.5226 35.9873 24.9087L36.0077 25.0713C36.1449 26.5856 36.4548 28.3489 36.9274 30.3154C37.8471 34.1519 39.1835 37.9934 39.8949 39.9396C40.0931 40.4732 40.0067 41.0575 39.6714 41.5454C38.528 43.1867 28.7413 48.3291 20.0013 48.3291ZM3.5935 39.9955C5.86488 41.4183 13.1211 45.0261 20.0013 45.0261C26.8612 45.0261 34.1276 41.4183 36.4091 39.9955C35.6367 37.8156 34.529 34.4618 33.7211 31.0878C33.2129 28.9637 32.8775 27.0429 32.7251 25.3813C32.7149 25.2949 32.7048 25.234 32.7048 25.1781C32.6743 24.7817 32.6387 24.299 32.5981 23.7502C32.3694 20.5082 31.9375 14.4766 30.6265 11.6564C29.9049 10.1065 28.7057 7.51499 20.0064 7.51499C11.307 7.51499 10.0113 10.3098 9.38628 11.6564C8.07528 14.4816 7.64336 20.5133 7.4147 23.7553C7.37405 24.3041 7.33848 24.7919 7.30799 25.1882C7.30291 25.2441 7.29783 25.2949 7.29275 25.3457C7.13523 27.0429 6.79985 28.9637 6.29171 31.0929C5.47361 34.4618 4.36587 37.8207 3.5935 39.9955Z","M19.8686 39.8437C18.9133 39.8437 14.0606 39.5998 12.0483 34.8487C11.1947 32.8415 11.1032 31.373 11.1032 28.7103C11.1032 26.9877 11.2963 25.4531 11.6774 24.1573C11.967 23.1715 12.3736 22.2924 12.8868 21.5455C13.7252 20.3158 14.8533 19.6044 15.7374 19.1165C18.0444 17.8513 22.1298 17.8614 24.3047 19.1419C25.2904 19.7212 26.3169 20.3818 27.1096 21.5455C27.6228 22.2924 28.0293 23.1715 28.319 24.1573C28.7001 25.4531 28.8932 26.9826 28.8932 28.7103C28.8932 31.2815 28.8931 32.8364 27.9226 34.9046C26.4287 38.0855 23.6644 39.8386 20.1328 39.8437H19.8686ZM19.8737 36.5408H20.1328C22.3788 36.5408 23.9947 35.5194 24.9398 33.5021C25.5648 32.1707 25.5953 31.2307 25.5953 28.7154C25.5953 27.3078 25.448 26.0883 25.1532 25.0974C24.9602 24.447 24.7061 23.8778 24.386 23.4205C23.9744 22.8158 23.3443 22.4195 22.6278 21.9977C21.4642 21.3168 18.5881 21.327 17.3177 22.0231C16.6877 22.3687 16.0474 22.7752 15.6053 23.4205C15.2903 23.8829 15.0311 24.447 14.838 25.0974C14.5484 26.0883 14.3959 27.3078 14.3959 28.7154C14.3959 31.2256 14.4874 32.1657 15.0769 33.558C16.2913 36.3934 19.2842 36.5408 19.8737 36.5408Z","M31.2512 12.8562C30.9869 12.6936 30.7125 12.5259 30.4331 12.409C28.116 11.4588 25.7379 11.4893 23.3699 12.1244C22.2419 12.4243 21.1189 12.6529 19.9857 12.6631C18.8577 12.6631 17.7347 12.4243 16.6015 12.1244C14.2336 11.4842 11.8504 11.4588 9.5384 12.409C9.24877 12.5259 8.97437 12.6834 8.7203 12.8562C8.21724 13.1763 7.98858 13.593 8.11053 14.2332C8.32903 15.4172 8.46623 16.6317 8.68473 17.8157C8.90323 18.9895 9.68577 19.7923 10.8748 19.9041C12.4958 20.0566 14.1218 20.143 15.7529 20.1684C17.0589 20.1938 17.9888 19.6043 18.3597 18.273C18.7052 17.0534 19.0609 15.8288 19.4624 14.6194C19.5437 14.3654 19.8181 14.1723 20.0111 13.9538C20.1941 14.1723 20.4736 14.3654 20.5599 14.6194C20.9614 15.8339 21.3171 17.0534 21.6626 18.273C22.0386 19.6043 22.9685 20.1988 24.2694 20.1684C25.8903 20.143 27.5214 20.0566 29.1475 19.9041C30.3314 19.7923 31.1241 18.9844 31.3376 17.8157C31.5561 16.6215 31.6933 15.4172 31.9118 14.2332C32.0286 13.6031 31.7949 13.1763 31.302 12.8562H31.2512Z","M21.3181 34.1013C21.3689 34.0861 21.4197 34.0708 21.4655 34.0505L21.4604 34.0454C21.4147 34.0657 21.3638 34.081 21.3181 34.1013Z","M18.6603 34.0869C18.6603 34.0869 18.6756 34.092 18.6959 34.1022C18.6807 34.0971 18.6705 34.092 18.6603 34.0869Z","M22.6086 30.7222C22.136 30.5291 21.6177 30.6409 21.2722 30.9661V30.8695V30.0108V27.4345C21.7498 27.2262 22.2021 26.9009 22.5832 26.4589C22.7915 26.22 22.9491 25.9761 23.0558 25.7373C23.1625 25.4985 23.2184 25.2596 23.2184 25.0259C23.2184 24.7464 23.132 24.472 22.9745 24.2434C22.8576 24.0706 22.695 23.9181 22.507 23.7911C22.2224 23.598 21.8667 23.4557 21.45 23.3541C21.0334 23.2576 20.5506 23.2067 20.0069 23.2067C19.5242 23.2067 19.0872 23.2474 18.6959 23.3287C18.1167 23.4456 17.6441 23.6488 17.3087 23.9385C17.141 24.0807 17.0038 24.2484 16.9124 24.4364C16.8209 24.6245 16.7701 24.8328 16.7701 25.0462C16.7701 25.2749 16.826 25.5086 16.9276 25.7475C17.0292 25.9812 17.1817 26.22 17.3849 26.4589C17.7356 26.8705 18.1421 27.1855 18.5841 27.3938C18.6299 27.4142 18.6807 27.4345 18.7264 27.4548V30.0108V30.8695V30.9661C18.3606 30.6256 17.8067 30.524 17.329 30.7476C16.6939 31.0423 16.4195 31.7995 16.7142 32.4346C17.141 33.3493 17.9236 33.8371 18.6553 34.0861C18.6654 34.0912 18.6807 34.0963 18.6909 34.1013C18.8941 34.1776 19.9968 34.5333 21.3129 34.1013C21.3586 34.0861 21.4094 34.0658 21.4551 34.0505C22.1818 33.7863 22.9389 33.2832 23.3048 32.3787C23.5741 31.7232 23.259 30.9813 22.6086 30.7222Z"],rC=se.lazy(()=>XS(()=>import("./VibeEditComposer-BDtlZdpl.js"),__vite__mapDeps([0,1]),import.meta.url)),Xd="viz-header-actions";function oC(e){return e.length>0}function iC(e){return{label:e.apiName,title:`${e.elementType}: ${e.apiName}`,variant:e.elementType==="field"?"primary":"default"}}function sC(){return se.createElement("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true"},nC.map(e=>se.createElement("path",{key:e,d:e,fill:"currentColor"})))}const lC=20,aC=2e3;function uC(e){const{nodes:t,fileName:n,options:r}=e,o=r==null?void 0:r.placeholder,i=(r==null?void 0:r.selectLabel)??"Select",s=(r==null?void 0:r.selectingLabel)??"Selecting",l=(r==null?void 0:r.chipFor)??iC,a=r==null?void 0:r.onActivate,u=(r==null?void 0:r.toggleInline)??!1,[f,c]=U.useState(()=>!u&&Qi()&&typeof document<"u"?document.getElementById(Xd):null);U.useEffect(()=>{u||f||!Qi()||typeof document>"u"||c(document.getElementById(Xd))},[u,f]);const[d,h]=U.useState(!1),[y,w]=U.useState(null),[x,m]=U.useState([]),g=KS(),p=U.useRef(new Map);U.useEffect(()=>{if(d)return qS(t,p.current)},[d,t]),U.useEffect(()=>{if(typeof document>"u")return;const C=[];if(d)for(const[M,z]of p.current){const Y=z.getAttribute(br)??"";M&&g.isSelected(Y,M)&&(z.setAttribute(Hd,""),C.push(z))}return()=>{for(const M of C)M.removeAttribute(Hd)}},[d,g.selected,t]),U.useEffect(()=>{if(typeof document>"u"||!d)return;const C=new Set;y&&C.add(`${y.type}::${y.id}`);for(const z of x)C.add(`${z.type}::${z.id}`);if(C.size===0)return;const M=[];for(const[z,Y]of p.current){const A=Y.getAttribute(br)??"";z&&C.has(`${A}::${z}`)&&(Y.setAttribute(Bd,""),M.push(Y))}return()=>{for(const z of M)z.removeAttribute(Bd)}},[d,y,x,t]);const v=U.useMemo(()=>Ql(g.items,t,n),[t,g.items,n]),_=U.useMemo(()=>v.map(l),[v,l]),S=U.useCallback(C=>{const M={prompt:C.trim(),attachments:v},z=n0({type:pn.SUBMIT_EDIT,payload:M});return z&&(g.clear(),h(!1)),z},[v,g]),T=U.useMemo(()=>g.items.flatMap(C=>{const[M]=Ql([C],t,n);return M?[{id:C.id,elementType:M.elementType,label:l(M).label,data:M}]:[]}),[g.items,t,n,l]),R=U.useCallback(C=>{const M=p.current.get(C);if(M)return M;if(typeof document>"u")return null;const z=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(C):C;return document.querySelector(`[data-mv-id="${z}"]`)},[]),H=U.useRef(null),L=U.useCallback(()=>{var C;return(C=H.current)==null?void 0:C.focus()},[]),b=U.useCallback(async(C,M,z)=>{const Y=C.map(Q=>({type:"",id:Q})),A=Ql(Y,t,n),k=[];let D=0;for(const Q of A.slice(0,lC)){const Z=`@${Q.apiName}`;if(k.length>0&&D+Z.length+1>aC)break;k.push(Z),D+=Z.length+1}const B=A.length-k.length,X={prompt:[(B>0?[...k,`and ${B} more`]:k).join(" "),M.trim()].filter(Q=>Q.length>0).join(" "),attachments:A,chatTarget:z,selectionIds:C},{result:G}=await rS(X);return g.clear(),h(!1),G.conversationId?{chatId:G.conversationId}:void 0},[t,n,g]),$=U.useCallback(C=>{const M=g.items.find(z=>z.id===C);M&&g.toggle(M)},[g]),V=U.useCallback(C=>{const M=g.items[C];M&&g.toggle(M)},[g]),E=U.useCallback((C,M)=>{d&&g.toggle({type:C,id:M})},[d,g]),j=U.useCallback(()=>{h(C=>{const M=!C;return M||(g.clear(),w(null),m([])),M})},[g]);if(!oC(t))return{toggleButton:null,overlay:null,panel:null,selectMode:!1,isSelected:()=>!1,toggle:()=>{}};const P=se.createElement("button",{ref:H,className:`mv-vibe-edit-toggle ${d?"mv-vibe-edit-toggle--active":""}`,onClick:j,"aria-label":"Select components to edit with AI",title:"Select components to edit with AI",type:"button"},se.createElement(sC,null),se.createElement("span",null,d?s:i)),O=f?yc.createPortal(P,f):P,N=se.createElement(QS,{active:d,selected:g.selected,onReplace:g.replace,onAdd:g.add,onToggle:g.toggle,onClear:g.clear,onActivate:a?C=>a(C.id):void 0,onHover:w,onMarqueePreview:m});let I;return Qi()?I=se.createElement(se.Suspense,{fallback:null},se.createElement(rC,{elements:T,active:d,nodeFor:R,onEdit:b,onDeselect:$,onSent:L,onClose:L})):I=se.createElement(tC,{chips:_,onSubmit:S,onClear:g.clear,onRemove:V,placeholder:o}),{toggleButton:O,overlay:N,panel:I,selectMode:d,isSelected:g.isSelected,toggle:E}}function cC(e){return e.objects.map(t=>t.apiName).sort().join(",")}function fC(e,t,n,r,o){if(t===e)return{seed:void 0,viewport:r,hasLayout:n};if(o&&o.fingerprint===e){const i=new Map;try{for(const[s,l]of Object.entries(o.positionCache||{}))i.set(s,l);return{seed:i,viewport:o.viewport,hasLayout:!0}}catch{}}return{seed:new Map,viewport:void 0,hasLayout:!1}}const no=new Map;let Gd=!1,Kl,go="",iu;function u0(){var e;try{return(e=window.getHostApi)==null?void 0:e.call(window)}catch{return}}function Zl(e){const t=u0();if(!(t!=null&&t.setState)||!go)return;const n={};no.forEach((o,i)=>{n[i]=o});const r=t.getState();t.setState({fingerprint:go,positionCache:n,viewport:e??(r==null?void 0:r.viewport)})}(function(){var r;const t=u0(),n=(r=t==null?void 0:t.getState)==null?void 0:r.call(t);!n||!n.fingerprint||(iu=n)})();const dC={objectCard:gS},hC={relationship:mS};function pC(e){return e.replace(/__c$/,"").split("__").length>1}function gC(e,t){return!t.some(n=>n.sourceObject===e.apiName||n.targetObject===e.apiName)}function mC({data:e,activeObjectName:t,dataFingerprint:n,selectableNodes:r}){const{fitView:o,zoomIn:i,zoomOut:s}=sl(),{zoom:l}=I4(),[a,u]=U.useState(!1),[f,c]=U.useState(!1),[d,h]=U.useState(yS),y=U.useRef(null),w=U.useRef(),x=U.useMemo(()=>fC(n,go,Gd,Kl,iu),[n]),[m,g]=U.useState(x.hasLayout);U.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]);const p=U.useCallback(M=>{w.current&&clearTimeout(w.current),w.current=setTimeout(()=>Zl(M),300)},[]),v=U.useCallback((M,z)=>{no.set(z.id,{x:z.position.x,y:z.position.y,zIndex:z.zIndex||10}),Zl()},[]);U.useEffect(()=>{const M=z=>{y.current&&!y.current.contains(z.target)&&(u(!1),c(!1))};return(a||f)&&document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[a,f]);const _=U.useMemo(()=>e.objects.filter(M=>{if(d.searchQuery){const D=d.searchQuery.toLowerCase();if(!M.apiName.toLowerCase().includes(D)&&!M.label.toLowerCase().includes(D))return!1}const z=M.type==="custom",Y=M.type==="standard",A=z&&pC(M.apiName),k=gC(M,e.relationships);return!(Y&&!d.showStandard||z&&!A&&!d.showCustom||A&&!d.showNamespaced||k&&d.showOrphaned===!1&&!d.showStandard&&!d.showCustom)}),[e.objects,e.relationships,d]),S=U.useMemo(()=>new Set(_.map(M=>M.apiName)),[_]),T=U.useMemo(()=>d.displayRelationships?e.relationships.filter(M=>S.has(M.sourceObject)&&S.has(M.targetObject)):[],[e.relationships,S,d.displayRelationships]),R=U.useMemo(()=>T.map(M=>{const z=_.find(A=>A.apiName===M.sourceObject),Y=_.find(A=>A.apiName===M.targetObject);return{id:`${M.sourceObject}-${M.fieldApiName}-${M.targetObject}`,source:M.sourceObject,target:M.targetObject,sourceHandle:M.fieldApiName,type:"relationship",data:{relType:M.type,fieldApiName:M.fieldApiName,sourceType:(z==null?void 0:z.type)||"custom",targetType:(Y==null?void 0:Y.type)||"custom"},animated:M.type==="MasterDetail"}}),[T,_]),{laidOutNodes:H,laidOutEdges:L}=U.useMemo(()=>{const M=k=>{var D;return no.get(k)??((D=x.seed)==null?void 0:D.get(k))},z=_.map(k=>{const D=M(k.apiName);return{id:k.apiName,type:"objectCard",position:D?{x:D.x,y:D.y}:{x:0,y:0},zIndex:(D==null?void 0:D.zIndex)||10,data:{...k,isActive:k.apiName===t,isInactive:t&&k.apiName!==t}}});if(z.length>0&&z.every(k=>M(k.id)!=null)||z.length===0)return{laidOutNodes:z,laidOutEdges:R};const A=US(z,R,"LR");return{laidOutNodes:A.nodes,laidOutEdges:A.edges}},[_,R,t,x]);U.useEffect(()=>{try{go!==n&&(no.clear(),Kl=x.viewport),H.forEach(z=>{no.set(z.id,{x:z.position.x,y:z.position.y,zIndex:z.zIndex||10})}),H.length>0&&(Gd=!0)}finally{go=n,iu=void 0}},[H,n,x.viewport]);const[b,$,V]=P4(H),[E,j,P]=T4(L);U.useEffect(()=>{$(H),j(L)},[H,L,$,j]),U.useLayoutEffect(()=>{if(H.length===0||m)return;const M=window.requestAnimationFrame(()=>{o({padding:.15}),Zl(),g(!0)});return()=>window.cancelAnimationFrame(M)},[H,m,o]);const O=`${Math.round(l*100)}%`,{toggleButton:N,overlay:I,panel:C}=uC({nodes:r??[],options:{selectLabel:"Select to Edit",selectingLabel:"Selecting…",placeholder:"Describe your changes…"}});return F.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",visibility:m?"visible":"hidden"},children:[I,F.jsx("div",{className:"erd-vibe-toggle",children:N}),F.jsxs(N4,{nodes:b,edges:E,onNodesChange:V,onEdgesChange:P,onNodeDragStop:v,onViewportChange:p,nodeTypes:dC,edgeTypes:hC,minZoom:.2,maxZoom:2,defaultViewport:Kl,defaultEdgeOptions:{type:"relationship"},proOptions:{hideAttribution:!0},children:[F.jsx(Jo,{position:"bottom-right",style:{margin:"var(--mv-spacing-md)",marginBottom:"60px"},children:F.jsxs("div",{className:"erd-zoom-bar",ref:y,children:[F.jsx("button",{className:`erd-zoom-bar__btn ${f?"erd-zoom-bar__btn--active":""}`,onClick:()=>{c(!f),u(!1)},"aria-label":"Legend",children:F.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[F.jsx("line",{x1:"6",y1:"3.5",x2:"14",y2:"3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"6",y1:"8",x2:"14",y2:"8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"6",y1:"12.5",x2:"14",y2:"12.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("circle",{cx:"3",cy:"3.5",r:"1.5",fill:"currentColor"}),F.jsx("circle",{cx:"3",cy:"8",r:"1.5",fill:"currentColor"}),F.jsx("circle",{cx:"3",cy:"12.5",r:"1.5",fill:"currentColor"})]})}),F.jsx("span",{className:"erd-zoom-bar__divider"}),F.jsx("button",{className:"erd-zoom-bar__btn",onClick:()=>s(),"aria-label":"Zoom out",children:F.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[F.jsx("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.5"}),F.jsx("line",{x1:"11",y1:"11",x2:"14",y2:"14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"4.5",y1:"7",x2:"9.5",y2:"7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),F.jsx("span",{className:"erd-zoom-bar__level",children:O}),F.jsx("button",{className:"erd-zoom-bar__btn",onClick:()=>i(),"aria-label":"Zoom in",children:F.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[F.jsx("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.5"}),F.jsx("line",{x1:"11",y1:"11",x2:"14",y2:"14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"4.5",y1:"7",x2:"9.5",y2:"7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),F.jsx("line",{x1:"7",y1:"4.5",x2:"7",y2:"9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),f&&F.jsx(vS,{})]})}),F.jsx(O4,{variant:Dt.Dots,color:"var(--mv-canvas-grid)",gap:20,size:1.5,bgColor:"var(--mv-canvas-bg)"})]}),C]})}const yC=({data:e,activeObjectName:t,selectableNodes:n})=>{const r=U.useMemo(()=>cC(e),[e]);return F.jsx(qm,{children:F.jsx(mC,{data:e,activeObjectName:t,dataFingerprint:r,selectableNodes:n})},r)};function vC({data:e,activeObjectName:t,selectableNodes:n}){return F.jsx("div",{className:"schema-visualization",children:F.jsx(yC,{data:e,activeObjectName:t,selectableNodes:n})})}var su={},Qd=yc;su.createRoot=Qd.createRoot,su.hydrateRoot=Qd.hydrateRoot;function wC(e,t){Fn.create().category(Pr.Rendering).message(e.message).stackTrace(e.stack).context({componentStack:t.componentStack,errorName:e.name}).send(),console.error("[ErrorBoundary] Rendering error:",e,t)}function xC({error:e}){return F.jsxs(F.Fragment,{children:[F.jsx("p",{children:"Something went wrong. Check the error panel for details."}),e&&F.jsxs(F.Fragment,{children:[e.message&&F.jsx("p",{children:e.message}),e.stack&&F.jsx("pre",{children:e.stack})]})]})}class EC extends se.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){wC(t,n)}render(){return this.state.hasError?F.jsx(xC,{error:this.state.error}):this.props.children}}let et=null,Ti=null,ct=null,Kd=!1;function _C(e){if(typeof e!="object"||e===null)return e;const t=e;return t.kind===void 0&&typeof t.filePath=="string"&&typeof t.fileName=="string"?{...t,kind:"file",filePath:t.filePath,fileName:t.fileName}:e}function SC(e,t){const{rootClass:n,title:r,message:o,filePath:i}=t,s=i?`<p>File: ${i}</p>`:"";e.innerHTML=`
|
|
64
|
-
<div class="${n}">
|
|
65
|
-
<div class="error-message">
|
|
66
|
-
<h2>${r}</h2>
|
|
67
|
-
<p>${o}</p>
|
|
68
|
-
${s}
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
`}function bi(e,t){const{logPrefix:n,rootClass:r,title:o,consoleMessage:i,errorBuilderMessage:s,context:l={},domMessage:a,filePath:u}=t;console.error(`${n} ${i}`),Fn.create().category(Pr.Rendering).message(s).context(l).send(),SC(e,{rootClass:r,title:o,message:a,filePath:u})}async function Zd(e){const{pluginName:t,rootClass:n,expectedSourceKind:r,render:o,validateData:i}=e,s=`[${t} React App]`,l=document.getElementById("root");if(!l){console.error(`${s} Root element not found`);return}if(ct&&(ct(),ct=null),et){try{et.unmount()}catch(g){console.warn(`${s} Error unmounting previous root:`,g)}et=null,Ti=null}const a={fn:null};let u=null,f=!1;ct=iS(g=>{if(!f)if(a.fn)try{a.fn(g)}catch(p){console.error(`${s} Update handler threw:`,p)}else u=g});const d=(g,p,v)=>{g.render(F.jsx(se.StrictMode,{children:F.jsx(EC,{children:o(p,v)})}))},h=()=>{if(et){try{et.unmount()}catch(g){console.warn(`${s} Error unmounting previous root:`,g)}et=null}Ti=null},y=g=>g.kind===r,w=()=>{f=!0,ct==null||ct(),ct=null,u=null},x=(g,p)=>{const v=g!=null&&g.context?_C(g.context):void 0,_=g==null?void 0:g.data;if(!v||_==null){h();const L=(v==null?void 0:v.kind)==="file"?v.filePath:void 0;bi(l,{logPrefix:s,rootClass:n,title:p?"Error: No updated data provided":"Error: No data provided",consoleMessage:"No data provided",errorBuilderMessage:`${t} data is missing or invalid`,context:{sourceKind:v==null?void 0:v.kind,reason:"No data provided in response"},domMessage:`${t} data is missing or invalid.`,filePath:L});return}if(!y(v)){h(),w(),bi(l,{logPrefix:s,rootClass:n,title:"Error: Unsupported visualization source",consoleMessage:`Expected ${r} context but received ${v.kind}`,errorBuilderMessage:`${t} received an incompatible visualization source`,context:{expectedSourceKind:r,actualSourceKind:v.kind},domMessage:`${t} cannot render data from this source.`});return}const S=v,T=i!=null?i(_):null;if(T!=null){h(),bi(l,{logPrefix:s,rootClass:n,title:p?"Error: Invalid Updated Data":"Error: Invalid Data",consoleMessage:`Validation failed: ${T}`,errorBuilderMessage:`${t} data structure is invalid`,context:{sourceKind:S.kind,reason:T},domMessage:T,filePath:S.kind==="file"?S.filePath:void 0});return}const R={...S,selectableNodes:g.selectableNodes},H=S.kind==="file"?`file:${S.filePath}`:`payload:${S.pluginId}`;if(et==null||H!==Ti){if(et){try{et.unmount()}catch(L){console.warn(`${s} Error unmounting previous root:`,L)}et=null}l.innerHTML="",et=su.createRoot(l),Ti=H}d(et,_,R)},m=await oS();if(!m){if(bi(l,{logPrefix:s,rootClass:n,title:"Error: Failed to load data",consoleMessage:"Failed to receive plugin data from host",errorBuilderMessage:`${t} data is missing or invalid`,context:{reason:"Failed to receive plugin data from host"},domMessage:`Could not receive ${t} data from the extension host.`}),a.fn=g=>x(g,!0),u){const g=u;u=null,a.fn(g)}return}if(x(m,!1),!f&&(a.fn=g=>x(g,!0),u)){const g=u;u=null,a.fn(g)}}function CC(e){sS(),Kd||(window.addEventListener("pagehide",()=>{ct&&(ct(),ct=null)}),Kd=!0),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{Zd(e)}):Zd(e)}function kC(e){if(!e)return;const n=(e.split("/").pop()||e.split("\\").pop()||"").match(/^(.+)\.object-meta\.xml$/);if(n)return n[1]}CC({pluginName:"Schema",rootClass:"schema-app",expectedSourceKind:"file",render:(e,t)=>{const n=kC(t.filePath);return F.jsx(vC,{data:e,activeObjectName:n,selectableNodes:t.selectableNodes})},validateData:e=>!e.objects||!e.relationships?"Schema data structure is missing required properties (objects or relationships)":null});export{NC as A,se as R,nC as S,U as r};
|