jetic-cli 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +450 -50
- package/dist/dashboard/assets/index-DIr8-5sp.css +1 -0
- package/dist/dashboard/assets/index-DeZbqocl.js +379 -0
- package/dist/dashboard/index.html +3 -3
- package/dist/dashboard/jetic.svg +4 -0
- package/dist/dashboard/jetic_light.png +0 -0
- package/dist/dashboard/jetic_logo.svg +10 -0
- package/dist/dashboard/jetic_white_bg.png +0 -0
- package/dist/index.js +2197 -1375
- package/package.json +2 -2
- package/dist/dashboard/assets/index-Dk01eD-3.js +0 -347
- package/dist/dashboard/assets/index-cvc-GV1-.css +0 -1
- package/dist/dashboard/react.svg +0 -1
- package/dist/dashboard/vite.svg +0 -1
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function i(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(u){if(u.ep)return;u.ep=!0;const f=i(u);fetch(u.href,f)}})();function mp(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Pu={exports:{}},pr={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and 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 Jm;function mb(){if(Jm)return pr;Jm=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(o,u,f){var h=null;if(f!==void 0&&(h=""+f),u.key!==void 0&&(h=""+u.key),"key"in u){f={};for(var p in u)p!=="key"&&(f[p]=u[p])}else f=u;return u=f.ref,{$$typeof:n,type:o,key:h,ref:u!==void 0?u:null,props:f}}return pr.Fragment=r,pr.jsx=i,pr.jsxs=i,pr}var Fm;function pb(){return Fm||(Fm=1,Pu.exports=mb()),Pu.exports}var s=pb(),ed={exports:{}},_e={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and 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 Im;function gb(){if(Im)return _e;Im=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function b(w){return w===null||typeof w!="object"?null:(w=v&&w[v]||w["@@iterator"],typeof w=="function"?w:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,k={};function z(w,O,L){this.props=w,this.context=O,this.refs=k,this.updater=L||E}z.prototype.isReactComponent={},z.prototype.setState=function(w,O){if(typeof w!="object"&&typeof w!="function"&&w!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,w,O,"setState")},z.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function R(){}R.prototype=z.prototype;function Y(w,O,L){this.props=w,this.context=O,this.refs=k,this.updater=L||E}var V=Y.prototype=new R;V.constructor=Y,C(V,z.prototype),V.isPureReactComponent=!0;var U=Array.isArray,B={H:null,A:null,T:null,S:null,V:null},G=Object.prototype.hasOwnProperty;function re(w,O,L,W,ne,fe){return L=fe.ref,{$$typeof:n,type:w,key:O,ref:L!==void 0?L:null,props:fe}}function ce(w,O){return re(w.type,O,void 0,void 0,void 0,w.props)}function le(w){return typeof w=="object"&&w!==null&&w.$$typeof===n}function J(w){var O={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(L){return O[L]})}var ee=/\/+/g;function F(w,O){return typeof w=="object"&&w!==null&&w.key!=null?J(""+w.key):O.toString(36)}function te(){}function _(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(te,te):(w.status="pending",w.then(function(O){w.status==="pending"&&(w.status="fulfilled",w.value=O)},function(O){w.status==="pending"&&(w.status="rejected",w.reason=O)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function q(w,O,L,W,ne){var fe=typeof w;(fe==="undefined"||fe==="boolean")&&(w=null);var ue=!1;if(w===null)ue=!0;else switch(fe){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(w.$$typeof){case n:case r:ue=!0;break;case g:return ue=w._init,q(ue(w._payload),O,L,W,ne)}}if(ue)return ne=ne(w),ue=W===""?"."+F(w,0):W,U(ne)?(L="",ue!=null&&(L=ue.replace(ee,"$&/")+"/"),q(ne,O,L,"",function(I){return I})):ne!=null&&(le(ne)&&(ne=ce(ne,L+(ne.key==null||w&&w.key===ne.key?"":(""+ne.key).replace(ee,"$&/")+"/")+ue)),O.push(ne)),1;ue=0;var xe=W===""?".":W+":";if(U(w))for(var X=0;X<w.length;X++)W=w[X],fe=xe+F(W,X),ue+=q(W,O,L,fe,ne);else if(X=b(w),typeof X=="function")for(w=X.call(w),X=0;!(W=w.next()).done;)W=W.value,fe=xe+F(W,X++),ue+=q(W,O,L,fe,ne);else if(fe==="object"){if(typeof w.then=="function")return q(_(w),O,L,W,ne);throw O=String(w),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return ue}function S(w,O,L){if(w==null)return w;var W=[],ne=0;return q(w,W,"","",function(fe){return O.call(L,fe,ne++)}),W}function D(w){if(w._status===-1){var O=w._result;O=O(),O.then(function(L){(w._status===0||w._status===-1)&&(w._status=1,w._result=L)},function(L){(w._status===0||w._status===-1)&&(w._status=2,w._result=L)}),w._status===-1&&(w._status=0,w._result=O)}if(w._status===1)return w._result.default;throw w._result}var M=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)};function A(){}return _e.Children={map:S,forEach:function(w,O,L){S(w,function(){O.apply(this,arguments)},L)},count:function(w){var O=0;return S(w,function(){O++}),O},toArray:function(w){return S(w,function(O){return O})||[]},only:function(w){if(!le(w))throw Error("React.Children.only expected to receive a single React element child.");return w}},_e.Component=z,_e.Fragment=i,_e.Profiler=u,_e.PureComponent=Y,_e.StrictMode=o,_e.Suspense=m,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,_e.__COMPILER_RUNTIME={__proto__:null,c:function(w){return B.H.useMemoCache(w)}},_e.cache=function(w){return function(){return w.apply(null,arguments)}},_e.cloneElement=function(w,O,L){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var W=C({},w.props),ne=w.key,fe=void 0;if(O!=null)for(ue in O.ref!==void 0&&(fe=void 0),O.key!==void 0&&(ne=""+O.key),O)!G.call(O,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&O.ref===void 0||(W[ue]=O[ue]);var ue=arguments.length-2;if(ue===1)W.children=L;else if(1<ue){for(var xe=Array(ue),X=0;X<ue;X++)xe[X]=arguments[X+2];W.children=xe}return re(w.type,ne,void 0,void 0,fe,W)},_e.createContext=function(w){return w={$$typeof:h,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:f,_context:w},w},_e.createElement=function(w,O,L){var W,ne={},fe=null;if(O!=null)for(W in O.key!==void 0&&(fe=""+O.key),O)G.call(O,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ne[W]=O[W]);var ue=arguments.length-2;if(ue===1)ne.children=L;else if(1<ue){for(var xe=Array(ue),X=0;X<ue;X++)xe[X]=arguments[X+2];ne.children=xe}if(w&&w.defaultProps)for(W in ue=w.defaultProps,ue)ne[W]===void 0&&(ne[W]=ue[W]);return re(w,fe,void 0,void 0,null,ne)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(w){return{$$typeof:p,render:w}},_e.isValidElement=le,_e.lazy=function(w){return{$$typeof:g,_payload:{_status:-1,_result:w},_init:D}},_e.memo=function(w,O){return{$$typeof:x,type:w,compare:O===void 0?null:O}},_e.startTransition=function(w){var O=B.T,L={};B.T=L;try{var W=w(),ne=B.S;ne!==null&&ne(L,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(A,M)}catch(fe){M(fe)}finally{B.T=O}},_e.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},_e.use=function(w){return B.H.use(w)},_e.useActionState=function(w,O,L){return B.H.useActionState(w,O,L)},_e.useCallback=function(w,O){return B.H.useCallback(w,O)},_e.useContext=function(w){return B.H.useContext(w)},_e.useDebugValue=function(){},_e.useDeferredValue=function(w,O){return B.H.useDeferredValue(w,O)},_e.useEffect=function(w,O,L){var W=B.H;if(typeof L=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return W.useEffect(w,O)},_e.useId=function(){return B.H.useId()},_e.useImperativeHandle=function(w,O,L){return B.H.useImperativeHandle(w,O,L)},_e.useInsertionEffect=function(w,O){return B.H.useInsertionEffect(w,O)},_e.useLayoutEffect=function(w,O){return B.H.useLayoutEffect(w,O)},_e.useMemo=function(w,O){return B.H.useMemo(w,O)},_e.useOptimistic=function(w,O){return B.H.useOptimistic(w,O)},_e.useReducer=function(w,O,L){return B.H.useReducer(w,O,L)},_e.useRef=function(w){return B.H.useRef(w)},_e.useState=function(w){return B.H.useState(w)},_e.useSyncExternalStore=function(w,O,L){return B.H.useSyncExternalStore(w,O,L)},_e.useTransition=function(){return B.H.useTransition()},_e.version="19.1.1",_e}var Pm;function Ur(){return Pm||(Pm=1,ed.exports=gb()),ed.exports}var N=Ur();const se=mp(N);var td={exports:{}},gr={},nd={exports:{}},ad={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and 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
|
+
*/var e0;function yb(){return e0||(e0=1,(function(n){function r(S,D){var M=S.length;S.push(D);e:for(;0<M;){var A=M-1>>>1,w=S[A];if(0<u(w,D))S[A]=D,S[M]=w,M=A;else break e}}function i(S){return S.length===0?null:S[0]}function o(S){if(S.length===0)return null;var D=S[0],M=S.pop();if(M!==D){S[0]=M;e:for(var A=0,w=S.length,O=w>>>1;A<O;){var L=2*(A+1)-1,W=S[L],ne=L+1,fe=S[ne];if(0>u(W,M))ne<w&&0>u(fe,W)?(S[A]=fe,S[ne]=M,A=ne):(S[A]=W,S[L]=M,A=L);else if(ne<w&&0>u(fe,M))S[A]=fe,S[ne]=M,A=ne;else break e}}return D}function u(S,D){var M=S.sortIndex-D.sortIndex;return M!==0?M:S.id-D.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var m=[],x=[],g=1,v=null,b=3,E=!1,C=!1,k=!1,z=!1,R=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function U(S){for(var D=i(x);D!==null;){if(D.callback===null)o(x);else if(D.startTime<=S)o(x),D.sortIndex=D.expirationTime,r(m,D);else break;D=i(x)}}function B(S){if(k=!1,U(S),!C)if(i(m)!==null)C=!0,G||(G=!0,F());else{var D=i(x);D!==null&&q(B,D.startTime-S)}}var G=!1,re=-1,ce=5,le=-1;function J(){return z?!0:!(n.unstable_now()-le<ce)}function ee(){if(z=!1,G){var S=n.unstable_now();le=S;var D=!0;try{e:{C=!1,k&&(k=!1,Y(re),re=-1),E=!0;var M=b;try{t:{for(U(S),v=i(m);v!==null&&!(v.expirationTime>S&&J());){var A=v.callback;if(typeof A=="function"){v.callback=null,b=v.priorityLevel;var w=A(v.expirationTime<=S);if(S=n.unstable_now(),typeof w=="function"){v.callback=w,U(S),D=!0;break t}v===i(m)&&o(m),U(S)}else o(m);v=i(m)}if(v!==null)D=!0;else{var O=i(x);O!==null&&q(B,O.startTime-S),D=!1}}break e}finally{v=null,b=M,E=!1}D=void 0}}finally{D?F():G=!1}}}var F;if(typeof V=="function")F=function(){V(ee)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,_=te.port2;te.port1.onmessage=ee,F=function(){_.postMessage(null)}}else F=function(){R(ee,0)};function q(S,D){re=R(function(){S(n.unstable_now())},D)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(S){S.callback=null},n.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<S?Math.floor(1e3/S):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(S){switch(b){case 1:case 2:case 3:var D=3;break;default:D=b}var M=b;b=D;try{return S()}finally{b=M}},n.unstable_requestPaint=function(){z=!0},n.unstable_runWithPriority=function(S,D){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var M=b;b=S;try{return D()}finally{b=M}},n.unstable_scheduleCallback=function(S,D,M){var A=n.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?A+M:A):M=A,S){case 1:var w=-1;break;case 2:w=250;break;case 5:w=1073741823;break;case 4:w=1e4;break;default:w=5e3}return w=M+w,S={id:g++,callback:D,priorityLevel:S,startTime:M,expirationTime:w,sortIndex:-1},M>A?(S.sortIndex=M,r(x,S),i(m)===null&&S===i(x)&&(k?(Y(re),re=-1):k=!0,q(B,M-A))):(S.sortIndex=w,r(m,S),C||E||(C=!0,G||(G=!0,F()))),S},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(S){var D=b;return function(){var M=b;b=D;try{return S.apply(this,arguments)}finally{b=M}}}})(ad)),ad}var t0;function vb(){return t0||(t0=1,nd.exports=yb()),nd.exports}var ld={exports:{}},wt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and 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 n0;function bb(){if(n0)return wt;n0=1;var n=Ur();function r(m){var x="https://react.dev/errors/"+m;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)x+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(m,x,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:m,containerInfo:x,implementation:g}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,x){if(m==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,wt.createPortal=function(m,x){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return f(m,x,null,g)},wt.flushSync=function(m){var x=h.T,g=o.p;try{if(h.T=null,o.p=2,m)return m()}finally{h.T=x,o.p=g,o.d.f()}},wt.preconnect=function(m,x){typeof m=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,o.d.C(m,x))},wt.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},wt.preinit=function(m,x){if(typeof m=="string"&&x&&typeof x.as=="string"){var g=x.as,v=p(g,x.crossOrigin),b=typeof x.integrity=="string"?x.integrity:void 0,E=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;g==="style"?o.d.S(m,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:v,integrity:b,fetchPriority:E}):g==="script"&&o.d.X(m,{crossOrigin:v,integrity:b,fetchPriority:E,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},wt.preinitModule=function(m,x){if(typeof m=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var g=p(x.as,x.crossOrigin);o.d.M(m,{crossOrigin:g,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&o.d.M(m)},wt.preload=function(m,x){if(typeof m=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var g=x.as,v=p(g,x.crossOrigin);o.d.L(m,g,{crossOrigin:v,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},wt.preloadModule=function(m,x){if(typeof m=="string")if(x){var g=p(x.as,x.crossOrigin);o.d.m(m,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:g,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else o.d.m(m)},wt.requestFormReset=function(m){o.d.r(m)},wt.unstable_batchedUpdates=function(m,x){return m(x)},wt.useFormState=function(m,x,g){return h.H.useFormState(m,x,g)},wt.useFormStatus=function(){return h.H.useHostTransitionStatus()},wt.version="19.1.1",wt}var a0;function pp(){if(a0)return ld.exports;a0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),ld.exports=bb(),ld.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var l0;function Nb(){if(l0)return gr;l0=1;var n=vb(),r=Ur(),i=pp();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(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 p(e){if(f(e)!==e)throw Error(o(188))}function m(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,l=t;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return p(c),e;if(d===l)return p(c),t;d=d.sibling}throw Error(o(188))}if(a.return!==l.return)a=c,l=d;else{for(var y=!1,j=c.child;j;){if(j===a){y=!0,a=c,l=d;break}if(j===l){y=!0,l=c,a=d;break}j=j.sibling}if(!y){for(j=d.child;j;){if(j===a){y=!0,a=d,l=c;break}if(j===l){y=!0,l=d,a=c;break}j=j.sibling}if(!y)throw Error(o(189))}}if(a.alternate!==l)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),Y=Symbol.for("react.consumer"),V=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),ce=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function _(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case z:return"Profiler";case k:return"StrictMode";case B:return"Suspense";case G:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case V:return(e.displayName||"Context")+".Provider";case Y:return(e._context.displayName||"Context")+".Consumer";case U:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case re:return t=e.displayName||null,t!==null?t:_(e.type)||"Memo";case ce:t=e._payload,e=e._init;try{return _(e(t))}catch{}}return null}var q=Array.isArray,S=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M={pending:!1,data:null,method:null,action:null},A=[],w=-1;function O(e){return{current:e}}function L(e){0>w||(e.current=A[w],A[w]=null,w--)}function W(e,t){w++,A[w]=e.current,e.current=t}var ne=O(null),fe=O(null),ue=O(null),xe=O(null);function X(e,t){switch(W(ue,t),W(fe,e),W(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sm(t),e=Em(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(ne),W(ne,e)}function I(){L(ne),L(fe),L(ue)}function ae(e){e.memoizedState!==null&&W(xe,e);var t=ne.current,a=Em(t,e.type);t!==a&&(W(fe,e),W(ne,a))}function me(e){fe.current===e&&(L(ne),L(fe)),xe.current===e&&(L(xe),dr._currentValue=M)}var he=Object.prototype.hasOwnProperty,pe=n.unstable_scheduleCallback,ve=n.unstable_cancelCallback,He=n.unstable_shouldYield,Ie=n.unstable_requestPaint,ke=n.unstable_now,Ne=n.unstable_getCurrentPriorityLevel,ct=n.unstable_ImmediatePriority,Wt=n.unstable_UserBlockingPriority,Nn=n.unstable_NormalPriority,na=n.unstable_LowPriority,An=n.unstable_IdlePriority,hn=n.log,aa=n.unstable_setDisableYieldValue,Ht=null,Pe=null;function St(e){if(typeof hn=="function"&&aa(e),Pe&&typeof Pe.setStrictMode=="function")try{Pe.setStrictMode(Ht,e)}catch{}}var nt=Math.clz32?Math.clz32:Kt,qa=Math.log,ut=Math.LN2;function Kt(e){return e>>>=0,e===0?32:31-(qa(e)/ut|0)|0}var Jt=256,Ft=4194304;function Tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Et(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var c=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var j=l&134217727;return j!==0?(l=j&~d,l!==0?c=Tt(l):(y&=j,y!==0?c=Tt(y):a||(a=j&~e,a!==0&&(c=Tt(a))))):(j=l&~d,j!==0?c=Tt(j):y!==0?c=Tt(y):a||(a=l&~e,a!==0&&(c=Tt(a)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:c}function Ut(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ys(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ml(){var e=Jt;return Jt<<=1,(Jt&4194048)===0&&(Jt=256),e}function la(){var e=Ft;return Ft<<=1,(Ft&62914560)===0&&(Ft=4194304),e}function $a(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function sa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function zn(e,t,a,l,c,d){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var j=e.entanglements,T=e.expirationTimes,Q=e.hiddenUpdates;for(a=y&~a;0<a;){var ie=31-nt(a),de=1<<ie;j[ie]=0,T[ie]=-1;var K=Q[ie];if(K!==null)for(Q[ie]=null,ie=0;ie<K.length;ie++){var P=K[ie];P!==null&&(P.lane&=-536870913)}a&=~de}l!==0&&Vr(e,l,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~t))}function Vr(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-nt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&4194090}function Gr(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-nt(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function vs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function bs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xr(){var e=D.p;return e!==0?e:(e=window.event,e===void 0?32:Gm(e.type))}function Zo(e,t){var a=D.p;try{return D.p=e,t()}finally{D.p=a}}var jn=Math.random().toString(36).slice(2),dt="__reactFiber$"+jn,Nt="__reactProps$"+jn,ra="__reactContainer$"+jn,Ns="__reactEvents$"+jn,Qo="__reactListeners$"+jn,Wo="__reactHandles$"+jn,Zr="__reactResources$"+jn,La="__reactMarker$"+jn;function js(e){delete e[dt],delete e[Nt],delete e[Ns],delete e[Qo],delete e[Wo]}function Rn(e){var t=e[dt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ra]||a[dt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Tm(e);e!==null;){if(a=e[dt])return a;e=Tm(e)}return t}e=a,a=e.parentNode}return null}function ia(e){if(e=e[dt]||e[ra]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Ya(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function oa(e){var t=e[Zr];return t||(t=e[Zr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function at(e){e[La]=!0}var Qr=new Set,Wr={};function Dn(e,t){ca(e,t),ca(e+"Capture",t)}function ca(e,t){for(Wr[e]=t,e=0;e<t.length;e++)Qr.add(t[e])}var Kr=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jr={},Fr={};function Ko(e){return he.call(Fr,e)?!0:he.call(Jr,e)?!1:Kr.test(e)?Fr[e]=!0:(Jr[e]=!0,!1)}function pl(e,t,a){if(Ko(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function gl(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function xn(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}var yl,Ir;function ua(e){if(yl===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);yl=t&&t[1]||"",Ir=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+yl+e+Ir}var ws=!1;function Va(e,t){if(!e||ws)return"";ws=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(P){var K=P}Reflect.construct(e,[],de)}else{try{de.call()}catch(P){K=P}e.call(de.prototype)}}else{try{throw Error()}catch(P){K=P}(de=e())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(P){if(P&&K&&typeof P.stack=="string")return[P.stack,K.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),y=d[0],j=d[1];if(y&&j){var T=y.split(`
|
|
44
|
+
`),Q=j.split(`
|
|
45
|
+
`);for(c=l=0;l<T.length&&!T[l].includes("DetermineComponentFrameRoot");)l++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(l===T.length||c===Q.length)for(l=T.length-1,c=Q.length-1;1<=l&&0<=c&&T[l]!==Q[c];)c--;for(;1<=l&&0<=c;l--,c--)if(T[l]!==Q[c]){if(l!==1||c!==1)do if(l--,c--,0>c||T[l]!==Q[c]){var ie=`
|
|
46
|
+
`+T[l].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=l&&0<=c);break}}}finally{ws=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ua(a):""}function cy(e){switch(e.tag){case 26:case 27:case 5:return ua(e.type);case 16:return ua("Lazy");case 13:return ua("Suspense");case 19:return ua("SuspenseList");case 0:case 15:return Va(e.type,!1);case 11:return Va(e.type.render,!1);case 1:return Va(e.type,!0);case 31:return ua("Activity");default:return""}}function yf(e){try{var t="";do t+=cy(e),e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}function It(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function uy(e){var t=vf(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),l=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var c=a.get,d=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pr(e){e._valueTracker||(e._valueTracker=uy(e))}function bf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=vf(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ei(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var dy=/[\n"\\]/g;function Pt(e){return e.replace(dy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Jo(e,t,a,l,c,d,y,j){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+It(t)):e.value!==""+It(t)&&(e.value=""+It(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Fo(e,y,It(t)):a!=null?Fo(e,y,It(a)):l!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+It(j):e.removeAttribute("name")}function Nf(e,t,a,l,c,d,y,j){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null))return;a=a!=null?""+It(a):"",t=t!=null?""+It(t):a,j||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=j?e.checked:!!l,e.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y)}function Fo(e,t,a){t==="number"&&ei(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function vl(e,t,a,l){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&l&&(e[a].defaultSelected=!0)}else{for(a=""+It(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function jf(e,t,a){if(t!=null&&(t=""+It(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+It(a):""}function wf(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(o(92));if(q(l)){if(1<l.length)throw Error(o(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=It(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l)}function bl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var fy=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Sf(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||fy.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Ef(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&a[c]!==l&&Sf(e,c,l)}else for(var d in t)t.hasOwnProperty(d)&&Sf(e,d,t[d])}function Io(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),xy=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ti(e){return xy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Po=null;function ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nl=null,jl=null;function _f(e){var t=ia(e);if(t&&(e=t.stateNode)){var a=e[Nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Jo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Pt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[Nt]||null;if(!c)throw Error(o(90));Jo(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&bf(l)}break e;case"textarea":jf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&vl(e,!!a.multiple,t,!1)}}}var tc=!1;function kf(e,t,a){if(tc)return e(t,a);tc=!0;try{var l=e(t);return l}finally{if(tc=!1,(Nl!==null||jl!==null)&&($i(),Nl&&(t=Nl,e=jl,jl=Nl=null,_f(t),e)))for(t=0;t<e.length;t++)_f(e[t])}}function Ss(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Nt]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nc=!1;if(On)try{var Es={};Object.defineProperty(Es,"passive",{get:function(){nc=!0}}),window.addEventListener("test",Es,Es),window.removeEventListener("test",Es,Es)}catch{nc=!1}var da=null,ac=null,ni=null;function Cf(){if(ni)return ni;var e,t=ac,a=t.length,l,c="value"in da?da.value:da.textContent,d=c.length;for(e=0;e<a&&t[e]===c[e];e++);var y=a-e;for(l=1;l<=y&&t[a-l]===c[d-l];l++);return ni=c.slice(e,1<l?1-l:void 0)}function ai(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 li(){return!0}function Tf(){return!1}function Mt(e){function t(a,l,c,d,y){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(a=e[j],this[j]=a?a(d):d[j]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?li:Tf,this.isPropagationStopped=Tf,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=li)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=li)},persist:function(){},isPersistent:li}),t}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},si=Mt(Ga),_s=g({},Ga,{view:0,detail:0}),my=Mt(_s),lc,sc,ks,ri=g({},_s,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ic,button:0,buttons:0,relatedTarget:function(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!==ks&&(ks&&e.type==="mousemove"?(lc=e.screenX-ks.screenX,sc=e.screenY-ks.screenY):sc=lc=0,ks=e),lc)},movementY:function(e){return"movementY"in e?e.movementY:sc}}),Mf=Mt(ri),py=g({},ri,{dataTransfer:0}),gy=Mt(py),yy=g({},_s,{relatedTarget:0}),rc=Mt(yy),vy=g({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),by=Mt(vy),Ny=g({},Ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jy=Mt(Ny),wy=g({},Ga,{data:0}),Af=Mt(wy),Sy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ey={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"},_y={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ky(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_y[e])?!!t[e]:!1}function ic(){return ky}var Cy=g({},_s,{key:function(e){if(e.key){var t=Sy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ai(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ey[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ic,charCode:function(e){return e.type==="keypress"?ai(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ai(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ty=Mt(Cy),My=g({},ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zf=Mt(My),Ay=g({},_s,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ic}),zy=Mt(Ay),Ry=g({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dy=Mt(Ry),Oy=g({},ri,{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}),Hy=Mt(Oy),Uy=g({},Ga,{newState:0,oldState:0}),By=Mt(Uy),qy=[9,13,27,32],oc=On&&"CompositionEvent"in window,Cs=null;On&&"documentMode"in document&&(Cs=document.documentMode);var $y=On&&"TextEvent"in window&&!Cs,Rf=On&&(!oc||Cs&&8<Cs&&11>=Cs),Df=" ",Of=!1;function Hf(e,t){switch(e){case"keyup":return qy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wl=!1;function Ly(e,t){switch(e){case"compositionend":return Uf(t);case"keypress":return t.which!==32?null:(Of=!0,Df);case"textInput":return e=t.data,e===Df&&Of?null:e;default:return null}}function Yy(e,t){if(wl)return e==="compositionend"||!oc&&Hf(e,t)?(e=Cf(),ni=ac=da=null,wl=!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 Rf&&t.locale!=="ko"?null:t.data;default:return null}}var Vy={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 Bf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Vy[e.type]:t==="textarea"}function qf(e,t,a,l){Nl?jl?jl.push(l):jl=[l]:Nl=l,t=Zi(t,"onChange"),0<t.length&&(a=new si("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Ts=null,Ms=null;function Gy(e){vm(e,0)}function ii(e){var t=Ya(e);if(bf(t))return e}function $f(e,t){if(e==="change")return t}var Lf=!1;if(On){var cc;if(On){var uc="oninput"in document;if(!uc){var Yf=document.createElement("div");Yf.setAttribute("oninput","return;"),uc=typeof Yf.oninput=="function"}cc=uc}else cc=!1;Lf=cc&&(!document.documentMode||9<document.documentMode)}function Vf(){Ts&&(Ts.detachEvent("onpropertychange",Gf),Ms=Ts=null)}function Gf(e){if(e.propertyName==="value"&&ii(Ms)){var t=[];qf(t,Ms,e,ec(e)),kf(Gy,t)}}function Xy(e,t,a){e==="focusin"?(Vf(),Ts=t,Ms=a,Ts.attachEvent("onpropertychange",Gf)):e==="focusout"&&Vf()}function Zy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ii(Ms)}function Qy(e,t){if(e==="click")return ii(t)}function Wy(e,t){if(e==="input"||e==="change")return ii(t)}function Ky(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:Ky;function As(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!he.call(t,c)||!Bt(e[c],t[c]))return!1}return!0}function Xf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Zf(e,t){var a=Xf(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Xf(a)}}function Qf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ei(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ei(e.document)}return t}function dc(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")}var Jy=On&&"documentMode"in document&&11>=document.documentMode,Sl=null,fc=null,zs=null,hc=!1;function Kf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;hc||Sl==null||Sl!==ei(l)||(l=Sl,"selectionStart"in l&&dc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),zs&&As(zs,l)||(zs=l,l=Zi(fc,"onSelect"),0<l.length&&(t=new si("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Sl)))}function Xa(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var El={animationend:Xa("Animation","AnimationEnd"),animationiteration:Xa("Animation","AnimationIteration"),animationstart:Xa("Animation","AnimationStart"),transitionrun:Xa("Transition","TransitionRun"),transitionstart:Xa("Transition","TransitionStart"),transitioncancel:Xa("Transition","TransitionCancel"),transitionend:Xa("Transition","TransitionEnd")},xc={},Jf={};On&&(Jf=document.createElement("div").style,"AnimationEvent"in window||(delete El.animationend.animation,delete El.animationiteration.animation,delete El.animationstart.animation),"TransitionEvent"in window||delete El.transitionend.transition);function Za(e){if(xc[e])return xc[e];if(!El[e])return e;var t=El[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Jf)return xc[e]=t[a];return e}var Ff=Za("animationend"),If=Za("animationiteration"),Pf=Za("animationstart"),Fy=Za("transitionrun"),Iy=Za("transitionstart"),Py=Za("transitioncancel"),eh=Za("transitionend"),th=new Map,mc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");mc.push("scrollEnd");function mn(e,t){th.set(e,t),Dn(t,[e])}var nh=new WeakMap;function en(e,t){if(typeof e=="object"&&e!==null){var a=nh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:yf(t)},nh.set(e,t),t)}return{value:e,source:t,stack:yf(t)}}var tn=[],_l=0,pc=0;function oi(){for(var e=_l,t=pc=_l=0;t<e;){var a=tn[t];tn[t++]=null;var l=tn[t];tn[t++]=null;var c=tn[t];tn[t++]=null;var d=tn[t];if(tn[t++]=null,l!==null&&c!==null){var y=l.pending;y===null?c.next=c:(c.next=y.next,y.next=c),l.pending=c}d!==0&&ah(a,c,d)}}function ci(e,t,a,l){tn[_l++]=e,tn[_l++]=t,tn[_l++]=a,tn[_l++]=l,pc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function gc(e,t,a,l){return ci(e,t,a,l),ui(e)}function kl(e,t){return ci(e,null,null,t),ui(e)}function ah(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,l=d.alternate,l!==null&&(l.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-nt(a),e=d.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),d):null}function ui(e){if(50<ar)throw ar=0,wu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Cl={};function ev(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,t,a,l){return new ev(e,t,a,l)}function yc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hn(e,t){var a=e.alternate;return a===null?(a=qt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function lh(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function di(e,t,a,l,c,d){var y=0;if(l=e,typeof e=="function")yc(e)&&(y=1);else if(typeof e=="string")y=nb(e,a,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case le:return e=qt(31,a,t,c),e.elementType=le,e.lanes=d,e;case C:return Qa(a.children,c,d,t);case k:y=8,c|=24;break;case z:return e=qt(12,a,t,c|2),e.elementType=z,e.lanes=d,e;case B:return e=qt(13,a,t,c),e.elementType=B,e.lanes=d,e;case G:return e=qt(19,a,t,c),e.elementType=G,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:case V:y=10;break e;case Y:y=9;break e;case U:y=11;break e;case re:y=14;break e;case ce:y=16,l=null;break e}y=29,a=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=qt(y,a,t,c),t.elementType=e,t.type=l,t.lanes=d,t}function Qa(e,t,a,l){return e=qt(7,e,l,t),e.lanes=a,e}function vc(e,t,a){return e=qt(6,e,null,t),e.lanes=a,e}function bc(e,t,a){return t=qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Tl=[],Ml=0,fi=null,hi=0,nn=[],an=0,Wa=null,Un=1,Bn="";function Ka(e,t){Tl[Ml++]=hi,Tl[Ml++]=fi,fi=e,hi=t}function sh(e,t,a){nn[an++]=Un,nn[an++]=Bn,nn[an++]=Wa,Wa=e;var l=Un;e=Bn;var c=32-nt(l)-1;l&=~(1<<c),a+=1;var d=32-nt(t)+c;if(30<d){var y=c-c%5;d=(l&(1<<y)-1).toString(32),l>>=y,c-=y,Un=1<<32-nt(t)+c|a<<c|l,Bn=d+e}else Un=1<<d|a<<c|l,Bn=e}function Nc(e){e.return!==null&&(Ka(e,1),sh(e,1,0))}function jc(e){for(;e===fi;)fi=Tl[--Ml],Tl[Ml]=null,hi=Tl[--Ml],Tl[Ml]=null;for(;e===Wa;)Wa=nn[--an],nn[an]=null,Bn=nn[--an],nn[an]=null,Un=nn[--an],nn[an]=null}var _t=null,We=null,Oe=!1,Ja=null,wn=!1,wc=Error(o(519));function Fa(e){var t=Error(o(418,""));throw Os(en(t,e)),wc}function rh(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[dt]=e,t[Nt]=l,a){case"dialog":ze("cancel",t),ze("close",t);break;case"iframe":case"object":case"embed":ze("load",t);break;case"video":case"audio":for(a=0;a<sr.length;a++)ze(sr[a],t);break;case"source":ze("error",t);break;case"img":case"image":case"link":ze("error",t),ze("load",t);break;case"details":ze("toggle",t);break;case"input":ze("invalid",t),Nf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),Pr(t);break;case"select":ze("invalid",t);break;case"textarea":ze("invalid",t),wf(t,l.value,l.defaultValue,l.children),Pr(t)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||wm(t.textContent,a)?(l.popover!=null&&(ze("beforetoggle",t),ze("toggle",t)),l.onScroll!=null&&ze("scroll",t),l.onScrollEnd!=null&&ze("scrollend",t),l.onClick!=null&&(t.onclick=Qi),t=!0):t=!1,t||Fa(e)}function ih(e){for(_t=e.return;_t;)switch(_t.tag){case 5:case 13:wn=!1;return;case 27:case 3:wn=!0;return;default:_t=_t.return}}function Rs(e){if(e!==_t)return!1;if(!Oe)return ih(e),Oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||qu(e.type,e.memoizedProps)),a=!a),a&&We&&Fa(e),ih(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){We=gn(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}We=null}}else t===27?(t=We,ka(e.type)?(e=Vu,Vu=null,We=e):We=t):We=_t?gn(e.stateNode.nextSibling):null;return!0}function Ds(){We=_t=null,Oe=!1}function oh(){var e=Ja;return e!==null&&(Rt===null?Rt=e:Rt.push.apply(Rt,e),Ja=null),e}function Os(e){Ja===null?Ja=[e]:Ja.push(e)}var Sc=O(null),Ia=null,qn=null;function fa(e,t,a){W(Sc,t._currentValue),t._currentValue=a}function $n(e){e._currentValue=Sc.current,L(Sc)}function Ec(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function _c(e,t,a,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var y=c.child;d=d.firstContext;e:for(;d!==null;){var j=d;d=c;for(var T=0;T<t.length;T++)if(j.context===t[T]){d.lanes|=a,j=d.alternate,j!==null&&(j.lanes|=a),Ec(d.return,a,e),l||(y=null);break e}d=j.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(o(341));y.lanes|=a,d=y.alternate,d!==null&&(d.lanes|=a),Ec(y,a,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function Hs(e,t,a,l){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(o(387));if(y=y.memoizedProps,y!==null){var j=c.type;Bt(c.pendingProps.value,y.value)||(e!==null?e.push(j):e=[j])}}else if(c===xe.current){if(y=c.alternate,y===null)throw Error(o(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(dr):e=[dr])}c=c.return}e!==null&&_c(t,e,a,l),t.flags|=262144}function xi(e){for(e=e.firstContext;e!==null;){if(!Bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pa(e){Ia=e,qn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function jt(e){return ch(Ia,e)}function mi(e,t){return Ia===null&&Pa(e),ch(e,t)}function ch(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},qn===null){if(e===null)throw Error(o(308));qn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qn=qn.next=t;return a}var tv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},nv=n.unstable_scheduleCallback,av=n.unstable_NormalPriority,rt={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function kc(){return{controller:new tv,data:new Map,refCount:0}}function Us(e){e.refCount--,e.refCount===0&&nv(av,function(){e.controller.abort()})}var Bs=null,Cc=0,Al=0,zl=null;function lv(e,t){if(Bs===null){var a=Bs=[];Cc=0,Al=Mu(),zl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Cc++,t.then(uh,uh),t}function uh(){if(--Cc===0&&Bs!==null){zl!==null&&(zl.status="fulfilled");var e=Bs;Bs=null,Al=0,zl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var dh=S.S;S.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&lv(e,t),dh!==null&&dh(e,t)};var el=O(null);function Tc(){var e=el.current;return e!==null?e:Ve.pooledCache}function pi(e,t){t===null?W(el,el.current):W(el,t.pool)}function fh(){var e=Tc();return e===null?null:{parent:rt._currentValue,pool:e}}var qs=Error(o(460)),hh=Error(o(474)),gi=Error(o(542)),Mc={then:function(){}};function xh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function yi(){}function mh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(yi,yi),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gh(e),e;default:if(typeof t.status=="string")t.then(yi,yi);else{if(e=Ve,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gh(e),e}throw $s=t,qs}}var $s=null;function ph(){if($s===null)throw Error(o(459));var e=$s;return $s=null,e}function gh(e){if(e===qs||e===gi)throw Error(o(483))}var ha=!1;function Ac(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ma(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ue&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=ui(e),ah(e,null,a),t}return ci(e,l,t,a),ui(e)}function Ls(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Gr(e,a)}}function Rc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=y:d=d.next=y,a=a.next}while(a!==null);d===null?c=d=t:d=d.next=t}else c=d=t;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Dc=!1;function Ys(){if(Dc){var e=zl;if(e!==null)throw e}}function Vs(e,t,a,l){Dc=!1;var c=e.updateQueue;ha=!1;var d=c.firstBaseUpdate,y=c.lastBaseUpdate,j=c.shared.pending;if(j!==null){c.shared.pending=null;var T=j,Q=T.next;T.next=null,y===null?d=Q:y.next=Q,y=T;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,j=ie.lastBaseUpdate,j!==y&&(j===null?ie.firstBaseUpdate=Q:j.next=Q,ie.lastBaseUpdate=T))}if(d!==null){var de=c.baseState;y=0,ie=Q=T=null,j=d;do{var K=j.lane&-536870913,P=K!==j.lane;if(P?(Re&K)===K:(l&K)===K){K!==0&&K===Al&&(Dc=!0),ie!==null&&(ie=ie.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Ee=e,we=j;K=t;var Le=a;switch(we.tag){case 1:if(Ee=we.payload,typeof Ee=="function"){de=Ee.call(Le,de,K);break e}de=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=we.payload,K=typeof Ee=="function"?Ee.call(Le,de,K):Ee,K==null)break e;de=g({},de,K);break e;case 2:ha=!0}}K=j.callback,K!==null&&(e.flags|=64,P&&(e.flags|=8192),P=c.callbacks,P===null?c.callbacks=[K]:P.push(K))}else P={lane:K,tag:j.tag,payload:j.payload,callback:j.callback,next:null},ie===null?(Q=ie=P,T=de):ie=ie.next=P,y|=K;if(j=j.next,j===null){if(j=c.shared.pending,j===null)break;P=j,j=P.next,P.next=null,c.lastBaseUpdate=P,c.shared.pending=null}}while(!0);ie===null&&(T=de),c.baseState=T,c.firstBaseUpdate=Q,c.lastBaseUpdate=ie,d===null&&(c.shared.lanes=0),wa|=y,e.lanes=y,e.memoizedState=de}}function yh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function vh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)yh(a[e],t)}var Rl=O(null),vi=O(0);function bh(e,t){e=Qn,W(vi,e),W(Rl,t),Qn=e|t.baseLanes}function Oc(){W(vi,Qn),W(Rl,Rl.current)}function Hc(){Qn=vi.current,L(Rl),L(vi)}var pa=0,Ce=null,qe=null,lt=null,bi=!1,Dl=!1,tl=!1,Ni=0,Gs=0,Ol=null,rv=0;function et(){throw Error(o(321))}function Uc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Bt(e[a],t[a]))return!1;return!0}function Bc(e,t,a,l,c,d){return pa=d,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,S.H=e===null||e.memoizedState===null?ax:lx,tl=!1,d=a(l,c),tl=!1,Dl&&(d=jh(t,a,l,c)),Nh(e),d}function Nh(e){S.H=ki;var t=qe!==null&&qe.next!==null;if(pa=0,lt=qe=Ce=null,bi=!1,Gs=0,Ol=null,t)throw Error(o(300));e===null||ft||(e=e.dependencies,e!==null&&xi(e)&&(ft=!0))}function jh(e,t,a,l){Ce=e;var c=0;do{if(Dl&&(Ol=null),Gs=0,Dl=!1,25<=c)throw Error(o(301));if(c+=1,lt=qe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}S.H=hv,d=t(a,l)}while(Dl);return d}function iv(){var e=S.H,t=e.useState()[0];return t=typeof t.then=="function"?Xs(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(Ce.flags|=1024),t}function qc(){var e=Ni!==0;return Ni=0,e}function $c(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Lc(e){if(bi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bi=!1}pa=0,lt=qe=Ce=null,Dl=!1,Gs=Ni=0,Ol=null}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ce.memoizedState=lt=e:lt=lt.next=e,lt}function st(){if(qe===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=lt===null?Ce.memoizedState:lt.next;if(t!==null)lt=t,qe=e;else{if(e===null)throw Ce.alternate===null?Error(o(467)):Error(o(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},lt===null?Ce.memoizedState=lt=e:lt=lt.next=e}return lt}function Yc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xs(e){var t=Gs;return Gs+=1,Ol===null&&(Ol=[]),e=mh(Ol,e,t),t=Ce,(lt===null?t.memoizedState:lt.next)===null&&(t=t.alternate,S.H=t===null||t.memoizedState===null?ax:lx),e}function ji(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Xs(e);if(e.$$typeof===V)return jt(e)}throw Error(o(438,String(e)))}function Vc(e){var t=null,a=Ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Ce.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Yc(),Ce.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=J;return t.index++,a}function Ln(e,t){return typeof t=="function"?t(e):t}function wi(e){var t=st();return Gc(t,qe,e)}function Gc(e,t,a){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=a;var c=e.baseQueue,d=l.pending;if(d!==null){if(c!==null){var y=c.next;c.next=d.next,d.next=y}t.baseQueue=c=d,l.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var j=y=null,T=null,Q=t,ie=!1;do{var de=Q.lane&-536870913;if(de!==Q.lane?(Re&de)===de:(pa&de)===de){var K=Q.revertLane;if(K===0)T!==null&&(T=T.next={lane:0,revertLane:0,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),de===Al&&(ie=!0);else if((pa&K)===K){Q=Q.next,K===Al&&(ie=!0);continue}else de={lane:0,revertLane:Q.revertLane,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},T===null?(j=T=de,y=d):T=T.next=de,Ce.lanes|=K,wa|=K;de=Q.action,tl&&a(d,de),d=Q.hasEagerState?Q.eagerState:a(d,de)}else K={lane:de,revertLane:Q.revertLane,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},T===null?(j=T=K,y=d):T=T.next=K,Ce.lanes|=de,wa|=de;Q=Q.next}while(Q!==null&&Q!==t);if(T===null?y=d:T.next=j,!Bt(d,e.memoizedState)&&(ft=!0,ie&&(a=zl,a!==null)))throw a;e.memoizedState=d,e.baseState=y,e.baseQueue=T,l.lastRenderedState=d}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Xc(e){var t=st(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var l=a.dispatch,c=a.pending,d=t.memoizedState;if(c!==null){a.pending=null;var y=c=c.next;do d=e(d,y.action),y=y.next;while(y!==c);Bt(d,t.memoizedState)||(ft=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,l]}function wh(e,t,a){var l=Ce,c=st(),d=Oe;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=t();var y=!Bt((qe||c).memoizedState,a);y&&(c.memoizedState=a,ft=!0),c=c.queue;var j=_h.bind(null,l,c,e);if(Zs(2048,8,j,[e]),c.getSnapshot!==t||y||lt!==null&<.memoizedState.tag&1){if(l.flags|=2048,Hl(9,Si(),Eh.bind(null,l,c,a,t),null),Ve===null)throw Error(o(349));d||(pa&124)!==0||Sh(l,t,a)}return a}function Sh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ce.updateQueue,t===null?(t=Yc(),Ce.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Eh(e,t,a,l){t.value=a,t.getSnapshot=l,kh(t)&&Ch(e)}function _h(e,t,a){return a(function(){kh(t)&&Ch(e)})}function kh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Bt(e,a)}catch{return!0}}function Ch(e){var t=kl(e,2);t!==null&&Gt(t,e,2)}function Zc(e){var t=At();if(typeof e=="function"){var a=e;if(e=a(),tl){St(!0);try{a()}finally{St(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:e},t}function Th(e,t,a,l){return e.baseState=a,Gc(e,qe,typeof l=="function"?l:Ln)}function ov(e,t,a,l,c){if(_i(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};S.T!==null?a(!0):d.isTransition=!1,l(d),a=t.pending,a===null?(d.next=t.pending=d,Mh(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Mh(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var d=S.T,y={};S.T=y;try{var j=a(c,l),T=S.S;T!==null&&T(y,j),Ah(e,t,j)}catch(Q){Qc(e,t,Q)}finally{S.T=d}}else try{d=a(c,l),Ah(e,t,d)}catch(Q){Qc(e,t,Q)}}function Ah(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){zh(e,t,l)},function(l){return Qc(e,t,l)}):zh(e,t,a)}function zh(e,t,a){t.status="fulfilled",t.value=a,Rh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Mh(e,a)))}function Qc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Rh(t),t=t.next;while(t!==l)}e.action=null}function Rh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Dh(e,t){return t}function Oh(e,t){if(Oe){var a=Ve.formState;if(a!==null){e:{var l=Ce;if(Oe){if(We){t:{for(var c=We,d=wn;c.nodeType!==8;){if(!d){c=null;break t}if(c=gn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){We=gn(c.nextSibling),l=c.data==="F!";break e}}Fa(l)}l=!1}l&&(t=a[0])}}return a=At(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Dh,lastRenderedState:t},a.queue=l,a=ex.bind(null,Ce,l),l.dispatch=a,l=Zc(!1),d=Ic.bind(null,Ce,!1,l.queue),l=At(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=ov.bind(null,Ce,c,d,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function Hh(e){var t=st();return Uh(t,qe,e)}function Uh(e,t,a){if(t=Gc(e,t,Dh)[0],e=wi(Ln)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Xs(t)}catch(y){throw y===qs?gi:y}else l=t;t=st();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(Ce.flags|=2048,Hl(9,Si(),cv.bind(null,c,a),null)),[l,d,e]}function cv(e,t){e.action=t}function Bh(e){var t=st(),a=qe;if(a!==null)return Uh(t,a,e);st(),t=t.memoizedState,a=st();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Hl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Ce.updateQueue,t===null&&(t=Yc(),Ce.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Si(){return{destroy:void 0,resource:void 0}}function qh(){return st().memoizedState}function Ei(e,t,a,l){var c=At();l=l===void 0?null:l,Ce.flags|=e,c.memoizedState=Hl(1|t,Si(),a,l)}function Zs(e,t,a,l){var c=st();l=l===void 0?null:l;var d=c.memoizedState.inst;qe!==null&&l!==null&&Uc(l,qe.memoizedState.deps)?c.memoizedState=Hl(t,d,a,l):(Ce.flags|=e,c.memoizedState=Hl(1|t,d,a,l))}function $h(e,t){Ei(8390656,8,e,t)}function Lh(e,t){Zs(2048,8,e,t)}function Yh(e,t){return Zs(4,2,e,t)}function Vh(e,t){return Zs(4,4,e,t)}function Gh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Xh(e,t,a){a=a!=null?a.concat([e]):null,Zs(4,4,Gh.bind(null,t,e),a)}function Wc(){}function Zh(e,t){var a=st();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Uc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Qh(e,t){var a=st();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Uc(t,l[1]))return l[0];if(l=e(),tl){St(!0);try{e()}finally{St(!1)}}return a.memoizedState=[l,t],l}function Kc(e,t,a){return a===void 0||(pa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Jx(),Ce.lanes|=e,wa|=e,a)}function Wh(e,t,a,l){return Bt(a,t)?a:Rl.current!==null?(e=Kc(e,a,l),Bt(e,t)||(ft=!0),e):(pa&42)===0?(ft=!0,e.memoizedState=a):(e=Jx(),Ce.lanes|=e,wa|=e,t)}function Kh(e,t,a,l,c){var d=D.p;D.p=d!==0&&8>d?d:8;var y=S.T,j={};S.T=j,Ic(e,!1,t,a);try{var T=c(),Q=S.S;if(Q!==null&&Q(j,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var ie=sv(T,l);Qs(e,t,ie,Vt(e))}else Qs(e,t,l,Vt(e))}catch(de){Qs(e,t,{then:function(){},status:"rejected",reason:de},Vt())}finally{D.p=d,S.T=y}}function uv(){}function Jc(e,t,a,l){if(e.tag!==5)throw Error(o(476));var c=Jh(e).queue;Kh(e,c,t,M,a===null?uv:function(){return Fh(e),a(l)})}function Jh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:M},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fh(e){var t=Jh(e).next.queue;Qs(e,t,{},Vt())}function Fc(){return jt(dr)}function Ih(){return st().memoizedState}function Ph(){return st().memoizedState}function dv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Vt();e=xa(a);var l=ma(t,e,a);l!==null&&(Gt(l,t,a),Ls(l,t,a)),t={cache:kc()},e.payload=t;return}t=t.return}}function fv(e,t,a){var l=Vt();a={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},_i(e)?tx(t,a):(a=gc(e,t,a,l),a!==null&&(Gt(a,e,l),nx(a,t,l)))}function ex(e,t,a){var l=Vt();Qs(e,t,a,l)}function Qs(e,t,a,l){var c={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(_i(e))tx(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,j=d(y,a);if(c.hasEagerState=!0,c.eagerState=j,Bt(j,y))return ci(e,t,c,0),Ve===null&&oi(),!1}catch{}finally{}if(a=gc(e,t,c,l),a!==null)return Gt(a,e,l),nx(a,t,l),!0}return!1}function Ic(e,t,a,l){if(l={lane:2,revertLane:Mu(),action:l,hasEagerState:!1,eagerState:null,next:null},_i(e)){if(t)throw Error(o(479))}else t=gc(e,a,l,2),t!==null&&Gt(t,e,2)}function _i(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function tx(e,t){Dl=bi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function nx(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Gr(e,a)}}var ki={readContext:jt,use:ji,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et},ax={readContext:jt,use:ji,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:jt,useEffect:$h,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ei(4194308,4,Gh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ei(4194308,4,e,t)},useInsertionEffect:function(e,t){Ei(4,2,e,t)},useMemo:function(e,t){var a=At();t=t===void 0?null:t;var l=e();if(tl){St(!0);try{e()}finally{St(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=At();if(a!==void 0){var c=a(t);if(tl){St(!0);try{a(t)}finally{St(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=fv.bind(null,Ce,e),[l.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:function(e){e=Zc(e);var t=e.queue,a=ex.bind(null,Ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Wc,useDeferredValue:function(e,t){var a=At();return Kc(a,e,t)},useTransition:function(){var e=Zc(!1);return e=Kh.bind(null,Ce,e.queue,!0,!1),At().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Ce,c=At();if(Oe){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Ve===null)throw Error(o(349));(Re&124)!==0||Sh(l,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,$h(_h.bind(null,l,d,e),[e]),l.flags|=2048,Hl(9,Si(),Eh.bind(null,l,d,a,t),null),a},useId:function(){var e=At(),t=Ve.identifierPrefix;if(Oe){var a=Bn,l=Un;a=(l&~(1<<32-nt(l)-1)).toString(32)+a,t="«"+t+"R"+a,a=Ni++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=rv++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Fc,useFormState:Oh,useActionState:Oh,useOptimistic:function(e){var t=At();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Ic.bind(null,Ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:Vc,useCacheRefresh:function(){return At().memoizedState=dv.bind(null,Ce)}},lx={readContext:jt,use:ji,useCallback:Zh,useContext:jt,useEffect:Lh,useImperativeHandle:Xh,useInsertionEffect:Yh,useLayoutEffect:Vh,useMemo:Qh,useReducer:wi,useRef:qh,useState:function(){return wi(Ln)},useDebugValue:Wc,useDeferredValue:function(e,t){var a=st();return Wh(a,qe.memoizedState,e,t)},useTransition:function(){var e=wi(Ln)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Xs(e),t]},useSyncExternalStore:wh,useId:Ih,useHostTransitionStatus:Fc,useFormState:Hh,useActionState:Hh,useOptimistic:function(e,t){var a=st();return Th(a,qe,e,t)},useMemoCache:Vc,useCacheRefresh:Ph},hv={readContext:jt,use:ji,useCallback:Zh,useContext:jt,useEffect:Lh,useImperativeHandle:Xh,useInsertionEffect:Yh,useLayoutEffect:Vh,useMemo:Qh,useReducer:Xc,useRef:qh,useState:function(){return Xc(Ln)},useDebugValue:Wc,useDeferredValue:function(e,t){var a=st();return qe===null?Kc(a,e,t):Wh(a,qe.memoizedState,e,t)},useTransition:function(){var e=Xc(Ln)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Xs(e),t]},useSyncExternalStore:wh,useId:Ih,useHostTransitionStatus:Fc,useFormState:Bh,useActionState:Bh,useOptimistic:function(e,t){var a=st();return qe!==null?Th(a,qe,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Vc,useCacheRefresh:Ph},Ul=null,Ws=0;function Ci(e){var t=Ws;return Ws+=1,Ul===null&&(Ul=[]),mh(Ul,e,t)}function Ks(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ti(e,t){throw t.$$typeof===v?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function sx(e){var t=e._init;return t(e._payload)}function rx(e){function t($,H){if(e){var Z=$.deletions;Z===null?($.deletions=[H],$.flags|=16):Z.push(H)}}function a($,H){if(!e)return null;for(;H!==null;)t($,H),H=H.sibling;return null}function l($){for(var H=new Map;$!==null;)$.key!==null?H.set($.key,$):H.set($.index,$),$=$.sibling;return H}function c($,H){return $=Hn($,H),$.index=0,$.sibling=null,$}function d($,H,Z){return $.index=Z,e?(Z=$.alternate,Z!==null?(Z=Z.index,Z<H?($.flags|=67108866,H):Z):($.flags|=67108866,H)):($.flags|=1048576,H)}function y($){return e&&$.alternate===null&&($.flags|=67108866),$}function j($,H,Z,oe){return H===null||H.tag!==6?(H=vc(Z,$.mode,oe),H.return=$,H):(H=c(H,Z),H.return=$,H)}function T($,H,Z,oe){var ge=Z.type;return ge===C?ie($,H,Z.props.children,oe,Z.key):H!==null&&(H.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===ce&&sx(ge)===H.type)?(H=c(H,Z.props),Ks(H,Z),H.return=$,H):(H=di(Z.type,Z.key,Z.props,null,$.mode,oe),Ks(H,Z),H.return=$,H)}function Q($,H,Z,oe){return H===null||H.tag!==4||H.stateNode.containerInfo!==Z.containerInfo||H.stateNode.implementation!==Z.implementation?(H=bc(Z,$.mode,oe),H.return=$,H):(H=c(H,Z.children||[]),H.return=$,H)}function ie($,H,Z,oe,ge){return H===null||H.tag!==7?(H=Qa(Z,$.mode,oe,ge),H.return=$,H):(H=c(H,Z),H.return=$,H)}function de($,H,Z){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=vc(""+H,$.mode,Z),H.return=$,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return Z=di(H.type,H.key,H.props,null,$.mode,Z),Ks(Z,H),Z.return=$,Z;case E:return H=bc(H,$.mode,Z),H.return=$,H;case ce:var oe=H._init;return H=oe(H._payload),de($,H,Z)}if(q(H)||F(H))return H=Qa(H,$.mode,Z,null),H.return=$,H;if(typeof H.then=="function")return de($,Ci(H),Z);if(H.$$typeof===V)return de($,mi($,H),Z);Ti($,H)}return null}function K($,H,Z,oe){var ge=H!==null?H.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return ge!==null?null:j($,H,""+Z,oe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return Z.key===ge?T($,H,Z,oe):null;case E:return Z.key===ge?Q($,H,Z,oe):null;case ce:return ge=Z._init,Z=ge(Z._payload),K($,H,Z,oe)}if(q(Z)||F(Z))return ge!==null?null:ie($,H,Z,oe,null);if(typeof Z.then=="function")return K($,H,Ci(Z),oe);if(Z.$$typeof===V)return K($,H,mi($,Z),oe);Ti($,Z)}return null}function P($,H,Z,oe,ge){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return $=$.get(Z)||null,j(H,$,""+oe,ge);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return $=$.get(oe.key===null?Z:oe.key)||null,T(H,$,oe,ge);case E:return $=$.get(oe.key===null?Z:oe.key)||null,Q(H,$,oe,ge);case ce:var Te=oe._init;return oe=Te(oe._payload),P($,H,Z,oe,ge)}if(q(oe)||F(oe))return $=$.get(Z)||null,ie(H,$,oe,ge,null);if(typeof oe.then=="function")return P($,H,Z,Ci(oe),ge);if(oe.$$typeof===V)return P($,H,Z,mi(H,oe),ge);Ti(H,oe)}return null}function Ee($,H,Z,oe){for(var ge=null,Te=null,be=H,Se=H=0,xt=null;be!==null&&Se<Z.length;Se++){be.index>Se?(xt=be,be=null):xt=be.sibling;var De=K($,be,Z[Se],oe);if(De===null){be===null&&(be=xt);break}e&&be&&De.alternate===null&&t($,be),H=d(De,H,Se),Te===null?ge=De:Te.sibling=De,Te=De,be=xt}if(Se===Z.length)return a($,be),Oe&&Ka($,Se),ge;if(be===null){for(;Se<Z.length;Se++)be=de($,Z[Se],oe),be!==null&&(H=d(be,H,Se),Te===null?ge=be:Te.sibling=be,Te=be);return Oe&&Ka($,Se),ge}for(be=l(be);Se<Z.length;Se++)xt=P(be,$,Se,Z[Se],oe),xt!==null&&(e&&xt.alternate!==null&&be.delete(xt.key===null?Se:xt.key),H=d(xt,H,Se),Te===null?ge=xt:Te.sibling=xt,Te=xt);return e&&be.forEach(function(za){return t($,za)}),Oe&&Ka($,Se),ge}function we($,H,Z,oe){if(Z==null)throw Error(o(151));for(var ge=null,Te=null,be=H,Se=H=0,xt=null,De=Z.next();be!==null&&!De.done;Se++,De=Z.next()){be.index>Se?(xt=be,be=null):xt=be.sibling;var za=K($,be,De.value,oe);if(za===null){be===null&&(be=xt);break}e&&be&&za.alternate===null&&t($,be),H=d(za,H,Se),Te===null?ge=za:Te.sibling=za,Te=za,be=xt}if(De.done)return a($,be),Oe&&Ka($,Se),ge;if(be===null){for(;!De.done;Se++,De=Z.next())De=de($,De.value,oe),De!==null&&(H=d(De,H,Se),Te===null?ge=De:Te.sibling=De,Te=De);return Oe&&Ka($,Se),ge}for(be=l(be);!De.done;Se++,De=Z.next())De=P(be,$,Se,De.value,oe),De!==null&&(e&&De.alternate!==null&&be.delete(De.key===null?Se:De.key),H=d(De,H,Se),Te===null?ge=De:Te.sibling=De,Te=De);return e&&be.forEach(function(xb){return t($,xb)}),Oe&&Ka($,Se),ge}function Le($,H,Z,oe){if(typeof Z=="object"&&Z!==null&&Z.type===C&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:e:{for(var ge=Z.key;H!==null;){if(H.key===ge){if(ge=Z.type,ge===C){if(H.tag===7){a($,H.sibling),oe=c(H,Z.props.children),oe.return=$,$=oe;break e}}else if(H.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===ce&&sx(ge)===H.type){a($,H.sibling),oe=c(H,Z.props),Ks(oe,Z),oe.return=$,$=oe;break e}a($,H);break}else t($,H);H=H.sibling}Z.type===C?(oe=Qa(Z.props.children,$.mode,oe,Z.key),oe.return=$,$=oe):(oe=di(Z.type,Z.key,Z.props,null,$.mode,oe),Ks(oe,Z),oe.return=$,$=oe)}return y($);case E:e:{for(ge=Z.key;H!==null;){if(H.key===ge)if(H.tag===4&&H.stateNode.containerInfo===Z.containerInfo&&H.stateNode.implementation===Z.implementation){a($,H.sibling),oe=c(H,Z.children||[]),oe.return=$,$=oe;break e}else{a($,H);break}else t($,H);H=H.sibling}oe=bc(Z,$.mode,oe),oe.return=$,$=oe}return y($);case ce:return ge=Z._init,Z=ge(Z._payload),Le($,H,Z,oe)}if(q(Z))return Ee($,H,Z,oe);if(F(Z)){if(ge=F(Z),typeof ge!="function")throw Error(o(150));return Z=ge.call(Z),we($,H,Z,oe)}if(typeof Z.then=="function")return Le($,H,Ci(Z),oe);if(Z.$$typeof===V)return Le($,H,mi($,Z),oe);Ti($,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,H!==null&&H.tag===6?(a($,H.sibling),oe=c(H,Z),oe.return=$,$=oe):(a($,H),oe=vc(Z,$.mode,oe),oe.return=$,$=oe),y($)):a($,H)}return function($,H,Z,oe){try{Ws=0;var ge=Le($,H,Z,oe);return Ul=null,ge}catch(be){if(be===qs||be===gi)throw be;var Te=qt(29,be,null,$.mode);return Te.lanes=oe,Te.return=$,Te}finally{}}}var Bl=rx(!0),ix=rx(!1),ln=O(null),Sn=null;function ga(e){var t=e.alternate;W(it,it.current&1),W(ln,e),Sn===null&&(t===null||Rl.current!==null||t.memoizedState!==null)&&(Sn=e)}function ox(e){if(e.tag===22){if(W(it,it.current),W(ln,e),Sn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Sn=e)}}else ya()}function ya(){W(it,it.current),W(ln,ln.current)}function Yn(e){L(ln),Sn===e&&(Sn=null),L(it)}var it=O(0);function Mi(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Yu(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Pc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:g({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var eu={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Vt(),c=xa(l);c.payload=t,a!=null&&(c.callback=a),t=ma(e,c,l),t!==null&&(Gt(t,e,l),Ls(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Vt(),c=xa(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=ma(e,c,l),t!==null&&(Gt(t,e,l),Ls(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Vt(),l=xa(a);l.tag=2,t!=null&&(l.callback=t),t=ma(e,l,a),t!==null&&(Gt(t,e,a),Ls(t,e,a))}};function cx(e,t,a,l,c,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,d,y):t.prototype&&t.prototype.isPureReactComponent?!As(a,l)||!As(c,d):!0}function ux(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&eu.enqueueReplaceState(t,t.state,null)}function nl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=g({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}var Ai=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function dx(e){Ai(e)}function fx(e){console.error(e)}function hx(e){Ai(e)}function zi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function xx(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function tu(e,t,a){return a=xa(a),a.tag=3,a.payload={element:null},a.callback=function(){zi(e,t)},a}function mx(e){return e=xa(e),e.tag=3,e}function px(e,t,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=l.value;e.payload=function(){return c(d)},e.callback=function(){xx(t,a,l)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){xx(t,a,l),typeof c!="function"&&(Sa===null?Sa=new Set([this]):Sa.add(this));var j=l.stack;this.componentDidCatch(l.value,{componentStack:j!==null?j:""})})}function xv(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Hs(t,a,c,!0),a=ln.current,a!==null){switch(a.tag){case 13:return Sn===null?Eu():a.alternate===null&&Ke===0&&(Ke=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===Mc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),ku(e,l,c)),!1;case 22:return a.flags|=65536,l===Mc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),ku(e,l,c)),!1}throw Error(o(435,a.tag))}return ku(e,l,c),Eu(),!1}if(Oe)return t=ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==wc&&(e=Error(o(422),{cause:l}),Os(en(e,a)))):(l!==wc&&(t=Error(o(423),{cause:l}),Os(en(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=en(l,a),c=tu(e.stateNode,l,c),Rc(e,c),Ke!==4&&(Ke=2)),!1;var d=Error(o(520),{cause:l});if(d=en(d,a),nr===null?nr=[d]:nr.push(d),Ke!==4&&(Ke=2),t===null)return!0;l=en(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=tu(a.stateNode,l,e),Rc(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Sa===null||!Sa.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=mx(c),px(c,e,a,l),Rc(a,c),!1}a=a.return}while(a!==null);return!1}var gx=Error(o(461)),ft=!1;function pt(e,t,a,l){t.child=e===null?ix(t,null,a,l):Bl(t,e.child,a,l)}function yx(e,t,a,l,c){a=a.render;var d=t.ref;if("ref"in l){var y={};for(var j in l)j!=="ref"&&(y[j]=l[j])}else y=l;return Pa(t),l=Bc(e,t,a,y,d,c),j=qc(),e!==null&&!ft?($c(e,t,c),Vn(e,t,c)):(Oe&&j&&Nc(t),t.flags|=1,pt(e,t,l,c),t.child)}function vx(e,t,a,l,c){if(e===null){var d=a.type;return typeof d=="function"&&!yc(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,bx(e,t,d,l,c)):(e=di(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!cu(e,c)){var y=d.memoizedProps;if(a=a.compare,a=a!==null?a:As,a(y,l)&&e.ref===t.ref)return Vn(e,t,c)}return t.flags|=1,e=Hn(d,l),e.ref=t.ref,e.return=t,t.child=e}function bx(e,t,a,l,c){if(e!==null){var d=e.memoizedProps;if(As(d,l)&&e.ref===t.ref)if(ft=!1,t.pendingProps=l=d,cu(e,c))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,Vn(e,t,c)}return nu(e,t,a,l,c)}function Nx(e,t,a){var l=t.pendingProps,c=l.children,d=e!==null?e.memoizedState:null;if(l.mode==="hidden"){if((t.flags&128)!==0){if(l=d!==null?d.baseLanes|a:a,e!==null){for(c=t.child=e.child,d=0;c!==null;)d=d|c.lanes|c.childLanes,c=c.sibling;t.childLanes=d&~l}else t.childLanes=0,t.child=null;return jx(e,t,l,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pi(t,d!==null?d.cachePool:null),d!==null?bh(t,d):Oc(),ox(t);else return t.lanes=t.childLanes=536870912,jx(e,t,d!==null?d.baseLanes|a:a,a)}else d!==null?(pi(t,d.cachePool),bh(t,d),ya(),t.memoizedState=null):(e!==null&&pi(t,null),Oc(),ya());return pt(e,t,c,a),t.child}function jx(e,t,a,l){var c=Tc();return c=c===null?null:{parent:rt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&pi(t,null),Oc(),ox(t),e!==null&&Hs(e,t,l,!0),null}function Ri(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function nu(e,t,a,l,c){return Pa(t),a=Bc(e,t,a,l,void 0,c),l=qc(),e!==null&&!ft?($c(e,t,c),Vn(e,t,c)):(Oe&&l&&Nc(t),t.flags|=1,pt(e,t,a,c),t.child)}function wx(e,t,a,l,c,d){return Pa(t),t.updateQueue=null,a=jh(t,l,a,c),Nh(e),l=qc(),e!==null&&!ft?($c(e,t,d),Vn(e,t,d)):(Oe&&l&&Nc(t),t.flags|=1,pt(e,t,a,d),t.child)}function Sx(e,t,a,l,c){if(Pa(t),t.stateNode===null){var d=Cl,y=a.contextType;typeof y=="object"&&y!==null&&(d=jt(y)),d=new a(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=eu,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},Ac(t),y=a.contextType,d.context=typeof y=="object"&&y!==null?jt(y):Cl,d.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Pc(t,a,y,l),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&eu.enqueueReplaceState(d,d.state,null),Vs(t,l,d,c),Ys(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var j=t.memoizedProps,T=nl(a,j);d.props=T;var Q=d.context,ie=a.contextType;y=Cl,typeof ie=="object"&&ie!==null&&(y=jt(ie));var de=a.getDerivedStateFromProps;ie=typeof de=="function"||typeof d.getSnapshotBeforeUpdate=="function",j=t.pendingProps!==j,ie||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(j||Q!==y)&&ux(t,d,l,y),ha=!1;var K=t.memoizedState;d.state=K,Vs(t,l,d,c),Ys(),Q=t.memoizedState,j||K!==Q||ha?(typeof de=="function"&&(Pc(t,a,de,l),Q=t.memoizedState),(T=ha||cx(t,a,T,l,K,Q,y))?(ie||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=Q),d.props=l,d.state=Q,d.context=y,l=T):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,zc(e,t),y=t.memoizedProps,ie=nl(a,y),d.props=ie,de=t.pendingProps,K=d.context,Q=a.contextType,T=Cl,typeof Q=="object"&&Q!==null&&(T=jt(Q)),j=a.getDerivedStateFromProps,(Q=typeof j=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==de||K!==T)&&ux(t,d,l,T),ha=!1,K=t.memoizedState,d.state=K,Vs(t,l,d,c),Ys();var P=t.memoizedState;y!==de||K!==P||ha||e!==null&&e.dependencies!==null&&xi(e.dependencies)?(typeof j=="function"&&(Pc(t,a,j,l),P=t.memoizedState),(ie=ha||cx(t,a,ie,l,K,P,T)||e!==null&&e.dependencies!==null&&xi(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,P,T),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,P,T)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=P),d.props=l,d.state=P,d.context=T,l=ie):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&K===e.memoizedState||(t.flags|=1024),l=!1)}return d=l,Ri(e,t),l=(t.flags&128)!==0,d||l?(d=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&l?(t.child=Bl(t,e.child,null,c),t.child=Bl(t,null,a,c)):pt(e,t,a,c),t.memoizedState=d.state,e=t.child):e=Vn(e,t,c),e}function Ex(e,t,a,l){return Ds(),t.flags|=256,pt(e,t,a,l),t.child}var au={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lu(e){return{baseLanes:e,cachePool:fh()}}function su(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=sn),e}function _x(e,t,a){var l=t.pendingProps,c=!1,d=(t.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),y&&(c=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(c?ga(t):ya(),Oe){var j=We,T;if(T=j){e:{for(T=j,j=wn;T.nodeType!==8;){if(!j){j=null;break e}if(T=gn(T.nextSibling),T===null){j=null;break e}}j=T}j!==null?(t.memoizedState={dehydrated:j,treeContext:Wa!==null?{id:Un,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},T=qt(18,null,null,0),T.stateNode=j,T.return=t,t.child=T,_t=t,We=null,T=!0):T=!1}T||Fa(t)}if(j=t.memoizedState,j!==null&&(j=j.dehydrated,j!==null))return Yu(j)?t.lanes=32:t.lanes=536870912,null;Yn(t)}return j=l.children,l=l.fallback,c?(ya(),c=t.mode,j=Di({mode:"hidden",children:j},c),l=Qa(l,c,a,null),j.return=t,l.return=t,j.sibling=l,t.child=j,c=t.child,c.memoizedState=lu(a),c.childLanes=su(e,y,a),t.memoizedState=au,l):(ga(t),ru(t,j))}if(T=e.memoizedState,T!==null&&(j=T.dehydrated,j!==null)){if(d)t.flags&256?(ga(t),t.flags&=-257,t=iu(e,t,a)):t.memoizedState!==null?(ya(),t.child=e.child,t.flags|=128,t=null):(ya(),c=l.fallback,j=t.mode,l=Di({mode:"visible",children:l.children},j),c=Qa(c,j,a,null),c.flags|=2,l.return=t,c.return=t,l.sibling=c,t.child=l,Bl(t,e.child,null,a),l=t.child,l.memoizedState=lu(a),l.childLanes=su(e,y,a),t.memoizedState=au,t=c);else if(ga(t),Yu(j)){if(y=j.nextSibling&&j.nextSibling.dataset,y)var Q=y.dgst;y=Q,l=Error(o(419)),l.stack="",l.digest=y,Os({value:l,source:null,stack:null}),t=iu(e,t,a)}else if(ft||Hs(e,t,a,!1),y=(a&e.childLanes)!==0,ft||y){if(y=Ve,y!==null&&(l=a&-a,l=(l&42)!==0?1:vs(l),l=(l&(y.suspendedLanes|a))!==0?0:l,l!==0&&l!==T.retryLane))throw T.retryLane=l,kl(e,l),Gt(y,e,l),gx;j.data==="$?"||Eu(),t=iu(e,t,a)}else j.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=T.treeContext,We=gn(j.nextSibling),_t=t,Oe=!0,Ja=null,wn=!1,e!==null&&(nn[an++]=Un,nn[an++]=Bn,nn[an++]=Wa,Un=e.id,Bn=e.overflow,Wa=t),t=ru(t,l.children),t.flags|=4096);return t}return c?(ya(),c=l.fallback,j=t.mode,T=e.child,Q=T.sibling,l=Hn(T,{mode:"hidden",children:l.children}),l.subtreeFlags=T.subtreeFlags&65011712,Q!==null?c=Hn(Q,c):(c=Qa(c,j,a,null),c.flags|=2),c.return=t,l.return=t,l.sibling=c,t.child=l,l=c,c=t.child,j=e.child.memoizedState,j===null?j=lu(a):(T=j.cachePool,T!==null?(Q=rt._currentValue,T=T.parent!==Q?{parent:Q,pool:Q}:T):T=fh(),j={baseLanes:j.baseLanes|a,cachePool:T}),c.memoizedState=j,c.childLanes=su(e,y,a),t.memoizedState=au,l):(ga(t),a=e.child,e=a.sibling,a=Hn(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function ru(e,t){return t=Di({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Di(e,t){return e=qt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function iu(e,t,a){return Bl(t,e.child,null,a),e=ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function kx(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ec(e.return,t,a)}function ou(e,t,a,l,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=l,d.tail=a,d.tailMode=c)}function Cx(e,t,a){var l=t.pendingProps,c=l.revealOrder,d=l.tail;if(pt(e,t,l.children,a),l=it.current,(l&2)!==0)l=l&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kx(e,a,t);else if(e.tag===19)kx(e,a,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}l&=1}switch(W(it,l),c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&Mi(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),ou(t,!1,c,a,d);break;case"backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Mi(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}ou(t,!0,a,null,d);break;case"together":ou(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),wa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Hs(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Hn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Hn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function cu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&xi(e)))}function mv(e,t,a){switch(t.tag){case 3:X(t,t.stateNode.containerInfo),fa(t,rt,e.memoizedState.cache),Ds();break;case 27:case 5:ae(t);break;case 4:X(t,t.stateNode.containerInfo);break;case 10:fa(t,t.type,t.memoizedProps.value);break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ga(t),t.flags|=128,null):(a&t.child.childLanes)!==0?_x(e,t,a):(ga(t),e=Vn(e,t,a),e!==null?e.sibling:null);ga(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Hs(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return Cx(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),W(it,it.current),l)break;return null;case 22:case 23:return t.lanes=0,Nx(e,t,a);case 24:fa(t,rt,e.memoizedState.cache)}return Vn(e,t,a)}function Tx(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!cu(e,a)&&(t.flags&128)===0)return ft=!1,mv(e,t,a);ft=(e.flags&131072)!==0}else ft=!1,Oe&&(t.flags&1048576)!==0&&sh(t,hi,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var l=t.elementType,c=l._init;if(l=c(l._payload),t.type=l,typeof l=="function")yc(l)?(e=nl(l,e),t.tag=1,t=Sx(null,t,l,e,a)):(t.tag=0,t=nu(null,t,l,e,a));else{if(l!=null){if(c=l.$$typeof,c===U){t.tag=11,t=yx(null,t,l,e,a);break e}else if(c===re){t.tag=14,t=vx(null,t,l,e,a);break e}}throw t=_(l)||l,Error(o(306,t,""))}}return t;case 0:return nu(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=nl(l,t.pendingProps),Sx(e,t,l,c,a);case 3:e:{if(X(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var d=t.memoizedState;c=d.element,zc(e,t),Vs(t,l,null,a);var y=t.memoizedState;if(l=y.cache,fa(t,rt,l),l!==d.cache&&_c(t,[rt],a,!0),Ys(),l=y.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Ex(e,t,l,a);break e}else if(l!==c){c=en(Error(o(424)),t),Os(c),t=Ex(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(We=gn(e.firstChild),_t=t,Oe=!0,Ja=null,wn=!0,a=ix(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ds(),l===c){t=Vn(e,t,a);break e}pt(e,t,l,a)}t=t.child}return t;case 26:return Ri(e,t),e===null?(a=Rm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,l=Wi(ue.current).createElement(a),l[dt]=t,l[Nt]=e,yt(l,a,e),at(l),t.stateNode=l):t.memoizedState=Rm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&Oe&&(l=t.stateNode=Mm(t.type,t.pendingProps,ue.current),_t=t,wn=!0,c=We,ka(t.type)?(Vu=c,We=gn(l.firstChild)):We=c),pt(e,t,t.pendingProps.children,a),Ri(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((c=l=We)&&(l=Vv(l,t.type,t.pendingProps,wn),l!==null?(t.stateNode=l,_t=t,We=gn(l.firstChild),wn=!1,c=!0):c=!1),c||Fa(t)),ae(t),c=t.type,d=t.pendingProps,y=e!==null?e.memoizedProps:null,l=d.children,qu(c,d)?l=null:y!==null&&qu(c,y)&&(t.flags|=32),t.memoizedState!==null&&(c=Bc(e,t,iv,null,null,a),dr._currentValue=c),Ri(e,t),pt(e,t,l,a),t.child;case 6:return e===null&&Oe&&((e=a=We)&&(a=Gv(a,t.pendingProps,wn),a!==null?(t.stateNode=a,_t=t,We=null,e=!0):e=!1),e||Fa(t)),null;case 13:return _x(e,t,a);case 4:return X(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Bl(t,null,l,a):pt(e,t,l,a),t.child;case 11:return yx(e,t,t.type,t.pendingProps,a);case 7:return pt(e,t,t.pendingProps,a),t.child;case 8:return pt(e,t,t.pendingProps.children,a),t.child;case 12:return pt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,fa(t,t.type,l.value),pt(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Pa(t),c=jt(c),l=l(c),t.flags|=1,pt(e,t,l,a),t.child;case 14:return vx(e,t,t.type,t.pendingProps,a);case 15:return bx(e,t,t.type,t.pendingProps,a);case 19:return Cx(e,t,a);case 31:return l=t.pendingProps,a=t.mode,l={mode:l.mode,children:l.children},e===null?(a=Di(l,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=Hn(e.child,l),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return Nx(e,t,a);case 24:return Pa(t),l=jt(rt),e===null?(c=Tc(),c===null&&(c=Ve,d=kc(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:l,cache:c},Ac(t),fa(t,rt,c)):((e.lanes&a)!==0&&(zc(e,t),Vs(t,null,null,a),Ys()),c=e.memoizedState,d=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),fa(t,rt,l)):(l=d.cache,fa(t,rt,l),l!==c.cache&&_c(t,[rt],a,!0))),pt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Gn(e){e.flags|=4}function Mx(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Bm(t)){if(t=ln.current,t!==null&&((Re&4194048)===Re?Sn!==null:(Re&62914560)!==Re&&(Re&536870912)===0||t!==Sn))throw $s=Mc,hh;e.flags|=8192}}function Oi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?la():536870912,e.lanes|=t,Yl|=t)}function Js(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function pv(e,t,a){var l=t.pendingProps;switch(jc(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return Qe(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),$n(rt),I(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Rs(t)?Gn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,oh())),Qe(t),null;case 26:return a=t.memoizedState,e===null?(Gn(t),a!==null?(Qe(t),Mx(t,a)):(Qe(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Gn(t),Qe(t),Mx(t,a)):(Qe(t),t.flags&=-16777217):(e.memoizedProps!==l&&Gn(t),Qe(t),t.flags&=-16777217),null;case 27:me(t),a=ue.current;var c=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Gn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return Qe(t),null}e=ne.current,Rs(t)?rh(t):(e=Mm(c,l,a),t.stateNode=e,Gn(t))}return Qe(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Gn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return Qe(t),null}if(e=ne.current,Rs(t))rh(t);else{switch(c=Wi(ue.current),e){case 1:e=c.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=c.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof l.is=="string"?c.createElement("select",{is:l.is}):c.createElement("select"),l.multiple?e.multiple=!0:l.size&&(e.size=l.size);break;default:e=typeof l.is=="string"?c.createElement(a,{is:l.is}):c.createElement(a)}}e[dt]=t,e[Nt]=l;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)e.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=e;e:switch(yt(e,a,l),a){case"button":case"input":case"select":case"textarea":e=!!l.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Gn(t)}}return Qe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Gn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ue.current,Rs(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=_t,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[dt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||wm(e.nodeValue,a)),e||Fa(t)}else e=Wi(e).createTextNode(l),e[dt]=t,t.stateNode=e}return Qe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Rs(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[dt]=t}else Ds(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),c=!1}else c=oh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Yn(t),t):(Yn(t),null)}if(Yn(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=l!==null,e=e!==null&&e.memoizedState!==null,a){l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool);var d=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==c&&(l.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Oi(t,t.updateQueue),Qe(t),null;case 4:return I(),e===null&&Du(t.stateNode.containerInfo),Qe(t),null;case 10:return $n(t.type),Qe(t),null;case 19:if(L(it),c=t.memoizedState,c===null)return Qe(t),null;if(l=(t.flags&128)!==0,d=c.rendering,d===null)if(l)Js(c,!1);else{if(Ke!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Mi(e),d!==null){for(t.flags|=128,Js(c,!1),e=d.updateQueue,t.updateQueue=e,Oi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)lh(a,e),a=a.sibling;return W(it,it.current&1|2),t.child}e=e.sibling}c.tail!==null&&ke()>Bi&&(t.flags|=128,l=!0,Js(c,!1),t.lanes=4194304)}else{if(!l)if(e=Mi(d),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Oi(t,e),Js(c,!0),c.tail===null&&c.tailMode==="hidden"&&!d.alternate&&!Oe)return Qe(t),null}else 2*ke()-c.renderingStartTime>Bi&&a!==536870912&&(t.flags|=128,l=!0,Js(c,!1),t.lanes=4194304);c.isBackwards?(d.sibling=t.child,t.child=d):(e=c.last,e!==null?e.sibling=d:t.child=d,c.last=d)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=ke(),t.sibling=null,e=it.current,W(it,l?e&1|2:e&1),t):(Qe(t),null);case 22:case 23:return Yn(t),Hc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),a=t.updateQueue,a!==null&&Oi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&L(el),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),$n(rt),Qe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function gv(e,t){switch(jc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $n(rt),I(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 13:if(Yn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ds()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(it),null;case 4:return I(),null;case 10:return $n(t.type),null;case 22:case 23:return Yn(t),Hc(),e!==null&&L(el),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $n(rt),null;case 25:return null;default:return null}}function Ax(e,t){switch(jc(t),t.tag){case 3:$n(rt),I();break;case 26:case 27:case 5:me(t);break;case 4:I();break;case 13:Yn(t);break;case 19:L(it);break;case 10:$n(t.type);break;case 22:case 23:Yn(t),Hc(),e!==null&&L(el);break;case 24:$n(rt)}}function Fs(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&e)===e){l=void 0;var d=a.create,y=a.inst;l=d(),y.destroy=l}a=a.next}while(a!==c)}}catch(j){Ye(t,t.return,j)}}function va(e,t,a){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var d=c.next;l=d;do{if((l.tag&e)===e){var y=l.inst,j=y.destroy;if(j!==void 0){y.destroy=void 0,c=t;var T=a,Q=j;try{Q()}catch(ie){Ye(c,T,ie)}}}l=l.next}while(l!==d)}}catch(ie){Ye(t,t.return,ie)}}function zx(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{vh(t,a)}catch(l){Ye(e,e.return,l)}}}function Rx(e,t,a){a.props=nl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ye(e,t,l)}}function Is(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(c){Ye(e,t,c)}}function En(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){Ye(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Ye(e,t,c)}else a.current=null}function Dx(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){Ye(e,e.return,c)}}function uu(e,t,a){try{var l=e.stateNode;Bv(l,e.type,a,t),l[Nt]=t}catch(c){Ye(e,e.return,c)}}function Ox(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ka(e.type)||e.tag===4}function du(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ox(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ka(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fu(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Qi));else if(l!==4&&(l===27&&ka(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(fu(e,t,a),e=e.sibling;e!==null;)fu(e,t,a),e=e.sibling}function Hi(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&ka(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Hi(e,t,a),e=e.sibling;e!==null;)Hi(e,t,a),e=e.sibling}function Hx(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);yt(t,l,a),t[dt]=e,t[Nt]=a}catch(d){Ye(e,e.return,d)}}var Xn=!1,tt=!1,hu=!1,Ux=typeof WeakSet=="function"?WeakSet:Set,ht=null;function yv(e,t){if(e=e.containerInfo,Uu=eo,e=Wf(e),dc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var y=0,j=-1,T=-1,Q=0,ie=0,de=e,K=null;t:for(;;){for(var P;de!==a||c!==0&&de.nodeType!==3||(j=y+c),de!==d||l!==0&&de.nodeType!==3||(T=y+l),de.nodeType===3&&(y+=de.nodeValue.length),(P=de.firstChild)!==null;)K=de,de=P;for(;;){if(de===e)break t;if(K===a&&++Q===c&&(j=y),K===d&&++ie===l&&(T=y),(P=de.nextSibling)!==null)break;de=K,K=de.parentNode}de=P}a=j===-1||T===-1?null:{start:j,end:T}}else a=null}a=a||{start:0,end:0}}else a=null;for(Bu={focusedElem:e,selectionRange:a},eo=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,d=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,c=d.memoizedProps,d=d.memoizedState,l=a.stateNode;try{var Ee=nl(a.type,c,a.elementType===a.type);e=l.getSnapshotBeforeUpdate(Ee,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(we){Ye(a,a.return,we)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Lu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,ht=e;break}ht=t.return}}function Bx(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ba(e,a),l&4&&Fs(5,a);break;case 1:if(ba(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){Ye(a,a.return,y)}else{var c=nl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ye(a,a.return,y)}}l&64&&zx(a),l&512&&Is(a,a.return);break;case 3:if(ba(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{vh(e,t)}catch(y){Ye(a,a.return,y)}}break;case 27:t===null&&l&4&&Hx(a);case 26:case 5:ba(e,a),t===null&&l&4&&Dx(a),l&512&&Is(a,a.return);break;case 12:ba(e,a);break;case 13:ba(e,a),l&4&&Lx(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=kv.bind(null,a),Xv(e,a))));break;case 22:if(l=a.memoizedState!==null||Xn,!l){t=t!==null&&t.memoizedState!==null||tt,c=Xn;var d=tt;Xn=l,(tt=t)&&!d?Na(e,a,(a.subtreeFlags&8772)!==0):ba(e,a),Xn=c,tt=d}break;case 30:break;default:ba(e,a)}}function qx(e){var t=e.alternate;t!==null&&(e.alternate=null,qx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&js(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Xe=null,zt=!1;function Zn(e,t,a){for(a=a.child;a!==null;)$x(e,t,a),a=a.sibling}function $x(e,t,a){if(Pe&&typeof Pe.onCommitFiberUnmount=="function")try{Pe.onCommitFiberUnmount(Ht,a)}catch{}switch(a.tag){case 26:tt||En(a,t),Zn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:tt||En(a,t);var l=Xe,c=zt;ka(a.type)&&(Xe=a.stateNode,zt=!1),Zn(e,t,a),ir(a.stateNode),Xe=l,zt=c;break;case 5:tt||En(a,t);case 6:if(l=Xe,c=zt,Xe=null,Zn(e,t,a),Xe=l,zt=c,Xe!==null)if(zt)try{(Xe.nodeType===9?Xe.body:Xe.nodeName==="HTML"?Xe.ownerDocument.body:Xe).removeChild(a.stateNode)}catch(d){Ye(a,t,d)}else try{Xe.removeChild(a.stateNode)}catch(d){Ye(a,t,d)}break;case 18:Xe!==null&&(zt?(e=Xe,Cm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),mr(e)):Cm(Xe,a.stateNode));break;case 4:l=Xe,c=zt,Xe=a.stateNode.containerInfo,zt=!0,Zn(e,t,a),Xe=l,zt=c;break;case 0:case 11:case 14:case 15:tt||va(2,a,t),tt||va(4,a,t),Zn(e,t,a);break;case 1:tt||(En(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Rx(a,t,l)),Zn(e,t,a);break;case 21:Zn(e,t,a);break;case 22:tt=(l=tt)||a.memoizedState!==null,Zn(e,t,a),tt=l;break;default:Zn(e,t,a)}}function Lx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{mr(e)}catch(a){Ye(t,t.return,a)}}function vv(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ux),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ux),t;default:throw Error(o(435,e.tag))}}function xu(e,t){var a=vv(e);t.forEach(function(l){var c=Cv.bind(null,e,l);a.has(l)||(a.add(l),l.then(c,c))})}function $t(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],d=e,y=t,j=y;e:for(;j!==null;){switch(j.tag){case 27:if(ka(j.type)){Xe=j.stateNode,zt=!1;break e}break;case 5:Xe=j.stateNode,zt=!1;break e;case 3:case 4:Xe=j.stateNode.containerInfo,zt=!0;break e}j=j.return}if(Xe===null)throw Error(o(160));$x(d,y,c),Xe=null,zt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Yx(t,e),t=t.sibling}var pn=null;function Yx(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$t(t,e),Lt(e),l&4&&(va(3,e,e.return),Fs(3,e),va(5,e,e.return));break;case 1:$t(t,e),Lt(e),l&512&&(tt||a===null||En(a,a.return)),l&64&&Xn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=pn;if($t(t,e),Lt(e),l&512&&(tt||a===null||En(a,a.return)),l&4){var d=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":d=c.getElementsByTagName("title")[0],(!d||d[La]||d[dt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(l),c.head.insertBefore(d,c.querySelector("head > title"))),yt(d,l,a),d[dt]=e,at(d),l=d;break e;case"link":var y=Hm("link","href",c).get(l+(a.href||""));if(y){for(var j=0;j<y.length;j++)if(d=y[j],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(j,1);break t}}d=c.createElement(l),yt(d,l,a),c.head.appendChild(d);break;case"meta":if(y=Hm("meta","content",c).get(l+(a.content||""))){for(j=0;j<y.length;j++)if(d=y[j],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(j,1);break t}}d=c.createElement(l),yt(d,l,a),c.head.appendChild(d);break;default:throw Error(o(468,l))}d[dt]=e,at(d),l=d}e.stateNode=l}else Um(c,e.type,e.stateNode);else e.stateNode=Om(c,l,e.memoizedProps);else d!==l?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,l===null?Um(c,e.type,e.stateNode):Om(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&uu(e,e.memoizedProps,a.memoizedProps)}break;case 27:$t(t,e),Lt(e),l&512&&(tt||a===null||En(a,a.return)),a!==null&&l&4&&uu(e,e.memoizedProps,a.memoizedProps);break;case 5:if($t(t,e),Lt(e),l&512&&(tt||a===null||En(a,a.return)),e.flags&32){c=e.stateNode;try{bl(c,"")}catch(P){Ye(e,e.return,P)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,uu(e,c,a!==null?a.memoizedProps:c)),l&1024&&(hu=!0);break;case 6:if($t(t,e),Lt(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(P){Ye(e,e.return,P)}}break;case 3:if(Fi=null,c=pn,pn=Ki(t.containerInfo),$t(t,e),pn=c,Lt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{mr(t.containerInfo)}catch(P){Ye(e,e.return,P)}hu&&(hu=!1,Vx(e));break;case 4:l=pn,pn=Ki(e.stateNode.containerInfo),$t(t,e),Lt(e),pn=l;break;case 12:$t(t,e),Lt(e);break;case 13:$t(t,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(bu=ke()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,xu(e,l)));break;case 22:c=e.memoizedState!==null;var T=a!==null&&a.memoizedState!==null,Q=Xn,ie=tt;if(Xn=Q||c,tt=ie||T,$t(t,e),tt=ie,Xn=Q,Lt(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||T||Xn||tt||al(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){T=a=t;try{if(d=T.stateNode,c)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{j=T.stateNode;var de=T.memoizedProps.style,K=de!=null&&de.hasOwnProperty("display")?de.display:null;j.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(P){Ye(T,T.return,P)}}}else if(t.tag===6){if(a===null){T=t;try{T.stateNode.nodeValue=c?"":T.memoizedProps}catch(P){Ye(T,T.return,P)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,xu(e,a))));break;case 19:$t(t,e),Lt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,xu(e,l)));break;case 30:break;case 21:break;default:$t(t,e),Lt(e)}}function Lt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Ox(l)){a=l;break}l=l.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var c=a.stateNode,d=du(e);Hi(e,d,c);break;case 5:var y=a.stateNode;a.flags&32&&(bl(y,""),a.flags&=-33);var j=du(e);Hi(e,j,y);break;case 3:case 4:var T=a.stateNode.containerInfo,Q=du(e);fu(e,Q,T);break;default:throw Error(o(161))}}catch(ie){Ye(e,e.return,ie)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vx(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ba(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bx(e,t.alternate,t),t=t.sibling}function al(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:va(4,t,t.return),al(t);break;case 1:En(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Rx(t,t.return,a),al(t);break;case 27:ir(t.stateNode);case 26:case 5:En(t,t.return),al(t);break;case 22:t.memoizedState===null&&al(t);break;case 30:al(t);break;default:al(t)}e=e.sibling}}function Na(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,d=t,y=d.flags;switch(d.tag){case 0:case 11:case 15:Na(c,d,a),Fs(4,d);break;case 1:if(Na(c,d,a),l=d,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Q){Ye(l,l.return,Q)}if(l=d,c=l.updateQueue,c!==null){var j=l.stateNode;try{var T=c.shared.hiddenCallbacks;if(T!==null)for(c.shared.hiddenCallbacks=null,c=0;c<T.length;c++)yh(T[c],j)}catch(Q){Ye(l,l.return,Q)}}a&&y&64&&zx(d),Is(d,d.return);break;case 27:Hx(d);case 26:case 5:Na(c,d,a),a&&l===null&&y&4&&Dx(d),Is(d,d.return);break;case 12:Na(c,d,a);break;case 13:Na(c,d,a),a&&y&4&&Lx(c,d);break;case 22:d.memoizedState===null&&Na(c,d,a),Is(d,d.return);break;case 30:break;default:Na(c,d,a)}t=t.sibling}}function mu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Us(a))}function pu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Us(e))}function _n(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gx(e,t,a,l),t=t.sibling}function Gx(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:_n(e,t,a,l),c&2048&&Fs(9,t);break;case 1:_n(e,t,a,l);break;case 3:_n(e,t,a,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Us(e)));break;case 12:if(c&2048){_n(e,t,a,l),e=t.stateNode;try{var d=t.memoizedProps,y=d.id,j=d.onPostCommit;typeof j=="function"&&j(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Ye(t,t.return,T)}}else _n(e,t,a,l);break;case 13:_n(e,t,a,l);break;case 23:break;case 22:d=t.stateNode,y=t.alternate,t.memoizedState!==null?d._visibility&2?_n(e,t,a,l):Ps(e,t):d._visibility&2?_n(e,t,a,l):(d._visibility|=2,ql(e,t,a,l,(t.subtreeFlags&10256)!==0)),c&2048&&mu(y,t);break;case 24:_n(e,t,a,l),c&2048&&pu(t.alternate,t);break;default:_n(e,t,a,l)}}function ql(e,t,a,l,c){for(c=c&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var d=e,y=t,j=a,T=l,Q=y.flags;switch(y.tag){case 0:case 11:case 15:ql(d,y,j,T,c),Fs(8,y);break;case 23:break;case 22:var ie=y.stateNode;y.memoizedState!==null?ie._visibility&2?ql(d,y,j,T,c):Ps(d,y):(ie._visibility|=2,ql(d,y,j,T,c)),c&&Q&2048&&mu(y.alternate,y);break;case 24:ql(d,y,j,T,c),c&&Q&2048&&pu(y.alternate,y);break;default:ql(d,y,j,T,c)}t=t.sibling}}function Ps(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,c=l.flags;switch(l.tag){case 22:Ps(a,l),c&2048&&mu(l.alternate,l);break;case 24:Ps(a,l),c&2048&&pu(l.alternate,l);break;default:Ps(a,l)}t=t.sibling}}var er=8192;function $l(e){if(e.subtreeFlags&er)for(e=e.child;e!==null;)Xx(e),e=e.sibling}function Xx(e){switch(e.tag){case 26:$l(e),e.flags&er&&e.memoizedState!==null&&lb(pn,e.memoizedState,e.memoizedProps);break;case 5:$l(e);break;case 3:case 4:var t=pn;pn=Ki(e.stateNode.containerInfo),$l(e),pn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=er,er=16777216,$l(e),er=t):$l(e));break;default:$l(e)}}function Zx(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function tr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,Wx(l,e)}Zx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Qx(e),e=e.sibling}function Qx(e){switch(e.tag){case 0:case 11:case 15:tr(e),e.flags&2048&&va(9,e,e.return);break;case 3:tr(e);break;case 12:tr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ui(e)):tr(e);break;default:tr(e)}}function Ui(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ht=l,Wx(l,e)}Zx(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:va(8,t,t.return),Ui(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Ui(t));break;default:Ui(t)}e=e.sibling}}function Wx(e,t){for(;ht!==null;){var a=ht;switch(a.tag){case 0:case 11:case 15:va(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Us(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ht=l;else e:for(a=e;ht!==null;){l=ht;var c=l.sibling,d=l.return;if(qx(l),l===a){ht=null;break e}if(c!==null){c.return=d,ht=c;break e}ht=d}}}var bv={getCacheForType:function(e){var t=jt(rt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},Nv=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Ve=null,Ae=null,Re=0,Be=0,Yt=null,ja=!1,Ll=!1,gu=!1,Qn=0,Ke=0,wa=0,ll=0,yu=0,sn=0,Yl=0,nr=null,Rt=null,vu=!1,bu=0,Bi=1/0,qi=null,Sa=null,gt=0,Ea=null,Vl=null,Gl=0,Nu=0,ju=null,Kx=null,ar=0,wu=null;function Vt(){if((Ue&2)!==0&&Re!==0)return Re&-Re;if(S.T!==null){var e=Al;return e!==0?e:Mu()}return Xr()}function Jx(){sn===0&&(sn=(Re&536870912)===0||Oe?ml():536870912);var e=ln.current;return e!==null&&(e.flags|=32),sn}function Gt(e,t,a){(e===Ve&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Xl(e,0),_a(e,Re,sn,!1)),sa(e,a),((Ue&2)===0||e!==Ve)&&(e===Ve&&((Ue&2)===0&&(ll|=a),Ke===4&&_a(e,Re,sn,!1)),kn(e))}function Fx(e,t,a){if((Ue&6)!==0)throw Error(o(327));var l=!a&&(t&124)===0&&(t&e.expiredLanes)===0||Ut(e,t),c=l?Sv(e,t):_u(e,t,!0),d=l;do{if(c===0){Ll&&!l&&_a(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!jv(a)){c=_u(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var j=e;c=nr;var T=j.current.memoizedState.isDehydrated;if(T&&(Xl(j,y).flags|=256),y=_u(j,y,!1),y!==2){if(gu&&!T){j.errorRecoveryDisabledLanes|=d,ll|=d,c=4;break e}d=Rt,Rt=c,d!==null&&(Rt===null?Rt=d:Rt.push.apply(Rt,d))}c=y}if(d=!1,c!==2)continue}}if(c===1){Xl(e,0),_a(e,t,0,!0);break}e:{switch(l=e,d=c,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:_a(l,t,sn,!ja);break e;case 2:Rt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=bu+300-ke(),10<c)){if(_a(l,t,sn,!ja),Et(l,0,!0)!==0)break e;l.timeoutHandle=_m(Ix.bind(null,l,a,Rt,qi,vu,t,sn,ll,Yl,ja,d,2,-0,0),c);break e}Ix(l,a,Rt,qi,vu,t,sn,ll,Yl,ja,d,0,-0,0)}}break}while(!0);kn(e)}function Ix(e,t,a,l,c,d,y,j,T,Q,ie,de,K,P){if(e.timeoutHandle=-1,de=t.subtreeFlags,(de&8192||(de&16785408)===16785408)&&(ur={stylesheets:null,count:0,unsuspend:ab},Xx(t),de=sb(),de!==null)){e.cancelPendingCommit=de(sm.bind(null,e,t,d,a,l,c,y,j,T,ie,1,K,P)),_a(e,d,y,!Q);return}sm(e,t,d,a,l,c,y,j,T)}function jv(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],d=c.getSnapshot;c=c.value;try{if(!Bt(d(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 _a(e,t,a,l){t&=~yu,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var d=31-nt(c),y=1<<d;l[d]=-1,c&=~y}a!==0&&Vr(e,a,t)}function $i(){return(Ue&6)===0?(lr(0),!1):!0}function Su(){if(Ae!==null){if(Be===0)var e=Ae.return;else e=Ae,qn=Ia=null,Lc(e),Ul=null,Ws=0,e=Ae;for(;e!==null;)Ax(e.alternate,e),e=e.return;Ae=null}}function Xl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,$v(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Su(),Ve=e,Ae=a=Hn(e.current,null),Re=t,Be=0,Yt=null,ja=!1,Ll=Ut(e,t),gu=!1,Yl=sn=yu=ll=wa=Ke=0,Rt=nr=null,vu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-nt(l),d=1<<c;t|=e[c],l&=~d}return Qn=t,oi(),a}function Px(e,t){Ce=null,S.H=ki,t===qs||t===gi?(t=ph(),Be=3):t===hh?(t=ph(),Be=4):Be=t===gx?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Yt=t,Ae===null&&(Ke=1,zi(e,en(t,e.current)))}function em(){var e=S.H;return S.H=ki,e===null?ki:e}function tm(){var e=S.A;return S.A=bv,e}function Eu(){Ke=4,ja||(Re&4194048)!==Re&&ln.current!==null||(Ll=!0),(wa&134217727)===0&&(ll&134217727)===0||Ve===null||_a(Ve,Re,sn,!1)}function _u(e,t,a){var l=Ue;Ue|=2;var c=em(),d=tm();(Ve!==e||Re!==t)&&(qi=null,Xl(e,t)),t=!1;var y=Ke;e:do try{if(Be!==0&&Ae!==null){var j=Ae,T=Yt;switch(Be){case 8:Su(),y=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(t=!0);var Q=Be;if(Be=0,Yt=null,Zl(e,j,T,Q),a&&Ll){y=0;break e}break;default:Q=Be,Be=0,Yt=null,Zl(e,j,T,Q)}}wv(),y=Ke;break}catch(ie){Px(e,ie)}while(!0);return t&&e.shellSuspendCounter++,qn=Ia=null,Ue=l,S.H=c,S.A=d,Ae===null&&(Ve=null,Re=0,oi()),y}function wv(){for(;Ae!==null;)nm(Ae)}function Sv(e,t){var a=Ue;Ue|=2;var l=em(),c=tm();Ve!==e||Re!==t?(qi=null,Bi=ke()+500,Xl(e,t)):Ll=Ut(e,t);e:do try{if(Be!==0&&Ae!==null){t=Ae;var d=Yt;t:switch(Be){case 1:Be=0,Yt=null,Zl(e,t,d,1);break;case 2:case 9:if(xh(d)){Be=0,Yt=null,am(t);break}t=function(){Be!==2&&Be!==9||Ve!==e||(Be=7),kn(e)},d.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:xh(d)?(Be=0,Yt=null,am(t)):(Be=0,Yt=null,Zl(e,t,d,7));break;case 5:var y=null;switch(Ae.tag){case 26:y=Ae.memoizedState;case 5:case 27:var j=Ae;if(!y||Bm(y)){Be=0,Yt=null;var T=j.sibling;if(T!==null)Ae=T;else{var Q=j.return;Q!==null?(Ae=Q,Li(Q)):Ae=null}break t}}Be=0,Yt=null,Zl(e,t,d,5);break;case 6:Be=0,Yt=null,Zl(e,t,d,6);break;case 8:Su(),Ke=6;break e;default:throw Error(o(462))}}Ev();break}catch(ie){Px(e,ie)}while(!0);return qn=Ia=null,S.H=l,S.A=c,Ue=a,Ae!==null?0:(Ve=null,Re=0,oi(),Ke)}function Ev(){for(;Ae!==null&&!He();)nm(Ae)}function nm(e){var t=Tx(e.alternate,e,Qn);e.memoizedProps=e.pendingProps,t===null?Li(e):Ae=t}function am(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=wx(a,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=wx(a,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:Lc(t);default:Ax(a,t),t=Ae=lh(t,Qn),t=Tx(a,t,Qn)}e.memoizedProps=e.pendingProps,t===null?Li(e):Ae=t}function Zl(e,t,a,l){qn=Ia=null,Lc(t),Ul=null,Ws=0;var c=t.return;try{if(xv(e,c,t,a,Re)){Ke=1,zi(e,en(a,e.current)),Ae=null;return}}catch(d){if(c!==null)throw Ae=c,d;Ke=1,zi(e,en(a,e.current)),Ae=null;return}t.flags&32768?(Oe||l===1?e=!0:Ll||(Re&536870912)!==0?e=!1:(ja=e=!0,(l===2||l===9||l===3||l===6)&&(l=ln.current,l!==null&&l.tag===13&&(l.flags|=16384))),lm(t,e)):Li(t)}function Li(e){var t=e;do{if((t.flags&32768)!==0){lm(t,ja);return}e=t.return;var a=pv(t.alternate,t,Qn);if(a!==null){Ae=a;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);Ke===0&&(Ke=5)}function lm(e,t){do{var a=gv(e.alternate,e);if(a!==null){a.flags&=32767,Ae=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=a}while(e!==null);Ke=6,Ae=null}function sm(e,t,a,l,c,d,y,j,T){e.cancelPendingCommit=null;do Yi();while(gt!==0);if((Ue&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=pc,zn(e,a,d,y,j,T),e===Ve&&(Ae=Ve=null,Re=0),Vl=t,Ea=e,Gl=a,Nu=d,ju=c,Kx=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tv(Nn,function(){return um(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=S.T,S.T=null,c=D.p,D.p=2,y=Ue,Ue|=4;try{yv(e,t,a)}finally{Ue=y,D.p=c,S.T=l}}gt=1,rm(),im(),om()}}function rm(){if(gt===1){gt=0;var e=Ea,t=Vl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=S.T,S.T=null;var l=D.p;D.p=2;var c=Ue;Ue|=4;try{Yx(t,e);var d=Bu,y=Wf(e.containerInfo),j=d.focusedElem,T=d.selectionRange;if(y!==j&&j&&j.ownerDocument&&Qf(j.ownerDocument.documentElement,j)){if(T!==null&&dc(j)){var Q=T.start,ie=T.end;if(ie===void 0&&(ie=Q),"selectionStart"in j)j.selectionStart=Q,j.selectionEnd=Math.min(ie,j.value.length);else{var de=j.ownerDocument||document,K=de&&de.defaultView||window;if(K.getSelection){var P=K.getSelection(),Ee=j.textContent.length,we=Math.min(T.start,Ee),Le=T.end===void 0?we:Math.min(T.end,Ee);!P.extend&&we>Le&&(y=Le,Le=we,we=y);var $=Zf(j,we),H=Zf(j,Le);if($&&H&&(P.rangeCount!==1||P.anchorNode!==$.node||P.anchorOffset!==$.offset||P.focusNode!==H.node||P.focusOffset!==H.offset)){var Z=de.createRange();Z.setStart($.node,$.offset),P.removeAllRanges(),we>Le?(P.addRange(Z),P.extend(H.node,H.offset)):(Z.setEnd(H.node,H.offset),P.addRange(Z))}}}}for(de=[],P=j;P=P.parentNode;)P.nodeType===1&&de.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<de.length;j++){var oe=de[j];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}eo=!!Uu,Bu=Uu=null}finally{Ue=c,D.p=l,S.T=a}}e.current=t,gt=2}}function im(){if(gt===2){gt=0;var e=Ea,t=Vl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=S.T,S.T=null;var l=D.p;D.p=2;var c=Ue;Ue|=4;try{Bx(e,t.alternate,t)}finally{Ue=c,D.p=l,S.T=a}}gt=3}}function om(){if(gt===4||gt===3){gt=0,Ie();var e=Ea,t=Vl,a=Gl,l=Kx;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?gt=5:(gt=0,Vl=Ea=null,cm(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Sa=null),bs(a),t=t.stateNode,Pe&&typeof Pe.onCommitFiberRoot=="function")try{Pe.onCommitFiberRoot(Ht,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=S.T,c=D.p,D.p=2,S.T=null;try{for(var d=e.onRecoverableError,y=0;y<l.length;y++){var j=l[y];d(j.value,{componentStack:j.stack})}}finally{S.T=t,D.p=c}}(Gl&3)!==0&&Yi(),kn(e),c=e.pendingLanes,(a&4194090)!==0&&(c&42)!==0?e===wu?ar++:(ar=0,wu=e):ar=0,lr(0)}}function cm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Us(t)))}function Yi(e){return rm(),im(),om(),um()}function um(){if(gt!==5)return!1;var e=Ea,t=Nu;Nu=0;var a=bs(Gl),l=S.T,c=D.p;try{D.p=32>a?32:a,S.T=null,a=ju,ju=null;var d=Ea,y=Gl;if(gt=0,Vl=Ea=null,Gl=0,(Ue&6)!==0)throw Error(o(331));var j=Ue;if(Ue|=4,Qx(d.current),Gx(d,d.current,y,a),Ue=j,lr(0,!1),Pe&&typeof Pe.onPostCommitFiberRoot=="function")try{Pe.onPostCommitFiberRoot(Ht,d)}catch{}return!0}finally{D.p=c,S.T=l,cm(e,t)}}function dm(e,t,a){t=en(a,t),t=tu(e.stateNode,t,2),e=ma(e,t,2),e!==null&&(sa(e,2),kn(e))}function Ye(e,t,a){if(e.tag===3)dm(e,e,a);else for(;t!==null;){if(t.tag===3){dm(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Sa===null||!Sa.has(l))){e=en(a,e),a=mx(2),l=ma(t,a,2),l!==null&&(px(a,l,t,e),sa(l,2),kn(l));break}}t=t.return}}function ku(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Nv;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(a)||(gu=!0,c.add(a),e=_v.bind(null,e,t,a),t.then(e,e))}function _v(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ve===e&&(Re&a)===a&&(Ke===4||Ke===3&&(Re&62914560)===Re&&300>ke()-bu?(Ue&2)===0&&Xl(e,0):yu|=a,Yl===Re&&(Yl=0)),kn(e)}function fm(e,t){t===0&&(t=la()),e=kl(e,t),e!==null&&(sa(e,t),kn(e))}function kv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),fm(e,a)}function Cv(e,t){var a=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),fm(e,a)}function Tv(e,t){return pe(e,t)}var Vi=null,Ql=null,Cu=!1,Gi=!1,Tu=!1,sl=0;function kn(e){e!==Ql&&e.next===null&&(Ql===null?Vi=Ql=e:Ql=Ql.next=e),Gi=!0,Cu||(Cu=!0,Av())}function lr(e,t){if(!Tu&&Gi){Tu=!0;do for(var a=!1,l=Vi;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var d=0;else{var y=l.suspendedLanes,j=l.pingedLanes;d=(1<<31-nt(42|e)+1)-1,d&=c&~(y&~j),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,pm(l,d))}else d=Re,d=Et(l,l===Ve?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||Ut(l,d)||(a=!0,pm(l,d));l=l.next}while(a);Tu=!1}}function Mv(){hm()}function hm(){Gi=Cu=!1;var e=0;sl!==0&&(qv()&&(e=sl),sl=0);for(var t=ke(),a=null,l=Vi;l!==null;){var c=l.next,d=xm(l,t);d===0?(l.next=null,a===null?Vi=c:a.next=c,c===null&&(Ql=a)):(a=l,(e!==0||(d&3)!==0)&&(Gi=!0)),l=c}lr(e)}function xm(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-nt(d),j=1<<y,T=c[y];T===-1?((j&a)===0||(j&l)!==0)&&(c[y]=ys(j,t)):T<=t&&(e.expiredLanes|=j),d&=~j}if(t=Ve,a=Re,a=Et(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&ve(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ut(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&ve(l),bs(a)){case 2:case 8:a=Wt;break;case 32:a=Nn;break;case 268435456:a=An;break;default:a=Nn}return l=mm.bind(null,e),a=pe(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&ve(l),e.callbackPriority=2,e.callbackNode=null,2}function mm(e,t){if(gt!==0&>!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Yi()&&e.callbackNode!==a)return null;var l=Re;return l=Et(e,e===Ve?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Fx(e,l,t),xm(e,ke()),e.callbackNode!=null&&e.callbackNode===a?mm.bind(null,e):null)}function pm(e,t){if(Yi())return null;Fx(e,t,!0)}function Av(){Lv(function(){(Ue&6)!==0?pe(ct,Mv):hm()})}function Mu(){return sl===0&&(sl=ml()),sl}function gm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ti(""+e)}function ym(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function zv(e,t,a,l,c){if(t==="submit"&&a&&a.stateNode===c){var d=gm((c[Nt]||null).action),y=l.submitter;y&&(t=(t=y[Nt]||null)?gm(t.formAction):y.getAttribute("formAction"),t!==null&&(d=t,y=null));var j=new si("action","action",null,l,c);e.push({event:j,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(sl!==0){var T=y?ym(c,y):new FormData(c);Jc(a,{pending:!0,data:T,method:c.method,action:d},null,T)}}else typeof d=="function"&&(j.preventDefault(),T=y?ym(c,y):new FormData(c),Jc(a,{pending:!0,data:T,method:c.method,action:d},d,T))},currentTarget:c}]})}}for(var Au=0;Au<mc.length;Au++){var zu=mc[Au],Rv=zu.toLowerCase(),Dv=zu[0].toUpperCase()+zu.slice(1);mn(Rv,"on"+Dv)}mn(Ff,"onAnimationEnd"),mn(If,"onAnimationIteration"),mn(Pf,"onAnimationStart"),mn("dblclick","onDoubleClick"),mn("focusin","onFocus"),mn("focusout","onBlur"),mn(Fy,"onTransitionRun"),mn(Iy,"onTransitionStart"),mn(Py,"onTransitionCancel"),mn(eh,"onTransitionEnd"),ca("onMouseEnter",["mouseout","mouseover"]),ca("onMouseLeave",["mouseout","mouseover"]),ca("onPointerEnter",["pointerout","pointerover"]),ca("onPointerLeave",["pointerout","pointerover"]),Dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Dn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sr="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(" "),Ov=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sr));function vm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],c=l.event;l=l.listeners;e:{var d=void 0;if(t)for(var y=l.length-1;0<=y;y--){var j=l[y],T=j.instance,Q=j.currentTarget;if(j=j.listener,T!==d&&c.isPropagationStopped())break e;d=j,c.currentTarget=Q;try{d(c)}catch(ie){Ai(ie)}c.currentTarget=null,d=T}else for(y=0;y<l.length;y++){if(j=l[y],T=j.instance,Q=j.currentTarget,j=j.listener,T!==d&&c.isPropagationStopped())break e;d=j,c.currentTarget=Q;try{d(c)}catch(ie){Ai(ie)}c.currentTarget=null,d=T}}}}function ze(e,t){var a=t[Ns];a===void 0&&(a=t[Ns]=new Set);var l=e+"__bubble";a.has(l)||(bm(t,e,2,!1),a.add(l))}function Ru(e,t,a){var l=0;t&&(l|=4),bm(a,e,l,t)}var Xi="_reactListening"+Math.random().toString(36).slice(2);function Du(e){if(!e[Xi]){e[Xi]=!0,Qr.forEach(function(a){a!=="selectionchange"&&(Ov.has(a)||Ru(a,!1,e),Ru(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xi]||(t[Xi]=!0,Ru("selectionchange",!1,t))}}function bm(e,t,a,l){switch(Gm(t)){case 2:var c=ob;break;case 8:c=cb;break;default:c=Wu}a=c.bind(null,t,a,e),c=void 0,!nc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function Ou(e,t,a,l,c){var d=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var j=l.stateNode.containerInfo;if(j===c)break;if(y===4)for(y=l.return;y!==null;){var T=y.tag;if((T===3||T===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;j!==null;){if(y=Rn(j),y===null)return;if(T=y.tag,T===5||T===6||T===26||T===27){l=d=y;continue e}j=j.parentNode}}l=l.return}kf(function(){var Q=d,ie=ec(a),de=[];e:{var K=th.get(e);if(K!==void 0){var P=si,Ee=e;switch(e){case"keypress":if(ai(a)===0)break e;case"keydown":case"keyup":P=Ty;break;case"focusin":Ee="focus",P=rc;break;case"focusout":Ee="blur",P=rc;break;case"beforeblur":case"afterblur":P=rc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=gy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=zy;break;case Ff:case If:case Pf:P=by;break;case eh:P=Dy;break;case"scroll":case"scrollend":P=my;break;case"wheel":P=Hy;break;case"copy":case"cut":case"paste":P=jy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=zf;break;case"toggle":case"beforetoggle":P=By}var we=(t&4)!==0,Le=!we&&(e==="scroll"||e==="scrollend"),$=we?K!==null?K+"Capture":null:K;we=[];for(var H=Q,Z;H!==null;){var oe=H;if(Z=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Z===null||$===null||(oe=Ss(H,$),oe!=null&&we.push(rr(H,oe,Z))),Le)break;H=H.return}0<we.length&&(K=new P(K,Ee,null,a,ie),de.push({event:K,listeners:we}))}}if((t&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",K&&a!==Po&&(Ee=a.relatedTarget||a.fromElement)&&(Rn(Ee)||Ee[ra]))break e;if((P||K)&&(K=ie.window===ie?ie:(K=ie.ownerDocument)?K.defaultView||K.parentWindow:window,P?(Ee=a.relatedTarget||a.toElement,P=Q,Ee=Ee?Rn(Ee):null,Ee!==null&&(Le=f(Ee),we=Ee.tag,Ee!==Le||we!==5&&we!==27&&we!==6)&&(Ee=null)):(P=null,Ee=Q),P!==Ee)){if(we=Mf,oe="onMouseLeave",$="onMouseEnter",H="mouse",(e==="pointerout"||e==="pointerover")&&(we=zf,oe="onPointerLeave",$="onPointerEnter",H="pointer"),Le=P==null?K:Ya(P),Z=Ee==null?K:Ya(Ee),K=new we(oe,H+"leave",P,a,ie),K.target=Le,K.relatedTarget=Z,oe=null,Rn(ie)===Q&&(we=new we($,H+"enter",Ee,a,ie),we.target=Z,we.relatedTarget=Le,oe=we),Le=oe,P&&Ee)t:{for(we=P,$=Ee,H=0,Z=we;Z;Z=Wl(Z))H++;for(Z=0,oe=$;oe;oe=Wl(oe))Z++;for(;0<H-Z;)we=Wl(we),H--;for(;0<Z-H;)$=Wl($),Z--;for(;H--;){if(we===$||$!==null&&we===$.alternate)break t;we=Wl(we),$=Wl($)}we=null}else we=null;P!==null&&Nm(de,K,P,we,!1),Ee!==null&&Le!==null&&Nm(de,Le,Ee,we,!0)}}e:{if(K=Q?Ya(Q):window,P=K.nodeName&&K.nodeName.toLowerCase(),P==="select"||P==="input"&&K.type==="file")var ge=$f;else if(Bf(K))if(Lf)ge=Wy;else{ge=Zy;var Te=Xy}else P=K.nodeName,!P||P.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?Q&&Io(Q.elementType)&&(ge=$f):ge=Qy;if(ge&&(ge=ge(e,Q))){qf(de,ge,a,ie);break e}Te&&Te(e,K,Q),e==="focusout"&&Q&&K.type==="number"&&Q.memoizedProps.value!=null&&Fo(K,"number",K.value)}switch(Te=Q?Ya(Q):window,e){case"focusin":(Bf(Te)||Te.contentEditable==="true")&&(Sl=Te,fc=Q,zs=null);break;case"focusout":zs=fc=Sl=null;break;case"mousedown":hc=!0;break;case"contextmenu":case"mouseup":case"dragend":hc=!1,Kf(de,a,ie);break;case"selectionchange":if(Jy)break;case"keydown":case"keyup":Kf(de,a,ie)}var be;if(oc)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else wl?Hf(e,a)&&(Se="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Se="onCompositionStart");Se&&(Rf&&a.locale!=="ko"&&(wl||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&wl&&(be=Cf()):(da=ie,ac="value"in da?da.value:da.textContent,wl=!0)),Te=Zi(Q,Se),0<Te.length&&(Se=new Af(Se,e,null,a,ie),de.push({event:Se,listeners:Te}),be?Se.data=be:(be=Uf(a),be!==null&&(Se.data=be)))),(be=$y?Ly(e,a):Yy(e,a))&&(Se=Zi(Q,"onBeforeInput"),0<Se.length&&(Te=new Af("onBeforeInput","beforeinput",null,a,ie),de.push({event:Te,listeners:Se}),Te.data=be)),zv(de,e,Q,a,ie)}vm(de,t)})}function rr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Zi(e,t){for(var a=t+"Capture",l=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Ss(e,a),c!=null&&l.unshift(rr(e,c,d)),c=Ss(e,t),c!=null&&l.push(rr(e,c,d))),e.tag===3)return l;e=e.return}return[]}function Wl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Nm(e,t,a,l,c){for(var d=t._reactName,y=[];a!==null&&a!==l;){var j=a,T=j.alternate,Q=j.stateNode;if(j=j.tag,T!==null&&T===l)break;j!==5&&j!==26&&j!==27||Q===null||(T=Q,c?(Q=Ss(a,d),Q!=null&&y.unshift(rr(a,Q,T))):c||(Q=Ss(a,d),Q!=null&&y.push(rr(a,Q,T)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var Hv=/\r\n?/g,Uv=/\u0000|\uFFFD/g;function jm(e){return(typeof e=="string"?e:""+e).replace(Hv,`
|
|
49
|
+
`).replace(Uv,"")}function wm(e,t){return t=jm(t),jm(e)===t}function Qi(){}function $e(e,t,a,l,c,d){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||bl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&bl(e,""+l);break;case"className":gl(e,"class",l);break;case"tabIndex":gl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":gl(e,a,l);break;case"style":Ef(e,l,d);break;case"data":if(t!=="object"){gl(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ti(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&$e(e,t,"name",c.name,c,null),$e(e,t,"formEncType",c.formEncType,c,null),$e(e,t,"formMethod",c.formMethod,c,null),$e(e,t,"formTarget",c.formTarget,c,null)):($e(e,t,"encType",c.encType,c,null),$e(e,t,"method",c.method,c,null),$e(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ti(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Qi);break;case"onScroll":l!=null&&ze("scroll",e);break;case"onScrollEnd":l!=null&&ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=ti(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":ze("beforetoggle",e),ze("toggle",e),pl(e,"popover",l);break;case"xlinkActuate":xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":xn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":xn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":xn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":xn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":pl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=hy.get(a)||a,pl(e,a,l))}}function Hu(e,t,a,l,c,d){switch(a){case"style":Ef(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof l=="string"?bl(e,l):(typeof l=="number"||typeof l=="bigint")&&bl(e,""+l);break;case"onScroll":l!=null&&ze("scroll",e);break;case"onScrollEnd":l!=null&&ze("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Qi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),d=e[Nt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof l=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,c);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):pl(e,a,l)}}}function yt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var l=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var y=a[d];if(y!=null)switch(d){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:$e(e,t,d,y,a,null)}}c&&$e(e,t,"srcSet",a.srcSet,a,null),l&&$e(e,t,"src",a.src,a,null);return;case"input":ze("invalid",e);var j=d=y=c=null,T=null,Q=null;for(l in a)if(a.hasOwnProperty(l)){var ie=a[l];if(ie!=null)switch(l){case"name":c=ie;break;case"type":y=ie;break;case"checked":T=ie;break;case"defaultChecked":Q=ie;break;case"value":d=ie;break;case"defaultValue":j=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(o(137,t));break;default:$e(e,t,l,ie,a,null)}}Nf(e,d,j,T,Q,y,c,!1),Pr(e);return;case"select":ze("invalid",e),l=y=d=null;for(c in a)if(a.hasOwnProperty(c)&&(j=a[c],j!=null))switch(c){case"value":d=j;break;case"defaultValue":y=j;break;case"multiple":l=j;default:$e(e,t,c,j,a,null)}t=d,a=y,e.multiple=!!l,t!=null?vl(e,!!l,t,!1):a!=null&&vl(e,!!l,a,!0);return;case"textarea":ze("invalid",e),d=c=l=null;for(y in a)if(a.hasOwnProperty(y)&&(j=a[y],j!=null))switch(y){case"value":l=j;break;case"defaultValue":c=j;break;case"children":d=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(91));break;default:$e(e,t,y,j,a,null)}wf(e,l,c,d),Pr(e);return;case"option":for(T in a)if(a.hasOwnProperty(T)&&(l=a[T],l!=null))switch(T){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:$e(e,t,T,l,a,null)}return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(l=0;l<sr.length;l++)ze(sr[l],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in a)if(a.hasOwnProperty(Q)&&(l=a[Q],l!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:$e(e,t,Q,l,a,null)}return;default:if(Io(t)){for(ie in a)a.hasOwnProperty(ie)&&(l=a[ie],l!==void 0&&Hu(e,t,ie,l,a,void 0));return}}for(j in a)a.hasOwnProperty(j)&&(l=a[j],l!=null&&$e(e,t,j,l,a,null))}function Bv(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,y=null,j=null,T=null,Q=null,ie=null;for(P in a){var de=a[P];if(a.hasOwnProperty(P)&&de!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":T=de;default:l.hasOwnProperty(P)||$e(e,t,P,null,l,de)}}for(var K in l){var P=l[K];if(de=a[K],l.hasOwnProperty(K)&&(P!=null||de!=null))switch(K){case"type":d=P;break;case"name":c=P;break;case"checked":Q=P;break;case"defaultChecked":ie=P;break;case"value":y=P;break;case"defaultValue":j=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:P!==de&&$e(e,t,K,P,l,de)}}Jo(e,y,j,T,Q,ie,d,c);return;case"select":P=y=j=K=null;for(d in a)if(T=a[d],a.hasOwnProperty(d)&&T!=null)switch(d){case"value":break;case"multiple":P=T;default:l.hasOwnProperty(d)||$e(e,t,d,null,l,T)}for(c in l)if(d=l[c],T=a[c],l.hasOwnProperty(c)&&(d!=null||T!=null))switch(c){case"value":K=d;break;case"defaultValue":j=d;break;case"multiple":y=d;default:d!==T&&$e(e,t,c,d,l,T)}t=j,a=y,l=P,K!=null?vl(e,!!a,K,!1):!!l!=!!a&&(t!=null?vl(e,!!a,t,!0):vl(e,!!a,a?[]:"",!1));return;case"textarea":P=K=null;for(j in a)if(c=a[j],a.hasOwnProperty(j)&&c!=null&&!l.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:$e(e,t,j,null,l,c)}for(y in l)if(c=l[y],d=a[y],l.hasOwnProperty(y)&&(c!=null||d!=null))switch(y){case"value":K=c;break;case"defaultValue":P=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&$e(e,t,y,c,l,d)}jf(e,K,P);return;case"option":for(var Ee in a)if(K=a[Ee],a.hasOwnProperty(Ee)&&K!=null&&!l.hasOwnProperty(Ee))switch(Ee){case"selected":e.selected=!1;break;default:$e(e,t,Ee,null,l,K)}for(T in l)if(K=l[T],P=a[T],l.hasOwnProperty(T)&&K!==P&&(K!=null||P!=null))switch(T){case"selected":e.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:$e(e,t,T,K,l,P)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var we in a)K=a[we],a.hasOwnProperty(we)&&K!=null&&!l.hasOwnProperty(we)&&$e(e,t,we,null,l,K);for(Q in l)if(K=l[Q],P=a[Q],l.hasOwnProperty(Q)&&K!==P&&(K!=null||P!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(o(137,t));break;default:$e(e,t,Q,K,l,P)}return;default:if(Io(t)){for(var Le in a)K=a[Le],a.hasOwnProperty(Le)&&K!==void 0&&!l.hasOwnProperty(Le)&&Hu(e,t,Le,void 0,l,K);for(ie in l)K=l[ie],P=a[ie],!l.hasOwnProperty(ie)||K===P||K===void 0&&P===void 0||Hu(e,t,ie,K,l,P);return}}for(var $ in a)K=a[$],a.hasOwnProperty($)&&K!=null&&!l.hasOwnProperty($)&&$e(e,t,$,null,l,K);for(de in l)K=l[de],P=a[de],!l.hasOwnProperty(de)||K===P||K==null&&P==null||$e(e,t,de,K,l,P)}var Uu=null,Bu=null;function Wi(e){return e.nodeType===9?e:e.ownerDocument}function Sm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Em(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function qu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $u=null;function qv(){var e=window.event;return e&&e.type==="popstate"?e===$u?!1:($u=e,!0):($u=null,!1)}var _m=typeof setTimeout=="function"?setTimeout:void 0,$v=typeof clearTimeout=="function"?clearTimeout:void 0,km=typeof Promise=="function"?Promise:void 0,Lv=typeof queueMicrotask=="function"?queueMicrotask:typeof km<"u"?function(e){return km.resolve(null).then(e).catch(Yv)}:_m;function Yv(e){setTimeout(function(){throw e})}function ka(e){return e==="head"}function Cm(e,t){var a=t,l=0,c=0;do{var d=a.nextSibling;if(e.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"){if(0<l&&8>l){a=l;var y=e.ownerDocument;if(a&1&&ir(y.documentElement),a&2&&ir(y.body),a&4)for(a=y.head,ir(a),y=a.firstChild;y;){var j=y.nextSibling,T=y.nodeName;y[La]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&y.rel.toLowerCase()==="stylesheet"||a.removeChild(y),y=j}}if(c===0){e.removeChild(d),mr(t);return}c--}else a==="$"||a==="$?"||a==="$!"?c++:l=a.charCodeAt(0)-48;else l=0;a=d}while(a);mr(t)}function Lu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Lu(a),js(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Vv(e,t,a,l){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[La])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function Gv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=gn(e.nextSibling),e===null))return null;return e}function Yu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Xv(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function gn(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==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Vu=null;function Tm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function Mm(e,t,a){switch(t=Wi(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ir(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);js(e)}var rn=new Map,Am=new Set;function Ki(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Wn=D.d;D.d={f:Zv,r:Qv,D:Wv,C:Kv,L:Jv,m:Fv,X:Pv,S:Iv,M:eb};function Zv(){var e=Wn.f(),t=$i();return e||t}function Qv(e){var t=ia(e);t!==null&&t.tag===5&&t.type==="form"?Fh(t):Wn.r(e)}var Kl=typeof document>"u"?null:document;function zm(e,t,a){var l=Kl;if(l&&typeof t=="string"&&t){var c=Pt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Am.has(c)||(Am.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),yt(t,"link",e),at(t),l.head.appendChild(t)))}}function Wv(e){Wn.D(e),zm("dns-prefetch",e,null)}function Kv(e,t){Wn.C(e,t),zm("preconnect",e,t)}function Jv(e,t,a){Wn.L(e,t,a);var l=Kl;if(l&&e&&t){var c='link[rel="preload"][as="'+Pt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Pt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Pt(a.imageSizes)+'"]')):c+='[href="'+Pt(e)+'"]';var d=c;switch(t){case"style":d=Jl(e);break;case"script":d=Fl(e)}rn.has(d)||(e=g({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),rn.set(d,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(or(d))||t==="script"&&l.querySelector(cr(d))||(t=l.createElement("link"),yt(t,"link",e),at(t),l.head.appendChild(t)))}}function Fv(e,t){Wn.m(e,t);var a=Kl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Pt(l)+'"][href="'+Pt(e)+'"]',d=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Fl(e)}if(!rn.has(d)&&(e=g({rel:"modulepreload",href:e},t),rn.set(d,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(cr(d)))return}l=a.createElement("link"),yt(l,"link",e),at(l),a.head.appendChild(l)}}}function Iv(e,t,a){Wn.S(e,t,a);var l=Kl;if(l&&e){var c=oa(l).hoistableStyles,d=Jl(e);t=t||"default";var y=c.get(d);if(!y){var j={loading:0,preload:null};if(y=l.querySelector(or(d)))j.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},a),(a=rn.get(d))&&Gu(e,a);var T=y=l.createElement("link");at(T),yt(T,"link",e),T._p=new Promise(function(Q,ie){T.onload=Q,T.onerror=ie}),T.addEventListener("load",function(){j.loading|=1}),T.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Ji(y,t,l)}y={type:"stylesheet",instance:y,count:1,state:j},c.set(d,y)}}}function Pv(e,t){Wn.X(e,t);var a=Kl;if(a&&e){var l=oa(a).hoistableScripts,c=Fl(e),d=l.get(c);d||(d=a.querySelector(cr(c)),d||(e=g({src:e,async:!0},t),(t=rn.get(c))&&Xu(e,t),d=a.createElement("script"),at(d),yt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function eb(e,t){Wn.M(e,t);var a=Kl;if(a&&e){var l=oa(a).hoistableScripts,c=Fl(e),d=l.get(c);d||(d=a.querySelector(cr(c)),d||(e=g({src:e,async:!0,type:"module"},t),(t=rn.get(c))&&Xu(e,t),d=a.createElement("script"),at(d),yt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function Rm(e,t,a,l){var c=(c=ue.current)?Ki(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Jl(a.href),a=oa(c).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Jl(a.href);var d=oa(c).hoistableStyles,y=d.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=c.querySelector(or(e)))&&!d._p&&(y.instance=d,y.state.loading=5),rn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},rn.set(e,a),d||tb(c,e,a,y.state))),t&&l===null)throw Error(o(528,""));return y}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Fl(a),a=oa(c).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Jl(e){return'href="'+Pt(e)+'"'}function or(e){return'link[rel="stylesheet"]['+e+"]"}function Dm(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function tb(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),yt(t,"link",a),at(t),e.head.appendChild(t))}function Fl(e){return'[src="'+Pt(e)+'"]'}function cr(e){return"script[async]"+e}function Om(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Pt(a.href)+'"]');if(l)return t.instance=l,at(l),l;var c=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),at(l),yt(l,"style",c),Ji(l,a.precedence,e),t.instance=l;case"stylesheet":c=Jl(a.href);var d=e.querySelector(or(c));if(d)return t.state.loading|=4,t.instance=d,at(d),d;l=Dm(a),(c=rn.get(c))&&Gu(l,c),d=(e.ownerDocument||e).createElement("link"),at(d);var y=d;return y._p=new Promise(function(j,T){y.onload=j,y.onerror=T}),yt(d,"link",l),t.state.loading|=4,Ji(d,a.precedence,e),t.instance=d;case"script":return d=Fl(a.src),(c=e.querySelector(cr(d)))?(t.instance=c,at(c),c):(l=a,(c=rn.get(d))&&(l=g({},a),Xu(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),at(c),yt(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Ji(l,a.precedence,e));return t.instance}function Ji(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,d=c,y=0;y<l.length;y++){var j=l[y];if(j.dataset.precedence===t)d=j;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Gu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Fi=null;function Hm(e,t,a){if(Fi===null){var l=new Map,c=Fi=new Map;c.set(a,l)}else c=Fi,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[La]||d[dt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(t)||"";y=e+y;var j=l.get(y);j?j.push(d):l.set(y,[d])}}return l}function Um(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function nb(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Bm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var ur=null;function ab(){}function lb(e,t,a){if(ur===null)throw Error(o(475));var l=ur;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var c=Jl(a.href),d=e.querySelector(or(c));if(d){e=d._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(l.count++,l=Ii.bind(l),e.then(l,l)),t.state.loading|=4,t.instance=d,at(d);return}d=e.ownerDocument||e,a=Dm(a),(c=rn.get(c))&&Gu(a,c),d=d.createElement("link"),at(d);var y=d;y._p=new Promise(function(j,T){y.onload=j,y.onerror=T}),yt(d,"link",a),t.instance=d}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(l.count++,t=Ii.bind(l),e.addEventListener("load",t),e.addEventListener("error",t))}}function sb(){if(ur===null)throw Error(o(475));var e=ur;return e.stylesheets&&e.count===0&&Zu(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&Zu(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Ii(){if(this.count--,this.count===0){if(this.stylesheets)Zu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Pi=null;function Zu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Pi=new Map,t.forEach(rb,e),Pi=null,Ii.call(e))}function rb(e,t){if(!(t.state.loading&4)){var a=Pi.get(e);if(a)var l=a.get(null);else{a=new Map,Pi.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var y=c[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),l=y)}l&&a.set(null,l)}c=t.instance,y=c.getAttribute("data-precedence"),d=a.get(y)||l,d===l&&a.set(null,c),a.set(y,c),this.count++,l=Ii.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var dr={$$typeof:V,Provider:null,Consumer:null,_currentValue:M,_currentValue2:M,_threadCount:0};function ib(e,t,a,l,c,d,y,j){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$a(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$a(0),this.hiddenUpdates=$a(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function qm(e,t,a,l,c,d,y,j,T,Q,ie,de){return e=new ib(e,t,a,y,j,T,Q,de),t=1,d===!0&&(t|=24),d=qt(3,null,null,t),e.current=d,d.stateNode=e,t=kc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:a,cache:t},Ac(d),e}function $m(e){return e?(e=Cl,e):Cl}function Lm(e,t,a,l,c,d){c=$m(c),l.context===null?l.context=c:l.pendingContext=c,l=xa(t),l.payload={element:a},d=d===void 0?null:d,d!==null&&(l.callback=d),a=ma(e,l,t),a!==null&&(Gt(a,e,t),Ls(a,e,t))}function Ym(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Qu(e,t){Ym(e,t),(e=e.alternate)&&Ym(e,t)}function Vm(e){if(e.tag===13){var t=kl(e,67108864);t!==null&&Gt(t,e,67108864),Qu(e,67108864)}}var eo=!0;function ob(e,t,a,l){var c=S.T;S.T=null;var d=D.p;try{D.p=2,Wu(e,t,a,l)}finally{D.p=d,S.T=c}}function cb(e,t,a,l){var c=S.T;S.T=null;var d=D.p;try{D.p=8,Wu(e,t,a,l)}finally{D.p=d,S.T=c}}function Wu(e,t,a,l){if(eo){var c=Ku(l);if(c===null)Ou(e,t,l,to,a),Xm(e,l);else if(db(c,e,t,a,l))l.stopPropagation();else if(Xm(e,l),t&4&&-1<ub.indexOf(e)){for(;c!==null;){var d=ia(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=Tt(d.pendingLanes);if(y!==0){var j=d;for(j.pendingLanes|=2,j.entangledLanes|=2;y;){var T=1<<31-nt(y);j.entanglements[1]|=T,y&=~T}kn(d),(Ue&6)===0&&(Bi=ke()+500,lr(0))}}break;case 13:j=kl(d,2),j!==null&&Gt(j,d,2),$i(),Qu(d,2)}if(d=Ku(l),d===null&&Ou(e,t,l,to,a),d===c)break;c=d}c!==null&&l.stopPropagation()}else Ou(e,t,l,null,a)}}function Ku(e){return e=ec(e),Ju(e)}var to=null;function Ju(e){if(to=null,e=Rn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return to=e,null}function Gm(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ne()){case ct:return 2;case Wt:return 8;case Nn:case na:return 32;case An:return 268435456;default:return 32}default:return 32}}var Fu=!1,Ca=null,Ta=null,Ma=null,fr=new Map,hr=new Map,Aa=[],ub="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Xm(e,t){switch(e){case"focusin":case"focusout":Ca=null;break;case"dragenter":case"dragleave":Ta=null;break;case"mouseover":case"mouseout":Ma=null;break;case"pointerover":case"pointerout":fr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":hr.delete(t.pointerId)}}function xr(e,t,a,l,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:d,targetContainers:[c]},t!==null&&(t=ia(t),t!==null&&Vm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function db(e,t,a,l,c){switch(t){case"focusin":return Ca=xr(Ca,e,t,a,l,c),!0;case"dragenter":return Ta=xr(Ta,e,t,a,l,c),!0;case"mouseover":return Ma=xr(Ma,e,t,a,l,c),!0;case"pointerover":var d=c.pointerId;return fr.set(d,xr(fr.get(d)||null,e,t,a,l,c)),!0;case"gotpointercapture":return d=c.pointerId,hr.set(d,xr(hr.get(d)||null,e,t,a,l,c)),!0}return!1}function Zm(e){var t=Rn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Zo(e.priority,function(){if(a.tag===13){var l=Vt();l=vs(l);var c=kl(a,l);c!==null&&Gt(c,a,l),Qu(a,l)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function no(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Ku(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Po=l,a.target.dispatchEvent(l),Po=null}else return t=ia(a),t!==null&&Vm(t),e.blockedOn=a,!1;t.shift()}return!0}function Qm(e,t,a){no(e)&&a.delete(t)}function fb(){Fu=!1,Ca!==null&&no(Ca)&&(Ca=null),Ta!==null&&no(Ta)&&(Ta=null),Ma!==null&&no(Ma)&&(Ma=null),fr.forEach(Qm),hr.forEach(Qm)}function ao(e,t){e.blockedOn===t&&(e.blockedOn=null,Fu||(Fu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,fb)))}var lo=null;function Wm(e){lo!==e&&(lo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){lo===e&&(lo=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(Ju(l||a)===null)continue;break}var d=ia(a);d!==null&&(e.splice(t,3),t-=3,Jc(d,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function mr(e){function t(T){return ao(T,e)}Ca!==null&&ao(Ca,e),Ta!==null&&ao(Ta,e),Ma!==null&&ao(Ma,e),fr.forEach(t),hr.forEach(t);for(var a=0;a<Aa.length;a++){var l=Aa[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Aa.length&&(a=Aa[0],a.blockedOn===null);)Zm(a),a.blockedOn===null&&Aa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],d=a[l+1],y=c[Nt]||null;if(typeof d=="function")y||Wm(a);else if(y){var j=null;if(d&&d.hasAttribute("formAction")){if(c=d,y=d[Nt]||null)j=y.formAction;else if(Ju(c)!==null)continue}else j=y.action;typeof j=="function"?a[l+1]=j:(a.splice(l,3),l-=3),Wm(a)}}}function Iu(e){this._internalRoot=e}so.prototype.render=Iu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,l=Vt();Lm(a,l,e,t,null,null)},so.prototype.unmount=Iu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lm(e.current,2,null,e,null,null),$i(),t[ra]=null}};function so(e){this._internalRoot=e}so.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xr();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Aa.length&&t!==0&&t<Aa[a].priority;a++);Aa.splice(a,0,e),a===0&&Zm(e)}};var Km=r.version;if(Km!=="19.1.1")throw Error(o(527,Km,"19.1.1"));D.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=m(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var hb={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:S,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ro=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ro.isDisabled&&ro.supportsFiber)try{Ht=ro.inject(hb),Pe=ro}catch{}}return gr.createRoot=function(e,t){if(!u(e))throw Error(o(299));var a=!1,l="",c=dx,d=fx,y=hx,j=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(j=t.unstable_transitionCallbacks)),t=qm(e,1,!1,null,null,a,l,c,d,y,j,null),e[ra]=t.current,Du(e),new Iu(t)},gr.hydrateRoot=function(e,t,a){if(!u(e))throw Error(o(299));var l=!1,c="",d=dx,y=fx,j=hx,T=null,Q=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(j=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(T=a.unstable_transitionCallbacks),a.formState!==void 0&&(Q=a.formState)),t=qm(e,1,!0,t,a??null,l,c,d,y,j,T,Q),t.context=$m(null),a=t.current,l=Vt(),l=vs(l),c=xa(l),c.callback=null,ma(a,c,l),a=l,t.current.lanes=a,sa(t,a),kn(t),e[ra]=t.current,Du(e),new so(t)},gr.version="19.1.1",gr}var s0;function jb(){if(s0)return td.exports;s0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),td.exports=Nb(),td.exports}var wb=jb();/**
|
|
50
|
+
* @license lucide-react v1.33.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const gp=(...n)=>n.filter((r,i,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===i).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v1.33.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/const Sb=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
60
|
+
* @license lucide-react v1.33.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const Eb=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,i,o)=>o?o.toUpperCase():i.toLowerCase());/**
|
|
65
|
+
* @license lucide-react v1.33.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const r0=n=>{const r=Eb(n);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
|
70
|
+
* @license lucide-react v1.33.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/var sd={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"};/**
|
|
75
|
+
* @license lucide-react v1.33.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const _b=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},kb=N.createContext({}),Cb=()=>N.useContext(kb),Tb=N.forwardRef(({color:n,size:r,strokeWidth:i,absoluteStrokeWidth:o,className:u="",children:f,iconNode:h,...p},m)=>{const{size:x=24,strokeWidth:g=2,absoluteStrokeWidth:v=!1,color:b="currentColor",className:E=""}=Cb()??{},C=o??v?Number(i??g)*24/Number(r??x):i??g;return N.createElement("svg",{ref:m,...sd,width:r??x??sd.width,height:r??x??sd.height,stroke:n??b,strokeWidth:C,className:gp("lucide",E,u),...!f&&!_b(p)&&{"aria-hidden":"true"},...p},[...h.map(([k,z])=>N.createElement(k,z)),...Array.isArray(f)?f:[f]])});/**
|
|
80
|
+
* @license lucide-react v1.33.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const je=(n,r)=>{const i=N.forwardRef(({className:o,...u},f)=>N.createElement(Tb,{ref:f,iconNode:r,className:gp(`lucide-${Sb(r0(n))}`,`lucide-${n}`,o),...u}));return i.displayName=r0(n),i};/**
|
|
85
|
+
* @license lucide-react v1.33.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const Mb=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Br=je("activity",Mb);/**
|
|
90
|
+
* @license lucide-react v1.33.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const Ab=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],i0=je("arrow-left",Ab);/**
|
|
95
|
+
* @license lucide-react v1.33.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const zb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],rs=je("arrow-right",zb);/**
|
|
100
|
+
* @license lucide-react v1.33.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const Rb=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],yp=je("bell",Rb);/**
|
|
105
|
+
* @license lucide-react v1.33.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const Db=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],bo=je("brain",Db);/**
|
|
110
|
+
* @license lucide-react v1.33.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const Ob=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vt=je("check",Ob);/**
|
|
115
|
+
* @license lucide-react v1.33.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const Hb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ho=je("chevron-down",Hb);/**
|
|
120
|
+
* @license lucide-react v1.33.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const Ub=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ms=je("chevron-right",Ub);/**
|
|
125
|
+
* @license lucide-react v1.33.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const Bb=[["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"}]],kt=je("circle-alert",Bb);/**
|
|
130
|
+
* @license lucide-react v1.33.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const qb=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],$b=je("circle-play",qb);/**
|
|
135
|
+
* @license lucide-react v1.33.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const Lb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Yb=je("circle-plus",Lb);/**
|
|
140
|
+
* @license lucide-react v1.33.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const Vb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Gb=je("circle-question-mark",Vb);/**
|
|
145
|
+
* @license lucide-react v1.33.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const Xb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],qr=je("clock",Xb);/**
|
|
150
|
+
* @license lucide-react v1.33.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const Zb=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Uo=je("code-xml",Zb);/**
|
|
155
|
+
* @license lucide-react v1.33.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const Qb=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Eo=je("database",Qb);/**
|
|
160
|
+
* @license lucide-react v1.33.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const Wb=[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]],Qd=je("diamond",Wb);/**
|
|
165
|
+
* @license lucide-react v1.33.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const Kb=[["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"}]],o0=je("external-link",Kb);/**
|
|
170
|
+
* @license lucide-react v1.33.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const Jb=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],Wd=je("file-code-corner",Jb);/**
|
|
175
|
+
* @license lucide-react v1.33.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const Fb=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],vp=je("file-text",Fb);/**
|
|
180
|
+
* @license lucide-react v1.33.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const Ib=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],bp=je("git-branch",Ib);/**
|
|
185
|
+
* @license lucide-react v1.33.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const Pb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],ps=je("globe",Pb);/**
|
|
190
|
+
* @license lucide-react v1.33.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const e1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],t1=je("info",e1);/**
|
|
195
|
+
* @license lucide-react v1.33.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const n1=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Np=je("key",n1);/**
|
|
200
|
+
* @license lucide-react v1.33.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const a1=[["path",{d:"M13 13.74a2 2 0 0 1-2 0L2.5 8.87a1 1 0 0 1 0-1.74L11 2.26a2 2 0 0 1 2 0l8.5 4.87a1 1 0 0 1 0 1.74z",key:"15q6uc"}],["path",{d:"m20 14.285 1.5.845a1 1 0 0 1 0 1.74L13 21.74a2 2 0 0 1-2 0l-8.5-4.87a1 1 0 0 1 0-1.74l1.5-.845",key:"byia6g"}]],jp=je("layers-2",a1);/**
|
|
205
|
+
* @license lucide-react v1.33.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const l1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],wp=je("layers",l1);/**
|
|
210
|
+
* @license lucide-react v1.33.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const s1=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],r1=je("layout-grid",s1);/**
|
|
215
|
+
* @license lucide-react v1.33.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const i1=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Sp=je("list",i1);/**
|
|
220
|
+
* @license lucide-react v1.33.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const o1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Fe=je("loader-circle",o1);/**
|
|
225
|
+
* @license lucide-react v1.33.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const c1=[["path",{d:"M3 5h1",key:"1mv5vm"}],["path",{d:"M3 12h1",key:"lp3yf2"}],["path",{d:"M3 19h1",key:"w6f3n9"}],["path",{d:"M8 5h1",key:"1nxr5w"}],["path",{d:"M8 12h1",key:"1con00"}],["path",{d:"M8 19h1",key:"k7p10e"}],["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}]],u1=je("logs",c1);/**
|
|
230
|
+
* @license lucide-react v1.33.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const d1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],f1=je("moon",d1);/**
|
|
235
|
+
* @license lucide-react v1.33.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const h1=[["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"}]],c0=je("network",h1);/**
|
|
240
|
+
* @license lucide-react v1.33.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const x1=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Ep=je("palette",x1);/**
|
|
245
|
+
* @license lucide-react v1.33.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const m1=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Kd=je("pen-line",m1);/**
|
|
250
|
+
* @license lucide-react v1.33.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const p1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Sd=je("play",p1);/**
|
|
255
|
+
* @license lucide-react v1.33.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const g1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Dt=je("plus",g1);/**
|
|
260
|
+
* @license lucide-react v1.33.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const y1=[["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"}]],gs=je("refresh-cw",y1);/**
|
|
265
|
+
* @license lucide-react v1.33.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const v1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],b1=je("rotate-ccw",v1);/**
|
|
270
|
+
* @license lucide-react v1.33.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const N1=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],j1=je("save",N1);/**
|
|
275
|
+
* @license lucide-react v1.33.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const w1=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]],_o=je("scan-line",w1);/**
|
|
280
|
+
* @license lucide-react v1.33.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const S1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ed=je("search",S1);/**
|
|
285
|
+
* @license lucide-react v1.33.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const E1=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],_d=je("send",E1);/**
|
|
290
|
+
* @license lucide-react v1.33.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const _1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],us=je("shield",_1);/**
|
|
295
|
+
* @license lucide-react v1.33.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const k1=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],_p=je("sparkles",k1);/**
|
|
300
|
+
* @license lucide-react v1.33.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const C1=[["path",{d:"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z",key:"xwnzip"}],["path",{d:"M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6",key:"14rsvq"}]],T1=je("square-mouse-pointer",C1);/**
|
|
305
|
+
* @license lucide-react v1.33.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const M1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],A1=je("square",M1);/**
|
|
310
|
+
* @license lucide-react v1.33.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const z1=[["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"}]],R1=je("sun",z1);/**
|
|
315
|
+
* @license lucide-react v1.33.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const D1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Jd=je("terminal",D1);/**
|
|
320
|
+
* @license lucide-react v1.33.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const O1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],dn=je("trash-2",O1);/**
|
|
325
|
+
* @license lucide-react v1.33.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const H1=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],kp=je("user",H1);/**
|
|
330
|
+
* @license lucide-react v1.33.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const U1=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],kd=je("workflow",U1);/**
|
|
335
|
+
* @license lucide-react v1.33.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const B1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ct=je("x",B1);/**
|
|
340
|
+
* @license lucide-react v1.33.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const q1=[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]],Pn=je("zap",q1),Cp=N.createContext({theme:"dark",toggleTheme:()=>{}});function $1({children:n}){const[r,i]=N.useState(()=>localStorage.getItem("jetic_theme")==="light"?"light":"dark");N.useEffect(()=>{const u=document.documentElement;r==="light"?(u.classList.add("light"),u.classList.remove("dark")):(u.classList.add("dark"),u.classList.remove("light")),localStorage.setItem("jetic_theme",r)},[r]);const o=()=>i(u=>u==="dark"?"light":"dark");return s.jsx(Cp.Provider,{value:{theme:r,toggleTheme:o},children:n})}function L1(){return N.useContext(Cp)}const Y1=[{label:"WORKFLOW",items:[{id:"overview",label:"Overview",icon:r1},{id:"model",label:"Model",icon:jp},{id:"simulations",label:"Simulations",icon:Qd},{id:"inspect",label:"Inspect",icon:T1}]},{label:"AGENT",items:[{id:"memory",label:"Memory & Environment",icon:Eo}]},{label:"OBSERVABILITY",items:[{id:"traces",label:"Traces",icon:Br}]}],V1=[];function u0({icon:n,label:r,active:i=!1,onClick:o}){return s.jsxs("button",{type:"button",onClick:o,className:`relative hover:cursor-pointer flex w-full items-center gap-3 rounded-lg px-3 py-1.5 text-left text-[13.5px] transition-colors ${i?"bg-[var(--bg-overlay-md)] text-[var(--text-primary)] font-medium":"text-[var(--text-muted)] hover:bg-[var(--bg-overlay)] hover:text-[var(--text-secondary)]"}`,children:[i&&s.jsx("span",{className:"absolute -left-3 top-1/2 h-4 w-[3px] -translate-y-1/2 rounded-full bg-blue-500"}),s.jsx(n,{className:"h-[15px] w-[15px] shrink-0",strokeWidth:2}),s.jsx("span",{children:r})]})}function G1({currentPage:n,onNavigate:r,onToggleAssistant:i,isAssistantOpen:o}){const{theme:u,toggleTheme:f}=L1();return s.jsxs("div",{className:"flex w-60 shrink-0 flex-col select-none transition-colors duration-300",style:{borderRight:"1px solid var(--border)",backgroundColor:"var(--sidebar-bg)"},children:[s.jsxs("div",{className:"flex items-center justify-between px-4 pb-6 pt-5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[u==="dark"?s.jsx("img",{src:"/jetic.png",alt:"jetic",className:"h-6 w-6"}):s.jsx("img",{src:"/jetic_light.png",alt:"jetic",className:"h-5 w-5"}),s.jsxs("span",{className:"text-[15px] tracking-wide",style:{color:"var(--text-primary)"},children:["Jetic",s.jsx("span",{className:"ml-1 text-blue-400 animate-pulse",children:"Studio"})]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11px] font-medium",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-muted)"},children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500"}),"v0.1.4"]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-3",children:s.jsx("div",{className:"flex flex-col gap-6",children:Y1.map(h=>s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"px-3 pb-1 text-[11px] font-semibold tracking-wider",style:{color:"var(--text-faint)"},children:h.label}),s.jsx("div",{className:"flex flex-col gap-0.5",children:h.items.map(p=>s.jsx(u0,{icon:p.icon,label:p.label,active:n===p.id,onClick:()=>r(p.id)},p.id))})]},h.label))})}),s.jsx("div",{className:"mx-3 my-3 hidden ",style:{borderTop:"1px solid var(--border)"}}),s.jsx("div",{className:"flex flex-col gap-0.5 px-3",children:s.jsxs("button",{type:"button",onClick:i,className:`hidden relative flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-[13.5px] font-medium transition-colors ${o?"bg-blue-500/10 text-blue-400":"hover:bg-[var(--bg-overlay)]"}`,style:o?void 0:{color:"var(--text-secondary)"},children:[s.jsx(_p,{className:"h-[15px] w-[15px] shrink-0",strokeWidth:2}),s.jsx("span",{children:"Jetic Assistant"})]})}),s.jsx("div",{className:"mx-3 my-3 hidden",style:{borderTop:"1px solid var(--border)"}}),s.jsx("div",{className:"flex flex-col gap-0.5 px-3",children:V1.map(h=>s.jsx(u0,{icon:h.icon,label:h.label,active:n===h.id,onClick:()=>r(h.id)},h.id))}),s.jsx("div",{className:"px-3 pb-4 pt-3",children:s.jsxs("div",{className:"flex items-center gap-2 rounded-xl p-1",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)"},children:[s.jsxs("button",{type:"button",onClick:()=>u!=="dark"&&f(),title:"Dark mode",className:`flex flex-1 items-center justify-center gap-1.5 rounded-lg py-1.5 text-[11px] font-medium transition-all duration-200 hover:cursor-pointer ${u==="dark"?"bg-[#1e1e2e] text-blue-300 shadow-sm":"text-[var(--text-faint)] hover:text-[var(--text-muted)]"}`,children:[s.jsx(f1,{className:"h-3 w-3 shrink-0",strokeWidth:2}),"Dark"]}),s.jsxs("button",{type:"button",onClick:()=>u!=="light"&&f(),title:"Light mode",className:`flex flex-1 items-center justify-center gap-1.5 rounded-lg py-1.5 text-[11px] font-medium transition-all duration-200 hover:cursor-pointer ${u==="light"?"bg-white text-amber-500 shadow-sm":"text-[var(--text-faint)] hover:text-[var(--text-muted)]"}`,children:[s.jsx(R1,{className:"h-3 w-3 shrink-0",strokeWidth:2}),"Light"]})]})})]})}function X1({isOpen:n,onClose:r}){return n?s.jsxs("div",{className:"absolute inset-y-0 right-0 w-[400px] border-l border-white/10 bg-[#0a0a0a] shadow-2xl flex flex-col z-50",children:[s.jsxs("div",{className:"flex h-14 items-center justify-between border-b border-white/10 px-5",children:[s.jsx("div",{className:"flex items-center gap-2 text-emerald-400",children:s.jsx("span",{className:"text-[14px] font-medium",children:"Jetic AI"})}),s.jsx("button",{onClick:r,className:" hover:text-zinc-300 text-sm hover:bg-zinc-800/20 p-2 rounded-full",children:s.jsx(Ct,{className:"",size:13})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-5 space-y-4",children:s.jsxs("div",{className:"flex flex-col items-center pt-8 pb-4",children:[s.jsx("div",{className:"mb-4 flex h-10 w-10 items-center justify-center rounded-full bg-zinc-800 text-[13px] font-medium text-zinc-300",children:"J"}),s.jsx("h2",{className:"text-[17px] font-semibold text-white text-center",children:"How can I help you test your APIs?"}),s.jsx("p",{className:"text-zinc-500 text-[13px] mt-2 text-center",children:"Ask me to generate simulations, debug traces, or explain API behavior."})]})}),s.jsx("div",{className:"p-4 border-t border-white/10 bg-white/[0.01]",children:s.jsxs("div",{className:"rounded border border-emerald-600/60 bg-white/[0.015] focus-within:border-emerald-500 transition-colors",children:[s.jsx("textarea",{rows:2,placeholder:"E.g. Test password reset flow...",className:"w-full resize-none bg-transparent px-4 pb-2 pt-3.5 text-[13.5px] text-zinc-200 placeholder:text-zinc-500 focus:outline-none"}),s.jsxs("div",{className:"flex items-center justify-between px-3 pb-3 pt-1",children:[s.jsx("div",{className:"flex gap-2",children:s.jsx("span",{className:"text-[11px] text-zinc-500 font-mono bg-white/[0.05] px-2 py-0.5 rounded",children:"gpt-4o"})}),s.jsx("button",{className:"text-[12px] font-medium text-emerald-400 hover:text-emerald-300",children:"Send"})]})]})})]}):null}const Z1={GET:{bg:"bg-emerald-500/10",text:"text-emerald-400",dot:"#34d399"},POST:{bg:"bg-blue-500/10",text:"text-blue-400",dot:"#60a5fa"},PUT:{bg:"bg-amber-500/10",text:"text-amber-400",dot:"#fbbf24"},PATCH:{bg:"bg-orange-500/10",text:"text-orange-400",dot:"#fb923c"},DELETE:{bg:"bg-red-500/10",text:"text-red-400",dot:"#f87171"}};function Cd(n){return Z1[n.toUpperCase()]??{bg:"bg-[var(--bg-overlay-md)]",text:"text-[var(--text-muted)]",dot:"#a1a1aa"}}function io({label:n,value:r,sub:i,icon:o,accent:u="blue"}){const f={blue:{glow:"bg-blue-500/10",text:"text-blue-400",border:"border-blue-500/20"},emerald:{glow:"bg-emerald-500/10",text:"text-emerald-400",border:"border-emerald-500/20"},amber:{glow:"bg-amber-500/10",text:"text-amber-400",border:"border-amber-500/20"},red:{glow:"bg-red-500/10",text:"text-red-400",border:"border-red-500/20"},zinc:{glow:"bg-[var(--bg-overlay-md)]",text:"text-[var(--text-muted)]",border:"border-[var(--border)]"}}[u];return s.jsxs("div",{className:"relative overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] p-4 hover:bg-[var(--bg-overlay-md)] transition-colors",children:[s.jsx("div",{className:`absolute top-0 right-0 h-20 w-20 rounded-full blur-2xl ${f.glow} opacity-50 -translate-y-4 translate-x-4`}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:`mb-3 flex h-8 w-8 items-center justify-center rounded-lg border border-[var(--border)] ${f.glow}`,children:s.jsx(o,{className:`h-[15px] w-[15px] ${f.text}`,strokeWidth:2})}),s.jsx("p",{className:"text-2xl font-semibold text-[var(--text-primary)] tabular-nums leading-none",children:r}),s.jsx("p",{className:"mt-1 text-[11px] font-semibold tracking-wider text-[var(--text-muted)] uppercase",children:n}),i&&s.jsx("p",{className:"mt-0.5 text-[11px] text-[var(--text-faint)]",children:i})]})]})}function yr({title:n,icon:r,action:i,children:o,noPad:u=!1}){return s.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-[var(--border)] px-4 py-2.5 bg-[var(--bg-overlay-md)]",children:[r&&s.jsx(r,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2}),s.jsx("span",{className:"text-[11px] font-semibold tracking-wider text-[var(--text-faint)] uppercase",children:n}),i&&s.jsx("span",{className:"ml-auto",children:i})]}),s.jsx("div",{className:u?"":"p-4",children:o})]})}function Q1({method:n}){const r=Cd(n);return s.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium tracking-widest ${r.bg} ${r.text}`,children:n.toUpperCase()})}function oo({msg:n}){return s.jsx("p",{className:"py-6 text-center text-[12px] text-[var(--text-faint)]",children:n})}function W1({onClose:n,onSave:r}){const[i,o]=N.useState(""),[u,f]=N.useState("https://"),[h,p]=N.useState(!1),[m,x]=N.useState(""),g=N.useRef(null);N.useEffect(()=>{g.current?.focus()},[]);const v=async E=>{if(E.preventDefault(),!i.trim()){x("Name is required");return}if(!u.trim()||u==="https://"){x("Base URL is required");return}p(!0),x("");try{await r(i.trim(),u.trim()),n()}catch(C){x(C.message),p(!1)}},b="w-full rounded-lg px-3 py-2 text-[12px] outline-none transition-colors focus:border-blue-500/50 focus:bg-[var(--bg-overlay-md)]";return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:E=>{E.target===E.currentTarget&&n()},children:s.jsxs("div",{className:"relative w-full max-w-sm rounded-lg p-6 shadow-2xl shadow-black/60",style:{border:"1px solid var(--border)",backgroundColor:"var(--sidebar-bg)"},children:[s.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)"},children:s.jsx(ps,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),s.jsx("h2",{className:"text-[13.5px] font-medium",style:{color:"var(--text-primary)"},children:"Add Environment"})]}),s.jsx("button",{onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-lg transition-colors hover:cursor-pointer hover:bg-[var(--bg-overlay-md)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-muted)"},children:s.jsx(Ct,{className:"h-[15px] w-[15px]",strokeWidth:2})})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"mb-1.5 block text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Name"}),s.jsx("input",{ref:g,value:i,onChange:E=>o(E.target.value),placeholder:"production",className:b,style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-primary)"}})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1.5 block text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Base URL"}),s.jsx("input",{value:u,onChange:E=>f(E.target.value),placeholder:"https://api.example.com",className:`${b} font-mono`,style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-primary)"}})]}),m&&s.jsx("p",{className:"text-[12px] text-red-400",children:m}),s.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[s.jsx("button",{type:"button",onClick:n,className:"rounded-lg px-4 py-2 text-[12px] transition-colors hover:cursor-pointer hover:bg-[var(--bg-overlay-md)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-muted)"},children:"Cancel"}),s.jsxs("button",{onClick:v,disabled:h,className:"flex items-center gap-2 rounded-lg bg-blue-500 px-4 py-2 text-[12px] font-medium text-white transition-colors hover:cursor-pointer hover:bg-blue-400 disabled:opacity-50",children:[h&&s.jsx(Fe,{className:"h-[14px] w-[14px] animate-spin",strokeWidth:2}),h?"Saving…":"Add Environment"]})]})]})]})})}function d0({onNavigate:n}){const[r,i]=N.useState(null),[o,u]=N.useState([]),[f,h]=N.useState([]),[p,m]=N.useState(!0),[x,g]=N.useState(!1),[v,b]=N.useState(null),[E,C]=N.useState(null),[k,z]=N.useState(!1),[R,Y]=N.useState(null),[V,U]=N.useState(null),B=N.useCallback(async(_=!1)=>{_?g(!0):m(!0),b(null);try{const[q,S,D,M]=await Promise.allSettled([fetch("/api/model").then(A=>A.ok?A.json():null),fetch("/api/workflows").then(A=>A.ok?A.json():[]),fetch("/api/memory").then(A=>A.ok?A.json():[]),fetch("/api/model/environments").then(A=>A.ok?A.json():null)]);q.status==="fulfilled"&&i(q.value),S.status==="fulfilled"&&u(S.value??[]),D.status==="fulfilled"&&h(D.value??[]),M.status==="fulfilled"&&M.value&&C(M.value.defaultEnvironment??null)}catch(q){b(q.message)}finally{m(!1),g(!1)}},[]);N.useEffect(()=>{B()},[B]);const G=r?.endpoints?.length??0,re=o.length,ce=f.length,le=r?.endpoints?.filter(_=>(_.security?.length??0)>0).length??0,J=(r?.endpoints??[]).reduce((_,q)=>(_[q.method.toUpperCase()]=(_[q.method.toUpperCase()]??0)+1,_),{}),ee=(r?.endpoints??[]).slice(0,8),F=o.slice(0,4),te=f.slice(0,6);return s.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-6 py-5",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-[15px] font-medium text-[var(--text-primary)] leading-none",children:r?.project?.name??"Overview"}),s.jsx("p",{className:"mt-0.5 text-[11px] text-[var(--text-muted)]",children:p?"Loading…":r?`${r.project.framework??r.project.language??""} · v${r.version} · ${new Date(r.generatedAt).toLocaleString()}`:"No model yet — run a scan"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("a",{href:"https://docs.jetic.online",target:"_blank",className:"relative hover:cursor-pointer flex w-full items-center gap-3 rounded-lg px-3 py-1.5 text-left text-[13.5px] transition-colors text-[var(--text-muted)] hover:cursor-pointer hover:text-[var(--text-secondary)] ",children:[s.jsx(Gb,{className:"h-[15px] w-[15px] shrink-0",strokeWidth:2}),s.jsx("span",{children:"Jetic Documentation"})]}),s.jsx("button",{type:"button",onClick:()=>B(!0),disabled:x||p,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] text-[var(--text-muted)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] disabled:opacity-40 transition-colors hover:cursor-pointer",children:s.jsx(gs,{className:`h-[15px] w-[15px] ${x?"animate-spin":""}`,strokeWidth:2})}),!p&&!r&&s.jsxs("button",{type:"button",onClick:()=>n?.("model"),className:"flex items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-1.5 text-[12px] font-medium text-white hover:bg-blue-400 transition-colors hover:cursor-pointer",children:[s.jsx(_o,{className:"h-[15px] w-[15px]",strokeWidth:2})," Scan Project"]})]})]}),s.jsxs("div",{className:"flex-1 overflow-auto",children:[p&&s.jsx("div",{className:"space-y-3 p-6",children:[1,2,3,4,5].map(_=>s.jsx("div",{className:"h-14 animate-pulse rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)]",style:{opacity:1-_*.15}},_))}),!p&&v&&s.jsxs("div",{className:"m-6 flex flex-col items-center gap-4 rounded-lg border border-red-500/20 bg-red-500/[0.05] p-10 text-center",children:[s.jsx(kt,{className:"h-8 w-8 text-red-400",strokeWidth:2}),s.jsx("p",{className:"text-[13px] text-red-300",children:v}),s.jsx("button",{type:"button",onClick:()=>B(),className:"rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-1.5 text-[12px] text-red-400 hover:bg-red-500/20 transition-colors hover:cursor-pointer",children:"Retry"})]}),!p&&!v&&s.jsxs("div",{className:"p-6 space-y-5",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[s.jsx(io,{label:"Endpoints",value:G,icon:c0,accent:"blue"}),s.jsx(io,{label:"Workflows",value:re,icon:kd,accent:"zinc"}),s.jsx(io,{label:"Memory Keys",value:ce,icon:Eo,accent:"emerald"}),s.jsx(io,{label:"Secured",value:le,icon:us,accent:"amber",sub:G>0?`${Math.round(le/G*100)}% of routes`:void 0})]}),r&&s.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[s.jsx(yr,{title:"Project",icon:_p,children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)]",children:s.jsx(Jd,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[13.5px] font-medium text-[var(--text-primary)]",children:r.project.name}),s.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:r.project.framework??r.project.language??"Unknown framework"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[s.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)]",children:"Environments"}),s.jsxs("button",{type:"button",onClick:()=>z(!0),className:"flex items-center gap-1 rounded-lg px-2 py-1 text-[10px] font-medium text-blue-400 transition-colors hover:bg-blue-500/10 hover:cursor-pointer",style:{border:"1px solid var(--border)"},children:[s.jsx(Dt,{className:"h-3 w-3",strokeWidth:2})," Add"]})]}),(r.environments?.length??0)===0?s.jsx("p",{className:"text-[12px] italic",style:{color:"var(--text-faint)"},children:"No environments configured"}):s.jsx("div",{className:"space-y-1",children:r.environments.map(_=>{const q=E===_.name,S=R===_.name,D=V===_.name;return s.jsxs("div",{className:`group flex items-center gap-2.5 rounded-lg border px-3 py-2 transition-all ${q?"border-blue-500/30 bg-blue-500/[0.05]":"border-[var(--border)] bg-[var(--bg-overlay-md)]"}`,children:[s.jsx("button",{type:"button",title:q?"Default environment":"Set as default",onClick:async()=>{if(!q){Y(_.name);try{await fetch(`/api/model/environments/${encodeURIComponent(_.name)}/default`,{method:"PUT"}),C(_.name),i(M=>M&&{...M,defaultEnvironment:_.name})}finally{Y(null)}}},className:"shrink-0 flex h-4 w-4 items-center justify-center rounded-full border-2 transition-colors hover:cursor-pointer",style:{borderColor:q?"#60a5fa":"var(--border)",backgroundColor:q?"#60a5fa22":"transparent"},children:S?s.jsx(Fe,{className:"h-2.5 w-2.5 text-blue-400 animate-spin",strokeWidth:3}):q&&s.jsx(vt,{className:"h-2.5 w-2.5 text-blue-400",strokeWidth:3})}),s.jsx(ps,{className:"h-[14px] w-[14px] text-[var(--text-faint)] shrink-0",strokeWidth:2}),s.jsx("span",{className:`text-[11px] w-16 shrink-0 font-medium ${q?"text-blue-400":"text-[var(--text-muted)]"}`,children:_.name}),s.jsx("span",{className:"font-mono text-[11px] text-[var(--text-secondary)] truncate flex-1",children:_.baseUrl}),q&&s.jsx("span",{className:"shrink-0 rounded-full bg-blue-500/10 px-1.5 py-0.5 text-[9px] font-semibold text-blue-400 border border-blue-500/20",children:"default"}),s.jsx("button",{type:"button",disabled:D,onClick:async()=>{U(_.name);try{await fetch(`/api/model/environments/${encodeURIComponent(_.name)}`,{method:"DELETE"}),i(M=>M&&{...M,environments:M.environments?.filter(A=>A.name!==_.name)}),E===_.name&&C(null)}finally{U(null)}},className:"ml-1 flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border border-transparent text-[var(--text-faint)] opacity-0 group-hover:opacity-100 transition-all hover:cursor-pointer hover:border-red-500/30 hover:bg-red-500/10 hover:text-red-400",children:D?s.jsx(Fe,{className:"h-3 w-3 animate-spin",strokeWidth:2}):s.jsx(dn,{className:"h-3 w-3",strokeWidth:2})})]},_.name)})})]}),s.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[s.jsxs("button",{type:"button",onClick:()=>n?.("model"),className:"flex items-center gap-1.5 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)] px-3 py-1.5 text-[12px] text-[var(--text-secondary)] hover:bg-blue-500 hover:text-white hover:border-blue-400 transition-colors hover:cursor-pointer",children:[s.jsx(wp,{className:"h-[15px] w-[15px]",strokeWidth:2})," View Model"]}),s.jsxs("button",{type:"button",onClick:()=>n?.("simulations"),className:"flex items-center gap-1.5 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)] px-3 py-1.5 text-[12px] text-[var(--text-secondary)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-primary)] transition-colors hover:cursor-pointer",children:[s.jsx($b,{className:"h-[15px] w-[15px]",strokeWidth:2})," Simulations"]})]})]})}),s.jsx(yr,{title:"Method Distribution",icon:Br,children:Object.keys(J).length===0?s.jsx(oo,{msg:"No endpoints scanned yet"}):s.jsx("div",{className:"space-y-3",children:Object.entries(J).sort(([,_],[,q])=>q-_).map(([_,q])=>{const S=Cd(_),D=Math.round(q/G*100);return s.jsxs("div",{children:[s.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[s.jsx("span",{className:`text-[12px] font-medium ${S.text}`,children:_}),s.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[q," ",s.jsxs("span",{className:"text-[var(--text-faint)]",children:["(",D,"%)"]})]})]}),s.jsx("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-[var(--bg-overlay-md)]",children:s.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${D}%`,background:S.dot}})})]},_)})})})]}),s.jsx(yr,{title:"Endpoints",icon:c0,noPad:!0,action:s.jsxs("button",{type:"button",onClick:()=>n?.("model"),className:"flex items-center gap-1 text-[11px] text-blue-400 hover:text-blue-300 transition-colors hover:cursor-pointer",children:["View all ",s.jsx(rs,{className:"h-3.5 w-3.5",strokeWidth:2})]}),children:ee.length===0?s.jsx(oo,{msg:"No endpoints — scan your project first"}):s.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[ee.map(_=>{const q=Cd(_.method);return s.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 hover:bg-[var(--bg-overlay-md)] transition-colors",children:[s.jsx("div",{className:"h-1.5 w-1.5 shrink-0 rounded-full",style:{background:q.dot}}),s.jsx(Q1,{method:_.method}),s.jsx("span",{className:"flex-1 truncate font-mono text-[12px] text-[var(--text-secondary)]",children:_.path}),_.handlerName&&s.jsx("span",{className:"hidden sm:block truncate text-[11px] text-[var(--text-faint)] max-w-[140px]",children:_.handlerName}),(_.security?.length??0)>0&&s.jsx(us,{className:"h-[15px] w-[15px] text-amber-500/60 shrink-0",strokeWidth:2})]},_.id)}),G>8&&s.jsxs("div",{className:"px-4 py-2.5 text-[11px] text-[var(--text-faint)]",children:["+",G-8," more endpoints"]})]})}),s.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[s.jsx(yr,{title:"Workflows",icon:kd,noPad:!0,action:s.jsxs("button",{type:"button",onClick:()=>n?.("simulations"),className:"flex items-center gap-1 text-[11px] text-blue-400 hover:text-blue-300 transition-colors hover:cursor-pointer",children:["View all ",s.jsx(rs,{className:"h-3.5 w-3.5",strokeWidth:2})]}),children:F.length===0?s.jsx(oo,{msg:"No workflows found"}):s.jsx("div",{className:"divide-y divide-[var(--border)]",children:F.map((_,q)=>s.jsxs("button",{type:"button",onClick:()=>n?.("simulations"),className:"group flex w-full items-center gap-3 px-4 py-2.5 hover:bg-[var(--bg-overlay-md)] text-left transition-colors hover:cursor-pointer",children:[s.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)]",children:s.jsx(Pn,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"truncate text-[13px] text-[var(--text-primary)]",children:_.name}),s.jsxs("p",{className:"text-[11px] text-[var(--text-faint)]",children:[_.steps.length," steps"]})]}),s.jsx(ms,{className:"h-[15px] w-[15px] shrink-0 text-[var(--text-faint)] opacity-0 group-hover:opacity-100 transition-opacity",strokeWidth:2})]},q))})}),s.jsx(yr,{title:"Runtime Memory",icon:Eo,noPad:!0,action:s.jsxs("button",{type:"button",onClick:()=>n?.("memory"),className:"flex items-center gap-1 text-[11px] text-blue-400 hover:text-blue-300 transition-colors hover:cursor-pointer",children:["Inspect ",s.jsx(rs,{className:"h-3.5 w-3.5",strokeWidth:2})]}),children:te.length===0?s.jsx(oo,{msg:"No memory entries"}):s.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[te.map((_,q)=>s.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 hover:bg-[var(--bg-overlay-md)] transition-colors",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500/50 shrink-0"}),s.jsx("span",{className:"font-mono text-[11px] text-[var(--text-secondary)] flex-1 truncate",children:_.key}),s.jsx("span",{className:"text-[11px] text-[var(--text-faint)] truncate max-w-[100px]",children:typeof _.value=="object"?JSON.stringify(_.value):String(_.value)})]},q)),f.length>6&&s.jsxs("p",{className:"px-4 py-2.5 text-[11px] text-[var(--text-faint)]",children:["+",f.length-6," more entries"]})]})})]}),s.jsxs("div",{className:"flex items-center gap-2 border-t border-[var(--border)] pt-3 text-[11px] text-[var(--text-faint)]",children:[s.jsx(qr,{className:"h-[15px] w-[15px]",strokeWidth:2}),r?`Model generated ${new Date(r.generatedAt).toLocaleString()}`:"No model generated yet"]})]})]}),k&&s.jsx(W1,{onClose:()=>z(!1),onSave:async(_,q)=>{const S=await fetch("/api/model/environments",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:_,baseUrl:q})});if(!S.ok){const M=await S.json().catch(()=>({}));throw new Error(M.error??"Failed")}const D=await S.json();i(M=>M&&{...M,environments:D.environments}),D.defaultEnvironment&&C(D.defaultEnvironment)}})]})}const K1="jetic-traces",J1=1,Tn="traces";function Bo(){return new Promise((n,r)=>{const i=indexedDB.open(K1,J1);i.onupgradeneeded=()=>{const o=i.result;if(!o.objectStoreNames.contains(Tn)){const u=o.createObjectStore(Tn,{keyPath:"id"});u.createIndex("workflowFile","workflowFile",{unique:!1}),u.createIndex("startedAt","startedAt",{unique:!1})}},i.onsuccess=()=>n(i.result),i.onerror=()=>r(i.error)})}async function F1(n){const r=await Bo();return new Promise((i,o)=>{const f=r.transaction(Tn,"readwrite").objectStore(Tn).put(n);f.onsuccess=()=>i(n.id),f.onerror=()=>o(f.error)})}async function I1(){const n=await Bo();return new Promise((r,i)=>{const u=n.transaction(Tn,"readonly").objectStore(Tn).getAll();u.onsuccess=()=>{const f=u.result??[];r(f.sort((h,p)=>new Date(p.startedAt).getTime()-new Date(h.startedAt).getTime()))},u.onerror=()=>i(u.error)})}async function P1(n){const r=await Bo();return new Promise((i,o)=>{const f=r.transaction(Tn,"readwrite").objectStore(Tn).delete(n);f.onsuccess=()=>i(),f.onerror=()=>o(f.error)})}async function e2(){const n=await Bo();return new Promise((r,i)=>{const u=n.transaction(Tn,"readwrite").objectStore(Tn).clear();u.onsuccess=()=>r(),u.onerror=()=>i(u.error)})}function bt(n){if(typeof n=="string"||typeof n=="number")return""+n;let r="";if(Array.isArray(n))for(let i=0,o;i<n.length;i++)(o=bt(n[i]))!==""&&(r+=(r&&" ")+o);else for(let i in n)n[i]&&(r+=(r&&" ")+i);return r}var rd={exports:{}},id={},od={exports:{}},cd={};/**
|
|
345
|
+
* @license React
|
|
346
|
+
* use-sync-external-store-shim.production.js
|
|
347
|
+
*
|
|
348
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
349
|
+
*
|
|
350
|
+
* This source code is licensed under the MIT license found in the
|
|
351
|
+
* LICENSE file in the root directory of this source tree.
|
|
352
|
+
*/var f0;function t2(){if(f0)return cd;f0=1;var n=Ur();function r(v,b){return v===b&&(v!==0||1/v===1/b)||v!==v&&b!==b}var i=typeof Object.is=="function"?Object.is:r,o=n.useState,u=n.useEffect,f=n.useLayoutEffect,h=n.useDebugValue;function p(v,b){var E=b(),C=o({inst:{value:E,getSnapshot:b}}),k=C[0].inst,z=C[1];return f(function(){k.value=E,k.getSnapshot=b,m(k)&&z({inst:k})},[v,E,b]),u(function(){return m(k)&&z({inst:k}),v(function(){m(k)&&z({inst:k})})},[v]),h(E),E}function m(v){var b=v.getSnapshot;v=v.value;try{var E=b();return!i(v,E)}catch{return!0}}function x(v,b){return b()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?x:p;return cd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:g,cd}var h0;function n2(){return h0||(h0=1,od.exports=t2()),od.exports}/**
|
|
353
|
+
* @license React
|
|
354
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
355
|
+
*
|
|
356
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the MIT license found in the
|
|
359
|
+
* LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/var x0;function a2(){if(x0)return id;x0=1;var n=Ur(),r=n2();function i(x,g){return x===g&&(x!==0||1/x===1/g)||x!==x&&g!==g}var o=typeof Object.is=="function"?Object.is:i,u=r.useSyncExternalStore,f=n.useRef,h=n.useEffect,p=n.useMemo,m=n.useDebugValue;return id.useSyncExternalStoreWithSelector=function(x,g,v,b,E){var C=f(null);if(C.current===null){var k={hasValue:!1,value:null};C.current=k}else k=C.current;C=p(function(){function R(G){if(!Y){if(Y=!0,V=G,G=b(G),E!==void 0&&k.hasValue){var re=k.value;if(E(re,G))return U=re}return U=G}if(re=U,o(V,G))return re;var ce=b(G);return E!==void 0&&E(re,ce)?(V=G,re):(V=G,U=ce)}var Y=!1,V,U,B=v===void 0?null:v;return[function(){return R(g())},B===null?void 0:function(){return R(B())}]},[g,v,b,E]);var z=u(x,C[0],C[1]);return h(function(){k.hasValue=!0,k.value=z},[z]),m(z),z},id}var m0;function l2(){return m0||(m0=1,rd.exports=a2()),rd.exports}var s2=l2();const r2=mp(s2),i2={},p0=n=>{let r;const i=new Set,o=(g,v)=>{const b=typeof g=="function"?g(r):g;if(!Object.is(b,r)){const E=r;r=v??(typeof b!="object"||b===null)?b:Object.assign({},r,b),i.forEach(C=>C(r,E))}},u=()=>r,m={setState:o,getState:u,getInitialState:()=>x,subscribe:g=>(i.add(g),()=>i.delete(g)),destroy:()=>{(i2?"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."),i.clear()}},x=r=n(o,u,m);return m},o2=n=>n?p0(n):p0,{useDebugValue:c2}=se,{useSyncExternalStoreWithSelector:u2}=r2,d2=n=>n;function Tp(n,r=d2,i){const o=u2(n.subscribe,n.getState,n.getServerState||n.getInitialState,r,i);return c2(o),o}const g0=(n,r)=>{const i=o2(n),o=(u,f=r)=>Tp(i,u,f);return Object.assign(o,i),o},f2=(n,r)=>n?g0(n,r):g0;function mt(n,r){if(Object.is(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;if(n instanceof Map&&r instanceof Map){if(n.size!==r.size)return!1;for(const[o,u]of n)if(!Object.is(u,r.get(o)))return!1;return!0}if(n instanceof Set&&r instanceof Set){if(n.size!==r.size)return!1;for(const o of n)if(!r.has(o))return!1;return!0}const i=Object.keys(n);if(i.length!==Object.keys(r).length)return!1;for(const o of i)if(!Object.prototype.hasOwnProperty.call(r,o)||!Object.is(n[o],r[o]))return!1;return!0}var h2={value:()=>{}};function qo(){for(var n=0,r=arguments.length,i={},o;n<r;++n){if(!(o=arguments[n]+"")||o in i||/[\s.]/.test(o))throw new Error("illegal type: "+o);i[o]=[]}return new No(i)}function No(n){this._=n}function x2(n,r){return n.trim().split(/^|\s+/).map(function(i){var o="",u=i.indexOf(".");if(u>=0&&(o=i.slice(u+1),i=i.slice(0,u)),i&&!r.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:o}})}No.prototype=qo.prototype={constructor:No,on:function(n,r){var i=this._,o=x2(n+"",i),u,f=-1,h=o.length;if(arguments.length<2){for(;++f<h;)if((u=(n=o[f]).type)&&(u=m2(i[u],n.name)))return u;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++f<h;)if(u=(n=o[f]).type)i[u]=y0(i[u],n.name,r);else if(r==null)for(u in i)i[u]=y0(i[u],n.name,null);return this},copy:function(){var n={},r=this._;for(var i in r)n[i]=r[i].slice();return new No(n)},call:function(n,r){if((u=arguments.length-2)>0)for(var i=new Array(u),o=0,u,f;o<u;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(f=this._[n],o=0,u=f.length;o<u;++o)f[o].value.apply(r,i)},apply:function(n,r,i){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var o=this._[n],u=0,f=o.length;u<f;++u)o[u].value.apply(r,i)}};function m2(n,r){for(var i=0,o=n.length,u;i<o;++i)if((u=n[i]).name===r)return u.value}function y0(n,r,i){for(var o=0,u=n.length;o<u;++o)if(n[o].name===r){n[o]=h2,n=n.slice(0,o).concat(n.slice(o+1));break}return i!=null&&n.push({name:r,value:i}),n}var Td="http://www.w3.org/1999/xhtml";const v0={svg:"http://www.w3.org/2000/svg",xhtml:Td,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $o(n){var r=n+="",i=r.indexOf(":");return i>=0&&(r=n.slice(0,i))!=="xmlns"&&(n=n.slice(i+1)),v0.hasOwnProperty(r)?{space:v0[r],local:n}:n}function p2(n){return function(){var r=this.ownerDocument,i=this.namespaceURI;return i===Td&&r.documentElement.namespaceURI===Td?r.createElement(n):r.createElementNS(i,n)}}function g2(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function Mp(n){var r=$o(n);return(r.local?g2:p2)(r)}function y2(){}function Fd(n){return n==null?y2:function(){return this.querySelector(n)}}function v2(n){typeof n!="function"&&(n=Fd(n));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var f=r[u],h=f.length,p=o[u]=new Array(h),m,x,g=0;g<h;++g)(m=f[g])&&(x=n.call(m,m.__data__,g,f))&&("__data__"in m&&(x.__data__=m.__data__),p[g]=x);return new Qt(o,this._parents)}function b2(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function N2(){return[]}function Ap(n){return n==null?N2:function(){return this.querySelectorAll(n)}}function j2(n){return function(){return b2(n.apply(this,arguments))}}function w2(n){typeof n=="function"?n=j2(n):n=Ap(n);for(var r=this._groups,i=r.length,o=[],u=[],f=0;f<i;++f)for(var h=r[f],p=h.length,m,x=0;x<p;++x)(m=h[x])&&(o.push(n.call(m,m.__data__,x,h)),u.push(m));return new Qt(o,u)}function zp(n){return function(){return this.matches(n)}}function Rp(n){return function(r){return r.matches(n)}}var S2=Array.prototype.find;function E2(n){return function(){return S2.call(this.children,n)}}function _2(){return this.firstElementChild}function k2(n){return this.select(n==null?_2:E2(typeof n=="function"?n:Rp(n)))}var C2=Array.prototype.filter;function T2(){return Array.from(this.children)}function M2(n){return function(){return C2.call(this.children,n)}}function A2(n){return this.selectAll(n==null?T2:M2(typeof n=="function"?n:Rp(n)))}function z2(n){typeof n!="function"&&(n=zp(n));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var f=r[u],h=f.length,p=o[u]=[],m,x=0;x<h;++x)(m=f[x])&&n.call(m,m.__data__,x,f)&&p.push(m);return new Qt(o,this._parents)}function Dp(n){return new Array(n.length)}function R2(){return new Qt(this._enter||this._groups.map(Dp),this._parents)}function ko(n,r){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=r}ko.prototype={constructor:ko,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,r){return this._parent.insertBefore(n,r)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function D2(n){return function(){return n}}function O2(n,r,i,o,u,f){for(var h=0,p,m=r.length,x=f.length;h<x;++h)(p=r[h])?(p.__data__=f[h],o[h]=p):i[h]=new ko(n,f[h]);for(;h<m;++h)(p=r[h])&&(u[h]=p)}function H2(n,r,i,o,u,f,h){var p,m,x=new Map,g=r.length,v=f.length,b=new Array(g),E;for(p=0;p<g;++p)(m=r[p])&&(b[p]=E=h.call(m,m.__data__,p,r)+"",x.has(E)?u[p]=m:x.set(E,m));for(p=0;p<v;++p)E=h.call(n,f[p],p,f)+"",(m=x.get(E))?(o[p]=m,m.__data__=f[p],x.delete(E)):i[p]=new ko(n,f[p]);for(p=0;p<g;++p)(m=r[p])&&x.get(b[p])===m&&(u[p]=m)}function U2(n){return n.__data__}function B2(n,r){if(!arguments.length)return Array.from(this,U2);var i=r?H2:O2,o=this._parents,u=this._groups;typeof n!="function"&&(n=D2(n));for(var f=u.length,h=new Array(f),p=new Array(f),m=new Array(f),x=0;x<f;++x){var g=o[x],v=u[x],b=v.length,E=q2(n.call(g,g&&g.__data__,x,o)),C=E.length,k=p[x]=new Array(C),z=h[x]=new Array(C),R=m[x]=new Array(b);i(g,v,k,z,R,E,r);for(var Y=0,V=0,U,B;Y<C;++Y)if(U=k[Y]){for(Y>=V&&(V=Y+1);!(B=z[V])&&++V<C;);U._next=B||null}}return h=new Qt(h,o),h._enter=p,h._exit=m,h}function q2(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function $2(){return new Qt(this._exit||this._groups.map(Dp),this._parents)}function L2(n,r,i){var o=this.enter(),u=this,f=this.exit();return typeof n=="function"?(o=n(o),o&&(o=o.selection())):o=o.append(n+""),r!=null&&(u=r(u),u&&(u=u.selection())),i==null?f.remove():i(f),o&&u?o.merge(u).order():u}function Y2(n){for(var r=n.selection?n.selection():n,i=this._groups,o=r._groups,u=i.length,f=o.length,h=Math.min(u,f),p=new Array(u),m=0;m<h;++m)for(var x=i[m],g=o[m],v=x.length,b=p[m]=new Array(v),E,C=0;C<v;++C)(E=x[C]||g[C])&&(b[C]=E);for(;m<u;++m)p[m]=i[m];return new Qt(p,this._parents)}function V2(){for(var n=this._groups,r=-1,i=n.length;++r<i;)for(var o=n[r],u=o.length-1,f=o[u],h;--u>=0;)(h=o[u])&&(f&&h.compareDocumentPosition(f)^4&&f.parentNode.insertBefore(h,f),f=h);return this}function G2(n){n||(n=X2);function r(v,b){return v&&b?n(v.__data__,b.__data__):!v-!b}for(var i=this._groups,o=i.length,u=new Array(o),f=0;f<o;++f){for(var h=i[f],p=h.length,m=u[f]=new Array(p),x,g=0;g<p;++g)(x=h[g])&&(m[g]=x);m.sort(r)}return new Qt(u,this._parents).order()}function X2(n,r){return n<r?-1:n>r?1:n>=r?0:NaN}function Z2(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function Q2(){return Array.from(this)}function W2(){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var o=n[r],u=0,f=o.length;u<f;++u){var h=o[u];if(h)return h}return null}function K2(){let n=0;for(const r of this)++n;return n}function J2(){return!this.node()}function F2(n){for(var r=this._groups,i=0,o=r.length;i<o;++i)for(var u=r[i],f=0,h=u.length,p;f<h;++f)(p=u[f])&&n.call(p,p.__data__,f,u);return this}function I2(n){return function(){this.removeAttribute(n)}}function P2(n){return function(){this.removeAttributeNS(n.space,n.local)}}function eN(n,r){return function(){this.setAttribute(n,r)}}function tN(n,r){return function(){this.setAttributeNS(n.space,n.local,r)}}function nN(n,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttribute(n):this.setAttribute(n,i)}}function aN(n,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,i)}}function lN(n,r){var i=$o(n);if(arguments.length<2){var o=this.node();return i.local?o.getAttributeNS(i.space,i.local):o.getAttribute(i)}return this.each((r==null?i.local?P2:I2:typeof r=="function"?i.local?aN:nN:i.local?tN:eN)(i,r))}function Op(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function sN(n){return function(){this.style.removeProperty(n)}}function rN(n,r,i){return function(){this.style.setProperty(n,r,i)}}function iN(n,r,i){return function(){var o=r.apply(this,arguments);o==null?this.style.removeProperty(n):this.style.setProperty(n,o,i)}}function oN(n,r,i){return arguments.length>1?this.each((r==null?sN:typeof r=="function"?iN:rN)(n,r,i??"")):ds(this.node(),n)}function ds(n,r){return n.style.getPropertyValue(r)||Op(n).getComputedStyle(n,null).getPropertyValue(r)}function cN(n){return function(){delete this[n]}}function uN(n,r){return function(){this[n]=r}}function dN(n,r){return function(){var i=r.apply(this,arguments);i==null?delete this[n]:this[n]=i}}function fN(n,r){return arguments.length>1?this.each((r==null?cN:typeof r=="function"?dN:uN)(n,r)):this.node()[n]}function Hp(n){return n.trim().split(/^|\s+/)}function Id(n){return n.classList||new Up(n)}function Up(n){this._node=n,this._names=Hp(n.getAttribute("class")||"")}Up.prototype={add:function(n){var r=this._names.indexOf(n);r<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var r=this._names.indexOf(n);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function Bp(n,r){for(var i=Id(n),o=-1,u=r.length;++o<u;)i.add(r[o])}function qp(n,r){for(var i=Id(n),o=-1,u=r.length;++o<u;)i.remove(r[o])}function hN(n){return function(){Bp(this,n)}}function xN(n){return function(){qp(this,n)}}function mN(n,r){return function(){(r.apply(this,arguments)?Bp:qp)(this,n)}}function pN(n,r){var i=Hp(n+"");if(arguments.length<2){for(var o=Id(this.node()),u=-1,f=i.length;++u<f;)if(!o.contains(i[u]))return!1;return!0}return this.each((typeof r=="function"?mN:r?hN:xN)(i,r))}function gN(){this.textContent=""}function yN(n){return function(){this.textContent=n}}function vN(n){return function(){var r=n.apply(this,arguments);this.textContent=r??""}}function bN(n){return arguments.length?this.each(n==null?gN:(typeof n=="function"?vN:yN)(n)):this.node().textContent}function NN(){this.innerHTML=""}function jN(n){return function(){this.innerHTML=n}}function wN(n){return function(){var r=n.apply(this,arguments);this.innerHTML=r??""}}function SN(n){return arguments.length?this.each(n==null?NN:(typeof n=="function"?wN:jN)(n)):this.node().innerHTML}function EN(){this.nextSibling&&this.parentNode.appendChild(this)}function _N(){return this.each(EN)}function kN(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function CN(){return this.each(kN)}function TN(n){var r=typeof n=="function"?n:Mp(n);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function MN(){return null}function AN(n,r){var i=typeof n=="function"?n:Mp(n),o=r==null?MN:typeof r=="function"?r:Fd(r);return this.select(function(){return this.insertBefore(i.apply(this,arguments),o.apply(this,arguments)||null)})}function zN(){var n=this.parentNode;n&&n.removeChild(this)}function RN(){return this.each(zN)}function DN(){var n=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(n,this.nextSibling):n}function ON(){var n=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(n,this.nextSibling):n}function HN(n){return this.select(n?ON:DN)}function UN(n){return arguments.length?this.property("__data__",n):this.node().__data__}function BN(n){return function(r){n.call(this,r,this.__data__)}}function qN(n){return n.trim().split(/^|\s+/).map(function(r){var i="",o=r.indexOf(".");return o>=0&&(i=r.slice(o+1),r=r.slice(0,o)),{type:r,name:i}})}function $N(n){return function(){var r=this.__on;if(r){for(var i=0,o=-1,u=r.length,f;i<u;++i)f=r[i],(!n.type||f.type===n.type)&&f.name===n.name?this.removeEventListener(f.type,f.listener,f.options):r[++o]=f;++o?r.length=o:delete this.__on}}}function LN(n,r,i){return function(){var o=this.__on,u,f=BN(r);if(o){for(var h=0,p=o.length;h<p;++h)if((u=o[h]).type===n.type&&u.name===n.name){this.removeEventListener(u.type,u.listener,u.options),this.addEventListener(u.type,u.listener=f,u.options=i),u.value=r;return}}this.addEventListener(n.type,f,i),u={type:n.type,name:n.name,value:r,listener:f,options:i},o?o.push(u):this.__on=[u]}}function YN(n,r,i){var o=qN(n+""),u,f=o.length,h;if(arguments.length<2){var p=this.node().__on;if(p){for(var m=0,x=p.length,g;m<x;++m)for(u=0,g=p[m];u<f;++u)if((h=o[u]).type===g.type&&h.name===g.name)return g.value}return}for(p=r?LN:$N,u=0;u<f;++u)this.each(p(o[u],r,i));return this}function $p(n,r,i){var o=Op(n),u=o.CustomEvent;typeof u=="function"?u=new u(r,i):(u=o.document.createEvent("Event"),i?(u.initEvent(r,i.bubbles,i.cancelable),u.detail=i.detail):u.initEvent(r,!1,!1)),n.dispatchEvent(u)}function VN(n,r){return function(){return $p(this,n,r)}}function GN(n,r){return function(){return $p(this,n,r.apply(this,arguments))}}function XN(n,r){return this.each((typeof r=="function"?GN:VN)(n,r))}function*ZN(){for(var n=this._groups,r=0,i=n.length;r<i;++r)for(var o=n[r],u=0,f=o.length,h;u<f;++u)(h=o[u])&&(yield h)}var Lp=[null];function Qt(n,r){this._groups=n,this._parents=r}function $r(){return new Qt([[document.documentElement]],Lp)}function QN(){return this}Qt.prototype=$r.prototype={constructor:Qt,select:v2,selectAll:w2,selectChild:k2,selectChildren:A2,filter:z2,data:B2,enter:R2,exit:$2,join:L2,merge:Y2,selection:QN,order:V2,sort:G2,call:Z2,nodes:Q2,node:W2,size:K2,empty:J2,each:F2,attr:lN,style:oN,property:fN,classed:pN,text:bN,html:SN,raise:_N,lower:CN,append:TN,insert:AN,remove:RN,clone:HN,datum:UN,on:YN,dispatch:XN,[Symbol.iterator]:ZN};function cn(n){return typeof n=="string"?new Qt([[document.querySelector(n)]],[document.documentElement]):new Qt([[n]],Lp)}function WN(n){let r;for(;r=n.sourceEvent;)n=r;return n}function yn(n,r){if(n=WN(n),r===void 0&&(r=n.currentTarget),r){var i=r.ownerSVGElement||r;if(i.createSVGPoint){var o=i.createSVGPoint();return o.x=n.clientX,o.y=n.clientY,o=o.matrixTransform(r.getScreenCTM().inverse()),[o.x,o.y]}if(r.getBoundingClientRect){var u=r.getBoundingClientRect();return[n.clientX-u.left-r.clientLeft,n.clientY-u.top-r.clientTop]}}return[n.pageX,n.pageY]}const KN={passive:!1},Tr={capture:!0,passive:!1};function ud(n){n.stopImmediatePropagation()}function is(n){n.preventDefault(),n.stopImmediatePropagation()}function Yp(n){var r=n.document.documentElement,i=cn(n).on("dragstart.drag",is,Tr);"onselectstart"in r?i.on("selectstart.drag",is,Tr):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function Vp(n,r){var i=n.document.documentElement,o=cn(n).on("dragstart.drag",null);r&&(o.on("click.drag",is,Tr),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in i?o.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const co=n=>()=>n;function Md(n,{sourceEvent:r,subject:i,target:o,identifier:u,active:f,x:h,y:p,dx:m,dy:x,dispatch:g}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:u,enumerable:!0,configurable:!0},active:{value:f,enumerable:!0,configurable:!0},x:{value:h,enumerable:!0,configurable:!0},y:{value:p,enumerable:!0,configurable:!0},dx:{value:m,enumerable:!0,configurable:!0},dy:{value:x,enumerable:!0,configurable:!0},_:{value:g}})}Md.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function JN(n){return!n.ctrlKey&&!n.button}function FN(){return this.parentNode}function IN(n,r){return r??{x:n.x,y:n.y}}function PN(){return navigator.maxTouchPoints||"ontouchstart"in this}function ej(){var n=JN,r=FN,i=IN,o=PN,u={},f=qo("start","drag","end"),h=0,p,m,x,g,v=0;function b(U){U.on("mousedown.drag",E).filter(o).on("touchstart.drag",z).on("touchmove.drag",R,KN).on("touchend.drag touchcancel.drag",Y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function E(U,B){if(!(g||!n.call(this,U,B))){var G=V(this,r.call(this,U,B),U,B,"mouse");G&&(cn(U.view).on("mousemove.drag",C,Tr).on("mouseup.drag",k,Tr),Yp(U.view),ud(U),x=!1,p=U.clientX,m=U.clientY,G("start",U))}}function C(U){if(is(U),!x){var B=U.clientX-p,G=U.clientY-m;x=B*B+G*G>v}u.mouse("drag",U)}function k(U){cn(U.view).on("mousemove.drag mouseup.drag",null),Vp(U.view,x),is(U),u.mouse("end",U)}function z(U,B){if(n.call(this,U,B)){var G=U.changedTouches,re=r.call(this,U,B),ce=G.length,le,J;for(le=0;le<ce;++le)(J=V(this,re,U,B,G[le].identifier,G[le]))&&(ud(U),J("start",U,G[le]))}}function R(U){var B=U.changedTouches,G=B.length,re,ce;for(re=0;re<G;++re)(ce=u[B[re].identifier])&&(is(U),ce("drag",U,B[re]))}function Y(U){var B=U.changedTouches,G=B.length,re,ce;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),re=0;re<G;++re)(ce=u[B[re].identifier])&&(ud(U),ce("end",U,B[re]))}function V(U,B,G,re,ce,le){var J=f.copy(),ee=yn(le||G,B),F,te,_;if((_=i.call(U,new Md("beforestart",{sourceEvent:G,target:b,identifier:ce,active:h,x:ee[0],y:ee[1],dx:0,dy:0,dispatch:J}),re))!=null)return F=_.x-ee[0]||0,te=_.y-ee[1]||0,function q(S,D,M){var A=ee,w;switch(S){case"start":u[ce]=q,w=h++;break;case"end":delete u[ce],--h;case"drag":ee=yn(M||D,B),w=h;break}J.call(S,U,new Md(S,{sourceEvent:D,subject:_,target:b,identifier:ce,active:w,x:ee[0]+F,y:ee[1]+te,dx:ee[0]-A[0],dy:ee[1]-A[1],dispatch:J}),re)}}return b.filter=function(U){return arguments.length?(n=typeof U=="function"?U:co(!!U),b):n},b.container=function(U){return arguments.length?(r=typeof U=="function"?U:co(U),b):r},b.subject=function(U){return arguments.length?(i=typeof U=="function"?U:co(U),b):i},b.touchable=function(U){return arguments.length?(o=typeof U=="function"?U:co(!!U),b):o},b.on=function(){var U=f.on.apply(f,arguments);return U===f?b:U},b.clickDistance=function(U){return arguments.length?(v=(U=+U)*U,b):Math.sqrt(v)},b}function Pd(n,r,i){n.prototype=r.prototype=i,i.constructor=n}function Gp(n,r){var i=Object.create(n.prototype);for(var o in r)i[o]=r[o];return i}function Lr(){}var Mr=.7,Co=1/Mr,os="\\s*([+-]?\\d+)\\s*",Ar="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tj=/^#([0-9a-f]{3,8})$/,nj=new RegExp(`^rgb\\(${os},${os},${os}\\)$`),aj=new RegExp(`^rgb\\(${Cn},${Cn},${Cn}\\)$`),lj=new RegExp(`^rgba\\(${os},${os},${os},${Ar}\\)$`),sj=new RegExp(`^rgba\\(${Cn},${Cn},${Cn},${Ar}\\)$`),rj=new RegExp(`^hsl\\(${Ar},${Cn},${Cn}\\)$`),ij=new RegExp(`^hsla\\(${Ar},${Cn},${Cn},${Ar}\\)$`),b0={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};Pd(Lr,zr,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:N0,formatHex:N0,formatHex8:oj,formatHsl:cj,formatRgb:j0,toString:j0});function N0(){return this.rgb().formatHex()}function oj(){return this.rgb().formatHex8()}function cj(){return Xp(this).formatHsl()}function j0(){return this.rgb().formatRgb()}function zr(n){var r,i;return n=(n+"").trim().toLowerCase(),(r=tj.exec(n))?(i=r[1].length,r=parseInt(r[1],16),i===6?w0(r):i===3?new Ot(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):i===8?uo(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):i===4?uo(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=nj.exec(n))?new Ot(r[1],r[2],r[3],1):(r=aj.exec(n))?new Ot(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=lj.exec(n))?uo(r[1],r[2],r[3],r[4]):(r=sj.exec(n))?uo(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=rj.exec(n))?_0(r[1],r[2]/100,r[3]/100,1):(r=ij.exec(n))?_0(r[1],r[2]/100,r[3]/100,r[4]):b0.hasOwnProperty(n)?w0(b0[n]):n==="transparent"?new Ot(NaN,NaN,NaN,0):null}function w0(n){return new Ot(n>>16&255,n>>8&255,n&255,1)}function uo(n,r,i,o){return o<=0&&(n=r=i=NaN),new Ot(n,r,i,o)}function uj(n){return n instanceof Lr||(n=zr(n)),n?(n=n.rgb(),new Ot(n.r,n.g,n.b,n.opacity)):new Ot}function Ad(n,r,i,o){return arguments.length===1?uj(n):new Ot(n,r,i,o??1)}function Ot(n,r,i,o){this.r=+n,this.g=+r,this.b=+i,this.opacity=+o}Pd(Ot,Ad,Gp(Lr,{brighter(n){return n=n==null?Co:Math.pow(Co,n),new Ot(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?Mr:Math.pow(Mr,n),new Ot(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new Ot(cl(this.r),cl(this.g),cl(this.b),To(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:S0,formatHex:S0,formatHex8:dj,formatRgb:E0,toString:E0}));function S0(){return`#${il(this.r)}${il(this.g)}${il(this.b)}`}function dj(){return`#${il(this.r)}${il(this.g)}${il(this.b)}${il((isNaN(this.opacity)?1:this.opacity)*255)}`}function E0(){const n=To(this.opacity);return`${n===1?"rgb(":"rgba("}${cl(this.r)}, ${cl(this.g)}, ${cl(this.b)}${n===1?")":`, ${n})`}`}function To(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function cl(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function il(n){return n=cl(n),(n<16?"0":"")+n.toString(16)}function _0(n,r,i,o){return o<=0?n=r=i=NaN:i<=0||i>=1?n=r=NaN:r<=0&&(n=NaN),new vn(n,r,i,o)}function Xp(n){if(n instanceof vn)return new vn(n.h,n.s,n.l,n.opacity);if(n instanceof Lr||(n=zr(n)),!n)return new vn;if(n instanceof vn)return n;n=n.rgb();var r=n.r/255,i=n.g/255,o=n.b/255,u=Math.min(r,i,o),f=Math.max(r,i,o),h=NaN,p=f-u,m=(f+u)/2;return p?(r===f?h=(i-o)/p+(i<o)*6:i===f?h=(o-r)/p+2:h=(r-i)/p+4,p/=m<.5?f+u:2-f-u,h*=60):p=m>0&&m<1?0:h,new vn(h,p,m,n.opacity)}function fj(n,r,i,o){return arguments.length===1?Xp(n):new vn(n,r,i,o??1)}function vn(n,r,i,o){this.h=+n,this.s=+r,this.l=+i,this.opacity=+o}Pd(vn,fj,Gp(Lr,{brighter(n){return n=n==null?Co:Math.pow(Co,n),new vn(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?Mr:Math.pow(Mr,n),new vn(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,r=isNaN(n)||isNaN(this.s)?0:this.s,i=this.l,o=i+(i<.5?i:1-i)*r,u=2*i-o;return new Ot(dd(n>=240?n-240:n+120,u,o),dd(n,u,o),dd(n<120?n+240:n-120,u,o),this.opacity)},clamp(){return new vn(k0(this.h),fo(this.s),fo(this.l),To(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 n=To(this.opacity);return`${n===1?"hsl(":"hsla("}${k0(this.h)}, ${fo(this.s)*100}%, ${fo(this.l)*100}%${n===1?")":`, ${n})`}`}}));function k0(n){return n=(n||0)%360,n<0?n+360:n}function fo(n){return Math.max(0,Math.min(1,n||0))}function dd(n,r,i){return(n<60?r+(i-r)*n/60:n<180?i:n<240?r+(i-r)*(240-n)/60:r)*255}const Zp=n=>()=>n;function hj(n,r){return function(i){return n+i*r}}function xj(n,r,i){return n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(o){return Math.pow(n+o*r,i)}}function mj(n){return(n=+n)==1?Qp:function(r,i){return i-r?xj(r,i,n):Zp(isNaN(r)?i:r)}}function Qp(n,r){var i=r-n;return i?hj(n,i):Zp(isNaN(n)?r:n)}const C0=(function n(r){var i=mj(r);function o(u,f){var h=i((u=Ad(u)).r,(f=Ad(f)).r),p=i(u.g,f.g),m=i(u.b,f.b),x=Qp(u.opacity,f.opacity);return function(g){return u.r=h(g),u.g=p(g),u.b=m(g),u.opacity=x(g),u+""}}return o.gamma=n,o})(1);function Da(n,r){return n=+n,r=+r,function(i){return n*(1-i)+r*i}}var zd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fd=new RegExp(zd.source,"g");function pj(n){return function(){return n}}function gj(n){return function(r){return n(r)+""}}function yj(n,r){var i=zd.lastIndex=fd.lastIndex=0,o,u,f,h=-1,p=[],m=[];for(n=n+"",r=r+"";(o=zd.exec(n))&&(u=fd.exec(r));)(f=u.index)>i&&(f=r.slice(i,f),p[h]?p[h]+=f:p[++h]=f),(o=o[0])===(u=u[0])?p[h]?p[h]+=u:p[++h]=u:(p[++h]=null,m.push({i:h,x:Da(o,u)})),i=fd.lastIndex;return i<r.length&&(f=r.slice(i),p[h]?p[h]+=f:p[++h]=f),p.length<2?m[0]?gj(m[0].x):pj(r):(r=m.length,function(x){for(var g=0,v;g<r;++g)p[(v=m[g]).i]=v.x(x);return p.join("")})}var T0=180/Math.PI,Rd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Wp(n,r,i,o,u,f){var h,p,m;return(h=Math.sqrt(n*n+r*r))&&(n/=h,r/=h),(m=n*i+r*o)&&(i-=n*m,o-=r*m),(p=Math.sqrt(i*i+o*o))&&(i/=p,o/=p,m/=p),n*o<r*i&&(n=-n,r=-r,m=-m,h=-h),{translateX:u,translateY:f,rotate:Math.atan2(r,n)*T0,skewX:Math.atan(m)*T0,scaleX:h,scaleY:p}}var ho;function vj(n){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return r.isIdentity?Rd:Wp(r.a,r.b,r.c,r.d,r.e,r.f)}function bj(n){return n==null||(ho||(ho=document.createElementNS("http://www.w3.org/2000/svg","g")),ho.setAttribute("transform",n),!(n=ho.transform.baseVal.consolidate()))?Rd:(n=n.matrix,Wp(n.a,n.b,n.c,n.d,n.e,n.f))}function Kp(n,r,i,o){function u(x){return x.length?x.pop()+" ":""}function f(x,g,v,b,E,C){if(x!==v||g!==b){var k=E.push("translate(",null,r,null,i);C.push({i:k-4,x:Da(x,v)},{i:k-2,x:Da(g,b)})}else(v||b)&&E.push("translate("+v+r+b+i)}function h(x,g,v,b){x!==g?(x-g>180?g+=360:g-x>180&&(x+=360),b.push({i:v.push(u(v)+"rotate(",null,o)-2,x:Da(x,g)})):g&&v.push(u(v)+"rotate("+g+o)}function p(x,g,v,b){x!==g?b.push({i:v.push(u(v)+"skewX(",null,o)-2,x:Da(x,g)}):g&&v.push(u(v)+"skewX("+g+o)}function m(x,g,v,b,E,C){if(x!==v||g!==b){var k=E.push(u(E)+"scale(",null,",",null,")");C.push({i:k-4,x:Da(x,v)},{i:k-2,x:Da(g,b)})}else(v!==1||b!==1)&&E.push(u(E)+"scale("+v+","+b+")")}return function(x,g){var v=[],b=[];return x=n(x),g=n(g),f(x.translateX,x.translateY,g.translateX,g.translateY,v,b),h(x.rotate,g.rotate,v,b),p(x.skewX,g.skewX,v,b),m(x.scaleX,x.scaleY,g.scaleX,g.scaleY,v,b),x=g=null,function(E){for(var C=-1,k=b.length,z;++C<k;)v[(z=b[C]).i]=z.x(E);return v.join("")}}}var Nj=Kp(vj,"px, ","px)","deg)"),jj=Kp(bj,", ",")",")"),wj=1e-12;function M0(n){return((n=Math.exp(n))+1/n)/2}function Sj(n){return((n=Math.exp(n))-1/n)/2}function Ej(n){return((n=Math.exp(2*n))-1)/(n+1)}const _j=(function n(r,i,o){function u(f,h){var p=f[0],m=f[1],x=f[2],g=h[0],v=h[1],b=h[2],E=g-p,C=v-m,k=E*E+C*C,z,R;if(k<wj)R=Math.log(b/x)/r,z=function(re){return[p+re*E,m+re*C,x*Math.exp(r*re*R)]};else{var Y=Math.sqrt(k),V=(b*b-x*x+o*k)/(2*x*i*Y),U=(b*b-x*x-o*k)/(2*b*i*Y),B=Math.log(Math.sqrt(V*V+1)-V),G=Math.log(Math.sqrt(U*U+1)-U);R=(G-B)/r,z=function(re){var ce=re*R,le=M0(B),J=x/(i*Y)*(le*Ej(r*ce+B)-Sj(B));return[p+J*E,m+J*C,x*le/M0(r*ce+B)]}}return z.duration=R*1e3*r/Math.SQRT2,z}return u.rho=function(f){var h=Math.max(.001,+f),p=h*h,m=p*p;return n(h,p,m)},u})(Math.SQRT2,2,4);var fs=0,Er=0,vr=0,Jp=1e3,Mo,_r,Ao=0,dl=0,Lo=0,Rr=typeof performance=="object"&&performance.now?performance:Date,Fp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function ef(){return dl||(Fp(kj),dl=Rr.now()+Lo)}function kj(){dl=0}function zo(){this._call=this._time=this._next=null}zo.prototype=Ip.prototype={constructor:zo,restart:function(n,r,i){if(typeof n!="function")throw new TypeError("callback is not a function");i=(i==null?ef():+i)+(r==null?0:+r),!this._next&&_r!==this&&(_r?_r._next=this:Mo=this,_r=this),this._call=n,this._time=i,Dd()},stop:function(){this._call&&(this._call=null,this._time=1/0,Dd())}};function Ip(n,r,i){var o=new zo;return o.restart(n,r,i),o}function Cj(){ef(),++fs;for(var n=Mo,r;n;)(r=dl-n._time)>=0&&n._call.call(void 0,r),n=n._next;--fs}function A0(){dl=(Ao=Rr.now())+Lo,fs=Er=0;try{Cj()}finally{fs=0,Mj(),dl=0}}function Tj(){var n=Rr.now(),r=n-Ao;r>Jp&&(Lo-=r,Ao=n)}function Mj(){for(var n,r=Mo,i,o=1/0;r;)r._call?(o>r._time&&(o=r._time),n=r,r=r._next):(i=r._next,r._next=null,r=n?n._next=i:Mo=i);_r=n,Dd(o)}function Dd(n){if(!fs){Er&&(Er=clearTimeout(Er));var r=n-dl;r>24?(n<1/0&&(Er=setTimeout(A0,n-Rr.now()-Lo)),vr&&(vr=clearInterval(vr))):(vr||(Ao=Rr.now(),vr=setInterval(Tj,Jp)),fs=1,Fp(A0))}}function z0(n,r,i){var o=new zo;return r=r==null?0:+r,o.restart(u=>{o.stop(),n(u+r)},r,i),o}var Aj=qo("start","end","cancel","interrupt"),zj=[],Pp=0,R0=1,Od=2,jo=3,D0=4,Hd=5,wo=6;function Yo(n,r,i,o,u,f){var h=n.__transition;if(!h)n.__transition={};else if(i in h)return;Rj(n,i,{name:r,index:o,group:u,on:Aj,tween:zj,time:f.time,delay:f.delay,duration:f.duration,ease:f.ease,timer:null,state:Pp})}function tf(n,r){var i=bn(n,r);if(i.state>Pp)throw new Error("too late; already scheduled");return i}function Mn(n,r){var i=bn(n,r);if(i.state>jo)throw new Error("too late; already running");return i}function bn(n,r){var i=n.__transition;if(!i||!(i=i[r]))throw new Error("transition not found");return i}function Rj(n,r,i){var o=n.__transition,u;o[r]=i,i.timer=Ip(f,0,i.time);function f(x){i.state=R0,i.timer.restart(h,i.delay,i.time),i.delay<=x&&h(x-i.delay)}function h(x){var g,v,b,E;if(i.state!==R0)return m();for(g in o)if(E=o[g],E.name===i.name){if(E.state===jo)return z0(h);E.state===D0?(E.state=wo,E.timer.stop(),E.on.call("interrupt",n,n.__data__,E.index,E.group),delete o[g]):+g<r&&(E.state=wo,E.timer.stop(),E.on.call("cancel",n,n.__data__,E.index,E.group),delete o[g])}if(z0(function(){i.state===jo&&(i.state=D0,i.timer.restart(p,i.delay,i.time),p(x))}),i.state=Od,i.on.call("start",n,n.__data__,i.index,i.group),i.state===Od){for(i.state=jo,u=new Array(b=i.tween.length),g=0,v=-1;g<b;++g)(E=i.tween[g].value.call(n,n.__data__,i.index,i.group))&&(u[++v]=E);u.length=v+1}}function p(x){for(var g=x<i.duration?i.ease.call(null,x/i.duration):(i.timer.restart(m),i.state=Hd,1),v=-1,b=u.length;++v<b;)u[v].call(n,g);i.state===Hd&&(i.on.call("end",n,n.__data__,i.index,i.group),m())}function m(){i.state=wo,i.timer.stop(),delete o[r];for(var x in o)return;delete n.__transition}}function So(n,r){var i=n.__transition,o,u,f=!0,h;if(i){r=r==null?null:r+"";for(h in i){if((o=i[h]).name!==r){f=!1;continue}u=o.state>Od&&o.state<Hd,o.state=wo,o.timer.stop(),o.on.call(u?"interrupt":"cancel",n,n.__data__,o.index,o.group),delete i[h]}f&&delete n.__transition}}function Dj(n){return this.each(function(){So(this,n)})}function Oj(n,r){var i,o;return function(){var u=Mn(this,n),f=u.tween;if(f!==i){o=i=f;for(var h=0,p=o.length;h<p;++h)if(o[h].name===r){o=o.slice(),o.splice(h,1);break}}u.tween=o}}function Hj(n,r,i){var o,u;if(typeof i!="function")throw new Error;return function(){var f=Mn(this,n),h=f.tween;if(h!==o){u=(o=h).slice();for(var p={name:r,value:i},m=0,x=u.length;m<x;++m)if(u[m].name===r){u[m]=p;break}m===x&&u.push(p)}f.tween=u}}function Uj(n,r){var i=this._id;if(n+="",arguments.length<2){for(var o=bn(this.node(),i).tween,u=0,f=o.length,h;u<f;++u)if((h=o[u]).name===n)return h.value;return null}return this.each((r==null?Oj:Hj)(i,n,r))}function nf(n,r,i){var o=n._id;return n.each(function(){var u=Mn(this,o);(u.value||(u.value={}))[r]=i.apply(this,arguments)}),function(u){return bn(u,o).value[r]}}function eg(n,r){var i;return(typeof r=="number"?Da:r instanceof zr?C0:(i=zr(r))?(r=i,C0):yj)(n,r)}function Bj(n){return function(){this.removeAttribute(n)}}function qj(n){return function(){this.removeAttributeNS(n.space,n.local)}}function $j(n,r,i){var o,u=i+"",f;return function(){var h=this.getAttribute(n);return h===u?null:h===o?f:f=r(o=h,i)}}function Lj(n,r,i){var o,u=i+"",f;return function(){var h=this.getAttributeNS(n.space,n.local);return h===u?null:h===o?f:f=r(o=h,i)}}function Yj(n,r,i){var o,u,f;return function(){var h,p=i(this),m;return p==null?void this.removeAttribute(n):(h=this.getAttribute(n),m=p+"",h===m?null:h===o&&m===u?f:(u=m,f=r(o=h,p)))}}function Vj(n,r,i){var o,u,f;return function(){var h,p=i(this),m;return p==null?void this.removeAttributeNS(n.space,n.local):(h=this.getAttributeNS(n.space,n.local),m=p+"",h===m?null:h===o&&m===u?f:(u=m,f=r(o=h,p)))}}function Gj(n,r){var i=$o(n),o=i==="transform"?jj:eg;return this.attrTween(n,typeof r=="function"?(i.local?Vj:Yj)(i,o,nf(this,"attr."+n,r)):r==null?(i.local?qj:Bj)(i):(i.local?Lj:$j)(i,o,r))}function Xj(n,r){return function(i){this.setAttribute(n,r.call(this,i))}}function Zj(n,r){return function(i){this.setAttributeNS(n.space,n.local,r.call(this,i))}}function Qj(n,r){var i,o;function u(){var f=r.apply(this,arguments);return f!==o&&(i=(o=f)&&Zj(n,f)),i}return u._value=r,u}function Wj(n,r){var i,o;function u(){var f=r.apply(this,arguments);return f!==o&&(i=(o=f)&&Xj(n,f)),i}return u._value=r,u}function Kj(n,r){var i="attr."+n;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(r==null)return this.tween(i,null);if(typeof r!="function")throw new Error;var o=$o(n);return this.tween(i,(o.local?Qj:Wj)(o,r))}function Jj(n,r){return function(){tf(this,n).delay=+r.apply(this,arguments)}}function Fj(n,r){return r=+r,function(){tf(this,n).delay=r}}function Ij(n){var r=this._id;return arguments.length?this.each((typeof n=="function"?Jj:Fj)(r,n)):bn(this.node(),r).delay}function Pj(n,r){return function(){Mn(this,n).duration=+r.apply(this,arguments)}}function e5(n,r){return r=+r,function(){Mn(this,n).duration=r}}function t5(n){var r=this._id;return arguments.length?this.each((typeof n=="function"?Pj:e5)(r,n)):bn(this.node(),r).duration}function n5(n,r){if(typeof r!="function")throw new Error;return function(){Mn(this,n).ease=r}}function a5(n){var r=this._id;return arguments.length?this.each(n5(r,n)):bn(this.node(),r).ease}function l5(n,r){return function(){var i=r.apply(this,arguments);if(typeof i!="function")throw new Error;Mn(this,n).ease=i}}function s5(n){if(typeof n!="function")throw new Error;return this.each(l5(this._id,n))}function r5(n){typeof n!="function"&&(n=zp(n));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var f=r[u],h=f.length,p=o[u]=[],m,x=0;x<h;++x)(m=f[x])&&n.call(m,m.__data__,x,f)&&p.push(m);return new ea(o,this._parents,this._name,this._id)}function i5(n){if(n._id!==this._id)throw new Error;for(var r=this._groups,i=n._groups,o=r.length,u=i.length,f=Math.min(o,u),h=new Array(o),p=0;p<f;++p)for(var m=r[p],x=i[p],g=m.length,v=h[p]=new Array(g),b,E=0;E<g;++E)(b=m[E]||x[E])&&(v[E]=b);for(;p<o;++p)h[p]=r[p];return new ea(h,this._parents,this._name,this._id)}function o5(n){return(n+"").trim().split(/^|\s+/).every(function(r){var i=r.indexOf(".");return i>=0&&(r=r.slice(0,i)),!r||r==="start"})}function c5(n,r,i){var o,u,f=o5(r)?tf:Mn;return function(){var h=f(this,n),p=h.on;p!==o&&(u=(o=p).copy()).on(r,i),h.on=u}}function u5(n,r){var i=this._id;return arguments.length<2?bn(this.node(),i).on.on(n):this.each(c5(i,n,r))}function d5(n){return function(){var r=this.parentNode;for(var i in this.__transition)if(+i!==n)return;r&&r.removeChild(this)}}function f5(){return this.on("end.remove",d5(this._id))}function h5(n){var r=this._name,i=this._id;typeof n!="function"&&(n=Fd(n));for(var o=this._groups,u=o.length,f=new Array(u),h=0;h<u;++h)for(var p=o[h],m=p.length,x=f[h]=new Array(m),g,v,b=0;b<m;++b)(g=p[b])&&(v=n.call(g,g.__data__,b,p))&&("__data__"in g&&(v.__data__=g.__data__),x[b]=v,Yo(x[b],r,i,b,x,bn(g,i)));return new ea(f,this._parents,r,i)}function x5(n){var r=this._name,i=this._id;typeof n!="function"&&(n=Ap(n));for(var o=this._groups,u=o.length,f=[],h=[],p=0;p<u;++p)for(var m=o[p],x=m.length,g,v=0;v<x;++v)if(g=m[v]){for(var b=n.call(g,g.__data__,v,m),E,C=bn(g,i),k=0,z=b.length;k<z;++k)(E=b[k])&&Yo(E,r,i,k,b,C);f.push(b),h.push(g)}return new ea(f,h,r,i)}var m5=$r.prototype.constructor;function p5(){return new m5(this._groups,this._parents)}function g5(n,r){var i,o,u;return function(){var f=ds(this,n),h=(this.style.removeProperty(n),ds(this,n));return f===h?null:f===i&&h===o?u:u=r(i=f,o=h)}}function tg(n){return function(){this.style.removeProperty(n)}}function y5(n,r,i){var o,u=i+"",f;return function(){var h=ds(this,n);return h===u?null:h===o?f:f=r(o=h,i)}}function v5(n,r,i){var o,u,f;return function(){var h=ds(this,n),p=i(this),m=p+"";return p==null&&(m=p=(this.style.removeProperty(n),ds(this,n))),h===m?null:h===o&&m===u?f:(u=m,f=r(o=h,p))}}function b5(n,r){var i,o,u,f="style."+r,h="end."+f,p;return function(){var m=Mn(this,n),x=m.on,g=m.value[f]==null?p||(p=tg(r)):void 0;(x!==i||u!==g)&&(o=(i=x).copy()).on(h,u=g),m.on=o}}function N5(n,r,i){var o=(n+="")=="transform"?Nj:eg;return r==null?this.styleTween(n,g5(n,o)).on("end.style."+n,tg(n)):typeof r=="function"?this.styleTween(n,v5(n,o,nf(this,"style."+n,r))).each(b5(this._id,n)):this.styleTween(n,y5(n,o,r),i).on("end.style."+n,null)}function j5(n,r,i){return function(o){this.style.setProperty(n,r.call(this,o),i)}}function w5(n,r,i){var o,u;function f(){var h=r.apply(this,arguments);return h!==u&&(o=(u=h)&&j5(n,h,i)),o}return f._value=r,f}function S5(n,r,i){var o="style."+(n+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(r==null)return this.tween(o,null);if(typeof r!="function")throw new Error;return this.tween(o,w5(n,r,i??""))}function E5(n){return function(){this.textContent=n}}function _5(n){return function(){var r=n(this);this.textContent=r??""}}function k5(n){return this.tween("text",typeof n=="function"?_5(nf(this,"text",n)):E5(n==null?"":n+""))}function C5(n){return function(r){this.textContent=n.call(this,r)}}function T5(n){var r,i;function o(){var u=n.apply(this,arguments);return u!==i&&(r=(i=u)&&C5(u)),r}return o._value=n,o}function M5(n){var r="text";if(arguments.length<1)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;return this.tween(r,T5(n))}function A5(){for(var n=this._name,r=this._id,i=ng(),o=this._groups,u=o.length,f=0;f<u;++f)for(var h=o[f],p=h.length,m,x=0;x<p;++x)if(m=h[x]){var g=bn(m,r);Yo(m,n,i,x,h,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new ea(o,this._parents,n,i)}function z5(){var n,r,i=this,o=i._id,u=i.size();return new Promise(function(f,h){var p={value:h},m={value:function(){--u===0&&f()}};i.each(function(){var x=Mn(this,o),g=x.on;g!==n&&(r=(n=g).copy(),r._.cancel.push(p),r._.interrupt.push(p),r._.end.push(m)),x.on=r}),u===0&&f()})}var R5=0;function ea(n,r,i,o){this._groups=n,this._parents=r,this._name=i,this._id=o}function ng(){return++R5}var Kn=$r.prototype;ea.prototype={constructor:ea,select:h5,selectAll:x5,selectChild:Kn.selectChild,selectChildren:Kn.selectChildren,filter:r5,merge:i5,selection:p5,transition:A5,call:Kn.call,nodes:Kn.nodes,node:Kn.node,size:Kn.size,empty:Kn.empty,each:Kn.each,on:u5,attr:Gj,attrTween:Kj,style:N5,styleTween:S5,text:k5,textTween:M5,remove:f5,tween:Uj,delay:Ij,duration:t5,ease:a5,easeVarying:s5,end:z5,[Symbol.iterator]:Kn[Symbol.iterator]};function D5(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var O5={time:null,delay:0,duration:250,ease:D5};function H5(n,r){for(var i;!(i=n.__transition)||!(i=i[r]);)if(!(n=n.parentNode))throw new Error(`transition ${r} not found`);return i}function U5(n){var r,i;n instanceof ea?(r=n._id,n=n._name):(r=ng(),(i=O5).time=ef(),n=n==null?null:n+"");for(var o=this._groups,u=o.length,f=0;f<u;++f)for(var h=o[f],p=h.length,m,x=0;x<p;++x)(m=h[x])&&Yo(m,n,r,x,h,i||H5(m,r));return new ea(o,this._parents,n,r)}$r.prototype.interrupt=Dj;$r.prototype.transition=U5;const xo=n=>()=>n;function B5(n,{sourceEvent:r,target:i,transform:o,dispatch:u}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:u}})}function Fn(n,r,i){this.k=n,this.x=r,this.y=i}Fn.prototype={constructor:Fn,scale:function(n){return n===1?this:new Fn(this.k*n,this.x,this.y)},translate:function(n,r){return n===0&r===0?this:new Fn(this.k,this.x+this.k*n,this.y+this.k*r)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var In=new Fn(1,0,0);Fn.prototype;function hd(n){n.stopImmediatePropagation()}function br(n){n.preventDefault(),n.stopImmediatePropagation()}function q5(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function $5(){var n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,n.hasAttribute("viewBox")?(n=n.viewBox.baseVal,[[n.x,n.y],[n.x+n.width,n.y+n.height]]):[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]):[[0,0],[n.clientWidth,n.clientHeight]]}function O0(){return this.__zoom||In}function L5(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function Y5(){return navigator.maxTouchPoints||"ontouchstart"in this}function V5(n,r,i){var o=n.invertX(r[0][0])-i[0][0],u=n.invertX(r[1][0])-i[1][0],f=n.invertY(r[0][1])-i[0][1],h=n.invertY(r[1][1])-i[1][1];return n.translate(u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u),h>f?(f+h)/2:Math.min(0,f)||Math.max(0,h))}function ag(){var n=q5,r=$5,i=V5,o=L5,u=Y5,f=[0,1/0],h=[[-1/0,-1/0],[1/0,1/0]],p=250,m=_j,x=qo("start","zoom","end"),g,v,b,E=500,C=150,k=0,z=10;function R(_){_.property("__zoom",O0).on("wheel.zoom",ce,{passive:!1}).on("mousedown.zoom",le).on("dblclick.zoom",J).filter(u).on("touchstart.zoom",ee).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",te).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}R.transform=function(_,q,S,D){var M=_.selection?_.selection():_;M.property("__zoom",O0),_!==M?B(_,q,S,D):M.interrupt().each(function(){G(this,arguments).event(D).start().zoom(null,typeof q=="function"?q.apply(this,arguments):q).end()})},R.scaleBy=function(_,q,S,D){R.scaleTo(_,function(){var M=this.__zoom.k,A=typeof q=="function"?q.apply(this,arguments):q;return M*A},S,D)},R.scaleTo=function(_,q,S,D){R.transform(_,function(){var M=r.apply(this,arguments),A=this.__zoom,w=S==null?U(M):typeof S=="function"?S.apply(this,arguments):S,O=A.invert(w),L=typeof q=="function"?q.apply(this,arguments):q;return i(V(Y(A,L),w,O),M,h)},S,D)},R.translateBy=function(_,q,S,D){R.transform(_,function(){return i(this.__zoom.translate(typeof q=="function"?q.apply(this,arguments):q,typeof S=="function"?S.apply(this,arguments):S),r.apply(this,arguments),h)},null,D)},R.translateTo=function(_,q,S,D,M){R.transform(_,function(){var A=r.apply(this,arguments),w=this.__zoom,O=D==null?U(A):typeof D=="function"?D.apply(this,arguments):D;return i(In.translate(O[0],O[1]).scale(w.k).translate(typeof q=="function"?-q.apply(this,arguments):-q,typeof S=="function"?-S.apply(this,arguments):-S),A,h)},D,M)};function Y(_,q){return q=Math.max(f[0],Math.min(f[1],q)),q===_.k?_:new Fn(q,_.x,_.y)}function V(_,q,S){var D=q[0]-S[0]*_.k,M=q[1]-S[1]*_.k;return D===_.x&&M===_.y?_:new Fn(_.k,D,M)}function U(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function B(_,q,S,D){_.on("start.zoom",function(){G(this,arguments).event(D).start()}).on("interrupt.zoom end.zoom",function(){G(this,arguments).event(D).end()}).tween("zoom",function(){var M=this,A=arguments,w=G(M,A).event(D),O=r.apply(M,A),L=S==null?U(O):typeof S=="function"?S.apply(M,A):S,W=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),ne=M.__zoom,fe=typeof q=="function"?q.apply(M,A):q,ue=m(ne.invert(L).concat(W/ne.k),fe.invert(L).concat(W/fe.k));return function(xe){if(xe===1)xe=fe;else{var X=ue(xe),I=W/X[2];xe=new Fn(I,L[0]-X[0]*I,L[1]-X[1]*I)}w.zoom(null,xe)}})}function G(_,q,S){return!S&&_.__zooming||new re(_,q)}function re(_,q){this.that=_,this.args=q,this.active=0,this.sourceEvent=null,this.extent=r.apply(_,q),this.taps=0}re.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,q){return this.mouse&&_!=="mouse"&&(this.mouse[1]=q.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=q.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=q.invert(this.touch1[0])),this.that.__zoom=q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var q=cn(this.that).datum();x.call(_,this.that,new B5(_,{sourceEvent:this.sourceEvent,target:R,transform:this.that.__zoom,dispatch:x}),q)}};function ce(_,...q){if(!n.apply(this,arguments))return;var S=G(this,q).event(_),D=this.__zoom,M=Math.max(f[0],Math.min(f[1],D.k*Math.pow(2,o.apply(this,arguments)))),A=yn(_);if(S.wheel)(S.mouse[0][0]!==A[0]||S.mouse[0][1]!==A[1])&&(S.mouse[1]=D.invert(S.mouse[0]=A)),clearTimeout(S.wheel);else{if(D.k===M)return;S.mouse=[A,D.invert(A)],So(this),S.start()}br(_),S.wheel=setTimeout(w,C),S.zoom("mouse",i(V(Y(D,M),S.mouse[0],S.mouse[1]),S.extent,h));function w(){S.wheel=null,S.end()}}function le(_,...q){if(b||!n.apply(this,arguments))return;var S=_.currentTarget,D=G(this,q,!0).event(_),M=cn(_.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",W,!0),A=yn(_,S),w=_.clientX,O=_.clientY;Yp(_.view),hd(_),D.mouse=[A,this.__zoom.invert(A)],So(this),D.start();function L(ne){if(br(ne),!D.moved){var fe=ne.clientX-w,ue=ne.clientY-O;D.moved=fe*fe+ue*ue>k}D.event(ne).zoom("mouse",i(V(D.that.__zoom,D.mouse[0]=yn(ne,S),D.mouse[1]),D.extent,h))}function W(ne){M.on("mousemove.zoom mouseup.zoom",null),Vp(ne.view,D.moved),br(ne),D.event(ne).end()}}function J(_,...q){if(n.apply(this,arguments)){var S=this.__zoom,D=yn(_.changedTouches?_.changedTouches[0]:_,this),M=S.invert(D),A=S.k*(_.shiftKey?.5:2),w=i(V(Y(S,A),D,M),r.apply(this,q),h);br(_),p>0?cn(this).transition().duration(p).call(B,w,D,_):cn(this).call(R.transform,w,D,_)}}function ee(_,...q){if(n.apply(this,arguments)){var S=_.touches,D=S.length,M=G(this,q,_.changedTouches.length===D).event(_),A,w,O,L;for(hd(_),w=0;w<D;++w)O=S[w],L=yn(O,this),L=[L,this.__zoom.invert(L),O.identifier],M.touch0?!M.touch1&&M.touch0[2]!==L[2]&&(M.touch1=L,M.taps=0):(M.touch0=L,A=!0,M.taps=1+!!g);g&&(g=clearTimeout(g)),A&&(M.taps<2&&(v=L[0],g=setTimeout(function(){g=null},E)),So(this),M.start())}}function F(_,...q){if(this.__zooming){var S=G(this,q).event(_),D=_.changedTouches,M=D.length,A,w,O,L;for(br(_),A=0;A<M;++A)w=D[A],O=yn(w,this),S.touch0&&S.touch0[2]===w.identifier?S.touch0[0]=O:S.touch1&&S.touch1[2]===w.identifier&&(S.touch1[0]=O);if(w=S.that.__zoom,S.touch1){var W=S.touch0[0],ne=S.touch0[1],fe=S.touch1[0],ue=S.touch1[1],xe=(xe=fe[0]-W[0])*xe+(xe=fe[1]-W[1])*xe,X=(X=ue[0]-ne[0])*X+(X=ue[1]-ne[1])*X;w=Y(w,Math.sqrt(xe/X)),O=[(W[0]+fe[0])/2,(W[1]+fe[1])/2],L=[(ne[0]+ue[0])/2,(ne[1]+ue[1])/2]}else if(S.touch0)O=S.touch0[0],L=S.touch0[1];else return;S.zoom("touch",i(V(w,O,L),S.extent,h))}}function te(_,...q){if(this.__zooming){var S=G(this,q).event(_),D=_.changedTouches,M=D.length,A,w;for(hd(_),b&&clearTimeout(b),b=setTimeout(function(){b=null},E),A=0;A<M;++A)w=D[A],S.touch0&&S.touch0[2]===w.identifier?delete S.touch0:S.touch1&&S.touch1[2]===w.identifier&&delete S.touch1;if(S.touch1&&!S.touch0&&(S.touch0=S.touch1,delete S.touch1),S.touch0)S.touch0[1]=this.__zoom.invert(S.touch0[0]);else if(S.end(),S.taps===2&&(w=yn(w,this),Math.hypot(v[0]-w[0],v[1]-w[1])<z)){var O=cn(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return R.wheelDelta=function(_){return arguments.length?(o=typeof _=="function"?_:xo(+_),R):o},R.filter=function(_){return arguments.length?(n=typeof _=="function"?_:xo(!!_),R):n},R.touchable=function(_){return arguments.length?(u=typeof _=="function"?_:xo(!!_),R):u},R.extent=function(_){return arguments.length?(r=typeof _=="function"?_:xo([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),R):r},R.scaleExtent=function(_){return arguments.length?(f[0]=+_[0],f[1]=+_[1],R):[f[0],f[1]]},R.translateExtent=function(_){return arguments.length?(h[0][0]=+_[0][0],h[1][0]=+_[1][0],h[0][1]=+_[0][1],h[1][1]=+_[1][1],R):[[h[0][0],h[0][1]],[h[1][0],h[1][1]]]},R.constrain=function(_){return arguments.length?(i=_,R):i},R.duration=function(_){return arguments.length?(p=+_,R):p},R.interpolate=function(_){return arguments.length?(m=_,R):m},R.on=function(){var _=x.on.apply(x,arguments);return _===x?R:_},R.clickDistance=function(_){return arguments.length?(k=(_=+_)*_,R):Math.sqrt(k)},R.tapDistance=function(_){return arguments.length?(z=+_,R):z},R}pp();const Vo=N.createContext(null),G5=Vo.Provider,ta={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:n=>`Node type "${n}" 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:n=>`The old edge with id=${n} does not exist.`,error009:n=>`Marker type "${n}" doesn't exist.`,error008:(n,r)=>`Couldn't create edge for ${n?"target":"source"} handle id: "${n?r.targetHandle:r.sourceHandle}", edge id: ${r.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:n=>`Edge type "${n}" not found. Using fallback type "default".`,error012:n=>`Node with id "${n}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},lg=ta.error001();function Ge(n,r){const i=N.useContext(Vo);if(i===null)throw new Error(lg);return Tp(i,n,r)}const ot=()=>{const n=N.useContext(Vo);if(n===null)throw new Error(lg);return N.useMemo(()=>({getState:n.getState,setState:n.setState,subscribe:n.subscribe,destroy:n.destroy}),[n])},X5=n=>n.userSelectionActive?"none":"all";function af({position:n,children:r,className:i,style:o,...u}){const f=Ge(X5),h=`${n}`.split("-");return se.createElement("div",{className:bt(["react-flow__panel",i,...h]),style:{...o,pointerEvents:f},...u},r)}function Z5({proOptions:n,position:r="bottom-right"}){return n?.hideAttribution?null:se.createElement(af,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},se.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const Q5=({x:n,y:r,label:i,labelStyle:o={},labelShowBg:u=!0,labelBgStyle:f={},labelBgPadding:h=[2,4],labelBgBorderRadius:p=2,children:m,className:x,...g})=>{const v=N.useRef(null),[b,E]=N.useState({x:0,y:0,width:0,height:0}),C=bt(["react-flow__edge-textwrapper",x]);return N.useEffect(()=>{if(v.current){const k=v.current.getBBox();E({x:k.x,y:k.y,width:k.width,height:k.height})}},[i]),typeof i>"u"||!i?null:se.createElement("g",{transform:`translate(${n-b.width/2} ${r-b.height/2})`,className:C,visibility:b.width?"visible":"hidden",...g},u&&se.createElement("rect",{width:b.width+2*h[0],x:-h[0],y:-h[1],height:b.height+2*h[1],className:"react-flow__edge-textbg",style:f,rx:p,ry:p}),se.createElement("text",{className:"react-flow__edge-text",y:b.height/2,dy:"0.3em",ref:v,style:o},i),m)};var W5=N.memo(Q5);const lf=n=>({width:n.offsetWidth,height:n.offsetHeight}),hs=(n,r=0,i=1)=>Math.min(Math.max(n,r),i),sf=(n={x:0,y:0},r)=>({x:hs(n.x,r[0][0],r[1][0]),y:hs(n.y,r[0][1],r[1][1])}),H0=(n,r,i)=>n<r?hs(Math.abs(n-r),1,50)/50:n>i?-hs(Math.abs(n-i),1,50)/50:0,sg=(n,r)=>{const i=H0(n.x,35,r.width-35)*20,o=H0(n.y,35,r.height-35)*20;return[i,o]},rg=n=>n.getRootNode?.()||window?.document,ig=(n,r)=>({x:Math.min(n.x,r.x),y:Math.min(n.y,r.y),x2:Math.max(n.x2,r.x2),y2:Math.max(n.y2,r.y2)}),Dr=({x:n,y:r,width:i,height:o})=>({x:n,y:r,x2:n+i,y2:r+o}),og=({x:n,y:r,x2:i,y2:o})=>({x:n,y:r,width:i-n,height:o-r}),U0=n=>({...n.positionAbsolute||{x:0,y:0},width:n.width||0,height:n.height||0}),K5=(n,r)=>og(ig(Dr(n),Dr(r))),Ud=(n,r)=>{const i=Math.max(0,Math.min(n.x+n.width,r.x+r.width)-Math.max(n.x,r.x)),o=Math.max(0,Math.min(n.y+n.height,r.y+r.height)-Math.max(n.y,r.y));return Math.ceil(i*o)},J5=n=>un(n.width)&&un(n.height)&&un(n.x)&&un(n.y),un=n=>!isNaN(n)&&isFinite(n),Je=Symbol.for("internals"),cg=["Enter"," ","Escape"],F5=(n,r)=>{},I5=n=>"nativeEvent"in n;function Bd(n){const i=(I5(n)?n.nativeEvent:n).composedPath?.()?.[0]||n.target;return["INPUT","SELECT","TEXTAREA"].includes(i?.nodeName)||i?.hasAttribute("contenteditable")||!!i?.closest(".nokey")}const ug=n=>"clientX"in n,Ua=(n,r)=>{const i=ug(n),o=i?n.clientX:n.touches?.[0].clientX,u=i?n.clientY:n.touches?.[0].clientY;return{x:o-(r?.left??0),y:u-(r?.top??0)}},Ro=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,Yr=({id:n,path:r,labelX:i,labelY:o,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:x,style:g,markerEnd:v,markerStart:b,interactionWidth:E=20})=>se.createElement(se.Fragment,null,se.createElement("path",{id:n,style:g,d:r,fill:"none",className:"react-flow__edge-path",markerEnd:v,markerStart:b}),E&&se.createElement("path",{d:r,fill:"none",strokeOpacity:0,strokeWidth:E,className:"react-flow__edge-interaction"}),u&&un(i)&&un(o)?se.createElement(W5,{x:i,y:o,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:x}):null);Yr.displayName="BaseEdge";function Nr(n,r,i){return i===void 0?i:o=>{const u=r().edges.find(f=>f.id===n);u&&i(o,{...u})}}function dg({sourceX:n,sourceY:r,targetX:i,targetY:o}){const u=Math.abs(i-n)/2,f=i<n?i+u:i-u,h=Math.abs(o-r)/2,p=o<r?o+h:o-h;return[f,p,u,h]}function fg({sourceX:n,sourceY:r,targetX:i,targetY:o,sourceControlX:u,sourceControlY:f,targetControlX:h,targetControlY:p}){const m=n*.125+u*.375+h*.375+i*.125,x=r*.125+f*.375+p*.375+o*.125,g=Math.abs(m-n),v=Math.abs(x-r);return[m,x,g,v]}var fl;(function(n){n.Strict="strict",n.Loose="loose"})(fl||(fl={}));var ol;(function(n){n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal"})(ol||(ol={}));var Or;(function(n){n.Partial="partial",n.Full="full"})(Or||(Or={}));var Ha;(function(n){n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier"})(Ha||(Ha={}));var Ba;(function(n){n.Arrow="arrow",n.ArrowClosed="arrowclosed"})(Ba||(Ba={}));var ye;(function(n){n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom"})(ye||(ye={}));function B0({pos:n,x1:r,y1:i,x2:o,y2:u}){return n===ye.Left||n===ye.Right?[.5*(r+o),i]:[r,.5*(i+u)]}function hg({sourceX:n,sourceY:r,sourcePosition:i=ye.Bottom,targetX:o,targetY:u,targetPosition:f=ye.Top}){const[h,p]=B0({pos:i,x1:n,y1:r,x2:o,y2:u}),[m,x]=B0({pos:f,x1:o,y1:u,x2:n,y2:r}),[g,v,b,E]=fg({sourceX:n,sourceY:r,targetX:o,targetY:u,sourceControlX:h,sourceControlY:p,targetControlX:m,targetControlY:x});return[`M${n},${r} C${h},${p} ${m},${x} ${o},${u}`,g,v,b,E]}const rf=N.memo(({sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:u=ye.Bottom,targetPosition:f=ye.Top,label:h,labelStyle:p,labelShowBg:m,labelBgStyle:x,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:E,markerStart:C,interactionWidth:k})=>{const[z,R,Y]=hg({sourceX:n,sourceY:r,sourcePosition:u,targetX:i,targetY:o,targetPosition:f});return se.createElement(Yr,{path:z,labelX:R,labelY:Y,label:h,labelStyle:p,labelShowBg:m,labelBgStyle:x,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:E,markerStart:C,interactionWidth:k})});rf.displayName="SimpleBezierEdge";const q0={[ye.Left]:{x:-1,y:0},[ye.Right]:{x:1,y:0},[ye.Top]:{x:0,y:-1},[ye.Bottom]:{x:0,y:1}},P5=({source:n,sourcePosition:r=ye.Bottom,target:i})=>r===ye.Left||r===ye.Right?n.x<i.x?{x:1,y:0}:{x:-1,y:0}:n.y<i.y?{x:0,y:1}:{x:0,y:-1},$0=(n,r)=>Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2));function ew({source:n,sourcePosition:r=ye.Bottom,target:i,targetPosition:o=ye.Top,center:u,offset:f}){const h=q0[r],p=q0[o],m={x:n.x+h.x*f,y:n.y+h.y*f},x={x:i.x+p.x*f,y:i.y+p.y*f},g=P5({source:m,sourcePosition:r,target:x}),v=g.x!==0?"x":"y",b=g[v];let E=[],C,k;const z={x:0,y:0},R={x:0,y:0},[Y,V,U,B]=dg({sourceX:n.x,sourceY:n.y,targetX:i.x,targetY:i.y});if(h[v]*p[v]===-1){C=u.x??Y,k=u.y??V;const re=[{x:C,y:m.y},{x:C,y:x.y}],ce=[{x:m.x,y:k},{x:x.x,y:k}];h[v]===b?E=v==="x"?re:ce:E=v==="x"?ce:re}else{const re=[{x:m.x,y:x.y}],ce=[{x:x.x,y:m.y}];if(v==="x"?E=h.x===b?ce:re:E=h.y===b?re:ce,r===o){const te=Math.abs(n[v]-i[v]);if(te<=f){const _=Math.min(f-1,f-te);h[v]===b?z[v]=(m[v]>n[v]?-1:1)*_:R[v]=(x[v]>i[v]?-1:1)*_}}if(r!==o){const te=v==="x"?"y":"x",_=h[v]===p[te],q=m[te]>x[te],S=m[te]<x[te];(h[v]===1&&(!_&&q||_&&S)||h[v]!==1&&(!_&&S||_&&q))&&(E=v==="x"?re:ce)}const le={x:m.x+z.x,y:m.y+z.y},J={x:x.x+R.x,y:x.y+R.y},ee=Math.max(Math.abs(le.x-E[0].x),Math.abs(J.x-E[0].x)),F=Math.max(Math.abs(le.y-E[0].y),Math.abs(J.y-E[0].y));ee>=F?(C=(le.x+J.x)/2,k=E[0].y):(C=E[0].x,k=(le.y+J.y)/2)}return[[n,{x:m.x+z.x,y:m.y+z.y},...E,{x:x.x+R.x,y:x.y+R.y},i],C,k,U,B]}function tw(n,r,i,o){const u=Math.min($0(n,r)/2,$0(r,i)/2,o),{x:f,y:h}=r;if(n.x===f&&f===i.x||n.y===h&&h===i.y)return`L${f} ${h}`;if(n.y===h){const x=n.x<i.x?-1:1,g=n.y<i.y?1:-1;return`L ${f+u*x},${h}Q ${f},${h} ${f},${h+u*g}`}const p=n.x<i.x?1:-1,m=n.y<i.y?-1:1;return`L ${f},${h+u*m}Q ${f},${h} ${f+u*p},${h}`}function qd({sourceX:n,sourceY:r,sourcePosition:i=ye.Bottom,targetX:o,targetY:u,targetPosition:f=ye.Top,borderRadius:h=5,centerX:p,centerY:m,offset:x=20}){const[g,v,b,E,C]=ew({source:{x:n,y:r},sourcePosition:i,target:{x:o,y:u},targetPosition:f,center:{x:p,y:m},offset:x});return[g.reduce((z,R,Y)=>{let V="";return Y>0&&Y<g.length-1?V=tw(g[Y-1],R,g[Y+1],h):V=`${Y===0?"M":"L"}${R.x} ${R.y}`,z+=V,z},""),v,b,E,C]}const Go=N.memo(({sourceX:n,sourceY:r,targetX:i,targetY:o,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:x,style:g,sourcePosition:v=ye.Bottom,targetPosition:b=ye.Top,markerEnd:E,markerStart:C,pathOptions:k,interactionWidth:z})=>{const[R,Y,V]=qd({sourceX:n,sourceY:r,sourcePosition:v,targetX:i,targetY:o,targetPosition:b,borderRadius:k?.borderRadius,offset:k?.offset});return se.createElement(Yr,{path:R,labelX:Y,labelY:V,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:x,style:g,markerEnd:E,markerStart:C,interactionWidth:z})});Go.displayName="SmoothStepEdge";const of=N.memo(n=>se.createElement(Go,{...n,pathOptions:N.useMemo(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])}));of.displayName="StepEdge";function nw({sourceX:n,sourceY:r,targetX:i,targetY:o}){const[u,f,h,p]=dg({sourceX:n,sourceY:r,targetX:i,targetY:o});return[`M ${n},${r}L ${i},${o}`,u,f,h,p]}const cf=N.memo(({sourceX:n,sourceY:r,targetX:i,targetY:o,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:x,style:g,markerEnd:v,markerStart:b,interactionWidth:E})=>{const[C,k,z]=nw({sourceX:n,sourceY:r,targetX:i,targetY:o});return se.createElement(Yr,{path:C,labelX:k,labelY:z,label:u,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:x,style:g,markerEnd:v,markerStart:b,interactionWidth:E})});cf.displayName="StraightEdge";function mo(n,r){return n>=0?.5*n:r*25*Math.sqrt(-n)}function L0({pos:n,x1:r,y1:i,x2:o,y2:u,c:f}){switch(n){case ye.Left:return[r-mo(r-o,f),i];case ye.Right:return[r+mo(o-r,f),i];case ye.Top:return[r,i-mo(i-u,f)];case ye.Bottom:return[r,i+mo(u-i,f)]}}function xg({sourceX:n,sourceY:r,sourcePosition:i=ye.Bottom,targetX:o,targetY:u,targetPosition:f=ye.Top,curvature:h=.25}){const[p,m]=L0({pos:i,x1:n,y1:r,x2:o,y2:u,c:h}),[x,g]=L0({pos:f,x1:o,y1:u,x2:n,y2:r,c:h}),[v,b,E,C]=fg({sourceX:n,sourceY:r,targetX:o,targetY:u,sourceControlX:p,sourceControlY:m,targetControlX:x,targetControlY:g});return[`M${n},${r} C${p},${m} ${x},${g} ${o},${u}`,v,b,E,C]}const Do=N.memo(({sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:u=ye.Bottom,targetPosition:f=ye.Top,label:h,labelStyle:p,labelShowBg:m,labelBgStyle:x,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:E,markerStart:C,pathOptions:k,interactionWidth:z})=>{const[R,Y,V]=xg({sourceX:n,sourceY:r,sourcePosition:u,targetX:i,targetY:o,targetPosition:f,curvature:k?.curvature});return se.createElement(Yr,{path:R,labelX:Y,labelY:V,label:h,labelStyle:p,labelShowBg:m,labelBgStyle:x,labelBgPadding:g,labelBgBorderRadius:v,style:b,markerEnd:E,markerStart:C,interactionWidth:z})});Do.displayName="BezierEdge";const uf=N.createContext(null),aw=uf.Provider;uf.Consumer;const lw=()=>N.useContext(uf),sw=n=>"id"in n&&"source"in n&&"target"in n,rw=({source:n,sourceHandle:r,target:i,targetHandle:o})=>`reactflow__edge-${n}${r||""}-${i}${o||""}`,$d=(n,r)=>typeof n>"u"?"":typeof n=="string"?n:`${r?`${r}__`:""}${Object.keys(n).sort().map(o=>`${o}=${n[o]}`).join("&")}`,iw=(n,r)=>r.some(i=>i.source===n.source&&i.target===n.target&&(i.sourceHandle===n.sourceHandle||!i.sourceHandle&&!n.sourceHandle)&&(i.targetHandle===n.targetHandle||!i.targetHandle&&!n.targetHandle)),ow=(n,r)=>{if(!n.source||!n.target)return r;let i;return sw(n)?i={...n}:i={...n,id:rw(n)},iw(i,r)?r:r.concat(i)},Ld=({x:n,y:r},[i,o,u],f,[h,p])=>{const m={x:(n-i)/u,y:(r-o)/u};return f?{x:h*Math.round(m.x/h),y:p*Math.round(m.y/p)}:m},mg=({x:n,y:r},[i,o,u])=>({x:n*u+i,y:r*u+o}),ul=(n,r=[0,0])=>{if(!n)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const i=(n.width??0)*r[0],o=(n.height??0)*r[1],u={x:n.position.x-i,y:n.position.y-o};return{...u,positionAbsolute:n.positionAbsolute?{x:n.positionAbsolute.x-i,y:n.positionAbsolute.y-o}:u}},Xo=(n,r=[0,0])=>{if(n.length===0)return{x:0,y:0,width:0,height:0};const i=n.reduce((o,u)=>{const{x:f,y:h}=ul(u,r).positionAbsolute;return ig(o,Dr({x:f,y:h,width:u.width||0,height:u.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return og(i)},pg=(n,r,[i,o,u]=[0,0,1],f=!1,h=!1,p=[0,0])=>{const m={x:(r.x-i)/u,y:(r.y-o)/u,width:r.width/u,height:r.height/u},x=[];return n.forEach(g=>{const{width:v,height:b,selectable:E=!0,hidden:C=!1}=g;if(h&&!E||C)return!1;const{positionAbsolute:k}=ul(g,p),z={x:k.x,y:k.y,width:v||0,height:b||0},R=Ud(m,z),Y=typeof v>"u"||typeof b>"u"||v===null||b===null,V=f&&R>0,U=(v||0)*(b||0);(Y||V||R>=U||g.dragging)&&x.push(g)}),x},gg=(n,r)=>{const i=n.map(o=>o.id);return r.filter(o=>i.includes(o.source)||i.includes(o.target))},yg=(n,r,i,o,u,f=.1)=>{const h=r/(n.width*(1+f)),p=i/(n.height*(1+f)),m=Math.min(h,p),x=hs(m,o,u),g=n.x+n.width/2,v=n.y+n.height/2,b=r/2-g*x,E=i/2-v*x;return{x:b,y:E,zoom:x}},rl=(n,r=0)=>n.transition().duration(r);function Y0(n,r,i,o){return(r[i]||[]).reduce((u,f)=>(`${n.id}-${f.id}-${i}`!==o&&u.push({id:f.id||null,type:i,nodeId:n.id,x:(n.positionAbsolute?.x??0)+f.x+f.width/2,y:(n.positionAbsolute?.y??0)+f.y+f.height/2}),u),[])}function cw(n,r,i,o,u,f){const{x:h,y:p}=Ua(n),x=r.elementsFromPoint(h,p).find(C=>C.classList.contains("react-flow__handle"));if(x){const C=x.getAttribute("data-nodeid");if(C){const k=df(void 0,x),z=x.getAttribute("data-handleid"),R=f({nodeId:C,id:z,type:k});if(R){const Y=u.find(V=>V.nodeId===C&&V.type===k&&V.id===z);return{handle:{id:z,type:k,nodeId:C,x:Y?.x||i.x,y:Y?.y||i.y},validHandleResult:R}}}}let g=[],v=1/0;if(u.forEach(C=>{const k=Math.sqrt((C.x-i.x)**2+(C.y-i.y)**2);if(k<=o){const z=f(C);k<=v&&(k<v?g=[{handle:C,validHandleResult:z}]:k===v&&g.push({handle:C,validHandleResult:z}),v=k)}}),!g.length)return{handle:null,validHandleResult:vg()};if(g.length===1)return g[0];const b=g.some(({validHandleResult:C})=>C.isValid),E=g.some(({handle:C})=>C.type==="target");return g.find(({handle:C,validHandleResult:k})=>E?C.type==="target":b?k.isValid:!0)||g[0]}const uw={source:null,target:null,sourceHandle:null,targetHandle:null},vg=()=>({handleDomNode:null,isValid:!1,connection:uw,endHandle:null});function bg(n,r,i,o,u,f,h){const p=u==="target",m=h.querySelector(`.react-flow__handle[data-id="${n?.nodeId}-${n?.id}-${n?.type}"]`),x={...vg(),handleDomNode:m};if(m){const g=df(void 0,m),v=m.getAttribute("data-nodeid"),b=m.getAttribute("data-handleid"),E=m.classList.contains("connectable"),C=m.classList.contains("connectableend"),k={source:p?v:i,sourceHandle:p?b:o,target:p?i:v,targetHandle:p?o:b};x.connection=k,E&&C&&(r===fl.Strict?p&&g==="source"||!p&&g==="target":v!==i||b!==o)&&(x.endHandle={nodeId:v,handleId:b,type:g},x.isValid=f(k))}return x}function dw({nodes:n,nodeId:r,handleId:i,handleType:o}){return n.reduce((u,f)=>{if(f[Je]){const{handleBounds:h}=f[Je];let p=[],m=[];h&&(p=Y0(f,h,"source",`${r}-${i}-${o}`),m=Y0(f,h,"target",`${r}-${i}-${o}`)),u.push(...p,...m)}return u},[])}function df(n,r){return n||(r?.classList.contains("target")?"target":r?.classList.contains("source")?"source":null)}function xd(n){n?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function fw(n,r){let i=null;return r?i="valid":n&&!r&&(i="invalid"),i}function Ng({event:n,handleId:r,nodeId:i,onConnect:o,isTarget:u,getState:f,setState:h,isValidConnection:p,edgeUpdaterType:m,onReconnectEnd:x}){const g=rg(n.target),{connectionMode:v,domNode:b,autoPanOnConnect:E,connectionRadius:C,onConnectStart:k,panBy:z,getNodes:R,cancelConnection:Y}=f();let V=0,U;const{x:B,y:G}=Ua(n),re=g?.elementFromPoint(B,G),ce=df(m,re),le=b?.getBoundingClientRect();if(!le||!ce)return;let J,ee=Ua(n,le),F=!1,te=null,_=!1,q=null;const S=dw({nodes:R(),nodeId:i,handleId:r,handleType:ce}),D=()=>{if(!E)return;const[w,O]=sg(ee,le);z({x:w,y:O}),V=requestAnimationFrame(D)};h({connectionPosition:ee,connectionStatus:null,connectionNodeId:i,connectionHandleId:r,connectionHandleType:ce,connectionStartHandle:{nodeId:i,handleId:r,type:ce},connectionEndHandle:null}),k?.(n,{nodeId:i,handleId:r,handleType:ce});function M(w){const{transform:O}=f();ee=Ua(w,le);const{handle:L,validHandleResult:W}=cw(w,g,Ld(ee,O,!1,[1,1]),C,S,ne=>bg(ne,v,i,r,u?"target":"source",p,g));if(U=L,F||(D(),F=!0),q=W.handleDomNode,te=W.connection,_=W.isValid,h({connectionPosition:U&&_?mg({x:U.x,y:U.y},O):ee,connectionStatus:fw(!!U,_),connectionEndHandle:W.endHandle}),!U&&!_&&!q)return xd(J);te.source!==te.target&&q&&(xd(J),J=q,q.classList.add("connecting","react-flow__handle-connecting"),q.classList.toggle("valid",_),q.classList.toggle("react-flow__handle-valid",_))}function A(w){(U||q)&&te&&_&&o?.(te),f().onConnectEnd?.(w),m&&x?.(w),xd(J),Y(),cancelAnimationFrame(V),F=!1,_=!1,te=null,q=null,g.removeEventListener("mousemove",M),g.removeEventListener("mouseup",A),g.removeEventListener("touchmove",M),g.removeEventListener("touchend",A)}g.addEventListener("mousemove",M),g.addEventListener("mouseup",A),g.addEventListener("touchmove",M),g.addEventListener("touchend",A)}const V0=()=>!0,hw=n=>({connectionStartHandle:n.connectionStartHandle,connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName}),xw=(n,r,i)=>o=>{const{connectionStartHandle:u,connectionEndHandle:f,connectionClickStartHandle:h}=o;return{connecting:u?.nodeId===n&&u?.handleId===r&&u?.type===i||f?.nodeId===n&&f?.handleId===r&&f?.type===i,clickConnecting:h?.nodeId===n&&h?.handleId===r&&h?.type===i}},jg=N.forwardRef(({type:n="source",position:r=ye.Top,isValidConnection:i,isConnectable:o=!0,isConnectableStart:u=!0,isConnectableEnd:f=!0,id:h,onConnect:p,children:m,className:x,onMouseDown:g,onTouchStart:v,...b},E)=>{const C=h||null,k=n==="target",z=ot(),R=lw(),{connectOnClick:Y,noPanClassName:V}=Ge(hw,mt),{connecting:U,clickConnecting:B}=Ge(xw(R,C,n),mt);R||z.getState().onError?.("010",ta.error010());const G=le=>{const{defaultEdgeOptions:J,onConnect:ee,hasDefaultEdges:F}=z.getState(),te={...J,...le};if(F){const{edges:_,setEdges:q}=z.getState();q(ow(te,_))}ee?.(te),p?.(te)},re=le=>{if(!R)return;const J=ug(le);u&&(J&&le.button===0||!J)&&Ng({event:le,handleId:C,nodeId:R,onConnect:G,isTarget:k,getState:z.getState,setState:z.setState,isValidConnection:i||z.getState().isValidConnection||V0}),J?g?.(le):v?.(le)},ce=le=>{const{onClickConnectStart:J,onClickConnectEnd:ee,connectionClickStartHandle:F,connectionMode:te,isValidConnection:_}=z.getState();if(!R||!F&&!u)return;if(!F){J?.(le,{nodeId:R,handleId:C,handleType:n}),z.setState({connectionClickStartHandle:{nodeId:R,type:n,handleId:C}});return}const q=rg(le.target),S=i||_||V0,{connection:D,isValid:M}=bg({nodeId:R,id:C,type:n},te,F.nodeId,F.handleId||null,F.type,S,q);M&&G(D),ee?.(le),z.setState({connectionClickStartHandle:null})};return se.createElement("div",{"data-handleid":C,"data-nodeid":R,"data-handlepos":r,"data-id":`${R}-${C}-${n}`,className:bt(["react-flow__handle",`react-flow__handle-${r}`,"nodrag",V,x,{source:!k,target:k,connectable:o,connectablestart:u,connectableend:f,connecting:B,connectionindicator:o&&(u&&!U||f&&U)}]),onMouseDown:re,onTouchStart:re,onClick:Y?ce:void 0,ref:E,...b},m)});jg.displayName="Handle";var fn=N.memo(jg);const wg=({data:n,isConnectable:r,targetPosition:i=ye.Top,sourcePosition:o=ye.Bottom})=>se.createElement(se.Fragment,null,se.createElement(fn,{type:"target",position:i,isConnectable:r}),n?.label,se.createElement(fn,{type:"source",position:o,isConnectable:r}));wg.displayName="DefaultNode";var Yd=N.memo(wg);const Sg=({data:n,isConnectable:r,sourcePosition:i=ye.Bottom})=>se.createElement(se.Fragment,null,n?.label,se.createElement(fn,{type:"source",position:i,isConnectable:r}));Sg.displayName="InputNode";var Eg=N.memo(Sg);const _g=({data:n,isConnectable:r,targetPosition:i=ye.Top})=>se.createElement(se.Fragment,null,se.createElement(fn,{type:"target",position:i,isConnectable:r}),n?.label);_g.displayName="OutputNode";var kg=N.memo(_g);const ff=()=>null;ff.displayName="GroupNode";const mw=n=>({selectedNodes:n.getNodes().filter(r=>r.selected),selectedEdges:n.edges.filter(r=>r.selected).map(r=>({...r}))}),po=n=>n.id;function pw(n,r){return mt(n.selectedNodes.map(po),r.selectedNodes.map(po))&&mt(n.selectedEdges.map(po),r.selectedEdges.map(po))}const Cg=N.memo(({onSelectionChange:n})=>{const r=ot(),{selectedNodes:i,selectedEdges:o}=Ge(mw,pw);return N.useEffect(()=>{const u={nodes:i,edges:o};n?.(u),r.getState().onSelectionChange.forEach(f=>f(u))},[i,o,n]),null});Cg.displayName="SelectionListener";const gw=n=>!!n.onSelectionChange;function yw({onSelectionChange:n}){const r=Ge(gw);return n||r?se.createElement(Cg,{onSelectionChange:n}):null}const vw=n=>({setNodes:n.setNodes,setEdges:n.setEdges,setDefaultNodesAndEdges:n.setDefaultNodesAndEdges,setMinZoom:n.setMinZoom,setMaxZoom:n.setMaxZoom,setTranslateExtent:n.setTranslateExtent,setNodeExtent:n.setNodeExtent,reset:n.reset});function Il(n,r){N.useEffect(()=>{typeof n<"u"&&r(n)},[n])}function Me(n,r,i){N.useEffect(()=>{typeof r<"u"&&i({[n]:r})},[r])}const bw=({nodes:n,edges:r,defaultNodes:i,defaultEdges:o,onConnect:u,onConnectStart:f,onConnectEnd:h,onClickConnectStart:p,onClickConnectEnd:m,nodesDraggable:x,nodesConnectable:g,nodesFocusable:v,edgesFocusable:b,edgesUpdatable:E,elevateNodesOnSelect:C,minZoom:k,maxZoom:z,nodeExtent:R,onNodesChange:Y,onEdgesChange:V,elementsSelectable:U,connectionMode:B,snapGrid:G,snapToGrid:re,translateExtent:ce,connectOnClick:le,defaultEdgeOptions:J,fitView:ee,fitViewOptions:F,onNodesDelete:te,onEdgesDelete:_,onNodeDrag:q,onNodeDragStart:S,onNodeDragStop:D,onSelectionDrag:M,onSelectionDragStart:A,onSelectionDragStop:w,noPanClassName:O,nodeOrigin:L,rfId:W,autoPanOnConnect:ne,autoPanOnNodeDrag:fe,onError:ue,connectionRadius:xe,isValidConnection:X,nodeDragThreshold:I})=>{const{setNodes:ae,setEdges:me,setDefaultNodesAndEdges:he,setMinZoom:pe,setMaxZoom:ve,setTranslateExtent:He,setNodeExtent:Ie,reset:ke}=Ge(vw,mt),Ne=ot();return N.useEffect(()=>{const ct=o?.map(Wt=>({...Wt,...J}));return he(i,ct),()=>{ke()}},[]),Me("defaultEdgeOptions",J,Ne.setState),Me("connectionMode",B,Ne.setState),Me("onConnect",u,Ne.setState),Me("onConnectStart",f,Ne.setState),Me("onConnectEnd",h,Ne.setState),Me("onClickConnectStart",p,Ne.setState),Me("onClickConnectEnd",m,Ne.setState),Me("nodesDraggable",x,Ne.setState),Me("nodesConnectable",g,Ne.setState),Me("nodesFocusable",v,Ne.setState),Me("edgesFocusable",b,Ne.setState),Me("edgesUpdatable",E,Ne.setState),Me("elementsSelectable",U,Ne.setState),Me("elevateNodesOnSelect",C,Ne.setState),Me("snapToGrid",re,Ne.setState),Me("snapGrid",G,Ne.setState),Me("onNodesChange",Y,Ne.setState),Me("onEdgesChange",V,Ne.setState),Me("connectOnClick",le,Ne.setState),Me("fitViewOnInit",ee,Ne.setState),Me("fitViewOnInitOptions",F,Ne.setState),Me("onNodesDelete",te,Ne.setState),Me("onEdgesDelete",_,Ne.setState),Me("onNodeDrag",q,Ne.setState),Me("onNodeDragStart",S,Ne.setState),Me("onNodeDragStop",D,Ne.setState),Me("onSelectionDrag",M,Ne.setState),Me("onSelectionDragStart",A,Ne.setState),Me("onSelectionDragStop",w,Ne.setState),Me("noPanClassName",O,Ne.setState),Me("nodeOrigin",L,Ne.setState),Me("rfId",W,Ne.setState),Me("autoPanOnConnect",ne,Ne.setState),Me("autoPanOnNodeDrag",fe,Ne.setState),Me("onError",ue,Ne.setState),Me("connectionRadius",xe,Ne.setState),Me("isValidConnection",X,Ne.setState),Me("nodeDragThreshold",I,Ne.setState),Il(n,ae),Il(r,me),Il(k,pe),Il(z,ve),Il(ce,He),Il(R,Ie),null},G0={display:"none"},Nw={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Tg="react-flow__node-desc",Mg="react-flow__edge-desc",jw="react-flow__aria-live",ww=n=>n.ariaLiveMessage;function Sw({rfId:n}){const r=Ge(ww);return se.createElement("div",{id:`${jw}-${n}`,"aria-live":"assertive","aria-atomic":"true",style:Nw},r)}function Ew({rfId:n,disableKeyboardA11y:r}){return se.createElement(se.Fragment,null,se.createElement("div",{id:`${Tg}-${n}`,style:G0},"Press enter or space to select a node.",!r&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),se.createElement("div",{id:`${Mg}-${n}`,style:G0},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!r&&se.createElement(Sw,{rfId:n}))}var Hr=(n=null,r={actInsideInputWithModifier:!0})=>{const[i,o]=N.useState(!1),u=N.useRef(!1),f=N.useRef(new Set([])),[h,p]=N.useMemo(()=>{if(n!==null){const x=(Array.isArray(n)?n:[n]).filter(v=>typeof v=="string").map(v=>v.split("+")),g=x.reduce((v,b)=>v.concat(...b),[]);return[x,g]}return[[],[]]},[n]);return N.useEffect(()=>{const m=typeof document<"u"?document:null,x=r?.target||m;if(n!==null){const g=E=>{if(u.current=E.ctrlKey||E.metaKey||E.shiftKey,(!u.current||u.current&&!r.actInsideInputWithModifier)&&Bd(E))return!1;const k=Z0(E.code,p);f.current.add(E[k]),X0(h,f.current,!1)&&(E.preventDefault(),o(!0))},v=E=>{if((!u.current||u.current&&!r.actInsideInputWithModifier)&&Bd(E))return!1;const k=Z0(E.code,p);X0(h,f.current,!0)?(o(!1),f.current.clear()):f.current.delete(E[k]),E.key==="Meta"&&f.current.clear(),u.current=!1},b=()=>{f.current.clear(),o(!1)};return x?.addEventListener("keydown",g),x?.addEventListener("keyup",v),window.addEventListener("blur",b),()=>{x?.removeEventListener("keydown",g),x?.removeEventListener("keyup",v),window.removeEventListener("blur",b)}}},[n,o]),i};function X0(n,r,i){return n.filter(o=>i||o.length===r.size).some(o=>o.every(u=>r.has(u)))}function Z0(n,r){return r.includes(n)?"code":"key"}function Ag(n,r,i,o){const u=n.parentNode||n.parentId;if(!u)return i;const f=r.get(u),h=ul(f,o);return Ag(f,r,{x:(i.x??0)+h.x,y:(i.y??0)+h.y,z:(f[Je]?.z??0)>(i.z??0)?f[Je]?.z??0:i.z??0},o)}function zg(n,r,i){n.forEach(o=>{const u=o.parentNode||o.parentId;if(u&&!n.has(u))throw new Error(`Parent node ${u} not found`);if(u||i?.[o.id]){const{x:f,y:h,z:p}=Ag(o,n,{...o.position,z:o[Je]?.z??0},r);o.positionAbsolute={x:f,y:h},o[Je].z=p,i?.[o.id]&&(o[Je].isParent=!0)}})}function md(n,r,i,o){const u=new Map,f={},h=o?1e3:0;return n.forEach(p=>{const m=(un(p.zIndex)?p.zIndex:0)+(p.selected?h:0),x=r.get(p.id),g={...p,positionAbsolute:{x:p.position.x,y:p.position.y}},v=p.parentNode||p.parentId;v&&(f[v]=!0);const b=x?.type&&x?.type!==p.type;Object.defineProperty(g,Je,{enumerable:!1,value:{handleBounds:b?void 0:x?.[Je]?.handleBounds,z:m}}),u.set(p.id,g)}),zg(u,i,f),u}function Rg(n,r={}){const{getNodes:i,width:o,height:u,minZoom:f,maxZoom:h,d3Zoom:p,d3Selection:m,fitViewOnInitDone:x,fitViewOnInit:g,nodeOrigin:v}=n(),b=r.initial&&!x&&g;if(p&&m&&(b||!r.initial)){const C=i().filter(z=>{const R=r.includeHiddenNodes?z.width&&z.height:!z.hidden;return r.nodes?.length?R&&r.nodes.some(Y=>Y.id===z.id):R}),k=C.every(z=>z.width&&z.height);if(C.length>0&&k){const z=Xo(C,v),{x:R,y:Y,zoom:V}=yg(z,o,u,r.minZoom??f,r.maxZoom??h,r.padding??.1),U=In.translate(R,Y).scale(V);return typeof r.duration=="number"&&r.duration>0?p.transform(rl(m,r.duration),U):p.transform(m,U),!0}}return!1}function _w(n,r){return n.forEach(i=>{const o=r.get(i.id);o&&r.set(o.id,{...o,[Je]:o[Je],selected:i.selected})}),new Map(r)}function kw(n,r){return r.map(i=>{const o=n.find(u=>u.id===i.id);return o&&(i.selected=o.selected),i})}function go({changedNodes:n,changedEdges:r,get:i,set:o}){const{nodeInternals:u,edges:f,onNodesChange:h,onEdgesChange:p,hasDefaultNodes:m,hasDefaultEdges:x}=i();n?.length&&(m&&o({nodeInternals:_w(n,u)}),h?.(n)),r?.length&&(x&&o({edges:kw(r,f)}),p?.(r))}const Pl=()=>{},Cw={zoomIn:Pl,zoomOut:Pl,zoomTo:Pl,getZoom:()=>1,setViewport:Pl,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Pl,fitBounds:Pl,project:n=>n,screenToFlowPosition:n=>n,flowToScreenPosition:n=>n,viewportInitialized:!1},Tw=n=>({d3Zoom:n.d3Zoom,d3Selection:n.d3Selection}),Mw=()=>{const n=ot(),{d3Zoom:r,d3Selection:i}=Ge(Tw,mt);return N.useMemo(()=>i&&r?{zoomIn:u=>r.scaleBy(rl(i,u?.duration),1.2),zoomOut:u=>r.scaleBy(rl(i,u?.duration),1/1.2),zoomTo:(u,f)=>r.scaleTo(rl(i,f?.duration),u),getZoom:()=>n.getState().transform[2],setViewport:(u,f)=>{const[h,p,m]=n.getState().transform,x=In.translate(u.x??h,u.y??p).scale(u.zoom??m);r.transform(rl(i,f?.duration),x)},getViewport:()=>{const[u,f,h]=n.getState().transform;return{x:u,y:f,zoom:h}},fitView:u=>Rg(n.getState,u),setCenter:(u,f,h)=>{const{width:p,height:m,maxZoom:x}=n.getState(),g=typeof h?.zoom<"u"?h.zoom:x,v=p/2-u*g,b=m/2-f*g,E=In.translate(v,b).scale(g);r.transform(rl(i,h?.duration),E)},fitBounds:(u,f)=>{const{width:h,height:p,minZoom:m,maxZoom:x}=n.getState(),{x:g,y:v,zoom:b}=yg(u,h,p,m,x,f?.padding??.1),E=In.translate(g,v).scale(b);r.transform(rl(i,f?.duration),E)},project:u=>{const{transform:f,snapToGrid:h,snapGrid:p}=n.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Ld(u,f,h,p)},screenToFlowPosition:u=>{const{transform:f,snapToGrid:h,snapGrid:p,domNode:m}=n.getState();if(!m)return u;const{x,y:g}=m.getBoundingClientRect(),v={x:u.x-x,y:u.y-g};return Ld(v,f,h,p)},flowToScreenPosition:u=>{const{transform:f,domNode:h}=n.getState();if(!h)return u;const{x:p,y:m}=h.getBoundingClientRect(),x=mg(u,f);return{x:x.x+p,y:x.y+m}},viewportInitialized:!0}:Cw,[r,i])};function hf(){const n=Mw(),r=ot(),i=N.useCallback(()=>r.getState().getNodes().map(k=>({...k})),[]),o=N.useCallback(k=>r.getState().nodeInternals.get(k),[]),u=N.useCallback(()=>{const{edges:k=[]}=r.getState();return k.map(z=>({...z}))},[]),f=N.useCallback(k=>{const{edges:z=[]}=r.getState();return z.find(R=>R.id===k)},[]),h=N.useCallback(k=>{const{getNodes:z,setNodes:R,hasDefaultNodes:Y,onNodesChange:V}=r.getState(),U=z(),B=typeof k=="function"?k(U):k;if(Y)R(B);else if(V){const G=B.length===0?U.map(re=>({type:"remove",id:re.id})):B.map(re=>({item:re,type:"reset"}));V(G)}},[]),p=N.useCallback(k=>{const{edges:z=[],setEdges:R,hasDefaultEdges:Y,onEdgesChange:V}=r.getState(),U=typeof k=="function"?k(z):k;if(Y)R(U);else if(V){const B=U.length===0?z.map(G=>({type:"remove",id:G.id})):U.map(G=>({item:G,type:"reset"}));V(B)}},[]),m=N.useCallback(k=>{const z=Array.isArray(k)?k:[k],{getNodes:R,setNodes:Y,hasDefaultNodes:V,onNodesChange:U}=r.getState();if(V){const G=[...R(),...z];Y(G)}else if(U){const B=z.map(G=>({item:G,type:"add"}));U(B)}},[]),x=N.useCallback(k=>{const z=Array.isArray(k)?k:[k],{edges:R=[],setEdges:Y,hasDefaultEdges:V,onEdgesChange:U}=r.getState();if(V)Y([...R,...z]);else if(U){const B=z.map(G=>({item:G,type:"add"}));U(B)}},[]),g=N.useCallback(()=>{const{getNodes:k,edges:z=[],transform:R}=r.getState(),[Y,V,U]=R;return{nodes:k().map(B=>({...B})),edges:z.map(B=>({...B})),viewport:{x:Y,y:V,zoom:U}}},[]),v=N.useCallback(({nodes:k,edges:z})=>{const{nodeInternals:R,getNodes:Y,edges:V,hasDefaultNodes:U,hasDefaultEdges:B,onNodesDelete:G,onEdgesDelete:re,onNodesChange:ce,onEdgesChange:le}=r.getState(),J=(k||[]).map(q=>q.id),ee=(z||[]).map(q=>q.id),F=Y().reduce((q,S)=>{const D=S.parentNode||S.parentId,M=!J.includes(S.id)&&D&&q.find(w=>w.id===D);return(typeof S.deletable=="boolean"?S.deletable:!0)&&(J.includes(S.id)||M)&&q.push(S),q},[]),te=V.filter(q=>typeof q.deletable=="boolean"?q.deletable:!0),_=te.filter(q=>ee.includes(q.id));if(F||_){const q=gg(F,te),S=[..._,...q],D=S.reduce((M,A)=>(M.includes(A.id)||M.push(A.id),M),[]);if((B||U)&&(B&&r.setState({edges:V.filter(M=>!D.includes(M.id))}),U&&(F.forEach(M=>{R.delete(M.id)}),r.setState({nodeInternals:new Map(R)}))),D.length>0&&(re?.(S),le&&le(D.map(M=>({id:M,type:"remove"})))),F.length>0&&(G?.(F),ce)){const M=F.map(A=>({id:A.id,type:"remove"}));ce(M)}}},[]),b=N.useCallback(k=>{const z=J5(k),R=z?null:r.getState().nodeInternals.get(k.id);return!z&&!R?[null,null,z]:[z?k:U0(R),R,z]},[]),E=N.useCallback((k,z=!0,R)=>{const[Y,V,U]=b(k);return Y?(R||r.getState().getNodes()).filter(B=>{if(!U&&(B.id===V.id||!B.positionAbsolute))return!1;const G=U0(B),re=Ud(G,Y);return z&&re>0||re>=Y.width*Y.height}):[]},[]),C=N.useCallback((k,z,R=!0)=>{const[Y]=b(k);if(!Y)return!1;const V=Ud(Y,z);return R&&V>0||V>=Y.width*Y.height},[]);return N.useMemo(()=>({...n,getNodes:i,getNode:o,getEdges:u,getEdge:f,setNodes:h,setEdges:p,addNodes:m,addEdges:x,toObject:g,deleteElements:v,getIntersectingNodes:E,isNodeIntersecting:C}),[n,i,o,u,f,h,p,m,x,g,v,E,C])}const Aw={actInsideInputWithModifier:!1};var zw=({deleteKeyCode:n,multiSelectionKeyCode:r})=>{const i=ot(),{deleteElements:o}=hf(),u=Hr(n,Aw),f=Hr(r);N.useEffect(()=>{if(u){const{edges:h,getNodes:p}=i.getState(),m=p().filter(g=>g.selected),x=h.filter(g=>g.selected);o({nodes:m,edges:x}),i.setState({nodesSelectionActive:!1})}},[u]),N.useEffect(()=>{i.setState({multiSelectionActive:f})},[f])};function Rw(n){const r=ot();N.useEffect(()=>{let i;const o=()=>{if(!n.current)return;const u=lf(n.current);(u.height===0||u.width===0)&&r.getState().onError?.("004",ta.error004()),r.setState({width:u.width||500,height:u.height||500})};return o(),window.addEventListener("resize",o),n.current&&(i=new ResizeObserver(()=>o()),i.observe(n.current)),()=>{window.removeEventListener("resize",o),i&&n.current&&i.unobserve(n.current)}},[])}const xf={position:"absolute",width:"100%",height:"100%",top:0,left:0},Dw=(n,r)=>n.x!==r.x||n.y!==r.y||n.zoom!==r.k,yo=n=>({x:n.x,y:n.y,zoom:n.k}),es=(n,r)=>n.target.closest(`.${r}`),Q0=(n,r)=>r===2&&Array.isArray(n)&&n.includes(2),W0=n=>{const r=n.ctrlKey&&Ro()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*r},Ow=n=>({d3Zoom:n.d3Zoom,d3Selection:n.d3Selection,d3ZoomHandler:n.d3ZoomHandler,userSelectionActive:n.userSelectionActive}),Hw=({onMove:n,onMoveStart:r,onMoveEnd:i,onPaneContextMenu:o,zoomOnScroll:u=!0,zoomOnPinch:f=!0,panOnScroll:h=!1,panOnScrollSpeed:p=.5,panOnScrollMode:m=ol.Free,zoomOnDoubleClick:x=!0,elementsSelectable:g,panOnDrag:v=!0,defaultViewport:b,translateExtent:E,minZoom:C,maxZoom:k,zoomActivationKeyCode:z,preventScrolling:R=!0,children:Y,noWheelClassName:V,noPanClassName:U})=>{const B=N.useRef(),G=ot(),re=N.useRef(!1),ce=N.useRef(!1),le=N.useRef(null),J=N.useRef({x:0,y:0,zoom:0}),{d3Zoom:ee,d3Selection:F,d3ZoomHandler:te,userSelectionActive:_}=Ge(Ow,mt),q=Hr(z),S=N.useRef(0),D=N.useRef(!1),M=N.useRef();return Rw(le),N.useEffect(()=>{if(le.current){const A=le.current.getBoundingClientRect(),w=ag().scaleExtent([C,k]).translateExtent(E),O=cn(le.current).call(w),L=In.translate(b.x,b.y).scale(hs(b.zoom,C,k)),W=[[0,0],[A.width,A.height]],ne=w.constrain()(L,W,E);w.transform(O,ne),w.wheelDelta(W0),G.setState({d3Zoom:w,d3Selection:O,d3ZoomHandler:O.on("wheel.zoom"),transform:[ne.x,ne.y,ne.k],domNode:le.current.closest(".react-flow")})}},[]),N.useEffect(()=>{F&&ee&&(h&&!q&&!_?F.on("wheel.zoom",A=>{if(es(A,V))return!1;A.preventDefault(),A.stopImmediatePropagation();const w=F.property("__zoom").k||1;if(A.ctrlKey&&f){const X=yn(A),I=W0(A),ae=w*Math.pow(2,I);ee.scaleTo(F,ae,X,A);return}const O=A.deltaMode===1?20:1;let L=m===ol.Vertical?0:A.deltaX*O,W=m===ol.Horizontal?0:A.deltaY*O;!Ro()&&A.shiftKey&&m!==ol.Vertical&&(L=A.deltaY*O,W=0),ee.translateBy(F,-(L/w)*p,-(W/w)*p,{internal:!0});const ne=yo(F.property("__zoom")),{onViewportChangeStart:fe,onViewportChange:ue,onViewportChangeEnd:xe}=G.getState();clearTimeout(M.current),D.current||(D.current=!0,r?.(A,ne),fe?.(ne)),D.current&&(n?.(A,ne),ue?.(ne),M.current=setTimeout(()=>{i?.(A,ne),xe?.(ne),D.current=!1},150))},{passive:!1}):typeof te<"u"&&F.on("wheel.zoom",function(A,w){if(!R&&A.type==="wheel"&&!A.ctrlKey||es(A,V))return null;A.preventDefault(),te.call(this,A,w)},{passive:!1}))},[_,h,m,F,ee,te,q,f,R,V,r,n,i]),N.useEffect(()=>{ee&&ee.on("start",A=>{if(!A.sourceEvent||A.sourceEvent.internal)return null;S.current=A.sourceEvent?.button;const{onViewportChangeStart:w}=G.getState(),O=yo(A.transform);re.current=!0,J.current=O,A.sourceEvent?.type==="mousedown"&&G.setState({paneDragging:!0}),w?.(O),r?.(A.sourceEvent,O)})},[ee,r]),N.useEffect(()=>{ee&&(_&&!re.current?ee.on("zoom",null):_||ee.on("zoom",A=>{const{onViewportChange:w}=G.getState();if(G.setState({transform:[A.transform.x,A.transform.y,A.transform.k]}),ce.current=!!(o&&Q0(v,S.current??0)),(n||w)&&!A.sourceEvent?.internal){const O=yo(A.transform);w?.(O),n?.(A.sourceEvent,O)}}))},[_,ee,n,v,o]),N.useEffect(()=>{ee&&ee.on("end",A=>{if(!A.sourceEvent||A.sourceEvent.internal)return null;const{onViewportChangeEnd:w}=G.getState();if(re.current=!1,G.setState({paneDragging:!1}),o&&Q0(v,S.current??0)&&!ce.current&&o(A.sourceEvent),ce.current=!1,(i||w)&&Dw(J.current,A.transform)){const O=yo(A.transform);J.current=O,clearTimeout(B.current),B.current=setTimeout(()=>{w?.(O),i?.(A.sourceEvent,O)},h?150:0)}})},[ee,h,v,i,o]),N.useEffect(()=>{ee&&ee.filter(A=>{const w=q||u,O=f&&A.ctrlKey;if((v===!0||Array.isArray(v)&&v.includes(1))&&A.button===1&&A.type==="mousedown"&&(es(A,"react-flow__node")||es(A,"react-flow__edge")))return!0;if(!v&&!w&&!h&&!x&&!f||_||!x&&A.type==="dblclick"||es(A,V)&&A.type==="wheel"||es(A,U)&&(A.type!=="wheel"||h&&A.type==="wheel"&&!q)||!f&&A.ctrlKey&&A.type==="wheel"||!w&&!h&&!O&&A.type==="wheel"||!v&&(A.type==="mousedown"||A.type==="touchstart")||Array.isArray(v)&&!v.includes(A.button)&&A.type==="mousedown")return!1;const L=Array.isArray(v)&&v.includes(A.button)||!A.button||A.button<=1;return(!A.ctrlKey||A.type==="wheel")&&L})},[_,ee,u,f,h,x,v,g,q]),se.createElement("div",{className:"react-flow__renderer",ref:le,style:xf},Y)},Uw=n=>({userSelectionActive:n.userSelectionActive,userSelectionRect:n.userSelectionRect});function Bw(){const{userSelectionActive:n,userSelectionRect:r}=Ge(Uw,mt);return n&&r?se.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:r.width,height:r.height,transform:`translate(${r.x}px, ${r.y}px)`}}):null}function K0(n,r){const i=r.parentNode||r.parentId,o=n.find(u=>u.id===i);if(o){const u=r.position.x+r.width-o.width,f=r.position.y+r.height-o.height;if(u>0||f>0||r.position.x<0||r.position.y<0){if(o.style={...o.style},o.style.width=o.style.width??o.width,o.style.height=o.style.height??o.height,u>0&&(o.style.width+=u),f>0&&(o.style.height+=f),r.position.x<0){const h=Math.abs(r.position.x);o.position.x=o.position.x-h,o.style.width+=h,r.position.x=0}if(r.position.y<0){const h=Math.abs(r.position.y);o.position.y=o.position.y-h,o.style.height+=h,r.position.y=0}o.width=o.style.width,o.height=o.style.height}}}function Dg(n,r){if(n.some(o=>o.type==="reset"))return n.filter(o=>o.type==="reset").map(o=>o.item);const i=n.filter(o=>o.type==="add").map(o=>o.item);return r.reduce((o,u)=>{const f=n.filter(p=>p.id===u.id);if(f.length===0)return o.push(u),o;const h={...u};for(const p of f)if(p)switch(p.type){case"select":{h.selected=p.selected;break}case"position":{typeof p.position<"u"&&(h.position=p.position),typeof p.positionAbsolute<"u"&&(h.positionAbsolute=p.positionAbsolute),typeof p.dragging<"u"&&(h.dragging=p.dragging),h.expandParent&&K0(o,h);break}case"dimensions":{typeof p.dimensions<"u"&&(h.width=p.dimensions.width,h.height=p.dimensions.height),typeof p.updateStyle<"u"&&(h.style={...h.style||{},...p.dimensions}),typeof p.resizing=="boolean"&&(h.resizing=p.resizing),h.expandParent&&K0(o,h);break}case"remove":return o}return o.push(h),o},i)}function Og(n,r){return Dg(n,r)}function qw(n,r){return Dg(n,r)}const Oa=(n,r)=>({id:n,type:"select",selected:r});function ls(n,r){return n.reduce((i,o)=>{const u=r.includes(o.id);return!o.selected&&u?(o.selected=!0,i.push(Oa(o.id,!0))):o.selected&&!u&&(o.selected=!1,i.push(Oa(o.id,!1))),i},[])}const pd=(n,r)=>i=>{i.target===r.current&&n?.(i)},$w=n=>({userSelectionActive:n.userSelectionActive,elementsSelectable:n.elementsSelectable,dragging:n.paneDragging}),Hg=N.memo(({isSelecting:n,selectionMode:r=Or.Full,panOnDrag:i,onSelectionStart:o,onSelectionEnd:u,onPaneClick:f,onPaneContextMenu:h,onPaneScroll:p,onPaneMouseEnter:m,onPaneMouseMove:x,onPaneMouseLeave:g,children:v})=>{const b=N.useRef(null),E=ot(),C=N.useRef(0),k=N.useRef(0),z=N.useRef(),{userSelectionActive:R,elementsSelectable:Y,dragging:V}=Ge($w,mt),U=()=>{E.setState({userSelectionActive:!1,userSelectionRect:null}),C.current=0,k.current=0},B=te=>{f?.(te),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},G=te=>{if(Array.isArray(i)&&i?.includes(2)){te.preventDefault();return}h?.(te)},re=p?te=>p(te):void 0,ce=te=>{const{resetSelectedElements:_,domNode:q}=E.getState();if(z.current=q?.getBoundingClientRect(),!Y||!n||te.button!==0||te.target!==b.current||!z.current)return;const{x:S,y:D}=Ua(te,z.current);_(),E.setState({userSelectionRect:{width:0,height:0,startX:S,startY:D,x:S,y:D}}),o?.(te)},le=te=>{const{userSelectionRect:_,nodeInternals:q,edges:S,transform:D,onNodesChange:M,onEdgesChange:A,nodeOrigin:w,getNodes:O}=E.getState();if(!n||!z.current||!_)return;E.setState({userSelectionActive:!0,nodesSelectionActive:!1});const L=Ua(te,z.current),W=_.startX??0,ne=_.startY??0,fe={..._,x:L.x<W?L.x:W,y:L.y<ne?L.y:ne,width:Math.abs(L.x-W),height:Math.abs(L.y-ne)},ue=O(),xe=pg(q,fe,D,r===Or.Partial,!0,w),X=gg(xe,S).map(ae=>ae.id),I=xe.map(ae=>ae.id);if(C.current!==I.length){C.current=I.length;const ae=ls(ue,I);ae.length&&M?.(ae)}if(k.current!==X.length){k.current=X.length;const ae=ls(S,X);ae.length&&A?.(ae)}E.setState({userSelectionRect:fe})},J=te=>{if(te.button!==0)return;const{userSelectionRect:_}=E.getState();!R&&_&&te.target===b.current&&B?.(te),E.setState({nodesSelectionActive:C.current>0}),U(),u?.(te)},ee=te=>{R&&(E.setState({nodesSelectionActive:C.current>0}),u?.(te)),U()},F=Y&&(n||R);return se.createElement("div",{className:bt(["react-flow__pane",{dragging:V,selection:n}]),onClick:F?void 0:pd(B,b),onContextMenu:pd(G,b),onWheel:pd(re,b),onMouseEnter:F?void 0:m,onMouseDown:F?ce:void 0,onMouseMove:F?le:x,onMouseUp:F?J:void 0,onMouseLeave:F?ee:g,ref:b,style:xf},v,se.createElement(Bw,null))});Hg.displayName="Pane";function Ug(n,r){const i=n.parentNode||n.parentId;if(!i)return!1;const o=r.get(i);return o?o.selected?!0:Ug(o,r):!1}function J0(n,r,i){let o=n;do{if(o?.matches(r))return!0;if(o===i.current)return!1;o=o.parentElement}while(o);return!1}function Lw(n,r,i,o){return Array.from(n.values()).filter(u=>(u.selected||u.id===o)&&(!u.parentNode||u.parentId||!Ug(u,n))&&(u.draggable||r&&typeof u.draggable>"u")).map(u=>({id:u.id,position:u.position||{x:0,y:0},positionAbsolute:u.positionAbsolute||{x:0,y:0},distance:{x:i.x-(u.positionAbsolute?.x??0),y:i.y-(u.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:u.extent,parentNode:u.parentNode||u.parentId,parentId:u.parentNode||u.parentId,width:u.width,height:u.height,expandParent:u.expandParent}))}function Yw(n,r){return!r||r==="parent"?r:[r[0],[r[1][0]-(n.width||0),r[1][1]-(n.height||0)]]}function Bg(n,r,i,o,u=[0,0],f){const h=Yw(n,n.extent||o);let p=h;const m=n.parentNode||n.parentId;if(n.extent==="parent"&&!n.expandParent)if(m&&n.width&&n.height){const v=i.get(m),{x:b,y:E}=ul(v,u).positionAbsolute;p=v&&un(b)&&un(E)&&un(v.width)&&un(v.height)?[[b+n.width*u[0],E+n.height*u[1]],[b+v.width-n.width+n.width*u[0],E+v.height-n.height+n.height*u[1]]]:p}else f?.("005",ta.error005()),p=h;else if(n.extent&&m&&n.extent!=="parent"){const v=i.get(m),{x:b,y:E}=ul(v,u).positionAbsolute;p=[[n.extent[0][0]+b,n.extent[0][1]+E],[n.extent[1][0]+b,n.extent[1][1]+E]]}let x={x:0,y:0};if(m){const v=i.get(m);x=ul(v,u).positionAbsolute}const g=p&&p!=="parent"?sf(r,p):r;return{position:{x:g.x-x.x,y:g.y-x.y},positionAbsolute:g}}function gd({nodeId:n,dragItems:r,nodeInternals:i}){const o=r.map(u=>({...i.get(u.id),position:u.position,positionAbsolute:u.positionAbsolute}));return[n?o.find(u=>u.id===n):o[0],o]}const F0=(n,r,i,o)=>{const u=r.querySelectorAll(n);if(!u||!u.length)return null;const f=Array.from(u),h=r.getBoundingClientRect(),p={x:h.width*o[0],y:h.height*o[1]};return f.map(m=>{const x=m.getBoundingClientRect();return{id:m.getAttribute("data-handleid"),position:m.getAttribute("data-handlepos"),x:(x.left-h.left-p.x)/i,y:(x.top-h.top-p.y)/i,...lf(m)}})};function jr(n,r,i){return i===void 0?i:o=>{const u=r().nodeInternals.get(n);u&&i(o,{...u})}}function Vd({id:n,store:r,unselect:i=!1,nodeRef:o}){const{addSelectedNodes:u,unselectNodesAndEdges:f,multiSelectionActive:h,nodeInternals:p,onError:m}=r.getState(),x=p.get(n);if(!x){m?.("012",ta.error012(n));return}r.setState({nodesSelectionActive:!1}),x.selected?(i||x.selected&&h)&&(f({nodes:[x],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):u([n])}function Vw(){const n=ot();return N.useCallback(({sourceEvent:i})=>{const{transform:o,snapGrid:u,snapToGrid:f}=n.getState(),h=i.touches?i.touches[0].clientX:i.clientX,p=i.touches?i.touches[0].clientY:i.clientY,m={x:(h-o[0])/o[2],y:(p-o[1])/o[2]};return{xSnapped:f?u[0]*Math.round(m.x/u[0]):m.x,ySnapped:f?u[1]*Math.round(m.y/u[1]):m.y,...m}},[])}function yd(n){return(r,i,o)=>n?.(r,o)}function qg({nodeRef:n,disabled:r=!1,noDragClassName:i,handleSelector:o,nodeId:u,isSelectable:f,selectNodesOnDrag:h}){const p=ot(),[m,x]=N.useState(!1),g=N.useRef([]),v=N.useRef({x:null,y:null}),b=N.useRef(0),E=N.useRef(null),C=N.useRef({x:0,y:0}),k=N.useRef(null),z=N.useRef(!1),R=N.useRef(!1),Y=N.useRef(!1),V=Vw();return N.useEffect(()=>{if(n?.current){const U=cn(n.current),B=({x:ce,y:le})=>{const{nodeInternals:J,onNodeDrag:ee,onSelectionDrag:F,updateNodePositions:te,nodeExtent:_,snapGrid:q,snapToGrid:S,nodeOrigin:D,onError:M}=p.getState();v.current={x:ce,y:le};let A=!1,w={x:0,y:0,x2:0,y2:0};if(g.current.length>1&&_){const L=Xo(g.current,D);w=Dr(L)}if(g.current=g.current.map(L=>{const W={x:ce-L.distance.x,y:le-L.distance.y};S&&(W.x=q[0]*Math.round(W.x/q[0]),W.y=q[1]*Math.round(W.y/q[1]));const ne=[[_[0][0],_[0][1]],[_[1][0],_[1][1]]];g.current.length>1&&_&&!L.extent&&(ne[0][0]=L.positionAbsolute.x-w.x+_[0][0],ne[1][0]=L.positionAbsolute.x+(L.width??0)-w.x2+_[1][0],ne[0][1]=L.positionAbsolute.y-w.y+_[0][1],ne[1][1]=L.positionAbsolute.y+(L.height??0)-w.y2+_[1][1]);const fe=Bg(L,W,J,ne,D,M);return A=A||L.position.x!==fe.position.x||L.position.y!==fe.position.y,L.position=fe.position,L.positionAbsolute=fe.positionAbsolute,L}),!A)return;te(g.current,!0,!0),x(!0);const O=u?ee:yd(F);if(O&&k.current){const[L,W]=gd({nodeId:u,dragItems:g.current,nodeInternals:J});O(k.current,L,W)}},G=()=>{if(!E.current)return;const[ce,le]=sg(C.current,E.current);if(ce!==0||le!==0){const{transform:J,panBy:ee}=p.getState();v.current.x=(v.current.x??0)-ce/J[2],v.current.y=(v.current.y??0)-le/J[2],ee({x:ce,y:le})&&B(v.current)}b.current=requestAnimationFrame(G)},re=ce=>{const{nodeInternals:le,multiSelectionActive:J,nodesDraggable:ee,unselectNodesAndEdges:F,onNodeDragStart:te,onSelectionDragStart:_}=p.getState();R.current=!0;const q=u?te:yd(_);(!h||!f)&&!J&&u&&(le.get(u)?.selected||F()),u&&f&&h&&Vd({id:u,store:p,nodeRef:n});const S=V(ce);if(v.current=S,g.current=Lw(le,ee,S,u),q&&g.current){const[D,M]=gd({nodeId:u,dragItems:g.current,nodeInternals:le});q(ce.sourceEvent,D,M)}};if(r)U.on(".drag",null);else{const ce=ej().on("start",le=>{const{domNode:J,nodeDragThreshold:ee}=p.getState();ee===0&&re(le),Y.current=!1;const F=V(le);v.current=F,E.current=J?.getBoundingClientRect()||null,C.current=Ua(le.sourceEvent,E.current)}).on("drag",le=>{const J=V(le),{autoPanOnNodeDrag:ee,nodeDragThreshold:F}=p.getState();if(le.sourceEvent.type==="touchmove"&&le.sourceEvent.touches.length>1&&(Y.current=!0),!Y.current){if(!z.current&&R.current&&ee&&(z.current=!0,G()),!R.current){const te=J.xSnapped-(v?.current?.x??0),_=J.ySnapped-(v?.current?.y??0);Math.sqrt(te*te+_*_)>F&&re(le)}(v.current.x!==J.xSnapped||v.current.y!==J.ySnapped)&&g.current&&R.current&&(k.current=le.sourceEvent,C.current=Ua(le.sourceEvent,E.current),B(J))}}).on("end",le=>{if(!(!R.current||Y.current)&&(x(!1),z.current=!1,R.current=!1,cancelAnimationFrame(b.current),g.current)){const{updateNodePositions:J,nodeInternals:ee,onNodeDragStop:F,onSelectionDragStop:te}=p.getState(),_=u?F:yd(te);if(J(g.current,!1,!1),_){const[q,S]=gd({nodeId:u,dragItems:g.current,nodeInternals:ee});_(le.sourceEvent,q,S)}}}).filter(le=>{const J=le.target;return!le.button&&(!i||!J0(J,`.${i}`,n))&&(!o||J0(J,o,n))});return U.call(ce),()=>{U.on(".drag",null)}}}},[n,r,i,o,f,p,u,h,V]),m}function $g(){const n=ot();return N.useCallback(i=>{const{nodeInternals:o,nodeExtent:u,updateNodePositions:f,getNodes:h,snapToGrid:p,snapGrid:m,onError:x,nodesDraggable:g}=n.getState(),v=h().filter(Y=>Y.selected&&(Y.draggable||g&&typeof Y.draggable>"u")),b=p?m[0]:5,E=p?m[1]:5,C=i.isShiftPressed?4:1,k=i.x*b*C,z=i.y*E*C,R=v.map(Y=>{if(Y.positionAbsolute){const V={x:Y.positionAbsolute.x+k,y:Y.positionAbsolute.y+z};p&&(V.x=m[0]*Math.round(V.x/m[0]),V.y=m[1]*Math.round(V.y/m[1]));const{positionAbsolute:U,position:B}=Bg(Y,V,o,u,void 0,x);Y.position=B,Y.positionAbsolute=U}return Y});f(R,!0,!1)},[])}const cs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var wr=n=>{const r=({id:i,type:o,data:u,xPos:f,yPos:h,xPosOrigin:p,yPosOrigin:m,selected:x,onClick:g,onMouseEnter:v,onMouseMove:b,onMouseLeave:E,onContextMenu:C,onDoubleClick:k,style:z,className:R,isDraggable:Y,isSelectable:V,isConnectable:U,isFocusable:B,selectNodesOnDrag:G,sourcePosition:re,targetPosition:ce,hidden:le,resizeObserver:J,dragHandle:ee,zIndex:F,isParent:te,noDragClassName:_,noPanClassName:q,initialized:S,disableKeyboardA11y:D,ariaLabel:M,rfId:A,hasHandleBounds:w})=>{const O=ot(),L=N.useRef(null),W=N.useRef(null),ne=N.useRef(re),fe=N.useRef(ce),ue=N.useRef(o),xe=V||Y||g||v||b||E,X=$g(),I=jr(i,O.getState,v),ae=jr(i,O.getState,b),me=jr(i,O.getState,E),he=jr(i,O.getState,C),pe=jr(i,O.getState,k),ve=ke=>{const{nodeDragThreshold:Ne}=O.getState();if(V&&(!G||!Y||Ne>0)&&Vd({id:i,store:O,nodeRef:L}),g){const ct=O.getState().nodeInternals.get(i);ct&&g(ke,{...ct})}},He=ke=>{if(!Bd(ke)&&!D)if(cg.includes(ke.key)&&V){const Ne=ke.key==="Escape";Vd({id:i,store:O,unselect:Ne,nodeRef:L})}else Y&&x&&Object.prototype.hasOwnProperty.call(cs,ke.key)&&(O.setState({ariaLiveMessage:`Moved selected node ${ke.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~f}, y: ${~~h}`}),X({x:cs[ke.key].x,y:cs[ke.key].y,isShiftPressed:ke.shiftKey}))};N.useEffect(()=>()=>{W.current&&(J?.unobserve(W.current),W.current=null)},[]),N.useEffect(()=>{if(L.current&&!le){const ke=L.current;(!S||!w||W.current!==ke)&&(W.current&&J?.unobserve(W.current),J?.observe(ke),W.current=ke)}},[le,S,w]),N.useEffect(()=>{const ke=ue.current!==o,Ne=ne.current!==re,ct=fe.current!==ce;L.current&&(ke||Ne||ct)&&(ke&&(ue.current=o),Ne&&(ne.current=re),ct&&(fe.current=ce),O.getState().updateNodeDimensions([{id:i,nodeElement:L.current,forceUpdate:!0}]))},[i,o,re,ce]);const Ie=qg({nodeRef:L,disabled:le||!Y,noDragClassName:_,handleSelector:ee,nodeId:i,isSelectable:V,selectNodesOnDrag:G});return le?null:se.createElement("div",{className:bt(["react-flow__node",`react-flow__node-${o}`,{[q]:Y},R,{selected:x,selectable:V,parent:te,dragging:Ie}]),ref:L,style:{zIndex:F,transform:`translate(${p}px,${m}px)`,pointerEvents:xe?"all":"none",visibility:S?"visible":"hidden",...z},"data-id":i,"data-testid":`rf__node-${i}`,onMouseEnter:I,onMouseMove:ae,onMouseLeave:me,onContextMenu:he,onClick:ve,onDoubleClick:pe,onKeyDown:B?He:void 0,tabIndex:B?0:void 0,role:B?"button":void 0,"aria-describedby":D?void 0:`${Tg}-${A}`,"aria-label":M},se.createElement(aw,{value:i},se.createElement(n,{id:i,data:u,type:o,xPos:f,yPos:h,selected:x,isConnectable:U,sourcePosition:re,targetPosition:ce,dragging:Ie,dragHandle:ee,zIndex:F})))};return r.displayName="NodeWrapper",N.memo(r)};const Gw=n=>{const r=n.getNodes().filter(i=>i.selected);return{...Xo(r,n.nodeOrigin),transformString:`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`,userSelectionActive:n.userSelectionActive}};function Xw({onSelectionContextMenu:n,noPanClassName:r,disableKeyboardA11y:i}){const o=ot(),{width:u,height:f,x:h,y:p,transformString:m,userSelectionActive:x}=Ge(Gw,mt),g=$g(),v=N.useRef(null);if(N.useEffect(()=>{i||v.current?.focus({preventScroll:!0})},[i]),qg({nodeRef:v}),x||!u||!f)return null;const b=n?C=>{const k=o.getState().getNodes().filter(z=>z.selected);n(C,k)}:void 0,E=C=>{Object.prototype.hasOwnProperty.call(cs,C.key)&&g({x:cs[C.key].x,y:cs[C.key].y,isShiftPressed:C.shiftKey})};return se.createElement("div",{className:bt(["react-flow__nodesselection","react-flow__container",r]),style:{transform:m}},se.createElement("div",{ref:v,className:"react-flow__nodesselection-rect",onContextMenu:b,tabIndex:i?void 0:-1,onKeyDown:i?void 0:E,style:{width:u,height:f,top:p,left:h}}))}var Zw=N.memo(Xw);const Qw=n=>n.nodesSelectionActive,Lg=({children:n,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:o,onPaneMouseLeave:u,onPaneContextMenu:f,onPaneScroll:h,deleteKeyCode:p,onMove:m,onMoveStart:x,onMoveEnd:g,selectionKeyCode:v,selectionOnDrag:b,selectionMode:E,onSelectionStart:C,onSelectionEnd:k,multiSelectionKeyCode:z,panActivationKeyCode:R,zoomActivationKeyCode:Y,elementsSelectable:V,zoomOnScroll:U,zoomOnPinch:B,panOnScroll:G,panOnScrollSpeed:re,panOnScrollMode:ce,zoomOnDoubleClick:le,panOnDrag:J,defaultViewport:ee,translateExtent:F,minZoom:te,maxZoom:_,preventScrolling:q,onSelectionContextMenu:S,noWheelClassName:D,noPanClassName:M,disableKeyboardA11y:A})=>{const w=Ge(Qw),O=Hr(v),L=Hr(R),W=L||J,ne=L||G,fe=O||b&&W!==!0;return zw({deleteKeyCode:p,multiSelectionKeyCode:z}),se.createElement(Hw,{onMove:m,onMoveStart:x,onMoveEnd:g,onPaneContextMenu:f,elementsSelectable:V,zoomOnScroll:U,zoomOnPinch:B,panOnScroll:ne,panOnScrollSpeed:re,panOnScrollMode:ce,zoomOnDoubleClick:le,panOnDrag:!O&&W,defaultViewport:ee,translateExtent:F,minZoom:te,maxZoom:_,zoomActivationKeyCode:Y,preventScrolling:q,noWheelClassName:D,noPanClassName:M},se.createElement(Hg,{onSelectionStart:C,onSelectionEnd:k,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:o,onPaneMouseLeave:u,onPaneContextMenu:f,onPaneScroll:h,panOnDrag:W,isSelecting:!!fe,selectionMode:E},n,w&&se.createElement(Zw,{onSelectionContextMenu:S,noPanClassName:M,disableKeyboardA11y:A})))};Lg.displayName="FlowRenderer";var Ww=N.memo(Lg);function Kw(n){return Ge(N.useCallback(i=>n?pg(i.nodeInternals,{x:0,y:0,width:i.width,height:i.height},i.transform,!0):i.getNodes(),[n]))}function Jw(n){const r={input:wr(n.input||Eg),default:wr(n.default||Yd),output:wr(n.output||kg),group:wr(n.group||ff)},i={},o=Object.keys(n).filter(u=>!["input","default","output","group"].includes(u)).reduce((u,f)=>(u[f]=wr(n[f]||Yd),u),i);return{...r,...o}}const Fw=({x:n,y:r,width:i,height:o,origin:u})=>!i||!o?{x:n,y:r}:u[0]<0||u[1]<0||u[0]>1||u[1]>1?{x:n,y:r}:{x:n-i*u[0],y:r-o*u[1]},Iw=n=>({nodesDraggable:n.nodesDraggable,nodesConnectable:n.nodesConnectable,nodesFocusable:n.nodesFocusable,elementsSelectable:n.elementsSelectable,updateNodeDimensions:n.updateNodeDimensions,onError:n.onError}),Yg=n=>{const{nodesDraggable:r,nodesConnectable:i,nodesFocusable:o,elementsSelectable:u,updateNodeDimensions:f,onError:h}=Ge(Iw,mt),p=Kw(n.onlyRenderVisibleElements),m=N.useRef(),x=N.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const g=new ResizeObserver(v=>{const b=v.map(E=>({id:E.target.getAttribute("data-id"),nodeElement:E.target,forceUpdate:!0}));f(b)});return m.current=g,g},[]);return N.useEffect(()=>()=>{m?.current?.disconnect()},[]),se.createElement("div",{className:"react-flow__nodes",style:xf},p.map(g=>{let v=g.type||"default";n.nodeTypes[v]||(h?.("003",ta.error003(v)),v="default");const b=n.nodeTypes[v]||n.nodeTypes.default,E=!!(g.draggable||r&&typeof g.draggable>"u"),C=!!(g.selectable||u&&typeof g.selectable>"u"),k=!!(g.connectable||i&&typeof g.connectable>"u"),z=!!(g.focusable||o&&typeof g.focusable>"u"),R=n.nodeExtent?sf(g.positionAbsolute,n.nodeExtent):g.positionAbsolute,Y=R?.x??0,V=R?.y??0,U=Fw({x:Y,y:V,width:g.width??0,height:g.height??0,origin:n.nodeOrigin});return se.createElement(b,{key:g.id,id:g.id,className:g.className,style:g.style,type:v,data:g.data,sourcePosition:g.sourcePosition||ye.Bottom,targetPosition:g.targetPosition||ye.Top,hidden:g.hidden,xPos:Y,yPos:V,xPosOrigin:U.x,yPosOrigin:U.y,selectNodesOnDrag:n.selectNodesOnDrag,onClick:n.onNodeClick,onMouseEnter:n.onNodeMouseEnter,onMouseMove:n.onNodeMouseMove,onMouseLeave:n.onNodeMouseLeave,onContextMenu:n.onNodeContextMenu,onDoubleClick:n.onNodeDoubleClick,selected:!!g.selected,isDraggable:E,isSelectable:C,isConnectable:k,isFocusable:z,resizeObserver:x,dragHandle:g.dragHandle,zIndex:g[Je]?.z??0,isParent:!!g[Je]?.isParent,noDragClassName:n.noDragClassName,noPanClassName:n.noPanClassName,initialized:!!g.width&&!!g.height,rfId:n.rfId,disableKeyboardA11y:n.disableKeyboardA11y,ariaLabel:g.ariaLabel,hasHandleBounds:!!g[Je]?.handleBounds})}))};Yg.displayName="NodeRenderer";var Pw=N.memo(Yg);const eS=(n,r,i)=>i===ye.Left?n-r:i===ye.Right?n+r:n,tS=(n,r,i)=>i===ye.Top?n-r:i===ye.Bottom?n+r:n,I0="react-flow__edgeupdater",P0=({position:n,centerX:r,centerY:i,radius:o=10,onMouseDown:u,onMouseEnter:f,onMouseOut:h,type:p})=>se.createElement("circle",{onMouseDown:u,onMouseEnter:f,onMouseOut:h,className:bt([I0,`${I0}-${p}`]),cx:eS(r,o,n),cy:tS(i,o,n),r:o,stroke:"transparent",fill:"transparent"}),nS=()=>!0;var ts=n=>{const r=({id:i,className:o,type:u,data:f,onClick:h,onEdgeDoubleClick:p,selected:m,animated:x,label:g,labelStyle:v,labelShowBg:b,labelBgStyle:E,labelBgPadding:C,labelBgBorderRadius:k,style:z,source:R,target:Y,sourceX:V,sourceY:U,targetX:B,targetY:G,sourcePosition:re,targetPosition:ce,elementsSelectable:le,hidden:J,sourceHandleId:ee,targetHandleId:F,onContextMenu:te,onMouseEnter:_,onMouseMove:q,onMouseLeave:S,reconnectRadius:D,onReconnect:M,onReconnectStart:A,onReconnectEnd:w,markerEnd:O,markerStart:L,rfId:W,ariaLabel:ne,isFocusable:fe,isReconnectable:ue,pathOptions:xe,interactionWidth:X,disableKeyboardA11y:I})=>{const ae=N.useRef(null),[me,he]=N.useState(!1),[pe,ve]=N.useState(!1),He=ot(),Ie=N.useMemo(()=>`url('#${$d(L,W)}')`,[L,W]),ke=N.useMemo(()=>`url('#${$d(O,W)}')`,[O,W]);if(J)return null;const Ne=ut=>{const{edges:Kt,addSelectedEdges:Jt,unselectNodesAndEdges:Ft,multiSelectionActive:Tt}=He.getState(),Et=Kt.find(Ut=>Ut.id===i);Et&&(le&&(He.setState({nodesSelectionActive:!1}),Et.selected&&Tt?(Ft({nodes:[],edges:[Et]}),ae.current?.blur()):Jt([i])),h&&h(ut,Et))},ct=Nr(i,He.getState,p),Wt=Nr(i,He.getState,te),Nn=Nr(i,He.getState,_),na=Nr(i,He.getState,q),An=Nr(i,He.getState,S),hn=(ut,Kt)=>{if(ut.button!==0)return;const{edges:Jt,isValidConnection:Ft}=He.getState(),Tt=Kt?Y:R,Et=(Kt?F:ee)||null,Ut=Kt?"target":"source",ys=Ft||nS,ml=Kt,la=Jt.find(zn=>zn.id===i);ve(!0),A?.(ut,la,Ut);const $a=zn=>{ve(!1),w?.(zn,la,Ut)};Ng({event:ut,handleId:Et,nodeId:Tt,onConnect:zn=>M?.(la,zn),isTarget:ml,getState:He.getState,setState:He.setState,isValidConnection:ys,edgeUpdaterType:Ut,onReconnectEnd:$a})},aa=ut=>hn(ut,!0),Ht=ut=>hn(ut,!1),Pe=()=>he(!0),St=()=>he(!1),nt=!le&&!h,qa=ut=>{if(!I&&cg.includes(ut.key)&&le){const{unselectNodesAndEdges:Kt,addSelectedEdges:Jt,edges:Ft}=He.getState();ut.key==="Escape"?(ae.current?.blur(),Kt({edges:[Ft.find(Et=>Et.id===i)]})):Jt([i])}};return se.createElement("g",{className:bt(["react-flow__edge",`react-flow__edge-${u}`,o,{selected:m,animated:x,inactive:nt,updating:me}]),onClick:Ne,onDoubleClick:ct,onContextMenu:Wt,onMouseEnter:Nn,onMouseMove:na,onMouseLeave:An,onKeyDown:fe?qa:void 0,tabIndex:fe?0:void 0,role:fe?"button":"img","data-testid":`rf__edge-${i}`,"aria-label":ne===null?void 0:ne||`Edge from ${R} to ${Y}`,"aria-describedby":fe?`${Mg}-${W}`:void 0,ref:ae},!pe&&se.createElement(n,{id:i,source:R,target:Y,selected:m,animated:x,label:g,labelStyle:v,labelShowBg:b,labelBgStyle:E,labelBgPadding:C,labelBgBorderRadius:k,data:f,style:z,sourceX:V,sourceY:U,targetX:B,targetY:G,sourcePosition:re,targetPosition:ce,sourceHandleId:ee,targetHandleId:F,markerStart:Ie,markerEnd:ke,pathOptions:xe,interactionWidth:X}),ue&&se.createElement(se.Fragment,null,(ue==="source"||ue===!0)&&se.createElement(P0,{position:re,centerX:V,centerY:U,radius:D,onMouseDown:aa,onMouseEnter:Pe,onMouseOut:St,type:"source"}),(ue==="target"||ue===!0)&&se.createElement(P0,{position:ce,centerX:B,centerY:G,radius:D,onMouseDown:Ht,onMouseEnter:Pe,onMouseOut:St,type:"target"})))};return r.displayName="EdgeWrapper",N.memo(r)};function aS(n){const r={default:ts(n.default||Do),straight:ts(n.bezier||cf),step:ts(n.step||of),smoothstep:ts(n.step||Go),simplebezier:ts(n.simplebezier||rf)},i={},o=Object.keys(n).filter(u=>!["default","bezier"].includes(u)).reduce((u,f)=>(u[f]=ts(n[f]||Do),u),i);return{...r,...o}}function ep(n,r,i=null){const o=(i?.x||0)+r.x,u=(i?.y||0)+r.y,f=i?.width||r.width,h=i?.height||r.height;switch(n){case ye.Top:return{x:o+f/2,y:u};case ye.Right:return{x:o+f,y:u+h/2};case ye.Bottom:return{x:o+f/2,y:u+h};case ye.Left:return{x:o,y:u+h/2}}}function tp(n,r){return n?n.length===1||!r?n[0]:r&&n.find(i=>i.id===r)||null:null}const lS=(n,r,i,o,u,f)=>{const h=ep(i,n,r),p=ep(f,o,u);return{sourceX:h.x,sourceY:h.y,targetX:p.x,targetY:p.y}};function sS({sourcePos:n,targetPos:r,sourceWidth:i,sourceHeight:o,targetWidth:u,targetHeight:f,width:h,height:p,transform:m}){const x={x:Math.min(n.x,r.x),y:Math.min(n.y,r.y),x2:Math.max(n.x+i,r.x+u),y2:Math.max(n.y+o,r.y+f)};x.x===x.x2&&(x.x2+=1),x.y===x.y2&&(x.y2+=1);const g=Dr({x:(0-m[0])/m[2],y:(0-m[1])/m[2],width:h/m[2],height:p/m[2]}),v=Math.max(0,Math.min(g.x2,x.x2)-Math.max(g.x,x.x)),b=Math.max(0,Math.min(g.y2,x.y2)-Math.max(g.y,x.y));return Math.ceil(v*b)>0}function np(n){const r=n?.[Je]?.handleBounds||null,i=r&&n?.width&&n?.height&&typeof n?.positionAbsolute?.x<"u"&&typeof n?.positionAbsolute?.y<"u";return[{x:n?.positionAbsolute?.x||0,y:n?.positionAbsolute?.y||0,width:n?.width||0,height:n?.height||0},r,!!i]}const rS=[{level:0,isMaxLevel:!0,edges:[]}];function iS(n,r,i=!1){let o=-1;const u=n.reduce((h,p)=>{const m=un(p.zIndex);let x=m?p.zIndex:0;if(i){const g=r.get(p.target),v=r.get(p.source),b=p.selected||g?.selected||v?.selected,E=Math.max(v?.[Je]?.z||0,g?.[Je]?.z||0,1e3);x=(m?p.zIndex:0)+(b?E:0)}return h[x]?h[x].push(p):h[x]=[p],o=x>o?x:o,h},{}),f=Object.entries(u).map(([h,p])=>{const m=+h;return{edges:p,level:m,isMaxLevel:m===o}});return f.length===0?rS:f}function oS(n,r,i){const o=Ge(N.useCallback(u=>n?u.edges.filter(f=>{const h=r.get(f.source),p=r.get(f.target);return h?.width&&h?.height&&p?.width&&p?.height&&sS({sourcePos:h.positionAbsolute||{x:0,y:0},targetPos:p.positionAbsolute||{x:0,y:0},sourceWidth:h.width,sourceHeight:h.height,targetWidth:p.width,targetHeight:p.height,width:u.width,height:u.height,transform:u.transform})}):u.edges,[n,r]));return iS(o,r,i)}const cS=({color:n="none",strokeWidth:r=1})=>se.createElement("polyline",{style:{stroke:n,strokeWidth:r},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),uS=({color:n="none",strokeWidth:r=1})=>se.createElement("polyline",{style:{stroke:n,fill:n,strokeWidth:r},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),ap={[Ba.Arrow]:cS,[Ba.ArrowClosed]:uS};function dS(n){const r=ot();return N.useMemo(()=>Object.prototype.hasOwnProperty.call(ap,n)?ap[n]:(r.getState().onError?.("009",ta.error009(n)),null),[n])}const fS=({id:n,type:r,color:i,width:o=12.5,height:u=12.5,markerUnits:f="strokeWidth",strokeWidth:h,orient:p="auto-start-reverse"})=>{const m=dS(r);return m?se.createElement("marker",{className:"react-flow__arrowhead",id:n,markerWidth:`${o}`,markerHeight:`${u}`,viewBox:"-10 -10 20 20",markerUnits:f,orient:p,refX:"0",refY:"0"},se.createElement(m,{color:i,strokeWidth:h})):null},hS=({defaultColor:n,rfId:r})=>i=>{const o=[];return i.edges.reduce((u,f)=>([f.markerStart,f.markerEnd].forEach(h=>{if(h&&typeof h=="object"){const p=$d(h,r);o.includes(p)||(u.push({id:p,color:h.color||n,...h}),o.push(p))}}),u),[]).sort((u,f)=>u.id.localeCompare(f.id))},Vg=({defaultColor:n,rfId:r})=>{const i=Ge(N.useCallback(hS({defaultColor:n,rfId:r}),[n,r]),(o,u)=>!(o.length!==u.length||o.some((f,h)=>f.id!==u[h].id)));return se.createElement("defs",null,i.map(o=>se.createElement(fS,{id:o.id,key:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient})))};Vg.displayName="MarkerDefinitions";var xS=N.memo(Vg);const mS=n=>({nodesConnectable:n.nodesConnectable,edgesFocusable:n.edgesFocusable,edgesUpdatable:n.edgesUpdatable,elementsSelectable:n.elementsSelectable,width:n.width,height:n.height,connectionMode:n.connectionMode,nodeInternals:n.nodeInternals,onError:n.onError}),Gg=({defaultMarkerColor:n,onlyRenderVisibleElements:r,elevateEdgesOnSelect:i,rfId:o,edgeTypes:u,noPanClassName:f,onEdgeContextMenu:h,onEdgeMouseEnter:p,onEdgeMouseMove:m,onEdgeMouseLeave:x,onEdgeClick:g,onEdgeDoubleClick:v,onReconnect:b,onReconnectStart:E,onReconnectEnd:C,reconnectRadius:k,children:z,disableKeyboardA11y:R})=>{const{edgesFocusable:Y,edgesUpdatable:V,elementsSelectable:U,width:B,height:G,connectionMode:re,nodeInternals:ce,onError:le}=Ge(mS,mt),J=oS(r,ce,i);return B?se.createElement(se.Fragment,null,J.map(({level:ee,edges:F,isMaxLevel:te})=>se.createElement("svg",{key:ee,style:{zIndex:ee},width:B,height:G,className:"react-flow__edges react-flow__container"},te&&se.createElement(xS,{defaultColor:n,rfId:o}),se.createElement("g",null,F.map(_=>{const[q,S,D]=np(ce.get(_.source)),[M,A,w]=np(ce.get(_.target));if(!D||!w)return null;let O=_.type||"default";u[O]||(le?.("011",ta.error011(O)),O="default");const L=u[O]||u.default,W=re===fl.Strict?A.target:(A.target??[]).concat(A.source??[]),ne=tp(S.source,_.sourceHandle),fe=tp(W,_.targetHandle),ue=ne?.position||ye.Bottom,xe=fe?.position||ye.Top,X=!!(_.focusable||Y&&typeof _.focusable>"u"),I=_.reconnectable||_.updatable,ae=typeof b<"u"&&(I||V&&typeof I>"u");if(!ne||!fe)return le?.("008",ta.error008(ne,_)),null;const{sourceX:me,sourceY:he,targetX:pe,targetY:ve}=lS(q,ne,ue,M,fe,xe);return se.createElement(L,{key:_.id,id:_.id,className:bt([_.className,f]),type:O,data:_.data,selected:!!_.selected,animated:!!_.animated,hidden:!!_.hidden,label:_.label,labelStyle:_.labelStyle,labelShowBg:_.labelShowBg,labelBgStyle:_.labelBgStyle,labelBgPadding:_.labelBgPadding,labelBgBorderRadius:_.labelBgBorderRadius,style:_.style,source:_.source,target:_.target,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerEnd:_.markerEnd,markerStart:_.markerStart,sourceX:me,sourceY:he,targetX:pe,targetY:ve,sourcePosition:ue,targetPosition:xe,elementsSelectable:U,onContextMenu:h,onMouseEnter:p,onMouseMove:m,onMouseLeave:x,onClick:g,onEdgeDoubleClick:v,onReconnect:b,onReconnectStart:E,onReconnectEnd:C,reconnectRadius:k,rfId:o,ariaLabel:_.ariaLabel,isFocusable:X,isReconnectable:ae,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth,disableKeyboardA11y:R})})))),z):null};Gg.displayName="EdgeRenderer";var pS=N.memo(Gg);const gS=n=>`translate(${n.transform[0]}px,${n.transform[1]}px) scale(${n.transform[2]})`;function yS({children:n}){const r=Ge(gS);return se.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},n)}function vS(n){const r=hf(),i=N.useRef(!1);N.useEffect(()=>{!i.current&&r.viewportInitialized&&n&&(setTimeout(()=>n(r),1),i.current=!0)},[n,r.viewportInitialized])}const bS={[ye.Left]:ye.Right,[ye.Right]:ye.Left,[ye.Top]:ye.Bottom,[ye.Bottom]:ye.Top},Xg=({nodeId:n,handleType:r,style:i,type:o=Ha.Bezier,CustomComponent:u,connectionStatus:f})=>{const{fromNode:h,handleId:p,toX:m,toY:x,connectionMode:g}=Ge(N.useCallback(G=>({fromNode:G.nodeInternals.get(n),handleId:G.connectionHandleId,toX:(G.connectionPosition.x-G.transform[0])/G.transform[2],toY:(G.connectionPosition.y-G.transform[1])/G.transform[2],connectionMode:G.connectionMode}),[n]),mt),v=h?.[Je]?.handleBounds;let b=v?.[r];if(g===fl.Loose&&(b=b||v?.[r==="source"?"target":"source"]),!h||!b)return null;const E=p?b.find(G=>G.id===p):b[0],C=E?E.x+E.width/2:(h.width??0)/2,k=E?E.y+E.height/2:h.height??0,z=(h.positionAbsolute?.x??0)+C,R=(h.positionAbsolute?.y??0)+k,Y=E?.position,V=Y?bS[Y]:null;if(!Y||!V)return null;if(u)return se.createElement(u,{connectionLineType:o,connectionLineStyle:i,fromNode:h,fromHandle:E,fromX:z,fromY:R,toX:m,toY:x,fromPosition:Y,toPosition:V,connectionStatus:f});let U="";const B={sourceX:z,sourceY:R,sourcePosition:Y,targetX:m,targetY:x,targetPosition:V};return o===Ha.Bezier?[U]=xg(B):o===Ha.Step?[U]=qd({...B,borderRadius:0}):o===Ha.SmoothStep?[U]=qd(B):o===Ha.SimpleBezier?[U]=hg(B):U=`M${z},${R} ${m},${x}`,se.createElement("path",{d:U,fill:"none",className:"react-flow__connection-path",style:i})};Xg.displayName="ConnectionLine";const NS=n=>({nodeId:n.connectionNodeId,handleType:n.connectionHandleType,nodesConnectable:n.nodesConnectable,connectionStatus:n.connectionStatus,width:n.width,height:n.height});function jS({containerStyle:n,style:r,type:i,component:o}){const{nodeId:u,handleType:f,nodesConnectable:h,width:p,height:m,connectionStatus:x}=Ge(NS,mt);return!(u&&f&&p&&h)?null:se.createElement("svg",{style:n,width:p,height:m,className:"react-flow__edges react-flow__connectionline react-flow__container"},se.createElement("g",{className:bt(["react-flow__connection",x])},se.createElement(Xg,{nodeId:u,handleType:f,style:r,type:i,CustomComponent:o,connectionStatus:x})))}function lp(n,r){return N.useRef(null),ot(),N.useMemo(()=>r(n),[n])}const Zg=({nodeTypes:n,edgeTypes:r,onMove:i,onMoveStart:o,onMoveEnd:u,onInit:f,onNodeClick:h,onEdgeClick:p,onNodeDoubleClick:m,onEdgeDoubleClick:x,onNodeMouseEnter:g,onNodeMouseMove:v,onNodeMouseLeave:b,onNodeContextMenu:E,onSelectionContextMenu:C,onSelectionStart:k,onSelectionEnd:z,connectionLineType:R,connectionLineStyle:Y,connectionLineComponent:V,connectionLineContainerStyle:U,selectionKeyCode:B,selectionOnDrag:G,selectionMode:re,multiSelectionKeyCode:ce,panActivationKeyCode:le,zoomActivationKeyCode:J,deleteKeyCode:ee,onlyRenderVisibleElements:F,elementsSelectable:te,selectNodesOnDrag:_,defaultViewport:q,translateExtent:S,minZoom:D,maxZoom:M,preventScrolling:A,defaultMarkerColor:w,zoomOnScroll:O,zoomOnPinch:L,panOnScroll:W,panOnScrollSpeed:ne,panOnScrollMode:fe,zoomOnDoubleClick:ue,panOnDrag:xe,onPaneClick:X,onPaneMouseEnter:I,onPaneMouseMove:ae,onPaneMouseLeave:me,onPaneScroll:he,onPaneContextMenu:pe,onEdgeContextMenu:ve,onEdgeMouseEnter:He,onEdgeMouseMove:Ie,onEdgeMouseLeave:ke,onReconnect:Ne,onReconnectStart:ct,onReconnectEnd:Wt,reconnectRadius:Nn,noDragClassName:na,noWheelClassName:An,noPanClassName:hn,elevateEdgesOnSelect:aa,disableKeyboardA11y:Ht,nodeOrigin:Pe,nodeExtent:St,rfId:nt})=>{const qa=lp(n,Jw),ut=lp(r,aS);return vS(f),se.createElement(Ww,{onPaneClick:X,onPaneMouseEnter:I,onPaneMouseMove:ae,onPaneMouseLeave:me,onPaneContextMenu:pe,onPaneScroll:he,deleteKeyCode:ee,selectionKeyCode:B,selectionOnDrag:G,selectionMode:re,onSelectionStart:k,onSelectionEnd:z,multiSelectionKeyCode:ce,panActivationKeyCode:le,zoomActivationKeyCode:J,elementsSelectable:te,onMove:i,onMoveStart:o,onMoveEnd:u,zoomOnScroll:O,zoomOnPinch:L,zoomOnDoubleClick:ue,panOnScroll:W,panOnScrollSpeed:ne,panOnScrollMode:fe,panOnDrag:xe,defaultViewport:q,translateExtent:S,minZoom:D,maxZoom:M,onSelectionContextMenu:C,preventScrolling:A,noDragClassName:na,noWheelClassName:An,noPanClassName:hn,disableKeyboardA11y:Ht},se.createElement(yS,null,se.createElement(pS,{edgeTypes:ut,onEdgeClick:p,onEdgeDoubleClick:x,onlyRenderVisibleElements:F,onEdgeContextMenu:ve,onEdgeMouseEnter:He,onEdgeMouseMove:Ie,onEdgeMouseLeave:ke,onReconnect:Ne,onReconnectStart:ct,onReconnectEnd:Wt,reconnectRadius:Nn,defaultMarkerColor:w,noPanClassName:hn,elevateEdgesOnSelect:!!aa,disableKeyboardA11y:Ht,rfId:nt},se.createElement(jS,{style:Y,type:R,component:V,containerStyle:U})),se.createElement("div",{className:"react-flow__edgelabel-renderer"}),se.createElement(Pw,{nodeTypes:qa,onNodeClick:h,onNodeDoubleClick:m,onNodeMouseEnter:g,onNodeMouseMove:v,onNodeMouseLeave:b,onNodeContextMenu:E,selectNodesOnDrag:_,onlyRenderVisibleElements:F,noPanClassName:hn,noDragClassName:na,disableKeyboardA11y:Ht,nodeOrigin:Pe,nodeExtent:St,rfId:nt})))};Zg.displayName="GraphView";var wS=N.memo(Zg);const Gd=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ra={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Gd,nodeExtent:Gd,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:fl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:F5,isValidConnection:void 0},SS=()=>f2((n,r)=>({...Ra,setNodes:i=>{const{nodeInternals:o,nodeOrigin:u,elevateNodesOnSelect:f}=r();n({nodeInternals:md(i,o,u,f)})},getNodes:()=>Array.from(r().nodeInternals.values()),setEdges:i=>{const{defaultEdgeOptions:o={}}=r();n({edges:i.map(u=>({...o,...u}))})},setDefaultNodesAndEdges:(i,o)=>{const u=typeof i<"u",f=typeof o<"u",h=u?md(i,new Map,r().nodeOrigin,r().elevateNodesOnSelect):new Map;n({nodeInternals:h,edges:f?o:[],hasDefaultNodes:u,hasDefaultEdges:f})},updateNodeDimensions:i=>{const{onNodesChange:o,nodeInternals:u,fitViewOnInit:f,fitViewOnInitDone:h,fitViewOnInitOptions:p,domNode:m,nodeOrigin:x}=r(),g=m?.querySelector(".react-flow__viewport");if(!g)return;const v=window.getComputedStyle(g),{m22:b}=new window.DOMMatrixReadOnly(v.transform),E=i.reduce((k,z)=>{const R=u.get(z.id);if(R?.hidden)u.set(R.id,{...R,[Je]:{...R[Je],handleBounds:void 0}});else if(R){const Y=lf(z.nodeElement);!!(Y.width&&Y.height&&(R.width!==Y.width||R.height!==Y.height||z.forceUpdate))&&(u.set(R.id,{...R,[Je]:{...R[Je],handleBounds:{source:F0(".source",z.nodeElement,b,x),target:F0(".target",z.nodeElement,b,x)}},...Y}),k.push({id:R.id,type:"dimensions",dimensions:Y}))}return k},[]);zg(u,x);const C=h||f&&!h&&Rg(r,{initial:!0,...p});n({nodeInternals:new Map(u),fitViewOnInitDone:C}),E?.length>0&&o?.(E)},updateNodePositions:(i,o=!0,u=!1)=>{const{triggerNodeChanges:f}=r(),h=i.map(p=>{const m={id:p.id,type:"position",dragging:u};return o&&(m.positionAbsolute=p.positionAbsolute,m.position=p.position),m});f(h)},triggerNodeChanges:i=>{const{onNodesChange:o,nodeInternals:u,hasDefaultNodes:f,nodeOrigin:h,getNodes:p,elevateNodesOnSelect:m}=r();if(i?.length){if(f){const x=Og(i,p()),g=md(x,u,h,m);n({nodeInternals:g})}o?.(i)}},addSelectedNodes:i=>{const{multiSelectionActive:o,edges:u,getNodes:f}=r();let h,p=null;o?h=i.map(m=>Oa(m,!0)):(h=ls(f(),i),p=ls(u,[])),go({changedNodes:h,changedEdges:p,get:r,set:n})},addSelectedEdges:i=>{const{multiSelectionActive:o,edges:u,getNodes:f}=r();let h,p=null;o?h=i.map(m=>Oa(m,!0)):(h=ls(u,i),p=ls(f(),[])),go({changedNodes:p,changedEdges:h,get:r,set:n})},unselectNodesAndEdges:({nodes:i,edges:o}={})=>{const{edges:u,getNodes:f}=r(),h=i||f(),p=o||u,m=h.map(g=>(g.selected=!1,Oa(g.id,!1))),x=p.map(g=>Oa(g.id,!1));go({changedNodes:m,changedEdges:x,get:r,set:n})},setMinZoom:i=>{const{d3Zoom:o,maxZoom:u}=r();o?.scaleExtent([i,u]),n({minZoom:i})},setMaxZoom:i=>{const{d3Zoom:o,minZoom:u}=r();o?.scaleExtent([u,i]),n({maxZoom:i})},setTranslateExtent:i=>{r().d3Zoom?.translateExtent(i),n({translateExtent:i})},resetSelectedElements:()=>{const{edges:i,getNodes:o}=r(),f=o().filter(p=>p.selected).map(p=>Oa(p.id,!1)),h=i.filter(p=>p.selected).map(p=>Oa(p.id,!1));go({changedNodes:f,changedEdges:h,get:r,set:n})},setNodeExtent:i=>{const{nodeInternals:o}=r();o.forEach(u=>{u.positionAbsolute=sf(u.position,i)}),n({nodeExtent:i,nodeInternals:new Map(o)})},panBy:i=>{const{transform:o,width:u,height:f,d3Zoom:h,d3Selection:p,translateExtent:m}=r();if(!h||!p||!i.x&&!i.y)return!1;const x=In.translate(o[0]+i.x,o[1]+i.y).scale(o[2]),g=[[0,0],[u,f]],v=h?.constrain()(x,g,m);return h.transform(p,v),o[0]!==v.x||o[1]!==v.y||o[2]!==v.k},cancelConnection:()=>n({connectionNodeId:Ra.connectionNodeId,connectionHandleId:Ra.connectionHandleId,connectionHandleType:Ra.connectionHandleType,connectionStatus:Ra.connectionStatus,connectionStartHandle:Ra.connectionStartHandle,connectionEndHandle:Ra.connectionEndHandle}),reset:()=>n({...Ra})}),Object.is),Qg=({children:n})=>{const r=N.useRef(null);return r.current||(r.current=SS()),se.createElement(G5,{value:r.current},n)};Qg.displayName="ReactFlowProvider";const Wg=({children:n})=>N.useContext(Vo)?se.createElement(se.Fragment,null,n):se.createElement(Qg,null,n);Wg.displayName="ReactFlowWrapper";const ES={input:Eg,default:Yd,output:kg,group:ff},_S={default:Do,straight:cf,step:of,smoothstep:Go,simplebezier:rf},kS=[0,0],CS=[15,15],TS={x:0,y:0,zoom:1},MS={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},mf=N.forwardRef(({nodes:n,edges:r,defaultNodes:i,defaultEdges:o,className:u,nodeTypes:f=ES,edgeTypes:h=_S,onNodeClick:p,onEdgeClick:m,onInit:x,onMove:g,onMoveStart:v,onMoveEnd:b,onConnect:E,onConnectStart:C,onConnectEnd:k,onClickConnectStart:z,onClickConnectEnd:R,onNodeMouseEnter:Y,onNodeMouseMove:V,onNodeMouseLeave:U,onNodeContextMenu:B,onNodeDoubleClick:G,onNodeDragStart:re,onNodeDrag:ce,onNodeDragStop:le,onNodesDelete:J,onEdgesDelete:ee,onSelectionChange:F,onSelectionDragStart:te,onSelectionDrag:_,onSelectionDragStop:q,onSelectionContextMenu:S,onSelectionStart:D,onSelectionEnd:M,connectionMode:A=fl.Strict,connectionLineType:w=Ha.Bezier,connectionLineStyle:O,connectionLineComponent:L,connectionLineContainerStyle:W,deleteKeyCode:ne="Backspace",selectionKeyCode:fe="Shift",selectionOnDrag:ue=!1,selectionMode:xe=Or.Full,panActivationKeyCode:X="Space",multiSelectionKeyCode:I=Ro()?"Meta":"Control",zoomActivationKeyCode:ae=Ro()?"Meta":"Control",snapToGrid:me=!1,snapGrid:he=CS,onlyRenderVisibleElements:pe=!1,selectNodesOnDrag:ve=!0,nodesDraggable:He,nodesConnectable:Ie,nodesFocusable:ke,nodeOrigin:Ne=kS,edgesFocusable:ct,edgesUpdatable:Wt,elementsSelectable:Nn,defaultViewport:na=TS,minZoom:An=.5,maxZoom:hn=2,translateExtent:aa=Gd,preventScrolling:Ht=!0,nodeExtent:Pe,defaultMarkerColor:St="#b1b1b7",zoomOnScroll:nt=!0,zoomOnPinch:qa=!0,panOnScroll:ut=!1,panOnScrollSpeed:Kt=.5,panOnScrollMode:Jt=ol.Free,zoomOnDoubleClick:Ft=!0,panOnDrag:Tt=!0,onPaneClick:Et,onPaneMouseEnter:Ut,onPaneMouseMove:ys,onPaneMouseLeave:ml,onPaneScroll:la,onPaneContextMenu:$a,children:sa,onEdgeContextMenu:zn,onEdgeDoubleClick:Vr,onEdgeMouseEnter:Gr,onEdgeMouseMove:vs,onEdgeMouseLeave:bs,onEdgeUpdate:Xr,onEdgeUpdateStart:Zo,onEdgeUpdateEnd:jn,onReconnect:dt,onReconnectStart:Nt,onReconnectEnd:ra,reconnectRadius:Ns=10,edgeUpdaterRadius:Qo=10,onNodesChange:Wo,onEdgesChange:Zr,noDragClassName:La="nodrag",noWheelClassName:js="nowheel",noPanClassName:Rn="nopan",fitView:ia=!1,fitViewOptions:Ya,connectOnClick:oa=!0,attributionPosition:at,proOptions:Qr,defaultEdgeOptions:Wr,elevateNodesOnSelect:Dn=!0,elevateEdgesOnSelect:ca=!1,disableKeyboardA11y:Kr=!1,autoPanOnConnect:Jr=!0,autoPanOnNodeDrag:Fr=!0,connectionRadius:Ko=20,isValidConnection:pl,onError:gl,style:xn,id:yl,nodeDragThreshold:Ir,...ua},ws)=>{const Va=yl||"1";return se.createElement("div",{...ua,style:{...xn,...MS},ref:ws,className:bt(["react-flow",u]),"data-testid":"rf__wrapper",id:yl},se.createElement(Wg,null,se.createElement(wS,{onInit:x,onMove:g,onMoveStart:v,onMoveEnd:b,onNodeClick:p,onEdgeClick:m,onNodeMouseEnter:Y,onNodeMouseMove:V,onNodeMouseLeave:U,onNodeContextMenu:B,onNodeDoubleClick:G,nodeTypes:f,edgeTypes:h,connectionLineType:w,connectionLineStyle:O,connectionLineComponent:L,connectionLineContainerStyle:W,selectionKeyCode:fe,selectionOnDrag:ue,selectionMode:xe,deleteKeyCode:ne,multiSelectionKeyCode:I,panActivationKeyCode:X,zoomActivationKeyCode:ae,onlyRenderVisibleElements:pe,selectNodesOnDrag:ve,defaultViewport:na,translateExtent:aa,minZoom:An,maxZoom:hn,preventScrolling:Ht,zoomOnScroll:nt,zoomOnPinch:qa,zoomOnDoubleClick:Ft,panOnScroll:ut,panOnScrollSpeed:Kt,panOnScrollMode:Jt,panOnDrag:Tt,onPaneClick:Et,onPaneMouseEnter:Ut,onPaneMouseMove:ys,onPaneMouseLeave:ml,onPaneScroll:la,onPaneContextMenu:$a,onSelectionContextMenu:S,onSelectionStart:D,onSelectionEnd:M,onEdgeContextMenu:zn,onEdgeDoubleClick:Vr,onEdgeMouseEnter:Gr,onEdgeMouseMove:vs,onEdgeMouseLeave:bs,onReconnect:dt??Xr,onReconnectStart:Nt??Zo,onReconnectEnd:ra??jn,reconnectRadius:Ns??Qo,defaultMarkerColor:St,noDragClassName:La,noWheelClassName:js,noPanClassName:Rn,elevateEdgesOnSelect:ca,rfId:Va,disableKeyboardA11y:Kr,nodeOrigin:Ne,nodeExtent:Pe}),se.createElement(bw,{nodes:n,edges:r,defaultNodes:i,defaultEdges:o,onConnect:E,onConnectStart:C,onConnectEnd:k,onClickConnectStart:z,onClickConnectEnd:R,nodesDraggable:He,nodesConnectable:Ie,nodesFocusable:ke,edgesFocusable:ct,edgesUpdatable:Wt,elementsSelectable:Nn,elevateNodesOnSelect:Dn,minZoom:An,maxZoom:hn,nodeExtent:Pe,onNodesChange:Wo,onEdgesChange:Zr,snapToGrid:me,snapGrid:he,connectionMode:A,translateExtent:aa,connectOnClick:oa,defaultEdgeOptions:Wr,fitView:ia,fitViewOptions:Ya,onNodesDelete:J,onEdgesDelete:ee,onNodeDragStart:re,onNodeDrag:ce,onNodeDragStop:le,onSelectionDrag:_,onSelectionDragStart:te,onSelectionDragStop:q,noPanClassName:Rn,nodeOrigin:Ne,rfId:Va,autoPanOnConnect:Jr,autoPanOnNodeDrag:Fr,onError:gl,connectionRadius:Ko,isValidConnection:pl,nodeDragThreshold:Ir}),se.createElement(yw,{onSelectionChange:F}),sa,se.createElement(Z5,{proOptions:Qr,position:at}),se.createElement(Ew,{rfId:Va,disableKeyboardA11y:Kr})))});mf.displayName="ReactFlow";function Kg(n){return r=>{const[i,o]=N.useState(r),u=N.useCallback(f=>o(h=>n(f,h)),[]);return[i,o,u]}}const Jg=Kg(Og),Fg=Kg(qw),Ig=({id:n,x:r,y:i,width:o,height:u,style:f,color:h,strokeColor:p,strokeWidth:m,className:x,borderRadius:g,shapeRendering:v,onClick:b,selected:E})=>{const{background:C,backgroundColor:k}=f||{},z=h||C||k;return se.createElement("rect",{className:bt(["react-flow__minimap-node",{selected:E},x]),x:r,y:i,rx:g,ry:g,width:o,height:u,fill:z,stroke:p,strokeWidth:m,shapeRendering:v,onClick:b?R=>b(R,n):void 0})};Ig.displayName="MiniMapNode";var AS=N.memo(Ig);const zS=n=>n.nodeOrigin,RS=n=>n.getNodes().filter(r=>!r.hidden&&r.width&&r.height),vd=n=>n instanceof Function?n:()=>n;function DS({nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:i="",nodeBorderRadius:o=5,nodeStrokeWidth:u=2,nodeComponent:f=AS,onClick:h}){const p=Ge(RS,mt),m=Ge(zS),x=vd(r),g=vd(n),v=vd(i),b=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return se.createElement(se.Fragment,null,p.map(E=>{const{x:C,y:k}=ul(E,m).positionAbsolute;return se.createElement(f,{key:E.id,x:C,y:k,width:E.width,height:E.height,style:E.style,selected:E.selected,className:v(E),color:x(E),borderRadius:o,strokeColor:g(E),strokeWidth:u,shapeRendering:b,onClick:h,id:E.id})}))}var OS=N.memo(DS);const HS=200,US=150,BS=n=>{const r=n.getNodes(),i={x:-n.transform[0]/n.transform[2],y:-n.transform[1]/n.transform[2],width:n.width/n.transform[2],height:n.height/n.transform[2]};return{viewBB:i,boundingRect:r.length>0?K5(Xo(r,n.nodeOrigin),i):i,rfId:n.rfId}},qS="react-flow__minimap-desc";function Pg({style:n,className:r,nodeStrokeColor:i="transparent",nodeColor:o="#e2e2e2",nodeClassName:u="",nodeBorderRadius:f=5,nodeStrokeWidth:h=2,nodeComponent:p,maskColor:m="rgb(240, 240, 240, 0.6)",maskStrokeColor:x="none",maskStrokeWidth:g=1,position:v="bottom-right",onClick:b,onNodeClick:E,pannable:C=!1,zoomable:k=!1,ariaLabel:z="React Flow mini map",inversePan:R=!1,zoomStep:Y=10,offsetScale:V=5}){const U=ot(),B=N.useRef(null),{boundingRect:G,viewBB:re,rfId:ce}=Ge(BS,mt),le=n?.width??HS,J=n?.height??US,ee=G.width/le,F=G.height/J,te=Math.max(ee,F),_=te*le,q=te*J,S=V*te,D=G.x-(_-G.width)/2-S,M=G.y-(q-G.height)/2-S,A=_+S*2,w=q+S*2,O=`${qS}-${ce}`,L=N.useRef(0);L.current=te,N.useEffect(()=>{if(B.current){const fe=cn(B.current),ue=I=>{const{transform:ae,d3Selection:me,d3Zoom:he}=U.getState();if(I.sourceEvent.type!=="wheel"||!me||!he)return;const pe=-I.sourceEvent.deltaY*(I.sourceEvent.deltaMode===1?.05:I.sourceEvent.deltaMode?1:.002)*Y,ve=ae[2]*Math.pow(2,pe);he.scaleTo(me,ve)},xe=I=>{const{transform:ae,d3Selection:me,d3Zoom:he,translateExtent:pe,width:ve,height:He}=U.getState();if(I.sourceEvent.type!=="mousemove"||!me||!he)return;const Ie=L.current*Math.max(1,ae[2])*(R?-1:1),ke={x:ae[0]-I.sourceEvent.movementX*Ie,y:ae[1]-I.sourceEvent.movementY*Ie},Ne=[[0,0],[ve,He]],ct=In.translate(ke.x,ke.y).scale(ae[2]),Wt=he.constrain()(ct,Ne,pe);he.transform(me,Wt)},X=ag().on("zoom",C?xe:null).on("zoom.wheel",k?ue:null);return fe.call(X),()=>{fe.on("zoom",null)}}},[C,k,R,Y]);const W=b?fe=>{const ue=yn(fe);b(fe,{x:ue[0],y:ue[1]})}:void 0,ne=E?(fe,ue)=>{const xe=U.getState().nodeInternals.get(ue);E(fe,xe)}:void 0;return se.createElement(af,{position:v,style:n,className:bt(["react-flow__minimap",r]),"data-testid":"rf__minimap"},se.createElement("svg",{width:le,height:J,viewBox:`${D} ${M} ${A} ${w}`,role:"img","aria-labelledby":O,ref:B,onClick:W},z&&se.createElement("title",{id:O},z),se.createElement(OS,{onClick:ne,nodeColor:o,nodeStrokeColor:i,nodeBorderRadius:f,nodeClassName:u,nodeStrokeWidth:h,nodeComponent:p}),se.createElement("path",{className:"react-flow__minimap-mask",d:`M${D-S},${M-S}h${A+S*2}v${w+S*2}h${-A-S*2}z
|
|
361
|
+
M${re.x},${re.y}h${re.width}v${re.height}h${-re.width}z`,fill:m,fillRule:"evenodd",stroke:x,strokeWidth:g,pointerEvents:"none"})))}Pg.displayName="MiniMap";var $S=N.memo(Pg);function LS(){return se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},se.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function YS(){return se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},se.createElement("path",{d:"M0 0h32v4.2H0z"}))}function VS(){return se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},se.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function GS(){return se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},se.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function XS(){return se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},se.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const kr=({children:n,className:r,...i})=>se.createElement("button",{type:"button",className:bt(["react-flow__controls-button",r]),...i},n);kr.displayName="ControlButton";const ZS=n=>({isInteractive:n.nodesDraggable||n.nodesConnectable||n.elementsSelectable,minZoomReached:n.transform[2]<=n.minZoom,maxZoomReached:n.transform[2]>=n.maxZoom}),ey=({style:n,showZoom:r=!0,showFitView:i=!0,showInteractive:o=!0,fitViewOptions:u,onZoomIn:f,onZoomOut:h,onFitView:p,onInteractiveChange:m,className:x,children:g,position:v="bottom-left"})=>{const b=ot(),[E,C]=N.useState(!1),{isInteractive:k,minZoomReached:z,maxZoomReached:R}=Ge(ZS,mt),{zoomIn:Y,zoomOut:V,fitView:U}=hf();if(N.useEffect(()=>{C(!0)},[]),!E)return null;const B=()=>{Y(),f?.()},G=()=>{V(),h?.()},re=()=>{U(u),p?.()},ce=()=>{b.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),m?.(!k)};return se.createElement(af,{className:bt(["react-flow__controls",x]),position:v,style:n,"data-testid":"rf__controls"},r&&se.createElement(se.Fragment,null,se.createElement(kr,{onClick:B,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:R},se.createElement(LS,null)),se.createElement(kr,{onClick:G,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:z},se.createElement(YS,null))),i&&se.createElement(kr,{className:"react-flow__controls-fitview",onClick:re,title:"fit view","aria-label":"fit view"},se.createElement(VS,null)),o&&se.createElement(kr,{className:"react-flow__controls-interactive",onClick:ce,title:"toggle interactivity","aria-label":"toggle interactivity"},k?se.createElement(XS,null):se.createElement(GS,null)),g)};ey.displayName="Controls";var ty=N.memo(ey),Zt;(function(n){n.Lines="lines",n.Dots="dots",n.Cross="cross"})(Zt||(Zt={}));function QS({color:n,dimensions:r,lineWidth:i}){return se.createElement("path",{stroke:n,strokeWidth:i,d:`M${r[0]/2} 0 V${r[1]} M0 ${r[1]/2} H${r[0]}`})}function WS({color:n,radius:r}){return se.createElement("circle",{cx:r,cy:r,r,fill:n})}const KS={[Zt.Dots]:"#91919a",[Zt.Lines]:"#eee",[Zt.Cross]:"#e2e2e2"},JS={[Zt.Dots]:1,[Zt.Lines]:1,[Zt.Cross]:6},FS=n=>({transform:n.transform,patternId:`pattern-${n.rfId}`});function ny({id:n,variant:r=Zt.Dots,gap:i=20,size:o,lineWidth:u=1,offset:f=2,color:h,style:p,className:m}){const x=N.useRef(null),{transform:g,patternId:v}=Ge(FS,mt),b=h||KS[r],E=o||JS[r],C=r===Zt.Dots,k=r===Zt.Cross,z=Array.isArray(i)?i:[i,i],R=[z[0]*g[2]||1,z[1]*g[2]||1],Y=E*g[2],V=k?[Y,Y]:R,U=C?[Y/f,Y/f]:[V[0]/f,V[1]/f];return se.createElement("svg",{className:bt(["react-flow__background",m]),style:{...p,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:x,"data-testid":"rf__background"},se.createElement("pattern",{id:v+n,x:g[0]%R[0],y:g[1]%R[1],width:R[0],height:R[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${U[0]},-${U[1]})`},C?se.createElement(WS,{color:b,radius:Y/f}):se.createElement(QS,{dimensions:V,color:b,lineWidth:u})),se.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${v+n})`}))}ny.displayName="Background";var ay=N.memo(ny);const sp={GET:{bg:"bg-emerald-500/10",text:"text-emerald-400",dot:"#34d399"},POST:{bg:"bg-blue-500/10",text:"text-blue-400",dot:"#60a5fa"},PUT:{bg:"bg-amber-500/10",text:"text-amber-400",dot:"#fbbf24"},PATCH:{bg:"bg-orange-500/10",text:"text-orange-400",dot:"#fb923c"},DELETE:{bg:"bg-red-500/10",text:"text-red-400",dot:"#f87171"},HEAD:{bg:"bg-[var(--bg-overlay-md)]",text:"text-[var(--text-muted)]",dot:"#a1a1aa"},OPTIONS:{bg:"bg-purple-500/10",text:"text-purple-400",dot:"#c084fc"}};function pf(n){return sp[n.toUpperCase()]??sp.GET}function IS({method:n}){const r=pf(n);return s.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-medium tracking-widest ${r.bg} ${r.text}`,children:n.toUpperCase()})}async function PS(){const n=await fetch("/api/workflows");if(!n.ok)throw new Error(`HTTP ${n.status}`);return n.json()}async function e3(n){const r=n.replace(/^workflows\//,"").replace(/\.json$/,""),i=await fetch(`/api/workflows/${encodeURIComponent(r)}`,{method:"DELETE"});if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.error??`HTTP ${i.status}`)}}const t3=230,Xd=64;function n3({data:n}){const r=pf(n.method),i={idle:"border-[var(--border)]",running:"border-blue-500/60",passed:"border-emerald-500/40",failed:"border-red-500/40",skipped:"border-[var(--border)]"},o={idle:"",running:"shadow-[0_0_12px_rgba(96,165,250,0.28)]",passed:"shadow-[0_0_8px_rgba(52,211,153,0.15)]",failed:"shadow-[0_0_8px_rgba(248,113,113,0.15)]",skipped:""},u=n.status??"idle";return s.jsxs("div",{className:`rounded-lg border bg-[var(--bg-overlay)] flex items-center gap-2.5 px-3 overflow-hidden transition-all duration-300 ${i[u]} ${o[u]}`,style:{width:t3,height:Xd},children:[s.jsx(fn,{type:"target",position:ye.Top,style:{background:"transparent",border:"none"}}),s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-[3px] transition-colors duration-300",style:{background:u==="running"?"#60a5fa":u==="passed"?r.dot:u==="failed"?"#f87171":r.dot+"60"}}),s.jsxs("div",{className:"shrink-0 flex items-center justify-center",children:[u==="running"&&s.jsx(Fe,{className:"h-3.5 w-3.5 text-blue-400 animate-spin",strokeWidth:2}),u==="passed"&&s.jsx(vt,{className:"h-3.5 w-3.5 text-emerald-400",strokeWidth:2}),u==="failed"&&s.jsx(kt,{className:"h-3.5 w-3.5 text-red-400",strokeWidth:2}),u==="idle"&&s.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center rounded-full border border-[var(--border)] text-[8px] font-medium text-[var(--text-faint)]",children:n.index+1}),u==="skipped"&&s.jsx("span",{className:"h-3.5 w-3.5 rounded-full border border-[var(--border)] bg-[var(--bg-overlay-md)]"})]}),s.jsxs("div",{className:"min-w-0 flex-1 pl-0.5",children:[s.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[s.jsx("span",{className:`text-[9px] font-medium ${r.text}`,children:n.method}),s.jsx("span",{className:"font-mono text-[10px] text-[var(--text-secondary)] truncate",children:n.path}),n.result&&s.jsxs("span",{className:`ml-auto shrink-0 font-mono text-[9px] ${n.result.passed?"text-emerald-400":"text-red-400"}`,children:[n.result.status>0?n.result.status:"ERR"," · ",n.result.durationMs,"ms"]})]}),s.jsx("p",{className:"text-[9px] text-[var(--text-faint)] truncate",children:n.name})]}),s.jsx(fn,{type:"source",position:ye.Bottom,style:{background:"transparent",border:"none"}})]})}const a3={step:n3};function l3({steps:n,runState:r}){const[i,o,u]=Jg([]),[f,h,p]=Fg([]);return N.useEffect(()=>{const m=n.map((g,v)=>({id:`step-${v}`,type:"step",position:{x:0,y:v*(Xd+36)+40},data:{index:v,name:g.name,method:g.method,path:g.path,status:r.stepStatuses[v]??"idle",result:r.stepResults[v]??null}})),x=n.slice(0,-1).map((g,v)=>{const b=Object.keys(g.capture??{}),E=b.length>0?b.map(k=>k.split(":").pop()).join(", "):void 0,C=r.stepStatuses[v]??"idle";return{id:`e-${v}`,source:`step-${v}`,target:`step-${v+1}`,label:E,labelStyle:{fill:"rgba(96,165,250,0.7)",fontSize:9,fontFamily:"monospace"},labelBgStyle:{fill:"transparent"},style:{stroke:C==="passed"?"rgba(52,211,153,0.3)":C==="failed"?"rgba(248,113,113,0.3)":"rgba(96,165,250,0.18)",strokeWidth:1.5,strokeDasharray:C==="idle"||C==="running"?"5 5":void 0},markerEnd:{type:Ba.ArrowClosed,color:C==="passed"?"rgba(52,211,153,0.4)":"rgba(96,165,250,0.3)"},animated:C==="running"}});o(m),h(x)},[n,r.stepStatuses,r.stepResults]),s.jsx("div",{style:{height:Math.max(400,n.length*(Xd+36)+120)},className:"w-full rounded-lg overflow-hidden",children:s.jsxs(mf,{nodes:i,edges:f,onNodesChange:u,onEdgesChange:p,nodeTypes:a3,fitView:!0,fitViewOptions:{padding:.3},proOptions:{hideAttribution:!0},minZoom:.3,maxZoom:2,children:[s.jsx(ay,{variant:Zt.Dots,gap:20,size:1,color:"var(--border)"}),s.jsx(ty,{showInteractive:!1,style:{background:"var(--bg-overlay)",border:"1px solid var(--border)"}})]})})}function s3({runState:n,steps:r}){const i=N.useRef(null);return N.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[n.stepResults,n.phase]),n.phase==="idle"?null:s.jsxs("div",{className:"mt-3 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)]",children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-[var(--border)] bg-[var(--bg-overlay-md)]",children:[s.jsx("span",{className:"text-[10px] font-semibold text-[var(--text-muted)] uppercase tracking-wider",children:"Run Log"}),n.baseUrl&&s.jsxs("span",{className:"font-mono text-[10px] text-[var(--text-faint)]",children:["→ ",n.baseUrl]}),s.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px]",children:[n.passed>0&&s.jsxs("span",{className:"text-emerald-400",children:[n.passed," passed"]}),n.failed>0&&s.jsxs("span",{className:"text-red-400",children:[n.failed," failed"]}),n.phase==="running"&&s.jsx(Fe,{className:"h-3 w-3 text-blue-400 animate-spin",strokeWidth:2}),n.phase==="done"&&s.jsx(vt,{className:"h-3 w-3 text-emerald-400",strokeWidth:2}),n.phase==="aborted"&&s.jsx(kt,{className:"h-3 w-3 text-red-400",strokeWidth:2})]})]}),s.jsxs("div",{ref:i,className:"overflow-y-auto max-h-80 font-mono text-[11px] p-3 space-y-1",children:[s.jsx("p",{className:"text-[var(--text-faint)]",children:"▶ Starting workflow execution…"}),n.stepResults.map((o,u)=>{if(!o&&n.stepStatuses[u]!=="running")return null;const f=r[u],h=pf(f.method);return n.stepStatuses[u]==="running"?s.jsxs("div",{className:"flex items-center gap-2 text-[var(--text-muted)]",children:[s.jsx(Fe,{className:"h-3 w-3 animate-spin text-blue-400",strokeWidth:2}),s.jsxs("span",{className:"text-[var(--text-faint)]",children:["Step ",u+1,"/",r.length]}),s.jsx("span",{className:h.text,children:f.method}),s.jsx("span",{className:"text-[var(--text-secondary)]",children:f.path}),s.jsx("span",{className:"text-[var(--text-faint)]",children:"…"})]},u):o?s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:o.passed?"text-emerald-400":"text-red-400",children:o.passed?"✓":"✗"}),s.jsxs("span",{className:"text-[var(--text-faint)]",children:["Step ",u+1,"/",r.length]}),s.jsx("span",{className:`${h.text}`,children:f.method.padEnd(6)}),s.jsx("span",{className:"text-[var(--text-secondary)]",children:f.path}),s.jsx("span",{className:`${o.passed?"text-emerald-400":"text-red-400"}`,children:o.status>0?o.status:"NO RESPONSE"}),s.jsxs("span",{className:"text-[var(--text-faint)]",children:[o.durationMs,"ms"]})]}),f.name&&s.jsx("p",{className:"pl-5 text-[var(--text-faint)] italic",children:f.name}),Object.entries(o.injected??{}).filter(([m])=>m!=="Content-Type").map(([m,x])=>s.jsxs("p",{className:"pl-5 text-[var(--text-faint)]",children:["↳ ",s.jsxs("span",{className:"text-amber-500/80",children:[m,":"]})," ",s.jsx("span",{className:"text-[var(--text-faint)]",children:String(x).length>60?String(x).slice(0,57)+"…":x})]},m)),o.captured.map((m,x)=>s.jsxs("p",{className:"pl-5 text-emerald-400",children:["↳ captured ",m]},x)),o.error&&s.jsxs("p",{className:"pl-5 text-red-400",children:["Error: ",o.error]}),!o.passed&&o.responseBody&&!o.error&&s.jsxs("p",{className:"pl-5 text-red-400/80 truncate",children:["Response: ",typeof o.responseBody=="string"?o.responseBody.slice(0,120):JSON.stringify(o.responseBody).slice(0,120)]})]},u):null}),n.phase==="done"&&s.jsxs("p",{className:`mt-1 ${n.failed===0?"text-emerald-400":"text-amber-400"}`,children:["✓ Done — ",n.passed,"/",n.passed+n.failed," steps passed"]}),n.phase==="aborted"&&s.jsxs("p",{className:"mt-1 text-red-400",children:["✗ Aborted — ",n.error]}),n.phase==="error"&&s.jsxs("p",{className:"mt-1 text-red-400",children:["✗ Error — ",n.error]})]})]})}function r3({step:n,index:r,total:i,status:o,result:u}){const[f,h]=N.useState(!1),p=n.capture&&Object.keys(n.capture).length>0,m=n.inject&&Object.keys(n.inject).length>0,x=n.body&&Object.keys(n.body).length>0,g={idle:s.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full border border-[var(--border)] text-[9px] text-[var(--text-faint)]",children:r+1}),running:s.jsx(Fe,{className:"h-5 w-5 text-blue-400 animate-spin",strokeWidth:2}),passed:s.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-emerald-500/10 text-emerald-400",children:s.jsx(vt,{className:"h-3 w-3",strokeWidth:2})}),failed:s.jsx("span",{className:"flex h-5 w-5 items-center justify-center rounded-full bg-red-500/10 text-red-400",children:s.jsx(kt,{className:"h-3 w-3",strokeWidth:2})}),skipped:s.jsx("span",{className:"h-5 w-5 rounded-full border border-[var(--border)] bg-[var(--bg-overlay-md)]"})}[o];return s.jsxs("div",{className:"relative",children:[r<i-1&&s.jsx("div",{className:`absolute left-[19px] top-[38px] bottom-0 w-px z-0 transition-colors duration-500 ${o==="passed"?"bg-emerald-500/20":"bg-[var(--border)]"}`}),s.jsxs("div",{className:"relative z-10",children:[s.jsxs("button",{type:"button",onClick:()=>h(v=>!v),className:"flex w-full items-center gap-3 px-4 py-2.5 hover:bg-[var(--bg-overlay-md)] transition-colors text-left hover:cursor-pointer",children:[s.jsx("span",{className:"shrink-0",children:g}),s.jsx(IS,{method:n.method}),s.jsx("span",{className:"font-mono text-xs text-[var(--text-secondary)] flex-1 truncate",children:n.path}),u&&s.jsxs("span",{className:`font-mono text-[10px] ${u.passed?"text-emerald-400":"text-red-400"}`,children:[u.status>0?u.status:"ERR"," · ",u.durationMs,"ms"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[m&&s.jsx("span",{className:"rounded bg-amber-500/10 px-1 py-0.5 text-[9px] text-amber-400",children:"auth"}),p&&s.jsx("span",{className:"rounded bg-blue-500/10 px-1 py-0.5 text-[9px] text-blue-400",children:"capture"})]}),s.jsx("span",{className:"text-[var(--text-faint)] shrink-0",children:f?s.jsx(Ho,{className:"h-3.5 w-3.5"}):s.jsx(ms,{className:"h-3.5 w-3.5"})})]}),f&&s.jsxs("div",{className:"ml-12 mr-4 my-3 space-y-2.5 rounded-lg border-y border-[var(--border)] bg-[var(--bg-overlay)] p-3",children:[n.description&&s.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:n.description}),u&&s.jsxs("div",{className:`rounded-lg border px-3 py-2 ${u.passed?"border-emerald-500/15 bg-emerald-500/[0.05]":"border-red-500/15 bg-red-500/[0.05]"}`,children:[s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mb-1 uppercase tracking-wider",children:"Response"}),u.error?s.jsx("p",{className:"text-[11px] text-red-400",children:u.error}):s.jsx("pre",{className:"text-[10px] text-[var(--text-muted)] overflow-auto max-h-24 whitespace-pre-wrap break-all",children:typeof u.responseBody=="string"?u.responseBody.slice(0,300):JSON.stringify(u.responseBody,null,2).slice(0,300)})]}),x&&s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mb-1 uppercase tracking-wider",children:"Request Body"}),s.jsx("div",{className:"space-y-1",children:Object.entries(n.body).map(([v,b])=>s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)] px-3 py-1.5",children:[s.jsx("span",{className:"font-mono text-[10px] text-[var(--text-secondary)]",children:v}),s.jsx("span",{className:"font-mono text-[10px] text-blue-400/80 truncate",children:String(b)})]},v))})]}),m&&s.jsxs("div",{children:[s.jsxs("p",{className:"text-[10px] text-[var(--text-faint)] mb-1 uppercase tracking-wider flex items-center gap-1",children:[s.jsx(Np,{className:"h-3 w-3",strokeWidth:2})," Inject"]}),s.jsx("div",{className:"space-y-1",children:Object.entries(n.inject).map(([v,b])=>s.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-amber-500/[0.05] border border-amber-500/15 px-3 py-1.5",children:[s.jsx("span",{className:"font-mono text-[10px] text-amber-400/80",children:v}),s.jsx(rs,{className:"h-3 w-3 text-[var(--text-faint)] shrink-0",strokeWidth:2}),s.jsx("span",{className:"font-mono text-[10px] text-[var(--text-muted)]",children:b})]},v))})]}),p&&s.jsxs("div",{children:[s.jsxs("p",{className:"text-[10px] text-[var(--text-faint)] mb-1 uppercase tracking-wider flex items-center gap-1",children:[s.jsx(Pn,{className:"h-3 w-3",strokeWidth:2})," Capture"]}),s.jsx("div",{className:"space-y-1",children:Object.entries(n.capture).map(([v,b])=>s.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-blue-500/[0.05] border border-blue-500/15 px-3 py-1.5",children:[s.jsx("span",{className:"font-mono text-[10px] text-blue-400",children:v}),s.jsx(rs,{className:"h-3 w-3 text-[var(--text-faint)] shrink-0",strokeWidth:2}),s.jsx("span",{className:"font-mono text-[10px] text-[var(--text-muted)]",children:b})]},v))})]})]})]})]})}function bd(n){return{phase:"idle",currentStep:-1,stepStatuses:Array(n).fill("idle"),stepResults:Array(n).fill(null),passed:0,failed:0}}function i3({workflow:n,onDelete:r,onViewTraces:i}){const[o,u]=N.useState("list"),[f,h]=N.useState(!1),[p,m]=N.useState(!1),[x,g]=N.useState(!1),[v,b]=N.useState(()=>bd(n.steps.length)),[E,C]=N.useState(void 0),[k,z]=N.useState([]),[R,Y]=N.useState(null),[V,U]=N.useState(""),B=N.useRef(!1),G=N.useRef(null),re=N.useRef(""),ce=N.useRef("local-sim");N.useEffect(()=>{fetch("/api/model/environments").then(S=>S.ok?S.json():null).then(S=>{if(!S)return;const D=S.environments??[];z(D);const M=S.defaultEnvironment??D.find(w=>w.default)?.name??D[0]?.name??null;Y(M);const A=D.find(w=>w.name===M);A&&U(A.baseUrl)}).catch(()=>{})},[]);const le=async()=>{if(confirm(`Delete workflow "${n.name}"? This cannot be undone.`)){g(!0);try{await e3(n._file),r()}catch(S){alert(`Failed to delete: ${S.message}`),g(!1)}}},J=()=>{B.current=!0,G.current?.close(),G.current=null,b(S=>({...S,phase:S.phase==="running"?"aborted":S.phase}))},ee=()=>{J(),b(bd(n.steps.length))},F=async(S,D,M)=>{const A=new Date().toISOString(),w={id:crypto.randomUUID(),workflowName:n.name,workflowFile:n._file,startedAt:M,finishedAt:A,durationMs:S.stepResults.reduce((L,W)=>L+(W?.durationMs??0),0),phase:S.phase==="done"?"done":S.phase==="aborted"?"aborted":"error",passed:S.passed,failed:S.failed,baseUrl:S.baseUrl,source:D,steps:n.steps.map((L,W)=>{const ne=S.stepResults[W];return{index:W,name:L.name,method:L.method,path:L.path,description:L.description,status:ne?.status??0,passed:ne?.passed??!1,durationMs:ne?.durationMs??0,captured:Object.fromEntries((ne?.captured??[]).map(fe=>[fe,"(captured)"])),injected:ne?.injected??{},requestBody:L.body,responseBody:ne?.responseBody,error:ne?.error??null,expectStatus:L.expectStatus,captureSpec:L.capture,injectSpec:L.inject}})},O=await F1(w);C(O)},te=()=>{B.current=!1;const S=n.steps.length;b({...bd(S),baseUrl:V||void 0}),C(void 0),re.current=new Date().toISOString(),ce.current="local-sim",h(!0);const D=async()=>{b(w=>({...w,phase:"running",baseUrl:V||w.baseUrl}));let M=0,A=0;for(let w=0;w<S&&!B.current;w++){b(fe=>{const ue=[...fe.stepStatuses];return ue[w]="running",{...fe,stepStatuses:ue,currentStep:w}});const O=600+Math.random()*800;if(await new Promise(fe=>{const ue=setTimeout(fe,O),xe=setInterval(()=>{B.current&&(clearTimeout(ue),clearInterval(xe),fe())},50);setTimeout(()=>clearInterval(xe),O+100)}),B.current)break;const L=!0,W=Math.round(O),ne={index:w,step:{name:n.steps[w].name,method:n.steps[w].method,path:n.steps[w].path,description:n.steps[w].description},status:200,passed:L,durationMs:W,captured:Object.keys(n.steps[w].capture??{}).map(fe=>fe.split(":").pop()??fe),injected:{},responseBody:{simulated:!0},error:null};M++,b(fe=>{const ue=[...fe.stepStatuses],xe=[...fe.stepResults];return ue[w]="passed",xe[w]=ne,{...fe,stepStatuses:ue,stepResults:xe,passed:M,failed:A}})}if(!B.current){const w={phase:"done",stepStatuses:Array(S).fill("passed"),stepResults:n.steps.map((O,L)=>({index:L,step:{name:O.name,method:O.method,path:O.path,description:O.description},status:200,passed:!0,durationMs:Math.round(600+Math.random()*800),captured:Object.keys(O.capture??{}).map(W=>W.split(":").pop()??W),injected:{},responseBody:{simulated:!0},error:null})),passed:M,failed:A};b(O=>({...O,phase:"done",passed:M,failed:A})),F(w,"local-sim",re.current)}};fetch("/api/workflows/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:n._file,baseUrl:V||void 0})}).then(M=>{if(!M.ok||!M.body){D();return}const A=M.body.getReader(),w=new TextDecoder;let O="";b(W=>({...W,phase:"running"})),(async()=>{let W=!1;for(;!B.current;){const{value:ne,done:fe}=await A.read();if(fe)break;W=!0,O+=w.decode(ne,{stream:!0});const ue=O.split(`
|
|
362
|
+
`);O=ue.pop()??"";for(const xe of ue){const X=xe.trim();if(!X.startsWith("data:"))continue;const I=X.slice(5).trim();if(!I)continue;let ae;try{ae=JSON.parse(I)}catch{continue}b(me=>{const he={...me};if(ae.type==="start")he.phase="running",he.baseUrl=ae.baseUrl;else if(ae.type==="step_start"){const pe=ae.index,ve=[...he.stepStatuses];ve[pe]="running",he.stepStatuses=ve,he.currentStep=pe}else if(ae.type==="step_result"){const pe=ae.index,ve=[...he.stepStatuses],He=[...he.stepResults];ve[pe]=ae.passed?"passed":"failed",He[pe]={index:ae.index,step:ae.step??{name:"",method:"",path:""},status:ae.status,passed:ae.passed,durationMs:ae.durationMs,captured:ae.captured??[],injected:ae.injected??{},responseBody:ae.responseBody,error:ae.error??null},ae.passed?he.passed=(he.passed??0)+1:he.failed=(he.failed??0)+1,he.stepStatuses=ve,he.stepResults=He}else if(ae.type==="aborted"){const pe=[...he.stepStatuses];for(let ve=0;ve<pe.length;ve++)pe[ve]==="running"?pe[ve]="failed":pe[ve]==="idle"&&(pe[ve]="skipped");he.stepStatuses=pe,he.phase="aborted",he.error=ae.reason}else ae.type==="done"&&(he.phase="done",(ae.passed>0||ae.failed>0)&&(he.passed=ae.passed,he.failed=ae.failed),F(he,"api",re.current));return he})}}!W&&!B.current&&D()})().catch(()=>{B.current||D()})}).catch(()=>{B.current||D()})},_=v.phase==="running",q=v.phase!=="idle";return s.jsxs("div",{className:"relative",children:[s.jsxs("button",{type:"button",onClick:te,className:"absolute -top-2 -right-2 flex items-center gap-1 rounded-full bg-blue-500 px-2 py-0.5 text-[10px] font-medium text-white shadow-sm z-10 hover:bg-blue-400 transition-colors hover:cursor-pointer",children:[s.jsx(Sd,{size:10})," Run Workflow"]}),s.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 border-b border-[var(--border)]",children:[s.jsx("button",{type:"button",onClick:()=>m(S=>!S),className:"text-blue-400/70 hover:text-blue-400 transition-colors shrink-0 hover:cursor-pointer",children:p?s.jsx(ms,{className:"h-3.5 w-3.5"}):s.jsx(Ho,{className:"h-3.5 w-3.5"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-[var(--text-primary)] truncate",children:n.name}),n.generatedAt&&s.jsxs("p",{className:"flex items-center gap-1 text-[10px] text-[var(--text-faint)] mt-0.5",children:[s.jsx(qr,{className:"h-2.5 w-2.5",strokeWidth:2}),new Date(n.generatedAt).toLocaleString()]})]}),s.jsxs("span",{className:"rounded-full border border-[var(--border)] bg-[var(--bg-overlay-md)] px-2 py-0.5 text-[10px] text-[var(--text-muted)] shrink-0",children:[n.steps.length," steps"]}),q&&s.jsxs("span",{className:`flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] shrink-0 ${v.phase==="done"&&v.failed===0?"bg-emerald-500/10 text-emerald-400":v.phase==="running"?"bg-blue-500/10 text-blue-400":"bg-red-500/10 text-red-400"}`,children:[v.phase==="running"&&s.jsx(Fe,{className:"h-2.5 w-2.5 animate-spin",strokeWidth:2}),v.phase==="done"&&v.failed===0&&s.jsx(vt,{className:"h-2.5 w-2.5",strokeWidth:2}),(v.phase==="done"||v.phase==="aborted")&&v.failed>0&&s.jsx(kt,{className:"h-2.5 w-2.5",strokeWidth:2}),v.phase==="running"?"Running…":v.phase==="done"?`${v.passed}/${v.passed+v.failed}`:v.phase==="aborted"?"Aborted":"Error"]}),!p&&s.jsx("div",{className:"flex items-center gap-0.5 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)] p-0.5 shrink-0",children:["list","graph"].map(S=>s.jsxs("button",{type:"button",onClick:()=>u(S),className:`flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium transition-colors hover:cursor-pointer ${o===S?"bg-blue-500/20 text-blue-400":"text-[var(--text-faint)] hover:text-[var(--text-muted)]"}`,children:[S==="list"?s.jsx(Sp,{className:"h-3 w-3",strokeWidth:2}):s.jsx(bp,{className:"h-3 w-3",strokeWidth:2}),S.charAt(0).toUpperCase()+S.slice(1)]},S))}),q&&!p&&s.jsxs("button",{type:"button",onClick:()=>h(S=>!S),className:`flex items-center gap-1 rounded-lg px-2.5 py-1 text-[10px] transition-colors border border-[var(--border)] hover:cursor-pointer ${f?"bg-[var(--bg-overlay-md)] text-[var(--text-secondary)]":"text-[var(--text-faint)] hover:text-[var(--text-secondary)] bg-[var(--bg-overlay)]"}`,children:[s.jsx(u1,{className:"h-3 w-3",strokeWidth:2})," Log"]}),_&&s.jsxs("button",{type:"button",onClick:J,className:"flex items-center gap-1 rounded-lg border border-red-500/30 bg-red-500/10 px-2.5 py-1 text-[10px] text-red-400 hover:bg-red-500/20 transition-colors shrink-0 hover:cursor-pointer",children:[s.jsx(A1,{className:"h-3 w-3",strokeWidth:2})," Stop"]}),q&&!_&&s.jsxs("button",{type:"button",onClick:ee,className:"flex items-center gap-1 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] px-2.5 py-1 text-[10px] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors shrink-0 hover:cursor-pointer",children:[s.jsx(b1,{className:"h-3 w-3",strokeWidth:2})," Reset"]}),q&&!_&&i&&s.jsxs("button",{type:"button",onClick:()=>i(n.name,E),className:"flex items-center gap-1 rounded-lg border border-blue-500/30 bg-blue-500/10 px-2.5 py-1 text-[10px] text-blue-400 hover:bg-blue-500/20 transition-colors shrink-0 hover:cursor-pointer",children:[s.jsx(Br,{className:"h-3 w-3",strokeWidth:2}),E?"View Trace":"Traces"]}),!_&&s.jsxs("button",{type:"button",onClick:te,className:"hidden items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-1.5 text-[10px] font-medium text-white hover:bg-blue-400 transition-colors shrink-0 hover:cursor-pointer",children:[s.jsx(Sd,{className:"h-3 w-3",strokeWidth:2}),q?"Re-run":"Run"]}),!n._legacy&&!_&&s.jsx("button",{type:"button",onClick:le,disabled:x,title:"Delete workflow",className:"flex items-center gap-1 rounded-lg border border-red-500/20 bg-red-500/[0.06] px-2 py-1 text-[10px] text-red-400/80 hover:bg-red-500/20 hover:text-red-400 transition-colors shrink-0 disabled:opacity-40 hover:cursor-pointer",children:x?s.jsx(Fe,{className:"h-3 w-3 animate-spin",strokeWidth:2}):s.jsx(dn,{className:"h-3 w-3",strokeWidth:2})})]}),!p&&s.jsxs(s.Fragment,{children:[k.length>0&&s.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--border)] px-4 py-2 bg-[var(--bg-overlay-md)] flex-wrap",children:[s.jsx(ps,{className:"h-3 w-3 text-[var(--text-faint)] shrink-0",strokeWidth:2}),s.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] mr-1",children:"Env:"}),k.map(S=>{const D=R===S.name;return s.jsxs("button",{type:"button",onClick:()=>{Y(S.name),U(S.baseUrl)},className:`flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[10px] font-medium transition-all hover:cursor-pointer ${D?"border-blue-500/40 bg-blue-500/10 text-blue-400":"border-[var(--border)] text-[var(--text-faint)] hover:border-blue-500/20 hover:text-[var(--text-muted)]"}`,children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full shrink-0",style:{background:D?"#60a5fa":"var(--text-faint)"}}),S.name]},S.name)}),R&&s.jsx("span",{className:"ml-auto font-mono text-[10px] text-[var(--text-faint)] truncate max-w-[180px]",children:V})]}),f&&s.jsx("div",{className:"border-b border-[var(--border)]",children:s.jsx(s3,{runState:v,steps:n.steps})}),o==="list"&&s.jsx("div",{className:"divide-y divide-[var(--border)]",children:n.steps.map((S,D)=>s.jsx(r3,{step:S,index:D,total:n.steps.length,status:v.stepStatuses[D]??"idle",result:v.stepResults[D]??null},D))}),o==="graph"&&s.jsx("div",{className:"p-4",children:s.jsx(l3,{steps:n.steps,runState:v})})]})]})]})}function o3(){return s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-5 py-20 text-center",children:[s.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 rounded-full bg-blue-500/10 blur-xl"}),s.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full border border-[var(--border)] bg-[var(--bg-overlay)] text-blue-400",children:s.jsx(Qd,{className:"h-7 w-7",strokeWidth:2})})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-[var(--text-primary)]",children:"No workflows yet"}),s.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:["Create one with the"," ",s.jsx("span",{className:"text-[var(--text-secondary)]",children:"+ New Workflow"})," button, or run"," ",s.jsx("code",{className:"text-[var(--text-secondary)]",children:'jetic simulate workflow --goal "..."'})]}),s.jsxs("p",{className:"mt-1 text-[11px] text-[var(--text-faint)]",children:["Workflows are stored in ",s.jsx("code",{className:"text-[var(--text-faint)]",children:".jetic/workflows/"})]})]})]})}function c3({onViewTraces:n}){const[r,i]=N.useState([]),[o,u]=N.useState(!0),[f,h]=N.useState(!1),[p,m]=N.useState(null),[x,g]=N.useState(!1),[v,b]=N.useState(""),[E,C]=N.useState(null),[k,z]=N.useState(!1),R=()=>{g(!1),b(""),C(null)},Y=N.useCallback(async(B=!1)=>{B?h(!0):u(!0),m(null);try{i(await PS())}catch(G){m(G.message)}finally{u(!1),h(!1)}},[]);N.useEffect(()=>{Y()},[Y]);const V=async()=>{if(v.trim()){z(!0),C(null);try{const B=await fetch("/api/workflows/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({goal:v.trim()})}),G=await B.json();if(!B.ok)throw new Error(G.error??`HTTP ${B.status}`);R(),await Y(!0)}catch(B){C(B.message)}finally{z(!1)}}},U=B=>{i(G=>G.filter(re=>re._file!==B))};return s.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-6 py-5",children:[s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-[15px] font-medium text-[var(--text-primary)] leading-none",children:"Simulations"}),s.jsx("p",{className:"mt-0.5 text-[11px] text-[var(--text-muted)]",children:o?"Loading…":`${r.length} workflow${r.length!==1?"s":""} found`})]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[x?s.jsxs("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/20 bg-blue-500/[0.05] p-3 w-80",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-blue-400 font-medium",children:[s.jsx(Pn,{className:"h-3 w-3",strokeWidth:2})," AI Workflow Generator"]}),s.jsx("input",{autoFocus:!0,value:v,onChange:B=>{b(B.target.value),C(null)},onKeyDown:B=>{B.key==="Enter"&&!B.shiftKey&&V(),B.key==="Escape"&&R()},placeholder:"Describe the workflow goal, e.g. Admin creates workspace, invites teacher and logs out",className:"h-7 w-full rounded-lg border border-blue-500/30 bg-[var(--bg-overlay-md)] px-2 text-[11px] text-[var(--text-primary)] placeholder-[var(--text-faint)] outline-none focus:border-blue-500/60"}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("button",{type:"button",onClick:V,disabled:k||!v.trim(),className:"flex h-6 flex-1 items-center justify-center gap-1.5 rounded-lg border border-blue-500/40 bg-blue-500/20 px-2 text-[10px] text-blue-400 hover:bg-blue-500/30 transition-colors disabled:opacity-40 hover:cursor-pointer",children:k?s.jsxs(s.Fragment,{children:[s.jsx(Fe,{className:"h-3 w-3 animate-spin",strokeWidth:2})," AI generating…"]}):s.jsxs(s.Fragment,{children:[s.jsx(Pn,{className:"h-3 w-3",strokeWidth:2})," Generate with AI"]})}),s.jsx("button",{type:"button",onClick:R,className:"flex h-6 w-6 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] text-[var(--text-muted)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:s.jsx(Ct,{className:"h-3 w-3",strokeWidth:2})})]}),E&&s.jsx("span",{className:"text-[10px] text-red-400 leading-tight",children:E})]}):s.jsxs("button",{type:"button",onClick:()=>g(!0),className:"flex h-6 items-center gap-1.5 rounded-lg border border-blue-500/30 bg-blue-500/10 px-2.5 text-[10px] text-blue-400 hover:bg-blue-500/20 transition-colors hover:cursor-pointer",children:[s.jsx(Dt,{className:"h-3 w-3",strokeWidth:2})," New Workflow"]}),s.jsx("button",{type:"button",onClick:()=>Y(!0),disabled:f||o,className:"flex h-6 w-6 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] text-[var(--text-muted)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] disabled:opacity-40 transition-all hover:cursor-pointer",children:s.jsx(gs,{className:`h-3.5 w-3.5 ${f?"animate-spin":""}`,strokeWidth:2})})]})]}),s.jsxs("div",{className:"flex flex-1 flex-col gap-4 p-6",children:[o&&s.jsx("div",{className:"space-y-3",children:[1,2].map(B=>s.jsx("div",{className:"h-16 animate-pulse rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)]",style:{opacity:1-B*.3}},B))}),!o&&p&&s.jsxs("div",{className:"flex flex-col items-center gap-4 rounded-lg border border-red-500/20 bg-red-500/[0.06] p-10 text-center",children:[s.jsx(kt,{className:"h-8 w-8 text-red-400",strokeWidth:2}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-red-300",children:"Could not load simulations"}),s.jsx("p",{className:"mt-1 text-[11px] text-red-400/80",children:p})]}),s.jsx("button",{type:"button",onClick:()=>Y(),className:"rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-1.5 text-[11px] text-red-400 hover:bg-red-500/20 transition-colors hover:cursor-pointer",children:"Retry"})]}),!o&&!p&&r.length===0&&s.jsx(o3,{}),!o&&!p&&r.length>0&&s.jsx("div",{className:"space-y-5",children:r.map((B,G)=>s.jsx(i3,{workflow:B,onDelete:()=>U(B._file),onViewTraces:n?(re,ce)=>n({workflowName:re,traceId:ce}):void 0},`${B._file}-${G}`))}),!o&&!p&&r.length>0&&s.jsxs("div",{className:"flex items-center gap-1.5 border-t border-[var(--border)] pt-3 text-[10px] text-[var(--text-faint)]",children:["Workflows from ",s.jsx("code",{className:"text-[var(--text-faint)]",children:".jetic/workflows/"})]})]})]})}const u3={GET:{bg:"bg-emerald-500/10",text:"text-emerald-400",dot:"#34d399"},POST:{bg:"bg-blue-500/10",text:"text-blue-400",dot:"#60a5fa"},PUT:{bg:"bg-amber-500/10",text:"text-amber-400",dot:"#fbbf24"},PATCH:{bg:"bg-orange-500/10",text:"text-orange-400",dot:"#fb923c"},DELETE:{bg:"bg-red-500/10",text:"text-red-400",dot:"#f87171"},HEAD:{bg:"bg-[var(--bg-overlay-md)]",text:"text-[var(--text-muted)]",dot:"#a1a1aa"},OPTIONS:{bg:"bg-purple-500/10",text:"text-purple-400",dot:"#c084fc"}};function ly(n){return u3[n.toUpperCase()]??{bg:"bg-[var(--bg-overlay-md)]",text:"text-[var(--text-muted)]",dot:"#a1a1aa"}}async function d3(){const n=await fetch("/api/model");if(!n.ok)throw new Error(`HTTP ${n.status}`);return n.json()}async function f3(){const n=await fetch("/api/model/scan",{method:"POST"});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error??`Scan failed (${n.status})`)}return(await n.json()).model}async function h3(n,r){const i=await fetch(`/api/model/endpoint/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok)throw new Error(`Save failed (${i.status})`)}async function x3(n){const r=await fetch("/api/model/endpoint",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const i=await r.json().catch(()=>({}));throw new Error(i.error??`Create failed (${r.status})`)}return r.json()}function m3({method:n}){const r=ly(n);return s.jsx("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[10px] tracking-widest ${r.bg} ${r.text}`,children:n.toUpperCase()})}function rp({value:n,onSave:r,mono:i=!0}){const[o,u]=N.useState(!1),[f,h]=N.useState(n),[p,m]=N.useState(!1),x=N.useRef(null);N.useEffect(()=>{o&&x.current?.focus()},[o]);const g=async()=>{if(f===n){u(!1);return}m(!0);try{await r(f)}finally{m(!1),u(!1)}};return o?s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx("input",{ref:x,value:f,onChange:v=>h(v.target.value),onKeyDown:v=>{v.key==="Enter"&&g(),v.key==="Escape"&&(h(n),u(!1))},className:`rounded border border-blue-500/40 bg-[var(--bg-overlay-md)] px-1.5 py-0.5 text-xs text-[var(--text-primary)] outline-none w-56 ${i?"font-mono":""}`}),s.jsx("button",{type:"button",onClick:g,disabled:p,className:"text-emerald-400 hover:text-emerald-300 hover:cursor-pointer",children:p?s.jsx(Fe,{className:"h-3 w-3 animate-spin"}):s.jsx(vt,{className:"h-3 w-3"})}),s.jsx("button",{type:"button",onClick:()=>{h(n),u(!1)},className:"text-[var(--text-faint)] hover:text-[var(--text-muted)] hover:cursor-pointer",children:s.jsx(Ct,{className:"h-3 w-3"})})]}):s.jsxs("button",{type:"button",onClick:()=>u(!0),className:`group/ie inline-flex items-center gap-1 rounded px-1 py-0.5 hover:bg-[var(--bg-overlay-md)] transition-colors hover:cursor-pointer ${i?"font-mono":""}`,children:[s.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:n}),s.jsx(Kd,{className:"h-2.5 w-2.5 text-[var(--text-faint)] opacity-0 group-hover/ie:opacity-100 transition-opacity"})]})}function p3({ep:n,onUpdate:r,onInspect:i,onViewTraces:o,onEdit:u}){const[f,h]=N.useState(!1),[p,m]=N.useState(""),x=async(b,E)=>{m("");try{await h3(b,E),r(b,E)}catch(C){m(C.message)}},g=n.requestBody?.fields??{},v=n.responses??{};return s.jsxs("div",{className:"border-b border-[var(--border)] last:border-0",children:[s.jsxs("button",{type:"button",onClick:()=>h(b=>!b),className:"group flex w-full items-center gap-3 px-7 py-2.5 hover:bg-[var(--bg-overlay-md)] transition-colors text-left hover:cursor-pointer",children:[s.jsx("span",{className:"shrink-0 text-[var(--text-faint)]",children:f?s.jsx(Ho,{className:"h-3.5 w-3.5"}):s.jsx(ms,{className:"h-3.5 w-3.5"})}),s.jsx(m3,{method:n.method}),s.jsx("span",{className:"font-mono text-xs text-[var(--text-secondary)] flex-1 truncate",children:n.path}),n.security&&n.security.length>0&&s.jsx(us,{className:"h-3 w-3 text-amber-500/60 shrink-0"}),n.deprecated&&s.jsx("span",{className:"rounded text-[9px] font-medium text-amber-500/60 border border-amber-500/20 px-1 py-0.5",children:"deprecated"}),s.jsxs("span",{onClick:b=>{b.stopPropagation(),u(n)},className:"inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[10px] border border-[var(--border)] text-[var(--text-faint)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] hover:cursor-pointer transition-colors",children:[s.jsx(Kd,{className:"h-2.5 w-2.5"})," EDIT"]}),s.jsx("span",{onClick:b=>{b.stopPropagation(),i(n)},className:"inline-flex items-center rounded px-1.5 py-0.5 text-[10px] border border-blue-500/40 text-blue-400 hover:bg-blue-500/10 hover:border-blue-400/60 hover:cursor-pointer transition-colors",children:"INSPECT"}),o&&s.jsxs("span",{onClick:b=>{b.stopPropagation(),o(n.path)},className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] border border-blue-500/30 text-blue-400 hover:bg-blue-500/10 hover:cursor-pointer transition-colors",children:[s.jsx(Br,{className:"h-2.5 w-2.5"})," Traces"]}),s.jsx("span",{className:"hidden sm:block text-[10px] text-[var(--text-faint)] truncate max-w-[180px]",children:n.handlerName})]}),f&&s.jsxs("div",{className:"px-10 pb-4 pt-1 space-y-3 bg-[var(--bg-overlay)]",children:[p&&s.jsx("p",{className:"text-xs text-red-400 rounded border border-red-500/20 bg-red-500/10 px-2 py-1",children:p}),s.jsxs("div",{className:"flex flex-wrap gap-x-6 gap-y-2",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mb-1 uppercase tracking-wider",children:"Method"}),s.jsx("select",{value:n.method,onChange:b=>x(n.id,{method:b.target.value}),className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)] px-2 py-1 text-xs text-[var(--text-secondary)] outline-none hover:cursor-pointer",children:["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].map(b=>s.jsx("option",{children:b},b))})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mb-1 uppercase tracking-wider",children:"Path"}),s.jsx(rp,{value:n.path,onSave:b=>x(n.id,{path:b})})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mb-1 uppercase tracking-wider",children:"Handler"}),s.jsx(rp,{value:n.handlerName??"—",onSave:b=>x(n.id,{handlerName:b}),mono:!1})]})]}),n.source&&s.jsxs("p",{className:"flex items-center gap-1.5 text-[10px] text-[var(--text-faint)]",children:[s.jsx(Wd,{className:"h-3 w-3 shrink-0",strokeWidth:2}),n.source.file.split(/[/\\]/).slice(-2).join("/"),":",n.source.line]}),Object.keys(g).length>0&&s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mb-1.5 uppercase tracking-wider",children:"Request Body"}),s.jsx("div",{className:"space-y-1",children:Object.entries(g).map(([b,E])=>s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)] px-3 py-1.5",children:[s.jsx("span",{className:"font-mono text-[11px] text-[var(--text-secondary)]",children:b}),s.jsx("span",{className:"text-[10px] text-[var(--text-faint)]",children:E.type}),E.required&&s.jsx("span",{className:"text-[10px] text-rose-400",children:"required"})]},b))})]}),Object.keys(v).length>0&&s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mb-1.5 uppercase tracking-wider",children:"Responses"}),s.jsx("div",{className:"space-y-1",children:Object.entries(v).map(([b,E])=>s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)] px-3 py-1.5",children:[s.jsx("span",{className:`font-mono text-[11px] ${b.startsWith("2")?"text-emerald-400":"text-red-400"}`,children:b}),E.schema&&s.jsx("span",{className:"text-[10px] text-[var(--text-muted)]",children:Object.keys(E.schema).join(", ")})]},b))})]}),n.middleware&&n.middleware.length>0&&s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mb-1.5 uppercase tracking-wider",children:"Middleware"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.middleware.map((b,E)=>s.jsx("span",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)] px-2 py-0.5 text-[10px] text-[var(--text-muted)]",children:b.name},E))})]})]})]})}function g3({prefix:n,endpoints:r,onUpdate:i,onInspect:o,onViewTraces:u,onEdit:f}){const[h,p]=N.useState(!1);return s.jsxs("div",{children:[s.jsxs("button",{type:"button",onClick:()=>p(m=>!m),className:"flex w-full items-center gap-3 px-4 py-2 hover:bg-[var(--bg-overlay-md)] transition-colors bg-[var(--bg-overlay)] hover:cursor-pointer",children:[s.jsx("span",{className:"text-blue-400",children:h?s.jsx(ms,{className:"h-3 w-3"}):s.jsx(Ho,{className:"h-3 w-3"})}),s.jsx("span",{className:"font-mono text-xs font-medium text-blue-400",children:n}),s.jsx("span",{className:"ml-auto rounded-full border border-[var(--border)] bg-[var(--bg-overlay-md)] px-2 py-0.5 text-[10px] text-[var(--text-muted)]",children:r.length})]}),s.jsx("div",{className:"flex flex-col overflow-y-auto max-h-[calc(100vh-280px)]",children:!h&&r.map(m=>s.jsx(p3,{ep:m,onUpdate:i,onInspect:o,onViewTraces:u,onEdit:f},m.id))})]})}const ns=210,Sr=52,Nd=100,ip=14,as=36;function y3({endpoints:n}){const r=N.useRef(null),i=new Map;for(const m of n){const x="/"+(m.path.split("/")[1]??"");i.has(x)||i.set(x,[]),i.get(x).push(m)}const o=Array.from(i.entries()),u=Math.max(1,...o.map(([,m])=>m.length)),f=o.length*ns+(o.length-1)*Nd+as*2,h=u*Sr+(u-1)*ip+as*2+24,p=new Map;return o.forEach(([,m],x)=>{const g=as+x*(ns+Nd);m.forEach((v,b)=>{p.set(v.id,{x:g,y:as+24+b*(Sr+ip)})})}),N.useEffect(()=>{const m=r.current;if(!m)return;const x=m.getContext("2d");x&&(x.clearRect(0,0,m.width,m.height),o.forEach(([,g],v)=>{if(v>=o.length-1)return;const b=o[v+1][1];g.forEach(E=>{const C=p.get(E.id);b.forEach(k=>{const z=p.get(k.id),R=C.x+ns,Y=C.y+Sr/2,V=z.x,U=z.y+Sr/2,B=(R+V)/2;x.beginPath(),x.strokeStyle="rgba(96,165,250,0.14)",x.lineWidth=1,x.moveTo(R,Y),x.bezierCurveTo(B,Y,B,U,V,U),x.stroke()})})}))}),s.jsxs("div",{className:"relative overflow-auto",style:{minWidth:f,minHeight:h},children:[s.jsx("canvas",{ref:r,width:f,height:h,className:"absolute inset-0 pointer-events-none"}),o.map(([m],x)=>s.jsx("div",{className:"absolute text-[9px] font-medium text-blue-400/70 uppercase tracking-widest text-center",style:{left:as+x*(ns+Nd),top:as,width:ns},children:m},m)),n.map(m=>{const x=p.get(m.id);if(!x)return null;const g=ly(m.method);return s.jsxs("div",{className:"absolute rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] shadow-md flex items-center gap-2 px-3 overflow-hidden hover:border-blue-500/30 transition-colors",style:{left:x.x,top:x.y,width:ns,height:Sr},children:[s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-[3px]",style:{background:g.dot}}),s.jsx("span",{className:`shrink-0 text-[9px] font-medium ${g.text}`,children:m.method}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"font-mono text-[10px] text-[var(--text-secondary)] truncate",children:m.path}),s.jsx("p",{className:"text-[9px] text-[var(--text-faint)] truncate",children:m.handlerName})]})]},m.id)})]})}function v3({onScan:n,scanning:r,error:i}){return s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-5 py-20 text-center",children:[s.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 rounded-full bg-blue-500/10 blur-xl"}),s.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-full border border-[var(--border)] bg-[var(--bg-overlay)] text-blue-400",children:s.jsx(_o,{className:"h-7 w-7",strokeWidth:2})})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-[var(--text-primary)]",children:"No model found"}),s.jsxs("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:["Scan your project to generate ",s.jsx("code",{className:"text-[var(--text-secondary)]",children:".jetic/model.json"})]})]}),i&&s.jsx("p",{className:"text-xs text-red-400 max-w-xs",children:i}),s.jsxs("button",{type:"button",onClick:n,disabled:r,className:"flex items-center gap-2 rounded-lg bg-blue-500 px-5 py-2.5 text-sm font-medium text-white hover:bg-blue-400 disabled:opacity-50 transition-colors hover:cursor-pointer",children:[r?s.jsx(Fe,{className:"h-4 w-4 animate-spin",strokeWidth:2}):s.jsx(_o,{className:"h-4 w-4",strokeWidth:2}),r?"Scanning project…":"Scan Project"]})]})}const Oo=["application/json","application/x-www-form-urlencoded","multipart/form-data","text/plain","application/xml","application/octet-stream"],sy=["string","integer","number","boolean","array","object"];function b3({open:n,onClose:r,onCreated:i}){const[o,u]=N.useState("basic"),[f,h]=N.useState(!1),[p,m]=N.useState(""),[x,g]=N.useState("GET"),[v,b]=N.useState(""),[E,C]=N.useState(""),[k,z]=N.useState(""),[R,Y]=N.useState(""),[V,U]=N.useState([]),[B,G]=N.useState("application/json"),[re,ce]=N.useState(""),[le,J]=N.useState(""),[ee,F]=N.useState(!1),[te,_]=N.useState([]),[q,S]=N.useState(!1),D=q&&!v.trim(),M=N.useRef(null);N.useEffect(()=>{n&&(u("basic"),g("GET"),b(""),C(""),z(""),Y(""),U([]),G("application/json"),ce(""),J(""),F(!1),_([]),S(!1),m(""),h(!1))},[n]),N.useEffect(()=>{if(!n)return;const I=ae=>{ae.key==="Escape"&&r()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[n,r]);const A=()=>U(I=>[...I,{name:"",in:"query",type:"string",required:!1,description:"",example:""}]),w=(I,ae)=>U(me=>me.map((he,pe)=>pe===I?{...he,...ae}:he)),O=I=>U(ae=>ae.filter((me,he)=>he!==I)),L=()=>_(I=>[...I,{status:"200",description:"",contentType:"application/json",schema:"",example:""}]),W=(I,ae)=>_(me=>me.map((he,pe)=>pe===I?{...he,...ae}:he)),ne=I=>_(ae=>ae.filter((me,he)=>he!==I)),fe=async()=>{if(S(!0),!v.trim()){u("basic");return}h(!0),m("");try{const I={method:x.toUpperCase(),path:v.startsWith("/")?v:"/"+v};E.trim()&&(I.name=E.trim()),k.trim()&&(I.description=k.trim()),R.trim()&&(I.tags=R.split(",").map(pe=>pe.trim()).filter(Boolean));const ae=V.filter(pe=>pe.name.trim());if(ae.length>0&&(I.parameters=ae.map(pe=>{const ve={name:pe.name,in:pe.in,schema:{type:pe.type},required:pe.required};return pe.description.trim()&&(ve.description=pe.description),pe.example.trim()&&(ve.example=pe.example),ve})),re.trim()||le.trim()){const pe={},ve={};if(re.trim())try{ve.schema=JSON.parse(re)}catch{ve.schema=re}if(le.trim())try{ve.example=JSON.parse(le)}catch{ve.example=le}pe[B]=ve,I.requestBody={required:ee,content:pe}}const me=te.filter(pe=>pe.status.trim());if(me.length>0){const pe={};for(const ve of me){const He={};if(ve.description.trim()&&(He.description=ve.description),ve.schema.trim()||ve.example.trim()){const Ie={};if(ve.schema.trim())try{Ie.schema=JSON.parse(ve.schema)}catch{Ie.schema=ve.schema}if(ve.example.trim())try{Ie.example=JSON.parse(ve.example)}catch{Ie.example=ve.example}He.content={[ve.contentType]:Ie}}pe[ve.status]=He}I.responses=pe}const he=await x3(I);i(he.endpoint,he.model),r()}catch(I){m(I.message)}finally{h(!1)}};if(!n)return null;const ue=[{key:"basic",label:"Basic"},{key:"request",label:"Request"},{key:"responses",label:"Responses"}],xe="w-full rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] px-3 py-2 text-xs text-[var(--text-secondary)] placeholder-[var(--text-faint)] outline-none focus:border-blue-500/50 focus:bg-[var(--bg-overlay-md)] transition-all",X="block text-[10px] text-[var(--text-faint)] mb-1.5 uppercase tracking-wider font-medium";return s.jsx("div",{ref:M,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:I=>{I.target===M.current&&r()},children:s.jsxs("div",{className:"relative w-full max-w-2xl max-h-[85vh] flex flex-col rounded-2xl border border-[var(--border-md)] shadow-2xl overflow-hidden",style:{backgroundColor:"var(--bg-surface)"},children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-[var(--border)]",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-blue-500/10",children:s.jsx(Yb,{className:"h-4 w-4 text-blue-400"})}),s.jsx("h2",{className:"text-sm font-medium text-[var(--text-primary)]",children:"Add Endpoint"})]}),s.jsx("button",{type:"button",onClick:r,className:"text-[var(--text-faint)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:s.jsx(Ct,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"flex items-center gap-1 px-6 pt-4 pb-2",children:ue.map(I=>s.jsx("button",{type:"button",onClick:()=>u(I.key),className:`rounded-lg px-3 py-1.5 text-[11px] font-medium transition-all duration-200 hover:cursor-pointer ${o===I.key?"bg-blue-500/15 text-blue-400 shadow-sm":"text-[var(--text-faint)] hover:text-[var(--text-muted)] hover:bg-[var(--bg-overlay)]"}`,children:I.label},I.key))}),p&&s.jsxs("div",{className:"mx-6 mt-2 flex items-center gap-2 rounded-lg border border-red-500/20 bg-red-500/[0.06] px-3 py-2 text-xs text-red-400",children:[s.jsx(kt,{className:"h-3.5 w-3.5 shrink-0"}),p]}),s.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 space-y-4",children:[o==="basic"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:X,children:"Method *"}),s.jsx("select",{value:x,onChange:I=>g(I.target.value),className:`${xe} hover:cursor-pointer`,children:["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].map(I=>s.jsx("option",{children:I},I))})]}),s.jsxs("div",{children:[s.jsx("label",{className:X,children:"Path *"}),s.jsx("input",{value:v,onChange:I=>b(I.target.value),placeholder:"/api/users",className:`${xe} font-mono ${D?"border-red-500/60 focus:border-red-500/80":""}`}),D&&s.jsx("p",{className:"text-[10px] text-red-400 mt-1",children:"Path is required"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:X,children:"Name"}),s.jsx("input",{value:E,onChange:I=>C(I.target.value),placeholder:"Create User",className:xe})]}),s.jsxs("div",{children:[s.jsx("label",{className:X,children:"Description"}),s.jsx("textarea",{value:k,onChange:I=>z(I.target.value),placeholder:"Creates a new user account",rows:2,className:`${xe} resize-none`})]}),s.jsxs("div",{children:[s.jsx("label",{className:X,children:"Tags"}),s.jsx("input",{value:R,onChange:I=>Y(I.target.value),placeholder:"users, auth, public",className:xe}),s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mt-1",children:"Comma-separated"})]})]}),o==="request"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("p",{className:X+" mb-0",children:"Parameters"}),s.jsxs("button",{type:"button",onClick:A,className:"flex items-center gap-1 rounded-lg px-2 py-1 text-[10px] font-medium text-blue-400 hover:bg-blue-500/10 transition-colors hover:cursor-pointer",children:[s.jsx(Dt,{className:"h-3 w-3"})," Add Parameter"]})]}),V.length===0&&s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] italic",children:"No parameters added yet"}),s.jsx("div",{className:"space-y-2",children:V.map((I,ae)=>s.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] p-3 space-y-2",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("div",{className:"flex-1",children:s.jsx("input",{value:I.name,onChange:me=>w(ae,{name:me.target.value}),placeholder:"Parameter name",className:`${xe} font-mono`})}),s.jsx("select",{value:I.in,onChange:me=>w(ae,{in:me.target.value}),className:`${xe} w-28 hover:cursor-pointer`,children:["query","path","header","cookie"].map(me=>s.jsx("option",{children:me},me))}),s.jsx("select",{value:I.type,onChange:me=>w(ae,{type:me.target.value}),className:`${xe} w-28 hover:cursor-pointer`,children:sy.map(me=>s.jsx("option",{children:me},me))}),s.jsx("button",{type:"button",onClick:()=>O(ae),className:"mt-1.5 text-[var(--text-faint)] hover:text-red-400 transition-colors hover:cursor-pointer",children:s.jsx(dn,{className:"h-3.5 w-3.5"})})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] text-[var(--text-muted)] hover:cursor-pointer select-none",children:[s.jsx("input",{type:"checkbox",checked:I.required,onChange:me=>w(ae,{required:me.target.checked}),className:"accent-blue-500"}),"Required"]}),s.jsx("input",{value:I.description,onChange:me=>w(ae,{description:me.target.value}),placeholder:"Description",className:`${xe} flex-1 text-[10px]`}),s.jsx("input",{value:I.example,onChange:me=>w(ae,{example:me.target.value}),placeholder:"Example",className:`${xe} w-32 text-[10px] font-mono`})]})]},ae))})]}),s.jsx("div",{className:"border-t border-[var(--border)]"}),s.jsxs("div",{children:[s.jsx("p",{className:X,children:"Request Body"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:X,children:"Content Type"}),s.jsx("select",{value:B,onChange:I=>G(I.target.value),className:`${xe} hover:cursor-pointer`,children:Oo.map(I=>s.jsx("option",{children:I},I))})]}),s.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] text-[var(--text-muted)] mt-5 hover:cursor-pointer select-none",children:[s.jsx("input",{type:"checkbox",checked:ee,onChange:I=>F(I.target.checked),className:"accent-blue-500"}),"Required"]})]}),s.jsxs("div",{children:[s.jsx("label",{className:X,children:"Schema (JSON)"}),s.jsx("textarea",{value:re,onChange:I=>ce(I.target.value),placeholder:`{
|
|
363
|
+
"type": "object",
|
|
364
|
+
"properties": {
|
|
365
|
+
"email": { "type": "string", "format": "email" },
|
|
366
|
+
"password": { "type": "string" }
|
|
367
|
+
},
|
|
368
|
+
"required": ["email", "password"]
|
|
369
|
+
}`,rows:5,className:`${xe} resize-none font-mono text-[11px] leading-relaxed`})]}),s.jsxs("div",{children:[s.jsx("label",{className:X,children:"Example"}),s.jsx("textarea",{value:le,onChange:I=>J(I.target.value),placeholder:`{
|
|
370
|
+
"email": "test@example.com",
|
|
371
|
+
"password": "password123"
|
|
372
|
+
}`,rows:3,className:`${xe} resize-none font-mono text-[11px] leading-relaxed`})]})]})]})]}),o==="responses"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("p",{className:X+" mb-0",children:"Responses"}),s.jsxs("button",{type:"button",onClick:L,className:"flex items-center gap-1 rounded-lg px-2 py-1 text-[10px] font-medium text-blue-400 hover:bg-blue-500/10 transition-colors hover:cursor-pointer",children:[s.jsx(Dt,{className:"h-3 w-3"})," Add Response"]})]}),te.length===0&&s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] italic",children:'No responses defined yet. Click "Add Response" above.'}),s.jsx("div",{className:"space-y-3",children:te.map((I,ae)=>s.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] p-3 space-y-3",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsxs("div",{className:"w-24",children:[s.jsx("label",{className:X,children:"Status"}),s.jsx("input",{value:I.status,onChange:me=>W(ae,{status:me.target.value}),placeholder:"200",className:`${xe} font-mono`})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:X,children:"Description"}),s.jsx("input",{value:I.description,onChange:me=>W(ae,{description:me.target.value}),placeholder:"Success",className:xe})]}),s.jsxs("div",{className:"w-48",children:[s.jsx("label",{className:X,children:"Content Type"}),s.jsx("select",{value:I.contentType,onChange:me=>W(ae,{contentType:me.target.value}),className:`${xe} hover:cursor-pointer`,children:Oo.map(me=>s.jsx("option",{children:me},me))})]}),s.jsx("button",{type:"button",onClick:()=>ne(ae),className:"mt-5 text-[var(--text-faint)] hover:text-red-400 transition-colors hover:cursor-pointer",children:s.jsx(dn,{className:"h-3.5 w-3.5"})})]}),s.jsxs("div",{children:[s.jsx("label",{className:X,children:"Body Schema (JSON)"}),s.jsx("textarea",{value:I.schema,onChange:me=>W(ae,{schema:me.target.value}),placeholder:`{
|
|
373
|
+
"type": "object",
|
|
374
|
+
"properties": { ... }
|
|
375
|
+
}`,rows:3,className:`${xe} resize-none font-mono text-[11px] leading-relaxed`})]}),s.jsxs("div",{children:[s.jsx("label",{className:X,children:"Example"}),s.jsx("textarea",{value:I.example,onChange:me=>W(ae,{example:me.target.value}),placeholder:`{
|
|
376
|
+
"id": "abc123",
|
|
377
|
+
"email": "test@example.com"
|
|
378
|
+
}`,rows:2,className:`${xe} resize-none font-mono text-[11px] leading-relaxed`})]})]},ae))})]})]}),s.jsxs("div",{className:"flex items-center justify-between border-t border-[var(--border)] px-6 py-4",children:[s.jsxs("p",{className:"text-[10px] text-[var(--text-faint)]",children:["Only ",s.jsx("span",{className:"text-[var(--text-muted)]",children:"Method"})," and ",s.jsx("span",{className:"text-[var(--text-muted)]",children:"Path"})," are required"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:r,className:"rounded-lg border border-[var(--border)] px-4 py-2 text-xs font-medium text-[var(--text-muted)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:"Cancel"}),s.jsxs("button",{type:"button",onClick:fe,disabled:f,className:"flex items-center gap-1.5 rounded-lg bg-blue-500 px-4 py-2 text-xs font-medium text-white hover:bg-blue-400 disabled:opacity-50 transition-colors hover:cursor-pointer",children:[f?s.jsx(Fe,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(Dt,{className:"h-3.5 w-3.5"}),f?"Adding…":"Add Endpoint"]})]})]})]})})}function N3({endpoint:n,onClose:r,onSaved:i}){const[o,u]=N.useState("basic"),[f,h]=N.useState(!1),[p,m]=N.useState(""),[x,g]=N.useState(n.method),[v,b]=N.useState(n.path),[E,C]=N.useState(n.name??""),[k,z]=N.useState(n.description??""),[R,Y]=N.useState((n.tags??[]).join(", ")),[V,U]=N.useState(n.deprecated??!1),[B,G]=N.useState(()=>(n.parameters??[]).filter(X=>X.in!=="body").map(X=>({name:X.name,in:X.in??"query",type:X.type,required:X.required??!1,description:X.description??"",example:X.example?String(X.example):""}))),[re,ce]=N.useState(n.requestBody?.contentType??"application/json"),[le,J]=N.useState(n.requestBody?.required??!1),[ee,F]=N.useState(()=>{const X=n.requestBody?.fields;if(!X||Object.keys(X).length===0)return"";const I={},ae=[];for(const[me,he]of Object.entries(X))I[me]={type:he.type,...he.format?{format:he.format}:{},...he.description?{description:he.description}:{}},he.required&&ae.push(me);return JSON.stringify({type:"object",properties:I,...ae.length>0?{required:ae}:{}},null,2)}),[te,_]=N.useState(""),[q,S]=N.useState(()=>Object.entries(n.responses??{}).map(([X,I])=>({status:X,description:I.description??"",contentType:I.contentType??"application/json",schema:I.schema?JSON.stringify(I.schema,null,2):"",example:""}))),D=N.useRef(null);N.useEffect(()=>{if(!open)return;const X=I=>{I.key==="Escape"&&r()};return window.addEventListener("keydown",X),()=>window.removeEventListener("keydown",X)},[r]);const M=()=>G(X=>[...X,{name:"",in:"query",type:"string",required:!1,description:"",example:""}]),A=(X,I)=>G(ae=>ae.map((me,he)=>he===X?{...me,...I}:me)),w=X=>G(I=>I.filter((ae,me)=>me!==X)),O=()=>S(X=>[...X,{status:"200",description:"",contentType:"application/json",schema:"",example:""}]),L=(X,I)=>S(ae=>ae.map((me,he)=>he===X?{...me,...I}:me)),W=X=>S(I=>I.filter((ae,me)=>me!==X)),ne=async()=>{if(!v.trim()){u("basic");return}h(!0),m("");try{const X={id:n.id,method:x.toUpperCase(),path:v.startsWith("/")?v:"/"+v};E.trim()&&(X.name=E.trim()),k.trim()&&(X.description=k.trim()),R.trim()&&(X.tags=R.split(",").map(he=>he.trim()).filter(Boolean)),V&&(X.deprecated=!0),n.handlerName&&(X.handlerName=n.handlerName),n.source&&(X.source=n.source),n.middleware&&(X.middleware=n.middleware),n.security&&(X.security=n.security);const I=B.filter(he=>he.name.trim());if(I.length>0&&(X.parameters=I.map(he=>({name:he.name,in:he.in,schema:{type:he.type},required:he.required,...he.description?{description:he.description}:{},...he.example?{example:he.example}:{}}))),ee.trim()){const he={};try{he.schema=JSON.parse(ee)}catch{he.schema=ee}if(te.trim())try{he.example=JSON.parse(te)}catch{he.example=te}X.requestBody={required:le,content:{[re]:he}}}const ae=q.filter(he=>he.status.trim());if(ae.length>0){const he={};for(const pe of ae){const ve={};if(pe.description.trim()&&(ve.description=pe.description),pe.schema.trim())try{ve.schema=JSON.parse(pe.schema)}catch{ve.schema=pe.schema}he[pe.status]=ve}X.responses=he}const me=await fetch(`/api/model/endpoint/${n.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(X)});if(!me.ok){const he=await me.json().catch(()=>({}));throw new Error(he.error??`Save failed (${me.status})`)}i({...n,...X})}catch(X){m(X.message)}finally{h(!1)}},fe=[{key:"basic",label:"Basic"},{key:"request",label:"Request"},{key:"responses",label:"Responses"}],ue="w-full rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] px-3 py-2 text-xs text-[var(--text-secondary)] placeholder-[var(--text-faint)] outline-none focus:border-blue-500/50 focus:bg-[var(--bg-overlay-md)] transition-all",xe="block text-[10px] text-[var(--text-faint)] mb-1.5 uppercase tracking-wider font-medium";return s.jsx("div",{ref:D,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:X=>{X.target===D.current&&r()},children:s.jsxs("div",{className:"relative w-full max-w-2xl max-h-[85vh] flex flex-col rounded-2xl border border-[var(--border-md)] shadow-2xl overflow-hidden",style:{backgroundColor:"var(--bg-surface)"},children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-[var(--border)]",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-amber-500/10",children:s.jsx(Kd,{className:"h-4 w-4 text-amber-400"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-sm font-medium text-[var(--text-primary)]",children:"Edit Endpoint"}),s.jsxs("p",{className:"text-[10px] text-[var(--text-faint)] font-mono",children:[n.method," ",n.path]})]})]}),s.jsx("button",{type:"button",onClick:r,className:"text-[var(--text-faint)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:s.jsx(Ct,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"flex items-center gap-1 px-6 pt-4 pb-2",children:fe.map(X=>s.jsx("button",{type:"button",onClick:()=>u(X.key),className:`rounded-lg px-3 py-1.5 text-[11px] font-medium transition-all duration-200 hover:cursor-pointer ${o===X.key?"bg-amber-500/15 text-amber-400 shadow-sm":"text-[var(--text-faint)] hover:text-[var(--text-muted)] hover:bg-[var(--bg-overlay)]"}`,children:X.label},X.key))}),p&&s.jsxs("div",{className:"mx-6 mt-2 flex items-center gap-2 rounded-lg border border-red-500/20 bg-red-500/[0.06] px-3 py-2 text-xs text-red-400",children:[s.jsx(kt,{className:"h-3.5 w-3.5 shrink-0"}),p]}),s.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 space-y-4",children:[o==="basic"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-[140px_1fr] gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:xe,children:"Method *"}),s.jsx("select",{value:x,onChange:X=>g(X.target.value),className:`${ue} hover:cursor-pointer`,children:["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].map(X=>s.jsx("option",{children:X},X))})]}),s.jsxs("div",{children:[s.jsx("label",{className:xe,children:"Path *"}),s.jsx("input",{value:v,onChange:X=>b(X.target.value),placeholder:"/api/users",className:`${ue} font-mono`})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:xe,children:"Name"}),s.jsx("input",{value:E,onChange:X=>C(X.target.value),placeholder:"Create User",className:ue})]}),s.jsxs("div",{children:[s.jsx("label",{className:xe,children:"Description"}),s.jsx("textarea",{value:k,onChange:X=>z(X.target.value),rows:2,className:`${ue} resize-none`})]}),s.jsxs("div",{children:[s.jsx("label",{className:xe,children:"Tags"}),s.jsx("input",{value:R,onChange:X=>Y(X.target.value),placeholder:"users, auth, public",className:ue}),s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] mt-1",children:"Comma-separated"})]}),s.jsxs("label",{className:"flex items-center gap-2 text-[11px] text-[var(--text-muted)] hover:cursor-pointer select-none",children:[s.jsx("input",{type:"checkbox",checked:V,onChange:X=>U(X.target.checked),className:"accent-amber-500"}),"Mark as deprecated"]})]}),o==="request"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("p",{className:xe+" mb-0",children:"Parameters"}),s.jsxs("button",{type:"button",onClick:M,className:"flex items-center gap-1 rounded-lg px-2 py-1 text-[10px] font-medium text-amber-400 hover:bg-amber-500/10 transition-colors hover:cursor-pointer",children:[s.jsx(Dt,{className:"h-3 w-3"})," Add Parameter"]})]}),B.length===0&&s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] italic",children:"No parameters"}),s.jsx("div",{className:"space-y-2",children:B.map((X,I)=>s.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] p-3 space-y-2",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("div",{className:"flex-1",children:s.jsx("input",{value:X.name,onChange:ae=>A(I,{name:ae.target.value}),placeholder:"name",className:`${ue} font-mono`})}),s.jsx("select",{value:X.in,onChange:ae=>A(I,{in:ae.target.value}),className:`${ue} w-28 hover:cursor-pointer`,children:["query","path","header","cookie"].map(ae=>s.jsx("option",{children:ae},ae))}),s.jsx("select",{value:X.type,onChange:ae=>A(I,{type:ae.target.value}),className:`${ue} w-28 hover:cursor-pointer`,children:sy.map(ae=>s.jsx("option",{children:ae},ae))}),s.jsx("button",{type:"button",onClick:()=>w(I),className:"mt-1.5 text-[var(--text-faint)] hover:text-red-400 transition-colors hover:cursor-pointer",children:s.jsx(dn,{className:"h-3.5 w-3.5"})})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] text-[var(--text-muted)] hover:cursor-pointer select-none",children:[s.jsx("input",{type:"checkbox",checked:X.required,onChange:ae=>A(I,{required:ae.target.checked}),className:"accent-amber-500"})," Required"]}),s.jsx("input",{value:X.description,onChange:ae=>A(I,{description:ae.target.value}),placeholder:"Description",className:`${ue} flex-1 text-[10px]`})]})]},I))})]}),s.jsx("div",{className:"border-t border-[var(--border)]"}),s.jsxs("div",{children:[s.jsx("p",{className:xe,children:"Request Body"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:xe,children:"Content Type"}),s.jsx("select",{value:re,onChange:X=>ce(X.target.value),className:`${ue} hover:cursor-pointer`,children:Oo.map(X=>s.jsx("option",{children:X},X))})]}),s.jsxs("label",{className:"flex items-center gap-1.5 text-[10px] text-[var(--text-muted)] mt-5 hover:cursor-pointer select-none",children:[s.jsx("input",{type:"checkbox",checked:le,onChange:X=>J(X.target.checked),className:"accent-amber-500"})," Required"]})]}),s.jsxs("div",{children:[s.jsx("label",{className:xe,children:"Schema (JSON)"}),s.jsx("textarea",{value:ee,onChange:X=>F(X.target.value),rows:5,className:`${ue} resize-none font-mono text-[11px] leading-relaxed`})]}),s.jsxs("div",{children:[s.jsx("label",{className:xe,children:"Example"}),s.jsx("textarea",{value:te,onChange:X=>_(X.target.value),rows:3,className:`${ue} resize-none font-mono text-[11px] leading-relaxed`})]})]})]})]}),o==="responses"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("p",{className:xe+" mb-0",children:"Responses"}),s.jsxs("button",{type:"button",onClick:O,className:"flex items-center gap-1 rounded-lg px-2 py-1 text-[10px] font-medium text-amber-400 hover:bg-amber-500/10 transition-colors hover:cursor-pointer",children:[s.jsx(Dt,{className:"h-3 w-3"})," Add Response"]})]}),q.length===0&&s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] italic",children:"No responses defined."}),s.jsx("div",{className:"space-y-3",children:q.map((X,I)=>s.jsxs("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] p-3 space-y-3",children:[s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsxs("div",{className:"w-24",children:[s.jsx("label",{className:xe,children:"Status"}),s.jsx("input",{value:X.status,onChange:ae=>L(I,{status:ae.target.value}),placeholder:"200",className:`${ue} font-mono`})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:xe,children:"Description"}),s.jsx("input",{value:X.description,onChange:ae=>L(I,{description:ae.target.value}),placeholder:"Success",className:ue})]}),s.jsxs("div",{className:"w-48",children:[s.jsx("label",{className:xe,children:"Content Type"}),s.jsx("select",{value:X.contentType,onChange:ae=>L(I,{contentType:ae.target.value}),className:`${ue} hover:cursor-pointer`,children:Oo.map(ae=>s.jsx("option",{children:ae},ae))})]}),s.jsx("button",{type:"button",onClick:()=>W(I),className:"mt-5 text-[var(--text-faint)] hover:text-red-400 transition-colors hover:cursor-pointer",children:s.jsx(dn,{className:"h-3.5 w-3.5"})})]}),s.jsxs("div",{children:[s.jsx("label",{className:xe,children:"Body Schema (JSON)"}),s.jsx("textarea",{value:X.schema,onChange:ae=>L(I,{schema:ae.target.value}),rows:3,className:`${ue} resize-none font-mono text-[11px] leading-relaxed`})]})]},I))})]})]}),s.jsxs("div",{className:"flex items-center justify-between border-t border-[var(--border)] px-6 py-4",children:[s.jsxs("p",{className:"text-[10px] text-[var(--text-faint)]",children:["ID: ",s.jsx("span",{className:"font-mono",children:n.id})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:r,className:"rounded-lg border border-[var(--border)] px-4 py-2 text-xs font-medium text-[var(--text-muted)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:"Cancel"}),s.jsxs("button",{type:"button",onClick:ne,disabled:f,className:"flex items-center gap-1.5 rounded-lg bg-amber-500 px-4 py-2 text-xs font-medium text-white hover:bg-amber-400 disabled:opacity-50 transition-colors hover:cursor-pointer",children:[f?s.jsx(Fe,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(vt,{className:"h-3.5 w-3.5"}),f?"Saving…":"Save Changes"]})]})]})]})})}function j3({onInspect:n,onViewTraces:r}){const[i,o]=N.useState(null),[u,f]=N.useState(!0),[h,p]=N.useState(!1),[m,x]=N.useState(!1),[g,v]=N.useState(null),[b,E]=N.useState(""),[C,k]=N.useState("list"),[z,R]=N.useState(""),[Y,V]=N.useState(!1),[U,B]=N.useState(null),G=N.useCallback(async(F=!1)=>{F?p(!0):f(!0),v(null);try{o(await d3())}catch(te){v(te.message)}finally{f(!1),p(!1)}},[]);N.useEffect(()=>{G()},[G]);const re=async()=>{x(!0),E("");try{o(await f3())}catch(F){E(F.message)}finally{x(!1)}},ce=(F,te)=>{o(_=>_&&{..._,endpoints:_.endpoints.map(q=>q.id===F?{...q,...te}:q)})},le=(F,te)=>{o(te)},J=(i?.endpoints??[]).filter(F=>!z||F.path.toLowerCase().includes(z.toLowerCase())||F.method.toLowerCase().includes(z.toLowerCase())||(F.handlerName??"").toLowerCase().includes(z.toLowerCase())),ee=new Map;for(const F of J){const te="/"+(F.path.split("/")[1]??"");ee.has(te)||ee.set(te,[]),ee.get(te).push(F)}return s.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-6 py-5",children:[s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-[15px] font-medium text-[var(--text-primary)] leading-none",children:i?.project?.name??"Model"}),s.jsx("p",{className:"mt-0.5 text-[11px] text-[var(--text-muted)]",children:u?"Loading…":i?`v${i.version} · ${i.endpoints.length} endpoints · ${i.project.framework??i.project.language??""}`:"No model generated yet"})]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[i&&s.jsx("div",{className:"flex items-center gap-1 rounded-xl border border-[var(--border)] bg-[var(--bg-overlay)] p-1",children:["list","graph"].map(F=>s.jsxs("button",{type:"button",onClick:()=>k(F),className:`flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-[11px] font-medium transition-all duration-200 hover:cursor-pointer ${C===F?"bg-blue-500/15 text-blue-400 shadow-sm":"text-[var(--text-faint)] hover:text-[var(--text-muted)]"}`,children:[F==="list"?s.jsx(Sp,{className:"h-3.5 w-3.5",strokeWidth:2}):s.jsx(bp,{className:"h-3.5 w-3.5",strokeWidth:2}),F.charAt(0).toUpperCase()+F.slice(1)]},F))}),s.jsx("button",{type:"button",onClick:()=>G(!0),disabled:h||u,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] text-[var(--text-muted)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] disabled:opacity-40 transition-all hover:cursor-pointer",children:s.jsx(gs,{className:`h-3.5 w-3.5 ${h?"animate-spin":""}`,strokeWidth:2})}),s.jsxs("button",{type:"button",onClick:re,disabled:m,className:"flex items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-1.5 text-sm font-medium text-white hover:bg-blue-400 disabled:opacity-50 transition-colors hover:cursor-pointer",children:[m?s.jsx(Fe,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:2}):s.jsx(_o,{className:"h-3.5 w-3.5",strokeWidth:2}),m?"Scanning…":"Re-scan"]}),s.jsxs("button",{type:"button",onClick:()=>V(!0),className:"flex items-center gap-1.5 rounded-lg bg-emerald-500 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-400 transition-colors hover:cursor-pointer",children:[s.jsx(Dt,{className:"h-3.5 w-3.5",strokeWidth:2}),"Add Endpoint"]})]})]}),b&&s.jsxs("div",{className:"flex items-center gap-2 border-b border-red-500/20 bg-red-500/[0.06] px-6 py-2 text-xs text-red-400",children:[s.jsx(kt,{className:"h-3.5 w-3.5 shrink-0",strokeWidth:2}),b,s.jsx("button",{type:"button",onClick:()=>E(""),className:"ml-auto hover:cursor-pointer",children:s.jsx(Ct,{className:"h-3.5 w-3.5",strokeWidth:2})})]}),s.jsxs("div",{className:"flex flex-1 flex-col",children:[u&&s.jsx("div",{className:"space-y-2 p-6",children:[1,2,3,4].map(F=>s.jsx("div",{className:"h-10 animate-pulse rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)]",style:{opacity:1-F*.18}},F))}),!u&&g&&s.jsxs("div",{className:"flex flex-col items-center gap-4 m-6 rounded-lg border border-red-500/20 bg-red-500/[0.06] p-10 text-center",children:[s.jsx(kt,{className:"h-8 w-8 text-red-400",strokeWidth:2}),s.jsx("p",{className:"text-sm text-red-300",children:g}),s.jsx("button",{type:"button",onClick:()=>G(),className:"rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-1.5 text-xs text-red-400 hover:bg-red-500/20 transition-colors hover:cursor-pointer",children:"Retry"})]}),!u&&!g&&!i&&s.jsx(v3,{onScan:re,scanning:m,error:b}),!u&&!g&&i&&C==="graph"&&s.jsx("div",{className:"flex-1 overflow-auto p-6",children:s.jsx(y3,{endpoints:J})}),!u&&!g&&i&&C==="list"&&s.jsxs("div",{className:"flex flex-1 flex-col",children:[s.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] px-6 py-3",children:[s.jsx("input",{value:z,onChange:F=>R(F.target.value),placeholder:"Filter by path, method or handler…",className:"w-full max-w-sm rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] py-1.5 px-3 text-xs text-[var(--text-secondary)] placeholder-[var(--text-faint)] outline-none focus:border-blue-500/50 focus:bg-[var(--bg-overlay-md)] transition-all"}),z&&s.jsx("button",{type:"button",onClick:()=>R(""),className:"text-[var(--text-faint)] hover:text-[var(--text-secondary)] hover:cursor-pointer",children:s.jsx(Ct,{className:"h-3.5 w-3.5",strokeWidth:2})}),s.jsxs("span",{className:"ml-auto text-[10px] text-[var(--text-faint)]",children:[J.length," endpoint",J.length!==1?"s":""]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto max-h-[calc(100vh-170px)] divide-y divide-[var(--border)]",children:[Array.from(ee.entries()).map(([F,te])=>s.jsx(g3,{prefix:F,endpoints:te,onUpdate:ce,onInspect:_=>n?.(_),onViewTraces:r?_=>r({endpointPath:_}):void 0,onEdit:_=>B(_)},F)),J.length===0&&s.jsxs("div",{className:"flex flex-col items-center gap-2 py-12 text-center",children:[s.jsxs("p",{className:"text-sm text-[var(--text-muted)]",children:['No endpoints match "',z,'"']}),s.jsx("button",{type:"button",onClick:()=>R(""),className:"text-xs text-blue-400 hover:text-blue-300 transition-colors hover:cursor-pointer",children:"Clear filter"})]})]}),s.jsxs("div",{className:"flex items-center gap-1.5 border-t border-[var(--border)] px-6 py-2.5 text-[10px] text-[var(--text-faint)]",children:["Generated ",new Date(i.generatedAt).toLocaleString(),s.jsx("span",{className:"ml-auto",children:s.jsx("button",{type:"button",onClick:()=>G(!0),className:"text-[var(--text-faint)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:"Refresh"})})]})]})]}),s.jsx(b3,{open:Y,onClose:()=>V(!1),onCreated:le}),U&&s.jsx(N3,{endpoint:U,onClose:()=>B(null),onSaved:F=>{o(te=>te&&{...te,endpoints:te.endpoints.map(_=>_.id===F.id?F:_)}),B(null)}})]})}const op={GET:{bg:"bg-emerald-500/10",text:"text-emerald-400",border:"border-emerald-500/30"},POST:{bg:"bg-blue-500/10",text:"text-blue-400",border:"border-blue-500/30"},PUT:{bg:"bg-amber-500/10",text:"text-amber-400",border:"border-amber-500/30"},PATCH:{bg:"bg-orange-500/10",text:"text-orange-400",border:"border-orange-500/30"},DELETE:{bg:"bg-red-500/10",text:"text-red-400",border:"border-red-500/30"},HEAD:{bg:"bg-[var(--bg-overlay-md)]",text:"text-[var(--text-muted)]",border:"border-[var(--border)]"},OPTIONS:{bg:"bg-purple-500/10",text:"text-purple-400",border:"border-purple-500/30"}};function w3(n){return op[n.toUpperCase()]??op.GET}function Zd({method:n,size:r="md"}){const i=w3(n);return s.jsx("span",{className:`inline-flex items-center rounded font-medium tracking-widest border ${i.bg} ${i.text} ${i.border} ${r==="sm"?"px-1.5 py-0.5 text-[10px]":"px-2 py-0.5 text-[11px]"}`,children:n.toUpperCase()})}function cp(n,r,i){const o=n.toLowerCase();return o.includes("email")?"user@example.com":o.includes("name")?"Jane Doe":o.includes("username")?"jane_doe":o.includes("password")?"P@ssw0rd123!":o.includes("phone")?"+14155552671":o.includes("url")?"https://example.com":o.includes("id")?Math.random().toString(36).slice(2,10):o.includes("date")||i==="date"?new Date().toISOString().split("T")[0]:o.includes("time")||i==="date-time"?new Date().toISOString():r==="integer"||r==="number"?String(Math.floor(Math.random()*100)+1):r==="boolean"?"true":r==="array"?"[]":r==="object"?"{}":`fake_${o}`}function ss({children:n,className:r=""}){return s.jsx("div",{className:`rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] overflow-hidden ${r}`,children:n})}function Cr({icon:n,label:r,count:i,action:o}){return s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-[var(--border)] px-4 py-2.5 bg-[var(--bg-overlay-md)]",children:[s.jsx(n,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2}),s.jsx("span",{className:"text-[11px] font-semibold tracking-wider text-[var(--text-faint)] uppercase",children:r}),i!==void 0&&s.jsx("span",{className:"rounded-full border border-[var(--border)] bg-[var(--bg-overlay)] px-2 py-0.5 text-[10px] text-[var(--text-muted)]",children:i}),o&&s.jsx("div",{className:"ml-auto",children:o})]})}function S3({endpoint:n}){const[r,i]=N.useState(null),[o,u]=N.useState(1),[f,h]=N.useState(!1),[p,m]=N.useState(""),x=N.useCallback(async()=>{if(n.source){h(!0),m(""),i(null);try{const E=await fetch(`/api/model/source?file=${encodeURIComponent(n.source.file)}&line=${n.source.line}`);if(!E.ok){if((E.headers.get("content-type")??"").includes("application/json")){const z=await E.json().catch(()=>({}));throw new Error(z.error??`HTTP ${E.status}`)}throw new Error(`HTTP ${E.status}`)}if((E.headers.get("content-type")??"").includes("application/json")){const k=await E.json();i(k.source??k.content??""),u(k.startLine??1)}else i(await E.text()),u(1)}catch(E){m(E.message)}finally{h(!1)}}},[n]);if(N.useEffect(()=>{x()},[x]),!n.source)return null;const g=n.source.file.split(/[/\\]/).slice(-3).join("/"),v=r?r.split(`
|
|
379
|
+
`):[],b=n.source.line-o;return s.jsxs(ss,{children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-[var(--border)] px-4 py-2.5 bg-[var(--bg-overlay-md)]",children:[s.jsx(Wd,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2}),s.jsx("span",{className:"text-[11px] font-semibold tracking-wider text-[var(--text-faint)] uppercase",children:"Source"}),s.jsx("span",{className:"ml-2 font-mono text-[11px] text-[var(--text-muted)] truncate",children:g}),s.jsxs("span",{className:"rounded border border-[var(--border)] bg-[var(--bg-overlay)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--text-secondary)]",children:[":",n.source.line]}),s.jsx("button",{type:"button",onClick:x,disabled:f,className:"ml-auto flex h-6 w-6 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] text-[var(--text-muted)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:s.jsx(gs,{className:`h-3 w-3 ${f?"animate-spin":""}`,strokeWidth:2})})]}),s.jsxs("div",{className:"relative bg-[var(--sidebar-bg)]",children:[f&&s.jsxs("div",{className:"flex items-center gap-2 px-4 py-4 text-[11px] text-[var(--text-muted)]",children:[s.jsx(Fe,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:2})," Loading source…"]}),p&&s.jsxs("div",{className:"flex items-start gap-2 px-4 py-3 text-[11px] text-red-400",children:[s.jsx(kt,{className:"h-3.5 w-3.5 mt-0.5 shrink-0",strokeWidth:2}),s.jsxs("span",{children:["Source unavailable — ",p]})]}),r&&!f&&s.jsx("div",{className:"overflow-auto max-h-[340px]",children:s.jsx("table",{className:"w-full border-collapse",children:s.jsx("tbody",{children:v.map((E,C)=>{const k=o+C,z=C===b;return s.jsxs("tr",{className:z?"bg-blue-500/[0.08]":"hover:bg-[var(--bg-overlay-md)]",children:[s.jsx("td",{className:`select-none w-12 px-3 py-0 text-right font-mono text-[10px] border-r border-[var(--border)] leading-5 ${z?"text-blue-400":"text-[var(--text-faint)]"}`,children:k}),s.jsx("td",{className:`px-4 py-0 font-mono text-[11px] whitespace-pre leading-5 ${z?"text-[var(--text-primary)]":"text-[var(--text-muted)]"}`,children:E||" "})]},C)})})})})]})]})}function E3({endpoint:n}){const[r,i]=N.useState([]),[o,u]=N.useState(!0),[f,h]=N.useState("");N.useEffect(()=>{u(!0),h(""),i([]),fetch(`/api/model/related?id=${encodeURIComponent(n.id)}`).then(m=>{const x=m.headers.get("content-type")??"";if(!m.ok||!x.includes("application/json"))throw new Error(`HTTP ${m.status}`);return m.json()}).then(m=>i(m?.files??[])).catch(m=>h(m.message)).finally(()=>u(!1))},[n.id]);const p={ts:"text-blue-400",tsx:"text-cyan-400",js:"text-amber-400",jsx:"text-amber-300",json:"text-emerald-400"};return s.jsxs(ss,{children:[s.jsx(Cr,{icon:vp,label:"Related Files",count:!o&&!f?r.length:void 0}),s.jsxs("div",{className:"divide-y divide-[var(--border)]",children:[o&&s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 text-[11px] text-[var(--text-muted)]",children:[s.jsx(Fe,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:2})," Resolving files…"]}),!o&&f&&s.jsxs("div",{className:"flex items-start gap-2 px-4 py-3 text-[11px] text-red-400",children:[s.jsx(kt,{className:"h-3.5 w-3.5 mt-0.5 shrink-0",strokeWidth:2}),s.jsxs("span",{children:["Could not resolve — ",f]})]}),!o&&!f&&r.length===0&&s.jsx("p",{className:"px-4 py-4 text-[12px] text-[var(--text-faint)] italic",children:"No related files resolved"}),r.map(m=>{const x=m.split(/[/\\]/),g=x.pop()??m,v=x.slice(-2).join("/"),b=g.split(".").pop()??"",E=p[b]??"text-[var(--text-faint)]";return s.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5 hover:bg-[var(--bg-overlay-md)] transition-colors",children:[s.jsx(Uo,{className:`h-[15px] w-[15px] shrink-0 ${E}`,strokeWidth:2}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"text-[13px] text-[var(--text-secondary)] truncate",children:g}),v&&s.jsx("p",{className:"text-[10px] text-[var(--text-faint)] truncate font-mono",children:v})]}),s.jsxs("span",{className:`shrink-0 rounded border border-[var(--border)] bg-[var(--bg-overlay-md)] px-1.5 py-0.5 text-[10px] font-mono ${E}`,children:[".",b]})]},m)})]})]})}function up({endpoint:n}){const[r,i]=N.useState("fake"),[o,u]=N.useState(""),[f,h]=N.useState({}),[p,m]=N.useState(!1),[x,g]=N.useState(null),[v,b]=N.useState("http://localhost:3000"),[E,C]=N.useState([]),[k,z]=N.useState(null),[R,Y]=N.useState(!1);N.useEffect(()=>{fetch("/api/model/environments").then(J=>J.ok?J.json():null).then(J=>{if(!J)return;C(J.environments??[]);const ee=J.defaultEnvironment??J.environments?.find(te=>te.default)?.name??J.environments?.[0]?.name??null;z(ee);const F=(J.environments??[]).find(te=>te.name===ee);F&&b(F.baseUrl)}).catch(()=>{}).finally(()=>Y(!0))},[]);const V=n.requestBody?.fields??{},U=(n.security?.length??0)>0,B=["POST","PUT","PATCH"].includes(n.method.toUpperCase());N.useEffect(()=>{g(null),h({})},[n.id]);const G=()=>{const J={};for(const[ee,F]of Object.entries(V))J[ee]=cp(ee,F.type,F.format);return J},re=()=>{const J={};for(const[ee,F]of Object.entries(V)){const te=f[ee]??"";te&&(F.type==="integer"||F.type==="number"?J[ee]=Number(te):F.type==="boolean"?J[ee]=te.toLowerCase()==="true":J[ee]=te)}return J},ce=async()=>{m(!0),g(null);const J=Date.now();try{const ee=r==="fake"?G():re(),F={};(B||r==="fake")&&(F["Content-Type"]="application/json"),o&&(F.Authorization=`Bearer ${o}`);const te=`${v}${n.path}`,_=await fetch(te,{method:n.method.toUpperCase(),headers:F,body:B?JSON.stringify(ee):void 0}),q=Date.now()-J;let S;try{S=await _.json()}catch{S=await _.text().catch(()=>"(no body)")}g({status:_.status,body:S,durationMs:q})}catch(ee){g({status:0,body:null,durationMs:Date.now()-J,error:ee.message})}finally{m(!1)}},le=x&&x.status>=200&&x.status<300;return s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] px-3 py-2",children:[s.jsx(Zd,{method:n.method,size:"sm"}),s.jsx("code",{className:"font-mono text-[12px] text-[var(--text-secondary)] truncate",children:n.path})]}),s.jsx("p",{className:"hidden",children:R}),s.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-[var(--border)] bg-[var(--bg-overlay)] p-1",children:[s.jsxs("button",{type:"button",onClick:()=>i("fake"),className:`flex flex-1 items-center justify-center gap-1.5 rounded-lg py-1.5 text-[11px] font-medium transition-all duration-200 hover:cursor-pointer ${r==="fake"?"bg-blue-500/15 text-blue-400 shadow-sm":"text-[var(--text-faint)] hover:text-[var(--text-muted)]"}`,children:[s.jsx(Pn,{className:"h-3 w-3 shrink-0",strokeWidth:2}),"Fake Data"]}),s.jsxs("button",{type:"button",onClick:()=>i("real"),className:`flex flex-1 items-center justify-center gap-1.5 rounded-lg py-1.5 text-[11px] font-medium transition-all duration-200 hover:cursor-pointer ${r==="real"?"bg-blue-500/15 text-blue-400 shadow-sm":"text-[var(--text-faint)] hover:text-[var(--text-muted)]"}`,children:[s.jsx(_d,{className:"h-3 w-3 shrink-0",strokeWidth:2}),"Real Data"]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)]",children:"Base URL"}),E.length>0?s.jsx("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] overflow-hidden",children:E.map(J=>{const ee=k===J.name;return s.jsxs("button",{type:"button",onClick:()=>{z(J.name),b(J.baseUrl)},className:`group flex w-full items-center gap-2.5 px-3 py-2 text-left transition-colors hover:cursor-pointer ${ee?"bg-blue-500/10":"hover:bg-[var(--bg-overlay-md)]"}`,style:{borderTop:"1px solid var(--border)"},children:[s.jsx("div",{className:"flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors",style:{borderColor:ee?"#60a5fa":"var(--border)",backgroundColor:ee?"#60a5fa22":"transparent"},children:ee&&s.jsx(vt,{className:"h-2.5 w-2.5 text-blue-400",strokeWidth:3})}),s.jsx(ps,{className:`h-3 w-3 shrink-0 ${ee?"text-blue-400":"text-[var(--text-faint)]"}`,strokeWidth:2}),s.jsx("span",{className:`text-[11px] w-14 shrink-0 font-medium ${ee?"text-blue-400":"text-[var(--text-muted)]"}`,children:J.name}),s.jsx("span",{className:"font-mono text-[11px] text-[var(--text-faint)] truncate",children:J.baseUrl})]},J.name)})}):s.jsx("input",{value:v,onChange:J=>b(J.target.value),className:"w-full rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] px-3 py-1.5 font-mono text-[12px] text-[var(--text-primary)] outline-none focus:border-blue-500/50 focus:bg-[var(--bg-overlay-md)] placeholder-[var(--text-faint)] transition-colors",placeholder:"http://localhost:3000"})]}),(U||r==="real")&&s.jsxs("label",{className:"flex flex-col gap-1.5",children:[s.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] flex items-center gap-1",children:[s.jsx(Np,{className:"h-3 w-3",strokeWidth:2})," Bearer Token"]}),s.jsx("input",{type:"password",value:o,onChange:J=>u(J.target.value),className:"w-full rounded-lg border border-amber-500/25 bg-amber-500/[0.04] px-3 py-1.5 font-mono text-[12px] text-[var(--text-primary)] outline-none focus:border-amber-400/50 focus:bg-amber-500/[0.07] placeholder-[var(--text-faint)] transition-colors",placeholder:"Optional"})]}),r==="fake"&&Object.keys(V).length>0&&s.jsxs("div",{children:[s.jsxs("p",{className:"mb-2 text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] flex items-center gap-1.5",children:[s.jsx(Pn,{className:"h-3 w-3 text-blue-400",strokeWidth:2})," Auto-generated body"]}),s.jsx("div",{className:"space-y-1",children:Object.entries(V).map(([J,ee])=>s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] px-3 py-2",children:[s.jsx("span",{className:"text-[11px] text-[var(--text-secondary)] w-20 truncate shrink-0",children:J}),s.jsx("span",{className:"text-[11px] text-[var(--text-faint)] shrink-0",children:ee.type}),s.jsx("span",{className:"ml-auto font-mono text-[11px] text-blue-400/80 truncate",children:cp(J,ee.type,ee.format)})]},J))})]}),r==="real"&&Object.keys(V).length>0&&s.jsxs("div",{children:[s.jsxs("p",{className:"mb-2 text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] flex items-center gap-1.5",children:[s.jsx(_d,{className:"h-3 w-3 text-blue-400",strokeWidth:2})," Request body"]}),s.jsx("div",{className:"space-y-2",children:Object.entries(V).map(([J,ee])=>s.jsxs("label",{className:"flex flex-col gap-1",children:[s.jsxs("span",{className:"text-[11px] text-[var(--text-secondary)]",children:[J,ee.required&&s.jsx("span",{className:"ml-1 text-[10px] text-rose-400",children:"*"})]}),s.jsx("input",{value:f[J]??"",onChange:F=>h(te=>({...te,[J]:F.target.value})),placeholder:`${ee.type}${ee.format?` (${ee.format})`:""}`,className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] px-3 py-1.5 font-mono text-[12px] text-[var(--text-primary)] outline-none focus:border-blue-500/50 focus:bg-[var(--bg-overlay-md)] placeholder-[var(--text-faint)] transition-colors"})]},J))})]}),r==="real"&&Object.keys(V).length===0&&!B&&s.jsxs("p",{className:"text-[12px] text-[var(--text-faint)] italic",children:["No body required for ",n.method.toUpperCase()," requests."]}),s.jsxs("button",{type:"button",onClick:ce,disabled:p,className:"flex w-full items-center justify-center gap-2 rounded-lg border border-[var(--border)] bg-blue-500 py-2 text-[12px] font-medium text-white hover:bg-blue-400 disabled:opacity-50 transition-colors hover:cursor-pointer",children:[p?s.jsx(Fe,{className:"h-[15px] w-[15px] animate-spin",strokeWidth:2}):s.jsx(Sd,{className:"h-[15px] w-[15px]",strokeWidth:2}),p?"Sending…":`Run ${r==="fake"?"with Fake Data":"with Real Data"}`]}),x&&s.jsxs("div",{className:`rounded-lg border overflow-hidden ${le?"border-emerald-500/25 bg-emerald-500/[0.05]":"border-red-500/25 bg-red-500/[0.05]"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-[var(--border)]",children:[le?s.jsx(vt,{className:"h-[15px] w-[15px] text-emerald-400",strokeWidth:2}):s.jsx(kt,{className:"h-[15px] w-[15px] text-red-400",strokeWidth:2}),s.jsx("span",{className:`text-[12px] font-medium ${le?"text-emerald-400":"text-red-400"}`,children:x.status>0?x.status:"Error"}),s.jsxs("span",{className:"text-[11px] text-[var(--text-faint)]",children:[x.durationMs,"ms"]}),s.jsx("button",{type:"button",onClick:()=>g(null),className:"ml-auto flex h-6 w-6 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] text-[var(--text-faint)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:s.jsx(Ct,{className:"h-3 w-3",strokeWidth:2})})]}),x.error&&s.jsx("p",{className:"px-3 py-2.5 text-[12px] text-red-400",children:x.error}),!x.error&&x.body!=null&&s.jsx("pre",{className:"overflow-auto max-h-72 p-3 text-[11px] text-[var(--text-muted)] whitespace-pre-wrap break-all leading-5",children:typeof x.body=="string"?x.body:JSON.stringify(x.body,null,2)})]})]})}const _3=({endpoint:n,onBack:r})=>{if(!n)return s.jsxs("div",{className:"flex min-h-full w-full flex-col items-center justify-center gap-5 text-center p-12",children:[s.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 rounded-full bg-blue-500/10 blur-xl"}),s.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] text-blue-400",children:s.jsx(Wd,{className:"h-7 w-7",strokeWidth:2})})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[13.5px] font-medium text-[var(--text-primary)]",children:"No endpoint selected"}),s.jsxs("p",{className:"mt-1 text-[12px] text-[var(--text-muted)]",children:["Click ",s.jsx("span",{className:"text-blue-400 font-medium",children:"INSPECT"})," on any endpoint in the Model view."]})]}),s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] px-4 py-2 text-[12px] text-[var(--text-muted)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:[s.jsx(i0,{className:"h-[15px] w-[15px]",strokeWidth:2})," Back to Model"]})]});const i=n.requestBody?.fields??{},o=n.responses??{},u=Object.keys(i).length>0,f=Object.keys(o).length>0,h=(n.security?.length??0)>0,p=(n.middleware?.length??0)>0,m=n.source?n.source.file.split(/[/\\]/).slice(-3).join("/")+":"+n.source.line:null;return s.jsxs("div",{className:"flex min-h-full w-full",children:[s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[s.jsxs("div",{className:"flex items-center gap-4 border-b border-[var(--border)] px-6 py-5",children:[s.jsx("button",{type:"button",onClick:r,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] text-[var(--text-muted)] hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] transition-colors hover:cursor-pointer",children:s.jsx(i0,{className:"h-[15px] w-[15px]",strokeWidth:2})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Zd,{method:n.method}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("h1",{className:"text-[13.5px] font-medium text-[var(--text-primary)] leading-none truncate",children:n.path}),n.handlerName&&s.jsx("p",{className:"mt-0.5 text-[11px] text-[var(--text-muted)] truncate",children:n.handlerName})]})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[h&&s.jsxs("span",{className:"flex items-center gap-1.5 rounded-lg border border-amber-500/25 bg-amber-500/[0.07] px-2.5 py-1 text-[11px] text-amber-400",children:[s.jsx(us,{className:"h-[15px] w-[15px]",strokeWidth:2}),n.security[0].scheme]}),m&&s.jsx("span",{className:"hidden sm:block font-mono text-[11px] text-[var(--text-faint)] truncate max-w-[200px]",children:m})]})]}),s.jsxs("div",{className:"flex-1 overflow-auto p-6 space-y-4",children:[s.jsxs(ss,{children:[s.jsx(Cr,{icon:vp,label:"Details"}),s.jsxs("div",{className:"p-4 grid grid-cols-2 sm:grid-cols-3 gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] mb-1.5",children:"Method"}),s.jsx(Zd,{method:n.method})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] mb-1.5",children:"Path"}),s.jsx("code",{className:"font-mono text-[12px] text-[var(--text-secondary)]",children:n.path})]}),n.handlerName&&s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] mb-1.5",children:"Handler"}),s.jsx("code",{className:"font-mono text-[12px] text-[var(--text-muted)]",children:n.handlerName})]}),n.source&&s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] mb-1.5",children:"Source"}),s.jsx("code",{className:"font-mono text-[11px] text-[var(--text-faint)]",children:m})]}),n.requestBody?.contentType&&s.jsxs("div",{children:[s.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] mb-1.5",children:"Content-Type"}),s.jsx("code",{className:"font-mono text-[11px] text-[var(--text-faint)]",children:n.requestBody.contentType})]}),p&&s.jsxs("div",{className:"col-span-2 sm:col-span-3",children:[s.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)] mb-1.5",children:"Middleware"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.middleware.map((x,g)=>s.jsx("span",{className:"rounded-lg border border-[var(--border)] bg-[var(--bg-overlay-md)] px-2.5 py-0.5 text-[11px] text-[var(--text-secondary)]",children:x.name},g))})]})]})]}),u&&s.jsxs(ss,{children:[s.jsx(Cr,{icon:_d,label:"Request Body",count:Object.keys(i).length}),s.jsxs("div",{className:"p-4 space-y-1.5",children:[s.jsxs("div",{className:"flex items-center gap-4 px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[var(--text-faint)]",children:[s.jsx("span",{className:"w-28",children:"Field"}),s.jsx("span",{className:"w-16",children:"Type"}),s.jsx("span",{children:"Format"}),s.jsx("span",{className:"ml-auto",children:"Required"})]}),Object.entries(i).map(([x,g])=>s.jsxs("div",{className:"flex items-center gap-4 rounded-lg border border-[var(--border)] bg-[var(--bg-overlay)] px-3 py-2 hover:bg-[var(--bg-overlay-md)] transition-colors",children:[s.jsx("span",{className:"w-28 shrink-0 font-mono text-[12px] text-[var(--text-primary)] truncate",children:x}),s.jsx("span",{className:"w-16 shrink-0 text-[11px] text-blue-400",children:g.type}),s.jsx("span",{className:"flex-1 text-[11px] text-[var(--text-faint)]",children:g.format??"—"}),g.required?s.jsx("span",{className:"ml-auto shrink-0 rounded border border-rose-500/25 bg-rose-500/10 px-1.5 py-0.5 text-[10px] text-rose-400",children:"required"}):s.jsx("span",{className:"ml-auto shrink-0 text-[10px] text-[var(--text-faint)]",children:"optional"})]},x))]})]}),f&&s.jsxs(ss,{children:[s.jsx(Cr,{icon:vt,label:"Responses",count:Object.keys(o).length}),s.jsx("div",{className:"p-4 space-y-1.5",children:Object.entries(o).map(([x,g])=>{const v=x.startsWith("2");return s.jsxs("div",{className:`flex items-start gap-3 rounded-lg border px-3 py-2 ${v?"border-emerald-500/20 bg-emerald-500/[0.05]":"border-red-500/20 bg-red-500/[0.05]"}`,children:[s.jsx("span",{className:`shrink-0 w-10 font-mono text-[12px] font-medium ${v?"text-emerald-400":"text-red-400"}`,children:x}),g.schema&&s.jsx("div",{className:"flex flex-wrap gap-1",children:Object.keys(g.schema).map(b=>s.jsx("span",{className:"rounded border border-[var(--border)] bg-[var(--bg-overlay-md)] px-1.5 py-0.5 font-mono text-[10px] text-[var(--text-muted)]",children:b},b))})]},x)})})]}),s.jsx(S3,{endpoint:n}),s.jsx(E3,{endpoint:n}),s.jsxs(ss,{className:"lg:hidden",children:[s.jsx(Cr,{icon:Pn,label:"Simulate Endpoint"}),s.jsx("div",{className:"p-4",children:s.jsx(up,{endpoint:n})})]})]})]}),s.jsxs("aside",{className:"hidden lg:flex w-[400px] shrink-0 flex-col border-l border-[var(--border)] bg-[var(--sidebar-bg)]",children:[s.jsxs("div",{className:"flex items-center gap-2.5 border-b border-[var(--border)] px-5 py-[18px]",children:[s.jsx(Pn,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2}),s.jsx("span",{className:"text-[13.5px] font-medium text-[var(--text-primary)]",children:"Simulate Endpoint"})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:s.jsx(up,{endpoint:n})})]})]})};function k3(){return s.jsxs("div",{className:"p-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Agents"}),s.jsx("p",{className:"mt-4 text-zinc-400",children:"This is under developnment."})]})}function C3(){return s.jsxs("div",{className:"p-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Tools"}),s.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Tools page."})]})}function T3(){return s.jsxs("div",{className:"p-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Context"}),s.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Context page."})]})}const gf="/api/memory";async function dp(){const n=await fetch(gf);if(!n.ok)throw new Error(`Failed to fetch memory (${n.status})`);return n.json()}async function M3(){try{const n=await fetch("/api/model");return n.ok?(await n.json())?.environments??[]:[]}catch{return[]}}async function A3(n,r){const i=await fetch(gf,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:n,value:r})});if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.error??`Failed to add entry (${i.status})`)}}async function z3(n){const r=await fetch(gf,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:n})});if(!r.ok)throw new Error(`Failed to delete entry (${r.status})`)}function fp(n){return typeof n=="object"&&n!==null?JSON.stringify(n):String(n)}function R3(n){const r=n.indexOf(":");return r!==-1?n.slice(r+1):n}function vo(n){return n.includes(":")?n.split(":")[0]:"global"}function D3({value:n}){const[r,i]=N.useState(!1),o=n.length>200?n.slice(0,200)+"…":n;return s.jsx("div",{onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),className:"cursor-pointer max-w-[300px]",children:r?s.jsx("p",{className:"text-[12px] break-all transition-colors truncate",style:{color:"var(--text-secondary)"},children:o}):s.jsx("p",{className:"text-[12px] font-mono tracking-widest select-none",style:{color:"var(--text-faint)"},children:"••••••"})})}function O3({onClose:n,onSave:r,defaultScope:i}){const[o,u]=N.useState(i?`${i}:`:""),[f,h]=N.useState(""),[p,m]=N.useState(!1),[x,g]=N.useState(""),v=N.useRef(null);N.useEffect(()=>{v.current?.focus()},[]);const b=async E=>{if(E.preventDefault(),!o.trim()){g("Key is required");return}if(f.trim()===""){g("Value is required");return}m(!0),g("");try{await r(o.trim(),f.trim()),n()}catch(C){g(C.message??"An error occurred"),m(!1)}};return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:E=>{E.target===E.currentTarget&&n()},children:s.jsxs("div",{className:"relative w-full max-w-md rounded-lg p-6 shadow-2xl shadow-black/60",style:{border:"1px solid var(--border)",backgroundColor:"var(--sidebar-bg)"},children:[s.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)"},children:s.jsx(Dt,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),s.jsx("h2",{className:"text-[13.5px] font-medium",style:{color:"var(--text-primary)"},children:"Add Memory Entry"})]}),s.jsx("button",{onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-lg transition-colors hover:cursor-pointer hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-muted)"},children:s.jsx(Ct,{className:"h-[15px] w-[15px]",strokeWidth:2})})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"mb-1.5 block text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Key / Identifier"}),s.jsx("input",{ref:v,value:o,onChange:E=>u(E.target.value),placeholder:"global:myKey or myKey",className:"w-full rounded-lg px-3 py-2 text-[12px] outline-none transition-colors focus:border-blue-500/50 focus:bg-[var(--bg-overlay-md)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-primary)"}}),s.jsxs("p",{className:"mt-1.5 text-[10px]",style:{color:"var(--text-faint)"},children:["Prefix with"," ",s.jsx("code",{className:"rounded px-1 py-0.5 text-[10px]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay-md)",color:"var(--text-muted)"},children:"scope:"})," ","to organise by scope (e.g."," ",s.jsx("code",{className:"rounded px-1 py-0.5 text-[10px]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay-md)",color:"var(--text-muted)"},children:"user:name"}),"). Defaults to"," ",s.jsx("code",{className:"rounded px-1 py-0.5 text-[10px]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay-md)",color:"var(--text-muted)"},children:"global"}),"."]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"mb-1.5 block text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Value"}),s.jsx("textarea",{value:f,onChange:E=>h(E.target.value),placeholder:"Enter a string value…",rows:4,className:"w-full resize-none rounded-lg px-3 py-2 text-[12px] outline-none transition-colors focus:border-blue-500/50 focus:bg-[var(--bg-overlay-md)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-primary)"}})]}),x&&s.jsx("div",{className:"flex items-center gap-2 rounded-lg border border-red-500/20 bg-red-500/[0.06] px-3 py-2.5",children:s.jsx("p",{className:"text-[12px] text-red-400",children:x})}),s.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[s.jsx("button",{type:"button",onClick:n,className:"rounded-lg px-4 py-2 text-[12px] transition-colors hover:cursor-pointer hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-muted)"},children:"Cancel"}),s.jsxs("button",{onClick:b,disabled:p,className:"flex items-center gap-2 rounded-lg bg-blue-500 px-4 py-2 text-[12px] font-medium text-white transition-colors hover:cursor-pointer hover:bg-blue-400 disabled:cursor-not-allowed disabled:opacity-50",children:[p&&s.jsx(Fe,{className:"h-[15px] w-[15px] animate-spin",strokeWidth:2}),p?"Saving…":"Save Entry"]})]})]})]})})}function H3({onClose:n,onSave:r}){const[i,o]=N.useState(""),[u,f]=N.useState(""),h=N.useRef(null);N.useEffect(()=>{h.current?.focus()},[]);const p=m=>{m.preventDefault();const x=i.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"");if(!x){f("Enter a valid scope name");return}r(x),n()};return s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:m=>{m.target===m.currentTarget&&n()},children:s.jsxs("div",{className:"relative w-full max-w-sm rounded-lg p-6 shadow-2xl shadow-black/60",style:{border:"1px solid var(--border)",backgroundColor:"var(--sidebar-bg)"},children:[s.jsxs("div",{className:"mb-5 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2.5",children:[s.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)"},children:s.jsx(Dt,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),s.jsx("h2",{className:"text-[13.5px] font-medium",style:{color:"var(--text-primary)"},children:"Add Scope"})]}),s.jsx("button",{onClick:n,className:"flex h-7 w-7 items-center justify-center rounded-lg transition-colors hover:cursor-pointer hover:bg-[var(--bg-overlay-md)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-muted)"},children:s.jsx(Ct,{className:"h-[15px] w-[15px]",strokeWidth:2})})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"mb-1.5 block text-[11px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Scope Name"}),s.jsx("input",{ref:h,value:i,onChange:m=>{o(m.target.value),f("")},placeholder:"e.g. session, user, cart",className:"w-full rounded-lg px-3 py-2 text-[12px] outline-none transition-colors focus:border-blue-500/50",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-primary)"}}),s.jsxs("p",{className:"mt-1.5 text-[10px]",style:{color:"var(--text-faint)"},children:["Memory entries under this scope will be keyed as"," ",s.jsxs("code",{className:"rounded px-1 py-0.5 text-[10px]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay-md)",color:"var(--text-muted)"},children:[i.trim()?i.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,""):"scope",":key"]})]})]}),u&&s.jsx("p",{className:"text-[12px] text-red-400",children:u}),s.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[s.jsx("button",{type:"button",onClick:n,className:"rounded-lg px-4 py-2 text-[12px] transition-colors hover:cursor-pointer hover:bg-[var(--bg-overlay-md)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-muted)"},children:"Cancel"}),s.jsxs("button",{onClick:p,className:"flex items-center gap-2 rounded-lg bg-blue-500 px-4 py-2 text-[12px] font-medium text-white transition-colors hover:cursor-pointer hover:bg-blue-400",children:[s.jsx(vt,{className:"h-[14px] w-[14px]",strokeWidth:2})," Create Scope"]})]})]})]})})}const U3={workflow:kd,global:wp},B3={workflow:{border:"border-blue-500/20",bg:"bg-blue-500/5",dot:"bg-blue-500/40",text:"text-blue-400",activeBg:"bg-blue-500/15",activeBorder:"border-blue-500/40"},environment:{border:"border-emerald-500/20",bg:"bg-emerald-500/5",dot:"bg-emerald-500/40",text:"text-emerald-400",activeBg:"bg-emerald-500/15",activeBorder:"border-emerald-500/40"},global:{border:"border-[var(--border)]",bg:"bg-[var(--bg-overlay)]",dot:"bg-[var(--text-faint)]",text:"text-[var(--text-muted)]",activeBg:"bg-[var(--bg-overlay-md)]",activeBorder:"border-[var(--border)]"}},q3={border:"border-purple-500/20",bg:"bg-purple-500/5",dot:"bg-purple-500/40",text:"text-purple-400",activeBg:"bg-purple-500/15",activeBorder:"border-purple-500/40"};function ry(n){return B3[n]??q3}function $3({scope:n,active:r,onClick:i}){const o=ry(n.id),u=U3[n.id]??bo;return s.jsxs("button",{type:"button",onClick:i,className:`group relative flex flex-col gap-2 rounded-lg border p-3.5 text-left transition-all duration-200 hover:cursor-pointer ${r?`${o.activeBg} ${o.activeBorder}`:`${o.border} ${o.bg} hover:${o.activeBg}`}`,children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:`flex h-7 w-7 items-center justify-center rounded-lg border ${o.border} bg-[var(--bg-overlay)]`,children:s.jsx(u,{className:`h-[14px] w-[14px] ${o.text}`,strokeWidth:2})}),r&&s.jsx("div",{className:`flex h-4 w-4 items-center justify-center rounded-full ${o.activeBg}`,children:s.jsx(vt,{className:`h-2.5 w-2.5 ${o.text}`,strokeWidth:3})})]}),s.jsxs("div",{children:[s.jsx("p",{className:`text-[12px] font-medium ${o.text}`,children:n.label}),s.jsxs("p",{className:"text-[10px]",style:{color:"var(--text-faint)"},children:[n.count," ",n.count===1?"entry":"entries"]})]})]})}function L3(){const[n,r]=N.useState([]),[i,o]=N.useState([]),[u,f]=N.useState([]),[h,p]=N.useState(null),[m,x]=N.useState(!0),[g,v]=N.useState(!1),[b,E]=N.useState(null),[C,k]=N.useState(""),[z,R]=N.useState(!1),[Y,V]=N.useState(!1),[U,B]=N.useState(null),G=N.useCallback(async(M=!1)=>{M?v(!0):x(!0),E(null);try{const[A,w]=await Promise.all([dp(),M3()]);r(A),o(w)}catch(A){E(A.message??"Could not load memory data. Is `jetic dev` running?")}finally{x(!1),v(!1)}},[]);N.useEffect(()=>{G()},[G]);const re=async M=>{B(M);try{await z3(M),r(A=>A.filter(w=>w.key!==M))}catch(A){E(A.message??"Failed to delete entry")}finally{B(null)}},ce=async(M,A)=>{await A3(M,A);const w=await dp();r(w)},le=Array.from(new Set(n.map(M=>vo(M.key)))),J=M=>n.filter(A=>vo(A.key)===M).length,ee=[{id:"workflow",label:"Workflow",count:J("workflow"),isBuiltIn:!0},...i.map(M=>({id:`environment.${M.name}`,label:M.name,count:J(`environment.${M.name}`),isBuiltIn:!0}))],F=new Set(["workflow",...i.map(M=>`environment.${M.name}`)]),te=le.filter(M=>!F.has(M)&&M!=="global"),_=Array.from(new Set([...u,...te])),q=[...ee,..._.map(M=>({id:M,label:M.charAt(0).toUpperCase()+M.slice(1),count:J(M),isCustom:!0})),{id:"global",label:"Global",count:J("global"),isBuiltIn:!0}],S=h?n.filter(M=>vo(M.key)===h):n,D=S.filter(M=>!C||M.key.toLowerCase().includes(C.toLowerCase())||fp(M.value).toLowerCase().includes(C.toLowerCase()));return s.jsxs("div",{className:"flex h-full w-full flex-col overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between px-6 py-5",style:{borderBottom:"1px solid var(--border)"},children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-[15px] font-medium leading-none",style:{color:"var(--text-primary)"},children:"Memory"}),s.jsx("p",{className:"mt-0.5 text-[11px]",style:{color:"var(--text-muted)"},children:m?"Loading…":h?`${D.length} entries in ${h}`:`${n.length} entr${n.length===1?"y":"ies"} stored`})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>G(!0),disabled:g||m,title:"Refresh",className:"flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:cursor-pointer hover:bg-[var(--bg-overlay-md)] hover:text-[var(--text-secondary)] disabled:opacity-40",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-muted)"},children:s.jsx(gs,{className:`h-[15px] w-[15px] ${g?"animate-spin":""}`,strokeWidth:2})}),s.jsxs("button",{onClick:()=>R(!0),className:"flex items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-1.5 text-[12px] font-medium text-white transition-colors hover:cursor-pointer hover:bg-blue-400",children:[s.jsx(Dt,{className:"h-[15px] w-[15px]",strokeWidth:2}),"Add Entry"]})]})]}),s.jsxs("div",{className:"flex flex-1 flex-col gap-4 overflow-y-auto p-6",children:[!m&&!b&&s.jsxs("div",{children:[s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Scopes"}),s.jsxs("button",{onClick:()=>V(!0),className:"flex items-center gap-1 rounded-lg px-2 py-1 text-[10px] font-medium transition-colors hover:cursor-pointer hover:bg-[var(--bg-overlay-md)]",style:{border:"1px solid var(--border)",color:"var(--text-faint)"},children:[s.jsx(Dt,{className:"h-3 w-3",strokeWidth:2})," Add Scope"]})]}),s.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5",children:q.map(M=>s.jsx($3,{scope:M,active:h===M.id,onClick:()=>p(A=>A===M.id?null:M.id)},M.id))}),h&&s.jsx("button",{type:"button",onClick:()=>p(null),className:"mt-2 text-[11px] transition-colors hover:cursor-pointer hover:text-blue-300",style:{color:"var(--text-faint)"},children:"← Show all scopes"})]}),!m&&!b&&s.jsx("div",{style:{borderTop:"1px solid var(--border)"}}),!m&&n.length>0&&s.jsxs("div",{className:"relative",children:[s.jsx(Ed,{className:"absolute left-3 top-1/2 h-[15px] w-[15px] -translate-y-1/2",strokeWidth:2,style:{color:"var(--text-faint)"}}),s.jsx("input",{value:C,onChange:M=>k(M.target.value),placeholder:h?`Filter ${h} entries…`:"Filter by key or value…",className:"w-full rounded-lg py-2 pl-9 pr-9 text-[12px] outline-none transition-colors focus:border-blue-500/50 focus:bg-[var(--bg-overlay-md)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-secondary)"}}),C&&s.jsx("button",{onClick:()=>k(""),className:"absolute right-3 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-lg transition-colors hover:cursor-pointer hover:text-[var(--text-secondary)]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay-md)",color:"var(--text-faint)"},children:s.jsx(Ct,{className:"h-3 w-3",strokeWidth:2})})]}),m&&s.jsx("div",{className:"space-y-3",children:[1,2,3].map(M=>s.jsx("div",{className:"h-14 animate-pulse rounded-lg",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",opacity:1-M*.2}},M))}),!m&&b&&s.jsxs("div",{className:"flex flex-col items-center gap-4 rounded-lg border border-red-500/20 bg-red-500/[0.04] p-10 text-center",children:[s.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-lg border border-red-500/20 bg-red-500/10 text-red-400",children:s.jsx(bo,{className:"h-6 w-6",strokeWidth:2})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[13.5px] font-medium text-red-300",children:"Could not load memory"}),s.jsx("p",{className:"mt-1 text-[11px] text-red-500/70",children:b})]}),s.jsx("button",{onClick:()=>G(),className:"rounded-lg border border-red-500/20 bg-red-500/10 px-4 py-1.5 text-[12px] text-red-400 transition-colors hover:cursor-pointer hover:bg-red-500/20",children:"Retry"})]}),!m&&!b&&n.length===0&&s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-4 py-20 text-center",children:[s.jsxs("div",{className:"relative flex h-16 w-16 items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 rounded-full bg-blue-500/10 blur-xl"}),s.jsx("div",{className:"relative flex h-16 w-16 items-center justify-center rounded-lg text-blue-400",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)"},children:s.jsx(bo,{className:"h-7 w-7",strokeWidth:2})})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[13.5px] font-medium",style:{color:"var(--text-secondary)"},children:"Memory is empty"}),s.jsxs("p",{className:"mt-1 text-[12px]",style:{color:"var(--text-faint)"},children:["Add your first entry or run"," ",s.jsx("code",{className:"rounded px-1.5 py-0.5 text-[11px]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay-md)",color:"var(--text-muted)"},children:"jetic memory add"})," ","in the CLI."]})]}),s.jsxs("button",{onClick:()=>R(!0),className:"flex items-center gap-1.5 rounded-lg bg-blue-500 px-4 py-2 text-[12px] font-medium text-white transition-colors hover:cursor-pointer hover:bg-blue-400",children:[s.jsx(Dt,{className:"h-[15px] w-[15px]",strokeWidth:2}),"Add Entry"]})]}),!m&&!b&&n.length>0&&h&&D.length===0&&!C&&s.jsxs("div",{className:"flex flex-col items-center gap-3 py-12 text-center",children:[s.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)"},children:s.jsx(bo,{className:"h-[15px] w-[15px]",strokeWidth:2,style:{color:"var(--text-faint)"}})}),s.jsxs("p",{className:"text-[13px]",style:{color:"var(--text-muted)"},children:["No entries in ",s.jsx("code",{className:"text-blue-400",children:h})," scope"]}),s.jsxs("button",{onClick:()=>R(!0),className:"flex items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-1.5 text-[12px] font-medium text-white transition-colors hover:cursor-pointer hover:bg-blue-400",children:[s.jsx(Dt,{className:"h-[14px] w-[14px]",strokeWidth:2})," Add to ",h]})]}),!m&&!b&&n.length>0&&C&&D.length===0&&s.jsxs("div",{className:"flex flex-col items-center gap-3 py-12 text-center",children:[s.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)"},children:s.jsx(Ed,{className:"h-[15px] w-[15px]",strokeWidth:2,style:{color:"var(--text-faint)"}})}),s.jsxs("p",{className:"text-[13px]",style:{color:"var(--text-muted)"},children:['No entries match "',C,'"']}),s.jsx("button",{onClick:()=>k(""),className:"text-[12px] text-blue-400 transition-colors hover:cursor-pointer hover:text-blue-300",children:"Clear filter"})]}),!m&&!b&&D.length>0&&s.jsx("div",{className:"overflow-y-auto rounded-lg",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)"},children:s.jsxs("table",{className:"w-full text-left whitespace-nowrap",children:[s.jsx("thead",{style:{borderBottom:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)"},children:s.jsxs("tr",{children:[s.jsx("th",{className:"w-32 px-4 py-3 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Scope"}),s.jsx("th",{className:"w-48 px-4 py-3 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Key"}),s.jsx("th",{className:"px-4 py-3 text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Value"}),s.jsx("th",{className:"w-16 px-4 py-3 text-right text-[10px] font-semibold uppercase tracking-wider",style:{color:"var(--text-faint)"},children:"Actions"})]})}),s.jsx("tbody",{children:D.map((M,A)=>{const w=vo(M.key),O=R3(M.key),L=fp(M.value),W=U===M.key,ne=ry(w);return s.jsxs("tr",{className:"group transition-colors hover:bg-[var(--bg-overlay-md)]",style:A!==0?{borderTop:"1px solid var(--border)"}:void 0,children:[s.jsx("td",{className:"px-4 py-3",children:s.jsx("span",{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider border ${ne.border} ${ne.text}`,style:{backgroundColor:"var(--bg-overlay-md)"},children:w})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("span",{className:"inline-flex items-center rounded-lg px-2.5 py-0.5 font-mono text-[11px]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay-md)",color:"var(--text-secondary)"},children:O})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(D3,{value:L})}),s.jsx("td",{className:"px-4 py-3 text-right",children:s.jsx("button",{onClick:()=>re(M.key),disabled:W,title:"Delete entry",className:"inline-flex h-7 w-7 items-center justify-center rounded-lg transition-colors hover:cursor-pointer hover:border-red-500/30 hover:bg-red-500/10 hover:text-red-400 disabled:cursor-not-allowed disabled:opacity-50",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"var(--text-faint)"},children:W?s.jsx(Fe,{className:"h-[15px] w-[15px] animate-spin",strokeWidth:2}):s.jsx(dn,{className:"h-[15px] w-[15px]",strokeWidth:2})})})]},M.key)})})]})}),!m&&!b&&C&&D.length>0&&s.jsxs("p",{className:"text-center text-[11px]",style:{color:"var(--text-faint)"},children:["Showing ",D.length," of ",S.length," entries"]})]}),!m&&!b&&n.length>0&&s.jsxs("div",{className:"flex items-center gap-1.5 px-6 py-3 text-[11px]",style:{borderTop:"1px solid var(--border)",color:"var(--text-faint)"},children:[s.jsx(qr,{className:"h-[15px] w-[15px]",strokeWidth:2}),"Data read from"," ",s.jsx("code",{className:"rounded px-1.5 py-0.5 text-[10px]",style:{border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay-md)",color:"var(--text-muted)"},children:".jetic/memory.json"}),s.jsx("span",{className:"ml-auto",children:s.jsx("button",{onClick:()=>G(!0),className:"text-[11px] transition-colors hover:cursor-pointer hover:text-blue-400",style:{color:"var(--text-faint)"},children:"Refresh"})})]}),z&&s.jsx(O3,{onClose:()=>R(!1),onSave:ce,defaultScope:h??void 0}),Y&&s.jsx(H3,{onClose:()=>V(!1),onSave:M=>f(A=>A.includes(M)?A:[...A,M])})]})}function Y3(){return s.jsxs("div",{className:"p-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-white",children:"APIs"}),s.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the APIs page."})]})}function V3(){return s.jsxs("div",{className:"p-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Email"}),s.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Email page."})]})}function G3(){return s.jsxs("div",{className:"p-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-white",children:"OAuth"}),s.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the OAuth page."})]})}function X3(){return s.jsxs("div",{className:"p-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Webhooks"}),s.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Webhooks page."})]})}const hp={GET:{bg:"#052e16",text:"#4ade80",border:"#166534",dot:"#34d399"},POST:{bg:"#172554",text:"#60a5fa",border:"#1e40af",dot:"#60a5fa"},PUT:{bg:"#422006",text:"#fbbf24",border:"#92400e",dot:"#fbbf24"},PATCH:{bg:"#431407",text:"#fb923c",border:"#9a3412",dot:"#fb923c"},DELETE:{bg:"#3f0000",text:"#f87171",border:"#991b1b",dot:"#f87171"},HEAD:{bg:"#18181b",text:"#a1a1aa",border:"#3f3f46",dot:"#a1a1aa"},OPTIONS:{bg:"#2e1065",text:"#c084fc",border:"#6b21a8",dot:"#c084fc"}};function iy(n){return hp[n.toUpperCase()]??hp.GET}function Z3({data:n}){const r=iy(n.method),i=n.passed?"#34d399":"#f87171",o=n.selected?"#60a5fa":n.passed===!0?"#166534":n.passed===!1?"#991b1b":"#3f3f46";return s.jsxs("div",{onClick:n.onSelect,style:{width:260,border:`1.5px solid ${o}`,borderRadius:10,background:"var(--bg-surface, #111)",cursor:"pointer",boxShadow:n.selected?"0 0 0 2px rgba(96,165,250,0.4)":"0 2px 12px rgba(0,0,0,0.4)",transition:"box-shadow 0.15s ease",overflow:"hidden"},children:[s.jsx(fn,{type:"target",position:ye.Top,style:{background:"transparent",border:"none"}}),s.jsxs("div",{style:{background:r.bg,borderBottom:`1px solid ${r.border}`,padding:"8px 12px",display:"flex",alignItems:"center",gap:8},children:[s.jsx("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.1em",color:r.text,background:`${r.dot}15`,border:`1px solid ${r.dot}40`,borderRadius:4,padding:"2px 6px"},children:n.method}),s.jsx("span",{style:{fontSize:11,color:"#e4e4e7",fontFamily:"monospace",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.path}),n.status>0&&s.jsx("span",{style:{fontSize:10,color:i,fontFamily:"monospace",fontWeight:600,flexShrink:0},children:n.status})]}),s.jsxs("div",{style:{padding:"8px 12px",display:"flex",flexDirection:"column",gap:5},children:[n.name&&s.jsx("span",{style:{fontSize:10,color:"#71717a",fontStyle:"italic"},children:n.name}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[s.jsx("span",{style:{fontSize:9,fontWeight:600,letterSpacing:"0.08em",color:n.passed?"#4ade80":"#f87171",background:n.passed?"rgba(74,222,128,0.08)":"rgba(248,113,113,0.08)",border:`1px solid ${n.passed?"rgba(74,222,128,0.2)":"rgba(248,113,113,0.2)"}`,borderRadius:4,padding:"2px 6px"},children:n.passed?"✓ PASSED":"✗ FAILED"}),n.durationMs>0&&s.jsxs("span",{style:{fontSize:10,color:"#52525b"},children:[n.durationMs,"ms"]})]}),n.injectSpec&&Object.keys(n.injectSpec).length>0&&s.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:2},children:Object.entries(n.injectSpec).map(([u,f])=>s.jsxs("span",{style:{fontSize:9,color:"#a78bfa",background:"rgba(167,139,250,0.08)",border:"1px solid rgba(167,139,250,0.2)",borderRadius:4,padding:"1px 5px"},children:["📥 ",u," ← ","{{",f,"}}"]},u))}),n.error&&s.jsxs("span",{style:{fontSize:9,color:"#f87171",marginTop:2},children:["⚠ ",n.error]}),s.jsx("span",{style:{fontSize:9,color:"#3f3f46",marginTop:2},children:"Click for details"})]}),s.jsx(fn,{type:"source",position:ye.Bottom,style:{background:"transparent",border:"none"}})]})}function Q3({data:n}){const r=Object.entries(n.captured??{});return s.jsxs("div",{style:{width:200,border:"1.5px solid rgba(167,139,250,0.35)",borderRadius:10,background:"rgba(139,92,246,0.07)",padding:"8px 12px",backdropFilter:"blur(4px)"},children:[s.jsx(fn,{type:"target",position:ye.Top,style:{background:"transparent",border:"none"}}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6},children:[s.jsx(Eo,{style:{width:12,height:12,color:"#a78bfa"}}),s.jsx("span",{style:{fontSize:10,fontWeight:600,color:"#a78bfa",letterSpacing:"0.06em"},children:"MEMORY"})]}),r.length===0&&s.jsx("span",{style:{fontSize:9,color:"#52525b"},children:"No variables captured"}),r.map(([i,o])=>s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:3},children:[s.jsx("span",{style:{fontSize:10,color:"#c4b5fd",fontFamily:"monospace"},children:i}),s.jsx(rs,{style:{width:10,height:10,color:"#52525b",flexShrink:0}}),s.jsx("span",{style:{fontSize:9,color:"#a1a1aa",fontFamily:"monospace",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:String(o).length>20?String(o).slice(0,20)+"…":o})]},i)),s.jsx(fn,{type:"source",position:ye.Bottom,style:{background:"transparent",border:"none"}})]})}function W3({data:n}){return s.jsxs("div",{style:{width:120,border:"1.5px solid rgba(96,165,250,0.4)",borderRadius:20,background:"rgba(96,165,250,0.08)",padding:"7px 14px",textAlign:"center"},children:[s.jsx("span",{style:{fontSize:11,fontWeight:600,color:"#60a5fa",letterSpacing:"0.05em"},children:n.label}),s.jsx(fn,{type:"source",position:ye.Bottom,style:{background:"transparent",border:"none"}})]})}function K3({data:n}){const r=n.phase==="done"&&n.failed===0?"#4ade80":n.phase==="aborted"?"#f87171":"#fbbf24";return s.jsxs("div",{style:{width:140,border:`1.5px solid ${r}40`,borderRadius:20,background:`${r}0d`,padding:"7px 14px",textAlign:"center"},children:[s.jsx(fn,{type:"target",position:ye.Top,style:{background:"transparent",border:"none"}}),s.jsx("span",{style:{fontSize:11,fontWeight:600,color:r,letterSpacing:"0.05em"},children:n.phase==="done"&&n.failed===0?"✓ PASSED":n.phase==="aborted"?"✗ ABORTED":`${n.passed}/${n.passed+n.failed} PASSED`})]})}const J3={step:Z3,memory:Q3,start:W3,end:K3},jd=260,F3=130,I3=200,P3=90,wd=50;function e4(n,r,i){const o=[],u=[];let f=0;o.push({id:"start",type:"start",position:{x:(jd-120)/2,y:f},data:{label:`▶ START · ${new Date(n.startedAt).toLocaleTimeString()}`},draggable:!1}),f+=50+wd;for(let p=0;p<n.steps.length;p++){const m=n.steps[p],x=m.captureSpec&&Object.keys(m.captureSpec).length>0,g=m.captured&&Object.keys(m.captured).length>0,v=m.passed?"rgba(74,222,128,0.4)":"rgba(248,113,113,0.4)";o.push({id:`step-${p}`,type:"step",position:{x:0,y:f},data:{index:p,name:m.name,method:m.method,path:m.path,status:m.status,passed:m.passed,durationMs:m.durationMs,error:m.error,injectSpec:m.injectSpec,captureSpec:m.captureSpec,selected:r===p,onSelect:()=>i(p)},draggable:!1});const b=p===0?"start":xp(n,p-1)?`mem-${p-1}`:`step-${p-1}`;u.push({id:`e-${p}`,source:b,target:`step-${p}`,style:{stroke:v,strokeWidth:1.5},markerEnd:{type:Ba.ArrowClosed,color:v},animated:!1,label:p>0&&n.steps[p-1].injectSpec?Object.keys(n.steps[p-1].injectSpec??{}).map(E=>`{{${E}}}`).join(", "):void 0,labelStyle:{fill:"rgba(167,139,250,0.7)",fontSize:9},labelBgStyle:{fill:"transparent"}}),f+=F3+wd,(x||g)&&(o.push({id:`mem-${p}`,type:"memory",position:{x:(jd-I3)/2,y:f},data:{captured:g?m.captured:Object.fromEntries(Object.keys(m.captureSpec??{}).map(E=>[E.split(":").pop()??E,"…"]))},draggable:!1}),u.push({id:`e-mem-${p}`,source:`step-${p}`,target:`mem-${p}`,style:{stroke:"rgba(167,139,250,0.3)",strokeWidth:1,strokeDasharray:"4 3"},markerEnd:{type:Ba.ArrowClosed,color:"rgba(167,139,250,0.4)"},label:"capture",labelStyle:{fill:"rgba(167,139,250,0.5)",fontSize:9},labelBgStyle:{fill:"transparent"}}),f+=P3+wd)}o.push({id:"end",type:"end",position:{x:(jd-140)/2,y:f},data:{phase:n.phase,passed:n.passed,failed:n.failed},draggable:!1});const h=n.steps.length>0?xp(n,n.steps.length-1)?`mem-${n.steps.length-1}`:`step-${n.steps.length-1}`:"start";return u.push({id:"e-end",source:h,target:"end",style:{stroke:n.phase==="done"&&n.failed===0?"rgba(74,222,128,0.4)":"rgba(248,113,113,0.3)",strokeWidth:1.5},markerEnd:{type:Ba.ArrowClosed,color:"rgba(74,222,128,0.4)"}}),{nodes:o,edges:u}}function xp(n,r){const i=n.steps[r];return i?i.captureSpec&&Object.keys(i.captureSpec).length>0||i.captured&&Object.keys(i.captured).length>0:!1}function t4({trace:n,selectedStep:r,onSelectStep:i}){const[o,u,f]=Jg([]),[h,p,m]=Fg([]);return N.useEffect(()=>{const{nodes:x,edges:g}=e4(n,r,i);u(x),p(g)},[n,r]),s.jsxs(mf,{nodes:o,edges:h,onNodesChange:f,onEdgesChange:m,nodeTypes:J3,fitView:!0,fitViewOptions:{padding:.3},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:2,style:{background:"transparent"},children:[s.jsx(ay,{variant:Zt.Dots,gap:24,size:1,color:"rgba(255,255,255,0.04)"}),s.jsx(ty,{style:{background:"var(--bg-surface)",border:"1px solid var(--border)",borderRadius:8},showInteractive:!1}),s.jsx($S,{nodeColor:x=>x.type==="memory"?"rgba(167,139,250,0.5)":x.type==="start"||x.type==="end"?"rgba(96,165,250,0.5)":x.data?.passed?"rgba(74,222,128,0.5)":"rgba(248,113,113,0.5)",style:{background:"var(--bg-elevated)",border:"1px solid var(--border)",borderRadius:8},maskColor:"rgba(0,0,0,0.4)"})]})}function n4({step:n,onClose:r}){const i=iy(n.method),[o,u]=N.useState("overview");return s.jsxs("div",{className:"flex flex-col h-full",style:{width:360,borderLeft:"1px solid var(--border)",backgroundColor:"var(--bg-surface)",flexShrink:0},children:[s.jsxs("div",{style:{borderBottom:"1px solid var(--border)",padding:"12px 16px",display:"flex",alignItems:"center",gap:10,backgroundColor:"var(--bg-elevated)"},children:[s.jsx("span",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.1em",color:i.text,background:i.bg,border:`1px solid ${i.border}`,borderRadius:4,padding:"2px 8px"},children:n.method}),s.jsx("span",{style:{fontFamily:"monospace",fontSize:12,color:"var(--text-primary)",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.path}),s.jsx("button",{onClick:r,style:{color:"var(--text-faint)",display:"flex",alignItems:"center"},children:s.jsx(Ct,{className:"h-4 w-4"})})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 16px",borderBottom:"1px solid var(--border)",backgroundColor:n.passed?"rgba(74,222,128,0.04)":"rgba(248,113,113,0.04)"},children:[n.passed?s.jsx(vt,{className:"h-4 w-4 text-emerald-400 shrink-0"}):s.jsx(kt,{className:"h-4 w-4 text-red-400 shrink-0"}),s.jsxs("span",{style:{fontSize:11,fontWeight:600,color:n.passed?"#4ade80":"#f87171"},children:["HTTP ",n.status>0?n.status:"ERROR"," · ",n.durationMs,"ms"]}),n.expectStatus&&s.jsxs("span",{style:{fontSize:10,color:"var(--text-muted)",marginLeft:"auto"},children:["expected ",n.expectStatus]})]}),s.jsx("div",{style:{display:"flex",borderBottom:"1px solid var(--border)"},children:["overview","request","response","vars"].map(f=>s.jsx("button",{onClick:()=>u(f),style:{flex:1,padding:"8px 4px",fontSize:10,fontWeight:600,letterSpacing:"0.05em",textTransform:"capitalize",color:o===f?"#60a5fa":"var(--text-muted)",borderBottom:o===f?"2px solid #60a5fa":"2px solid transparent",background:"transparent",cursor:"pointer",transition:"color 0.15s"},children:f},f))}),s.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"14px 16px"},children:[o==="overview"&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[s.jsxs(Jn,{title:"Step",children:[s.jsx(on,{k:"Index",v:`#${n.index+1}`}),s.jsx(on,{k:"Name",v:n.name||"—"}),s.jsx(on,{k:"Method",v:n.method}),s.jsx(on,{k:"Path",v:n.path,mono:!0}),n.description&&s.jsx(on,{k:"Description",v:n.description})]}),s.jsxs(Jn,{title:"Timing",children:[s.jsx(on,{k:"Duration",v:`${n.durationMs}ms`,accent:"#60a5fa"}),n.expectStatus&&s.jsx(on,{k:"Expected status",v:String(n.expectStatus)}),s.jsx(on,{k:"Actual status",v:n.status>0?String(n.status):"No response",accent:n.passed?"#4ade80":"#f87171"})]}),n.error&&s.jsx(Jn,{title:"Error",children:s.jsx("div",{style:{background:"rgba(248,113,113,0.06)",border:"1px solid rgba(248,113,113,0.2)",borderRadius:6,padding:"8px 10px"},children:s.jsx("span",{style:{fontSize:11,color:"#f87171",fontFamily:"monospace"},children:n.error})})})]}),o==="request"&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[Object.keys(n.injected??{}).length>0&&s.jsx(Jn,{title:"Headers (injected)",children:Object.entries(n.injected??{}).map(([f,h])=>s.jsx(on,{k:f,v:String(h),mono:!0},f))}),n.injectSpec&&Object.keys(n.injectSpec).length>0&&s.jsx(Jn,{title:"Variable injection spec",children:Object.entries(n.injectSpec).map(([f,h])=>s.jsx(on,{k:f,v:`← {{${h}}}`,mono:!0,accent:"#a78bfa"},f))}),n.requestBody?s.jsx(Jn,{title:"Request body",children:s.jsx("pre",{style:{fontSize:10,color:"var(--text-secondary)",fontFamily:"monospace",background:"var(--bg-overlay)",border:"1px solid var(--border)",borderRadius:6,padding:10,overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:JSON.stringify(n.requestBody,null,2)})}):s.jsx("span",{style:{fontSize:11,color:"var(--text-faint)"},children:"No request body"})]}),o==="response"&&s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:14},children:n.responseBody!==void 0?s.jsx(Jn,{title:`Response body · HTTP ${n.status}`,children:s.jsx("pre",{style:{fontSize:10,color:"var(--text-secondary)",fontFamily:"monospace",background:"var(--bg-overlay)",border:"1px solid var(--border)",borderRadius:6,padding:10,overflowX:"auto",whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:typeof n.responseBody=="string"?n.responseBody:JSON.stringify(n.responseBody,null,2)})}):s.jsx("span",{style:{fontSize:11,color:"var(--text-faint)"},children:"No response body recorded"})}),o==="vars"&&s.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:14},children:[n.captureSpec&&Object.keys(n.captureSpec).length>0&&s.jsx(Jn,{title:"Capture spec (JSONPath)",children:Object.entries(n.captureSpec).map(([f,h])=>s.jsx(on,{k:f,v:h,mono:!0,accent:"#a78bfa"},f))}),n.captured&&Object.keys(n.captured).length>0?s.jsx(Jn,{title:"Captured values",children:Object.entries(n.captured).map(([f,h])=>s.jsx(on,{k:f,v:String(h),mono:!0,accent:"#4ade80"},f))}):s.jsx("span",{style:{fontSize:11,color:"var(--text-faint)"},children:"No variables captured in this step"})]})]})]})}function Jn({title:n,children:r}){return s.jsxs("div",{children:[s.jsx("p",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.1em",color:"var(--text-faint)",textTransform:"uppercase",marginBottom:8},children:n}),s.jsx("div",{style:{display:"flex",flexDirection:"column",gap:5},children:r})]})}function on({k:n,v:r,mono:i=!1,accent:o}){return s.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[s.jsx("span",{style:{fontSize:10,color:"var(--text-muted)",minWidth:100,flexShrink:0},children:n}),s.jsx("span",{style:{fontSize:10,color:o??"var(--text-secondary)",fontFamily:i?"monospace":void 0,wordBreak:"break-all"},children:r})]})}function a4({trace:n}){const[r,i]=N.useState(null),o=n.steps.reduce((f,h)=>f+h.durationMs,0)||1,u=N.useCallback(f=>{i(h=>h===f?null:f)},[]);return s.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",minWidth:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"14px 20px",borderBottom:"1px solid var(--border)",backgroundColor:"var(--bg-elevated)",flexShrink:0},children:[s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsx("p",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.workflowName}),s.jsxs("p",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2,display:"flex",alignItems:"center",gap:6},children:[s.jsx(qr,{className:"h-3 w-3 inline"}),new Date(n.startedAt).toLocaleString(),n.baseUrl&&s.jsxs(s.Fragment,{children:[" · ",s.jsx("code",{style:{color:"var(--text-faint)"},children:n.baseUrl})]}),"· ",s.jsx("span",{style:{color:"var(--text-faint)"},children:n.source==="local-sim"?"Simulated locally":"Real API run"})]})]}),s.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6,flexShrink:0,fontSize:11,fontWeight:600,padding:"4px 12px",borderRadius:20,color:n.phase==="done"&&n.failed===0?"#4ade80":n.phase==="aborted"?"#f87171":"#fbbf24",background:n.phase==="done"&&n.failed===0?"rgba(74,222,128,0.08)":"rgba(248,113,113,0.08)",border:`1px solid ${n.phase==="done"&&n.failed===0?"rgba(74,222,128,0.2)":"rgba(248,113,113,0.2)"}`},children:[n.phase==="done"&&n.failed===0?s.jsx(vt,{className:"h-3.5 w-3.5"}):s.jsx(kt,{className:"h-3.5 w-3.5"}),n.passed,"/",n.passed+n.failed," passed · ",n.durationMs,"ms"]})]}),s.jsxs("div",{style:{padding:"10px 20px",borderBottom:"1px solid var(--border)",flexShrink:0},children:[s.jsxs("p",{style:{fontSize:9,fontWeight:700,letterSpacing:"0.1em",color:"var(--text-faint)",marginBottom:6,textTransform:"uppercase"},children:["Timeline · ",n.steps.length," steps · ",n.durationMs,"ms total"]}),s.jsx("div",{style:{display:"flex",gap:2,height:8,borderRadius:4,overflow:"hidden"},children:n.steps.map((f,h)=>s.jsx("div",{onClick:()=>u(h),title:`${f.method} ${f.path} — ${f.durationMs}ms`,style:{flex:f.durationMs/o,minWidth:4,background:f.passed?"#22c55e":"#ef4444",cursor:"pointer",opacity:r===h?1:.7,borderRadius:2,transition:"opacity 0.15s"}},h))}),s.jsx("div",{style:{display:"flex",gap:2,marginTop:4},children:n.steps.map((f,h)=>s.jsx("div",{style:{flex:f.durationMs/o,minWidth:4,fontSize:8,color:"var(--text-faint)",overflow:"hidden",cursor:"pointer"},onClick:()=>u(h),children:h+1},h))})]}),s.jsxs("div",{style:{flex:1,display:"flex",minHeight:0},children:[s.jsx("div",{style:{flex:1,minWidth:0,position:"relative"},children:s.jsx(t4,{trace:n,selectedStep:r,onSelectStep:u})}),r!==null&&n.steps[r]&&s.jsx(n4,{step:n.steps[r],onClose:()=>i(null)})]})]})}function l4({trace:n,selected:r,onClick:i,onDelete:o}){const u=n.phase==="done"&&n.failed===0?"#4ade80":n.phase==="aborted"?"#f87171":"#fbbf24",f=()=>{const h=Date.now()-new Date(n.startedAt).getTime();return h<6e4?`${Math.round(h/1e3)}s ago`:h<36e5?`${Math.round(h/6e4)}m ago`:`${Math.round(h/36e5)}h ago`};return s.jsx("div",{onClick:i,style:{padding:"10px 14px",borderBottom:"1px solid var(--border)",cursor:"pointer",backgroundColor:r?"rgba(96,165,250,0.06)":"transparent",borderLeft:r?"3px solid #60a5fa":"3px solid transparent",transition:"background 0.1s",position:"relative"},className:"group",children:s.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[s.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:u,flexShrink:0,marginTop:4}}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsx("p",{style:{fontSize:11,fontWeight:500,color:"var(--text-primary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.workflowName}),s.jsxs("p",{style:{fontSize:9,color:"var(--text-muted)",marginTop:2,display:"flex",alignItems:"center",gap:4},children:[s.jsx(qr,{className:"h-2.5 w-2.5 inline shrink-0"}),f()," · ",n.steps.length," steps · ",n.durationMs,"ms"]}),s.jsxs("div",{style:{display:"flex",gap:4,marginTop:4,flexWrap:"wrap"},children:[n.passed>0&&s.jsxs("span",{style:{fontSize:9,color:"#4ade80",background:"rgba(74,222,128,0.08)",border:"1px solid rgba(74,222,128,0.2)",borderRadius:4,padding:"1px 5px"},children:[n.passed," ✓"]}),n.failed>0&&s.jsxs("span",{style:{fontSize:9,color:"#f87171",background:"rgba(248,113,113,0.08)",border:"1px solid rgba(248,113,113,0.2)",borderRadius:4,padding:"1px 5px"},children:[n.failed," ✗"]}),s.jsx("span",{style:{fontSize:9,color:"var(--text-faint)",background:"var(--bg-overlay)",border:"1px solid var(--border)",borderRadius:4,padding:"1px 5px"},children:n.source==="local-sim"?"sim":"api"})]})]}),s.jsx("button",{onClick:h=>{h.stopPropagation(),o()},style:{opacity:0,transition:"opacity 0.1s",color:"var(--text-faint)",display:"flex",alignItems:"center",padding:2,borderRadius:4},className:"group-hover:opacity-100",title:"Delete trace",children:s.jsx(dn,{className:"h-3 w-3"})})]})})}function s4(){return s.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:12,padding:"40px 20px",textAlign:"center"},children:[s.jsxs("div",{style:{position:"relative",width:52,height:52,display:"flex",alignItems:"center",justifyContent:"center"},children:[s.jsx("div",{style:{position:"absolute",inset:0,borderRadius:"50%",background:"rgba(96,165,250,0.1)",filter:"blur(8px)"}}),s.jsx("div",{style:{position:"relative",width:52,height:52,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"#60a5fa"},children:s.jsx(Br,{className:"h-6 w-6"})})]}),s.jsx("p",{style:{fontSize:12,fontWeight:500,color:"var(--text-secondary)"},children:"No traces yet"}),s.jsx("p",{style:{fontSize:10,color:"var(--text-muted)",maxWidth:200},children:"Run a simulation from the Simulations page to generate a trace."})]})}function r4(){return s.jsxs("div",{style:{display:"flex",flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:14,textAlign:"center",padding:32},children:[s.jsxs("div",{style:{position:"relative",width:64,height:64,display:"flex",alignItems:"center",justifyContent:"center"},children:[s.jsx("div",{style:{position:"absolute",inset:0,borderRadius:"50%",background:"rgba(167,139,250,0.1)",filter:"blur(12px)"}}),s.jsx("div",{style:{position:"relative",width:64,height:64,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",color:"#a78bfa"},children:s.jsx(Uo,{className:"h-8 w-8"})})]}),s.jsxs("div",{children:[s.jsx("p",{style:{fontSize:14,fontWeight:600,color:"var(--text-secondary)"},children:"Select a trace"}),s.jsx("p",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"Pick a run from the list to visualize its execution graph"})]}),s.jsxs("div",{style:{border:"1px solid var(--border)",borderRadius:10,padding:"12px 16px",backgroundColor:"var(--bg-overlay)",maxWidth:340,textAlign:"left"},children:[s.jsx("p",{style:{fontSize:10,fontWeight:600,color:"var(--text-faint)",marginBottom:8,textTransform:"uppercase",letterSpacing:"0.08em"},children:"What you'll see"}),[["HTTP step nodes","Every request in the workflow shown as a graph node with method, path, status, and timing"],["Memory nodes","Variables captured from responses (tokens, IDs, etc.) shown in between steps"],["Execution flow","Arrows colored green/red showing the success/failure path through your workflow"],["Step detail drawer","Click any node to see full request/response bodies, headers, and capture specs"]].map(([n,r])=>s.jsxs("div",{style:{display:"flex",gap:8,marginBottom:8},children:[s.jsx("span",{style:{color:"#60a5fa",flexShrink:0,marginTop:1},children:"→"}),s.jsxs("div",{children:[s.jsx("span",{style:{fontSize:11,fontWeight:500,color:"var(--text-secondary)"},children:n}),s.jsx("p",{style:{fontSize:10,color:"var(--text-muted)",marginTop:1},children:r})]})]},n))]})]})}function i4({initialFilter:n,onNavigate:r}){const[i,o]=N.useState([]),[u,f]=N.useState(!0),[h,p]=N.useState(""),[m,x]=N.useState(null),g=N.useRef(!1),v=N.useCallback(async()=>{f(!0);try{const k=await I1();if(o(k),!g.current&&n?.traceId){const z=k.find(R=>R.id===n.traceId);z&&(x(z),g.current=!0)}else if(!g.current&&n?.workflowName&&k.length>0){const z=k.find(R=>R.workflowName===n.workflowName);z&&(x(z),g.current=!0)}}finally{f(!1)}},[n?.traceId,n?.workflowName]);N.useEffect(()=>{v()},[v]),N.useEffect(()=>{if(n?.traceId&&i.length>0){const k=i.find(z=>z.id===n.traceId);k&&x(k)}},[n?.traceId,i]);const b=async k=>{await P1(k),m?.id===k&&x(null),o(z=>z.filter(R=>R.id!==k))},E=async()=>{confirm("Delete all traces? This cannot be undone.")&&(await e2(),o([]),x(null))},C=i.filter(k=>!h.trim()||k.workflowName.toLowerCase().includes(h.toLowerCase())||k.steps.some(z=>z.path.toLowerCase().includes(h.toLowerCase())));return s.jsxs("div",{style:{display:"flex",height:"100%"},className:"w-full",children:[s.jsxs("div",{style:{width:280,flexShrink:0,display:"flex",flexDirection:"column",borderRight:"1px solid var(--border)",backgroundColor:"var(--bg-surface)"},children:[s.jsxs("div",{style:{padding:"14px 14px 10px",borderBottom:"1px solid var(--border)",backgroundColor:"var(--bg-elevated)",flexShrink:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[s.jsxs("div",{children:[s.jsx("p",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)",lineHeight:1},children:"Traces"}),s.jsx("p",{style:{fontSize:10,color:"var(--text-muted)",marginTop:3},children:u?"Loading…":`${i.length} run${i.length!==1?"s":""} stored`})]}),s.jsxs("div",{style:{display:"flex",gap:6},children:[s.jsx("button",{onClick:v,title:"Refresh",style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:7,border:"1px solid var(--border)",background:"var(--bg-overlay)",color:"var(--text-muted)",cursor:"pointer"},children:s.jsx(gs,{className:"h-3.5 w-3.5"})}),i.length>0&&s.jsx("button",{onClick:E,title:"Clear all",style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:7,border:"1px solid rgba(239,68,68,0.25)",background:"rgba(239,68,68,0.06)",color:"#f87171",cursor:"pointer"},children:s.jsx(dn,{className:"h-3.5 w-3.5"})})]})]}),s.jsxs("div",{style:{position:"relative"},children:[s.jsx(Ed,{style:{position:"absolute",left:8,top:"50%",transform:"translateY(-50%)",width:13,height:13,color:"var(--text-faint)",pointerEvents:"none"}}),s.jsx("input",{value:h,onChange:k=>p(k.target.value),placeholder:"Search traces…",style:{width:"100%",paddingLeft:28,paddingRight:h?28:10,paddingTop:6,paddingBottom:6,fontSize:11,border:"1px solid var(--border)",borderRadius:8,backgroundColor:"var(--bg-overlay)",color:"var(--text-secondary)",outline:"none",boxSizing:"border-box"}}),h&&s.jsx("button",{onClick:()=>p(""),style:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"var(--text-faint)",display:"flex",background:"none",border:"none",cursor:"pointer",padding:0},children:s.jsx(Ct,{className:"h-3 w-3"})})]})]}),s.jsxs("div",{style:{flex:1,overflowY:"auto"},children:[u&&s.jsx("div",{style:{padding:16,display:"flex",flexDirection:"column",gap:8},children:[1,2,3].map(k=>s.jsx("div",{style:{height:64,borderRadius:8,border:"1px solid var(--border)",backgroundColor:"var(--bg-overlay)",opacity:1-k*.25,animation:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite"}},k))}),!u&&C.length===0&&s.jsx(s4,{}),!u&&C.map(k=>s.jsx(l4,{trace:k,selected:m?.id===k.id,onClick:()=>x(k),onDelete:()=>b(k.id)},k.id))]}),r&&s.jsxs("div",{style:{padding:"10px 14px",borderTop:"1px solid var(--border)",display:"flex",gap:10},children:[s.jsxs("button",{onClick:()=>r("simulations"),style:{display:"flex",alignItems:"center",gap:4,fontSize:10,color:"#60a5fa",background:"none",border:"none",cursor:"pointer",padding:0},children:[s.jsx(Qd,{className:"h-3 w-3"})," Simulations ",s.jsx(o0,{className:"h-2.5 w-2.5"})]}),s.jsxs("button",{onClick:()=>r("model"),style:{display:"flex",alignItems:"center",gap:4,fontSize:10,color:"#60a5fa",background:"none",border:"none",cursor:"pointer",padding:0},children:[s.jsx(jp,{className:"h-3 w-3"})," Model ",s.jsx(o0,{className:"h-2.5 w-2.5"})]})]})]}),s.jsx("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",backgroundColor:"var(--bg-base)"},children:m?s.jsx(a4,{trace:m,onNavigate:r}):s.jsx(r4,{})})]})}function o4(){return s.jsxs("div",{className:"p-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Events"}),s.jsx("p",{className:"mt-4 text-zinc-400",children:"This page is underdevelopnment."})]})}function hl({icon:n,label:r,description:i}){return s.jsxs("div",{className:"flex items-start gap-3 pb-4 border-b border-white/10",children:[s.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg border border-white/10 bg-white/[0.04]",children:s.jsx(n,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[13.5px] font-medium text-white",children:r}),i&&s.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:i})]})]})}function Ze({label:n,description:r,children:i}){return s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-white/[0.06] last:border-0",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("p",{className:"text-[13px] text-zinc-200",children:n}),r&&s.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:r})]}),s.jsx("div",{className:"shrink-0",children:i})]})}function Xt({value:n,onChange:r}){return s.jsx("button",{onClick:()=>r(!n),className:`relative flex h-5 w-9 items-center rounded-full border transition-colors ${n?"bg-blue-500 border-blue-400":"bg-white/[0.04] border-white/10"}`,children:s.jsx("span",{className:`absolute h-3.5 w-3.5 rounded-full bg-white shadow transition-transform ${n?"translate-x-4":"translate-x-0.5"}`})})}function c4({value:n,onChange:r,placeholder:i,mono:o=!1,type:u="text"}){return s.jsx("input",{type:u,value:n,onChange:f=>r(f.target.value),placeholder:i,className:`w-56 rounded-lg border border-white/10 bg-white/[0.03] px-3 py-1.5 text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 focus:bg-white/[0.05] placeholder-zinc-600 transition-colors ${o?"font-mono":""}`})}function xs({value:n,onChange:r,options:i}){return s.jsx("select",{value:n,onChange:o=>r(o.target.value),className:"rounded-lg border border-white/10 bg-zinc-900 px-3 py-1.5 text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 transition-colors",children:i.map(o=>s.jsx("option",{value:o,children:o},o))})}function xl({children:n,className:r=""}){return s.jsx("div",{className:`rounded-lg border border-white/10 bg-white/[0.02] p-5 space-y-1 ${r}`,children:n})}function oy({saving:n,onClick:r}){return s.jsxs("button",{onClick:r,disabled:n,className:"flex items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-1.5 text-[12px] font-medium text-white hover:bg-blue-400 disabled:opacity-50 transition-colors",children:[n?s.jsx(Fe,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:2}):s.jsx(j1,{className:"h-3.5 w-3.5",strokeWidth:2}),n?"Saving…":"Save"]})}const u4=[{id:"general",label:"General",icon:kp},{id:"environments",label:"Environments",icon:ps},{id:"appearance",label:"Appearance",icon:Ep},{id:"editor",label:"Editor",icon:Uo},{id:"notifications",label:"Notifications",icon:yp},{id:"api",label:"API & Auth",icon:us},{id:"advanced",label:"Advanced",icon:Jd}];function d4({model:n}){const[r,i]=N.useState(n?.project?.name??""),[o,u]=N.useState(n?.project?.language??"TypeScript"),[f,h]=N.useState(n?.project?.framework??"Express"),[p,m]=N.useState(!1),[x,g]=N.useState(!1);N.useEffect(()=>{i(n?.project?.name??""),u(n?.project?.language??"TypeScript"),h(n?.project?.framework??"Express")},[n]);const v=async()=>{m(!0),await new Promise(b=>setTimeout(b,600)),m(!1),g(!0),setTimeout(()=>g(!1),2e3)};return s.jsxs("div",{className:"space-y-5",children:[s.jsx(hl,{icon:kp,label:"General",description:"Project identity and basic configuration"}),s.jsxs(xl,{children:[s.jsx(Ze,{label:"Project Name",description:"Display name shown in the dashboard",children:s.jsx(c4,{value:r,onChange:i,placeholder:"My API"})}),s.jsx(Ze,{label:"Language",description:"Primary language of your backend",children:s.jsx(xs,{value:o,onChange:u,options:["TypeScript","JavaScript","Python","Go","Rust"]})}),s.jsx(Ze,{label:"Framework",description:"HTTP framework used by your server",children:s.jsx(xs,{value:f,onChange:h,options:["Express","Fastify","Hono","Koa","NestJS","Other"]})}),s.jsxs("div",{className:"flex justify-end pt-2 gap-2",children:[x&&s.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-emerald-400",children:[s.jsx(vt,{className:"h-3.5 w-3.5",strokeWidth:2})," Saved"]}),s.jsx(oy,{saving:p,onClick:v})]})]})]})}function f4({model:n}){const[r,i]=N.useState(n?.environments??[{name:"local",baseUrl:"http://localhost:3000"}]),[o,u]=N.useState(!1),[f,h]=N.useState(!1);N.useEffect(()=>{i(n?.environments??[{name:"local",baseUrl:"http://localhost:3000"}])},[n]);const p=()=>i(v=>[...v,{name:"",baseUrl:""}]),m=v=>i(b=>b.filter((E,C)=>C!==v)),x=(v,b,E)=>i(C=>C.map((k,z)=>z===v?{...k,[b]:E}:k)),g=async()=>{u(!0),await new Promise(v=>setTimeout(v,600)),u(!1),h(!0),setTimeout(()=>h(!1),2e3)};return s.jsxs("div",{className:"space-y-5",children:[s.jsx(hl,{icon:ps,label:"Environments",description:"Configure your API base URLs for simulation"}),s.jsxs(xl,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-4 px-1 mb-2",children:[s.jsx("p",{className:"w-24 text-[10px] uppercase tracking-wider text-zinc-600 font-semibold",children:"Name"}),s.jsx("p",{className:"flex-1 text-[10px] uppercase tracking-wider text-zinc-600 font-semibold",children:"Base URL"})]}),r.map((v,b)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{value:v.name,onChange:E=>x(b,"name",E.target.value),placeholder:"local",className:"w-24 rounded-lg border border-white/10 bg-white/[0.03] px-3 py-1.5 text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 focus:bg-white/[0.05] placeholder-zinc-600 transition-colors"}),s.jsx("input",{value:v.baseUrl,onChange:E=>x(b,"baseUrl",E.target.value),placeholder:"http://localhost:3000",className:"flex-1 rounded-lg border border-white/10 bg-white/[0.03] px-3 py-1.5 font-mono text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 focus:bg-white/[0.05] placeholder-zinc-600 transition-colors"}),s.jsx("button",{onClick:()=>m(b),className:"flex h-7 w-7 items-center justify-center rounded-lg border border-white/10 bg-white/[0.03] text-zinc-500 hover:bg-red-500/10 hover:border-red-500/30 hover:text-red-400 transition-colors",children:s.jsx(Ct,{className:"h-3.5 w-3.5",strokeWidth:2})})]},b)),s.jsx("button",{onClick:p,className:"text-[12px] text-blue-400 hover:text-blue-300 transition-colors mt-1",children:"+ Add environment"})]}),s.jsxs("div",{className:"flex justify-end pt-3 gap-2 border-t border-white/[0.06]",children:[f&&s.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-emerald-400",children:[s.jsx(vt,{className:"h-3.5 w-3.5",strokeWidth:2})," Saved"]}),s.jsx(oy,{saving:o,onClick:g})]})]}),s.jsxs("div",{className:"rounded-lg border border-white/10 bg-white/[0.02] px-4 py-3 flex items-start gap-2.5",children:[s.jsx(t1,{className:"h-3.5 w-3.5 text-blue-400/70 shrink-0 mt-0.5",strokeWidth:2}),s.jsxs("p",{className:"text-[11px] text-zinc-500",children:["The"," ",s.jsx("code",{className:"text-zinc-300 bg-white/[0.06] px-1 py-0.5 rounded text-[10px]",children:"local"})," ","environment is used as the default base URL for simulations and endpoint testing."]})]})]})}function h4(){const[n,r]=N.useState("dark"),[i,o]=N.useState("blue"),[u,f]=N.useState("comfortable"),[h,p]=N.useState(!0),m=["blue","violet","emerald","amber","rose"],x={blue:"#3b82f6",violet:"#8b5cf6",emerald:"#34d399",amber:"#fbbf24",rose:"#fb7185"};return s.jsxs("div",{className:"space-y-5",children:[s.jsx(hl,{icon:Ep,label:"Appearance",description:"Customize the look and feel of the dashboard"}),s.jsxs(xl,{children:[s.jsx(Ze,{label:"Theme",description:"Choose your preferred colour scheme",children:s.jsx("div",{className:"flex gap-px overflow-hidden rounded-lg border border-white/10",children:["dark","darker"].map(g=>s.jsx("button",{onClick:()=>r(g),className:`px-3 py-1.5 text-[12px] transition-colors capitalize ${n===g?"bg-blue-500 text-white":"text-zinc-400 hover:text-zinc-200 bg-white/[0.02] hover:bg-white/[0.05]"}`,children:g},g))})}),s.jsx(Ze,{label:"Accent Colour",description:"Primary highlight colour throughout the UI",children:s.jsx("div",{className:"flex items-center gap-2",children:m.map(g=>s.jsx("button",{onClick:()=>o(g),className:`h-5 w-5 rounded-full border-2 transition-transform ${i===g?"scale-110 border-white/40":"border-transparent hover:scale-105"}`,style:{background:x[g]}},g))})}),s.jsx(Ze,{label:"Density",description:"Controls spacing throughout the layout",children:s.jsx("div",{className:"flex gap-px overflow-hidden rounded-lg border border-white/10",children:["comfortable","compact"].map(g=>s.jsx("button",{onClick:()=>f(g),className:`px-3 py-1.5 text-[12px] transition-colors capitalize ${u===g?"bg-blue-500 text-white":"text-zinc-400 hover:text-zinc-200 bg-white/[0.02] hover:bg-white/[0.05]"}`,children:g},g))})}),s.jsx(Ze,{label:"Animations",description:"Smooth transitions and micro-animations",children:s.jsx(Xt,{value:h,onChange:p})})]})]})}function x4(){const[n,r]=N.useState("11"),[i,o]=N.useState("2"),[u,f]=N.useState(!0),[h,p]=N.useState(!0),[m,x]=N.useState(!0);return s.jsxs("div",{className:"space-y-5",children:[s.jsx(hl,{icon:Uo,label:"Editor",description:"Source viewer and code display preferences"}),s.jsxs(xl,{children:[s.jsx(Ze,{label:"Font Size",description:"Monospace font size in the source viewer",children:s.jsx(xs,{value:n,onChange:r,options:["10","11","12","13","14"]})}),s.jsx(Ze,{label:"Tab Size",description:"Number of spaces per indentation level",children:s.jsx(xs,{value:i,onChange:o,options:["2","4","8"]})}),s.jsx(Ze,{label:"Word Wrap",description:"Wrap long lines in the source viewer",children:s.jsx(Xt,{value:u,onChange:f})}),s.jsx(Ze,{label:"Line Numbers",description:"Show line numbers in the source viewer gutter",children:s.jsx(Xt,{value:h,onChange:p})}),s.jsx(Ze,{label:"Highlight Handler Line",description:"Highlight the matched handler line in source view",children:s.jsx(Xt,{value:m,onChange:x})})]})]})}function m4(){const[n,r]=N.useState(!0),[i,o]=N.useState(!0),[u,f]=N.useState(!0),[h,p]=N.useState(!1),[m,x]=N.useState(!1);return s.jsxs("div",{className:"space-y-5",children:[s.jsx(hl,{icon:yp,label:"Notifications",description:"Control when and how you're notified"}),s.jsxs(xl,{children:[s.jsx(Ze,{label:"Scan complete",description:"Notify when a project scan finishes",children:s.jsx(Xt,{value:n,onChange:r})}),s.jsx(Ze,{label:"Simulation complete",description:"Notify when a workflow run finishes",children:s.jsx(Xt,{value:i,onChange:o})}),s.jsx(Ze,{label:"Simulation failure",description:"Notify when a workflow step fails",children:s.jsx(Xt,{value:u,onChange:f})}),s.jsx(Ze,{label:"Memory updates",description:"Notify on runtime memory changes",children:s.jsx(Xt,{value:h,onChange:p})}),s.jsx(Ze,{label:"Desktop notifications",description:"Show browser push notifications",children:s.jsx(Xt,{value:m,onChange:x})})]})]})}function p4(){const[n,r]=N.useState(""),[i,o]=N.useState("10000"),[u,f]=N.useState(!1),[h,p]=N.useState(!1);return s.jsxs("div",{className:"space-y-5",children:[s.jsx(hl,{icon:us,label:"API & Auth",description:"Default request settings for endpoint simulation"}),s.jsxs(xl,{children:[s.jsx(Ze,{label:"Default Bearer Token",description:"Pre-fill bearer token in simulate panels",children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("input",{type:h?"text":"password",value:n,onChange:m=>r(m.target.value),placeholder:"eyJ…",className:"w-48 rounded-lg border border-white/10 bg-white/[0.03] px-3 py-1.5 font-mono text-[12px] text-zinc-200 outline-none focus:border-blue-500/50 focus:bg-white/[0.05] placeholder-zinc-600 transition-colors"}),s.jsx("button",{onClick:()=>p(m=>!m),className:"text-[11px] text-zinc-500 hover:text-zinc-300 transition-colors",children:h?"Hide":"Show"})]})}),s.jsx(Ze,{label:"Request Timeout",description:"Milliseconds before a simulated request times out",children:s.jsx(xs,{value:i,onChange:o,options:["5000","10000","15000","30000","60000"]})}),s.jsx(Ze,{label:"Auto-retry on 5xx",description:"Automatically retry failed requests once",children:s.jsx(Xt,{value:u,onChange:f})})]})]})}function g4({onClearMemory:n}){const[r,i]=N.useState(!1),[o,u]=N.useState(!1),[f,h]=N.useState(!1),[p,m]=N.useState("30"),[x,g]=N.useState(!1),[v,b]=N.useState(!1),E=async()=>{g(!0),await new Promise(C=>setTimeout(C,800)),g(!1),b(!0),setTimeout(()=>b(!1),2e3),n()};return s.jsxs("div",{className:"space-y-5",children:[s.jsx(hl,{icon:Jd,label:"Advanced",description:"Developer and diagnostic options"}),s.jsxs(xl,{children:[s.jsx(Ze,{label:"Scan on start",description:"Auto-scan project when the dashboard loads",children:s.jsx(Xt,{value:r,onChange:i})}),s.jsx(Ze,{label:"Auto-refresh model",description:"Periodically reload model.json from disk",children:s.jsx(Xt,{value:f,onChange:h})}),f&&s.jsx(Ze,{label:"Refresh interval",description:"How often to poll for model changes",children:s.jsx(xs,{value:p,onChange:m,options:["10","30","60","120"]})}),s.jsx(Ze,{label:"Debug mode",description:"Verbose logging in the browser console",children:s.jsx(Xt,{value:o,onChange:u})})]}),s.jsxs("div",{className:"rounded-lg border border-red-500/20 bg-red-500/[0.03] overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-red-500/10",children:[s.jsx(dn,{className:"h-[15px] w-[15px] text-red-400/60",strokeWidth:2}),s.jsx("span",{className:"text-[11px] font-semibold tracking-wider text-red-400/70",children:"DANGER ZONE"})]}),s.jsxs("div",{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[13px] text-zinc-200",children:"Clear Runtime Memory"}),s.jsx("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:"Delete all stored memory keys and values"})]}),s.jsxs("button",{onClick:E,disabled:x,className:"flex items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/[0.06] px-3 py-1.5 text-[12px] text-red-400 hover:bg-red-500/10 disabled:opacity-50 transition-colors",children:[x?s.jsx(Fe,{className:"h-3.5 w-3.5 animate-spin",strokeWidth:2}):v?s.jsx(vt,{className:"h-3.5 w-3.5",strokeWidth:2}):s.jsx(dn,{className:"h-3.5 w-3.5",strokeWidth:2}),x?"Clearing…":v?"Cleared":"Clear Memory"]})]}),s.jsxs("div",{className:"flex items-center justify-between gap-4 pt-3 border-t border-red-500/10",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-[13px] text-zinc-200",children:"Reset Model"}),s.jsxs("p",{className:"text-[11px] text-zinc-500 mt-0.5",children:["Delete"," ",s.jsx("code",{className:"text-zinc-400 bg-white/[0.06] px-1 py-0.5 rounded text-[10px]",children:".jetic/model.json"})," ","and start fresh"]})]}),s.jsxs("button",{className:"flex items-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/[0.06] px-3 py-1.5 text-[12px] text-red-400 hover:bg-red-500/10 transition-colors",children:[s.jsx(dn,{className:"h-3.5 w-3.5",strokeWidth:2})," Reset Model"]})]})]})]})]})}function y4(){return s.jsxs("div",{className:"rounded-lg border border-white/10 bg-white/[0.02] p-4 flex items-center gap-3",children:[s.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg border border-white/10 bg-white/[0.04]",children:s.jsx(Pn,{className:"h-[15px] w-[15px] text-blue-400",strokeWidth:2})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-[13.5px] font-medium text-white",children:"Jetic Studio"}),s.jsx("p",{className:"text-[11px] text-zinc-500",children:"v0.1.0 · Local development dashboard"})]}),s.jsxs("div",{className:"ml-auto flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.02] px-2.5 py-1",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500 animate-pulse"}),s.jsx("span",{className:"text-[11px] text-zinc-400 font-medium",children:"Running"})]})]})}function v4({icon:n,label:r,active:i,onClick:o}){return s.jsxs("button",{type:"button",onClick:o,className:`relative flex w-full items-center gap-3 rounded-lg px-3 py-1.5 text-left text-[13.5px] transition-colors ${i?"bg-white/[0.07] text-white font-medium":"text-zinc-400 hover:bg-white/[0.03] hover:text-zinc-200"}`,children:[i&&s.jsx("span",{className:"absolute -left-3 top-1/2 h-4 w-[3px] -translate-y-1/2 rounded-full bg-blue-500"}),s.jsx(n,{className:"h-[15px] w-[15px] shrink-0",strokeWidth:2}),s.jsx("span",{children:r}),i&&s.jsx(ms,{className:"ml-auto h-3.5 w-3.5 opacity-40",strokeWidth:2})]})}function b4(){const[n,r]=N.useState("general"),[i,o]=N.useState(null),[u,f]=N.useState(!0);N.useEffect(()=>{fetch("/api/model").then(p=>p.ok?p.json():null).then(p=>o(p)).catch(()=>{}).finally(()=>f(!1))},[]);const h=()=>{switch(n){case"general":return s.jsx(d4,{model:i});case"environments":return s.jsx(f4,{model:i});case"appearance":return s.jsx(h4,{});case"editor":return s.jsx(x4,{});case"notifications":return s.jsx(m4,{});case"api":return s.jsx(p4,{});case"advanced":return s.jsx(g4,{onClearMemory:()=>{}});default:return null}};return s.jsxs("div",{className:"flex min-h-full w-full flex-col",children:[s.jsx("div",{className:"flex items-center justify-between border-b border-white/10 px-6 py-5",children:s.jsxs("div",{children:[s.jsx("h1",{className:"text-[15px] font-medium text-white leading-none",children:"Settings"}),s.jsx("p",{className:"mt-0.5 text-[11px] text-zinc-500",children:"Configure Jetic Studio"})]})}),s.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[s.jsxs("nav",{className:"w-52 shrink-0 border-r border-white/10 bg-black/20 select-none overflow-y-auto p-3 space-y-0.5",children:[s.jsx("span",{className:"px-3 pb-1.5 pt-1 block text-[11px] font-semibold tracking-wider text-zinc-500",children:"CONFIGURATION"}),s.jsx("div",{className:"flex flex-col gap-0.5",children:u4.map(({id:p,label:m,icon:x})=>s.jsx(v4,{icon:x,label:m,active:n===p,onClick:()=>r(p)},p))}),s.jsx("div",{className:"hidden pt-4 mt-2 border-t border-white/10",children:s.jsxs("div",{className:"flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.02] px-2.5 py-1 w-fit",children:[s.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blue-500"}),s.jsx("span",{className:"text-[11px] font-medium text-zinc-400",children:"v0.1.0"})]})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6 space-y-5",children:u?s.jsx("div",{className:"space-y-3",children:[1,2,3].map(p=>s.jsx("div",{className:"h-16 animate-pulse rounded-lg border border-white/10 bg-white/[0.02]",style:{opacity:1-p*.25}},p))}):s.jsxs(s.Fragment,{children:[s.jsx(y4,{}),h()]})})]})]})}function N4(){return s.jsxs("div",{className:"p-8",children:[s.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Docs"}),s.jsx("p",{className:"mt-4 text-zinc-400",children:"This is the Docs page."})]})}const j4=["overview","simulations","model","inspect","agents","tools","context","memory","apis","email","oauth","webhooks","traces","events","settings","docs"];function w4(){const[n,r]=N.useState(()=>{const b=localStorage.getItem("active_sidebar_item");return j4.includes(b)?b:"overview"}),[i,o]=N.useState(!1),[u,f]=N.useState(()=>{try{const b=localStorage.getItem("inspected_endpoint");return b?JSON.parse(b):null}catch{return null}}),[h,p]=N.useState(void 0);N.useEffect(()=>{localStorage.setItem("active_sidebar_item",n)},[n]),N.useEffect(()=>{u?localStorage.setItem("inspected_endpoint",JSON.stringify(u)):localStorage.removeItem("inspected_endpoint")},[u]);const m=b=>{b!=="inspect"&&f(null),b!=="traces"&&p(void 0),r(b)},x=b=>{f(b),r("inspect")},g=b=>{p(b),r("traces")},v=()=>{switch(n){case"overview":return s.jsx(d0,{onNavigate:m});case"simulations":return s.jsx(c3,{onViewTraces:g});case"model":return s.jsx(j3,{onInspect:x,onViewTraces:g});case"inspect":return s.jsx(_3,{endpoint:u,onBack:()=>m("model")});case"agents":return s.jsx(k3,{});case"tools":return s.jsx(C3,{});case"context":return s.jsx(T3,{});case"memory":return s.jsx(L3,{});case"apis":return s.jsx(Y3,{});case"email":return s.jsx(V3,{});case"oauth":return s.jsx(G3,{});case"webhooks":return s.jsx(X3,{});case"traces":return s.jsx(i4,{initialFilter:h,onNavigate:m});case"events":return s.jsx(o4,{});case"settings":return s.jsx(b4,{});case"docs":return s.jsx(N4,{});default:return s.jsx(d0,{})}};return s.jsxs("div",{className:"flex h-screen w-full overflow-hidden antialiased [font-feature-settings:'ss01'] font-sans text-xs transition-colors duration-300",style:{backgroundColor:"var(--bg-base)",color:"var(--text-secondary)"},children:[s.jsx(G1,{currentPage:n,onNavigate:m,onToggleAssistant:()=>o(!i),isAssistantOpen:i}),s.jsxs("div",{className:"flex min-w-0 flex-1 flex-col relative",children:[s.jsx("div",{className:"flex min-h-0 flex-1 overflow-auto transition-colors duration-300",style:{backgroundColor:"var(--bg-base)"},children:v()}),s.jsx(X1,{isOpen:i,onClose:()=>o(!1)})]})]})}const S4=()=>s.jsx($1,{children:s.jsx(w4,{})});wb.createRoot(document.getElementById("root")).render(s.jsx(N.StrictMode,{children:s.jsx(S4,{})}));
|