@opentrust/dashboard 7.3.12 → 7.3.13
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/package.json +3 -3
- package/public/assets/index-DTftFTs6.js +287 -0
- package/public/assets/{index-7EUFflik.js.map → index-DTftFTs6.js.map} +1 -1
- package/public/assets/{index-FyZ7Y5kf.css → index-h0-Dwbay.css} +1 -1
- package/public/index.html +2 -2
- package/public/assets/index-7EUFflik.js +0 -287
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
function Aw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const 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 Mc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jp={exports:{}},Rl={},em={exports:{}},ne={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ji=Symbol.for("react.element"),Dw=Symbol.for("react.portal"),zw=Symbol.for("react.fragment"),$w=Symbol.for("react.strict_mode"),Ow=Symbol.for("react.profiler"),Fw=Symbol.for("react.provider"),Bw=Symbol.for("react.context"),Hw=Symbol.for("react.forward_ref"),Vw=Symbol.for("react.suspense"),Uw=Symbol.for("react.memo"),Ww=Symbol.for("react.lazy"),Sf=Symbol.iterator;function Yw(e){return e===null||typeof e!="object"?null:(e=Sf&&e[Sf]||e["@@iterator"],typeof e=="function"?e:null)}var tm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nm=Object.assign,rm={};function fo(e,t,n){this.props=e,this.context=t,this.refs=rm,this.updater=n||tm}fo.prototype.isReactComponent={};fo.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")};fo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function om(){}om.prototype=fo.prototype;function Rc(e,t,n){this.props=e,this.context=t,this.refs=rm,this.updater=n||tm}var Ic=Rc.prototype=new om;Ic.constructor=Rc;nm(Ic,fo.prototype);Ic.isPureReactComponent=!0;var Nf=Array.isArray,im=Object.prototype.hasOwnProperty,Tc={current:null},sm={key:!0,ref:!0,__self:!0,__source:!0};function lm(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)im.call(t,r)&&!sm.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:ji,type:e,key:i,ref:s,props:o,_owner:Tc.current}}function Xw(e,t){return{$$typeof:ji,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Lc(e){return typeof e=="object"&&e!==null&&e.$$typeof===ji}function Gw(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ef=/\/+/g;function wa(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Gw(""+e.key):t.toString(36)}function Es(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 ji:case Dw:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+wa(s,0):r,Nf(o)?(n="",e!=null&&(n=e.replace(Ef,"$&/")+"/"),Es(o,t,n,"",function(u){return u})):o!=null&&(Lc(o)&&(o=Xw(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Ef,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Nf(e))for(var l=0;l<e.length;l++){i=e[l];var a=r+wa(i,l);s+=Es(i,t,n,a,o)}else if(a=Yw(e),typeof a=="function")for(e=a.call(e),l=0;!(i=e.next()).done;)i=i.value,a=r+wa(i,l++),s+=Es(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 Ui(e,t,n){if(e==null)return e;var r=[],o=0;return Es(e,r,"","",function(i){return t.call(n,i,o++)}),r}function Kw(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 Ue={current:null},ks={transition:null},Qw={ReactCurrentDispatcher:Ue,ReactCurrentBatchConfig:ks,ReactCurrentOwner:Tc};ne.Children={map:Ui,forEach:function(e,t,n){Ui(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ui(e,function(){t++}),t},toArray:function(e){return Ui(e,function(t){return t})||[]},only:function(e){if(!Lc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ne.Component=fo;ne.Fragment=zw;ne.Profiler=Ow;ne.PureComponent=Rc;ne.StrictMode=$w;ne.Suspense=Vw;ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qw;ne.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=nm({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Tc.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)im.call(t,a)&&!sm.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:ji,type:e.type,key:o,ref:i,props:r,_owner:s}};ne.createContext=function(e){return e={$$typeof:Bw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Fw,_context:e},e.Consumer=e};ne.createElement=lm;ne.createFactory=function(e){var t=lm.bind(null,e);return t.type=e,t};ne.createRef=function(){return{current:null}};ne.forwardRef=function(e){return{$$typeof:Hw,render:e}};ne.isValidElement=Lc;ne.lazy=function(e){return{$$typeof:Ww,_payload:{_status:-1,_result:e},_init:Kw}};ne.memo=function(e,t){return{$$typeof:Uw,type:e,compare:t===void 0?null:t}};ne.startTransition=function(e){var t=ks.transition;ks.transition={};try{e()}finally{ks.transition=t}};ne.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ne.useCallback=function(e,t){return Ue.current.useCallback(e,t)};ne.useContext=function(e){return Ue.current.useContext(e)};ne.useDebugValue=function(){};ne.useDeferredValue=function(e){return Ue.current.useDeferredValue(e)};ne.useEffect=function(e,t){return Ue.current.useEffect(e,t)};ne.useId=function(){return Ue.current.useId()};ne.useImperativeHandle=function(e,t,n){return Ue.current.useImperativeHandle(e,t,n)};ne.useInsertionEffect=function(e,t){return Ue.current.useInsertionEffect(e,t)};ne.useLayoutEffect=function(e,t){return Ue.current.useLayoutEffect(e,t)};ne.useMemo=function(e,t){return Ue.current.useMemo(e,t)};ne.useReducer=function(e,t,n){return Ue.current.useReducer(e,t,n)};ne.useRef=function(e){return Ue.current.useRef(e)};ne.useState=function(e){return Ue.current.useState(e)};ne.useSyncExternalStore=function(e,t,n){return Ue.current.useSyncExternalStore(e,t,n)};ne.useTransition=function(){return Ue.current.useTransition()};ne.version="18.3.0";em.exports=ne;var y=em.exports;const At=Mc(y),qw=Aw({__proto__:null,default:At},[y]);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Zw=y,Jw=Symbol.for("react.element"),e1=Symbol.for("react.fragment"),t1=Object.prototype.hasOwnProperty,n1=Zw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r1={key:!0,ref:!0,__self:!0,__source:!0};function am(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)t1.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:Jw,type:e,key:i,ref:s,props:o,_owner:n1.current}}Rl.Fragment=e1;Rl.jsx=am;Rl.jsxs=am;Jp.exports=Rl;var d=Jp.exports,hu={},um={exports:{}},st={},cm={exports:{}},dm={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(b,P){var L=b.length;b.push(P);e:for(;0<L;){var O=L-1>>>1,$=b[O];if(0<o($,P))b[O]=P,b[L]=$,L=O;else break e}}function n(b){return b.length===0?null:b[0]}function r(b){if(b.length===0)return null;var P=b[0],L=b.pop();if(L!==P){b[0]=L;e:for(var O=0,$=b.length,U=$>>>1;O<U;){var V=2*(O+1)-1,Y=b[V],X=V+1,G=b[X];if(0>o(Y,L))X<$&&0>o(G,Y)?(b[O]=G,b[X]=L,O=X):(b[O]=Y,b[V]=L,O=V);else if(X<$&&0>o(G,L))b[O]=G,b[X]=L,O=X;else break e}}return P}function o(b,P){var L=b.sortIndex-P.sortIndex;return L!==0?L:b.id-P.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,h=3,v=!1,x=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,p=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 m(b){for(var P=n(u);P!==null;){if(P.callback===null)r(u);else if(P.startTime<=b)r(u),P.sortIndex=P.expirationTime,t(a,P);else break;P=n(u)}}function N(b){if(w=!1,m(b),!x)if(n(a)!==null)x=!0,M(E);else{var P=n(u);P!==null&&D(N,P.startTime-b)}}function E(b,P){x=!1,w&&(w=!1,p(j),j=-1),v=!0;var L=h;try{for(m(P),c=n(a);c!==null&&(!(c.expirationTime>P)||b&&!T());){var O=c.callback;if(typeof O=="function"){c.callback=null,h=c.priorityLevel;var $=O(c.expirationTime<=P);P=e.unstable_now(),typeof $=="function"?c.callback=$:c===n(a)&&r(a),m(P)}else r(a);c=n(a)}if(c!==null)var U=!0;else{var V=n(u);V!==null&&D(N,V.startTime-P),U=!1}return U}finally{c=null,h=L,v=!1}}var C=!1,k=null,j=-1,R=5,z=-1;function T(){return!(e.unstable_now()-z<R)}function I(){if(k!==null){var b=e.unstable_now();z=b;var P=!0;try{P=k(!0,b)}finally{P?F():(C=!1,k=null)}}else C=!1}var F;if(typeof g=="function")F=function(){g(I)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,A=_.port2;_.port1.onmessage=I,F=function(){A.postMessage(null)}}else F=function(){S(I,0)};function M(b){k=b,C||(C=!0,F())}function D(b,P){j=S(function(){b(e.unstable_now())},P)}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(b){b.callback=null},e.unstable_continueExecution=function(){x||v||(x=!0,M(E))},e.unstable_forceFrameRate=function(b){0>b||125<b?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<b?Math.floor(1e3/b):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(b){switch(h){case 1:case 2:case 3:var P=3;break;default:P=h}var L=h;h=P;try{return b()}finally{h=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(b,P){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var L=h;h=b;try{return P()}finally{h=L}},e.unstable_scheduleCallback=function(b,P,L){var O=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?O+L:O):L=O,b){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=L+$,b={id:f++,callback:P,priorityLevel:b,startTime:L,expirationTime:$,sortIndex:-1},L>O?(b.sortIndex=L,t(u,b),n(a)===null&&b===n(u)&&(w?(p(j),j=-1):w=!0,D(N,L-O))):(b.sortIndex=$,t(a,b),x||v||(x=!0,M(E))),b},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(b){var P=h;return function(){var L=h;h=P;try{return b.apply(this,arguments)}finally{h=L}}}})(dm);cm.exports=dm;var o1=cm.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var i1=y,ot=o1;function B(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 fm=new Set,ti={};function hr(e,t){Xr(e,t),Xr(e+"Capture",t)}function Xr(e,t){for(ti[e]=t,e=0;e<t.length;e++)fm.add(t[e])}var on=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pu=Object.prototype.hasOwnProperty,s1=/^[: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]*$/,kf={},Cf={};function l1(e){return pu.call(Cf,e)?!0:pu.call(kf,e)?!1:s1.test(e)?Cf[e]=!0:(kf[e]=!0,!1)}function a1(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 u1(e,t,n,r){if(t===null||typeof t>"u"||a1(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 We(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 Ae={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ae[e]=new We(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ae[t]=new We(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ae[e]=new We(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ae[e]=new We(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){Ae[e]=new We(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ae[e]=new We(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ae[e]=new We(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ae[e]=new We(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ae[e]=new We(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ac=/[\-:]([a-z])/g;function Dc(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(Ac,Dc);Ae[t]=new We(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(Ac,Dc);Ae[t]=new We(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(Ac,Dc);Ae[t]=new We(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ae[e]=new We(e,1,!1,e.toLowerCase(),null,!1,!1)});Ae.xlinkHref=new We("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ae[e]=new We(e,1,!1,e.toLowerCase(),null,!0,!0)});function zc(e,t,n,r){var o=Ae.hasOwnProperty(t)?Ae[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(u1(t,n,o,r)&&(n=null),r||o===null?l1(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 cn=i1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wi=Symbol.for("react.element"),Sr=Symbol.for("react.portal"),Nr=Symbol.for("react.fragment"),$c=Symbol.for("react.strict_mode"),mu=Symbol.for("react.profiler"),hm=Symbol.for("react.provider"),pm=Symbol.for("react.context"),Oc=Symbol.for("react.forward_ref"),gu=Symbol.for("react.suspense"),yu=Symbol.for("react.suspense_list"),Fc=Symbol.for("react.memo"),xn=Symbol.for("react.lazy"),mm=Symbol.for("react.offscreen"),bf=Symbol.iterator;function Eo(e){return e===null||typeof e!="object"?null:(e=bf&&e[bf]||e["@@iterator"],typeof e=="function"?e:null)}var we=Object.assign,Sa;function zo(e){if(Sa===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Sa=t&&t[1]||""}return`
|
|
34
|
-
`+Sa+e}var Na=!1;function Ea(e,t){if(!e||Na)return"";Na=!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(`
|
|
35
|
-
`),i=r.stack.split(`
|
|
36
|
-
`),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=`
|
|
37
|
-
`+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{Na=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zo(e):""}function c1(e){switch(e.tag){case 5:return zo(e.type);case 16:return zo("Lazy");case 13:return zo("Suspense");case 19:return zo("SuspenseList");case 0:case 2:case 15:return e=Ea(e.type,!1),e;case 11:return e=Ea(e.type.render,!1),e;case 1:return e=Ea(e.type,!0),e;default:return""}}function vu(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 Nr:return"Fragment";case Sr:return"Portal";case mu:return"Profiler";case $c:return"StrictMode";case gu:return"Suspense";case yu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pm:return(e.displayName||"Context")+".Consumer";case hm:return(e._context.displayName||"Context")+".Provider";case Oc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Fc:return t=e.displayName||null,t!==null?t:vu(e.type)||"Memo";case xn:t=e._payload,e=e._init;try{return vu(e(t))}catch{}}return null}function d1(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 vu(t);case 8:return t===$c?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function An(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function f1(e){var t=gm(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 Yi(e){e._valueTracker||(e._valueTracker=f1(e))}function ym(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Us(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xu(e,t){var n=t.checked;return we({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _f(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=An(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 vm(e,t){t=t.checked,t!=null&&zc(e,"checked",t,!1)}function wu(e,t){vm(e,t);var n=An(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")?Su(e,t.type,n):t.hasOwnProperty("defaultValue")&&Su(e,t.type,An(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jf(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 Su(e,t,n){(t!=="number"||Us(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $o=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=""+An(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 Nu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return we({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Pf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(B(92));if($o(n)){if(1<n.length)throw Error(B(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:An(n)}}function xm(e,t){var n=An(t.value),r=An(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 Mf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function wm(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 Eu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?wm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xi,Sm=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(Xi=Xi||document.createElement("div"),Xi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ni(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vo={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},h1=["Webkit","ms","Moz","O"];Object.keys(Vo).forEach(function(e){h1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vo[t]=Vo[e]})});function Nm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vo.hasOwnProperty(e)&&Vo[e]?(""+t).trim():t+"px"}function Em(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Nm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var p1=we({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 ku(e,t){if(t){if(p1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function Cu(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 bu=null;function Bc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _u=null,Dr=null,zr=null;function Rf(e){if(e=Ri(e)){if(typeof _u!="function")throw Error(B(280));var t=e.stateNode;t&&(t=Dl(t),_u(e.stateNode,e.type,t))}}function km(e){Dr?zr?zr.push(e):zr=[e]:Dr=e}function Cm(){if(Dr){var e=Dr,t=zr;if(zr=Dr=null,Rf(e),t)for(e=0;e<t.length;e++)Rf(t[e])}}function bm(e,t){return e(t)}function _m(){}var ka=!1;function jm(e,t,n){if(ka)return e(t,n);ka=!0;try{return bm(e,t,n)}finally{ka=!1,(Dr!==null||zr!==null)&&(_m(),Cm())}}function ri(e,t){var n=e.stateNode;if(n===null)return null;var r=Dl(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(B(231,t,typeof n));return n}var ju=!1;if(on)try{var ko={};Object.defineProperty(ko,"passive",{get:function(){ju=!0}}),window.addEventListener("test",ko,ko),window.removeEventListener("test",ko,ko)}catch{ju=!1}function m1(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 Uo=!1,Ws=null,Ys=!1,Pu=null,g1={onError:function(e){Uo=!0,Ws=e}};function y1(e,t,n,r,o,i,s,l,a){Uo=!1,Ws=null,m1.apply(g1,arguments)}function v1(e,t,n,r,o,i,s,l,a){if(y1.apply(this,arguments),Uo){if(Uo){var u=Ws;Uo=!1,Ws=null}else throw Error(B(198));Ys||(Ys=!0,Pu=u)}}function pr(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 Pm(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 If(e){if(pr(e)!==e)throw Error(B(188))}function x1(e){var t=e.alternate;if(!t){if(t=pr(e),t===null)throw Error(B(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 If(o),e;if(i===r)return If(o),t;i=i.sibling}throw Error(B(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(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?e:t}function Mm(e){return e=x1(e),e!==null?Rm(e):null}function Rm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Rm(e);if(t!==null)return t;e=e.sibling}return null}var Im=ot.unstable_scheduleCallback,Tf=ot.unstable_cancelCallback,w1=ot.unstable_shouldYield,S1=ot.unstable_requestPaint,Ne=ot.unstable_now,N1=ot.unstable_getCurrentPriorityLevel,Hc=ot.unstable_ImmediatePriority,Tm=ot.unstable_UserBlockingPriority,Xs=ot.unstable_NormalPriority,E1=ot.unstable_LowPriority,Lm=ot.unstable_IdlePriority,Il=null,Bt=null;function k1(e){if(Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(Il,e,void 0,(e.current.flags&128)===128)}catch{}}var _t=Math.clz32?Math.clz32:_1,C1=Math.log,b1=Math.LN2;function _1(e){return e>>>=0,e===0?32:31-(C1(e)/b1|0)|0}var Gi=64,Ki=4194304;function Oo(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 Gs(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=Oo(l):(i&=s,i!==0&&(r=Oo(i)))}else s=n&~o,s!==0?r=Oo(s):i!==0&&(r=Oo(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-_t(t),o=1<<n,r|=e[n],t&=~o;return r}function j1(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 P1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-_t(i),l=1<<s,a=o[s];a===-1?(!(l&n)||l&r)&&(o[s]=j1(l,t)):a<=t&&(e.expiredLanes|=l),i&=~l}}function Mu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Am(){var e=Gi;return Gi<<=1,!(Gi&4194240)&&(Gi=64),e}function Ca(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_t(t),e[t]=n}function M1(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-_t(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Vc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_t(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var le=0;function Dm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var zm,Uc,$m,Om,Fm,Ru=!1,Qi=[],bn=null,_n=null,jn=null,oi=new Map,ii=new Map,Sn=[],R1="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 Lf(e,t){switch(e){case"focusin":case"focusout":bn=null;break;case"dragenter":case"dragleave":_n=null;break;case"mouseover":case"mouseout":jn=null;break;case"pointerover":case"pointerout":oi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ii.delete(t.pointerId)}}function Co(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=Ri(t),t!==null&&Uc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function I1(e,t,n,r,o){switch(t){case"focusin":return bn=Co(bn,e,t,n,r,o),!0;case"dragenter":return _n=Co(_n,e,t,n,r,o),!0;case"mouseover":return jn=Co(jn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return oi.set(i,Co(oi.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ii.set(i,Co(ii.get(i)||null,e,t,n,r,o)),!0}return!1}function Bm(e){var t=Xn(e.target);if(t!==null){var n=pr(t);if(n!==null){if(t=n.tag,t===13){if(t=Pm(n),t!==null){e.blockedOn=t,Fm(e.priority,function(){$m(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 Cs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Iu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bu=r,n.target.dispatchEvent(r),bu=null}else return t=Ri(n),t!==null&&Uc(t),e.blockedOn=n,!1;t.shift()}return!0}function Af(e,t,n){Cs(e)&&n.delete(t)}function T1(){Ru=!1,bn!==null&&Cs(bn)&&(bn=null),_n!==null&&Cs(_n)&&(_n=null),jn!==null&&Cs(jn)&&(jn=null),oi.forEach(Af),ii.forEach(Af)}function bo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ru||(Ru=!0,ot.unstable_scheduleCallback(ot.unstable_NormalPriority,T1)))}function si(e){function t(o){return bo(o,e)}if(0<Qi.length){bo(Qi[0],e);for(var n=1;n<Qi.length;n++){var r=Qi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(bn!==null&&bo(bn,e),_n!==null&&bo(_n,e),jn!==null&&bo(jn,e),oi.forEach(t),ii.forEach(t),n=0;n<Sn.length;n++)r=Sn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Sn.length&&(n=Sn[0],n.blockedOn===null);)Bm(n),n.blockedOn===null&&Sn.shift()}var $r=cn.ReactCurrentBatchConfig,Ks=!0;function L1(e,t,n,r){var o=le,i=$r.transition;$r.transition=null;try{le=1,Wc(e,t,n,r)}finally{le=o,$r.transition=i}}function A1(e,t,n,r){var o=le,i=$r.transition;$r.transition=null;try{le=4,Wc(e,t,n,r)}finally{le=o,$r.transition=i}}function Wc(e,t,n,r){if(Ks){var o=Iu(e,t,n,r);if(o===null)Aa(e,t,r,Qs,n),Lf(e,r);else if(I1(o,e,t,n,r))r.stopPropagation();else if(Lf(e,r),t&4&&-1<R1.indexOf(e)){for(;o!==null;){var i=Ri(o);if(i!==null&&zm(i),i=Iu(e,t,n,r),i===null&&Aa(e,t,r,Qs,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Aa(e,t,r,null,n)}}var Qs=null;function Iu(e,t,n,r){if(Qs=null,e=Bc(r),e=Xn(e),e!==null)if(t=pr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Pm(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 Qs=e,null}function Hm(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(N1()){case Hc:return 1;case Tm:return 4;case Xs:case E1:return 16;case Lm:return 536870912;default:return 16}default:return 16}}var kn=null,Yc=null,bs=null;function Vm(){if(bs)return bs;var e,t=Yc,n=t.length,r,o="value"in kn?kn.value:kn.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 bs=o.slice(e,1<r?1-r:void 0)}function _s(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 qi(){return!0}function Df(){return!1}function lt(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)?qi:Df,this.isPropagationStopped=Df,this}return we(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=qi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qi)},persist:function(){},isPersistent:qi}),t}var ho={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xc=lt(ho),Mi=we({},ho,{view:0,detail:0}),D1=lt(Mi),ba,_a,_o,Tl=we({},Mi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gc,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!==_o&&(_o&&e.type==="mousemove"?(ba=e.screenX-_o.screenX,_a=e.screenY-_o.screenY):_a=ba=0,_o=e),ba)},movementY:function(e){return"movementY"in e?e.movementY:_a}}),zf=lt(Tl),z1=we({},Tl,{dataTransfer:0}),$1=lt(z1),O1=we({},Mi,{relatedTarget:0}),ja=lt(O1),F1=we({},ho,{animationName:0,elapsedTime:0,pseudoElement:0}),B1=lt(F1),H1=we({},ho,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),V1=lt(H1),U1=we({},ho,{data:0}),$f=lt(U1),W1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y1={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"},X1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function G1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=X1[e])?!!t[e]:!1}function Gc(){return G1}var K1=we({},Mi,{key:function(e){if(e.key){var t=W1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_s(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Y1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gc,charCode:function(e){return e.type==="keypress"?_s(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_s(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Q1=lt(K1),q1=we({},Tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Of=lt(q1),Z1=we({},Mi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gc}),J1=lt(Z1),eS=we({},ho,{propertyName:0,elapsedTime:0,pseudoElement:0}),tS=lt(eS),nS=we({},Tl,{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}),rS=lt(nS),oS=[9,13,27,32],Kc=on&&"CompositionEvent"in window,Wo=null;on&&"documentMode"in document&&(Wo=document.documentMode);var iS=on&&"TextEvent"in window&&!Wo,Um=on&&(!Kc||Wo&&8<Wo&&11>=Wo),Ff=" ",Bf=!1;function Wm(e,t){switch(e){case"keyup":return oS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ym(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Er=!1;function sS(e,t){switch(e){case"compositionend":return Ym(t);case"keypress":return t.which!==32?null:(Bf=!0,Ff);case"textInput":return e=t.data,e===Ff&&Bf?null:e;default:return null}}function lS(e,t){if(Er)return e==="compositionend"||!Kc&&Wm(e,t)?(e=Vm(),bs=Yc=kn=null,Er=!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 Um&&t.locale!=="ko"?null:t.data;default:return null}}var aS={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 Hf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!aS[e.type]:t==="textarea"}function Xm(e,t,n,r){km(r),t=qs(t,"onChange"),0<t.length&&(n=new Xc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Yo=null,li=null;function uS(e){og(e,0)}function Ll(e){var t=br(e);if(ym(t))return e}function cS(e,t){if(e==="change")return t}var Gm=!1;if(on){var Pa;if(on){var Ma="oninput"in document;if(!Ma){var Vf=document.createElement("div");Vf.setAttribute("oninput","return;"),Ma=typeof Vf.oninput=="function"}Pa=Ma}else Pa=!1;Gm=Pa&&(!document.documentMode||9<document.documentMode)}function Uf(){Yo&&(Yo.detachEvent("onpropertychange",Km),li=Yo=null)}function Km(e){if(e.propertyName==="value"&&Ll(li)){var t=[];Xm(t,li,e,Bc(e)),jm(uS,t)}}function dS(e,t,n){e==="focusin"?(Uf(),Yo=t,li=n,Yo.attachEvent("onpropertychange",Km)):e==="focusout"&&Uf()}function fS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ll(li)}function hS(e,t){if(e==="click")return Ll(t)}function pS(e,t){if(e==="input"||e==="change")return Ll(t)}function mS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pt=typeof Object.is=="function"?Object.is:mS;function ai(e,t){if(Pt(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(!pu.call(t,o)||!Pt(e[o],t[o]))return!1}return!0}function Wf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yf(e,t){var n=Wf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Wf(n)}}function Qm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qm(){for(var e=window,t=Us();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Us(e.document)}return t}function Qc(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 gS(e){var t=qm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Qm(n.ownerDocument.documentElement,n)){if(r!==null&&Qc(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=Yf(n,i);var s=Yf(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 yS=on&&"documentMode"in document&&11>=document.documentMode,kr=null,Tu=null,Xo=null,Lu=!1;function Xf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lu||kr==null||kr!==Us(r)||(r=kr,"selectionStart"in r&&Qc(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}),Xo&&ai(Xo,r)||(Xo=r,r=qs(Tu,"onSelect"),0<r.length&&(t=new Xc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=kr)))}function Zi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Cr={animationend:Zi("Animation","AnimationEnd"),animationiteration:Zi("Animation","AnimationIteration"),animationstart:Zi("Animation","AnimationStart"),transitionend:Zi("Transition","TransitionEnd")},Ra={},Zm={};on&&(Zm=document.createElement("div").style,"AnimationEvent"in window||(delete Cr.animationend.animation,delete Cr.animationiteration.animation,delete Cr.animationstart.animation),"TransitionEvent"in window||delete Cr.transitionend.transition);function Al(e){if(Ra[e])return Ra[e];if(!Cr[e])return e;var t=Cr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zm)return Ra[e]=t[n];return e}var Jm=Al("animationend"),eg=Al("animationiteration"),tg=Al("animationstart"),ng=Al("transitionend"),rg=new Map,Gf="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 Fn(e,t){rg.set(e,t),hr(t,[e])}for(var Ia=0;Ia<Gf.length;Ia++){var Ta=Gf[Ia],vS=Ta.toLowerCase(),xS=Ta[0].toUpperCase()+Ta.slice(1);Fn(vS,"on"+xS)}Fn(Jm,"onAnimationEnd");Fn(eg,"onAnimationIteration");Fn(tg,"onAnimationStart");Fn("dblclick","onDoubleClick");Fn("focusin","onFocus");Fn("focusout","onBlur");Fn(ng,"onTransitionEnd");Xr("onMouseEnter",["mouseout","mouseover"]);Xr("onMouseLeave",["mouseout","mouseover"]);Xr("onPointerEnter",["pointerout","pointerover"]);Xr("onPointerLeave",["pointerout","pointerover"]);hr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hr("onBeforeInput",["compositionend","keypress","textInput","paste"]);hr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),wS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fo));function Kf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,v1(r,t,void 0,e),e.currentTarget=null}function og(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;Kf(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;Kf(o,l,u),i=a}}}if(Ys)throw e=Pu,Ys=!1,Pu=null,e}function fe(e,t){var n=t[Ou];n===void 0&&(n=t[Ou]=new Set);var r=e+"__bubble";n.has(r)||(ig(t,e,2,!1),n.add(r))}function La(e,t,n){var r=0;t&&(r|=4),ig(n,e,r,t)}var Ji="_reactListening"+Math.random().toString(36).slice(2);function ui(e){if(!e[Ji]){e[Ji]=!0,fm.forEach(function(n){n!=="selectionchange"&&(wS.has(n)||La(n,!1,e),La(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ji]||(t[Ji]=!0,La("selectionchange",!1,t))}}function ig(e,t,n,r){switch(Hm(t)){case 1:var o=L1;break;case 4:o=A1;break;default:o=Wc}n=o.bind(null,t,n,e),o=void 0,!ju||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 Aa(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=Xn(l),s===null)return;if(a=s.tag,a===5||a===6){r=i=s;continue e}l=l.parentNode}}r=r.return}jm(function(){var u=i,f=Bc(n),c=[];e:{var h=rg.get(e);if(h!==void 0){var v=Xc,x=e;switch(e){case"keypress":if(_s(n)===0)break e;case"keydown":case"keyup":v=Q1;break;case"focusin":x="focus",v=ja;break;case"focusout":x="blur",v=ja;break;case"beforeblur":case"afterblur":v=ja;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":v=zf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=$1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=J1;break;case Jm:case eg:case tg:v=B1;break;case ng:v=tS;break;case"scroll":v=D1;break;case"wheel":v=rS;break;case"copy":case"cut":case"paste":v=V1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Of}var w=(t&4)!==0,S=!w&&e==="scroll",p=w?h!==null?h+"Capture":null:h;w=[];for(var g=u,m;g!==null;){m=g;var N=m.stateNode;if(m.tag===5&&N!==null&&(m=N,p!==null&&(N=ri(g,p),N!=null&&w.push(ci(g,N,m)))),S)break;g=g.return}0<w.length&&(h=new v(h,x,null,n,f),c.push({event:h,listeners:w}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",h&&n!==bu&&(x=n.relatedTarget||n.fromElement)&&(Xn(x)||x[sn]))break e;if((v||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,v?(x=n.relatedTarget||n.toElement,v=u,x=x?Xn(x):null,x!==null&&(S=pr(x),x!==S||x.tag!==5&&x.tag!==6)&&(x=null)):(v=null,x=u),v!==x)){if(w=zf,N="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(w=Of,N="onPointerLeave",p="onPointerEnter",g="pointer"),S=v==null?h:br(v),m=x==null?h:br(x),h=new w(N,g+"leave",v,n,f),h.target=S,h.relatedTarget=m,N=null,Xn(f)===u&&(w=new w(p,g+"enter",x,n,f),w.target=m,w.relatedTarget=S,N=w),S=N,v&&x)t:{for(w=v,p=x,g=0,m=w;m;m=gr(m))g++;for(m=0,N=p;N;N=gr(N))m++;for(;0<g-m;)w=gr(w),g--;for(;0<m-g;)p=gr(p),m--;for(;g--;){if(w===p||p!==null&&w===p.alternate)break t;w=gr(w),p=gr(p)}w=null}else w=null;v!==null&&Qf(c,h,v,w,!1),x!==null&&S!==null&&Qf(c,S,x,w,!0)}}e:{if(h=u?br(u):window,v=h.nodeName&&h.nodeName.toLowerCase(),v==="select"||v==="input"&&h.type==="file")var E=cS;else if(Hf(h))if(Gm)E=pS;else{E=fS;var C=dS}else(v=h.nodeName)&&v.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(E=hS);if(E&&(E=E(e,u))){Xm(c,E,n,f);break e}C&&C(e,h,u),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&Su(h,"number",h.value)}switch(C=u?br(u):window,e){case"focusin":(Hf(C)||C.contentEditable==="true")&&(kr=C,Tu=u,Xo=null);break;case"focusout":Xo=Tu=kr=null;break;case"mousedown":Lu=!0;break;case"contextmenu":case"mouseup":case"dragend":Lu=!1,Xf(c,n,f);break;case"selectionchange":if(yS)break;case"keydown":case"keyup":Xf(c,n,f)}var k;if(Kc)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else Er?Wm(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(Um&&n.locale!=="ko"&&(Er||j!=="onCompositionStart"?j==="onCompositionEnd"&&Er&&(k=Vm()):(kn=f,Yc="value"in kn?kn.value:kn.textContent,Er=!0)),C=qs(u,j),0<C.length&&(j=new $f(j,e,null,n,f),c.push({event:j,listeners:C}),k?j.data=k:(k=Ym(n),k!==null&&(j.data=k)))),(k=iS?sS(e,n):lS(e,n))&&(u=qs(u,"onBeforeInput"),0<u.length&&(f=new $f("onBeforeInput","beforeinput",null,n,f),c.push({event:f,listeners:u}),f.data=k))}og(c,t)})}function ci(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qs(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ri(e,n),i!=null&&r.unshift(ci(e,i,o)),i=ri(e,t),i!=null&&r.push(ci(e,i,o))),e=e.return}return r}function gr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qf(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=ri(n,i),a!=null&&s.unshift(ci(n,a,l))):o||(a=ri(n,i),a!=null&&s.push(ci(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var SS=/\r\n?/g,NS=/\u0000|\uFFFD/g;function qf(e){return(typeof e=="string"?e:""+e).replace(SS,`
|
|
38
|
-
`).replace(NS,"")}function es(e,t,n){if(t=qf(t),qf(e)!==t&&n)throw Error(B(425))}function Zs(){}var Au=null,Du=null;function zu(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 $u=typeof setTimeout=="function"?setTimeout:void 0,ES=typeof clearTimeout=="function"?clearTimeout:void 0,Zf=typeof Promise=="function"?Promise:void 0,kS=typeof queueMicrotask=="function"?queueMicrotask:typeof Zf<"u"?function(e){return Zf.resolve(null).then(e).catch(CS)}:$u;function CS(e){setTimeout(function(){throw e})}function Da(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),si(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);si(t)}function Pn(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 Jf(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 po=Math.random().toString(36).slice(2),zt="__reactFiber$"+po,di="__reactProps$"+po,sn="__reactContainer$"+po,Ou="__reactEvents$"+po,bS="__reactListeners$"+po,_S="__reactHandles$"+po;function Xn(e){var t=e[zt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[sn]||n[zt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Jf(e);e!==null;){if(n=e[zt])return n;e=Jf(e)}return t}e=n,n=e.parentNode}return null}function Ri(e){return e=e[zt]||e[sn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function br(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function Dl(e){return e[di]||null}var Fu=[],_r=-1;function Bn(e){return{current:e}}function he(e){0>_r||(e.current=Fu[_r],Fu[_r]=null,_r--)}function ue(e,t){_r++,Fu[_r]=e.current,e.current=t}var Dn={},Fe=Bn(Dn),Qe=Bn(!1),rr=Dn;function Gr(e,t){var n=e.type.contextTypes;if(!n)return Dn;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 qe(e){return e=e.childContextTypes,e!=null}function Js(){he(Qe),he(Fe)}function eh(e,t,n){if(Fe.current!==Dn)throw Error(B(168));ue(Fe,t),ue(Qe,n)}function sg(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(B(108,d1(e)||"Unknown",o));return we({},n,r)}function el(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dn,rr=Fe.current,ue(Fe,e),ue(Qe,Qe.current),!0}function th(e,t,n){var r=e.stateNode;if(!r)throw Error(B(169));n?(e=sg(e,t,rr),r.__reactInternalMemoizedMergedChildContext=e,he(Qe),he(Fe),ue(Fe,e)):he(Qe),ue(Qe,n)}var Zt=null,zl=!1,za=!1;function lg(e){Zt===null?Zt=[e]:Zt.push(e)}function jS(e){zl=!0,lg(e)}function Hn(){if(!za&&Zt!==null){za=!0;var e=0,t=le;try{var n=Zt;for(le=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Zt=null,zl=!1}catch(o){throw Zt!==null&&(Zt=Zt.slice(e+1)),Im(Hc,Hn),o}finally{le=t,za=!1}}return null}var jr=[],Pr=0,tl=null,nl=0,ut=[],ct=0,or=null,Jt=1,en="";function Un(e,t){jr[Pr++]=nl,jr[Pr++]=tl,tl=e,nl=t}function ag(e,t,n){ut[ct++]=Jt,ut[ct++]=en,ut[ct++]=or,or=e;var r=Jt;e=en;var o=32-_t(r)-1;r&=~(1<<o),n+=1;var i=32-_t(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Jt=1<<32-_t(t)+o|n<<o|r,en=i+e}else Jt=1<<i|n<<o|r,en=e}function qc(e){e.return!==null&&(Un(e,1),ag(e,1,0))}function Zc(e){for(;e===tl;)tl=jr[--Pr],jr[Pr]=null,nl=jr[--Pr],jr[Pr]=null;for(;e===or;)or=ut[--ct],ut[ct]=null,en=ut[--ct],ut[ct]=null,Jt=ut[--ct],ut[ct]=null}var rt=null,nt=null,pe=!1,St=null;function ug(e,t){var n=dt(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 nh(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,rt=e,nt=Pn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,rt=e,nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=or!==null?{id:Jt,overflow:en}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,rt=e,nt=null,!0):!1;default:return!1}}function Bu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Hu(e){if(pe){var t=nt;if(t){var n=t;if(!nh(e,t)){if(Bu(e))throw Error(B(418));t=Pn(n.nextSibling);var r=rt;t&&nh(e,t)?ug(r,n):(e.flags=e.flags&-4097|2,pe=!1,rt=e)}}else{if(Bu(e))throw Error(B(418));e.flags=e.flags&-4097|2,pe=!1,rt=e}}}function rh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;rt=e}function ts(e){if(e!==rt)return!1;if(!pe)return rh(e),pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!zu(e.type,e.memoizedProps)),t&&(t=nt)){if(Bu(e))throw cg(),Error(B(418));for(;t;)ug(e,t),t=Pn(t.nextSibling)}if(rh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){nt=Pn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}nt=null}}else nt=rt?Pn(e.stateNode.nextSibling):null;return!0}function cg(){for(var e=nt;e;)e=Pn(e.nextSibling)}function Kr(){nt=rt=null,pe=!1}function Jc(e){St===null?St=[e]:St.push(e)}var PS=cn.ReactCurrentBatchConfig;function jo(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(B(309));var r=n.stateNode}if(!r)throw Error(B(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(B(284));if(!n._owner)throw Error(B(290,e))}return e}function ns(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function oh(e){var t=e._init;return t(e._payload)}function dg(e){function t(p,g){if(e){var m=p.deletions;m===null?(p.deletions=[g],p.flags|=16):m.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function o(p,g){return p=Tn(p,g),p.index=0,p.sibling=null,p}function i(p,g,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<g?(p.flags|=2,g):m):(p.flags|=2,g)):(p.flags|=1048576,g)}function s(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,g,m,N){return g===null||g.tag!==6?(g=Ua(m,p.mode,N),g.return=p,g):(g=o(g,m),g.return=p,g)}function a(p,g,m,N){var E=m.type;return E===Nr?f(p,g,m.props.children,N,m.key):g!==null&&(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===xn&&oh(E)===g.type)?(N=o(g,m.props),N.ref=jo(p,g,m),N.return=p,N):(N=Ls(m.type,m.key,m.props,null,p.mode,N),N.ref=jo(p,g,m),N.return=p,N)}function u(p,g,m,N){return g===null||g.tag!==4||g.stateNode.containerInfo!==m.containerInfo||g.stateNode.implementation!==m.implementation?(g=Wa(m,p.mode,N),g.return=p,g):(g=o(g,m.children||[]),g.return=p,g)}function f(p,g,m,N,E){return g===null||g.tag!==7?(g=Jn(m,p.mode,N,E),g.return=p,g):(g=o(g,m),g.return=p,g)}function c(p,g,m){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Ua(""+g,p.mode,m),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Wi:return m=Ls(g.type,g.key,g.props,null,p.mode,m),m.ref=jo(p,null,g),m.return=p,m;case Sr:return g=Wa(g,p.mode,m),g.return=p,g;case xn:var N=g._init;return c(p,N(g._payload),m)}if($o(g)||Eo(g))return g=Jn(g,p.mode,m,null),g.return=p,g;ns(p,g)}return null}function h(p,g,m,N){var E=g!==null?g.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return E!==null?null:l(p,g,""+m,N);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Wi:return m.key===E?a(p,g,m,N):null;case Sr:return m.key===E?u(p,g,m,N):null;case xn:return E=m._init,h(p,g,E(m._payload),N)}if($o(m)||Eo(m))return E!==null?null:f(p,g,m,N,null);ns(p,m)}return null}function v(p,g,m,N,E){if(typeof N=="string"&&N!==""||typeof N=="number")return p=p.get(m)||null,l(g,p,""+N,E);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Wi:return p=p.get(N.key===null?m:N.key)||null,a(g,p,N,E);case Sr:return p=p.get(N.key===null?m:N.key)||null,u(g,p,N,E);case xn:var C=N._init;return v(p,g,m,C(N._payload),E)}if($o(N)||Eo(N))return p=p.get(m)||null,f(g,p,N,E,null);ns(g,N)}return null}function x(p,g,m,N){for(var E=null,C=null,k=g,j=g=0,R=null;k!==null&&j<m.length;j++){k.index>j?(R=k,k=null):R=k.sibling;var z=h(p,k,m[j],N);if(z===null){k===null&&(k=R);break}e&&k&&z.alternate===null&&t(p,k),g=i(z,g,j),C===null?E=z:C.sibling=z,C=z,k=R}if(j===m.length)return n(p,k),pe&&Un(p,j),E;if(k===null){for(;j<m.length;j++)k=c(p,m[j],N),k!==null&&(g=i(k,g,j),C===null?E=k:C.sibling=k,C=k);return pe&&Un(p,j),E}for(k=r(p,k);j<m.length;j++)R=v(k,p,j,m[j],N),R!==null&&(e&&R.alternate!==null&&k.delete(R.key===null?j:R.key),g=i(R,g,j),C===null?E=R:C.sibling=R,C=R);return e&&k.forEach(function(T){return t(p,T)}),pe&&Un(p,j),E}function w(p,g,m,N){var E=Eo(m);if(typeof E!="function")throw Error(B(150));if(m=E.call(m),m==null)throw Error(B(151));for(var C=E=null,k=g,j=g=0,R=null,z=m.next();k!==null&&!z.done;j++,z=m.next()){k.index>j?(R=k,k=null):R=k.sibling;var T=h(p,k,z.value,N);if(T===null){k===null&&(k=R);break}e&&k&&T.alternate===null&&t(p,k),g=i(T,g,j),C===null?E=T:C.sibling=T,C=T,k=R}if(z.done)return n(p,k),pe&&Un(p,j),E;if(k===null){for(;!z.done;j++,z=m.next())z=c(p,z.value,N),z!==null&&(g=i(z,g,j),C===null?E=z:C.sibling=z,C=z);return pe&&Un(p,j),E}for(k=r(p,k);!z.done;j++,z=m.next())z=v(k,p,j,z.value,N),z!==null&&(e&&z.alternate!==null&&k.delete(z.key===null?j:z.key),g=i(z,g,j),C===null?E=z:C.sibling=z,C=z);return e&&k.forEach(function(I){return t(p,I)}),pe&&Un(p,j),E}function S(p,g,m,N){if(typeof m=="object"&&m!==null&&m.type===Nr&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Wi:e:{for(var E=m.key,C=g;C!==null;){if(C.key===E){if(E=m.type,E===Nr){if(C.tag===7){n(p,C.sibling),g=o(C,m.props.children),g.return=p,p=g;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===xn&&oh(E)===C.type){n(p,C.sibling),g=o(C,m.props),g.ref=jo(p,C,m),g.return=p,p=g;break e}n(p,C);break}else t(p,C);C=C.sibling}m.type===Nr?(g=Jn(m.props.children,p.mode,N,m.key),g.return=p,p=g):(N=Ls(m.type,m.key,m.props,null,p.mode,N),N.ref=jo(p,g,m),N.return=p,p=N)}return s(p);case Sr:e:{for(C=m.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===m.containerInfo&&g.stateNode.implementation===m.implementation){n(p,g.sibling),g=o(g,m.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else t(p,g);g=g.sibling}g=Wa(m,p.mode,N),g.return=p,p=g}return s(p);case xn:return C=m._init,S(p,g,C(m._payload),N)}if($o(m))return x(p,g,m,N);if(Eo(m))return w(p,g,m,N);ns(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,g!==null&&g.tag===6?(n(p,g.sibling),g=o(g,m),g.return=p,p=g):(n(p,g),g=Ua(m,p.mode,N),g.return=p,p=g),s(p)):n(p,g)}return S}var Qr=dg(!0),fg=dg(!1),rl=Bn(null),ol=null,Mr=null,ed=null;function td(){ed=Mr=ol=null}function nd(e){var t=rl.current;he(rl),e._currentValue=t}function Vu(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 Or(e,t){ol=e,ed=Mr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ge=!0),e.firstContext=null)}function ht(e){var t=e._currentValue;if(ed!==e)if(e={context:e,memoizedValue:t,next:null},Mr===null){if(ol===null)throw Error(B(308));Mr=e,ol.dependencies={lanes:0,firstContext:e}}else Mr=Mr.next=e;return t}var Gn=null;function rd(e){Gn===null?Gn=[e]:Gn.push(e)}function hg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,rd(t)):(n.next=o.next,o.next=n),t.interleaved=n,ln(e,r)}function ln(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 wn=!1;function od(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pg(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 nn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,oe&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,ln(e,n)}return o=r.interleaved,o===null?(t.next=t,rd(r)):(t.next=o.next,o.next=t),r.interleaved=t,ln(e,n)}function js(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,Vc(e,n)}}function ih(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 il(e,t,n,r){var o=e.updateQueue;wn=!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 h=l.lane,v=l.eventTime;if((r&h)===h){f!==null&&(f=f.next={eventTime:v,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,w=l;switch(h=t,v=n,w.tag){case 1:if(x=w.payload,typeof x=="function"){c=x.call(v,c,h);break e}c=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=w.payload,h=typeof x=="function"?x.call(v,c,h):x,h==null)break e;c=we({},c,h);break e;case 2:wn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=o.effects,h===null?o.effects=[l]:h.push(l))}else v={eventTime:v,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=v,a=c):f=f.next=v,s|=h;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;h=l,l=h.next,h.next=null,o.lastBaseUpdate=h,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);sr|=s,e.lanes=s,e.memoizedState=c}}function sh(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(B(191,o));o.call(r)}}}var Ii={},Ht=Bn(Ii),fi=Bn(Ii),hi=Bn(Ii);function Kn(e){if(e===Ii)throw Error(B(174));return e}function id(e,t){switch(ue(hi,t),ue(fi,e),ue(Ht,Ii),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Eu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Eu(t,e)}he(Ht),ue(Ht,t)}function qr(){he(Ht),he(fi),he(hi)}function mg(e){Kn(hi.current);var t=Kn(Ht.current),n=Eu(t,e.type);t!==n&&(ue(fi,e),ue(Ht,n))}function sd(e){fi.current===e&&(he(Ht),he(fi))}var ve=Bn(0);function sl(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 $a=[];function ld(){for(var e=0;e<$a.length;e++)$a[e]._workInProgressVersionPrimary=null;$a.length=0}var Ps=cn.ReactCurrentDispatcher,Oa=cn.ReactCurrentBatchConfig,ir=0,xe=null,_e=null,Pe=null,ll=!1,Go=!1,pi=0,MS=0;function ze(){throw Error(B(321))}function ad(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pt(e[n],t[n]))return!1;return!0}function ud(e,t,n,r,o,i){if(ir=i,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ps.current=e===null||e.memoizedState===null?LS:AS,e=n(r,o),Go){i=0;do{if(Go=!1,pi=0,25<=i)throw Error(B(301));i+=1,Pe=_e=null,t.updateQueue=null,Ps.current=DS,e=n(r,o)}while(Go)}if(Ps.current=al,t=_e!==null&&_e.next!==null,ir=0,Pe=_e=xe=null,ll=!1,t)throw Error(B(300));return e}function cd(){var e=pi!==0;return pi=0,e}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pe===null?xe.memoizedState=Pe=e:Pe=Pe.next=e,Pe}function pt(){if(_e===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var t=Pe===null?xe.memoizedState:Pe.next;if(t!==null)Pe=t,_e=e;else{if(e===null)throw Error(B(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},Pe===null?xe.memoizedState=Pe=e:Pe=Pe.next=e}return Pe}function mi(e,t){return typeof t=="function"?t(e):t}function Fa(e){var t=pt(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=_e,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((ir&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,xe.lanes|=f,sr|=f}u=u.next}while(u!==null&&u!==i);a===null?s=r:a.next=l,Pt(r,t.memoizedState)||(Ge=!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,xe.lanes|=i,sr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ba(e){var t=pt(),n=t.queue;if(n===null)throw Error(B(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);Pt(i,t.memoizedState)||(Ge=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function gg(){}function yg(e,t){var n=xe,r=pt(),o=t(),i=!Pt(r.memoizedState,o);if(i&&(r.memoizedState=o,Ge=!0),r=r.queue,dd(wg.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Pe!==null&&Pe.memoizedState.tag&1){if(n.flags|=2048,gi(9,xg.bind(null,n,r,o,t),void 0,null),Me===null)throw Error(B(349));ir&30||vg(n,t,o)}return o}function vg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function xg(e,t,n,r){t.value=n,t.getSnapshot=r,Sg(t)&&Ng(e)}function wg(e,t,n){return n(function(){Sg(t)&&Ng(e)})}function Sg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pt(e,n)}catch{return!0}}function Ng(e){var t=ln(e,1);t!==null&&jt(t,e,1,-1)}function lh(e){var t=Lt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:e},t.queue=e,e=e.dispatch=TS.bind(null,xe,e),[t.memoizedState,e]}function gi(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.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 Eg(){return pt().memoizedState}function Ms(e,t,n,r){var o=Lt();xe.flags|=e,o.memoizedState=gi(1|t,n,void 0,r===void 0?null:r)}function $l(e,t,n,r){var o=pt();r=r===void 0?null:r;var i=void 0;if(_e!==null){var s=_e.memoizedState;if(i=s.destroy,r!==null&&ad(r,s.deps)){o.memoizedState=gi(t,n,i,r);return}}xe.flags|=e,o.memoizedState=gi(1|t,n,i,r)}function ah(e,t){return Ms(8390656,8,e,t)}function dd(e,t){return $l(2048,8,e,t)}function kg(e,t){return $l(4,2,e,t)}function Cg(e,t){return $l(4,4,e,t)}function bg(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,$l(4,4,bg.bind(null,t,e),n)}function fd(){}function jg(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ad(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Pg(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ad(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Mg(e,t,n){return ir&21?(Pt(n,t)||(n=Am(),xe.lanes|=n,sr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ge=!0),e.memoizedState=n)}function RS(e,t){var n=le;le=n!==0&&4>n?n:4,e(!0);var r=Oa.transition;Oa.transition={};try{e(!1),t()}finally{le=n,Oa.transition=r}}function Rg(){return pt().memoizedState}function IS(e,t,n){var r=In(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ig(e))Tg(t,n);else if(n=hg(e,t,n,r),n!==null){var o=He();jt(n,e,r,o),Lg(n,t,r)}}function TS(e,t,n){var r=In(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ig(e))Tg(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,Pt(l,s)){var a=t.interleaved;a===null?(o.next=o,rd(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=hg(e,t,o,r),n!==null&&(o=He(),jt(n,e,r,o),Lg(n,t,r))}}function Ig(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Tg(e,t){Go=ll=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Lg(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vc(e,n)}}var al={readContext:ht,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useInsertionEffect:ze,useLayoutEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useMutableSource:ze,useSyncExternalStore:ze,useId:ze,unstable_isNewReconciler:!1},LS={readContext:ht,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:ah,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ms(4194308,4,bg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ms(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ms(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lt();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=IS.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:lh,useDebugValue:fd,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=lh(!1),t=e[0];return e=RS.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,o=Lt();if(pe){if(n===void 0)throw Error(B(407));n=n()}else{if(n=t(),Me===null)throw Error(B(349));ir&30||vg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,ah(wg.bind(null,r,i,e),[e]),r.flags|=2048,gi(9,xg.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Me.identifierPrefix;if(pe){var n=en,r=Jt;n=(r&~(1<<32-_t(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=MS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},AS={readContext:ht,useCallback:jg,useContext:ht,useEffect:dd,useImperativeHandle:_g,useInsertionEffect:kg,useLayoutEffect:Cg,useMemo:Pg,useReducer:Fa,useRef:Eg,useState:function(){return Fa(mi)},useDebugValue:fd,useDeferredValue:function(e){var t=pt();return Mg(t,_e.memoizedState,e)},useTransition:function(){var e=Fa(mi)[0],t=pt().memoizedState;return[e,t]},useMutableSource:gg,useSyncExternalStore:yg,useId:Rg,unstable_isNewReconciler:!1},DS={readContext:ht,useCallback:jg,useContext:ht,useEffect:dd,useImperativeHandle:_g,useInsertionEffect:kg,useLayoutEffect:Cg,useMemo:Pg,useReducer:Ba,useRef:Eg,useState:function(){return Ba(mi)},useDebugValue:fd,useDeferredValue:function(e){var t=pt();return _e===null?t.memoizedState=e:Mg(t,_e.memoizedState,e)},useTransition:function(){var e=Ba(mi)[0],t=pt().memoizedState;return[e,t]},useMutableSource:gg,useSyncExternalStore:yg,useId:Rg,unstable_isNewReconciler:!1};function vt(e,t){if(e&&e.defaultProps){t=we({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Uu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:we({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ol={isMounted:function(e){return(e=e._reactInternals)?pr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=He(),o=In(e),i=nn(r,o);i.payload=t,n!=null&&(i.callback=n),t=Mn(e,i,o),t!==null&&(jt(t,e,o,r),js(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=He(),o=In(e),i=nn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Mn(e,i,o),t!==null&&(jt(t,e,o,r),js(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=He(),r=In(e),o=nn(n,r);o.tag=2,t!=null&&(o.callback=t),t=Mn(e,o,r),t!==null&&(jt(t,e,r,n),js(t,e,r))}};function uh(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?!ai(n,r)||!ai(o,i):!0}function Ag(e,t,n){var r=!1,o=Dn,i=t.contextType;return typeof i=="object"&&i!==null?i=ht(i):(o=qe(t)?rr:Fe.current,r=t.contextTypes,i=(r=r!=null)?Gr(e,o):Dn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ol,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function ch(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&&Ol.enqueueReplaceState(t,t.state,null)}function Wu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},od(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ht(i):(i=qe(t)?rr:Fe.current,o.context=Gr(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Uu(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&&Ol.enqueueReplaceState(o,o.state,null),il(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Zr(e,t){try{var n="",r=t;do n+=c1(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
39
|
-
Error generating stack: `+i.message+`
|
|
40
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Ha(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Yu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var zS=typeof WeakMap=="function"?WeakMap:Map;function Dg(e,t,n){n=nn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){cl||(cl=!0,nc=r),Yu(e,t)},n}function zg(e,t,n){n=nn(-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(){Yu(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Yu(e,t),typeof r!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function dh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zS;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=qS.bind(null,e,t,n),t.then(e,e))}function fh(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 hh(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=nn(-1,1),t.tag=2,Mn(n,t,1))),n.lanes|=1),e)}var $S=cn.ReactCurrentOwner,Ge=!1;function Be(e,t,n,r){t.child=e===null?fg(t,null,n,r):Qr(t,e.child,n,r)}function ph(e,t,n,r,o){n=n.render;var i=t.ref;return Or(t,o),r=ud(e,t,n,r,i,o),n=cd(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,an(e,t,o)):(pe&&n&&qc(t),t.flags|=1,Be(e,t,r,o),t.child)}function mh(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!wd(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,$g(e,t,i,r,o)):(e=Ls(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:ai,n(s,r)&&e.ref===t.ref)return an(e,t,o)}return t.flags|=1,e=Tn(i,r),e.ref=t.ref,e.return=t,t.child=e}function $g(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(ai(i,r)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Ge=!0);else return t.lanes=e.lanes,an(e,t,o)}return Xu(e,t,n,r,o)}function Og(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},ue(Ir,et),et|=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,ue(Ir,et),et|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ue(Ir,et),et|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ue(Ir,et),et|=r;return Be(e,t,o,n),t.child}function Fg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xu(e,t,n,r,o){var i=qe(n)?rr:Fe.current;return i=Gr(t,i),Or(t,o),n=ud(e,t,n,r,i,o),r=cd(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,an(e,t,o)):(pe&&r&&qc(t),t.flags|=1,Be(e,t,n,o),t.child)}function gh(e,t,n,r,o){if(qe(n)){var i=!0;el(t)}else i=!1;if(Or(t,o),t.stateNode===null)Rs(e,t),Ag(t,n,r),Wu(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=ht(u):(u=qe(n)?rr:Fe.current,u=Gr(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)&&ch(t,s,r,u),wn=!1;var h=t.memoizedState;s.state=h,il(t,r,s,o),a=t.memoizedState,l!==r||h!==a||Qe.current||wn?(typeof f=="function"&&(Uu(t,n,f,r),a=t.memoizedState),(l=wn||uh(t,n,l,r,h,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,pg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:vt(t.type,l),s.props=u,c=t.pendingProps,h=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=ht(a):(a=qe(n)?rr:Fe.current,a=Gr(t,a));var v=n.getDerivedStateFromProps;(f=typeof v=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==c||h!==a)&&ch(t,s,r,a),wn=!1,h=t.memoizedState,s.state=h,il(t,r,s,o);var x=t.memoizedState;l!==c||h!==x||Qe.current||wn?(typeof v=="function"&&(Uu(t,n,v,r),x=t.memoizedState),(u=wn||uh(t,n,u,r,h,x,a)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,x,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,x,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),s.props=r,s.state=x,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Gu(e,t,n,r,i,o)}function Gu(e,t,n,r,o,i){Fg(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&th(t,n,!1),an(e,t,i);r=t.stateNode,$S.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Qr(t,e.child,null,i),t.child=Qr(t,null,l,i)):Be(e,t,l,i),t.memoizedState=r.state,o&&th(t,n,!0),t.child}function Bg(e){var t=e.stateNode;t.pendingContext?eh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&eh(e,t.context,!1),id(e,t.containerInfo)}function yh(e,t,n,r,o){return Kr(),Jc(o),t.flags|=256,Be(e,t,n,r),t.child}var Ku={dehydrated:null,treeContext:null,retryLane:0};function Qu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hg(e,t,n){var r=t.pendingProps,o=ve.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),ue(ve,o&1),e===null)return Hu(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=Hl(s,r,0,null),e=Jn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Qu(n),t.memoizedState=Ku,e):hd(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return OS(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=Tn(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=Tn(l,i):(i=Jn(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?Qu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Ku,r}return i=e.child,e=i.sibling,r=Tn(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 hd(e,t){return t=Hl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rs(e,t,n,r){return r!==null&&Jc(r),Qr(t,e.child,null,n),e=hd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function OS(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Ha(Error(B(422))),rs(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Hl({mode:"visible",children:r.children},o,0,null),i=Jn(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Qr(t,e.child,null,s),t.child.memoizedState=Qu(s),t.memoizedState=Ku,i);if(!(t.mode&1))return rs(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(B(419)),r=Ha(i,r,void 0),rs(e,t,s,r)}if(l=(s&e.childLanes)!==0,Ge||l){if(r=Me,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,ln(e,o),jt(r,e,o,-1))}return xd(),r=Ha(Error(B(421))),rs(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=ZS.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,nt=Pn(o.nextSibling),rt=t,pe=!0,St=null,e!==null&&(ut[ct++]=Jt,ut[ct++]=en,ut[ct++]=or,Jt=e.id,en=e.overflow,or=t),t=hd(t,r.children),t.flags|=4096,t)}function vh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Vu(e.return,t,n)}function Va(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 Vg(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Be(e,t,r.children,n),r=ve.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&&vh(e,n,t);else if(e.tag===19)vh(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(ue(ve,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&&sl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Va(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&&sl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Va(t,!0,n,null,i);break;case"together":Va(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Rs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function an(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,n=Tn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Tn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function FS(e,t,n){switch(t.tag){case 3:Bg(t),Kr();break;case 5:mg(t);break;case 1:qe(t.type)&&el(t);break;case 4:id(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ue(rl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ue(ve,ve.current&1),t.flags|=128,null):n&t.child.childLanes?Hg(e,t,n):(ue(ve,ve.current&1),e=an(e,t,n),e!==null?e.sibling:null);ue(ve,ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Vg(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ue(ve,ve.current),r)break;return null;case 22:case 23:return t.lanes=0,Og(e,t,n)}return an(e,t,n)}var Ug,qu,Wg,Yg;Ug=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}};qu=function(){};Wg=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Kn(Ht.current);var i=null;switch(n){case"input":o=xu(e,o),r=xu(e,r),i=[];break;case"select":o=we({},o,{value:void 0}),r=we({},r,{value:void 0}),i=[];break;case"textarea":o=Nu(e,o),r=Nu(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zs)}ku(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"&&(ti.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"&&(ti.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)}};Yg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Po(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 $e(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 BS(e,t,n){var r=t.pendingProps;switch(Zc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return qe(t.type)&&Js(),$e(t),null;case 3:return r=t.stateNode,qr(),he(Qe),he(Fe),ld(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ts(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,St!==null&&(ic(St),St=null))),qu(e,t),$e(t),null;case 5:sd(t);var o=Kn(hi.current);if(n=t.type,e!==null&&t.stateNode!=null)Wg(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(B(166));return $e(t),null}if(e=Kn(Ht.current),ts(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[zt]=t,r[di]=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<Fo.length;o++)fe(Fo[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":_f(r,i),fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},fe("invalid",r);break;case"textarea":Pf(r,i),fe("invalid",r)}ku(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&&es(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&es(r.textContent,l,e),o=["children",""+l]):ti.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&fe("scroll",r)}switch(n){case"input":Yi(r),jf(r,i,!0);break;case"textarea":Yi(r),Mf(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Zs)}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=wm(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[zt]=t,e[di]=r,Ug(e,t,!1,!1),t.stateNode=e;e:{switch(s=Cu(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<Fo.length;o++)fe(Fo[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":_f(e,r),o=xu(e,r),fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=we({},r,{value:void 0}),fe("invalid",e);break;case"textarea":Pf(e,r),o=Nu(e,r),fe("invalid",e);break;default:o=r}ku(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var a=l[i];i==="style"?Em(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Sm(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&ni(e,a):typeof a=="number"&&ni(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ti.hasOwnProperty(i)?a!=null&&i==="onScroll"&&fe("scroll",e):a!=null&&zc(e,i,a,s))}switch(n){case"input":Yi(e),jf(e,r,!1);break;case"textarea":Yi(e),Mf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+An(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=Zs)}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 $e(t),null;case 6:if(e&&t.stateNode!=null)Yg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(B(166));if(n=Kn(hi.current),Kn(Ht.current),ts(t)){if(r=t.stateNode,n=t.memoizedProps,r[zt]=t,(i=r.nodeValue!==n)&&(e=rt,e!==null))switch(e.tag){case 3:es(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&es(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[zt]=t,t.stateNode=r}return $e(t),null;case 13:if(he(ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(pe&&nt!==null&&t.mode&1&&!(t.flags&128))cg(),Kr(),t.flags|=98560,i=!1;else if(i=ts(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(B(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(B(317));i[zt]=t}else Kr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;$e(t),i=!1}else St!==null&&(ic(St),St=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||ve.current&1?je===0&&(je=3):xd())),t.updateQueue!==null&&(t.flags|=4),$e(t),null);case 4:return qr(),qu(e,t),e===null&&ui(t.stateNode.containerInfo),$e(t),null;case 10:return nd(t.type._context),$e(t),null;case 17:return qe(t.type)&&Js(),$e(t),null;case 19:if(he(ve),i=t.memoizedState,i===null)return $e(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Po(i,!1);else{if(je!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=sl(e),s!==null){for(t.flags|=128,Po(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 ue(ve,ve.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ne()>Jr&&(t.flags|=128,r=!0,Po(i,!1),t.lanes=4194304)}else{if(!r)if(e=sl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Po(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!pe)return $e(t),null}else 2*Ne()-i.renderingStartTime>Jr&&n!==1073741824&&(t.flags|=128,r=!0,Po(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=Ne(),t.sibling=null,n=ve.current,ue(ve,r?n&1|2:n&1),t):($e(t),null);case 22:case 23:return vd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?et&1073741824&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function HS(e,t){switch(Zc(t),t.tag){case 1:return qe(t.type)&&Js(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qr(),he(Qe),he(Fe),ld(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sd(t),null;case 13:if(he(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));Kr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return he(ve),null;case 4:return qr(),null;case 10:return nd(t.type._context),null;case 22:case 23:return vd(),null;case 24:return null;default:return null}}var os=!1,Oe=!1,VS=typeof WeakSet=="function"?WeakSet:Set,W=null;function Rr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(e,t,r)}else n.current=null}function Zu(e,t,n){try{n()}catch(r){Se(e,t,r)}}var xh=!1;function US(e,t){if(Au=Ks,e=qm(),Qc(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,h=null;t:for(;;){for(var v;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),(v=c.firstChild)!==null;)h=c,c=v;for(;;){if(c===e)break t;if(h===n&&++u===o&&(l=s),h===i&&++f===r&&(a=s),(v=c.nextSibling)!==null)break;c=h,h=c.parentNode}c=v}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Du={focusedElem:e,selectionRange:n},Ks=!1,W=t;W!==null;)if(t=W,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,W=e;else for(;W!==null;){t=W;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var w=x.memoizedProps,S=x.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?w:vt(t.type,w),S);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(N){Se(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,W=e;break}W=t.return}return x=xh,xh=!1,x}function Ko(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&&Zu(t,n,i)}o=o.next}while(o!==r)}}function Fl(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 Ju(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 Xg(e){var t=e.alternate;t!==null&&(e.alternate=null,Xg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[zt],delete t[di],delete t[Ou],delete t[bS],delete t[_S])),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 Gg(e){return e.tag===5||e.tag===3||e.tag===4}function wh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gg(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 ec(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=Zs));else if(r!==4&&(e=e.child,e!==null))for(ec(e,t,n),e=e.sibling;e!==null;)ec(e,t,n),e=e.sibling}function tc(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(tc(e,t,n),e=e.sibling;e!==null;)tc(e,t,n),e=e.sibling}var Ie=null,xt=!1;function hn(e,t,n){for(n=n.child;n!==null;)Kg(e,t,n),n=n.sibling}function Kg(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Il,n)}catch{}switch(n.tag){case 5:Oe||Rr(n,t);case 6:var r=Ie,o=xt;Ie=null,hn(e,t,n),Ie=r,xt=o,Ie!==null&&(xt?(e=Ie,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ie.removeChild(n.stateNode));break;case 18:Ie!==null&&(xt?(e=Ie,n=n.stateNode,e.nodeType===8?Da(e.parentNode,n):e.nodeType===1&&Da(e,n),si(e)):Da(Ie,n.stateNode));break;case 4:r=Ie,o=xt,Ie=n.stateNode.containerInfo,xt=!0,hn(e,t,n),Ie=r,xt=o;break;case 0:case 11:case 14:case 15:if(!Oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&Zu(n,t,s),o=o.next}while(o!==r)}hn(e,t,n);break;case 1:if(!Oe&&(Rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Se(n,t,l)}hn(e,t,n);break;case 21:hn(e,t,n);break;case 22:n.mode&1?(Oe=(r=Oe)||n.memoizedState!==null,hn(e,t,n),Oe=r):hn(e,t,n);break;default:hn(e,t,n)}}function Sh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VS),t.forEach(function(r){var o=JS.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function yt(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:Ie=l.stateNode,xt=!1;break e;case 3:Ie=l.stateNode.containerInfo,xt=!0;break e;case 4:Ie=l.stateNode.containerInfo,xt=!0;break e}l=l.return}if(Ie===null)throw Error(B(160));Kg(i,s,o),Ie=null,xt=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){Se(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Qg(t,e),t=t.sibling}function Qg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yt(t,e),Tt(e),r&4){try{Ko(3,e,e.return),Fl(3,e)}catch(w){Se(e,e.return,w)}try{Ko(5,e,e.return)}catch(w){Se(e,e.return,w)}}break;case 1:yt(t,e),Tt(e),r&512&&n!==null&&Rr(n,n.return);break;case 5:if(yt(t,e),Tt(e),r&512&&n!==null&&Rr(n,n.return),e.flags&32){var o=e.stateNode;try{ni(o,"")}catch(w){Se(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&&vm(o,i),Cu(l,s);var u=Cu(l,i);for(s=0;s<a.length;s+=2){var f=a[s],c=a[s+1];f==="style"?Em(o,c):f==="dangerouslySetInnerHTML"?Sm(o,c):f==="children"?ni(o,c):zc(o,f,c,u)}switch(l){case"input":wu(o,i);break;case"textarea":xm(o,i);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var v=i.value;v!=null?Ar(o,!!i.multiple,v,!1):h!==!!i.multiple&&(i.defaultValue!=null?Ar(o,!!i.multiple,i.defaultValue,!0):Ar(o,!!i.multiple,i.multiple?[]:"",!1))}o[di]=i}catch(w){Se(e,e.return,w)}}break;case 6:if(yt(t,e),Tt(e),r&4){if(e.stateNode===null)throw Error(B(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){Se(e,e.return,w)}}break;case 3:if(yt(t,e),Tt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{si(t.containerInfo)}catch(w){Se(e,e.return,w)}break;case 4:yt(t,e),Tt(e);break;case 13:yt(t,e),Tt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(gd=Ne())),r&4&&Sh(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(Oe=(u=Oe)||f,yt(t,e),Oe=u):yt(t,e),Tt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(W=e,f=e.child;f!==null;){for(c=W=f;W!==null;){switch(h=W,v=h.child,h.tag){case 0:case 11:case 14:case 15:Ko(4,h,h.return);break;case 1:Rr(h,h.return);var x=h.stateNode;if(typeof x.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(w){Se(r,n,w)}}break;case 5:Rr(h,h.return);break;case 22:if(h.memoizedState!==null){Eh(c);continue}}v!==null?(v.return=h,W=v):Eh(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=Nm("display",s))}catch(w){Se(e,e.return,w)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(w){Se(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:yt(t,e),Tt(e),r&4&&Sh(e);break;case 21:break;default:yt(t,e),Tt(e)}}function Tt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Gg(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ni(o,""),r.flags&=-33);var i=wh(e);tc(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=wh(e);ec(e,l,s);break;default:throw Error(B(161))}}catch(a){Se(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function WS(e,t,n){W=e,qg(e)}function qg(e,t,n){for(var r=(e.mode&1)!==0;W!==null;){var o=W,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||os;if(!s){var l=o.alternate,a=l!==null&&l.memoizedState!==null||Oe;l=os;var u=Oe;if(os=s,(Oe=a)&&!u)for(W=o;W!==null;)s=W,a=s.child,s.tag===22&&s.memoizedState!==null?kh(o):a!==null?(a.return=s,W=a):kh(o);for(;i!==null;)W=i,qg(i),i=i.sibling;W=o,os=l,Oe=u}Nh(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,W=i):Nh(e)}}function Nh(e){for(;W!==null;){var t=W;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oe||Fl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Oe)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:vt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&sh(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}sh(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&&si(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}Oe||t.flags&512&&Ju(t)}catch(h){Se(t,t.return,h)}}if(t===e){W=null;break}if(n=t.sibling,n!==null){n.return=t.return,W=n;break}W=t.return}}function Eh(e){for(;W!==null;){var t=W;if(t===e){W=null;break}var n=t.sibling;if(n!==null){n.return=t.return,W=n;break}W=t.return}}function kh(e){for(;W!==null;){var t=W;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Fl(4,t)}catch(a){Se(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){Se(t,o,a)}}var i=t.return;try{Ju(t)}catch(a){Se(t,i,a)}break;case 5:var s=t.return;try{Ju(t)}catch(a){Se(t,s,a)}}}catch(a){Se(t,t.return,a)}if(t===e){W=null;break}var l=t.sibling;if(l!==null){l.return=t.return,W=l;break}W=t.return}}var YS=Math.ceil,ul=cn.ReactCurrentDispatcher,pd=cn.ReactCurrentOwner,ft=cn.ReactCurrentBatchConfig,oe=0,Me=null,ke=null,Te=0,et=0,Ir=Bn(0),je=0,yi=null,sr=0,Bl=0,md=0,Qo=null,Xe=null,gd=0,Jr=1/0,qt=null,cl=!1,nc=null,Rn=null,is=!1,Cn=null,dl=0,qo=0,rc=null,Is=-1,Ts=0;function He(){return oe&6?Ne():Is!==-1?Is:Is=Ne()}function In(e){return e.mode&1?oe&2&&Te!==0?Te&-Te:PS.transition!==null?(Ts===0&&(Ts=Am()),Ts):(e=le,e!==0||(e=window.event,e=e===void 0?16:Hm(e.type)),e):1}function jt(e,t,n,r){if(50<qo)throw qo=0,rc=null,Error(B(185));Pi(e,n,r),(!(oe&2)||e!==Me)&&(e===Me&&(!(oe&2)&&(Bl|=n),je===4&&Nn(e,Te)),Ze(e,r),n===1&&oe===0&&!(t.mode&1)&&(Jr=Ne()+500,zl&&Hn()))}function Ze(e,t){var n=e.callbackNode;P1(e,t);var r=Gs(e,e===Me?Te:0);if(r===0)n!==null&&Tf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Tf(n),t===1)e.tag===0?jS(Ch.bind(null,e)):lg(Ch.bind(null,e)),kS(function(){!(oe&6)&&Hn()}),n=null;else{switch(Dm(r)){case 1:n=Hc;break;case 4:n=Tm;break;case 16:n=Xs;break;case 536870912:n=Lm;break;default:n=Xs}n=iy(n,Zg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Zg(e,t){if(Is=-1,Ts=0,oe&6)throw Error(B(327));var n=e.callbackNode;if(Fr()&&e.callbackNode!==n)return null;var r=Gs(e,e===Me?Te:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=fl(e,r);else{t=r;var o=oe;oe|=2;var i=ey();(Me!==e||Te!==t)&&(qt=null,Jr=Ne()+500,Zn(e,t));do try{KS();break}catch(l){Jg(e,l)}while(!0);td(),ul.current=i,oe=o,ke!==null?t=0:(Me=null,Te=0,t=je)}if(t!==0){if(t===2&&(o=Mu(e),o!==0&&(r=o,t=oc(e,o))),t===1)throw n=yi,Zn(e,0),Nn(e,r),Ze(e,Ne()),n;if(t===6)Nn(e,r);else{if(o=e.current.alternate,!(r&30)&&!XS(o)&&(t=fl(e,r),t===2&&(i=Mu(e),i!==0&&(r=i,t=oc(e,i))),t===1))throw n=yi,Zn(e,0),Nn(e,r),Ze(e,Ne()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(B(345));case 2:Wn(e,Xe,qt);break;case 3:if(Nn(e,r),(r&130023424)===r&&(t=gd+500-Ne(),10<t)){if(Gs(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){He(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=$u(Wn.bind(null,e,Xe,qt),t);break}Wn(e,Xe,qt);break;case 4:if(Nn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-_t(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*YS(r/1960))-r,10<r){e.timeoutHandle=$u(Wn.bind(null,e,Xe,qt),r);break}Wn(e,Xe,qt);break;case 5:Wn(e,Xe,qt);break;default:throw Error(B(329))}}}return Ze(e,Ne()),e.callbackNode===n?Zg.bind(null,e):null}function oc(e,t){var n=Qo;return e.current.memoizedState.isDehydrated&&(Zn(e,t).flags|=256),e=fl(e,t),e!==2&&(t=Xe,Xe=n,t!==null&&ic(t)),e}function ic(e){Xe===null?Xe=e:Xe.push.apply(Xe,e)}function XS(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(!Pt(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 Nn(e,t){for(t&=~md,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-_t(t),r=1<<n;e[n]=-1,t&=~r}}function Ch(e){if(oe&6)throw Error(B(327));Fr();var t=Gs(e,0);if(!(t&1))return Ze(e,Ne()),null;var n=fl(e,t);if(e.tag!==0&&n===2){var r=Mu(e);r!==0&&(t=r,n=oc(e,r))}if(n===1)throw n=yi,Zn(e,0),Nn(e,t),Ze(e,Ne()),n;if(n===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Wn(e,Xe,qt),Ze(e,Ne()),null}function yd(e,t){var n=oe;oe|=1;try{return e(t)}finally{oe=n,oe===0&&(Jr=Ne()+500,zl&&Hn())}}function lr(e){Cn!==null&&Cn.tag===0&&!(oe&6)&&Fr();var t=oe;oe|=1;var n=ft.transition,r=le;try{if(ft.transition=null,le=1,e)return e()}finally{le=r,ft.transition=n,oe=t,!(oe&6)&&Hn()}}function vd(){et=Ir.current,he(Ir)}function Zn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,ES(n)),ke!==null)for(n=ke.return;n!==null;){var r=n;switch(Zc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Js();break;case 3:qr(),he(Qe),he(Fe),ld();break;case 5:sd(r);break;case 4:qr();break;case 13:he(ve);break;case 19:he(ve);break;case 10:nd(r.type._context);break;case 22:case 23:vd()}n=n.return}if(Me=e,ke=e=Tn(e.current,null),Te=et=t,je=0,yi=null,md=Bl=sr=0,Xe=Qo=null,Gn!==null){for(t=0;t<Gn.length;t++)if(n=Gn[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}Gn=null}return e}function Jg(e,t){do{var n=ke;try{if(td(),Ps.current=al,ll){for(var r=xe.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ll=!1}if(ir=0,Pe=_e=xe=null,Go=!1,pi=0,pd.current=null,n===null||n.return===null){je=1,yi=t,ke=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 h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var v=fh(s);if(v!==null){v.flags&=-257,hh(v,s,l,i,t),v.mode&1&&dh(i,u,t),t=v,a=u;var x=t.updateQueue;if(x===null){var w=new Set;w.add(a),t.updateQueue=w}else x.add(a);break e}else{if(!(t&1)){dh(i,u,t),xd();break e}a=Error(B(426))}}else if(pe&&l.mode&1){var S=fh(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),hh(S,s,l,i,t),Jc(Zr(a,l));break e}}i=a=Zr(a,l),je!==4&&(je=2),Qo===null?Qo=[i]:Qo.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=Dg(i,a,t);ih(i,p);break e;case 1:l=a;var g=i.type,m=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Rn===null||!Rn.has(m)))){i.flags|=65536,t&=-t,i.lanes|=t;var N=zg(i,l,t);ih(i,N);break e}}i=i.return}while(i!==null)}ny(n)}catch(E){t=E,ke===n&&n!==null&&(ke=n=n.return);continue}break}while(!0)}function ey(){var e=ul.current;return ul.current=al,e===null?al:e}function xd(){(je===0||je===3||je===2)&&(je=4),Me===null||!(sr&268435455)&&!(Bl&268435455)||Nn(Me,Te)}function fl(e,t){var n=oe;oe|=2;var r=ey();(Me!==e||Te!==t)&&(qt=null,Zn(e,t));do try{GS();break}catch(o){Jg(e,o)}while(!0);if(td(),oe=n,ul.current=r,ke!==null)throw Error(B(261));return Me=null,Te=0,je}function GS(){for(;ke!==null;)ty(ke)}function KS(){for(;ke!==null&&!w1();)ty(ke)}function ty(e){var t=oy(e.alternate,e,et);e.memoizedProps=e.pendingProps,t===null?ny(e):ke=t,pd.current=null}function ny(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=HS(n,t),n!==null){n.flags&=32767,ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{je=6,ke=null;return}}else if(n=BS(n,t,et),n!==null){ke=n;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);je===0&&(je=5)}function Wn(e,t,n){var r=le,o=ft.transition;try{ft.transition=null,le=1,QS(e,t,n,r)}finally{ft.transition=o,le=r}return null}function QS(e,t,n,r){do Fr();while(Cn!==null);if(oe&6)throw Error(B(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(B(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(M1(e,i),e===Me&&(ke=Me=null,Te=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||is||(is=!0,iy(Xs,function(){return Fr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=ft.transition,ft.transition=null;var s=le;le=1;var l=oe;oe|=4,pd.current=null,US(e,n),Qg(n,e),gS(Du),Ks=!!Au,Du=Au=null,e.current=n,WS(n),S1(),oe=l,le=s,ft.transition=i}else e.current=n;if(is&&(is=!1,Cn=e,dl=o),i=e.pendingLanes,i===0&&(Rn=null),k1(n.stateNode),Ze(e,Ne()),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(cl)throw cl=!1,e=nc,nc=null,e;return dl&1&&e.tag!==0&&Fr(),i=e.pendingLanes,i&1?e===rc?qo++:(qo=0,rc=e):qo=0,Hn(),null}function Fr(){if(Cn!==null){var e=Dm(dl),t=ft.transition,n=le;try{if(ft.transition=null,le=16>e?16:e,Cn===null)var r=!1;else{if(e=Cn,Cn=null,dl=0,oe&6)throw Error(B(331));var o=oe;for(oe|=4,W=e.current;W!==null;){var i=W,s=i.child;if(W.flags&16){var l=i.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(W=u;W!==null;){var f=W;switch(f.tag){case 0:case 11:case 15:Ko(8,f,i)}var c=f.child;if(c!==null)c.return=f,W=c;else for(;W!==null;){f=W;var h=f.sibling,v=f.return;if(Xg(f),f===u){W=null;break}if(h!==null){h.return=v,W=h;break}W=v}}}var x=i.alternate;if(x!==null){var w=x.child;if(w!==null){x.child=null;do{var S=w.sibling;w.sibling=null,w=S}while(w!==null)}}W=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,W=s;else e:for(;W!==null;){if(i=W,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ko(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,W=p;break e}W=i.return}}var g=e.current;for(W=g;W!==null;){s=W;var m=s.child;if(s.subtreeFlags&2064&&m!==null)m.return=s,W=m;else e:for(s=g;W!==null;){if(l=W,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Fl(9,l)}}catch(E){Se(l,l.return,E)}if(l===s){W=null;break e}var N=l.sibling;if(N!==null){N.return=l.return,W=N;break e}W=l.return}}if(oe=o,Hn(),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Il,e)}catch{}r=!0}return r}finally{le=n,ft.transition=t}}return!1}function bh(e,t,n){t=Zr(n,t),t=Dg(e,t,1),e=Mn(e,t,1),t=He(),e!==null&&(Pi(e,1,t),Ze(e,t))}function Se(e,t,n){if(e.tag===3)bh(e,e,n);else for(;t!==null;){if(t.tag===3){bh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Rn===null||!Rn.has(r))){e=Zr(n,e),e=zg(t,e,1),t=Mn(t,e,1),e=He(),t!==null&&(Pi(t,1,e),Ze(t,e));break}}t=t.return}}function qS(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=He(),e.pingedLanes|=e.suspendedLanes&n,Me===e&&(Te&n)===n&&(je===4||je===3&&(Te&130023424)===Te&&500>Ne()-gd?Zn(e,0):md|=n),Ze(e,t)}function ry(e,t){t===0&&(e.mode&1?(t=Ki,Ki<<=1,!(Ki&130023424)&&(Ki=4194304)):t=1);var n=He();e=ln(e,t),e!==null&&(Pi(e,t,n),Ze(e,n))}function ZS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ry(e,n)}function JS(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(B(314))}r!==null&&r.delete(t),ry(e,n)}var oy;oy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qe.current)Ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ge=!1,FS(e,t,n);Ge=!!(e.flags&131072)}else Ge=!1,pe&&t.flags&1048576&&ag(t,nl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Rs(e,t),e=t.pendingProps;var o=Gr(t,Fe.current);Or(t,n),o=ud(null,t,r,e,o,n);var i=cd();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,qe(r)?(i=!0,el(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,od(t),o.updater=Ol,t.stateNode=o,o._reactInternals=t,Wu(t,r,e,n),t=Gu(null,t,r,!0,i,n)):(t.tag=0,pe&&i&&qc(t),Be(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Rs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=tN(r),e=vt(r,e),o){case 0:t=Xu(null,t,r,e,n);break e;case 1:t=gh(null,t,r,e,n);break e;case 11:t=ph(null,t,r,e,n);break e;case 14:t=mh(null,t,r,vt(r.type,e),n);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),Xu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),gh(e,t,r,o,n);case 3:e:{if(Bg(t),e===null)throw Error(B(387));r=t.pendingProps,i=t.memoizedState,o=i.element,pg(e,t),il(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=Zr(Error(B(423)),t),t=yh(e,t,r,n,o);break e}else if(r!==o){o=Zr(Error(B(424)),t),t=yh(e,t,r,n,o);break e}else for(nt=Pn(t.stateNode.containerInfo.firstChild),rt=t,pe=!0,St=null,n=fg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Kr(),r===o){t=an(e,t,n);break e}Be(e,t,r,n)}t=t.child}return t;case 5:return mg(t),e===null&&Hu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,zu(r,o)?s=null:i!==null&&zu(r,i)&&(t.flags|=32),Fg(e,t),Be(e,t,s,n),t.child;case 6:return e===null&&Hu(t),null;case 13:return Hg(e,t,n);case 4:return id(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qr(t,null,r,n):Be(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),ph(e,t,r,o,n);case 7:return Be(e,t,t.pendingProps,n),t.child;case 8:return Be(e,t,t.pendingProps.children,n),t.child;case 12:return Be(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,ue(rl,r._currentValue),r._currentValue=s,i!==null)if(Pt(i.value,s)){if(i.children===o.children&&!Qe.current){t=an(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=nn(-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),Vu(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(B(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Vu(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}Be(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Or(t,n),o=ht(o),r=r(o),t.flags|=1,Be(e,t,r,n),t.child;case 14:return r=t.type,o=vt(r,t.pendingProps),o=vt(r.type,o),mh(e,t,r,o,n);case 15:return $g(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:vt(r,o),Rs(e,t),t.tag=1,qe(r)?(e=!0,el(t)):e=!1,Or(t,n),Ag(t,r,o),Wu(t,r,o,n),Gu(null,t,r,!0,e,n);case 19:return Vg(e,t,n);case 22:return Og(e,t,n)}throw Error(B(156,t.tag))};function iy(e,t){return Im(e,t)}function eN(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 dt(e,t,n,r){return new eN(e,t,n,r)}function wd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tN(e){if(typeof e=="function")return wd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Oc)return 11;if(e===Fc)return 14}return 2}function Tn(e,t){var n=e.alternate;return n===null?(n=dt(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 Ls(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")wd(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Nr:return Jn(n.children,o,i,t);case $c:s=8,o|=8;break;case mu:return e=dt(12,n,t,o|2),e.elementType=mu,e.lanes=i,e;case gu:return e=dt(13,n,t,o),e.elementType=gu,e.lanes=i,e;case yu:return e=dt(19,n,t,o),e.elementType=yu,e.lanes=i,e;case mm:return Hl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hm:s=10;break e;case pm:s=9;break e;case Oc:s=11;break e;case Fc:s=14;break e;case xn:s=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=dt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Jn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function Hl(e,t,n,r){return e=dt(22,e,r,t),e.elementType=mm,e.lanes=n,e.stateNode={isHidden:!1},e}function Ua(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function Wa(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nN(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=Ca(0),this.expirationTimes=Ca(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ca(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Sd(e,t,n,r,o,i,s,l,a){return e=new nN(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=dt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},od(i),e}function rN(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Sr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function sy(e){if(!e)return Dn;e=e._reactInternals;e:{if(pr(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(qe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var n=e.type;if(qe(n))return sg(e,n,t)}return t}function ly(e,t,n,r,o,i,s,l,a){return e=Sd(n,r,!0,e,o,i,s,l,a),e.context=sy(null),n=e.current,r=He(),o=In(n),i=nn(r,o),i.callback=t??null,Mn(n,i,o),e.current.lanes=o,Pi(e,o,r),Ze(e,r),e}function Vl(e,t,n,r){var o=t.current,i=He(),s=In(o);return n=sy(n),t.context===null?t.context=n:t.pendingContext=n,t=nn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Mn(o,t,s),e!==null&&(jt(e,o,s,i),js(e,o,s)),s}function hl(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 _h(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Nd(e,t){_h(e,t),(e=e.alternate)&&_h(e,t)}function oN(){return null}var ay=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ed(e){this._internalRoot=e}Ul.prototype.render=Ed.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));Vl(e,t,null,null)};Ul.prototype.unmount=Ed.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lr(function(){Vl(null,e,null,null)}),t[sn]=null}};function Ul(e){this._internalRoot=e}Ul.prototype.unstable_scheduleHydration=function(e){if(e){var t=Om();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sn.length&&t!==0&&t<Sn[n].priority;n++);Sn.splice(n,0,e),n===0&&Bm(e)}};function kd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jh(){}function iN(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=hl(s);i.call(u)}}var s=ly(t,r,e,0,null,!1,!1,"",jh);return e._reactRootContainer=s,e[sn]=s.current,ui(e.nodeType===8?e.parentNode:e),lr(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=hl(a);l.call(u)}}var a=Sd(e,0,!1,null,null,!1,!1,"",jh);return e._reactRootContainer=a,e[sn]=a.current,ui(e.nodeType===8?e.parentNode:e),lr(function(){Vl(t,a,n,r)}),a}function Yl(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=hl(s);l.call(a)}}Vl(t,s,e,o)}else s=iN(n,t,e,o,r);return hl(s)}zm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Oo(t.pendingLanes);n!==0&&(Vc(t,n|1),Ze(t,Ne()),!(oe&6)&&(Jr=Ne()+500,Hn()))}break;case 13:lr(function(){var r=ln(e,1);if(r!==null){var o=He();jt(r,e,1,o)}}),Nd(e,1)}};Uc=function(e){if(e.tag===13){var t=ln(e,134217728);if(t!==null){var n=He();jt(t,e,134217728,n)}Nd(e,134217728)}};$m=function(e){if(e.tag===13){var t=In(e),n=ln(e,t);if(n!==null){var r=He();jt(n,e,t,r)}Nd(e,t)}};Om=function(){return le};Fm=function(e,t){var n=le;try{return le=e,t()}finally{le=n}};_u=function(e,t,n){switch(t){case"input":if(wu(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=Dl(r);if(!o)throw Error(B(90));ym(r),wu(r,o)}}}break;case"textarea":xm(e,n);break;case"select":t=n.value,t!=null&&Ar(e,!!n.multiple,t,!1)}};bm=yd;_m=lr;var sN={usingClientEntryPoint:!1,Events:[Ri,br,Dl,km,Cm,yd]},Mo={findFiberByHostInstance:Xn,bundleType:0,version:"18.3.0",rendererPackageName:"react-dom"},lN={bundleType:Mo.bundleType,version:Mo.version,rendererPackageName:Mo.rendererPackageName,rendererConfig:Mo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:cn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Mm(e),e===null?null:e.stateNode},findFiberByHostInstance:Mo.findFiberByHostInstance||oN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.0-next-8a015b68cc-20240425"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ss=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ss.isDisabled&&ss.supportsFiber)try{Il=ss.inject(lN),Bt=ss}catch{}}st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sN;st.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kd(t))throw Error(B(200));return rN(e,t,null,n)};st.createRoot=function(e,t){if(!kd(e))throw Error(B(299));var n=!1,r="",o=ay;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Sd(e,1,!1,null,null,n,!1,r,o),e[sn]=t.current,ui(e.nodeType===8?e.parentNode:e),new Ed(t)};st.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(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=Mm(t),e=e===null?null:e.stateNode,e};st.flushSync=function(e){return lr(e)};st.hydrate=function(e,t,n){if(!Wl(t))throw Error(B(200));return Yl(null,e,t,!0,n)};st.hydrateRoot=function(e,t,n){if(!kd(e))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=ay;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=ly(t,null,e,1,n??null,o,!1,i,s),e[sn]=t.current,ui(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 Ul(t)};st.render=function(e,t,n){if(!Wl(t))throw Error(B(200));return Yl(null,e,t,!1,n)};st.unmountComponentAtNode=function(e){if(!Wl(e))throw Error(B(40));return e._reactRootContainer?(lr(function(){Yl(null,null,e,!1,function(){e._reactRootContainer=null,e[sn]=null})}),!0):!1};st.unstable_batchedUpdates=yd;st.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Wl(n))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return Yl(e,t,n,!1,r)};st.version="18.3.0-next-8a015b68cc-20240425";function uy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uy)}catch(e){console.error(e)}}uy(),um.exports=st;var Xl=um.exports;const aN=Mc(Xl);var Ph=Xl;hu.createRoot=Ph.createRoot,hu.hydrateRoot=Ph.hydrateRoot;/**
|
|
41
|
-
* react-router v7.1.0
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/var Mh="popstate";function uN(e={}){function t(r,o){let{pathname:i,search:s,hash:l}=r.location;return sc("",{pathname:i,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:vi(o)}return dN(t,n,null,e)}function me(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function mt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function cN(){return Math.random().toString(36).substring(2,10)}function Rh(e,t){return{usr:e.state,key:e.key,idx:t}}function sc(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?mo(t):t,state:n,key:t&&t.key||r||cN()}}function vi({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function mo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function dN(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,l="POP",a=null,u=f();u==null&&(u=0,s.replaceState({...s.state,idx:u},""));function f(){return(s.state||{idx:null}).idx}function c(){l="POP";let S=f(),p=S==null?null:S-u;u=S,a&&a({action:l,location:w.location,delta:p})}function h(S,p){l="PUSH";let g=sc(w.location,S,p);u=f()+1;let m=Rh(g,u),N=w.createHref(g);try{s.pushState(m,"",N)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;o.location.assign(N)}i&&a&&a({action:l,location:w.location,delta:1})}function v(S,p){l="REPLACE";let g=sc(w.location,S,p);u=f();let m=Rh(g,u),N=w.createHref(g);s.replaceState(m,"",N),i&&a&&a({action:l,location:w.location,delta:0})}function x(S){let p=o.location.origin!=="null"?o.location.origin:o.location.href,g=typeof S=="string"?S:vi(S);return g=g.replace(/ $/,"%20"),me(p,`No window.location.(origin|href) available to create URL for href: ${g}`),new URL(g,p)}let w={get action(){return l},get location(){return e(o,s)},listen(S){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(Mh,c),a=S,()=>{o.removeEventListener(Mh,c),a=null}},createHref(S){return t(o,S)},createURL:x,encodeLocation(S){let p=x(S);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:h,replace:v,go(S){return s.go(S)}};return w}function cy(e,t,n="/"){return fN(e,t,n,!1)}function fN(e,t,n,r){let o=typeof t=="string"?mo(t):t,i=zn(o.pathname||"/",n);if(i==null)return null;let s=dy(e);hN(s);let l=null;for(let a=0;l==null&&a<s.length;++a){let u=kN(i);l=NN(s[a],u,r)}return l}function dy(e,t=[],n=[],r=""){let o=(i,s,l)=>{let a={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};a.relativePath.startsWith("/")&&(me(a.relativePath.startsWith(r),`Absolute route path "${a.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),a.relativePath=a.relativePath.slice(r.length));let u=rn([r,a.relativePath]),f=n.concat(a);i.children&&i.children.length>0&&(me(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),dy(i.children,t,f,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:wN(u,i.index),routesMeta:f})};return e.forEach((i,s)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,s);else for(let a of fy(i.path))o(i,s,a)}),t}function fy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=fy(r.join("/")),l=[];return l.push(...s.map(a=>a===""?i:[i,a].join("/"))),o&&l.push(...s),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function hN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:SN(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var pN=/^:[\w-]+$/,mN=3,gN=2,yN=1,vN=10,xN=-2,Ih=e=>e==="*";function wN(e,t){let n=e.split("/"),r=n.length;return n.some(Ih)&&(r+=xN),t&&(r+=gN),n.filter(o=>!Ih(o)).reduce((o,i)=>o+(pN.test(i)?mN:i===""?yN:vN),r)}function SN(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function NN(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",s=[];for(let l=0;l<r.length;++l){let a=r[l],u=l===r.length-1,f=i==="/"?t:t.slice(i.length)||"/",c=pl({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},f),h=a.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=pl({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},f)),!c)return null;Object.assign(o,c.params),s.push({params:o,pathname:rn([i,c.pathname]),pathnameBase:jN(rn([i,c.pathnameBase])),route:h}),c.pathnameBase!=="/"&&(i=rn([i,c.pathnameBase]))}return s}function pl(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=EN(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],s=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,{paramName:f,isOptional:c},h)=>{if(f==="*"){let x=l[h]||"";s=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const v=l[h];return c&&!v?u[f]=void 0:u[f]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function EN(e,t=!1,n=!0){mt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function kN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mt(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function zn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function CN(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?mo(e):e;return{pathname:n?n.startsWith("/")?n:bN(n,t):t,search:PN(r),hash:MN(o)}}function bN(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Ya(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function _N(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cd(e){let t=_N(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function bd(e,t,n,r=!1){let o;typeof e=="string"?o=mo(e):(o={...e},me(!o.pathname||!o.pathname.includes("?"),Ya("?","pathname","search",o)),me(!o.pathname||!o.pathname.includes("#"),Ya("#","pathname","hash",o)),me(!o.search||!o.search.includes("#"),Ya("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,l;if(s==null)l=n;else{let c=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),c-=1;o.pathname=h.join("/")}l=c>=0?t[c]:"/"}let a=CN(o,l),u=s&&s!=="/"&&s.endsWith("/"),f=(i||s===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||f)&&(a.pathname+="/"),a}var rn=e=>e.join("/").replace(/\/\/+/g,"/"),jN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),PN=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,MN=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function RN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var hy=["POST","PUT","PATCH","DELETE"];new Set(hy);var IN=["GET",...hy];new Set(IN);var go=y.createContext(null);go.displayName="DataRouter";var Gl=y.createContext(null);Gl.displayName="DataRouterState";var py=y.createContext({isTransitioning:!1});py.displayName="ViewTransition";var TN=y.createContext(new Map);TN.displayName="Fetchers";var LN=y.createContext(null);LN.displayName="Await";var Mt=y.createContext(null);Mt.displayName="Navigation";var Ti=y.createContext(null);Ti.displayName="Location";var gt=y.createContext({outlet:null,matches:[],isDataRoute:!1});gt.displayName="Route";var _d=y.createContext(null);_d.displayName="RouteError";function AN(e,{relative:t}={}){me(yo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=y.useContext(Mt),{hash:o,pathname:i,search:s}=Li(e,{relative:t}),l=i;return n!=="/"&&(l=i==="/"?n:rn([n,i])),r.createHref({pathname:l,search:s,hash:o})}function yo(){return y.useContext(Ti)!=null}function Yt(){return me(yo(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(Ti).location}var my="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gy(e){y.useContext(Mt).static||y.useLayoutEffect(e)}function Kl(){let{isDataRoute:e}=y.useContext(gt);return e?qN():DN()}function DN(){me(yo(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(go),{basename:t,navigator:n}=y.useContext(Mt),{matches:r}=y.useContext(gt),{pathname:o}=Yt(),i=JSON.stringify(Cd(r)),s=y.useRef(!1);return gy(()=>{s.current=!0}),y.useCallback((a,u={})=>{if(mt(s.current,my),!s.current)return;if(typeof a=="number"){n.go(a);return}let f=bd(a,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:rn([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,o,e])}var zN=y.createContext(null);function $N(e){let t=y.useContext(gt).outlet;return t&&y.createElement(zN.Provider,{value:e},t)}function ON(){let{matches:e}=y.useContext(gt),t=e[e.length-1];return t?t.params:{}}function Li(e,{relative:t}={}){let{matches:n}=y.useContext(gt),{pathname:r}=Yt(),o=JSON.stringify(Cd(n));return y.useMemo(()=>bd(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function FN(e,t){return yy(e,t)}function yy(e,t,n,r){var p;me(yo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=y.useContext(Mt),{matches:i}=y.useContext(gt),s=i[i.length-1],l=s?s.params:{},a=s?s.pathname:"/",u=s?s.pathnameBase:"/",f=s&&s.route;{let g=f&&f.path||"";vy(a,!f||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${g}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
-
|
|
51
|
-
Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let c=Yt(),h;if(t){let g=typeof t=="string"?mo(t):t;me(u==="/"||((p=g.pathname)==null?void 0:p.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${g.pathname}" was given in the \`location\` prop.`),h=g}else h=c;let v=h.pathname||"/",x=v;if(u!=="/"){let g=u.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(g.length).join("/")}let w=cy(e,{pathname:x});mt(f||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),mt(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let S=WN(w&&w.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:rn([u,o.encodeLocation?o.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:rn([u,o.encodeLocation?o.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,n,r);return t&&S?y.createElement(Ti.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},S):S}function BN(){let e=QN(),t=RN(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:i},"ErrorBoundary")," or"," ",y.createElement("code",{style:i},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:o},n):null,s)}var HN=y.createElement(BN,null),VN=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?y.createElement(gt.Provider,{value:this.props.routeContext},y.createElement(_d.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function UN({routeContext:e,match:t,children:n}){let r=y.useContext(go);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(gt.Provider,{value:e},n)}function WN(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,i=n==null?void 0:n.errors;if(i!=null){let a=o.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);me(a>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,a+1))}let s=!1,l=-1;if(n)for(let a=0;a<o.length;a++){let u=o[a];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=a),u.route.id){let{loaderData:f,errors:c}=n,h=u.route.loader&&!f.hasOwnProperty(u.route.id)&&(!c||c[u.route.id]===void 0);if(u.route.lazy||h){s=!0,l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((a,u,f)=>{let c,h=!1,v=null,x=null;n&&(c=i&&u.route.id?i[u.route.id]:void 0,v=u.route.errorElement||HN,s&&(l<0&&f===0?(vy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,x=null):l===f&&(h=!0,x=u.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,f+1)),S=()=>{let p;return c?p=v:h?p=x:u.route.Component?p=y.createElement(u.route.Component,null):u.route.element?p=u.route.element:p=a,y.createElement(UN,{match:u,routeContext:{outlet:a,matches:w,isDataRoute:n!=null},children:p})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?y.createElement(VN,{location:n.location,revalidation:n.revalidation,component:v,error:c,children:S(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):S()},null)}function jd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function YN(e){let t=y.useContext(go);return me(t,jd(e)),t}function XN(e){let t=y.useContext(Gl);return me(t,jd(e)),t}function GN(e){let t=y.useContext(gt);return me(t,jd(e)),t}function Pd(e){let t=GN(e),n=t.matches[t.matches.length-1];return me(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function KN(){return Pd("useRouteId")}function QN(){var r;let e=y.useContext(_d),t=XN("useRouteError"),n=Pd("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function qN(){let{router:e}=YN("useNavigate"),t=Pd("useNavigate"),n=y.useRef(!1);return gy(()=>{n.current=!0}),y.useCallback(async(o,i={})=>{mt(n.current,my),n.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var Th={};function vy(e,t,n){!t&&!Th[e]&&(Th[e]=!0,mt(!1,n))}y.memo(ZN);function ZN({routes:e,future:t,state:n}){return yy(e,void 0,n,t)}function lc({to:e,replace:t,state:n,relative:r}){me(yo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=y.useContext(Mt);mt(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=y.useContext(gt),{pathname:s}=Yt(),l=Kl(),a=bd(e,Cd(i),s,r==="path"),u=JSON.stringify(a);return y.useEffect(()=>{l(JSON.parse(u),{replace:t,state:n,relative:r})},[l,u,r,t,n]),null}function JN(e){return $N(e.context)}function at(e){me(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function eE({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1}){me(!yo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:s,navigator:o,static:i,future:{}}),[s,o,i]);typeof n=="string"&&(n=mo(n));let{pathname:a="/",search:u="",hash:f="",state:c=null,key:h="default"}=n,v=y.useMemo(()=>{let x=zn(a,s);return x==null?null:{location:{pathname:x,search:u,hash:f,state:c,key:h},navigationType:r}},[s,a,u,f,c,h,r]);return mt(v!=null,`<Router basename="${s}"> is not able to match the URL "${a}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:y.createElement(Mt.Provider,{value:l},y.createElement(Ti.Provider,{children:t,value:v}))}function tE({children:e,location:t}){return FN(ac(e),t)}function ac(e,t=[]){let n=[];return y.Children.forEach(e,(r,o)=>{if(!y.isValidElement(r))return;let i=[...t,o];if(r.type===y.Fragment){n.push.apply(n,ac(r.props.children,i));return}me(r.type===at,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),me(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=ac(r.props.children,i)),n.push(s)}),n}var As="get",Ds="application/x-www-form-urlencoded";function Ql(e){return e!=null&&typeof e.tagName=="string"}function nE(e){return Ql(e)&&e.tagName.toLowerCase()==="button"}function rE(e){return Ql(e)&&e.tagName.toLowerCase()==="form"}function oE(e){return Ql(e)&&e.tagName.toLowerCase()==="input"}function iE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function sE(e,t){return e.button===0&&(!t||t==="_self")&&!iE(e)}function uc(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}function lE(e,t){let n=uc(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}var ls=null;function aE(){if(ls===null)try{new FormData(document.createElement("form"),0),ls=!1}catch{ls=!0}return ls}var uE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xa(e){return e!=null&&!uE.has(e)?(mt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ds}"`),null):e}function cE(e,t){let n,r,o,i,s;if(rE(e)){let l=e.getAttribute("action");r=l?zn(l,t):null,n=e.getAttribute("method")||As,o=Xa(e.getAttribute("enctype"))||Ds,i=new FormData(e)}else if(nE(e)||oE(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||l.getAttribute("action");if(r=a?zn(a,t):null,n=e.getAttribute("formmethod")||l.getAttribute("method")||As,o=Xa(e.getAttribute("formenctype"))||Xa(l.getAttribute("enctype"))||Ds,i=new FormData(l,e),!aE()){let{name:u,type:f,value:c}=e;if(f==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,c)}}else{if(Ql(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=As,r=null,o=Ds,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:s}}function Md(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function dE(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fE(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function hE(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let s=await dE(i,n);return s.links?s.links():[]}return[]}));return yE(r.flat(1).filter(fE).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Lh(e,t,n,r,o,i){let s=(a,u)=>n[u]?a.route.id!==n[u].route.id:!0,l=(a,u)=>{var f;return n[u].pathname!==a.pathname||((f=n[u].route.path)==null?void 0:f.endsWith("*"))&&n[u].params["*"]!==a.params["*"]};return i==="assets"?t.filter((a,u)=>s(a,u)||l(a,u)):i==="data"?t.filter((a,u)=>{var c;let f=r.routes[a.route.id];if(!f||!f.hasLoader)return!1;if(s(a,u)||l(a,u))return!0;if(a.route.shouldRevalidate){let h=a.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((c=n[0])==null?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:a.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function pE(e,t){return mE(e.map(n=>{let r=t.routes[n.route.id];if(!r)return[];let o=[r.module];return r.imports&&(o=o.concat(r.imports)),o}).flat(1))}function mE(e){return[...new Set(e)]}function gE(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function yE(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(gE(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}function vE(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function xE(){let e=y.useContext(go);return Md(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function wE(){let e=y.useContext(Gl);return Md(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Rd=y.createContext(void 0);Rd.displayName="FrameworkContext";function xy(){let e=y.useContext(Rd);return Md(e,"You must render this element inside a <HydratedRouter> element"),e}function SE(e,t){let n=y.useContext(Rd),[r,o]=y.useState(!1),[i,s]=y.useState(!1),{onFocus:l,onBlur:a,onMouseEnter:u,onMouseLeave:f,onTouchStart:c}=t,h=y.useRef(null);y.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let w=p=>{p.forEach(g=>{s(g.isIntersecting)})},S=new IntersectionObserver(w,{threshold:.5});return h.current&&S.observe(h.current),()=>{S.disconnect()}}},[e]),y.useEffect(()=>{if(r){let w=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(w)}}},[r]);let v=()=>{o(!0)},x=()=>{o(!1),s(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Ro(l,v),onBlur:Ro(a,x),onMouseEnter:Ro(u,v),onMouseLeave:Ro(f,x),onTouchStart:Ro(c,v)}]:[!1,h,{}]}function Ro(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function NE({page:e,...t}){let{router:n}=xE(),r=y.useMemo(()=>cy(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?y.createElement(kE,{page:e,matches:r,...t}):null}function EE(e){let{manifest:t,routeModules:n}=xy(),[r,o]=y.useState([]);return y.useEffect(()=>{let i=!1;return hE(e,t,n).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,n]),r}function kE({page:e,matches:t,...n}){let r=Yt(),{manifest:o,routeModules:i}=xy(),{loaderData:s,matches:l}=wE(),a=y.useMemo(()=>Lh(e,t,l,o,r,"data"),[e,t,l,o,r]),u=y.useMemo(()=>Lh(e,t,l,o,r,"assets"),[e,t,l,o,r]),f=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,x=!1;if(t.forEach(S=>{var g;let p=o.routes[S.route.id];!p||!p.hasLoader||(!a.some(m=>m.route.id===S.route.id)&&S.route.id in s&&((g=i[S.route.id])!=null&&g.shouldRevalidate)||p.hasClientLoader?x=!0:v.add(S.route.id))}),v.size===0)return[];let w=vE(e);return x&&v.size>0&&w.searchParams.set("_routes",t.filter(S=>v.has(S.route.id)).map(S=>S.route.id).join(",")),[w.pathname+w.search]},[s,r,o,a,t,e,i]),c=y.useMemo(()=>pE(u,o),[u,o]),h=EE(u);return y.createElement(y.Fragment,null,f.map(v=>y.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),c.map(v=>y.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),h.map(({key:v,link:x})=>y.createElement("link",{key:v,...x})))}function CE(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var wy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wy&&(window.__reactRouterVersion="7.1.0")}catch{}function bE({basename:e,children:t,window:n}){let r=y.useRef();r.current==null&&(r.current=uN({window:n,v5Compat:!0}));let o=r.current,[i,s]=y.useState({action:o.action,location:o.location}),l=y.useCallback(a=>{y.startTransition(()=>s(a))},[s]);return y.useLayoutEffect(()=>o.listen(l),[o,l]),y.createElement(eE,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o})}var Sy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eo=y.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:s,state:l,target:a,to:u,preventScrollReset:f,viewTransition:c,...h},v){let{basename:x}=y.useContext(Mt),w=typeof u=="string"&&Sy.test(u),S,p=!1;if(typeof u=="string"&&w&&(S=u,wy))try{let R=new URL(window.location.href),z=u.startsWith("//")?new URL(R.protocol+u):new URL(u),T=zn(z.pathname,x);z.origin===R.origin&&T!=null?u=T+z.search+z.hash:p=!0}catch{mt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let g=AN(u,{relative:o}),[m,N,E]=SE(r,h),C=PE(u,{replace:s,state:l,target:a,preventScrollReset:f,relative:o,viewTransition:c});function k(R){t&&t(R),R.defaultPrevented||C(R)}let j=y.createElement("a",{...h,...E,href:S||g,onClick:p||i?t:k,ref:CE(v,N),target:a,"data-discover":!w&&n==="render"?"true":void 0});return m&&!w?y.createElement(y.Fragment,null,j,y.createElement(NE,{page:g})):j});eo.displayName="Link";var Ny=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:s,viewTransition:l,children:a,...u},f){let c=Li(s,{relative:u.relative}),h=Yt(),v=y.useContext(Gl),{navigator:x,basename:w}=y.useContext(Mt),S=v!=null&&AE(c)&&l===!0,p=x.encodeLocation?x.encodeLocation(c).pathname:c.pathname,g=h.pathname,m=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(g=g.toLowerCase(),m=m?m.toLowerCase():null,p=p.toLowerCase()),m&&w&&(m=zn(m,w)||m);const N=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let E=g===p||!o&&g.startsWith(p)&&g.charAt(N)==="/",C=m!=null&&(m===p||!o&&m.startsWith(p)&&m.charAt(p.length)==="/"),k={isActive:E,isPending:C,isTransitioning:S},j=E?t:void 0,R;typeof r=="function"?R=r(k):R=[r,E?"active":null,C?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let z=typeof i=="function"?i(k):i;return y.createElement(eo,{...u,"aria-current":j,className:R,ref:f,style:z,to:s,viewTransition:l},typeof a=="function"?a(k):a)});Ny.displayName="NavLink";var _E=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:s=As,action:l,onSubmit:a,relative:u,preventScrollReset:f,viewTransition:c,...h},v)=>{let x=TE(),w=LE(l,{relative:u}),S=s.toLowerCase()==="get"?"get":"post",p=typeof l=="string"&&Sy.test(l),g=m=>{if(a&&a(m),m.defaultPrevented)return;m.preventDefault();let N=m.nativeEvent.submitter,E=(N==null?void 0:N.getAttribute("formmethod"))||s;x(N||m.currentTarget,{fetcherKey:t,method:E,navigate:n,replace:o,state:i,relative:u,preventScrollReset:f,viewTransition:c})};return y.createElement("form",{ref:v,method:S,action:w,onSubmit:r?a:g,...h,"data-discover":!p&&e==="render"?"true":void 0})});_E.displayName="Form";function jE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ey(e){let t=y.useContext(go);return me(t,jE(e)),t}function PE(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:i,viewTransition:s}={}){let l=Kl(),a=Yt(),u=Li(e,{relative:i});return y.useCallback(f=>{if(sE(f,t)){f.preventDefault();let c=n!==void 0?n:vi(a)===vi(u);l(e,{replace:c,state:r,preventScrollReset:o,relative:i,viewTransition:s})}},[a,l,u,n,r,t,e,o,i,s])}function ME(e){mt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=y.useRef(uc(e)),n=y.useRef(!1),r=Yt(),o=y.useMemo(()=>lE(r.search,n.current?null:t.current),[r.search]),i=Kl(),s=y.useCallback((l,a)=>{const u=uc(typeof l=="function"?l(o):l);n.current=!0,i("?"+u,a)},[i,o]);return[o,s]}var RE=0,IE=()=>`__${String(++RE)}__`;function TE(){let{router:e}=Ey("useSubmit"),{basename:t}=y.useContext(Mt),n=KN();return y.useCallback(async(r,o={})=>{let{action:i,method:s,encType:l,formData:a,body:u}=cE(r,t);if(o.navigate===!1){let f=o.fetcherKey||IE();await e.fetch(f,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:a,body:u,formMethod:o.method||s,formEncType:o.encType||l,flushSync:o.flushSync})}else await e.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:a,body:u,formMethod:o.method||s,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,n])}function LE(e,{relative:t}={}){let{basename:n}=y.useContext(Mt),r=y.useContext(gt);me(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...Li(e||".",{relative:t})},s=Yt();if(e==null){i.search=s.search;let l=new URLSearchParams(i.search),a=l.getAll("index");if(a.some(f=>f==="")){l.delete("index"),a.filter(c=>c).forEach(c=>l.append("index",c));let f=l.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:rn([n,i.pathname])),vi(i)}function AE(e,t={}){let n=y.useContext(py);me(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ey("useViewTransitionState"),o=Li(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=zn(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=zn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return pl(o.pathname,s)!=null||pl(o.pathname,i)!=null}new TextEncoder;const ky=y.createContext(null);function DE({children:e}){const[t,n]=y.useState(()=>localStorage.getItem("opentrust_theme")||"dark"),r=o=>{n(o),localStorage.setItem("opentrust_theme",o)};return y.useEffect(()=>{const o=document.documentElement;if(o.classList.remove("light","dark"),t==="system"){const i=window.matchMedia("(prefers-color-scheme: dark)").matches;o.classList.add(i?"dark":"light")}else o.classList.add(t)},[t]),d.jsx(ky.Provider,{value:{theme:t,setTheme:r},children:e})}function zE(){const e=y.useContext(ky);if(!e)throw new Error("useTheme must be within ThemeProvider");return e}const $E={email:"dev@localhost",apiKey:"sk-og-dev"},Cy=y.createContext(null);function OE({children:e}){const[t,n]=y.useState(()=>{const l=localStorage.getItem("opentrust_user");return l?JSON.parse(l):null}),[r,o]=y.useState(!localStorage.getItem("opentrust_user"));y.useEffect(()=>{if(t){o(!1);return}let l=!1;return(async()=>{try{const a=await fetch("/api/auth/config");if(!a.ok)return;const u=await a.json();!l&&u.devMode&&n($E)}catch{}finally{l||o(!1)}})(),()=>{l=!0}},[t]);const i=y.useCallback(async(l,a)=>{const u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:l,apiKey:a})});if(!u.ok)throw new Error("Login failed");const f=await u.json();if(!f.success)throw new Error(f.error??"Login failed");const c={email:l,apiKey:a};n(c),localStorage.setItem("opentrust_user",JSON.stringify(c))},[]),s=y.useCallback(()=>{n(null),localStorage.removeItem("opentrust_user")},[]);return d.jsx(Cy.Provider,{value:{user:t,isAuthenticated:!!t,isLoading:r,login:i,logout:s},children:e})}function Id(){const e=y.useContext(Cy);if(!e)throw new Error("useAuth must be within AuthProvider");return e}function by(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=by(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function FE(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=by(e))&&(r&&(r+=" "),r+=t);return r}const Td="-";function BE(e){const t=VE(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(s){const l=s.split(Td);return l[0]===""&&l.length!==1&&l.shift(),_y(l,t)||HE(s)}function i(s,l){const a=n[s]||[];return l&&r[s]?[...a,...r[s]]:a}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function _y(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?_y(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Td);return(s=t.validators.find(({validator:l})=>l(i)))==null?void 0:s.classGroupId}const Ah=/^\[(.+)\]$/;function HE(e){if(Ah.test(e)){const t=Ah.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function VE(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return WE(Object.entries(e.classGroups),n).forEach(([i,s])=>{cc(s,r,i,t)}),r}function cc(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Dh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(UE(o)){cc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{cc(s,Dh(t,i),n,r)})})}function Dh(e,t){let n=e;return t.split(Td).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function UE(e){return e.isThemeGetter}function WE(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,l])=>[t+s,l])):i);return[n,o]}):e}function YE(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const jy="!";function XE(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(s){const l=[];let a=0,u=0,f;for(let w=0;w<s.length;w++){let S=s[w];if(a===0){if(S===r&&(n||s.slice(w,w+o)===t)){l.push(s.slice(u,w)),u=w+o;continue}if(S==="/"){f=w;continue}}S==="["?a++:S==="]"&&a--}const c=l.length===0?s:s.substring(u),h=c.startsWith(jy),v=h?c.substring(1):c,x=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:x}}}function GE(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function KE(e){return{cache:YE(e.cacheSize),splitModifiers:XE(e),...BE(e)}}const QE=/\s+/;function qE(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(QE).map(s=>{const{modifiers:l,hasImportantModifier:a,baseClassName:u,maybePostfixModifierPosition:f}=n(s);let c=r(f?u.substring(0,f):u),h=!!f;if(!c){if(!f)return{isTailwindClass:!1,originalClassName:s};if(c=r(u),!c)return{isTailwindClass:!1,originalClassName:s};h=!1}const v=GE(l).join(":");return{isTailwindClass:!0,modifierId:a?v+jy:v,classGroupId:c,originalClassName:s,hasPostfixModifier:h}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:l,classGroupId:a,hasPostfixModifier:u}=s,f=l+a;return i.has(f)?!1:(i.add(f),o(a,u).forEach(c=>i.add(l+c)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function ZE(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Py(t))&&(r&&(r+=" "),r+=n);return r}function Py(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Py(e[r]))&&(n&&(n+=" "),n+=t);return n}function JE(e,...t){let n,r,o,i=s;function s(a){const u=t.reduce((f,c)=>c(f),e());return n=KE(u),r=n.cache.get,o=n.cache.set,i=l,l(a)}function l(a){const u=r(a);if(u)return u;const f=qE(a,n);return o(a,f),f}return function(){return i(ZE.apply(null,arguments))}}function de(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const My=/^\[(?:([a-z-]+):)?(.+)\]$/i,e2=/^\d+\/\d+$/,t2=new Set(["px","full","screen"]),n2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r2=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,o2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,i2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,s2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Kt(e){return Qn(e)||t2.has(e)||e2.test(e)}function pn(e){return vo(e,"length",p2)}function Qn(e){return!!e&&!Number.isNaN(Number(e))}function as(e){return vo(e,"number",Qn)}function Io(e){return!!e&&Number.isInteger(Number(e))}function l2(e){return e.endsWith("%")&&Qn(e.slice(0,-1))}function ee(e){return My.test(e)}function mn(e){return n2.test(e)}const a2=new Set(["length","size","percentage"]);function u2(e){return vo(e,a2,Ry)}function c2(e){return vo(e,"position",Ry)}const d2=new Set(["image","url"]);function f2(e){return vo(e,d2,g2)}function h2(e){return vo(e,"",m2)}function To(){return!0}function vo(e,t,n){const r=My.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function p2(e){return r2.test(e)&&!o2.test(e)}function Ry(){return!1}function m2(e){return i2.test(e)}function g2(e){return s2.test(e)}function y2(){const e=de("colors"),t=de("spacing"),n=de("blur"),r=de("brightness"),o=de("borderColor"),i=de("borderRadius"),s=de("borderSpacing"),l=de("borderWidth"),a=de("contrast"),u=de("grayscale"),f=de("hueRotate"),c=de("invert"),h=de("gap"),v=de("gradientColorStops"),x=de("gradientColorStopPositions"),w=de("inset"),S=de("margin"),p=de("opacity"),g=de("padding"),m=de("saturate"),N=de("scale"),E=de("sepia"),C=de("skew"),k=de("space"),j=de("translate"),R=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",ee,t],I=()=>[ee,t],F=()=>["",Kt,pn],_=()=>["auto",Qn,ee],A=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],b=()=>["start","end","center","between","around","evenly","stretch"],P=()=>["","0",ee],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>[Qn,as],$=()=>[Qn,ee];return{cacheSize:500,separator:":",theme:{colors:[To],spacing:[Kt,pn],blur:["none","",mn,ee],brightness:O(),borderColor:[e],borderRadius:["none","","full",mn,ee],borderSpacing:I(),borderWidth:F(),contrast:O(),grayscale:P(),hueRotate:$(),invert:P(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[l2,pn],inset:T(),margin:T(),opacity:O(),padding:I(),saturate:O(),scale:O(),sepia:P(),skew:$(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[mn]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...A(),ee]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Io,ee]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:P()}],shrink:[{shrink:P()}],order:[{order:["first","last","none",Io,ee]}],"grid-cols":[{"grid-cols":[To]}],"col-start-end":[{col:["auto",{span:["full",Io,ee]},ee]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[To]}],"row-start-end":[{row:["auto",{span:[Io,ee]},ee]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...b()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...b(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...b(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[mn]},mn]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",mn,pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",as]}],"font-family":[{font:[To]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ee]}],"line-clamp":[{"line-clamp":["none",Qn,as]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Kt,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Kt,pn]}],"underline-offset":[{"underline-offset":["auto",Kt,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...A(),c2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",u2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},f2]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:M()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[Kt,ee]}],"outline-w":[{outline:[Kt,pn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[Kt,pn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",mn,h2]}],"shadow-color":[{shadow:[To]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",mn,ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[c]}],saturate:[{saturate:[m]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[c]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ee]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Io,ee]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ee]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Kt,pn,as]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const v2=JE(y2);function Ee(...e){return v2(FE(e))}/**
|
|
52
|
-
* @license lucide-react v0.400.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const x2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Iy=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
|
|
57
|
-
* @license lucide-react v0.400.0 - ISC
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the ISC license.
|
|
60
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/var w2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
62
|
-
* @license lucide-react v0.400.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the ISC license.
|
|
65
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const S2=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},a)=>y.createElement("svg",{ref:a,...w2,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Iy("lucide",o),...l},[...s.map(([u,f])=>y.createElement(u,f)),...Array.isArray(i)?i:[i]]));/**
|
|
67
|
-
* @license lucide-react v0.400.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const ae=(e,t)=>{const n=y.forwardRef(({className:r,...o},i)=>y.createElement(S2,{ref:i,iconNode:t,className:Iy(`lucide-${x2(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
72
|
-
* @license lucide-react v0.400.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const N2=ae("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
77
|
-
* @license lucide-react v0.400.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const E2=ae("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
82
|
-
* @license lucide-react v0.400.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const Ld=ae("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
87
|
-
* @license lucide-react v0.400.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const Ty=ae("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
92
|
-
* @license lucide-react v0.400.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const Ly=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
97
|
-
* @license lucide-react v0.400.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const k2=ae("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
102
|
-
* @license lucide-react v0.400.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const C2=ae("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
107
|
-
* @license lucide-react v0.400.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const b2=ae("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
112
|
-
* @license lucide-react v0.400.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const _2=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
117
|
-
* @license lucide-react v0.400.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const ml=ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
122
|
-
* @license lucide-react v0.400.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const j2=ae("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
127
|
-
* @license lucide-react v0.400.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const Ad=ae("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
132
|
-
* @license lucide-react v0.400.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const Ay=ae("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);/**
|
|
137
|
-
* @license lucide-react v0.400.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const P2=ae("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
|
|
142
|
-
* @license lucide-react v0.400.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const ql=ae("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
147
|
-
* @license lucide-react v0.400.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const M2=ae("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
|
152
|
-
* @license lucide-react v0.400.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const R2=ae("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
157
|
-
* @license lucide-react v0.400.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const I2=ae("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
162
|
-
* @license lucide-react v0.400.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const er=ae("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
|
|
167
|
-
* @license lucide-react v0.400.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const Dy=ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
172
|
-
* @license lucide-react v0.400.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const zy=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
177
|
-
* @license lucide-react v0.400.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const to=ae("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
182
|
-
* @license lucide-react v0.400.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const T2=ae("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
187
|
-
* @license lucide-react v0.400.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const dc=ae("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
192
|
-
* @license lucide-react v0.400.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const gl=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
197
|
-
* @license lucide-react v0.400.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const $y=ae("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
202
|
-
* @license lucide-react v0.400.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const Oy=ae("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
207
|
-
* @license lucide-react v0.400.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const L2=ae("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),A2=[{label:"Discovery",items:[{to:"/inventory/agents",label:"Agents",icon:Ld},{to:"/inventory/identities",label:"Identities",icon:Ay},{to:"/inventory/permissions",label:"Permissions",icon:P2}]},{label:"Secure",items:[{to:"/secure/risk",label:"Risk",icon:$y},{to:"/secure/graph",label:"Graph",icon:I2}]},{label:"Operations",items:[{to:"/ops/skills",label:"Skills & Commands",icon:Oy}]}];function D2(){const e=Yt(),[t,n]=y.useState("");return y.useEffect(()=>{fetch("/health").then(r=>r.json()).then(r=>n(r.version??"")).catch(()=>{})},[]),d.jsxs("aside",{className:"flex w-56 flex-col border-r border-border bg-card",children:[d.jsxs("div",{className:"flex h-14 items-center gap-2 border-b border-border px-4",children:[d.jsx("img",{src:"/dashboard/logo-512.png",alt:"OpenTrust",className:"h-6 w-6 dark:brightness-[1.8] dark:contrast-125"}),d.jsx("span",{className:"text-sm font-semibold tracking-tight text-foreground",children:"OpenTrust"})]}),d.jsx("nav",{className:"flex-1 space-y-6 px-3 py-4",children:A2.map(r=>d.jsxs("div",{children:[d.jsx("p",{className:"mb-2 px-2 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r.label}),d.jsx("div",{className:"space-y-0.5",children:r.items.map(o=>d.jsxs(Ny,{to:o.to,className:Ee("flex items-center gap-2.5 rounded-md px-2 py-1.5 text-sm transition-colors",e.pathname.startsWith(o.to)?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[d.jsx(o.icon,{className:"h-4 w-4 shrink-0"}),o.label]},o.to))})]},r.label))}),d.jsx("div",{className:"border-t border-border px-4 py-3",children:d.jsx("p",{className:"text-[11px] text-muted-foreground",children:t?`v${t}`:""})})]})}function z2(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Fy(...e){return t=>e.forEach(n=>z2(n,t))}function Ut(...e){return y.useCallback(Fy(...e),e)}var no=y.forwardRef((e,t)=>{const{children:n,...r}=e,o=y.Children.toArray(n),i=o.find(O2);if(i){const s=i.props.children,l=o.map(a=>a===i?y.Children.count(s)>1?y.Children.only(null):y.isValidElement(s)?s.props.children:null:a);return d.jsx(fc,{...r,ref:t,children:y.isValidElement(s)?y.cloneElement(s,void 0,l):null})}return d.jsx(fc,{...r,ref:t,children:n})});no.displayName="Slot";var fc=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const o=B2(n);return y.cloneElement(n,{...F2(r,n.props),ref:t?Fy(t,o):o})}return y.Children.count(n)>1?y.Children.only(null):null});fc.displayName="SlotClone";var $2=({children:e})=>d.jsx(d.Fragment,{children:e});function O2(e){return y.isValidElement(e)&&e.type===$2}function F2(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function B2(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function By(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=By(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function H2(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=By(e))&&(r&&(r+=" "),r+=t);return r}const zh=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,$h=H2,V2=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return $h(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],c=i==null?void 0:i[u];if(f===null)return null;const h=zh(f)||zh(c);return o[u][h]}),l=n&&Object.entries(n).reduce((u,f)=>{let[c,h]=f;return h===void 0||(u[c]=h),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:c,className:h,...v}=f;return Object.entries(v).every(x=>{let[w,S]=x;return Array.isArray(S)?S.includes({...i,...l}[w]):{...i,...l}[w]===S})?[...u,c,h]:u},[]);return $h(e,s,a,n==null?void 0:n.class,n==null?void 0:n.className)},U2=V2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-border bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Re=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?no:"button";return d.jsx(s,{className:Ee(U2({variant:t,size:n,className:e})),ref:i,...o})});Re.displayName="Button";function W2(){const{user:e,logout:t}=Id(),{theme:n,setTheme:r}=zE();return d.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-border bg-card px-6",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"h-2 w-2 rounded-full bg-success"}),d.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[(e==null?void 0:e.email)&&d.jsx("span",{className:"text-xs text-muted-foreground",children:e.email}),d.jsx(Re,{variant:"ghost",size:"icon",onClick:()=>r(n==="dark"?"light":"dark"),className:"h-8 w-8",children:n==="dark"?d.jsx(T2,{className:"h-4 w-4"}):d.jsx(R2,{className:"h-4 w-4"})}),d.jsx(Re,{variant:"ghost",size:"icon",onClick:t,className:"h-8 w-8",children:d.jsx(M2,{className:"h-4 w-4"})})]})]})}function Y2(){return d.jsxs("div",{className:"flex h-screen overflow-hidden bg-background",children:[d.jsx(D2,{}),d.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[d.jsx(W2,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(JN,{})})]})]})}const $n=y.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:Ee("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors","file:border-0 file:bg-transparent file:text-sm file:font-medium","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));$n.displayName="Input";function X2(){const[e]=ME(),[t,n]=y.useState(e.get("email")??""),[r,o]=y.useState(e.get("key")??""),[i,s]=y.useState(""),[l,a]=y.useState(!1),{login:u,isAuthenticated:f,isLoading:c}=Id(),h=Kl();if(y.useEffect(()=>{f&&h("/inventory/agents",{replace:!0})},[f,h]),c)return d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:d.jsx("div",{className:"text-muted-foreground text-sm",children:"Loading..."})});const v=async x=>{x.preventDefault(),s(""),a(!0);try{await u(t,r),h("/inventory/agents",{replace:!0})}catch(w){s(w instanceof Error?w.message:"Login failed")}finally{a(!1)}};return d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:d.jsxs("div",{className:"w-full max-w-sm space-y-8 px-4",children:[d.jsxs("div",{className:"flex flex-col items-center gap-3",children:[d.jsx("img",{src:"/dashboard/logo-512.png",alt:"OpenTrust",className:"h-12 w-12 dark:brightness-[1.8] dark:contrast-125"}),d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"text-lg font-semibold tracking-tight text-foreground",children:"OpenTrust"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Sign in to your dashboard"})]})]}),d.jsxs("form",{onSubmit:v,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:"Email"}),d.jsx($n,{type:"email",placeholder:"you@example.com",value:t,onChange:x=>n(x.target.value),required:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"text-sm font-medium text-foreground",children:"API Key"}),d.jsx($n,{type:"password",placeholder:"sk-og-...",value:r,onChange:x=>o(x.target.value),required:!0})]}),i&&d.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:i}),d.jsx(Re,{type:"submit",className:"w-full",disabled:l,children:l?"Signing in...":"Sign in"})]}),d.jsx("p",{className:"text-center text-xs text-muted-foreground",children:"API Key is generated when registering an agent with the Core API."})]})})}const G2="/api";async function be(e,t){const n=localStorage.getItem("opentrust_user"),r=n?JSON.parse(n).apiKey:null,o=await fetch(`${G2}${e}`,{...t,headers:{"Content-Type":"application/json",...r&&{Authorization:`Bearer ${r}`},...t==null?void 0:t.headers}});if(!o.ok)throw new Error(`API ${o.status}: ${await o.text()}`);return o.json()}const Je={agents:{list:()=>be("/agents"),get:e=>be(`/agents/${e}`),create:e=>be("/agents",{method:"POST",body:JSON.stringify(e)}),update:(e,t)=>be(`/agents/${e}`,{method:"PUT",body:JSON.stringify(t)}),delete:e=>be(`/agents/${e}`,{method:"DELETE"})},discovery:{agents:()=>be("/discovery/agents"),profile:e=>be(`/discovery/agents/${e}/profile`)},observations:{recent:(e=50)=>be(`/observations?limit=${e}`),permissions:()=>be("/observations/permissions"),anomalies:()=>be("/observations/anomalies"),summary:()=>be("/observations/summary"),agentPermissions:e=>be(`/observations/agents/${e}/permissions`)},commands:{list:e=>be(`/commands?agentId=${e}`),create:e=>be("/commands",{method:"POST",body:JSON.stringify(e)})},detect:e=>be("/detect",{method:"POST",body:JSON.stringify(e)}),usage:{summary:(e=30)=>be(`/usage/summary?days=${e}`),daily:(e=30)=>be(`/usage/daily?days=${e}`)},settings:{get:()=>be("/settings"),update:e=>be("/settings",{method:"PUT",body:JSON.stringify(e)})}};function Ve({className:e,variant:t="default",...n}){return d.jsx("div",{className:Ee("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{"border-transparent bg-primary text-primary-foreground shadow":t==="default","border-transparent bg-secondary text-secondary-foreground":t==="secondary","border-transparent bg-destructive text-destructive-foreground shadow":t==="destructive","text-foreground":t==="outline","border-transparent bg-success/15 text-success":t==="success","border-transparent bg-warning/15 text-warning":t==="warning"},e),...n})}function K2(){const[e,t]=y.useState([]),[n,r]=y.useState(""),[o,i]=y.useState(!0),s=async()=>{i(!0);try{const u=await Je.discovery.agents();t(u.data??[])}catch{}i(!1)};y.useEffect(()=>{s()},[]);const l=e.filter(u=>{var f;return!n||((f=u.name)==null?void 0:f.toLowerCase().includes(n.toLowerCase()))}),a=u=>u==="active"?"success":u==="inactive"?"secondary":"warning";return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Agents"}),d.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[e.length," agent",e.length!==1?"s":""," discovered"]})]}),d.jsxs(Re,{variant:"outline",size:"sm",onClick:s,children:[d.jsx(Dy,{className:"h-3.5 w-3.5"}),"Scan"]})]}),d.jsxs("div",{className:"relative max-w-sm",children:[d.jsx(zy,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),d.jsx($n,{placeholder:"Search agents...",className:"pl-9",value:n,onChange:u=>r(u.target.value)})]}),o?d.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):l.length===0?d.jsxs("div",{className:"flex h-40 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border",children:[d.jsx(Ld,{className:"h-8 w-8 text-muted-foreground/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents found"})]}):d.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:l.map(u=>{var f;return d.jsxs(eo,{to:`/inventory/agents/${u.id}`,className:"group flex flex-col gap-3 rounded-lg border border-border bg-card p-4 transition-colors hover:border-muted-foreground/30",children:[d.jsxs("div",{className:"flex items-start justify-between",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx("span",{className:"text-xl",children:u.emoji||"🤖"}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-foreground group-hover:text-foreground",children:u.name}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:[u.provider||"unknown",u.model?` · ${u.model}`:""]})]})]}),d.jsx(Ve,{variant:a(u.status??"inactive"),className:"text-[10px]",children:u.status??"inactive"})]}),((f=u.skills)==null?void 0:f.length)>0&&d.jsxs("div",{className:"flex flex-wrap gap-1",children:[u.skills.slice(0,4).map(c=>d.jsx("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:typeof c=="string"?c:c.name},c.name??c)),u.skills.length>4&&d.jsxs("span",{className:"rounded-md bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",children:["+",u.skills.length-4]})]})]},u.id)})})]})}const Et=y.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Ee("rounded-lg border border-border bg-card text-card-foreground shadow-sm",e),...t}));Et.displayName="Card";const Ot=y.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Ee("flex flex-col space-y-1.5 p-6",e),...t}));Ot.displayName="CardHeader";const Ft=y.forwardRef(({className:e,...t},n)=>d.jsx("h3",{ref:n,className:Ee("font-semibold leading-none tracking-tight",e),...t}));Ft.displayName="CardTitle";const Q2=y.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:Ee("text-sm text-muted-foreground",e),...t}));Q2.displayName="CardDescription";const kt=y.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:Ee("p-6 pt-0",e),...t}));kt.displayName="CardContent";const q2=["Profile","Tasks","Identities","Permissions"];function Z2(){const{id:e}=ON(),[t,n]=y.useState(null),[r,o]=y.useState([]),[i,s]=y.useState("Profile"),[l,a]=y.useState(!0);return y.useEffect(()=>{e&&(a(!0),(async()=>{const u=await Je.discovery.profile(e).catch(()=>null),f=(u==null?void 0:u.data)??null;n(f);const c=(f==null?void 0:f.registeredAgentId)??e,h=await Je.observations.agentPermissions(c).catch(()=>({data:[]}));o((h==null?void 0:h.data)??[]),a(!1)})())},[e]),l?d.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):t?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx(eo,{to:"/inventory/agents",className:"rounded-md p-1.5 hover:bg-accent",children:d.jsx(N2,{className:"h-4 w-4"})}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"text-2xl",children:t.emoji||"🤖"}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-lg font-semibold",children:t.name||e}),d.jsxs("p",{className:"text-sm text-muted-foreground",children:[t.provider||"unknown",t.model?` / ${t.model}`:""]})]})]})]}),d.jsx("div",{className:"flex gap-1 border-b border-border",children:q2.map(u=>d.jsx("button",{onClick:()=>s(u),className:Ee("border-b-2 px-4 py-2 text-sm font-medium transition-colors",i===u?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),children:u},u))}),i==="Profile"&&d.jsx(J2,{profile:t}),i==="Tasks"&&d.jsx(ek,{profile:t}),i==="Identities"&&d.jsx(tk,{profile:t}),i==="Permissions"&&d.jsx(nk,{permissions:r})]}):d.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Agent not found"})}function J2({profile:e}){const t=e.skills??[];return d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs(Et,{children:[d.jsx(Ot,{children:d.jsx(Ft,{className:"text-sm",children:"Info"})}),d.jsxs(kt,{className:"space-y-2 text-sm",children:[d.jsx(Lo,{label:"Owner",value:e.ownerName||"—"}),d.jsx(Lo,{label:"Creature",value:e.creature||"—"}),d.jsx(Lo,{label:"Vibe",value:e.vibe||"—"}),d.jsx(Lo,{label:"Sessions",value:String(e.sessionCount??0)}),d.jsx(Lo,{label:"Last Active",value:e.lastActive??"never"})]})]}),d.jsxs(Et,{children:[d.jsx(Ot,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs(Ft,{className:"flex items-center gap-2 text-sm",children:[d.jsx(Oy,{className:"h-4 w-4"})," Skills (",t.length,")"]}),d.jsx(eo,{to:"/ops/skills",children:d.jsxs(Re,{size:"sm",variant:"ghost",className:"h-7 text-xs text-muted-foreground",children:["Manage ",d.jsx(j2,{className:"ml-1 h-3 w-3"})]})})]})}),d.jsx(kt,{children:t.length===0?d.jsxs("div",{className:"flex flex-col items-center gap-2 py-4",children:[d.jsx(er,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No skills installed"}),d.jsx(eo,{to:"/ops/skills",children:d.jsx(Re,{size:"sm",variant:"ghost",className:"h-7 text-xs",children:"Go to Operations to install skills"})})]}):d.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.map(n=>d.jsxs(Ve,{variant:"secondary",className:"text-xs font-normal",children:[d.jsx(er,{className:"mr-1 h-3 w-3"})," ",n.name]},n.name))})})]}),d.jsxs(Et,{children:[d.jsx(Ot,{children:d.jsx(Ft,{className:"text-sm",children:"Plugins"})}),d.jsx(kt,{children:(e.plugins??[]).length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins"}):d.jsx("div",{className:"space-y-1.5",children:(e.plugins??[]).map(n=>d.jsxs("div",{className:"flex items-center justify-between text-sm",children:[d.jsx("span",{children:n.name}),d.jsx(Ve,{variant:n.enabled?"success":"secondary",className:"text-[10px]",children:n.enabled?"on":"off"})]},n.name))})})]}),d.jsxs(Et,{children:[d.jsx(Ot,{children:d.jsx(Ft,{className:"text-sm",children:"Connected Systems"})}),d.jsx(kt,{children:(e.connectedSystems??[]).length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"None"}):d.jsx("div",{className:"flex flex-wrap gap-1.5",children:(e.connectedSystems??[]).map(n=>d.jsx(Ve,{variant:"outline",className:"text-xs",children:n},n))})})]})]})}function ek({profile:e}){const t=e.cronJobs??[];return d.jsxs(Et,{children:[d.jsx(Ot,{children:d.jsxs(Ft,{className:"flex items-center gap-2 text-sm",children:[d.jsx(_2,{className:"h-4 w-4"})," Scheduled Tasks (",t.length,")"]})}),d.jsx(kt,{children:t.length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No scheduled tasks"}):d.jsx("div",{className:"space-y-2",children:t.map((n,r)=>d.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border px-3 py-2 text-sm",children:[d.jsxs("div",{children:[d.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:n.schedule}),d.jsx("span",{className:"ml-2",children:n.task??n.id})]}),d.jsx(Ve,{variant:n.enabled!==!1?"success":"secondary",className:"text-[10px]",children:n.enabled!==!1?"active":"paused"})]},r))})})]})}function tk({profile:e}){const t=e.workspaceFiles??{},n=[{label:"SOUL.md",content:t.soul},{label:"IDENTITY.md",content:t.identity},{label:"USER.md",content:t.user}].filter(r=>r.content);return d.jsx("div",{className:"space-y-4",children:n.length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No identity files found"}):n.map(r=>d.jsxs(Et,{children:[d.jsx(Ot,{children:d.jsxs(Ft,{className:"flex items-center gap-2 text-sm",children:[d.jsx(Ad,{className:"h-4 w-4"})," ",r.label]})}),d.jsx(kt,{children:d.jsx("pre",{className:"max-h-60 overflow-auto whitespace-pre-wrap rounded-md bg-muted p-3 font-mono text-xs text-muted-foreground",children:r.content})})]},r.label))})}function nk({permissions:e}){return e.length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"No observed permissions"}):d.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[d.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Tool"}),d.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Category"}),d.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Access"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-muted-foreground",children:"Calls"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-muted-foreground",children:"Errors"})]})}),d.jsx("tbody",{children:e.map(t=>d.jsxs("tr",{className:"border-b border-border last:border-0",children:[d.jsx("td",{className:"px-4 py-2.5 font-mono text-xs",children:t.toolName}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(Ve,{variant:"outline",className:"text-[10px]",children:t.category??"—"})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(Ve,{variant:t.accessPattern==="write"?"warning":t.accessPattern==="admin"?"destructive":"secondary",className:"text-[10px]",children:t.accessPattern??"read"})}),d.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs",children:t.callCount}),d.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs text-destructive",children:t.errorCount||"—"})]},t.id))})]})})}function Lo({label:e,value:t}){return d.jsxs("div",{className:"flex justify-between",children:[d.jsx("span",{className:"text-muted-foreground",children:e}),d.jsx("span",{className:"font-medium",children:t})]})}function rk(){const[e,t]=y.useState([]),[n,r]=y.useState(!0),[o,i]=y.useState(new Set);y.useEffect(()=>{Je.discovery.agents().then(a=>{t(a.data??[]),r(!1)}).catch(()=>r(!1))},[]);const s=[{category:"Agents",items:e.map(a=>({id:a.id,name:a.name,emoji:a.emoji,provider:a.provider,status:a.status}))},{category:"Owners",items:[...new Set(e.map(a=>a.ownerName).filter(Boolean))].map(a=>({id:a,name:a,type:"owner"}))},{category:"Connected Systems",items:[...new Set(e.flatMap(a=>a.connectedSystems??[]))].map(a=>({id:a,name:a,type:"system"}))}],l=a=>{i(u=>{const f=new Set(u);return f.has(a)?f.delete(a):f.add(a),f})};return n?d.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Identities"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Agents, owners, and connected systems"})]}),d.jsx("div",{className:"space-y-3",children:s.map(a=>d.jsxs(Et,{children:[d.jsxs("button",{onClick:()=>l(a.category),className:"flex w-full items-center justify-between p-4 text-left",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Ay,{className:"h-4 w-4 text-muted-foreground"}),d.jsx("span",{className:"text-sm font-medium",children:a.category}),d.jsx(Ve,{variant:"secondary",className:"text-[10px]",children:a.items.length})]}),o.has(a.category)?d.jsx(Ty,{className:"h-4 w-4 text-muted-foreground"}):d.jsx(Ly,{className:"h-4 w-4 text-muted-foreground"})]}),o.has(a.category)&&d.jsx(kt,{className:"border-t border-border pt-3",children:a.items.length===0?d.jsx("p",{className:"text-sm text-muted-foreground",children:"None"}):d.jsx("div",{className:"space-y-1.5",children:a.items.map(u=>d.jsxs("div",{className:"flex items-center justify-between rounded-md px-3 py-2 text-sm hover:bg-muted/50",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[u.emoji&&d.jsx("span",{className:"text-base",children:u.emoji}),d.jsx("span",{children:u.name})]}),u.status&&d.jsx(Ve,{variant:u.status==="active"?"success":"secondary",className:"text-[10px]",children:u.status}),u.type&&d.jsx(Ve,{variant:"outline",className:"text-[10px]",children:u.type})]},u.id))})})]},a.category))})]})}function ok(){const[e,t]=y.useState([]),[n,r]=y.useState(""),[o,i]=y.useState("callCount"),[s,l]=y.useState(!1),[a,u]=y.useState(!0);y.useEffect(()=>{Je.observations.permissions().then(h=>{t(h.data??[]),u(!1)}).catch(()=>u(!1))},[]);const f=y.useMemo(()=>{let h=e;if(n){const v=n.toLowerCase();h=h.filter(x=>{var w,S;return((w=x.toolName)==null?void 0:w.toLowerCase().includes(v))||((S=x.category)==null?void 0:S.toLowerCase().includes(v))})}return[...h].sort((v,x)=>{const w=v[o]??0,S=x[o]??0;return typeof w=="string"?s?w.localeCompare(S):S.localeCompare(w):s?w-S:S-w})},[e,n,o,s]),c=h=>{o===h?l(!s):(i(h),l(!1))};return a?d.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Permissions"}),d.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[e.length," observed tool permission",e.length!==1?"s":""]})]}),d.jsxs("div",{className:"relative max-w-sm",children:[d.jsx(zy,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),d.jsx($n,{placeholder:"Filter by tool or category...",className:"pl-9",value:n,onChange:h=>r(h.target.value)})]}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[d.jsx(Ga,{label:"Tool",sortKey:"toolName",current:o,asc:s,onSort:c}),d.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Category"}),d.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Access"}),d.jsx(Ga,{label:"Calls",sortKey:"callCount",current:o,asc:s,onSort:c,align:"right"}),d.jsx(Ga,{label:"Errors",sortKey:"errorCount",current:o,asc:s,onSort:c,align:"right"})]})}),d.jsx("tbody",{children:f.length===0?d.jsx("tr",{children:d.jsx("td",{colSpan:5,className:"px-4 py-8 text-center text-muted-foreground",children:"No permissions"})}):f.map(h=>d.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30",children:[d.jsx("td",{className:"px-4 py-2.5 font-mono text-xs",children:h.toolName}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(Ve,{variant:"outline",className:"text-[10px]",children:h.category??"—"})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(Ve,{variant:h.accessPattern==="write"?"warning":h.accessPattern==="admin"?"destructive":"secondary",className:"text-[10px]",children:h.accessPattern??"read"})}),d.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs",children:h.callCount}),d.jsx("td",{className:"px-4 py-2.5 text-right font-mono text-xs text-destructive",children:h.errorCount||"—"})]},h.id))})]})})]})}function Ga({label:e,sortKey:t,current:n,asc:r,onSort:o,align:i="left"}){return d.jsx("th",{className:`cursor-pointer px-4 py-2.5 font-medium text-muted-foreground hover:text-foreground ${i==="right"?"text-right":"text-left"}`,onClick:()=>o(t),children:d.jsxs("span",{className:"inline-flex items-center gap-1",children:[e,n===t&&d.jsx(E2,{className:"h-3 w-3"})]})})}function ik(){const[e,t]=y.useState([]),[n,r]=y.useState(!0);y.useEffect(()=>{Je.observations.anomalies().then(s=>{t(s.data??[]),r(!1)}).catch(()=>r(!1))},[]);const o=s=>s.blocked||s.errorCount>3?"high":s.callCount===1||s.errorCount>0?"medium":"low",i=s=>s==="high"?"destructive":s==="medium"?"warning":"secondary";return n?d.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Risk Overview"}),d.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[e.length," anomal",e.length!==1?"ies":"y"," detected"]})]}),e.length===0?d.jsxs("div",{className:"flex h-40 flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border",children:[d.jsx($y,{className:"h-8 w-8 text-muted-foreground/50"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No anomalies detected"})]}):d.jsx("div",{className:"overflow-x-auto rounded-lg border border-border",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"border-b border-border bg-muted/50",children:[d.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Tool"}),d.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Agent"}),d.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Risk"}),d.jsx("th",{className:"px-4 py-2.5 text-left font-medium text-muted-foreground",children:"Category"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-muted-foreground",children:"First Seen"})]})}),d.jsx("tbody",{children:e.map(s=>{var a;const l=o(s);return d.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30",children:[d.jsx("td",{className:"px-4 py-2.5 font-mono text-xs",children:s.toolName}),d.jsx("td",{className:"px-4 py-2.5 text-xs text-muted-foreground",children:((a=s.agentId)==null?void 0:a.slice(0,8))??"—"}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(Ve,{variant:i(l),className:"text-[10px]",children:l})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(Ve,{variant:"outline",className:"text-[10px]",children:s.category??"—"})}),d.jsx("td",{className:"px-4 py-2.5 text-right text-xs text-muted-foreground",children:s.firstSeen?new Date(s.firstSeen).toLocaleDateString():"—"})]},s.id)})})]})})]})}function Ce(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=Ce(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var sk={value:()=>{}};function Zl(){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 zs(n)}function zs(e){this._=e}function lk(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}})}zs.prototype=Zl.prototype={constructor:zs,on:function(e,t){var n=this._,r=lk(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=ak(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]=Oh(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Oh(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 zs(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 ak(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Oh(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=sk,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var hc="http://www.w3.org/1999/xhtml";const Fh={svg:"http://www.w3.org/2000/svg",xhtml:hc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Jl(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Fh.hasOwnProperty(t)?{space:Fh[t],local:e}:e}function uk(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===hc&&t.documentElement.namespaceURI===hc?t.createElement(e):t.createElementNS(n,e)}}function ck(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Hy(e){var t=Jl(e);return(t.local?ck:uk)(t)}function dk(){}function Dd(e){return e==null?dk:function(){return this.querySelector(e)}}function fk(e){typeof e!="function"&&(e=Dd(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 it(r,this._parents)}function hk(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function pk(){return[]}function Vy(e){return e==null?pk:function(){return this.querySelectorAll(e)}}function mk(e){return function(){return hk(e.apply(this,arguments))}}function gk(e){typeof e=="function"?e=mk(e):e=Vy(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 it(r,o)}function Uy(e){return function(){return this.matches(e)}}function Wy(e){return function(t){return t.matches(e)}}var yk=Array.prototype.find;function vk(e){return function(){return yk.call(this.children,e)}}function xk(){return this.firstElementChild}function wk(e){return this.select(e==null?xk:vk(typeof e=="function"?e:Wy(e)))}var Sk=Array.prototype.filter;function Nk(){return Array.from(this.children)}function Ek(e){return function(){return Sk.call(this.children,e)}}function kk(e){return this.selectAll(e==null?Nk:Ek(typeof e=="function"?e:Wy(e)))}function Ck(e){typeof e!="function"&&(e=Uy(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 it(r,this._parents)}function Yy(e){return new Array(e.length)}function bk(){return new it(this._enter||this._groups.map(Yy),this._parents)}function yl(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}yl.prototype={constructor:yl,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 _k(e){return function(){return e}}function jk(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 yl(e,i[s]);for(;s<a;++s)(l=t[s])&&(o[s]=l)}function Pk(e,t,n,r,o,i,s){var l,a,u=new Map,f=t.length,c=i.length,h=new Array(f),v;for(l=0;l<f;++l)(a=t[l])&&(h[l]=v=s.call(a,a.__data__,l,t)+"",u.has(v)?o[l]=a:u.set(v,a));for(l=0;l<c;++l)v=s.call(e,i[l],l,i)+"",(a=u.get(v))?(r[l]=a,a.__data__=i[l],u.delete(v)):n[l]=new yl(e,i[l]);for(l=0;l<f;++l)(a=t[l])&&u.get(h[l])===a&&(o[l]=a)}function Mk(e){return e.__data__}function Rk(e,t){if(!arguments.length)return Array.from(this,Mk);var n=t?Pk:jk,r=this._parents,o=this._groups;typeof e!="function"&&(e=_k(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],h=c.length,v=Ik(e.call(f,f&&f.__data__,u,r)),x=v.length,w=l[u]=new Array(x),S=s[u]=new Array(x),p=a[u]=new Array(h);n(f,c,w,S,p,v,t);for(var g=0,m=0,N,E;g<x;++g)if(N=w[g]){for(g>=m&&(m=g+1);!(E=S[m])&&++m<x;);N._next=E||null}}return s=new it(s,r),s._enter=l,s._exit=a,s}function Ik(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Tk(){return new it(this._exit||this._groups.map(Yy),this._parents)}function Lk(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 Ak(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,h=l[a]=new Array(c),v,x=0;x<c;++x)(v=u[x]||f[x])&&(h[x]=v);for(;a<o;++a)l[a]=n[a];return new it(l,this._parents)}function Dk(){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 zk(e){e||(e=$k);function t(c,h){return c&&h?e(c.__data__,h.__data__):!c-!h}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 it(o,this._parents).order()}function $k(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ok(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Fk(){return Array.from(this)}function Bk(){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 Hk(){let e=0;for(const t of this)++e;return e}function Vk(){return!this.node()}function Uk(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 Wk(e){return function(){this.removeAttribute(e)}}function Yk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Xk(e,t){return function(){this.setAttribute(e,t)}}function Gk(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Kk(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Qk(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function qk(e,t){var n=Jl(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?Yk:Wk:typeof t=="function"?n.local?Qk:Kk:n.local?Gk:Xk)(n,t))}function Xy(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Zk(e){return function(){this.style.removeProperty(e)}}function Jk(e,t,n){return function(){this.style.setProperty(e,t,n)}}function eC(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function tC(e,t,n){return arguments.length>1?this.each((t==null?Zk:typeof t=="function"?eC:Jk)(e,t,n??"")):ro(this.node(),e)}function ro(e,t){return e.style.getPropertyValue(t)||Xy(e).getComputedStyle(e,null).getPropertyValue(t)}function nC(e){return function(){delete this[e]}}function rC(e,t){return function(){this[e]=t}}function oC(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function iC(e,t){return arguments.length>1?this.each((t==null?nC:typeof t=="function"?oC:rC)(e,t)):this.node()[e]}function Gy(e){return e.trim().split(/^|\s+/)}function zd(e){return e.classList||new Ky(e)}function Ky(e){this._node=e,this._names=Gy(e.getAttribute("class")||"")}Ky.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 Qy(e,t){for(var n=zd(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function qy(e,t){for(var n=zd(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function sC(e){return function(){Qy(this,e)}}function lC(e){return function(){qy(this,e)}}function aC(e,t){return function(){(t.apply(this,arguments)?Qy:qy)(this,e)}}function uC(e,t){var n=Gy(e+"");if(arguments.length<2){for(var r=zd(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?aC:t?sC:lC)(n,t))}function cC(){this.textContent=""}function dC(e){return function(){this.textContent=e}}function fC(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function hC(e){return arguments.length?this.each(e==null?cC:(typeof e=="function"?fC:dC)(e)):this.node().textContent}function pC(){this.innerHTML=""}function mC(e){return function(){this.innerHTML=e}}function gC(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function yC(e){return arguments.length?this.each(e==null?pC:(typeof e=="function"?gC:mC)(e)):this.node().innerHTML}function vC(){this.nextSibling&&this.parentNode.appendChild(this)}function xC(){return this.each(vC)}function wC(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function SC(){return this.each(wC)}function NC(e){var t=typeof e=="function"?e:Hy(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function EC(){return null}function kC(e,t){var n=typeof e=="function"?e:Hy(e),r=t==null?EC:typeof t=="function"?t:Dd(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function CC(){var e=this.parentNode;e&&e.removeChild(this)}function bC(){return this.each(CC)}function _C(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function jC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function PC(e){return this.select(e?jC:_C)}function MC(e){return arguments.length?this.property("__data__",e):this.node().__data__}function RC(e){return function(t){e.call(this,t,this.__data__)}}function IC(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 TC(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 LC(e,t,n){return function(){var r=this.__on,o,i=RC(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 AC(e,t,n){var r=IC(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?LC:TC,o=0;o<i;++o)this.each(l(r[o],t,n));return this}function Zy(e,t,n){var r=Xy(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 DC(e,t){return function(){return Zy(this,e,t)}}function zC(e,t){return function(){return Zy(this,e,t.apply(this,arguments))}}function $C(e,t){return this.each((typeof t=="function"?zC:DC)(e,t))}function*OC(){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 Jy=[null];function it(e,t){this._groups=e,this._parents=t}function Ai(){return new it([[document.documentElement]],Jy)}function FC(){return this}it.prototype=Ai.prototype={constructor:it,select:fk,selectAll:gk,selectChild:wk,selectChildren:kk,filter:Ck,data:Rk,enter:bk,exit:Tk,join:Lk,merge:Ak,selection:FC,order:Dk,sort:zk,call:Ok,nodes:Fk,node:Bk,size:Hk,empty:Vk,each:Uk,attr:qk,style:tC,property:iC,classed:uC,text:hC,html:yC,raise:xC,lower:SC,append:NC,insert:kC,remove:bC,clone:PC,datum:MC,on:AC,dispatch:$C,[Symbol.iterator]:OC};function tt(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],Jy)}function BC(e){let t;for(;t=e.sourceEvent;)e=t;return e}function wt(e,t){if(e=BC(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 HC={passive:!1},xi={capture:!0,passive:!1};function Ka(e){e.stopImmediatePropagation()}function Br(e){e.preventDefault(),e.stopImmediatePropagation()}function ev(e){var t=e.document.documentElement,n=tt(e).on("dragstart.drag",Br,xi);"onselectstart"in t?n.on("selectstart.drag",Br,xi):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function tv(e,t){var n=e.document.documentElement,r=tt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Br,xi),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 us=e=>()=>e;function pc(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}})}pc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function VC(e){return!e.ctrlKey&&!e.button}function UC(){return this.parentNode}function WC(e,t){return t??{x:e.x,y:e.y}}function YC(){return navigator.maxTouchPoints||"ontouchstart"in this}function nv(){var e=VC,t=UC,n=WC,r=YC,o={},i=Zl("start","drag","end"),s=0,l,a,u,f,c=0;function h(N){N.on("mousedown.drag",v).filter(r).on("touchstart.drag",S).on("touchmove.drag",p,HC).on("touchend.drag touchcancel.drag",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(N,E){if(!(f||!e.call(this,N,E))){var C=m(this,t.call(this,N,E),N,E,"mouse");C&&(tt(N.view).on("mousemove.drag",x,xi).on("mouseup.drag",w,xi),ev(N.view),Ka(N),u=!1,l=N.clientX,a=N.clientY,C("start",N))}}function x(N){if(Br(N),!u){var E=N.clientX-l,C=N.clientY-a;u=E*E+C*C>c}o.mouse("drag",N)}function w(N){tt(N.view).on("mousemove.drag mouseup.drag",null),tv(N.view,u),Br(N),o.mouse("end",N)}function S(N,E){if(e.call(this,N,E)){var C=N.changedTouches,k=t.call(this,N,E),j=C.length,R,z;for(R=0;R<j;++R)(z=m(this,k,N,E,C[R].identifier,C[R]))&&(Ka(N),z("start",N,C[R]))}}function p(N){var E=N.changedTouches,C=E.length,k,j;for(k=0;k<C;++k)(j=o[E[k].identifier])&&(Br(N),j("drag",N,E[k]))}function g(N){var E=N.changedTouches,C=E.length,k,j;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),k=0;k<C;++k)(j=o[E[k].identifier])&&(Ka(N),j("end",N,E[k]))}function m(N,E,C,k,j,R){var z=i.copy(),T=wt(R||C,E),I,F,_;if((_=n.call(N,new pc("beforestart",{sourceEvent:C,target:h,identifier:j,active:s,x:T[0],y:T[1],dx:0,dy:0,dispatch:z}),k))!=null)return I=_.x-T[0]||0,F=_.y-T[1]||0,function A(M,D,b){var P=T,L;switch(M){case"start":o[j]=A,L=s++;break;case"end":delete o[j],--s;case"drag":T=wt(b||D,E),L=s;break}z.call(M,N,new pc(M,{sourceEvent:D,subject:_,target:h,identifier:j,active:L,x:T[0]+I,y:T[1]+F,dx:T[0]-P[0],dy:T[1]-P[1],dispatch:z}),k)}}return h.filter=function(N){return arguments.length?(e=typeof N=="function"?N:us(!!N),h):e},h.container=function(N){return arguments.length?(t=typeof N=="function"?N:us(N),h):t},h.subject=function(N){return arguments.length?(n=typeof N=="function"?N:us(N),h):n},h.touchable=function(N){return arguments.length?(r=typeof N=="function"?N:us(!!N),h):r},h.on=function(){var N=i.on.apply(i,arguments);return N===i?h:N},h.clickDistance=function(N){return arguments.length?(c=(N=+N)*N,h):Math.sqrt(c)},h}function $d(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function rv(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Di(){}var wi=.7,vl=1/wi,Hr="\\s*([+-]?\\d+)\\s*",Si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Vt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",XC=/^#([0-9a-f]{3,8})$/,GC=new RegExp(`^rgb\\(${Hr},${Hr},${Hr}\\)$`),KC=new RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`),QC=new RegExp(`^rgba\\(${Hr},${Hr},${Hr},${Si}\\)$`),qC=new RegExp(`^rgba\\(${Vt},${Vt},${Vt},${Si}\\)$`),ZC=new RegExp(`^hsl\\(${Si},${Vt},${Vt}\\)$`),JC=new RegExp(`^hsla\\(${Si},${Vt},${Vt},${Si}\\)$`),Bh={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};$d(Di,ar,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Hh,formatHex:Hh,formatHex8:eb,formatHsl:tb,formatRgb:Vh,toString:Vh});function Hh(){return this.rgb().formatHex()}function eb(){return this.rgb().formatHex8()}function tb(){return ov(this).formatHsl()}function Vh(){return this.rgb().formatRgb()}function ar(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=XC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Uh(t):n===3?new Ke(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cs(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cs(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=GC.exec(e))?new Ke(t[1],t[2],t[3],1):(t=KC.exec(e))?new Ke(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=QC.exec(e))?cs(t[1],t[2],t[3],t[4]):(t=qC.exec(e))?cs(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ZC.exec(e))?Xh(t[1],t[2]/100,t[3]/100,1):(t=JC.exec(e))?Xh(t[1],t[2]/100,t[3]/100,t[4]):Bh.hasOwnProperty(e)?Uh(Bh[e]):e==="transparent"?new Ke(NaN,NaN,NaN,0):null}function Uh(e){return new Ke(e>>16&255,e>>8&255,e&255,1)}function cs(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ke(e,t,n,r)}function nb(e){return e instanceof Di||(e=ar(e)),e?(e=e.rgb(),new Ke(e.r,e.g,e.b,e.opacity)):new Ke}function mc(e,t,n,r){return arguments.length===1?nb(e):new Ke(e,t,n,r??1)}function Ke(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}$d(Ke,mc,rv(Di,{brighter(e){return e=e==null?vl:Math.pow(vl,e),new Ke(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?wi:Math.pow(wi,e),new Ke(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ke(tr(this.r),tr(this.g),tr(this.b),xl(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:Wh,formatHex:Wh,formatHex8:rb,formatRgb:Yh,toString:Yh}));function Wh(){return`#${qn(this.r)}${qn(this.g)}${qn(this.b)}`}function rb(){return`#${qn(this.r)}${qn(this.g)}${qn(this.b)}${qn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Yh(){const e=xl(this.opacity);return`${e===1?"rgb(":"rgba("}${tr(this.r)}, ${tr(this.g)}, ${tr(this.b)}${e===1?")":`, ${e})`}`}function xl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qn(e){return e=tr(e),(e<16?"0":"")+e.toString(16)}function Xh(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Nt(e,t,n,r)}function ov(e){if(e instanceof Nt)return new Nt(e.h,e.s,e.l,e.opacity);if(e instanceof Di||(e=ar(e)),!e)return new Nt;if(e instanceof Nt)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 Nt(s,l,a,e.opacity)}function ob(e,t,n,r){return arguments.length===1?ov(e):new Nt(e,t,n,r??1)}function Nt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}$d(Nt,ob,rv(Di,{brighter(e){return e=e==null?vl:Math.pow(vl,e),new Nt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?wi:Math.pow(wi,e),new Nt(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 Ke(Qa(e>=240?e-240:e+120,o,r),Qa(e,o,r),Qa(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Nt(Gh(this.h),ds(this.s),ds(this.l),xl(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=xl(this.opacity);return`${e===1?"hsl(":"hsla("}${Gh(this.h)}, ${ds(this.s)*100}%, ${ds(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Gh(e){return e=(e||0)%360,e<0?e+360:e}function ds(e){return Math.max(0,Math.min(1,e||0))}function Qa(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 Od=e=>()=>e;function ib(e,t){return function(n){return e+n*t}}function sb(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 lb(e){return(e=+e)==1?iv:function(t,n){return n-t?sb(t,n,e):Od(isNaN(t)?n:t)}}function iv(e,t){var n=t-e;return n?ib(e,n):Od(isNaN(e)?t:e)}const wl=function e(t){var n=lb(t);function r(o,i){var s=n((o=mc(o)).r,(i=mc(i)).r),l=n(o.g,i.g),a=n(o.b,i.b),u=iv(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 ab(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 ub(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cb(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]=Zo(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 db(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Dt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function fb(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]=Zo(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var gc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qa=new RegExp(gc.source,"g");function hb(e){return function(){return e}}function pb(e){return function(t){return e(t)+""}}function sv(e,t){var n=gc.lastIndex=qa.lastIndex=0,r,o,i,s=-1,l=[],a=[];for(e=e+"",t=t+"";(r=gc.exec(e))&&(o=qa.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:Dt(r,o)})),n=qa.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?a[0]?pb(a[0].x):hb(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 Zo(e,t){var n=typeof t,r;return t==null||n==="boolean"?Od(t):(n==="number"?Dt:n==="string"?(r=ar(t))?(t=r,wl):sv:t instanceof ar?wl:t instanceof Date?db:ub(t)?ab:Array.isArray(t)?cb:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?fb:Dt)(e,t)}var Kh=180/Math.PI,yc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lv(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)*Kh,skewX:Math.atan(a)*Kh,scaleX:s,scaleY:l}}var fs;function mb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?yc:lv(t.a,t.b,t.c,t.d,t.e,t.f)}function gb(e){return e==null||(fs||(fs=document.createElementNS("http://www.w3.org/2000/svg","g")),fs.setAttribute("transform",e),!(e=fs.transform.baseVal.consolidate()))?yc:(e=e.matrix,lv(e.a,e.b,e.c,e.d,e.e,e.f))}function av(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,f,c,h,v,x){if(u!==c||f!==h){var w=v.push("translate(",null,t,null,n);x.push({i:w-4,x:Dt(u,c)},{i:w-2,x:Dt(f,h)})}else(c||h)&&v.push("translate("+c+t+h+n)}function s(u,f,c,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:c.push(o(c)+"rotate(",null,r)-2,x:Dt(u,f)})):f&&c.push(o(c)+"rotate("+f+r)}function l(u,f,c,h){u!==f?h.push({i:c.push(o(c)+"skewX(",null,r)-2,x:Dt(u,f)}):f&&c.push(o(c)+"skewX("+f+r)}function a(u,f,c,h,v,x){if(u!==c||f!==h){var w=v.push(o(v)+"scale(",null,",",null,")");x.push({i:w-4,x:Dt(u,c)},{i:w-2,x:Dt(f,h)})}else(c!==1||h!==1)&&v.push(o(v)+"scale("+c+","+h+")")}return function(u,f){var c=[],h=[];return u=e(u),f=e(f),i(u.translateX,u.translateY,f.translateX,f.translateY,c,h),s(u.rotate,f.rotate,c,h),l(u.skewX,f.skewX,c,h),a(u.scaleX,u.scaleY,f.scaleX,f.scaleY,c,h),u=f=null,function(v){for(var x=-1,w=h.length,S;++x<w;)c[(S=h[x]).i]=S.x(v);return c.join("")}}}var yb=av(mb,"px, ","px)","deg)"),vb=av(gb,", ",")",")"),xb=1e-12;function Qh(e){return((e=Math.exp(e))+1/e)/2}function wb(e){return((e=Math.exp(e))-1/e)/2}function Sb(e){return((e=Math.exp(2*e))-1)/(e+1)}const $s=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],h=s[2],v=f-l,x=c-a,w=v*v+x*x,S,p;if(w<xb)p=Math.log(h/u)/t,S=function(k){return[l+k*v,a+k*x,u*Math.exp(t*k*p)]};else{var g=Math.sqrt(w),m=(h*h-u*u+r*w)/(2*u*n*g),N=(h*h-u*u-r*w)/(2*h*n*g),E=Math.log(Math.sqrt(m*m+1)-m),C=Math.log(Math.sqrt(N*N+1)-N);p=(C-E)/t,S=function(k){var j=k*p,R=Qh(E),z=u/(n*g)*(R*Sb(t*j+E)-wb(E));return[l+z*v,a+z*x,u*R/Qh(t*j+E)]}}return S.duration=p*1e3*t/Math.SQRT2,S}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 oo=0,Bo=0,Ao=0,uv=1e3,Sl,Ho,Nl=0,ur=0,ea=0,Ni=typeof performance=="object"&&performance.now?performance:Date,cv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Fd(){return ur||(cv(Nb),ur=Ni.now()+ea)}function Nb(){ur=0}function El(){this._call=this._time=this._next=null}El.prototype=dv.prototype={constructor:El,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Fd():+n)+(t==null?0:+t),!this._next&&Ho!==this&&(Ho?Ho._next=this:Sl=this,Ho=this),this._call=e,this._time=n,vc()},stop:function(){this._call&&(this._call=null,this._time=1/0,vc())}};function dv(e,t,n){var r=new El;return r.restart(e,t,n),r}function Eb(){Fd(),++oo;for(var e=Sl,t;e;)(t=ur-e._time)>=0&&e._call.call(void 0,t),e=e._next;--oo}function qh(){ur=(Nl=Ni.now())+ea,oo=Bo=0;try{Eb()}finally{oo=0,Cb(),ur=0}}function kb(){var e=Ni.now(),t=e-Nl;t>uv&&(ea-=t,Nl=e)}function Cb(){for(var e,t=Sl,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:Sl=n);Ho=e,vc(r)}function vc(e){if(!oo){Bo&&(Bo=clearTimeout(Bo));var t=e-ur;t>24?(e<1/0&&(Bo=setTimeout(qh,e-Ni.now()-ea)),Ao&&(Ao=clearInterval(Ao))):(Ao||(Nl=Ni.now(),Ao=setInterval(kb,uv)),oo=1,cv(qh))}}function Zh(e,t,n){var r=new El;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var bb=Zl("start","end","cancel","interrupt"),_b=[],fv=0,Jh=1,xc=2,Os=3,ep=4,wc=5,Fs=6;function ta(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;jb(e,n,{name:t,index:r,group:o,on:bb,tween:_b,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:fv})}function Bd(e,t){var n=Rt(e,t);if(n.state>fv)throw new Error("too late; already scheduled");return n}function Xt(e,t){var n=Rt(e,t);if(n.state>Os)throw new Error("too late; already running");return n}function Rt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function jb(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=dv(i,0,n.time);function i(u){n.state=Jh,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var f,c,h,v;if(n.state!==Jh)return a();for(f in r)if(v=r[f],v.name===n.name){if(v.state===Os)return Zh(s);v.state===ep?(v.state=Fs,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete r[f]):+f<t&&(v.state=Fs,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete r[f])}if(Zh(function(){n.state===Os&&(n.state=ep,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=xc,n.on.call("start",e,e.__data__,n.index,n.group),n.state===xc){for(n.state=Os,o=new Array(h=n.tween.length),f=0,c=-1;f<h;++f)(v=n.tween[f].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=v);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=wc,1),c=-1,h=o.length;++c<h;)o[c].call(e,f);n.state===wc&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=Fs,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Bs(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>xc&&r.state<wc,r.state=Fs,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function Pb(e){return this.each(function(){Bs(this,e)})}function Mb(e,t){var n,r;return function(){var o=Xt(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 Rb(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Xt(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 Ib(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Rt(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?Mb:Rb)(n,e,t))}function Hd(e,t,n){var r=e._id;return e.each(function(){var o=Xt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Rt(o,r).value[t]}}function hv(e,t){var n;return(typeof t=="number"?Dt:t instanceof ar?wl:(n=ar(t))?(t=n,wl):sv)(e,t)}function Tb(e){return function(){this.removeAttribute(e)}}function Lb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ab(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 Db(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 zb(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 $b(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 Ob(e,t){var n=Jl(e),r=n==="transform"?vb:hv;return this.attrTween(e,typeof t=="function"?(n.local?$b:zb)(n,r,Hd(this,"attr."+e,t)):t==null?(n.local?Lb:Tb)(n):(n.local?Db:Ab)(n,r,t))}function Fb(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Bb(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Hb(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Bb(e,i)),n}return o._value=t,o}function Vb(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Fb(e,i)),n}return o._value=t,o}function Ub(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=Jl(e);return this.tween(n,(r.local?Hb:Vb)(r,t))}function Wb(e,t){return function(){Bd(this,e).delay=+t.apply(this,arguments)}}function Yb(e,t){return t=+t,function(){Bd(this,e).delay=t}}function Xb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Wb:Yb)(t,e)):Rt(this.node(),t).delay}function Gb(e,t){return function(){Xt(this,e).duration=+t.apply(this,arguments)}}function Kb(e,t){return t=+t,function(){Xt(this,e).duration=t}}function Qb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Gb:Kb)(t,e)):Rt(this.node(),t).duration}function qb(e,t){if(typeof t!="function")throw new Error;return function(){Xt(this,e).ease=t}}function Zb(e){var t=this._id;return arguments.length?this.each(qb(t,e)):Rt(this.node(),t).ease}function Jb(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Xt(this,e).ease=n}}function e_(e){if(typeof e!="function")throw new Error;return this.each(Jb(this._id,e))}function t_(e){typeof e!="function"&&(e=Uy(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 un(r,this._parents,this._name,this._id)}function n_(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),h,v=0;v<f;++v)(h=a[v]||u[v])&&(c[v]=h);for(;l<r;++l)s[l]=t[l];return new un(s,this._parents,this._name,this._id)}function r_(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 o_(e,t,n){var r,o,i=r_(t)?Bd:Xt;return function(){var s=i(this,e),l=s.on;l!==r&&(o=(r=l).copy()).on(t,n),s.on=o}}function i_(e,t){var n=this._id;return arguments.length<2?Rt(this.node(),n).on.on(e):this.each(o_(n,e,t))}function s_(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function l_(){return this.on("end.remove",s_(this._id))}function a_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Dd(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,h=0;h<a;++h)(f=l[h])&&(c=e.call(f,f.__data__,h,l))&&("__data__"in f&&(c.__data__=f.__data__),u[h]=c,ta(u[h],t,n,h,u,Rt(f,n)));return new un(i,this._parents,t,n)}function u_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Vy(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 h=e.call(f,f.__data__,c,a),v,x=Rt(f,n),w=0,S=h.length;w<S;++w)(v=h[w])&&ta(v,t,n,w,h,x);i.push(h),s.push(f)}return new un(i,s,t,n)}var c_=Ai.prototype.constructor;function d_(){return new c_(this._groups,this._parents)}function f_(e,t){var n,r,o;return function(){var i=ro(this,e),s=(this.style.removeProperty(e),ro(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function pv(e){return function(){this.style.removeProperty(e)}}function h_(e,t,n){var r,o=n+"",i;return function(){var s=ro(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function p_(e,t,n){var r,o,i;return function(){var s=ro(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),ro(this,e))),s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l))}}function m_(e,t){var n,r,o,i="style."+t,s="end."+i,l;return function(){var a=Xt(this,e),u=a.on,f=a.value[i]==null?l||(l=pv(t)):void 0;(u!==n||o!==f)&&(r=(n=u).copy()).on(s,o=f),a.on=r}}function g_(e,t,n){var r=(e+="")=="transform"?yb:hv;return t==null?this.styleTween(e,f_(e,r)).on("end.style."+e,pv(e)):typeof t=="function"?this.styleTween(e,p_(e,r,Hd(this,"style."+e,t))).each(m_(this._id,e)):this.styleTween(e,h_(e,r,t),n).on("end.style."+e,null)}function y_(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function v_(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&y_(e,s,n)),r}return i._value=t,i}function x_(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,v_(e,t,n??""))}function w_(e){return function(){this.textContent=e}}function S_(e){return function(){var t=e(this);this.textContent=t??""}}function N_(e){return this.tween("text",typeof e=="function"?S_(Hd(this,"text",e)):w_(e==null?"":e+""))}function E_(e){return function(t){this.textContent=e.call(this,t)}}function k_(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&E_(o)),t}return r._value=e,r}function C_(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,k_(e))}function b_(){for(var e=this._name,t=this._id,n=mv(),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=Rt(a,t);ta(a,e,n,u,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new un(r,this._parents,e,n)}function __(){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=Xt(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 j_=0;function un(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function mv(){return++j_}var Qt=Ai.prototype;un.prototype={constructor:un,select:a_,selectAll:u_,selectChild:Qt.selectChild,selectChildren:Qt.selectChildren,filter:t_,merge:n_,selection:d_,transition:b_,call:Qt.call,nodes:Qt.nodes,node:Qt.node,size:Qt.size,empty:Qt.empty,each:Qt.each,on:i_,attr:Ob,attrTween:Ub,style:g_,styleTween:x_,text:N_,textTween:C_,remove:l_,tween:Ib,delay:Xb,duration:Qb,ease:Zb,easeVarying:e_,end:__,[Symbol.iterator]:Qt[Symbol.iterator]};function P_(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var M_={time:null,delay:0,duration:250,ease:P_};function R_(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 I_(e){var t,n;e instanceof un?(t=e._id,e=e._name):(t=mv(),(n=M_).time=Fd(),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])&&ta(a,e,t,u,s,n||R_(a,t));return new un(r,this._parents,e,t)}Ai.prototype.interrupt=Pb;Ai.prototype.transition=I_;const hs=e=>()=>e;function T_(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 tn(e,t,n){this.k=e,this.x=t,this.y=n}tn.prototype={constructor:tn,scale:function(e){return e===1?this:new tn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new tn(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 na=new tn(1,0,0);gv.prototype=tn.prototype;function gv(e){for(;!e.__zoom;)if(!(e=e.parentNode))return na;return e.__zoom}function Za(e){e.stopImmediatePropagation()}function Do(e){e.preventDefault(),e.stopImmediatePropagation()}function L_(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function A_(){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 tp(){return this.__zoom||na}function D_(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function z_(){return navigator.maxTouchPoints||"ontouchstart"in this}function $_(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 yv(){var e=L_,t=A_,n=$_,r=D_,o=z_,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=$s,u=Zl("start","zoom","end"),f,c,h,v=500,x=150,w=0,S=10;function p(_){_.property("__zoom",tp).on("wheel.zoom",j,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",z).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(_,A,M,D){var b=_.selection?_.selection():_;b.property("__zoom",tp),_!==b?E(_,A,M,D):b.interrupt().each(function(){C(this,arguments).event(D).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},p.scaleBy=function(_,A,M,D){p.scaleTo(_,function(){var b=this.__zoom.k,P=typeof A=="function"?A.apply(this,arguments):A;return b*P},M,D)},p.scaleTo=function(_,A,M,D){p.transform(_,function(){var b=t.apply(this,arguments),P=this.__zoom,L=M==null?N(b):typeof M=="function"?M.apply(this,arguments):M,O=P.invert(L),$=typeof A=="function"?A.apply(this,arguments):A;return n(m(g(P,$),L,O),b,s)},M,D)},p.translateBy=function(_,A,M,D){p.transform(_,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),s)},null,D)},p.translateTo=function(_,A,M,D,b){p.transform(_,function(){var P=t.apply(this,arguments),L=this.__zoom,O=D==null?N(P):typeof D=="function"?D.apply(this,arguments):D;return n(na.translate(O[0],O[1]).scale(L.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof M=="function"?-M.apply(this,arguments):-M),P,s)},D,b)};function g(_,A){return A=Math.max(i[0],Math.min(i[1],A)),A===_.k?_:new tn(A,_.x,_.y)}function m(_,A,M){var D=A[0]-M[0]*_.k,b=A[1]-M[1]*_.k;return D===_.x&&b===_.y?_:new tn(_.k,D,b)}function N(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function E(_,A,M,D){_.on("start.zoom",function(){C(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(D).end()}).tween("zoom",function(){var b=this,P=arguments,L=C(b,P).event(D),O=t.apply(b,P),$=M==null?N(O):typeof M=="function"?M.apply(b,P):M,U=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),V=b.__zoom,Y=typeof A=="function"?A.apply(b,P):A,X=a(V.invert($).concat(U/V.k),Y.invert($).concat(U/Y.k));return function(G){if(G===1)G=Y;else{var H=X(G),Q=U/H[2];G=new tn(Q,$[0]-H[0]*Q,$[1]-H[1]*Q)}L.zoom(null,G)}})}function C(_,A,M){return!M&&_.__zooming||new k(_,A)}function k(_,A){this.that=_,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(_,A),this.taps=0}k.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,A){return this.mouse&&_!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var A=tt(this.that).datum();u.call(_,this.that,new T_(_,{sourceEvent:this.sourceEvent,target:p,transform:this.that.__zoom,dispatch:u}),A)}};function j(_,...A){if(!e.apply(this,arguments))return;var M=C(this,A).event(_),D=this.__zoom,b=Math.max(i[0],Math.min(i[1],D.k*Math.pow(2,r.apply(this,arguments)))),P=wt(_);if(M.wheel)(M.mouse[0][0]!==P[0]||M.mouse[0][1]!==P[1])&&(M.mouse[1]=D.invert(M.mouse[0]=P)),clearTimeout(M.wheel);else{if(D.k===b)return;M.mouse=[P,D.invert(P)],Bs(this),M.start()}Do(_),M.wheel=setTimeout(L,x),M.zoom("mouse",n(m(g(D,b),M.mouse[0],M.mouse[1]),M.extent,s));function L(){M.wheel=null,M.end()}}function R(_,...A){if(h||!e.apply(this,arguments))return;var M=_.currentTarget,D=C(this,A,!0).event(_),b=tt(_.view).on("mousemove.zoom",$,!0).on("mouseup.zoom",U,!0),P=wt(_,M),L=_.clientX,O=_.clientY;ev(_.view),Za(_),D.mouse=[P,this.__zoom.invert(P)],Bs(this),D.start();function $(V){if(Do(V),!D.moved){var Y=V.clientX-L,X=V.clientY-O;D.moved=Y*Y+X*X>w}D.event(V).zoom("mouse",n(m(D.that.__zoom,D.mouse[0]=wt(V,M),D.mouse[1]),D.extent,s))}function U(V){b.on("mousemove.zoom mouseup.zoom",null),tv(V.view,D.moved),Do(V),D.event(V).end()}}function z(_,...A){if(e.apply(this,arguments)){var M=this.__zoom,D=wt(_.changedTouches?_.changedTouches[0]:_,this),b=M.invert(D),P=M.k*(_.shiftKey?.5:2),L=n(m(g(M,P),D,b),t.apply(this,A),s);Do(_),l>0?tt(this).transition().duration(l).call(E,L,D,_):tt(this).call(p.transform,L,D,_)}}function T(_,...A){if(e.apply(this,arguments)){var M=_.touches,D=M.length,b=C(this,A,_.changedTouches.length===D).event(_),P,L,O,$;for(Za(_),L=0;L<D;++L)O=M[L],$=wt(O,this),$=[$,this.__zoom.invert($),O.identifier],b.touch0?!b.touch1&&b.touch0[2]!==$[2]&&(b.touch1=$,b.taps=0):(b.touch0=$,P=!0,b.taps=1+!!f);f&&(f=clearTimeout(f)),P&&(b.taps<2&&(c=$[0],f=setTimeout(function(){f=null},v)),Bs(this),b.start())}}function I(_,...A){if(this.__zooming){var M=C(this,A).event(_),D=_.changedTouches,b=D.length,P,L,O,$;for(Do(_),P=0;P<b;++P)L=D[P],O=wt(L,this),M.touch0&&M.touch0[2]===L.identifier?M.touch0[0]=O:M.touch1&&M.touch1[2]===L.identifier&&(M.touch1[0]=O);if(L=M.that.__zoom,M.touch1){var U=M.touch0[0],V=M.touch0[1],Y=M.touch1[0],X=M.touch1[1],G=(G=Y[0]-U[0])*G+(G=Y[1]-U[1])*G,H=(H=X[0]-V[0])*H+(H=X[1]-V[1])*H;L=g(L,Math.sqrt(G/H)),O=[(U[0]+Y[0])/2,(U[1]+Y[1])/2],$=[(V[0]+X[0])/2,(V[1]+X[1])/2]}else if(M.touch0)O=M.touch0[0],$=M.touch0[1];else return;M.zoom("touch",n(m(L,O,$),M.extent,s))}}function F(_,...A){if(this.__zooming){var M=C(this,A).event(_),D=_.changedTouches,b=D.length,P,L;for(Za(_),h&&clearTimeout(h),h=setTimeout(function(){h=null},v),P=0;P<b;++P)L=D[P],M.touch0&&M.touch0[2]===L.identifier?delete M.touch0:M.touch1&&M.touch1[2]===L.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(L=wt(L,this),Math.hypot(c[0]-L[0],c[1]-L[1])<S)){var O=tt(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return p.wheelDelta=function(_){return arguments.length?(r=typeof _=="function"?_:hs(+_),p):r},p.filter=function(_){return arguments.length?(e=typeof _=="function"?_:hs(!!_),p):e},p.touchable=function(_){return arguments.length?(o=typeof _=="function"?_:hs(!!_),p):o},p.extent=function(_){return arguments.length?(t=typeof _=="function"?_:hs([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),p):t},p.scaleExtent=function(_){return arguments.length?(i[0]=+_[0],i[1]=+_[1],p):[i[0],i[1]]},p.translateExtent=function(_){return arguments.length?(s[0][0]=+_[0][0],s[1][0]=+_[1][0],s[0][1]=+_[0][1],s[1][1]=+_[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(_){return arguments.length?(n=_,p):n},p.duration=function(_){return arguments.length?(l=+_,p):l},p.interpolate=function(_){return arguments.length?(a=_,p):a},p.on=function(){var _=u.on.apply(u,arguments);return _===u?p:_},p.clickDistance=function(_){return arguments.length?(w=(_=+_)*_,p):Math.sqrt(w)},p.tapDistance=function(_){return arguments.length?(S=+_,p):S},p}const Wt={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."},Ei=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],vv=["Enter"," ","Escape"],xv={"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 io;(function(e){e.Strict="strict",e.Loose="loose"})(io||(io={}));var nr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(nr||(nr={}));var ki;(function(e){e.Partial="partial",e.Full="full"})(ki||(ki={}));const wv={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var En;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(En||(En={}));var kl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(kl||(kl={}));var K;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(K||(K={}));const np={[K.Left]:K.Right,[K.Right]:K.Left,[K.Top]:K.Bottom,[K.Bottom]:K.Top};function Sv(e){return e===null?null:e?"valid":"invalid"}const Nv=e=>"id"in e&&"source"in e&&"target"in e,O_=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Vd=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),zi=(e,t=[0,0])=>{const{width:n,height:r}=dn(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},F_=(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):Vd(o)?o:t.nodeLookup.get(o.id));const l=s?Cl(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return ra(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return oa(n)},$i=(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=ra(n,Cl(o)),r=!0)}),r?oa(n):{x:0,y:0,width:0,height:0}},Ud=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const l={...Fi(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:h=!1}=u;if(s&&!c||h)continue;const v=f.width??u.width??u.initialWidth??null,x=f.height??u.height??u.initialHeight??null,w=Ci(l,lo(u)),S=(v??0)*(x??0),p=i&&w>0;(!u.internals.handleBounds||p||w>=S||u.dragging)&&a.push(u)}return a},B_=(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 H_(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 V_({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=H_(e,s),a=$i(l),u=Wd(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 Ev({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",Wt.error005());else{const v=l.measured.width,x=l.measured.height;v&&x&&(c=[[a,u],[a+v,u+x]])}else l&&ao(s.extent)&&(c=[[s.extent[0][0]+a,s.extent[0][1]+u],[s.extent[1][0]+a,s.extent[1][1]+u]]);const h=ao(c)?cr(t,c,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",Wt.error015())),{position:{x:h.x-a+(s.measured.width??0)*f[0],y:h.y-u+(s.measured.height??0)*f[1]},positionAbsolute:h}}async function U_({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const i=new Set(e.map(h=>h.id)),s=[];for(const h of n){if(h.deletable===!1)continue;const v=i.has(h.id),x=!v&&h.parentId&&s.find(w=>w.id===h.parentId);(v||x)&&s.push(h)}const l=new Set(t.map(h=>h.id)),a=r.filter(h=>h.deletable!==!1),f=B_(s,a);for(const h of a)l.has(h.id)&&!f.find(x=>x.id===h.id)&&f.push(h);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 so=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),cr=(e={x:0,y:0},t,n)=>({x:so(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:so(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function kv(e,t,n){const{width:r,height:o}=dn(n),{x:i,y:s}=n.internals.positionAbsolute;return cr(e,[[i,s],[i+r,s+o]],t)}const rp=(e,t,n)=>e<t?so(Math.abs(e-t),1,t)/t:e>n?-so(Math.abs(e-n),1,t)/t:0,Cv=(e,t,n=15,r=40)=>{const o=rp(e.x,r,t.width-r)*n,i=rp(e.y,r,t.height-r)*n;return[o,i]},ra=(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)}),Sc=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),oa=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),lo=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=Vd(e)?e.internals.positionAbsolute:zi(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}},Cl=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=Vd(e)?e.internals.positionAbsolute:zi(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)}},bv=(e,t)=>oa(ra(Sc(e),Sc(t))),Ci=(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)},op=e=>Ct(e.width)&&Ct(e.height)&&Ct(e.x)&&Ct(e.y),Ct=e=>!isNaN(e)&&isFinite(e),W_=(e,t)=>{},Oi=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Fi=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?Oi(l,s):l},bl=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function yr(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 Y_(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=yr(e,n),o=yr(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=yr(e.top??e.y??0,n),o=yr(e.bottom??e.y??0,n),i=yr(e.left??e.x??0,t),s=yr(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 X_(e,t,n,r,o,i){const{x:s,y:l}=bl(e,[t,n,r]),{x:a,y:u}=bl({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 Wd=(e,t,n,r,o,i)=>{const s=Y_(i,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),f=so(u,r,o),c=e.x+e.width/2,h=e.y+e.height/2,v=t/2-c*f,x=n/2-h*f,w=X_(e,v,x,f,t,n),S={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:v-S.left+S.right,y:x-S.top+S.bottom,zoom:f}},bi=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function ao(e){return e!=null&&e!=="parent"}function dn(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 _v(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 jv(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 ip(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function G_(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function K_(e){return{...xv,...e||{}}}function Jo(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=bt(e),l=Fi({x:i-((o==null?void 0:o.left)??0),y:s-((o==null?void 0:o.top)??0)},r),{x:a,y:u}=n?Oi(l,t):l;return{xSnapped:a,ySnapped:u,...l}}const Yd=e=>({width:e.offsetWidth,height:e.offsetHeight}),Pv=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Q_=["INPUT","SELECT","TEXTAREA"];function Mv(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:Q_.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Rv=e=>"clientX"in e,bt=(e,t)=>{var i,s;const n=Rv(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)}},sp=(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,...Yd(s)}})};function Iv({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 ps(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function lp({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case K.Left:return[t-ps(t-r,i),n];case K.Right:return[t+ps(r-t,i),n];case K.Top:return[t,n-ps(n-o,i)];case K.Bottom:return[t,n+ps(o-n,i)]}}function Tv({sourceX:e,sourceY:t,sourcePosition:n=K.Bottom,targetX:r,targetY:o,targetPosition:i=K.Top,curvature:s=.25}){const[l,a]=lp({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,f]=lp({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[c,h,v,x]=Iv({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,h,v,x]}function Lv({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 q_({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 Z_({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=ra(Cl(e),Cl(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 Ci(s,oa(i))>0}const J_=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,ej=(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)),tj=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||J_;let o;return Nv(e)?o={...e}:o={...e,id:r(e)},ej(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function Av({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,l]=Lv({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,l]}const ap={[K.Left]:{x:-1,y:0},[K.Right]:{x:1,y:0},[K.Top]:{x:0,y:-1},[K.Bottom]:{x:0,y:1}},nj=({source:e,sourcePosition:t=K.Bottom,target:n})=>t===K.Left||t===K.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},up=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function rj({source:e,sourcePosition:t=K.Bottom,target:n,targetPosition:r=K.Top,center:o,offset:i,stepPosition:s}){const l=ap[t],a=ap[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=nj({source:u,sourcePosition:t,target:f}),h=c.x!==0?"x":"y",v=c[h];let x=[],w,S;const p={x:0,y:0},g={x:0,y:0},[,,m,N]=Lv({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[h]*a[h]===-1){h==="x"?(w=o.x??u.x+(f.x-u.x)*s,S=o.y??(u.y+f.y)/2):(w=o.x??(u.x+f.x)/2,S=o.y??u.y+(f.y-u.y)*s);const C=[{x:w,y:u.y},{x:w,y:f.y}],k=[{x:u.x,y:S},{x:f.x,y:S}];l[h]===v?x=h==="x"?C:k:x=h==="x"?k:C}else{const C=[{x:u.x,y:f.y}],k=[{x:f.x,y:u.y}];if(h==="x"?x=l.x===v?k:C:x=l.y===v?C:k,t===r){const I=Math.abs(e[h]-n[h]);if(I<=i){const F=Math.min(i-1,i-I);l[h]===v?p[h]=(u[h]>e[h]?-1:1)*F:g[h]=(f[h]>n[h]?-1:1)*F}}if(t!==r){const I=h==="x"?"y":"x",F=l[h]===a[I],_=u[I]>f[I],A=u[I]<f[I];(l[h]===1&&(!F&&_||F&&A)||l[h]!==1&&(!F&&A||F&&_))&&(x=h==="x"?C:k)}const j={x:u.x+p.x,y:u.y+p.y},R={x:f.x+g.x,y:f.y+g.y},z=Math.max(Math.abs(j.x-x[0].x),Math.abs(R.x-x[0].x)),T=Math.max(Math.abs(j.y-x[0].y),Math.abs(R.y-x[0].y));z>=T?(w=(j.x+R.x)/2,S=x[0].y):(w=x[0].x,S=(j.y+R.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...x,{x:f.x+g.x,y:f.y+g.y},n],w,S,m,N]}function oj(e,t,n,r){const o=Math.min(up(e,t)/2,up(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 Nc({sourceX:e,sourceY:t,sourcePosition:n=K.Bottom,targetX:r,targetY:o,targetPosition:i=K.Top,borderRadius:s=5,centerX:l,centerY:a,offset:u=20,stepPosition:f=.5}){const[c,h,v,x,w]=rj({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:a},offset:u,stepPosition:f});return[c.reduce((p,g,m)=>{let N="";return m>0&&m<c.length-1?N=oj(c[m-1],g,c[m+1],s):N=`${m===0?"M":"L"}${g.x} ${g.y}`,p+=N,p},""),h,v,x,w]}function cp(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function ij(e){var c;const{sourceNode:t,targetNode:n}=e;if(!cp(t)||!cp(n))return null;const r=t.internals.handleBounds||dp(t.handles),o=n.internals.handleBounds||dp(n.handles),i=fp((r==null?void 0:r.source)??[],e.sourceHandle),s=fp(e.connectionMode===io.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",Wt.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||K.Bottom,a=(s==null?void 0:s.position)||K.Top,u=dr(t,i,l),f=dr(n,s,a);return{sourceX:u.x,sourceY:u.y,targetX:f.x,targetY:f.y,sourcePosition:l,targetPosition:a}}function dp(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 dr(e,t,n=K.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??dn(e);if(r)return{x:o+s/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case K.Top:return{x:o+s/2,y:i};case K.Right:return{x:o+s,y:i+l/2};case K.Bottom:return{x:o+s/2,y:i+l};case K.Left:return{x:o,y:i+l/2}}}function fp(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Ec(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function sj(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=Ec(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 Dv=1e3,lj=10,Xd={nodeOrigin:[0,0],nodeExtent:Ei,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},aj={...Xd,checkEquality:!0};function Gd(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function uj(e,t,n){const r=Gd(Xd,n);for(const o of e.values())if(o.parentId)Qd(o,e,t,r);else{const i=zi(o,r.nodeOrigin),s=ao(o.extent)?o.extent:r.nodeExtent,l=cr(i,s,dn(o));o.internals.positionAbsolute=l}}function cj(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 Kd(e){return e==="manual"}function kc(e,t,n,r={}){var u,f;const o=Gd(aj,r),i={i:0},s=new Map(t),l=o!=null&&o.elevateNodesOnSelect&&!Kd(o.zIndexMode)?Dv:0;let a=e.length>0;t.clear(),n.clear();for(const c of e){let h=s.get(c.id);if(o.checkEquality&&c===(h==null?void 0:h.internals.userNode))t.set(c.id,h);else{const v=zi(c,o.nodeOrigin),x=ao(c.extent)?c.extent:o.nodeExtent,w=cr(v,x,dn(c));h={...o.defaults,...c,measured:{width:(u=c.measured)==null?void 0:u.width,height:(f=c.measured)==null?void 0:f.height},internals:{positionAbsolute:w,handleBounds:cj(c,h),z:zv(c,l,o.zIndexMode),userNode:c}},t.set(c.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(a=!1),c.parentId&&Qd(h,t,n,r,i)}return a}function dj(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 Qd(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:a}=Gd(Xd,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}dj(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*lj),o&&f.internals.rootParentIndex!==void 0&&(o.i=f.internals.rootParentIndex);const c=i&&!Kd(a)?Dv:0,{x:h,y:v,z:x}=fj(e,f,s,l,c,a),{positionAbsolute:w}=e.internals,S=h!==w.x||v!==w.y;(S||x!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:h,y:v}:w,z:x}})}function zv(e,t,n){const r=Ct(e.zIndex)?e.zIndex:0;return Kd(n)?r:r+(e.selected?t:0)}function fj(e,t,n,r,o,i){const{x:s,y:l}=t.internals.positionAbsolute,a=dn(e),u=zi(e,n),f=ao(e.extent)?cr(u,e.extent,a):u;let c=cr({x:s+f.x,y:l+f.y},r,a);e.extent==="parent"&&(c=kv(c,a,t));const h=zv(e,o,i),v=t.internals.z??0;return{x:c.x,y:c.y,z:v>=h?v+1:h}}function qd(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)??lo(a),f=bv(u,l.rect);i.set(l.parentId,{expandedRect:f,parent:a})}return i.size>0&&i.forEach(({expandedRect:l,parent:a},u)=>{var m;const f=a.internals.positionAbsolute,c=dn(a),h=a.origin??r,v=l.x<f.x?Math.round(Math.abs(f.x-l.x)):0,x=l.y<f.y?Math.round(Math.abs(f.y-l.y)):0,w=Math.max(c.width,Math.round(l.width)),S=Math.max(c.height,Math.round(l.height)),p=(w-c.width)*h[0],g=(S-c.height)*h[1];(v>0||x>0||p||g)&&(o.push({id:u,type:"position",position:{x:a.position.x-v+p,y:a.position.y-x+g}}),(m=n.get(u))==null||m.forEach(N=>{e.some(E=>E.id===N.id)||o.push({id:N.id,type:"position",position:{x:N.position.x+v,y:N.position.y+x}})})),(c.width<l.width||c.height<l.height||v||x)&&o.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:w+(v?h[0]*v-p:0),height:S+(x?h[1]*x-g:0)}})}),o}function hj(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),h=[];for(const v of e.values()){const x=t.get(v.id);if(!x)continue;if(x.hidden){t.set(x.id,{...x,internals:{...x.internals,handleBounds:void 0}}),a=!0;continue}const w=Yd(v.nodeElement),S=x.measured.width!==w.width||x.measured.height!==w.height;if(!!(w.width&&w.height&&(S||!x.internals.handleBounds||v.force))){const g=v.nodeElement.getBoundingClientRect(),m=ao(x.extent)?x.extent:i;let{positionAbsolute:N}=x.internals;x.parentId&&x.extent==="parent"?N=kv(N,w,t.get(x.parentId)):m&&(N=cr(N,m,w));const E={...x,measured:w,internals:{...x.internals,positionAbsolute:N,handleBounds:{source:sp("source",v.nodeElement,g,c,x.id),target:sp("target",v.nodeElement,g,c,x.id)}}};t.set(x.id,E),x.parentId&&Qd(E,t,n,{nodeOrigin:o,zIndexMode:s}),a=!0,S&&(u.push({id:x.id,type:"dimensions",dimensions:w}),x.expandParent&&x.parentId&&h.push({id:x.id,parentId:x.parentId,rect:lo(E,o)}))}}if(h.length>0){const v=qd(h,t,n,o);u.push(...v)}return{changes:u,updatedInternals:a}}async function pj({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 hp(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 $v(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}`;hp("source",a,f,e,o,s),hp("target",a,u,e,i,l),t.set(r.id,r)}}function Ov(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Ov(n,t):!1}function pp(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 mj(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!Ov(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 Ja({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 gj({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=Oi(i,t);return{x:s.x-i.x,y:s.y-i.y}}function yj({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,h=null,v=!1,x=!1,w=null;function S({noDragClassName:g,handleSelector:m,domNode:N,isSelectable:E,nodeId:C,nodeClickDistance:k=0}){h=tt(N);function j({x:I,y:F}){const{nodeLookup:_,nodeExtent:A,snapGrid:M,snapToGrid:D,nodeOrigin:b,onNodeDrag:P,onSelectionDrag:L,onError:O,updateNodePositions:$}=t();i={x:I,y:F};let U=!1;const V=l.size>1,Y=V&&A?Sc($i(l)):null,X=V&&D?gj({dragItems:l,snapGrid:M,x:I,y:F}):null;for(const[G,H]of l){if(!_.has(G))continue;let Q={x:I-H.distance.x,y:F-H.distance.y};D&&(Q=X?{x:Math.round(Q.x+X.x),y:Math.round(Q.y+X.y)}:Oi(Q,M));let te=null;if(V&&A&&!H.extent&&Y){const{positionAbsolute:q}=H.internals,se=q.x-Y.x+A[0][0],ce=q.x+H.measured.width-Y.x2+A[1][0],ie=q.y-Y.y+A[0][1],De=q.y+H.measured.height-Y.y2+A[1][1];te=[[se,ie],[ce,De]]}const{position:J,positionAbsolute:Z}=Ev({nodeId:G,nextPosition:Q,nodeLookup:_,nodeExtent:te||A,nodeOrigin:b,onError:O});U=U||H.position.x!==J.x||H.position.y!==J.y,H.position=J,H.internals.positionAbsolute=Z}if(x=x||U,!!U&&($(l,!0),w&&(r||P||!C&&L))){const[G,H]=Ja({nodeId:C,dragItems:l,nodeLookup:_});r==null||r(w,l,G,H),P==null||P(w,G,H),C||L==null||L(w,H)}}async function R(){if(!f)return;const{transform:I,panBy:F,autoPanSpeed:_,autoPanOnNodeDrag:A}=t();if(!A){a=!1,cancelAnimationFrame(s);return}const[M,D]=Cv(u,f,_);(M!==0||D!==0)&&(i.x=(i.x??0)-M/I[2],i.y=(i.y??0)-D/I[2],await F({x:M,y:D})&&j(i)),s=requestAnimationFrame(R)}function z(I){var V;const{nodeLookup:F,multiSelectionActive:_,nodesDraggable:A,transform:M,snapGrid:D,snapToGrid:b,selectNodesOnDrag:P,onNodeDragStart:L,onSelectionDragStart:O,unselectNodesAndEdges:$}=t();c=!0,(!P||!E)&&!_&&C&&((V=F.get(C))!=null&&V.selected||$()),E&&P&&C&&(e==null||e(C));const U=Jo(I.sourceEvent,{transform:M,snapGrid:D,snapToGrid:b,containerBounds:f});if(i=U,l=mj(F,A,U,C),l.size>0&&(n||L||!C&&O)){const[Y,X]=Ja({nodeId:C,dragItems:l,nodeLookup:F});n==null||n(I.sourceEvent,l,Y,X),L==null||L(I.sourceEvent,Y,X),C||O==null||O(I.sourceEvent,X)}}const T=nv().clickDistance(k).on("start",I=>{const{domNode:F,nodeDragThreshold:_,transform:A,snapGrid:M,snapToGrid:D}=t();f=(F==null?void 0:F.getBoundingClientRect())||null,v=!1,x=!1,w=I.sourceEvent,_===0&&z(I),i=Jo(I.sourceEvent,{transform:A,snapGrid:M,snapToGrid:D,containerBounds:f}),u=bt(I.sourceEvent,f)}).on("drag",I=>{const{autoPanOnNodeDrag:F,transform:_,snapGrid:A,snapToGrid:M,nodeDragThreshold:D,nodeLookup:b}=t(),P=Jo(I.sourceEvent,{transform:_,snapGrid:A,snapToGrid:M,containerBounds:f});if(w=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||C&&!b.has(C))&&(v=!0),!v){if(!a&&F&&c&&(a=!0,R()),!c){const L=bt(I.sourceEvent,f),O=L.x-u.x,$=L.y-u.y;Math.sqrt(O*O+$*$)>D&&z(I)}(i.x!==P.xSnapped||i.y!==P.ySnapped)&&l&&c&&(u=bt(I.sourceEvent,f),j(P))}}).on("end",I=>{if(!(!c||v)&&(a=!1,c=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:F,updateNodePositions:_,onNodeDragStop:A,onSelectionDragStop:M}=t();if(x&&(_(l,!1),x=!1),o||A||!C&&M){const[D,b]=Ja({nodeId:C,dragItems:l,nodeLookup:F,dragging:!1});o==null||o(I.sourceEvent,l,D,b),A==null||A(I.sourceEvent,D,b),C||M==null||M(I.sourceEvent,b)}}}).filter(I=>{const F=I.target;return!I.button&&(!g||!pp(F,`.${g}`,N))&&(!m||pp(F,m,N))});h.call(T)}function p(){h==null||h.on(".drag",null)}return{update:S,destroy:p}}function vj(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())Ci(o,lo(i))>0&&r.push(i);return r}const xj=250;function wj(e,t,n,r){var l,a;let o=[],i=1/0;const s=vj(e,n,t+xj);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:h,y:v}=dr(u,c,c.position,!0),x=Math.sqrt(Math.pow(h-e.x,2)+Math.pow(v-e.y,2));x>t||(x<i?(o=[{...c,x:h,y:v}],i=x):x===i&&o.push({...c,x:h,y:v}))}}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 Fv(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(h=>h.id===n):l==null?void 0:l[0])??null;return a&&i?{...a,...dr(s,a,a.position,!0)}:a}function Bv(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Sj(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Hv=()=>!0;function Nj(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:f,flowId:c,panBy:h,cancelConnection:v,onConnectStart:x,onConnect:w,onConnectEnd:S,isValidConnection:p=Hv,onReconnectEnd:g,updateConnection:m,getTransform:N,getFromHandle:E,autoPanSpeed:C,dragThreshold:k=1,handleDomNode:j}){const R=Pv(e.target);let z=0,T;const{x:I,y:F}=bt(e),_=Bv(i,j),A=l==null?void 0:l.getBoundingClientRect();let M=!1;if(!A||!_)return;const D=Fv(o,_,r,a,t);if(!D)return;let b=bt(e,A),P=!1,L=null,O=!1,$=null;function U(){if(!f||!A)return;const[J,Z]=Cv(b,A,C);h({x:J,y:Z}),z=requestAnimationFrame(U)}const V={...D,nodeId:o,type:_,position:D.position},Y=a.get(o);let G={inProgress:!0,isValid:null,from:dr(Y,V,K.Left,!0),fromHandle:V,fromPosition:V.position,fromNode:Y,to:b,toHandle:null,toPosition:np[V.position],toNode:null,pointer:b};function H(){M=!0,m(G),x==null||x(e,{nodeId:o,handleId:r,handleType:_})}k===0&&H();function Q(J){if(!M){const{x:De,y:fn}=bt(J),Gt=De-I,Vn=fn-F;if(!(Gt*Gt+Vn*Vn>k*k))return;H()}if(!E()||!V){te(J);return}const Z=N();b=bt(J,A),T=wj(Fi(b,Z,!1,[1,1]),n,a,V),P||(U(),P=!0);const q=Vv(J,{handle:T,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:p,doc:R,lib:u,flowId:c,nodeLookup:a});$=q.handleDomNode,L=q.connection,O=Sj(!!T,q.isValid);const se=a.get(o),ce=se?dr(se,V,K.Left,!0):G.from,ie={...G,from:ce,isValid:O,to:q.toHandle&&O?bl({x:q.toHandle.x,y:q.toHandle.y},Z):b,toHandle:q.toHandle,toPosition:O&&q.toHandle?q.toHandle.position:np[V.position],toNode:q.toHandle?a.get(q.toHandle.nodeId):null,pointer:b};m(ie),G=ie}function te(J){if(!("touches"in J&&J.touches.length>0)){if(M){(T||$)&&L&&O&&(w==null||w(L));const{inProgress:Z,...q}=G,se={...q,toPosition:G.toHandle?G.toPosition:null};S==null||S(J,se),i&&(g==null||g(J,se))}v(),cancelAnimationFrame(z),P=!1,O=!1,L=null,$=null,R.removeEventListener("mousemove",Q),R.removeEventListener("mouseup",te),R.removeEventListener("touchmove",Q),R.removeEventListener("touchend",te)}}R.addEventListener("mousemove",Q),R.addEventListener("mouseup",te),R.addEventListener("touchmove",Q),R.addEventListener("touchend",te)}function Vv(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:l,flowId:a,isValidConnection:u=Hv,nodeLookup:f}){const c=i==="target",h=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:v,y:x}=bt(e),w=s.elementFromPoint(v,x),S=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:h,p={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const g=Bv(void 0,S),m=S.getAttribute("data-nodeid"),N=S.getAttribute("data-handleid"),E=S.classList.contains("connectable"),C=S.classList.contains("connectableend");if(!m||!g)return p;const k={source:c?m:r,sourceHandle:c?N:o,target:c?r:m,targetHandle:c?o:N};p.connection=k;const R=E&&C&&(n===io.Strict?c&&g==="source"||!c&&g==="target":m!==r||N!==o);p.isValid=R&&u(k),p.toHandle=Fv(m,g,N,f,n,!0)}return p}const Cc={onPointerDown:Nj,isValid:Vv};function Ej({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=tt(e);function i({translateExtent:l,width:a,height:u,zoomStep:f=1,pannable:c=!0,zoomable:h=!0,inversePan:v=!1}){const x=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;const N=n(),E=m.sourceEvent.ctrlKey&&bi()?10:1,C=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*f,k=N[2]*Math.pow(2,C*E);t.scaleTo(k)};let w=[0,0];const S=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(w=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},p=m=>{const N=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;const E=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],C=[E[0]-w[0],E[1]-w[1]];w=E;const k=r()*Math.max(N[2],Math.log(N[2]))*(v?-1:1),j={x:N[0]-C[0]*k,y:N[1]-C[1]*k},R=[[0,0],[a,u]];t.setViewportConstrained({x:j.x,y:j.y,zoom:N[2]},R,l)},g=yv().on("start",S).on("zoom",c?p:null).on("zoom.wheel",h?x:null);o.call(g,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:wt}}const ia=e=>({x:e.x,y:e.y,zoom:e.k}),eu=({x:e,y:t,zoom:n})=>na.translate(e,t).scale(n),Tr=(e,t)=>e.target.closest(`.${t}`),Uv=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),kj=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,tu=(e,t=0,n=kj,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},Wv=e=>{const t=e.ctrlKey&&bi()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Cj({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return f=>{if(Tr(f,t))return f.ctrlKey&&f.preventDefault(),!1;f.preventDefault(),f.stopImmediatePropagation();const c=n.property("__zoom").k||1;if(f.ctrlKey&&s){const S=wt(f),p=Wv(f),g=c*Math.pow(2,p);r.scaleTo(n,g,S,f);return}const h=f.deltaMode===1?20:1;let v=o===nr.Vertical?0:f.deltaX*h,x=o===nr.Horizontal?0:f.deltaY*h;!bi()&&f.shiftKey&&o!==nr.Vertical&&(v=f.deltaY*h,x=0),r.translateBy(n,-(v/c)*i,-(x/c)*i,{internal:!0});const w=ia(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 bj({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=Tr(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,o)}}function _j({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,l;if((i=r.sourceEvent)!=null&&i.internal)return;const o=ia(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 jj({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{var s,l;e.usedRightMouseButton=!!(n&&Uv(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,ia(i.transform)))}}function Pj({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&&Uv(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const a=ia(s.transform);e.prevViewport=a,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(s.sourceEvent,a)},n?150:0)}}}function Mj({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 S;const h=e||t,v=n&&c.ctrlKey,x=c.type==="wheel";if(c.button===1&&c.type==="mousedown"&&(Tr(c,`${u}-flow__node`)||Tr(c,`${u}-flow__edge`)))return!0;if(!r&&!h&&!o&&!i&&!n||s||f&&!x||Tr(c,l)&&x||Tr(c,a)&&(!x||o&&x&&!e)||!n&&c.ctrlKey&&x)return!1;if(!n&&c.type==="touchstart"&&((S=c.touches)==null?void 0:S.length)>1)return c.preventDefault(),!1;if(!h&&!o&&!v&&x||!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||x)&&w}}function Rj({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=yv().scaleExtent([t,n]).translateExtent(r),h=tt(e).call(c);g({x:o.x,y:o.y,zoom:so(o.zoom,t,n)},[[0,0],[f.width,f.height]],r);const v=h.on("wheel.zoom"),x=h.on("dblclick.zoom");c.wheelDelta(Wv);function w(T,I){return h?new Promise(F=>{c==null||c.interpolate((I==null?void 0:I.interpolate)==="linear"?Zo:$s).transform(tu(h,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),T)}):Promise.resolve(!1)}function S({noWheelClassName:T,noPanClassName:I,onPaneContextMenu:F,userSelectionActive:_,panOnScroll:A,panOnDrag:M,panOnScrollMode:D,panOnScrollSpeed:b,preventScrolling:P,zoomOnPinch:L,zoomOnScroll:O,zoomOnDoubleClick:$,zoomActivationKeyPressed:U,lib:V,onTransformChange:Y,connectionInProgress:X,paneClickDistance:G,selectionOnDrag:H}){_&&!u.isZoomingOrPanning&&p();const Q=A&&!U&&!_;c.clickDistance(H?1/0:!Ct(G)||G<0?0:G);const te=Q?Cj({zoomPanValues:u,noWheelClassName:T,d3Selection:h,d3Zoom:c,panOnScrollMode:D,panOnScrollSpeed:b,zoomOnPinch:L,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):bj({noWheelClassName:T,preventScrolling:P,d3ZoomHandler:v});if(h.on("wheel.zoom",te,{passive:!1}),!_){const Z=_j({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:s});c.on("start",Z);const q=jj({zoomPanValues:u,panOnDrag:M,onPaneContextMenu:!!F,onPanZoom:i,onTransformChange:Y});c.on("zoom",q);const se=Pj({zoomPanValues:u,panOnDrag:M,panOnScroll:A,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:a});c.on("end",se)}const J=Mj({zoomActivationKeyPressed:U,panOnDrag:M,zoomOnScroll:O,panOnScroll:A,zoomOnDoubleClick:$,zoomOnPinch:L,userSelectionActive:_,noPanClassName:I,noWheelClassName:T,lib:V,connectionInProgress:X});c.filter(J),$?h.on("dblclick.zoom",x):h.on("dblclick.zoom",null)}function p(){c.on("zoom",null)}async function g(T,I,F){const _=eu(T),A=c==null?void 0:c.constrain()(_,I,F);return A&&await w(A),new Promise(M=>M(A))}async function m(T,I){const F=eu(T);return await w(F,I),new Promise(_=>_(F))}function N(T){if(h){const I=eu(T),F=h.property("__zoom");(F.k!==T.zoom||F.x!==T.x||F.y!==T.y)&&(c==null||c.transform(h,I,null,{sync:!0}))}}function E(){const T=h?gv(h.node()):{x:0,y:0,k:1};return{x:T.x,y:T.y,zoom:T.k}}function C(T,I){return h?new Promise(F=>{c==null||c.interpolate((I==null?void 0:I.interpolate)==="linear"?Zo:$s).scaleTo(tu(h,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),T)}):Promise.resolve(!1)}function k(T,I){return h?new Promise(F=>{c==null||c.interpolate((I==null?void 0:I.interpolate)==="linear"?Zo:$s).scaleBy(tu(h,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),T)}):Promise.resolve(!1)}function j(T){c==null||c.scaleExtent(T)}function R(T){c==null||c.translateExtent(T)}function z(T){const I=!Ct(T)||T<0?0:T;c==null||c.clickDistance(I)}return{update:S,destroy:p,setViewport:m,setViewportConstrained:g,getViewport:E,scaleTo:C,scaleBy:k,setScaleExtent:j,setTranslateExtent:R,syncViewport:N,setClickDistance:z}}var uo;(function(e){e.Line="line",e.Handle="handle"})(uo||(uo={}));function Ij({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 mp(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 gn(e,t){return Math.max(0,t-e)}function yn(e,t){return Math.max(0,e-t)}function ms(e,t,n){return Math.max(0,t-e,e-n)}function gp(e,t){return e?!t:t}function Tj(e,t,n,r,o,i,s,l){let{affectsX:a,affectsY:u}=t;const{isHorizontal:f,isVertical:c}=t,h=f&&c,{xSnapped:v,ySnapped:x}=n,{minWidth:w,maxWidth:S,minHeight:p,maxHeight:g}=r,{x:m,y:N,width:E,height:C,aspectRatio:k}=e;let j=Math.floor(f?v-e.pointerX:0),R=Math.floor(c?x-e.pointerY:0);const z=E+(a?-j:j),T=C+(u?-R:R),I=-i[0]*E,F=-i[1]*C;let _=ms(z,w,S),A=ms(T,p,g);if(s){let b=0,P=0;a&&j<0?b=gn(m+j+I,s[0][0]):!a&&j>0&&(b=yn(m+z+I,s[1][0])),u&&R<0?P=gn(N+R+F,s[0][1]):!u&&R>0&&(P=yn(N+T+F,s[1][1])),_=Math.max(_,b),A=Math.max(A,P)}if(l){let b=0,P=0;a&&j>0?b=yn(m+j,l[0][0]):!a&&j<0&&(b=gn(m+z,l[1][0])),u&&R>0?P=yn(N+R,l[0][1]):!u&&R<0&&(P=gn(N+T,l[1][1])),_=Math.max(_,b),A=Math.max(A,P)}if(o){if(f){const b=ms(z/k,p,g)*k;if(_=Math.max(_,b),s){let P=0;!a&&!u||a&&!u&&h?P=yn(N+F+z/k,s[1][1])*k:P=gn(N+F+(a?j:-j)/k,s[0][1])*k,_=Math.max(_,P)}if(l){let P=0;!a&&!u||a&&!u&&h?P=gn(N+z/k,l[1][1])*k:P=yn(N+(a?j:-j)/k,l[0][1])*k,_=Math.max(_,P)}}if(c){const b=ms(T*k,w,S)/k;if(A=Math.max(A,b),s){let P=0;!a&&!u||u&&!a&&h?P=yn(m+T*k+I,s[1][0])/k:P=gn(m+(u?R:-R)*k+I,s[0][0])/k,A=Math.max(A,P)}if(l){let P=0;!a&&!u||u&&!a&&h?P=gn(m+T*k,l[1][0])/k:P=yn(m+(u?R:-R)*k,l[0][0])/k,A=Math.max(A,P)}}}R=R+(R<0?A:-A),j=j+(j<0?_:-_),o&&(h?z>T*k?R=(gp(a,u)?-j:j)/k:j=(gp(a,u)?-R:R)*k:f?(R=j/k,u=a):(j=R*k,a=u));const M=a?m+j:m,D=u?N+R:N;return{width:E+(a?-j:j),height:C+(u?-R:R),x:i[0]*j*(a?-1:1)+M,y:i[1]*R*(u?-1:1)+D}}const Yv={width:0,height:0,x:0,y:0},Lj={...Yv,pointerX:0,pointerY:0,aspectRatio:1};function Aj(e){return[[0,0],[e.measured.width,e.measured.height]]}function Dj(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 zj({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const i=tt(e);let s={controlDirection:mp("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:h,onResizeStart:v,onResize:x,onResizeEnd:w,shouldResize:S}){let p={...Yv},g={...Lj};s={boundaries:f,resizeDirection:h,keepAspectRatio:c,controlDirection:mp(u)};let m,N=null,E=[],C,k,j,R=!1;const z=nv().on("start",T=>{const{nodeLookup:I,transform:F,snapGrid:_,snapToGrid:A,nodeOrigin:M,paneDomNode:D}=n();if(m=I.get(t),!m)return;N=(D==null?void 0:D.getBoundingClientRect())??null;const{xSnapped:b,ySnapped:P}=Jo(T.sourceEvent,{transform:F,snapGrid:_,snapToGrid:A,containerBounds:N});p={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},g={...p,pointerX:b,pointerY:P,aspectRatio:p.width/p.height},C=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(C=I.get(m.parentId),k=C&&m.extent==="parent"?Aj(C):void 0),E=[],j=void 0;for(const[L,O]of I)if(O.parentId===t&&(E.push({id:L,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const $=Dj(O,m,O.origin??M);j?j=[[Math.min($[0][0],j[0][0]),Math.min($[0][1],j[0][1])],[Math.max($[1][0],j[1][0]),Math.max($[1][1],j[1][1])]]:j=$}v==null||v(T,{...p})}).on("drag",T=>{const{transform:I,snapGrid:F,snapToGrid:_,nodeOrigin:A}=n(),M=Jo(T.sourceEvent,{transform:I,snapGrid:F,snapToGrid:_,containerBounds:N}),D=[];if(!m)return;const{x:b,y:P,width:L,height:O}=p,$={},U=m.origin??A,{width:V,height:Y,x:X,y:G}=Tj(g,s.controlDirection,M,s.boundaries,s.keepAspectRatio,U,k,j),H=V!==L,Q=Y!==O,te=X!==b&&H,J=G!==P&&Q;if(!te&&!J&&!H&&!Q)return;if((te||J||U[0]===1||U[1]===1)&&($.x=te?X:p.x,$.y=J?G:p.y,p.x=$.x,p.y=$.y,E.length>0)){const ce=X-b,ie=G-P;for(const De of E)De.position={x:De.position.x-ce+U[0]*(V-L),y:De.position.y-ie+U[1]*(Y-O)},D.push(De)}if((H||Q)&&($.width=H&&(!s.resizeDirection||s.resizeDirection==="horizontal")?V:p.width,$.height=Q&&(!s.resizeDirection||s.resizeDirection==="vertical")?Y:p.height,p.width=$.width,p.height=$.height),C&&m.expandParent){const ce=U[0]*($.width??0);$.x&&$.x<ce&&(p.x=ce,g.x=g.x-($.x-ce));const ie=U[1]*($.height??0);$.y&&$.y<ie&&(p.y=ie,g.y=g.y-($.y-ie))}const Z=Ij({width:p.width,prevWidth:L,height:p.height,prevHeight:O,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),q={...p,direction:Z};(S==null?void 0:S(T,q))!==!1&&(R=!0,x==null||x(T,q),r($,D))}).on("end",T=>{R&&(w==null||w(T,{...p}),o==null||o({...p}),R=!1)});i.call(z)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var Xv={exports:{}},Gv={},Kv={exports:{}},Qv={};/**
|
|
212
|
-
* @license React
|
|
213
|
-
* use-sync-external-store-shim.production.js
|
|
214
|
-
*
|
|
215
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
216
|
-
*
|
|
217
|
-
* This source code is licensed under the MIT license found in the
|
|
218
|
-
* LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/var co=y;function $j(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Oj=typeof Object.is=="function"?Object.is:$j,Fj=co.useState,Bj=co.useEffect,Hj=co.useLayoutEffect,Vj=co.useDebugValue;function Uj(e,t){var n=t(),r=Fj({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Hj(function(){o.value=n,o.getSnapshot=t,nu(o)&&i({inst:o})},[e,n,t]),Bj(function(){return nu(o)&&i({inst:o}),e(function(){nu(o)&&i({inst:o})})},[e]),Vj(n),n}function nu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Oj(e,n)}catch{return!0}}function Wj(e,t){return t()}var Yj=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Wj:Uj;Qv.useSyncExternalStore=co.useSyncExternalStore!==void 0?co.useSyncExternalStore:Yj;Kv.exports=Qv;var Xj=Kv.exports;/**
|
|
220
|
-
* @license React
|
|
221
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
222
|
-
*
|
|
223
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
224
|
-
*
|
|
225
|
-
* This source code is licensed under the MIT license found in the
|
|
226
|
-
* LICENSE file in the root directory of this source tree.
|
|
227
|
-
*/var sa=y,Gj=Xj;function Kj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qj=typeof Object.is=="function"?Object.is:Kj,qj=Gj.useSyncExternalStore,Zj=sa.useRef,Jj=sa.useEffect,eP=sa.useMemo,tP=sa.useDebugValue;Gv.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Zj(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=eP(function(){function a(v){if(!u){if(u=!0,f=v,v=r(v),o!==void 0&&s.hasValue){var x=s.value;if(o(x,v))return c=x}return c=v}if(x=c,Qj(f,v))return x;var w=r(v);return o!==void 0&&o(x,w)?(f=v,x):(f=v,c=w)}var u=!1,f,c,h=n===void 0?null:n;return[function(){return a(t())},h===null?void 0:function(){return a(h())}]},[t,n,r,o]);var l=qj(e,i[0],i[1]);return Jj(function(){s.hasValue=!0,s.value=l},[l]),tP(l),l};Xv.exports=Gv;var nP=Xv.exports;const rP=Mc(nP),oP={},yp=e=>{let t;const n=new Set,r=(f,c)=>{const h=typeof f=="function"?f(t):f;if(!Object.is(h,t)){const v=t;t=c??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(x=>x(t,v))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(oP?"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},iP=e=>e?yp(e):yp,{useDebugValue:sP}=At,{useSyncExternalStoreWithSelector:lP}=rP,aP=e=>e;function qv(e,t=aP,n){const r=lP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return sP(r),r}const vp=(e,t)=>{const n=iP(e),r=(o,i=t)=>qv(n,o,i);return Object.assign(r,n),r},uP=(e,t)=>e?vp(e,t):vp;function ge(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}const la=y.createContext(null),cP=la.Provider,Zv=Wt.error001();function re(e,t){const n=y.useContext(la);if(n===null)throw new Error(Zv);return qv(n,e,t)}function ye(){const e=y.useContext(la);if(e===null)throw new Error(Zv);return y.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const xp={display:"none"},dP={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Jv="react-flow__node-desc",e0="react-flow__edge-desc",fP="react-flow__aria-live",hP=e=>e.ariaLiveMessage,pP=e=>e.ariaLabelConfig;function mP({rfId:e}){const t=re(hP);return d.jsx("div",{id:`${fP}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:dP,children:t})}function gP({rfId:e,disableKeyboardA11y:t}){const n=re(pP);return d.jsxs(d.Fragment,{children:[d.jsx("div",{id:`${Jv}-${e}`,style:xp,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),d.jsx("div",{id:`${e0}-${e}`,style:xp,children:n["edge.a11yDescription.default"]}),!t&&d.jsx(mP,{rfId:e})]})}const aa=y.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{const s=`${e}`.split("-");return d.jsx("div",{className:Ce(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});aa.displayName="Panel";function yP({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:d.jsx(aa,{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:d.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const vP=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}},gs=e=>e.id;function xP(e,t){return ge(e.selectedNodes.map(gs),t.selectedNodes.map(gs))&&ge(e.selectedEdges.map(gs),t.selectedEdges.map(gs))}function wP({onSelectionChange:e}){const t=ye(),{selectedNodes:n,selectedEdges:r}=re(vP,xP);return y.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}const SP=e=>!!e.onSelectionChangeHandlers;function NP({onSelectionChange:e}){const t=re(SP);return e||t?d.jsx(wP,{onSelectionChange:e}):null}const t0=[0,0],EP={x:0,y:0,zoom:1},kP=["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"],wp=[...kP,"rfId"],CP=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}),Sp={translateExtent:Ei,nodeOrigin:t0,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function bP(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:a}=re(CP,ge),u=ye();y.useEffect(()=>(a(e.defaultNodes,e.defaultEdges),()=>{f.current=Sp,l()}),[]);const f=y.useRef(Sp);return y.useEffect(()=>{for(const c of wp){const h=e[c],v=f.current[c];h!==v&&(typeof e[c]>"u"||(c==="nodes"?t(h):c==="edges"?n(h):c==="minZoom"?r(h):c==="maxZoom"?o(h):c==="translateExtent"?i(h):c==="nodeExtent"?s(h):c==="ariaLabelConfig"?u.setState({ariaLabelConfig:K_(h)}):c==="fitView"?u.setState({fitViewQueued:h}):c==="fitViewOptions"?u.setState({fitViewOptions:h}):u.setState({[c]:h})))}f.current=e},wp.map(c=>e[c])),null}function Np(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function _P(e){var r;const[t,n]=y.useState(e==="system"?null:e);return y.useEffect(()=>{if(e!=="system"){n(e);return}const o=Np(),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=Np())!=null&&r.matches?"dark":"light"}const Ep=typeof document<"u"?document:null;function _i(e=null,t={target:Ep,actInsideInputWithModifier:!0}){const[n,r]=y.useState(!1),o=y.useRef(!1),i=y.useRef(new Set([])),[s,l]=y.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(c=>typeof c=="string").map(c=>c.replace("+",`
|
|
228
|
-
`).replace(`
|
|
229
|
-
|
|
230
|
-
`,`
|
|
231
|
-
+`).split(`
|
|
232
|
-
`)),f=u.reduce((c,h)=>c.concat(...h),[]);return[u,f]}return[[],[]]},[e]);return y.useEffect(()=>{const a=(t==null?void 0:t.target)??Ep,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const f=v=>{var S,p;if(o.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!o.current||o.current&&!u)&&Mv(v))return!1;const w=Cp(v.code,l);if(i.current.add(v[w]),kp(s,i.current,!1)){const g=((p=(S=v.composedPath)==null?void 0:S.call(v))==null?void 0:p[0])||v.target,m=(g==null?void 0:g.nodeName)==="BUTTON"||(g==null?void 0:g.nodeName)==="A";t.preventDefault!==!1&&(o.current||!m)&&v.preventDefault(),r(!0)}},c=v=>{const x=Cp(v.code,l);kp(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(v[x]),v.key==="Meta"&&i.current.clear(),o.current=!1},h=()=>{i.current.clear(),r(!1)};return a==null||a.addEventListener("keydown",f),a==null||a.addEventListener("keyup",c),window.addEventListener("blur",h),window.addEventListener("contextmenu",h),()=>{a==null||a.removeEventListener("keydown",f),a==null||a.removeEventListener("keyup",c),window.removeEventListener("blur",h),window.removeEventListener("contextmenu",h)}}},[e,r]),n}function kp(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Cp(e,t){return t.includes(e)?"code":"key"}const jP=()=>{const e=ye();return y.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):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=Wd(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 Fi(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=bl(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function n0(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)PP(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 PP(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 MP(e,t){return n0(e,t)}function RP(e,t){return n0(e,t)}function Yn(e,t){return{id:e,type:"select",selected:t}}function Lr(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(Yn(i.id,s)))}return r}function bp({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 _p(e){return{id:e.id,type:"remove"}}const jp=e=>O_(e),IP=e=>Nv(e);function r0(e){return y.forwardRef(e)}const TP=typeof window<"u"?y.useLayoutEffect:y.useEffect;function Pp(e){const[t,n]=y.useState(BigInt(0)),[r]=y.useState(()=>LP(()=>n(o=>o+BigInt(1))));return TP(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function LP(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const o0=y.createContext(null);function AP({children:e}){const t=ye(),n=y.useCallback(l=>{const{nodes:a=[],setNodes:u,hasDefaultNodes:f,onNodesChange:c,nodeLookup:h,fitViewQueued:v,onNodesChangeMiddlewareMap:x}=t.getState();let w=a;for(const p of l)w=typeof p=="function"?p(w):p;let S=bp({items:w,lookup:h});for(const p of x.values())S=p(S);f&&u(w),S.length>0?c==null||c(S):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:p,nodes:g,setNodes:m}=t.getState();p&&m(g)})},[]),r=Pp(n),o=y.useCallback(l=>{const{edges:a=[],setEdges:u,hasDefaultEdges:f,onEdgesChange:c,edgeLookup:h}=t.getState();let v=a;for(const x of l)v=typeof x=="function"?x(v):x;f?u(v):c&&c(bp({items:v,lookup:h}))},[]),i=Pp(o),s=y.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return d.jsx(o0.Provider,{value:s,children:e})}function DP(){const e=y.useContext(o0);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const zP=e=>!!e.panZoom;function Zd(){const e=jP(),t=ye(),n=DP(),r=re(zP),o=y.useMemo(()=>{const i=c=>t.getState().nodeLookup.get(c),s=c=>{n.nodeQueue.push(c)},l=c=>{n.edgeQueue.push(c)},a=c=>{var p,g;const{nodeLookup:h,nodeOrigin:v}=t.getState(),x=jp(c)?c:h.get(c.id),w=x.parentId?jv(x.position,x.measured,x.parentId,h,v):x.position,S={...x,position:w,width:((p=x.measured)==null?void 0:p.width)??x.width,height:((g=x.measured)==null?void 0:g.height)??x.height};return lo(S)},u=(c,h,v={replace:!1})=>{s(x=>x.map(w=>{if(w.id===c){const S=typeof h=="function"?h(w):h;return v.replace&&jp(S)?S:{...w,...S}}return w}))},f=(c,h,v={replace:!1})=>{l(x=>x.map(w=>{if(w.id===c){const S=typeof h=="function"?h(w):h;return v.replace&&IP(S)?S:{...w,...S}}return w}))};return{getNodes:()=>t.getState().nodes.map(c=>({...c})),getNode:c=>{var h;return(h=i(c))==null?void 0:h.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:c=[]}=t.getState();return c.map(h=>({...h}))},getEdge:c=>t.getState().edgeLookup.get(c),setNodes:s,setEdges:l,addNodes:c=>{const h=Array.isArray(c)?c:[c];n.nodeQueue.push(v=>[...v,...h])},addEdges:c=>{const h=Array.isArray(c)?c:[c];n.edgeQueue.push(v=>[...v,...h])},toObject:()=>{const{nodes:c=[],edges:h=[],transform:v}=t.getState(),[x,w,S]=v;return{nodes:c.map(p=>({...p})),edges:h.map(p=>({...p})),viewport:{x,y:w,zoom:S}}},deleteElements:async({nodes:c=[],edges:h=[]})=>{const{nodes:v,edges:x,onNodesDelete:w,onEdgesDelete:S,triggerNodeChanges:p,triggerEdgeChanges:g,onDelete:m,onBeforeDelete:N}=t.getState(),{nodes:E,edges:C}=await U_({nodesToRemove:c,edgesToRemove:h,nodes:v,edges:x,onBeforeDelete:N}),k=C.length>0,j=E.length>0;if(k){const R=C.map(_p);S==null||S(C),g(R)}if(j){const R=E.map(_p);w==null||w(E),p(R)}return(j||k)&&(m==null||m({nodes:E,edges:C})),{deletedNodes:E,deletedEdges:C}},getIntersectingNodes:(c,h=!0,v)=>{const x=op(c),w=x?c:a(c),S=v!==void 0;return w?(v||t.getState().nodes).filter(p=>{const g=t.getState().nodeLookup.get(p.id);if(g&&!x&&(p.id===c.id||!g.internals.positionAbsolute))return!1;const m=lo(S?p:g),N=Ci(m,w);return h&&N>0||N>=m.width*m.height||N>=w.width*w.height}):[]},isNodeIntersecting:(c,h,v=!0)=>{const w=op(c)?c:a(c);if(!w)return!1;const S=Ci(w,h);return v&&S>0||S>=h.width*h.height||S>=w.width*w.height},updateNode:u,updateNodeData:(c,h,v={replace:!1})=>{u(c,x=>{const w=typeof h=="function"?h(x):h;return v.replace?{...x,data:w}:{...x,data:{...x.data,...w}}},v)},updateEdge:f,updateEdgeData:(c,h,v={replace:!1})=>{f(c,x=>{const w=typeof h=="function"?h(x):h;return v.replace?{...x,data:w}:{...x,data:{...x.data,...w}}},v)},getNodesBounds:c=>{const{nodeLookup:h,nodeOrigin:v}=t.getState();return F_(c,{nodeLookup:h,nodeOrigin:v})},getHandleConnections:({type:c,id:h,nodeId:v})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${v}-${c}${h?`-${h}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:c,handleId:h,nodeId:v})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${v}${c?h?`-${c}-${h}`:`-${c}`:""}`))==null?void 0:x.values())??[])},fitView:async c=>{const h=t.getState().fitViewResolver??G_();return t.setState({fitViewQueued:!0,fitViewOptions:c,fitViewResolver:h}),n.nodeQueue.push(v=>[...v]),h.promise}}},[]);return y.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const Mp=e=>e.selected,$P=typeof window<"u"?window:void 0;function OP({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=ye(),{deleteElements:r}=Zd(),o=_i(e,{actInsideInputWithModifier:!1}),i=_i(t,{target:$P});y.useEffect(()=>{if(o){const{edges:s,nodes:l}=n.getState();r({nodes:l.filter(Mp),edges:s.filter(Mp)}),n.setState({nodesSelectionActive:!1})}},[o]),y.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function FP(e){const t=ye();y.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=Yd(e.current);(r.height===0||r.width===0)&&((l=(s=t.getState()).onError)==null||l.call(s,"004",Wt.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 ua={position:"absolute",width:"100%",height:"100%",top:0,left:0},BP=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function HP({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:i=nr.Free,zoomOnDoubleClick:s=!0,panOnDrag:l=!0,defaultViewport:a,translateExtent:u,minZoom:f,maxZoom:c,zoomActivationKeyCode:h,preventScrolling:v=!0,children:x,noWheelClassName:w,noPanClassName:S,onViewportChange:p,isControlledViewport:g,paneClickDistance:m,selectionOnDrag:N}){const E=ye(),C=y.useRef(null),{userSelectionActive:k,lib:j,connectionInProgress:R}=re(BP,ge),z=_i(h),T=y.useRef();FP(C);const I=y.useCallback(F=>{p==null||p({x:F[0],y:F[1],zoom:F[2]}),g||E.setState({transform:F})},[p,g]);return y.useEffect(()=>{if(C.current){T.current=Rj({domNode:C.current,minZoom:f,maxZoom:c,translateExtent:u,viewport:a,onDraggingChange:M=>E.setState({paneDragging:M}),onPanZoomStart:(M,D)=>{const{onViewportChangeStart:b,onMoveStart:P}=E.getState();P==null||P(M,D),b==null||b(D)},onPanZoom:(M,D)=>{const{onViewportChange:b,onMove:P}=E.getState();P==null||P(M,D),b==null||b(D)},onPanZoomEnd:(M,D)=>{const{onViewportChangeEnd:b,onMoveEnd:P}=E.getState();P==null||P(M,D),b==null||b(D)}});const{x:F,y:_,zoom:A}=T.current.getViewport();return E.setState({panZoom:T.current,transform:[F,_,A],domNode:C.current.closest(".react-flow")}),()=>{var M;(M=T.current)==null||M.destroy()}}},[]),y.useEffect(()=>{var F;(F=T.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:l,zoomActivationKeyPressed:z,preventScrolling:v,noPanClassName:S,userSelectionActive:k,noWheelClassName:w,lib:j,onTransformChange:I,connectionInProgress:R,selectionOnDrag:N,paneClickDistance:m})},[e,t,n,r,o,i,s,l,z,v,S,k,w,j,I,R,N,m]),d.jsx("div",{className:"react-flow__renderer",ref:C,style:ua,children:x})}const VP=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function UP(){const{userSelectionActive:e,userSelectionRect:t}=re(VP,ge);return e&&t?d.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 ru=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},WP=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function YP({isSelecting:e,selectionKeyPressed:t,selectionMode:n=ki.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:l,onPaneClick:a,onPaneContextMenu:u,onPaneScroll:f,onPaneMouseEnter:c,onPaneMouseMove:h,onPaneMouseLeave:v,children:x}){const w=ye(),{userSelectionActive:S,elementsSelectable:p,dragging:g,connectionInProgress:m}=re(WP,ge),N=p&&(e||S),E=y.useRef(null),C=y.useRef(),k=y.useRef(new Set),j=y.useRef(new Set),R=y.useRef(!1),z=b=>{if(R.current||m){R.current=!1;return}a==null||a(b),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},T=b=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){b.preventDefault();return}u==null||u(b)},I=f?b=>f(b):void 0,F=b=>{R.current&&(b.stopPropagation(),R.current=!1)},_=b=>{var Y,X;const{domNode:P}=w.getState();if(C.current=P==null?void 0:P.getBoundingClientRect(),!C.current)return;const L=b.target===E.current;if(!L&&!!b.target.closest(".nokey")||!e||!(i&&L||t)||b.button!==0||!b.isPrimary)return;(X=(Y=b.target)==null?void 0:Y.setPointerCapture)==null||X.call(Y,b.pointerId),R.current=!1;const{x:U,y:V}=bt(b.nativeEvent,C.current);w.setState({userSelectionRect:{width:0,height:0,startX:U,startY:V,x:U,y:V}}),L||(b.stopPropagation(),b.preventDefault())},A=b=>{const{userSelectionRect:P,transform:L,nodeLookup:O,edgeLookup:$,connectionLookup:U,triggerNodeChanges:V,triggerEdgeChanges:Y,defaultEdgeOptions:X,resetSelectedElements:G}=w.getState();if(!C.current||!P)return;const{x:H,y:Q}=bt(b.nativeEvent,C.current),{startX:te,startY:J}=P;if(!R.current){const ie=t?0:o;if(Math.hypot(H-te,Q-J)<=ie)return;G(),s==null||s(b)}R.current=!0;const Z={startX:te,startY:J,x:H<te?H:te,y:Q<J?Q:J,width:Math.abs(H-te),height:Math.abs(Q-J)},q=k.current,se=j.current;k.current=new Set(Ud(O,Z,L,n===ki.Partial,!0).map(ie=>ie.id)),j.current=new Set;const ce=(X==null?void 0:X.selectable)??!0;for(const ie of k.current){const De=U.get(ie);if(De)for(const{edgeId:fn}of De.values()){const Gt=$.get(fn);Gt&&(Gt.selectable??ce)&&j.current.add(fn)}}if(!ip(q,k.current)){const ie=Lr(O,k.current,!0);V(ie)}if(!ip(se,j.current)){const ie=Lr($,j.current);Y(ie)}w.setState({userSelectionRect:Z,userSelectionActive:!0,nodesSelectionActive:!1})},M=b=>{var P,L;b.button===0&&((L=(P=b.target)==null?void 0:P.releasePointerCapture)==null||L.call(P,b.pointerId),!S&&b.target===E.current&&w.getState().userSelectionRect&&(z==null||z(b)),w.setState({userSelectionActive:!1,userSelectionRect:null}),R.current&&(l==null||l(b),w.setState({nodesSelectionActive:k.current.size>0})))},D=r===!0||Array.isArray(r)&&r.includes(0);return d.jsxs("div",{className:Ce(["react-flow__pane",{draggable:D,dragging:g,selection:e}]),onClick:N?void 0:ru(z,E),onContextMenu:ru(T,E),onWheel:ru(I,E),onPointerEnter:N?void 0:c,onPointerMove:N?A:h,onPointerUp:N?M:void 0,onPointerDownCapture:N?_:void 0,onClickCapture:N?F:void 0,onPointerLeave:v,ref:E,style:ua,children:[x,d.jsx(UP,{})]})}function bc({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",Wt.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 i0({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){const l=ye(),[a,u]=y.useState(!1),f=y.useRef();return y.useEffect(()=>{f.current=yj({getStoreItems:()=>l.getState(),onNodeMouseDown:c=>{bc({id:c,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),y.useEffect(()=>{var c,h;if(t)(c=f.current)==null||c.destroy();else if(e.current)return(h=f.current)==null||h.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s}),()=>{var v;(v=f.current)==null||v.destroy()}},[n,r,t,i,e,o]),a}const XP=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function s0(){const e=ye();return y.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:f}=e.getState(),c=new Map,h=XP(s),v=o?i[0]:5,x=o?i[1]:5,w=n.direction.x*v*n.factor,S=n.direction.y*x*n.factor;for(const[,p]of u){if(!h(p))continue;let g={x:p.internals.positionAbsolute.x+w,y:p.internals.positionAbsolute.y+S};o&&(g=Oi(g,i));const{position:m,positionAbsolute:N}=Ev({nodeId:p.id,nextPosition:g,nodeLookup:u,nodeExtent:r,nodeOrigin:f,onError:l});p.position=m,p.internals.positionAbsolute=N,c.set(p.id,p)}a(c)},[])}const Jd=y.createContext(null),GP=Jd.Provider;Jd.Consumer;const l0=()=>y.useContext(Jd),KP=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),QP=(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===io.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 qP({type:e="source",position:t=K.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:a,className:u,onMouseDown:f,onTouchStart:c,...h},v){var A,M;const x=s||null,w=e==="target",S=ye(),p=l0(),{connectOnClick:g,noPanClassName:m,rfId:N}=re(KP,ge),{connectingFrom:E,connectingTo:C,clickConnecting:k,isPossibleEndHandle:j,connectionInProcess:R,clickConnectionInProcess:z,valid:T}=re(QP(p,x,e),ge);p||(M=(A=S.getState()).onError)==null||M.call(A,"010",Wt.error010());const I=D=>{const{defaultEdgeOptions:b,onConnect:P,hasDefaultEdges:L}=S.getState(),O={...b,...D};if(L){const{edges:$,setEdges:U}=S.getState();U(tj(O,$))}P==null||P(O),l==null||l(O)},F=D=>{if(!p)return;const b=Rv(D.nativeEvent);if(o&&(b&&D.button===0||!b)){const P=S.getState();Cc.onPointerDown(D.nativeEvent,{handleDomNode:D.currentTarget,autoPanOnConnect:P.autoPanOnConnect,connectionMode:P.connectionMode,connectionRadius:P.connectionRadius,domNode:P.domNode,nodeLookup:P.nodeLookup,lib:P.lib,isTarget:w,handleId:x,nodeId:p,flowId:P.rfId,panBy:P.panBy,cancelConnection:P.cancelConnection,onConnectStart:P.onConnectStart,onConnectEnd:P.onConnectEnd,updateConnection:P.updateConnection,onConnect:I,isValidConnection:n||P.isValidConnection,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:P.autoPanSpeed,dragThreshold:P.connectionDragThreshold})}b?f==null||f(D):c==null||c(D)},_=D=>{const{onClickConnectStart:b,onClickConnectEnd:P,connectionClickStartHandle:L,connectionMode:O,isValidConnection:$,lib:U,rfId:V,nodeLookup:Y,connection:X}=S.getState();if(!p||!L&&!o)return;if(!L){b==null||b(D.nativeEvent,{nodeId:p,handleId:x,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:p,type:e,id:x}});return}const G=Pv(D.target),H=n||$,{connection:Q,isValid:te}=Cc.isValid(D.nativeEvent,{handle:{nodeId:p,id:x,type:e},connectionMode:O,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:H,flowId:V,doc:G,lib:U,nodeLookup:Y});te&&Q&&I(Q);const J=structuredClone(X);delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,P==null||P(D,J),S.setState({connectionClickStartHandle:null})};return d.jsx("div",{"data-handleid":x,"data-nodeid":p,"data-handlepos":t,"data-id":`${N}-${p}-${x}-${e}`,className:Ce(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:i,clickconnecting:k,connectingfrom:E,connectingto:C,valid:T,connectionindicator:r&&(!R||j)&&(R||z?i:o)}]),onMouseDown:F,onTouchStart:F,onClick:g?_:void 0,ref:v,...h,children:a})}const _l=y.memo(r0(qP));function ZP({data:e,isConnectable:t,sourcePosition:n=K.Bottom}){return d.jsxs(d.Fragment,{children:[e==null?void 0:e.label,d.jsx(_l,{type:"source",position:n,isConnectable:t})]})}function JP({data:e,isConnectable:t,targetPosition:n=K.Top,sourcePosition:r=K.Bottom}){return d.jsxs(d.Fragment,{children:[d.jsx(_l,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,d.jsx(_l,{type:"source",position:r,isConnectable:t})]})}function eM(){return null}function tM({data:e,isConnectable:t,targetPosition:n=K.Top}){return d.jsxs(d.Fragment,{children:[d.jsx(_l,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const jl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Rp={input:ZP,default:JP,output:tM,group:eM};function nM(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 rM=e=>{const{width:t,height:n,x:r,y:o}=$i(e.nodeLookup,{filter:i=>!!i.selected});return{width:Ct(t)?t:null,height:Ct(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 oM({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=ye(),{width:o,height:i,transformString:s,userSelectionActive:l}=re(rM,ge),a=s0(),u=y.useRef(null);if(y.useEffect(()=>{var h;n||(h=u.current)==null||h.focus({preventScroll:!0})},[n]),i0({nodeRef:u}),l||!o||!i)return null;const f=e?h=>{const v=r.getState().nodes.filter(x=>x.selected);e(h,v)}:void 0,c=h=>{Object.prototype.hasOwnProperty.call(jl,h.key)&&(h.preventDefault(),a({direction:jl[h.key],factor:h.shiftKey?4:1}))};return d.jsx("div",{className:Ce(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:d.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:c,style:{width:o,height:i}})})}const Ip=typeof window<"u"?window:void 0,iM=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function a0({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:h,onSelectionEnd:v,multiSelectionKeyCode:x,panActivationKeyCode:w,zoomActivationKeyCode:S,elementsSelectable:p,zoomOnScroll:g,zoomOnPinch:m,panOnScroll:N,panOnScrollSpeed:E,panOnScrollMode:C,zoomOnDoubleClick:k,panOnDrag:j,defaultViewport:R,translateExtent:z,minZoom:T,maxZoom:I,preventScrolling:F,onSelectionContextMenu:_,noWheelClassName:A,noPanClassName:M,disableKeyboardA11y:D,onViewportChange:b,isControlledViewport:P}){const{nodesSelectionActive:L,userSelectionActive:O}=re(iM,ge),$=_i(u,{target:Ip}),U=_i(w,{target:Ip}),V=U||j,Y=U||N,X=f&&V!==!0,G=$||O||X;return OP({deleteKeyCode:a,multiSelectionKeyCode:x}),d.jsx(HP,{onPaneContextMenu:i,elementsSelectable:p,zoomOnScroll:g,zoomOnPinch:m,panOnScroll:Y,panOnScrollSpeed:E,panOnScrollMode:C,zoomOnDoubleClick:k,panOnDrag:!$&&V,defaultViewport:R,translateExtent:z,minZoom:T,maxZoom:I,zoomActivationKeyCode:S,preventScrolling:F,noWheelClassName:A,noPanClassName:M,onViewportChange:b,isControlledViewport:P,paneClickDistance:l,selectionOnDrag:X,children:d.jsxs(YP,{onSelectionStart:h,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:V,isSelecting:!!G,selectionMode:c,selectionKeyPressed:$,paneClickDistance:l,selectionOnDrag:X,children:[e,L&&d.jsx(oM,{onSelectionContextMenu:_,noPanClassName:M,disableKeyboardA11y:D})]})})}a0.displayName="FlowRenderer";const sM=y.memo(a0),lM=e=>t=>e?Ud(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 aM(e){return re(y.useCallback(lM(e),[e]),ge)}const uM=e=>e.updateNodeInternals;function cM(){const e=re(uM),[t]=y.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 y.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function dM({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=ye(),i=y.useRef(null),s=y.useRef(null),l=y.useRef(e.sourcePosition),a=y.useRef(e.targetPosition),u=y.useRef(t),f=n&&!!e.internals.handleBounds;return y.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]),y.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),y.useEffect(()=>{if(i.current){const c=u.current!==t,h=l.current!==e.sourcePosition,v=a.current!==e.targetPosition;(c||h||v)&&(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 fM({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:h,noPanClassName:v,disableKeyboardA11y:x,rfId:w,nodeTypes:S,nodeClickDistance:p,onError:g}){const{node:m,internals:N,isParent:E}=re(H=>{const Q=H.nodeLookup.get(e),te=H.parentLookup.has(e);return{node:Q,internals:Q.internals,isParent:te}},ge);let C=m.type||"default",k=(S==null?void 0:S[C])||Rp[C];k===void 0&&(g==null||g("003",Wt.error003(C)),C="default",k=(S==null?void 0:S.default)||Rp.default);const j=!!(m.draggable||l&&typeof m.draggable>"u"),R=!!(m.selectable||a&&typeof m.selectable>"u"),z=!!(m.connectable||u&&typeof m.connectable>"u"),T=!!(m.focusable||f&&typeof m.focusable>"u"),I=ye(),F=_v(m),_=dM({node:m,nodeType:C,hasDimensions:F,resizeObserver:c}),A=i0({nodeRef:_,disabled:m.hidden||!j,noDragClassName:h,handleSelector:m.dragHandle,nodeId:e,isSelectable:R,nodeClickDistance:p}),M=s0();if(m.hidden)return null;const D=dn(m),b=nM(m),P=R||j||t||n||r||o,L=n?H=>n(H,{...N.userNode}):void 0,O=r?H=>r(H,{...N.userNode}):void 0,$=o?H=>o(H,{...N.userNode}):void 0,U=i?H=>i(H,{...N.userNode}):void 0,V=s?H=>s(H,{...N.userNode}):void 0,Y=H=>{const{selectNodesOnDrag:Q,nodeDragThreshold:te}=I.getState();R&&(!Q||!j||te>0)&&bc({id:e,store:I,nodeRef:_}),t&&t(H,{...N.userNode})},X=H=>{if(!(Mv(H.nativeEvent)||x)){if(vv.includes(H.key)&&R){const Q=H.key==="Escape";bc({id:e,store:I,unselect:Q,nodeRef:_})}else if(j&&m.selected&&Object.prototype.hasOwnProperty.call(jl,H.key)){H.preventDefault();const{ariaLabelConfig:Q}=I.getState();I.setState({ariaLiveMessage:Q["node.a11yDescription.ariaLiveMessage"]({direction:H.key.replace("Arrow","").toLowerCase(),x:~~N.positionAbsolute.x,y:~~N.positionAbsolute.y})}),M({direction:jl[H.key],factor:H.shiftKey?4:1})}}},G=()=>{var se;if(x||!((se=_.current)!=null&&se.matches(":focus-visible")))return;const{transform:H,width:Q,height:te,autoPanOnNodeFocus:J,setCenter:Z}=I.getState();if(!J)return;Ud(new Map([[e,m]]),{x:0,y:0,width:Q,height:te},H,!0).length>0||Z(m.position.x+D.width/2,m.position.y+D.height/2,{zoom:H[2]})};return d.jsx("div",{className:Ce(["react-flow__node",`react-flow__node-${C}`,{[v]:j},m.className,{selected:m.selected,selectable:R,parent:E,draggable:j,dragging:A}]),ref:_,style:{zIndex:N.z,transform:`translate(${N.positionAbsolute.x}px,${N.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:F?"visible":"hidden",...m.style,...b},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:O,onMouseLeave:$,onContextMenu:U,onClick:Y,onDoubleClick:V,onKeyDown:T?X:void 0,tabIndex:T?0:void 0,onFocus:T?G:void 0,role:m.ariaRole??(T?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${Jv}-${w}`,"aria-label":m.ariaLabel,...m.domAttributes,children:d.jsx(GP,{value:e,children:d.jsx(k,{id:e,data:m.data,type:C,positionAbsoluteX:N.positionAbsolute.x,positionAbsoluteY:N.positionAbsolute.y,selected:m.selected??!1,selectable:R,draggable:j,deletable:m.deletable??!0,isConnectable:z,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:A,dragHandle:m.dragHandle,zIndex:N.z,parentId:m.parentId,...D})})})}var hM=y.memo(fM);const pM=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function u0(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:i}=re(pM,ge),s=aM(e.onlyRenderVisibleElements),l=cM();return d.jsx("div",{className:"react-flow__nodes",style:ua,children:s.map(a=>d.jsx(hM,{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))})}u0.displayName="NodeRenderer";const mM=y.memo(u0);function gM(e){return re(y.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&&Z_({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),ge)}const yM=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return d.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},vM=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return d.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Tp={[kl.Arrow]:yM,[kl.ArrowClosed]:vM};function xM(e){const t=ye();return y.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(Tp,e)?Tp[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",Wt.error009(e)),null)},[e])}const wM=({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=xM(t);return a?d.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:d.jsx(a,{color:n,strokeWidth:s})}):null},c0=({defaultColor:e,rfId:t})=>{const n=re(i=>i.edges),r=re(i=>i.defaultEdgeOptions),o=y.useMemo(()=>sj(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?d.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:d.jsx("defs",{children:o.map(i=>d.jsx(wM,{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};c0.displayName="MarkerDefinitions";var SM=y.memo(c0);function d0({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,h]=y.useState({x:1,y:0,width:0,height:0}),v=Ce(["react-flow__edge-textwrapper",u]),x=y.useRef(null);return y.useEffect(()=>{if(x.current){const w=x.current.getBBox();h({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?d.jsxs("g",{transform:`translate(${e-c.width/2} ${t-c.height/2})`,className:v,visibility:c.width?"visible":"hidden",...f,children:[o&&d.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}),d.jsx("text",{className:"react-flow__edge-text",y:c.height/2,dy:"0.3em",ref:x,style:r,children:n}),a]}):null}d0.displayName="EdgeText";const NM=y.memo(d0);function ca({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...f}){return d.jsxs(d.Fragment,{children:[d.jsx("path",{...f,d:e,fill:"none",className:Ce(["react-flow__edge-path",f.className])}),u?d.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&Ct(t)&&Ct(n)?d.jsx(NM,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function Lp({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===K.Left||e===K.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function f0({sourceX:e,sourceY:t,sourcePosition:n=K.Bottom,targetX:r,targetY:o,targetPosition:i=K.Top}){const[s,l]=Lp({pos:n,x1:e,y1:t,x2:r,y2:o}),[a,u]=Lp({pos:i,x1:r,y1:o,x2:e,y2:t}),[f,c,h,v]=Iv({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,h,v]}function h0(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:h,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:S,interactionWidth:p})=>{const[g,m,N]=f0({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),E=e.isInternal?void 0:t;return d.jsx(ca,{id:E,path:g,labelX:m,labelY:N,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:h,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:S,interactionWidth:p})})}const EM=h0({isInternal:!1}),p0=h0({isInternal:!0});EM.displayName="SimpleBezierEdge";p0.displayName="SimpleBezierEdgeInternal";function m0(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:h,sourcePosition:v=K.Bottom,targetPosition:x=K.Top,markerEnd:w,markerStart:S,pathOptions:p,interactionWidth:g})=>{const[m,N,E]=Nc({sourceX:n,sourceY:r,sourcePosition:v,targetX:o,targetY:i,targetPosition:x,borderRadius:p==null?void 0:p.borderRadius,offset:p==null?void 0:p.offset,stepPosition:p==null?void 0:p.stepPosition}),C=e.isInternal?void 0:t;return d.jsx(ca,{id:C,path:m,labelX:N,labelY:E,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:h,markerEnd:w,markerStart:S,interactionWidth:g})})}const g0=m0({isInternal:!1}),y0=m0({isInternal:!0});g0.displayName="SmoothStepEdge";y0.displayName="SmoothStepEdgeInternal";function v0(e){return y.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return d.jsx(g0,{...n,id:r,pathOptions:y.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const kM=v0({isInternal:!1}),x0=v0({isInternal:!0});kM.displayName="StepEdge";x0.displayName="StepEdgeInternal";function w0(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:h,markerEnd:v,markerStart:x,interactionWidth:w})=>{const[S,p,g]=Av({sourceX:n,sourceY:r,targetX:o,targetY:i}),m=e.isInternal?void 0:t;return d.jsx(ca,{id:m,path:S,labelX:p,labelY:g,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:h,markerEnd:v,markerStart:x,interactionWidth:w})})}const CM=w0({isInternal:!1}),S0=w0({isInternal:!0});CM.displayName="StraightEdge";S0.displayName="StraightEdgeInternal";function N0(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=K.Bottom,targetPosition:l=K.Top,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:h,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:S,pathOptions:p,interactionWidth:g})=>{const[m,N,E]=Tv({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l,curvature:p==null?void 0:p.curvature}),C=e.isInternal?void 0:t;return d.jsx(ca,{id:C,path:m,labelX:N,labelY:E,label:a,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:h,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:S,interactionWidth:g})})}const bM=N0({isInternal:!1}),E0=N0({isInternal:!0});bM.displayName="BezierEdge";E0.displayName="BezierEdgeInternal";const Ap={default:E0,straight:S0,step:x0,smoothstep:y0,simplebezier:p0},Dp={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},_M=(e,t,n)=>n===K.Left?e-t:n===K.Right?e+t:e,jM=(e,t,n)=>n===K.Top?e-t:n===K.Bottom?e+t:e,zp="react-flow__edgeupdater";function $p({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:l}){return d.jsx("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:Ce([zp,`${zp}-${l}`]),cx:_M(t,r,e),cy:jM(n,r,e),r,stroke:"transparent",fill:"transparent"})}function PM({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:h,setUpdateHover:v}){const x=ye(),w=(N,E)=>{if(N.button!==0)return;const{autoPanOnConnect:C,domNode:k,isValidConnection:j,connectionMode:R,connectionRadius:z,lib:T,onConnectStart:I,onConnectEnd:F,cancelConnection:_,nodeLookup:A,rfId:M,panBy:D,updateConnection:b}=x.getState(),P=E.type==="target",L=(U,V)=>{h(!1),c==null||c(U,n,E.type,V)},O=U=>u==null?void 0:u(n,U),$=(U,V)=>{h(!0),f==null||f(N,n,E.type),I==null||I(U,V)};Cc.onPointerDown(N.nativeEvent,{autoPanOnConnect:C,connectionMode:R,connectionRadius:z,domNode:k,handleId:E.id,nodeId:E.nodeId,nodeLookup:A,isTarget:P,edgeUpdaterType:E.type,lib:T,flowId:M,cancelConnection:_,panBy:D,isValidConnection:j,onConnect:O,onConnectStart:$,onConnectEnd:F,onReconnectEnd:L,updateConnection:b,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:N.currentTarget})},S=N=>w(N,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=N=>w(N,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),g=()=>v(!0),m=()=>v(!1);return d.jsxs(d.Fragment,{children:[(e===!0||e==="source")&&d.jsx($p,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:S,onMouseEnter:g,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&d.jsx($p,{position:a,centerX:i,centerY:s,radius:t,onMouseDown:p,onMouseEnter:g,onMouseOut:m,type:"target"})]})}function MM({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:h,onReconnectEnd:v,rfId:x,edgeTypes:w,noPanClassName:S,onError:p,disableKeyboardA11y:g}){let m=re(Z=>Z.edgeLookup.get(e));const N=re(Z=>Z.defaultEdgeOptions);m=N?{...N,...m}:m;let E=m.type||"default",C=(w==null?void 0:w[E])||Ap[E];C===void 0&&(p==null||p("011",Wt.error011(E)),E="default",C=(w==null?void 0:w.default)||Ap.default);const k=!!(m.focusable||t&&typeof m.focusable>"u"),j=typeof c<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),R=!!(m.selectable||r&&typeof m.selectable>"u"),z=y.useRef(null),[T,I]=y.useState(!1),[F,_]=y.useState(!1),A=ye(),{zIndex:M,sourceX:D,sourceY:b,targetX:P,targetY:L,sourcePosition:O,targetPosition:$}=re(y.useCallback(Z=>{const q=Z.nodeLookup.get(m.source),se=Z.nodeLookup.get(m.target);if(!q||!se)return{zIndex:m.zIndex,...Dp};const ce=ij({id:e,sourceNode:q,targetNode:se,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:Z.connectionMode,onError:p});return{zIndex:q_({selected:m.selected,zIndex:m.zIndex,sourceNode:q,targetNode:se,elevateOnSelect:Z.elevateEdgesOnSelect,zIndexMode:Z.zIndexMode}),...ce||Dp}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),ge),U=y.useMemo(()=>m.markerStart?`url('#${Ec(m.markerStart,x)}')`:void 0,[m.markerStart,x]),V=y.useMemo(()=>m.markerEnd?`url('#${Ec(m.markerEnd,x)}')`:void 0,[m.markerEnd,x]);if(m.hidden||D===null||b===null||P===null||L===null)return null;const Y=Z=>{var ie;const{addSelectedEdges:q,unselectNodesAndEdges:se,multiSelectionActive:ce}=A.getState();R&&(A.setState({nodesSelectionActive:!1}),m.selected&&ce?(se({nodes:[],edges:[m]}),(ie=z.current)==null||ie.blur()):q([e])),o&&o(Z,m)},X=i?Z=>{i(Z,{...m})}:void 0,G=s?Z=>{s(Z,{...m})}:void 0,H=l?Z=>{l(Z,{...m})}:void 0,Q=a?Z=>{a(Z,{...m})}:void 0,te=u?Z=>{u(Z,{...m})}:void 0,J=Z=>{var q;if(!g&&vv.includes(Z.key)&&R){const{unselectNodesAndEdges:se,addSelectedEdges:ce}=A.getState();Z.key==="Escape"?((q=z.current)==null||q.blur(),se({edges:[m]})):ce([e])}};return d.jsx("svg",{style:{zIndex:M},children:d.jsxs("g",{className:Ce(["react-flow__edge",`react-flow__edge-${E}`,m.className,S,{selected:m.selected,animated:m.animated,inactive:!R&&!o,updating:T,selectable:R}]),onClick:Y,onDoubleClick:X,onContextMenu:G,onMouseEnter:H,onMouseMove:Q,onMouseLeave:te,onKeyDown:k?J:void 0,tabIndex:k?0:void 0,role:m.ariaRole??(k?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":k?`${e0}-${x}`:void 0,ref:z,...m.domAttributes,children:[!F&&d.jsx(C,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:R,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:D,sourceY:b,targetX:P,targetY:L,sourcePosition:O,targetPosition:$,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:U,markerEnd:V,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),j&&d.jsx(PM,{edge:m,isReconnectable:j,reconnectRadius:f,onReconnect:c,onReconnectStart:h,onReconnectEnd:v,sourceX:D,sourceY:b,targetX:P,targetY:L,sourcePosition:O,targetPosition:$,setUpdateHover:I,setReconnecting:_})]})})}var RM=y.memo(MM);const IM=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function k0({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:h,onReconnectStart:v,onReconnectEnd:x,disableKeyboardA11y:w}){const{edgesFocusable:S,edgesReconnectable:p,elementsSelectable:g,onError:m}=re(IM,ge),N=gM(t);return d.jsxs("div",{className:"react-flow__edges",children:[d.jsx(SM,{defaultColor:e,rfId:n}),N.map(E=>d.jsx(RM,{id:E,edgesFocusable:S,edgesReconnectable:p,elementsSelectable:g,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:f,reconnectRadius:c,onDoubleClick:h,onReconnectStart:v,onReconnectEnd:x,rfId:n,onError:m,edgeTypes:r,disableKeyboardA11y:w},E))]})}k0.displayName="EdgeRenderer";const TM=y.memo(k0),LM=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function AM({children:e}){const t=re(LM);return d.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function DM(e){const t=Zd(),n=y.useRef(!1);y.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const zM=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function $M(e){const t=re(zM),n=ye();return y.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function OM(e){return e.connection.inProgress?{...e.connection,to:Fi(e.connection.to,e.transform)}:{...e.connection}}function FM(e){return OM}function BM(e){const t=FM();return re(t,ge)}const HM=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function VM({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:i,height:s,isValid:l,inProgress:a}=re(HM,ge);return!(i&&o&&a)?null:d.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:d.jsx("g",{className:Ce(["react-flow__connection",Sv(l)]),children:d.jsx(C0,{style:t,type:n,CustomComponent:r,isValid:l})})})}const C0=({style:e,type:t=En.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:i,fromNode:s,fromHandle:l,fromPosition:a,to:u,toNode:f,toHandle:c,toPosition:h,pointer:v}=BM();if(!o)return;if(n)return d.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:h,connectionStatus:Sv(r),toNode:f,toHandle:c,pointer:v});let x="";const w={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:h};switch(t){case En.Bezier:[x]=Tv(w);break;case En.SimpleBezier:[x]=f0(w);break;case En.Step:[x]=Nc({...w,borderRadius:0});break;case En.SmoothStep:[x]=Nc(w);break;default:[x]=Av(w)}return d.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};C0.displayName="ConnectionLine";const UM={};function Op(e=UM){y.useRef(e),ye(),y.useEffect(()=>{},[e])}function WM(){ye(),y.useRef(!1),y.useEffect(()=>{},[])}function b0({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:h,onSelectionEnd:v,connectionLineType:x,connectionLineStyle:w,connectionLineComponent:S,connectionLineContainerStyle:p,selectionKeyCode:g,selectionOnDrag:m,selectionMode:N,multiSelectionKeyCode:E,panActivationKeyCode:C,zoomActivationKeyCode:k,deleteKeyCode:j,onlyRenderVisibleElements:R,elementsSelectable:z,defaultViewport:T,translateExtent:I,minZoom:F,maxZoom:_,preventScrolling:A,defaultMarkerColor:M,zoomOnScroll:D,zoomOnPinch:b,panOnScroll:P,panOnScrollSpeed:L,panOnScrollMode:O,zoomOnDoubleClick:$,panOnDrag:U,onPaneClick:V,onPaneMouseEnter:Y,onPaneMouseMove:X,onPaneMouseLeave:G,onPaneScroll:H,onPaneContextMenu:Q,paneClickDistance:te,nodeClickDistance:J,onEdgeContextMenu:Z,onEdgeMouseEnter:q,onEdgeMouseMove:se,onEdgeMouseLeave:ce,reconnectRadius:ie,onReconnect:De,onReconnectStart:fn,onReconnectEnd:Gt,noDragClassName:Vn,noWheelClassName:xo,noPanClassName:wo,disableKeyboardA11y:So,nodeExtent:ya,rfId:Hi,viewport:mr,onViewportChange:No}){return Op(e),Op(t),WM(),DM(n),$M(mr),d.jsx(sM,{onPaneClick:V,onPaneMouseEnter:Y,onPaneMouseMove:X,onPaneMouseLeave:G,onPaneContextMenu:Q,onPaneScroll:H,paneClickDistance:te,deleteKeyCode:j,selectionKeyCode:g,selectionOnDrag:m,selectionMode:N,onSelectionStart:h,onSelectionEnd:v,multiSelectionKeyCode:E,panActivationKeyCode:C,zoomActivationKeyCode:k,elementsSelectable:z,zoomOnScroll:D,zoomOnPinch:b,zoomOnDoubleClick:$,panOnScroll:P,panOnScrollSpeed:L,panOnScrollMode:O,panOnDrag:U,defaultViewport:T,translateExtent:I,minZoom:F,maxZoom:_,onSelectionContextMenu:c,preventScrolling:A,noDragClassName:Vn,noWheelClassName:xo,noPanClassName:wo,disableKeyboardA11y:So,onViewportChange:No,isControlledViewport:!!mr,children:d.jsxs(AM,{children:[d.jsx(TM,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:De,onReconnectStart:fn,onReconnectEnd:Gt,onlyRenderVisibleElements:R,onEdgeContextMenu:Z,onEdgeMouseEnter:q,onEdgeMouseMove:se,onEdgeMouseLeave:ce,reconnectRadius:ie,defaultMarkerColor:M,noPanClassName:wo,disableKeyboardA11y:So,rfId:Hi}),d.jsx(VM,{style:w,type:x,component:S,containerStyle:p}),d.jsx("div",{className:"react-flow__edgelabel-renderer"}),d.jsx(mM,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:f,nodeClickDistance:J,onlyRenderVisibleElements:R,noPanClassName:wo,noDragClassName:Vn,disableKeyboardA11y:So,nodeExtent:ya,rfId:Hi}),d.jsx("div",{className:"react-flow__viewport-portal"})]})})}b0.displayName="GraphView";const YM=y.memo(b0),Fp=({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:h="basic"}={})=>{const v=new Map,x=new Map,w=new Map,S=new Map,p=r??t??[],g=n??e??[],m=f??[0,0],N=c??Ei;$v(w,S,p);const E=kc(g,v,x,{nodeOrigin:m,nodeExtent:N,zIndexMode:h});let C=[0,0,1];if(s&&o&&i){const k=$i(v,{filter:T=>!!((T.width||T.initialWidth)&&(T.height||T.initialHeight))}),{x:j,y:R,zoom:z}=Wd(k,o,i,a,u,(l==null?void 0:l.padding)??.1);C=[j,R,z]}return{rfId:"1",width:o??0,height:i??0,transform:C,nodes:g,nodesInitialized:E,nodeLookup:v,parentLookup:x,edges:p,edgeLookup:S,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:Ei,nodeExtent:N,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:io.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,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:{...wv},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:W_,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:xv,zIndexMode:h,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},XM=({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:h})=>uP((v,x)=>{async function w(){const{nodeLookup:S,panZoom:p,fitViewOptions:g,fitViewResolver:m,width:N,height:E,minZoom:C,maxZoom:k}=x();p&&(await V_({nodes:S,width:N,height:E,panZoom:p,minZoom:C,maxZoom:k},g),m==null||m.resolve(!0),v({fitViewResolver:null}))}return{...Fp({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:h}),setNodes:S=>{const{nodeLookup:p,parentLookup:g,nodeOrigin:m,elevateNodesOnSelect:N,fitViewQueued:E,zIndexMode:C}=x(),k=kc(S,p,g,{nodeOrigin:m,nodeExtent:c,elevateNodesOnSelect:N,checkEquality:!0,zIndexMode:C});E&&k?(w(),v({nodes:S,nodesInitialized:k,fitViewQueued:!1,fitViewOptions:void 0})):v({nodes:S,nodesInitialized:k})},setEdges:S=>{const{connectionLookup:p,edgeLookup:g}=x();$v(p,g,S),v({edges:S})},setDefaultNodesAndEdges:(S,p)=>{if(S){const{setNodes:g}=x();g(S),v({hasDefaultNodes:!0})}if(p){const{setEdges:g}=x();g(p),v({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:p,nodeLookup:g,parentLookup:m,domNode:N,nodeOrigin:E,nodeExtent:C,debug:k,fitViewQueued:j,zIndexMode:R}=x(),{changes:z,updatedInternals:T}=hj(S,g,m,N,E,C,R);T&&(uj(g,m,{nodeOrigin:E,nodeExtent:C,zIndexMode:R}),j?(w(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),(z==null?void 0:z.length)>0&&(k&&console.log("React Flow: trigger node changes",z),p==null||p(z)))},updateNodePositions:(S,p=!1)=>{const g=[];let m=[];const{nodeLookup:N,triggerNodeChanges:E,connection:C,updateConnection:k,onNodesChangeMiddlewareMap:j}=x();for(const[R,z]of S){const T=N.get(R),I=!!(T!=null&&T.expandParent&&(T!=null&&T.parentId)&&(z!=null&&z.position)),F={id:R,type:"position",position:I?{x:Math.max(0,z.position.x),y:Math.max(0,z.position.y)}:z.position,dragging:p};if(T&&C.inProgress&&C.fromNode.id===T.id){const _=dr(T,C.fromHandle,K.Left,!0);k({...C,from:_})}I&&T.parentId&&g.push({id:R,parentId:T.parentId,rect:{...z.internals.positionAbsolute,width:z.measured.width??0,height:z.measured.height??0}}),m.push(F)}if(g.length>0){const{parentLookup:R,nodeOrigin:z}=x(),T=qd(g,N,R,z);m.push(...T)}for(const R of j.values())m=R(m);E(m)},triggerNodeChanges:S=>{const{onNodesChange:p,setNodes:g,nodes:m,hasDefaultNodes:N,debug:E}=x();if(S!=null&&S.length){if(N){const C=MP(S,m);g(C)}E&&console.log("React Flow: trigger node changes",S),p==null||p(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:p,setEdges:g,edges:m,hasDefaultEdges:N,debug:E}=x();if(S!=null&&S.length){if(N){const C=RP(S,m);g(C)}E&&console.log("React Flow: trigger edge changes",S),p==null||p(S)}},addSelectedNodes:S=>{const{multiSelectionActive:p,edgeLookup:g,nodeLookup:m,triggerNodeChanges:N,triggerEdgeChanges:E}=x();if(p){const C=S.map(k=>Yn(k,!0));N(C);return}N(Lr(m,new Set([...S]),!0)),E(Lr(g))},addSelectedEdges:S=>{const{multiSelectionActive:p,edgeLookup:g,nodeLookup:m,triggerNodeChanges:N,triggerEdgeChanges:E}=x();if(p){const C=S.map(k=>Yn(k,!0));E(C);return}E(Lr(g,new Set([...S]))),N(Lr(m,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:p}={})=>{const{edges:g,nodes:m,nodeLookup:N,triggerNodeChanges:E,triggerEdgeChanges:C}=x(),k=S||m,j=p||g,R=k.map(T=>{const I=N.get(T.id);return I&&(I.selected=!1),Yn(T.id,!1)}),z=j.map(T=>Yn(T.id,!1));E(R),C(z)},setMinZoom:S=>{const{panZoom:p,maxZoom:g}=x();p==null||p.setScaleExtent([S,g]),v({minZoom:S})},setMaxZoom:S=>{const{panZoom:p,minZoom:g}=x();p==null||p.setScaleExtent([g,S]),v({maxZoom:S})},setTranslateExtent:S=>{var p;(p=x().panZoom)==null||p.setTranslateExtent(S),v({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:p,triggerNodeChanges:g,triggerEdgeChanges:m,elementsSelectable:N}=x();if(!N)return;const E=p.reduce((k,j)=>j.selected?[...k,Yn(j.id,!1)]:k,[]),C=S.reduce((k,j)=>j.selected?[...k,Yn(j.id,!1)]:k,[]);g(E),m(C)},setNodeExtent:S=>{const{nodes:p,nodeLookup:g,parentLookup:m,nodeOrigin:N,elevateNodesOnSelect:E,nodeExtent:C,zIndexMode:k}=x();S[0][0]===C[0][0]&&S[0][1]===C[0][1]&&S[1][0]===C[1][0]&&S[1][1]===C[1][1]||(kc(p,g,m,{nodeOrigin:N,nodeExtent:S,elevateNodesOnSelect:E,checkEquality:!1,zIndexMode:k}),v({nodeExtent:S}))},panBy:S=>{const{transform:p,width:g,height:m,panZoom:N,translateExtent:E}=x();return pj({delta:S,panZoom:N,transform:p,translateExtent:E,width:g,height:m})},setCenter:async(S,p,g)=>{const{width:m,height:N,maxZoom:E,panZoom:C}=x();if(!C)return Promise.resolve(!1);const k=typeof(g==null?void 0:g.zoom)<"u"?g.zoom:E;return await C.setViewport({x:m/2-S*k,y:N/2-p*k,zoom:k},{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:()=>{v({connection:{...wv}})},updateConnection:S=>{v({connection:S})},reset:()=>v({...Fp()})}},Object.is);function GM({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:h,children:v}){const[x]=y.useState(()=>XM({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:h}));return d.jsx(cP,{value:x,children:d.jsx(AP,{children:v})})}function KM({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:h,zIndexMode:v}){return y.useContext(la)?d.jsx(d.Fragment,{children:e}):d.jsx(GM,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:f,nodeOrigin:c,nodeExtent:h,zIndexMode:v,children:e})}const QM={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function qM({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:h,onConnect:v,onConnectStart:x,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:p,onNodeMouseEnter:g,onNodeMouseMove:m,onNodeMouseLeave:N,onNodeContextMenu:E,onNodeDoubleClick:C,onNodeDragStart:k,onNodeDrag:j,onNodeDragStop:R,onNodesDelete:z,onEdgesDelete:T,onDelete:I,onSelectionChange:F,onSelectionDragStart:_,onSelectionDrag:A,onSelectionDragStop:M,onSelectionContextMenu:D,onSelectionStart:b,onSelectionEnd:P,onBeforeDelete:L,connectionMode:O,connectionLineType:$=En.Bezier,connectionLineStyle:U,connectionLineComponent:V,connectionLineContainerStyle:Y,deleteKeyCode:X="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:H=!1,selectionMode:Q=ki.Full,panActivationKeyCode:te="Space",multiSelectionKeyCode:J=bi()?"Meta":"Control",zoomActivationKeyCode:Z=bi()?"Meta":"Control",snapToGrid:q,snapGrid:se,onlyRenderVisibleElements:ce=!1,selectNodesOnDrag:ie,nodesDraggable:De,autoPanOnNodeFocus:fn,nodesConnectable:Gt,nodesFocusable:Vn,nodeOrigin:xo=t0,edgesFocusable:wo,edgesReconnectable:So,elementsSelectable:ya=!0,defaultViewport:Hi=EP,minZoom:mr=.5,maxZoom:No=2,translateExtent:hf=Ei,preventScrolling:Ix=!0,nodeExtent:va,defaultMarkerColor:Tx="#b1b1b7",zoomOnScroll:Lx=!0,zoomOnPinch:Ax=!0,panOnScroll:Dx=!1,panOnScrollSpeed:zx=.5,panOnScrollMode:$x=nr.Free,zoomOnDoubleClick:Ox=!0,panOnDrag:Fx=!0,onPaneClick:Bx,onPaneMouseEnter:Hx,onPaneMouseMove:Vx,onPaneMouseLeave:Ux,onPaneScroll:Wx,onPaneContextMenu:Yx,paneClickDistance:Xx=1,nodeClickDistance:Gx=0,children:Kx,onReconnect:Qx,onReconnectStart:qx,onReconnectEnd:Zx,onEdgeContextMenu:Jx,onEdgeDoubleClick:ew,onEdgeMouseEnter:tw,onEdgeMouseMove:nw,onEdgeMouseLeave:rw,reconnectRadius:ow=10,onNodesChange:iw,onEdgesChange:sw,noDragClassName:lw="nodrag",noWheelClassName:aw="nowheel",noPanClassName:pf="nopan",fitView:mf,fitViewOptions:gf,connectOnClick:uw,attributionPosition:cw,proOptions:dw,defaultEdgeOptions:fw,elevateNodesOnSelect:hw=!0,elevateEdgesOnSelect:pw=!1,disableKeyboardA11y:yf=!1,autoPanOnConnect:mw,autoPanOnNodeDrag:gw,autoPanSpeed:yw,connectionRadius:vw,isValidConnection:xw,onError:ww,style:Sw,id:vf,nodeDragThreshold:Nw,connectionDragThreshold:Ew,viewport:kw,onViewportChange:Cw,width:bw,height:_w,colorMode:jw="light",debug:Pw,onScroll:Vi,ariaLabelConfig:Mw,zIndexMode:xf="basic",...Rw},Iw){const xa=vf||"1",Tw=_P(jw),Lw=y.useCallback(wf=>{wf.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Vi==null||Vi(wf)},[Vi]);return d.jsx("div",{"data-testid":"rf__wrapper",...Rw,onScroll:Lw,style:{...Sw,...QM},ref:Iw,className:Ce(["react-flow",o,Tw]),id:vf,role:"application",children:d.jsxs(KM,{nodes:e,edges:t,width:bw,height:_w,fitView:mf,fitViewOptions:gf,minZoom:mr,maxZoom:No,nodeOrigin:xo,nodeExtent:va,zIndexMode:xf,children:[d.jsx(YM,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:g,onNodeMouseMove:m,onNodeMouseLeave:N,onNodeContextMenu:E,onNodeDoubleClick:C,nodeTypes:i,edgeTypes:s,connectionLineType:$,connectionLineStyle:U,connectionLineComponent:V,connectionLineContainerStyle:Y,selectionKeyCode:G,selectionOnDrag:H,selectionMode:Q,deleteKeyCode:X,multiSelectionKeyCode:J,panActivationKeyCode:te,zoomActivationKeyCode:Z,onlyRenderVisibleElements:ce,defaultViewport:Hi,translateExtent:hf,minZoom:mr,maxZoom:No,preventScrolling:Ix,zoomOnScroll:Lx,zoomOnPinch:Ax,zoomOnDoubleClick:Ox,panOnScroll:Dx,panOnScrollSpeed:zx,panOnScrollMode:$x,panOnDrag:Fx,onPaneClick:Bx,onPaneMouseEnter:Hx,onPaneMouseMove:Vx,onPaneMouseLeave:Ux,onPaneScroll:Wx,onPaneContextMenu:Yx,paneClickDistance:Xx,nodeClickDistance:Gx,onSelectionContextMenu:D,onSelectionStart:b,onSelectionEnd:P,onReconnect:Qx,onReconnectStart:qx,onReconnectEnd:Zx,onEdgeContextMenu:Jx,onEdgeDoubleClick:ew,onEdgeMouseEnter:tw,onEdgeMouseMove:nw,onEdgeMouseLeave:rw,reconnectRadius:ow,defaultMarkerColor:Tx,noDragClassName:lw,noWheelClassName:aw,noPanClassName:pf,rfId:xa,disableKeyboardA11y:yf,nodeExtent:va,viewport:kw,onViewportChange:Cw}),d.jsx(bP,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:v,onConnectStart:x,onConnectEnd:w,onClickConnectStart:S,onClickConnectEnd:p,nodesDraggable:De,autoPanOnNodeFocus:fn,nodesConnectable:Gt,nodesFocusable:Vn,edgesFocusable:wo,edgesReconnectable:So,elementsSelectable:ya,elevateNodesOnSelect:hw,elevateEdgesOnSelect:pw,minZoom:mr,maxZoom:No,nodeExtent:va,onNodesChange:iw,onEdgesChange:sw,snapToGrid:q,snapGrid:se,connectionMode:O,translateExtent:hf,connectOnClick:uw,defaultEdgeOptions:fw,fitView:mf,fitViewOptions:gf,onNodesDelete:z,onEdgesDelete:T,onDelete:I,onNodeDragStart:k,onNodeDrag:j,onNodeDragStop:R,onSelectionDrag:A,onSelectionDragStart:_,onSelectionDragStop:M,onMove:f,onMoveStart:c,onMoveEnd:h,noPanClassName:pf,nodeOrigin:xo,rfId:xa,autoPanOnConnect:mw,autoPanOnNodeDrag:gw,autoPanSpeed:yw,onError:ww,connectionRadius:vw,isValidConnection:xw,selectNodesOnDrag:ie,nodeDragThreshold:Nw,connectionDragThreshold:Ew,onBeforeDelete:L,debug:Pw,ariaLabelConfig:Mw,zIndexMode:xf}),d.jsx(NP,{onSelectionChange:F}),Kx,d.jsx(yP,{proOptions:dw,position:cw}),d.jsx(gP,{rfId:xa,disableKeyboardA11y:yf})]})})}var ZM=r0(qM);function JM({dimensions:e,lineWidth:t,variant:n,className:r}){return d.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Ce(["react-flow__background-pattern",n,r])})}function e3({radius:e,className:t}){return d.jsx("circle",{cx:e,cy:e,r:e,className:Ce(["react-flow__background-pattern","dots",t])})}var Ln;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ln||(Ln={}));const t3={[Ln.Dots]:1,[Ln.Lines]:1,[Ln.Cross]:6},n3=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function _0({id:e,variant:t=Ln.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:l,style:a,className:u,patternClassName:f}){const c=y.useRef(null),{transform:h,patternId:v}=re(n3,ge),x=r||t3[t],w=t===Ln.Dots,S=t===Ln.Cross,p=Array.isArray(n)?n:[n,n],g=[p[0]*h[2]||1,p[1]*h[2]||1],m=x*h[2],N=Array.isArray(i)?i:[i,i],E=S?[m,m]:g,C=[N[0]*h[2]||1+E[0]/2,N[1]*h[2]||1+E[1]/2],k=`${v}${e||""}`;return d.jsxs("svg",{className:Ce(["react-flow__background",u]),style:{...a,...ua,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:c,"data-testid":"rf__background",children:[d.jsx("pattern",{id:k,x:h[0]%g[0],y:h[1]%g[1],width:g[0],height:g[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${C[0]},-${C[1]})`,children:w?d.jsx(e3,{radius:m/2,className:f}):d.jsx(JM,{dimensions:E,lineWidth:o,variant:t,className:f})}),d.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${k})`})]})}_0.displayName="Background";const r3=y.memo(_0);function o3(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:d.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function i3(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:d.jsx("path",{d:"M0 0h32v4.2H0z"})})}function s3(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:d.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 l3(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:d.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 a3(){return d.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:d.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 ys({children:e,className:t,...n}){return d.jsx("button",{type:"button",className:Ce(["react-flow__controls-button",t]),...n,children:e})}const u3=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function j0({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:h="vertical","aria-label":v}){const x=ye(),{isInteractive:w,minZoomReached:S,maxZoomReached:p,ariaLabelConfig:g}=re(u3,ge),{zoomIn:m,zoomOut:N,fitView:E}=Zd(),C=()=>{m(),i==null||i()},k=()=>{N(),s==null||s()},j=()=>{E(o),l==null||l()},R=()=>{x.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),a==null||a(!w)},z=h==="horizontal"?"horizontal":"vertical";return d.jsxs(aa,{className:Ce(["react-flow__controls",z,u]),position:c,style:e,"data-testid":"rf__controls","aria-label":v??g["controls.ariaLabel"],children:[t&&d.jsxs(d.Fragment,{children:[d.jsx(ys,{onClick:C,className:"react-flow__controls-zoomin",title:g["controls.zoomIn.ariaLabel"],"aria-label":g["controls.zoomIn.ariaLabel"],disabled:p,children:d.jsx(o3,{})}),d.jsx(ys,{onClick:k,className:"react-flow__controls-zoomout",title:g["controls.zoomOut.ariaLabel"],"aria-label":g["controls.zoomOut.ariaLabel"],disabled:S,children:d.jsx(i3,{})})]}),n&&d.jsx(ys,{className:"react-flow__controls-fitview",onClick:j,title:g["controls.fitView.ariaLabel"],"aria-label":g["controls.fitView.ariaLabel"],children:d.jsx(s3,{})}),r&&d.jsx(ys,{className:"react-flow__controls-interactive",onClick:R,title:g["controls.interactive.ariaLabel"],"aria-label":g["controls.interactive.ariaLabel"],children:w?d.jsx(a3,{}):d.jsx(l3,{})}),f]})}j0.displayName="Controls";const c3=y.memo(j0);function d3({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:h,onClick:v}){const{background:x,backgroundColor:w}=i||{},S=s||x||w;return d.jsx("rect",{className:Ce(["react-flow__minimap-node",{selected:h},u]),x:t,y:n,rx:f,ry:f,width:r,height:o,style:{fill:S,stroke:l,strokeWidth:a},shapeRendering:c,onClick:v?p=>v(p,e):void 0})}const f3=y.memo(d3),h3=e=>e.nodes.map(t=>t.id),ou=e=>e instanceof Function?e:()=>e;function p3({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=f3,onClick:s}){const l=re(h3,ge),a=ou(t),u=ou(e),f=ou(n),c=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return d.jsx(d.Fragment,{children:l.map(h=>d.jsx(g3,{id:h,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:f,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:c},h))})}function m3({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:h,height:v}=re(x=>{const{internals:w}=x.nodeLookup.get(e),S=w.userNode,{x:p,y:g}=w.positionAbsolute,{width:m,height:N}=dn(S);return{node:S,x:p,y:g,width:m,height:N}},ge);return!u||u.hidden||!_v(u)?null:d.jsx(l,{x:f,y:c,width:h,height:v,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 g3=y.memo(m3);var y3=y.memo(p3);const v3=200,x3=150,w3=e=>!e.hidden,S3=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?bv($i(e.nodeLookup,{filter:w3}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},N3="react-flow__minimap-desc";function P0({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:h="bottom-right",onClick:v,onNodeClick:x,pannable:w=!1,zoomable:S=!1,ariaLabel:p,inversePan:g,zoomStep:m=1,offsetScale:N=5}){const E=ye(),C=y.useRef(null),{boundingRect:k,viewBB:j,rfId:R,panZoom:z,translateExtent:T,flowWidth:I,flowHeight:F,ariaLabelConfig:_}=re(S3,ge),A=(e==null?void 0:e.width)??v3,M=(e==null?void 0:e.height)??x3,D=k.width/A,b=k.height/M,P=Math.max(D,b),L=P*A,O=P*M,$=N*P,U=k.x-(L-k.width)/2-$,V=k.y-(O-k.height)/2-$,Y=L+$*2,X=O+$*2,G=`${N3}-${R}`,H=y.useRef(0),Q=y.useRef();H.current=P,y.useEffect(()=>{if(C.current&&z)return Q.current=Ej({domNode:C.current,panZoom:z,getTransform:()=>E.getState().transform,getViewScale:()=>H.current}),()=>{var q;(q=Q.current)==null||q.destroy()}},[z]),y.useEffect(()=>{var q;(q=Q.current)==null||q.update({translateExtent:T,width:I,height:F,inversePan:g,pannable:w,zoomStep:m,zoomable:S})},[w,S,g,m,T,I,F]);const te=v?q=>{var ie;const[se,ce]=((ie=Q.current)==null?void 0:ie.pointer(q))||[0,0];v(q,{x:se,y:ce})}:void 0,J=x?y.useCallback((q,se)=>{const ce=E.getState().nodeLookup.get(se).internals.userNode;x(q,ce)},[]):void 0,Z=p??_["minimap.ariaLabel"];return d.jsx(aa,{position:h,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*P: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:Ce(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:d.jsxs("svg",{width:A,height:M,viewBox:`${U} ${V} ${Y} ${X}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":G,ref:C,onClick:te,children:[Z&&d.jsx("title",{id:G,children:Z}),d.jsx(y3,{onClick:J,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:l}),d.jsx("path",{className:"react-flow__minimap-mask",d:`M${U-$},${V-$}h${Y+$*2}v${X+$*2}h${-Y-$*2}z
|
|
233
|
-
M${j.x},${j.y}h${j.width}v${j.height}h${-j.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}P0.displayName="MiniMap";y.memo(P0);const E3=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,k3={[uo.Line]:"right",[uo.Handle]:"bottom-right"};function C3({nodeId:e,position:t,variant:n=uo.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:h,autoScale:v=!0,shouldResize:x,onResizeStart:w,onResize:S,onResizeEnd:p}){const g=l0(),m=typeof e=="string"?e:g,N=ye(),E=y.useRef(null),C=n===uo.Handle,k=re(y.useCallback(E3(C&&v),[C,v]),ge),j=y.useRef(null),R=t??k3[n];y.useEffect(()=>{if(!(!E.current||!m))return j.current||(j.current=zj({domNode:E.current,nodeId:m,getStoreItems:()=>{const{nodeLookup:T,transform:I,snapGrid:F,snapToGrid:_,nodeOrigin:A,domNode:M}=N.getState();return{nodeLookup:T,transform:I,snapGrid:F,snapToGrid:_,nodeOrigin:A,paneDomNode:M}},onChange:(T,I)=>{const{triggerNodeChanges:F,nodeLookup:_,parentLookup:A,nodeOrigin:M}=N.getState(),D=[],b={x:T.x,y:T.y},P=_.get(m);if(P&&P.expandParent&&P.parentId){const L=P.origin??M,O=T.width??P.measured.width??0,$=T.height??P.measured.height??0,U={id:P.id,parentId:P.parentId,rect:{width:O,height:$,...jv({x:T.x??P.position.x,y:T.y??P.position.y},{width:O,height:$},P.parentId,_,L)}},V=qd([U],_,A,M);D.push(...V),b.x=T.x?Math.max(L[0]*O,T.x):void 0,b.y=T.y?Math.max(L[1]*$,T.y):void 0}if(b.x!==void 0&&b.y!==void 0){const L={id:m,type:"position",position:{...b}};D.push(L)}if(T.width!==void 0&&T.height!==void 0){const O={id:m,type:"dimensions",resizing:!0,setAttributes:h?h==="horizontal"?"width":"height":!0,dimensions:{width:T.width,height:T.height}};D.push(O)}for(const L of I){const O={...L,type:"position"};D.push(O)}F(D)},onEnd:({width:T,height:I})=>{const F={id:m,type:"dimensions",resizing:!1,dimensions:{width:T,height:I}};N.getState().triggerNodeChanges([F])}})),j.current.update({controlPosition:R,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:f},keepAspectRatio:c,resizeDirection:h,onResizeStart:w,onResize:S,onResizeEnd:p,shouldResize:x}),()=>{var T;(T=j.current)==null||T.destroy()}},[R,l,a,u,f,c,w,S,p,x]);const z=R.split("-");return d.jsx("div",{className:Ce(["react-flow__resize-control","nodrag",...z,n,r]),ref:E,style:{...o,scale:k,...s&&{[C?"backgroundColor":"borderColor"]:s}},children:i})}y.memo(C3);function b3(){const[e,t]=y.useState(()=>document.documentElement.classList.contains("dark"));return y.useEffect(()=>{const n=new MutationObserver(()=>t(document.documentElement.classList.contains("dark")));return n.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]),e}function _3(){const[e,t]=y.useState([]),[n,r]=y.useState([]),[o,i]=y.useState(!0),s=b3();y.useEffect(()=>{Promise.all([Je.discovery.agents(),Je.observations.permissions()]).then(([u,f])=>{t(u.data??[]),r(f.data??[]),i(!1)}).catch(()=>i(!1))},[]);const{nodes:l,edges:a}=y.useMemo(()=>{const u=[],f=[],c=new Set,h=new Map,v=s?{background:"#18181b",color:"#fafafa",border:"1px solid #3f3f46"}:{background:"#ffffff",color:"#09090b",border:"1px solid #e4e4e7"},x=s?{background:"#09090b",color:"#a1a1aa",border:"1px solid #3f3f46"}:{background:"#f4f4f5",color:"#52525b",border:"1px solid #d4d4d8"},w=s?"#52525b":"#a1a1aa",S=s?"#27272a":"#e4e4e7";return e.forEach((p,g)=>{const m=`agent-${p.id}`;p.registeredAgentId&&h.set(p.registeredAgentId,m),h.set(p.id,m),u.push({id:m,position:{x:100,y:g*120},data:{label:`${p.emoji||"🤖"} ${p.name}`},style:{...v,borderRadius:"8px",padding:"8px 16px",fontSize:"13px"}})}),n.forEach(p=>{const g=`tool-${p.toolName}`;c.has(p.toolName)||(c.add(p.toolName),u.push({id:g,position:{x:400,y:c.size*80},data:{label:`🔧 ${p.toolName}`},style:{...x,borderRadius:"8px",padding:"6px 12px",fontSize:"12px"}}));const m=h.get(p.agentId)??`agent-${p.agentId}`;f.push({id:`e-${p.agentId}-${p.toolName}`,source:m,target:g,animated:p.accessPattern==="write",style:{stroke:p.accessPattern==="write"?"#eab308":w}})}),{nodes:u,edges:f,bgColor:S}},[e,n,s]);return o?d.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Identity Graph"}),d.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Agent-to-tool relationship visualization"})]}),d.jsx("div",{className:"h-[600px] rounded-lg border border-border bg-card",children:d.jsxs(ZM,{nodes:l,edges:a,fitView:!0,proOptions:{hideAttribution:!0},children:[d.jsx(r3,{color:s?"#27272a":"#e4e4e7",gap:20}),d.jsx(c3,{})]})})]})}const ef=y.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:Ee("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));ef.displayName="Textarea";const Vr=y.forwardRef(({className:e,...t},n)=>d.jsx("label",{ref:n,className:Ee("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));Vr.displayName="Label";function Le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function j3(e,t){const n=y.createContext(t);function r(i){const{children:s,...l}=i,a=y.useMemo(()=>l,Object.values(l));return d.jsx(n.Provider,{value:a,children:s})}function o(i){const s=y.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return r.displayName=e+"Provider",[r,o]}function da(e,t=[]){let n=[];function r(i,s){const l=y.createContext(s),a=n.length;n=[...n,s];function u(c){const{scope:h,children:v,...x}=c,w=(h==null?void 0:h[e][a])||l,S=y.useMemo(()=>x,Object.values(x));return d.jsx(w.Provider,{value:S,children:v})}function f(c,h){const v=(h==null?void 0:h[e][a])||l,x=y.useContext(v);if(x)return x;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=n.map(s=>y.createContext(s));return function(l){const a=(l==null?void 0:l[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...l,[e]:a}}),[l,a])}};return o.scopeName=e,[r,P3(o,...t)]}function P3(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((l,{useScope:a,scopeName:u})=>{const c=a(i)[`__scope${u}`];return{...l,...c}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function M3(e){const t=e+"CollectionProvider",[n,r]=da(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:w}=v,S=At.useRef(null),p=At.useRef(new Map).current;return d.jsx(o,{scope:x,itemMap:p,collectionRef:S,children:w})};s.displayName=t;const l=e+"CollectionSlot",a=At.forwardRef((v,x)=>{const{scope:w,children:S}=v,p=i(l,w),g=Ut(x,p.collectionRef);return d.jsx(no,{ref:g,children:S})});a.displayName=l;const u=e+"CollectionItemSlot",f="data-radix-collection-item",c=At.forwardRef((v,x)=>{const{scope:w,children:S,...p}=v,g=At.useRef(null),m=Ut(x,g),N=i(u,w);return At.useEffect(()=>(N.itemMap.set(g,{ref:g,...p}),()=>void N.itemMap.delete(g))),d.jsx(no,{[f]:"",ref:m,children:S})});c.displayName=u;function h(v){const x=i(e+"CollectionConsumer",v);return At.useCallback(()=>{const S=x.collectionRef.current;if(!S)return[];const p=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((N,E)=>p.indexOf(N.ref.current)-p.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:a,ItemSlot:c},h,r]}var Pl=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},R3=qw.useId||(()=>{}),I3=0;function ei(e){const[t,n]=y.useState(R3());return Pl(()=>{n(r=>r??String(I3++))},[e]),t?`radix-${t}`:""}var T3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ye=T3.reduce((e,t)=>{const n=y.forwardRef((r,o)=>{const{asChild:i,...s}=r,l=i?no:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function L3(e,t){e&&Xl.flushSync(()=>e.dispatchEvent(t))}function On(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function tf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=A3({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:r,l=On(n),a=y.useCallback(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&l(c)}else o(u)},[i,e,o,l]);return[s,a]}function A3({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,o=y.useRef(r),i=On(t);return y.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}var D3=y.createContext(void 0);function M0(e){const t=y.useContext(D3);return e||t||"ltr"}var iu="rovingFocusGroup.onEntryFocus",z3={bubbles:!1,cancelable:!0},fa="RovingFocusGroup",[_c,R0,$3]=M3(fa),[O3,I0]=da(fa,[$3]),[F3,B3]=O3(fa),T0=y.forwardRef((e,t)=>d.jsx(_c.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(_c.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(H3,{...e,ref:t})})}));T0.displayName=fa;var H3=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:a,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...c}=e,h=y.useRef(null),v=Ut(t,h),x=M0(i),[w=null,S]=tf({prop:s,defaultProp:l,onChange:a}),[p,g]=y.useState(!1),m=On(u),N=R0(n),E=y.useRef(!1),[C,k]=y.useState(0);return y.useEffect(()=>{const j=h.current;if(j)return j.addEventListener(iu,m),()=>j.removeEventListener(iu,m)},[m]),d.jsx(F3,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:w,onItemFocus:y.useCallback(j=>S(j),[S]),onItemShiftTab:y.useCallback(()=>g(!0),[]),onFocusableItemAdd:y.useCallback(()=>k(j=>j+1),[]),onFocusableItemRemove:y.useCallback(()=>k(j=>j-1),[]),children:d.jsx(Ye.div,{tabIndex:p||C===0?-1:0,"data-orientation":r,...c,ref:v,style:{outline:"none",...e.style},onMouseDown:Le(e.onMouseDown,()=>{E.current=!0}),onFocus:Le(e.onFocus,j=>{const R=!E.current;if(j.target===j.currentTarget&&R&&!p){const z=new CustomEvent(iu,z3);if(j.currentTarget.dispatchEvent(z),!z.defaultPrevented){const T=N().filter(M=>M.focusable),I=T.find(M=>M.active),F=T.find(M=>M.id===w),A=[I,F,...T].filter(Boolean).map(M=>M.ref.current);D0(A,f)}}E.current=!1}),onBlur:Le(e.onBlur,()=>g(!1))})})}),L0="RovingFocusGroupItem",A0=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...s}=e,l=ei(),a=i||l,u=B3(L0,n),f=u.currentTabStopId===a,c=R0(n),{onFocusableItemAdd:h,onFocusableItemRemove:v}=u;return y.useEffect(()=>{if(r)return h(),()=>v()},[r,h,v]),d.jsx(_c.ItemSlot,{scope:n,id:a,focusable:r,active:o,children:d.jsx(Ye.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Le(e.onMouseDown,x=>{r?u.onItemFocus(a):x.preventDefault()}),onFocus:Le(e.onFocus,()=>u.onItemFocus(a)),onKeyDown:Le(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){u.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=W3(x,u.orientation,u.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let p=c().filter(g=>g.focusable).map(g=>g.ref.current);if(w==="last")p.reverse();else if(w==="prev"||w==="next"){w==="prev"&&p.reverse();const g=p.indexOf(x.currentTarget);p=u.loop?Y3(p,g+1):p.slice(g+1)}setTimeout(()=>D0(p))}})})})});A0.displayName=L0;var V3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function U3(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function W3(e,t,n){const r=U3(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return V3[r]}function D0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Y3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var X3=T0,G3=A0;function K3(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Bi=e=>{const{present:t,children:n}=e,r=Q3(t),o=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),i=Ut(r.ref,q3(o));return typeof n=="function"||r.isPresent?y.cloneElement(o,{ref:i}):null};Bi.displayName="Presence";function Q3(e){const[t,n]=y.useState(),r=y.useRef({}),o=y.useRef(e),i=y.useRef("none"),s=e?"mounted":"unmounted",[l,a]=K3(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=vs(r.current);i.current=l==="mounted"?u:"none"},[l]),Pl(()=>{const u=r.current,f=o.current;if(f!==e){const h=i.current,v=vs(u);e?a("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(f&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),Pl(()=>{if(t){const u=c=>{const v=vs(r.current).includes(c.animationName);c.target===t&&v&&Xl.flushSync(()=>a("ANIMATION_END"))},f=c=>{c.target===t&&(i.current=vs(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:y.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function vs(e){return(e==null?void 0:e.animationName)||"none"}function q3(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nf="Tabs",[Z3]=da(nf,[I0]),z0=I0(),[J3,rf]=Z3(nf),$0=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:l,activationMode:a="automatic",...u}=e,f=M0(l),[c,h]=tf({prop:r,onChange:o,defaultProp:i});return d.jsx(J3,{scope:n,baseId:ei(),value:c,onValueChange:h,orientation:s,dir:f,activationMode:a,children:d.jsx(Ye.div,{dir:f,"data-orientation":s,...u,ref:t})})});$0.displayName=nf;var O0="TabsList",F0=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,i=rf(O0,n),s=z0(n);return d.jsx(X3,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:d.jsx(Ye.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});F0.displayName=O0;var B0="TabsTrigger",H0=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...i}=e,s=rf(B0,n),l=z0(n),a=W0(s.baseId,r),u=Y0(s.baseId,r),f=r===s.value;return d.jsx(G3,{asChild:!0,...l,focusable:!o,active:f,children:d.jsx(Ye.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:a,...i,ref:t,onMouseDown:Le(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:Le(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:Le(e.onFocus,()=>{const c=s.activationMode!=="manual";!f&&!o&&c&&s.onValueChange(r)})})})});H0.displayName=B0;var V0="TabsContent",U0=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:i,...s}=e,l=rf(V0,n),a=W0(l.baseId,r),u=Y0(l.baseId,r),f=r===l.value,c=y.useRef(f);return y.useEffect(()=>{const h=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Bi,{present:o||f,children:({present:h})=>d.jsx(Ye.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":a,hidden:!h,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:h&&i})})});U0.displayName=V0;function W0(e,t){return`${e}-trigger-${t}`}function Y0(e,t){return`${e}-content-${t}`}var eR=$0,X0=F0,G0=H0,K0=U0;const Q0=eR,of=y.forwardRef(({className:e,...t},n)=>d.jsx(X0,{ref:n,className:Ee("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));of.displayName=X0.displayName;const Ur=y.forwardRef(({className:e,...t},n)=>d.jsx(G0,{ref:n,className:Ee("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Ur.displayName=G0.displayName;const Wr=y.forwardRef(({className:e,...t},n)=>d.jsx(K0,{ref:n,className:Ee("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Wr.displayName=K0.displayName;function tR(e,t=globalThis==null?void 0:globalThis.document){const n=On(e);y.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var nR="DismissableLayer",jc="dismissableLayer.update",rR="dismissableLayer.pointerDownOutside",oR="dismissableLayer.focusOutside",Bp,q0=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Z0=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...a}=e,u=y.useContext(q0),[f,c]=y.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=y.useState({}),x=Ut(t,k=>c(k)),w=Array.from(u.layers),[S]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=w.indexOf(S),g=f?w.indexOf(f):-1,m=u.layersWithOutsidePointerEventsDisabled.size>0,N=g>=p,E=lR(k=>{const j=k.target,R=[...u.branches].some(z=>z.contains(j));!N||R||(o==null||o(k),s==null||s(k),k.defaultPrevented||l==null||l())},h),C=aR(k=>{const j=k.target;[...u.branches].some(z=>z.contains(j))||(i==null||i(k),s==null||s(k),k.defaultPrevented||l==null||l())},h);return tR(k=>{g===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},h),y.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Bp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Hp(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Bp)}},[f,h,n,u]),y.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Hp())},[f,u]),y.useEffect(()=>{const k=()=>v({});return document.addEventListener(jc,k),()=>document.removeEventListener(jc,k)},[]),d.jsx(Ye.div,{...a,ref:x,style:{pointerEvents:m?N?"auto":"none":void 0,...e.style},onFocusCapture:Le(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Le(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Le(e.onPointerDownCapture,E.onPointerDownCapture)})});Z0.displayName=nR;var iR="DismissableLayerBranch",sR=y.forwardRef((e,t)=>{const n=y.useContext(q0),r=y.useRef(null),o=Ut(t,r);return y.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),d.jsx(Ye.div,{...e,ref:o})});sR.displayName=iR;function lR(e,t=globalThis==null?void 0:globalThis.document){const n=On(e),r=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let a=function(){J0(rR,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=a,t.addEventListener("click",o.current,{once:!0})):a()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function aR(e,t=globalThis==null?void 0:globalThis.document){const n=On(e),r=y.useRef(!1);return y.useEffect(()=>{const o=i=>{i.target&&!r.current&&J0(oR,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Hp(){const e=new CustomEvent(jc);document.dispatchEvent(e)}function J0(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?L3(o,i):o.dispatchEvent(i)}var su="focusScope.autoFocusOnMount",lu="focusScope.autoFocusOnUnmount",Vp={bubbles:!1,cancelable:!0},uR="FocusScope",ex=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,a]=y.useState(null),u=On(o),f=On(i),c=y.useRef(null),h=Ut(t,w=>a(w)),v=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let w=function(m){if(v.paused||!l)return;const N=m.target;l.contains(N)?c.current=N:vn(c.current,{select:!0})},S=function(m){if(v.paused||!l)return;const N=m.relatedTarget;N!==null&&(l.contains(N)||vn(c.current,{select:!0}))},p=function(m){if(document.activeElement===document.body)for(const E of m)E.removedNodes.length>0&&vn(l)};document.addEventListener("focusin",w),document.addEventListener("focusout",S);const g=new MutationObserver(p);return l&&g.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",S),g.disconnect()}}},[r,l,v.paused]),y.useEffect(()=>{if(l){Wp.add(v);const w=document.activeElement;if(!l.contains(w)){const p=new CustomEvent(su,Vp);l.addEventListener(su,u),l.dispatchEvent(p),p.defaultPrevented||(cR(mR(tx(l)),{select:!0}),document.activeElement===w&&vn(l))}return()=>{l.removeEventListener(su,u),setTimeout(()=>{const p=new CustomEvent(lu,Vp);l.addEventListener(lu,f),l.dispatchEvent(p),p.defaultPrevented||vn(w??document.body,{select:!0}),l.removeEventListener(lu,f),Wp.remove(v)},0)}}},[l,u,f,v]);const x=y.useCallback(w=>{if(!n&&!r||v.paused)return;const S=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,p=document.activeElement;if(S&&p){const g=w.currentTarget,[m,N]=dR(g);m&&N?!w.shiftKey&&p===N?(w.preventDefault(),n&&vn(m,{select:!0})):w.shiftKey&&p===m&&(w.preventDefault(),n&&vn(N,{select:!0})):p===g&&w.preventDefault()}},[n,r,v.paused]);return d.jsx(Ye.div,{tabIndex:-1,...s,ref:h,onKeyDown:x})});ex.displayName=uR;function cR(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(vn(r,{select:t}),document.activeElement!==n)return}function dR(e){const t=tx(e),n=Up(t,e),r=Up(t.reverse(),e);return[n,r]}function tx(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Up(e,t){for(const n of e)if(!fR(n,{upTo:t}))return n}function fR(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function hR(e){return e instanceof HTMLInputElement&&"select"in e}function vn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&hR(e)&&t&&e.select()}}var Wp=pR();function pR(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Yp(e,t),e.unshift(t)},remove(t){var n;e=Yp(e,t),(n=e[0])==null||n.resume()}}}function Yp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function mR(e){return e.filter(t=>t.tagName!=="A")}var gR="Portal",nx=y.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=y.useState(!1);Pl(()=>i(!0),[]);const s=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return s?aN.createPortal(d.jsx(Ye.div,{...r,ref:t}),s):null});nx.displayName=gR;var au=0;function yR(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xp()),document.body.insertAdjacentElement("beforeend",e[1]??Xp()),au++,()=>{au===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),au--}},[])}function Xp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var $t=function(){return $t=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},$t.apply(this,arguments)};function rx(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function vR(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Hs="right-scroll-bar-position",Vs="width-before-scroll-bar",xR="with-scroll-bars-hidden",wR="--removed-body-scroll-bar-size";function uu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function SR(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var NR=typeof window<"u"?y.useLayoutEffect:y.useEffect,Gp=new WeakMap;function ER(e,t){var n=SR(null,function(r){return e.forEach(function(o){return uu(o,r)})});return NR(function(){var r=Gp.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(l){i.has(l)||uu(l,null)}),i.forEach(function(l){o.has(l)||uu(l,s)})}Gp.set(n,e)},[e]),n}function kR(e){return e}function CR(e,t){t===void 0&&(t=kR);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(l){return l!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var l=n;n=[],l.forEach(i),s=n}var a=function(){var f=s;s=[],f.forEach(i)},u=function(){return Promise.resolve().then(a)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return o}function bR(e){e===void 0&&(e={});var t=CR(null);return t.options=$t({async:!0,ssr:!1},e),t}var ox=function(e){var t=e.sideCar,n=rx(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,$t({},n))};ox.isSideCarExport=!0;function _R(e,t){return e.useMedium(t),ox}var ix=bR(),cu=function(){},ha=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:cu,onWheelCapture:cu,onTouchMoveCapture:cu}),o=r[0],i=r[1],s=e.forwardProps,l=e.children,a=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,h=e.sideCar,v=e.noIsolation,x=e.inert,w=e.allowPinchZoom,S=e.as,p=S===void 0?"div":S,g=e.gapMode,m=rx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=h,E=ER([n,t]),C=$t($t({},m),o);return y.createElement(y.Fragment,null,f&&y.createElement(N,{sideCar:ix,removeScrollBar:u,shards:c,noIsolation:v,inert:x,setCallbacks:i,allowPinchZoom:!!w,lockRef:n,gapMode:g}),s?y.cloneElement(y.Children.only(l),$t($t({},C),{ref:E})):y.createElement(p,$t({},C,{className:a,ref:E}),l))});ha.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ha.classNames={fullWidth:Vs,zeroRight:Hs};var jR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function PR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jR();return t&&e.setAttribute("nonce",t),e}function MR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function RR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var IR=function(){var e=0,t=null;return{add:function(n){e==0&&(t=PR())&&(MR(t,n),RR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},TR=function(){var e=IR();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sx=function(){var e=TR(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},LR={left:0,top:0,right:0,gap:0},du=function(e){return parseInt(e||"",10)||0},AR=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[du(n),du(r),du(o)]},DR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return LR;var t=AR(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},zR=sx(),Yr="data-scroll-locked",$R=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
234
|
-
.`.concat(xR,` {
|
|
235
|
-
overflow: hidden `).concat(r,`;
|
|
236
|
-
padding-right: `).concat(l,"px ").concat(r,`;
|
|
237
|
-
}
|
|
238
|
-
body[`).concat(Yr,`] {
|
|
239
|
-
overflow: hidden `).concat(r,`;
|
|
240
|
-
overscroll-behavior: contain;
|
|
241
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
242
|
-
padding-left: `.concat(o,`px;
|
|
243
|
-
padding-top: `).concat(i,`px;
|
|
244
|
-
padding-right: `).concat(s,`px;
|
|
245
|
-
margin-left:0;
|
|
246
|
-
margin-top:0;
|
|
247
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
248
|
-
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.`).concat(Hs,` {
|
|
252
|
-
right: `).concat(l,"px ").concat(r,`;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.`).concat(Vs,` {
|
|
256
|
-
margin-right: `).concat(l,"px ").concat(r,`;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.`).concat(Hs," .").concat(Hs,` {
|
|
260
|
-
right: 0 `).concat(r,`;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.`).concat(Vs," .").concat(Vs,` {
|
|
264
|
-
margin-right: 0 `).concat(r,`;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
body[`).concat(Yr,`] {
|
|
268
|
-
`).concat(wR,": ").concat(l,`px;
|
|
269
|
-
}
|
|
270
|
-
`)},Kp=function(){var e=parseInt(document.body.getAttribute(Yr)||"0",10);return isFinite(e)?e:0},OR=function(){y.useEffect(function(){return document.body.setAttribute(Yr,(Kp()+1).toString()),function(){var e=Kp()-1;e<=0?document.body.removeAttribute(Yr):document.body.setAttribute(Yr,e.toString())}},[])},FR=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;OR();var i=y.useMemo(function(){return DR(o)},[o]);return y.createElement(zR,{styles:$R(i,!t,o,n?"":"!important")})},Pc=!1;if(typeof window<"u")try{var xs=Object.defineProperty({},"passive",{get:function(){return Pc=!0,!0}});window.addEventListener("test",xs,xs),window.removeEventListener("test",xs,xs)}catch{Pc=!1}var vr=Pc?{passive:!1}:!1,BR=function(e){return e.tagName==="TEXTAREA"},lx=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!BR(e)&&n[t]==="visible")},HR=function(e){return lx(e,"overflowY")},VR=function(e){return lx(e,"overflowX")},Qp=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ax(e,r);if(o){var i=ux(e,r),s=i[1],l=i[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},UR=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},WR=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ax=function(e,t){return e==="v"?HR(t):VR(t)},ux=function(e,t){return e==="v"?UR(t):WR(t)},YR=function(e,t){return e==="h"&&t==="rtl"?-1:1},XR=function(e,t,n,r,o){var i=YR(e,window.getComputedStyle(t).direction),s=i*r,l=n.target,a=t.contains(l),u=!1,f=s>0,c=0,h=0;do{var v=ux(e,l),x=v[0],w=v[1],S=v[2],p=w-S-i*x;(x||p)&&ax(e,l)&&(c+=p,h+=x),l instanceof ShadowRoot?l=l.host:l=l.parentNode}while(!a&&l!==document.body||a&&(t.contains(l)||t===l));return(f&&Math.abs(c)<1||!f&&Math.abs(h)<1)&&(u=!0),u},ws=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qp=function(e){return[e.deltaX,e.deltaY]},Zp=function(e){return e&&"current"in e?e.current:e},GR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},KR=function(e){return`
|
|
271
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
272
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
273
|
-
`)},QR=0,xr=[];function qR(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),o=y.useState(QR++)[0],i=y.useState(sx)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var w=vR([e.lockRef.current],(e.shards||[]).map(Zp),!0).filter(Boolean);return w.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=y.useCallback(function(w,S){if("touches"in w&&w.touches.length===2)return!s.current.allowPinchZoom;var p=ws(w),g=n.current,m="deltaX"in w?w.deltaX:g[0]-p[0],N="deltaY"in w?w.deltaY:g[1]-p[1],E,C=w.target,k=Math.abs(m)>Math.abs(N)?"h":"v";if("touches"in w&&k==="h"&&C.type==="range")return!1;var j=Qp(k,C);if(!j)return!0;if(j?E=k:(E=k==="v"?"h":"v",j=Qp(k,C)),!j)return!1;if(!r.current&&"changedTouches"in w&&(m||N)&&(r.current=E),!E)return!0;var R=r.current||E;return XR(R,S,w,R==="h"?m:N)},[]),a=y.useCallback(function(w){var S=w;if(!(!xr.length||xr[xr.length-1]!==i)){var p="deltaY"in S?qp(S):ws(S),g=t.current.filter(function(E){return E.name===S.type&&(E.target===S.target||S.target===E.shadowParent)&&GR(E.delta,p)})[0];if(g&&g.should){S.cancelable&&S.preventDefault();return}if(!g){var m=(s.current.shards||[]).map(Zp).filter(Boolean).filter(function(E){return E.contains(S.target)}),N=m.length>0?l(S,m[0]):!s.current.noIsolation;N&&S.cancelable&&S.preventDefault()}}},[]),u=y.useCallback(function(w,S,p,g){var m={name:w,delta:S,target:p,should:g,shadowParent:ZR(p)};t.current.push(m),setTimeout(function(){t.current=t.current.filter(function(N){return N!==m})},1)},[]),f=y.useCallback(function(w){n.current=ws(w),r.current=void 0},[]),c=y.useCallback(function(w){u(w.type,qp(w),w.target,l(w,e.lockRef.current))},[]),h=y.useCallback(function(w){u(w.type,ws(w),w.target,l(w,e.lockRef.current))},[]);y.useEffect(function(){return xr.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",a,vr),document.addEventListener("touchmove",a,vr),document.addEventListener("touchstart",f,vr),function(){xr=xr.filter(function(w){return w!==i}),document.removeEventListener("wheel",a,vr),document.removeEventListener("touchmove",a,vr),document.removeEventListener("touchstart",f,vr)}},[]);var v=e.removeScrollBar,x=e.inert;return y.createElement(y.Fragment,null,x?y.createElement(i,{styles:KR(o)}):null,v?y.createElement(FR,{gapMode:e.gapMode}):null)}function ZR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const JR=_R(ix,qR);var cx=y.forwardRef(function(e,t){return y.createElement(ha,$t({},e,{ref:t,sideCar:JR}))});cx.classNames=ha.classNames;var e4=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wr=new WeakMap,Ss=new WeakMap,Ns={},fu=0,dx=function(e){return e&&(e.host||dx(e.parentNode))},t4=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dx(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},n4=function(e,t,n,r){var o=t4(t,Array.isArray(e)?e:[e]);Ns[n]||(Ns[n]=new WeakMap);var i=Ns[n],s=[],l=new Set,a=new Set(o),u=function(c){!c||l.has(c)||(l.add(c),u(c.parentNode))};o.forEach(u);var f=function(c){!c||a.has(c)||Array.prototype.forEach.call(c.children,function(h){if(l.has(h))f(h);else try{var v=h.getAttribute(r),x=v!==null&&v!=="false",w=(wr.get(h)||0)+1,S=(i.get(h)||0)+1;wr.set(h,w),i.set(h,S),s.push(h),w===1&&x&&Ss.set(h,!0),S===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(p){console.error("aria-hidden: cannot operate on ",h,p)}})};return f(t),l.clear(),fu++,function(){s.forEach(function(c){var h=wr.get(c)-1,v=i.get(c)-1;wr.set(c,h),i.set(c,v),h||(Ss.has(c)||c.removeAttribute(r),Ss.delete(c)),v||c.removeAttribute(n)}),fu--,fu||(wr=new WeakMap,wr=new WeakMap,Ss=new WeakMap,Ns={})}},r4=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=e4(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),n4(r,o,n,"aria-hidden")):function(){return null}},sf="Dialog",[fx]=da(sf),[o4,It]=fx(sf),hx=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=y.useRef(null),a=y.useRef(null),[u=!1,f]=tf({prop:r,defaultProp:o,onChange:i});return d.jsx(o4,{scope:t,triggerRef:l,contentRef:a,contentId:ei(),titleId:ei(),descriptionId:ei(),open:u,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(c=>!c),[f]),modal:s,children:n})};hx.displayName=sf;var px="DialogTrigger",i4=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=It(px,n),i=Ut(t,o.triggerRef);return d.jsx(Ye.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uf(o.open),...r,ref:i,onClick:Le(e.onClick,o.onOpenToggle)})});i4.displayName=px;var lf="DialogPortal",[s4,mx]=fx(lf,{forceMount:void 0}),gx=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=It(lf,t);return d.jsx(s4,{scope:t,forceMount:n,children:y.Children.map(r,s=>d.jsx(Bi,{present:n||i.open,children:d.jsx(nx,{asChild:!0,container:o,children:s})}))})};gx.displayName=lf;var Ml="DialogOverlay",yx=y.forwardRef((e,t)=>{const n=mx(Ml,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=It(Ml,e.__scopeDialog);return i.modal?d.jsx(Bi,{present:r||i.open,children:d.jsx(l4,{...o,ref:t})}):null});yx.displayName=Ml;var l4=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=It(Ml,n);return d.jsx(cx,{as:no,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(Ye.div,{"data-state":uf(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),fr="DialogContent",vx=y.forwardRef((e,t)=>{const n=mx(fr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=It(fr,e.__scopeDialog);return d.jsx(Bi,{present:r||i.open,children:i.modal?d.jsx(a4,{...o,ref:t}):d.jsx(u4,{...o,ref:t})})});vx.displayName=fr;var a4=y.forwardRef((e,t)=>{const n=It(fr,e.__scopeDialog),r=y.useRef(null),o=Ut(t,n.contentRef,r);return y.useEffect(()=>{const i=r.current;if(i)return r4(i)},[]),d.jsx(xx,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Le(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Le(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&i.preventDefault()}),onFocusOutside:Le(e.onFocusOutside,i=>i.preventDefault())})}),u4=y.forwardRef((e,t)=>{const n=It(fr,e.__scopeDialog),r=y.useRef(!1),o=y.useRef(!1);return d.jsx(xx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,l;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var a,u;(a=e.onInteractOutside)==null||a.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),xx=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=It(fr,n),a=y.useRef(null),u=Ut(t,a);return yR(),d.jsxs(d.Fragment,{children:[d.jsx(ex,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:d.jsx(Z0,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":uf(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(c4,{titleId:l.titleId}),d.jsx(f4,{contentRef:a,descriptionId:l.descriptionId})]})]})}),af="DialogTitle",wx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=It(af,n);return d.jsx(Ye.h2,{id:o.titleId,...r,ref:t})});wx.displayName=af;var Sx="DialogDescription",Nx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=It(Sx,n);return d.jsx(Ye.p,{id:o.descriptionId,...r,ref:t})});Nx.displayName=Sx;var Ex="DialogClose",kx=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=It(Ex,n);return d.jsx(Ye.button,{type:"button",...r,ref:t,onClick:Le(e.onClick,()=>o.onOpenChange(!1))})});kx.displayName=Ex;function uf(e){return e?"open":"closed"}var Cx="DialogTitleWarning",[_4,bx]=j3(Cx,{contentName:fr,titleName:af,docsSlug:"dialog"}),c4=({titleId:e})=>{const t=bx(Cx),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
274
|
-
|
|
275
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
276
|
-
|
|
277
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},d4="DialogDescriptionWarning",f4=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bx(d4).contentName}}.`;return y.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},h4=hx,p4=gx,_x=yx,jx=vx,Px=wx,Mx=Nx,m4=kx;const cf=h4,g4=p4,Rx=y.forwardRef(({className:e,...t},n)=>d.jsx(_x,{ref:n,className:Ee("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Rx.displayName=_x.displayName;const pa=y.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(g4,{children:[d.jsx(Rx,{}),d.jsxs(jx,{ref:r,className:Ee("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,d.jsxs(m4,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(L2,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pa.displayName=jx.displayName;const df=({className:e,...t})=>d.jsx("div",{className:Ee("flex flex-col space-y-1.5 text-center sm:text-left",e),...t}),ff=({className:e,...t})=>d.jsx("div",{className:Ee("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t}),ma=y.forwardRef(({className:e,...t},n)=>d.jsx(Px,{ref:n,className:Ee("text-lg font-semibold leading-none tracking-tight",e),...t}));ma.displayName=Px.displayName;const ga=y.forwardRef(({className:e,...t},n)=>d.jsx(Mx,{ref:n,className:Ee("text-sm text-muted-foreground",e),...t}));ga.displayName=Mx.displayName;function y4(){const[e,t]=y.useState([]),[n,r]=y.useState(""),[o,i]=y.useState(!0);return y.useEffect(()=>{Je.discovery.agents().then(s=>{const l=s.data??[];t(l),l.length>0&&!n&&r(l[0].registeredAgentId??l[0].id)}).catch(()=>{}).finally(()=>i(!1))},[]),o?d.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading agents..."}):e.length===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx("h1",{className:"text-lg font-semibold",children:"Operations"}),d.jsxs("div",{className:"flex h-60 flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border",children:[d.jsx(Ld,{className:"h-10 w-10 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents discovered yet"}),d.jsx("p",{className:"text-xs text-muted-foreground/70",children:"Connect an agent with the Guards plugin to get started"})]})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-lg font-semibold",children:"Operations"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-xs text-muted-foreground",children:"Agent:"}),d.jsx("select",{className:"h-8 rounded-md border border-input bg-background px-2 text-sm focus:outline-none focus:ring-1 focus:ring-ring",value:n,onChange:s=>r(s.target.value),children:e.map(s=>d.jsxs("option",{value:s.registeredAgentId??s.id,children:[s.emoji?`${s.emoji} `:"",s.name]},s.registeredAgentId??s.id))})]})]}),n&&d.jsxs(Q0,{defaultValue:"skills",className:"w-full",children:[d.jsxs(of,{children:[d.jsxs(Ur,{value:"skills",children:[d.jsx(er,{className:"mr-1.5 h-3.5 w-3.5"})," Skills"]}),d.jsxs(Ur,{value:"commands",children:[d.jsx(dc,{className:"mr-1.5 h-3.5 w-3.5"})," Commands"]}),d.jsxs(Ur,{value:"config",children:[d.jsx(to,{className:"mr-1.5 h-3.5 w-3.5"})," Config"]})]}),d.jsx(Wr,{value:"skills",children:d.jsx(v4,{agentId:n,agents:e})}),d.jsx(Wr,{value:"commands",children:d.jsx(x4,{agentId:n})}),d.jsx(Wr,{value:"config",children:d.jsx(w4,{agentId:n})})]})]})}function v4({agentId:e,agents:t}){const n=t.find(a=>(a.registeredAgentId??a.id)===e),r=(n==null?void 0:n.skills)??[],[o,i]=y.useState(!1),[s,l]=y.useState(null);return d.jsxs("div",{className:"space-y-4 pt-4",children:[d.jsx("div",{className:"flex gap-2",children:d.jsxs(Re,{size:"sm",onClick:()=>i(!0),children:[d.jsx(ml,{className:"mr-1.5 h-3.5 w-3.5"})," Install Skill"]})}),d.jsxs(Et,{children:[d.jsx(Ot,{children:d.jsxs(Ft,{className:"flex items-center gap-2 text-sm",children:[d.jsx(er,{className:"h-4 w-4"})," Installed Skills (",r.length,")"]})}),d.jsx(kt,{children:r.length===0?d.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[d.jsx(er,{className:"h-10 w-10 text-muted-foreground/20"}),d.jsxs("div",{className:"text-center",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"No skills installed"}),d.jsxs("p",{className:"mt-1 text-xs text-muted-foreground/70",children:["Install skills from ",d.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"ClawHub"})," or provide custom skill content"]})]}),d.jsx(Re,{size:"sm",variant:"outline",onClick:()=>i(!0),children:"Install your first skill"})]}):d.jsx("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:r.map(a=>d.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border p-3 transition-colors hover:bg-muted/30",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-md bg-muted",children:d.jsx(er,{className:"h-4 w-4 text-muted-foreground"})}),d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium",children:a.name}),a.description&&d.jsx("p",{className:"text-[11px] text-muted-foreground line-clamp-1",children:a.description})]})]}),d.jsx(Re,{size:"sm",variant:"ghost",className:"h-7 w-7 p-0 text-muted-foreground hover:text-destructive",onClick:()=>l(a.name),children:d.jsx(gl,{className:"h-3.5 w-3.5"})})]},a.name))})})]}),d.jsxs(Et,{children:[d.jsx(Ot,{children:d.jsx(Ft,{className:"text-sm",children:"How Skills Work"})}),d.jsxs(kt,{className:"text-xs text-muted-foreground space-y-2",children:[d.jsxs("p",{children:["Skills are ",d.jsx("a",{href:"https://agentskills.io",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"AgentSkills"}),"-compatible folders containing a ",d.jsx("code",{className:"rounded bg-muted px-1",children:"SKILL.md"})," with YAML frontmatter and instructions."]}),d.jsx("p",{children:"Skills are loaded from three locations (highest to lowest precedence):"}),d.jsxs("ol",{className:"list-inside list-decimal space-y-0.5 pl-2",children:[d.jsxs("li",{children:[d.jsx("code",{className:"rounded bg-muted px-1",children:"<workspace>/skills"})," — per-agent workspace skills"]}),d.jsxs("li",{children:[d.jsx("code",{className:"rounded bg-muted px-1",children:"~/.openclaw/skills"})," — shared managed skills"]}),d.jsx("li",{children:"Bundled skills — shipped with the OpenClaw install"})]}),d.jsxs("p",{children:["Browse and discover skills at ",d.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"clawhub.com"}),". Registry installs use ",d.jsx("code",{className:"rounded bg-muted px-1",children:"clawhub install <slug>"}),"."]})]})]}),d.jsx(S4,{open:o,onOpenChange:i,agentId:e}),d.jsx(N4,{open:s!==null,onOpenChange:a=>{a||l(null)},agentId:e,initialName:s??""})]})}function x4({agentId:e}){const[t,n]=y.useState([]),[r,o]=y.useState(!0),[i,s]=y.useState(null),l=y.useCallback(()=>{Je.commands.list(e).then(c=>n(c.data??[])).catch(()=>{}).finally(()=>o(!1))},[e]);y.useEffect(()=>{l()},[l]),y.useEffect(()=>{if(!t.some(v=>v.status==="pending"||v.status==="running"))return;const h=setInterval(l,5e3);return()=>clearInterval(h)},[t,l]);const a=c=>c==="completed"?d.jsx(C2,{className:"h-3.5 w-3.5 text-emerald-500"}):c==="failed"?d.jsx(b2,{className:"h-3.5 w-3.5 text-destructive"}):c==="running"?d.jsx(ql,{className:"h-3.5 w-3.5 animate-spin text-amber-500"}):d.jsx(k2,{className:"h-3.5 w-3.5 text-muted-foreground"}),u=c=>c==="completed"?"success":c==="failed"?"destructive":c==="running"?"warning":"secondary",f=c=>({install_skill:{icon:d.jsx(ml,{className:"h-3 w-3"}),label:"Install Skill"},install_custom_skill:{icon:d.jsx(Ad,{className:"h-3 w-3"}),label:"Custom Skill"},uninstall_skill:{icon:d.jsx(gl,{className:"h-3 w-3"}),label:"Uninstall Skill"},update_config:{icon:d.jsx(to,{className:"h-3 w-3"}),label:"Update Config"}})[c]??{icon:d.jsx(dc,{className:"h-3 w-3"}),label:c};return r?d.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"Loading..."}):d.jsxs("div",{className:"space-y-4 pt-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"Command history for this agent"}),d.jsxs(Re,{size:"sm",variant:"ghost",onClick:l,children:[d.jsx(Dy,{className:"mr-1.5 h-3.5 w-3.5"})," Refresh"]})]}),t.length===0?d.jsxs("div",{className:"flex h-40 flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border",children:[d.jsx(dc,{className:"h-8 w-8 text-muted-foreground/30"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"No commands sent yet"})]}):d.jsx("div",{className:"space-y-2",children:t.map(c=>{var w,S,p;const h=f(c.type),v=i===c.id,x=c.result||c.type==="install_custom_skill"&&((w=c.payload)==null?void 0:w.content);return d.jsxs("div",{className:"rounded-lg border border-border transition-colors hover:bg-muted/20",children:[d.jsxs("div",{className:"flex cursor-pointer items-center gap-3 px-4 py-3",onClick:()=>x&&s(v?null:c.id),children:[a(c.status),d.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-medium",children:[h.icon," ",d.jsx("span",{children:h.label})]}),d.jsxs("span",{className:"text-xs text-muted-foreground",children:[((S=c.payload)==null?void 0:S.skillName)&&`"${c.payload.skillName}"`,c.type==="update_config"&&c.payload&&!c.payload.skillName&&Object.keys(c.payload).join(", ")]}),d.jsx("div",{className:"flex-1"}),d.jsx(Ve,{variant:u(c.status),className:"text-[10px]",children:c.status}),d.jsx("span",{className:"text-[11px] text-muted-foreground",children:k4(c.createdAt)}),x&&(v?d.jsx(Ty,{className:"h-3.5 w-3.5 text-muted-foreground"}):d.jsx(Ly,{className:"h-3.5 w-3.5 text-muted-foreground"}))]}),v&&x&&d.jsxs("div",{className:"border-t border-border bg-muted/30 px-4 py-3 text-xs",children:[c.result&&d.jsxs("div",{className:"space-y-1",children:[d.jsx("p",{className:"font-medium text-muted-foreground",children:"Result"}),d.jsx("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-md bg-background p-2.5 font-mono text-[11px] text-muted-foreground",children:typeof c.result=="string"?c.result:JSON.stringify(c.result,null,2)})]}),c.type==="install_custom_skill"&&((p=c.payload)==null?void 0:p.content)&&d.jsxs("div",{className:"mt-2 space-y-1",children:[d.jsx("p",{className:"font-medium text-muted-foreground",children:"Skill Content"}),d.jsx("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap rounded-md bg-background p-2.5 font-mono text-[11px] text-muted-foreground",children:c.payload.content})]})]})]},c.id)})})]})}function w4({agentId:e}){const[t,n]=y.useState(!1);return d.jsxs("div",{className:"space-y-4 pt-4",children:[d.jsxs(Et,{children:[d.jsx(Ot,{children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs(Ft,{className:"flex items-center gap-2 text-sm",children:[d.jsx(to,{className:"h-4 w-4"})," Guards Configuration"]}),d.jsxs(Re,{size:"sm",variant:"outline",onClick:()=>n(!0),children:[d.jsx(to,{className:"mr-1.5 h-3.5 w-3.5"})," Update Config"]})]})}),d.jsxs(kt,{className:"text-xs text-muted-foreground space-y-3",children:[d.jsxs("p",{children:["Send configuration updates to the Guards plugin running on this agent. Changes are merged with the existing config in ",d.jsx("code",{className:"rounded bg-muted px-1",children:"~/.openclaw/openclaw.json"}),"."]}),d.jsxs("div",{className:"rounded-md bg-muted p-3 space-y-1.5",children:[d.jsx("p",{className:"font-medium text-foreground text-xs",children:"Available settings:"}),d.jsxs("div",{className:"grid gap-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"blockOnRisk"}),d.jsx("span",{children:"Block tool calls when risk is detected"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"logLevel"}),d.jsx("span",{children:"Logging verbosity (debug, info, warn, error)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"timeoutMs"}),d.jsx("span",{children:"Request timeout in milliseconds"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("code",{className:"rounded bg-background px-1.5 py-0.5 text-[11px]",children:"enabled"}),d.jsx("span",{children:"Enable/disable the Guards plugin"})]})]})]})]})]}),d.jsx(E4,{open:t,onOpenChange:n,agentId:e})]})}function S4({open:e,onOpenChange:t,agentId:n,onSuccess:r}){const[o,i]=y.useState("registry"),[s,l]=y.useState(""),[a,u]=y.useState(""),[f,c]=y.useState(!1),h=()=>{l(""),u(""),i("registry")},v=async()=>{c(!0);try{if(o==="registry"){if(!s.trim())return;await Je.commands.create({agentId:n,type:"install_skill",payload:{skillName:s.trim()}})}else{if(!s.trim()||!a.trim())return;await Je.commands.create({agentId:n,type:"install_custom_skill",payload:{skillName:s.trim(),content:a}})}h(),t(!1),r==null||r()}catch{}c(!1)};return d.jsx(cf,{open:e,onOpenChange:x=>{x||h(),t(x)},children:d.jsxs(pa,{className:"sm:max-w-[560px]",children:[d.jsxs(df,{children:[d.jsxs(ma,{className:"flex items-center gap-2",children:[d.jsx(ml,{className:"h-4 w-4"})," Install Skill"]}),d.jsxs(ga,{children:["Install from ",d.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"ClawHub"})," registry or provide custom SKILL.md content."]})]}),d.jsxs(Q0,{value:o,onValueChange:x=>i(x),children:[d.jsxs(of,{className:"w-full",children:[d.jsxs(Ur,{value:"registry",className:"flex-1",children:[d.jsx(er,{className:"mr-1.5 h-3.5 w-3.5"})," ClawHub Registry"]}),d.jsxs(Ur,{value:"custom",className:"flex-1",children:[d.jsx(Ad,{className:"mr-1.5 h-3.5 w-3.5"})," Custom SKILL.md"]})]}),d.jsx(Wr,{value:"registry",className:"space-y-4 pt-2",children:d.jsxs("div",{className:"space-y-2",children:[d.jsx(Vr,{htmlFor:"reg-skill-name",children:"Skill Slug"}),d.jsx($n,{id:"reg-skill-name",placeholder:"e.g. web-search, code-review, nano-banana-pro...",value:s,onChange:x=>l(x.target.value),onKeyDown:x=>x.key==="Enter"&&v()}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:["Executes ",d.jsx("code",{className:"rounded bg-muted px-1",children:"clawhub install <slug>"})," on the agent. Browse available skills at ",d.jsx("a",{href:"https://clawhub.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"clawhub.com"}),"."]})]})}),d.jsxs(Wr,{value:"custom",className:"space-y-4 pt-2",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Vr,{htmlFor:"custom-skill-name",children:"Skill Name"}),d.jsx($n,{id:"custom-skill-name",placeholder:"my-custom-skill",value:s,onChange:x=>l(x.target.value)})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Vr,{htmlFor:"custom-skill-content",children:"SKILL.md Content"}),d.jsx(ef,{id:"custom-skill-content",placeholder:`---
|
|
278
|
-
name: my-custom-skill
|
|
279
|
-
description: My custom skill
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
Instructions for the agent...
|
|
283
|
-
|
|
284
|
-
Use {baseDir} to reference the skill folder path.`,value:a,onChange:x=>u(x.target.value),className:"min-h-[200px] font-mono text-xs"}),d.jsxs("p",{className:"text-xs text-muted-foreground",children:["The content will be saved as ",d.jsx("code",{className:"rounded bg-muted px-1",children:"~/.openclaw/skills/<name>/SKILL.md"}),". Use YAML frontmatter with ",d.jsx("code",{className:"rounded bg-muted px-1",children:"name"})," and ",d.jsx("code",{className:"rounded bg-muted px-1",children:"description"})," fields."]})]})]})]}),d.jsxs(ff,{children:[d.jsx(Re,{variant:"outline",onClick:()=>{h(),t(!1)},children:"Cancel"}),d.jsxs(Re,{onClick:v,disabled:f||!s.trim()||o==="custom"&&!a.trim(),children:[f?d.jsx(ql,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):d.jsx(ml,{className:"mr-1.5 h-3.5 w-3.5"}),"Install"]})]})]})})}function N4({open:e,onOpenChange:t,agentId:n,initialName:r,onSuccess:o}){const[i,s]=y.useState(r??""),[l,a]=y.useState(!1);y.useEffect(()=>{r&&s(r)},[r]);const u=async()=>{if(i.trim()){a(!0);try{await Je.commands.create({agentId:n,type:"uninstall_skill",payload:{skillName:i.trim()}}),s(""),t(!1),o==null||o()}catch{}a(!1)}};return d.jsx(cf,{open:e,onOpenChange:t,children:d.jsxs(pa,{className:"sm:max-w-[400px]",children:[d.jsxs(df,{children:[d.jsxs(ma,{className:"flex items-center gap-2",children:[d.jsx(gl,{className:"h-4 w-4"})," Uninstall Skill"]}),d.jsx(ga,{children:"This will send a command to remove the skill from the agent."})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Vr,{htmlFor:"uninstall-name",children:"Skill Name"}),d.jsx($n,{id:"uninstall-name",placeholder:"Skill name to uninstall...",value:i,onChange:f=>s(f.target.value),onKeyDown:f=>f.key==="Enter"&&u()})]}),d.jsxs(ff,{children:[d.jsx(Re,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),d.jsxs(Re,{variant:"destructive",onClick:u,disabled:l||!i.trim(),children:[l?d.jsx(ql,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):d.jsx(gl,{className:"mr-1.5 h-3.5 w-3.5"}),"Uninstall"]})]})]})})}function E4({open:e,onOpenChange:t,agentId:n,onSuccess:r}){const[o,i]=y.useState(`{
|
|
285
|
-
"blockOnRisk": false
|
|
286
|
-
}`),[s,l]=y.useState(""),[a,u]=y.useState(!1),f=async()=>{l("");let c;try{c=JSON.parse(o)}catch{l("Invalid JSON");return}if(typeof c!="object"||c===null||Array.isArray(c)){l("Must be a JSON object");return}u(!0);try{await Je.commands.create({agentId:n,type:"update_config",payload:c}),t(!1),r==null||r()}catch{}u(!1)};return d.jsx(cf,{open:e,onOpenChange:t,children:d.jsxs(pa,{className:"sm:max-w-[460px]",children:[d.jsxs(df,{children:[d.jsxs(ma,{className:"flex items-center gap-2",children:[d.jsx(to,{className:"h-4 w-4"})," Update Guards Config"]}),d.jsx(ga,{children:"Values will be merged into the existing Guards plugin configuration."})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Vr,{htmlFor:"config-json",children:"Config JSON"}),d.jsx(ef,{id:"config-json",value:o,onChange:c=>{i(c.target.value),l("")},className:"min-h-[120px] font-mono text-xs"}),s&&d.jsx("p",{className:"text-xs text-destructive",children:s})]}),d.jsxs(ff,{children:[d.jsx(Re,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),d.jsxs(Re,{onClick:f,disabled:a,children:[a?d.jsx(ql,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):d.jsx(to,{className:"mr-1.5 h-3.5 w-3.5"}),"Update"]})]})]})})}function k4(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/1e3);if(n<60)return"just now";const r=Math.floor(n/60);if(r<60)return`${r}m ago`;const o=Math.floor(r/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function C4({children:e}){const{isAuthenticated:t,isLoading:n}=Id();return n?d.jsx("div",{className:"flex min-h-screen items-center justify-center",children:d.jsx("div",{className:"text-muted-foreground text-sm",children:"Loading..."})}):t?d.jsx(d.Fragment,{children:e}):d.jsx(lc,{to:"/login",replace:!0})}function b4(){return d.jsxs(tE,{children:[d.jsx(at,{path:"/login",element:d.jsx(X2,{})}),d.jsxs(at,{element:d.jsx(C4,{children:d.jsx(Y2,{})}),children:[d.jsx(at,{index:!0,element:d.jsx(lc,{to:"/inventory/agents",replace:!0})}),d.jsx(at,{path:"/inventory/agents",element:d.jsx(K2,{})}),d.jsx(at,{path:"/inventory/agents/:id",element:d.jsx(Z2,{})}),d.jsx(at,{path:"/inventory/identities",element:d.jsx(rk,{})}),d.jsx(at,{path:"/inventory/permissions",element:d.jsx(ok,{})}),d.jsx(at,{path:"/secure/risk",element:d.jsx(ik,{})}),d.jsx(at,{path:"/secure/graph",element:d.jsx(_3,{})}),d.jsx(at,{path:"/ops/skills",element:d.jsx(y4,{})})]}),d.jsx(at,{path:"*",element:d.jsx(lc,{to:"/inventory/agents",replace:!0})})]})}hu.createRoot(document.getElementById("root")).render(d.jsx(At.StrictMode,{children:d.jsx(bE,{basename:"/dashboard",children:d.jsx(DE,{children:d.jsx(OE,{children:d.jsx(b4,{})})})})}));
|
|
287
|
-
//# sourceMappingURL=index-7EUFflik.js.map
|