@volter/world-console 2.0.12 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/client/brand/icons.ts +2 -0
- package/client/console.css +390 -0
- package/client/console.tsx +1498 -956
- package/client/kit/kit.css +4 -0
- package/client/kit/kit.tsx +2 -2
- package/client/main.tsx +8 -0
- package/dist/client/brand/icons.ts +2 -0
- package/dist/client/console.bundle.js +13 -224
- package/dist/client/console.css +390 -0
- package/dist/client/console.tsx +1498 -956
- package/dist/client/kit/kit.css +4 -0
- package/dist/client/kit/kit.tsx +2 -2
- package/dist/client/main.bundle.js +250 -0
- package/dist/client/main.tsx +8 -0
- package/dist/src/console.js +1 -1
- package/package.json +8 -5
- package/src/console.ts +1 -1
|
@@ -1,248 +1,37 @@
|
|
|
1
|
-
var
|
|
1
|
+
var bQ=Object.create;var{getPrototypeOf:DQ,defineProperty:G8,getOwnPropertyNames:hQ}=Object;var EQ=Object.prototype.hasOwnProperty;function xQ(_){return this[_]}var mQ,gQ,h1=(_,Q,J)=>{var q=_!=null&&typeof _==="object";if(q){var U=Q?mQ??=new WeakMap:gQ??=new WeakMap,G=U.get(_);if(G)return G}J=_!=null?bQ(DQ(_)):{};let Z=Q||!_||!_.__esModule?G8(J,"default",{value:_,enumerable:!0}):J;for(let F of hQ(_))if(!EQ.call(Z,F))G8(Z,F,{get:xQ.bind(_,F),enumerable:!0});if(q)U.set(_,Z);return Z};var i0=(_,Q)=>()=>(Q||_((Q={exports:{}}).exports,Q),Q.exports);var X0=i0((pQ,y5)=>{(function(){function _(M,x){Object.defineProperty(q.prototype,M,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",x[0],x[1])}})}function Q(M){if(M===null||typeof M!=="object")return null;return M=Q1&&M[Q1]||M["@@iterator"],typeof M==="function"?M:null}function J(M,x){M=(M=M.constructor)&&(M.displayName||M.name)||"ReactClass";var e=M+"."+x;F1[e]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",x,M),F1[e]=!0)}function q(M,x,e){this.props=M,this.context=x,this.refs=Y1,this.updater=e||J1}function U(){}function G(M,x,e){this.props=M,this.context=x,this.refs=Y1,this.updater=e||J1}function Z(){}function F(M){return""+M}function L(M){try{F(M);var x=!1}catch(q1){x=!0}if(x){x=console;var e=x.error,_1=typeof Symbol==="function"&&Symbol.toStringTag&&M[Symbol.toStringTag]||M.constructor.name||"Object";return e.call(x,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",_1),F(M)}}function Y(M){if(M==null)return null;if(typeof M==="function")return M.$$typeof===O1?null:M.displayName||M.name||null;if(typeof M==="string")return M;switch(M){case h:return"Fragment";case y:return"Profiler";case f:return"StrictMode";case o:return"Suspense";case d:return"SuspenseList";case n:return"Activity"}if(typeof M==="object")switch(typeof M.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),M.$$typeof){case u:return"Portal";case b:return M.displayName||"Context";case g:return(M._context.displayName||"Context")+".Consumer";case t:var x=M.render;return M=M.displayName,M||(M=x.displayName||x.name||"",M=M!==""?"ForwardRef("+M+")":"ForwardRef"),M;case a:return x=M.displayName||null,x!==null?x:Y(M.type)||"Memo";case c:x=M._payload,M=M._init;try{return Y(M(x))}catch(e){}}return null}function H(M){if(M===h)return"<>";if(typeof M==="object"&&M!==null&&M.$$typeof===c)return"<...>";try{var x=Y(M);return x?"<"+x+">":"<...>"}catch(e){return"<...>"}}function K(){var M=Z1.A;return M===null?null:M.getOwner()}function X(){return Error("react-stack-top-frame")}function z(M){if(D1.call(M,"key")){var x=Object.getOwnPropertyDescriptor(M,"key").get;if(x&&x.isReactWarning)return!1}return M.key!==void 0}function W(M,x){function e(){t1||(t1=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",x))}e.isReactWarning=!0,Object.defineProperty(M,"key",{get:e,configurable:!0})}function O(){var M=Y(this.type);return F0[M]||(F0[M]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),M=this.props.ref,M!==void 0?M:null}function T(M,x,e,_1,q1,z1){var L1=e.ref;return M={$$typeof:E,type:M,key:x,props:e,_owner:_1},(L1!==void 0?L1:null)!==null?Object.defineProperty(M,"ref",{enumerable:!1,get:O}):Object.defineProperty(M,"ref",{enumerable:!1,value:null}),M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(M,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(M,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:q1}),Object.defineProperty(M,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:z1}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M}function B(M,x){return x=T(M.type,x,M.props,M._owner,M._debugStack,M._debugTask),M._store&&(x._store.validated=M._store.validated),x}function w(M){A(M)?M._store&&(M._store.validated=1):typeof M==="object"&&M!==null&&M.$$typeof===c&&(M._payload.status==="fulfilled"?A(M._payload.value)&&M._payload.value._store&&(M._payload.value._store.validated=1):M._store&&(M._store.validated=1))}function A(M){return typeof M==="object"&&M!==null&&M.$$typeof===E}function R(M){var x={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(e){return x[e]})}function I(M,x){return typeof M==="object"&&M!==null&&M.key!=null?(L(M.key),R(""+M.key)):x.toString(36)}function C(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status==="string"?M.then(Z,Z):(M.status="pending",M.then(function(x){M.status==="pending"&&(M.status="fulfilled",M.value=x)},function(x){M.status==="pending"&&(M.status="rejected",M.reason=x)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function P(M,x,e,_1,q1){var z1=typeof M;if(z1==="undefined"||z1==="boolean")M=null;var L1=!1;if(M===null)L1=!0;else switch(z1){case"bigint":case"string":case"number":L1=!0;break;case"object":switch(M.$$typeof){case E:case u:L1=!0;break;case c:return L1=M._init,P(L1(M._payload),x,e,_1,q1)}}if(L1){L1=M,q1=q1(L1);var f1=_1===""?"."+I(L1,0):_1;return K1(q1)?(e="",f1!=null&&(e=f1.replace(n1,"$&/")+"/"),P(q1,x,e,"",function(H0){return H0})):q1!=null&&(A(q1)&&(q1.key!=null&&(L1&&L1.key===q1.key||L(q1.key)),e=B(q1,e+(q1.key==null||L1&&L1.key===q1.key?"":(""+q1.key).replace(n1,"$&/")+"/")+f1),_1!==""&&L1!=null&&A(L1)&&L1.key==null&&L1._store&&!L1._store.validated&&(e._store.validated=2),q1=e),x.push(q1)),1}if(L1=0,f1=_1===""?".":_1+":",K1(M))for(var W1=0;W1<M.length;W1++)_1=M[W1],z1=f1+I(_1,W1),L1+=P(_1,x,e,z1,q1);else if(W1=Q(M),typeof W1==="function")for(W1===M.entries&&(o1||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),o1=!0),M=W1.call(M),W1=0;!(_1=M.next()).done;)_1=_1.value,z1=f1+I(_1,W1++),L1+=P(_1,x,e,z1,q1);else if(z1==="object"){if(typeof M.then==="function")return P(C(M),x,e,_1,q1);throw x=String(M),Error("Objects are not valid as a React child (found: "+(x==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":x)+"). If you meant to render a collection of children, use an array instead.")}return L1}function S(M,x,e){if(M==null)return M;var _1=[],q1=0;return P(M,_1,"","",function(z1){return x.call(e,z1,q1++)}),_1}function N(M){if(M._status===-1){var x=M._ioInfo;x!=null&&(x.start=x.end=performance.now()),x=M._result;var e=x();if(e.then(function(q1){if(M._status===0||M._status===-1){M._status=1,M._result=q1;var z1=M._ioInfo;z1!=null&&(z1.end=performance.now()),e.status===void 0&&(e.status="fulfilled",e.value=q1)}},function(q1){if(M._status===0||M._status===-1){M._status=2,M._result=q1;var z1=M._ioInfo;z1!=null&&(z1.end=performance.now()),e.status===void 0&&(e.status="rejected",e.reason=q1)}}),x=M._ioInfo,x!=null){x.value=e;var _1=e.displayName;typeof _1==="string"&&(x.name=_1)}M._status===-1&&(M._status=0,M._result=e)}if(M._status===1)return x=M._result,x===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
2
|
|
|
3
3
|
Your code should look like:
|
|
4
4
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
5
|
|
|
6
|
-
Did you accidentally put curly braces around the import?`,
|
|
6
|
+
Did you accidentally put curly braces around the import?`,x),"default"in x||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
7
|
|
|
8
8
|
Your code should look like:
|
|
9
|
-
const MyComponent = lazy(() => import('./MyComponent'))`,
|
|
9
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,x),x.default;throw M._result}function v(){var M=Z1.H;return M===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
10
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
11
|
2. You might be breaking the Rules of Hooks
|
|
12
12
|
3. You might have more than one copy of React in the same app
|
|
13
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),S}function _1(){b1.asyncTransitions--}function $1(S){if(v5===null)try{var e=("require"+Math.random()).slice(0,7);v5=(eQ&&eQ[e]).call(eQ,"timers").setImmediate}catch(A1){v5=function(R1){M3===!1&&(M3=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var P1=new MessageChannel;P1.port1.onmessage=R1,P1.port2.postMessage(void 0)}}return v5(S)}function J1(S){return 1<S.length&&typeof AggregateError==="function"?AggregateError(S):S[0]}function y(S,e){e!==b4-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),b4=e}function u(S,e,A1){var R1=b1.actQueue;if(R1!==null)if(R1.length!==0)try{x(R1),$1(function(){return u(S,e,A1)});return}catch(P1){b1.thrownErrors.push(P1)}else b1.actQueue=null;0<b1.thrownErrors.length?(R1=J1(b1.thrownErrors),b1.thrownErrors.length=0,A1(R1)):e(S)}function x(S){if(!x4){x4=!0;var e=0;try{for(;e<S.length;e++){var A1=S[e];do{b1.didUsePromise=!1;var R1=A1(!1);if(R1!==null){if(b1.didUsePromise){S[e]=A1,S.splice(0,e);return}A1=R1}else break}while(1)}S.length=0}catch(P1){S.splice(0,e+1),b1.thrownErrors.push(P1)}finally{x4=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var d=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),q1=Symbol.for("react.consumer"),Q1=Symbol.for("react.context"),Y1=Symbol.for("react.forward_ref"),L1=Symbol.for("react.suspense"),M1=Symbol.for("react.suspense_list"),I1=Symbol.for("react.memo"),X1=Symbol.for("react.lazy"),f1=Symbol.for("react.activity"),l1=Symbol.iterator,W1={},S1={isMounted:function(){return!1},enqueueForceUpdate:function(S){Z(S,"forceUpdate")},enqueueReplaceState:function(S){Z(S,"replaceState")},enqueueSetState:function(S){Z(S,"setState")}},v1=Object.assign,c1={};Object.freeze(c1),K.prototype.isReactComponent={},K.prototype.setState=function(S,e){if(typeof S!=="object"&&typeof S!=="function"&&S!=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,S,e,"setState")},K.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};var E1={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(e5 in E1)E1.hasOwnProperty(e5)&&Q(e5,E1[e5]);X.prototype=K.prototype,E1=W.prototype=new X,E1.constructor=W,v1(E1,K.prototype),E1.isPureReactComponent=!0;var j1=Array.isArray,V0=Symbol.for("react.client.reference"),b1={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Z2=Object.prototype.hasOwnProperty,_0=console.createTask?console.createTask:function(){return null};E1={react_stack_bottom_frame:function(S){return S()}};var h2,z2,I2={},f2=E1.react_stack_bottom_frame.bind(E1,M)(),P2=_0(R(M)),B2=!1,A2=/\/+/g,L2=typeof reportError==="function"?reportError:function(S){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S==="object"&&S!==null&&typeof S.message==="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(e))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",S);return}console.error(S)},M3=!1,v5=null,b4=0,u4=!1,x4=!1,I6=typeof queueMicrotask==="function"?function(S){queueMicrotask(function(){return queueMicrotask(S)})}:$1;E1=Object.freeze({__proto__:null,c:function(S){return m().useMemoCache(S)}});var e5={map:p,forEach:function(S,e,A1){p(S,function(){e.apply(this,arguments)},A1)},count:function(S){var e=0;return p(S,function(){e++}),e},toArray:function(S){return p(S,function(e){return e})||[]},only:function(S){if(!P(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};yf.Activity=f1,yf.Children=e5,yf.Component=K,yf.Fragment=n,yf.Profiler=i,yf.PureComponent=W,yf.StrictMode=j,yf.Suspense=L1,yf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=b1,yf.__COMPILER_RUNTIME=E1,yf.act=function(S){var e=b1.actQueue,A1=b4;b4++;var R1=b1.actQueue=e!==null?e:[],P1=!1;try{var h1=S()}catch(V1){b1.thrownErrors.push(V1)}if(0<b1.thrownErrors.length)throw y(e,A1),S=J1(b1.thrownErrors),b1.thrownErrors.length=0,S;if(h1!==null&&typeof h1==="object"&&typeof h1.then==="function"){var m1=h1;return I6(function(){P1||u4||(u4=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(V1,J2){P1=!0,m1.then(function(N2){if(y(e,A1),A1===0){try{x(R1),$1(function(){return u(N2,V1,J2)})}catch(f6){b1.thrownErrors.push(f6)}if(0<b1.thrownErrors.length){var _4=J1(b1.thrownErrors);b1.thrownErrors.length=0,J2(_4)}}else V1(N2)},function(N2){y(e,A1),0<b1.thrownErrors.length?(N2=J1(b1.thrownErrors),b1.thrownErrors.length=0,J2(N2)):J2(N2)})}}}var U0=h1;if(y(e,A1),A1===0&&(x(R1),R1.length!==0&&I6(function(){P1||u4||(u4=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),b1.actQueue=null),0<b1.thrownErrors.length)throw S=J1(b1.thrownErrors),b1.thrownErrors.length=0,S;return{then:function(V1,J2){P1=!0,A1===0?(b1.actQueue=R1,$1(function(){return u(U0,V1,J2)})):V1(U0)}}},yf.cache=function(S){return function(){return S.apply(null,arguments)}},yf.cacheSignal=function(){return null},yf.captureOwnerStack=function(){var S=b1.getCurrentStack;return S===null?null:S()},yf.cloneElement=function(S,e,A1){if(S===null||S===void 0)throw Error("The argument must be a React element, but you passed "+S+".");var R1=v1({},S.props),P1=S.key,h1=S._owner;if(e!=null){var m1;_:{if(Z2.call(e,"ref")&&(m1=Object.getOwnPropertyDescriptor(e,"ref").get)&&m1.isReactWarning){m1=!1;break _}m1=e.ref!==void 0}m1&&(h1=L()),f(e)&&(O(e.key),P1=""+e.key);for(U0 in e)!Z2.call(e,U0)||U0==="key"||U0==="__self"||U0==="__source"||U0==="ref"&&e.ref===void 0||(R1[U0]=e[U0])}var U0=arguments.length-2;if(U0===1)R1.children=A1;else if(1<U0){m1=Array(U0);for(var V1=0;V1<U0;V1++)m1[V1]=arguments[V1+2];R1.children=m1}R1=V(S.type,P1,R1,h1,S._debugStack,S._debugTask);for(P1=2;P1<arguments.length;P1++)h(arguments[P1]);return R1},yf.createContext=function(S){return S={$$typeof:Q1,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:q1,_context:S},S._currentRenderer=null,S._currentRenderer2=null,S},yf.createElement=function(S,e,A1){for(var R1=2;R1<arguments.length;R1++)h(arguments[R1]);R1={};var P1=null;if(e!=null)for(V1 in z2||!("__self"in e)||"key"in e||(z2=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),f(e)&&(O(e.key),P1=""+e.key),e)Z2.call(e,V1)&&V1!=="key"&&V1!=="__self"&&V1!=="__source"&&(R1[V1]=e[V1]);var h1=arguments.length-2;if(h1===1)R1.children=A1;else if(1<h1){for(var m1=Array(h1),U0=0;U0<h1;U0++)m1[U0]=arguments[U0+2];Object.freeze&&Object.freeze(m1),R1.children=m1}if(S&&S.defaultProps)for(V1 in h1=S.defaultProps,h1)R1[V1]===void 0&&(R1[V1]=h1[V1]);P1&&I(R1,typeof S==="function"?S.displayName||S.name||"Unknown":S);var V1=1e4>b1.recentlyCreatedOwnerStacks++;return V(S,P1,R1,L(),V1?Error("react-stack-top-frame"):f2,V1?_0(R(S)):P2)},yf.createRef=function(){var S={current:null};return Object.seal(S),S},yf.forwardRef=function(S){S!=null&&S.$$typeof===I1?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof S!=="function"?console.error("forwardRef requires a render function but was given %s.",S===null?"null":typeof S):S.length!==0&&S.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",S.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),S!=null&&S.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var e={$$typeof:Y1,render:S},A1;return Object.defineProperty(e,"displayName",{enumerable:!1,configurable:!0,get:function(){return A1},set:function(R1){A1=R1,S.name||S.displayName||(Object.defineProperty(S,"name",{value:R1}),S.displayName=R1)}}),e},yf.isValidElement=P,yf.lazy=function(S){S={_status:-1,_result:S};var e={$$typeof:X1,_payload:S,_init:a},A1={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return S._ioInfo=A1,e._debugInfo=[{awaited:A1}],e},yf.memo=function(S,e){S==null&&console.error("memo: The first argument must be a component. Instead received: %s",S===null?"null":typeof S),e={$$typeof:I1,type:S,compare:e===void 0?null:e};var A1;return Object.defineProperty(e,"displayName",{enumerable:!1,configurable:!0,get:function(){return A1},set:function(R1){A1=R1,S.name||S.displayName||(Object.defineProperty(S,"name",{value:R1}),S.displayName=R1)}}),e},yf.startTransition=function(S){var e=b1.T,A1={};A1._updatedFibers=new Set,b1.T=A1;try{var R1=S(),P1=b1.S;P1!==null&&P1(A1,R1),typeof R1==="object"&&R1!==null&&typeof R1.then==="function"&&(b1.asyncTransitions++,R1.then(_1,_1),R1.then(z,L2))}catch(h1){L2(h1)}finally{e===null&&A1._updatedFibers&&(S=A1._updatedFibers.size,A1._updatedFibers.clear(),10<S&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),e!==null&&A1.types!==null&&(e.types!==null&&e.types!==A1.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),e.types=A1.types),b1.T=e}},yf.unstable_useCacheRefresh=function(){return m().useCacheRefresh()},yf.use=function(S){return m().use(S)},yf.useActionState=function(S,e,A1){return m().useActionState(S,e,A1)},yf.useCallback=function(S,e){return m().useCallback(S,e)},yf.useContext=function(S){var e=m();return S.$$typeof===q1&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),e.useContext(S)},yf.useDebugValue=function(S,e){return m().useDebugValue(S,e)},yf.useDeferredValue=function(S,e){return m().useDeferredValue(S,e)},yf.useEffect=function(S,e){return S==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),m().useEffect(S,e)},yf.useEffectEvent=function(S){return m().useEffectEvent(S)},yf.useId=function(){return m().useId()},yf.useImperativeHandle=function(S,e,A1){return m().useImperativeHandle(S,e,A1)},yf.useInsertionEffect=function(S,e){return S==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),m().useInsertionEffect(S,e)},yf.useLayoutEffect=function(S,e){return S==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),m().useLayoutEffect(S,e)},yf.useMemo=function(S,e){return m().useMemo(S,e)},yf.useOptimistic=function(S,e){return m().useOptimistic(S,e)},yf.useReducer=function(S,e,A1){return m().useReducer(S,e,A1)},yf.useRef=function(S){return m().useRef(S)},yf.useState=function(S){return m().useState(S)},yf.useSyncExternalStore=function(S,e,A1){return m().useSyncExternalStore(S,e,A1)},yf.useTransition=function(){return m().useTransition()},yf.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var zL=j4((vf)=>{var X8=u0(i5());(function(){function Q(j){if(j==null)return null;if(typeof j==="function")return j.$$typeof===m?null:j.displayName||j.name||null;if(typeof j==="string")return j;switch(j){case D:return"Fragment";case k:return"Profiler";case V:return"StrictMode";case v:return"Suspense";case b:return"SuspenseList";case a:return"Activity"}if(typeof j==="object")switch(typeof j.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),j.$$typeof){case I:return"Portal";case P:return j.displayName||"Context";case h:return(j._context.displayName||"Context")+".Consumer";case C:var i=j.render;return j=j.displayName,j||(j=i.displayName||i.name||"",j=j!==""?"ForwardRef("+j+")":"ForwardRef"),j;case E:return i=j.displayName||null,i!==null?i:Q(j.type)||"Memo";case p:i=j._payload,j=j._init;try{return Q(j(i))}catch(q1){}}return null}function U(j){return""+j}function Z(j){try{U(j);var i=!1}catch(Y1){i=!0}if(i){i=console;var q1=i.error,Q1=typeof Symbol==="function"&&Symbol.toStringTag&&j[Symbol.toStringTag]||j.constructor.name||"Object";return q1.call(i,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q1),U(j)}}function K(j){if(j===D)return"<>";if(typeof j==="object"&&j!==null&&j.$$typeof===p)return"<...>";try{var i=Q(j);return i?"<"+i+">":"<...>"}catch(q1){return"<...>"}}function X(){var j=_1.A;return j===null?null:j.getOwner()}function W(){return Error("react-stack-top-frame")}function z(j){if($1.call(j,"key")){var i=Object.getOwnPropertyDescriptor(j,"key").get;if(i&&i.isReactWarning)return!1}return j.key!==void 0}function B(j,i){function q1(){u||(u=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",i))}q1.isReactWarning=!0,Object.defineProperty(j,"key",{get:q1,configurable:!0})}function O(){var j=Q(this.type);return x[j]||(x[j]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),j=this.props.ref,j!==void 0?j:null}function T(j,i,q1,Q1,Y1,L1){var M1=q1.ref;return j={$$typeof:f,type:j,key:i,props:q1,_owner:Q1},(M1!==void 0?M1:null)!==null?Object.defineProperty(j,"ref",{enumerable:!1,get:O}):Object.defineProperty(j,"ref",{enumerable:!1,value:null}),j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(j,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(j,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y1}),Object.defineProperty(j,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:L1}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j}function R(j,i,q1,Q1,Y1,L1){var M1=i.children;if(M1!==void 0)if(Q1)if(J1(M1)){for(Q1=0;Q1<M1.length;Q1++)L(M1[Q1]);Object.freeze&&Object.freeze(M1)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else L(M1);if($1.call(i,"key")){M1=Q(j);var I1=Object.keys(i).filter(function(f1){return f1!=="key"});Q1=0<I1.length?"{key: someKey, "+I1.join(": ..., ")+": ...}":"{key: someKey}",n[M1+Q1]||(I1=0<I1.length?"{"+I1.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
13
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),M}function j(){Z1.asyncTransitions--}function m(M){if(y0===null)try{var x=("require"+Math.random()).slice(0,7);y0=(y5&&y5[x]).call(y5,"timers").setImmediate}catch(e){y0=function(_1){B2===!1&&(B2=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var q1=new MessageChannel;q1.port1.onmessage=_1,q1.port2.postMessage(void 0)}}return y0(M)}function p(M){return 1<M.length&&typeof AggregateError==="function"?AggregateError(M):M[0]}function k(M,x){x!==M2-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),M2=x}function D(M,x,e){var _1=Z1.actQueue;if(_1!==null)if(_1.length!==0)try{V(_1),m(function(){return D(M,x,e)});return}catch(q1){Z1.thrownErrors.push(q1)}else Z1.actQueue=null;0<Z1.thrownErrors.length?(_1=p(Z1.thrownErrors),Z1.thrownErrors.length=0,e(_1)):x(M)}function V(M){if(!m2){m2=!0;var x=0;try{for(;x<M.length;x++){var e=M[x];do{Z1.didUsePromise=!1;var _1=e(!1);if(_1!==null){if(Z1.didUsePromise){M[x]=e,M.splice(0,x);return}e=_1}else break}while(1)}M.length=0}catch(q1){M.splice(0,x+1),Z1.thrownErrors.push(q1)}finally{m2=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var E=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),b=Symbol.for("react.context"),t=Symbol.for("react.forward_ref"),o=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),n=Symbol.for("react.activity"),Q1=Symbol.iterator,F1={},J1={isMounted:function(){return!1},enqueueForceUpdate:function(M){J(M,"forceUpdate")},enqueueReplaceState:function(M){J(M,"replaceState")},enqueueSetState:function(M){J(M,"setState")}},U1=Object.assign,Y1={};Object.freeze(Y1),q.prototype.isReactComponent={},q.prototype.setState=function(M,x){if(typeof M!=="object"&&typeof M!=="function"&&M!=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,M,x,"setState")},q.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};var s={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(r0 in s)s.hasOwnProperty(r0)&&_(r0,s[r0]);U.prototype=q.prototype,s=G.prototype=new U,s.constructor=G,U1(s,q.prototype),s.isPureReactComponent=!0;var K1=Array.isArray,O1=Symbol.for("react.client.reference"),Z1={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},D1=Object.prototype.hasOwnProperty,x1=console.createTask?console.createTask:function(){return null};s={react_stack_bottom_frame:function(M){return M()}};var t1,k0,F0={},M0=s.react_stack_bottom_frame.bind(s,X)(),d1=x1(H(X)),o1=!1,n1=/\/+/g,K0=typeof reportError==="function"?reportError:function(M){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var x=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M==="object"&&M!==null&&typeof M.message==="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(x))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",M);return}console.error(M)},B2=!1,y0=null,M2=0,T2=!1,m2=!1,k5=typeof queueMicrotask==="function"?function(M){queueMicrotask(function(){return queueMicrotask(M)})}:m;s=Object.freeze({__proto__:null,c:function(M){return v().useMemoCache(M)}});var r0={map:S,forEach:function(M,x,e){S(M,function(){x.apply(this,arguments)},e)},count:function(M){var x=0;return S(M,function(){x++}),x},toArray:function(M){return S(M,function(x){return x})||[]},only:function(M){if(!A(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};pQ.Activity=n,pQ.Children=r0,pQ.Component=q,pQ.Fragment=h,pQ.Profiler=y,pQ.PureComponent=G,pQ.StrictMode=f,pQ.Suspense=o,pQ.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z1,pQ.__COMPILER_RUNTIME=s,pQ.act=function(M){var x=Z1.actQueue,e=M2;M2++;var _1=Z1.actQueue=x!==null?x:[],q1=!1;try{var z1=M()}catch(W1){Z1.thrownErrors.push(W1)}if(0<Z1.thrownErrors.length)throw k(x,e),M=p(Z1.thrownErrors),Z1.thrownErrors.length=0,M;if(z1!==null&&typeof z1==="object"&&typeof z1.then==="function"){var L1=z1;return k5(function(){q1||T2||(T2=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(W1,H0){q1=!0,L1.then(function(v0){if(k(x,e),e===0){try{V(_1),m(function(){return D(v0,W1,H0)})}catch(j4){Z1.thrownErrors.push(j4)}if(0<Z1.thrownErrors.length){var v4=p(Z1.thrownErrors);Z1.thrownErrors.length=0,H0(v4)}}else W1(v0)},function(v0){k(x,e),0<Z1.thrownErrors.length?(v0=p(Z1.thrownErrors),Z1.thrownErrors.length=0,H0(v0)):H0(v0)})}}}var f1=z1;if(k(x,e),e===0&&(V(_1),_1.length!==0&&k5(function(){q1||T2||(T2=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),Z1.actQueue=null),0<Z1.thrownErrors.length)throw M=p(Z1.thrownErrors),Z1.thrownErrors.length=0,M;return{then:function(W1,H0){q1=!0,e===0?(Z1.actQueue=_1,m(function(){return D(f1,W1,H0)})):W1(f1)}}},pQ.cache=function(M){return function(){return M.apply(null,arguments)}},pQ.cacheSignal=function(){return null},pQ.captureOwnerStack=function(){var M=Z1.getCurrentStack;return M===null?null:M()},pQ.cloneElement=function(M,x,e){if(M===null||M===void 0)throw Error("The argument must be a React element, but you passed "+M+".");var _1=U1({},M.props),q1=M.key,z1=M._owner;if(x!=null){var L1;_:{if(D1.call(x,"ref")&&(L1=Object.getOwnPropertyDescriptor(x,"ref").get)&&L1.isReactWarning){L1=!1;break _}L1=x.ref!==void 0}L1&&(z1=K()),z(x)&&(L(x.key),q1=""+x.key);for(f1 in x)!D1.call(x,f1)||f1==="key"||f1==="__self"||f1==="__source"||f1==="ref"&&x.ref===void 0||(_1[f1]=x[f1])}var f1=arguments.length-2;if(f1===1)_1.children=e;else if(1<f1){L1=Array(f1);for(var W1=0;W1<f1;W1++)L1[W1]=arguments[W1+2];_1.children=L1}_1=T(M.type,q1,_1,z1,M._debugStack,M._debugTask);for(q1=2;q1<arguments.length;q1++)w(arguments[q1]);return _1},pQ.createContext=function(M){return M={$$typeof:b,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:g,_context:M},M._currentRenderer=null,M._currentRenderer2=null,M},pQ.createElement=function(M,x,e){for(var _1=2;_1<arguments.length;_1++)w(arguments[_1]);_1={};var q1=null;if(x!=null)for(W1 in k0||!("__self"in x)||"key"in x||(k0=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),z(x)&&(L(x.key),q1=""+x.key),x)D1.call(x,W1)&&W1!=="key"&&W1!=="__self"&&W1!=="__source"&&(_1[W1]=x[W1]);var z1=arguments.length-2;if(z1===1)_1.children=e;else if(1<z1){for(var L1=Array(z1),f1=0;f1<z1;f1++)L1[f1]=arguments[f1+2];Object.freeze&&Object.freeze(L1),_1.children=L1}if(M&&M.defaultProps)for(W1 in z1=M.defaultProps,z1)_1[W1]===void 0&&(_1[W1]=z1[W1]);q1&&W(_1,typeof M==="function"?M.displayName||M.name||"Unknown":M);var W1=1e4>Z1.recentlyCreatedOwnerStacks++;return T(M,q1,_1,K(),W1?Error("react-stack-top-frame"):M0,W1?x1(H(M)):d1)},pQ.createRef=function(){var M={current:null};return Object.seal(M),M},pQ.forwardRef=function(M){M!=null&&M.$$typeof===a?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof M!=="function"?console.error("forwardRef requires a render function but was given %s.",M===null?"null":typeof M):M.length!==0&&M.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",M.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),M!=null&&M.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var x={$$typeof:t,render:M},e;return Object.defineProperty(x,"displayName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(_1){e=_1,M.name||M.displayName||(Object.defineProperty(M,"name",{value:_1}),M.displayName=_1)}}),x},pQ.isValidElement=A,pQ.lazy=function(M){M={_status:-1,_result:M};var x={$$typeof:c,_payload:M,_init:N},e={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return M._ioInfo=e,x._debugInfo=[{awaited:e}],x},pQ.memo=function(M,x){M==null&&console.error("memo: The first argument must be a component. Instead received: %s",M===null?"null":typeof M),x={$$typeof:a,type:M,compare:x===void 0?null:x};var e;return Object.defineProperty(x,"displayName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(_1){e=_1,M.name||M.displayName||(Object.defineProperty(M,"name",{value:_1}),M.displayName=_1)}}),x},pQ.startTransition=function(M){var x=Z1.T,e={};e._updatedFibers=new Set,Z1.T=e;try{var _1=M(),q1=Z1.S;q1!==null&&q1(e,_1),typeof _1==="object"&&_1!==null&&typeof _1.then==="function"&&(Z1.asyncTransitions++,_1.then(j,j),_1.then(Z,K0))}catch(z1){K0(z1)}finally{x===null&&e._updatedFibers&&(M=e._updatedFibers.size,e._updatedFibers.clear(),10<M&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),x!==null&&e.types!==null&&(x.types!==null&&x.types!==e.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),x.types=e.types),Z1.T=x}},pQ.unstable_useCacheRefresh=function(){return v().useCacheRefresh()},pQ.use=function(M){return v().use(M)},pQ.useActionState=function(M,x,e){return v().useActionState(M,x,e)},pQ.useCallback=function(M,x){return v().useCallback(M,x)},pQ.useContext=function(M){var x=v();return M.$$typeof===g&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),x.useContext(M)},pQ.useDebugValue=function(M,x){return v().useDebugValue(M,x)},pQ.useDeferredValue=function(M,x){return v().useDeferredValue(M,x)},pQ.useEffect=function(M,x){return M==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),v().useEffect(M,x)},pQ.useEffectEvent=function(M){return v().useEffectEvent(M)},pQ.useId=function(){return v().useId()},pQ.useImperativeHandle=function(M,x,e){return v().useImperativeHandle(M,x,e)},pQ.useInsertionEffect=function(M,x){return M==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),v().useInsertionEffect(M,x)},pQ.useLayoutEffect=function(M,x){return M==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),v().useLayoutEffect(M,x)},pQ.useMemo=function(M,x){return v().useMemo(M,x)},pQ.useOptimistic=function(M,x){return v().useOptimistic(M,x)},pQ.useReducer=function(M,x,e){return v().useReducer(M,x,e)},pQ.useRef=function(M){return v().useRef(M)},pQ.useState=function(M){return v().useState(M)},pQ.useSyncExternalStore=function(M,x,e){return v().useSyncExternalStore(M,x,e)},pQ.useTransition=function(){return v().useTransition()},pQ.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Z8=i0((cQ)=>{var d0=h1(X0());(function(){function _(f){if(f==null)return null;if(typeof f==="function")return f.$$typeof===v?null:f.displayName||f.name||null;if(typeof f==="string")return f;switch(f){case O:return"Fragment";case B:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case C:return"SuspenseList";case N:return"Activity"}if(typeof f==="object")switch(typeof f.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),f.$$typeof){case W:return"Portal";case A:return f.displayName||"Context";case w:return(f._context.displayName||"Context")+".Consumer";case R:var y=f.render;return f=f.displayName,f||(f=y.displayName||y.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case P:return y=f.displayName||null,y!==null?y:_(f.type)||"Memo";case S:y=f._payload,f=f._init;try{return _(f(y))}catch(g){}}return null}function Q(f){return""+f}function J(f){try{Q(f);var y=!1}catch(t){y=!0}if(y){y=console;var g=y.error,b=typeof Symbol==="function"&&Symbol.toStringTag&&f[Symbol.toStringTag]||f.constructor.name||"Object";return g.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),Q(f)}}function q(f){if(f===O)return"<>";if(typeof f==="object"&&f!==null&&f.$$typeof===S)return"<...>";try{var y=_(f);return y?"<"+y+">":"<...>"}catch(g){return"<...>"}}function U(){var f=j.A;return f===null?null:f.getOwner()}function G(){return Error("react-stack-top-frame")}function Z(f){if(m.call(f,"key")){var y=Object.getOwnPropertyDescriptor(f,"key").get;if(y&&y.isReactWarning)return!1}return f.key!==void 0}function F(f,y){function g(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}g.isReactWarning=!0,Object.defineProperty(f,"key",{get:g,configurable:!0})}function L(){var f=_(this.type);return V[f]||(V[f]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),f=this.props.ref,f!==void 0?f:null}function Y(f,y,g,b,t,o){var d=g.ref;return f={$$typeof:z,type:f,key:y,props:g,_owner:b},(d!==void 0?d:null)!==null?Object.defineProperty(f,"ref",{enumerable:!1,get:L}):Object.defineProperty(f,"ref",{enumerable:!1,value:null}),f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(f,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(f,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:t}),Object.defineProperty(f,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:o}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f}function H(f,y,g,b,t,o){var d=y.children;if(d!==void 0)if(b)if(p(d)){for(b=0;b<d.length;b++)K(d[b]);Object.freeze&&Object.freeze(d)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else K(d);if(m.call(y,"key")){d=_(f);var a=Object.keys(y).filter(function(n){return n!=="key"});b=0<a.length?"{key: someKey, "+a.join(": ..., ")+": ...}":"{key: someKey}",h[d+b]||(a=0<a.length?"{"+a.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
14
14
|
let props = %s;
|
|
15
15
|
<%s {...props} />
|
|
16
16
|
React keys must be passed directly to JSX without using spread:
|
|
17
17
|
let props = %s;
|
|
18
|
-
<%s key={someKey} {...props} />`,
|
|
18
|
+
<%s key={someKey} {...props} />`,b,d,a,d),h[d+b]=!0)}if(d=null,g!==void 0&&(J(g),d=""+g),Z(y)&&(J(y.key),d=""+y.key),"key"in y){g={};for(var c in y)c!=="key"&&(g[c]=y[c])}else g=y;return d&&F(g,typeof f==="function"?f.displayName||f.name||"Unknown":f),Y(f,d,g,U(),t,o)}function K(f){X(f)?f._store&&(f._store.validated=1):typeof f==="object"&&f!==null&&f.$$typeof===S&&(f._payload.status==="fulfilled"?X(f._payload.value)&&f._payload.value._store&&(f._payload.value._store.validated=1):f._store&&(f._store.validated=1))}function X(f){return typeof f==="object"&&f!==null&&f.$$typeof===z}var z=Symbol.for("react.transitional.element"),W=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),A=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),v=Symbol.for("react.client.reference"),j=d0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,m=Object.prototype.hasOwnProperty,p=Array.isArray,k=console.createTask?console.createTask:function(){return null};d0={react_stack_bottom_frame:function(f){return f()}};var D,V={},E=d0.react_stack_bottom_frame.bind(d0,G)(),u=k(q(G)),h={};cQ.Fragment=O,cQ.jsx=function(f,y,g){var b=1e4>j.recentlyCreatedOwnerStacks++;return H(f,y,g,!1,b?Error("react-stack-top-frame"):E,b?k(q(f)):u)},cQ.jsxs=function(f,y,g){var b=1e4>j.recentlyCreatedOwnerStacks++;return H(f,y,g,!0,b?Error("react-stack-top-frame"):E,b?k(q(f)):u)}})()});var E7=i0((Eq)=>{var a1=h1(X0());(function(){function _(X,z){return X===z&&(X!==0||1/X===1/z)||X!==X&&z!==z}function Q(X,z){Y||a1.startTransition===void 0||(Y=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var W=z();if(!H){var O=z();U(W,O)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),H=!0)}O=G({inst:{value:W,getSnapshot:z}});var T=O[0].inst,B=O[1];return F(function(){T.value=W,T.getSnapshot=z,J(T)&&B({inst:T})},[X,W,z]),Z(function(){return J(T)&&B({inst:T}),X(function(){J(T)&&B({inst:T})})},[X]),L(W),W}function J(X){var z=X.getSnapshot;X=X.value;try{var W=z();return!U(X,W)}catch(O){return!0}}function q(X,z){return z()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var U=typeof Object.is==="function"?Object.is:_,G=a1.useState,Z=a1.useEffect,F=a1.useLayoutEffect,L=a1.useDebugValue,Y=!1,H=!1,K=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?q:Q;Eq.useSyncExternalStore=a1.useSyncExternalStore!==void 0?a1.useSyncExternalStore:K,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var x7=i0((xq)=>{var w0=h1(X0());(function(){function _(L,Y){return L===Y&&(L!==0||1/L===1/Y)||L!==L&&Y!==Y}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Q=E7(),J=typeof Object.is==="function"?Object.is:_,q=Q.useSyncExternalStore,U=w0.useRef,G=w0.useEffect,Z=w0.useMemo,F=w0.useDebugValue;xq.useSyncExternalStoreWithSelector=function(L,Y,H,K,X){var z=U(null);if(z.current===null){var W={hasValue:!1,value:null};z.current=W}else W=z.current;z=Z(function(){function T(I){if(!B){if(B=!0,w=I,I=K(I),X!==void 0&&W.hasValue){var C=W.value;if(X(C,I))return A=C}return A=I}if(C=A,J(w,I))return C;var P=K(I);if(X!==void 0&&X(C,P))return w=I,C;return w=I,A=P}var B=!1,w,A,R=H===void 0?null:H;return[function(){return T(Y())},R===null?void 0:function(){return T(R())}]},[Y,H,K,X]);var O=q(L,z[0],z[1]);return G(function(){W.hasValue=!0,W.value=O},[O]),F(O),O},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var i7=i0((cq)=>{var y6=h1(X0());(function(){function _(){}function Q(H){return""+H}function J(H,K,X){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{Q(z);var W=!1}catch(O){W=!0}return W&&(console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",typeof Symbol==="function"&&Symbol.toStringTag&&z[Symbol.toStringTag]||z.constructor.name||"Object"),Q(z)),{$$typeof:L,key:z==null?null:""+z,children:H,containerInfo:K,implementation:X}}function q(H,K){if(H==="font")return"";if(typeof K==="string")return K==="use-credentials"?K:""}function U(H){return H===null?"`null`":H===void 0?"`undefined`":H===""?"an empty string":'something with type "'+typeof H+'"'}function G(H){return H===null?"`null`":H===void 0?"`undefined`":H===""?"an empty string":typeof H==="string"?JSON.stringify(H):typeof H==="number"?"`"+H+"`":'something with type "'+typeof H+'"'}function Z(){var H=Y.H;return H===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
19
19
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
20
20
|
2. You might be breaking the Rules of Hooks
|
|
21
21
|
3. You might have more than one copy of React in the same app
|
|
22
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),R}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var B={d:{f:Q,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:Q,C:Q,L:Q,m:Q,X:Q,S:Q,M:Q},p:0,findDOMNode:null},O=Symbol.for("react.portal"),T=fX.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),EC.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,EC.createPortal=function(R,L){var M=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!L||L.nodeType!==1&&L.nodeType!==9&&L.nodeType!==11)throw Error("Target container is not a DOM element.");return Z(R,L,null,M)},EC.flushSync=function(R){var L=T.T,M=B.p;try{if(T.T=null,B.p=2,R)return R()}finally{T.T=L,B.p=M,B.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},EC.preconnect=function(R,L){typeof R==="string"&&R?L!=null&&typeof L!=="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",W(L)):L!=null&&typeof L.crossOrigin!=="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",X(L.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",X(R)),typeof R==="string"&&(L?(L=L.crossOrigin,L=typeof L==="string"?L==="use-credentials"?L:"":void 0):L=null,B.d.C(R,L))},EC.prefetchDNS=function(R){if(typeof R!=="string"||!R)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",X(R));else if(1<arguments.length){var L=arguments[1];typeof L==="object"&&L.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",W(L)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",W(L))}typeof R==="string"&&B.d.D(R)},EC.preinit=function(R,L){if(typeof R==="string"&&R?L==null||typeof L!=="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",W(L)):L.as!=="style"&&L.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',W(L.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",X(R)),typeof R==="string"&&L&&typeof L.as==="string"){var M=L.as,f=K(M,L.crossOrigin),I=typeof L.integrity==="string"?L.integrity:void 0,D=typeof L.fetchPriority==="string"?L.fetchPriority:void 0;M==="style"?B.d.S(R,typeof L.precedence==="string"?L.precedence:void 0,{crossOrigin:f,integrity:I,fetchPriority:D}):M==="script"&&B.d.X(R,{crossOrigin:f,integrity:I,fetchPriority:D,nonce:typeof L.nonce==="string"?L.nonce:void 0})}},EC.preinitModule=function(R,L){var M="";if(typeof R==="string"&&R||(M+=" The `href` argument encountered was "+X(R)+"."),L!==void 0&&typeof L!=="object"?M+=" The `options` argument encountered was "+X(L)+".":L&&("as"in L)&&L.as!=="script"&&(M+=" The `as` option encountered was "+W(L.as)+"."),M)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",M);else switch(M=L&&typeof L.as==="string"?L.as:"script",M){case"script":break;default:M=W(M),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',M,R)}if(typeof R==="string")if(typeof L==="object"&&L!==null){if(L.as==null||L.as==="script")M=K(L.as,L.crossOrigin),B.d.M(R,{crossOrigin:M,integrity:typeof L.integrity==="string"?L.integrity:void 0,nonce:typeof L.nonce==="string"?L.nonce:void 0})}else L==null&&B.d.M(R)},EC.preload=function(R,L){var M="";if(typeof R==="string"&&R||(M+=" The `href` argument encountered was "+X(R)+"."),L==null||typeof L!=="object"?M+=" The `options` argument encountered was "+X(L)+".":typeof L.as==="string"&&L.as||(M+=" The `as` option encountered was "+X(L.as)+"."),M&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',M),typeof R==="string"&&typeof L==="object"&&L!==null&&typeof L.as==="string"){M=L.as;var f=K(M,L.crossOrigin);B.d.L(R,M,{crossOrigin:f,integrity:typeof L.integrity==="string"?L.integrity:void 0,nonce:typeof L.nonce==="string"?L.nonce:void 0,type:typeof L.type==="string"?L.type:void 0,fetchPriority:typeof L.fetchPriority==="string"?L.fetchPriority:void 0,referrerPolicy:typeof L.referrerPolicy==="string"?L.referrerPolicy:void 0,imageSrcSet:typeof L.imageSrcSet==="string"?L.imageSrcSet:void 0,imageSizes:typeof L.imageSizes==="string"?L.imageSizes:void 0,media:typeof L.media==="string"?L.media:void 0})}},EC.preloadModule=function(R,L){var M="";typeof R==="string"&&R||(M+=" The `href` argument encountered was "+X(R)+"."),L!==void 0&&typeof L!=="object"?M+=" The `options` argument encountered was "+X(L)+".":L&&("as"in L)&&typeof L.as!=="string"&&(M+=" The `as` option encountered was "+X(L.as)+"."),M&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',M),typeof R==="string"&&(L?(M=K(L.as,L.crossOrigin),B.d.m(R,{as:typeof L.as==="string"&&L.as!=="script"?L.as:void 0,crossOrigin:M,integrity:typeof L.integrity==="string"?L.integrity:void 0})):B.d.m(R))},EC.requestFormReset=function(R){B.d.r(R)},EC.unstable_batchedUpdates=function(R,L){return R(L)},EC.useFormState=function(R,L,M){return z().useFormState(R,L,M)},EC.useFormStatus=function(){return z().useHostTransitionStatus()},EC.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var PX=j4((ih,_T)=>{var bC=u0(eM());_T.exports=bC});var wJ=j4((QV)=>{var C8=u0(i5());(function(){function Q(j){if(j==null)return null;if(typeof j==="function")return j.$$typeof===m?null:j.displayName||j.name||null;if(typeof j==="string")return j;switch(j){case D:return"Fragment";case k:return"Profiler";case V:return"StrictMode";case v:return"Suspense";case b:return"SuspenseList";case a:return"Activity"}if(typeof j==="object")switch(typeof j.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),j.$$typeof){case I:return"Portal";case P:return j.displayName||"Context";case h:return(j._context.displayName||"Context")+".Consumer";case C:var i=j.render;return j=j.displayName,j||(j=i.displayName||i.name||"",j=j!==""?"ForwardRef("+j+")":"ForwardRef"),j;case E:return i=j.displayName||null,i!==null?i:Q(j.type)||"Memo";case p:i=j._payload,j=j._init;try{return Q(j(i))}catch(q1){}}return null}function U(j){return""+j}function Z(j){try{U(j);var i=!1}catch(Y1){i=!0}if(i){i=console;var q1=i.error,Q1=typeof Symbol==="function"&&Symbol.toStringTag&&j[Symbol.toStringTag]||j.constructor.name||"Object";return q1.call(i,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q1),U(j)}}function K(j){if(j===D)return"<>";if(typeof j==="object"&&j!==null&&j.$$typeof===p)return"<...>";try{var i=Q(j);return i?"<"+i+">":"<...>"}catch(q1){return"<...>"}}function X(){var j=_1.A;return j===null?null:j.getOwner()}function W(){return Error("react-stack-top-frame")}function z(j){if($1.call(j,"key")){var i=Object.getOwnPropertyDescriptor(j,"key").get;if(i&&i.isReactWarning)return!1}return j.key!==void 0}function B(j,i){function q1(){u||(u=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",i))}q1.isReactWarning=!0,Object.defineProperty(j,"key",{get:q1,configurable:!0})}function O(){var j=Q(this.type);return x[j]||(x[j]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),j=this.props.ref,j!==void 0?j:null}function T(j,i,q1,Q1,Y1,L1){var M1=q1.ref;return j={$$typeof:f,type:j,key:i,props:q1,_owner:Q1},(M1!==void 0?M1:null)!==null?Object.defineProperty(j,"ref",{enumerable:!1,get:O}):Object.defineProperty(j,"ref",{enumerable:!1,value:null}),j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(j,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(j,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y1}),Object.defineProperty(j,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:L1}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j}function R(j,i,q1,Q1,Y1,L1){var M1=i.children;if(M1!==void 0)if(Q1)if(J1(M1)){for(Q1=0;Q1<M1.length;Q1++)L(M1[Q1]);Object.freeze&&Object.freeze(M1)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else L(M1);if($1.call(i,"key")){M1=Q(j);var I1=Object.keys(i).filter(function(f1){return f1!=="key"});Q1=0<I1.length?"{key: someKey, "+I1.join(": ..., ")+": ...}":"{key: someKey}",n[M1+Q1]||(I1=0<I1.length?"{"+I1.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
22
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),H}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var F={d:{f:_,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:_,C:_,L:_,m:_,X:_,S:_,M:_},p:0,findDOMNode:null},L=Symbol.for("react.portal"),Y=y6.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),cq.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,cq.createPortal=function(H,K){var X=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!K||K.nodeType!==1&&K.nodeType!==9&&K.nodeType!==11)throw Error("Target container is not a DOM element.");return J(H,K,null,X)},cq.flushSync=function(H){var K=Y.T,X=F.p;try{if(Y.T=null,F.p=2,H)return H()}finally{Y.T=K,F.p=X,F.d.f()&&console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.")}},cq.preconnect=function(H,K){typeof H==="string"&&H?K!=null&&typeof K!=="object"?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",G(K)):K!=null&&typeof K.crossOrigin!=="string"&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",U(K.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",U(H)),typeof H==="string"&&(K?(K=K.crossOrigin,K=typeof K==="string"?K==="use-credentials"?K:"":void 0):K=null,F.d.C(H,K))},cq.prefetchDNS=function(H){if(typeof H!=="string"||!H)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",U(H));else if(1<arguments.length){var K=arguments[1];typeof K==="object"&&K.hasOwnProperty("crossOrigin")?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",G(K)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",G(K))}typeof H==="string"&&F.d.D(H)},cq.preinit=function(H,K){if(typeof H==="string"&&H?K==null||typeof K!=="object"?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",G(K)):K.as!=="style"&&K.as!=="script"&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',G(K.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",U(H)),typeof H==="string"&&K&&typeof K.as==="string"){var X=K.as,z=q(X,K.crossOrigin),W=typeof K.integrity==="string"?K.integrity:void 0,O=typeof K.fetchPriority==="string"?K.fetchPriority:void 0;X==="style"?F.d.S(H,typeof K.precedence==="string"?K.precedence:void 0,{crossOrigin:z,integrity:W,fetchPriority:O}):X==="script"&&F.d.X(H,{crossOrigin:z,integrity:W,fetchPriority:O,nonce:typeof K.nonce==="string"?K.nonce:void 0})}},cq.preinitModule=function(H,K){var X="";if(typeof H==="string"&&H||(X+=" The `href` argument encountered was "+U(H)+"."),K!==void 0&&typeof K!=="object"?X+=" The `options` argument encountered was "+U(K)+".":K&&("as"in K)&&K.as!=="script"&&(X+=" The `as` option encountered was "+G(K.as)+"."),X)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",X);else switch(X=K&&typeof K.as==="string"?K.as:"script",X){case"script":break;default:X=G(X),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',X,H)}if(typeof H==="string")if(typeof K==="object"&&K!==null){if(K.as==null||K.as==="script")X=q(K.as,K.crossOrigin),F.d.M(H,{crossOrigin:X,integrity:typeof K.integrity==="string"?K.integrity:void 0,nonce:typeof K.nonce==="string"?K.nonce:void 0})}else K==null&&F.d.M(H)},cq.preload=function(H,K){var X="";if(typeof H==="string"&&H||(X+=" The `href` argument encountered was "+U(H)+"."),K==null||typeof K!=="object"?X+=" The `options` argument encountered was "+U(K)+".":typeof K.as==="string"&&K.as||(X+=" The `as` option encountered was "+U(K.as)+"."),X&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',X),typeof H==="string"&&typeof K==="object"&&K!==null&&typeof K.as==="string"){X=K.as;var z=q(X,K.crossOrigin);F.d.L(H,X,{crossOrigin:z,integrity:typeof K.integrity==="string"?K.integrity:void 0,nonce:typeof K.nonce==="string"?K.nonce:void 0,type:typeof K.type==="string"?K.type:void 0,fetchPriority:typeof K.fetchPriority==="string"?K.fetchPriority:void 0,referrerPolicy:typeof K.referrerPolicy==="string"?K.referrerPolicy:void 0,imageSrcSet:typeof K.imageSrcSet==="string"?K.imageSrcSet:void 0,imageSizes:typeof K.imageSizes==="string"?K.imageSizes:void 0,media:typeof K.media==="string"?K.media:void 0})}},cq.preloadModule=function(H,K){var X="";typeof H==="string"&&H||(X+=" The `href` argument encountered was "+U(H)+"."),K!==void 0&&typeof K!=="object"?X+=" The `options` argument encountered was "+U(K)+".":K&&("as"in K)&&typeof K.as!=="string"&&(X+=" The `as` option encountered was "+U(K.as)+"."),X&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',X),typeof H==="string"&&(K?(X=q(K.as,K.crossOrigin),F.d.m(H,{as:typeof K.as==="string"&&K.as!=="script"?K.as:void 0,crossOrigin:X,integrity:typeof K.integrity==="string"?K.integrity:void 0})):F.d.m(H))},cq.requestFormReset=function(H){F.d.r(H)},cq.unstable_batchedUpdates=function(H,K){return H(K)},cq.useFormState=function(H,K,X){return Z().useFormState(H,K,X)},cq.useFormStatus=function(){return Z().useHostTransitionStatus()},cq.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var a7=i0((FB,d7)=>{var lq=h1(i7());d7.exports=lq});var R5=i0((XZ)=>{var H2=h1(X0());(function(){function _(f){if(f==null)return null;if(typeof f==="function")return f.$$typeof===v?null:f.displayName||f.name||null;if(typeof f==="string")return f;switch(f){case O:return"Fragment";case B:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case C:return"SuspenseList";case N:return"Activity"}if(typeof f==="object")switch(typeof f.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),f.$$typeof){case W:return"Portal";case A:return f.displayName||"Context";case w:return(f._context.displayName||"Context")+".Consumer";case R:var y=f.render;return f=f.displayName,f||(f=y.displayName||y.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case P:return y=f.displayName||null,y!==null?y:_(f.type)||"Memo";case S:y=f._payload,f=f._init;try{return _(f(y))}catch(g){}}return null}function Q(f){return""+f}function J(f){try{Q(f);var y=!1}catch(t){y=!0}if(y){y=console;var g=y.error,b=typeof Symbol==="function"&&Symbol.toStringTag&&f[Symbol.toStringTag]||f.constructor.name||"Object";return g.call(y,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",b),Q(f)}}function q(f){if(f===O)return"<>";if(typeof f==="object"&&f!==null&&f.$$typeof===S)return"<...>";try{var y=_(f);return y?"<"+y+">":"<...>"}catch(g){return"<...>"}}function U(){var f=j.A;return f===null?null:f.getOwner()}function G(){return Error("react-stack-top-frame")}function Z(f){if(m.call(f,"key")){var y=Object.getOwnPropertyDescriptor(f,"key").get;if(y&&y.isReactWarning)return!1}return f.key!==void 0}function F(f,y){function g(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",y))}g.isReactWarning=!0,Object.defineProperty(f,"key",{get:g,configurable:!0})}function L(){var f=_(this.type);return V[f]||(V[f]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),f=this.props.ref,f!==void 0?f:null}function Y(f,y,g,b,t,o){var d=g.ref;return f={$$typeof:z,type:f,key:y,props:g,_owner:b},(d!==void 0?d:null)!==null?Object.defineProperty(f,"ref",{enumerable:!1,get:L}):Object.defineProperty(f,"ref",{enumerable:!1,value:null}),f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(f,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(f,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:t}),Object.defineProperty(f,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:o}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f}function H(f,y,g,b,t,o){var d=y.children;if(d!==void 0)if(b)if(p(d)){for(b=0;b<d.length;b++)K(d[b]);Object.freeze&&Object.freeze(d)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else K(d);if(m.call(y,"key")){d=_(f);var a=Object.keys(y).filter(function(n){return n!=="key"});b=0<a.length?"{key: someKey, "+a.join(": ..., ")+": ...}":"{key: someKey}",h[d+b]||(a=0<a.length?"{"+a.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,Q1,M1,I1,M1),n[M1+Q1]=!0)}if(M1=null,q1!==void 0&&(Z(q1),M1=""+q1),z(i)&&(Z(i.key),M1=""+i.key),"key"in i){q1={};for(var X1 in i)X1!=="key"&&(q1[X1]=i[X1])}else q1=i;return M1&&B(q1,typeof j==="function"?j.displayName||j.name||"Unknown":j),T(j,M1,q1,X(),Y1,L1)}function L(j){M(j)?j._store&&(j._store.validated=1):typeof j==="object"&&j!==null&&j.$$typeof===p&&(j._payload.status==="fulfilled"?M(j._payload.value)&&j._payload.value._store&&(j._payload.value._store.validated=1):j._store&&(j._store.validated=1))}function M(j){return typeof j==="object"&&j!==null&&j.$$typeof===f}var f=Symbol.for("react.transitional.element"),I=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),P=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),a=Symbol.for("react.activity"),m=Symbol.for("react.client.reference"),_1=C8.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$1=Object.prototype.hasOwnProperty,J1=Array.isArray,y=console.createTask?console.createTask:function(){return null};C8={react_stack_bottom_frame:function(j){return j()}};var u,x={},d=C8.react_stack_bottom_frame.bind(C8,W)(),g=y(K(W)),n={};QV.Fragment=D,QV.jsxDEV=function(j,i,q1,Q1){var Y1=1e4>_1.recentlyCreatedOwnerStacks++;return R(j,i,q1,Q1,Y1?Error("react-stack-top-frame"):d,Y1?y(K(j)):g)}})()});var fR=j4((FV)=>{(function(){function Q(){if(C=!1,p){var u=FV.unstable_now();_1=u;var x=!0;try{_:{h=!1,P&&(P=!1,b(a),a=-1),k=!0;var d=V;try{J:{W(u);for(D=Z(M);D!==null&&!(D.expirationTime>u&&B());){var g=D.callback;if(typeof g==="function"){D.callback=null,V=D.priorityLevel;var n=g(D.expirationTime<=u);if(u=FV.unstable_now(),typeof n==="function"){D.callback=n,W(u),x=!0;break J}D===Z(M)&&K(M),W(u)}else K(M);D=Z(M)}if(D!==null)x=!0;else{var j=Z(f);j!==null&&O(z,j.startTime-u),x=!1}}break _}finally{D=null,V=d,k=!1}x=void 0}}finally{x?$1():p=!1}}}function U(u,x){var d=u.length;u.push(x);_:for(;0<d;){var g=d-1>>>1,n=u[g];if(0<X(n,x))u[g]=x,u[d]=n,d=g;else break _}}function Z(u){return u.length===0?null:u[0]}function K(u){if(u.length===0)return null;var x=u[0],d=u.pop();if(d!==x){u[0]=d;_:for(var g=0,n=u.length,j=n>>>1;g<j;){var i=2*(g+1)-1,q1=u[i],Q1=i+1,Y1=u[Q1];if(0>X(q1,d))Q1<n&&0>X(Y1,q1)?(u[g]=Y1,u[Q1]=d,g=Q1):(u[g]=q1,u[i]=d,g=i);else if(Q1<n&&0>X(Y1,d))u[g]=Y1,u[Q1]=d,g=Q1;else break _}}return x}function X(u,x){var d=u.sortIndex-x.sortIndex;return d!==0?d:u.id-x.id}function W(u){for(var x=Z(f);x!==null;){if(x.callback===null)K(f);else if(x.startTime<=u)K(f),x.sortIndex=x.expirationTime,U(M,x);else break;x=Z(f)}}function z(u){if(P=!1,W(u),!h)if(Z(M)!==null)h=!0,p||(p=!0,$1());else{var x=Z(f);x!==null&&O(z,x.startTime-u)}}function B(){return C?!0:FV.unstable_now()-_1<m?!1:!0}function O(u,x){a=v(function(){u(FV.unstable_now())},x)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),FV.unstable_now=void 0,typeof performance==="object"&&typeof performance.now==="function"){var T=performance;FV.unstable_now=function(){return T.now()}}else{var R=Date,L=R.now();FV.unstable_now=function(){return R.now()-L}}var M=[],f=[],I=1,D=null,V=3,k=!1,h=!1,P=!1,C=!1,v=typeof setTimeout==="function"?setTimeout:null,b=typeof clearTimeout==="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null,p=!1,a=-1,m=5,_1=-1;if(typeof E==="function")var $1=function(){E(Q)};else if(typeof MessageChannel<"u"){var J1=new MessageChannel,y=J1.port2;J1.port1.onmessage=Q,$1=function(){y.postMessage(null)}}else $1=function(){v(Q,0)};FV.unstable_IdlePriority=5,FV.unstable_ImmediatePriority=1,FV.unstable_LowPriority=4,FV.unstable_NormalPriority=3,FV.unstable_Profiling=null,FV.unstable_UserBlockingPriority=2,FV.unstable_cancelCallback=function(u){u.callback=null},FV.unstable_forceFrameRate=function(u){0>u||125<u?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):m=0<u?Math.floor(1000/u):5},FV.unstable_getCurrentPriorityLevel=function(){return V},FV.unstable_next=function(u){switch(V){case 1:case 2:case 3:var x=3;break;default:x=V}var d=V;V=x;try{return u()}finally{V=d}},FV.unstable_requestPaint=function(){C=!0},FV.unstable_runWithPriority=function(u,x){switch(u){case 1:case 2:case 3:case 4:case 5:break;default:u=3}var d=V;V=u;try{return x()}finally{V=d}},FV.unstable_scheduleCallback=function(u,x,d){var g=FV.unstable_now();switch(typeof d==="object"&&d!==null?(d=d.delay,d=typeof d==="number"&&0<d?g+d:g):d=g,u){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5000}return n=d+n,u={id:I++,callback:x,priorityLevel:u,startTime:d,expirationTime:n,sortIndex:-1},d>g?(u.sortIndex=d,U(f,u),Z(M)===null&&u===Z(f)&&(P?(b(a),a=-1):P=!0,O(z,d-g))):(u.sortIndex=n,U(M,u),h||k||(h=!0,p||(p=!0,$1()))),u},FV.unstable_shouldYield=B,FV.unstable_wrapCallback=function(u){var x=V;return function(){var d=V;V=x;try{return u.apply(this,arguments)}finally{V=d}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var PR=j4((KV)=>{var K0=u0(fR()),$9=u0(i5()),hX=u0(PX());(function(){function Q(_,J){for(_=_.memoizedState;_!==null&&0<J;)_=_.next,J--;return _}function U(_,J,$,q){if($>=J.length)return q;var G=J[$],F=s0(_)?_.slice():o1({},_);return F[G]=U(_[G],J,$+1,q),F}function Z(_,J,$){if(J.length!==$.length)console.warn("copyWithRename() expects paths of the same length");else{for(var q=0;q<$.length-1;q++)if(J[q]!==$[q]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return K(_,J,$,0)}}function K(_,J,$,q){var G=J[q],F=s0(_)?_.slice():o1({},_);return q+1===J.length?(F[$[q]]=F[G],s0(F)?F.splice(G,1):delete F[G]):F[G]=K(_[G],J,$,q+1),F}function X(_,J,$){var q=J[$],G=s0(_)?_.slice():o1({},_);if($+1===J.length)return s0(G)?G.splice(q,1):delete G[q],G;return G[q]=X(_[q],J,$+1),G}function W(){return!1}function z(){return null}function B(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function O(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function T(){}function R(){}function L(_){var J=[];return _.forEach(function($){J.push($)}),J.sort().join(", ")}function M(_,J,$,q){return new BO(_,J,$,q)}function f(_,J){_.context===c3&&(aG(_.current,2,J,_,null,null),s8())}function I(_,J){if(O5!==null){var $=J.staleFamilies;J=J.updatedFamilies,x9(),TH(_.current,J,$),s8()}}function D(_){O5=_}function V(_){return!(!_||_.nodeType!==1&&_.nodeType!==9&&_.nodeType!==11)}function k(_){var J=_,$=_;if(_.alternate)for(;J.return;)J=J.return;else{_=J;do J=_,(J.flags&4098)!==0&&($=J.return),_=J.return;while(_)}return J.tag===3?$:null}function h(_){if(_.tag===13){var J=_.memoizedState;if(J===null&&(_=_.alternate,_!==null&&(J=_.memoizedState)),J!==null)return J.dehydrated}return null}function P(_){if(_.tag===31){var J=_.memoizedState;if(J===null&&(_=_.alternate,_!==null&&(J=_.memoizedState)),J!==null)return J.dehydrated}return null}function C(_){if(k(_)!==_)throw Error("Unable to find node on an unmounted component.")}function v(_){var J=_.alternate;if(!J){if(J=k(_),J===null)throw Error("Unable to find node on an unmounted component.");return J!==_?null:_}for(var $=_,q=J;;){var G=$.return;if(G===null)break;var F=G.alternate;if(F===null){if(q=G.return,q!==null){$=q;continue}break}if(G.child===F.child){for(F=G.child;F;){if(F===$)return C(G),_;if(F===q)return C(G),J;F=F.sibling}throw Error("Unable to find node on an unmounted component.")}if($.return!==q.return)$=G,q=F;else{for(var Y=!1,A=G.child;A;){if(A===$){Y=!0,$=G,q=F;break}if(A===q){Y=!0,q=G,$=F;break}A=A.sibling}if(!Y){for(A=F.child;A;){if(A===$){Y=!0,$=F,q=G;break}if(A===q){Y=!0,q=F,$=G;break}A=A.sibling}if(!Y)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if($.alternate!==q)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if($.tag!==3)throw Error("Unable to find node on an unmounted component.");return $.stateNode.current===$?_:J}function b(_){var J=_.tag;if(J===5||J===26||J===27||J===6)return _;for(_=_.child;_!==null;){if(J=b(_),J!==null)return J;_=_.sibling}return null}function E(_){if(_===null||typeof _!=="object")return null;return _=Nz&&_[Nz]||_["@@iterator"],typeof _==="function"?_:null}function p(_){if(_==null)return null;if(typeof _==="function")return _.$$typeof===bw?null:_.displayName||_.name||null;if(typeof _==="string")return _;switch(_){case $7:return"Fragment";case _Z:return"Profiler";case i$:return"StrictMode";case $Z:return"Suspense";case QZ:return"SuspenseList";case qZ:return"Activity"}if(typeof _==="object")switch(typeof _.tag==="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),_.$$typeof){case J7:return"Portal";case M4:return _.displayName||"Context";case JZ:return(_._context.displayName||"Context")+".Consumer";case a9:var J=_.render;return _=_.displayName,_||(_=J.displayName||J.name||"",_=_!==""?"ForwardRef("+_+")":"ForwardRef"),_;case a$:return J=_.displayName||null,J!==null?J:p(_.type)||"Memo";case U5:J=_._payload,_=_._init;try{return p(_(J))}catch($){}}return null}function a(_){return typeof _.tag==="number"?m(_):typeof _.name==="string"?_.name:null}function m(_){var J=_.type;switch(_.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(J._context.displayName||"Context")+".Consumer";case 10:return J.displayName||"Context";case 18:return"DehydratedFragment";case 11:return _=J.render,_=_.displayName||_.name||"",J.displayName||(_!==""?"ForwardRef("+_+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return J;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return p(J);case 8:return J===i$?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof J==="function")return J.displayName||J.name||null;if(typeof J==="string")return J;break;case 29:if(J=_._debugInfo,J!=null){for(var $=J.length-1;0<=$;$--)if(typeof J[$].name==="string")return J[$].name}if(_.return!==null)return m(_.return)}return null}function _1(_){return{current:_}}function $1(_,J){0>a4?console.error("Unexpected pop."):(J!==GZ[a4]&&console.error("Unexpected Fiber popped."),_.current=UZ[a4],UZ[a4]=null,GZ[a4]=null,a4--)}function J1(_,J,$){a4++,UZ[a4]=_.current,GZ[a4]=$,_.current=J}function y(_){return _===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),_}function u(_,J){J1(u3,J,_),J1(s9,_,_),J1(b3,null,_);var $=J.nodeType;switch($){case 9:case 11:$=$===9?"#document":"#fragment",J=(J=J.documentElement)?(J=J.namespaceURI)?tW(J):F3:F3;break;default:if($=J.tagName,J=J.namespaceURI)J=tW(J),J=oW(J,$);else switch($){case"svg":J=b7;break;case"math":J=dQ;break;default:J=F3}}$=$.toLowerCase(),$=W9(null,$),$={context:J,ancestorInfo:$},$1(b3,_),J1(b3,$,_)}function x(_){$1(b3,_),$1(s9,_),$1(u3,_)}function d(){return y(b3.current)}function g(_){_.memoizedState!==null&&J1(s$,_,_);var J=y(b3.current),$=_.type,q=oW(J.context,$);$=W9(J.ancestorInfo,$),q={context:q,ancestorInfo:$},J!==q&&(J1(s9,_,_),J1(b3,q,_))}function n(_){s9.current===_&&($1(b3,_),$1(s9,_)),s$.current===_&&($1(s$,_),m_._currentValue=K8)}function j(){}function i(){if(t9===0){Cz=console.log,Sz=console.info,jz=console.warn,Vz=console.error,kz=console.group,Dz=console.groupCollapsed,yz=console.groupEnd;var _={configurable:!0,enumerable:!0,value:j,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}t9++}function q1(){if(t9--,t9===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:o1({},_,{value:Cz}),info:o1({},_,{value:Sz}),warn:o1({},_,{value:jz}),error:o1({},_,{value:Vz}),group:o1({},_,{value:kz}),groupCollapsed:o1({},_,{value:Dz}),groupEnd:o1({},_,{value:yz})})}0>t9&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Q1(_){var J=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,_=_.stack,Error.prepareStackTrace=J,_.startsWith(`Error: react-stack-top-frame
|
|
28
|
-
`)&&(_=_.slice(29)),J=_.indexOf(`
|
|
29
|
-
`),J!==-1&&(_=_.slice(J+1)),J=_.indexOf("react_stack_bottom_frame"),J!==-1&&(J=_.lastIndexOf(`
|
|
30
|
-
`,J)),J!==-1)_=_.slice(0,J);else return"";return _}function Y1(_){if(ZZ===void 0)try{throw Error()}catch($){var J=$.stack.trim().match(/\n( *(at )?)/);ZZ=J&&J[1]||"",vz=-1<$.stack.indexOf(`
|
|
31
|
-
at`)?" (<anonymous>)":-1<$.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
32
|
-
`+ZZ+_+vz}function L1(_,J){if(!_||FZ)return"";var $=KZ.get(_);if($!==void 0)return $;FZ=!0,$=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var q=null;q=Z1.H,Z1.H=null,i();try{var G={DetermineComponentFrameRoot:function(){try{if(J){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(T1){var U1=T1}Reflect.construct(_,[],l)}else{try{l.call()}catch(T1){U1=T1}_.call(l.prototype)}}else{try{throw Error()}catch(T1){U1=T1}(l=_())&&typeof l.catch==="function"&&l.catch(function(){})}}catch(T1){if(T1&&U1&&typeof T1.stack==="string")return[T1.stack,U1.stack]}return[null,null]}};G.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var F=Object.getOwnPropertyDescriptor(G.DetermineComponentFrameRoot,"name");F&&F.configurable&&Object.defineProperty(G.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Y=G.DetermineComponentFrameRoot(),A=Y[0],w=Y[1];if(A&&w){var N=A.split(`
|
|
33
|
-
`),t=w.split(`
|
|
34
|
-
`);for(Y=F=0;F<N.length&&!N[F].includes("DetermineComponentFrameRoot");)F++;for(;Y<t.length&&!t[Y].includes("DetermineComponentFrameRoot");)Y++;if(F===N.length||Y===t.length)for(F=N.length-1,Y=t.length-1;1<=F&&0<=Y&&N[F]!==t[Y];)Y--;for(;1<=F&&0<=Y;F--,Y--)if(N[F]!==t[Y]){if(F!==1||Y!==1)do if(F--,Y--,0>Y||N[F]!==t[Y]){var o=`
|
|
35
|
-
`+N[F].replace(" at new "," at ");return _.displayName&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",_.displayName)),typeof _==="function"&&KZ.set(_,o),o}while(1<=F&&0<=Y);break}}}finally{FZ=!1,Z1.H=q,q1(),Error.prepareStackTrace=$}return N=(N=_?_.displayName||_.name:"")?Y1(N):"",typeof _==="function"&&KZ.set(_,N),N}function M1(_,J){switch(_.tag){case 26:case 27:case 5:return Y1(_.type);case 16:return Y1("Lazy");case 13:return _.child!==J&&J!==null?Y1("Suspense Fallback"):Y1("Suspense");case 19:return Y1("SuspenseList");case 0:case 15:return L1(_.type,!1);case 11:return L1(_.type.render,!1);case 1:return L1(_.type,!0);case 31:return Y1("Activity");default:return""}}function I1(_){try{var J="",$=null;do{J+=M1(_,$);var q=_._debugInfo;if(q)for(var G=q.length-1;0<=G;G--){var F=q[G];if(typeof F.name==="string"){var Y=J;_:{var{name:A,env:w,debugLocation:N}=F;if(N!=null){var t=Q1(N),o=t.lastIndexOf(`
|
|
36
|
-
`),l=o===-1?t:t.slice(o+1);if(l.indexOf(A)!==-1){var U1=`
|
|
37
|
-
`+l;break _}}U1=Y1(A+(w?" ["+w+"]":""))}J=Y+U1}}$=_,_=_.return}while(_);return J}catch(T1){return`
|
|
38
|
-
Error generating stack: `+T1.message+`
|
|
39
|
-
`+T1.stack}}function X1(_){return(_=_?_.displayName||_.name:"")?Y1(_):""}function f1(){if(G5===null)return null;var _=G5._debugOwner;return _!=null?a(_):null}function l1(){if(G5===null)return"";var _=G5;try{var J="";switch(_.tag===6&&(_=_.return),_.tag){case 26:case 27:case 5:J+=Y1(_.type);break;case 13:J+=Y1("Suspense");break;case 19:J+=Y1("SuspenseList");break;case 31:J+=Y1("Activity");break;case 30:case 0:case 15:case 1:_._debugOwner||J!==""||(J+=X1(_.type));break;case 11:_._debugOwner||J!==""||(J+=X1(_.type.render))}for(;_;)if(typeof _.tag==="number"){var $=_;_=$._debugOwner;var q=$._debugStack;if(_&&q){var G=Q1(q);G!==""&&(J+=`
|
|
40
|
-
`+G)}}else if(_.debugStack!=null){var F=_.debugStack;(_=_.owner)&&F&&(J+=`
|
|
41
|
-
`+Q1(F))}else break;var Y=J}catch(A){Y=`
|
|
42
|
-
Error generating stack: `+A.message+`
|
|
43
|
-
`+A.stack}return Y}function W1(_,J,$,q,G,F,Y){var A=G5;S1(_);try{return _!==null&&_._debugTask?_._debugTask.run(J.bind(null,$,q,G,F,Y)):J($,q,G,F,Y)}finally{S1(A)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function S1(_){Z1.getCurrentStack=_===null?null:l1,T4=!1,G5=_}function v1(_){return typeof Symbol==="function"&&Symbol.toStringTag&&_[Symbol.toStringTag]||_.constructor.name||"Object"}function c1(_){try{return E1(_),!1}catch(J){return!0}}function E1(_){return""+_}function j1(_,J){if(c1(_))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",J,v1(_)),E1(_)}function V0(_,J){if(c1(_))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",J,v1(_)),E1(_)}function b1(_){if(c1(_))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",v1(_)),E1(_)}function Z2(_){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var J=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(J.isDisabled)return!0;if(!J.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{q7=J.inject(_),T2=J}catch($){console.error("React instrumentation encountered an error: %o.",$)}return J.checkDCE?!0:!1}function _0(_){if(typeof cw==="function"&&lw(_),T2&&typeof T2.setStrictMode==="function")try{T2.setStrictMode(q7,_)}catch(J){R4||(R4=!0,console.error("React instrumentation encountered an error: %o",J))}}function h2(_){return _>>>=0,_===0?32:31-(rw(_)/dw|0)|0}function z2(_){var J=_&42;if(J!==0)return J;switch(_&-_){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return _&261888;case 262144:case 524288:case 1048576:case 2097152:return _&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return _&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),_}}function I2(_,J,$){var q=_.pendingLanes;if(q===0)return 0;var G=0,F=_.suspendedLanes,Y=_.pingedLanes;_=_.warmLanes;var A=q&134217727;return A!==0?(q=A&~F,q!==0?G=z2(q):(Y&=A,Y!==0?G=z2(Y):$||($=A&~_,$!==0&&(G=z2($))))):(A=q&~F,A!==0?G=z2(A):Y!==0?G=z2(Y):$||($=q&~_,$!==0&&(G=z2($)))),G===0?0:J!==0&&J!==G&&(J&F)===0&&(F=G&-G,$=J&-J,F>=$||F===32&&($&4194048)!==0)?J:G}function f2(_,J){return(_.pendingLanes&~(_.suspendedLanes&~_.pingedLanes)&J)===0}function P2(_,J){switch(_){case 1:case 2:case 4:case 8:case 64:return J+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 J+5000;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function B2(){var _=n$;return n$<<=1,(n$&62914560)===0&&(n$=4194304),_}function A2(_){for(var J=[],$=0;31>$;$++)J.push(_);return J}function L2(_,J){_.pendingLanes|=J,J!==268435456&&(_.suspendedLanes=0,_.pingedLanes=0,_.warmLanes=0)}function M3(_,J,$,q,G,F){var Y=_.pendingLanes;_.pendingLanes=$,_.suspendedLanes=0,_.pingedLanes=0,_.warmLanes=0,_.expiredLanes&=$,_.entangledLanes&=$,_.errorRecoveryDisabledLanes&=$,_.shellSuspendCounter=0;var{entanglements:A,expirationTimes:w,hiddenUpdates:N}=_;for($=Y&~$;0<$;){var t=31-j2($),o=1<<t;A[t]=0,w[t]=-1;var l=N[t];if(l!==null)for(N[t]=null,t=0;t<l.length;t++){var U1=l[t];U1!==null&&(U1.lane&=-536870913)}$&=~o}q!==0&&v5(_,q,0),F!==0&&G===0&&_.tag!==0&&(_.suspendedLanes|=F&~(Y&~J))}function v5(_,J,$){_.pendingLanes|=J,_.suspendedLanes&=~J;var q=31-j2(J);_.entangledLanes|=J,_.entanglements[q]=_.entanglements[q]|1073741824|$&261930}function b4(_,J){var $=_.entangledLanes|=J;for(_=_.entanglements;$;){var q=31-j2($),G=1<<q;G&J|_[q]&J&&(_[q]|=J),$&=~G}}function u4(_,J){var $=J&-J;return $=($&42)!==0?1:x4($),($&(_.suspendedLanes|J))!==0?0:$}function x4(_){switch(_){case 2:_=1;break;case 8:_=4;break;case 32:_=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:_=128;break;case 268435456:_=134217728;break;default:_=0}return _}function I6(_,J,$){if(O4)for(_=_.pendingUpdatersLaneMap;0<$;){var q=31-j2($),G=1<<q;_[q].add(J),$&=~G}}function e5(_,J){if(O4)for(var{pendingUpdatersLaneMap:$,memoizedUpdaters:q}=_;0<J;){var G=31-j2(J);_=1<<G,G=$[G],0<G.size&&(G.forEach(function(F){var Y=F.alternate;Y!==null&&q.has(Y)||q.add(F)}),G.clear()),J&=~_}}function S(_){return _&=-_,Z5!==0&&Z5<_?m5!==0&&m5<_?(_&134217727)!==0?w4:e$:m5:Z5}function e(){var _=Y0.p;if(_!==0)return _;return _=window.event,_===void 0?w4:Tz(_.type)}function A1(_,J){var $=Y0.p;try{return Y0.p=_,J()}finally{Y0.p=$}}function R1(_){delete _[H2],delete _[V2],delete _[zZ],delete _[iw],delete _[aw]}function P1(_){var J=_[H2];if(J)return J;for(var $=_.parentNode;$;){if(J=$[h3]||$[H2]){if($=J.alternate,J.child!==null||$!==null&&$.child!==null)for(_=Uz(_);_!==null;){if($=_[H2])return $;_=Uz(_)}return J}_=$,$=_.parentNode}return null}function h1(_){if(_=_[H2]||_[h3]){var J=_.tag;if(J===5||J===6||J===13||J===31||J===26||J===27||J===3)return _}return null}function m1(_){var J=_.tag;if(J===5||J===26||J===27||J===6)return _.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function U0(_){var J=_[Ez];return J||(J=_[Ez]={hoistableStyles:new Map,hoistableScripts:new Map}),J}function V1(_){_[o9]=!0}function J2(_,J){N2(_,J),N2(_+"Capture",J)}function N2(_,J){g6[_]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",_),g6[_]=J;var $=_.toLowerCase();BZ[$]=_,_==="onDoubleClick"&&(BZ.ondblclick=_);for(_=0;_<J.length;_++)bz.add(J[_])}function _4(_,J){sw[J.type]||J.onChange||J.onInput||J.readOnly||J.disabled||J.value==null||(_==="select"?console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`."):console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")),J.onChange||J.readOnly||J.disabled||J.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function f6(_){if(h5.call(xz,_))return!0;if(h5.call(uz,_))return!1;if(tw.test(_))return xz[_]=!0;return uz[_]=!0,console.error("Invalid attribute name: `%s`",_),!1}function SJ(_,J,$){if(f6(J)){if(!_.hasAttribute(J)){switch(typeof $){case"symbol":case"object":return $;case"function":return $;case"boolean":if($===!1)return $}return $===void 0?void 0:null}if(_=_.getAttribute(J),_===""&&$===!0)return!0;return j1($,J),_===""+$?$:_}}function v8(_,J,$){if(f6(J))if($===null)_.removeAttribute(J);else{switch(typeof $){case"undefined":case"function":case"symbol":_.removeAttribute(J);return;case"boolean":var q=J.toLowerCase().slice(0,5);if(q!=="data-"&&q!=="aria-"){_.removeAttribute(J);return}}j1($,J),_.setAttribute(J,""+$)}}function E8(_,J,$){if($===null)_.removeAttribute(J);else{switch(typeof $){case"undefined":case"function":case"symbol":case"boolean":_.removeAttribute(J);return}j1($,J),_.setAttribute(J,""+$)}}function E5(_,J,$,q){if(q===null)_.removeAttribute($);else{switch(typeof q){case"undefined":case"function":case"symbol":case"boolean":_.removeAttribute($);return}j1(q,$),_.setAttributeNS(J,$,""+q)}}function m2(_){switch(typeof _){case"bigint":case"boolean":case"number":case"string":case"undefined":return _;case"object":return b1(_),_;default:return""}}function jJ(_){var J=_.type;return(_=_.nodeName)&&_.toLowerCase()==="input"&&(J==="checkbox"||J==="radio")}function eq(_,J,$){var q=Object.getOwnPropertyDescriptor(_.constructor.prototype,J);if(!_.hasOwnProperty(J)&&typeof q<"u"&&typeof q.get==="function"&&typeof q.set==="function"){var{get:G,set:F}=q;return Object.defineProperty(_,J,{configurable:!0,get:function(){return G.call(this)},set:function(Y){b1(Y),$=""+Y,F.call(this,Y)}}),Object.defineProperty(_,J,{enumerable:q.enumerable}),{getValue:function(){return $},setValue:function(Y){b1(Y),$=""+Y},stopTracking:function(){_._valueTracker=null,delete _[J]}}}}function G9(_){if(!_._valueTracker){var J=jJ(_)?"checked":"value";_._valueTracker=eq(_,J,""+_[J])}}function VJ(_){if(!_)return!1;var J=_._valueTracker;if(!J)return!0;var $=J.getValue(),q="";return _&&(q=jJ(_)?_.checked?"true":"false":_.value),_=q,_!==$?(J.setValue(_),!0):!1}function b8(_){if(_=_||(typeof document<"u"?document:void 0),typeof _>"u")return null;try{return _.activeElement||_.body}catch(J){return _.body}}function g2(_){return _.replace(ow,function(J){return"\\"+J.charCodeAt(0).toString(16)+" "})}function kJ(_,J){J.checked===void 0||J.defaultChecked===void 0||mz||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",f1()||"A component",J.type),mz=!0),J.value===void 0||J.defaultValue===void 0||hz||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",f1()||"A component",J.type),hz=!0)}function u8(_,J,$,q,G,F,Y,A){if(_.name="",Y!=null&&typeof Y!=="function"&&typeof Y!=="symbol"&&typeof Y!=="boolean"?(j1(Y,"type"),_.type=Y):_.removeAttribute("type"),J!=null)if(Y==="number"){if(J===0&&_.value===""||_.value!=J)_.value=""+m2(J)}else _.value!==""+m2(J)&&(_.value=""+m2(J));else Y!=="submit"&&Y!=="reset"||_.removeAttribute("value");J!=null?x8(_,Y,m2(J)):$!=null?x8(_,Y,m2($)):q!=null&&_.removeAttribute("value"),G==null&&F!=null&&(_.defaultChecked=!!F),G!=null&&(_.checked=G&&typeof G!=="function"&&typeof G!=="symbol"),A!=null&&typeof A!=="function"&&typeof A!=="symbol"&&typeof A!=="boolean"?(j1(A,"name"),_.name=""+m2(A)):_.removeAttribute("name")}function Z9(_,J,$,q,G,F,Y,A){if(F!=null&&typeof F!=="function"&&typeof F!=="symbol"&&typeof F!=="boolean"&&(j1(F,"type"),_.type=F),J!=null||$!=null){if(!(F!=="submit"&&F!=="reset"||J!==void 0&&J!==null)){G9(_);return}$=$!=null?""+m2($):"",J=J!=null?""+m2(J):$,A||J===_.value||(_.value=J),_.defaultValue=J}q=q!=null?q:G,q=typeof q!=="function"&&typeof q!=="symbol"&&!!q,_.checked=A?_.checked:!!q,_.defaultChecked=!!q,Y!=null&&typeof Y!=="function"&&typeof Y!=="symbol"&&typeof Y!=="boolean"&&(j1(Y,"name"),_.name=Y),G9(_)}function x8(_,J,$){J==="number"&&b8(_.ownerDocument)===_||_.defaultValue===""+$||(_.defaultValue=""+$)}function DJ(_,J){J.value==null&&(typeof J.children==="object"&&J.children!==null?$9.Children.forEach(J.children,function($){$==null||typeof $==="string"||typeof $==="number"||typeof $==="bigint"||pz||(pz=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):J.dangerouslySetInnerHTML==null||cz||(cz=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),J.selected==null||gz||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),gz=!0)}function yJ(){var _=f1();return _?`
|
|
44
|
-
|
|
45
|
-
Check the render method of \``+_+"`.":""}function T3(_,J,$,q){if(_=_.options,J){J={};for(var G=0;G<$.length;G++)J["$"+$[G]]=!0;for($=0;$<_.length;$++)G=J.hasOwnProperty("$"+_[$].value),_[$].selected!==G&&(_[$].selected=G),G&&q&&(_[$].defaultSelected=!0)}else{$=""+m2($),J=null;for(G=0;G<_.length;G++){if(_[G].value===$){_[G].selected=!0,q&&(_[G].defaultSelected=!0);return}J!==null||_[G].disabled||(J=_[G])}J!==null&&(J.selected=!0)}}function vJ(_,J){for(_=0;_<rz.length;_++){var $=rz[_];if(J[$]!=null){var q=s0(J[$]);J.multiple&&!q?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",$,yJ()):!J.multiple&&q&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",$,yJ())}}J.value===void 0||J.defaultValue===void 0||lz||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),lz=!0)}function EJ(_,J){J.value===void 0||J.defaultValue===void 0||dz||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",f1()||"A component"),dz=!0),J.children!=null&&J.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function bJ(_,J,$){if(J!=null&&(J=""+m2(J),J!==_.value&&(_.value=J),$==null)){_.defaultValue!==J&&(_.defaultValue=J);return}_.defaultValue=$!=null?""+m2($):""}function F9(_,J,$,q){if(J==null){if(q!=null){if($!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(s0(q)){if(1<q.length)throw Error("<textarea> can only have at most one child.");q=q[0]}$=q}$==null&&($=""),J=$}$=m2(J),_.defaultValue=$,q=_.textContent,q===$&&q!==""&&q!==null&&(_.value=q),G9(_)}function uJ(_,J){return _.serverProps===void 0&&_.serverTail.length===0&&_.children.length===1&&3<_.distanceFromLeaf&&_.distanceFromLeaf>15-J?uJ(_.children[0],J):_}function C2(_){return" "+" ".repeat(_)}function R3(_){return"+ "+" ".repeat(_)}function h4(_){return"- "+" ".repeat(_)}function xJ(_){switch(_.tag){case 26:case 27:case 5:return _.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return _=_.type,_.displayName||_.name||null;case 11:return _=_.type.render,_.displayName||_.name||null;case 1:return _=_.type,_.displayName||_.name||null;default:return null}}function P6(_,J){return iz.test(_)?(_=JSON.stringify(_),_.length>J-2?8>J?'{"..."}':"{"+_.slice(0,J-7)+'..."}':"{"+_+"}"):_.length>J?5>J?'{"..."}':_.slice(0,J-3)+"...":_}function h8(_,J,$){var q=120-2*$;if(J===null)return R3($)+P6(_,q)+`
|
|
46
|
-
`;if(typeof J==="string"){for(var G=0;G<J.length&&G<_.length&&J.charCodeAt(G)===_.charCodeAt(G);G++);return G>q-8&&10<G&&(_="..."+_.slice(G-8),J="..."+J.slice(G-8)),R3($)+P6(_,q)+`
|
|
47
|
-
`+h4($)+P6(J,q)+`
|
|
48
|
-
`}return C2($)+P6(_,q)+`
|
|
49
|
-
`}function K9(_){return Object.prototype.toString.call(_).replace(/^\[object (.*)\]$/,function(J,$){return $})}function O3(_,J){switch(typeof _){case"string":return _=JSON.stringify(_),_.length>J?5>J?'"..."':_.slice(0,J-4)+'..."':_;case"object":if(_===null)return"null";if(s0(_))return"[...]";if(_.$$typeof===L4)return(J=p(_.type))?"<"+J+">":"<...>";var $=K9(_);if($==="Object"){$="",J-=2;for(var q in _)if(_.hasOwnProperty(q)){var G=JSON.stringify(q);if(G!=='"'+q+'"'&&(q=G),J-=q.length-2,G=O3(_[q],15>J?J:15),J-=G.length,0>J){$+=$===""?"...":", ...";break}$+=($===""?"":",")+q+":"+G}return"{"+$+"}"}return $;case"function":return(J=_.displayName||_.name)?"function "+J:"function";default:return String(_)}}function w3(_,J){return typeof _!=="string"||iz.test(_)?"{"+O3(_,J-2)+"}":_.length>J-2?5>J?'"..."':'"'+_.slice(0,J-5)+'..."':'"'+_+'"'}function X9(_,J,$){var q=120-$.length-_.length,G=[],F;for(F in J)if(J.hasOwnProperty(F)&&F!=="children"){var Y=w3(J[F],120-$.length-F.length-1);q-=F.length+Y.length+2,G.push(F+"="+Y)}return G.length===0?$+"<"+_+`>
|
|
50
|
-
`:0<q?$+"<"+_+" "+G.join(" ")+`>
|
|
51
|
-
`:$+"<"+_+`
|
|
52
|
-
`+$+" "+G.join(`
|
|
53
|
-
`+$+" ")+`
|
|
54
|
-
`+$+`>
|
|
55
|
-
`}function _U(_,J,$){var q="",G=o1({},J),F;for(F in _)if(_.hasOwnProperty(F)){delete G[F];var Y=120-2*$-F.length-2,A=O3(_[F],Y);J.hasOwnProperty(F)?(Y=O3(J[F],Y),q+=R3($)+F+": "+A+`
|
|
56
|
-
`,q+=h4($)+F+": "+Y+`
|
|
57
|
-
`):q+=R3($)+F+": "+A+`
|
|
58
|
-
`}for(var w in G)G.hasOwnProperty(w)&&(_=O3(G[w],120-2*$-w.length-2),q+=h4($)+w+": "+_+`
|
|
59
|
-
`);return q}function JU(_,J,$,q){var G="",F=new Map;for(N in $)$.hasOwnProperty(N)&&F.set(N.toLowerCase(),N);if(F.size===1&&F.has("children"))G+=X9(_,J,C2(q));else{for(var Y in J)if(J.hasOwnProperty(Y)&&Y!=="children"){var A=120-2*(q+1)-Y.length-1,w=F.get(Y.toLowerCase());if(w!==void 0){F.delete(Y.toLowerCase());var N=J[Y];w=$[w];var t=w3(N,A);A=w3(w,A),typeof N==="object"&&N!==null&&typeof w==="object"&&w!==null&&K9(N)==="Object"&&K9(w)==="Object"&&(2<Object.keys(N).length||2<Object.keys(w).length||-1<t.indexOf("...")||-1<A.indexOf("..."))?G+=C2(q+1)+Y+`={{
|
|
60
|
-
`+_U(N,w,q+2)+C2(q+1)+`}}
|
|
61
|
-
`:(G+=R3(q+1)+Y+"="+t+`
|
|
62
|
-
`,G+=h4(q+1)+Y+"="+A+`
|
|
63
|
-
`)}else G+=C2(q+1)+Y+"="+w3(J[Y],A)+`
|
|
64
|
-
`}F.forEach(function(o){if(o!=="children"){var l=120-2*(q+1)-o.length-1;G+=h4(q+1)+o+"="+w3($[o],l)+`
|
|
65
|
-
`}}),G=G===""?C2(q)+"<"+_+`>
|
|
66
|
-
`:C2(q)+"<"+_+`
|
|
67
|
-
`+G+C2(q)+`>
|
|
68
|
-
`}if(_=$.children,J=J.children,typeof _==="string"||typeof _==="number"||typeof _==="bigint"){if(F="",typeof J==="string"||typeof J==="number"||typeof J==="bigint")F=""+J;G+=h8(F,""+_,q+1)}else if(typeof J==="string"||typeof J==="number"||typeof J==="bigint")G=_==null?G+h8(""+J,null,q+1):G+h8(""+J,void 0,q+1);return G}function hJ(_,J){var $=xJ(_);if($===null){$="";for(_=_.child;_;)$+=hJ(_,J),_=_.sibling;return $}return C2(J)+"<"+$+`>
|
|
69
|
-
`}function H9(_,J){var $=uJ(_,J);if($!==_&&(_.children.length!==1||_.children[0]!==$))return C2(J)+`...
|
|
70
|
-
`+H9($,J+1);$="";var q=_.fiber._debugInfo;if(q)for(var G=0;G<q.length;G++){var F=q[G].name;typeof F==="string"&&($+=C2(J)+"<"+F+`>
|
|
71
|
-
`,J++)}if(q="",G=_.fiber.pendingProps,_.fiber.tag===6)q=h8(G,_.serverProps,J),J++;else if(F=xJ(_.fiber),F!==null)if(_.serverProps===void 0){q=J;var Y=120-2*q-F.length-2,A="";for(N in G)if(G.hasOwnProperty(N)&&N!=="children"){var w=w3(G[N],15);if(Y-=N.length+w.length+2,0>Y){A+=" ...";break}A+=" "+N+"="+w}q=C2(q)+"<"+F+A+`>
|
|
72
|
-
`,J++}else _.serverProps===null?(q=X9(F,G,R3(J)),J++):typeof _.serverProps==="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(q=JU(F,G,_.serverProps,J),J++);var N="";G=_.fiber.child;for(F=0;G&&F<_.children.length;)Y=_.children[F],Y.fiber===G?(N+=H9(Y,J),F++):N+=hJ(G,J),G=G.sibling;G&&0<_.children.length&&(N+=C2(J)+`...
|
|
73
|
-
`),G=_.serverTail,_.serverProps===null&&J--;for(_=0;_<G.length;_++)F=G[_],N=typeof F==="string"?N+(h4(J)+P6(F,120-2*J)+`
|
|
74
|
-
`):N+X9(F.type,F.props,h4(J));return $+q+N}function Y9(_){try{return`
|
|
75
|
-
|
|
76
|
-
`+H9(_,0)}catch(J){return""}}function mJ(_,J,$){for(var q=J,G=null,F=0;q;)q===_&&(F=0),G={fiber:q,children:G!==null?[G]:[],serverProps:q===J?$:q===_?null:void 0,serverTail:[],distanceFromLeaf:F},F++,q=q.return;return G!==null?Y9(G).replaceAll(/^[+-]/gm,">"):""}function W9(_,J){var $=o1({},_||sz),q={tag:J};if(az.indexOf(J)!==-1&&($.aTagInScope=null,$.buttonTagInScope=null,$.nobrTagInScope=null),ew.indexOf(J)!==-1&&($.pTagInButtonScope=null),nw.indexOf(J)!==-1&&J!=="address"&&J!=="div"&&J!=="p"&&($.listItemTagAutoclosing=null,$.dlItemTagAutoclosing=null),$.current=q,J==="form"&&($.formTag=q),J==="a"&&($.aTagInScope=q),J==="button"&&($.buttonTagInScope=q),J==="nobr"&&($.nobrTagInScope=q),J==="p"&&($.pTagInButtonScope=q),J==="li"&&($.listItemTagAutoclosing=q),J==="dd"||J==="dt")$.dlItemTagAutoclosing=q;return J==="#document"||J==="html"?$.containerTagInScope=null:$.containerTagInScope||($.containerTagInScope=q),_!==null||J!=="#document"&&J!=="html"&&J!=="body"?$.implicitRootScope===!0&&($.implicitRootScope=!1):$.implicitRootScope=!0,$}function gJ(_,J,$){switch(J){case"select":return _==="hr"||_==="option"||_==="optgroup"||_==="script"||_==="template"||_==="#text";case"optgroup":return _==="option"||_==="#text";case"option":return _==="#text";case"tr":return _==="th"||_==="td"||_==="style"||_==="script"||_==="template";case"tbody":case"thead":case"tfoot":return _==="tr"||_==="style"||_==="script"||_==="template";case"colgroup":return _==="col"||_==="template";case"table":return _==="caption"||_==="colgroup"||_==="tbody"||_==="tfoot"||_==="thead"||_==="style"||_==="script"||_==="template";case"head":return _==="base"||_==="basefont"||_==="bgsound"||_==="link"||_==="meta"||_==="title"||_==="noscript"||_==="noframes"||_==="style"||_==="script"||_==="template";case"html":if($)break;return _==="head"||_==="body"||_==="frameset";case"frameset":return _==="frame";case"#document":if(!$)return _==="html"}switch(_){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return J!=="h1"&&J!=="h2"&&J!=="h3"&&J!=="h4"&&J!=="h5"&&J!=="h6";case"rp":case"rt":return _I.indexOf(J)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return J==null;case"head":return $||J===null;case"html":return $&&J==="#document"||J===null;case"body":return $&&(J==="#document"||J==="html")||J===null}return!0}function pJ(_,J){switch(_){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return J.pTagInButtonScope;case"form":return J.formTag||J.pTagInButtonScope;case"li":return J.listItemTagAutoclosing;case"dd":case"dt":return J.dlItemTagAutoclosing;case"button":return J.buttonTagInScope;case"a":return J.aTagInScope;case"nobr":return J.nobrTagInScope}return null}function cJ(_,J){for(;_;){switch(_.tag){case 5:case 26:case 27:if(_.type===J)return _}_=_.return}return null}function z9(_,J){J=J||sz;var $=J.current;if(J=($=gJ(_,$&&$.tag,J.implicitRootScope)?null:$)?null:pJ(_,J),J=$||J,!J)return!0;var q=J.tag;if(J=String(!!$)+"|"+_+"|"+q,_Q[J])return!1;_Q[J]=!0;var G=(J=G5)?cJ(J.return,q):null,F=J!==null&&G!==null?mJ(G,J,null):"",Y="<"+_+">";return $?($="",q==="table"&&_==="tr"&&($+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
|
|
77
|
-
This will cause a hydration error.%s`,Y,q,$,F)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
78
|
-
This will cause a hydration error.%s`,Y,q,F),J&&(_=J.return,G===null||_===null||G===_&&_._debugOwner===J._debugOwner||W1(G,function(){console.error(`<%s> cannot contain a nested %s.
|
|
79
|
-
See this log for the ancestor stack trace.`,q,Y)})),!1}function I3(_,J,$){if($||gJ("#text",J,!1))return!0;if($="#text|"+J,_Q[$])return!1;_Q[$]=!0;var q=($=G5)?cJ($,J):null;return $=$!==null&&q!==null?mJ(q,$,$.tag!==6?{children:null}:null):"",/\S/.test(_)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
80
|
-
This will cause a hydration error.%s`,J,$):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
|
81
|
-
This will cause a hydration error.%s`,J,$),!1}function N6(_,J){if(J){var $=_.firstChild;if($&&$===_.lastChild&&$.nodeType===3){$.nodeValue=J;return}}_.textContent=J}function $U(_){return _.replace(QI,function(J,$){return $.toUpperCase()})}function B9(_,J,$){var q=J.indexOf("--")===0;q||(-1<J.indexOf("-")?U7.hasOwnProperty(J)&&U7[J]||(U7[J]=!0,console.error("Unsupported style property %s. Did you mean %s?",J,$U(J.replace($I,"ms-")))):JI.test(J)?U7.hasOwnProperty(J)&&U7[J]||(U7[J]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",J,J.charAt(0).toUpperCase()+J.slice(1))):!nz.test($)||LZ.hasOwnProperty($)&&LZ[$]||(LZ[$]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,J,$.replace(nz,""))),typeof $==="number"&&(isNaN($)?ez||(ez=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",J)):isFinite($)||_B||(_B=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",J)))),$==null||typeof $==="boolean"||$===""?q?_.setProperty(J,""):J==="float"?_.cssFloat="":_[J]="":q?_.setProperty(J,$):typeof $!=="number"||$===0||JB.has(J)?J==="float"?_.cssFloat=$:(V0($,J),_[J]=(""+$).trim()):_[J]=$+"px"}function aX(_,J,$){if(J!=null&&typeof J!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(J&&Object.freeze(J),_=_.style,$!=null){if(J){var q={};if($){for(var G in $)if($.hasOwnProperty(G)&&!J.hasOwnProperty(G))for(var F=AZ[G]||[G],Y=0;Y<F.length;Y++)q[F[Y]]=G}for(var A in J)if(J.hasOwnProperty(A)&&(!$||$[A]!==J[A]))for(G=AZ[A]||[A],F=0;F<G.length;F++)q[G[F]]=A;A={};for(var w in J)for(G=AZ[w]||[w],F=0;F<G.length;F++)A[G[F]]=w;w={};for(var N in q)if(G=q[N],(F=A[N])&&G!==F&&(Y=G+","+F,!w[Y])){w[Y]=!0,Y=console;var t=J[G];Y.error.call(Y,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",t==null||typeof t==="boolean"||t===""?"Removing":"Updating",G,F)}}for(var o in $)!$.hasOwnProperty(o)||J!=null&&J.hasOwnProperty(o)||(o.indexOf("--")===0?_.setProperty(o,""):o==="float"?_.cssFloat="":_[o]="");for(var l in J)N=J[l],J.hasOwnProperty(l)&&$[l]!==N&&B9(_,l,N)}else for(q in J)J.hasOwnProperty(q)&&B9(_,q,J[q])}function A9(_){if(_.indexOf("-")===-1)return!1;switch(_){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}}function sX(_){return qI.get(_)||_}function oR(_,J){if(h5.call(Z7,J)&&Z7[J])return!0;if(GI.test(J)){if(_="aria-"+J.slice(4).toLowerCase(),_=$B.hasOwnProperty(_)?_:null,_==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",J),Z7[J]=!0;if(J!==_)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",J,_),Z7[J]=!0}if(UI.test(J)){if(_=J.toLowerCase(),_=$B.hasOwnProperty(_)?_:null,_==null)return Z7[J]=!0,!1;J!==_&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",J,_),Z7[J]=!0)}return!0}function nR(_,J){var $=[],q;for(q in J)oR(_,q)||$.push(q);J=$.map(function(G){return"`"+G+"`"}).join(", "),$.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",J,_):1<$.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",J,_)}function eR(_,J,$,q){if(h5.call(k2,J)&&k2[J])return!0;var G=J.toLowerCase();if(G==="onfocusin"||G==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),k2[J]=!0;if(typeof $==="function"&&(_==="form"&&J==="action"||_==="input"&&J==="formAction"||_==="button"&&J==="formAction"))return!0;if(q!=null){if(_=q.possibleRegistrationNames,q.registrationNameDependencies.hasOwnProperty(J))return!0;if(q=_.hasOwnProperty(G)?_[G]:null,q!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",J,q),k2[J]=!0;if(qB.test(J))return console.error("Unknown event handler property `%s`. It will be ignored.",J),k2[J]=!0}else if(qB.test(J))return ZI.test(J)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",J),k2[J]=!0;if(FI.test(J)||KI.test(J))return!0;if(G==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),k2[J]=!0;if(G==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),k2[J]=!0;if(G==="is"&&$!==null&&$!==void 0&&typeof $!=="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof $),k2[J]=!0;if(typeof $==="number"&&isNaN($))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",J),k2[J]=!0;if($Q.hasOwnProperty(G)){if(G=$Q[G],G!==J)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",J,G),k2[J]=!0}else if(J!==G)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",J,G),k2[J]=!0;switch(J){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof $){case"boolean":switch(J){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":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":case"capture":case"download":case"inert":return!0;default:if(G=J.toLowerCase().slice(0,5),G==="data-"||G==="aria-")return!0;return $?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',$,J,J,$,J):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',$,J,J,$,J,J,J),k2[J]=!0}case"function":case"symbol":return k2[J]=!0,!1;case"string":if($==="false"||$==="true"){switch(J){case"checked":case"selected":case"multiple":case"muted":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":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",$,J,$==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',J,$),k2[J]=!0}}return!0}function _O(_,J,$){var q=[],G;for(G in J)eR(_,G,J[G],$)||q.push(G);J=q.map(function(F){return"`"+F+"`"}).join(", "),q.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",J,_):1<q.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",J,_)}function L9(_){return XI.test(""+_)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":_}function m4(){}function QU(_){return _=_.target||_.srcElement||window,_.correspondingUseElement&&(_=_.correspondingUseElement),_.nodeType===3?_.parentNode:_}function tX(_){var J=h1(_);if(J&&(_=J.stateNode)){var $=_[V2]||null;_:switch(_=J.stateNode,J.type){case"input":if(u8(_,$.value,$.defaultValue,$.defaultValue,$.checked,$.defaultChecked,$.type,$.name),J=$.name,$.type==="radio"&&J!=null){for($=_;$.parentNode;)$=$.parentNode;j1(J,"name"),$=$.querySelectorAll('input[name="'+g2(""+J)+'"][type="radio"]');for(J=0;J<$.length;J++){var q=$[J];if(q!==_&&q.form===_.form){var G=q[V2]||null;if(!G)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");u8(q,G.value,G.defaultValue,G.defaultValue,G.checked,G.defaultChecked,G.type,G.name)}}for(J=0;J<$.length;J++)q=$[J],q.form===_.form&&VJ(q)}break _;case"textarea":bJ(_,$.value,$.defaultValue);break _;case"select":J=$.value,J!=null&&T3(_,!!$.multiple,J,!1)}}}function oX(_,J,$){if(MZ)return _(J,$);MZ=!0;try{var q=_(J);return q}finally{if(MZ=!1,F7!==null||K7!==null){if(s8(),F7&&(J=F7,_=K7,K7=F7=null,tX(J),_))for(J=0;J<_.length;J++)tX(_[J])}}}function M9(_,J){var $=_.stateNode;if($===null)return null;var q=$[V2]||null;if(q===null)return null;$=q[J];_:switch(J){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(q=!q.disabled)||(_=_.type,q=!(_==="button"||_==="input"||_==="select"||_==="textarea")),_=!q;break _;default:_=!1}if(_)return null;if($&&typeof $!=="function")throw Error("Expected `"+J+"` listener to be a function, instead got a value of `"+typeof $+"` type.");return $}function nX(){if(QQ)return QQ;var _,J=RZ,$=J.length,q,G="value"in m3?m3.value:m3.textContent,F=G.length;for(_=0;_<$&&J[_]===G[_];_++);var Y=$-_;for(q=1;q<=Y&&J[$-q]===G[F-q];q++);return QQ=G.slice(_,1<q?1-q:void 0)}function lJ(_){var J=_.keyCode;return"charCode"in _?(_=_.charCode,_===0&&J===13&&(_=13)):_=J,_===10&&(_=13),32<=_||_===13?_:0}function rJ(){return!0}function eX(){return!1}function p2(_){function J($,q,G,F,Y){this._reactName=$,this._targetInst=G,this.type=q,this.nativeEvent=F,this.target=Y,this.currentTarget=null;for(var A in _)_.hasOwnProperty(A)&&($=_[A],this[A]=$?$(F):F[A]);return this.isDefaultPrevented=(F.defaultPrevented!=null?F.defaultPrevented:F.returnValue===!1)?rJ:eX,this.isPropagationStopped=eX,this}return o1(J.prototype,{preventDefault:function(){this.defaultPrevented=!0;var $=this.nativeEvent;$&&($.preventDefault?$.preventDefault():typeof $.returnValue!=="unknown"&&($.returnValue=!1),this.isDefaultPrevented=rJ)},stopPropagation:function(){var $=this.nativeEvent;$&&($.stopPropagation?$.stopPropagation():typeof $.cancelBubble!=="unknown"&&($.cancelBubble=!0),this.isPropagationStopped=rJ)},persist:function(){},isPersistent:rJ}),J}function JO(_){var J=this.nativeEvent;return J.getModifierState?J.getModifierState(_):(_=II[_])?!!J[_]:!1}function qU(){return JO}function _H(_,J){switch(_){case"keyup":return EI.indexOf(J.keyCode)!==-1;case"keydown":return J.keyCode!==FB;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function JH(_){return _=_.detail,typeof _==="object"&&"data"in _?_.data:null}function $O(_,J){switch(_){case"compositionend":return JH(J);case"keypress":if(J.which!==XB)return null;return YB=!0,HB;case"textInput":return _=J.data,_===HB&&YB?null:_;default:return null}}function QO(_,J){if(X7)return _==="compositionend"||!fZ&&_H(_,J)?(_=nX(),QQ=RZ=m3=null,X7=!1,_):null;switch(_){case"paste":return null;case"keypress":if(!(J.ctrlKey||J.altKey||J.metaKey)||J.ctrlKey&&J.altKey){if(J.char&&1<J.char.length)return J.char;if(J.which)return String.fromCharCode(J.which)}return null;case"compositionend":return KB&&J.locale!=="ko"?null:J.data;default:return null}}function $H(_){var J=_&&_.nodeName&&_.nodeName.toLowerCase();return J==="input"?!!uI[_.type]:J==="textarea"?!0:!1}function qO(_){if(!I4)return!1;_="on"+_;var J=_ in document;return J||(J=document.createElement("div"),J.setAttribute(_,"return;"),J=typeof J[_]==="function"),J}function QH(_,J,$,q){F7?K7?K7.push(q):K7=[q]:F7=q,J=u$(J,"onChange"),0<J.length&&($=new qQ("onChange","change",null,$,q),_.push({event:$,listeners:J}))}function UO(_){hW(_,0)}function dJ(_){var J=m1(_);if(VJ(J))return _}function qH(_,J){if(_==="change")return J}function UH(){Q_&&(Q_.detachEvent("onpropertychange",GH),q_=Q_=null)}function GH(_){if(_.propertyName==="value"&&dJ(q_)){var J=[];QH(J,q_,_,QU(_)),oX(UO,J)}}function GO(_,J,$){_==="focusin"?(UH(),Q_=J,q_=$,Q_.attachEvent("onpropertychange",GH)):_==="focusout"&&UH()}function ZO(_){if(_==="selectionchange"||_==="keyup"||_==="keydown")return dJ(q_)}function FO(_,J){if(_==="click")return dJ(J)}function KO(_,J){if(_==="input"||_==="change")return dJ(J)}function XO(_,J){return _===J&&(_!==0||1/_===1/J)||_!==_&&J!==J}function T9(_,J){if(D2(_,J))return!0;if(typeof _!=="object"||_===null||typeof J!=="object"||J===null)return!1;var $=Object.keys(_),q=Object.keys(J);if($.length!==q.length)return!1;for(q=0;q<$.length;q++){var G=$[q];if(!h5.call(J,G)||!D2(_[G],J[G]))return!1}return!0}function ZH(_){for(;_&&_.firstChild;)_=_.firstChild;return _}function FH(_,J){var $=ZH(_);_=0;for(var q;$;){if($.nodeType===3){if(q=_+$.textContent.length,_<=J&&q>=J)return{node:$,offset:J-_};_=q}_:{for(;$;){if($.nextSibling){$=$.nextSibling;break _}$=$.parentNode}$=void 0}$=ZH($)}}function KH(_,J){return _&&J?_===J?!0:_&&_.nodeType===3?!1:J&&J.nodeType===3?KH(_,J.parentNode):("contains"in _)?_.contains(J):_.compareDocumentPosition?!!(_.compareDocumentPosition(J)&16):!1:!1}function XH(_){_=_!=null&&_.ownerDocument!=null&&_.ownerDocument.defaultView!=null?_.ownerDocument.defaultView:window;for(var J=b8(_.document);J instanceof _.HTMLIFrameElement;){try{var $=typeof J.contentWindow.location.href==="string"}catch(q){$=!1}if($)_=J.contentWindow;else break;J=b8(_.document)}return J}function UU(_){var J=_&&_.nodeName&&_.nodeName.toLowerCase();return J&&(J==="input"&&(_.type==="text"||_.type==="search"||_.type==="tel"||_.type==="url"||_.type==="password")||J==="textarea"||_.contentEditable==="true")}function HH(_,J,$){var q=$.window===$?$.document:$.nodeType===9?$:$.ownerDocument;NZ||H7==null||H7!==b8(q)||(q=H7,("selectionStart"in q)&&UU(q)?q={start:q.selectionStart,end:q.selectionEnd}:(q=(q.ownerDocument&&q.ownerDocument.defaultView||window).getSelection(),q={anchorNode:q.anchorNode,anchorOffset:q.anchorOffset,focusNode:q.focusNode,focusOffset:q.focusOffset}),U_&&T9(U_,q)||(U_=q,q=u$(PZ,"onSelect"),0<q.length&&(J=new qQ("onSelect","select",null,J,$),_.push({event:J,listeners:q}),J.target=H7)))}function C6(_,J){var $={};return $[_.toLowerCase()]=J.toLowerCase(),$["Webkit"+_]="webkit"+J,$["Moz"+_]="moz"+J,$}function S6(_){if(CZ[_])return CZ[_];if(!Y7[_])return _;var J=Y7[_],$;for($ in J)if(J.hasOwnProperty($)&&$ in zB)return CZ[_]=J[$];return _}function b5(_,J){TB.set(_,J),J2(J,[_])}function HO(_){for(var J=GQ,$=0;$<_.length;$++){var q=_[$];if(typeof q==="object"&&q!==null)if(s0(q)&&q.length===2&&typeof q[0]==="string"){if(J!==GQ&&J!==DZ)return VZ;J=DZ}else return VZ;else{if(typeof q==="function"||typeof q==="string"&&50<q.length||J!==GQ&&J!==kZ)return VZ;J=kZ}}return J}function GU(_,J,$,q){for(var G in _)h5.call(_,G)&&G[0]!=="_"&&J4(G,_[G],J,$,q)}function J4(_,J,$,q,G){switch(typeof J){case"object":if(J===null){J="null";break}else{if(J.$$typeof===L4){var F=p(J.type)||"…",Y=J.key;J=J.props;var A=Object.keys(J),w=A.length;if(Y==null&&w===0){J="<"+F+" />";break}if(3>q||w===1&&A[0]==="children"&&Y==null){J="<"+F+" … />";break}$.push([G+" ".repeat(q)+_,"<"+F]),Y!==null&&J4("key",Y,$,q+1,G),_=!1;for(var N in J)N==="children"?J.children!=null&&(!s0(J.children)||0<J.children.length)&&(_=!0):h5.call(J,N)&&N[0]!=="_"&&J4(N,J[N],$,q+1,G);$.push(["",_?">…</"+F+">":"/>"]);return}if(F=Object.prototype.toString.call(J),F=F.slice(8,F.length-1),F==="Array"){if(N=HO(J),N===kZ||N===GQ){J=JSON.stringify(J);break}else if(N===DZ){$.push([G+" ".repeat(q)+_,""]);for(_=0;_<J.length;_++)F=J[_],J4(F[0],F[1],$,q+1,G);return}}if(F==="Promise"){if(J.status==="fulfilled"){if(F=$.length,J4(_,J.value,$,q,G),$.length>F){$=$[F],$[1]="Promise<"+($[1]||"Object")+">";return}}else if(J.status==="rejected"&&(F=$.length,J4(_,J.reason,$,q,G),$.length>F)){$=$[F],$[1]="Rejected Promise<"+$[1]+">";return}$.push([" ".repeat(q)+_,"Promise"]);return}F==="Object"&&(N=Object.getPrototypeOf(J))&&typeof N.constructor==="function"&&(F=N.constructor.name),$.push([G+" ".repeat(q)+_,F==="Object"?3>q?"":"…":F]),3>q&&GU(J,$,q+1,G);return}case"function":J=J.name===""?"() => {}":J.name+"() {}";break;case"string":J=J===lI?"…":JSON.stringify(J);break;case"undefined":J="undefined";break;case"boolean":J=J?"true":"false";break;default:J=String(J)}$.push([G+" ".repeat(q)+_,J])}function YH(_,J,$,q){var G=!0;for(Y in _)Y in J||($.push([ZQ+" ".repeat(q)+Y,"…"]),G=!1);for(var F in J)if(F in _){var Y=_[F],A=J[F];if(Y!==A){if(q===0&&F==="children")G=" ".repeat(q)+F,$.push([ZQ+G,"…"],[FQ+G,"…"]);else{if(!(3<=q)){if(typeof Y==="object"&&typeof A==="object"&&Y!==null&&A!==null&&Y.$$typeof===A.$$typeof)if(A.$$typeof===L4){if(Y.type===A.type&&Y.key===A.key){Y=p(A.type)||"…",G=" ".repeat(q)+F,Y="<"+Y+" … />",$.push([ZQ+G,Y],[FQ+G,Y]),G=!1;continue}}else{var w=Object.prototype.toString.call(Y),N=Object.prototype.toString.call(A);if(w===N&&(N==="[object Object]"||N==="[object Array]")){w=[wB+" ".repeat(q)+F,N==="[object Array]"?"Array":""],$.push(w),N=$.length,YH(Y,A,$,q+1)?N===$.length&&(w[1]="Referentially unequal but deeply equal objects. Consider memoization."):G=!1;continue}}else if(typeof Y==="function"&&typeof A==="function"&&Y.name===A.name&&Y.length===A.length&&(w=Function.prototype.toString.call(Y),N=Function.prototype.toString.call(A),w===N)){Y=A.name===""?"() => {}":A.name+"() {}",$.push([wB+" ".repeat(q)+F,Y+" Referentially unequal function closure. Consider memoization."]);continue}}J4(F,Y,$,q,ZQ),J4(F,A,$,q,FQ)}G=!1}}else $.push([FQ+" ".repeat(q)+F,"…"]),G=!1;return G}function n2(_){e1=_&63?"Blocking":_&64?"Gesture":_&4194176?"Transition":_&62914560?"Suspense":_&2080374784?"Idle":"Other"}function $4(_,J,$,q){O0&&(p3.start=J,p3.end=$,s4.color="warning",s4.tooltipText=q,s4.properties=null,(_=_._debugTask)?_.run(performance.measure.bind(performance,q,p3)):performance.measure(q,p3))}function iJ(_,J,$){$4(_,J,$,"Reconnect")}function aJ(_,J,$,q,G){var F=m(_);if(F!==null&&O0){var{alternate:Y,actualDuration:A}=_;if(Y===null||Y.child!==_.child)for(var w=_.child;w!==null;w=w.sibling)A-=w.actualDuration;q=0.5>A?q?"tertiary-light":"primary-light":10>A?q?"tertiary":"primary":100>A?q?"tertiary-dark":"primary-dark":"error";var N=_.memoizedProps;A=_._debugTask,N!==null&&Y!==null&&Y.memoizedProps!==N?(w=[rI],N=YH(Y.memoizedProps,N,w,0),1<w.length&&(N&&!g3&&(Y.lanes&G)===0&&100<_.actualDuration?(g3=!0,w[0]=dI,s4.color="warning",s4.tooltipText=IB):(s4.color=q,s4.tooltipText=F),s4.properties=w,p3.start=J,p3.end=$,A!=null?A.run(performance.measure.bind(performance,""+F,p3)):performance.measure(""+F,p3))):A!=null?A.run(console.timeStamp.bind(console,F,J,$,T5,void 0,q)):console.timeStamp(F,J,$,T5,void 0,q)}}function ZU(_,J,$,q){if(O0){var G=m(_);if(G!==null){for(var F=null,Y=[],A=0;A<q.length;A++){var w=q[A];F==null&&w.source!==null&&(F=w.source._debugTask),w=w.value,Y.push(["Error",typeof w==="object"&&w!==null&&typeof w.message==="string"?String(w.message):String(w)])}_.key!==null&&J4("key",_.key,Y,0,""),_.memoizedProps!==null&&GU(_.memoizedProps,Y,0,""),F==null&&(F=_._debugTask),_={start:J,end:$,detail:{devtools:{color:"error",track:T5,tooltipText:_.tag===13?"Hydration failed":"Error boundary caught an error",properties:Y}}},F?F.run(performance.measure.bind(performance,""+G,_)):performance.measure(""+G,_)}}}function Q4(_,J,$,q,G){if(G!==null){if(O0){var F=m(_);if(F!==null){q=[];for(var Y=0;Y<G.length;Y++){var A=G[Y].value;q.push(["Error",typeof A==="object"&&A!==null&&typeof A.message==="string"?String(A.message):String(A)])}_.key!==null&&J4("key",_.key,q,0,""),_.memoizedProps!==null&&GU(_.memoizedProps,q,0,""),J={start:J,end:$,detail:{devtools:{color:"error",track:T5,tooltipText:"A lifecycle or effect errored",properties:q}}},(_=_._debugTask)?_.run(performance.measure.bind(performance,""+F,J)):performance.measure(""+F,J)}}}else F=m(_),F!==null&&O0&&(G=1>q?"secondary-light":100>q?"secondary":500>q?"secondary-dark":"error",(_=_._debugTask)?_.run(console.timeStamp.bind(console,F,J,$,T5,void 0,G)):console.timeStamp(F,J,$,T5,void 0,G))}function YO(_,J,$,q){if(O0&&!(J<=_)){var G=($&738197653)===$?"tertiary-dark":"primary-dark";$=($&536870912)===$?"Prepared":($&201326741)===$?"Hydrated":"Render",q?q.run(console.timeStamp.bind(console,$,_,J,e1,n1,G)):console.timeStamp($,_,J,e1,n1,G)}}function WH(_,J,$,q){!O0||J<=_||($=($&738197653)===$?"tertiary-dark":"primary-dark",q?q.run(console.timeStamp.bind(console,"Prewarm",_,J,e1,n1,$)):console.timeStamp("Prewarm",_,J,e1,n1,$))}function zH(_,J,$,q){!O0||J<=_||($=($&738197653)===$?"tertiary-dark":"primary-dark",q?q.run(console.timeStamp.bind(console,"Suspended",_,J,e1,n1,$)):console.timeStamp("Suspended",_,J,e1,n1,$))}function WO(_,J,$,q,G,F){if(O0&&!(J<=_)){$=[];for(var Y=0;Y<q.length;Y++){var A=q[Y].value;$.push(["Recoverable Error",typeof A==="object"&&A!==null&&typeof A.message==="string"?String(A.message):String(A)])}_={start:_,end:J,detail:{devtools:{color:"primary-dark",track:e1,trackGroup:n1,tooltipText:G?"Hydration Failed":"Recovered after Error",properties:$}}},F?F.run(performance.measure.bind(performance,"Recovered",_)):performance.measure("Recovered",_)}}function FU(_,J,$,q){!O0||J<=_||(q?q.run(console.timeStamp.bind(console,"Errored",_,J,e1,n1,"error")):console.timeStamp("Errored",_,J,e1,n1,"error"))}function zO(_,J,$,q){!O0||J<=_||(q?q.run(console.timeStamp.bind(console,$,_,J,e1,n1,"secondary-light")):console.timeStamp($,_,J,e1,n1,"secondary-light"))}function BH(_,J,$,q,G){if(O0&&!(J<=_)){for(var F=[],Y=0;Y<$.length;Y++){var A=$[Y].value;F.push(["Error",typeof A==="object"&&A!==null&&typeof A.message==="string"?String(A.message):String(A)])}_={start:_,end:J,detail:{devtools:{color:"error",track:e1,trackGroup:n1,tooltipText:q?"Remaining Effects Errored":"Commit Errored",properties:F}}},G?G.run(performance.measure.bind(performance,"Errored",_)):performance.measure("Errored",_)}}function R9(_,J,$){!O0||J<=_||($?$.run(console.timeStamp.bind(console,"Animating",_,J,e1,n1,"secondary-dark")):console.timeStamp("Animating",_,J,e1,n1,"secondary-dark"))}function sJ(){for(var _=W7,J=yZ=W7=0;J<_;){var $=R5[J];R5[J++]=null;var q=R5[J];R5[J++]=null;var G=R5[J];R5[J++]=null;var F=R5[J];if(R5[J++]=null,q!==null&&G!==null){var Y=q.pending;Y===null?G.next=G:(G.next=Y.next,Y.next=G),q.pending=G}F!==0&&AH($,G,F)}}function tJ(_,J,$,q){R5[W7++]=_,R5[W7++]=J,R5[W7++]=$,R5[W7++]=q,yZ|=q,_.lanes|=q,_=_.alternate,_!==null&&(_.lanes|=q)}function KU(_,J,$,q){return tJ(_,J,$,q),oJ(_)}function M2(_,J){return tJ(_,null,null,J),oJ(_)}function AH(_,J,$){_.lanes|=$;var q=_.alternate;q!==null&&(q.lanes|=$);for(var G=!1,F=_.return;F!==null;)F.childLanes|=$,q=F.alternate,q!==null&&(q.childLanes|=$),F.tag===22&&(_=F.stateNode,_===null||_._visibility&G_||(G=!0)),_=F,F=F.return;return _.tag===3?(F=_.stateNode,G&&J!==null&&(G=31-j2($),_=F.hiddenUpdates,q=_[G],q===null?_[G]=[J]:q.push(J),J.lane=$|536870912),F):null}function oJ(_){if(y_>Zf)throw Q8=y_=0,v_=YF=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Q8>Ff&&(Q8=0,v_=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),_.alternate===null&&(_.flags&4098)!==0&&DW(_);for(var J=_,$=J.return;$!==null;)J.alternate===null&&(J.flags&4098)!==0&&DW(_),J=$,$=J.return;return J.tag===3?J.stateNode:null}function j6(_){if(O5===null)return _;var J=O5(_);return J===void 0?_:J.current}function XU(_){if(O5===null)return _;var J=O5(_);return J===void 0?_!==null&&_!==void 0&&typeof _.render==="function"&&(J=j6(_.render),_.render!==J)?(J={$$typeof:a9,render:J},_.displayName!==void 0&&(J.displayName=_.displayName),J):_:J.current}function LH(_,J){if(O5===null)return!1;var $=_.elementType;J=J.type;var q=!1,G=typeof J==="object"&&J!==null?J.$$typeof:null;switch(_.tag){case 1:typeof J==="function"&&(q=!0);break;case 0:typeof J==="function"?q=!0:G===U5&&(q=!0);break;case 11:G===a9?q=!0:G===U5&&(q=!0);break;case 14:case 15:G===a$?q=!0:G===U5&&(q=!0);break;default:return!1}return q&&(_=O5($),_!==void 0&&_===O5(J))?!0:!1}function MH(_){O5!==null&&typeof WeakSet==="function"&&(z7===null&&(z7=new WeakSet),z7.add(_))}function TH(_,J,$){do{var q=_,G=q.alternate,F=q.child,Y=q.sibling,A=q.tag;q=q.type;var w=null;switch(A){case 0:case 15:case 1:w=q;break;case 11:w=q.render}if(O5===null)throw Error("Expected resolveFamily to be set during hot reload.");var N=!1;if(q=!1,w!==null&&(w=O5(w),w!==void 0&&($.has(w)?q=!0:J.has(w)&&(A===1?q=!0:N=!0))),z7!==null&&(z7.has(_)||G!==null&&z7.has(G))&&(q=!0),q&&(_._debugNeedsRemount=!0),q||N)G=M2(_,2),G!==null&&k0(G,_,2);if(F===null||q||TH(F,J,$),Y===null)break;_=Y}while(1)}function BO(_,J,$,q){this.tag=_,this.key=$,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=J,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=q,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,fB||typeof Object.preventExtensions!=="function"||Object.preventExtensions(this)}function HU(_){return _=_.prototype,!(!_||!_.isReactComponent)}function g4(_,J){var $=_.alternate;switch($===null?($=M(_.tag,J,_.key,_.mode),$.elementType=_.elementType,$.type=_.type,$.stateNode=_.stateNode,$._debugOwner=_._debugOwner,$._debugStack=_._debugStack,$._debugTask=_._debugTask,$._debugHookTypes=_._debugHookTypes,$.alternate=_,_.alternate=$):($.pendingProps=J,$.type=_.type,$.flags=0,$.subtreeFlags=0,$.deletions=null,$.actualDuration=-0,$.actualStartTime=-1.1),$.flags=_.flags&65011712,$.childLanes=_.childLanes,$.lanes=_.lanes,$.child=_.child,$.memoizedProps=_.memoizedProps,$.memoizedState=_.memoizedState,$.updateQueue=_.updateQueue,J=_.dependencies,$.dependencies=J===null?null:{lanes:J.lanes,firstContext:J.firstContext,_debugThenableState:J._debugThenableState},$.sibling=_.sibling,$.index=_.index,$.ref=_.ref,$.refCleanup=_.refCleanup,$.selfBaseDuration=_.selfBaseDuration,$.treeBaseDuration=_.treeBaseDuration,$._debugInfo=_._debugInfo,$._debugNeedsRemount=_._debugNeedsRemount,$.tag){case 0:case 15:$.type=j6(_.type);break;case 1:$.type=j6(_.type);break;case 11:$.type=XU(_.type)}return $}function RH(_,J){_.flags&=65011714;var $=_.alternate;return $===null?(_.childLanes=0,_.lanes=J,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null,_.selfBaseDuration=0,_.treeBaseDuration=0):(_.childLanes=$.childLanes,_.lanes=$.lanes,_.child=$.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=$.memoizedProps,_.memoizedState=$.memoizedState,_.updateQueue=$.updateQueue,_.type=$.type,J=$.dependencies,_.dependencies=J===null?null:{lanes:J.lanes,firstContext:J.firstContext,_debugThenableState:J._debugThenableState},_.selfBaseDuration=$.selfBaseDuration,_.treeBaseDuration=$.treeBaseDuration),_}function YU(_,J,$,q,G,F){var Y=0,A=_;if(typeof _==="function")HU(_)&&(Y=1),A=j6(A);else if(typeof _==="string")Y=d(),Y=fw(_,$,Y)?26:_==="html"||_==="head"||_==="body"?27:5;else _:switch(_){case qZ:return J=M(31,$,J,G),J.elementType=qZ,J.lanes=F,J;case $7:return V6($.children,G,F,J);case i$:Y=8,G|=R2,G|=g5;break;case _Z:return _=$,q=G,typeof _.id!=="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof _.id),J=M(12,_,J,q|d1),J.elementType=_Z,J.lanes=F,J.stateNode={effectDuration:0,passiveEffectDuration:0},J;case $Z:return J=M(13,$,J,G),J.elementType=$Z,J.lanes=F,J;case QZ:return J=M(19,$,J,G),J.elementType=QZ,J.lanes=F,J;default:if(typeof _==="object"&&_!==null)switch(_.$$typeof){case M4:Y=10;break _;case JZ:Y=9;break _;case a9:Y=11,A=XU(A);break _;case a$:Y=14;break _;case U5:Y=16,A=null;break _}if(A="",_===void 0||typeof _==="object"&&_!==null&&Object.keys(_).length===0)A+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";_===null?$="null":s0(_)?$="array":_!==void 0&&_.$$typeof===L4?($="<"+(p(_.type)||"Unknown")+" />",A=" Did you accidentally export a JSX literal instead of a component?"):$=typeof _,(Y=q?a(q):null)&&(A+=`
|
|
82
|
-
|
|
83
|
-
Check the render method of \``+Y+"`."),Y=29,$=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+($+"."+A)),A=null}return J=M(Y,$,J,G),J.elementType=_,J.type=A,J.lanes=F,J._debugOwner=q,J}function nJ(_,J,$){return J=YU(_.type,_.key,_.props,_._owner,J,$),J._debugOwner=_._owner,J._debugStack=_._debugStack,J._debugTask=_._debugTask,J}function V6(_,J,$,q){return _=M(7,_,q,J),_.lanes=$,_}function WU(_,J,$){return _=M(6,_,null,J),_.lanes=$,_}function OH(_){var J=M(18,null,null,x1);return J.stateNode=_,J}function zU(_,J,$){return J=M(4,_.children!==null?_.children:[],_.key,J),J.lanes=$,J.stateNode={containerInfo:_.containerInfo,pendingChildren:null,implementation:_.implementation},J}function e2(_,J){if(typeof _==="object"&&_!==null){var $=vZ.get(_);if($!==void 0)return $;return J={value:_,source:J,stack:I1(J)},vZ.set(_,J),J}return{value:_,source:J,stack:I1(J)}}function p4(_,J){f3(),B7[A7++]=Z_,B7[A7++]=KQ,KQ=_,Z_=J}function wH(_,J,$){f3(),w5[I5++]=o4,w5[I5++]=n4,w5[I5++]=c6,c6=_;var q=o4;_=n4;var G=32-j2(q)-1;q&=~(1<<G),$+=1;var F=32-j2(J)+G;if(30<F){var Y=G-G%5;F=(q&(1<<Y)-1).toString(32),q>>=Y,G-=Y,o4=1<<32-j2(J)+G|$<<G|q,n4=F+_}else o4=1<<F|$<<G|q,n4=_}function BU(_){f3(),_.return!==null&&(p4(_,1),wH(_,1,0))}function AU(_){for(;_===KQ;)KQ=B7[--A7],B7[A7]=null,Z_=B7[--A7],B7[A7]=null;for(;_===c6;)c6=w5[--I5],w5[I5]=null,n4=w5[--I5],w5[I5]=null,o4=w5[--I5],w5[I5]=null}function IH(){return f3(),c6!==null?{id:o4,overflow:n4}:null}function fH(_,J){f3(),w5[I5++]=o4,w5[I5++]=n4,w5[I5++]=c6,o4=J.id,n4=J.overflow,c6=_}function f3(){J0||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function k6(_,J){if(_.return===null){if(F5===null)F5={fiber:_,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:J};else{if(F5.fiber!==_)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");F5.distanceFromLeaf>J&&(F5.distanceFromLeaf=J)}return F5}var $=k6(_.return,J+1).children;if(0<$.length&&$[$.length-1].fiber===_)return $=$[$.length-1],$.distanceFromLeaf>J&&($.distanceFromLeaf=J),$;return J={fiber:_,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:J},$.push(J),J}function PH(){J0&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function eJ(_,J){f4||(_=k6(_,0),_.serverProps=null,J!==null&&(J=Qz(J),_.serverTail.push(J)))}function P3(_){var J=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,$="",q=F5;throw q!==null&&(F5=null,$=Y9(q)),O9(e2(Error("Hydration failed because the server rendered "+(J?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
84
|
-
|
|
85
|
-
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
86
|
-
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
87
|
-
- Date formatting in a user's locale which doesn't match the server.
|
|
88
|
-
- External changing data without sending a snapshot of it along with the HTML.
|
|
89
|
-
- Invalid HTML tag nesting.
|
|
90
|
-
|
|
91
|
-
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
92
|
-
|
|
93
|
-
https://react.dev/link/hydration-mismatch`+$),_)),EZ}function NH(_){var{stateNode:J,type:$,memoizedProps:q}=_;switch(J[H2]=_,J[V2]=q,bG($,q),$){case"dialog":$0("cancel",J),$0("close",J);break;case"iframe":case"object":case"embed":$0("load",J);break;case"video":case"audio":for($=0;$<E_.length;$++)$0(E_[$],J);break;case"source":$0("error",J);break;case"img":case"image":case"link":$0("error",J),$0("load",J);break;case"details":$0("toggle",J);break;case"input":_4("input",q),$0("invalid",J),kJ(J,q),Z9(J,q.value,q.defaultValue,q.checked,q.defaultChecked,q.type,q.name,!0);break;case"option":DJ(J,q);break;case"select":_4("select",q),$0("invalid",J),vJ(J,q);break;case"textarea":_4("textarea",q),$0("invalid",J),EJ(J,q),F9(J,q.value,q.defaultValue,q.children)}$=q.children,typeof $!=="string"&&typeof $!=="number"&&typeof $!=="bigint"||J.textContent===""+$||q.suppressHydrationWarning===!0||cW(J.textContent,$)?(q.popover!=null&&($0("beforetoggle",J),$0("toggle",J)),q.onScroll!=null&&$0("scroll",J),q.onScrollEnd!=null&&$0("scrollend",J),q.onClick!=null&&(J.onclick=m4),J=!0):J=!1,J||P3(_,!0)}function CH(_){for(Y2=_.return;Y2;)switch(Y2.tag){case 5:case 31:case 13:f5=!1;return;case 27:case 3:f5=!0;return;default:Y2=Y2.return}}function m8(_){if(_!==Y2)return!1;if(!J0)return CH(_),J0=!0,!1;var J=_.tag,$;if($=J!==3&&J!==27){if($=J===5)$=_.type,$=!($!=="form"&&$!=="button")||gG(_.type,_.memoizedProps);$=!$}if($&&w0){for($=w0;$;){var q=k6(_,0),G=Qz($);q.serverTail.push(G),$=G.type==="Suspense"?rG($):q5($.nextSibling)}P3(_)}if(CH(_),J===13){if(_=_.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");w0=rG(_)}else if(J===31){if(_=_.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");w0=rG(_)}else J===27?(J=w0,E3(_.type)?(_=fF,fF=null,w0=_):w0=J):w0=Y2?q5(_.stateNode.nextSibling):null;return!0}function D6(){w0=Y2=null,f4=J0=!1}function LU(){var _=l3;return _!==null&&(b2===null?b2=_:b2.push.apply(b2,_),l3=null),_}function O9(_){l3===null?l3=[_]:l3.push(_)}function MU(){var _=F5;if(_!==null){F5=null;for(var J=Y9(_);0<_.children.length;)_=_.children[0];W1(_.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
|
94
|
-
|
|
95
|
-
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
96
|
-
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
97
|
-
- Date formatting in a user's locale which doesn't match the server.
|
|
98
|
-
- External changing data without sending a snapshot of it along with the HTML.
|
|
99
|
-
- Invalid HTML tag nesting.
|
|
100
|
-
|
|
101
|
-
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
102
|
-
|
|
103
|
-
%s%s`,"https://react.dev/link/hydration-mismatch",J)})}}function _$(){L7=XQ=null,M7=!1}function N3(_,J,$){J1(bZ,J._currentValue,_),J._currentValue=$,J1(uZ,J._currentRenderer,_),J._currentRenderer!==void 0&&J._currentRenderer!==null&&J._currentRenderer!==NB&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),J._currentRenderer=NB}function c4(_,J){_._currentValue=bZ.current;var $=uZ.current;$1(uZ,J),_._currentRenderer=$,$1(bZ,J)}function TU(_,J,$){for(;_!==null;){var q=_.alternate;if((_.childLanes&J)!==J?(_.childLanes|=J,q!==null&&(q.childLanes|=J)):q!==null&&(q.childLanes&J)!==J&&(q.childLanes|=J),_===$)break;_=_.return}_!==$&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function RU(_,J,$,q){var G=_.child;G!==null&&(G.return=_);for(;G!==null;){var F=G.dependencies;if(F!==null){var Y=G.child;F=F.firstContext;_:for(;F!==null;){var A=F;F=G;for(var w=0;w<J.length;w++)if(A.context===J[w]){F.lanes|=$,A=F.alternate,A!==null&&(A.lanes|=$),TU(F.return,$,_),q||(Y=null);break _}F=A.next}}else if(G.tag===18){if(Y=G.return,Y===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");Y.lanes|=$,F=Y.alternate,F!==null&&(F.lanes|=$),TU(Y,$,_),Y=null}else Y=G.child;if(Y!==null)Y.return=G;else for(Y=G;Y!==null;){if(Y===_){Y=null;break}if(G=Y.sibling,G!==null){G.return=Y.return,Y=G;break}Y=Y.return}G=Y}}function g8(_,J,$,q){_=null;for(var G=J,F=!1;G!==null;){if(!F){if((G.flags&524288)!==0)F=!0;else if((G.flags&262144)!==0)break}if(G.tag===10){var Y=G.alternate;if(Y===null)throw Error("Should have a current fiber. This is a bug in React.");if(Y=Y.memoizedProps,Y!==null){var A=G.type;D2(G.pendingProps.value,Y.value)||(_!==null?_.push(A):_=[A])}}else if(G===s$.current){if(Y=G.alternate,Y===null)throw Error("Should have a current fiber. This is a bug in React.");Y.memoizedState.memoizedState!==G.memoizedState.memoizedState&&(_!==null?_.push(m_):_=[m_])}G=G.return}_!==null&&RU(J,_,$,q),J.flags|=262144}function J$(_){for(_=_.firstContext;_!==null;){if(!D2(_.context._currentValue,_.memoizedValue))return!0;_=_.next}return!1}function y6(_){XQ=_,L7=null,_=_.dependencies,_!==null&&(_.firstContext=null)}function f0(_){return M7&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),SH(XQ,_)}function $$(_,J){return XQ===null&&y6(_),SH(_,J)}function SH(_,J){var $=J._currentValue;if(J={context:J,memoizedValue:$,next:null},L7===null){if(_===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");L7=J,_.dependencies={lanes:0,firstContext:J,_debugThenableState:null},_.flags|=524288}else L7=L7.next=J;return $}function OU(){return{controller:new sI,data:new Map,refCount:0}}function v6(_){_.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),_.refCount++}function w9(_){_.refCount--,0>_.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),_.refCount===0&&tI(oI,function(){_.controller.abort()})}function q4(_,J,$){if((_&127)!==0)0>P4&&(P4=c0(),K_=HQ(J),xZ=J,$!=null&&(hZ=m($)),(Z0&(o0|H5))!==G2&&(D0=!0,i3=F_),_=c9(),J=p9(),_!==T7||J!==X_?T7=-1.1:J!==null&&(i3=F_),r6=_,X_=J);else if((_&4194048)!==0&&0>P5&&(P5=c0(),H_=HQ(J),CB=J,$!=null&&(SB=m($)),0>J3)){if(_=c9(),J=p9(),_!==s3||J!==d6)s3=-1.1;a3=_,d6=J}}function AO(_){if(0>P4){P4=c0(),K_=_._debugTask!=null?_._debugTask:null,(Z0&(o0|H5))!==G2&&(i3=F_);var J=c9(),$=p9();J!==T7||$!==X_?T7=-1.1:$!==null&&(i3=F_),r6=J,X_=$}if(0>P5&&(P5=c0(),H_=_._debugTask!=null?_._debugTask:null,0>J3)){if(_=c9(),J=p9(),_!==s3||J!==d6)s3=-1.1;a3=_,d6=J}}function l4(){var _=l6;return l6=0,_}function Q$(_){var J=l6;return l6=_,J}function I9(_){var J=l6;return l6+=_,J}function q$(){u1=D1=-1.1}function _5(){var _=D1;return D1=-1.1,_}function J5(_){0<=_&&(D1=_)}function U4(){var _=S0;return S0=-0,_}function G4(_){0<=_&&(S0=_)}function Z4(){var _=P0;return P0=null,_}function F4(){var _=D0;return D0=!1,_}function wU(_){y2=c0(),0>_.actualStartTime&&(_.actualStartTime=y2)}function IU(_){if(0<=y2){var J=c0()-y2;_.actualDuration+=J,_.selfBaseDuration=J,y2=-1}}function jH(_){if(0<=y2){var J=c0()-y2;_.actualDuration+=J,y2=-1}}function K4(){if(0<=y2){var _=c0(),J=_-y2;y2=-1,l6+=J,S0+=J,u1=_}}function VH(_){P0===null&&(P0=[]),P0.push(_),_3===null&&(_3=[]),_3.push(_)}function X4(){y2=c0(),0>D1&&(D1=y2)}function f9(_){for(var J=_.child;J;)_.actualDuration+=J.actualDuration,J=J.sibling}function LO(_,J){if(W_===null){var $=W_=[];gZ=0,i6=DG(),R7={status:"pending",value:void 0,then:function(q){$.push(q)}}}return gZ++,J.then(kH,kH),J}function kH(){if(--gZ===0&&(-1<P5||(J3=-1.1),W_!==null)){R7!==null&&(R7.status="fulfilled");var _=W_;W_=null,i6=0,R7=null;for(var J=0;J<_.length;J++)(0,_[J])()}}function MO(_,J){var $=[],q={status:"pending",value:null,reason:null,then:function(G){$.push(G)}};return _.then(function(){q.status="fulfilled",q.value=J;for(var G=0;G<$.length;G++)(0,$[G])(J)},function(G){q.status="rejected",q.reason=G;for(G=0;G<$.length;G++)(0,$[G])(void 0)}),q}function fU(){var _=a6.current;return _!==null?_:M0.pooledCache}function U$(_,J){J===null?J1(a6,a6.current,_):J1(a6,J.pool,_)}function DH(){var _=fU();return _===null?null:{parent:p0._currentValue,pool:_}}function yH(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function vH(_){return _=_.status,_==="fulfilled"||_==="rejected"}function EH(_,J,$){Z1.actQueue!==null&&(Z1.didUsePromise=!0);var q=_.thenables;if($=q[$],$===void 0?q.push(J):$!==J&&(_.didWarnAboutUncachedPromise||(_.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),J.then(m4,m4),J=$),J._debugInfo===void 0){_=performance.now(),q=J.displayName;var G={name:typeof q==="string"?q:"Promise",start:_,end:_,value:J};J._debugInfo=[{awaited:G}],J.status!=="fulfilled"&&J.status!=="rejected"&&(_=function(){G.end=performance.now()},J.then(_,_))}switch(J.status){case"fulfilled":return J.value;case"rejected":throw _=J.reason,uH(_),_;default:if(typeof J.status==="string")J.then(m4,m4);else{if(_=M0,_!==null&&100<_.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");_=J,_.status="pending",_.then(function(F){if(J.status==="pending"){var Y=J;Y.status="fulfilled",Y.value=F}},function(F){if(J.status==="pending"){var Y=J;Y.status="rejected",Y.reason=F}})}switch(J.status){case"fulfilled":return J.value;case"rejected":throw _=J.reason,uH(_),_}throw t6=J,R_=!0,O7}}function C3(_){try{return Jf(_)}catch(J){if(J!==null&&typeof J==="object"&&typeof J.then==="function")throw t6=J,R_=!0,O7;throw J}}function bH(){if(t6===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var _=t6;return t6=null,R_=!1,_}function uH(_){if(_===O7||_===TQ)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function F2(_){var J=i1;return _!=null&&(i1=J===null?_:J.concat(_)),J}function PU(){var _=i1;if(_!=null){for(var J=_.length-1;0<=J;J--)if(_[J].name!=null){var $=_[J].debugTask;if($!=null)return $}}return null}function G$(_,J,$){for(var q=Object.keys(_.props),G=0;G<q.length;G++){var F=q[G];if(F!=="children"&&F!=="key"){J===null&&(J=nJ(_,$.mode,0),J._debugInfo=i1,J.return=$),W1(J,function(Y){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Y)},F);break}}}function Z$(_){var J=O_;return O_+=1,w7===null&&(w7=yH()),EH(w7,_,J)}function P9(_,J){J=J.props.ref,_.ref=J!==void 0?J:null}function xH(_,J){if(J.$$typeof===vw)throw Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
104
|
-
- Multiple copies of the "react" package is used.
|
|
105
|
-
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
106
|
-
- A compiler tries to "inline" JSX instead of using the runtime.`);throw _=Object.prototype.toString.call(J),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(J).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}function F$(_,J){var $=PU();$!==null?$.run(xH.bind(null,_,J)):xH(_,J)}function hH(_,J){var $=m(_)||"Component";aB[$]||(aB[$]=!0,J=J.displayName||J.name||"Component",_.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
107
|
-
root.render(%s)`,J,J,J):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
108
|
-
<%s>{%s}</%s>`,J,J,$,J,$))}function K$(_,J){var $=PU();$!==null?$.run(hH.bind(null,_,J)):hH(_,J)}function mH(_,J){var $=m(_)||"Component";sB[$]||(sB[$]=!0,J=String(J),_.tag===3?console.error(`Symbols are not valid as a React child.
|
|
109
|
-
root.render(%s)`,J):console.error(`Symbols are not valid as a React child.
|
|
110
|
-
<%s>%s</%s>`,$,J,$))}function X$(_,J){var $=PU();$!==null?$.run(mH.bind(null,_,J)):mH(_,J)}function gH(_){function J(c,r){if(_){var s=c.deletions;s===null?(c.deletions=[r],c.flags|=16):s.push(r)}}function $(c,r){if(!_)return null;for(;r!==null;)J(c,r),r=r.sibling;return null}function q(c){for(var r=new Map;c!==null;)c.key!==null?r.set(c.key,c):r.set(c.index,c),c=c.sibling;return r}function G(c,r){return c=g4(c,r),c.index=0,c.sibling=null,c}function F(c,r,s){if(c.index=s,!_)return c.flags|=1048576,r;if(s=c.alternate,s!==null)return s=s.index,s<r?(c.flags|=67108866,r):s;return c.flags|=67108866,r}function Y(c){return _&&c.alternate===null&&(c.flags|=67108866),c}function A(c,r,s,H1){if(r===null||r.tag!==6)return r=WU(s,c.mode,H1),r.return=c,r._debugOwner=c,r._debugTask=c._debugTask,r._debugInfo=i1,r;return r=G(r,s),r.return=c,r._debugInfo=i1,r}function w(c,r,s,H1){var O1=s.type;if(O1===$7)return r=t(c,r,s.props.children,H1,s.key),G$(s,r,c),r;if(r!==null&&(r.elementType===O1||LH(r,s)||typeof O1==="object"&&O1!==null&&O1.$$typeof===U5&&C3(O1)===r.type))return r=G(r,s.props),P9(r,s),r.return=c,r._debugOwner=s._owner,r._debugInfo=i1,r;return r=nJ(s,c.mode,H1),P9(r,s),r.return=c,r._debugInfo=i1,r}function N(c,r,s,H1){if(r===null||r.tag!==4||r.stateNode.containerInfo!==s.containerInfo||r.stateNode.implementation!==s.implementation)return r=zU(s,c.mode,H1),r.return=c,r._debugInfo=i1,r;return r=G(r,s.children||[]),r.return=c,r._debugInfo=i1,r}function t(c,r,s,H1,O1){if(r===null||r.tag!==7)return r=V6(s,c.mode,H1,O1),r.return=c,r._debugOwner=c,r._debugTask=c._debugTask,r._debugInfo=i1,r;return r=G(r,s),r.return=c,r._debugInfo=i1,r}function o(c,r,s){if(typeof r==="string"&&r!==""||typeof r==="number"||typeof r==="bigint")return r=WU(""+r,c.mode,s),r.return=c,r._debugOwner=c,r._debugTask=c._debugTask,r._debugInfo=i1,r;if(typeof r==="object"&&r!==null){switch(r.$$typeof){case L4:return s=nJ(r,c.mode,s),P9(s,r),s.return=c,c=F2(r._debugInfo),s._debugInfo=i1,i1=c,s;case J7:return r=zU(r,c.mode,s),r.return=c,r._debugInfo=i1,r;case U5:var H1=F2(r._debugInfo);return r=C3(r),c=o(c,r,s),i1=H1,c}if(s0(r)||E(r))return s=V6(r,c.mode,s,null),s.return=c,s._debugOwner=c,s._debugTask=c._debugTask,c=F2(r._debugInfo),s._debugInfo=i1,i1=c,s;if(typeof r.then==="function")return H1=F2(r._debugInfo),c=o(c,Z$(r),s),i1=H1,c;if(r.$$typeof===M4)return o(c,$$(c,r),s);F$(c,r)}return typeof r==="function"&&K$(c,r),typeof r==="symbol"&&X$(c,r),null}function l(c,r,s,H1){var O1=r!==null?r.key:null;if(typeof s==="string"&&s!==""||typeof s==="number"||typeof s==="bigint")return O1!==null?null:A(c,r,""+s,H1);if(typeof s==="object"&&s!==null){switch(s.$$typeof){case L4:return s.key===O1?(O1=F2(s._debugInfo),c=w(c,r,s,H1),i1=O1,c):null;case J7:return s.key===O1?N(c,r,s,H1):null;case U5:return O1=F2(s._debugInfo),s=C3(s),c=l(c,r,s,H1),i1=O1,c}if(s0(s)||E(s)){if(O1!==null)return null;return O1=F2(s._debugInfo),c=t(c,r,s,H1,null),i1=O1,c}if(typeof s.then==="function")return O1=F2(s._debugInfo),c=l(c,r,Z$(s),H1),i1=O1,c;if(s.$$typeof===M4)return l(c,r,$$(c,s),H1);F$(c,s)}return typeof s==="function"&&K$(c,s),typeof s==="symbol"&&X$(c,s),null}function U1(c,r,s,H1,O1){if(typeof H1==="string"&&H1!==""||typeof H1==="number"||typeof H1==="bigint")return c=c.get(s)||null,A(r,c,""+H1,O1);if(typeof H1==="object"&&H1!==null){switch(H1.$$typeof){case L4:return s=c.get(H1.key===null?s:H1.key)||null,c=F2(H1._debugInfo),r=w(r,s,H1,O1),i1=c,r;case J7:return c=c.get(H1.key===null?s:H1.key)||null,N(r,c,H1,O1);case U5:var p1=F2(H1._debugInfo);return H1=C3(H1),r=U1(c,r,s,H1,O1),i1=p1,r}if(s0(H1)||E(H1))return s=c.get(s)||null,c=F2(H1._debugInfo),r=t(r,s,H1,O1,null),i1=c,r;if(typeof H1.then==="function")return p1=F2(H1._debugInfo),r=U1(c,r,s,Z$(H1),O1),i1=p1,r;if(H1.$$typeof===M4)return U1(c,r,s,$$(r,H1),O1);F$(r,H1)}return typeof H1==="function"&&K$(r,H1),typeof H1==="symbol"&&X$(r,H1),null}function T1(c,r,s,H1){if(typeof s!=="object"||s===null)return H1;switch(s.$$typeof){case L4:case J7:R(c,r,s);var O1=s.key;if(typeof O1!=="string")break;if(H1===null){H1=new Set,H1.add(O1);break}if(!H1.has(O1)){H1.add(O1);break}W1(r,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",O1)});break;case U5:s=C3(s),T1(c,r,s,H1)}return H1}function w1(c,r,s,H1){for(var O1=null,p1=null,k1=null,N1=r,r1=r=0,I0=null;N1!==null&&r1<s.length;r1++){N1.index>r1?(I0=N1,N1=null):I0=N1.sibling;var g0=l(c,N1,s[r1],H1);if(g0===null){N1===null&&(N1=I0);break}O1=T1(c,g0,s[r1],O1),_&&N1&&g0.alternate===null&&J(c,N1),r=F(g0,r,r1),k1===null?p1=g0:k1.sibling=g0,k1=g0,N1=I0}if(r1===s.length)return $(c,N1),J0&&p4(c,r1),p1;if(N1===null){for(;r1<s.length;r1++)N1=o(c,s[r1],H1),N1!==null&&(O1=T1(c,N1,s[r1],O1),r=F(N1,r,r1),k1===null?p1=N1:k1.sibling=N1,k1=N1);return J0&&p4(c,r1),p1}for(N1=q(N1);r1<s.length;r1++)I0=U1(N1,c,r1,s[r1],H1),I0!==null&&(O1=T1(c,I0,s[r1],O1),_&&I0.alternate!==null&&N1.delete(I0.key===null?r1:I0.key),r=F(I0,r,r1),k1===null?p1=I0:k1.sibling=I0,k1=I0);return _&&N1.forEach(function(X3){return J(c,X3)}),J0&&p4(c,r1),p1}function R0(c,r,s,H1){if(s==null)throw Error("An iterable object provided no iterator.");for(var O1=null,p1=null,k1=r,N1=r=0,r1=null,I0=null,g0=s.next();k1!==null&&!g0.done;N1++,g0=s.next()){k1.index>N1?(r1=k1,k1=null):r1=k1.sibling;var X3=l(c,k1,g0.value,H1);if(X3===null){k1===null&&(k1=r1);break}I0=T1(c,X3,g0.value,I0),_&&k1&&X3.alternate===null&&J(c,k1),r=F(X3,r,N1),p1===null?O1=X3:p1.sibling=X3,p1=X3,k1=r1}if(g0.done)return $(c,k1),J0&&p4(c,N1),O1;if(k1===null){for(;!g0.done;N1++,g0=s.next())k1=o(c,g0.value,H1),k1!==null&&(I0=T1(c,k1,g0.value,I0),r=F(k1,r,N1),p1===null?O1=k1:p1.sibling=k1,p1=k1);return J0&&p4(c,N1),O1}for(k1=q(k1);!g0.done;N1++,g0=s.next())r1=U1(k1,c,N1,g0.value,H1),r1!==null&&(I0=T1(c,r1,g0.value,I0),_&&r1.alternate!==null&&k1.delete(r1.key===null?N1:r1.key),r=F(r1,r,N1),p1===null?O1=r1:p1.sibling=r1,p1=r1);return _&&k1.forEach(function(Pf){return J(c,Pf)}),J0&&p4(c,N1),O1}function Q0(c,r,s,H1){if(typeof s==="object"&&s!==null&&s.type===$7&&s.key===null&&(G$(s,null,c),s=s.props.children),typeof s==="object"&&s!==null){switch(s.$$typeof){case L4:var O1=F2(s._debugInfo);_:{for(var p1=s.key;r!==null;){if(r.key===p1){if(p1=s.type,p1===$7){if(r.tag===7){$(c,r.sibling),H1=G(r,s.props.children),H1.return=c,H1._debugOwner=s._owner,H1._debugInfo=i1,G$(s,H1,c),c=H1;break _}}else if(r.elementType===p1||LH(r,s)||typeof p1==="object"&&p1!==null&&p1.$$typeof===U5&&C3(p1)===r.type){$(c,r.sibling),H1=G(r,s.props),P9(H1,s),H1.return=c,H1._debugOwner=s._owner,H1._debugInfo=i1,c=H1;break _}$(c,r);break}else J(c,r);r=r.sibling}s.type===$7?(H1=V6(s.props.children,c.mode,H1,s.key),H1.return=c,H1._debugOwner=c,H1._debugTask=c._debugTask,H1._debugInfo=i1,G$(s,H1,c),c=H1):(H1=nJ(s,c.mode,H1),P9(H1,s),H1.return=c,H1._debugInfo=i1,c=H1)}return c=Y(c),i1=O1,c;case J7:_:{O1=s;for(s=O1.key;r!==null;){if(r.key===s)if(r.tag===4&&r.stateNode.containerInfo===O1.containerInfo&&r.stateNode.implementation===O1.implementation){$(c,r.sibling),H1=G(r,O1.children||[]),H1.return=c,c=H1;break _}else{$(c,r);break}else J(c,r);r=r.sibling}H1=zU(O1,c.mode,H1),H1.return=c,c=H1}return Y(c);case U5:return O1=F2(s._debugInfo),s=C3(s),c=Q0(c,r,s,H1),i1=O1,c}if(s0(s))return O1=F2(s._debugInfo),c=w1(c,r,s,H1),i1=O1,c;if(E(s)){if(O1=F2(s._debugInfo),p1=E(s),typeof p1!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var k1=p1.call(s);if(k1===s){if(c.tag!==0||Object.prototype.toString.call(c.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(k1)!=="[object Generator]")dB||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),dB=!0}else s.entries!==p1||rZ||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),rZ=!0);return c=R0(c,r,k1,H1),i1=O1,c}if(typeof s.then==="function")return O1=F2(s._debugInfo),c=Q0(c,r,Z$(s),H1),i1=O1,c;if(s.$$typeof===M4)return Q0(c,r,$$(c,s),H1);F$(c,s)}if(typeof s==="string"&&s!==""||typeof s==="number"||typeof s==="bigint")return O1=""+s,r!==null&&r.tag===6?($(c,r.sibling),H1=G(r,O1),H1.return=c,c=H1):($(c,r),H1=WU(O1,c.mode,H1),H1.return=c,H1._debugOwner=c,H1._debugTask=c._debugTask,H1._debugInfo=i1,c=H1),Y(c);return typeof s==="function"&&K$(c,s),typeof s==="symbol"&&X$(c,s),$(c,r)}return function(c,r,s,H1){var O1=i1;i1=null;try{O_=0;var p1=Q0(c,r,s,H1);return w7=null,p1}catch(I0){if(I0===O7||I0===TQ)throw I0;var k1=M(29,I0,null,c.mode);k1.lanes=H1,k1.return=c;var N1=k1._debugInfo=i1;if(k1._debugOwner=c._debugOwner,k1._debugTask=c._debugTask,N1!=null){for(var r1=N1.length-1;0<=r1;r1--)if(typeof N1[r1].stack==="string"){k1._debugOwner=N1[r1],k1._debugTask=N1[r1].debugTask;break}}return k1}finally{i1=O1}}}function pH(_,J){var $=s0(_);return _=!$&&typeof E(_)==="function",$||_?($=$?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",$,J,$),!1):!0}function NU(_){_.updateQueue={baseState:_.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function CU(_,J){_=_.updateQueue,J.updateQueue===_&&(J.updateQueue={baseState:_.baseState,firstBaseUpdate:_.firstBaseUpdate,lastBaseUpdate:_.lastBaseUpdate,shared:_.shared,callbacks:null})}function S3(_){return{lane:_,tag:oB,payload:null,callback:null,next:null}}function j3(_,J,$){var q=_.updateQueue;if(q===null)return null;if(q=q.shared,iZ===q&&!_A){var G=m(_);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
111
|
-
|
|
112
|
-
Please update the following component: %s`,G),_A=!0}if((Z0&o0)!==G2)return G=q.pending,G===null?J.next=J:(J.next=G.next,G.next=J),q.pending=J,J=oJ(_),AH(_,null,$),J;return tJ(_,q,J,$),oJ(_)}function N9(_,J,$){if(J=J.updateQueue,J!==null&&(J=J.shared,($&4194048)!==0)){var q=J.lanes;q&=_.pendingLanes,$|=q,J.lanes=$,b4(_,$)}}function H$(_,J){var{updateQueue:$,alternate:q}=_;if(q!==null&&(q=q.updateQueue,$===q)){var G=null,F=null;if($=$.firstBaseUpdate,$!==null){do{var Y={lane:$.lane,tag:$.tag,payload:$.payload,callback:null,next:null};F===null?G=F=Y:F=F.next=Y,$=$.next}while($!==null);F===null?G=F=J:F=F.next=J}else G=F=J;$={baseState:q.baseState,firstBaseUpdate:G,lastBaseUpdate:F,shared:q.shared,callbacks:q.callbacks},_.updateQueue=$;return}_=$.lastBaseUpdate,_===null?$.firstBaseUpdate=J:_.next=J,$.lastBaseUpdate=J}function C9(){if(aZ){var _=R7;if(_!==null)throw _}}function S9(_,J,$,q){aZ=!1;var G=_.updateQueue;t3=!1,iZ=G.shared;var{firstBaseUpdate:F,lastBaseUpdate:Y}=G,A=G.shared.pending;if(A!==null){G.shared.pending=null;var w=A,N=w.next;w.next=null,Y===null?F=N:Y.next=N,Y=w;var t=_.alternate;t!==null&&(t=t.updateQueue,A=t.lastBaseUpdate,A!==Y&&(A===null?t.firstBaseUpdate=N:A.next=N,t.lastBaseUpdate=w))}if(F!==null){var o=G.baseState;Y=0,t=N=w=null,A=F;do{var l=A.lane&-536870913,U1=l!==A.lane;if(U1?(a1&l)===l:(q&l)===l){l!==0&&l===i6&&(aZ=!0),t!==null&&(t=t.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});_:{l=_;var T1=A,w1=J,R0=$;switch(T1.tag){case nB:if(T1=T1.payload,typeof T1==="function"){M7=!0;var Q0=T1.call(R0,o,w1);if(l.mode&R2){_0(!0);try{T1.call(R0,o,w1)}finally{_0(!1)}}M7=!1,o=Q0;break _}o=T1;break _;case dZ:l.flags=l.flags&-65537|128;case oB:if(Q0=T1.payload,typeof Q0==="function"){if(M7=!0,T1=Q0.call(R0,o,w1),l.mode&R2){_0(!0);try{Q0.call(R0,o,w1)}finally{_0(!1)}}M7=!1}else T1=Q0;if(T1===null||T1===void 0)break _;o=o1({},o,T1);break _;case eB:t3=!0}}l=A.callback,l!==null&&(_.flags|=64,U1&&(_.flags|=8192),U1=G.callbacks,U1===null?G.callbacks=[l]:U1.push(l))}else U1={lane:l,tag:A.tag,payload:A.payload,callback:A.callback,next:null},t===null?(N=t=U1,w=o):t=t.next=U1,Y|=l;if(A=A.next,A===null)if(A=G.shared.pending,A===null)break;else U1=A,A=U1.next,U1.next=null,G.lastBaseUpdate=U1,G.shared.pending=null}while(1);t===null&&(w=o),G.baseState=w,G.firstBaseUpdate=N,G.lastBaseUpdate=t,F===null&&(G.shared.lanes=0),e3|=Y,_.lanes=Y,_.memoizedState=o}iZ=null}function cH(_,J){if(typeof _!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+_);_.call(J)}function TO(_,J){var $=_.shared.hiddenCallbacks;if($!==null)for(_.shared.hiddenCallbacks=null,_=0;_<$.length;_++)cH($[_],J)}function lH(_,J){var $=_.callbacks;if($!==null)for(_.callbacks=null,_=0;_<$.length;_++)cH($[_],J)}function rH(_,J){var $=S4;J1(OQ,$,_),J1(I7,J,_),S4=$|J.baseLanes}function SU(_){J1(OQ,S4,_),J1(I7,I7.current,_)}function jU(_){S4=OQ.current,$1(I7,_),$1(OQ,_)}function V3(_){var J=_.alternate;J1(m0,m0.current&f7,_),J1(K5,_,_),N5===null&&(J===null||I7.current!==null?N5=_:J.memoizedState!==null&&(N5=_))}function VU(_){J1(m0,m0.current,_),J1(K5,_,_),N5===null&&(N5=_)}function dH(_){_.tag===22?(J1(m0,m0.current,_),J1(K5,_,_),N5===null&&(N5=_)):k3(_)}function k3(_){J1(m0,m0.current,_),J1(K5,K5.current,_)}function $5(_){$1(K5,_),N5===_&&(N5=null),$1(m0,_)}function Y$(_){for(var J=_;J!==null;){if(J.tag===13){var $=J.memoizedState;if($!==null&&($=$.dehydrated,$===null||cG($)||lG($)))return J}else if(J.tag===19&&(J.memoizedProps.revealOrder==="forwards"||J.memoizedProps.revealOrder==="backwards"||J.memoizedProps.revealOrder==="unstable_legacy-backwards"||J.memoizedProps.revealOrder==="together")){if((J.flags&128)!==0)return J}else if(J.child!==null){J.child.return=J,J=J.child;continue}if(J===_)break;for(;J.sibling===null;){if(J.return===null||J.return===_)return null;J=J.return}J.sibling.return=J.return,J=J.sibling}return null}function t1(){var _=G1;S5===null?S5=[_]:S5.push(_)}function z1(){var _=G1;if(S5!==null&&(U3++,S5[U3]!==_)){var J=m(g1);if(!JA.has(J)&&(JA.add(J),S5!==null)){for(var $="",q=0;q<=U3;q++){var G=S5[q],F=q===U3?_:G;for(G=q+1+". "+G;30>G.length;)G+=" ";G+=F+`
|
|
113
|
-
`,$+=G}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
|
|
114
|
-
|
|
115
|
-
Previous render Next render
|
|
116
|
-
------------------------------------------------------
|
|
117
|
-
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
118
|
-
`,J,$)}}}function p8(_){_===void 0||_===null||s0(_)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",G1,typeof _)}function W$(){var _=m(g1);QA.has(_)||(QA.add(_),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",_))}function E0(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
119
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
120
|
-
2. You might be breaking the Rules of Hooks
|
|
121
|
-
3. You might have more than one copy of React in the same app
|
|
122
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function kU(_,J){if(f_)return!1;if(J===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",G1),!1;_.length!==J.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
123
|
-
|
|
124
|
-
Previous: %s
|
|
125
|
-
Incoming: %s`,G1,"["+J.join(", ")+"]","["+_.join(", ")+"]");for(var $=0;$<J.length&&$<_.length;$++)if(!D2(_[$],J[$]))return!1;return!0}function DU(_,J,$,q,G,F){if(Q3=F,g1=J,S5=_!==null?_._debugHookTypes:null,U3=-1,f_=_!==null&&_.type!==J.type,Object.prototype.toString.call($)==="[object AsyncFunction]"||Object.prototype.toString.call($)==="[object AsyncGeneratorFunction]")F=m(g1),sZ.has(F)||(sZ.add(F),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",F===null?"An unknown Component":"<"+F+">"));J.memoizedState=null,J.updateQueue=null,J.lanes=0,Z1.H=_!==null&&_.memoizedState!==null?oZ:S5!==null?qA:tZ,n6=F=(J.mode&R2)!==x1;var Y=pZ($,q,G);if(n6=!1,N7&&(Y=yU(J,$,q,G)),F){_0(!0);try{Y=yU(J,$,q,G)}finally{_0(!1)}}return iH(_,J),Y}function iH(_,J){J._debugHookTypes=S5,J.dependencies===null?q3!==null&&(J.dependencies={lanes:0,firstContext:null,_debugThenableState:q3}):J.dependencies._debugThenableState=q3,Z1.H=P_;var $=L0!==null&&L0.next!==null;if(Q3=0,S5=G1=l0=L0=g1=null,U3=-1,_!==null&&(_.flags&65011712)!==(J.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),IQ=!1,I_=0,q3=null,$)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");_===null||r0||(_=_.dependencies,_!==null&&J$(_)&&(r0=!0)),R_?(R_=!1,_=!0):_=!1,_&&(J=m(J)||"Unknown",$A.has(J)||sZ.has(J)||($A.add(J),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function yU(_,J,$,q){g1=_;var G=0;do{if(N7&&(q3=null),I_=0,N7=!1,G>=Qf)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(G+=1,f_=!1,l0=L0=null,_.updateQueue!=null){var F=_.updateQueue;F.lastEffect=null,F.events=null,F.stores=null,F.memoCache!=null&&(F.memoCache.index=0)}U3=-1,Z1.H=UA,F=pZ(J,$,q)}while(N7);return F}function RO(){var _=Z1.H,J=_.useState()[0];return J=typeof J.then==="function"?j9(J):J,_=_.useState()[0],(L0!==null?L0.memoizedState:null)!==_&&(g1.flags|=1024),J}function vU(){var _=fQ!==0;return fQ=0,_}function EU(_,J,$){J.updateQueue=_.updateQueue,J.flags=(J.mode&g5)!==x1?J.flags&-402655237:J.flags&-2053,_.lanes&=~$}function bU(_){if(IQ){for(_=_.memoizedState;_!==null;){var J=_.queue;J!==null&&(J.pending=null),_=_.next}IQ=!1}Q3=0,S5=l0=L0=g1=null,U3=-1,G1=null,N7=!1,I_=fQ=0,q3=null}function S2(){var _={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return l0===null?g1.memoizedState=l0=_:l0=l0.next=_,l0}function W0(){if(L0===null){var _=g1.alternate;_=_!==null?_.memoizedState:null}else _=L0.next;var J=l0===null?g1.memoizedState:l0.next;if(J!==null)l0=J,L0=_;else{if(_===null){if(g1.alternate===null)throw Error("Update hook called on initial render. This is likely a bug in React. Please file an issue.");throw Error("Rendered more hooks than during the previous render.")}L0=_,_={memoizedState:L0.memoizedState,baseState:L0.baseState,baseQueue:L0.baseQueue,queue:L0.queue,next:null},l0===null?g1.memoizedState=l0=_:l0=l0.next=_}return l0}function z$(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function j9(_){var J=I_;return I_+=1,q3===null&&(q3=yH()),_=EH(q3,_,J),J=g1,(l0===null?J.memoizedState:l0.next)===null&&(J=J.alternate,Z1.H=J!==null&&J.memoizedState!==null?oZ:tZ),_}function D3(_){if(_!==null&&typeof _==="object"){if(typeof _.then==="function")return j9(_);if(_.$$typeof===M4)return f0(_)}throw Error("An unsupported type was passed to use(): "+String(_))}function E6(_){var J=null,$=g1.updateQueue;if($!==null&&(J=$.memoCache),J==null){var q=g1.alternate;q!==null&&(q=q.updateQueue,q!==null&&(q=q.memoCache,q!=null&&(J={data:q.data.map(function(G){return G.slice()}),index:0})))}if(J==null&&(J={data:[],index:0}),$===null&&($=z$(),g1.updateQueue=$),$.memoCache=J,$=J.data[J.index],$===void 0||f_)for($=J.data[J.index]=Array(_),q=0;q<_;q++)$[q]=Ew;else $.length!==_&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",$.length,_);return J.index++,$}function u5(_,J){return typeof J==="function"?J(_):J}function uU(_,J,$){var q=S2();if($!==void 0){var G=$(J);if(n6){_0(!0);try{$(J)}finally{_0(!1)}}}else G=J;return q.memoizedState=q.baseState=G,_={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_,lastRenderedState:G},q.queue=_,_=_.dispatch=PO.bind(null,g1,_),[q.memoizedState,_]}function c8(_){var J=W0();return xU(J,L0,_)}function xU(_,J,$){var q=_.queue;if(q===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");q.lastRenderedReducer=$;var G=_.baseQueue,F=q.pending;if(F!==null){if(G!==null){var Y=G.next;G.next=F.next,F.next=Y}J.baseQueue!==G&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),J.baseQueue=G=F,q.pending=null}if(F=_.baseState,G===null)_.memoizedState=F;else{J=G.next;var A=Y=null,w=null,N=J,t=!1;do{var o=N.lane&-536870913;if(o!==N.lane?(a1&o)===o:(Q3&o)===o){var l=N.revertLane;if(l===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),o===i6&&(t=!0);else if((Q3&l)===l){N=N.next,l===i6&&(t=!0);continue}else o={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},w===null?(A=w=o,Y=F):w=w.next=o,g1.lanes|=l,e3|=l;o=N.action,n6&&$(F,o),F=N.hasEagerState?N.eagerState:$(F,o)}else l={lane:o,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},w===null?(A=w=l,Y=F):w=w.next=l,g1.lanes|=o,e3|=o;N=N.next}while(N!==null&&N!==J);if(w===null?Y=F:w.next=A,!D2(F,_.memoizedState)&&(r0=!0,t&&($=R7,$!==null)))throw $;_.memoizedState=F,_.baseState=Y,_.baseQueue=w,q.lastRenderedState=F}return G===null&&(q.lanes=0),[_.memoizedState,q.dispatch]}function V9(_){var J=W0(),$=J.queue;if($===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");$.lastRenderedReducer=_;var{dispatch:q,pending:G}=$,F=J.memoizedState;if(G!==null){$.pending=null;var Y=G=G.next;do F=_(F,Y.action),Y=Y.next;while(Y!==G);D2(F,J.memoizedState)||(r0=!0),J.memoizedState=F,J.baseQueue===null&&(J.baseState=F),$.lastRenderedState=F}return[F,q]}function hU(_,J,$){var q=g1,G=S2();if(J0){if($===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var F=$();P7||F===$()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),P7=!0)}else{if(F=J(),P7||($=J(),D2(F,$)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),P7=!0)),M0===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(a1&127)!==0||aH(q,J,F)}return G.memoizedState=F,$={value:F,getSnapshot:J},G.queue=$,M$(tH.bind(null,q,$,_),[_]),q.flags|=2048,r8(C5|E2,{destroy:void 0},sH.bind(null,q,$,F,J),null),F}function B$(_,J,$){var q=g1,G=W0(),F=J0;if(F){if($===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");$=$()}else if($=J(),!P7){var Y=J();D2($,Y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),P7=!0)}if(Y=!D2((L0||G).memoizedState,$))G.memoizedState=$,r0=!0;G=G.queue;var A=tH.bind(null,q,G,_);if(c2(2048,E2,A,[_]),G.getSnapshot!==J||Y||l0!==null&&l0.memoizedState.tag&C5){if(q.flags|=2048,r8(C5|E2,{destroy:void 0},sH.bind(null,q,G,$,J),null),M0===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");F||(Q3&127)!==0||aH(q,J,$)}return $}function aH(_,J,$){_.flags|=16384,_={getSnapshot:J,value:$},J=g1.updateQueue,J===null?(J=z$(),g1.updateQueue=J,J.stores=[_]):($=J.stores,$===null?J.stores=[_]:$.push(_))}function sH(_,J,$,q){J.value=$,J.getSnapshot=q,oH(J)&&nH(_)}function tH(_,J,$){return $(function(){oH(J)&&(q4(2,"updateSyncExternalStore()",_),nH(_))})}function oH(_){var J=_.getSnapshot;_=_.value;try{var $=J();return!D2(_,$)}catch(q){return!0}}function nH(_){var J=M2(_,2);J!==null&&k0(J,_,2)}function mU(_){var J=S2();if(typeof _==="function"){var $=_;if(_=$(),n6){_0(!0);try{$()}finally{_0(!1)}}}return J.memoizedState=J.baseState=_,J.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u5,lastRenderedState:_},J}function gU(_){_=mU(_);var J=_.queue,$=LY.bind(null,g1,J);return J.dispatch=$,[_.memoizedState,$]}function pU(_){var J=S2();J.memoizedState=J.baseState=_;var $={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return J.queue=$,J=$G.bind(null,g1,!0,$),$.dispatch=J,[_,J]}function eH(_,J){var $=W0();return _Y($,L0,_,J)}function _Y(_,J,$,q){return _.baseState=$,xU(_,L0,typeof q==="function"?q:u5)}function JY(_,J){var $=W0();if(L0!==null)return _Y($,L0,_,J);return $.baseState=_,[_,$.queue.dispatch]}function OO(_,J,$,q,G){if(f$(_))throw Error("Cannot update form state while rendering.");if(_=J.action,_!==null){var F={payload:G,action:_,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Y){F.listeners.push(Y)}};Z1.T!==null?$(!0):F.isTransition=!1,q(F),$=J.pending,$===null?(F.next=J.pending=F,$Y(J,F)):(F.next=$.next,J.pending=$.next=F)}}function $Y(_,J){var{action:$,payload:q}=J,G=_.state;if(J.isTransition){var F=Z1.T,Y={};Y._updatedFibers=new Set,Z1.T=Y;try{var A=$(G,q),w=Z1.S;w!==null&&w(Y,A),QY(_,J,A)}catch(N){cU(_,J,N)}finally{F!==null&&Y.types!==null&&(F.types!==null&&F.types!==Y.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),F.types=Y.types),Z1.T=F,F===null&&Y._updatedFibers&&(_=Y._updatedFibers.size,Y._updatedFibers.clear(),10<_&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{Y=$(G,q),QY(_,J,Y)}catch(N){cU(_,J,N)}}function QY(_,J,$){$!==null&&typeof $==="object"&&typeof $.then==="function"?(Z1.asyncTransitions++,$.then(I$,I$),$.then(function(q){qY(_,J,q)},function(q){return cU(_,J,q)}),J.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):qY(_,J,$)}function qY(_,J,$){J.status="fulfilled",J.value=$,UY(J),_.state=$,J=_.pending,J!==null&&($=J.next,$===J?_.pending=null:($=$.next,J.next=$,$Y(_,$)))}function cU(_,J,$){var q=_.pending;if(_.pending=null,q!==null){q=q.next;do J.status="rejected",J.reason=$,UY(J),J=J.next;while(J!==q)}_.action=null}function UY(_){_=_.listeners;for(var J=0;J<_.length;J++)(0,_[J])()}function GY(_,J){return J}function l8(_,J){if(J0){var $=M0.formState;if($!==null){_:{var q=g1;if(J0){if(w0){J:{var G=w0;for(var F=f5;G.nodeType!==8;){if(!F){G=null;break J}if(G=q5(G.nextSibling),G===null){G=null;break J}}F=G.data,G=F===RF||F===lA?G:null}if(G){w0=q5(G.nextSibling),q=G.data===RF;break _}}P3(q)}q=!1}q&&(J=$[0])}}return $=S2(),$.memoizedState=$.baseState=J,q={pending:null,lanes:0,dispatch:null,lastRenderedReducer:GY,lastRenderedState:J},$.queue=q,$=LY.bind(null,g1,q),q.dispatch=$,q=mU(!1),F=$G.bind(null,g1,!1,q.queue),q=S2(),G={state:J,dispatch:null,action:_,pending:null},q.queue=G,$=OO.bind(null,g1,G,F,$),G.dispatch=$,q.memoizedState=_,[J,$,!1]}function A$(_){var J=W0();return ZY(J,L0,_)}function ZY(_,J,$){if(J=xU(_,J,GY)[0],_=c8(u5)[0],typeof J==="object"&&J!==null&&typeof J.then==="function")try{var q=j9(J)}catch(Y){if(Y===O7)throw TQ;throw Y}else q=J;J=W0();var G=J.queue,F=G.dispatch;return $!==J.memoizedState&&(g1.flags|=2048,r8(C5|E2,{destroy:void 0},wO.bind(null,G,$),null)),[q,F,_]}function wO(_,J){_.action=J}function L$(_){var J=W0(),$=L0;if($!==null)return ZY(J,$,_);W0(),J=J.memoizedState,$=W0();var q=$.queue.dispatch;return $.memoizedState=_,[J,q,!1]}function r8(_,J,$,q){return _={tag:_,create:$,deps:q,inst:J,next:null},J=g1.updateQueue,J===null&&(J=z$(),g1.updateQueue=J),$=J.lastEffect,$===null?J.lastEffect=_.next=_:(q=$.next,$.next=_,_.next=q,J.lastEffect=_),_}function lU(_){var J=S2();return _={current:_},J.memoizedState=_}function b6(_,J,$,q){var G=S2();g1.flags|=_,G.memoizedState=r8(C5|J,{destroy:void 0},$,q===void 0?null:q)}function c2(_,J,$,q){var G=W0();q=q===void 0?null:q;var F=G.memoizedState.inst;L0!==null&&q!==null&&kU(q,L0.memoizedState.deps)?G.memoizedState=r8(J,F,$,q):(g1.flags|=_,G.memoizedState=r8(C5|J,F,$,q))}function M$(_,J){(g1.mode&g5)!==x1?b6(276826112,E2,_,J):b6(8390656,E2,_,J)}function IO(_){g1.flags|=4;var J=g1.updateQueue;if(J===null)J=z$(),g1.updateQueue=J,J.events=[_];else{var $=J.events;$===null?J.events=[_]:$.push(_)}}function rU(_){var J=S2(),$={impl:_};return J.memoizedState=$,function(){if((Z0&o0)!==G2)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return $.impl.apply(void 0,arguments)}}function T$(_){var J=W0().memoizedState;return IO({ref:J,nextImpl:_}),function(){if((Z0&o0)!==G2)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return J.impl.apply(void 0,arguments)}}function dU(_,J){var $=4194308;return(g1.mode&g5)!==x1&&($|=134217728),b6($,X5,_,J)}function FY(_,J){if(typeof J==="function"){_=_();var $=J(_);return function(){typeof $==="function"?$():J(null)}}if(J!==null&&J!==void 0)return J.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(J).join(", ")+"}"),_=_(),J.current=_,function(){J.current=null}}function iU(_,J,$){typeof J!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",J!==null?typeof J:"null"),$=$!==null&&$!==void 0?$.concat([_]):null;var q=4194308;(g1.mode&g5)!==x1&&(q|=134217728),b6(q,X5,FY.bind(null,J,_),$)}function R$(_,J,$){typeof J!=="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",J!==null?typeof J:"null"),$=$!==null&&$!==void 0?$.concat([_]):null,c2(4,X5,FY.bind(null,J,_),$)}function aU(_,J){return S2().memoizedState=[_,J===void 0?null:J],_}function O$(_,J){var $=W0();J=J===void 0?null:J;var q=$.memoizedState;if(J!==null&&kU(J,q[1]))return q[0];return $.memoizedState=[_,J],_}function sU(_,J){var $=S2();J=J===void 0?null:J;var q=_();if(n6){_0(!0);try{_()}finally{_0(!1)}}return $.memoizedState=[q,J],q}function w$(_,J){var $=W0();J=J===void 0?null:J;var q=$.memoizedState;if(J!==null&&kU(J,q[1]))return q[0];if(q=_(),n6){_0(!0);try{_()}finally{_0(!1)}}return $.memoizedState=[q,J],q}function tU(_,J){var $=S2();return oU($,_,J)}function KY(_,J){var $=W0();return HY($,L0.memoizedState,_,J)}function XY(_,J){var $=W0();return L0===null?oU($,_,J):HY($,L0.memoizedState,_,J)}function oU(_,J,$){if($===void 0||(Q3&1073741824)!==0&&(a1&261930)===0)return _.memoizedState=J;return _.memoizedState=$,_=YW(),g1.lanes|=_,e3|=_,$}function HY(_,J,$,q){if(D2($,J))return $;if(I7.current!==null)return _=oU(_,$,q),D2(_,J)||(r0=!0),_;if((Q3&42)===0||(Q3&1073741824)!==0&&(a1&261930)===0)return r0=!0,_.memoizedState=$;return _=YW(),g1.lanes|=_,e3|=_,J}function I$(){Z1.asyncTransitions--}function YY(_,J,$,q,G){var F=Y0.p;Y0.p=F!==0&&F<m5?F:m5;var Y=Z1.T,A={};A._updatedFibers=new Set,Z1.T=A,$G(_,!1,J,$);try{var w=G(),N=Z1.S;if(N!==null&&N(A,w),w!==null&&typeof w==="object"&&typeof w.then==="function"){Z1.asyncTransitions++,w.then(I$,I$);var t=MO(w,q);k9(_,J,t,Q5(_))}else k9(_,J,q,Q5(_))}catch(o){k9(_,J,{then:function(){},status:"rejected",reason:o},Q5(_))}finally{Y0.p=F,Y!==null&&A.types!==null&&(Y.types!==null&&Y.types!==A.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),Y.types=A.types),Z1.T=Y,Y===null&&A._updatedFibers&&(_=A._updatedFibers.size,A._updatedFibers.clear(),10<_&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function nU(_,J,$,q){if(_.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var G=WY(_).queue;AO(_),YY(_,G,J,K8,$===null?T:function(){return zY(_),$(q)})}function WY(_){var J=_.memoizedState;if(J!==null)return J;J={memoizedState:K8,baseState:K8,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:u5,lastRenderedState:K8},next:null};var $={};return J.next={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:u5,lastRenderedState:$},next:null},_.memoizedState=J,_=_.alternate,_!==null&&(_.memoizedState=J),J}function zY(_){Z1.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var J=WY(_);J.next===null&&(J=_.alternate.memoizedState),k9(_,J.next.queue,{},Q5(_))}function eU(){var _=mU(!1);return _=YY.bind(null,g1,_.queue,!0,!1),S2().memoizedState=_,[!1,_]}function BY(){var _=c8(u5)[0],J=W0().memoizedState;return[typeof _==="boolean"?_:j9(_),J]}function AY(){var _=V9(u5)[0],J=W0().memoizedState;return[typeof _==="boolean"?_:j9(_),J]}function u6(){return f0(m_)}function _G(){var _=S2(),J=M0.identifierPrefix;if(J0){var $=n4,q=o4;$=(q&~(1<<32-j2(q)-1)).toString(32)+$,J="_"+J+"R_"+$,$=fQ++,0<$&&(J+="H"+$.toString(32)),J+="_"}else $=$f++,J="_"+J+"r_"+$.toString(32)+"_";return _.memoizedState=J}function JG(){return S2().memoizedState=fO.bind(null,g1)}function fO(_,J){for(var $=_.return;$!==null;){switch($.tag){case 24:case 3:var q=Q5($),G=S3(q),F=j3($,G,q);F!==null&&(q4(q,"refresh()",_),k0(F,$,q),N9(F,$,q)),_=OU(),J!==null&&J!==void 0&&F!==null&&console.error("The seed argument is not enabled outside experimental channels."),G.payload={cache:_};return}$=$.return}}function PO(_,J,$){var q=arguments;typeof q[3]==="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),q=Q5(_);var G={lane:q,revertLane:0,gesture:null,action:$,hasEagerState:!1,eagerState:null,next:null};f$(_)?MY(J,G):(G=KU(_,J,G,q),G!==null&&(q4(q,"dispatch()",_),k0(G,_,q),TY(G,J,q)))}function LY(_,J,$){var q=arguments;typeof q[3]==="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),q=Q5(_),k9(_,J,$,q)&&q4(q,"setState()",_)}function k9(_,J,$,q){var G={lane:q,revertLane:0,gesture:null,action:$,hasEagerState:!1,eagerState:null,next:null};if(f$(_))MY(J,G);else{var F=_.alternate;if(_.lanes===0&&(F===null||F.lanes===0)&&(F=J.lastRenderedReducer,F!==null)){var Y=Z1.H;Z1.H=c5;try{var A=J.lastRenderedState,w=F(A,$);if(G.hasEagerState=!0,G.eagerState=w,D2(w,A))return tJ(_,J,G,0),M0===null&&sJ(),!1}catch(N){}finally{Z1.H=Y}}if($=KU(_,J,G,q),$!==null)return k0($,_,q),TY($,J,q),!0}return!1}function $G(_,J,$,q){if(Z1.T===null&&i6===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),q={lane:2,revertLane:DG(),gesture:null,action:q,hasEagerState:!1,eagerState:null,next:null},f$(_)){if(J)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else J=KU(_,$,q,2),J!==null&&(q4(2,"setOptimistic()",_),k0(J,_,2))}function f$(_){var J=_.alternate;return _===g1||J!==null&&J===g1}function MY(_,J){N7=IQ=!0;var $=_.pending;$===null?J.next=J:(J.next=$.next,$.next=J),_.pending=J}function TY(_,J,$){if(($&4194048)!==0){var q=J.lanes;q&=_.pendingLanes,$|=q,J.lanes=$,b4(_,$)}}function QG(_){if(_!==null&&typeof _!=="function"){var J=String(_);AA.has(J)||(AA.add(J),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",_))}}function qG(_,J,$,q){var G=_.memoizedState,F=$(q,G);if(_.mode&R2){_0(!0);try{F=$(q,G)}finally{_0(!1)}}F===void 0&&(J=p(J)||"Component",YA.has(J)||(YA.add(J),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",J))),G=F===null||F===void 0?G:o1({},G,F),_.memoizedState=G,_.lanes===0&&(_.updateQueue.baseState=G)}function RY(_,J,$,q,G,F,Y){var A=_.stateNode;if(typeof A.shouldComponentUpdate==="function"){if($=A.shouldComponentUpdate(q,F,Y),_.mode&R2){_0(!0);try{$=A.shouldComponentUpdate(q,F,Y)}finally{_0(!1)}}return $===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",p(J)||"Component"),$}return J.prototype&&J.prototype.isPureReactComponent?!T9($,q)||!T9(G,F):!0}function OY(_,J,$,q){var G=J.state;typeof J.componentWillReceiveProps==="function"&&J.componentWillReceiveProps($,q),typeof J.UNSAFE_componentWillReceiveProps==="function"&&J.UNSAFE_componentWillReceiveProps($,q),J.state!==G&&(_=m(_)||"Component",ZA.has(_)||(ZA.add(_),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",_)),nZ.enqueueReplaceState(J,J.state,null))}function x6(_,J){var $=J;if("ref"in J){$={};for(var q in J)q!=="ref"&&($[q]=J[q])}if(_=_.defaultProps){$===J&&($=o1({},$));for(var G in _)$[G]===void 0&&($[G]=_[G])}return $}function wY(_){jZ(_),console.warn(`%s
|
|
126
|
-
|
|
127
|
-
%s
|
|
128
|
-
`,C7?"An error occurred in the <"+C7+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
129
|
-
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function IY(_){var J=C7?"The above error occurred in the <"+C7+"> component.":"The above error occurred in one of your React components.",$="React will try to recreate this component tree from scratch using the error boundary you provided, "+((eZ||"Anonymous")+".");if(typeof _==="object"&&_!==null&&typeof _.environmentName==="string"){var q=_.environmentName;_=[`%o
|
|
130
|
-
|
|
131
|
-
%s
|
|
132
|
-
|
|
133
|
-
%s
|
|
134
|
-
`,_,J,$].slice(0),typeof _[0]==="string"?_.splice(0,1,nA+" "+_[0],eA,sQ+q+sQ,_L):_.splice(0,0,nA,eA,sQ+q+sQ,_L),_.unshift(console),q=If.apply(console.error,_),q()}else console.error(`%o
|
|
135
|
-
|
|
136
|
-
%s
|
|
137
|
-
|
|
138
|
-
%s
|
|
139
|
-
`,_,J,$)}function fY(_){jZ(_)}function P$(_,J){try{C7=J.source?m(J.source):null,eZ=null;var $=J.value;if(Z1.actQueue!==null)Z1.thrownErrors.push($);else{var q=_.onUncaughtError;q($,{componentStack:J.stack})}}catch(G){setTimeout(function(){throw G})}}function PY(_,J,$){try{C7=$.source?m($.source):null,eZ=m(J);var q=_.onCaughtError;q($.value,{componentStack:$.stack,errorBoundary:J.tag===1?J.stateNode:null})}catch(G){setTimeout(function(){throw G})}}function UG(_,J,$){return $=S3($),$.tag=dZ,$.payload={element:null},$.callback=function(){W1(J.source,P$,_,J)},$}function GG(_){return _=S3(_),_.tag=dZ,_}function ZG(_,J,$,q){var G=$.type.getDerivedStateFromError;if(typeof G==="function"){var F=q.value;_.payload=function(){return G(F)},_.callback=function(){MH($),W1(q.source,PY,J,$,q)}}var Y=$.stateNode;Y!==null&&typeof Y.componentDidCatch==="function"&&(_.callback=function(){MH($),W1(q.source,PY,J,$,q),typeof G!=="function"&&(J6===null?J6=new Set([this]):J6.add(this)),nI(this,q),typeof G==="function"||($.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",m($)||"Unknown")})}function NO(_,J,$,q,G){if($.flags|=32768,O4&&h9(_,G),q!==null&&typeof q==="object"&&typeof q.then==="function"){if(J=$.alternate,J!==null&&g8(J,$,G,!0),J0&&(f4=!0),$=K5.current,$!==null){switch($.tag){case 31:case 13:return N5===null?v$():$.alternate===null&&j0===Z3&&(j0=CQ),$.flags&=-257,$.flags|=65536,$.lanes=G,q===RQ?$.flags|=16384:(J=$.updateQueue,J===null?$.updateQueue=new Set([q]):J.add(q),SG(_,q,G)),!1;case 22:return $.flags|=65536,q===RQ?$.flags|=16384:(J=$.updateQueue,J===null?(J={transitions:null,markerInstances:null,retryQueue:new Set([q])},$.updateQueue=J):($=J.retryQueue,$===null?J.retryQueue=new Set([q]):$.add(q)),SG(_,q,G)),!1}throw Error("Unexpected Suspense handler tag ("+$.tag+"). This is a bug in React.")}return SG(_,q,G),v$(),!1}if(J0)return f4=!0,J=K5.current,J!==null?((J.flags&65536)===0&&(J.flags|=256),J.flags|=65536,J.lanes=G,q!==EZ&&O9(e2(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:q}),$))):(q!==EZ&&O9(e2(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:q}),$)),_=_.current.alternate,_.flags|=65536,G&=-G,_.lanes|=G,q=e2(q,$),G=UG(_.stateNode,q,G),H$(_,G),j0!==o3&&(j0=e6)),!1;var F=e2(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:q}),$);if(k_===null?k_=[F]:k_.push(F),j0!==o3&&(j0=e6),J===null)return!0;q=e2(q,$),$=J;do{switch($.tag){case 3:return $.flags|=65536,_=G&-G,$.lanes|=_,_=UG($.stateNode,q,_),H$($,_),!1;case 1:if(J=$.type,F=$.stateNode,($.flags&128)===0&&(typeof J.getDerivedStateFromError==="function"||F!==null&&typeof F.componentDidCatch==="function"&&(J6===null||!J6.has(F))))return $.flags|=65536,G&=-G,$.lanes|=G,G=GG(G),ZG(G,_,$,q),H$($,G),!1}$=$.return}while($!==null);return!1}function K2(_,J,$,q){J.child=_===null?tB(J,null,$,q):o6(J,_.child,$,q)}function NY(_,J,$,q,G){$=$.render;var F=J.ref;if("ref"in q){var Y={};for(var A in q)A!=="ref"&&(Y[A]=q[A])}else Y=q;if(y6(J),q=DU(_,J,$,Y,F,G),A=vU(),_!==null&&!r0)return EU(_,J,G),r4(_,J,G);return J0&&A&&BU(J),J.flags|=1,K2(_,J,q,G),J.child}function CY(_,J,$,q,G){if(_===null){var F=$.type;if(typeof F==="function"&&!HU(F)&&F.defaultProps===void 0&&$.compare===null)return $=j6(F),J.tag=15,J.type=$,KG(J,F),SY(_,J,$,q,G);return _=YU($.type,null,q,J,J.mode,G),_.ref=J.ref,_.return=J,J.child=_}if(F=_.child,!BG(_,G)){var Y=F.memoizedProps;if($=$.compare,$=$!==null?$:T9,$(Y,q)&&_.ref===J.ref)return r4(_,J,G)}return J.flags|=1,_=g4(F,q),_.ref=J.ref,_.return=J,J.child=_}function SY(_,J,$,q,G){if(_!==null){var F=_.memoizedProps;if(T9(F,q)&&_.ref===J.ref&&J.type===_.type)if(r0=!1,J.pendingProps=q=F,BG(_,G))(_.flags&131072)!==0&&(r0=!0);else return J.lanes=_.lanes,r4(_,J,G)}return FG(_,J,$,q,G)}function jY(_,J,$,q){var G=q.children,F=_!==null?_.memoizedState:null;if(_===null&&J.stateNode===null&&(J.stateNode={_visibility:G_,_pendingMarkers:null,_retryCache:null,_transitions:null}),q.mode==="hidden"){if((J.flags&128)!==0){if(F=F!==null?F.baseLanes|$:$,_!==null){q=J.child=_.child;for(G=0;q!==null;)G=G|q.lanes|q.childLanes,q=q.sibling;q=G&~F}else q=0,J.child=null;return VY(_,J,F,$,q)}if(($&536870912)!==0)J.memoizedState={baseLanes:0,cachePool:null},_!==null&&U$(J,F!==null?F.cachePool:null),F!==null?rH(J,F):SU(J),dH(J);else return q=J.lanes=536870912,VY(_,J,F!==null?F.baseLanes|$:$,$,q)}else F!==null?(U$(J,F.cachePool),rH(J,F),k3(J),J.memoizedState=null):(_!==null&&U$(J,null),SU(J),k3(J));return K2(_,J,G,$),J.child}function D9(_,J){return _!==null&&_.tag===22||J.stateNode!==null||(J.stateNode={_visibility:G_,_pendingMarkers:null,_retryCache:null,_transitions:null}),J.sibling}function VY(_,J,$,q,G){var F=fU();return F=F===null?null:{parent:p0._currentValue,pool:F},J.memoizedState={baseLanes:$,cachePool:F},_!==null&&U$(J,null),SU(J),dH(J),_!==null&&g8(_,J,q,!0),J.childLanes=G,null}function N$(_,J){var $=J.hidden;return $!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
140
|
-
- <Activity %s>
|
|
141
|
-
+ <Activity %s>`,$===!0?"hidden":$===!1?"hidden={false}":"hidden={...}",$?'mode="hidden"':'mode="visible"'),J=S$({mode:J.mode,children:J.children},_.mode),J.ref=_.ref,_.child=J,J.return=_,J}function kY(_,J,$){return o6(J,_.child,null,$),_=N$(J,J.pendingProps),_.flags|=2,$5(J),J.memoizedState=null,_}function CO(_,J,$){var q=J.pendingProps,G=(J.flags&128)!==0;if(J.flags&=-129,_===null){if(J0){if(q.mode==="hidden")return _=N$(J,q),J.lanes=536870912,D9(null,_);if(VU(J),(_=w0)?($=$z(_,f5),$=$!==null&&$.data===U8?$:null,$!==null&&(q={dehydrated:$,treeContext:IH(),retryLane:536870912,hydrationErrors:null},J.memoizedState=q,q=OH($),q.return=J,J.child=q,Y2=J,w0=null)):$=null,$===null)throw eJ(J,_),P3(J);return J.lanes=536870912,null}return N$(J,q)}var F=_.memoizedState;if(F!==null){var Y=F.dehydrated;if(VU(J),G)if(J.flags&256)J.flags&=-257,J=kY(_,J,$);else if(J.memoizedState!==null)J.child=_.child,J.flags|=128,J=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(PH(),($&536870912)!==0&&y$(J),r0||g8(_,J,$,!1),G=($&_.childLanes)!==0,r0||G){if(q=M0,q!==null&&(Y=u4(q,$),Y!==0&&Y!==F.retryLane))throw F.retryLane=Y,M2(_,Y),k0(q,_,Y),_F;v$(),J=kY(_,J,$)}else _=F.treeContext,w0=q5(Y.nextSibling),Y2=J,J0=!0,l3=null,f4=!1,F5=null,f5=!1,_!==null&&fH(J,_),J=N$(J,q),J.flags|=4096;return J}return F=_.child,q={mode:q.mode,children:q.children},($&536870912)!==0&&($&_.lanes)!==0&&y$(J),_=g4(F,q),_.ref=J.ref,J.child=_,_.return=J,_}function C$(_,J){var $=J.ref;if($===null)_!==null&&_.ref!==null&&(J.flags|=4194816);else{if(typeof $!=="function"&&typeof $!=="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");if(_===null||_.ref!==$)J.flags|=4194816}}function FG(_,J,$,q,G){if($.prototype&&typeof $.prototype.render==="function"){var F=p($)||"Unknown";LA[F]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",F,F),LA[F]=!0)}if(J.mode&R2&&p5.recordLegacyContextWarning(J,null),_===null&&(KG(J,J.type),$.contextTypes&&(F=p($)||"Unknown",TA[F]||(TA[F]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",F)))),y6(J),$=DU(_,J,$,q,void 0,G),q=vU(),_!==null&&!r0)return EU(_,J,G),r4(_,J,G);return J0&&q&&BU(J),J.flags|=1,K2(_,J,$,G),J.child}function DY(_,J,$,q,G,F){if(y6(J),U3=-1,f_=_!==null&&_.type!==J.type,J.updateQueue=null,$=yU(J,q,$,G),iH(_,J),q=vU(),_!==null&&!r0)return EU(_,J,F),r4(_,J,F);return J0&&q&&BU(J),J.flags|=1,K2(_,J,$,F),J.child}function yY(_,J,$,q,G){switch(z(J)){case!1:var F=J.stateNode,Y=new J.type(J.memoizedProps,F.context).state;F.updater.enqueueSetState(F,Y,null);break;case!0:J.flags|=128,J.flags|=65536,F=Error("Simulated error coming from DevTools");var A=G&-G;if(J.lanes|=A,Y=M0,Y===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");A=GG(A),ZG(A,Y,J,e2(F,J)),H$(J,A)}if(y6(J),J.stateNode===null){if(Y=c3,F=$.contextType,"contextType"in $&&F!==null&&(F===void 0||F.$$typeof!==M4)&&!BA.has($)&&(BA.add($),A=F===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof F!=="object"?" However, it is set to a "+typeof F+".":F.$$typeof===JZ?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(F).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",p($)||"Component",A)),typeof F==="object"&&F!==null&&(Y=f0(F)),F=new $(q,Y),J.mode&R2){_0(!0);try{F=new $(q,Y)}finally{_0(!1)}}if(Y=J.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,F.updater=nZ,J.stateNode=F,F._reactInternals=J,F._reactInternalInstance=GA,typeof $.getDerivedStateFromProps==="function"&&Y===null&&(Y=p($)||"Component",FA.has(Y)||(FA.add(Y),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",Y,F.state===null?"null":"undefined",Y))),typeof $.getDerivedStateFromProps==="function"||typeof F.getSnapshotBeforeUpdate==="function"){var w=A=Y=null;if(typeof F.componentWillMount==="function"&&F.componentWillMount.__suppressDeprecationWarning!==!0?Y="componentWillMount":typeof F.UNSAFE_componentWillMount==="function"&&(Y="UNSAFE_componentWillMount"),typeof F.componentWillReceiveProps==="function"&&F.componentWillReceiveProps.__suppressDeprecationWarning!==!0?A="componentWillReceiveProps":typeof F.UNSAFE_componentWillReceiveProps==="function"&&(A="UNSAFE_componentWillReceiveProps"),typeof F.componentWillUpdate==="function"&&F.componentWillUpdate.__suppressDeprecationWarning!==!0?w="componentWillUpdate":typeof F.UNSAFE_componentWillUpdate==="function"&&(w="UNSAFE_componentWillUpdate"),Y!==null||A!==null||w!==null){F=p($)||"Component";var N=typeof $.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";XA.has(F)||(XA.add(F),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
142
|
-
|
|
143
|
-
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
144
|
-
|
|
145
|
-
The above lifecycles should be removed. Learn more about this warning here:
|
|
146
|
-
https://react.dev/link/unsafe-component-lifecycles`,F,N,Y!==null?`
|
|
147
|
-
`+Y:"",A!==null?`
|
|
148
|
-
`+A:"",w!==null?`
|
|
149
|
-
`+w:""))}}F=J.stateNode,Y=p($)||"Component",F.render||($.prototype&&typeof $.prototype.render==="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",Y):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",Y)),!F.getInitialState||F.getInitialState.isReactClassApproved||F.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",Y),F.getDefaultProps&&!F.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",Y),F.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",Y),$.childContextTypes&&!zA.has($)&&(zA.add($),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",Y)),$.contextTypes&&!WA.has($)&&(WA.add($),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",Y)),typeof F.componentShouldUpdate==="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",Y),$.prototype&&$.prototype.isPureReactComponent&&typeof F.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",p($)||"A pure component"),typeof F.componentDidUnmount==="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",Y),typeof F.componentDidReceiveProps==="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",Y),typeof F.componentWillRecieveProps==="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",Y),typeof F.UNSAFE_componentWillRecieveProps==="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",Y),A=F.props!==q,F.props!==void 0&&A&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",Y),F.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",Y,Y),typeof F.getSnapshotBeforeUpdate!=="function"||typeof F.componentDidUpdate==="function"||KA.has($)||(KA.add($),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",p($))),typeof F.getDerivedStateFromProps==="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Y),typeof F.getDerivedStateFromError==="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Y),typeof $.getSnapshotBeforeUpdate==="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",Y),(A=F.state)&&(typeof A!=="object"||s0(A))&&console.error("%s.state: must be set to an object or null",Y),typeof F.getChildContext==="function"&&typeof $.childContextTypes!=="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",Y),F=J.stateNode,F.props=q,F.state=J.memoizedState,F.refs={},NU(J),Y=$.contextType,F.context=typeof Y==="object"&&Y!==null?f0(Y):c3,F.state===q&&(Y=p($)||"Component",HA.has(Y)||(HA.add(Y),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",Y))),J.mode&R2&&p5.recordLegacyContextWarning(J,F),p5.recordUnsafeLifecycleWarnings(J,F),F.state=J.memoizedState,Y=$.getDerivedStateFromProps,typeof Y==="function"&&(qG(J,$,Y,q),F.state=J.memoizedState),typeof $.getDerivedStateFromProps==="function"||typeof F.getSnapshotBeforeUpdate==="function"||typeof F.UNSAFE_componentWillMount!=="function"&&typeof F.componentWillMount!=="function"||(Y=F.state,typeof F.componentWillMount==="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount==="function"&&F.UNSAFE_componentWillMount(),Y!==F.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",m(J)||"Component"),nZ.enqueueReplaceState(F,F.state,null)),S9(J,q,F,G),C9(),F.state=J.memoizedState),typeof F.componentDidMount==="function"&&(J.flags|=4194308),(J.mode&g5)!==x1&&(J.flags|=134217728),F=!0}else if(_===null){F=J.stateNode;var t=J.memoizedProps;A=x6($,t),F.props=A;var o=F.context;w=$.contextType,Y=c3,typeof w==="object"&&w!==null&&(Y=f0(w)),N=$.getDerivedStateFromProps,w=typeof N==="function"||typeof F.getSnapshotBeforeUpdate==="function",t=J.pendingProps!==t,w||typeof F.UNSAFE_componentWillReceiveProps!=="function"&&typeof F.componentWillReceiveProps!=="function"||(t||o!==Y)&&OY(J,F,q,Y),t3=!1;var l=J.memoizedState;F.state=l,S9(J,q,F,G),C9(),o=J.memoizedState,t||l!==o||t3?(typeof N==="function"&&(qG(J,$,N,q),o=J.memoizedState),(A=t3||RY(J,$,A,q,l,o,Y))?(w||typeof F.UNSAFE_componentWillMount!=="function"&&typeof F.componentWillMount!=="function"||(typeof F.componentWillMount==="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount==="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount==="function"&&(J.flags|=4194308),(J.mode&g5)!==x1&&(J.flags|=134217728)):(typeof F.componentDidMount==="function"&&(J.flags|=4194308),(J.mode&g5)!==x1&&(J.flags|=134217728),J.memoizedProps=q,J.memoizedState=o),F.props=q,F.state=o,F.context=Y,F=A):(typeof F.componentDidMount==="function"&&(J.flags|=4194308),(J.mode&g5)!==x1&&(J.flags|=134217728),F=!1)}else{F=J.stateNode,CU(_,J),Y=J.memoizedProps,w=x6($,Y),F.props=w,N=J.pendingProps,l=F.context,o=$.contextType,A=c3,typeof o==="object"&&o!==null&&(A=f0(o)),t=$.getDerivedStateFromProps,(o=typeof t==="function"||typeof F.getSnapshotBeforeUpdate==="function")||typeof F.UNSAFE_componentWillReceiveProps!=="function"&&typeof F.componentWillReceiveProps!=="function"||(Y!==N||l!==A)&&OY(J,F,q,A),t3=!1,l=J.memoizedState,F.state=l,S9(J,q,F,G),C9();var U1=J.memoizedState;Y!==N||l!==U1||t3||_!==null&&_.dependencies!==null&&J$(_.dependencies)?(typeof t==="function"&&(qG(J,$,t,q),U1=J.memoizedState),(w=t3||RY(J,$,w,q,l,U1,A)||_!==null&&_.dependencies!==null&&J$(_.dependencies))?(o||typeof F.UNSAFE_componentWillUpdate!=="function"&&typeof F.componentWillUpdate!=="function"||(typeof F.componentWillUpdate==="function"&&F.componentWillUpdate(q,U1,A),typeof F.UNSAFE_componentWillUpdate==="function"&&F.UNSAFE_componentWillUpdate(q,U1,A)),typeof F.componentDidUpdate==="function"&&(J.flags|=4),typeof F.getSnapshotBeforeUpdate==="function"&&(J.flags|=1024)):(typeof F.componentDidUpdate!=="function"||Y===_.memoizedProps&&l===_.memoizedState||(J.flags|=4),typeof F.getSnapshotBeforeUpdate!=="function"||Y===_.memoizedProps&&l===_.memoizedState||(J.flags|=1024),J.memoizedProps=q,J.memoizedState=U1),F.props=q,F.state=U1,F.context=A,F=w):(typeof F.componentDidUpdate!=="function"||Y===_.memoizedProps&&l===_.memoizedState||(J.flags|=4),typeof F.getSnapshotBeforeUpdate!=="function"||Y===_.memoizedProps&&l===_.memoizedState||(J.flags|=1024),F=!1)}if(A=F,C$(_,J),Y=(J.flags&128)!==0,A||Y){if(A=J.stateNode,S1(J),Y&&typeof $.getDerivedStateFromError!=="function")$=null,y2=-1;else if($=bB(A),J.mode&R2){_0(!0);try{bB(A)}finally{_0(!1)}}J.flags|=1,_!==null&&Y?(J.child=o6(J,_.child,null,G),J.child=o6(J,null,$,G)):K2(_,J,$,G),J.memoizedState=A.state,_=J.child}else _=r4(_,J,G);return G=J.stateNode,F&&G.props!==q&&(S7||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",m(J)||"a component"),S7=!0),_}function vY(_,J,$,q){return D6(),J.flags|=256,K2(_,J,$,q),J.child}function KG(_,J){J&&J.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
150
|
-
%s.childContextTypes = ...`,J.displayName||J.name||"Component"),typeof J.getDerivedStateFromProps==="function"&&(_=p(J)||"Unknown",RA[_]||(console.error("%s: Function components do not support getDerivedStateFromProps.",_),RA[_]=!0)),typeof J.contextType==="object"&&J.contextType!==null&&(J=p(J)||"Unknown",MA[J]||(console.error("%s: Function components do not support contextType.",J),MA[J]=!0))}function XG(_){return{baseLanes:_,cachePool:DH()}}function HG(_,J,$){return _=_!==null?_.childLanes&~$:0,J&&(_|=a2),_}function EY(_,J,$){var q,G=J.pendingProps;W(J)&&(J.flags|=128);var F=!1,Y=(J.flags&128)!==0;if((q=Y)||(q=_!==null&&_.memoizedState===null?!1:(m0.current&w_)!==0),q&&(F=!0,J.flags&=-129),q=(J.flags&32)!==0,J.flags&=-33,_===null){if(J0){if(F?V3(J):k3(J),(_=w0)?($=$z(_,f5),$=$!==null&&$.data!==U8?$:null,$!==null&&(q={dehydrated:$,treeContext:IH(),retryLane:536870912,hydrationErrors:null},J.memoizedState=q,q=OH($),q.return=J,J.child=q,Y2=J,w0=null)):$=null,$===null)throw eJ(J,_),P3(J);return lG($)?J.lanes=32:J.lanes=536870912,null}var A=G.children;if(G=G.fallback,F){k3(J);var w=J.mode;return A=S$({mode:"hidden",children:A},w),G=V6(G,w,$,null),A.return=J,G.return=J,A.sibling=G,J.child=A,G=J.child,G.memoizedState=XG($),G.childLanes=HG(_,q,$),J.memoizedState=JF,D9(null,G)}return V3(J),YG(J,A)}var N=_.memoizedState;if(N!==null){var t=N.dehydrated;if(t!==null){if(Y)J.flags&256?(V3(J),J.flags&=-257,J=WG(_,J,$)):J.memoizedState!==null?(k3(J),J.child=_.child,J.flags|=128,J=null):(k3(J),A=G.fallback,w=J.mode,G=S$({mode:"visible",children:G.children},w),A=V6(A,w,$,null),A.flags|=2,G.return=J,A.return=J,G.sibling=A,J.child=G,o6(J,_.child,null,$),G=J.child,G.memoizedState=XG($),G.childLanes=HG(_,q,$),J.memoizedState=JF,J=D9(null,G));else if(V3(J),PH(),($&536870912)!==0&&y$(J),lG(t)){if(q=t.nextSibling&&t.nextSibling.dataset,q){A=q.dgst;var o=q.msg;w=q.stck;var l=q.cstck}F=o,q=A,G=w,t=l,A=F,w=t,A=A?Error(A):Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),A.stack=G||"",A.digest=q,q=w===void 0?null:w,G={value:A,source:null,stack:q},typeof q==="string"&&vZ.set(A,G),O9(G),J=WG(_,J,$)}else if(r0||g8(_,J,$,!1),q=($&_.childLanes)!==0,r0||q){if(q=M0,q!==null&&(G=u4(q,$),G!==0&&G!==N.retryLane))throw N.retryLane=G,M2(_,G),k0(q,_,G),_F;cG(t)||v$(),J=WG(_,J,$)}else cG(t)?(J.flags|=192,J.child=_.child,J=null):(_=N.treeContext,w0=q5(t.nextSibling),Y2=J,J0=!0,l3=null,f4=!1,F5=null,f5=!1,_!==null&&fH(J,_),J=YG(J,G.children),J.flags|=4096);return J}}if(F)return k3(J),A=G.fallback,w=J.mode,l=_.child,t=l.sibling,G=g4(l,{mode:"hidden",children:G.children}),G.subtreeFlags=l.subtreeFlags&65011712,t!==null?A=g4(t,A):(A=V6(A,w,$,null),A.flags|=2),A.return=J,G.return=J,G.sibling=A,J.child=G,D9(null,G),G=J.child,A=_.child.memoizedState,A===null?A=XG($):(w=A.cachePool,w!==null?(l=p0._currentValue,w=w.parent!==l?{parent:l,pool:l}:w):w=DH(),A={baseLanes:A.baseLanes|$,cachePool:w}),G.memoizedState=A,G.childLanes=HG(_,q,$),J.memoizedState=JF,D9(_.child,G);return N!==null&&($&62914560)===$&&($&_.lanes)!==0&&y$(J),V3(J),$=_.child,_=$.sibling,$=g4($,{mode:"visible",children:G.children}),$.return=J,$.sibling=null,_!==null&&(q=J.deletions,q===null?(J.deletions=[_],J.flags|=16):q.push(_)),J.child=$,J.memoizedState=null,$}function YG(_,J){return J=S$({mode:"visible",children:J},_.mode),J.return=_,_.child=J}function S$(_,J){return _=M(22,_,null,J),_.lanes=0,_}function WG(_,J,$){return o6(J,_.child,null,$),_=YG(J,J.pendingProps.children),_.flags|=2,J.memoizedState=null,_}function bY(_,J,$){_.lanes|=J;var q=_.alternate;q!==null&&(q.lanes|=J),TU(_.return,J,$)}function zG(_,J,$,q,G,F){var Y=_.memoizedState;Y===null?_.memoizedState={isBackwards:J,rendering:null,renderingStartTime:0,last:q,tail:$,tailMode:G,treeForkCount:F}:(Y.isBackwards=J,Y.rendering=null,Y.renderingStartTime=0,Y.last=q,Y.tail=$,Y.tailMode=G,Y.treeForkCount=F)}function uY(_,J,$){var q=J.pendingProps,G=q.revealOrder,F=q.tail,Y=q.children,A=m0.current;if((q=(A&w_)!==0)?(A=A&f7|w_,J.flags|=128):A&=f7,J1(m0,A,J),A=G==null?"null":G,G!=="forwards"&&G!=="unstable_legacy-backwards"&&G!=="together"&&G!=="independent"&&!OA[A])if(OA[A]=!0,G==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(G==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof G==="string")switch(G.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',G,G.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',G,G.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',G)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',G);if(A=F==null?"null":F,!NQ[A])if(F==null){if(G==="forwards"||G==="backwards"||G==="unstable_legacy-backwards")NQ[A]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')}else F!=="visible"&&F!=="collapsed"&&F!=="hidden"?(NQ[A]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',F)):G!=="forwards"&&G!=="backwards"&&G!=="unstable_legacy-backwards"&&(NQ[A]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',F));_:if((G==="forwards"||G==="backwards"||G==="unstable_legacy-backwards")&&Y!==void 0&&Y!==null&&Y!==!1)if(s0(Y)){for(A=0;A<Y.length;A++)if(!pH(Y[A],A))break _}else if(A=E(Y),typeof A==="function"){if(A=A.call(Y))for(var w=A.next(),N=0;!w.done;w=A.next()){if(!pH(w.value,N))break _;N++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',G);if(K2(_,J,Y,$),J0?(f3(),Y=Z_):Y=0,!q&&_!==null&&(_.flags&128)!==0)_:for(_=J.child;_!==null;){if(_.tag===13)_.memoizedState!==null&&bY(_,$,J);else if(_.tag===19)bY(_,$,J);else if(_.child!==null){_.child.return=_,_=_.child;continue}if(_===J)break _;for(;_.sibling===null;){if(_.return===null||_.return===J)break _;_=_.return}_.sibling.return=_.return,_=_.sibling}switch(G){case"forwards":$=J.child;for(G=null;$!==null;)_=$.alternate,_!==null&&Y$(_)===null&&(G=$),$=$.sibling;$=G,$===null?(G=J.child,J.child=null):(G=$.sibling,$.sibling=null),zG(J,!1,G,$,F,Y);break;case"backwards":case"unstable_legacy-backwards":$=null,G=J.child;for(J.child=null;G!==null;){if(_=G.alternate,_!==null&&Y$(_)===null){J.child=G;break}_=G.sibling,G.sibling=$,$=G,G=_}zG(J,!0,$,null,F,Y);break;case"together":zG(J,!1,null,null,void 0,Y);break;default:J.memoizedState=null}return J.child}function r4(_,J,$){if(_!==null&&(J.dependencies=_.dependencies),y2=-1,e3|=J.lanes,($&J.childLanes)===0)if(_!==null){if(g8(_,J,$,!1),($&J.childLanes)===0)return null}else return null;if(_!==null&&J.child!==_.child)throw Error("Resuming work not yet implemented.");if(J.child!==null){_=J.child,$=g4(_,_.pendingProps),J.child=$;for($.return=J;_.sibling!==null;)_=_.sibling,$=$.sibling=g4(_,_.pendingProps),$.return=J;$.sibling=null}return J.child}function BG(_,J){if((_.lanes&J)!==0)return!0;return _=_.dependencies,_!==null&&J$(_)?!0:!1}function SO(_,J,$){switch(J.tag){case 3:u(J,J.stateNode.containerInfo),N3(J,p0,_.memoizedState.cache),D6();break;case 27:case 5:g(J);break;case 4:u(J,J.stateNode.containerInfo);break;case 10:N3(J,J.type,J.memoizedProps.value);break;case 12:($&J.childLanes)!==0&&(J.flags|=4),J.flags|=2048;var q=J.stateNode;q.effectDuration=-0,q.passiveEffectDuration=-0;break;case 31:if(J.memoizedState!==null)return J.flags|=128,VU(J),null;break;case 13:if(q=J.memoizedState,q!==null){if(q.dehydrated!==null)return V3(J),J.flags|=128,null;if(($&J.child.childLanes)!==0)return EY(_,J,$);return V3(J),_=r4(_,J,$),_!==null?_.sibling:null}V3(J);break;case 19:var G=(_.flags&128)!==0;if(q=($&J.childLanes)!==0,q||(g8(_,J,$,!1),q=($&J.childLanes)!==0),G){if(q)return uY(_,J,$);J.flags|=128}if(G=J.memoizedState,G!==null&&(G.rendering=null,G.tail=null,G.lastEffect=null),J1(m0,m0.current,J),q)break;else return null;case 22:return J.lanes=0,jY(_,J,$,J.pendingProps);case 24:N3(J,p0,_.memoizedState.cache)}return r4(_,J,$)}function AG(_,J,$){if(J._debugNeedsRemount&&_!==null){$=YU(J.type,J.key,J.pendingProps,J._debugOwner||null,J.mode,J.lanes),$._debugStack=J._debugStack,$._debugTask=J._debugTask;var q=J.return;if(q===null)throw Error("Cannot swap the root fiber.");if(_.alternate=null,J.alternate=null,$.index=J.index,$.sibling=J.sibling,$.return=J.return,$.ref=J.ref,$._debugInfo=J._debugInfo,J===q.child)q.child=$;else{var G=q.child;if(G===null)throw Error("Expected parent to have a child.");for(;G.sibling!==J;)if(G=G.sibling,G===null)throw Error("Expected to find the previous sibling.");G.sibling=$}return J=q.deletions,J===null?(q.deletions=[_],q.flags|=16):J.push(_),$.flags|=2,$}if(_!==null)if(_.memoizedProps!==J.pendingProps||J.type!==_.type)r0=!0;else{if(!BG(_,$)&&(J.flags&128)===0)return r0=!1,SO(_,J,$);r0=(_.flags&131072)!==0?!0:!1}else{if(r0=!1,q=J0)f3(),q=(J.flags&1048576)!==0;q&&(q=J.index,f3(),wH(J,Z_,q))}switch(J.lanes=0,J.tag){case 16:_:if(q=J.pendingProps,_=C3(J.elementType),J.type=_,typeof _==="function")HU(_)?(q=x6(_,q),J.tag=1,J.type=_=j6(_),J=yY(null,J,_,q,$)):(J.tag=0,KG(J,_),J.type=_=j6(_),J=FG(null,J,_,q,$));else{if(_!==void 0&&_!==null){if(G=_.$$typeof,G===a9){J.tag=11,J.type=_=XU(_),J=NY(null,J,_,q,$);break _}else if(G===a$){J.tag=14,J=CY(null,J,_,q,$);break _}}throw J="",_!==null&&typeof _==="object"&&_.$$typeof===U5&&(J=" Did you wrap a component in React.lazy() more than once?"),$=p(_)||_,Error("Element type is invalid. Received a promise that resolves to: "+$+". Lazy element type must resolve to a class or function."+J)}return J;case 0:return FG(_,J,J.type,J.pendingProps,$);case 1:return q=J.type,G=x6(q,J.pendingProps),yY(_,J,q,G,$);case 3:_:{if(u(J,J.stateNode.containerInfo),_===null)throw Error("Should have a current fiber. This is a bug in React.");q=J.pendingProps;var F=J.memoizedState;G=F.element,CU(_,J),S9(J,q,null,$);var Y=J.memoizedState;if(q=Y.cache,N3(J,p0,q),q!==F.cache&&RU(J,[p0],$,!0),C9(),q=Y.element,F.isDehydrated)if(F={element:q,isDehydrated:!1,cache:Y.cache},J.updateQueue.baseState=F,J.memoizedState=F,J.flags&256){J=vY(_,J,q,$);break _}else if(q!==G){G=e2(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),J),O9(G),J=vY(_,J,q,$);break _}else{switch(_=J.stateNode.containerInfo,_.nodeType){case 9:_=_.body;break;default:_=_.nodeName==="HTML"?_.ownerDocument.body:_}w0=q5(_.firstChild),Y2=J,J0=!0,l3=null,f4=!1,F5=null,f5=!0,$=tB(J,null,q,$);for(J.child=$;$;)$.flags=$.flags&-3|4096,$=$.sibling}else{if(D6(),q===G){J=r4(_,J,$);break _}K2(_,J,q,$)}J=J.child}return J;case 26:return C$(_,J),_===null?($=Fz(J.type,null,J.pendingProps,null))?J.memoizedState=$:J0||($=J.type,_=J.pendingProps,q=y(u3.current),q=x$(q).createElement($),q[H2]=J,q[V2]=_,X2(q,$,_),V1(q),J.stateNode=q):J.memoizedState=Fz(J.type,_.memoizedProps,J.pendingProps,_.memoizedState),null;case 27:return g(J),_===null&&J0&&(q=y(u3.current),G=d(),q=J.stateNode=Gz(J.type,J.pendingProps,q,G,!1),f4||(G=aW(q,J.type,J.pendingProps,G),G!==null&&(k6(J,0).serverProps=G)),Y2=J,f5=!0,G=w0,E3(J.type)?(fF=G,w0=q5(q.firstChild)):w0=G),K2(_,J,J.pendingProps.children,$),C$(_,J),_===null&&(J.flags|=4194304),J.child;case 5:return _===null&&J0&&(F=d(),q=z9(J.type,F.ancestorInfo),G=w0,(Y=!G)||(Y=Aw(G,J.type,J.pendingProps,f5),Y!==null?(J.stateNode=Y,f4||(F=aW(Y,J.type,J.pendingProps,F),F!==null&&(k6(J,0).serverProps=F)),Y2=J,w0=q5(Y.firstChild),f5=!1,F=!0):F=!1,Y=!F),Y&&(q&&eJ(J,G),P3(J))),g(J),G=J.type,F=J.pendingProps,Y=_!==null?_.memoizedProps:null,q=F.children,gG(G,F)?q=null:Y!==null&&gG(G,Y)&&(J.flags|=32),J.memoizedState!==null&&(G=DU(_,J,RO,null,null,$),m_._currentValue=G),C$(_,J),K2(_,J,q,$),J.child;case 6:return _===null&&J0&&($=J.pendingProps,_=d(),q=_.ancestorInfo.current,$=q!=null?I3($,q.tag,_.ancestorInfo.implicitRootScope):!0,_=w0,(q=!_)||(q=Lw(_,J.pendingProps,f5),q!==null?(J.stateNode=q,Y2=J,w0=null,q=!0):q=!1,q=!q),q&&($&&eJ(J,_),P3(J))),null;case 13:return EY(_,J,$);case 4:return u(J,J.stateNode.containerInfo),q=J.pendingProps,_===null?J.child=o6(J,null,q,$):K2(_,J,q,$),J.child;case 11:return NY(_,J,J.type,J.pendingProps,$);case 7:return K2(_,J,J.pendingProps,$),J.child;case 8:return K2(_,J,J.pendingProps.children,$),J.child;case 12:return J.flags|=4,J.flags|=2048,q=J.stateNode,q.effectDuration=-0,q.passiveEffectDuration=-0,K2(_,J,J.pendingProps.children,$),J.child;case 10:return q=J.type,G=J.pendingProps,F=G.value,"value"in G||wA||(wA=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),N3(J,q,F),K2(_,J,G.children,$),J.child;case 9:return G=J.type._context,q=J.pendingProps.children,typeof q!=="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),y6(J),G=f0(G),q=pZ(q,G,void 0),J.flags|=1,K2(_,J,q,$),J.child;case 14:return CY(_,J,J.type,J.pendingProps,$);case 15:return SY(_,J,J.type,J.pendingProps,$);case 19:return uY(_,J,$);case 31:return CO(_,J,$);case 22:return jY(_,J,$,J.pendingProps);case 24:return y6(J),q=f0(p0),_===null?(G=fU(),G===null&&(G=M0,F=OU(),G.pooledCache=F,v6(F),F!==null&&(G.pooledCacheLanes|=$),G=F),J.memoizedState={parent:q,cache:G},NU(J),N3(J,p0,G)):((_.lanes&$)!==0&&(CU(_,J),S9(J,null,null,$),C9()),G=_.memoizedState,F=J.memoizedState,G.parent!==q?(G={parent:q,cache:q},J.memoizedState=G,J.lanes===0&&(J.memoizedState=J.updateQueue.baseState=G),N3(J,p0,q)):(q=F.cache,N3(J,p0,q),q!==G.cache&&RU(J,[p0],$,!0))),K2(_,J,J.pendingProps.children,$),J.child;case 29:throw J.pendingProps}throw Error("Unknown unit of work tag ("+J.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function d4(_){_.flags|=4}function LG(_,J,$,q,G){if(J=(_.mode&aI)!==x1)J=!1;if(J){if(_.flags|=16777216,(G&335544128)===G)if(_.stateNode.complete)_.flags|=8192;else if(AW())_.flags|=8192;else throw t6=RQ,lZ}else _.flags&=-16777217}function xY(_,J){if(J.type!=="stylesheet"||(J.state.loading&j5)!==F8)_.flags&=-16777217;else if(_.flags|=16777216,!Wz(J))if(AW())_.flags|=8192;else throw t6=RQ,lZ}function j$(_,J){J!==null&&(_.flags|=4),_.flags&16384&&(J=_.tag!==22?B2():536870912,_.lanes|=J,$8|=J)}function y9(_,J){if(!J0)switch(_.tailMode){case"hidden":J=_.tail;for(var $=null;J!==null;)J.alternate!==null&&($=J),J=J.sibling;$===null?_.tail=null:$.sibling=null;break;case"collapsed":$=_.tail;for(var q=null;$!==null;)$.alternate!==null&&(q=$),$=$.sibling;q===null?J||_.tail===null?_.tail=null:_.tail.sibling=null:q.sibling=null}}function T0(_){var J=_.alternate!==null&&_.alternate.child===_.child,$=0,q=0;if(J)if((_.mode&d1)!==x1){for(var{selfBaseDuration:G,child:F}=_;F!==null;)$|=F.lanes|F.childLanes,q|=F.subtreeFlags&65011712,q|=F.flags&65011712,G+=F.treeBaseDuration,F=F.sibling;_.treeBaseDuration=G}else for(G=_.child;G!==null;)$|=G.lanes|G.childLanes,q|=G.subtreeFlags&65011712,q|=G.flags&65011712,G.return=_,G=G.sibling;else if((_.mode&d1)!==x1){G=_.actualDuration,F=_.selfBaseDuration;for(var Y=_.child;Y!==null;)$|=Y.lanes|Y.childLanes,q|=Y.subtreeFlags,q|=Y.flags,G+=Y.actualDuration,F+=Y.treeBaseDuration,Y=Y.sibling;_.actualDuration=G,_.treeBaseDuration=F}else for(G=_.child;G!==null;)$|=G.lanes|G.childLanes,q|=G.subtreeFlags,q|=G.flags,G.return=_,G=G.sibling;return _.subtreeFlags|=q,_.childLanes=$,J}function jO(_,J,$){var q=J.pendingProps;switch(AU(J),J.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return T0(J),null;case 1:return T0(J),null;case 3:if($=J.stateNode,q=null,_!==null&&(q=_.memoizedState.cache),J.memoizedState.cache!==q&&(J.flags|=2048),c4(p0,J),x(J),$.pendingContext&&($.context=$.pendingContext,$.pendingContext=null),_===null||_.child===null)m8(J)?(MU(),d4(J)):_===null||_.memoizedState.isDehydrated&&(J.flags&256)===0||(J.flags|=1024,LU());return T0(J),null;case 26:var{type:G,memoizedState:F}=J;return _===null?(d4(J),F!==null?(T0(J),xY(J,F)):(T0(J),LG(J,G,null,q,$))):F?F!==_.memoizedState?(d4(J),T0(J),xY(J,F)):(T0(J),J.flags&=-16777217):(_=_.memoizedProps,_!==q&&d4(J),T0(J),LG(J,G,_,q,$)),null;case 27:if(n(J),$=y(u3.current),G=J.type,_!==null&&J.stateNode!=null)_.memoizedProps!==q&&d4(J);else{if(!q){if(J.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return T0(J),null}_=d(),m8(J)?NH(J,_):(_=Gz(G,q,$,_,!0),J.stateNode=_,d4(J))}return T0(J),null;case 5:if(n(J),G=J.type,_!==null&&J.stateNode!=null)_.memoizedProps!==q&&d4(J);else{if(!q){if(J.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return T0(J),null}var Y=d();if(m8(J))NH(J,Y);else{switch(F=y(u3.current),z9(G,Y.ancestorInfo),Y=Y.context,F=x$(F),Y){case b7:F=F.createElementNS(G7,G);break;case dQ:F=F.createElementNS(JQ,G);break;default:switch(G){case"svg":F=F.createElementNS(G7,G);break;case"math":F=F.createElementNS(JQ,G);break;case"script":F=F.createElement("div"),F.innerHTML="<script></script>",F=F.removeChild(F.firstChild);break;case"select":F=typeof q.is==="string"?F.createElement("select",{is:q.is}):F.createElement("select"),q.multiple?F.multiple=!0:q.size&&(F.size=q.size);break;default:F=typeof q.is==="string"?F.createElement(G,{is:q.is}):F.createElement(G),G.indexOf("-")===-1&&(G!==G.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",G),Object.prototype.toString.call(F)!=="[object HTMLUnknownElement]"||h5.call(dA,G)||(dA[G]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",G)))}}F[H2]=J,F[V2]=q;_:for(Y=J.child;Y!==null;){if(Y.tag===5||Y.tag===6)F.appendChild(Y.stateNode);else if(Y.tag!==4&&Y.tag!==27&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===J)break _;for(;Y.sibling===null;){if(Y.return===null||Y.return===J)break _;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}J.stateNode=F;_:switch(X2(F,G,q),G){case"button":case"input":case"select":case"textarea":q=!!q.autoFocus;break _;case"img":q=!0;break _;default:q=!1}q&&d4(J)}}return T0(J),LG(J,J.type,_===null?null:_.memoizedProps,J.pendingProps,$),null;case 6:if(_&&J.stateNode!=null)_.memoizedProps!==q&&d4(J);else{if(typeof q!=="string"&&J.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(_=y(u3.current),$=d(),m8(J)){if(_=J.stateNode,$=J.memoizedProps,G=!f4,q=null,F=Y2,F!==null)switch(F.tag){case 3:G&&(G=qz(_,$,q),G!==null&&(k6(J,0).serverProps=G));break;case 27:case 5:q=F.memoizedProps,G&&(G=qz(_,$,q),G!==null&&(k6(J,0).serverProps=G))}_[H2]=J,_=_.nodeValue===$||q!==null&&q.suppressHydrationWarning===!0||cW(_.nodeValue,$)?!0:!1,_||P3(J,!0)}else G=$.ancestorInfo.current,G!=null&&I3(q,G.tag,$.ancestorInfo.implicitRootScope),_=x$(_).createTextNode(q),_[H2]=J,J.stateNode=_}return T0(J),null;case 31:if($=J.memoizedState,_===null||_.memoizedState!==null){if(q=m8(J),$!==null){if(_===null){if(!q)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(_=J.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");_[H2]=J,T0(J),(J.mode&d1)!==x1&&$!==null&&(_=J.child,_!==null&&(J.treeBaseDuration-=_.treeBaseDuration))}else MU(),D6(),(J.flags&128)===0&&($=J.memoizedState=null),J.flags|=4,T0(J),(J.mode&d1)!==x1&&$!==null&&(_=J.child,_!==null&&(J.treeBaseDuration-=_.treeBaseDuration));_=!1}else $=LU(),_!==null&&_.memoizedState!==null&&(_.memoizedState.hydrationErrors=$),_=!0;if(!_){if(J.flags&256)return $5(J),J;return $5(J),null}if((J.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return T0(J),null;case 13:if(q=J.memoizedState,_===null||_.memoizedState!==null&&_.memoizedState.dehydrated!==null){if(G=q,F=m8(J),G!==null&&G.dehydrated!==null){if(_===null){if(!F)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(F=J.memoizedState,F=F!==null?F.dehydrated:null,!F)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");F[H2]=J,T0(J),(J.mode&d1)!==x1&&G!==null&&(G=J.child,G!==null&&(J.treeBaseDuration-=G.treeBaseDuration))}else MU(),D6(),(J.flags&128)===0&&(G=J.memoizedState=null),J.flags|=4,T0(J),(J.mode&d1)!==x1&&G!==null&&(G=J.child,G!==null&&(J.treeBaseDuration-=G.treeBaseDuration));G=!1}else G=LU(),_!==null&&_.memoizedState!==null&&(_.memoizedState.hydrationErrors=G),G=!0;if(!G){if(J.flags&256)return $5(J),J;return $5(J),null}}if($5(J),(J.flags&128)!==0)return J.lanes=$,(J.mode&d1)!==x1&&f9(J),J;return $=q!==null,_=_!==null&&_.memoizedState!==null,$&&(q=J.child,G=null,q.alternate!==null&&q.alternate.memoizedState!==null&&q.alternate.memoizedState.cachePool!==null&&(G=q.alternate.memoizedState.cachePool.pool),F=null,q.memoizedState!==null&&q.memoizedState.cachePool!==null&&(F=q.memoizedState.cachePool.pool),F!==G&&(q.flags|=2048)),$!==_&&$&&(J.child.flags|=8192),j$(J,J.updateQueue),T0(J),(J.mode&d1)!==x1&&$&&(_=J.child,_!==null&&(J.treeBaseDuration-=_.treeBaseDuration)),null;case 4:return x(J),_===null&&vG(J.stateNode.containerInfo),T0(J),null;case 10:return c4(J.type,J),T0(J),null;case 19:if($1(m0,J),q=J.memoizedState,q===null)return T0(J),null;if(G=(J.flags&128)!==0,F=q.rendering,F===null)if(G)y9(q,!1);else{if(j0!==Z3||_!==null&&(_.flags&128)!==0)for(_=J.child;_!==null;){if(F=Y$(_),F!==null){J.flags|=128,y9(q,!1),_=F.updateQueue,J.updateQueue=_,j$(J,_),J.subtreeFlags=0,_=$;for($=J.child;$!==null;)RH($,_),$=$.sibling;return J1(m0,m0.current&f7|w_,J),J0&&p4(J,q.treeForkCount),J.child}_=_.sibling}q.tail!==null&&Q2()>yQ&&(J.flags|=128,G=!0,y9(q,!1),J.lanes=4194304)}else{if(!G)if(_=Y$(F),_!==null){if(J.flags|=128,G=!0,_=_.updateQueue,J.updateQueue=_,j$(J,_),y9(q,!0),q.tail===null&&q.tailMode==="hidden"&&!F.alternate&&!J0)return T0(J),null}else 2*Q2()-q.renderingStartTime>yQ&&$!==536870912&&(J.flags|=128,G=!0,y9(q,!1),J.lanes=4194304);q.isBackwards?(F.sibling=J.child,J.child=F):(_=q.last,_!==null?_.sibling=F:J.child=F,q.last=F)}if(q.tail!==null)return _=q.tail,q.rendering=_,q.tail=_.sibling,q.renderingStartTime=Q2(),_.sibling=null,$=m0.current,$=G?$&f7|w_:$&f7,J1(m0,$,J),J0&&p4(J,q.treeForkCount),_;return T0(J),null;case 22:case 23:return $5(J),jU(J),q=J.memoizedState!==null,_!==null?_.memoizedState!==null!==q&&(J.flags|=8192):q&&(J.flags|=8192),q?($&536870912)!==0&&(J.flags&128)===0&&(T0(J),J.subtreeFlags&6&&(J.flags|=8192)):T0(J),$=J.updateQueue,$!==null&&j$(J,$.retryQueue),$=null,_!==null&&_.memoizedState!==null&&_.memoizedState.cachePool!==null&&($=_.memoizedState.cachePool.pool),q=null,J.memoizedState!==null&&J.memoizedState.cachePool!==null&&(q=J.memoizedState.cachePool.pool),q!==$&&(J.flags|=2048),_!==null&&$1(a6,J),null;case 24:return $=null,_!==null&&($=_.memoizedState.cache),J.memoizedState.cache!==$&&(J.flags|=2048),c4(p0,J),T0(J),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+J.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function VO(_,J){switch(AU(J),J.tag){case 1:return _=J.flags,_&65536?(J.flags=_&-65537|128,(J.mode&d1)!==x1&&f9(J),J):null;case 3:return c4(p0,J),x(J),_=J.flags,(_&65536)!==0&&(_&128)===0?(J.flags=_&-65537|128,J):null;case 26:case 27:case 5:return n(J),null;case 31:if(J.memoizedState!==null){if($5(J),J.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");D6()}return _=J.flags,_&65536?(J.flags=_&-65537|128,(J.mode&d1)!==x1&&f9(J),J):null;case 13:if($5(J),_=J.memoizedState,_!==null&&_.dehydrated!==null){if(J.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");D6()}return _=J.flags,_&65536?(J.flags=_&-65537|128,(J.mode&d1)!==x1&&f9(J),J):null;case 19:return $1(m0,J),null;case 4:return x(J),null;case 10:return c4(J.type,J),null;case 22:case 23:return $5(J),jU(J),_!==null&&$1(a6,J),_=J.flags,_&65536?(J.flags=_&-65537|128,(J.mode&d1)!==x1&&f9(J),J):null;case 24:return c4(p0,J),null;case 25:return null;default:return null}}function hY(_,J){switch(AU(J),J.tag){case 3:c4(p0,J),x(J);break;case 26:case 27:case 5:n(J);break;case 4:x(J);break;case 31:J.memoizedState!==null&&$5(J);break;case 13:$5(J);break;case 19:$1(m0,J);break;case 10:c4(J.type,J);break;case 22:case 23:$5(J),jU(J),_!==null&&$1(a6,J);break;case 24:c4(p0,J)}}function H4(_){return(_.mode&d1)!==x1}function mY(_,J){H4(_)?(X4(),v9(J,_),K4()):v9(J,_)}function MG(_,J,$){H4(_)?(X4(),d8($,_,J),K4()):d8($,_,J)}function v9(_,J){try{var $=J.updateQueue,q=$!==null?$.lastEffect:null;if(q!==null){var G=q.next;$=G;do{if(($.tag&_)===_&&(q=void 0,(_&v2)!==wQ&&(y7=!0),q=W1(J,eI,$),(_&v2)!==wQ&&(y7=!1),q!==void 0&&typeof q!=="function")){var F=void 0;F=($.tag&X5)!==0?"useLayoutEffect":($.tag&v2)!==0?"useInsertionEffect":"useEffect";var Y=void 0;Y=q===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof q.then==="function"?`
|
|
151
|
-
|
|
152
|
-
It looks like you wrote `+F+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
153
|
-
|
|
154
|
-
`+F+`(() => {
|
|
155
|
-
async function fetchData() {
|
|
156
|
-
// You can await here
|
|
157
|
-
const response = await MyAPI.getData(someId);
|
|
158
|
-
// ...
|
|
159
|
-
}
|
|
160
|
-
fetchData();
|
|
161
|
-
}, [someId]); // Or [] if effect doesn't need props or state
|
|
162
|
-
|
|
163
|
-
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+q,W1(J,function(A,w){console.error("%s must not return anything besides a function, which is used for clean-up.%s",A,w)},F,Y)}$=$.next}while($!==G)}}catch(A){H0(J,J.return,A)}}function d8(_,J,$){try{var q=J.updateQueue,G=q!==null?q.lastEffect:null;if(G!==null){var F=G.next;q=F;do{if((q.tag&_)===_){var Y=q.inst,A=Y.destroy;A!==void 0&&(Y.destroy=void 0,(_&v2)!==wQ&&(y7=!0),G=J,W1(G,_f,G,$,A),(_&v2)!==wQ&&(y7=!1))}q=q.next}while(q!==F)}}catch(w){H0(J,J.return,w)}}function gY(_,J){H4(_)?(X4(),v9(J,_),K4()):v9(J,_)}function TG(_,J,$){H4(_)?(X4(),d8($,_,J),K4()):d8($,_,J)}function pY(_){var J=_.updateQueue;if(J!==null){var $=_.stateNode;_.type.defaultProps||"ref"in _.memoizedProps||S7||($.props!==_.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",m(_)||"instance"),$.state!==_.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",m(_)||"instance"));try{W1(_,lH,J,$)}catch(q){H0(_,_.return,q)}}}function kO(_,J,$){return _.getSnapshotBeforeUpdate(J,$)}function DO(_,J){var{memoizedProps:$,memoizedState:q}=J;J=_.stateNode,_.type.defaultProps||"ref"in _.memoizedProps||S7||(J.props!==_.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",m(_)||"instance"),J.state!==_.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",m(_)||"instance"));try{var G=x6(_.type,$),F=W1(_,kO,J,G,q);$=IA,F!==void 0||$.has(_.type)||($.add(_.type),W1(_,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",m(_))})),J.__reactInternalSnapshotBeforeUpdate=F}catch(Y){H0(_,_.return,Y)}}function cY(_,J,$){$.props=x6(_.type,_.memoizedProps),$.state=_.memoizedState,H4(_)?(X4(),W1(_,pB,_,J,$),K4()):W1(_,pB,_,J,$)}function yO(_){var J=_.ref;if(J!==null){switch(_.tag){case 26:case 27:case 5:var $=_.stateNode;break;case 30:$=_.stateNode;break;default:$=_.stateNode}if(typeof J==="function")if(H4(_))try{X4(),_.refCleanup=J($)}finally{K4()}else _.refCleanup=J($);else typeof J==="string"?console.error("String refs are no longer supported."):J.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",m(_)),J.current=$}}function E9(_,J){try{W1(_,yO,_)}catch($){H0(_,J,$)}}function Y4(_,J){var{ref:$,refCleanup:q}=_;if($!==null)if(typeof q==="function")try{if(H4(_))try{X4(),W1(_,q)}finally{K4(_)}else W1(_,q)}catch(G){H0(_,J,G)}finally{_.refCleanup=null,_=_.alternate,_!=null&&(_.refCleanup=null)}else if(typeof $==="function")try{if(H4(_))try{X4(),W1(_,$,null)}finally{K4(_)}else W1(_,$,null)}catch(G){H0(_,J,G)}else $.current=null}function lY(_,J,$,q){var G=_.memoizedProps,F=G.id,Y=G.onCommit;G=G.onRender,J=J===null?"mount":"update",AQ&&(J="nested-update"),typeof G==="function"&&G(F,J,_.actualDuration,_.treeBaseDuration,_.actualStartTime,$),typeof Y==="function"&&Y(F,J,q,$)}function vO(_,J,$,q){var G=_.memoizedProps;_=G.id,G=G.onPostCommit,J=J===null?"mount":"update",AQ&&(J="nested-update"),typeof G==="function"&&G(_,J,q,$)}function rY(_){var{type:J,memoizedProps:$,stateNode:q}=_;try{W1(_,qw,q,J,$,_)}catch(G){H0(_,_.return,G)}}function RG(_,J,$){try{W1(_,Gw,_.stateNode,_.type,$,J,_)}catch(q){H0(_,_.return,q)}}function dY(_){return _.tag===5||_.tag===3||_.tag===26||_.tag===27&&E3(_.type)||_.tag===4}function OG(_){_:for(;;){for(;_.sibling===null;){if(_.return===null||dY(_.return))return null;_=_.return}_.sibling.return=_.return;for(_=_.sibling;_.tag!==5&&_.tag!==6&&_.tag!==18;){if(_.tag===27&&E3(_.type))continue _;if(_.flags&2)continue _;if(_.child===null||_.tag===4)continue _;else _.child.return=_,_=_.child}if(!(_.flags&2))return _.stateNode}}function wG(_,J,$){var q=_.tag;if(q===5||q===6)_=_.stateNode,J?(eW($),($.nodeType===9?$.body:$.nodeName==="HTML"?$.ownerDocument.body:$).insertBefore(_,J)):(eW($),J=$.nodeType===9?$.body:$.nodeName==="HTML"?$.ownerDocument.body:$,J.appendChild(_),$=$._reactRootContainer,$!==null&&$!==void 0||J.onclick!==null||(J.onclick=m4));else if(q!==4&&(q===27&&E3(_.type)&&($=_.stateNode,J=null),_=_.child,_!==null))for(wG(_,J,$),_=_.sibling;_!==null;)wG(_,J,$),_=_.sibling}function V$(_,J,$){var q=_.tag;if(q===5||q===6)_=_.stateNode,J?$.insertBefore(_,J):$.appendChild(_);else if(q!==4&&(q===27&&E3(_.type)&&($=_.stateNode),_=_.child,_!==null))for(V$(_,J,$),_=_.sibling;_!==null;)V$(_,J,$),_=_.sibling}function EO(_){for(var J,$=_.return;$!==null;){if(dY($)){J=$;break}$=$.return}if(J==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(J.tag){case 27:J=J.stateNode,$=OG(_),V$(_,$,J);break;case 5:$=J.stateNode,J.flags&32&&(nW($),J.flags&=-33),J=OG(_),V$(_,J,$);break;case 3:case 4:J=J.stateNode.containerInfo,$=OG(_),wG(_,$,J);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function iY(_){var{stateNode:J,memoizedProps:$}=_;try{W1(_,ww,_.type,$,J,_)}catch(q){H0(_,_.return,q)}}function aY(_,J){return J.tag===31?(J=J.memoizedState,_.memoizedState!==null&&J===null):J.tag===13?(_=_.memoizedState,J=J.memoizedState,_!==null&&_.dehydrated!==null&&(J===null||J.dehydrated===null)):J.tag===3?_.memoizedState.isDehydrated&&(J.flags&256)===0:!1}function bO(_,J){if(_=_.containerInfo,OF=tQ,_=XH(_),UU(_)){if("selectionStart"in _)var $={start:_.selectionStart,end:_.selectionEnd};else _:{$=($=_.ownerDocument)&&$.defaultView||window;var q=$.getSelection&&$.getSelection();if(q&&q.rangeCount!==0){$=q.anchorNode;var{anchorOffset:G,focusNode:F}=q;q=q.focusOffset;try{$.nodeType,F.nodeType}catch(T1){$=null;break _}var Y=0,A=-1,w=-1,N=0,t=0,o=_,l=null;J:for(;;){for(var U1;;){if(o!==$||G!==0&&o.nodeType!==3||(A=Y+G),o!==F||q!==0&&o.nodeType!==3||(w=Y+q),o.nodeType===3&&(Y+=o.nodeValue.length),(U1=o.firstChild)===null)break;l=o,o=U1}for(;;){if(o===_)break J;if(l===$&&++N===G&&(A=Y),l===F&&++t===q&&(w=Y),(U1=o.nextSibling)!==null)break;o=l,l=o.parentNode}o=U1}$=A===-1||w===-1?null:{start:A,end:w}}else $=null}$=$||{start:0,end:0}}else $=null;wF={focusedElem:_,selectionRange:$},tQ=!1;for(U2=J;U2!==null;)if(J=U2,_=J.child,(J.subtreeFlags&1028)!==0&&_!==null)_.return=J,U2=_;else for(;U2!==null;){switch(_=J=U2,$=_.alternate,G=_.flags,_.tag){case 0:if((G&4)!==0&&(_=_.updateQueue,_=_!==null?_.events:null,_!==null))for($=0;$<_.length;$++)G=_[$],G.ref.impl=G.nextImpl;break;case 11:case 15:break;case 1:(G&1024)!==0&&$!==null&&DO(_,$);break;case 3:if((G&1024)!==0){if(_=_.stateNode.containerInfo,$=_.nodeType,$===9)pG(_);else if($===1)switch(_.nodeName){case"HEAD":case"HTML":case"BODY":pG(_);break;default:_.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((G&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(_=J.sibling,_!==null){_.return=J.return,U2=_;break}U2=J.return}}function sY(_,J,$){var q=_5(),G=U4(),F=Z4(),Y=F4(),A=$.flags;switch($.tag){case 0:case 11:case 15:W4(_,$),A&4&&mY($,X5|C5);break;case 1:if(W4(_,$),A&4)if(_=$.stateNode,J===null)$.type.defaultProps||"ref"in $.memoizedProps||S7||(_.props!==$.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",m($)||"instance"),_.state!==$.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",m($)||"instance")),H4($)?(X4(),W1($,cZ,$,_),K4()):W1($,cZ,$,_);else{var w=x6($.type,J.memoizedProps);J=J.memoizedState,$.type.defaultProps||"ref"in $.memoizedProps||S7||(_.props!==$.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",m($)||"instance"),_.state!==$.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",m($)||"instance")),H4($)?(X4(),W1($,hB,$,_,w,J,_.__reactInternalSnapshotBeforeUpdate),K4()):W1($,hB,$,_,w,J,_.__reactInternalSnapshotBeforeUpdate)}A&64&&pY($),A&512&&E9($,$.return);break;case 3:if(J=l4(),W4(_,$),A&64&&(A=$.updateQueue,A!==null)){if(w=null,$.child!==null)switch($.child.tag){case 27:case 5:w=$.child.stateNode;break;case 1:w=$.child.stateNode}try{W1($,lH,A,w)}catch(t){H0($,$.return,t)}}_.effectDuration+=Q$(J);break;case 27:J===null&&A&4&&iY($);case 26:case 5:if(W4(_,$),J===null){if(A&4)rY($);else if(A&64){_=$.type,J=$.memoizedProps,w=$.stateNode;try{W1($,Uw,w,_,J,$)}catch(t){H0($,$.return,t)}}}A&512&&E9($,$.return);break;case 12:if(A&4){A=l4(),W4(_,$),_=$.stateNode,_.effectDuration+=I9(A);try{W1($,lY,$,J,r3,_.effectDuration)}catch(t){H0($,$.return,t)}}else W4(_,$);break;case 31:W4(_,$),A&4&&nY(_,$);break;case 13:W4(_,$),A&4&&eY(_,$),A&64&&(_=$.memoizedState,_!==null&&(_=_.dehydrated,_!==null&&(A=rO.bind(null,$),Mw(_,A))));break;case 22:if(A=$.memoizedState!==null||G3,!A){J=J!==null&&J.memoizedState!==null||d0,w=G3;var N=d0;G3=A,(d0=J)&&!N?(z4(_,$,($.subtreeFlags&8772)!==0),($.mode&d1)!==x1&&0<=D1&&0<=u1&&0.05<u1-D1&&iJ($,D1,u1)):W4(_,$),G3=w,d0=N}break;case 30:break;default:W4(_,$)}($.mode&d1)!==x1&&0<=D1&&0<=u1&&((D0||0.05<S0)&&Q4($,D1,u1,S0,P0),$.alternate===null&&$.return!==null&&$.return.alternate!==null&&0.05<u1-D1&&(aY($.return.alternate,$.return)||$4($,D1,u1,"Mount"))),J5(q),G4(G),P0=F,D0=Y}function tY(_){var J=_.alternate;J!==null&&(_.alternate=null,tY(J)),_.child=null,_.deletions=null,_.sibling=null,_.tag===5&&(J=_.stateNode,J!==null&&R1(J)),_.stateNode=null,_._debugOwner=null,_.return=null,_.dependencies=null,_.memoizedProps=null,_.memoizedState=null,_.pendingProps=null,_.stateNode=null,_.updateQueue=null}function i4(_,J,$){for($=$.child;$!==null;)oY(_,J,$),$=$.sibling}function oY(_,J,$){if(T2&&typeof T2.onCommitFiberUnmount==="function")try{T2.onCommitFiberUnmount(q7,$)}catch(N){R4||(R4=!0,console.error("React instrumentation encountered an error: %o",N))}var q=_5(),G=U4(),F=Z4(),Y=F4();switch($.tag){case 26:d0||Y4($,J),i4(_,J,$),$.memoizedState?$.memoizedState.count--:$.stateNode&&(_=$.stateNode,_.parentNode.removeChild(_));break;case 27:d0||Y4($,J);var A=i0,w=d2;E3($.type)&&(i0=$.stateNode,d2=!1),i4(_,J,$),W1($,l9,$.stateNode),i0=A,d2=w;break;case 5:d0||Y4($,J);case 6:if(A=i0,w=d2,i0=null,i4(_,J,$),i0=A,d2=w,i0!==null)if(d2)try{W1($,Kw,i0,$.stateNode)}catch(N){H0($,J,N)}else try{W1($,Fw,i0,$.stateNode)}catch(N){H0($,J,N)}break;case 18:i0!==null&&(d2?(_=i0,_z(_.nodeType===9?_.body:_.nodeName==="HTML"?_.ownerDocument.body:_,$.stateNode),_7(_)):_z(i0,$.stateNode));break;case 4:A=i0,w=d2,i0=$.stateNode.containerInfo,d2=!0,i4(_,J,$),i0=A,d2=w;break;case 0:case 11:case 14:case 15:d8(v2,$,J),d0||MG($,J,X5),i4(_,J,$);break;case 1:d0||(Y4($,J),A=$.stateNode,typeof A.componentWillUnmount==="function"&&cY($,J,A)),i4(_,J,$);break;case 21:i4(_,J,$);break;case 22:d0=(A=d0)||$.memoizedState!==null,i4(_,J,$),d0=A;break;default:i4(_,J,$)}($.mode&d1)!==x1&&0<=D1&&0<=u1&&(D0||0.05<S0)&&Q4($,D1,u1,S0,P0),J5(q),G4(G),P0=F,D0=Y}function nY(_,J){if(J.memoizedState===null&&(_=J.alternate,_!==null&&(_=_.memoizedState,_!==null))){_=_.dehydrated;try{W1(J,Rw,_)}catch($){H0(J,J.return,$)}}}function eY(_,J){if(J.memoizedState===null&&(_=J.alternate,_!==null&&(_=_.memoizedState,_!==null&&(_=_.dehydrated,_!==null))))try{W1(J,Ow,_)}catch($){H0(J,J.return,$)}}function uO(_){switch(_.tag){case 31:case 13:case 19:var J=_.stateNode;return J===null&&(J=_.stateNode=new fA),J;case 22:return _=_.stateNode,J=_._retryCache,J===null&&(J=_._retryCache=new fA),J;default:throw Error("Unexpected Suspense handler tag ("+_.tag+"). This is a bug in React.")}}function k$(_,J){var $=uO(_);J.forEach(function(q){if(!$.has(q)){if($.add(q),O4)if(j7!==null&&V7!==null)h9(V7,j7);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var G=dO.bind(null,_,q);q.then(G,G)}})}function l2(_,J){var $=J.deletions;if($!==null)for(var q=0;q<$.length;q++){var G=_,F=J,Y=$[q],A=_5(),w=F;_:for(;w!==null;){switch(w.tag){case 27:if(E3(w.type)){i0=w.stateNode,d2=!1;break _}break;case 5:i0=w.stateNode,d2=!1;break _;case 3:case 4:i0=w.stateNode.containerInfo,d2=!0;break _}w=w.return}if(i0===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");oY(G,F,Y),i0=null,d2=!1,(Y.mode&d1)!==x1&&0<=D1&&0<=u1&&0.05<u1-D1&&$4(Y,D1,u1,"Unmount"),J5(A),G=Y,F=G.alternate,F!==null&&(F.return=null),G.return=null}if(J.subtreeFlags&13886)for(J=J.child;J!==null;)_W(J,_),J=J.sibling}function _W(_,J){var $=_5(),q=U4(),G=Z4(),F=F4(),Y=_.alternate,A=_.flags;switch(_.tag){case 0:case 11:case 14:case 15:l2(J,_),r2(_),A&4&&(d8(v2|C5,_,_.return),v9(v2|C5,_),MG(_,_.return,X5|C5));break;case 1:if(l2(J,_),r2(_),A&512&&(d0||Y===null||Y4(Y,Y.return)),A&64&&G3&&(A=_.updateQueue,A!==null&&(Y=A.callbacks,Y!==null))){var w=A.shared.hiddenCallbacks;A.shared.hiddenCallbacks=w===null?Y:w.concat(Y)}break;case 26:if(w=l5,l2(J,_),r2(_),A&512&&(d0||Y===null||Y4(Y,Y.return)),A&4){var N=Y!==null?Y.memoizedState:null;if(A=_.memoizedState,Y===null)if(A===null)if(_.stateNode===null){_:{A=_.type,Y=_.memoizedProps,w=w.ownerDocument||w;J:switch(A){case"title":if(N=w.getElementsByTagName("title")[0],!N||N[o9]||N[H2]||N.namespaceURI===G7||N.hasAttribute("itemprop"))N=w.createElement(A),w.head.insertBefore(N,w.querySelector("head > title"));X2(N,A,Y),N[H2]=_,V1(N),A=N;break _;case"link":var t=Hz("link","href",w).get(A+(Y.href||""));if(t){for(var o=0;o<t.length;o++)if(N=t[o],N.getAttribute("href")===(Y.href==null||Y.href===""?null:Y.href)&&N.getAttribute("rel")===(Y.rel==null?null:Y.rel)&&N.getAttribute("title")===(Y.title==null?null:Y.title)&&N.getAttribute("crossorigin")===(Y.crossOrigin==null?null:Y.crossOrigin)){t.splice(o,1);break J}}N=w.createElement(A),X2(N,A,Y),w.head.appendChild(N);break;case"meta":if(t=Hz("meta","content",w).get(A+(Y.content||""))){for(o=0;o<t.length;o++)if(N=t[o],j1(Y.content,"content"),N.getAttribute("content")===(Y.content==null?null:""+Y.content)&&N.getAttribute("name")===(Y.name==null?null:Y.name)&&N.getAttribute("property")===(Y.property==null?null:Y.property)&&N.getAttribute("http-equiv")===(Y.httpEquiv==null?null:Y.httpEquiv)&&N.getAttribute("charset")===(Y.charSet==null?null:Y.charSet)){t.splice(o,1);break J}}N=w.createElement(A),X2(N,A,Y),w.head.appendChild(N);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+A+'". This is a bug in React.')}N[H2]=_,V1(N),A=N}_.stateNode=A}else Yz(w,_.type,_.stateNode);else _.stateNode=Xz(w,A,_.memoizedProps);else N!==A?(N===null?Y.stateNode!==null&&(Y=Y.stateNode,Y.parentNode.removeChild(Y)):N.count--,A===null?Yz(w,_.type,_.stateNode):Xz(w,A,_.memoizedProps)):A===null&&_.stateNode!==null&&RG(_,_.memoizedProps,Y.memoizedProps)}break;case 27:l2(J,_),r2(_),A&512&&(d0||Y===null||Y4(Y,Y.return)),Y!==null&&A&4&&RG(_,_.memoizedProps,Y.memoizedProps);break;case 5:if(l2(J,_),r2(_),A&512&&(d0||Y===null||Y4(Y,Y.return)),_.flags&32){w=_.stateNode;try{W1(_,nW,w)}catch(w1){H0(_,_.return,w1)}}A&4&&_.stateNode!=null&&(w=_.memoizedProps,RG(_,w,Y!==null?Y.memoizedProps:w)),A&1024&&($F=!0,_.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(l2(J,_),r2(_),A&4){if(_.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");A=_.memoizedProps,Y=Y!==null?Y.memoizedProps:A,w=_.stateNode;try{W1(_,Zw,w,Y,A)}catch(w1){H0(_,_.return,w1)}}break;case 3:if(w=l4(),iQ=null,N=l5,l5=h$(J.containerInfo),l2(J,_),l5=N,r2(_),A&4&&Y!==null&&Y.memoizedState.isDehydrated)try{W1(_,Tw,J.containerInfo)}catch(w1){H0(_,_.return,w1)}$F&&($F=!1,JW(_)),J.effectDuration+=Q$(w);break;case 4:A=l5,l5=h$(_.stateNode.containerInfo),l2(J,_),r2(_),l5=A;break;case 12:A=l4(),l2(J,_),r2(_),_.stateNode.effectDuration+=I9(A);break;case 31:l2(J,_),r2(_),A&4&&(A=_.updateQueue,A!==null&&(_.updateQueue=null,k$(_,A)));break;case 13:l2(J,_),r2(_),_.child.flags&8192&&_.memoizedState!==null!==(Y!==null&&Y.memoizedState!==null)&&(DQ=Q2()),A&4&&(A=_.updateQueue,A!==null&&(_.updateQueue=null,k$(_,A)));break;case 22:w=_.memoizedState!==null;var l=Y!==null&&Y.memoizedState!==null,U1=G3,T1=d0;if(G3=U1||w,d0=T1||l,l2(J,_),d0=T1,G3=U1,l&&!w&&!U1&&!T1&&(_.mode&d1)!==x1&&0<=D1&&0<=u1&&0.05<u1-D1&&iJ(_,D1,u1),r2(_),A&8192)_:for(J=_.stateNode,J._visibility=w?J._visibility&~G_:J._visibility|G_,!w||Y===null||l||G3||d0||(h6(_),(_.mode&d1)!==x1&&0<=D1&&0<=u1&&0.05<u1-D1&&$4(_,D1,u1,"Disconnect")),Y=null,J=_;;){if(J.tag===5||J.tag===26){if(Y===null){l=Y=J;try{N=l.stateNode,w?W1(l,Hw,N):W1(l,zw,l.stateNode,l.memoizedProps)}catch(w1){H0(l,l.return,w1)}}}else if(J.tag===6){if(Y===null){l=J;try{t=l.stateNode,w?W1(l,Yw,t):W1(l,Bw,t,l.memoizedProps)}catch(w1){H0(l,l.return,w1)}}}else if(J.tag===18){if(Y===null){l=J;try{o=l.stateNode,w?W1(l,Xw,o):W1(l,Ww,l.stateNode)}catch(w1){H0(l,l.return,w1)}}}else if((J.tag!==22&&J.tag!==23||J.memoizedState===null||J===_)&&J.child!==null){J.child.return=J,J=J.child;continue}if(J===_)break _;for(;J.sibling===null;){if(J.return===null||J.return===_)break _;Y===J&&(Y=null),J=J.return}Y===J&&(Y=null),J.sibling.return=J.return,J=J.sibling}A&4&&(A=_.updateQueue,A!==null&&(Y=A.retryQueue,Y!==null&&(A.retryQueue=null,k$(_,Y))));break;case 19:l2(J,_),r2(_),A&4&&(A=_.updateQueue,A!==null&&(_.updateQueue=null,k$(_,A)));break;case 30:break;case 21:break;default:l2(J,_),r2(_)}(_.mode&d1)!==x1&&0<=D1&&0<=u1&&((D0||0.05<S0)&&Q4(_,D1,u1,S0,P0),_.alternate===null&&_.return!==null&&_.return.alternate!==null&&0.05<u1-D1&&(aY(_.return.alternate,_.return)||$4(_,D1,u1,"Mount"))),J5($),G4(q),P0=G,D0=F}function r2(_){var J=_.flags;if(J&2){try{W1(_,EO,_)}catch($){H0(_,_.return,$)}_.flags&=-3}J&4096&&(_.flags&=-4097)}function JW(_){if(_.subtreeFlags&1024)for(_=_.child;_!==null;){var J=_;JW(J),J.tag===5&&J.flags&1024&&J.stateNode.reset(),_=_.sibling}}function W4(_,J){if(J.subtreeFlags&8772)for(J=J.child;J!==null;)sY(_,J.alternate,J),J=J.sibling}function $W(_){var J=_5(),$=U4(),q=Z4(),G=F4();switch(_.tag){case 0:case 11:case 14:case 15:MG(_,_.return,X5),h6(_);break;case 1:Y4(_,_.return);var F=_.stateNode;typeof F.componentWillUnmount==="function"&&cY(_,_.return,F),h6(_);break;case 27:W1(_,l9,_.stateNode);case 26:case 5:Y4(_,_.return),h6(_);break;case 22:_.memoizedState===null&&h6(_);break;case 30:h6(_);break;default:h6(_)}(_.mode&d1)!==x1&&0<=D1&&0<=u1&&(D0||0.05<S0)&&Q4(_,D1,u1,S0,P0),J5(J),G4($),P0=q,D0=G}function h6(_){for(_=_.child;_!==null;)$W(_),_=_.sibling}function QW(_,J,$,q){var G=_5(),F=U4(),Y=Z4(),A=F4(),w=$.flags;switch($.tag){case 0:case 11:case 15:z4(_,$,q),mY($,X5);break;case 1:if(z4(_,$,q),J=$.stateNode,typeof J.componentDidMount==="function"&&W1($,cZ,$,J),J=$.updateQueue,J!==null){_=$.stateNode;try{W1($,TO,J,_)}catch(N){H0($,$.return,N)}}q&&w&64&&pY($),E9($,$.return);break;case 27:iY($);case 26:case 5:z4(_,$,q),q&&J===null&&w&4&&rY($),E9($,$.return);break;case 12:if(q&&w&4){w=l4(),z4(_,$,q),q=$.stateNode,q.effectDuration+=I9(w);try{W1($,lY,$,J,r3,q.effectDuration)}catch(N){H0($,$.return,N)}}else z4(_,$,q);break;case 31:z4(_,$,q),q&&w&4&&nY(_,$);break;case 13:z4(_,$,q),q&&w&4&&eY(_,$);break;case 22:$.memoizedState===null&&z4(_,$,q),E9($,$.return);break;case 30:break;default:z4(_,$,q)}($.mode&d1)!==x1&&0<=D1&&0<=u1&&(D0||0.05<S0)&&Q4($,D1,u1,S0,P0),J5(G),G4(F),P0=Y,D0=A}function z4(_,J,$){$=$&&(J.subtreeFlags&8772)!==0;for(J=J.child;J!==null;)QW(_,J.alternate,J,$),J=J.sibling}function IG(_,J){var $=null;_!==null&&_.memoizedState!==null&&_.memoizedState.cachePool!==null&&($=_.memoizedState.cachePool.pool),_=null,J.memoizedState!==null&&J.memoizedState.cachePool!==null&&(_=J.memoizedState.cachePool.pool),_!==$&&(_!=null&&v6(_),$!=null&&w9($))}function fG(_,J){_=null,J.alternate!==null&&(_=J.alternate.memoizedState.cache),J=J.memoizedState.cache,J!==_&&(v6(J),_!=null&&w9(_))}function x5(_,J,$,q,G){if(J.subtreeFlags&10256||J.actualDuration!==0&&(J.alternate===null||J.alternate.child!==J.child))for(J=J.child;J!==null;){var F=J.sibling;qW(_,J,$,q,F!==null?F.actualStartTime:G),J=F}}function qW(_,J,$,q,G){var F=_5(),Y=U4(),A=Z4(),w=F4(),N=g3,t=J.flags;switch(J.tag){case 0:case 11:case 15:(J.mode&d1)!==x1&&0<J.actualStartTime&&(J.flags&1)!==0&&aJ(J,J.actualStartTime,G,t0,$),x5(_,J,$,q,G),t&2048&&gY(J,E2|C5);break;case 1:(J.mode&d1)!==x1&&0<J.actualStartTime&&((J.flags&128)!==0?ZU(J,J.actualStartTime,G,[]):(J.flags&1)!==0&&aJ(J,J.actualStartTime,G,t0,$)),x5(_,J,$,q,G);break;case 3:var o=l4(),l=t0;t0=J.alternate!==null&&J.alternate.memoizedState.isDehydrated&&(J.flags&256)===0,x5(_,J,$,q,G),t0=l,t&2048&&($=null,J.alternate!==null&&($=J.alternate.memoizedState.cache),q=J.memoizedState.cache,q!==$&&(v6(q),$!=null&&w9($))),_.passiveEffectDuration+=Q$(o);break;case 12:if(t&2048){t=l4(),x5(_,J,$,q,G),_=J.stateNode,_.passiveEffectDuration+=I9(t);try{W1(J,vO,J,J.alternate,r3,_.passiveEffectDuration)}catch(U1){H0(J,J.return,U1)}}else x5(_,J,$,q,G);break;case 31:t=t0,o=J.alternate!==null?J.alternate.memoizedState:null,l=J.memoizedState,o!==null&&l===null?(l=J.deletions,l!==null&&0<l.length&&l[0].tag===18?(t0=!1,o=o.hydrationErrors,o!==null&&ZU(J,J.actualStartTime,G,o)):t0=!0):t0=!1,x5(_,J,$,q,G),t0=t;break;case 13:t=t0,o=J.alternate!==null?J.alternate.memoizedState:null,l=J.memoizedState,o===null||o.dehydrated===null||l!==null&&l.dehydrated!==null?t0=!1:(l=J.deletions,l!==null&&0<l.length&&l[0].tag===18?(t0=!1,o=o.hydrationErrors,o!==null&&ZU(J,J.actualStartTime,G,o)):t0=!0),x5(_,J,$,q,G),t0=t;break;case 23:break;case 22:l=J.stateNode,o=J.alternate,J.memoizedState!==null?l._visibility&t4?x5(_,J,$,q,G):b9(_,J,$,q,G):l._visibility&t4?x5(_,J,$,q,G):(l._visibility|=t4,i8(_,J,$,q,(J.subtreeFlags&10256)!==0||J.actualDuration!==0&&(J.alternate===null||J.alternate.child!==J.child),G),(J.mode&d1)===x1||t0||(_=J.actualStartTime,0<=_&&0.05<G-_&&iJ(J,_,G),0<=D1&&0<=u1&&0.05<u1-D1&&iJ(J,D1,u1))),t&2048&&IG(o,J);break;case 24:x5(_,J,$,q,G),t&2048&&fG(J.alternate,J);break;default:x5(_,J,$,q,G)}if((J.mode&d1)!==x1){if(_=!t0&&J.alternate===null&&J.return!==null&&J.return.alternate!==null)$=J.actualStartTime,0<=$&&0.05<G-$&&$4(J,$,G,"Mount");0<=D1&&0<=u1&&((D0||0.05<S0)&&Q4(J,D1,u1,S0,P0),_&&0.05<u1-D1&&$4(J,D1,u1,"Mount"))}J5(F),G4(Y),P0=A,D0=w,g3=N}function i8(_,J,$,q,G,F){G=G&&((J.subtreeFlags&10256)!==0||J.actualDuration!==0&&(J.alternate===null||J.alternate.child!==J.child));for(J=J.child;J!==null;){var Y=J.sibling;UW(_,J,$,q,G,Y!==null?Y.actualStartTime:F),J=Y}}function UW(_,J,$,q,G,F){var Y=_5(),A=U4(),w=Z4(),N=F4(),t=g3;G&&(J.mode&d1)!==x1&&0<J.actualStartTime&&(J.flags&1)!==0&&aJ(J,J.actualStartTime,F,t0,$);var o=J.flags;switch(J.tag){case 0:case 11:case 15:i8(_,J,$,q,G,F),gY(J,E2);break;case 23:break;case 22:var l=J.stateNode;J.memoizedState!==null?l._visibility&t4?i8(_,J,$,q,G,F):b9(_,J,$,q,F):(l._visibility|=t4,i8(_,J,$,q,G,F)),G&&o&2048&&IG(J.alternate,J);break;case 24:i8(_,J,$,q,G,F),G&&o&2048&&fG(J.alternate,J);break;default:i8(_,J,$,q,G,F)}(J.mode&d1)!==x1&&0<=D1&&0<=u1&&(D0||0.05<S0)&&Q4(J,D1,u1,S0,P0),J5(Y),G4(A),P0=w,D0=N,g3=t}function b9(_,J,$,q,G){if(J.subtreeFlags&10256||J.actualDuration!==0&&(J.alternate===null||J.alternate.child!==J.child))for(var F=J.child;F!==null;){J=F.sibling;var Y=_,A=$,w=q,N=J!==null?J.actualStartTime:G,t=g3;(F.mode&d1)!==x1&&0<F.actualStartTime&&(F.flags&1)!==0&&aJ(F,F.actualStartTime,N,t0,A);var o=F.flags;switch(F.tag){case 22:b9(Y,F,A,w,N),o&2048&&IG(F.alternate,F);break;case 24:b9(Y,F,A,w,N),o&2048&&fG(F.alternate,F);break;default:b9(Y,F,A,w,N)}g3=t,F=J}}function a8(_,J,$){if(_.subtreeFlags&N_)for(_=_.child;_!==null;)GW(_,J,$),_=_.sibling}function GW(_,J,$){switch(_.tag){case 26:a8(_,J,$),_.flags&N_&&_.memoizedState!==null&&Pw($,l5,_.memoizedState,_.memoizedProps);break;case 5:a8(_,J,$);break;case 3:case 4:var q=l5;l5=h$(_.stateNode.containerInfo),a8(_,J,$),l5=q;break;case 22:_.memoizedState===null&&(q=_.alternate,q!==null&&q.memoizedState!==null?(q=N_,N_=16777216,a8(_,J,$),N_=q):a8(_,J,$));break;default:a8(_,J,$)}}function ZW(_){var J=_.alternate;if(J!==null&&(_=J.child,_!==null)){J.child=null;do J=_.sibling,_.sibling=null,_=J;while(_!==null)}}function u9(_){var J=_.deletions;if((_.flags&16)!==0){if(J!==null)for(var $=0;$<J.length;$++){var q=J[$],G=_5();U2=q,XW(q,_),(q.mode&d1)!==x1&&0<=D1&&0<=u1&&0.05<u1-D1&&$4(q,D1,u1,"Unmount"),J5(G)}ZW(_)}if(_.subtreeFlags&10256)for(_=_.child;_!==null;)FW(_),_=_.sibling}function FW(_){var J=_5(),$=U4(),q=Z4(),G=F4();switch(_.tag){case 0:case 11:case 15:u9(_),_.flags&2048&&TG(_,_.return,E2|C5);break;case 3:var F=l4();u9(_),_.stateNode.passiveEffectDuration+=Q$(F);break;case 12:F=l4(),u9(_),_.stateNode.passiveEffectDuration+=I9(F);break;case 22:F=_.stateNode,_.memoizedState!==null&&F._visibility&t4&&(_.return===null||_.return.tag!==13)?(F._visibility&=~t4,D$(_),(_.mode&d1)!==x1&&0<=D1&&0<=u1&&0.05<u1-D1&&$4(_,D1,u1,"Disconnect")):u9(_);break;default:u9(_)}(_.mode&d1)!==x1&&0<=D1&&0<=u1&&(D0||0.05<S0)&&Q4(_,D1,u1,S0,P0),J5(J),G4($),D0=G,P0=q}function D$(_){var J=_.deletions;if((_.flags&16)!==0){if(J!==null)for(var $=0;$<J.length;$++){var q=J[$],G=_5();U2=q,XW(q,_),(q.mode&d1)!==x1&&0<=D1&&0<=u1&&0.05<u1-D1&&$4(q,D1,u1,"Unmount"),J5(G)}ZW(_)}for(_=_.child;_!==null;)KW(_),_=_.sibling}function KW(_){var J=_5(),$=U4(),q=Z4(),G=F4();switch(_.tag){case 0:case 11:case 15:TG(_,_.return,E2),D$(_);break;case 22:var F=_.stateNode;F._visibility&t4&&(F._visibility&=~t4,D$(_));break;default:D$(_)}(_.mode&d1)!==x1&&0<=D1&&0<=u1&&(D0||0.05<S0)&&Q4(_,D1,u1,S0,P0),J5(J),G4($),D0=G,P0=q}function XW(_,J){for(;U2!==null;){var $=U2,q=$,G=J,F=_5(),Y=U4(),A=Z4(),w=F4();switch(q.tag){case 0:case 11:case 15:TG(q,G,E2);break;case 23:case 22:q.memoizedState!==null&&q.memoizedState.cachePool!==null&&(G=q.memoizedState.cachePool.pool,G!=null&&v6(G));break;case 24:w9(q.memoizedState.cache)}if((q.mode&d1)!==x1&&0<=D1&&0<=u1&&(D0||0.05<S0)&&Q4(q,D1,u1,S0,P0),J5(F),G4(Y),D0=w,P0=A,q=$.child,q!==null)q.return=$,U2=q;else _:for($=_;U2!==null;){if(q=U2,F=q.sibling,Y=q.return,tY(q),q===$){U2=null;break _}if(F!==null){F.return=Y,U2=F;break _}U2=Y}}}function xO(){Uf.forEach(function(_){return _()})}function HW(){var _=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return _||Z1.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),_}function Q5(_){if((Z0&o0)!==G2&&a1!==0)return a1&-a1;var J=Z1.T;return J!==null?(J._updatedFibers||(J._updatedFibers=new Set),J._updatedFibers.add(_),DG()):e()}function YW(){if(a2===0)if((a1&536870912)===0||J0){var _=o$;o$<<=1,(o$&3932160)===0&&(o$=262144),a2=_}else a2=536870912;return _=K5.current,_!==null&&(_.flags|=32),a2}function k0(_,J,$){if(y7&&console.error("useInsertionEffect must not schedule updates."),WF&&(bQ=!0),_===M0&&(z0===_8||z0===J8)||_.cancelPendingCommit!==null)t8(_,0),y3(_,a1,a2,!1);if(L2(_,$),(Z0&o0)!==G2&&_===M0){if(T4)switch(J.tag){case 0:case 11:case 15:_=s1&&m(s1)||"Unknown",hA.has(_)||(hA.add(_),J=m(J)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",J,_,_));break;case 1:xA||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),xA=!0)}}else O4&&I6(_,J,$),aO(J),_===M0&&((Z0&o0)===G2&&(_6|=$),j0===o3&&y3(_,a1,a2,!1)),B4(_)}function WW(_,J,$){if((Z0&(o0|H5))!==G2)throw Error("Should not already be working.");if(a1!==0&&s1!==null){var q=s1,G=Q2();switch(kB){case j_:case _8:var F=Y_;O0&&((q=q._debugTask)?q.run(console.timeStamp.bind(console,"Suspended",F,G,T5,void 0,"primary-light")):console.timeStamp("Suspended",F,G,T5,void 0,"primary-light"));break;case J8:F=Y_,O0&&((q=q._debugTask)?q.run(console.timeStamp.bind(console,"Action",F,G,T5,void 0,"primary-light")):console.timeStamp("Action",F,G,T5,void 0,"primary-light"));break;default:O0&&(q=G-Y_,3>q||console.timeStamp("Blocked",Y_,G,T5,void 0,5>q?"primary-light":10>q?"primary":100>q?"primary-dark":"error"))}}F=($=!$&&(J&127)===0&&(J&_.expiredLanes)===0||f2(_,J))?mO(_,J):NG(_,J,!0);var Y=$;do{if(F===Z3){k7&&!$&&y3(_,J,0,!1),J=z0,Y_=c0(),kB=J;break}else{if(q=Q2(),G=_.current.alternate,Y&&!hO(G)){n2(J),G=q2,F=q,!O0||F<=G||(b0?b0.run(console.timeStamp.bind(console,"Teared Render",G,F,e1,n1,"error")):console.timeStamp("Teared Render",G,F,e1,n1,"error")),m6(J,q),F=NG(_,J,!1),Y=!1;continue}if(F===e6){if(Y=J,_.errorRecoveryDisabledLanes&Y)var A=0;else A=_.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){n2(J),FU(q2,q,J,b0),m6(J,q),J=A;_:{q=_,F=Y,Y=k_;var w=q.current.memoizedState.isDehydrated;if(w&&(t8(q,A).flags|=256),A=NG(q,A,!1),A!==e6){if(UF&&!w){q.errorRecoveryDisabledLanes|=F,_6|=F,F=o3;break _}q=b2,b2=Y,q!==null&&(b2===null?b2=q:b2.push.apply(b2,q))}F=A}if(Y=!1,F!==e6)continue;else q=Q2()}}if(F===S_){n2(J),FU(q2,q,J,b0),m6(J,q),t8(_,0),y3(_,J,0,!0);break}_:{switch($=_,F){case Z3:case S_:throw Error("Root did not complete. This is a bug in React.");case o3:if((J&4194048)!==J)break;case SQ:n2(J),WH(q2,q,J,b0),m6(J,q),G=J,(G&127)!==0?WQ=q:(G&4194048)!==0&&(zQ=q),y3($,J,a2,!n3);break _;case e6:b2=null;break;case CQ:case PA:break;default:throw Error("Unknown root exit status.")}if(Z1.actQueue!==null)CG($,G,J,b2,D_,kQ,a2,_6,$8,F,null,null,q2,q);else{if((J&62914560)===J&&(Y=DQ+SA-Q2(),10<Y)){if(y3($,J,a2,!n3),I2($,0,!0)!==0)break _;r5=J,$.timeoutHandle=iA(zW.bind(null,$,G,b2,D_,kQ,J,a2,_6,$8,n3,F,"Throttled",q2,q),Y);break _}zW($,G,b2,D_,kQ,J,a2,_6,$8,n3,F,null,q2,q)}}}break}while(1);B4(_)}function zW(_,J,$,q,G,F,Y,A,w,N,t,o,l,U1){_.timeoutHandle=Z8;var T1=J.subtreeFlags,w1=null;if(T1&8192||(T1&16785408)===16785408){if(w1={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:m4},GW(J,F,w1),T1=(F&62914560)===F?DQ-Q2():(F&4194048)===F?CA-Q2():0,T1=Nw(w1,T1),T1!==null){r5=F,_.cancelPendingCommit=T1(CG.bind(null,_,J,F,$,q,G,Y,A,w,t,w1,w1.waitingForViewTransition?"Waiting for the previous Animation":0<w1.count?0<w1.imgCount?"Suspended on CSS and Images":"Suspended on CSS":w1.imgCount===1?"Suspended on an Image":0<w1.imgCount?"Suspended on Images":null,l,U1)),y3(_,F,Y,!N);return}}CG(_,J,F,$,q,G,Y,A,w,t,w1,o,l,U1)}function hO(_){for(var J=_;;){var $=J.tag;if(($===0||$===11||$===15)&&J.flags&16384&&($=J.updateQueue,$!==null&&($=$.stores,$!==null)))for(var q=0;q<$.length;q++){var G=$[q],F=G.getSnapshot;G=G.value;try{if(!D2(F(),G))return!1}catch(Y){return!1}}if($=J.child,J.subtreeFlags&16384&&$!==null)$.return=J,J=$;else{if(J===_)break;for(;J.sibling===null;){if(J.return===null||J.return===_)return!0;J=J.return}J.sibling.return=J.return,J=J.sibling}}return!0}function y3(_,J,$,q){J&=~GF,J&=~_6,_.suspendedLanes|=J,_.pingedLanes&=~J,q&&(_.warmLanes|=J),q=_.expirationTimes;for(var G=J;0<G;){var F=31-j2(G),Y=1<<F;q[F]=-1,G&=~Y}$!==0&&v5(_,$,J)}function s8(){return(Z0&(o0|H5))===G2?(m9(0,!1),!1):!0}function PG(){if(s1!==null){if(z0===i2)var _=s1.return;else _=s1,_$(),bU(_),w7=null,O_=0,_=s1;for(;_!==null;)hY(_.alternate,_),_=_.return;s1=null}}function m6(_,J){(_&127)!==0&&(d3=J),(_&4194048)!==0&&(N4=J),(_&62914560)!==0&&(jB=J),(_&2080374784)!==0&&(VB=J)}function t8(_,J){O0&&(console.timeStamp("Blocking Track",0.003,0.003,"Blocking",n1,"primary-light"),console.timeStamp("Transition Track",0.003,0.003,"Transition",n1,"primary-light"),console.timeStamp("Suspense Track",0.003,0.003,"Suspense",n1,"primary-light"),console.timeStamp("Idle Track",0.003,0.003,"Idle",n1,"primary-light"));var $=q2;if(q2=c0(),a1!==0&&0<$){if(n2(a1),j0===CQ||j0===o3)WH($,q2,J,b0);else{var q=q2,G=b0;if(O0&&!(q<=$)){var F=(J&738197653)===J?"tertiary-dark":"primary-dark",Y=(J&536870912)===J?"Prewarm":(J&201326741)===J?"Interrupted Hydration":"Interrupted Render";G?G.run(console.timeStamp.bind(console,Y,$,q,e1,n1,F)):console.timeStamp(Y,$,q,e1,n1,F)}}m6(a1,q2)}if($=b0,b0=null,(J&127)!==0){b0=K_,G=0<=P4&&P4<d3?d3:P4,q=0<=r6&&r6<d3?d3:r6,F=0<=q?q:0<=G?G:q2,0<=WQ?(n2(2),zH(WQ,F,J,$)):(BQ&127)!==0&&(n2(2),R9(d3,F,$3)),$=G;var A=q,w=X_,N=0<T7,t=i3===F_,o=i3===YQ;if(G=q2,q=K_,F=xZ,Y=hZ,O0){if(e1="Blocking",0<$?$>G&&($=G):$=G,0<A?A>$&&(A=$):A=$,w!==null&&$>A){var l=N?"secondary-light":"warning";q?q.run(console.timeStamp.bind(console,N?"Consecutive":"Event: "+w,A,$,e1,n1,l)):console.timeStamp(N?"Consecutive":"Event: "+w,A,$,e1,n1,l)}G>$&&(A=t?"error":(J&738197653)===J?"tertiary-light":"primary-light",t=o?"Promise Resolved":t?"Cascading Update":5<G-$?"Update Blocked":"Update",o=[],Y!=null&&o.push(["Component name",Y]),F!=null&&o.push(["Method name",F]),$={start:$,end:G,detail:{devtools:{properties:o,track:e1,trackGroup:n1,color:A}}},q?q.run(performance.measure.bind(performance,t,$)):performance.measure(t,$))}P4=-1.1,i3=0,hZ=xZ=null,WQ=-1.1,T7=r6,r6=-1.1,d3=c0()}if((J&4194048)!==0&&(b0=H_,G=0<=J3&&J3<N4?N4:J3,$=0<=P5&&P5<N4?N4:P5,q=0<=a3&&a3<N4?N4:a3,F=0<=q?q:0<=$?$:q2,0<=zQ?(n2(256),zH(zQ,F,J,b0)):(BQ&4194048)!==0&&(n2(256),R9(N4,F,$3)),o=q,A=d6,w=0<s3,N=mZ===YQ,F=q2,q=H_,Y=CB,t=SB,O0&&(e1="Transition",0<$?$>F&&($=F):$=F,0<G?G>$&&(G=$):G=$,0<o?o>G&&(o=G):o=G,G>o&&A!==null&&(l=w?"secondary-light":"warning",q?q.run(console.timeStamp.bind(console,w?"Consecutive":"Event: "+A,o,G,e1,n1,l)):console.timeStamp(w?"Consecutive":"Event: "+A,o,G,e1,n1,l)),$>G&&(q?q.run(console.timeStamp.bind(console,"Action",G,$,e1,n1,"primary-dark")):console.timeStamp("Action",G,$,e1,n1,"primary-dark")),F>$&&(G=N?"Promise Resolved":5<F-$?"Update Blocked":"Update",o=[],t!=null&&o.push(["Component name",t]),Y!=null&&o.push(["Method name",Y]),$={start:$,end:F,detail:{devtools:{properties:o,track:e1,trackGroup:n1,color:"primary-light"}}},q?q.run(performance.measure.bind(performance,G,$)):performance.measure(G,$))),P5=J3=-1.1,mZ=0,zQ=-1.1,s3=a3,a3=-1.1,N4=c0()),(J&62914560)!==0&&(BQ&62914560)!==0&&(n2(4194304),R9(jB,q2,$3)),(J&2080374784)!==0&&(BQ&2080374784)!==0&&(n2(268435456),R9(VB,q2,$3)),$=_.timeoutHandle,$!==Z8&&(_.timeoutHandle=Z8,Mf($)),$=_.cancelPendingCommit,$!==null&&(_.cancelPendingCommit=null,$()),r5=0,PG(),M0=_,s1=$=g4(_.current,null),a1=J,z0=i2,Y5=null,n3=!1,k7=f2(_,J),UF=!1,j0=Z3,$8=a2=GF=_6=e3=0,b2=k_=null,kQ=!1,(J&8)!==0&&(J|=J&32),q=_.entangledLanes,q!==0)for(_=_.entanglements,q&=J;0<q;)G=31-j2(q),F=1<<G,J|=_[G],q&=~F;return S4=J,sJ(),_=OB(),1000<_-RB&&(Z1.recentlyCreatedOwnerStacks=0,RB=_),p5.discardPendingWarnings(),$}function BW(_,J){g1=null,Z1.H=P_,Z1.getCurrentStack=null,T4=!1,G5=null,J===O7||J===TQ?(J=bH(),z0=j_):J===lZ?(J=bH(),z0=NA):z0=J===_F?qF:J!==null&&typeof J==="object"&&typeof J.then==="function"?V_:jQ,Y5=J;var $=s1;$===null?(j0=S_,P$(_,e2(J,_.current))):$.mode&d1&&IU($)}function AW(){var _=K5.current;return _===null?!0:(a1&4194048)===a1?N5===null?!0:!1:(a1&62914560)===a1||(a1&536870912)!==0?_===N5:!1}function LW(){var _=Z1.H;return Z1.H=P_,_===null?P_:_}function MW(){var _=Z1.A;return Z1.A=qf,_}function y$(_){b0===null&&(b0=_._debugTask==null?null:_._debugTask)}function v$(){j0=o3,n3||(a1&4194048)!==a1&&K5.current!==null||(k7=!0),(e3&134217727)===0&&(_6&134217727)===0||M0===null||y3(M0,a1,a2,!1)}function NG(_,J,$){var q=Z0;Z0|=o0;var G=LW(),F=MW();if(M0!==_||a1!==J){if(O4){var Y=_.memoizedUpdaters;0<Y.size&&(h9(_,a1),Y.clear()),e5(_,J)}D_=null,t8(_,J)}J=!1,Y=j0;_:do try{if(z0!==i2&&s1!==null){var A=s1,w=Y5;switch(z0){case qF:PG(),Y=SQ;break _;case j_:case _8:case J8:case V_:K5.current===null&&(J=!0);var N=z0;if(z0=i2,Y5=null,o8(_,A,w,N),$&&k7){Y=Z3;break _}break;default:N=z0,z0=i2,Y5=null,o8(_,A,w,N)}}TW(),Y=j0;break}catch(t){BW(_,t)}while(1);return J&&_.shellSuspendCounter++,_$(),Z0=q,Z1.H=G,Z1.A=F,s1===null&&(M0=null,a1=0,sJ()),Y}function TW(){for(;s1!==null;)RW(s1)}function mO(_,J){var $=Z0;Z0|=o0;var q=LW(),G=MW();if(M0!==_||a1!==J){if(O4){var F=_.memoizedUpdaters;0<F.size&&(h9(_,a1),F.clear()),e5(_,J)}D_=null,yQ=Q2()+jA,t8(_,J)}else k7=f2(_,J);_:do try{if(z0!==i2&&s1!==null)J:switch(J=s1,F=Y5,z0){case jQ:z0=i2,Y5=null,o8(_,J,F,jQ);break;case _8:case J8:if(vH(F)){z0=i2,Y5=null,OW(J);break}J=function(){z0!==_8&&z0!==J8||M0!==_||(z0=VQ),B4(_)},F.then(J,J);break _;case j_:z0=VQ;break _;case NA:z0=QF;break _;case VQ:vH(F)?(z0=i2,Y5=null,OW(J)):(z0=i2,Y5=null,o8(_,J,F,VQ));break;case QF:var Y=null;switch(s1.tag){case 26:Y=s1.memoizedState;case 5:case 27:var A=s1;if(Y?Wz(Y):A.stateNode.complete){z0=i2,Y5=null;var w=A.sibling;if(w!==null)s1=w;else{var N=A.return;N!==null?(s1=N,E$(N)):s1=null}break J}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}z0=i2,Y5=null,o8(_,J,F,QF);break;case V_:z0=i2,Y5=null,o8(_,J,F,V_);break;case qF:PG(),j0=SQ;break _;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}Z1.actQueue!==null?TW():gO();break}catch(t){BW(_,t)}while(1);if(_$(),Z1.H=q,Z1.A=G,Z0=$,s1!==null)return Z3;return M0=null,a1=0,sJ(),j0}function gO(){for(;s1!==null&&!hw();)RW(s1)}function RW(_){var J=_.alternate;(_.mode&d1)!==x1?(wU(_),J=W1(_,AG,J,_,S4),IU(_)):J=W1(_,AG,J,_,S4),_.memoizedProps=_.pendingProps,J===null?E$(_):s1=J}function OW(_){var J=W1(_,pO,_);_.memoizedProps=_.pendingProps,J===null?E$(_):s1=J}function pO(_){var J=_.alternate,$=(_.mode&d1)!==x1;switch($&&wU(_),_.tag){case 15:case 0:J=DY(J,_,_.pendingProps,_.type,void 0,a1);break;case 11:J=DY(J,_,_.pendingProps,_.type.render,_.ref,a1);break;case 5:bU(_);default:hY(J,_),_=s1=RH(_,S4),J=AG(J,_,S4)}return $&&IU(_),J}function o8(_,J,$,q){_$(),bU(J),w7=null,O_=0;var G=J.return;try{if(NO(_,G,J,$,a1)){j0=S_,P$(_,e2($,_.current)),s1=null;return}}catch(F){if(G!==null)throw s1=G,F;j0=S_,P$(_,e2($,_.current)),s1=null;return}if(J.flags&32768){if(J0||q===jQ)_=!0;else if(k7||(a1&536870912)!==0)_=!1;else if(n3=_=!0,q===_8||q===J8||q===j_||q===V_)q=K5.current,q!==null&&q.tag===13&&(q.flags|=16384);wW(J,_)}else E$(J)}function E$(_){var J=_;do{if((J.flags&32768)!==0){wW(J,n3);return}var $=J.alternate;if(_=J.return,wU(J),$=W1(J,jO,$,J,S4),(J.mode&d1)!==x1&&jH(J),$!==null){s1=$;return}if(J=J.sibling,J!==null){s1=J;return}s1=J=_}while(J!==null);j0===Z3&&(j0=PA)}function wW(_,J){do{var $=VO(_.alternate,_);if($!==null){$.flags&=32767,s1=$;return}if((_.mode&d1)!==x1){jH(_),$=_.actualDuration;for(var q=_.child;q!==null;)$+=q.actualDuration,q=q.sibling;_.actualDuration=$}if($=_.return,$!==null&&($.flags|=32768,$.subtreeFlags=0,$.deletions=null),!J&&(_=_.sibling,_!==null)){s1=_;return}s1=_=$}while(_!==null);j0=SQ,s1=null}function CG(_,J,$,q,G,F,Y,A,w,N,t,o,l,U1){_.cancelPendingCommit=null;do x9();while(a0!==$6);if(p5.flushLegacyContextWarning(),p5.flushPendingUnsafeLifecycleWarnings(),(Z0&(o0|H5))!==G2)throw Error("Should not already be working.");if(n2($),N===e6?FU(l,U1,$,b0):q!==null?WO(l,U1,$,q,J!==null&&J.alternate!==null&&J.alternate.memoizedState.isDehydrated&&(J.flags&256)!==0,b0):YO(l,U1,$,b0),J!==null){if($===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),J===_.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(F=J.lanes|J.childLanes,F|=yZ,M3(_,$,F,Y,A,w),_===M0&&(s1=M0=null,a1=0),D7=J,Q6=_,r5=$,KF=F,HF=G,EA=q,XF=U1,bA=o,d5=vQ,uA=null,J.actualDuration!==0||(J.subtreeFlags&10256)!==0||(J.flags&10256)!==0?(_.callbackNode=null,_.callbackPriority=0,iO(Q7,function(){return x_=window.event,d5===vQ&&(d5=FF),CW(),null})):(_.callbackNode=null,_.callbackPriority=0),_3=null,r3=c0(),o!==null&&zO(U1,r3,o,b0),q=(J.flags&13878)!==0,(J.subtreeFlags&13878)!==0||q){q=Z1.T,Z1.T=null,G=Y0.p,Y0.p=Z5,Y=Z0,Z0|=H5;try{bO(_,J,$)}finally{Z0=Y,Y0.p=G,Z1.T=q}}a0=kA,IW(),fW(),PW()}}function IW(){if(a0===kA){a0=$6;var _=Q6,J=D7,$=r5,q=(J.flags&13878)!==0;if((J.subtreeFlags&13878)!==0||q){q=Z1.T,Z1.T=null;var G=Y0.p;Y0.p=Z5;var F=Z0;Z0|=H5;try{j7=$,V7=_,q$(),_W(J,_),V7=j7=null,$=wF;var Y=XH(_.containerInfo),A=$.focusedElem,w=$.selectionRange;if(Y!==A&&A&&A.ownerDocument&&KH(A.ownerDocument.documentElement,A)){if(w!==null&&UU(A)){var{start:N,end:t}=w;if(t===void 0&&(t=N),"selectionStart"in A)A.selectionStart=N,A.selectionEnd=Math.min(t,A.value.length);else{var o=A.ownerDocument||document,l=o&&o.defaultView||window;if(l.getSelection){var U1=l.getSelection(),T1=A.textContent.length,w1=Math.min(w.start,T1),R0=w.end===void 0?w1:Math.min(w.end,T1);!U1.extend&&w1>R0&&(Y=R0,R0=w1,w1=Y);var Q0=FH(A,w1),c=FH(A,R0);if(Q0&&c&&(U1.rangeCount!==1||U1.anchorNode!==Q0.node||U1.anchorOffset!==Q0.offset||U1.focusNode!==c.node||U1.focusOffset!==c.offset)){var r=o.createRange();r.setStart(Q0.node,Q0.offset),U1.removeAllRanges(),w1>R0?(U1.addRange(r),U1.extend(c.node,c.offset)):(r.setEnd(c.node,c.offset),U1.addRange(r))}}}}o=[];for(U1=A;U1=U1.parentNode;)U1.nodeType===1&&o.push({element:U1,left:U1.scrollLeft,top:U1.scrollTop});typeof A.focus==="function"&&A.focus();for(A=0;A<o.length;A++){var s=o[A];s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}tQ=!!OF,wF=OF=null}finally{Z0=F,Y0.p=G,Z1.T=q}}_.current=J,a0=DA}}function fW(){if(a0===DA){a0=$6;var _=uA;if(_!==null){r3=c0();var J=e4,$=r3;!O0||$<=J||($3?$3.run(console.timeStamp.bind(console,_,J,$,e1,n1,"secondary-light")):console.timeStamp(_,J,$,e1,n1,"secondary-light"))}_=Q6,J=D7,$=r5;var q=(J.flags&8772)!==0;if((J.subtreeFlags&8772)!==0||q){q=Z1.T,Z1.T=null;var G=Y0.p;Y0.p=Z5;var F=Z0;Z0|=H5;try{j7=$,V7=_,q$(),sY(_,J.alternate,J),V7=j7=null}finally{Z0=F,Y0.p=G,Z1.T=q}}_=XF,J=bA,e4=c0(),_=J===null?_:r3,J=e4,$=d5===ZF,q=b0,_3!==null?BH(_,J,_3,!1,q):!O0||J<=_||(q?q.run(console.timeStamp.bind(console,$?"Commit Interrupted View Transition":"Commit",_,J,e1,n1,$?"error":"secondary-dark")):console.timeStamp($?"Commit Interrupted View Transition":"Commit",_,J,e1,n1,$?"error":"secondary-dark")),a0=yA}}function PW(){if(a0===vA||a0===yA){if(a0===vA){var _=e4;e4=c0();var J=e4,$=d5===ZF;!O0||J<=_||($3?$3.run(console.timeStamp.bind(console,$?"Interrupted View Transition":"Starting Animation",_,J,e1,n1,$?"error":"secondary-light")):console.timeStamp($?"Interrupted View Transition":"Starting Animation",_,J,e1,n1,$?" error":"secondary-light")),d5!==ZF&&(d5=VA)}a0=$6,mw(),_=Q6;var q=D7;J=r5,$=EA;var G=q.actualDuration!==0||(q.subtreeFlags&10256)!==0||(q.flags&10256)!==0;G?a0=EQ:(a0=$6,D7=Q6=null,NW(_,_.pendingLanes),Q8=0,v_=null);var F=_.pendingLanes;if(F===0&&(J6=null),G||kW(_),F=S(J),q=q.stateNode,T2&&typeof T2.onCommitFiberRoot==="function")try{var Y=(q.current.flags&128)===128;switch(F){case Z5:var A=HZ;break;case m5:A=YZ;break;case w4:A=Q7;break;case e$:A=WZ;break;default:A=Q7}T2.onCommitFiberRoot(q7,q,A,Y)}catch(o){R4||(R4=!0,console.error("React instrumentation encountered an error: %o",o))}if(O4&&_.memoizedUpdaters.clear(),xO(),$!==null){Y=Z1.T,A=Y0.p,Y0.p=Z5,Z1.T=null;try{var w=_.onRecoverableError;for(q=0;q<$.length;q++){var N=$[q],t=cO(N.stack);W1(N.source,w,N.value,t)}}finally{Z1.T=Y,Y0.p=A}}(r5&3)!==0&&x9(),B4(_),F=_.pendingLanes,(J&261930)!==0&&(F&42)!==0?(LQ=!0,_===YF?y_++:(y_=0,YF=_)):y_=0,G||m6(J,e4),m9(0,!1)}}function cO(_){return _={componentStack:_},Object.defineProperty(_,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),_}function NW(_,J){(_.pooledCacheLanes&=J)===0&&(J=_.pooledCache,J!=null&&(_.pooledCache=null,w9(J)))}function x9(){return IW(),fW(),PW(),CW()}function CW(){if(a0!==EQ)return!1;var _=Q6,J=KF;KF=0;var $=S(r5),q=w4===0||w4>$?w4:$;$=Z1.T;var G=Y0.p;try{Y0.p=q,Z1.T=null;var F=HF;HF=null,q=Q6;var Y=r5;if(a0=$6,D7=Q6=null,r5=0,(Z0&(o0|H5))!==G2)throw Error("Cannot flush passive effects while already rendering.");n2(Y),WF=!0,bQ=!1;var A=0;if(_3=null,A=Q2(),d5===VA)R9(e4,A,$3);else{var w=e4,N=A,t=d5===FF;!O0||N<=w||(b0?b0.run(console.timeStamp.bind(console,t?"Waiting for Paint":"Waiting",w,N,e1,n1,"secondary-light")):console.timeStamp(t?"Waiting for Paint":"Waiting",w,N,e1,n1,"secondary-light"))}w=Z0,Z0|=H5;var o=q.current;q$(),FW(o);var l=q.current;o=XF,q$(),qW(q,l,Y,F,o),kW(q),Z0=w;var U1=Q2();if(l=A,o=b0,_3!==null?BH(l,U1,_3,!0,o):!O0||U1<=l||(o?o.run(console.timeStamp.bind(console,"Remaining Effects",l,U1,e1,n1,"secondary-dark")):console.timeStamp("Remaining Effects",l,U1,e1,n1,"secondary-dark")),m6(Y,U1),m9(0,!1),bQ?q===v_?Q8++:(Q8=0,v_=q):Q8=0,bQ=WF=!1,T2&&typeof T2.onPostCommitFiberRoot==="function")try{T2.onPostCommitFiberRoot(q7,q)}catch(w1){R4||(R4=!0,console.error("React instrumentation encountered an error: %o",w1))}var T1=q.current.stateNode;return T1.effectDuration=0,T1.passiveEffectDuration=0,!0}finally{Y0.p=G,Z1.T=$,NW(_,J)}}function SW(_,J,$){J=e2($,J),VH(J),J=UG(_.stateNode,J,2),_=j3(_,J,2),_!==null&&(L2(_,2),B4(_))}function H0(_,J,$){if(y7=!1,_.tag===3)SW(_,_,$);else{for(;J!==null;){if(J.tag===3){SW(J,_,$);return}if(J.tag===1){var q=J.stateNode;if(typeof J.type.getDerivedStateFromError==="function"||typeof q.componentDidCatch==="function"&&(J6===null||!J6.has(q))){_=e2($,_),VH(_),$=GG(2),q=j3(J,$,2),q!==null&&(ZG($,q,J,_),L2(q,2),B4(q));return}}J=J.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
164
|
-
|
|
165
|
-
Error message:
|
|
166
|
-
|
|
167
|
-
%s`,$)}}function SG(_,J,$){var q=_.pingCache;if(q===null){q=_.pingCache=new Gf;var G=new Set;q.set(J,G)}else G=q.get(J),G===void 0&&(G=new Set,q.set(J,G));G.has($)||(UF=!0,G.add($),q=lO.bind(null,_,J,$),O4&&h9(_,$),J.then(q,q))}function lO(_,J,$){var q=_.pingCache;q!==null&&q.delete(J),_.pingedLanes|=_.suspendedLanes&$,_.warmLanes&=~$,($&127)!==0?0>P4&&(d3=P4=c0(),K_=HQ("Promise Resolved"),i3=YQ):($&4194048)!==0&&0>P5&&(N4=P5=c0(),H_=HQ("Promise Resolved"),mZ=YQ),HW()&&Z1.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
168
|
-
|
|
169
|
-
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
170
|
-
|
|
171
|
-
act(() => {
|
|
172
|
-
/* finish loading suspended data */
|
|
173
|
-
});
|
|
174
|
-
/* assert on the output */
|
|
175
|
-
|
|
176
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),M0===_&&(a1&$)===$&&(j0===o3||j0===CQ&&(a1&62914560)===a1&&Q2()-DQ<SA?(Z0&o0)===G2&&t8(_,0):GF|=$,$8===a1&&($8=0)),B4(_)}function jW(_,J){J===0&&(J=B2()),_=M2(_,J),_!==null&&(L2(_,J),B4(_))}function rO(_){var J=_.memoizedState,$=0;J!==null&&($=J.retryLane),jW(_,$)}function dO(_,J){var $=0;switch(_.tag){case 31:case 13:var{stateNode:q,memoizedState:G}=_;G!==null&&($=G.retryLane);break;case 19:q=_.stateNode;break;case 22:q=_.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}q!==null&&q.delete(J),jW(_,$)}function jG(_,J,$){if((J.subtreeFlags&67117056)!==0)for(J=J.child;J!==null;){var q=_,G=J,F=G.type===i$;F=$||F,G.tag!==22?G.flags&67108864?F&&W1(G,VW,q,G):jG(q,G,F):G.memoizedState===null&&(F&&G.flags&8192?W1(G,VW,q,G):G.subtreeFlags&67108864&&W1(G,jG,q,G,F)),J=J.sibling}}function VW(_,J){_0(!0);try{$W(J),KW(J),QW(_,J.alternate,J,!1),UW(_,J,0,null,!1,0)}finally{_0(!1)}}function kW(_){var J=!0;_.current.mode&(R2|g5)||(J=!1),jG(_,_.current,J)}function DW(_){if((Z0&o0)===G2){var J=_.tag;if(J===3||J===1||J===0||J===11||J===14||J===15){if(J=m(_)||"ReactComponent",uQ!==null){if(uQ.has(J))return;uQ.add(J)}else uQ=new Set([J]);W1(_,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function h9(_,J){O4&&_.memoizedUpdaters.forEach(function($){I6(_,$,J)})}function iO(_,J){var $=Z1.actQueue;return $!==null?($.push(J),Kf):XZ(_,J)}function aO(_){HW()&&Z1.actQueue===null&&W1(_,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
177
|
-
|
|
178
|
-
When testing, code that causes React state updates should be wrapped into act(...):
|
|
179
|
-
|
|
180
|
-
act(() => {
|
|
181
|
-
/* fire events that update state */
|
|
182
|
-
});
|
|
183
|
-
/* assert on the output */
|
|
184
|
-
|
|
185
|
-
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,m(_))})}function B4(_){_!==v7&&_.next===null&&(v7===null?xQ=v7=_:v7=v7.next=_),hQ=!0,Z1.actQueue!==null?BF||(BF=!0,bW()):zF||(zF=!0,bW())}function m9(_,J){if(!AF&&hQ){AF=!0;do{var $=!1;for(var q=xQ;q!==null;){if(!J)if(_!==0){var G=q.pendingLanes;if(G===0)var F=0;else{var{suspendedLanes:Y,pingedLanes:A}=q;F=(1<<31-j2(42|_)+1)-1,F&=G&~(Y&~A),F=F&201326741?F&201326741|1:F?F|2:0}F!==0&&($=!0,EW(q,F))}else F=a1,F=I2(q,q===M0?F:0,q.cancelPendingCommit!==null||q.timeoutHandle!==Z8),(F&3)===0||f2(q,F)||($=!0,EW(q,F));q=q.next}}while($);AF=!1}}function sO(){x_=window.event,VG()}function VG(){hQ=BF=zF=!1;var _=0;q6!==0&&$w()&&(_=q6);for(var J=Q2(),$=null,q=xQ;q!==null;){var G=q.next,F=yW(q,J);if(F===0)q.next=null,$===null?xQ=G:$.next=G,G===null&&(v7=$);else if($=q,_!==0||(F&3)!==0)hQ=!0;q=G}a0!==$6&&a0!==EQ||m9(_,!1),q6!==0&&(q6=0)}function yW(_,J){for(var{suspendedLanes:$,pingedLanes:q,expirationTimes:G}=_,F=_.pendingLanes&-62914561;0<F;){var Y=31-j2(F),A=1<<Y,w=G[Y];if(w===-1){if((A&$)===0||(A&q)!==0)G[Y]=P2(A,J)}else w<=J&&(_.expiredLanes|=A);F&=~A}if(J=M0,$=a1,$=I2(_,_===J?$:0,_.cancelPendingCommit!==null||_.timeoutHandle!==Z8),q=_.callbackNode,$===0||_===J&&(z0===_8||z0===J8)||_.cancelPendingCommit!==null)return q!==null&&kG(q),_.callbackNode=null,_.callbackPriority=0;if(($&3)===0||f2(_,$)){if(J=$&-$,J!==_.callbackPriority||Z1.actQueue!==null&&q!==LF)kG(q);else return J;switch(S($)){case Z5:case m5:$=YZ;break;case w4:$=Q7;break;case e$:$=WZ;break;default:$=Q7}return q=vW.bind(null,_),Z1.actQueue!==null?(Z1.actQueue.push(q),$=LF):$=XZ($,q),_.callbackPriority=J,_.callbackNode=$,J}return q!==null&&kG(q),_.callbackPriority=2,_.callbackNode=null,2}function vW(_,J){if(LQ=AQ=!1,x_=window.event,a0!==$6&&a0!==EQ)return _.callbackNode=null,_.callbackPriority=0,null;var $=_.callbackNode;if(d5===vQ&&(d5=FF),x9()&&_.callbackNode!==$)return null;var q=a1;if(q=I2(_,_===M0?q:0,_.cancelPendingCommit!==null||_.timeoutHandle!==Z8),q===0)return null;return WW(_,q,J),yW(_,Q2()),_.callbackNode!=null&&_.callbackNode===$?vW.bind(null,_):null}function EW(_,J){if(x9())return null;AQ=LQ,LQ=!1,WW(_,J,!0)}function kG(_){_!==LF&&_!==null&&xw(_)}function bW(){Z1.actQueue!==null&&Z1.actQueue.push(function(){return VG(),null}),Tf(function(){(Z0&(o0|H5))!==G2?XZ(HZ,sO):VG()})}function DG(){if(q6===0){var _=i6;_===0&&(_=t$,t$<<=1,(t$&261888)===0&&(t$=256)),q6=_}return q6}function uW(_){if(_==null||typeof _==="symbol"||typeof _==="boolean")return null;if(typeof _==="function")return _;return j1(_,"action"),L9(""+_)}function xW(_,J){var $=J.ownerDocument.createElement("input");return $.name=J.name,$.value=J.value,_.id&&$.setAttribute("form",_.id),J.parentNode.insertBefore($,J),_=new FormData(_),$.parentNode.removeChild($),_}function tO(_,J,$,q,G){if(J==="submit"&&$&&$.stateNode===G){var F=uW((G[V2]||null).action),Y=q.submitter;Y&&(J=(J=Y[V2]||null)?uW(J.formAction):Y.getAttribute("formAction"),J!==null&&(F=J,Y=null));var A=new qQ("action","action",null,q,G);_.push({event:A,listeners:[{instance:null,listener:function(){if(q.defaultPrevented){if(q6!==0){var w=Y?xW(G,Y):new FormData(G),N={pending:!0,data:w,method:G.method,action:F};Object.freeze(N),nU($,N,null,w)}}else typeof F==="function"&&(A.preventDefault(),w=Y?xW(G,Y):new FormData(G),N={pending:!0,data:w,method:G.method,action:F},Object.freeze(N),nU($,N,F,w))},currentTarget:G}]})}}function b$(_,J,$){_.currentTarget=$;try{J(_)}catch(q){jZ(q)}_.currentTarget=null}function hW(_,J){J=(J&4)!==0;for(var $=0;$<_.length;$++){var q=_[$];_:{var G=void 0,F=q.event;if(q=q.listeners,J)for(var Y=q.length-1;0<=Y;Y--){var A=q[Y],w=A.instance,N=A.currentTarget;if(A=A.listener,w!==G&&F.isPropagationStopped())break _;w!==null?W1(w,b$,F,A,N):b$(F,A,N),G=w}else for(Y=0;Y<q.length;Y++){if(A=q[Y],w=A.instance,N=A.currentTarget,A=A.listener,w!==G&&F.isPropagationStopped())break _;w!==null?W1(w,b$,F,A,N):b$(F,A,N),G=w}}}}function $0(_,J){MF.has(_)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',_);var $=J[zZ];$===void 0&&($=J[zZ]=new Set);var q=_+"__bubble";$.has(q)||(mW(J,_,2,!1),$.add(q))}function yG(_,J,$){MF.has(_)&&!J&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',_);var q=0;J&&(q|=4),mW($,_,q,J)}function vG(_){if(!_[mQ]){_[mQ]=!0,bz.forEach(function($){$!=="selectionchange"&&(MF.has($)||yG($,!1,_),yG($,!0,_))});var J=_.nodeType===9?_:_.ownerDocument;J===null||J[mQ]||(J[mQ]=!0,yG("selectionchange",!1,J))}}function mW(_,J,$,q){switch(Tz(J)){case Z5:var G=Vw;break;case m5:G=kw;break;default:G=tG}$=G.bind(null,J,$,_),G=void 0,!TZ||J!=="touchstart"&&J!=="touchmove"&&J!=="wheel"||(G=!0),q?G!==void 0?_.addEventListener(J,$,{capture:!0,passive:G}):_.addEventListener(J,$,!0):G!==void 0?_.addEventListener(J,$,{passive:G}):_.addEventListener(J,$,!1)}function EG(_,J,$,q,G){var F=q;if((J&1)===0&&(J&2)===0&&q!==null)_:for(;;){if(q===null)return;var Y=q.tag;if(Y===3||Y===4){var A=q.stateNode.containerInfo;if(A===G)break;if(Y===4)for(Y=q.return;Y!==null;){var w=Y.tag;if((w===3||w===4)&&Y.stateNode.containerInfo===G)return;Y=Y.return}for(;A!==null;){if(Y=P1(A),Y===null)return;if(w=Y.tag,w===5||w===6||w===26||w===27){q=F=Y;continue _}A=A.parentNode}}q=q.return}oX(function(){var N=F,t=QU($),o=[];_:{var l=TB.get(_);if(l!==void 0){var U1=qQ,T1=_;switch(_){case"keypress":if(lJ($)===0)break _;case"keydown":case"keyup":U1=PI;break;case"focusin":T1="focus",U1=IZ;break;case"focusout":T1="blur",U1=IZ;break;case"beforeblur":case"afterblur":U1=IZ;break;case"click":if($.button===2)break _;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U1=UB;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U1=WI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U1=SI;break;case BB:case AB:case LB:U1=AI;break;case MB:U1=VI;break;case"scroll":case"scrollend":U1=HI;break;case"wheel":U1=DI;break;case"copy":case"cut":case"paste":U1=MI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U1=ZB;break;case"toggle":case"beforetoggle":U1=vI}var w1=(J&4)!==0,R0=!w1&&(_==="scroll"||_==="scrollend"),Q0=w1?l!==null?l+"Capture":null:l;w1=[];for(var c=N,r;c!==null;){var s=c;if(r=s.stateNode,s=s.tag,s!==5&&s!==26&&s!==27||r===null||Q0===null||(s=M9(c,Q0),s!=null&&w1.push(g9(c,s,r))),R0)break;c=c.return}0<w1.length&&(l=new U1(l,T1,null,$,t),o.push({event:l,listeners:w1}))}}if((J&7)===0){_:{if(l=_==="mouseover"||_==="pointerover",U1=_==="mouseout"||_==="pointerout",l&&$!==n9&&(T1=$.relatedTarget||$.fromElement)&&(P1(T1)||T1[h3]))break _;if(U1||l){if(l=t.window===t?t:(l=t.ownerDocument)?l.defaultView||l.parentWindow:window,U1){if(T1=$.relatedTarget||$.toElement,U1=N,T1=T1?P1(T1):null,T1!==null&&(R0=k(T1),w1=T1.tag,T1!==R0||w1!==5&&w1!==27&&w1!==6))T1=null}else U1=null,T1=N;if(U1!==T1){if(w1=UB,s="onMouseLeave",Q0="onMouseEnter",c="mouse",_==="pointerout"||_==="pointerover")w1=ZB,s="onPointerLeave",Q0="onPointerEnter",c="pointer";if(R0=U1==null?l:m1(U1),r=T1==null?l:m1(T1),l=new w1(s,c+"leave",U1,$,t),l.target=R0,l.relatedTarget=r,s=null,P1(t)===N&&(w1=new w1(Q0,c+"enter",T1,$,t),w1.target=r,w1.relatedTarget=R0,s=w1),R0=s,U1&&T1)J:{w1=oO,Q0=U1,c=T1,r=0;for(s=Q0;s;s=w1(s))r++;s=0;for(var H1=c;H1;H1=w1(H1))s++;for(;0<r-s;)Q0=w1(Q0),r--;for(;0<s-r;)c=w1(c),s--;for(;r--;){if(Q0===c||c!==null&&Q0===c.alternate){w1=Q0;break J}Q0=w1(Q0),c=w1(c)}w1=null}else w1=null;U1!==null&&gW(o,l,U1,w1,!1),T1!==null&&R0!==null&&gW(o,R0,T1,w1,!0)}}}_:{if(l=N?m1(N):window,U1=l.nodeName&&l.nodeName.toLowerCase(),U1==="select"||U1==="input"&&l.type==="file")var O1=qH;else if($H(l))if(WB)O1=KO;else{O1=ZO;var p1=GO}else U1=l.nodeName,!U1||U1.toLowerCase()!=="input"||l.type!=="checkbox"&&l.type!=="radio"?N&&A9(N.elementType)&&(O1=qH):O1=FO;if(O1&&(O1=O1(_,N))){QH(o,O1,$,t);break _}p1&&p1(_,l,N),_==="focusout"&&N&&l.type==="number"&&N.memoizedProps.value!=null&&x8(l,"number",l.value)}switch(p1=N?m1(N):window,_){case"focusin":if($H(p1)||p1.contentEditable==="true")H7=p1,PZ=N,U_=null;break;case"focusout":U_=PZ=H7=null;break;case"mousedown":NZ=!0;break;case"contextmenu":case"mouseup":case"dragend":NZ=!1,HH(o,$,t);break;case"selectionchange":if(xI)break;case"keydown":case"keyup":HH(o,$,t)}var k1;if(fZ)_:{switch(_){case"compositionstart":var N1="onCompositionStart";break _;case"compositionend":N1="onCompositionEnd";break _;case"compositionupdate":N1="onCompositionUpdate";break _}N1=void 0}else X7?_H(_,$)&&(N1="onCompositionEnd"):_==="keydown"&&$.keyCode===FB&&(N1="onCompositionStart");if(N1&&(KB&&$.locale!=="ko"&&(X7||N1!=="onCompositionStart"?N1==="onCompositionEnd"&&X7&&(k1=nX()):(m3=t,RZ=("value"in m3)?m3.value:m3.textContent,X7=!0)),p1=u$(N,N1),0<p1.length&&(N1=new GB(N1,_,null,$,t),o.push({event:N1,listeners:p1}),k1?N1.data=k1:(k1=JH($),k1!==null&&(N1.data=k1)))),k1=bI?$O(_,$):QO(_,$))N1=u$(N,"onBeforeInput"),0<N1.length&&(p1=new RI("onBeforeInput","beforeinput",null,$,t),o.push({event:p1,listeners:N1}),p1.data=k1);tO(o,_,N,$,t)}hW(o,J)})}function g9(_,J,$){return{instance:_,listener:J,currentTarget:$}}function u$(_,J){for(var $=J+"Capture",q=[];_!==null;){var G=_,F=G.stateNode;if(G=G.tag,G!==5&&G!==26&&G!==27||F===null||(G=M9(_,$),G!=null&&q.unshift(g9(_,G,F)),G=M9(_,J),G!=null&&q.push(g9(_,G,F))),_.tag===3)return q;_=_.return}return[]}function oO(_){if(_===null)return null;do _=_.return;while(_&&_.tag!==5&&_.tag!==27);return _?_:null}function gW(_,J,$,q,G){for(var F=J._reactName,Y=[];$!==null&&$!==q;){var A=$,w=A.alternate,N=A.stateNode;if(A=A.tag,w!==null&&w===q)break;A!==5&&A!==26&&A!==27||N===null||(w=N,G?(N=M9($,F),N!=null&&Y.unshift(g9($,N,w))):G||(N=M9($,F),N!=null&&Y.push(g9($,N,w)))),$=$.return}Y.length!==0&&_.push({event:J,listeners:Y})}function bG(_,J){nR(_,J),_!=="input"&&_!=="textarea"&&_!=="select"||J==null||J.value!==null||QB||(QB=!0,_==="select"&&J.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",_):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",_));var $={registrationNameDependencies:g6,possibleRegistrationNames:BZ};A9(_)||typeof J.is==="string"||_O(_,J,$),J.contentEditable&&!J.suppressContentEditableWarning&&J.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function $2(_,J,$,q){J!==$&&($=v3($),v3(J)!==$&&(q[_]=J))}function nO(_,J,$){J.forEach(function(q){$[lW(q)]=q==="style"?xG(_):_.getAttribute(q)})}function A4(_,J){J===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",_,_,_):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",_,typeof J)}function pW(_,J){return _=_.namespaceURI===JQ||_.namespaceURI===G7?_.ownerDocument.createElementNS(_.namespaceURI,_.tagName):_.ownerDocument.createElement(_.tagName),_.innerHTML=J,_.innerHTML}function v3(_){return c1(_)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",v1(_)),E1(_)),(typeof _==="string"?_:""+_).replace(Xf,`
|
|
186
|
-
`).replace(Hf,"")}function cW(_,J){return J=v3(J),v3(_)===J?!0:!1}function A0(_,J,$,q,G,F){switch($){case"children":if(typeof q==="string")I3(q,J,!1),J==="body"||J==="textarea"&&q===""||N6(_,q);else if(typeof q==="number"||typeof q==="bigint")I3(""+q,J,!1),J!=="body"&&N6(_,""+q);break;case"className":E8(_,"class",q);break;case"tabIndex":E8(_,"tabindex",q);break;case"dir":case"role":case"viewBox":case"width":case"height":E8(_,$,q);break;case"style":aX(_,q,F);break;case"data":if(J!=="object"){E8(_,"data",q);break}case"src":case"href":if(q===""&&(J!=="a"||$!=="href")){$==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',$,$):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',$,$),_.removeAttribute($);break}if(q==null||typeof q==="function"||typeof q==="symbol"||typeof q==="boolean"){_.removeAttribute($);break}j1(q,$),q=L9(""+q),_.setAttribute($,q);break;case"action":case"formAction":if(q!=null&&(J==="form"?$==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof q==="function"&&(G.encType==null&&G.method==null||cQ||(cQ=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),G.target==null||pQ||(pQ=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):J==="input"||J==="button"?$==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):J!=="input"||G.type==="submit"||G.type==="image"||gQ?J!=="button"||G.type==null||G.type==="submit"||gQ?typeof q==="function"&&(G.name==null||pA||(pA=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),G.formEncType==null&&G.formMethod==null||cQ||(cQ=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),G.formTarget==null||pQ||(pQ=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(gQ=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(gQ=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):$==="action"?console.error("You can only pass the action prop to <form>."):console.error("You can only pass the formAction prop to <input> or <button>.")),typeof q==="function"){_.setAttribute($,"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 F==="function"&&($==="formAction"?(J!=="input"&&A0(_,J,"name",G.name,G,null),A0(_,J,"formEncType",G.formEncType,G,null),A0(_,J,"formMethod",G.formMethod,G,null),A0(_,J,"formTarget",G.formTarget,G,null)):(A0(_,J,"encType",G.encType,G,null),A0(_,J,"method",G.method,G,null),A0(_,J,"target",G.target,G,null)));if(q==null||typeof q==="symbol"||typeof q==="boolean"){_.removeAttribute($);break}j1(q,$),q=L9(""+q),_.setAttribute($,q);break;case"onClick":q!=null&&(typeof q!=="function"&&A4($,q),_.onclick=m4);break;case"onScroll":q!=null&&(typeof q!=="function"&&A4($,q),$0("scroll",_));break;case"onScrollEnd":q!=null&&(typeof q!=="function"&&A4($,q),$0("scrollend",_));break;case"dangerouslySetInnerHTML":if(q!=null){if(typeof q!=="object"||!("__html"in q))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if($=q.__html,$!=null){if(G.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");_.innerHTML=$}}break;case"multiple":_.multiple=q&&typeof q!=="function"&&typeof q!=="symbol";break;case"muted":_.muted=q&&typeof q!=="function"&&typeof q!=="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(q==null||typeof q==="function"||typeof q==="boolean"||typeof q==="symbol"){_.removeAttribute("xlink:href");break}j1(q,$),$=L9(""+q),_.setAttributeNS(q8,"xlink:href",$);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":q!=null&&typeof q!=="function"&&typeof q!=="symbol"?(j1(q,$),_.setAttribute($,""+q)):_.removeAttribute($);break;case"inert":q!==""||lQ[$]||(lQ[$]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",$));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":q&&typeof q!=="function"&&typeof q!=="symbol"?_.setAttribute($,""):_.removeAttribute($);break;case"capture":case"download":q===!0?_.setAttribute($,""):q!==!1&&q!=null&&typeof q!=="function"&&typeof q!=="symbol"?(j1(q,$),_.setAttribute($,q)):_.removeAttribute($);break;case"cols":case"rows":case"size":case"span":q!=null&&typeof q!=="function"&&typeof q!=="symbol"&&!isNaN(q)&&1<=q?(j1(q,$),_.setAttribute($,q)):_.removeAttribute($);break;case"rowSpan":case"start":q==null||typeof q==="function"||typeof q==="symbol"||isNaN(q)?_.removeAttribute($):(j1(q,$),_.setAttribute($,q));break;case"popover":$0("beforetoggle",_),$0("toggle",_),v8(_,"popover",q);break;case"xlinkActuate":E5(_,q8,"xlink:actuate",q);break;case"xlinkArcrole":E5(_,q8,"xlink:arcrole",q);break;case"xlinkRole":E5(_,q8,"xlink:role",q);break;case"xlinkShow":E5(_,q8,"xlink:show",q);break;case"xlinkTitle":E5(_,q8,"xlink:title",q);break;case"xlinkType":E5(_,q8,"xlink:type",q);break;case"xmlBase":E5(_,TF,"xml:base",q);break;case"xmlLang":E5(_,TF,"xml:lang",q);break;case"xmlSpace":E5(_,TF,"xml:space",q);break;case"is":F!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),v8(_,"is",q);break;case"innerText":case"textContent":break;case"popoverTarget":cA||q==null||typeof q!=="object"||(cA=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",q));default:!(2<$.length)||$[0]!=="o"&&$[0]!=="O"||$[1]!=="n"&&$[1]!=="N"?($=sX($),v8(_,$,q)):g6.hasOwnProperty($)&&q!=null&&typeof q!=="function"&&A4($,q)}}function uG(_,J,$,q,G,F){switch($){case"style":aX(_,q,F);break;case"dangerouslySetInnerHTML":if(q!=null){if(typeof q!=="object"||!("__html"in q))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if($=q.__html,$!=null){if(G.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");_.innerHTML=$}}break;case"children":typeof q==="string"?N6(_,q):(typeof q==="number"||typeof q==="bigint")&&N6(_,""+q);break;case"onScroll":q!=null&&(typeof q!=="function"&&A4($,q),$0("scroll",_));break;case"onScrollEnd":q!=null&&(typeof q!=="function"&&A4($,q),$0("scrollend",_));break;case"onClick":q!=null&&(typeof q!=="function"&&A4($,q),_.onclick=m4);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(g6.hasOwnProperty($))q!=null&&typeof q!=="function"&&A4($,q);else _:{if($[0]==="o"&&$[1]==="n"&&(G=$.endsWith("Capture"),J=$.slice(2,G?$.length-7:void 0),F=_[V2]||null,F=F!=null?F[$]:null,typeof F==="function"&&_.removeEventListener(J,F,G),typeof q==="function")){typeof F!=="function"&&F!==null&&($ in _?_[$]=null:_.hasAttribute($)&&_.removeAttribute($)),_.addEventListener(J,q,G);break _}$ in _?_[$]=q:q===!0?_.setAttribute($,""):v8(_,$,q)}}}function X2(_,J,$){switch(bG(J,$),J){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$0("error",_),$0("load",_);var q=!1,G=!1,F;for(F in $)if($.hasOwnProperty(F)){var Y=$[F];if(Y!=null)switch(F){case"src":q=!0;break;case"srcSet":G=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(J+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:A0(_,J,F,Y,$,null)}}G&&A0(_,J,"srcSet",$.srcSet,$,null),q&&A0(_,J,"src",$.src,$,null);return;case"input":_4("input",$),$0("invalid",_);var A=F=Y=G=null,w=null,N=null;for(q in $)if($.hasOwnProperty(q)){var t=$[q];if(t!=null)switch(q){case"name":G=t;break;case"type":Y=t;break;case"checked":w=t;break;case"defaultChecked":N=t;break;case"value":F=t;break;case"defaultValue":A=t;break;case"children":case"dangerouslySetInnerHTML":if(t!=null)throw Error(J+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:A0(_,J,q,t,$,null)}}kJ(_,$),Z9(_,F,A,w,N,Y,G,!1);return;case"select":_4("select",$),$0("invalid",_),q=Y=F=null;for(G in $)if($.hasOwnProperty(G)&&(A=$[G],A!=null))switch(G){case"value":F=A;break;case"defaultValue":Y=A;break;case"multiple":q=A;default:A0(_,J,G,A,$,null)}vJ(_,$),J=F,$=Y,_.multiple=!!q,J!=null?T3(_,!!q,J,!1):$!=null&&T3(_,!!q,$,!0);return;case"textarea":_4("textarea",$),$0("invalid",_),F=G=q=null;for(Y in $)if($.hasOwnProperty(Y)&&(A=$[Y],A!=null))switch(Y){case"value":q=A;break;case"defaultValue":G=A;break;case"children":F=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:A0(_,J,Y,A,$,null)}EJ(_,$),F9(_,q,G,F);return;case"option":DJ(_,$);for(w in $)if($.hasOwnProperty(w)&&(q=$[w],q!=null))switch(w){case"selected":_.selected=q&&typeof q!=="function"&&typeof q!=="symbol";break;default:A0(_,J,w,q,$,null)}return;case"dialog":$0("beforetoggle",_),$0("toggle",_),$0("cancel",_),$0("close",_);break;case"iframe":case"object":$0("load",_);break;case"video":case"audio":for(q=0;q<E_.length;q++)$0(E_[q],_);break;case"image":$0("error",_),$0("load",_);break;case"details":$0("toggle",_);break;case"embed":case"source":case"link":$0("error",_),$0("load",_);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in $)if($.hasOwnProperty(N)&&(q=$[N],q!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(J+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:A0(_,J,N,q,$,null)}return;default:if(A9(J)){for(t in $)$.hasOwnProperty(t)&&(q=$[t],q!==void 0&&uG(_,J,t,q,$,void 0));return}}for(A in $)$.hasOwnProperty(A)&&(q=$[A],q!=null&&A0(_,J,A,q,$,null))}function eO(_,J,$,q){switch(bG(J,q),J){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var G=null,F=null,Y=null,A=null,w=null,N=null,t=null;for(U1 in $){var o=$[U1];if($.hasOwnProperty(U1)&&o!=null)switch(U1){case"checked":break;case"value":break;case"defaultValue":w=o;default:q.hasOwnProperty(U1)||A0(_,J,U1,null,q,o)}}for(var l in q){var U1=q[l];if(o=$[l],q.hasOwnProperty(l)&&(U1!=null||o!=null))switch(l){case"type":F=U1;break;case"name":G=U1;break;case"checked":N=U1;break;case"defaultChecked":t=U1;break;case"value":Y=U1;break;case"defaultValue":A=U1;break;case"children":case"dangerouslySetInnerHTML":if(U1!=null)throw Error(J+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:U1!==o&&A0(_,J,l,U1,q,o)}}J=$.type==="checkbox"||$.type==="radio"?$.checked!=null:$.value!=null,q=q.type==="checkbox"||q.type==="radio"?q.checked!=null:q.value!=null,J||!q||gA||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),gA=!0),!J||q||mA||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),mA=!0),u8(_,Y,A,w,N,t,F,G);return;case"select":U1=Y=A=l=null;for(F in $)if(w=$[F],$.hasOwnProperty(F)&&w!=null)switch(F){case"value":break;case"multiple":U1=w;default:q.hasOwnProperty(F)||A0(_,J,F,null,q,w)}for(G in q)if(F=q[G],w=$[G],q.hasOwnProperty(G)&&(F!=null||w!=null))switch(G){case"value":l=F;break;case"defaultValue":A=F;break;case"multiple":Y=F;default:F!==w&&A0(_,J,G,F,q,w)}q=A,J=Y,$=U1,l!=null?T3(_,!!J,l,!1):!!$!==!!J&&(q!=null?T3(_,!!J,q,!0):T3(_,!!J,J?[]:"",!1));return;case"textarea":U1=l=null;for(A in $)if(G=$[A],$.hasOwnProperty(A)&&G!=null&&!q.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:A0(_,J,A,null,q,G)}for(Y in q)if(G=q[Y],F=$[Y],q.hasOwnProperty(Y)&&(G!=null||F!=null))switch(Y){case"value":l=G;break;case"defaultValue":U1=G;break;case"children":break;case"dangerouslySetInnerHTML":if(G!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:G!==F&&A0(_,J,Y,G,q,F)}bJ(_,l,U1);return;case"option":for(var T1 in $)if(l=$[T1],$.hasOwnProperty(T1)&&l!=null&&!q.hasOwnProperty(T1))switch(T1){case"selected":_.selected=!1;break;default:A0(_,J,T1,null,q,l)}for(w in q)if(l=q[w],U1=$[w],q.hasOwnProperty(w)&&l!==U1&&(l!=null||U1!=null))switch(w){case"selected":_.selected=l&&typeof l!=="function"&&typeof l!=="symbol";break;default:A0(_,J,w,l,q,U1)}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 w1 in $)l=$[w1],$.hasOwnProperty(w1)&&l!=null&&!q.hasOwnProperty(w1)&&A0(_,J,w1,null,q,l);for(N in q)if(l=q[N],U1=$[N],q.hasOwnProperty(N)&&l!==U1&&(l!=null||U1!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(l!=null)throw Error(J+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:A0(_,J,N,l,q,U1)}return;default:if(A9(J)){for(var R0 in $)l=$[R0],$.hasOwnProperty(R0)&&l!==void 0&&!q.hasOwnProperty(R0)&&uG(_,J,R0,void 0,q,l);for(t in q)l=q[t],U1=$[t],!q.hasOwnProperty(t)||l===U1||l===void 0&&U1===void 0||uG(_,J,t,l,q,U1);return}}for(var Q0 in $)l=$[Q0],$.hasOwnProperty(Q0)&&l!=null&&!q.hasOwnProperty(Q0)&&A0(_,J,Q0,null,q,l);for(o in q)l=q[o],U1=$[o],!q.hasOwnProperty(o)||l===U1||l==null&&U1==null||A0(_,J,o,l,q,U1)}function lW(_){switch(_){case"class":return"className";case"for":return"htmlFor";default:return _}}function xG(_){var J={};_=_.style;for(var $=0;$<_.length;$++){var q=_[$];J[q]=_.getPropertyValue(q)}return J}function rW(_,J,$){if(J!=null&&typeof J!=="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var q,G=q="",F;for(F in J)if(J.hasOwnProperty(F)){var Y=J[F];Y!=null&&typeof Y!=="boolean"&&Y!==""&&(F.indexOf("--")===0?(V0(Y,F),q+=G+F+":"+(""+Y).trim()):typeof Y!=="number"||Y===0||JB.has(F)?(V0(Y,F),q+=G+F.replace(tz,"-$1").toLowerCase().replace(oz,"-ms-")+":"+(""+Y).trim()):q+=G+F.replace(tz,"-$1").toLowerCase().replace(oz,"-ms-")+":"+Y+"px",G=";")}q=q||null,J=_.getAttribute("style"),J!==q&&(q=v3(q),v3(J)!==q&&($.style=xG(_)))}}function M5(_,J,$,q,G,F){if(G.delete($),_=_.getAttribute($),_===null)switch(typeof q){case"undefined":case"function":case"symbol":case"boolean":return}else if(q!=null)switch(typeof q){case"function":case"symbol":case"boolean":break;default:if(j1(q,J),_===""+q)return}$2(J,_,q,F)}function dW(_,J,$,q,G,F){if(G.delete($),_=_.getAttribute($),_===null){switch(typeof q){case"function":case"symbol":return}if(!q)return}else switch(typeof q){case"function":case"symbol":break;default:if(q)return}$2(J,_,q,F)}function hG(_,J,$,q,G,F){if(G.delete($),_=_.getAttribute($),_===null)switch(typeof q){case"undefined":case"function":case"symbol":return}else if(q!=null)switch(typeof q){case"function":case"symbol":break;default:if(j1(q,$),_===""+q)return}$2(J,_,q,F)}function iW(_,J,$,q,G,F){if(G.delete($),_=_.getAttribute($),_===null)switch(typeof q){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(q))return}else if(q!=null)switch(typeof q){case"function":case"symbol":case"boolean":break;default:if(!isNaN(q)&&(j1(q,J),_===""+q))return}$2(J,_,q,F)}function mG(_,J,$,q,G,F){if(G.delete($),_=_.getAttribute($),_===null)switch(typeof q){case"undefined":case"function":case"symbol":case"boolean":return}else if(q!=null)switch(typeof q){case"function":case"symbol":case"boolean":break;default:if(j1(q,J),$=L9(""+q),_===$)return}$2(J,_,q,F)}function aW(_,J,$,q){for(var G={},F=new Set,Y=_.attributes,A=0;A<Y.length;A++)switch(Y[A].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:F.add(Y[A].name)}if(A9(J)){for(var w in $)if($.hasOwnProperty(w)){var N=$[w];if(N!=null){if(g6.hasOwnProperty(w))typeof N!=="function"&&A4(w,N);else if($.suppressHydrationWarning!==!0)switch(w){case"children":typeof N!=="string"&&typeof N!=="number"||$2("children",_.textContent,N,G);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":Y=_.innerHTML,N=N?N.__html:void 0,N!=null&&(N=pW(_,N),$2(w,Y,N,G));continue;case"style":F.delete(w),rW(_,N,G);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":F.delete(w.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",w);continue;case"className":F.delete("class"),Y=SJ(_,"class",N),$2("className",Y,N,G);continue;default:q.context===F3&&J!=="svg"&&J!=="math"?F.delete(w.toLowerCase()):F.delete(w),Y=SJ(_,w,N),$2(w,Y,N,G)}}}}else for(N in $)if($.hasOwnProperty(N)&&(w=$[N],w!=null)){if(g6.hasOwnProperty(N))typeof w!=="function"&&A4(N,w);else if($.suppressHydrationWarning!==!0)switch(N){case"children":typeof w!=="string"&&typeof w!=="number"||$2("children",_.textContent,w,G);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":Y=_.innerHTML,w=w?w.__html:void 0,w!=null&&(w=pW(_,w),Y!==w&&(G[N]={__html:Y}));continue;case"className":M5(_,N,"class",w,F,G);continue;case"tabIndex":M5(_,N,"tabindex",w,F,G);continue;case"style":F.delete(N),rW(_,w,G);continue;case"multiple":F.delete(N),$2(N,_.multiple,w,G);continue;case"muted":F.delete(N),$2(N,_.muted,w,G);continue;case"autoFocus":F.delete("autofocus"),$2(N,_.autofocus,w,G);continue;case"data":if(J!=="object"){F.delete(N),Y=_.getAttribute("data"),$2(N,Y,w,G);continue}case"src":case"href":if(!(w!==""||J==="a"&&N==="href"||J==="object"&&N==="data")){N==="src"?console.error('An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',N,N):console.error('An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',N,N);continue}mG(_,N,N,w,F,G);continue;case"action":case"formAction":if(Y=_.getAttribute(N),typeof w==="function"){F.delete(N.toLowerCase()),N==="formAction"?(F.delete("name"),F.delete("formenctype"),F.delete("formmethod"),F.delete("formtarget")):(F.delete("enctype"),F.delete("method"),F.delete("target"));continue}else if(Y===Yf){F.delete(N.toLowerCase()),$2(N,"function",w,G);continue}mG(_,N,N.toLowerCase(),w,F,G);continue;case"xlinkHref":mG(_,N,"xlink:href",w,F,G);continue;case"contentEditable":hG(_,N,"contenteditable",w,F,G);continue;case"spellCheck":hG(_,N,"spellcheck",w,F,G);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":hG(_,N,N,w,F,G);continue;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":dW(_,N,N.toLowerCase(),w,F,G);continue;case"capture":case"download":_:{A=_;var t=Y=N,o=G;if(F.delete(t),A=A.getAttribute(t),A===null)switch(typeof w){case"undefined":case"function":case"symbol":break _;default:if(w===!1)break _}else if(w!=null)switch(typeof w){case"function":case"symbol":break;case"boolean":if(w===!0&&A==="")break _;break;default:if(j1(w,Y),A===""+w)break _}$2(Y,A,w,o)}continue;case"cols":case"rows":case"size":case"span":_:{if(A=_,t=Y=N,o=G,F.delete(t),A=A.getAttribute(t),A===null)switch(typeof w){case"undefined":case"function":case"symbol":case"boolean":break _;default:if(isNaN(w)||1>w)break _}else if(w!=null)switch(typeof w){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(w)||1>w)&&(j1(w,Y),A===""+w))break _}$2(Y,A,w,o)}continue;case"rowSpan":iW(_,N,"rowspan",w,F,G);continue;case"start":iW(_,N,N,w,F,G);continue;case"xHeight":M5(_,N,"x-height",w,F,G);continue;case"xlinkActuate":M5(_,N,"xlink:actuate",w,F,G);continue;case"xlinkArcrole":M5(_,N,"xlink:arcrole",w,F,G);continue;case"xlinkRole":M5(_,N,"xlink:role",w,F,G);continue;case"xlinkShow":M5(_,N,"xlink:show",w,F,G);continue;case"xlinkTitle":M5(_,N,"xlink:title",w,F,G);continue;case"xlinkType":M5(_,N,"xlink:type",w,F,G);continue;case"xmlBase":M5(_,N,"xml:base",w,F,G);continue;case"xmlLang":M5(_,N,"xml:lang",w,F,G);continue;case"xmlSpace":M5(_,N,"xml:space",w,F,G);continue;case"inert":w!==""||lQ[N]||(lQ[N]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",N)),dW(_,N,N,w,F,G);continue;default:if(!(2<N.length)||N[0]!=="o"&&N[0]!=="O"||N[1]!=="n"&&N[1]!=="N"){A=sX(N),Y=!1,q.context===F3&&J!=="svg"&&J!=="math"?F.delete(A.toLowerCase()):(t=N.toLowerCase(),t=$Q.hasOwnProperty(t)?$Q[t]||null:null,t!==null&&t!==N&&(Y=!0,F.delete(t)),F.delete(A));_:if(t=_,o=A,A=w,f6(o))if(t.hasAttribute(o))t=t.getAttribute(o),j1(A,o),A=t===""+A?A:t;else{switch(typeof A){case"function":case"symbol":break _;case"boolean":if(t=o.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-")break _}A=A===void 0?void 0:null}else A=void 0;Y||$2(N,A,w,G)}}}return 0<F.size&&$.suppressHydrationWarning!==!0&&nO(_,F,G),Object.keys(G).length===0?null:G}function _w(_,J){switch(_.length){case 0:return"";case 1:return _[0];case 2:return _[0]+" "+J+" "+_[1];default:return _.slice(0,-1).join(", ")+", "+J+" "+_[_.length-1]}}function sW(_){switch(_){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Jw(){if(typeof performance.getEntriesByType==="function"){for(var _=0,J=0,$=performance.getEntriesByType("resource"),q=0;q<$.length;q++){var G=$[q],F=G.transferSize,Y=G.initiatorType,A=G.duration;if(F&&A&&sW(Y)){Y=0,A=G.responseEnd;for(q+=1;q<$.length;q++){var w=$[q],N=w.startTime;if(N>A)break;var{transferSize:t,initiatorType:o}=w;t&&sW(o)&&(w=w.responseEnd,Y+=t*(w<A?1:(A-N)/(w-N)))}if(--q,J+=8*(F+Y)/(G.duration/1000),_++,10<_)break}}if(0<_)return J/_/1e6}return navigator.connection&&(_=navigator.connection.downlink,typeof _==="number")?_:5}function x$(_){return _.nodeType===9?_:_.ownerDocument}function tW(_){switch(_){case G7:return b7;case JQ:return dQ;default:return F3}}function oW(_,J){if(_===F3)switch(J){case"svg":return b7;case"math":return dQ;default:return F3}return _===b7&&J==="foreignObject"?F3:_}function gG(_,J){return _==="textarea"||_==="noscript"||typeof J.children==="string"||typeof J.children==="number"||typeof J.children==="bigint"||typeof J.dangerouslySetInnerHTML==="object"&&J.dangerouslySetInnerHTML!==null&&J.dangerouslySetInnerHTML.__html!=null}function $w(){var _=window.event;if(_&&_.type==="popstate"){if(_===IF)return!1;return IF=_,!0}return IF=null,!1}function p9(){var _=window.event;return _&&_!==x_?_.type:null}function c9(){var _=window.event;return _&&_!==x_?_.timeStamp:-1.1}function Qw(_){setTimeout(function(){throw _})}function qw(_,J,$){switch(J){case"button":case"input":case"select":case"textarea":$.autoFocus&&_.focus();break;case"img":$.src?_.src=$.src:$.srcSet&&(_.srcset=$.srcSet)}}function Uw(){}function Gw(_,J,$,q){eO(_,J,$,q),_[V2]=q}function nW(_){N6(_,"")}function Zw(_,J,$){_.nodeValue=$}function eW(_){if(!_.__reactWarnedAboutChildrenConflict){var J=_[V2]||null;if(J!==null){var $=h1(_);$!==null&&(typeof J.children==="string"||typeof J.children==="number"?(_.__reactWarnedAboutChildrenConflict=!0,W1($,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):J.dangerouslySetInnerHTML!=null&&(_.__reactWarnedAboutChildrenConflict=!0,W1($,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function E3(_){return _==="head"}function Fw(_,J){_.removeChild(J)}function Kw(_,J){(_.nodeType===9?_.body:_.nodeName==="HTML"?_.ownerDocument.body:_).removeChild(J)}function _z(_,J){var $=J,q=0;do{var G=$.nextSibling;if(_.removeChild($),G&&G.nodeType===8)if($=G.data,$===u_||$===rQ){if(q===0){_.removeChild(G),_7(J);return}q--}else if($===b_||$===U6||$===G8||$===E7||$===U8)q++;else if($===zf)l9(_.ownerDocument.documentElement);else if($===Af){$=_.ownerDocument.head,l9($);for(var F=$.firstChild;F;){var{nextSibling:Y,nodeName:A}=F;F[o9]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&F.rel.toLowerCase()==="stylesheet"||$.removeChild(F),F=Y}}else $===Bf&&l9(_.ownerDocument.body);$=G}while($);_7(J)}function Jz(_,J){var $=_;_=0;do{var q=$.nextSibling;if($.nodeType===1?J?($._stashedDisplay=$.style.display,$.style.display="none"):($.style.display=$._stashedDisplay||"",$.getAttribute("style")===""&&$.removeAttribute("style")):$.nodeType===3&&(J?($._stashedText=$.nodeValue,$.nodeValue=""):$.nodeValue=$._stashedText||""),q&&q.nodeType===8)if($=q.data,$===u_)if(_===0)break;else _--;else $!==b_&&$!==U6&&$!==G8&&$!==E7||_++;$=q}while($)}function Xw(_){Jz(_,!0)}function Hw(_){_=_.style,typeof _.setProperty==="function"?_.setProperty("display","none","important"):_.display="none"}function Yw(_){_.nodeValue=""}function Ww(_){Jz(_,!1)}function zw(_,J){J=J[Lf],J=J!==void 0&&J!==null&&J.hasOwnProperty("display")?J.display:null,_.style.display=J==null||typeof J==="boolean"?"":(""+J).trim()}function Bw(_,J){_.nodeValue=J}function pG(_){var J=_.firstChild;J&&J.nodeType===10&&(J=J.nextSibling);for(;J;){var $=J;switch(J=J.nextSibling,$.nodeName){case"HTML":case"HEAD":case"BODY":pG($),R1($);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if($.rel.toLowerCase()==="stylesheet")continue}_.removeChild($)}}function Aw(_,J,$,q){for(;_.nodeType===1;){var G=$;if(_.nodeName.toLowerCase()!==J.toLowerCase()){if(!q&&(_.nodeName!=="INPUT"||_.type!=="hidden"))break}else if(!q)if(J==="input"&&_.type==="hidden"){j1(G.name,"name");var F=G.name==null?null:""+G.name;if(G.type==="hidden"&&_.getAttribute("name")===F)return _}else return _;else if(!_[o9])switch(J){case"meta":if(!_.hasAttribute("itemprop"))break;return _;case"link":if(F=_.getAttribute("rel"),F==="stylesheet"&&_.hasAttribute("data-precedence"))break;else if(F!==G.rel||_.getAttribute("href")!==(G.href==null||G.href===""?null:G.href)||_.getAttribute("crossorigin")!==(G.crossOrigin==null?null:G.crossOrigin)||_.getAttribute("title")!==(G.title==null?null:G.title))break;return _;case"style":if(_.hasAttribute("data-precedence"))break;return _;case"script":if(F=_.getAttribute("src"),(F!==(G.src==null?null:G.src)||_.getAttribute("type")!==(G.type==null?null:G.type)||_.getAttribute("crossorigin")!==(G.crossOrigin==null?null:G.crossOrigin))&&F&&_.hasAttribute("async")&&!_.hasAttribute("itemprop"))break;return _;default:return _}if(_=q5(_.nextSibling),_===null)break}return null}function Lw(_,J,$){if(J==="")return null;for(;_.nodeType!==3;){if((_.nodeType!==1||_.nodeName!=="INPUT"||_.type!=="hidden")&&!$)return null;if(_=q5(_.nextSibling),_===null)return null}return _}function $z(_,J){for(;_.nodeType!==8;){if((_.nodeType!==1||_.nodeName!=="INPUT"||_.type!=="hidden")&&!J)return null;if(_=q5(_.nextSibling),_===null)return null}return _}function cG(_){return _.data===U6||_.data===G8}function lG(_){return _.data===E7||_.data===U6&&_.ownerDocument.readyState!==rA}function Mw(_,J){var $=_.ownerDocument;if(_.data===G8)_._reactRetry=J;else if(_.data!==U6||$.readyState!==rA)J();else{var q=function(){J(),$.removeEventListener("DOMContentLoaded",q)};$.addEventListener("DOMContentLoaded",q),_._reactRetry=q}}function q5(_){for(;_!=null;_=_.nextSibling){var J=_.nodeType;if(J===1||J===3)break;if(J===8){if(J=_.data,J===b_||J===E7||J===U6||J===G8||J===U8||J===RF||J===lA)break;if(J===u_||J===rQ)return null}}return _}function Qz(_){if(_.nodeType===1){for(var J=_.nodeName.toLowerCase(),$={},q=_.attributes,G=0;G<q.length;G++){var F=q[G];$[lW(F.name)]=F.name.toLowerCase()==="style"?xG(_):F.value}return{type:J,props:$}}return _.nodeType===8?_.data===U8?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:_.nodeValue}function qz(_,J,$){return $===null||$[Wf]!==!0?(_.nodeValue===J?_=null:(J=v3(J),_=v3(_.nodeValue)===J?null:_.nodeValue),_):null}function rG(_){_=_.nextSibling;for(var J=0;_;){if(_.nodeType===8){var $=_.data;if($===u_||$===rQ){if(J===0)return q5(_.nextSibling);J--}else $!==b_&&$!==E7&&$!==U6&&$!==G8&&$!==U8||J++}_=_.nextSibling}return null}function Uz(_){_=_.previousSibling;for(var J=0;_;){if(_.nodeType===8){var $=_.data;if($===b_||$===E7||$===U6||$===G8||$===U8){if(J===0)return _;J--}else $!==u_&&$!==rQ||J++}_=_.previousSibling}return null}function Tw(_){_7(_)}function Rw(_){_7(_)}function Ow(_){_7(_)}function Gz(_,J,$,q,G){switch(G&&z9(_,q.ancestorInfo),J=x$($),_){case"html":if(_=J.documentElement,!_)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return _;case"head":if(_=J.head,!_)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return _;case"body":if(_=J.body,!_)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return _;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function ww(_,J,$,q){if(!$[h3]&&h1($)){var G=$.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",G,G,G)}switch(_){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(G=$.attributes;G.length;)$.removeAttributeNode(G[0]);X2($,_,J),$[H2]=q,$[V2]=J}function l9(_){for(var J=_.attributes;J.length;)_.removeAttributeNode(J[0]);R1(_)}function h$(_){return typeof _.getRootNode==="function"?_.getRootNode():_.nodeType===9?_:_.ownerDocument}function Zz(_,J,$){var q=u7;if(q&&typeof J==="string"&&J){var G=g2(J);G='link[rel="'+_+'"][href="'+G+'"]',typeof $==="string"&&(G+='[crossorigin="'+$+'"]'),oA.has(G)||(oA.add(G),_={rel:_,crossOrigin:$,href:J},q.querySelector(G)===null&&(J=q.createElement("link"),X2(J,"link",_),V1(J),q.head.appendChild(J)))}}function Fz(_,J,$,q){var G=(G=u3.current)?h$(G):null;if(!G)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(_){case"meta":case"title":return null;case"style":return typeof $.precedence==="string"&&typeof $.href==="string"?($=n8($.href),J=U0(G).hoistableStyles,q=J.get($),q||(q={type:"style",instance:null,count:0,state:null},J.set($,q)),q):{type:"void",instance:null,count:0,state:null};case"link":if($.rel==="stylesheet"&&typeof $.href==="string"&&typeof $.precedence==="string"){_=n8($.href);var F=U0(G).hoistableStyles,Y=F.get(_);if(!Y&&(G=G.ownerDocument||G,Y={type:"stylesheet",instance:null,count:0,state:{loading:F8,preload:null}},F.set(_,Y),(F=G.querySelector(r9(_)))&&!F._p&&(Y.instance=F,Y.state.loading=h_|j5),!V5.has(_))){var A={rel:"preload",as:"style",href:$.href,crossOrigin:$.crossOrigin,integrity:$.integrity,media:$.media,hrefLang:$.hrefLang,referrerPolicy:$.referrerPolicy};V5.set(_,A),F||Iw(G,_,A,Y.state)}if(J&&q===null)throw $=`
|
|
187
|
-
|
|
188
|
-
- `+m$(J)+`
|
|
189
|
-
+ `+m$($),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+$);return Y}if(J&&q!==null)throw $=`
|
|
190
|
-
|
|
191
|
-
- `+m$(J)+`
|
|
192
|
-
+ `+m$($),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+$);return null;case"script":return J=$.async,$=$.src,typeof $==="string"&&J&&typeof J!=="function"&&typeof J!=="symbol"?($=e8($),J=U0(G).hoistableScripts,q=J.get($),q||(q={type:"script",instance:null,count:0,state:null},J.set($,q)),q):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+_+'". this is a bug in React.')}}function m$(_){var J=0,$="<link";return typeof _.rel==="string"?(J++,$+=' rel="'+_.rel+'"'):h5.call(_,"rel")&&(J++,$+=' rel="'+(_.rel===null?"null":"invalid type "+typeof _.rel)+'"'),typeof _.href==="string"?(J++,$+=' href="'+_.href+'"'):h5.call(_,"href")&&(J++,$+=' href="'+(_.href===null?"null":"invalid type "+typeof _.href)+'"'),typeof _.precedence==="string"?(J++,$+=' precedence="'+_.precedence+'"'):h5.call(_,"precedence")&&(J++,$+=" precedence={"+(_.precedence===null?"null":"invalid type "+typeof _.precedence)+"}"),Object.getOwnPropertyNames(_).length>J&&($+=" ..."),$+" />"}function n8(_){return'href="'+g2(_)+'"'}function r9(_){return'link[rel="stylesheet"]['+_+"]"}function Kz(_){return o1({},_,{"data-precedence":_.precedence,precedence:null})}function Iw(_,J,$,q){_.querySelector('link[rel="preload"][as="style"]['+J+"]")?q.loading=h_:(J=_.createElement("link"),q.preload=J,J.addEventListener("load",function(){return q.loading|=h_}),J.addEventListener("error",function(){return q.loading|=sA}),X2(J,"link",$),V1(J),_.head.appendChild(J))}function e8(_){return'[src="'+g2(_)+'"]'}function d9(_){return"script[async]"+_}function Xz(_,J,$){if(J.count++,J.instance===null)switch(J.type){case"style":var q=_.querySelector('style[data-href~="'+g2($.href)+'"]');if(q)return J.instance=q,V1(q),q;var G=o1({},$,{"data-href":$.href,"data-precedence":$.precedence,href:null,precedence:null});return q=(_.ownerDocument||_).createElement("style"),V1(q),X2(q,"style",G),g$(q,$.precedence,_),J.instance=q;case"stylesheet":G=n8($.href);var F=_.querySelector(r9(G));if(F)return J.state.loading|=j5,J.instance=F,V1(F),F;q=Kz($),(G=V5.get(G))&&dG(q,G),F=(_.ownerDocument||_).createElement("link"),V1(F);var Y=F;return Y._p=new Promise(function(A,w){Y.onload=A,Y.onerror=w}),X2(F,"link",q),J.state.loading|=j5,g$(F,$.precedence,_),J.instance=F;case"script":if(F=e8($.src),G=_.querySelector(d9(F)))return J.instance=G,V1(G),G;if(q=$,G=V5.get(F))q=o1({},$),iG(q,G);return _=_.ownerDocument||_,G=_.createElement("script"),V1(G),X2(G,"link",q),_.head.appendChild(G),J.instance=G;case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+J.type+'". this is a bug in React.')}else J.type==="stylesheet"&&(J.state.loading&j5)===F8&&(q=J.instance,J.state.loading|=j5,g$(q,$.precedence,_));return J.instance}function g$(_,J,$){for(var q=$.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),G=q.length?q[q.length-1]:null,F=G,Y=0;Y<q.length;Y++){var A=q[Y];if(A.dataset.precedence===J)F=A;else if(F!==G)break}F?F.parentNode.insertBefore(_,F.nextSibling):(J=$.nodeType===9?$.head:$,J.insertBefore(_,J.firstChild))}function dG(_,J){_.crossOrigin==null&&(_.crossOrigin=J.crossOrigin),_.referrerPolicy==null&&(_.referrerPolicy=J.referrerPolicy),_.title==null&&(_.title=J.title)}function iG(_,J){_.crossOrigin==null&&(_.crossOrigin=J.crossOrigin),_.referrerPolicy==null&&(_.referrerPolicy=J.referrerPolicy),_.integrity==null&&(_.integrity=J.integrity)}function Hz(_,J,$){if(iQ===null){var q=new Map,G=iQ=new Map;G.set($,q)}else G=iQ,q=G.get($),q||(q=new Map,G.set($,q));if(q.has(_))return q;q.set(_,null),$=$.getElementsByTagName(_);for(G=0;G<$.length;G++){var F=$[G];if(!(F[o9]||F[H2]||_==="link"&&F.getAttribute("rel")==="stylesheet")&&F.namespaceURI!==G7){var Y=F.getAttribute(J)||"";Y=_+Y;var A=q.get(Y);A?A.push(F):q.set(Y,[F])}}return q}function Yz(_,J,$){_=_.ownerDocument||_,_.head.insertBefore($,J==="title"?_.querySelector("head > title"):null)}function fw(_,J,$){var q=!$.ancestorInfo.containerTagInScope;if($.context===b7||J.itemProp!=null)return!q||J.itemProp==null||_!=="meta"&&_!=="title"&&_!=="style"&&_!=="link"&&_!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",_,_),!1;switch(_){case"meta":case"title":return!0;case"style":if(typeof J.precedence!=="string"||typeof J.href!=="string"||J.href===""){q&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof J.rel!=="string"||typeof J.href!=="string"||J.href===""||J.onLoad||J.onError){if(J.rel==="stylesheet"&&typeof J.precedence==="string"){_=J.href;var{onError:G,disabled:F}=J;$=[],J.onLoad&&$.push("`onLoad`"),G&&$.push("`onError`"),F!=null&&$.push("`disabled`"),G=_w($,"and"),G+=$.length===1?" prop":" props",F=$.length===1?"an "+G:"the "+G,$.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',_,F,G)}q&&(typeof J.rel!=="string"||typeof J.href!=="string"||J.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(J.onError||J.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(J.rel){case"stylesheet":return _=J.precedence,J=J.disabled,typeof _!=="string"&&q&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof _==="string"&&J==null;default:return!0}case"script":if(_=J.async&&typeof J.async!=="function"&&typeof J.async!=="symbol",!_||J.onLoad||J.onError||!J.src||typeof J.src!=="string"){q&&(_?J.onLoad||J.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":q&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",_)}return!1}function Wz(_){return _.type==="stylesheet"&&(_.state.loading&tA)===F8?!1:!0}function Pw(_,J,$,q){if($.type==="stylesheet"&&(typeof q.media!=="string"||matchMedia(q.media).matches!==!1)&&($.state.loading&j5)===F8){if($.instance===null){var G=n8(q.href),F=J.querySelector(r9(G));if(F){J=F._p,J!==null&&typeof J==="object"&&typeof J.then==="function"&&(_.count++,_=p$.bind(_),J.then(_,_)),$.state.loading|=j5,$.instance=F,V1(F);return}F=J.ownerDocument||J,q=Kz(q),(G=V5.get(G))&&dG(q,G),F=F.createElement("link"),V1(F);var Y=F;Y._p=new Promise(function(A,w){Y.onload=A,Y.onerror=w}),X2(F,"link",q),$.instance=F}_.stylesheets===null&&(_.stylesheets=new Map),_.stylesheets.set($,J),(J=$.state.preload)&&($.state.loading&tA)===F8&&(_.count++,$=p$.bind(_),J.addEventListener("load",$),J.addEventListener("error",$))}}function Nw(_,J){return _.stylesheets&&_.count===0&&c$(_,_.stylesheets),0<_.count||0<_.imgCount?function($){var q=setTimeout(function(){if(_.stylesheets&&c$(_,_.stylesheets),_.unsuspend){var F=_.unsuspend;_.unsuspend=null,F()}},Rf+J);0<_.imgBytes&&PF===0&&(PF=125*Jw()*wf);var G=setTimeout(function(){if(_.waitingForImages=!1,_.count===0&&(_.stylesheets&&c$(_,_.stylesheets),_.unsuspend)){var F=_.unsuspend;_.unsuspend=null,F()}},(_.imgBytes>PF?50:Of)+J);return _.unsuspend=$,function(){_.unsuspend=null,clearTimeout(q),clearTimeout(G)}}:null}function p$(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)c$(this,this.stylesheets);else if(this.unsuspend){var _=this.unsuspend;this.unsuspend=null,_()}}}function c$(_,J){_.stylesheets=null,_.unsuspend!==null&&(_.count++,aQ=new Map,J.forEach(Cw,_),aQ=null,p$.call(_))}function Cw(_,J){if(!(J.state.loading&j5)){var $=aQ.get(_);if($)var q=$.get(NF);else{$=new Map,aQ.set(_,$);for(var G=_.querySelectorAll("link[data-precedence],style[data-precedence]"),F=0;F<G.length;F++){var Y=G[F];if(Y.nodeName==="LINK"||Y.getAttribute("media")!=="not all")$.set(Y.dataset.precedence,Y),q=Y}q&&$.set(NF,q)}G=J.instance,Y=G.getAttribute("data-precedence"),F=$.get(Y)||q,F===q&&$.set(NF,G),$.set(Y,G),this.count++,q=p$.bind(this),G.addEventListener("load",q),G.addEventListener("error",q),F?F.parentNode.insertBefore(G,F.nextSibling):(_=_.nodeType===9?_.head:_,_.insertBefore(G,_.firstChild)),J.state.loading|=j5}}function Sw(_,J,$,q,G,F,Y,A,w){this.tag=1,this.containerInfo=_,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Z8,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=A2(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=A2(0),this.hiddenUpdates=A2(null),this.identifierPrefix=q,this.onUncaughtError=G,this.onCaughtError=F,this.onRecoverableError=Y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,_=this.pendingUpdatersLaneMap=[];for(J=0;31>J;J++)_.push(new Set);this._debugRootType=$?"hydrateRoot()":"createRoot()"}function zz(_,J,$,q,G,F,Y,A,w,N,t,o){return _=new Sw(_,J,$,Y,w,N,t,o,A),J=iI,F===!0&&(J|=R2|g5),J|=d1,F=M(3,null,null,J),_.current=F,F.stateNode=_,J=OU(),v6(J),_.pooledCache=J,v6(J),F.memoizedState={element:q,isDehydrated:$,cache:J},NU(F),_}function Bz(_){if(!_)return c3;return _=c3,_}function aG(_,J,$,q,G,F){if(T2&&typeof T2.onScheduleFiberRoot==="function")try{T2.onScheduleFiberRoot(q7,q,$)}catch(Y){R4||(R4=!0,console.error("React instrumentation encountered an error: %o",Y))}G=Bz(G),q.context===null?q.context=G:q.pendingContext=G,T4&&G5!==null&&!JL&&(JL=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
193
|
-
|
|
194
|
-
Check the render method of %s.`,m(G5)||"Unknown")),q=S3(J),q.payload={element:$},F=F===void 0?null:F,F!==null&&(typeof F!=="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",F),q.callback=F),$=j3(_,q,J),$!==null&&(q4(J,"root.render()",null),k0($,_,J),N9($,_,J))}function Az(_,J){if(_=_.memoizedState,_!==null&&_.dehydrated!==null){var $=_.retryLane;_.retryLane=$!==0&&$<J?$:J}}function sG(_,J){Az(_,J),(_=_.alternate)&&Az(_,J)}function Lz(_){if(_.tag===13||_.tag===31){var J=M2(_,67108864);J!==null&&k0(J,_,67108864),sG(_,67108864)}}function Mz(_){if(_.tag===13||_.tag===31){var J=Q5(_);J=x4(J);var $=M2(_,J);$!==null&&k0($,_,J),sG(_,J)}}function jw(){return G5}function Vw(_,J,$,q){var G=Z1.T;Z1.T=null;var F=Y0.p;try{Y0.p=Z5,tG(_,J,$,q)}finally{Y0.p=F,Z1.T=G}}function kw(_,J,$,q){var G=Z1.T;Z1.T=null;var F=Y0.p;try{Y0.p=m5,tG(_,J,$,q)}finally{Y0.p=F,Z1.T=G}}function tG(_,J,$,q){if(tQ){var G=oG(q);if(G===null)EG(_,J,q,oQ,$),Rz(_,q);else if(Dw(G,_,J,$,q))q.stopPropagation();else if(Rz(_,q),J&4&&-1<ff.indexOf(_)){for(;G!==null;){var F=h1(G);if(F!==null)switch(F.tag){case 3:if(F=F.stateNode,F.current.memoizedState.isDehydrated){var Y=z2(F.pendingLanes);if(Y!==0){var A=F;A.pendingLanes|=2;for(A.entangledLanes|=2;Y;){var w=1<<31-j2(Y);A.entanglements[1]|=w,Y&=~w}B4(F),(Z0&(o0|H5))===G2&&(yQ=Q2()+jA,m9(0,!1))}}break;case 31:case 13:A=M2(F,2),A!==null&&k0(A,F,2),s8(),sG(F,2)}if(F=oG(q),F===null&&EG(_,J,q,oQ,$),F===G)break;G=F}G!==null&&q.stopPropagation()}else EG(_,J,q,null,$)}}function oG(_){return _=QU(_),nG(_)}function nG(_){if(oQ=null,_=P1(_),_!==null){var J=k(_);if(J===null)_=null;else{var $=J.tag;if($===13){if(_=h(J),_!==null)return _;_=null}else if($===31){if(_=P(J),_!==null)return _;_=null}else if($===3){if(J.stateNode.current.memoizedState.isDehydrated)return J.tag===3?J.stateNode.containerInfo:null;_=null}else J!==_&&(_=null)}}return oQ=_,null}function Tz(_){switch(_){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 Z5;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 m5;case"message":switch(gw()){case HZ:return Z5;case YZ:return m5;case Q7:case pw:return w4;case WZ:return e$;default:return w4}default:return w4}}function Rz(_,J){switch(_){case"focusin":case"focusout":G6=null;break;case"dragenter":case"dragleave":Z6=null;break;case"mouseover":case"mouseout":F6=null;break;case"pointerover":case"pointerout":g_.delete(J.pointerId);break;case"gotpointercapture":case"lostpointercapture":p_.delete(J.pointerId)}}function i9(_,J,$,q,G,F){if(_===null||_.nativeEvent!==F)return _={blockedOn:J,domEventName:$,eventSystemFlags:q,nativeEvent:F,targetContainers:[G]},J!==null&&(J=h1(J),J!==null&&Lz(J)),_;return _.eventSystemFlags|=q,J=_.targetContainers,G!==null&&J.indexOf(G)===-1&&J.push(G),_}function Dw(_,J,$,q,G){switch(J){case"focusin":return G6=i9(G6,_,J,$,q,G),!0;case"dragenter":return Z6=i9(Z6,_,J,$,q,G),!0;case"mouseover":return F6=i9(F6,_,J,$,q,G),!0;case"pointerover":var F=G.pointerId;return g_.set(F,i9(g_.get(F)||null,_,J,$,q,G)),!0;case"gotpointercapture":return F=G.pointerId,p_.set(F,i9(p_.get(F)||null,_,J,$,q,G)),!0}return!1}function Oz(_){var J=P1(_.target);if(J!==null){var $=k(J);if($!==null){if(J=$.tag,J===13){if(J=h($),J!==null){_.blockedOn=J,A1(_.priority,function(){Mz($)});return}}else if(J===31){if(J=P($),J!==null){_.blockedOn=J,A1(_.priority,function(){Mz($)});return}}else if(J===3&&$.stateNode.current.memoizedState.isDehydrated){_.blockedOn=$.tag===3?$.stateNode.containerInfo:null;return}}}_.blockedOn=null}function l$(_){if(_.blockedOn!==null)return!1;for(var J=_.targetContainers;0<J.length;){var $=oG(_.nativeEvent);if($===null){$=_.nativeEvent;var q=new $.constructor($.type,$),G=q;n9!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),n9=G,$.target.dispatchEvent(q),n9===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),n9=null}else return J=h1($),J!==null&&Lz(J),_.blockedOn=$,!1;J.shift()}return!0}function wz(_,J,$){l$(_)&&$.delete(J)}function yw(){CF=!1,G6!==null&&l$(G6)&&(G6=null),Z6!==null&&l$(Z6)&&(Z6=null),F6!==null&&l$(F6)&&(F6=null),g_.forEach(wz),p_.forEach(wz)}function r$(_,J){_.blockedOn===J&&(_.blockedOn=null,CF||(CF=!0,K0.unstable_scheduleCallback(K0.unstable_NormalPriority,yw)))}function Iz(_){nQ!==_&&(nQ=_,K0.unstable_scheduleCallback(K0.unstable_NormalPriority,function(){nQ===_&&(nQ=null);for(var J=0;J<_.length;J+=3){var $=_[J],q=_[J+1],G=_[J+2];if(typeof q!=="function")if(nG(q||$)===null)continue;else break;var F=h1($);F!==null&&(_.splice(J,3),J-=3,$={pending:!0,data:G,method:$.method,action:q},Object.freeze($),nU(F,$,q,G))}}))}function _7(_){function J(w){return r$(w,_)}G6!==null&&r$(G6,_),Z6!==null&&r$(Z6,_),F6!==null&&r$(F6,_),g_.forEach(J),p_.forEach(J);for(var $=0;$<K6.length;$++){var q=K6[$];q.blockedOn===_&&(q.blockedOn=null)}for(;0<K6.length&&($=K6[0],$.blockedOn===null);)Oz($),$.blockedOn===null&&K6.shift();if($=(_.ownerDocument||_).$$reactFormReplay,$!=null)for(q=0;q<$.length;q+=3){var G=$[q],F=$[q+1],Y=G[V2]||null;if(typeof F==="function")Y||Iz($);else if(Y){var A=null;if(F&&F.hasAttribute("formAction")){if(G=F,Y=F[V2]||null)A=Y.formAction;else if(nG(G)!==null)continue}else A=Y.action;typeof A==="function"?$[q+1]=A:($.splice(q,3),q-=3),Iz($)}}}function fz(){function _(F){F.canIntercept&&F.info==="react-transition"&&F.intercept({handler:function(){return new Promise(function(Y){return G=Y})},focusReset:"manual",scroll:"manual"})}function J(){G!==null&&(G(),G=null),q||setTimeout($,20)}function $(){if(!q&&!navigation.transition){var F=navigation.currentEntry;F&&F.url!=null&&navigation.navigate(F.url,{state:F.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var q=!1,G=null;return navigation.addEventListener("navigate",_),navigation.addEventListener("navigatesuccess",J),navigation.addEventListener("navigateerror",J),setTimeout($,100),function(){q=!0,navigation.removeEventListener("navigate",_),navigation.removeEventListener("navigatesuccess",J),navigation.removeEventListener("navigateerror",J),G!==null&&(G(),G=null)}}}function eG(_){this._internalRoot=_}function d$(_){this._internalRoot=_}function Pz(_){_[h3]&&(_._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o1=Object.assign,vw=Symbol.for("react.element"),L4=Symbol.for("react.transitional.element"),J7=Symbol.for("react.portal"),$7=Symbol.for("react.fragment"),i$=Symbol.for("react.strict_mode"),_Z=Symbol.for("react.profiler"),JZ=Symbol.for("react.consumer"),M4=Symbol.for("react.context"),a9=Symbol.for("react.forward_ref"),$Z=Symbol.for("react.suspense"),QZ=Symbol.for("react.suspense_list"),a$=Symbol.for("react.memo"),U5=Symbol.for("react.lazy"),qZ=Symbol.for("react.activity"),Ew=Symbol.for("react.memo_cache_sentinel"),Nz=Symbol.iterator,bw=Symbol.for("react.client.reference"),s0=Array.isArray,Z1=$9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y0=hX.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,uw=Object.freeze({pending:!1,data:null,method:null,action:null}),UZ=[],GZ=[],a4=-1,b3=_1(null),s9=_1(null),u3=_1(null),s$=_1(null),t9=0,Cz,Sz,jz,Vz,kz,Dz,yz;j.__reactDisabledLog=!0;var ZZ,vz,FZ=!1,KZ=new(typeof WeakMap==="function"?WeakMap:Map),G5=null,T4=!1,h5=Object.prototype.hasOwnProperty,XZ=K0.unstable_scheduleCallback,xw=K0.unstable_cancelCallback,hw=K0.unstable_shouldYield,mw=K0.unstable_requestPaint,Q2=K0.unstable_now,gw=K0.unstable_getCurrentPriorityLevel,HZ=K0.unstable_ImmediatePriority,YZ=K0.unstable_UserBlockingPriority,Q7=K0.unstable_NormalPriority,pw=K0.unstable_LowPriority,WZ=K0.unstable_IdlePriority,cw=K0.log,lw=K0.unstable_setDisableYieldValue,q7=null,T2=null,R4=!1,O4=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",j2=Math.clz32?Math.clz32:h2,rw=Math.log,dw=Math.LN2,t$=256,o$=262144,n$=4194304,Z5=2,m5=8,w4=32,e$=268435456,x3=Math.random().toString(36).slice(2),H2="__reactFiber$"+x3,V2="__reactProps$"+x3,h3="__reactContainer$"+x3,zZ="__reactEvents$"+x3,iw="__reactListeners$"+x3,aw="__reactHandles$"+x3,Ez="__reactResources$"+x3,o9="__reactMarker$"+x3,bz=new Set,g6={},BZ={},sw={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},tw=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]*$"),uz={},xz={},ow=/[\n"\\]/g,hz=!1,mz=!1,gz=!1,pz=!1,cz=!1,lz=!1,rz=["value","defaultValue"],dz=!1,iz=/["'&<>\n\t]|^\s|\s$/,nw="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),az="applet caption html table td th marquee object template foreignObject desc title".split(" "),ew=az.concat(["button"]),_I="dd dt li option optgroup p rp rt".split(" "),sz={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},_Q={},AZ={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},tz=/([A-Z])/g,oz=/^ms-/,JI=/^(?:webkit|moz|o)[A-Z]/,$I=/^-ms-/,QI=/-(.)/g,nz=/;\s*$/,U7={},LZ={},ez=!1,_B=!1,JB=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(" ")),JQ="http://www.w3.org/1998/Math/MathML",G7="http://www.w3.org/2000/svg",qI=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"]]),$Q={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},$B={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},Z7={},UI=RegExp("^(aria)-[: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]*$"),GI=RegExp("^(aria)[A-Z][: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]*$"),QB=!1,k2={},qB=/^on./,ZI=/^on[^A-Z]/,FI=RegExp("^(aria)-[: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]*$"),KI=RegExp("^(aria)[A-Z][: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]*$"),XI=/^[\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,n9=null,F7=null,K7=null,MZ=!1,I4=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),TZ=!1;if(I4)try{var e9={};Object.defineProperty(e9,"passive",{get:function(){TZ=!0}}),window.addEventListener("test",e9,e9),window.removeEventListener("test",e9,e9)}catch(_){TZ=!1}var m3=null,RZ=null,QQ=null,p6={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(_){return _.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qQ=p2(p6),__=o1({},p6,{view:0,detail:0}),HI=p2(__),OZ,wZ,J_,UQ=o1({},__,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qU,button:0,buttons:0,relatedTarget:function(_){return _.relatedTarget===void 0?_.fromElement===_.srcElement?_.toElement:_.fromElement:_.relatedTarget},movementX:function(_){if("movementX"in _)return _.movementX;return _!==J_&&(J_&&_.type==="mousemove"?(OZ=_.screenX-J_.screenX,wZ=_.screenY-J_.screenY):wZ=OZ=0,J_=_),OZ},movementY:function(_){return"movementY"in _?_.movementY:wZ}}),UB=p2(UQ),YI=o1({},UQ,{dataTransfer:0}),WI=p2(YI),zI=o1({},__,{relatedTarget:0}),IZ=p2(zI),BI=o1({},p6,{animationName:0,elapsedTime:0,pseudoElement:0}),AI=p2(BI),LI=o1({},p6,{clipboardData:function(_){return"clipboardData"in _?_.clipboardData:window.clipboardData}}),MI=p2(LI),TI=o1({},p6,{data:0}),GB=p2(TI),RI=GB,OI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wI={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"},II={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},fI=o1({},__,{key:function(_){if(_.key){var J=OI[_.key]||_.key;if(J!=="Unidentified")return J}return _.type==="keypress"?(_=lJ(_),_===13?"Enter":String.fromCharCode(_)):_.type==="keydown"||_.type==="keyup"?wI[_.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qU,charCode:function(_){return _.type==="keypress"?lJ(_):0},keyCode:function(_){return _.type==="keydown"||_.type==="keyup"?_.keyCode:0},which:function(_){return _.type==="keypress"?lJ(_):_.type==="keydown"||_.type==="keyup"?_.keyCode:0}}),PI=p2(fI),NI=o1({},UQ,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ZB=p2(NI),CI=o1({},__,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qU}),SI=p2(CI),jI=o1({},p6,{propertyName:0,elapsedTime:0,pseudoElement:0}),VI=p2(jI),kI=o1({},UQ,{deltaX:function(_){return"deltaX"in _?_.deltaX:("wheelDeltaX"in _)?-_.wheelDeltaX:0},deltaY:function(_){return"deltaY"in _?_.deltaY:("wheelDeltaY"in _)?-_.wheelDeltaY:("wheelDelta"in _)?-_.wheelDelta:0},deltaZ:0,deltaMode:0}),DI=p2(kI),yI=o1({},p6,{newState:0,oldState:0}),vI=p2(yI),EI=[9,13,27,32],FB=229,fZ=I4&&"CompositionEvent"in window,$_=null;I4&&"documentMode"in document&&($_=document.documentMode);var bI=I4&&"TextEvent"in window&&!$_,KB=I4&&(!fZ||$_&&8<$_&&11>=$_),XB=32,HB=String.fromCharCode(XB),YB=!1,X7=!1,uI={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},Q_=null,q_=null,WB=!1;I4&&(WB=qO("input")&&(!document.documentMode||9<document.documentMode));var D2=typeof Object.is==="function"?Object.is:XO,xI=I4&&"documentMode"in document&&11>=document.documentMode,H7=null,PZ=null,U_=null,NZ=!1,Y7={animationend:C6("Animation","AnimationEnd"),animationiteration:C6("Animation","AnimationIteration"),animationstart:C6("Animation","AnimationStart"),transitionrun:C6("Transition","TransitionRun"),transitionstart:C6("Transition","TransitionStart"),transitioncancel:C6("Transition","TransitionCancel"),transitionend:C6("Transition","TransitionEnd")},CZ={},zB={};I4&&(zB=document.createElement("div").style,("AnimationEvent"in window)||(delete Y7.animationend.animation,delete Y7.animationiteration.animation,delete Y7.animationstart.animation),("TransitionEvent"in window)||delete Y7.transitionend.transition);var BB=S6("animationend"),AB=S6("animationiteration"),LB=S6("animationstart"),hI=S6("transitionrun"),mI=S6("transitionstart"),gI=S6("transitioncancel"),MB=S6("transitionend"),TB=new Map,SZ="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(" ");SZ.push("scrollEnd");var RB=0;if(typeof performance==="object"&&typeof performance.now==="function")var pI=performance,OB=function(){return pI.now()};else{var cI=Date;OB=function(){return cI.now()}}var jZ=typeof reportError==="function"?reportError:function(_){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _==="object"&&_!==null&&typeof _.message==="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(J))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",_);return}console.error(_)},lI="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",GQ=0,VZ=1,kZ=2,DZ=3,ZQ="– ",FQ="+ ",wB=" ",O0=typeof console<"u"&&typeof console.timeStamp==="function"&&typeof performance<"u"&&typeof performance.measure==="function",T5="Components ⚛",n1="Scheduler ⚛",e1="Blocking",g3=!1,s4={color:"primary",properties:null,tooltipText:"",track:T5},p3={start:-0,end:-0,detail:{devtools:s4}},rI=["Changed Props",""],IB="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",dI=["Changed Props",IB],G_=1,t4=2,R5=[],W7=0,yZ=0,c3={};Object.freeze(c3);var O5=null,z7=null,x1=0,iI=1,d1=2,R2=8,g5=16,aI=32,fB=!1;try{var PB=Object.preventExtensions({})}catch(_){fB=!0}var vZ=new WeakMap,B7=[],A7=0,KQ=null,Z_=0,w5=[],I5=0,c6=null,o4=1,n4="",Y2=null,w0=null,J0=!1,f4=!1,F5=null,l3=null,f5=!1,EZ=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),bZ=_1(null),uZ=_1(null),NB={},XQ=null,L7=null,M7=!1,sI=typeof AbortController<"u"?AbortController:function(){var _=[],J=this.signal={aborted:!1,addEventListener:function($,q){_.push(q)}};this.abort=function(){J.aborted=!0,_.forEach(function($){return $()})}},tI=K0.unstable_scheduleCallback,oI=K0.unstable_NormalPriority,p0={$$typeof:M4,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},c0=K0.unstable_now,HQ=console.createTask?console.createTask:function(){return null},F_=1,YQ=2,q2=-0,r3=-0,e4=-0,_3=null,y2=-1.1,l6=-0,S0=-0,D1=-1.1,u1=-1.1,P0=null,D0=!1,d3=-0,P4=-1.1,K_=null,i3=0,xZ=null,hZ=null,r6=-1.1,X_=null,T7=-1.1,WQ=-1.1,N4=-0,J3=-1.1,P5=-1.1,mZ=0,H_=null,CB=null,SB=null,a3=-1.1,d6=null,s3=-1.1,zQ=-1.1,jB=-0,VB=-0,BQ=0,$3=null,kB=0,Y_=-1.1,AQ=!1,LQ=!1,W_=null,gZ=0,i6=0,R7=null,DB=Z1.S;Z1.S=function(_,J){if(CA=Q2(),typeof J==="object"&&J!==null&&typeof J.then==="function"){if(0>J3&&0>P5){J3=c0();var $=c9(),q=p9();if($!==s3||q!==d6)s3=-1.1;a3=$,d6=q}LO(_,J)}DB!==null&&DB(_,J)};var a6=_1(null),p5={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},z_=[],B_=[],A_=[],L_=[],M_=[],T_=[],s6=new Set;p5.recordUnsafeLifecycleWarnings=function(_,J){s6.has(_.type)||(typeof J.componentWillMount==="function"&&J.componentWillMount.__suppressDeprecationWarning!==!0&&z_.push(_),_.mode&R2&&typeof J.UNSAFE_componentWillMount==="function"&&B_.push(_),typeof J.componentWillReceiveProps==="function"&&J.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&A_.push(_),_.mode&R2&&typeof J.UNSAFE_componentWillReceiveProps==="function"&&L_.push(_),typeof J.componentWillUpdate==="function"&&J.componentWillUpdate.__suppressDeprecationWarning!==!0&&M_.push(_),_.mode&R2&&typeof J.UNSAFE_componentWillUpdate==="function"&&T_.push(_))},p5.flushPendingUnsafeLifecycleWarnings=function(){var _=new Set;0<z_.length&&(z_.forEach(function(A){_.add(m(A)||"Component"),s6.add(A.type)}),z_=[]);var J=new Set;0<B_.length&&(B_.forEach(function(A){J.add(m(A)||"Component"),s6.add(A.type)}),B_=[]);var $=new Set;0<A_.length&&(A_.forEach(function(A){$.add(m(A)||"Component"),s6.add(A.type)}),A_=[]);var q=new Set;0<L_.length&&(L_.forEach(function(A){q.add(m(A)||"Component"),s6.add(A.type)}),L_=[]);var G=new Set;0<M_.length&&(M_.forEach(function(A){G.add(m(A)||"Component"),s6.add(A.type)}),M_=[]);var F=new Set;if(0<T_.length&&(T_.forEach(function(A){F.add(m(A)||"Component"),s6.add(A.type)}),T_=[]),0<J.size){var Y=L(J);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
195
|
-
|
|
196
|
-
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
197
|
-
|
|
198
|
-
Please update the following components: %s`,Y)}0<q.size&&(Y=L(q),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
199
|
-
|
|
200
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
201
|
-
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
202
|
-
|
|
203
|
-
Please update the following components: %s`,Y)),0<F.size&&(Y=L(F),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
204
|
-
|
|
205
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
206
|
-
|
|
207
|
-
Please update the following components: %s`,Y)),0<_.size&&(Y=L(_),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
208
|
-
|
|
209
|
-
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
210
|
-
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
211
|
-
|
|
212
|
-
Please update the following components: %s`,Y)),0<$.size&&(Y=L($),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
213
|
-
|
|
214
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
215
|
-
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
216
|
-
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
217
|
-
|
|
218
|
-
Please update the following components: %s`,Y)),0<G.size&&(Y=L(G),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
219
|
-
|
|
220
|
-
* Move data fetching code or side effects to componentDidUpdate.
|
|
221
|
-
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
222
|
-
|
|
223
|
-
Please update the following components: %s`,Y))};var MQ=new Map,yB=new Set;p5.recordLegacyContextWarning=function(_,J){var $=null;for(var q=_;q!==null;)q.mode&R2&&($=q),q=q.return;$===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!yB.has(_.type)&&(q=MQ.get($),_.type.contextTypes!=null||_.type.childContextTypes!=null||J!==null&&typeof J.getChildContext==="function")&&(q===void 0&&(q=[],MQ.set($,q)),q.push(_))},p5.flushLegacyContextWarning=function(){MQ.forEach(function(_){if(_.length!==0){var J=_[0],$=new Set;_.forEach(function(G){$.add(m(G)||"Component"),yB.add(G.type)});var q=L($);W1(J,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
|
224
|
-
|
|
225
|
-
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
226
|
-
|
|
227
|
-
Please update the following components: %s
|
|
228
|
-
|
|
229
|
-
Learn more about this warning here: https://react.dev/link/legacy-context`,q)})}})},p5.discardPendingWarnings=function(){z_=[],B_=[],A_=[],L_=[],M_=[],T_=[],MQ=new Map};var vB={react_stack_bottom_frame:function(_,J,$){var q=T4;T4=!0;try{return _(J,$)}finally{T4=q}}},pZ=vB.react_stack_bottom_frame.bind(vB),EB={react_stack_bottom_frame:function(_){var J=T4;T4=!0;try{return _.render()}finally{T4=J}}},bB=EB.react_stack_bottom_frame.bind(EB),uB={react_stack_bottom_frame:function(_,J){try{J.componentDidMount()}catch($){H0(_,_.return,$)}}},cZ=uB.react_stack_bottom_frame.bind(uB),xB={react_stack_bottom_frame:function(_,J,$,q,G){try{J.componentDidUpdate($,q,G)}catch(F){H0(_,_.return,F)}}},hB=xB.react_stack_bottom_frame.bind(xB),mB={react_stack_bottom_frame:function(_,J){var $=J.stack;_.componentDidCatch(J.value,{componentStack:$!==null?$:""})}},nI=mB.react_stack_bottom_frame.bind(mB),gB={react_stack_bottom_frame:function(_,J,$){try{$.componentWillUnmount()}catch(q){H0(_,J,q)}}},pB=gB.react_stack_bottom_frame.bind(gB),cB={react_stack_bottom_frame:function(_){var J=_.create;return _=_.inst,J=J(),_.destroy=J}},eI=cB.react_stack_bottom_frame.bind(cB),lB={react_stack_bottom_frame:function(_,J,$){try{$()}catch(q){H0(_,J,q)}}},_f=lB.react_stack_bottom_frame.bind(lB),rB={react_stack_bottom_frame:function(_){var J=_._init;return J(_._payload)}},Jf=rB.react_stack_bottom_frame.bind(rB),O7=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),lZ=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),TQ=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),RQ={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},t6=null,R_=!1,w7=null,O_=0,i1=null,rZ,dB=rZ=!1,iB={},aB={},sB={};R=function(_,J,$){if($!==null&&typeof $==="object"&&$._store&&(!$._store.validated&&$.key==null||$._store.validated===2)){if(typeof $._store!=="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");$._store.validated=1;var q=m(_),G=q||"null";if(!iB[G]){iB[G]=!0,$=$._owner,_=_._debugOwner;var F="";_&&typeof _.tag==="number"&&(G=m(_))&&(F=`
|
|
230
|
-
|
|
231
|
-
Check the render method of \``+G+"`."),F||q&&(F=`
|
|
232
|
-
|
|
233
|
-
Check the top-level render call using <`+q+">.");var Y="";$!=null&&_!==$&&(q=null,typeof $.tag==="number"?q=m($):typeof $.name==="string"&&(q=$.name),q&&(Y=" It was passed a child from "+q+".")),W1(J,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',F,Y)})}}};var o6=gH(!0),tB=gH(!1),oB=0,nB=1,eB=2,dZ=3,t3=!1,_A=!1,iZ=null,aZ=!1,I7=_1(null),OQ=_1(0),K5=_1(null),N5=null,f7=1,w_=2,m0=_1(0),wQ=0,C5=1,v2=2,X5=4,E2=8,P7,JA=new Set,$A=new Set,sZ=new Set,QA=new Set,Q3=0,g1=null,L0=null,l0=null,IQ=!1,N7=!1,n6=!1,fQ=0,I_=0,q3=null,$f=0,Qf=25,G1=null,S5=null,U3=-1,f_=!1,P_={readContext:f0,use:D3,useCallback:E0,useContext:E0,useEffect:E0,useImperativeHandle:E0,useLayoutEffect:E0,useInsertionEffect:E0,useMemo:E0,useReducer:E0,useRef:E0,useState:E0,useDebugValue:E0,useDeferredValue:E0,useTransition:E0,useSyncExternalStore:E0,useId:E0,useHostTransitionStatus:E0,useFormState:E0,useActionState:E0,useOptimistic:E0,useMemoCache:E0,useCacheRefresh:E0};P_.useEffectEvent=E0;var tZ=null,qA=null,oZ=null,UA=null,C4=null,c5=null,PQ=null;tZ={readContext:function(_){return f0(_)},use:D3,useCallback:function(_,J){return G1="useCallback",t1(),p8(J),aU(_,J)},useContext:function(_){return G1="useContext",t1(),f0(_)},useEffect:function(_,J){return G1="useEffect",t1(),p8(J),M$(_,J)},useImperativeHandle:function(_,J,$){return G1="useImperativeHandle",t1(),p8($),iU(_,J,$)},useInsertionEffect:function(_,J){G1="useInsertionEffect",t1(),p8(J),b6(4,v2,_,J)},useLayoutEffect:function(_,J){return G1="useLayoutEffect",t1(),p8(J),dU(_,J)},useMemo:function(_,J){G1="useMemo",t1(),p8(J);var $=Z1.H;Z1.H=C4;try{return sU(_,J)}finally{Z1.H=$}},useReducer:function(_,J,$){G1="useReducer",t1();var q=Z1.H;Z1.H=C4;try{return uU(_,J,$)}finally{Z1.H=q}},useRef:function(_){return G1="useRef",t1(),lU(_)},useState:function(_){G1="useState",t1();var J=Z1.H;Z1.H=C4;try{return gU(_)}finally{Z1.H=J}},useDebugValue:function(){G1="useDebugValue",t1()},useDeferredValue:function(_,J){return G1="useDeferredValue",t1(),tU(_,J)},useTransition:function(){return G1="useTransition",t1(),eU()},useSyncExternalStore:function(_,J,$){return G1="useSyncExternalStore",t1(),hU(_,J,$)},useId:function(){return G1="useId",t1(),_G()},useFormState:function(_,J){return G1="useFormState",t1(),W$(),l8(_,J)},useActionState:function(_,J){return G1="useActionState",t1(),l8(_,J)},useOptimistic:function(_){return G1="useOptimistic",t1(),pU(_)},useHostTransitionStatus:u6,useMemoCache:E6,useCacheRefresh:function(){return G1="useCacheRefresh",t1(),JG()},useEffectEvent:function(_){return G1="useEffectEvent",t1(),rU(_)}},qA={readContext:function(_){return f0(_)},use:D3,useCallback:function(_,J){return G1="useCallback",z1(),aU(_,J)},useContext:function(_){return G1="useContext",z1(),f0(_)},useEffect:function(_,J){return G1="useEffect",z1(),M$(_,J)},useImperativeHandle:function(_,J,$){return G1="useImperativeHandle",z1(),iU(_,J,$)},useInsertionEffect:function(_,J){G1="useInsertionEffect",z1(),b6(4,v2,_,J)},useLayoutEffect:function(_,J){return G1="useLayoutEffect",z1(),dU(_,J)},useMemo:function(_,J){G1="useMemo",z1();var $=Z1.H;Z1.H=C4;try{return sU(_,J)}finally{Z1.H=$}},useReducer:function(_,J,$){G1="useReducer",z1();var q=Z1.H;Z1.H=C4;try{return uU(_,J,$)}finally{Z1.H=q}},useRef:function(_){return G1="useRef",z1(),lU(_)},useState:function(_){G1="useState",z1();var J=Z1.H;Z1.H=C4;try{return gU(_)}finally{Z1.H=J}},useDebugValue:function(){G1="useDebugValue",z1()},useDeferredValue:function(_,J){return G1="useDeferredValue",z1(),tU(_,J)},useTransition:function(){return G1="useTransition",z1(),eU()},useSyncExternalStore:function(_,J,$){return G1="useSyncExternalStore",z1(),hU(_,J,$)},useId:function(){return G1="useId",z1(),_G()},useActionState:function(_,J){return G1="useActionState",z1(),l8(_,J)},useFormState:function(_,J){return G1="useFormState",z1(),W$(),l8(_,J)},useOptimistic:function(_){return G1="useOptimistic",z1(),pU(_)},useHostTransitionStatus:u6,useMemoCache:E6,useCacheRefresh:function(){return G1="useCacheRefresh",z1(),JG()},useEffectEvent:function(_){return G1="useEffectEvent",z1(),rU(_)}},oZ={readContext:function(_){return f0(_)},use:D3,useCallback:function(_,J){return G1="useCallback",z1(),O$(_,J)},useContext:function(_){return G1="useContext",z1(),f0(_)},useEffect:function(_,J){G1="useEffect",z1(),c2(2048,E2,_,J)},useImperativeHandle:function(_,J,$){return G1="useImperativeHandle",z1(),R$(_,J,$)},useInsertionEffect:function(_,J){return G1="useInsertionEffect",z1(),c2(4,v2,_,J)},useLayoutEffect:function(_,J){return G1="useLayoutEffect",z1(),c2(4,X5,_,J)},useMemo:function(_,J){G1="useMemo",z1();var $=Z1.H;Z1.H=c5;try{return w$(_,J)}finally{Z1.H=$}},useReducer:function(_,J,$){G1="useReducer",z1();var q=Z1.H;Z1.H=c5;try{return c8(_,J,$)}finally{Z1.H=q}},useRef:function(){return G1="useRef",z1(),W0().memoizedState},useState:function(){G1="useState",z1();var _=Z1.H;Z1.H=c5;try{return c8(u5)}finally{Z1.H=_}},useDebugValue:function(){G1="useDebugValue",z1()},useDeferredValue:function(_,J){return G1="useDeferredValue",z1(),KY(_,J)},useTransition:function(){return G1="useTransition",z1(),BY()},useSyncExternalStore:function(_,J,$){return G1="useSyncExternalStore",z1(),B$(_,J,$)},useId:function(){return G1="useId",z1(),W0().memoizedState},useFormState:function(_){return G1="useFormState",z1(),W$(),A$(_)},useActionState:function(_){return G1="useActionState",z1(),A$(_)},useOptimistic:function(_,J){return G1="useOptimistic",z1(),eH(_,J)},useHostTransitionStatus:u6,useMemoCache:E6,useCacheRefresh:function(){return G1="useCacheRefresh",z1(),W0().memoizedState},useEffectEvent:function(_){return G1="useEffectEvent",z1(),T$(_)}},UA={readContext:function(_){return f0(_)},use:D3,useCallback:function(_,J){return G1="useCallback",z1(),O$(_,J)},useContext:function(_){return G1="useContext",z1(),f0(_)},useEffect:function(_,J){G1="useEffect",z1(),c2(2048,E2,_,J)},useImperativeHandle:function(_,J,$){return G1="useImperativeHandle",z1(),R$(_,J,$)},useInsertionEffect:function(_,J){return G1="useInsertionEffect",z1(),c2(4,v2,_,J)},useLayoutEffect:function(_,J){return G1="useLayoutEffect",z1(),c2(4,X5,_,J)},useMemo:function(_,J){G1="useMemo",z1();var $=Z1.H;Z1.H=PQ;try{return w$(_,J)}finally{Z1.H=$}},useReducer:function(_,J,$){G1="useReducer",z1();var q=Z1.H;Z1.H=PQ;try{return V9(_,J,$)}finally{Z1.H=q}},useRef:function(){return G1="useRef",z1(),W0().memoizedState},useState:function(){G1="useState",z1();var _=Z1.H;Z1.H=PQ;try{return V9(u5)}finally{Z1.H=_}},useDebugValue:function(){G1="useDebugValue",z1()},useDeferredValue:function(_,J){return G1="useDeferredValue",z1(),XY(_,J)},useTransition:function(){return G1="useTransition",z1(),AY()},useSyncExternalStore:function(_,J,$){return G1="useSyncExternalStore",z1(),B$(_,J,$)},useId:function(){return G1="useId",z1(),W0().memoizedState},useFormState:function(_){return G1="useFormState",z1(),W$(),L$(_)},useActionState:function(_){return G1="useActionState",z1(),L$(_)},useOptimistic:function(_,J){return G1="useOptimistic",z1(),JY(_,J)},useHostTransitionStatus:u6,useMemoCache:E6,useCacheRefresh:function(){return G1="useCacheRefresh",z1(),W0().memoizedState},useEffectEvent:function(_){return G1="useEffectEvent",z1(),T$(_)}},C4={readContext:function(_){return O(),f0(_)},use:function(_){return B(),D3(_)},useCallback:function(_,J){return G1="useCallback",B(),t1(),aU(_,J)},useContext:function(_){return G1="useContext",B(),t1(),f0(_)},useEffect:function(_,J){return G1="useEffect",B(),t1(),M$(_,J)},useImperativeHandle:function(_,J,$){return G1="useImperativeHandle",B(),t1(),iU(_,J,$)},useInsertionEffect:function(_,J){G1="useInsertionEffect",B(),t1(),b6(4,v2,_,J)},useLayoutEffect:function(_,J){return G1="useLayoutEffect",B(),t1(),dU(_,J)},useMemo:function(_,J){G1="useMemo",B(),t1();var $=Z1.H;Z1.H=C4;try{return sU(_,J)}finally{Z1.H=$}},useReducer:function(_,J,$){G1="useReducer",B(),t1();var q=Z1.H;Z1.H=C4;try{return uU(_,J,$)}finally{Z1.H=q}},useRef:function(_){return G1="useRef",B(),t1(),lU(_)},useState:function(_){G1="useState",B(),t1();var J=Z1.H;Z1.H=C4;try{return gU(_)}finally{Z1.H=J}},useDebugValue:function(){G1="useDebugValue",B(),t1()},useDeferredValue:function(_,J){return G1="useDeferredValue",B(),t1(),tU(_,J)},useTransition:function(){return G1="useTransition",B(),t1(),eU()},useSyncExternalStore:function(_,J,$){return G1="useSyncExternalStore",B(),t1(),hU(_,J,$)},useId:function(){return G1="useId",B(),t1(),_G()},useFormState:function(_,J){return G1="useFormState",B(),t1(),l8(_,J)},useActionState:function(_,J){return G1="useActionState",B(),t1(),l8(_,J)},useOptimistic:function(_){return G1="useOptimistic",B(),t1(),pU(_)},useMemoCache:function(_){return B(),E6(_)},useHostTransitionStatus:u6,useCacheRefresh:function(){return G1="useCacheRefresh",t1(),JG()},useEffectEvent:function(_){return G1="useEffectEvent",B(),t1(),rU(_)}},c5={readContext:function(_){return O(),f0(_)},use:function(_){return B(),D3(_)},useCallback:function(_,J){return G1="useCallback",B(),z1(),O$(_,J)},useContext:function(_){return G1="useContext",B(),z1(),f0(_)},useEffect:function(_,J){G1="useEffect",B(),z1(),c2(2048,E2,_,J)},useImperativeHandle:function(_,J,$){return G1="useImperativeHandle",B(),z1(),R$(_,J,$)},useInsertionEffect:function(_,J){return G1="useInsertionEffect",B(),z1(),c2(4,v2,_,J)},useLayoutEffect:function(_,J){return G1="useLayoutEffect",B(),z1(),c2(4,X5,_,J)},useMemo:function(_,J){G1="useMemo",B(),z1();var $=Z1.H;Z1.H=c5;try{return w$(_,J)}finally{Z1.H=$}},useReducer:function(_,J,$){G1="useReducer",B(),z1();var q=Z1.H;Z1.H=c5;try{return c8(_,J,$)}finally{Z1.H=q}},useRef:function(){return G1="useRef",B(),z1(),W0().memoizedState},useState:function(){G1="useState",B(),z1();var _=Z1.H;Z1.H=c5;try{return c8(u5)}finally{Z1.H=_}},useDebugValue:function(){G1="useDebugValue",B(),z1()},useDeferredValue:function(_,J){return G1="useDeferredValue",B(),z1(),KY(_,J)},useTransition:function(){return G1="useTransition",B(),z1(),BY()},useSyncExternalStore:function(_,J,$){return G1="useSyncExternalStore",B(),z1(),B$(_,J,$)},useId:function(){return G1="useId",B(),z1(),W0().memoizedState},useFormState:function(_){return G1="useFormState",B(),z1(),A$(_)},useActionState:function(_){return G1="useActionState",B(),z1(),A$(_)},useOptimistic:function(_,J){return G1="useOptimistic",B(),z1(),eH(_,J)},useMemoCache:function(_){return B(),E6(_)},useHostTransitionStatus:u6,useCacheRefresh:function(){return G1="useCacheRefresh",z1(),W0().memoizedState},useEffectEvent:function(_){return G1="useEffectEvent",B(),z1(),T$(_)}},PQ={readContext:function(_){return O(),f0(_)},use:function(_){return B(),D3(_)},useCallback:function(_,J){return G1="useCallback",B(),z1(),O$(_,J)},useContext:function(_){return G1="useContext",B(),z1(),f0(_)},useEffect:function(_,J){G1="useEffect",B(),z1(),c2(2048,E2,_,J)},useImperativeHandle:function(_,J,$){return G1="useImperativeHandle",B(),z1(),R$(_,J,$)},useInsertionEffect:function(_,J){return G1="useInsertionEffect",B(),z1(),c2(4,v2,_,J)},useLayoutEffect:function(_,J){return G1="useLayoutEffect",B(),z1(),c2(4,X5,_,J)},useMemo:function(_,J){G1="useMemo",B(),z1();var $=Z1.H;Z1.H=c5;try{return w$(_,J)}finally{Z1.H=$}},useReducer:function(_,J,$){G1="useReducer",B(),z1();var q=Z1.H;Z1.H=c5;try{return V9(_,J,$)}finally{Z1.H=q}},useRef:function(){return G1="useRef",B(),z1(),W0().memoizedState},useState:function(){G1="useState",B(),z1();var _=Z1.H;Z1.H=c5;try{return V9(u5)}finally{Z1.H=_}},useDebugValue:function(){G1="useDebugValue",B(),z1()},useDeferredValue:function(_,J){return G1="useDeferredValue",B(),z1(),XY(_,J)},useTransition:function(){return G1="useTransition",B(),z1(),AY()},useSyncExternalStore:function(_,J,$){return G1="useSyncExternalStore",B(),z1(),B$(_,J,$)},useId:function(){return G1="useId",B(),z1(),W0().memoizedState},useFormState:function(_){return G1="useFormState",B(),z1(),L$(_)},useActionState:function(_){return G1="useActionState",B(),z1(),L$(_)},useOptimistic:function(_,J){return G1="useOptimistic",B(),z1(),JY(_,J)},useMemoCache:function(_){return B(),E6(_)},useHostTransitionStatus:u6,useCacheRefresh:function(){return G1="useCacheRefresh",z1(),W0().memoizedState},useEffectEvent:function(_){return G1="useEffectEvent",B(),z1(),T$(_)}};var GA={},ZA=new Set,FA=new Set,KA=new Set,XA=new Set,HA=new Set,YA=new Set,WA=new Set,zA=new Set,BA=new Set,AA=new Set;Object.freeze(GA);var nZ={enqueueSetState:function(_,J,$){_=_._reactInternals;var q=Q5(_),G=S3(q);G.payload=J,$!==void 0&&$!==null&&(QG($),G.callback=$),J=j3(_,G,q),J!==null&&(q4(q,"this.setState()",_),k0(J,_,q),N9(J,_,q))},enqueueReplaceState:function(_,J,$){_=_._reactInternals;var q=Q5(_),G=S3(q);G.tag=nB,G.payload=J,$!==void 0&&$!==null&&(QG($),G.callback=$),J=j3(_,G,q),J!==null&&(q4(q,"this.replaceState()",_),k0(J,_,q),N9(J,_,q))},enqueueForceUpdate:function(_,J){_=_._reactInternals;var $=Q5(_),q=S3($);q.tag=eB,J!==void 0&&J!==null&&(QG(J),q.callback=J),J=j3(_,q,$),J!==null&&(q4($,"this.forceUpdate()",_),k0(J,_,$),N9(J,_,$))}},C7=null,eZ=null,_F=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),r0=!1,LA={},MA={},TA={},RA={},S7=!1,OA={},NQ={},JF={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},wA=!1,IA=null;IA=new Set;var G3=!1,d0=!1,$F=!1,fA=typeof WeakSet==="function"?WeakSet:Set,U2=null,j7=null,V7=null,i0=null,d2=!1,l5=null,t0=!1,N_=8192,qf={getCacheForType:function(_){var J=f0(p0),$=J.data.get(_);return $===void 0&&($=_(),J.data.set(_,$)),$},cacheSignal:function(){return f0(p0).controller.signal},getOwner:function(){return G5}};if(typeof Symbol==="function"&&Symbol.for){var C_=Symbol.for;C_("selector.component"),C_("selector.has_pseudo_class"),C_("selector.role"),C_("selector.test_id"),C_("selector.text")}var Uf=[],Gf=typeof WeakMap==="function"?WeakMap:Map,G2=0,o0=2,H5=4,Z3=0,S_=1,e6=2,CQ=3,o3=4,SQ=6,PA=5,Z0=G2,M0=null,s1=null,a1=0,i2=0,jQ=1,_8=2,j_=3,NA=4,QF=5,V_=6,VQ=7,qF=8,J8=9,z0=i2,Y5=null,n3=!1,k7=!1,UF=!1,S4=0,j0=Z3,e3=0,_6=0,GF=0,a2=0,$8=0,k_=null,b2=null,kQ=!1,DQ=0,CA=0,SA=300,yQ=1/0,jA=500,D_=null,b0=null,J6=null,vQ=0,ZF=1,FF=2,VA=3,$6=0,kA=1,DA=2,yA=3,vA=4,EQ=5,a0=0,Q6=null,D7=null,r5=0,KF=0,XF=-0,HF=null,EA=null,bA=null,d5=vQ,uA=null,Zf=50,y_=0,YF=null,WF=!1,bQ=!1,Ff=50,Q8=0,v_=null,y7=!1,uQ=null,xA=!1,hA=new Set,Kf={},xQ=null,v7=null,zF=!1,BF=!1,hQ=!1,AF=!1,q6=0,LF={};(function(){for(var _=0;_<SZ.length;_++){var J=SZ[_],$=J.toLowerCase();J=J[0].toUpperCase()+J.slice(1),b5($,"on"+J)}b5(BB,"onAnimationEnd"),b5(AB,"onAnimationIteration"),b5(LB,"onAnimationStart"),b5("dblclick","onDoubleClick"),b5("focusin","onFocus"),b5("focusout","onBlur"),b5(hI,"onTransitionRun"),b5(mI,"onTransitionStart"),b5(gI,"onTransitionCancel"),b5(MB,"onTransitionEnd")})(),N2("onMouseEnter",["mouseout","mouseover"]),N2("onMouseLeave",["mouseout","mouseover"]),N2("onPointerEnter",["pointerout","pointerover"]),N2("onPointerLeave",["pointerout","pointerover"]),J2("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),J2("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),J2("onBeforeInput",["compositionend","keypress","textInput","paste"]),J2("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),J2("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),J2("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var E_="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(" "),MF=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(E_)),mQ="_reactListening"+Math.random().toString(36).slice(2),mA=!1,gA=!1,gQ=!1,pA=!1,pQ=!1,cQ=!1,cA=!1,lQ={},Xf=/\r\n?/g,Hf=/\u0000|\uFFFD/g,q8="http://www.w3.org/1999/xlink",TF="http://www.w3.org/XML/1998/namespace",Yf="javascript:throw new Error('React form unexpectedly submitted.')",Wf="suppressHydrationWarning",U8="&",rQ="/&",b_="$",u_="/$",U6="$?",G8="$~",E7="$!",zf="html",Bf="body",Af="head",RF="F!",lA="F",rA="loading",Lf="style",F3=0,b7=1,dQ=2,OF=null,wF=null,dA={dialog:!0,webview:!0},IF=null,x_=void 0,iA=typeof setTimeout==="function"?setTimeout:void 0,Mf=typeof clearTimeout==="function"?clearTimeout:void 0,Z8=-1,aA=typeof Promise==="function"?Promise:void 0,Tf=typeof queueMicrotask==="function"?queueMicrotask:typeof aA<"u"?function(_){return aA.resolve(null).then(_).catch(Qw)}:iA,fF=null,F8=0,h_=1,sA=2,tA=3,j5=4,V5=new Map,oA=new Set,K3=Y0.d;Y0.d={f:function(){var _=K3.f(),J=s8();return _||J},r:function(_){var J=h1(_);J!==null&&J.tag===5&&J.type==="form"?zY(J):K3.r(_)},D:function(_){K3.D(_),Zz("dns-prefetch",_,null)},C:function(_,J){K3.C(_,J),Zz("preconnect",_,J)},L:function(_,J,$){K3.L(_,J,$);var q=u7;if(q&&_&&J){var G='link[rel="preload"][as="'+g2(J)+'"]';J==="image"?$&&$.imageSrcSet?(G+='[imagesrcset="'+g2($.imageSrcSet)+'"]',typeof $.imageSizes==="string"&&(G+='[imagesizes="'+g2($.imageSizes)+'"]')):G+='[href="'+g2(_)+'"]':G+='[href="'+g2(_)+'"]';var F=G;switch(J){case"style":F=n8(_);break;case"script":F=e8(_)}V5.has(F)||(_=o1({rel:"preload",href:J==="image"&&$&&$.imageSrcSet?void 0:_,as:J},$),V5.set(F,_),q.querySelector(G)!==null||J==="style"&&q.querySelector(r9(F))||J==="script"&&q.querySelector(d9(F))||(J=q.createElement("link"),X2(J,"link",_),V1(J),q.head.appendChild(J)))}},m:function(_,J){K3.m(_,J);var $=u7;if($&&_){var q=J&&typeof J.as==="string"?J.as:"script",G='link[rel="modulepreload"][as="'+g2(q)+'"][href="'+g2(_)+'"]',F=G;switch(q){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":F=e8(_)}if(!V5.has(F)&&(_=o1({rel:"modulepreload",href:_},J),V5.set(F,_),$.querySelector(G)===null)){switch(q){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if($.querySelector(d9(F)))return}q=$.createElement("link"),X2(q,"link",_),V1(q),$.head.appendChild(q)}}},X:function(_,J){K3.X(_,J);var $=u7;if($&&_){var q=U0($).hoistableScripts,G=e8(_),F=q.get(G);F||(F=$.querySelector(d9(G)),F||(_=o1({src:_,async:!0},J),(J=V5.get(G))&&iG(_,J),F=$.createElement("script"),V1(F),X2(F,"link",_),$.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},q.set(G,F))}},S:function(_,J,$){K3.S(_,J,$);var q=u7;if(q&&_){var G=U0(q).hoistableStyles,F=n8(_);J=J||"default";var Y=G.get(F);if(!Y){var A={loading:F8,preload:null};if(Y=q.querySelector(r9(F)))A.loading=h_|j5;else{_=o1({rel:"stylesheet",href:_,"data-precedence":J},$),($=V5.get(F))&&dG(_,$);var w=Y=q.createElement("link");V1(w),X2(w,"link",_),w._p=new Promise(function(N,t){w.onload=N,w.onerror=t}),w.addEventListener("load",function(){A.loading|=h_}),w.addEventListener("error",function(){A.loading|=sA}),A.loading|=j5,g$(Y,J,q)}Y={type:"stylesheet",instance:Y,count:1,state:A},G.set(F,Y)}}},M:function(_,J){K3.M(_,J);var $=u7;if($&&_){var q=U0($).hoistableScripts,G=e8(_),F=q.get(G);F||(F=$.querySelector(d9(G)),F||(_=o1({src:_,async:!0,type:"module"},J),(J=V5.get(G))&&iG(_,J),F=$.createElement("script"),V1(F),X2(F,"link",_),$.head.appendChild(F)),F={type:"script",instance:F,count:1,state:null},q.set(G,F))}}};var u7=typeof document>"u"?null:document,iQ=null,Rf=60000,Of=800,wf=500,PF=0,NF=null,aQ=null,K8=uw,m_={$$typeof:M4,Provider:null,Consumer:null,_currentValue:K8,_currentValue2:K8,_threadCount:0},nA="%c%s%c",eA="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",_L="",sQ=" ",If=Function.prototype.bind,JL=!1,$L=null,QL=null,qL=null,UL=null,GL=null,ZL=null,FL=null,KL=null,XL=null,HL=null;$L=function(_,J,$,q){J=Q(_,J),J!==null&&($=U(J.memoizedState,$,0,q),J.memoizedState=$,J.baseState=$,_.memoizedProps=o1({},_.memoizedProps),$=M2(_,2),$!==null&&k0($,_,2))},QL=function(_,J,$){J=Q(_,J),J!==null&&($=X(J.memoizedState,$,0),J.memoizedState=$,J.baseState=$,_.memoizedProps=o1({},_.memoizedProps),$=M2(_,2),$!==null&&k0($,_,2))},qL=function(_,J,$,q){J=Q(_,J),J!==null&&($=Z(J.memoizedState,$,q),J.memoizedState=$,J.baseState=$,_.memoizedProps=o1({},_.memoizedProps),$=M2(_,2),$!==null&&k0($,_,2))},UL=function(_,J,$){_.pendingProps=U(_.memoizedProps,J,0,$),_.alternate&&(_.alternate.pendingProps=_.pendingProps),J=M2(_,2),J!==null&&k0(J,_,2)},GL=function(_,J){_.pendingProps=X(_.memoizedProps,J,0),_.alternate&&(_.alternate.pendingProps=_.pendingProps),J=M2(_,2),J!==null&&k0(J,_,2)},ZL=function(_,J,$){_.pendingProps=Z(_.memoizedProps,J,$),_.alternate&&(_.alternate.pendingProps=_.pendingProps),J=M2(_,2),J!==null&&k0(J,_,2)},FL=function(_){var J=M2(_,2);J!==null&&k0(J,_,2)},KL=function(_){var J=B2(),$=M2(_,J);$!==null&&k0($,_,J)},XL=function(_){z=_},HL=function(_){W=_};var tQ=!0,oQ=null,CF=!1,G6=null,Z6=null,F6=null,g_=new Map,p_=new Map,K6=[],ff="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(" "),nQ=null;if(d$.prototype.render=eG.prototype.render=function(_){var J=this._internalRoot;if(J===null)throw Error("Cannot update an unmounted root.");var $=arguments;typeof $[1]==="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):V($[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof $[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),$=_;var q=J.current,G=Q5(q);aG(q,G,$,J,null,null)},d$.prototype.unmount=eG.prototype.unmount=function(){var _=arguments;if(typeof _[0]==="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),_=this._internalRoot,_!==null){this._internalRoot=null;var J=_.containerInfo;(Z0&(o0|H5))!==G2&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),aG(_.current,2,null,_,null,null),s8(),J[h3]=null}},d$.prototype.unstable_scheduleHydration=function(_){if(_){var J=e();_={blockedOn:null,target:_,priority:J};for(var $=0;$<K6.length&&J!==0&&J<K6[$].priority;$++);K6.splice($,0,_),$===0&&Oz(_)}},function(){var _=$9.version;if(_!=="19.2.7")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
234
|
-
- react: `+(_+`
|
|
235
|
-
- react-dom: 19.2.7
|
|
236
|
-
Learn more: https://react.dev/warnings/version-mismatch`))}(),typeof Map==="function"&&Map.prototype!=null&&typeof Map.prototype.forEach==="function"&&typeof Set==="function"&&Set.prototype!=null&&typeof Set.prototype.clear==="function"&&typeof Set.prototype.forEach==="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),Y0.findDOMNode=function(_){var J=_._reactInternals;if(J===void 0){if(typeof _.render==="function")throw Error("Unable to find node on an unmounted component.");throw _=Object.keys(_).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+_)}return _=v(J),_=_!==null?b(_):null,_=_===null?null:_.stateNode,_},!function(){var _={bundleType:1,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:Z1,reconcilerVersion:"19.2.7"};return _.overrideHookState=$L,_.overrideHookStateDeletePath=QL,_.overrideHookStateRenamePath=qL,_.overrideProps=UL,_.overridePropsDeletePath=GL,_.overridePropsRenamePath=ZL,_.scheduleUpdate=FL,_.scheduleRetry=KL,_.setErrorHandler=XL,_.setSuspenseHandler=HL,_.scheduleRefresh=I,_.scheduleRoot=f,_.setRefreshHandler=D,_.getCurrentFiber=jw,Z2(_)}()&&I4&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var YL=window.location.protocol;/^(https?|file):$/.test(YL)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(YL==="file:"?`
|
|
237
|
-
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}KV.createRoot=function(_,J){if(!V(_))throw Error("Target container is not a DOM element.");Pz(_);var $=!1,q="",G=wY,F=IY,Y=fY;return J!==null&&J!==void 0&&(J.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof J==="object"&&J!==null&&J.$$typeof===L4&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
238
|
-
|
|
239
|
-
let root = createRoot(domContainer);
|
|
240
|
-
root.render(<App />);`),J.unstable_strictMode===!0&&($=!0),J.identifierPrefix!==void 0&&(q=J.identifierPrefix),J.onUncaughtError!==void 0&&(G=J.onUncaughtError),J.onCaughtError!==void 0&&(F=J.onCaughtError),J.onRecoverableError!==void 0&&(Y=J.onRecoverableError)),J=zz(_,1,!1,null,null,$,q,null,G,F,Y,fz),_[h3]=J.current,vG(_),new eG(J)},KV.hydrateRoot=function(_,J,$){if(!V(_))throw Error("Target container is not a DOM element.");Pz(_),J===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var q=!1,G="",F=wY,Y=IY,A=fY,w=null;return $!==null&&$!==void 0&&($.unstable_strictMode===!0&&(q=!0),$.identifierPrefix!==void 0&&(G=$.identifierPrefix),$.onUncaughtError!==void 0&&(F=$.onUncaughtError),$.onCaughtError!==void 0&&(Y=$.onCaughtError),$.onRecoverableError!==void 0&&(A=$.onRecoverableError),$.formState!==void 0&&(w=$.formState)),J=zz(_,1,!0,J,$!=null?$:null,q,G,w,F,Y,A,fz),J.context=Bz(null),$=J.current,q=Q5($),q=x4(q),G=S3(q),G.callback=null,j3($,G,q),q4(q,"hydrateRoot()",null),$=q,J.current.lanes=$,L2(J,$),B4(J),_[h3]=J.current,vG(_),new d$(J)},KV.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var CR=j4((pm,NR)=>{var XV=u0(PR());NR.exports=XV});var B1=u0(i5(),1);var F1=u0(zL(),1),K1=u0(i5(),1);function y0(Q){if(typeof Q==="string"||typeof Q==="number")return""+Q;let U="";if(Array.isArray(Q)){for(let Z=0,K;Z<Q.length;Z++)if((K=y0(Q[Z]))!=="")U+=(U&&" ")+K}else for(let Z in Q)if(Q[Z])U+=(U&&" ")+Z;return U}var Ef={value:()=>{}};function AL(){for(var Q=0,U=arguments.length,Z={},K;Q<U;++Q){if(!(K=arguments[Q]+"")||K in Z||/[\s.]/.test(K))throw Error("illegal type: "+K);Z[K]=[]}return new _q(Z)}function _q(Q){this._=Q}function bf(Q,U){return Q.trim().split(/^|\s+/).map(function(Z){var K="",X=Z.indexOf(".");if(X>=0)K=Z.slice(X+1),Z=Z.slice(0,X);if(Z&&!U.hasOwnProperty(Z))throw Error("unknown type: "+Z);return{type:Z,name:K}})}_q.prototype=AL.prototype={constructor:_q,on:function(Q,U){var Z=this._,K=bf(Q+"",Z),X,W=-1,z=K.length;if(arguments.length<2){while(++W<z)if((X=(Q=K[W]).type)&&(X=uf(Z[X],Q.name)))return X;return}if(U!=null&&typeof U!=="function")throw Error("invalid callback: "+U);while(++W<z)if(X=(Q=K[W]).type)Z[X]=BL(Z[X],Q.name,U);else if(U==null)for(X in Z)Z[X]=BL(Z[X],Q.name,null);return this},copy:function(){var Q={},U=this._;for(var Z in U)Q[Z]=U[Z].slice();return new _q(Q)},call:function(Q,U){if((X=arguments.length-2)>0)for(var Z=Array(X),K=0,X,W;K<X;++K)Z[K]=arguments[K+2];if(!this._.hasOwnProperty(Q))throw Error("unknown type: "+Q);for(W=this._[Q],K=0,X=W.length;K<X;++K)W[K].value.apply(U,Z)},apply:function(Q,U,Z){if(!this._.hasOwnProperty(Q))throw Error("unknown type: "+Q);for(var K=this._[Q],X=0,W=K.length;X<W;++X)K[X].value.apply(U,Z)}};function uf(Q,U){for(var Z=0,K=Q.length,X;Z<K;++Z)if((X=Q[Z]).name===U)return X.value}function BL(Q,U,Z){for(var K=0,X=Q.length;K<X;++K)if(Q[K].name===U){Q[K]=Ef,Q=Q.slice(0,K).concat(Q.slice(K+1));break}if(Z!=null)Q.push({name:U,value:Z});return Q}var H8=AL;function x7(Q){return function(){return this.matches(Q)}}function Jq(Q){return function(U){return U.matches(Q)}}var $q="http://www.w3.org/1999/xhtml",SF={svg:"http://www.w3.org/2000/svg",xhtml:$q,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function V4(Q){var U=Q+="",Z=U.indexOf(":");if(Z>=0&&(U=Q.slice(0,Z))!=="xmlns")Q=Q.slice(Z+1);return SF.hasOwnProperty(U)?{space:SF[U],local:Q}:Q}function jF(Q){let U;while(U=Q.sourceEvent)Q=U;return Q}function O2(Q,U){if(Q=jF(Q),U===void 0)U=Q.currentTarget;if(U){var Z=U.ownerSVGElement||U;if(Z.createSVGPoint){var K=Z.createSVGPoint();return K.x=Q.clientX,K.y=Q.clientY,K=K.matrixTransform(U.getScreenCTM().inverse()),[K.x,K.y]}if(U.getBoundingClientRect){var X=U.getBoundingClientRect();return[Q.clientX-X.left-U.clientLeft,Q.clientY-X.top-U.clientTop]}}return[Q.pageX,Q.pageY]}function xf(){}function X6(Q){return Q==null?xf:function(){return this.querySelector(Q)}}function VF(Q){if(typeof Q!=="function")Q=X6(Q);for(var U=this._groups,Z=U.length,K=Array(Z),X=0;X<Z;++X)for(var W=U[X],z=W.length,B=K[X]=Array(z),O,T,R=0;R<z;++R)if((O=W[R])&&(T=Q.call(O,O.__data__,R,W))){if("__data__"in O)T.__data__=O.__data__;B[R]=T}return new x0(K,this._parents)}function kF(Q){return Q==null?[]:Array.isArray(Q)?Q:Array.from(Q)}function hf(){return[]}function h7(Q){return Q==null?hf:function(){return this.querySelectorAll(Q)}}function mf(Q){return function(){return kF(Q.apply(this,arguments))}}function DF(Q){if(typeof Q==="function")Q=mf(Q);else Q=h7(Q);for(var U=this._groups,Z=U.length,K=[],X=[],W=0;W<Z;++W)for(var z=U[W],B=z.length,O,T=0;T<B;++T)if(O=z[T])K.push(Q.call(O,O.__data__,T,z)),X.push(O);return new x0(K,X)}var gf=Array.prototype.find;function pf(Q){return function(){return gf.call(this.children,Q)}}function cf(){return this.firstElementChild}function yF(Q){return this.select(Q==null?cf:pf(typeof Q==="function"?Q:Jq(Q)))}var lf=Array.prototype.filter;function rf(){return Array.from(this.children)}function df(Q){return function(){return lf.call(this.children,Q)}}function vF(Q){return this.selectAll(Q==null?rf:df(typeof Q==="function"?Q:Jq(Q)))}function EF(Q){if(typeof Q!=="function")Q=x7(Q);for(var U=this._groups,Z=U.length,K=Array(Z),X=0;X<Z;++X)for(var W=U[X],z=W.length,B=K[X]=[],O,T=0;T<z;++T)if((O=W[T])&&Q.call(O,O.__data__,T,W))B.push(O);return new x0(K,this._parents)}function c_(Q){return Array(Q.length)}function bF(){return new x0(this._enter||this._groups.map(c_),this._parents)}function l_(Q,U){this.ownerDocument=Q.ownerDocument,this.namespaceURI=Q.namespaceURI,this._next=null,this._parent=Q,this.__data__=U}l_.prototype={constructor:l_,appendChild:function(Q){return this._parent.insertBefore(Q,this._next)},insertBefore:function(Q,U){return this._parent.insertBefore(Q,U)},querySelector:function(Q){return this._parent.querySelector(Q)},querySelectorAll:function(Q){return this._parent.querySelectorAll(Q)}};function uF(Q){return function(){return Q}}function af(Q,U,Z,K,X,W){var z=0,B,O=U.length,T=W.length;for(;z<T;++z)if(B=U[z])B.__data__=W[z],K[z]=B;else Z[z]=new l_(Q,W[z]);for(;z<O;++z)if(B=U[z])X[z]=B}function sf(Q,U,Z,K,X,W,z){var B,O,T=new Map,R=U.length,L=W.length,M=Array(R),f;for(B=0;B<R;++B)if(O=U[B])if(M[B]=f=z.call(O,O.__data__,B,U)+"",T.has(f))X[B]=O;else T.set(f,O);for(B=0;B<L;++B)if(f=z.call(Q,W[B],B,W)+"",O=T.get(f))K[B]=O,O.__data__=W[B],T.delete(f);else Z[B]=new l_(Q,W[B]);for(B=0;B<R;++B)if((O=U[B])&&T.get(M[B])===O)X[B]=O}function tf(Q){return Q.__data__}function xF(Q,U){if(!arguments.length)return Array.from(this,tf);var Z=U?sf:af,K=this._parents,X=this._groups;if(typeof Q!=="function")Q=uF(Q);for(var W=X.length,z=Array(W),B=Array(W),O=Array(W),T=0;T<W;++T){var R=K[T],L=X[T],M=L.length,f=of(Q.call(R,R&&R.__data__,T,K)),I=f.length,D=B[T]=Array(I),V=z[T]=Array(I),k=O[T]=Array(M);Z(R,L,D,V,k,f,U);for(var h=0,P=0,C,v;h<I;++h)if(C=D[h]){if(h>=P)P=h+1;while(!(v=V[P])&&++P<I);C._next=v||null}}return z=new x0(z,K),z._enter=B,z._exit=O,z}function of(Q){return typeof Q==="object"&&"length"in Q?Q:Array.from(Q)}function hF(){return new x0(this._exit||this._groups.map(c_),this._parents)}function mF(Q,U,Z){var K=this.enter(),X=this,W=this.exit();if(typeof Q==="function"){if(K=Q(K),K)K=K.selection()}else K=K.append(Q+"");if(U!=null){if(X=U(X),X)X=X.selection()}if(Z==null)W.remove();else Z(W);return K&&X?K.merge(X).order():X}function gF(Q){var U=Q.selection?Q.selection():Q;for(var Z=this._groups,K=U._groups,X=Z.length,W=K.length,z=Math.min(X,W),B=Array(X),O=0;O<z;++O)for(var T=Z[O],R=K[O],L=T.length,M=B[O]=Array(L),f,I=0;I<L;++I)if(f=T[I]||R[I])M[I]=f;for(;O<X;++O)B[O]=Z[O];return new x0(B,this._parents)}function pF(){for(var Q=this._groups,U=-1,Z=Q.length;++U<Z;)for(var K=Q[U],X=K.length-1,W=K[X],z;--X>=0;)if(z=K[X]){if(W&&z.compareDocumentPosition(W)^4)W.parentNode.insertBefore(z,W);W=z}return this}function cF(Q){if(!Q)Q=nf;function U(L,M){return L&&M?Q(L.__data__,M.__data__):!L-!M}for(var Z=this._groups,K=Z.length,X=Array(K),W=0;W<K;++W){for(var z=Z[W],B=z.length,O=X[W]=Array(B),T,R=0;R<B;++R)if(T=z[R])O[R]=T;O.sort(U)}return new x0(X,this._parents).order()}function nf(Q,U){return Q<U?-1:Q>U?1:Q>=U?0:NaN}function lF(){var Q=arguments[0];return arguments[0]=this,Q.apply(null,arguments),this}function rF(){return Array.from(this)}function dF(){for(var Q=this._groups,U=0,Z=Q.length;U<Z;++U)for(var K=Q[U],X=0,W=K.length;X<W;++X){var z=K[X];if(z)return z}return null}function iF(){let Q=0;for(let U of this)++Q;return Q}function aF(){return!this.node()}function sF(Q){for(var U=this._groups,Z=0,K=U.length;Z<K;++Z)for(var X=U[Z],W=0,z=X.length,B;W<z;++W)if(B=X[W])Q.call(B,B.__data__,W,X);return this}function ef(Q){return function(){this.removeAttribute(Q)}}function _P(Q){return function(){this.removeAttributeNS(Q.space,Q.local)}}function JP(Q,U){return function(){this.setAttribute(Q,U)}}function $P(Q,U){return function(){this.setAttributeNS(Q.space,Q.local,U)}}function QP(Q,U){return function(){var Z=U.apply(this,arguments);if(Z==null)this.removeAttribute(Q);else this.setAttribute(Q,Z)}}function qP(Q,U){return function(){var Z=U.apply(this,arguments);if(Z==null)this.removeAttributeNS(Q.space,Q.local);else this.setAttributeNS(Q.space,Q.local,Z)}}function tF(Q,U){var Z=V4(Q);if(arguments.length<2){var K=this.node();return Z.local?K.getAttributeNS(Z.space,Z.local):K.getAttribute(Z)}return this.each((U==null?Z.local?_P:ef:typeof U==="function"?Z.local?qP:QP:Z.local?$P:JP)(Z,U))}function r_(Q){return Q.ownerDocument&&Q.ownerDocument.defaultView||Q.document&&Q||Q.defaultView}function UP(Q){return function(){this.style.removeProperty(Q)}}function GP(Q,U,Z){return function(){this.style.setProperty(Q,U,Z)}}function ZP(Q,U,Z){return function(){var K=U.apply(this,arguments);if(K==null)this.style.removeProperty(Q);else this.style.setProperty(Q,K,Z)}}function oF(Q,U,Z){return arguments.length>1?this.each((U==null?UP:typeof U==="function"?ZP:GP)(Q,U,Z==null?"":Z)):H6(this.node(),Q)}function H6(Q,U){return Q.style.getPropertyValue(U)||r_(Q).getComputedStyle(Q,null).getPropertyValue(U)}function FP(Q){return function(){delete this[Q]}}function KP(Q,U){return function(){this[Q]=U}}function XP(Q,U){return function(){var Z=U.apply(this,arguments);if(Z==null)delete this[Q];else this[Q]=Z}}function nF(Q,U){return arguments.length>1?this.each((U==null?FP:typeof U==="function"?XP:KP)(Q,U)):this.node()[Q]}function LL(Q){return Q.trim().split(/^|\s+/)}function eF(Q){return Q.classList||new ML(Q)}function ML(Q){this._node=Q,this._names=LL(Q.getAttribute("class")||"")}ML.prototype={add:function(Q){var U=this._names.indexOf(Q);if(U<0)this._names.push(Q),this._node.setAttribute("class",this._names.join(" "))},remove:function(Q){var U=this._names.indexOf(Q);if(U>=0)this._names.splice(U,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(Q){return this._names.indexOf(Q)>=0}};function TL(Q,U){var Z=eF(Q),K=-1,X=U.length;while(++K<X)Z.add(U[K])}function RL(Q,U){var Z=eF(Q),K=-1,X=U.length;while(++K<X)Z.remove(U[K])}function HP(Q){return function(){TL(this,Q)}}function YP(Q){return function(){RL(this,Q)}}function WP(Q,U){return function(){(U.apply(this,arguments)?TL:RL)(this,Q)}}function _K(Q,U){var Z=LL(Q+"");if(arguments.length<2){var K=eF(this.node()),X=-1,W=Z.length;while(++X<W)if(!K.contains(Z[X]))return!1;return!0}return this.each((typeof U==="function"?WP:U?HP:YP)(Z,U))}function zP(){this.textContent=""}function BP(Q){return function(){this.textContent=Q}}function AP(Q){return function(){var U=Q.apply(this,arguments);this.textContent=U==null?"":U}}function JK(Q){return arguments.length?this.each(Q==null?zP:(typeof Q==="function"?AP:BP)(Q)):this.node().textContent}function LP(){this.innerHTML=""}function MP(Q){return function(){this.innerHTML=Q}}function TP(Q){return function(){var U=Q.apply(this,arguments);this.innerHTML=U==null?"":U}}function $K(Q){return arguments.length?this.each(Q==null?LP:(typeof Q==="function"?TP:MP)(Q)):this.node().innerHTML}function RP(){if(this.nextSibling)this.parentNode.appendChild(this)}function QK(){return this.each(RP)}function OP(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qK(){return this.each(OP)}function wP(Q){return function(){var U=this.ownerDocument,Z=this.namespaceURI;return Z===$q&&U.documentElement.namespaceURI===$q?U.createElement(Q):U.createElementNS(Z,Q)}}function IP(Q){return function(){return this.ownerDocument.createElementNS(Q.space,Q.local)}}function d_(Q){var U=V4(Q);return(U.local?IP:wP)(U)}function UK(Q){var U=typeof Q==="function"?Q:d_(Q);return this.select(function(){return this.appendChild(U.apply(this,arguments))})}function fP(){return null}function GK(Q,U){var Z=typeof Q==="function"?Q:d_(Q),K=U==null?fP:typeof U==="function"?U:X6(U);return this.select(function(){return this.insertBefore(Z.apply(this,arguments),K.apply(this,arguments)||null)})}function PP(){var Q=this.parentNode;if(Q)Q.removeChild(this)}function ZK(){return this.each(PP)}function NP(){var Q=this.cloneNode(!1),U=this.parentNode;return U?U.insertBefore(Q,this.nextSibling):Q}function CP(){var Q=this.cloneNode(!0),U=this.parentNode;return U?U.insertBefore(Q,this.nextSibling):Q}function FK(Q){return this.select(Q?CP:NP)}function KK(Q){return arguments.length?this.property("__data__",Q):this.node().__data__}function SP(Q){return function(U){Q.call(this,U,this.__data__)}}function jP(Q){return Q.trim().split(/^|\s+/).map(function(U){var Z="",K=U.indexOf(".");if(K>=0)Z=U.slice(K+1),U=U.slice(0,K);return{type:U,name:Z}})}function VP(Q){return function(){var U=this.__on;if(!U)return;for(var Z=0,K=-1,X=U.length,W;Z<X;++Z)if(W=U[Z],(!Q.type||W.type===Q.type)&&W.name===Q.name)this.removeEventListener(W.type,W.listener,W.options);else U[++K]=W;if(++K)U.length=K;else delete this.__on}}function kP(Q,U,Z){return function(){var K=this.__on,X,W=SP(U);if(K){for(var z=0,B=K.length;z<B;++z)if((X=K[z]).type===Q.type&&X.name===Q.name){this.removeEventListener(X.type,X.listener,X.options),this.addEventListener(X.type,X.listener=W,X.options=Z),X.value=U;return}}if(this.addEventListener(Q.type,W,Z),X={type:Q.type,name:Q.name,value:U,listener:W,options:Z},!K)this.__on=[X];else K.push(X)}}function XK(Q,U,Z){var K=jP(Q+""),X,W=K.length,z;if(arguments.length<2){var B=this.node().__on;if(B){for(var O=0,T=B.length,R;O<T;++O)for(X=0,R=B[O];X<W;++X)if((z=K[X]).type===R.type&&z.name===R.name)return R.value}return}B=U?kP:VP;for(X=0;X<W;++X)this.each(B(K[X],U,Z));return this}function OL(Q,U,Z){var K=r_(Q),X=K.CustomEvent;if(typeof X==="function")X=new X(U,Z);else if(X=K.document.createEvent("Event"),Z)X.initEvent(U,Z.bubbles,Z.cancelable),X.detail=Z.detail;else X.initEvent(U,!1,!1);Q.dispatchEvent(X)}function DP(Q,U){return function(){return OL(this,Q,U)}}function yP(Q,U){return function(){return OL(this,Q,U.apply(this,arguments))}}function HK(Q,U){return this.each((typeof U==="function"?yP:DP)(Q,U))}function*YK(){for(var Q=this._groups,U=0,Z=Q.length;U<Z;++U)for(var K=Q[U],X=0,W=K.length,z;X<W;++X)if(z=K[X])yield z}var WK=[null];function x0(Q,U){this._groups=Q,this._parents=U}function wL(){return new x0([[document.documentElement]],WK)}function vP(){return this}x0.prototype=wL.prototype={constructor:x0,select:VF,selectAll:DF,selectChild:yF,selectChildren:vF,filter:EF,data:xF,enter:bF,exit:hF,join:mF,merge:gF,selection:vP,order:pF,sort:cF,call:lF,nodes:rF,node:dF,size:iF,empty:aF,each:sF,attr:tF,style:oF,property:nF,classed:_K,text:JK,html:$K,raise:QK,lower:qK,append:UK,insert:GK,remove:ZK,clone:FK,datum:KK,on:XK,dispatch:HK,[Symbol.iterator]:YK};var H3=wL;function n0(Q){return typeof Q==="string"?new x0([[document.querySelector(Q)]],[document.documentElement]):new x0([[Q]],WK)}var IL={passive:!1},Y8={capture:!0,passive:!1};function Qq(Q){Q.stopImmediatePropagation()}function Y3(Q){Q.preventDefault(),Q.stopImmediatePropagation()}function m7(Q){var U=Q.document.documentElement,Z=n0(Q).on("dragstart.drag",Y3,Y8);if("onselectstart"in U)Z.on("selectstart.drag",Y3,Y8);else U.__noselect=U.style.MozUserSelect,U.style.MozUserSelect="none"}function i_(Q,U){var Z=Q.document.documentElement,K=n0(Q).on("dragstart.drag",null);if(U)K.on("click.drag",Y3,Y8),setTimeout(function(){K.on("click.drag",null)},0);if("onselectstart"in Z)K.on("selectstart.drag",null);else Z.style.MozUserSelect=Z.__noselect,delete Z.__noselect}var a_=(Q)=>()=>Q;function s_(Q,{sourceEvent:U,subject:Z,target:K,identifier:X,active:W,x:z,y:B,dx:O,dy:T,dispatch:R}){Object.defineProperties(this,{type:{value:Q,enumerable:!0,configurable:!0},sourceEvent:{value:U,enumerable:!0,configurable:!0},subject:{value:Z,enumerable:!0,configurable:!0},target:{value:K,enumerable:!0,configurable:!0},identifier:{value:X,enumerable:!0,configurable:!0},active:{value:W,enumerable:!0,configurable:!0},x:{value:z,enumerable:!0,configurable:!0},y:{value:B,enumerable:!0,configurable:!0},dx:{value:O,enumerable:!0,configurable:!0},dy:{value:T,enumerable:!0,configurable:!0},_:{value:R}})}s_.prototype.on=function(){var Q=this._.on.apply(this._,arguments);return Q===this._?this:Q};function EP(Q){return!Q.ctrlKey&&!Q.button}function bP(){return this.parentNode}function uP(Q,U){return U==null?{x:Q.x,y:Q.y}:U}function xP(){return navigator.maxTouchPoints||"ontouchstart"in this}function t_(){var Q=EP,U=bP,Z=uP,K=xP,X={},W=H8("start","drag","end"),z=0,B,O,T,R,L=0;function M(C){C.on("mousedown.drag",f).filter(K).on("touchstart.drag",V).on("touchmove.drag",k,IL).on("touchend.drag touchcancel.drag",h).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(C,v){if(R||!Q.call(this,C,v))return;var b=P(this,U.call(this,C,v),C,v,"mouse");if(!b)return;n0(C.view).on("mousemove.drag",I,Y8).on("mouseup.drag",D,Y8),m7(C.view),Qq(C),T=!1,B=C.clientX,O=C.clientY,b("start",C)}function I(C){if(Y3(C),!T){var v=C.clientX-B,b=C.clientY-O;T=v*v+b*b>L}X.mouse("drag",C)}function D(C){n0(C.view).on("mousemove.drag mouseup.drag",null),i_(C.view,T),Y3(C),X.mouse("end",C)}function V(C,v){if(!Q.call(this,C,v))return;var b=C.changedTouches,E=U.call(this,C,v),p=b.length,a,m;for(a=0;a<p;++a)if(m=P(this,E,C,v,b[a].identifier,b[a]))Qq(C),m("start",C,b[a])}function k(C){var v=C.changedTouches,b=v.length,E,p;for(E=0;E<b;++E)if(p=X[v[E].identifier])Y3(C),p("drag",C,v[E])}function h(C){var v=C.changedTouches,b=v.length,E,p;if(R)clearTimeout(R);R=setTimeout(function(){R=null},500);for(E=0;E<b;++E)if(p=X[v[E].identifier])Qq(C),p("end",C,v[E])}function P(C,v,b,E,p,a){var m=W.copy(),_1=O2(a||b,v),$1,J1,y;if((y=Z.call(C,new s_("beforestart",{sourceEvent:b,target:M,identifier:p,active:z,x:_1[0],y:_1[1],dx:0,dy:0,dispatch:m}),E))==null)return;return $1=y.x-_1[0]||0,J1=y.y-_1[1]||0,function u(x,d,g){var n=_1,j;switch(x){case"start":X[p]=u,j=z++;break;case"end":delete X[p],--z;case"drag":_1=O2(g||d,v),j=z;break}m.call(x,C,new s_(x,{sourceEvent:d,subject:y,target:M,identifier:p,active:j,x:_1[0]+$1,y:_1[1]+J1,dx:_1[0]-n[0],dy:_1[1]-n[1],dispatch:m}),E)}}return M.filter=function(C){return arguments.length?(Q=typeof C==="function"?C:a_(!!C),M):Q},M.container=function(C){return arguments.length?(U=typeof C==="function"?C:a_(C),M):U},M.subject=function(C){return arguments.length?(Z=typeof C==="function"?C:a_(C),M):Z},M.touchable=function(C){return arguments.length?(K=typeof C==="function"?C:a_(!!C),M):K},M.on=function(){var C=W.on.apply(W,arguments);return C===W?M:C},M.clickDistance=function(C){return arguments.length?(L=(C=+C)*C,M):Math.sqrt(L)},M}function o_(Q,U,Z){Q.prototype=U.prototype=Z,Z.constructor=Q}function zK(Q,U){var Z=Object.create(Q.prototype);for(var K in U)Z[K]=U[K];return Z}function _J(){}var n_=0.7,Gq=1/n_,g7="\\s*([+-]?\\d+)\\s*",e_="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",k4="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hP=/^#([0-9a-f]{3,8})$/,mP=new RegExp(`^rgb\\(${g7},${g7},${g7}\\)$`),gP=new RegExp(`^rgb\\(${k4},${k4},${k4}\\)$`),pP=new RegExp(`^rgba\\(${g7},${g7},${g7},${e_}\\)$`),cP=new RegExp(`^rgba\\(${k4},${k4},${k4},${e_}\\)$`),lP=new RegExp(`^hsl\\(${e_},${k4},${k4}\\)$`),rP=new RegExp(`^hsla\\(${e_},${k4},${k4},${e_}\\)$`),fL={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};o_(_J,s5,{copy(Q){return Object.assign(new this.constructor,this,Q)},displayable(){return this.rgb().displayable()},hex:PL,formatHex:PL,formatHex8:dP,formatHsl:iP,formatRgb:NL,toString:NL});function PL(){return this.rgb().formatHex()}function dP(){return this.rgb().formatHex8()}function iP(){return DL(this).formatHsl()}function NL(){return this.rgb().formatRgb()}function s5(Q){var U,Z;return Q=(Q+"").trim().toLowerCase(),(U=hP.exec(Q))?(Z=U[1].length,U=parseInt(U[1],16),Z===6?CL(U):Z===3?new s2(U>>8&15|U>>4&240,U>>4&15|U&240,(U&15)<<4|U&15,1):Z===8?qq(U>>24&255,U>>16&255,U>>8&255,(U&255)/255):Z===4?qq(U>>12&15|U>>8&240,U>>8&15|U>>4&240,U>>4&15|U&240,((U&15)<<4|U&15)/255):null):(U=mP.exec(Q))?new s2(U[1],U[2],U[3],1):(U=gP.exec(Q))?new s2(U[1]*255/100,U[2]*255/100,U[3]*255/100,1):(U=pP.exec(Q))?qq(U[1],U[2],U[3],U[4]):(U=cP.exec(Q))?qq(U[1]*255/100,U[2]*255/100,U[3]*255/100,U[4]):(U=lP.exec(Q))?VL(U[1],U[2]/100,U[3]/100,1):(U=rP.exec(Q))?VL(U[1],U[2]/100,U[3]/100,U[4]):fL.hasOwnProperty(Q)?CL(fL[Q]):Q==="transparent"?new s2(NaN,NaN,NaN,0):null}function CL(Q){return new s2(Q>>16&255,Q>>8&255,Q&255,1)}function qq(Q,U,Z,K){if(K<=0)Q=U=Z=NaN;return new s2(Q,U,Z,K)}function aP(Q){if(!(Q instanceof _J))Q=s5(Q);if(!Q)return new s2;return Q=Q.rgb(),new s2(Q.r,Q.g,Q.b,Q.opacity)}function p7(Q,U,Z,K){return arguments.length===1?aP(Q):new s2(Q,U,Z,K==null?1:K)}function s2(Q,U,Z,K){this.r=+Q,this.g=+U,this.b=+Z,this.opacity=+K}o_(s2,p7,zK(_J,{brighter(Q){return Q=Q==null?Gq:Math.pow(Gq,Q),new s2(this.r*Q,this.g*Q,this.b*Q,this.opacity)},darker(Q){return Q=Q==null?n_:Math.pow(n_,Q),new s2(this.r*Q,this.g*Q,this.b*Q,this.opacity)},rgb(){return this},clamp(){return new s2(z8(this.r),z8(this.g),z8(this.b),Zq(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:SL,formatHex:SL,formatHex8:sP,formatRgb:jL,toString:jL}));function SL(){return`#${W8(this.r)}${W8(this.g)}${W8(this.b)}`}function sP(){return`#${W8(this.r)}${W8(this.g)}${W8(this.b)}${W8((isNaN(this.opacity)?1:this.opacity)*255)}`}function jL(){let Q=Zq(this.opacity);return`${Q===1?"rgb(":"rgba("}${z8(this.r)}, ${z8(this.g)}, ${z8(this.b)}${Q===1?")":`, ${Q})`}`}function Zq(Q){return isNaN(Q)?1:Math.max(0,Math.min(1,Q))}function z8(Q){return Math.max(0,Math.min(255,Math.round(Q)||0))}function W8(Q){return Q=z8(Q),(Q<16?"0":"")+Q.toString(16)}function VL(Q,U,Z,K){if(K<=0)Q=U=Z=NaN;else if(Z<=0||Z>=1)Q=U=NaN;else if(U<=0)Q=NaN;return new a5(Q,U,Z,K)}function DL(Q){if(Q instanceof a5)return new a5(Q.h,Q.s,Q.l,Q.opacity);if(!(Q instanceof _J))Q=s5(Q);if(!Q)return new a5;if(Q instanceof a5)return Q;Q=Q.rgb();var U=Q.r/255,Z=Q.g/255,K=Q.b/255,X=Math.min(U,Z,K),W=Math.max(U,Z,K),z=NaN,B=W-X,O=(W+X)/2;if(B){if(U===W)z=(Z-K)/B+(Z<K)*6;else if(Z===W)z=(K-U)/B+2;else z=(U-Z)/B+4;B/=O<0.5?W+X:2-W-X,z*=60}else B=O>0&&O<1?0:z;return new a5(z,B,O,Q.opacity)}function yL(Q,U,Z,K){return arguments.length===1?DL(Q):new a5(Q,U,Z,K==null?1:K)}function a5(Q,U,Z,K){this.h=+Q,this.s=+U,this.l=+Z,this.opacity=+K}o_(a5,yL,zK(_J,{brighter(Q){return Q=Q==null?Gq:Math.pow(Gq,Q),new a5(this.h,this.s,this.l*Q,this.opacity)},darker(Q){return Q=Q==null?n_:Math.pow(n_,Q),new a5(this.h,this.s,this.l*Q,this.opacity)},rgb(){var Q=this.h%360+(this.h<0)*360,U=isNaN(Q)||isNaN(this.s)?0:this.s,Z=this.l,K=Z+(Z<0.5?Z:1-Z)*U,X=2*Z-K;return new s2(BK(Q>=240?Q-240:Q+120,X,K),BK(Q,X,K),BK(Q<120?Q+240:Q-120,X,K),this.opacity)},clamp(){return new a5(kL(this.h),Uq(this.s),Uq(this.l),Zq(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)},formatHsl(){let Q=Zq(this.opacity);return`${Q===1?"hsl(":"hsla("}${kL(this.h)}, ${Uq(this.s)*100}%, ${Uq(this.l)*100}%${Q===1?")":`, ${Q})`}`}}));function kL(Q){return Q=(Q||0)%360,Q<0?Q+360:Q}function Uq(Q){return Math.max(0,Math.min(1,Q||0))}function BK(Q,U,Z){return(Q<60?U+(Z-U)*Q/60:Q<180?Z:Q<240?U+(Z-U)*(240-Q)/60:U)*255}function AK(Q,U,Z,K,X){var W=Q*Q,z=W*Q;return((1-3*Q+3*W-z)*U+(4-6*W+3*z)*Z+(1+3*Q+3*W-3*z)*K+z*X)/6}function LK(Q){var U=Q.length-1;return function(Z){var K=Z<=0?Z=0:Z>=1?(Z=1,U-1):Math.floor(Z*U),X=Q[K],W=Q[K+1],z=K>0?Q[K-1]:2*X-W,B=K<U-1?Q[K+2]:2*W-X;return AK((Z-K/U)*U,z,X,W,B)}}function MK(Q){var U=Q.length;return function(Z){var K=Math.floor(((Z%=1)<0?++Z:Z)*U),X=Q[(K+U-1)%U],W=Q[K%U],z=Q[(K+1)%U],B=Q[(K+2)%U];return AK((Z-K/U)*U,X,W,z,B)}}var JJ=(Q)=>()=>Q;function tP(Q,U){return function(Z){return Q+Z*U}}function oP(Q,U,Z){return Q=Math.pow(Q,Z),U=Math.pow(U,Z)-Q,Z=1/Z,function(K){return Math.pow(Q+K*U,Z)}}function vL(Q){return(Q=+Q)===1?Fq:function(U,Z){return Z-U?oP(U,Z,Q):JJ(isNaN(U)?Z:U)}}function Fq(Q,U){var Z=U-Q;return Z?tP(Q,Z):JJ(isNaN(Q)?U:Q)}var B8=function Q(U){var Z=vL(U);function K(X,W){var z=Z((X=p7(X)).r,(W=p7(W)).r),B=Z(X.g,W.g),O=Z(X.b,W.b),T=Fq(X.opacity,W.opacity);return function(R){return X.r=z(R),X.g=B(R),X.b=O(R),X.opacity=T(R),X+""}}return K.gamma=Q,K}(1);function EL(Q){return function(U){var Z=U.length,K=Array(Z),X=Array(Z),W=Array(Z),z,B;for(z=0;z<Z;++z)B=p7(U[z]),K[z]=B.r||0,X[z]=B.g||0,W[z]=B.b||0;return K=Q(K),X=Q(X),W=Q(W),B.opacity=1,function(O){return B.r=K(O),B.g=X(O),B.b=W(O),B+""}}}var nP=EL(LK),eP=EL(MK);function TK(Q,U){if(!U)U=[];var Z=Q?Math.min(U.length,Q.length):0,K=U.slice(),X;return function(W){for(X=0;X<Z;++X)K[X]=Q[X]*(1-W)+U[X]*W;return K}}function bL(Q){return ArrayBuffer.isView(Q)&&!(Q instanceof DataView)}function uL(Q,U){var Z=U?U.length:0,K=Q?Math.min(Z,Q.length):0,X=Array(K),W=Array(Z),z;for(z=0;z<K;++z)X[z]=D4(Q[z],U[z]);for(;z<Z;++z)W[z]=U[z];return function(B){for(z=0;z<K;++z)W[z]=X[z](B);return W}}function RK(Q,U){var Z=new Date;return Q=+Q,U=+U,function(K){return Z.setTime(Q*(1-K)+U*K),Z}}function w2(Q,U){return Q=+Q,U=+U,function(Z){return Q*(1-Z)+U*Z}}function OK(Q,U){var Z={},K={},X;if(Q===null||typeof Q!=="object")Q={};if(U===null||typeof U!=="object")U={};for(X in U)if(X in Q)Z[X]=D4(Q[X],U[X]);else K[X]=U[X];return function(W){for(X in Z)K[X]=Z[X](W);return K}}var IK=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wK=new RegExp(IK.source,"g");function _N(Q){return function(){return Q}}function JN(Q){return function(U){return Q(U)+""}}function c7(Q,U){var Z=IK.lastIndex=wK.lastIndex=0,K,X,W,z=-1,B=[],O=[];Q=Q+"",U=U+"";while((K=IK.exec(Q))&&(X=wK.exec(U))){if((W=X.index)>Z)if(W=U.slice(Z,W),B[z])B[z]+=W;else B[++z]=W;if((K=K[0])===(X=X[0]))if(B[z])B[z]+=X;else B[++z]=X;else B[++z]=null,O.push({i:z,x:w2(K,X)});Z=wK.lastIndex}if(Z<U.length)if(W=U.slice(Z),B[z])B[z]+=W;else B[++z]=W;return B.length<2?O[0]?JN(O[0].x):_N(U):(U=O.length,function(T){for(var R=0,L;R<U;++R)B[(L=O[R]).i]=L.x(T);return B.join("")})}function D4(Q,U){var Z=typeof U,K;return U==null||Z==="boolean"?JJ(U):(Z==="number"?w2:Z==="string"?(K=s5(U))?(U=K,B8):c7:U instanceof s5?B8:U instanceof Date?RK:bL(U)?TK:Array.isArray(U)?uL:typeof U.valueOf!=="function"&&typeof U.toString!=="function"||isNaN(U)?OK:w2)(Q,U)}var xL=180/Math.PI,Kq={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xq(Q,U,Z,K,X,W){var z,B,O;if(z=Math.sqrt(Q*Q+U*U))Q/=z,U/=z;if(O=Q*Z+U*K)Z-=Q*O,K-=U*O;if(B=Math.sqrt(Z*Z+K*K))Z/=B,K/=B,O/=B;if(Q*K<U*Z)Q=-Q,U=-U,O=-O,z=-z;return{translateX:X,translateY:W,rotate:Math.atan2(U,Q)*xL,skewX:Math.atan(O)*xL,scaleX:z,scaleY:B}}var Hq;function hL(Q){let U=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(Q+"");return U.isIdentity?Kq:Xq(U.a,U.b,U.c,U.d,U.e,U.f)}function mL(Q){if(Q==null)return Kq;if(!Hq)Hq=document.createElementNS("http://www.w3.org/2000/svg","g");if(Hq.setAttribute("transform",Q),!(Q=Hq.transform.baseVal.consolidate()))return Kq;return Q=Q.matrix,Xq(Q.a,Q.b,Q.c,Q.d,Q.e,Q.f)}function gL(Q,U,Z,K){function X(T){return T.length?T.pop()+" ":""}function W(T,R,L,M,f,I){if(T!==L||R!==M){var D=f.push("translate(",null,U,null,Z);I.push({i:D-4,x:w2(T,L)},{i:D-2,x:w2(R,M)})}else if(L||M)f.push("translate("+L+U+M+Z)}function z(T,R,L,M){if(T!==R){if(T-R>180)R+=360;else if(R-T>180)T+=360;M.push({i:L.push(X(L)+"rotate(",null,K)-2,x:w2(T,R)})}else if(R)L.push(X(L)+"rotate("+R+K)}function B(T,R,L,M){if(T!==R)M.push({i:L.push(X(L)+"skewX(",null,K)-2,x:w2(T,R)});else if(R)L.push(X(L)+"skewX("+R+K)}function O(T,R,L,M,f,I){if(T!==L||R!==M){var D=f.push(X(f)+"scale(",null,",",null,")");I.push({i:D-4,x:w2(T,L)},{i:D-2,x:w2(R,M)})}else if(L!==1||M!==1)f.push(X(f)+"scale("+L+","+M+")")}return function(T,R){var L=[],M=[];return T=Q(T),R=Q(R),W(T.translateX,T.translateY,R.translateX,R.translateY,L,M),z(T.rotate,R.rotate,L,M),B(T.skewX,R.skewX,L,M),O(T.scaleX,T.scaleY,R.scaleX,R.scaleY,L,M),T=R=null,function(f){var I=-1,D=M.length,V;while(++I<D)L[(V=M[I]).i]=V.x(f);return L.join("")}}}var fK=gL(hL,"px, ","px)","deg)"),PK=gL(mL,", ",")",")");var $N=0.000000000001;function pL(Q){return((Q=Math.exp(Q))+1/Q)/2}function QN(Q){return((Q=Math.exp(Q))-1/Q)/2}function qN(Q){return((Q=Math.exp(2*Q))-1)/(Q+1)}var A8=function Q(U,Z,K){function X(W,z){var B=W[0],O=W[1],T=W[2],R=z[0],L=z[1],M=z[2],f=R-B,I=L-O,D=f*f+I*I,V,k;if(D<$N)k=Math.log(M/T)/U,V=function(E){return[B+E*f,O+E*I,T*Math.exp(U*E*k)]};else{var h=Math.sqrt(D),P=(M*M-T*T+K*D)/(2*T*Z*h),C=(M*M-T*T-K*D)/(2*M*Z*h),v=Math.log(Math.sqrt(P*P+1)-P),b=Math.log(Math.sqrt(C*C+1)-C);k=(b-v)/U,V=function(E){var p=E*k,a=pL(v),m=T/(Z*h)*(a*qN(U*p+v)-QN(v));return[B+m*f,O+m*I,T*a/pL(U*p+v)]}}return V.duration=k*1000*U/Math.SQRT2,V}return X.rho=function(W){var z=Math.max(0.001,+W),B=z*z,O=B*B;return Q(z,B,O)},X}(Math.SQRT2,2,4);var l7=0,QJ=0,$J=0,lL=1000,Yq,qJ,Wq=0,L8=0,zq=0,UJ=typeof performance==="object"&&performance.now?performance:Date,rL=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(Q){setTimeout(Q,17)};function ZJ(){return L8||(rL(UN),L8=UJ.now()+zq)}function UN(){L8=0}function GJ(){this._call=this._time=this._next=null}GJ.prototype=Bq.prototype={constructor:GJ,restart:function(Q,U,Z){if(typeof Q!=="function")throw TypeError("callback is not a function");if(Z=(Z==null?ZJ():+Z)+(U==null?0:+U),!this._next&&qJ!==this){if(qJ)qJ._next=this;else Yq=this;qJ=this}this._call=Q,this._time=Z,NK()},stop:function(){if(this._call)this._call=null,this._time=1/0,NK()}};function Bq(Q,U,Z){var K=new GJ;return K.restart(Q,U,Z),K}function dL(){ZJ(),++l7;var Q=Yq,U;while(Q){if((U=L8-Q._time)>=0)Q._call.call(void 0,U);Q=Q._next}--l7}function cL(){L8=(Wq=UJ.now())+zq,l7=QJ=0;try{dL()}finally{l7=0,ZN(),L8=0}}function GN(){var Q=UJ.now(),U=Q-Wq;if(U>lL)zq-=U,Wq=Q}function ZN(){var Q,U=Yq,Z,K=1/0;while(U)if(U._call){if(K>U._time)K=U._time;Q=U,U=U._next}else Z=U._next,U._next=null,U=Q?Q._next=Z:Yq=Z;qJ=Q,NK(K)}function NK(Q){if(l7)return;if(QJ)QJ=clearTimeout(QJ);var U=Q-L8;if(U>24){if(Q<1/0)QJ=setTimeout(cL,Q-UJ.now()-zq);if($J)$J=clearInterval($J)}else{if(!$J)Wq=UJ.now(),$J=setInterval(GN,lL);l7=1,rL(cL)}}function FJ(Q,U,Z){var K=new GJ;return U=U==null?0:+U,K.restart((X)=>{K.stop(),Q(X+U)},U,Z),K}var FN=H8("start","end","cancel","interrupt"),KN=[],sL=0,iL=1,Lq=2,Aq=3,aL=4,Mq=5,KJ=6;function W3(Q,U,Z,K,X,W){var z=Q.__transition;if(!z)Q.__transition={};else if(Z in z)return;XN(Q,Z,{name:U,index:K,group:X,on:FN,tween:KN,time:W.time,delay:W.delay,duration:W.duration,ease:W.ease,timer:null,state:sL})}function XJ(Q,U){var Z=e0(Q,U);if(Z.state>sL)throw Error("too late; already scheduled");return Z}function W2(Q,U){var Z=e0(Q,U);if(Z.state>Aq)throw Error("too late; already running");return Z}function e0(Q,U){var Z=Q.__transition;if(!Z||!(Z=Z[U]))throw Error("transition not found");return Z}function XN(Q,U,Z){var K=Q.__transition,X;K[U]=Z,Z.timer=Bq(W,0,Z.time);function W(T){if(Z.state=iL,Z.timer.restart(z,Z.delay,Z.time),Z.delay<=T)z(T-Z.delay)}function z(T){var R,L,M,f;if(Z.state!==iL)return O();for(R in K){if(f=K[R],f.name!==Z.name)continue;if(f.state===Aq)return FJ(z);if(f.state===aL)f.state=KJ,f.timer.stop(),f.on.call("interrupt",Q,Q.__data__,f.index,f.group),delete K[R];else if(+R<U)f.state=KJ,f.timer.stop(),f.on.call("cancel",Q,Q.__data__,f.index,f.group),delete K[R]}if(FJ(function(){if(Z.state===Aq)Z.state=aL,Z.timer.restart(B,Z.delay,Z.time),B(T)}),Z.state=Lq,Z.on.call("start",Q,Q.__data__,Z.index,Z.group),Z.state!==Lq)return;Z.state=Aq,X=Array(M=Z.tween.length);for(R=0,L=-1;R<M;++R)if(f=Z.tween[R].value.call(Q,Q.__data__,Z.index,Z.group))X[++L]=f;X.length=L+1}function B(T){var R=T<Z.duration?Z.ease.call(null,T/Z.duration):(Z.timer.restart(O),Z.state=Mq,1),L=-1,M=X.length;while(++L<M)X[L].call(Q,R);if(Z.state===Mq)Z.on.call("end",Q,Q.__data__,Z.index,Z.group),O()}function O(){Z.state=KJ,Z.timer.stop(),delete K[U];for(var T in K)return;delete Q.__transition}}function Y6(Q,U){var Z=Q.__transition,K,X,W=!0,z;if(!Z)return;U=U==null?null:U+"";for(z in Z){if((K=Z[z]).name!==U){W=!1;continue}X=K.state>Lq&&K.state<Mq,K.state=KJ,K.timer.stop(),K.on.call(X?"interrupt":"cancel",Q,Q.__data__,K.index,K.group),delete Z[z]}if(W)delete Q.__transition}function CK(Q){return this.each(function(){Y6(this,Q)})}function HN(Q,U){var Z,K;return function(){var X=W2(this,Q),W=X.tween;if(W!==Z){K=Z=W;for(var z=0,B=K.length;z<B;++z)if(K[z].name===U){K=K.slice(),K.splice(z,1);break}}X.tween=K}}function YN(Q,U,Z){var K,X;if(typeof Z!=="function")throw Error();return function(){var W=W2(this,Q),z=W.tween;if(z!==K){X=(K=z).slice();for(var B={name:U,value:Z},O=0,T=X.length;O<T;++O)if(X[O].name===U){X[O]=B;break}if(O===T)X.push(B)}W.tween=X}}function SK(Q,U){var Z=this._id;if(Q+="",arguments.length<2){var K=e0(this.node(),Z).tween;for(var X=0,W=K.length,z;X<W;++X)if((z=K[X]).name===Q)return z.value;return null}return this.each((U==null?HN:YN)(Z,Q,U))}function r7(Q,U,Z){var K=Q._id;return Q.each(function(){var X=W2(this,K);(X.value||(X.value={}))[U]=Z.apply(this,arguments)}),function(X){return e0(X,K).value[U]}}function HJ(Q,U){var Z;return(typeof U==="number"?w2:U instanceof s5?B8:(Z=s5(U))?(U=Z,B8):c7)(Q,U)}function WN(Q){return function(){this.removeAttribute(Q)}}function zN(Q){return function(){this.removeAttributeNS(Q.space,Q.local)}}function BN(Q,U,Z){var K,X=Z+"",W;return function(){var z=this.getAttribute(Q);return z===X?null:z===K?W:W=U(K=z,Z)}}function AN(Q,U,Z){var K,X=Z+"",W;return function(){var z=this.getAttributeNS(Q.space,Q.local);return z===X?null:z===K?W:W=U(K=z,Z)}}function LN(Q,U,Z){var K,X,W;return function(){var z,B=Z(this),O;if(B==null)return void this.removeAttribute(Q);return z=this.getAttribute(Q),O=B+"",z===O?null:z===K&&O===X?W:(X=O,W=U(K=z,B))}}function MN(Q,U,Z){var K,X,W;return function(){var z,B=Z(this),O;if(B==null)return void this.removeAttributeNS(Q.space,Q.local);return z=this.getAttributeNS(Q.space,Q.local),O=B+"",z===O?null:z===K&&O===X?W:(X=O,W=U(K=z,B))}}function jK(Q,U){var Z=V4(Q),K=Z==="transform"?PK:HJ;return this.attrTween(Q,typeof U==="function"?(Z.local?MN:LN)(Z,K,r7(this,"attr."+Q,U)):U==null?(Z.local?zN:WN)(Z):(Z.local?AN:BN)(Z,K,U))}function TN(Q,U){return function(Z){this.setAttribute(Q,U.call(this,Z))}}function RN(Q,U){return function(Z){this.setAttributeNS(Q.space,Q.local,U.call(this,Z))}}function ON(Q,U){var Z,K;function X(){var W=U.apply(this,arguments);if(W!==K)Z=(K=W)&&RN(Q,W);return Z}return X._value=U,X}function wN(Q,U){var Z,K;function X(){var W=U.apply(this,arguments);if(W!==K)Z=(K=W)&&TN(Q,W);return Z}return X._value=U,X}function VK(Q,U){var Z="attr."+Q;if(arguments.length<2)return(Z=this.tween(Z))&&Z._value;if(U==null)return this.tween(Z,null);if(typeof U!=="function")throw Error();var K=V4(Q);return this.tween(Z,(K.local?ON:wN)(K,U))}function IN(Q,U){return function(){XJ(this,Q).delay=+U.apply(this,arguments)}}function fN(Q,U){return U=+U,function(){XJ(this,Q).delay=U}}function kK(Q){var U=this._id;return arguments.length?this.each((typeof Q==="function"?IN:fN)(U,Q)):e0(this.node(),U).delay}function PN(Q,U){return function(){W2(this,Q).duration=+U.apply(this,arguments)}}function NN(Q,U){return U=+U,function(){W2(this,Q).duration=U}}function DK(Q){var U=this._id;return arguments.length?this.each((typeof Q==="function"?PN:NN)(U,Q)):e0(this.node(),U).duration}function CN(Q,U){if(typeof U!=="function")throw Error();return function(){W2(this,Q).ease=U}}function yK(Q){var U=this._id;return arguments.length?this.each(CN(U,Q)):e0(this.node(),U).ease}function SN(Q,U){return function(){var Z=U.apply(this,arguments);if(typeof Z!=="function")throw Error();W2(this,Q).ease=Z}}function vK(Q){if(typeof Q!=="function")throw Error();return this.each(SN(this._id,Q))}function EK(Q){if(typeof Q!=="function")Q=x7(Q);for(var U=this._groups,Z=U.length,K=Array(Z),X=0;X<Z;++X)for(var W=U[X],z=W.length,B=K[X]=[],O,T=0;T<z;++T)if((O=W[T])&&Q.call(O,O.__data__,T,W))B.push(O);return new u2(K,this._parents,this._name,this._id)}function bK(Q){if(Q._id!==this._id)throw Error();for(var U=this._groups,Z=Q._groups,K=U.length,X=Z.length,W=Math.min(K,X),z=Array(K),B=0;B<W;++B)for(var O=U[B],T=Z[B],R=O.length,L=z[B]=Array(R),M,f=0;f<R;++f)if(M=O[f]||T[f])L[f]=M;for(;B<K;++B)z[B]=U[B];return new u2(z,this._parents,this._name,this._id)}function jN(Q){return(Q+"").trim().split(/^|\s+/).every(function(U){var Z=U.indexOf(".");if(Z>=0)U=U.slice(0,Z);return!U||U==="start"})}function VN(Q,U,Z){var K,X,W=jN(U)?XJ:W2;return function(){var z=W(this,Q),B=z.on;if(B!==K)(X=(K=B).copy()).on(U,Z);z.on=X}}function uK(Q,U){var Z=this._id;return arguments.length<2?e0(this.node(),Z).on.on(Q):this.each(VN(Z,Q,U))}function kN(Q){return function(){var U=this.parentNode;for(var Z in this.__transition)if(+Z!==Q)return;if(U)U.removeChild(this)}}function xK(){return this.on("end.remove",kN(this._id))}function hK(Q){var U=this._name,Z=this._id;if(typeof Q!=="function")Q=X6(Q);for(var K=this._groups,X=K.length,W=Array(X),z=0;z<X;++z)for(var B=K[z],O=B.length,T=W[z]=Array(O),R,L,M=0;M<O;++M)if((R=B[M])&&(L=Q.call(R,R.__data__,M,B))){if("__data__"in R)L.__data__=R.__data__;T[M]=L,W3(T[M],U,Z,M,T,e0(R,Z))}return new u2(W,this._parents,U,Z)}function mK(Q){var U=this._name,Z=this._id;if(typeof Q!=="function")Q=h7(Q);for(var K=this._groups,X=K.length,W=[],z=[],B=0;B<X;++B)for(var O=K[B],T=O.length,R,L=0;L<T;++L)if(R=O[L]){for(var M=Q.call(R,R.__data__,L,O),f,I=e0(R,Z),D=0,V=M.length;D<V;++D)if(f=M[D])W3(f,U,Z,D,M,I);W.push(M),z.push(R)}return new u2(W,z,U,Z)}var DN=H3.prototype.constructor;function gK(){return new DN(this._groups,this._parents)}function yN(Q,U){var Z,K,X;return function(){var W=H6(this,Q),z=(this.style.removeProperty(Q),H6(this,Q));return W===z?null:W===Z&&z===K?X:X=U(Z=W,K=z)}}function tL(Q){return function(){this.style.removeProperty(Q)}}function vN(Q,U,Z){var K,X=Z+"",W;return function(){var z=H6(this,Q);return z===X?null:z===K?W:W=U(K=z,Z)}}function EN(Q,U,Z){var K,X,W;return function(){var z=H6(this,Q),B=Z(this),O=B+"";if(B==null)O=B=(this.style.removeProperty(Q),H6(this,Q));return z===O?null:z===K&&O===X?W:(X=O,W=U(K=z,B))}}function bN(Q,U){var Z,K,X,W="style."+U,z="end."+W,B;return function(){var O=W2(this,Q),T=O.on,R=O.value[W]==null?B||(B=tL(U)):void 0;if(T!==Z||X!==R)(K=(Z=T).copy()).on(z,X=R);O.on=K}}function pK(Q,U,Z){var K=(Q+="")==="transform"?fK:HJ;return U==null?this.styleTween(Q,yN(Q,K)).on("end.style."+Q,tL(Q)):typeof U==="function"?this.styleTween(Q,EN(Q,K,r7(this,"style."+Q,U))).each(bN(this._id,Q)):this.styleTween(Q,vN(Q,K,U),Z).on("end.style."+Q,null)}function uN(Q,U,Z){return function(K){this.style.setProperty(Q,U.call(this,K),Z)}}function xN(Q,U,Z){var K,X;function W(){var z=U.apply(this,arguments);if(z!==X)K=(X=z)&&uN(Q,z,Z);return K}return W._value=U,W}function cK(Q,U,Z){var K="style."+(Q+="");if(arguments.length<2)return(K=this.tween(K))&&K._value;if(U==null)return this.tween(K,null);if(typeof U!=="function")throw Error();return this.tween(K,xN(Q,U,Z==null?"":Z))}function hN(Q){return function(){this.textContent=Q}}function mN(Q){return function(){var U=Q(this);this.textContent=U==null?"":U}}function lK(Q){return this.tween("text",typeof Q==="function"?mN(r7(this,"text",Q)):hN(Q==null?"":Q+""))}function gN(Q){return function(U){this.textContent=Q.call(this,U)}}function pN(Q){var U,Z;function K(){var X=Q.apply(this,arguments);if(X!==Z)U=(Z=X)&&gN(X);return U}return K._value=Q,K}function rK(Q){var U="text";if(arguments.length<1)return(U=this.tween(U))&&U._value;if(Q==null)return this.tween(U,null);if(typeof Q!=="function")throw Error();return this.tween(U,pN(Q))}function dK(){var Q=this._name,U=this._id,Z=Tq();for(var K=this._groups,X=K.length,W=0;W<X;++W)for(var z=K[W],B=z.length,O,T=0;T<B;++T)if(O=z[T]){var R=e0(O,U);W3(O,Q,Z,T,z,{time:R.time+R.delay+R.duration,delay:0,duration:R.duration,ease:R.ease})}return new u2(K,this._parents,Q,Z)}function iK(){var Q,U,Z=this,K=Z._id,X=Z.size();return new Promise(function(W,z){var B={value:z},O={value:function(){if(--X===0)W()}};if(Z.each(function(){var T=W2(this,K),R=T.on;if(R!==Q)U=(Q=R).copy(),U._.cancel.push(B),U._.interrupt.push(B),U._.end.push(O);T.on=U}),X===0)W()})}var cN=0;function u2(Q,U,Z,K){this._groups=Q,this._parents=U,this._name=Z,this._id=K}function oL(Q){return H3().transition(Q)}function Tq(){return++cN}var z3=H3.prototype;u2.prototype=oL.prototype={constructor:u2,select:hK,selectAll:mK,selectChild:z3.selectChild,selectChildren:z3.selectChildren,filter:EK,merge:bK,selection:gK,transition:dK,call:z3.call,nodes:z3.nodes,node:z3.node,size:z3.size,empty:z3.empty,each:z3.each,on:uK,attr:jK,attrTween:VK,style:pK,styleTween:cK,text:lK,textTween:rK,remove:xK,tween:SK,delay:kK,duration:DK,ease:yK,easeVarying:vK,end:iK,[Symbol.iterator]:z3[Symbol.iterator]};function Rq(Q){return((Q*=2)<=1?Q*Q*Q:(Q-=2)*Q*Q+2)/2}var lN={time:null,delay:0,duration:250,ease:Rq};function rN(Q,U){var Z;while(!(Z=Q.__transition)||!(Z=Z[U]))if(!(Q=Q.parentNode))throw Error(`transition ${U} not found`);return Z}function aK(Q){var U,Z;if(Q instanceof u2)U=Q._id,Q=Q._name;else U=Tq(),(Z=lN).time=ZJ(),Q=Q==null?null:Q+"";for(var K=this._groups,X=K.length,W=0;W<X;++W)for(var z=K[W],B=z.length,O,T=0;T<B;++T)if(O=z[T])W3(O,Q,U,T,z,Z||rN(O,U));return new u2(K,this._parents,Q,U)}H3.prototype.interrupt=CK;H3.prototype.transition=aK;var YJ=(Q)=>()=>Q;function sK(Q,{sourceEvent:U,target:Z,transform:K,dispatch:X}){Object.defineProperties(this,{type:{value:Q,enumerable:!0,configurable:!0},sourceEvent:{value:U,enumerable:!0,configurable:!0},target:{value:Z,enumerable:!0,configurable:!0},transform:{value:K,enumerable:!0,configurable:!0},_:{value:X}})}function t5(Q,U,Z){this.k=Q,this.x=U,this.y=Z}t5.prototype={constructor:t5,scale:function(Q){return Q===1?this:new t5(this.k*Q,this.x,this.y)},translate:function(Q,U){return Q===0&U===0?this:new t5(this.k,this.x+this.k*Q,this.y+this.k*U)},apply:function(Q){return[Q[0]*this.k+this.x,Q[1]*this.k+this.y]},applyX:function(Q){return Q*this.k+this.x},applyY:function(Q){return Q*this.k+this.y},invert:function(Q){return[(Q[0]-this.x)/this.k,(Q[1]-this.y)/this.k]},invertX:function(Q){return(Q-this.x)/this.k},invertY:function(Q){return(Q-this.y)/this.k},rescaleX:function(Q){return Q.copy().domain(Q.range().map(this.invertX,this).map(Q.invert,Q))},rescaleY:function(Q){return Q.copy().domain(Q.range().map(this.invertY,this).map(Q.invert,Q))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var M8=new t5(1,0,0);WJ.prototype=t5.prototype;function WJ(Q){while(!Q.__zoom)if(!(Q=Q.parentNode))return M8;return Q.__zoom}function Oq(Q){Q.stopImmediatePropagation()}function T8(Q){Q.preventDefault(),Q.stopImmediatePropagation()}function dN(Q){return(!Q.ctrlKey||Q.type==="wheel")&&!Q.button}function iN(){var Q=this;if(Q instanceof SVGElement){if(Q=Q.ownerSVGElement||Q,Q.hasAttribute("viewBox"))return Q=Q.viewBox.baseVal,[[Q.x,Q.y],[Q.x+Q.width,Q.y+Q.height]];return[[0,0],[Q.width.baseVal.value,Q.height.baseVal.value]]}return[[0,0],[Q.clientWidth,Q.clientHeight]]}function nL(){return this.__zoom||M8}function aN(Q){return-Q.deltaY*(Q.deltaMode===1?0.05:Q.deltaMode?1:0.002)*(Q.ctrlKey?10:1)}function sN(){return navigator.maxTouchPoints||"ontouchstart"in this}function tN(Q,U,Z){var K=Q.invertX(U[0][0])-Z[0][0],X=Q.invertX(U[1][0])-Z[1][0],W=Q.invertY(U[0][1])-Z[0][1],z=Q.invertY(U[1][1])-Z[1][1];return Q.translate(X>K?(K+X)/2:Math.min(0,K)||Math.max(0,X),z>W?(W+z)/2:Math.min(0,W)||Math.max(0,z))}function zJ(){var Q=dN,U=iN,Z=tN,K=aN,X=sN,W=[0,1/0],z=[[-1/0,-1/0],[1/0,1/0]],B=250,O=A8,T=H8("start","zoom","end"),R,L,M,f=500,I=150,D=0,V=10;function k(y){y.property("__zoom",nL).on("wheel.zoom",p,{passive:!1}).on("mousedown.zoom",a).on("dblclick.zoom",m).filter(X).on("touchstart.zoom",_1).on("touchmove.zoom",$1).on("touchend.zoom touchcancel.zoom",J1).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(y,u,x,d){var g=y.selection?y.selection():y;if(g.property("__zoom",nL),y!==g)v(y,u,x,d);else g.interrupt().each(function(){b(this,arguments).event(d).start().zoom(null,typeof u==="function"?u.apply(this,arguments):u).end()})},k.scaleBy=function(y,u,x,d){k.scaleTo(y,function(){var g=this.__zoom.k,n=typeof u==="function"?u.apply(this,arguments):u;return g*n},x,d)},k.scaleTo=function(y,u,x,d){k.transform(y,function(){var g=U.apply(this,arguments),n=this.__zoom,j=x==null?C(g):typeof x==="function"?x.apply(this,arguments):x,i=n.invert(j),q1=typeof u==="function"?u.apply(this,arguments):u;return Z(P(h(n,q1),j,i),g,z)},x,d)},k.translateBy=function(y,u,x,d){k.transform(y,function(){return Z(this.__zoom.translate(typeof u==="function"?u.apply(this,arguments):u,typeof x==="function"?x.apply(this,arguments):x),U.apply(this,arguments),z)},null,d)},k.translateTo=function(y,u,x,d,g){k.transform(y,function(){var n=U.apply(this,arguments),j=this.__zoom,i=d==null?C(n):typeof d==="function"?d.apply(this,arguments):d;return Z(M8.translate(i[0],i[1]).scale(j.k).translate(typeof u==="function"?-u.apply(this,arguments):-u,typeof x==="function"?-x.apply(this,arguments):-x),n,z)},d,g)};function h(y,u){return u=Math.max(W[0],Math.min(W[1],u)),u===y.k?y:new t5(u,y.x,y.y)}function P(y,u,x){var d=u[0]-x[0]*y.k,g=u[1]-x[1]*y.k;return d===y.x&&g===y.y?y:new t5(y.k,d,g)}function C(y){return[(+y[0][0]+ +y[1][0])/2,(+y[0][1]+ +y[1][1])/2]}function v(y,u,x,d){y.on("start.zoom",function(){b(this,arguments).event(d).start()}).on("interrupt.zoom end.zoom",function(){b(this,arguments).event(d).end()}).tween("zoom",function(){var g=this,n=arguments,j=b(g,n).event(d),i=U.apply(g,n),q1=x==null?C(i):typeof x==="function"?x.apply(g,n):x,Q1=Math.max(i[1][0]-i[0][0],i[1][1]-i[0][1]),Y1=g.__zoom,L1=typeof u==="function"?u.apply(g,n):u,M1=O(Y1.invert(q1).concat(Q1/Y1.k),L1.invert(q1).concat(Q1/L1.k));return function(I1){if(I1===1)I1=L1;else{var X1=M1(I1),f1=Q1/X1[2];I1=new t5(f1,q1[0]-X1[0]*f1,q1[1]-X1[1]*f1)}j.zoom(null,I1)}})}function b(y,u,x){return!x&&y.__zooming||new E(y,u)}function E(y,u){this.that=y,this.args=u,this.active=0,this.sourceEvent=null,this.extent=U.apply(y,u),this.taps=0}E.prototype={event:function(y){if(y)this.sourceEvent=y;return this},start:function(){if(++this.active===1)this.that.__zooming=this,this.emit("start");return this},zoom:function(y,u){if(this.mouse&&y!=="mouse")this.mouse[1]=u.invert(this.mouse[0]);if(this.touch0&&y!=="touch")this.touch0[1]=u.invert(this.touch0[0]);if(this.touch1&&y!=="touch")this.touch1[1]=u.invert(this.touch1[0]);return this.that.__zoom=u,this.emit("zoom"),this},end:function(){if(--this.active===0)delete this.that.__zooming,this.emit("end");return this},emit:function(y){var u=n0(this.that).datum();T.call(y,this.that,new sK(y,{sourceEvent:this.sourceEvent,target:k,type:y,transform:this.that.__zoom,dispatch:T}),u)}};function p(y,...u){if(!Q.apply(this,arguments))return;var x=b(this,u).event(y),d=this.__zoom,g=Math.max(W[0],Math.min(W[1],d.k*Math.pow(2,K.apply(this,arguments)))),n=O2(y);if(x.wheel){if(x.mouse[0][0]!==n[0]||x.mouse[0][1]!==n[1])x.mouse[1]=d.invert(x.mouse[0]=n);clearTimeout(x.wheel)}else if(d.k===g)return;else x.mouse=[n,d.invert(n)],Y6(this),x.start();T8(y),x.wheel=setTimeout(j,I),x.zoom("mouse",Z(P(h(d,g),x.mouse[0],x.mouse[1]),x.extent,z));function j(){x.wheel=null,x.end()}}function a(y,...u){if(M||!Q.apply(this,arguments))return;var x=y.currentTarget,d=b(this,u,!0).event(y),g=n0(y.view).on("mousemove.zoom",q1,!0).on("mouseup.zoom",Q1,!0),n=O2(y,x),j=y.clientX,i=y.clientY;m7(y.view),Oq(y),d.mouse=[n,this.__zoom.invert(n)],Y6(this),d.start();function q1(Y1){if(T8(Y1),!d.moved){var L1=Y1.clientX-j,M1=Y1.clientY-i;d.moved=L1*L1+M1*M1>D}d.event(Y1).zoom("mouse",Z(P(d.that.__zoom,d.mouse[0]=O2(Y1,x),d.mouse[1]),d.extent,z))}function Q1(Y1){g.on("mousemove.zoom mouseup.zoom",null),i_(Y1.view,d.moved),T8(Y1),d.event(Y1).end()}}function m(y,...u){if(!Q.apply(this,arguments))return;var x=this.__zoom,d=O2(y.changedTouches?y.changedTouches[0]:y,this),g=x.invert(d),n=x.k*(y.shiftKey?0.5:2),j=Z(P(h(x,n),d,g),U.apply(this,u),z);if(T8(y),B>0)n0(this).transition().duration(B).call(v,j,d,y);else n0(this).call(k.transform,j,d,y)}function _1(y,...u){if(!Q.apply(this,arguments))return;var x=y.touches,d=x.length,g=b(this,u,y.changedTouches.length===d).event(y),n,j,i,q1;Oq(y);for(j=0;j<d;++j)if(i=x[j],q1=O2(i,this),q1=[q1,this.__zoom.invert(q1),i.identifier],!g.touch0)g.touch0=q1,n=!0,g.taps=1+!!R;else if(!g.touch1&&g.touch0[2]!==q1[2])g.touch1=q1,g.taps=0;if(R)R=clearTimeout(R);if(n){if(g.taps<2)L=q1[0],R=setTimeout(function(){R=null},f);Y6(this),g.start()}}function $1(y,...u){if(!this.__zooming)return;var x=b(this,u).event(y),d=y.changedTouches,g=d.length,n,j,i,q1;T8(y);for(n=0;n<g;++n)if(j=d[n],i=O2(j,this),x.touch0&&x.touch0[2]===j.identifier)x.touch0[0]=i;else if(x.touch1&&x.touch1[2]===j.identifier)x.touch1[0]=i;if(j=x.that.__zoom,x.touch1){var Q1=x.touch0[0],Y1=x.touch0[1],L1=x.touch1[0],M1=x.touch1[1],I1=(I1=L1[0]-Q1[0])*I1+(I1=L1[1]-Q1[1])*I1,X1=(X1=M1[0]-Y1[0])*X1+(X1=M1[1]-Y1[1])*X1;j=h(j,Math.sqrt(I1/X1)),i=[(Q1[0]+L1[0])/2,(Q1[1]+L1[1])/2],q1=[(Y1[0]+M1[0])/2,(Y1[1]+M1[1])/2]}else if(x.touch0)i=x.touch0[0],q1=x.touch0[1];else return;x.zoom("touch",Z(P(j,i,q1),x.extent,z))}function J1(y,...u){if(!this.__zooming)return;var x=b(this,u).event(y),d=y.changedTouches,g=d.length,n,j;if(Oq(y),M)clearTimeout(M);M=setTimeout(function(){M=null},f);for(n=0;n<g;++n)if(j=d[n],x.touch0&&x.touch0[2]===j.identifier)delete x.touch0;else if(x.touch1&&x.touch1[2]===j.identifier)delete x.touch1;if(x.touch1&&!x.touch0)x.touch0=x.touch1,delete x.touch1;if(x.touch0)x.touch0[1]=this.__zoom.invert(x.touch0[0]);else if(x.end(),x.taps===2){if(j=O2(j,this),Math.hypot(L[0]-j[0],L[1]-j[1])<V){var i=n0(this).on("dblclick.zoom");if(i)i.apply(this,arguments)}}}return k.wheelDelta=function(y){return arguments.length?(K=typeof y==="function"?y:YJ(+y),k):K},k.filter=function(y){return arguments.length?(Q=typeof y==="function"?y:YJ(!!y),k):Q},k.touchable=function(y){return arguments.length?(X=typeof y==="function"?y:YJ(!!y),k):X},k.extent=function(y){return arguments.length?(U=typeof y==="function"?y:YJ([[+y[0][0],+y[0][1]],[+y[1][0],+y[1][1]]]),k):U},k.scaleExtent=function(y){return arguments.length?(W[0]=+y[0],W[1]=+y[1],k):[W[0],W[1]]},k.translateExtent=function(y){return arguments.length?(z[0][0]=+y[0][0],z[1][0]=+y[1][0],z[0][1]=+y[0][1],z[1][1]=+y[1][1],k):[[z[0][0],z[0][1]],[z[1][0],z[1][1]]]},k.constrain=function(y){return arguments.length?(Z=y,k):Z},k.duration=function(y){return arguments.length?(B=+y,k):B},k.interpolate=function(y){return arguments.length?(O=y,k):O},k.on=function(){var y=T.on.apply(T,arguments);return y===T?k:y},k.clickDistance=function(y){return arguments.length?(D=(y=+y)*y,k):Math.sqrt(D)},k.tapDistance=function(y){return arguments.length?(V=+y,k):V},k}var x2={error001:(Q="react")=>`Seems like you have not used ${Q==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${Q}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:(Q)=>`Node type "${Q}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:(Q)=>`The old edge with id=${Q} does not exist.`,error009:(Q)=>`Marker type "${Q}" doesn't exist.`,error008:(Q,{id:U,sourceHandle:Z,targetHandle:K})=>`Couldn't create edge for ${Q} handle id: "${Q==="source"?Z:K}", edge id: ${U}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:(Q)=>`Edge type "${Q}" not found. Using fallback type "default".`,error012:(Q)=>`Node with id "${Q}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(Q="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${Q}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:(Q)=>`Edge with id "${Q}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},s7=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],_X=["Enter"," ","Escape"],JX={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:Q,x:U,y:Z})=>`Moved selected node ${Q}. New position, x: ${U}, y: ${Z}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},A6;(function(Q){Q.Strict="strict",Q.Loose="loose"})(A6||(A6={}));var B3;(function(Q){Q.Free="free",Q.Vertical="vertical",Q.Horizontal="horizontal"})(B3||(B3={}));var R8;(function(Q){Q.Partial="partial",Q.Full="full"})(R8||(R8={}));var $X={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},y4;(function(Q){Q.Bezier="default",Q.Straight="straight",Q.Step="step",Q.SmoothStep="smoothstep",Q.SimpleBezier="simplebezier"})(y4||(y4={}));var i7;(function(Q){Q.Arrow="arrow",Q.ArrowClosed="arrowclosed"})(i7||(i7={}));var C1;(function(Q){Q.Left="left",Q.Top="top",Q.Right="right",Q.Bottom="bottom"})(C1||(C1={}));var eL={[C1.Left]:C1.Right,[C1.Right]:C1.Left,[C1.Top]:C1.Bottom,[C1.Bottom]:C1.Top},QX=(Q)=>!!Q&&typeof Q==="object"&&("id"in Q)&&("source"in Q)&&("target"in Q),WM=(Q)=>!!Q&&typeof Q==="object"&&("id"in Q)&&("position"in Q)&&!("source"in Q)&&!("target"in Q),qX=(Q)=>!!Q&&typeof Q==="object"&&("id"in Q)&&("internals"in Q)&&!("source"in Q)&&!("target"in Q);var AJ=(Q,U=[0,0])=>{let{width:Z,height:K}=y5(Q),X=Q.origin??U,W=Z*X[0],z=K*X[1];return{x:Q.position.x-W,y:Q.position.y-z}},UX=(Q,U={nodeOrigin:[0,0]})=>{if(!U.nodeLookup)console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows.");if(Q.length===0)return{x:0,y:0,width:0,height:0};let Z=!1,K=Q.reduce((X,W)=>{let z=typeof W==="string",B=!U.nodeLookup&&!z?W:void 0;if(U.nodeLookup)B=z?U.nodeLookup.get(W):!qX(W)?U.nodeLookup.get(W.id):W;if(!B)return X;return Z=!0,Cq(X,fq(B,U.nodeOrigin))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Z?Sq(K):{x:0,y:0,width:0,height:0}},f8=(Q,U={})=>{let Z={x:1/0,y:1/0,x2:-1/0,y2:-1/0},K=!1;return Q.forEach((X)=>{if(U.filter===void 0||U.filter(X))Z=Cq(Z,fq(X)),K=!0}),K?Sq(Z):{x:0,y:0,width:0,height:0}},Pq=(Q,U,[Z,K,X]=[0,0,1],W=!1,z=!1)=>{let B=(U.x-Z)/X,O=(U.y-K)/X,T=U.width/X,R=U.height/X,L=[];for(let M of Q.values()){let{measured:f,selectable:I=!0,hidden:D=!1}=M;if(z&&!I||D)continue;let V=f.width??M.width??M.initialWidth??0,k=f.height??M.height??M.initialHeight??0,{x:h,y:P}=M.internals.positionAbsolute,C=MM(B,O,T,R,h,P,V,k),v=V*k,b=W&&C>0;if(!M.internals.handleBounds||b||C>=v||M.dragging)L.push(M)}return L},zM=(Q,U)=>{let Z=new Set;return Q.forEach((K)=>{Z.add(K.id)}),U.filter((K)=>Z.has(K.source)||Z.has(K.target))};function oN(Q,U){let Z=new Map,K=U?.nodes?new Set(U.nodes.map((X)=>X.id)):null;return Q.forEach((X)=>{let W;if(U?.includeHiddenNodes){let{width:z,height:B}=y5(X);W=z>0&&B>0}else W=Boolean(X.measured.width&&X.measured.height&&!X.hidden);if(W&&(!K||K.has(X.id)))Z.set(X.id,X)}),Z}async function BM({nodes:Q,width:U,height:Z,panZoom:K,minZoom:X,maxZoom:W},z){if(Q.size===0)return!0;let B=oN(Q,z),O=f8(B),T=MJ(O,U,Z,z?.minZoom??X,z?.maxZoom??W,z?.padding??0.1);return await K.setViewport(T,{duration:z?.duration,ease:z?.ease,interpolate:z?.interpolate}),!0}function GX({nodeId:Q,nextPosition:U,nodeLookup:Z,nodeOrigin:K=[0,0],nodeExtent:X,onError:W}){let z=Z.get(Q),B=z.parentId?Z.get(z.parentId):void 0,{x:O,y:T}=B?B.internals.positionAbsolute:{x:0,y:0},R=z.origin??K,L=z.extent||X;if(z.extent==="parent"&&!z.expandParent)if(!B)W?.("005",x2.error005());else{let{width:f,height:I}=y5(B);if(f&&I)L=[[O,T],[O+f,T+I]]}else if(B&&I8(z.extent))L=[[z.extent[0][0]+O,z.extent[0][1]+T],[z.extent[1][0]+O,z.extent[1][1]+T]];let M=I8(L)?O8(U,L,z.measured):U;if(z.measured.width===void 0||z.measured.height===void 0)W?.("015",x2.error015());return{position:{x:M.x-O+(z.measured.width??0)*R[0],y:M.y-T+(z.measured.height??0)*R[1]},positionAbsolute:M}}async function AM({nodesToRemove:Q=[],edgesToRemove:U=[],nodes:Z,edges:K,onBeforeDelete:X}){let W=new Set(Q.map((M)=>M.id)),z=[];for(let M of Z){if(M.deletable===!1)continue;let f=W.has(M.id),I=!f&&M.parentId&&z.find((D)=>D.id===M.parentId);if(f||I)z.push(M)}let B=new Set(U.map((M)=>M.id)),O=K.filter((M)=>M.deletable!==!1),R=zM(z,O);for(let M of O)if(B.has(M.id)&&!R.find((I)=>I.id===M.id))R.push(M);if(!X)return{edges:R,nodes:z};let L=await X({nodes:z,edges:R});if(typeof L==="boolean")return L?{edges:R,nodes:z}:{edges:[],nodes:[]};return L}var a7=(Q,U=0,Z=1)=>Math.min(Math.max(Q,U),Z),O8=(Q={x:0,y:0},U,Z)=>({x:a7(Q.x,U[0][0],U[1][0]-(Z?.width??0)),y:a7(Q.y,U[0][1],U[1][1]-(Z?.height??0))});function LM(Q,U,Z){let{width:K,height:X}=y5(Z),{x:W,y:z}=Z.internals.positionAbsolute;return O8(Q,[[W,z],[W+K,z+X]],U)}var _M=(Q,U,Z)=>{if(Q<U)return a7(Math.abs(Q-U),1,U)/U;else if(Q>Z)return-a7(Math.abs(Q-Z),1,U)/U;return 0},Nq=(Q,U,Z=15,K=40)=>{let X=_M(Q.x,K,U.width-K)*Z,W=_M(Q.y,K,U.height-K)*Z;return[X,W]},Cq=(Q,U)=>({x:Math.min(Q.x,U.x),y:Math.min(Q.y,U.y),x2:Math.max(Q.x2,U.x2),y2:Math.max(Q.y2,U.y2)}),eK=({x:Q,y:U,width:Z,height:K})=>({x:Q,y:U,x2:Q+Z,y2:U+K}),Sq=({x:Q,y:U,x2:Z,y2:K})=>({x:Q,y:U,width:Z-Q,height:K-U}),t7=(Q,U=[0,0])=>{let{x:Z,y:K}=qX(Q)?Q.internals.positionAbsolute:AJ(Q,U);return{x:Z,y:K,width:Q.measured?.width??Q.width??Q.initialWidth??0,height:Q.measured?.height??Q.height??Q.initialHeight??0}},fq=(Q,U=[0,0])=>{let{x:Z,y:K}=qX(Q)?Q.internals.positionAbsolute:AJ(Q,U);return{x:Z,y:K,x2:Z+(Q.measured?.width??Q.width??Q.initialWidth??0),y2:K+(Q.measured?.height??Q.height??Q.initialHeight??0)}},ZX=(Q,U)=>Sq(Cq(eK(Q),eK(U))),MM=(Q,U,Z,K,X,W,z,B)=>{let O=Math.max(0,Math.min(Q+Z,X+z)-Math.max(Q,X)),T=Math.max(0,Math.min(U+K,W+B)-Math.max(U,W));return Math.ceil(O*T)},LJ=(Q,U)=>MM(Q.x,Q.y,Q.width,Q.height,U.x,U.y,U.width,U.height),FX=(Q)=>k5(Q.width)&&k5(Q.height)&&k5(Q.x)&&k5(Q.y),k5=(Q)=>!isNaN(Q)&&isFinite(Q),KX=(Q,U)=>(Z,K)=>{console.warn(`[${Q}]: ${K} Help: ${U}error#${Z}`)},o7=(Q,U=[1,1])=>{return{x:U[0]*Math.round(Q.x/U[0]),y:U[1]*Math.round(Q.y/U[1])}},n7=({x:Q,y:U},[Z,K,X],W=!1,z=[1,1])=>{let B={x:(Q-Z)/X,y:(U-K)/X};return W?o7(B,z):B},w8=({x:Q,y:U},[Z,K,X])=>{return{x:Q*X+Z,y:U*X+K}};function d7(Q,U){if(typeof Q==="number")return Math.floor((U-U/(1+Q))*0.5);if(typeof Q==="string"&&Q.endsWith("px")){let Z=parseFloat(Q);if(!Number.isNaN(Z))return Math.floor(Z)}if(typeof Q==="string"&&Q.endsWith("%")){let Z=parseFloat(Q);if(!Number.isNaN(Z))return Math.floor(U*Z*0.01)}return console.error(`The padding value "${Q}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function nN(Q,U,Z){if(typeof Q==="string"||typeof Q==="number"){let K=d7(Q,Z),X=d7(Q,U);return{top:K,right:X,bottom:K,left:X,x:X*2,y:K*2}}if(typeof Q==="object"){let K=d7(Q.top??Q.y??0,Z),X=d7(Q.bottom??Q.y??0,Z),W=d7(Q.left??Q.x??0,U),z=d7(Q.right??Q.x??0,U);return{top:K,right:z,bottom:X,left:W,x:W+z,y:K+X}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function eN(Q,U,Z,K,X,W){let{x:z,y:B}=w8(Q,[U,Z,K]),{x:O,y:T}=w8({x:Q.x+Q.width,y:Q.y+Q.height},[U,Z,K]),R=X-O,L=W-T;return{left:Math.floor(z),top:Math.floor(B),right:Math.floor(R),bottom:Math.floor(L)}}var MJ=(Q,U,Z,K,X,W)=>{let z=nN(W,U,Z),B=(U-z.x)/Q.width,O=(Z-z.y)/Q.height,T=Math.min(B,O),R=a7(T,K,X),L=Q.x+Q.width/2,M=Q.y+Q.height/2,f=U/2-L*R,I=Z/2-M*R,D=eN(Q,f,I,R,U,Z),V={left:Math.min(D.left-z.left,0),top:Math.min(D.top-z.top,0),right:Math.min(D.right-z.right,0),bottom:Math.min(D.bottom-z.bottom,0)};return{x:f-V.left+V.right,y:I-V.top+V.bottom,zoom:R}},e7=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function I8(Q){return Q!==void 0&&Q!==null&&Q!=="parent"}function y5(Q){return{width:Q.measured?.width??Q.width??Q.initialWidth??0,height:Q.measured?.height??Q.height??Q.initialHeight??0}}function XX(Q){return(Q.measured?.width??Q.width??Q.initialWidth)!==void 0&&(Q.measured?.height??Q.height??Q.initialHeight)!==void 0}function HX(Q,U={width:0,height:0},Z,K,X){let W={...Q},z=K.get(Z);if(z){let B=z.origin||X;W.x+=z.internals.positionAbsolute.x-(U.width??0)*B[0],W.y+=z.internals.positionAbsolute.y-(U.height??0)*B[1]}return W}function YX(Q,U){if(Q.size!==U.size)return!1;for(let Z of Q)if(!U.has(Z))return!1;return!0}function TM(){let Q,U;return{promise:new Promise((K,X)=>{Q=K,U=X}),resolve:Q,reject:U}}function RM(Q){return{...JX,...Q||{}}}function _C(Q){if(typeof document>"u")return!0;let U=document.querySelector(`.${Q}-flow__pane`);if(!U||!U.isConnected)return!0;let Z=getComputedStyle(U);if(Z.display==="none")return!0;if(Z.visibility==="hidden"||Z.visibility==="collapse")return!0;if(Z.opacity==="0")return!0;if(Z.width==="0"&&Z.height==="0")return!0;let K=U.getBoundingClientRect();if(K.width===0&&K.height===0)return!0;let X=document.querySelector(`.${Q}-flow__attribution`);if(!X||!X.isConnected)return!1;let W=getComputedStyle(X);if(W.display==="none")return!1;if(W.visibility==="hidden"||W.visibility==="collapse")return!1;if(W.opacity==="0")return!1;let z=X.getBoundingClientRect();if(z.width===0&&z.height===0)return!1;return!0}var JM=!1;function OM(Q){if(JM)return;JM=!0;let U=`${Q.charAt(0).toUpperCase()+Q.slice(1)} Flow`;setTimeout(()=>{if(!_C(Q))console.warn(`${U}: It seems like you are hiding the attribution. Please only do this when you are subscribed to ${U} Pro: https://${Q}flow.dev/remove-attr
|
|
241
|
-
%cYou can ignore this warning if you are subscribed.`,"font-style: italic;")},1000)}function WX(Q){return Q===null?null:Q?"valid":"invalid"}function BJ(Q,{snapGrid:U=[0,0],snapToGrid:Z=!1,transform:K,containerBounds:X}){let{x:W,y:z}=D5(Q),B=n7({x:W-(X?.left??0),y:z-(X?.top??0)},K),{x:O,y:T}=Z?o7(B,U):B;return{xSnapped:O,ySnapped:T,...B}}var jq=(Q)=>({width:Q.offsetWidth,height:Q.offsetHeight}),zX=(Q)=>Q?.getRootNode?.()||window?.document,JC=["INPUT","SELECT","TEXTAREA"];function BX(Q){let U=Q.composedPath?.()?.[0]||Q.target;if(U?.nodeType!==1)return!1;return JC.includes(U.nodeName)||U.hasAttribute("contenteditable")||!!U.closest(".nokey")}var AX=(Q)=>("clientX"in Q),D5=(Q,U)=>{let Z=AX(Q),K=Z?Q.clientX:Q.touches?.[0].clientX,X=Z?Q.clientY:Q.touches?.[0].clientY;return{x:K-(U?.left??0),y:X-(U?.top??0)}},$M=(Q,U,Z,K,X)=>{let W=U.querySelectorAll(`.${Q}`);if(!W||!W.length)return null;return Array.from(W).map((z)=>{let B=z.getBoundingClientRect();return{id:z.getAttribute("data-handleid"),type:Q,nodeId:X,position:z.getAttribute("data-handlepos"),x:(B.left-Z.left)/K,y:(B.top-Z.top)/K,...jq(z)}})};function Vq({sourceX:Q,sourceY:U,targetX:Z,targetY:K,sourceControlX:X,sourceControlY:W,targetControlX:z,targetControlY:B}){let O=Q*0.125+X*0.375+z*0.375+Z*0.125,T=U*0.125+W*0.375+B*0.375+K*0.125,R=Math.abs(O-Q),L=Math.abs(T-U);return[O,T,R,L]}function wq(Q,U){if(Q>=0)return 0.5*Q;return U*25*Math.sqrt(-Q)}function QM({pos:Q,x1:U,y1:Z,x2:K,y2:X,c:W}){switch(Q){case C1.Left:return[U-wq(U-K,W),Z];case C1.Right:return[U+wq(K-U,W),Z];case C1.Top:return[U,Z-wq(Z-X,W)];case C1.Bottom:return[U,Z+wq(X-Z,W)]}}function kq({sourceX:Q,sourceY:U,sourcePosition:Z=C1.Bottom,targetX:K,targetY:X,targetPosition:W=C1.Top,curvature:z=0.25}){let[B,O]=QM({pos:Z,x1:Q,y1:U,x2:K,y2:X,c:z}),[T,R]=QM({pos:W,x1:K,y1:X,x2:Q,y2:U,c:z}),[L,M,f,I]=Vq({sourceX:Q,sourceY:U,targetX:K,targetY:X,sourceControlX:B,sourceControlY:O,targetControlX:T,targetControlY:R});return[`M${Q},${U} C${B},${O} ${T},${R} ${K},${X}`,L,M,f,I]}function LX({sourceX:Q,sourceY:U,targetX:Z,targetY:K}){let X=Math.abs(Z-Q)/2,W=Z<Q?Z+X:Z-X,z=Math.abs(K-U)/2,B=K<U?K+z:K-z;return[W,B,X,z]}function wM({sourceNode:Q,targetNode:U,selected:Z=!1,zIndex:K=0,elevateOnSelect:X=!1,zIndexMode:W="basic"}){if(W==="manual")return K;let z=X&&Z?K+1000:K,B=Math.max(Q.parentId||X&&Q.selected?Q.internals.z:0,U.parentId||X&&U.selected?U.internals.z:0);return z+B}function IM({sourceNode:Q,targetNode:U,width:Z,height:K,transform:X}){let W=Cq(fq(Q),fq(U));if(W.x===W.x2)W.x2+=1;if(W.y===W.y2)W.y2+=1;let z={x:-X[0]/X[2],y:-X[1]/X[2],width:Z/X[2],height:K/X[2]};return LJ(z,Sq(W))>0}var $C=({source:Q,sourceHandle:U,target:Z,targetHandle:K})=>`xy-edge__${Q}${U||""}-${Z}${K||""}`,QC=(Q,U)=>{return U.some((Z)=>Z.source===Q.source&&Z.target===Q.target&&(Z.sourceHandle===Q.sourceHandle||!Z.sourceHandle&&!Q.sourceHandle)&&(Z.targetHandle===Q.targetHandle||!Z.targetHandle&&!Q.targetHandle))},fM=(Q,U,Z={})=>{if(!Q.source||!Q.target)return Z.onError?.("006",x2.error006()),U;let K=Z.getEdgeId||$C,X;if(QX(Q))X={...Q};else X={...Q,id:K(Q)};if(QC(X,U))return U;if(X.sourceHandle===null)delete X.sourceHandle;if(X.targetHandle===null)delete X.targetHandle;return U.concat(X)};function Dq({sourceX:Q,sourceY:U,targetX:Z,targetY:K}){let[X,W,z,B]=LX({sourceX:Q,sourceY:U,targetX:Z,targetY:K});return[`M ${Q},${U}L ${Z},${K}`,X,W,z,B]}var qM={[C1.Left]:{x:-1,y:0},[C1.Right]:{x:1,y:0},[C1.Top]:{x:0,y:-1},[C1.Bottom]:{x:0,y:1}},qC=({source:Q,sourcePosition:U=C1.Bottom,target:Z})=>{if(U===C1.Left||U===C1.Right)return Q.x<Z.x?{x:1,y:0}:{x:-1,y:0};return Q.y<Z.y?{x:0,y:1}:{x:0,y:-1}},UM=(Q,U)=>Math.sqrt(Math.pow(U.x-Q.x,2)+Math.pow(U.y-Q.y,2));function UC({source:Q,sourcePosition:U=C1.Bottom,target:Z,targetPosition:K=C1.Top,center:X,offset:W,stepPosition:z}){let B=qM[U],O=qM[K],T={x:Q.x+B.x*W,y:Q.y+B.y*W},R={x:Z.x+O.x*W,y:Z.y+O.y*W},L=qC({source:T,sourcePosition:U,target:R}),M=L.x!==0?"x":"y",f=L[M],I=[],D,V,k={x:0,y:0},h={x:0,y:0},[,,P,C]=LX({sourceX:Q.x,sourceY:Q.y,targetX:Z.x,targetY:Z.y});if(B[M]*O[M]===-1){if(M==="x")D=X.x??T.x+(R.x-T.x)*z,V=X.y??(T.y+R.y)/2;else D=X.x??(T.x+R.x)/2,V=X.y??T.y+(R.y-T.y)*z;let p=[{x:D,y:T.y},{x:D,y:R.y}],a=[{x:T.x,y:V},{x:R.x,y:V}];if(B[M]===f)I=M==="x"?p:a;else I=M==="x"?a:p}else{let p=[{x:T.x,y:R.y}],a=[{x:R.x,y:T.y}];if(M==="x")I=B.x===f?a:p;else I=B.y===f?p:a;if(U===K){let y=Math.abs(Q[M]-Z[M]);if(y<=W){let u=Math.min(W-1,W-y);if(B[M]===f)k[M]=(T[M]>Q[M]?-1:1)*u;else h[M]=(R[M]>Z[M]?-1:1)*u}}if(U!==K){let y=M==="x"?"y":"x",u=B[M]===O[y],x=T[y]>R[y],d=T[y]<R[y];if(B[M]===1&&(!u&&x||u&&d)||B[M]!==1&&(!u&&d||u&&x))I=M==="x"?p:a}let m={x:T.x+k.x,y:T.y+k.y},_1={x:R.x+h.x,y:R.y+h.y},$1=Math.max(Math.abs(m.x-I[0].x),Math.abs(_1.x-I[0].x)),J1=Math.max(Math.abs(m.y-I[0].y),Math.abs(_1.y-I[0].y));if($1>=J1)D=(m.x+_1.x)/2,V=I[0].y;else D=I[0].x,V=(m.y+_1.y)/2}let v={x:T.x+k.x,y:T.y+k.y},b={x:R.x+h.x,y:R.y+h.y};return[[Q,...v.x!==I[0].x||v.y!==I[0].y?[v]:[],...I,...b.x!==I[I.length-1].x||b.y!==I[I.length-1].y?[b]:[],Z],D,V,P,C]}function GC(Q,U,Z,K){let X=Math.min(UM(Q,U)/2,UM(U,Z)/2,K),{x:W,y:z}=U;if(Q.x===W&&W===Z.x||Q.y===z&&z===Z.y)return`L${W} ${z}`;if(Q.y===z){let T=Q.x<Z.x?-1:1,R=Q.y<Z.y?1:-1;return`L ${W+X*T},${z}Q ${W},${z} ${W},${z+X*R}`}let B=Q.x<Z.x?1:-1,O=Q.y<Z.y?-1:1;return`L ${W},${z+X*O}Q ${W},${z} ${W+X*B},${z}`}function TJ({sourceX:Q,sourceY:U,sourcePosition:Z=C1.Bottom,targetX:K,targetY:X,targetPosition:W=C1.Top,borderRadius:z=5,centerX:B,centerY:O,offset:T=20,stepPosition:R=0.5}){let[L,M,f,I,D]=UC({source:{x:Q,y:U},sourcePosition:Z,target:{x:K,y:X},targetPosition:W,center:{x:B,y:O},offset:T,stepPosition:R}),V=`M${L[0].x} ${L[0].y}`;for(let k=1;k<L.length-1;k++)V+=GC(L[k-1],L[k],L[k+1],z);return V+=`L${L[L.length-1].x} ${L[L.length-1].y}`,[V,M,f,I,D]}function GM(Q){return Q&&!!(Q.internals.handleBounds||Q.handles?.length)&&!!(Q.measured.width||Q.width||Q.initialWidth)}function PM(Q){let{sourceNode:U,targetNode:Z}=Q;if(!GM(U)||!GM(Z))return null;let K=U.internals.handleBounds||ZM(U.handles),X=Z.internals.handleBounds||ZM(Z.handles),W=FM(K?.source??[],Q.sourceHandle),z=FM(Q.connectionMode===A6.Strict?X?.target??[]:(X?.target??[]).concat(X?.source??[]),Q.targetHandle);if(!W||!z)return Q.onError?.("008",x2.error008(!W?"source":"target",{id:Q.id,sourceHandle:Q.sourceHandle,targetHandle:Q.targetHandle})),null;let B=W?.position||C1.Bottom,O=z?.position||C1.Top,T=L6(U,W,B),R=L6(Z,z,O);return{sourceX:T.x,sourceY:T.y,targetX:R.x,targetY:R.y,sourcePosition:B,targetPosition:O}}function ZM(Q){if(!Q)return null;let U=[],Z=[];for(let K of Q)if(K.width=K.width??1,K.height=K.height??1,K.type==="source")U.push(K);else if(K.type==="target")Z.push(K);return{source:U,target:Z}}function L6(Q,U,Z=C1.Left,K=!1){let X=(U?.x??0)+Q.internals.positionAbsolute.x,W=(U?.y??0)+Q.internals.positionAbsolute.y,{width:z,height:B}=U??y5(Q);if(K)return{x:X+z/2,y:W+B/2};switch(U?.position??Z){case C1.Top:return{x:X+z/2,y:W};case C1.Right:return{x:X+z,y:W+B/2};case C1.Bottom:return{x:X+z/2,y:W+B};case C1.Left:return{x:X,y:W+B/2}}}function FM(Q,U){if(!Q)return null;return(!U?Q[0]:Q.find((Z)=>Z.id===U))||null}function yq(Q,U){if(!Q)return"";if(typeof Q==="string")return Q;return`${U?`${U}__`:""}${Object.keys(Q).sort().map((K)=>`${K}=${Q[K]}`).join("&")}`}function NM(Q,{id:U,defaultColor:Z,defaultMarkerStart:K,defaultMarkerEnd:X}){let W=new Set;return Q.reduce((z,B)=>{return[B.markerStart||K,B.markerEnd||X].forEach((O)=>{if(O&&typeof O==="object"){let T=yq(O,U);if(!W.has(T))z.push({id:T,color:O.color||Z,...O}),W.add(T)}}),z},[]).sort((z,B)=>z.id.localeCompare(B.id))}function CM(Q,U,Z,K,X){let W=0.5;if(X==="start")W=0;else if(X==="end")W=1;let z=[(Q.x+Q.width*W)*U.zoom+U.x,Q.y*U.zoom+U.y-K],B=[-100*W,-100];switch(Z){case C1.Right:z=[(Q.x+Q.width)*U.zoom+U.x+K,(Q.y+Q.height*W)*U.zoom+U.y],B=[0,-100*W];break;case C1.Bottom:z[1]=(Q.y+Q.height)*U.zoom+U.y+K,B[1]=0;break;case C1.Left:z=[Q.x*U.zoom+U.x-K,(Q.y+Q.height*W)*U.zoom+U.y],B=[-100,-100*W];break}return`translate(${z[0]}px, ${z[1]}px) translate(${B[0]}%, ${B[1]}%)`}var SM=1000,ZC=10,MX={nodeOrigin:[0,0],nodeExtent:s7,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},FC={...MX,checkEquality:!0};function TX(Q,U){let Z={...Q};for(let K in U)if(U[K]!==void 0)Z[K]=U[K];return Z}function jM(Q,U,Z){let K=TX(MX,Z);for(let X of Q.values())if(X.parentId)OX(X,Q,U,K);else{let W=AJ(X,K.nodeOrigin),z=I8(X.extent)?X.extent:K.nodeExtent,B=O8(W,z,y5(X));X.internals.positionAbsolute=B}}function KC(Q,U){if(!Q.handles)return!Q.measured?void 0:U?.internals.handleBounds;let Z=[],K=[];for(let X of Q.handles){let W={id:X.id,width:X.width??1,height:X.height??1,nodeId:Q.id,x:X.x,y:X.y,position:X.position,type:X.type};if(X.type==="source")Z.push(W);else if(X.type==="target")K.push(W)}return{source:Z,target:K}}function RX(Q){return Q==="manual"}function vq(Q,U,Z,K={}){let X=TX(FC,K),W={i:0},z=new Map(U),B=X?.elevateNodesOnSelect&&!RX(X.zIndexMode)?SM:0,O=Q.length>0,T=!1;U.clear(),Z.clear();for(let R of Q){let L=z.get(R.id);if(X.checkEquality&&R===L?.internals.userNode)U.set(R.id,L);else{let M=AJ(R,X.nodeOrigin),f=I8(R.extent)?R.extent:X.nodeExtent,I=O8(M,f,y5(R));L={...X.defaults,...R,measured:{width:R.measured?.width,height:R.measured?.height},internals:{positionAbsolute:I,handleBounds:KC(R,L),z:VM(R,B,X.zIndexMode),userNode:R}},U.set(R.id,L)}if((L.measured===void 0||L.measured.width===void 0||L.measured.height===void 0)&&!L.hidden)O=!1;if(R.parentId)OX(L,U,Z,K,W);T||=R.selected??!1}return{nodesInitialized:O,hasSelectedNodes:T}}function XC(Q,U){if(!Q.parentId)return;let Z=U.get(Q.parentId);if(Z)Z.set(Q.id,Q);else U.set(Q.parentId,new Map([[Q.id,Q]]))}function OX(Q,U,Z,K,X){let{elevateNodesOnSelect:W,nodeOrigin:z,nodeExtent:B,zIndexMode:O}=TX(MX,K),T=Q.parentId,R=U.get(T);if(!R){console.warn(`Parent node ${T} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}if(XC(Q,Z),X&&!R.parentId&&R.internals.rootParentIndex===void 0&&O==="auto")R.internals.rootParentIndex=++X.i,R.internals.z=R.internals.z+X.i*ZC;if(X&&R.internals.rootParentIndex!==void 0)X.i=R.internals.rootParentIndex;let L=W&&!RX(O)?SM:0,{x:M,y:f,z:I}=HC(Q,R,z,B,L,O),{positionAbsolute:D}=Q.internals,V=M!==D.x||f!==D.y;if(V||I!==Q.internals.z)U.set(Q.id,{...Q,internals:{...Q.internals,positionAbsolute:V?{x:M,y:f}:D,z:I}})}function VM(Q,U,Z){let K=k5(Q.zIndex)?Q.zIndex:0;if(RX(Z))return K;return K+(Q.selected?U:0)}function HC(Q,U,Z,K,X,W){let{x:z,y:B}=U.internals.positionAbsolute,O=y5(Q),T=AJ(Q,Z),R=I8(Q.extent)?O8(T,Q.extent,O):T,L=O8({x:z+R.x,y:B+R.y},K,O);if(Q.extent==="parent")L=LM(L,O,U);let M=VM(Q,X,W),f=U.internals.z??0;return{x:L.x,y:L.y,z:f>=M?f+1:M}}function Eq(Q,U,Z,K=[0,0]){let X=[],W=new Map;for(let z of Q){let B=U.get(z.parentId);if(!B)continue;let O=W.get(z.parentId)?.expandedRect??t7(B),T=ZX(O,z.rect);W.set(z.parentId,{expandedRect:T,parent:B})}if(W.size>0)W.forEach(({expandedRect:z,parent:B},O)=>{let T=B.internals.positionAbsolute,R=y5(B),L=B.origin??K,M=z.x<T.x?Math.round(Math.abs(T.x-z.x)):0,f=z.y<T.y?Math.round(Math.abs(T.y-z.y)):0,I=Math.max(R.width,Math.round(z.width)),D=Math.max(R.height,Math.round(z.height)),V=(I-R.width)*L[0],k=(D-R.height)*L[1];if(M>0||f>0||V||k)X.push({id:O,type:"position",position:{x:B.position.x-M+V,y:B.position.y-f+k}}),Z.get(O)?.forEach((h)=>{if(!Q.some((P)=>P.id===h.id))X.push({id:h.id,type:"position",position:{x:h.position.x+M,y:h.position.y+f}})});if(R.width<z.width||R.height<z.height||M||f)X.push({id:O,type:"dimensions",setAttributes:!0,dimensions:{width:I+(M?L[0]*M-V:0),height:D+(f?L[1]*f-k:0)}})});return X}function kM(Q,U,Z,K,X,W,z){let B=K?.querySelector(".xyflow__viewport"),O=!1;if(!B)return{changes:[],updatedInternals:O};let T=[],R=window.getComputedStyle(B),{m22:L}=new window.DOMMatrixReadOnly(R.transform),M=[];for(let f of Q.values()){let I=U.get(f.id);if(!I)continue;if(I.hidden){U.set(I.id,{...I,internals:{...I.internals,handleBounds:void 0}}),O=!0;continue}let D=jq(f.nodeElement),V=I.measured.width!==D.width||I.measured.height!==D.height;if(!!(D.width&&D.height&&(V||!I.internals.handleBounds||f.force))){let h=f.nodeElement.getBoundingClientRect(),P=I8(I.extent)?I.extent:W,{positionAbsolute:C}=I.internals;if(I.parentId&&I.extent==="parent"){let b=U.get(I.parentId);if(b)C=LM(C,D,b)}else if(P)C=O8(C,P,D);let v={...I,measured:D,internals:{...I.internals,positionAbsolute:C,handleBounds:{source:$M("source",f.nodeElement,h,L,I.id),target:$M("target",f.nodeElement,h,L,I.id)}}};if(U.set(I.id,v),I.parentId)OX(v,U,Z,{nodeOrigin:X,zIndexMode:z});if(O=!0,V){if(T.push({id:I.id,type:"dimensions",dimensions:D}),I.expandParent&&I.parentId)M.push({id:I.id,parentId:I.parentId,rect:t7(v,X)})}}}if(M.length>0){let f=Eq(M,U,Z,X);T.push(...f)}return{changes:T,updatedInternals:O}}async function DM({delta:Q,panZoom:U,transform:Z,translateExtent:K,width:X,height:W}){if(!U||!Q.x&&!Q.y)return!1;let z=await U.setViewportConstrained({x:Z[0]+Q.x,y:Z[1]+Q.y,zoom:Z[2]},[[0,0],[X,W]],K);return!!z&&(z.x!==Z[0]||z.y!==Z[1]||z.k!==Z[2])}function KM(Q,U,Z,K,X,W){let z=X,B=K.get(z)||new Map;K.set(z,B.set(Z,U)),z=`${X}-${Q}`;let O=K.get(z)||new Map;if(K.set(z,O.set(Z,U)),W){z=`${X}-${Q}-${W}`;let T=K.get(z)||new Map;K.set(z,T.set(Z,U))}}function wX(Q,U,Z){Q.clear(),U.clear();for(let K of Z){let{source:X,target:W,sourceHandle:z=null,targetHandle:B=null}=K,O={edgeId:K.id,source:X,target:W,sourceHandle:z,targetHandle:B},T=`${X}-${z}--${W}-${B}`,R=`${W}-${B}--${X}-${z}`;KM("source",O,R,Q,X,z),KM("target",O,T,Q,W,B),U.set(K.id,K)}}function yM(Q,U){if(!Q.parentId)return!1;let Z=U.get(Q.parentId);if(!Z)return!1;if(Z.selected)return!0;return yM(Z,U)}function XM(Q,U,Z){let K=Q;do{if(K?.matches?.(U))return!0;if(K===Z)return!1;K=K?.parentElement}while(K);return!1}function YC(Q,U,Z,K){let X=new Map;for(let[W,z]of Q)if((z.selected||z.id===K)&&(!z.parentId||!yM(z,Q))&&(z.draggable||U&&typeof z.draggable>"u")){let B=Q.get(W);if(B)X.set(W,{id:W,position:B.position||{x:0,y:0},distance:{x:Z.x-B.internals.positionAbsolute.x,y:Z.y-B.internals.positionAbsolute.y},extent:B.extent,parentId:B.parentId,origin:B.origin,expandParent:B.expandParent,internals:{positionAbsolute:B.internals.positionAbsolute||{x:0,y:0}},measured:{width:B.measured.width??0,height:B.measured.height??0}})}return X}function tK({nodeId:Q,dragItems:U,nodeLookup:Z,dragging:K=!0}){let X=[];for(let[z,B]of U){let O=Z.get(z)?.internals.userNode;if(O)X.push({...O,position:B.position,dragging:K})}if(!Q)return[X[0],X];let W=Z.get(Q)?.internals.userNode;return[!W?X[0]:{...W,position:U.get(Q)?.position||W.position,dragging:K},X]}function WC({dragItems:Q,snapGrid:U,x:Z,y:K}){let X=Q.values().next().value;if(!X)return null;let W={x:Z-X.distance.x,y:K-X.distance.y},z=o7(W,U);return{x:z.x-W.x,y:z.y-W.y}}function vM({onNodeMouseDown:Q,getStoreItems:U,onDragStart:Z,onDrag:K,onDragStop:X}){let W={x:null,y:null},z=0,B=new Map,O=!1,T={x:0,y:0},R=null,L=!1,M=null,f=!1,I=!1,D=null;function V({noDragClassName:h,handleSelector:P,domNode:C,isSelectable:v,nodeId:b,nodeClickDistance:E=0}){M=n0(C);function p({x:$1,y:J1}){let{nodeLookup:y,nodeExtent:u,snapGrid:x,snapToGrid:d,nodeOrigin:g,onNodeDrag:n,onSelectionDrag:j,onError:i,updateNodePositions:q1}=U();W={x:$1,y:J1};let Q1=!1,Y1=B.size>1,L1=Y1&&u?eK(f8(B)):null,M1=Y1&&d?WC({dragItems:B,snapGrid:x,x:$1,y:J1}):null;for(let[I1,X1]of B){if(!y.has(I1))continue;let f1={x:$1-X1.distance.x,y:J1-X1.distance.y};if(d)f1=M1?{x:Math.round(f1.x+M1.x),y:Math.round(f1.y+M1.y)}:o7(f1,x);let l1=null;if(Y1&&u&&!X1.extent&&L1){let{positionAbsolute:v1}=X1.internals,c1=v1.x-L1.x+u[0][0],E1=v1.x+X1.measured.width-L1.x2+u[1][0],j1=v1.y-L1.y+u[0][1],V0=v1.y+X1.measured.height-L1.y2+u[1][1];l1=[[c1,j1],[E1,V0]]}let{position:W1,positionAbsolute:S1}=GX({nodeId:I1,nextPosition:f1,nodeLookup:y,nodeExtent:l1?l1:u,nodeOrigin:g,onError:i});Q1=Q1||X1.position.x!==W1.x||X1.position.y!==W1.y,X1.position=W1,X1.internals.positionAbsolute=S1}if(I=I||Q1,!Q1)return;if(q1(B,!0),D&&(K||n||!b&&j)){let[I1,X1]=tK({nodeId:b,dragItems:B,nodeLookup:y});if(K?.(D,B,I1,X1),n?.(D,I1,X1),!b)j?.(D,X1)}}async function a(){if(!R)return;let{transform:$1,panBy:J1,autoPanSpeed:y,autoPanOnNodeDrag:u}=U();if(!u){O=!1,cancelAnimationFrame(z);return}let[x,d]=Nq(T,R,y);if(x!==0||d!==0){if(W.x=(W.x??0)-x/$1[2],W.y=(W.y??0)-d/$1[2],await J1({x,y:d}))p(W)}z=requestAnimationFrame(a)}function m($1){let{nodeLookup:J1,multiSelectionActive:y,nodesDraggable:u,transform:x,snapGrid:d,snapToGrid:g,selectNodesOnDrag:n,onNodeDragStart:j,onSelectionDragStart:i,unselectNodesAndEdges:q1}=U();if(L=!0,(!n||!v)&&!y&&b){if(!J1.get(b)?.selected)q1()}if(v&&n&&b)Q?.(b);let Q1=BJ($1.sourceEvent,{transform:x,snapGrid:d,snapToGrid:g,containerBounds:R});if(W=Q1,B=YC(J1,u,Q1,b),B.size>0&&(Z||j||!b&&i)){let[Y1,L1]=tK({nodeId:b,dragItems:B,nodeLookup:J1});if(Z?.($1.sourceEvent,B,Y1,L1),j?.($1.sourceEvent,Y1,L1),!b)i?.($1.sourceEvent,L1)}}let _1=t_().clickDistance(E).on("start",($1)=>{let{domNode:J1,nodeDragThreshold:y,transform:u,snapGrid:x,snapToGrid:d}=U();if(R=J1?.getBoundingClientRect()||null,f=!1,I=!1,D=$1.sourceEvent,y===0)m($1);W=BJ($1.sourceEvent,{transform:u,snapGrid:x,snapToGrid:d,containerBounds:R}),T=D5($1.sourceEvent,R)}).on("drag",($1)=>{let{autoPanOnNodeDrag:J1,transform:y,snapGrid:u,snapToGrid:x,nodeDragThreshold:d,nodeLookup:g}=U(),n=BJ($1.sourceEvent,{transform:y,snapGrid:u,snapToGrid:x,containerBounds:R});if(D=$1.sourceEvent,$1.sourceEvent.type==="touchmove"&&$1.sourceEvent.touches.length>1||b&&!g.has(b))f=!0;if(f)return;if(!O&&J1&&L)O=!0,a();if(!L){let j=D5($1.sourceEvent,R),i=j.x-T.x,q1=j.y-T.y;if(Math.sqrt(i*i+q1*q1)>d)m($1)}if((W.x!==n.xSnapped||W.y!==n.ySnapped)&&B&&L)T=D5($1.sourceEvent,R),p(n)}).on("end",($1)=>{if(!L||f){if(f&&B.size>0)U().updateNodePositions(B,!1);return}if(O=!1,L=!1,cancelAnimationFrame(z),B.size>0){let{nodeLookup:J1,updateNodePositions:y,onNodeDragStop:u,onSelectionDragStop:x}=U();if(I)y(B,!1),I=!1;if(X||u||!b&&x){let[d,g]=tK({nodeId:b,dragItems:B,nodeLookup:J1,dragging:!1});if(X?.($1.sourceEvent,B,d,g),u?.($1.sourceEvent,d,g),!b)x?.($1.sourceEvent,g)}}}).filter(($1)=>{let J1=$1.target;return!$1.button&&(!h||!XM(J1,`.${h}`,C))&&(!P||XM(J1,P,C))});M.call(_1)}function k(){M?.on(".drag",null)}return{update:V,destroy:k}}function zC(Q,U,Z){let K=[],X={x:Q.x-Z,y:Q.y-Z,width:Z*2,height:Z*2};for(let W of U.values())if(LJ(X,t7(W))>0)K.push(W);return K}var BC=250;function AC(Q,U,Z,K){let X=[],W=1/0,z=zC(Q,Z,U+BC);for(let B of z){let O=[...B.internals.handleBounds?.source??[],...B.internals.handleBounds?.target??[]];for(let T of O){if(K.nodeId===T.nodeId&&K.type===T.type&&K.id===T.id)continue;let{x:R,y:L}=L6(B,T,T.position,!0),M=Math.sqrt(Math.pow(R-Q.x,2)+Math.pow(L-Q.y,2));if(M>U)continue;if(M<W)X=[{...T,x:R,y:L}],W=M;else if(M===W)X.push({...T,x:R,y:L})}}if(!X.length)return null;if(X.length>1){let B=K.type==="source"?"target":"source";return X.find((O)=>O.type===B)??X[0]}return X[0]}function EM(Q,U,Z,K,X,W=!1){let z=K.get(Q);if(!z)return null;let B=X==="strict"?z.internals.handleBounds?.[U]:[...z.internals.handleBounds?.source??[],...z.internals.handleBounds?.target??[]],O=(Z?B?.find((T)=>T.id===Z):B?.[0])??null;return O&&W?{...O,...L6(z,O,O.position,!0)}:O}function bM(Q,U){if(Q)return Q;else if(U?.classList.contains("target"))return"target";else if(U?.classList.contains("source"))return"source";return null}function LC(Q,U){let Z=null;if(U)Z=!0;else if(Q&&!U)Z=!1;return Z}var uM=()=>!0;function MC(Q,{connectionMode:U,connectionRadius:Z,handleId:K,nodeId:X,edgeUpdaterType:W,isTarget:z,domNode:B,nodeLookup:O,lib:T,autoPanOnConnect:R,flowId:L,panBy:M,cancelConnection:f,onConnectStart:I,onConnect:D,onConnectEnd:V,isValidConnection:k=uM,onReconnectEnd:h,updateConnection:P,getTransform:C,getFromHandle:v,autoPanSpeed:b,dragThreshold:E=1,handleDomNode:p}){let a=zX(Q.target),m=0,_1,{x:$1,y:J1}=D5(Q),y=bM(W,p),u=B?.getBoundingClientRect(),x=!1;if(!u||!y)return;let d=EM(X,y,K,O,U);if(!d)return;let g=D5(Q,u),n=!1,j=null,i=!1,q1=null;function Q1(){if(!R||!u)return;let[W1,S1]=Nq(g,u,b);M({x:W1,y:S1}),m=requestAnimationFrame(Q1)}let Y1={...d,nodeId:X,type:y,position:d.position},L1=O.get(X),I1={inProgress:!0,isValid:null,from:L6(L1,Y1,C1.Left,!0),fromHandle:Y1,fromPosition:Y1.position,fromNode:L1,to:g,toHandle:null,toPosition:eL[Y1.position],toNode:null,pointer:g};function X1(){x=!0,P(I1),I?.(Q,{nodeId:X,handleId:K,handleType:y})}if(E===0)X1();function f1(W1){if(!x){let{x:V0,y:b1}=D5(W1),Z2=V0-$1,_0=b1-J1;if(!(Z2*Z2+_0*_0>E*E))return;X1()}if(!v()||!Y1){l1(W1);return}let S1=C();if(g=D5(W1,u),_1=AC(n7(g,S1,!1,[1,1]),Z,O,Y1),!n)Q1(),n=!0;let v1=xM(W1,{handle:_1,connectionMode:U,fromNodeId:X,fromHandleId:K,fromType:z?"target":"source",isValidConnection:k,doc:a,lib:T,flowId:L,nodeLookup:O});q1=v1.handleDomNode,j=v1.connection,i=LC(!!_1,v1.isValid);let c1=O.get(X),E1=c1?L6(c1,Y1,C1.Left,!0):I1.from,j1={...I1,from:E1,isValid:i,to:v1.toHandle&&i?w8({x:v1.toHandle.x,y:v1.toHandle.y},S1):g,toHandle:v1.toHandle,toPosition:i&&v1.toHandle?v1.toHandle.position:eL[Y1.position],toNode:v1.toHandle?O.get(v1.toHandle.nodeId):null,pointer:g};P(j1),I1=j1}function l1(W1){if("touches"in W1&&W1.touches.length>0)return;if(x){if((_1||q1)&&j&&i)D?.(j);let{inProgress:S1,...v1}=I1,c1={...v1,toPosition:I1.toHandle?I1.toPosition:null};if(V?.(W1,c1),W)h?.(W1,c1)}f(),cancelAnimationFrame(m),n=!1,i=!1,j=null,q1=null,a.removeEventListener("mousemove",f1),a.removeEventListener("mouseup",l1),a.removeEventListener("touchmove",f1),a.removeEventListener("touchend",l1)}a.addEventListener("mousemove",f1),a.addEventListener("mouseup",l1),a.addEventListener("touchmove",f1),a.addEventListener("touchend",l1)}function xM(Q,{handle:U,connectionMode:Z,fromNodeId:K,fromHandleId:X,fromType:W,doc:z,lib:B,flowId:O,isValidConnection:T=uM,nodeLookup:R}){let L=W==="target",M=U?z.querySelector(`.${B}-flow__handle[data-id="${O}-${U?.nodeId}-${U?.id}-${U?.type}"]`):null,{x:f,y:I}=D5(Q),D=z.elementFromPoint(f,I),V=D?.classList.contains(`${B}-flow__handle`)?D:M,k={handleDomNode:V,isValid:!1,connection:null,toHandle:null};if(V){let h=bM(void 0,V),P=V.getAttribute("data-nodeid"),C=V.getAttribute("data-handleid"),v=V.classList.contains("connectable"),b=V.classList.contains("connectableend");if(!P||!h)return k;let E={source:L?P:K,sourceHandle:L?C:X,target:L?K:P,targetHandle:L?X:C};k.connection=E;let a=v&&b&&(Z===A6.Strict?L&&h==="source"||!L&&h==="target":P!==K||C!==X);k.isValid=a&&T(E),k.toHandle=EM(P,h,C,R,Z,!0)}return k}var bq={onPointerDown:MC,isValid:xM};function hM({domNode:Q,panZoom:U,getTransform:Z,getViewScale:K}){let X=n0(Q);function W({translateExtent:B,width:O,height:T,zoomStep:R=1,pannable:L=!0,zoomable:M=!0,inversePan:f=!1}){let I=(P)=>{if(P.sourceEvent.type!=="wheel"||!U)return;let C=Z(),v=P.sourceEvent.ctrlKey&&e7()?10:1,b=-P.sourceEvent.deltaY*(P.sourceEvent.deltaMode===1?0.05:P.sourceEvent.deltaMode?1:0.002)*R,E=C[2]*Math.pow(2,b*v);U.scaleTo(E)},D=[0,0],V=(P)=>{if(P.sourceEvent.type==="mousedown"||P.sourceEvent.type==="touchstart")D=[P.sourceEvent.clientX??P.sourceEvent.touches[0].clientX,P.sourceEvent.clientY??P.sourceEvent.touches[0].clientY]},k=(P)=>{let C=Z();if(P.sourceEvent.type!=="mousemove"&&P.sourceEvent.type!=="touchmove"||!U)return;let v=[P.sourceEvent.clientX??P.sourceEvent.touches[0].clientX,P.sourceEvent.clientY??P.sourceEvent.touches[0].clientY],b=[v[0]-D[0],v[1]-D[1]];D=v;let E=K()*Math.max(C[2],Math.log(C[2]))*(f?-1:1),p={x:C[0]-b[0]*E,y:C[1]-b[1]*E},a=[[0,0],[O,T]];U.setViewportConstrained({x:p.x,y:p.y,zoom:C[2]},a,B)},h=zJ().on("start",V).on("zoom",L?k:null).on("zoom.wheel",M?I:null);X.call(h,{})}function z(){X.on("zoom",null)}return{update:W,destroy:z,pointer:O2}}var uq=(Q)=>({x:Q.x,y:Q.y,zoom:Q.k}),oK=({x:Q,y:U,zoom:Z})=>M8.translate(Q,U).scale(Z),B6=(Q,U)=>Q.target.closest(`.${U}`),mM=(Q,U)=>U===2&&Array.isArray(Q)&&Q.includes(2),TC=(Q)=>((Q*=2)<=1?Q*Q*Q:(Q-=2)*Q*Q+2)/2,nK=(Q,U=0,Z=TC,K=()=>{})=>{let X=typeof U==="number"&&U>0;if(!X)K();return X?Q.transition().duration(U).ease(Z).on("end",K):Q},gM=(Q)=>{let U=Q.ctrlKey&&e7()?10:1;return-Q.deltaY*(Q.deltaMode===1?0.05:Q.deltaMode?1:0.002)*U};function RC({zoomPanValues:Q,noWheelClassName:U,d3Selection:Z,d3Zoom:K,panOnScrollMode:X,panOnScrollSpeed:W,zoomOnPinch:z,onPanZoomStart:B,onPanZoom:O,onPanZoomEnd:T}){return(R)=>{if(B6(R,U)){if(R.ctrlKey)R.preventDefault();return!1}R.preventDefault(),R.stopImmediatePropagation();let L=Z.property("__zoom").k||1;if(R.ctrlKey&&z){let V=O2(R),k=gM(R),h=L*Math.pow(2,k);K.scaleTo(Z,h,V,R);return}let M=R.deltaMode===1?20:1,f=X===B3.Vertical?0:R.deltaX*M,I=X===B3.Horizontal?0:R.deltaY*M;if(!e7()&&R.shiftKey&&X!==B3.Vertical)f=R.deltaY*M,I=0;K.translateBy(Z,-(f/L)*W,-(I/L)*W,{internal:!0});let D=uq(Z.property("__zoom"));if(clearTimeout(Q.panScrollTimeout),!Q.isPanScrolling)Q.isPanScrolling=!0,B?.(R,D);else O?.(R,D);Q.panScrollTimeout=setTimeout(()=>{T?.(R,D),Q.isPanScrolling=!1},150)}}function OC({noWheelClassName:Q,preventScrolling:U,d3ZoomHandler:Z}){return function(K,X){let W=K.type==="wheel",z=!U&&W&&!K.ctrlKey,B=B6(K,Q);if(K.ctrlKey&&W&&B)K.preventDefault();if(z||B)return null;K.preventDefault(),Z.call(this,K,X)}}function wC({zoomPanValues:Q,onDraggingChange:U,onPanZoomStart:Z}){return(K)=>{if(K.sourceEvent?.internal)return;let X=uq(K.transform);if(Q.mouseButton=K.sourceEvent?.button||0,Q.isZoomingOrPanning=!0,Q.prevViewport=X,K.sourceEvent?.type==="mousedown")U(!0);if(Z)Z?.(K.sourceEvent,X)}}function IC({zoomPanValues:Q,panOnDrag:U,onPaneContextMenu:Z,onTransformChange:K,onPanZoom:X}){return(W)=>{if(Q.usedRightMouseButton=!!(Z&&mM(U,Q.mouseButton??0)),!W.sourceEvent?.sync)K([W.transform.x,W.transform.y,W.transform.k]);if(X&&!W.sourceEvent?.internal)X?.(W.sourceEvent,uq(W.transform))}}function fC({zoomPanValues:Q,panOnDrag:U,panOnScroll:Z,onDraggingChange:K,onPanZoomEnd:X,onPaneContextMenu:W}){return(z)=>{if(z.sourceEvent?.internal)return;if(Q.isZoomingOrPanning=!1,W&&mM(U,Q.mouseButton??0)&&!Q.usedRightMouseButton&&z.sourceEvent)W(z.sourceEvent);if(Q.usedRightMouseButton=!1,K(!1),X){let B=uq(z.transform);Q.prevViewport=B,clearTimeout(Q.timerId),Q.timerId=setTimeout(()=>{X?.(z.sourceEvent,B)},Z?150:0)}}}function PC({panActivationKeyPressed:Q,zoomActivationKeyPressed:U,zoomOnScroll:Z,zoomOnPinch:K,panOnDrag:X,panOnScroll:W,zoomOnDoubleClick:z,userSelectionActive:B,noWheelClassName:O,noPanClassName:T,lib:R,connectionInProgress:L}){return(M)=>{let f=U||Z,I=K&&M.ctrlKey,D=M.type==="wheel";if(M.button===1&&M.type==="mousedown"&&(B6(M,`${R}-flow__node`)||B6(M,`${R}-flow__edge`)||B6(M,`${R}-flow__selection`)||B6(M,`${R}-flow__nodesselection`)))return!0;if(!X&&!f&&!W&&!z&&!K)return!1;if(B)return!1;if(L&&!D)return!1;if(B6(M,O)&&D)return!1;if(B6(M,T)&&(!D||W&&D&&!U))return!1;if(!K&&M.ctrlKey&&D)return!1;if(!K&&M.type==="touchstart"&&M.touches?.length>1)return M.preventDefault(),!1;if(!f&&!W&&!I&&D)return!1;if(!X&&(M.type==="mousedown"||M.type==="touchstart"))return!1;if(Array.isArray(X)&&!X.includes(M.button)&&M.type==="mousedown")return!1;let V=Array.isArray(X)&&X.includes(M.button)||!M.button||M.button<=1;return(!M.ctrlKey||D||Q)&&V}}function pM({domNode:Q,minZoom:U,maxZoom:Z,translateExtent:K,viewport:X,onPanZoom:W,onPanZoomStart:z,onPanZoomEnd:B,onDraggingChange:O}){let T={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},R=Q.getBoundingClientRect(),L=[[0,0],[R.width,R.height]];(typeof ResizeObserver<"u"?new ResizeObserver((J1)=>{let y=J1[0];if(y)L=[[0,0],[y.contentRect.width,y.contentRect.height]]}):null)?.observe(Q);let f=zJ().extent(()=>L).scaleExtent([U,Z]).translateExtent(K),I=n0(Q).call(f);C({x:X.x,y:X.y,zoom:a7(X.zoom,U,Z)},[[0,0],[R.width,R.height]],K);let D=I.on("wheel.zoom"),V=I.on("dblclick.zoom");f.wheelDelta(gM);async function k(J1,y){if(I)return new Promise((u)=>{f?.interpolate(y?.interpolate==="linear"?D4:A8).transform(nK(I,y?.duration,y?.ease,()=>u(!0)),J1)});return!1}function h({noWheelClassName:J1,noPanClassName:y,onPaneContextMenu:u,userSelectionActive:x,panOnScroll:d,panOnDrag:g,panOnScrollMode:n,panOnScrollSpeed:j,preventScrolling:i,zoomOnPinch:q1,zoomOnScroll:Q1,zoomOnDoubleClick:Y1,panActivationKeyPressed:L1=!1,zoomActivationKeyPressed:M1,lib:I1,onTransformChange:X1,connectionInProgress:f1,paneClickDistance:l1,selectionOnDrag:W1}){if(x&&!T.isZoomingOrPanning)P();let S1=d&&!M1&&!x;f.clickDistance(W1?1/0:!k5(l1)||l1<0?0:l1);let v1=S1?RC({zoomPanValues:T,noWheelClassName:J1,d3Selection:I,d3Zoom:f,panOnScrollMode:n,panOnScrollSpeed:j,zoomOnPinch:q1,onPanZoomStart:z,onPanZoom:W,onPanZoomEnd:B}):OC({noWheelClassName:J1,preventScrolling:i,d3ZoomHandler:D});I.on("wheel.zoom",v1,{passive:!1});let c1=wC({zoomPanValues:T,onDraggingChange:O,onPanZoomStart:z});f.on("start",c1);let E1=IC({zoomPanValues:T,panOnDrag:g,onPaneContextMenu:!!u,onPanZoom:W,onTransformChange:X1});f.on("zoom",E1);let j1=fC({zoomPanValues:T,panOnDrag:g,panOnScroll:d,onPaneContextMenu:u,onPanZoomEnd:B,onDraggingChange:O});f.on("end",j1);let V0=PC({panActivationKeyPressed:L1,zoomActivationKeyPressed:M1,panOnDrag:g,zoomOnScroll:Q1,panOnScroll:d,zoomOnDoubleClick:Y1,zoomOnPinch:q1,userSelectionActive:x,noPanClassName:y,noWheelClassName:J1,lib:I1,connectionInProgress:f1});if(f.filter(V0),Y1)I.on("dblclick.zoom",V);else I.on("dblclick.zoom",null)}function P(){f.on("zoom",null)}async function C(J1,y,u){let x=oK(J1),d=f?.constrain()(x,y,u);if(d)await k(d);return d}async function v(J1,y){let u=oK(J1);return await k(u,y),u}function b(J1){if(I){let y=oK(J1),u=I.property("__zoom");if(u.k!==J1.zoom||u.x!==J1.x||u.y!==J1.y)f?.transform(I,y,null,{sync:!0})}}function E(){let J1=I?WJ(I.node()):{x:0,y:0,k:1};return{x:J1.x,y:J1.y,zoom:J1.k}}async function p(J1,y){if(I)return new Promise((u)=>{f?.interpolate(y?.interpolate==="linear"?D4:A8).scaleTo(nK(I,y?.duration,y?.ease,()=>u(!0)),J1)});return!1}async function a(J1,y){if(I)return new Promise((u)=>{f?.interpolate(y?.interpolate==="linear"?D4:A8).scaleBy(nK(I,y?.duration,y?.ease,()=>u(!0)),J1)});return!1}function m(J1){f?.scaleExtent(J1)}function _1(J1){f?.translateExtent(J1)}function $1(J1){let y=!k5(J1)||J1<0?0:J1;f?.clickDistance(y)}return{update:h,destroy:P,setViewport:v,setViewportConstrained:C,getViewport:E,scaleTo:p,scaleBy:a,setScaleExtent:m,setTranslateExtent:_1,syncViewport:b,setClickDistance:$1}}var M6;(function(Q){Q.Line="line",Q.Handle="handle"})(M6||(M6={}));function NC({width:Q,prevWidth:U,height:Z,prevHeight:K,affectsX:X,affectsY:W}){let z=Q-U,B=Z-K,O=[z>0?1:z<0?-1:0,B>0?1:B<0?-1:0];if(z&&X)O[0]=O[0]*-1;if(B&&W)O[1]=O[1]*-1;return O}function HM(Q){let U=Q.includes("right")||Q.includes("left"),Z=Q.includes("bottom")||Q.includes("top"),K=Q.includes("left"),X=Q.includes("top");return{isHorizontal:U,isVertical:Z,affectsX:K,affectsY:X}}function W6(Q,U){return Math.max(0,U-Q)}function z6(Q,U){return Math.max(0,Q-U)}function Iq(Q,U,Z){return Math.max(0,U-Q,Q-Z)}function YM(Q,U){return Q?!U:U}function CC(Q,U,Z,K,X,W,z,B){let{affectsX:O,affectsY:T}=U,{isHorizontal:R,isVertical:L}=U,M=R&&L,{xSnapped:f,ySnapped:I}=Z,{minWidth:D,maxWidth:V,minHeight:k,maxHeight:h}=K,{x:P,y:C,width:v,height:b,aspectRatio:E}=Q,p=Math.floor(R?f-Q.pointerX:0),a=Math.floor(L?I-Q.pointerY:0),m=v+(O?-p:p),_1=b+(T?-a:a),$1=-W[0]*v,J1=-W[1]*b,y=Iq(m,D,V),u=Iq(_1,k,h);if(z){let g=0,n=0;if(O&&p<0)g=W6(P+p+$1,z[0][0]);else if(!O&&p>0)g=z6(P+m+$1,z[1][0]);if(T&&a<0)n=W6(C+a+J1,z[0][1]);else if(!T&&a>0)n=z6(C+_1+J1,z[1][1]);y=Math.max(y,g),u=Math.max(u,n)}if(B){let g=0,n=0;if(O&&p>0)g=z6(P+p,B[0][0]);else if(!O&&p<0)g=W6(P+m,B[1][0]);if(T&&a>0)n=z6(C+a,B[0][1]);else if(!T&&a<0)n=W6(C+_1,B[1][1]);y=Math.max(y,g),u=Math.max(u,n)}if(X){if(R){let g=Iq(m/E,k,h)*E;if(y=Math.max(y,g),z){let n=0;if(!O&&!T||O&&!T&&M)n=z6(C+J1+m/E,z[1][1])*E;else n=W6(C+J1+(O?p:-p)/E,z[0][1])*E;y=Math.max(y,n)}if(B){let n=0;if(!O&&!T||O&&!T&&M)n=W6(C+m/E,B[1][1])*E;else n=z6(C+(O?p:-p)/E,B[0][1])*E;y=Math.max(y,n)}}if(L){let g=Iq(_1*E,D,V)/E;if(u=Math.max(u,g),z){let n=0;if(!O&&!T||T&&!O&&M)n=z6(P+_1*E+$1,z[1][0])/E;else n=W6(P+(T?a:-a)*E+$1,z[0][0])/E;u=Math.max(u,n)}if(B){let n=0;if(!O&&!T||T&&!O&&M)n=W6(P+_1*E,B[1][0])/E;else n=z6(P+(T?a:-a)*E,B[0][0])/E;u=Math.max(u,n)}}}if(a=a+(a<0?u:-u),p=p+(p<0?y:-y),X)if(M)if(m>_1*E)a=(YM(O,T)?-p:p)/E;else p=(YM(O,T)?-a:a)*E;else if(R)a=p/E,T=O;else p=a*E,O=T;let x=O?P+p:P,d=T?C+a:C;return{width:v+(O?-p:p),height:b+(T?-a:a),x:W[0]*p*(!O?1:-1)+x,y:W[1]*a*(!T?1:-1)+d}}var cM={width:0,height:0,x:0,y:0},SC={...cM,pointerX:0,pointerY:0,aspectRatio:1};function jC(Q,U,Z){let K=U.position.x+Q.position.x,X=U.position.y+Q.position.y,W=Q.measured.width??0,z=Q.measured.height??0,B=Z[0]*W,O=Z[1]*z;return[[K-B,X-O],[K+W-B,X+z-O]]}function lM({domNode:Q,nodeId:U,getStoreItems:Z,onChange:K,onEnd:X}){let W=n0(Q),z={controlDirection:HM("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function B({controlPosition:T,boundaries:R,keepAspectRatio:L,resizeDirection:M,onResizeStart:f,onResize:I,onResizeEnd:D,shouldResize:V}){let k={...cM},h={...SC};z={boundaries:R,resizeDirection:M,keepAspectRatio:L,controlDirection:HM(T)};let P=void 0,C=null,v=[],b=void 0,E=void 0,p=void 0,a=t_().on("start",(m)=>{let{nodeLookup:_1,transform:$1,snapGrid:J1,snapToGrid:y,nodeOrigin:u,paneDomNode:x}=Z();if(P=_1.get(U),!P)return;C=x?.getBoundingClientRect()??null;let{xSnapped:d,ySnapped:g}=BJ(m.sourceEvent,{transform:$1,snapGrid:J1,snapToGrid:y,containerBounds:C});if(k={width:P.measured.width??0,height:P.measured.height??0,x:P.position.x??0,y:P.position.y??0},h={...k,pointerX:d,pointerY:g,aspectRatio:k.width/k.height},b=void 0,E=I8(P.extent)?P.extent:void 0,P.parentId&&(P.extent==="parent"||P.expandParent))b=_1.get(P.parentId);if(b&&P.extent==="parent")E=[[0,0],[b.measured.width,b.measured.height]];v=[],p=void 0;for(let[n,j]of _1)if(j.parentId===U){if(v.push({id:n,position:{...j.position},extent:j.extent}),j.extent==="parent"||j.expandParent){let i=jC(j,P,j.origin??u);if(p)p=[[Math.min(i[0][0],p[0][0]),Math.min(i[0][1],p[0][1])],[Math.max(i[1][0],p[1][0]),Math.max(i[1][1],p[1][1])]];else p=i}}f?.(m,{...k})}).on("drag",(m)=>{let{transform:_1,snapGrid:$1,snapToGrid:J1,nodeOrigin:y}=Z(),u=BJ(m.sourceEvent,{transform:_1,snapGrid:$1,snapToGrid:J1,containerBounds:C}),x=[];if(!P)return;let{x:d,y:g,width:n,height:j}=k,i={},q1=P.origin??y,{width:Q1,height:Y1,x:L1,y:M1}=CC(h,z.controlDirection,u,z.boundaries,z.keepAspectRatio,q1,E,p),I1=Q1!==n,X1=Y1!==j,f1=L1!==d&&I1,l1=M1!==g&&X1;if(!f1&&!l1&&!I1&&!X1)return;let W1={prevValues:{...k},startX:h.x,startY:h.y,childNodes:v.map((E1)=>({...E1,position:{...E1.position}}))};if(f1||l1||q1[0]===1||q1[1]===1){if(i.x=f1?L1:k.x,i.y=l1?M1:k.y,k.x=i.x,k.y=i.y,v.length>0){let E1=L1-d,j1=M1-g;for(let V0 of v)V0.position={x:V0.position.x-E1+q1[0]*(Q1-n),y:V0.position.y-j1+q1[1]*(Y1-j)},x.push(V0)}}if(I1||X1)i.width=I1&&(!z.resizeDirection||z.resizeDirection==="horizontal")?Q1:k.width,i.height=X1&&(!z.resizeDirection||z.resizeDirection==="vertical")?Y1:k.height,k.width=i.width,k.height=i.height;if(b&&P.expandParent){let E1=q1[0]*(i.width??0);if(i.x&&i.x<E1)k.x=E1,h.x=h.x-(i.x-E1);let j1=q1[1]*(i.height??0);if(i.y&&i.y<j1)k.y=j1,h.y=h.y-(i.y-j1)}let S1=NC({width:k.width,prevWidth:n,height:k.height,prevHeight:j,affectsX:z.controlDirection.affectsX,affectsY:z.controlDirection.affectsY}),v1={...k,direction:S1};if(V?.(m,v1)===!1){k=W1.prevValues,h.x=W1.startX,h.y=W1.startY,v.forEach((E1,j1)=>{E1.position=W1.childNodes[j1].position});return}I?.(m,v1),K(i,x)}).on("end",(m)=>{D?.(m,{...k}),X?.({...k})});W.call(a)}function O(){W.on(".drag",null)}return{update:B,destroy:O}}var tM=u0(i5(),1),oM=u0(dM(),1);var iM=(Q)=>{let U,Z=new Set,K=(R,L)=>{let M=typeof R==="function"?R(U):R;if(!Object.is(M,U)){let f=U;U=(L!=null?L:typeof M!=="object"||M===null)?M:Object.assign({},U,M),Z.forEach((I)=>I(U,f))}},X=()=>U,O={setState:K,getState:X,getInitialState:()=>T,subscribe:(R)=>{return Z.add(R),()=>Z.delete(R)},destroy:()=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production")console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.");Z.clear()}},T=U=Q(K,X,O);return O},aM=(Q)=>Q?iM(Q):iM;var{useDebugValue:DC}=tM.default,{useSyncExternalStoreWithSelector:yC}=oM.default,vC=(Q)=>Q;function IX(Q,U=vC,Z){let K=yC(Q.subscribe,Q.getState,Q.getServerState||Q.getInitialState,U,Z);return DC(K),K}var sM=(Q,U)=>{let Z=aM(Q),K=(X,W=U)=>IX(Z,X,W);return Object.assign(K,Z),K},nM=(Q,U)=>Q?sM(Q,U):sM;function N0(Q,U){if(Object.is(Q,U))return!0;if(typeof Q!=="object"||Q===null||typeof U!=="object"||U===null)return!1;if(Q instanceof Map&&U instanceof Map){if(Q.size!==U.size)return!1;for(let[K,X]of Q)if(!Object.is(X,U.get(K)))return!1;return!0}if(Q instanceof Set&&U instanceof Set){if(Q.size!==U.size)return!1;for(let K of Q)if(!U.has(K))return!1;return!0}let Z=Object.keys(Q);if(Z.length!==Object.keys(U).length)return!1;for(let K of Z)if(!Object.prototype.hasOwnProperty.call(U,K)||!Object.is(Q[K],U[K]))return!1;return!0}var CT=u0(PX(),1),pq=K1.createContext(null),uC=pq.Provider,ST=x2.error001("react");function G0(Q,U){let Z=K1.useContext(pq);if(Z===null)throw Error(ST);return IX(Z,Q,U)}function C0(){let Q=K1.useContext(pq);if(Q===null)throw Error(ST);return K1.useMemo(()=>({getState:Q.getState,setState:Q.setState,subscribe:Q.subscribe}),[Q])}var JT={display:"none"},xC={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},jT="react-flow__node-desc",VT="react-flow__edge-desc",hC="react-flow__aria-live",mC=(Q)=>Q.ariaLiveMessage,gC=(Q)=>Q.ariaLabelConfig;function pC({rfId:Q}){let U=G0(mC);return F1.jsx("div",{id:`${hC}-${Q}`,"aria-live":"assertive","aria-atomic":"true",style:xC,children:U})}function cC({rfId:Q,disableKeyboardA11y:U}){let Z=G0(gC);return F1.jsxs(F1.Fragment,{children:[F1.jsx("div",{id:`${jT}-${Q}`,style:JT,children:U?Z["node.a11yDescription.default"]:Z["node.a11yDescription.keyboardDisabled"]}),F1.jsx("div",{id:`${VT}-${Q}`,style:JT,children:Z["edge.a11yDescription.default"]}),!U&&F1.jsx(pC,{rfId:Q})]})}var N8=K1.forwardRef(({position:Q="top-left",children:U,className:Z,style:K,...X},W)=>{let z=`${Q}`.split("-");return F1.jsx("div",{className:y0(["react-flow__panel",Z,...z]),style:K,ref:W,...X,children:U})});N8.displayName="Panel";var $T="https://reactflow.dev/attribution";function lC({proOptions:Q,position:U="bottom-right"}){if(K1.useEffect(()=>{OM("react")},[]),Q?.hideAttribution)return null;return F1.jsx(N8,{position:U,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${$T}`,children:F1.jsx("a",{href:$T,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var rC=(Q)=>{let U=[],Z=[];for(let[,K]of Q.nodeLookup)if(K.selected)U.push(K.internals.userNode);for(let[,K]of Q.edgeLookup)if(K.selected)Z.push(K);return{selectedNodes:U,selectedEdges:Z}},xq=(Q)=>Q.id;function dC(Q,U){return N0(Q.selectedNodes.map(xq),U.selectedNodes.map(xq))&&N0(Q.selectedEdges.map(xq),U.selectedEdges.map(xq))}function iC({onSelectionChange:Q}){let U=C0(),{selectedNodes:Z,selectedEdges:K}=G0(rC,dC);return K1.useEffect(()=>{let X={nodes:Z,edges:K};Q?.(X),U.getState().onSelectionChangeHandlers.forEach((W)=>W(X))},[Z,K,Q]),null}var aC=(Q)=>!!Q.onSelectionChangeHandlers;function sC({onSelectionChange:Q}){let U=G0(aC);if(Q||U)return F1.jsx(iC,{onSelectionChange:Q});return null}var kT=[0,0],tC={x:0,y:0,zoom:1},oC=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],QT=[...oC,"rfId"],nC=(Q)=>({setNodes:Q.setNodes,setEdges:Q.setEdges,setMinZoom:Q.setMinZoom,setMaxZoom:Q.setMaxZoom,setTranslateExtent:Q.setTranslateExtent,setNodeExtent:Q.setNodeExtent,reset:Q.reset,setDefaultNodesAndEdges:Q.setDefaultNodesAndEdges}),qT={translateExtent:s7,nodeOrigin:kT,minZoom:0.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function eC(Q){let{setNodes:U,setEdges:Z,setMinZoom:K,setMaxZoom:X,setTranslateExtent:W,setNodeExtent:z,reset:B,setDefaultNodesAndEdges:O}=G0(nC,N0),T=C0();K1.useEffect(()=>{return O(Q.defaultNodes,Q.defaultEdges),()=>{R.current=qT,B()}},[]);let R=K1.useRef(qT);return K1.useEffect(()=>{for(let L of QT){let M=Q[L],f=R.current[L];if(M===f)continue;if(typeof Q[L]>"u")continue;if(L==="nodes")U(M);else if(L==="edges")Z(M);else if(L==="minZoom")K(M);else if(L==="maxZoom")X(M);else if(L==="translateExtent")W(M);else if(L==="nodeExtent")z(M);else if(L==="ariaLabelConfig")T.setState({ariaLabelConfig:RM(M)});else if(L==="fitView")T.setState({fitViewQueued:M});else if(L==="fitViewOptions")T.setState({fitViewOptions:M});else T.setState({[L]:M})}R.current=Q},QT.map((L)=>Q[L])),null}function UT(){if(typeof window>"u"||!window.matchMedia)return null;return window.matchMedia("(prefers-color-scheme: dark)")}function _S(Q){let[U,Z]=K1.useState(Q==="system"?null:Q);return K1.useEffect(()=>{if(Q!=="system"){Z(Q);return}let K=UT(),X=()=>Z(K?.matches?"dark":"light");return X(),K?.addEventListener("change",X),()=>{K?.removeEventListener("change",X)}},[Q]),U!==null?U:UT()?.matches?"dark":"light"}var GT=typeof document<"u"?document:null;function RJ(Q=null,U={target:GT,actInsideInputWithModifier:!0}){let[Z,K]=K1.useState(!1),X=K1.useRef(!1),W=K1.useRef(new Set([])),[z,B]=K1.useMemo(()=>{if(Q!==null){let T=(Array.isArray(Q)?Q:[Q]).filter((L)=>typeof L==="string").map((L)=>L.replace(/\+/g,`
|
|
27
|
+
<%s key={someKey} {...props} />`,b,d,a,d),h[d+b]=!0)}if(d=null,g!==void 0&&(J(g),d=""+g),Z(y)&&(J(y.key),d=""+y.key),"key"in y){g={};for(var c in y)c!=="key"&&(g[c]=y[c])}else g=y;return d&&F(g,typeof f==="function"?f.displayName||f.name||"Unknown":f),Y(f,d,g,U(),t,o)}function K(f){X(f)?f._store&&(f._store.validated=1):typeof f==="object"&&f!==null&&f.$$typeof===S&&(f._payload.status==="fulfilled"?X(f._payload.value)&&f._payload.value._store&&(f._payload.value._store.validated=1):f._store&&(f._store.validated=1))}function X(f){return typeof f==="object"&&f!==null&&f.$$typeof===z}var z=Symbol.for("react.transitional.element"),W=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),A=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),v=Symbol.for("react.client.reference"),j=H2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,m=Object.prototype.hasOwnProperty,p=Array.isArray,k=console.createTask?console.createTask:function(){return null};H2={react_stack_bottom_frame:function(f){return f()}};var D,V={},E=H2.react_stack_bottom_frame.bind(H2,G)(),u=k(q(G)),h={};XZ.Fragment=O,XZ.jsxDEV=function(f,y,g,b){var t=1e4>j.recentlyCreatedOwnerStacks++;return H(f,y,g,b,t?Error("react-stack-top-frame"):E,t?k(q(f)):u)}})()});var i=h1(X0(),1);var l=h1(Z8(),1),r=h1(X0(),1);function C1(_){if(typeof _==="string"||typeof _==="number")return""+_;let Q="";if(Array.isArray(_)){for(let J=0,q;J<_.length;J++)if((q=C1(_[J]))!=="")Q+=(Q&&" ")+q}else for(let J in _)if(_[J])Q+=(Q&&" ")+J;return Q}var lQ={value:()=>{}};function K8(){for(var _=0,Q=arguments.length,J={},q;_<Q;++_){if(!(q=arguments[_]+"")||q in J||/[\s.]/.test(q))throw Error("illegal type: "+q);J[q]=[]}return new v5(J)}function v5(_){this._=_}function rQ(_,Q){return _.trim().split(/^|\s+/).map(function(J){var q="",U=J.indexOf(".");if(U>=0)q=J.slice(U+1),J=J.slice(0,U);if(J&&!Q.hasOwnProperty(J))throw Error("unknown type: "+J);return{type:J,name:q}})}v5.prototype=K8.prototype={constructor:v5,on:function(_,Q){var J=this._,q=rQ(_+"",J),U,G=-1,Z=q.length;if(arguments.length<2){while(++G<Z)if((U=(_=q[G]).type)&&(U=iQ(J[U],_.name)))return U;return}if(Q!=null&&typeof Q!=="function")throw Error("invalid callback: "+Q);while(++G<Z)if(U=(_=q[G]).type)J[U]=F8(J[U],_.name,Q);else if(Q==null)for(U in J)J[U]=F8(J[U],_.name,null);return this},copy:function(){var _={},Q=this._;for(var J in Q)_[J]=Q[J].slice();return new v5(_)},call:function(_,Q){if((U=arguments.length-2)>0)for(var J=Array(U),q=0,U,G;q<U;++q)J[q]=arguments[q+2];if(!this._.hasOwnProperty(_))throw Error("unknown type: "+_);for(G=this._[_],q=0,U=G.length;q<U;++q)G[q].value.apply(Q,J)},apply:function(_,Q,J){if(!this._.hasOwnProperty(_))throw Error("unknown type: "+_);for(var q=this._[_],U=0,G=q.length;U<G;++U)q[U].value.apply(Q,J)}};function iQ(_,Q){for(var J=0,q=_.length,U;J<q;++J)if((U=_[J]).name===Q)return U.value}function F8(_,Q,J){for(var q=0,U=_.length;q<U;++q)if(_[q].name===Q){_[q]=lQ,_=_.slice(0,q).concat(_.slice(q+1));break}if(J!=null)_.push({name:Q,value:J});return _}var a0=K8;function R2(_){return function(){return this.matches(_)}}function j5(_){return function(Q){return Q.matches(_)}}var V5="http://www.w3.org/1999/xhtml",u4={svg:"http://www.w3.org/2000/svg",xhtml:V5,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Y0(_){var Q=_+="",J=Q.indexOf(":");if(J>=0&&(Q=_.slice(0,J))!=="xmlns")_=_.slice(J+1);return u4.hasOwnProperty(Q)?{space:u4[Q],local:_}:_}function b4(_){let Q;while(Q=_.sourceEvent)_=Q;return _}function m1(_,Q){if(_=b4(_),Q===void 0)Q=_.currentTarget;if(Q){var J=Q.ownerSVGElement||Q;if(J.createSVGPoint){var q=J.createSVGPoint();return q.x=_.clientX,q.y=_.clientY,q=q.matrixTransform(Q.getScreenCTM().inverse()),[q.x,q.y]}if(Q.getBoundingClientRect){var U=Q.getBoundingClientRect();return[_.clientX-U.left-Q.clientLeft,_.clientY-U.top-Q.clientTop]}}return[_.pageX,_.pageY]}function dQ(){}function j0(_){return _==null?dQ:function(){return this.querySelector(_)}}function D4(_){if(typeof _!=="function")_=j0(_);for(var Q=this._groups,J=Q.length,q=Array(J),U=0;U<J;++U)for(var G=Q[U],Z=G.length,F=q[U]=Array(Z),L,Y,H=0;H<Z;++H)if((L=G[H])&&(Y=_.call(L,L.__data__,H,G))){if("__data__"in L)Y.__data__=L.__data__;F[H]=Y}return new S1(q,this._parents)}function h4(_){return _==null?[]:Array.isArray(_)?_:Array.from(_)}function aQ(){return[]}function O2(_){return _==null?aQ:function(){return this.querySelectorAll(_)}}function sQ(_){return function(){return h4(_.apply(this,arguments))}}function E4(_){if(typeof _==="function")_=sQ(_);else _=O2(_);for(var Q=this._groups,J=Q.length,q=[],U=[],G=0;G<J;++G)for(var Z=Q[G],F=Z.length,L,Y=0;Y<F;++Y)if(L=Z[Y])q.push(_.call(L,L.__data__,Y,Z)),U.push(L);return new S1(q,U)}var tQ=Array.prototype.find;function oQ(_){return function(){return tQ.call(this.children,_)}}function nQ(){return this.firstElementChild}function x4(_){return this.select(_==null?nQ:oQ(typeof _==="function"?_:j5(_)))}var eQ=Array.prototype.filter;function _J(){return Array.from(this.children)}function QJ(_){return function(){return eQ.call(this.children,_)}}function m4(_){return this.selectAll(_==null?_J:QJ(typeof _==="function"?_:j5(_)))}function g4(_){if(typeof _!=="function")_=R2(_);for(var Q=this._groups,J=Q.length,q=Array(J),U=0;U<J;++U)for(var G=Q[U],Z=G.length,F=q[U]=[],L,Y=0;Y<Z;++Y)if((L=G[Y])&&_.call(L,L.__data__,Y,G))F.push(L);return new S1(q,this._parents)}function g2(_){return Array(_.length)}function p4(){return new S1(this._enter||this._groups.map(g2),this._parents)}function p2(_,Q){this.ownerDocument=_.ownerDocument,this.namespaceURI=_.namespaceURI,this._next=null,this._parent=_,this.__data__=Q}p2.prototype={constructor:p2,appendChild:function(_){return this._parent.insertBefore(_,this._next)},insertBefore:function(_,Q){return this._parent.insertBefore(_,Q)},querySelector:function(_){return this._parent.querySelector(_)},querySelectorAll:function(_){return this._parent.querySelectorAll(_)}};function c4(_){return function(){return _}}function JJ(_,Q,J,q,U,G){var Z=0,F,L=Q.length,Y=G.length;for(;Z<Y;++Z)if(F=Q[Z])F.__data__=G[Z],q[Z]=F;else J[Z]=new p2(_,G[Z]);for(;Z<L;++Z)if(F=Q[Z])U[Z]=F}function $J(_,Q,J,q,U,G,Z){var F,L,Y=new Map,H=Q.length,K=G.length,X=Array(H),z;for(F=0;F<H;++F)if(L=Q[F])if(X[F]=z=Z.call(L,L.__data__,F,Q)+"",Y.has(z))U[F]=L;else Y.set(z,L);for(F=0;F<K;++F)if(z=Z.call(_,G[F],F,G)+"",L=Y.get(z))q[F]=L,L.__data__=G[F],Y.delete(z);else J[F]=new p2(_,G[F]);for(F=0;F<H;++F)if((L=Q[F])&&Y.get(X[F])===L)U[F]=L}function qJ(_){return _.__data__}function l4(_,Q){if(!arguments.length)return Array.from(this,qJ);var J=Q?$J:JJ,q=this._parents,U=this._groups;if(typeof _!=="function")_=c4(_);for(var G=U.length,Z=Array(G),F=Array(G),L=Array(G),Y=0;Y<G;++Y){var H=q[Y],K=U[Y],X=K.length,z=UJ(_.call(H,H&&H.__data__,Y,q)),W=z.length,O=F[Y]=Array(W),T=Z[Y]=Array(W),B=L[Y]=Array(X);J(H,K,O,T,B,z,Q);for(var w=0,A=0,R,I;w<W;++w)if(R=O[w]){if(w>=A)A=w+1;while(!(I=T[A])&&++A<W);R._next=I||null}}return Z=new S1(Z,q),Z._enter=F,Z._exit=L,Z}function UJ(_){return typeof _==="object"&&"length"in _?_:Array.from(_)}function r4(){return new S1(this._exit||this._groups.map(g2),this._parents)}function i4(_,Q,J){var q=this.enter(),U=this,G=this.exit();if(typeof _==="function"){if(q=_(q),q)q=q.selection()}else q=q.append(_+"");if(Q!=null){if(U=Q(U),U)U=U.selection()}if(J==null)G.remove();else J(G);return q&&U?q.merge(U).order():U}function d4(_){var Q=_.selection?_.selection():_;for(var J=this._groups,q=Q._groups,U=J.length,G=q.length,Z=Math.min(U,G),F=Array(U),L=0;L<Z;++L)for(var Y=J[L],H=q[L],K=Y.length,X=F[L]=Array(K),z,W=0;W<K;++W)if(z=Y[W]||H[W])X[W]=z;for(;L<U;++L)F[L]=J[L];return new S1(F,this._parents)}function a4(){for(var _=this._groups,Q=-1,J=_.length;++Q<J;)for(var q=_[Q],U=q.length-1,G=q[U],Z;--U>=0;)if(Z=q[U]){if(G&&Z.compareDocumentPosition(G)^4)G.parentNode.insertBefore(Z,G);G=Z}return this}function s4(_){if(!_)_=GJ;function Q(K,X){return K&&X?_(K.__data__,X.__data__):!K-!X}for(var J=this._groups,q=J.length,U=Array(q),G=0;G<q;++G){for(var Z=J[G],F=Z.length,L=U[G]=Array(F),Y,H=0;H<F;++H)if(Y=Z[H])L[H]=Y;L.sort(Q)}return new S1(U,this._parents).order()}function GJ(_,Q){return _<Q?-1:_>Q?1:_>=Q?0:NaN}function t4(){var _=arguments[0];return arguments[0]=this,_.apply(null,arguments),this}function o4(){return Array.from(this)}function n4(){for(var _=this._groups,Q=0,J=_.length;Q<J;++Q)for(var q=_[Q],U=0,G=q.length;U<G;++U){var Z=q[U];if(Z)return Z}return null}function e4(){let _=0;for(let Q of this)++_;return _}function _3(){return!this.node()}function Q3(_){for(var Q=this._groups,J=0,q=Q.length;J<q;++J)for(var U=Q[J],G=0,Z=U.length,F;G<Z;++G)if(F=U[G])_.call(F,F.__data__,G,U);return this}function ZJ(_){return function(){this.removeAttribute(_)}}function FJ(_){return function(){this.removeAttributeNS(_.space,_.local)}}function KJ(_,Q){return function(){this.setAttribute(_,Q)}}function HJ(_,Q){return function(){this.setAttributeNS(_.space,_.local,Q)}}function XJ(_,Q){return function(){var J=Q.apply(this,arguments);if(J==null)this.removeAttribute(_);else this.setAttribute(_,J)}}function YJ(_,Q){return function(){var J=Q.apply(this,arguments);if(J==null)this.removeAttributeNS(_.space,_.local);else this.setAttributeNS(_.space,_.local,J)}}function J3(_,Q){var J=Y0(_);if(arguments.length<2){var q=this.node();return J.local?q.getAttributeNS(J.space,J.local):q.getAttribute(J)}return this.each((Q==null?J.local?FJ:ZJ:typeof Q==="function"?J.local?YJ:XJ:J.local?HJ:KJ)(J,Q))}function c2(_){return _.ownerDocument&&_.ownerDocument.defaultView||_.document&&_||_.defaultView}function LJ(_){return function(){this.style.removeProperty(_)}}function zJ(_,Q,J){return function(){this.style.setProperty(_,Q,J)}}function WJ(_,Q,J){return function(){var q=Q.apply(this,arguments);if(q==null)this.style.removeProperty(_);else this.style.setProperty(_,q,J)}}function $3(_,Q,J){return arguments.length>1?this.each((Q==null?LJ:typeof Q==="function"?WJ:zJ)(_,Q,J==null?"":J)):V0(this.node(),_)}function V0(_,Q){return _.style.getPropertyValue(Q)||c2(_).getComputedStyle(_,null).getPropertyValue(Q)}function AJ(_){return function(){delete this[_]}}function BJ(_,Q){return function(){this[_]=Q}}function MJ(_,Q){return function(){var J=Q.apply(this,arguments);if(J==null)delete this[_];else this[_]=J}}function q3(_,Q){return arguments.length>1?this.each((Q==null?AJ:typeof Q==="function"?MJ:BJ)(_,Q)):this.node()[_]}function H8(_){return _.trim().split(/^|\s+/)}function U3(_){return _.classList||new X8(_)}function X8(_){this._node=_,this._names=H8(_.getAttribute("class")||"")}X8.prototype={add:function(_){var Q=this._names.indexOf(_);if(Q<0)this._names.push(_),this._node.setAttribute("class",this._names.join(" "))},remove:function(_){var Q=this._names.indexOf(_);if(Q>=0)this._names.splice(Q,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(_){return this._names.indexOf(_)>=0}};function Y8(_,Q){var J=U3(_),q=-1,U=Q.length;while(++q<U)J.add(Q[q])}function L8(_,Q){var J=U3(_),q=-1,U=Q.length;while(++q<U)J.remove(Q[q])}function TJ(_){return function(){Y8(this,_)}}function RJ(_){return function(){L8(this,_)}}function OJ(_,Q){return function(){(Q.apply(this,arguments)?Y8:L8)(this,_)}}function G3(_,Q){var J=H8(_+"");if(arguments.length<2){var q=U3(this.node()),U=-1,G=J.length;while(++U<G)if(!q.contains(J[U]))return!1;return!0}return this.each((typeof Q==="function"?OJ:Q?TJ:RJ)(J,Q))}function fJ(){this.textContent=""}function IJ(_){return function(){this.textContent=_}}function wJ(_){return function(){var Q=_.apply(this,arguments);this.textContent=Q==null?"":Q}}function Z3(_){return arguments.length?this.each(_==null?fJ:(typeof _==="function"?wJ:IJ)(_)):this.node().textContent}function PJ(){this.innerHTML=""}function NJ(_){return function(){this.innerHTML=_}}function CJ(_){return function(){var Q=_.apply(this,arguments);this.innerHTML=Q==null?"":Q}}function F3(_){return arguments.length?this.each(_==null?PJ:(typeof _==="function"?CJ:NJ)(_)):this.node().innerHTML}function SJ(){if(this.nextSibling)this.parentNode.appendChild(this)}function K3(){return this.each(SJ)}function kJ(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function H3(){return this.each(kJ)}function yJ(_){return function(){var Q=this.ownerDocument,J=this.namespaceURI;return J===V5&&Q.documentElement.namespaceURI===V5?Q.createElement(_):Q.createElementNS(J,_)}}function vJ(_){return function(){return this.ownerDocument.createElementNS(_.space,_.local)}}function l2(_){var Q=Y0(_);return(Q.local?vJ:yJ)(Q)}function X3(_){var Q=typeof _==="function"?_:l2(_);return this.select(function(){return this.appendChild(Q.apply(this,arguments))})}function jJ(){return null}function Y3(_,Q){var J=typeof _==="function"?_:l2(_),q=Q==null?jJ:typeof Q==="function"?Q:j0(Q);return this.select(function(){return this.insertBefore(J.apply(this,arguments),q.apply(this,arguments)||null)})}function VJ(){var _=this.parentNode;if(_)_.removeChild(this)}function L3(){return this.each(VJ)}function uJ(){var _=this.cloneNode(!1),Q=this.parentNode;return Q?Q.insertBefore(_,this.nextSibling):_}function bJ(){var _=this.cloneNode(!0),Q=this.parentNode;return Q?Q.insertBefore(_,this.nextSibling):_}function z3(_){return this.select(_?bJ:uJ)}function W3(_){return arguments.length?this.property("__data__",_):this.node().__data__}function DJ(_){return function(Q){_.call(this,Q,this.__data__)}}function hJ(_){return _.trim().split(/^|\s+/).map(function(Q){var J="",q=Q.indexOf(".");if(q>=0)J=Q.slice(q+1),Q=Q.slice(0,q);return{type:Q,name:J}})}function EJ(_){return function(){var Q=this.__on;if(!Q)return;for(var J=0,q=-1,U=Q.length,G;J<U;++J)if(G=Q[J],(!_.type||G.type===_.type)&&G.name===_.name)this.removeEventListener(G.type,G.listener,G.options);else Q[++q]=G;if(++q)Q.length=q;else delete this.__on}}function xJ(_,Q,J){return function(){var q=this.__on,U,G=DJ(Q);if(q){for(var Z=0,F=q.length;Z<F;++Z)if((U=q[Z]).type===_.type&&U.name===_.name){this.removeEventListener(U.type,U.listener,U.options),this.addEventListener(U.type,U.listener=G,U.options=J),U.value=Q;return}}if(this.addEventListener(_.type,G,J),U={type:_.type,name:_.name,value:Q,listener:G,options:J},!q)this.__on=[U];else q.push(U)}}function A3(_,Q,J){var q=hJ(_+""),U,G=q.length,Z;if(arguments.length<2){var F=this.node().__on;if(F){for(var L=0,Y=F.length,H;L<Y;++L)for(U=0,H=F[L];U<G;++U)if((Z=q[U]).type===H.type&&Z.name===H.name)return H.value}return}F=Q?xJ:EJ;for(U=0;U<G;++U)this.each(F(q[U],Q,J));return this}function z8(_,Q,J){var q=c2(_),U=q.CustomEvent;if(typeof U==="function")U=new U(Q,J);else if(U=q.document.createEvent("Event"),J)U.initEvent(Q,J.bubbles,J.cancelable),U.detail=J.detail;else U.initEvent(Q,!1,!1);_.dispatchEvent(U)}function mJ(_,Q){return function(){return z8(this,_,Q)}}function gJ(_,Q){return function(){return z8(this,_,Q.apply(this,arguments))}}function B3(_,Q){return this.each((typeof Q==="function"?gJ:mJ)(_,Q))}function*M3(){for(var _=this._groups,Q=0,J=_.length;Q<J;++Q)for(var q=_[Q],U=0,G=q.length,Z;U<G;++U)if(Z=q[U])yield Z}var T3=[null];function S1(_,Q){this._groups=_,this._parents=Q}function W8(){return new S1([[document.documentElement]],T3)}function pJ(){return this}S1.prototype=W8.prototype={constructor:S1,select:D4,selectAll:E4,selectChild:x4,selectChildren:m4,filter:g4,data:l4,enter:p4,exit:r4,join:i4,merge:d4,selection:pJ,order:a4,sort:s4,call:t4,nodes:o4,node:n4,size:e4,empty:_3,each:Q3,attr:J3,style:$3,property:q3,classed:G3,text:Z3,html:F3,raise:K3,lower:H3,append:X3,insert:Y3,remove:L3,clone:z3,datum:W3,on:A3,dispatch:B3,[Symbol.iterator]:M3};var T0=W8;function v1(_){return typeof _==="string"?new S1([[document.querySelector(_)]],[document.documentElement]):new S1([[_]],T3)}var A8={passive:!1},s0={capture:!0,passive:!1};function u5(_){_.stopImmediatePropagation()}function R0(_){_.preventDefault(),_.stopImmediatePropagation()}function f2(_){var Q=_.document.documentElement,J=v1(_).on("dragstart.drag",R0,s0);if("onselectstart"in Q)J.on("selectstart.drag",R0,s0);else Q.__noselect=Q.style.MozUserSelect,Q.style.MozUserSelect="none"}function r2(_,Q){var J=_.document.documentElement,q=v1(_).on("dragstart.drag",null);if(Q)q.on("click.drag",R0,s0),setTimeout(function(){q.on("click.drag",null)},0);if("onselectstart"in J)q.on("selectstart.drag",null);else J.style.MozUserSelect=J.__noselect,delete J.__noselect}var i2=(_)=>()=>_;function d2(_,{sourceEvent:Q,subject:J,target:q,identifier:U,active:G,x:Z,y:F,dx:L,dy:Y,dispatch:H}){Object.defineProperties(this,{type:{value:_,enumerable:!0,configurable:!0},sourceEvent:{value:Q,enumerable:!0,configurable:!0},subject:{value:J,enumerable:!0,configurable:!0},target:{value:q,enumerable:!0,configurable:!0},identifier:{value:U,enumerable:!0,configurable:!0},active:{value:G,enumerable:!0,configurable:!0},x:{value:Z,enumerable:!0,configurable:!0},y:{value:F,enumerable:!0,configurable:!0},dx:{value:L,enumerable:!0,configurable:!0},dy:{value:Y,enumerable:!0,configurable:!0},_:{value:H}})}d2.prototype.on=function(){var _=this._.on.apply(this._,arguments);return _===this._?this:_};function cJ(_){return!_.ctrlKey&&!_.button}function lJ(){return this.parentNode}function rJ(_,Q){return Q==null?{x:_.x,y:_.y}:Q}function iJ(){return navigator.maxTouchPoints||"ontouchstart"in this}function a2(){var _=cJ,Q=lJ,J=rJ,q=iJ,U={},G=a0("start","drag","end"),Z=0,F,L,Y,H,K=0;function X(R){R.on("mousedown.drag",z).filter(q).on("touchstart.drag",T).on("touchmove.drag",B,A8).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function z(R,I){if(H||!_.call(this,R,I))return;var C=A(this,Q.call(this,R,I),R,I,"mouse");if(!C)return;v1(R.view).on("mousemove.drag",W,s0).on("mouseup.drag",O,s0),f2(R.view),u5(R),Y=!1,F=R.clientX,L=R.clientY,C("start",R)}function W(R){if(R0(R),!Y){var I=R.clientX-F,C=R.clientY-L;Y=I*I+C*C>K}U.mouse("drag",R)}function O(R){v1(R.view).on("mousemove.drag mouseup.drag",null),r2(R.view,Y),R0(R),U.mouse("end",R)}function T(R,I){if(!_.call(this,R,I))return;var C=R.changedTouches,P=Q.call(this,R,I),S=C.length,N,v;for(N=0;N<S;++N)if(v=A(this,P,R,I,C[N].identifier,C[N]))u5(R),v("start",R,C[N])}function B(R){var I=R.changedTouches,C=I.length,P,S;for(P=0;P<C;++P)if(S=U[I[P].identifier])R0(R),S("drag",R,I[P])}function w(R){var I=R.changedTouches,C=I.length,P,S;if(H)clearTimeout(H);H=setTimeout(function(){H=null},500);for(P=0;P<C;++P)if(S=U[I[P].identifier])u5(R),S("end",R,I[P])}function A(R,I,C,P,S,N){var v=G.copy(),j=m1(N||C,I),m,p,k;if((k=J.call(R,new d2("beforestart",{sourceEvent:C,target:X,identifier:S,active:Z,x:j[0],y:j[1],dx:0,dy:0,dispatch:v}),P))==null)return;return m=k.x-j[0]||0,p=k.y-j[1]||0,function D(V,E,u){var h=j,f;switch(V){case"start":U[S]=D,f=Z++;break;case"end":delete U[S],--Z;case"drag":j=m1(u||E,I),f=Z;break}v.call(V,R,new d2(V,{sourceEvent:E,subject:k,target:X,identifier:S,active:f,x:j[0]+m,y:j[1]+p,dx:j[0]-h[0],dy:j[1]-h[1],dispatch:v}),P)}}return X.filter=function(R){return arguments.length?(_=typeof R==="function"?R:i2(!!R),X):_},X.container=function(R){return arguments.length?(Q=typeof R==="function"?R:i2(R),X):Q},X.subject=function(R){return arguments.length?(J=typeof R==="function"?R:i2(R),X):J},X.touchable=function(R){return arguments.length?(q=typeof R==="function"?R:i2(!!R),X):q},X.on=function(){var R=G.on.apply(G,arguments);return R===G?X:R},X.clickDistance=function(R){return arguments.length?(K=(R=+R)*R,X):Math.sqrt(K)},X}function s2(_,Q,J){_.prototype=Q.prototype=J,J.constructor=_}function R3(_,Q){var J=Object.create(_.prototype);for(var q in Q)J[q]=Q[q];return J}function n2(){}var t2=0.7,h5=1/t2,I2="\\s*([+-]?\\d+)\\s*",o2="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",L0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dJ=/^#([0-9a-f]{3,8})$/,aJ=new RegExp(`^rgb\\(${I2},${I2},${I2}\\)$`),sJ=new RegExp(`^rgb\\(${L0},${L0},${L0}\\)$`),tJ=new RegExp(`^rgba\\(${I2},${I2},${I2},${o2}\\)$`),oJ=new RegExp(`^rgba\\(${L0},${L0},${L0},${o2}\\)$`),nJ=new RegExp(`^hsl\\(${o2},${L0},${L0}\\)$`),eJ=new RegExp(`^hsla\\(${o2},${L0},${L0},${o2}\\)$`),B8={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};s2(n2,q0,{copy(_){return Object.assign(new this.constructor,this,_)},displayable(){return this.rgb().displayable()},hex:M8,formatHex:M8,formatHex8:_$,formatHsl:Q$,formatRgb:T8,toString:T8});function M8(){return this.rgb().formatHex()}function _$(){return this.rgb().formatHex8()}function Q$(){return P8(this).formatHsl()}function T8(){return this.rgb().formatRgb()}function q0(_){var Q,J;return _=(_+"").trim().toLowerCase(),(Q=dJ.exec(_))?(J=Q[1].length,Q=parseInt(Q[1],16),J===6?R8(Q):J===3?new i1(Q>>8&15|Q>>4&240,Q>>4&15|Q&240,(Q&15)<<4|Q&15,1):J===8?b5(Q>>24&255,Q>>16&255,Q>>8&255,(Q&255)/255):J===4?b5(Q>>12&15|Q>>8&240,Q>>8&15|Q>>4&240,Q>>4&15|Q&240,((Q&15)<<4|Q&15)/255):null):(Q=aJ.exec(_))?new i1(Q[1],Q[2],Q[3],1):(Q=sJ.exec(_))?new i1(Q[1]*255/100,Q[2]*255/100,Q[3]*255/100,1):(Q=tJ.exec(_))?b5(Q[1],Q[2],Q[3],Q[4]):(Q=oJ.exec(_))?b5(Q[1]*255/100,Q[2]*255/100,Q[3]*255/100,Q[4]):(Q=nJ.exec(_))?I8(Q[1],Q[2]/100,Q[3]/100,1):(Q=eJ.exec(_))?I8(Q[1],Q[2]/100,Q[3]/100,Q[4]):B8.hasOwnProperty(_)?R8(B8[_]):_==="transparent"?new i1(NaN,NaN,NaN,0):null}function R8(_){return new i1(_>>16&255,_>>8&255,_&255,1)}function b5(_,Q,J,q){if(q<=0)_=Q=J=NaN;return new i1(_,Q,J,q)}function J$(_){if(!(_ instanceof n2))_=q0(_);if(!_)return new i1;return _=_.rgb(),new i1(_.r,_.g,_.b,_.opacity)}function w2(_,Q,J,q){return arguments.length===1?J$(_):new i1(_,Q,J,q==null?1:q)}function i1(_,Q,J,q){this.r=+_,this.g=+Q,this.b=+J,this.opacity=+q}s2(i1,w2,R3(n2,{brighter(_){return _=_==null?h5:Math.pow(h5,_),new i1(this.r*_,this.g*_,this.b*_,this.opacity)},darker(_){return _=_==null?t2:Math.pow(t2,_),new i1(this.r*_,this.g*_,this.b*_,this.opacity)},rgb(){return this},clamp(){return new i1(o0(this.r),o0(this.g),o0(this.b),E5(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:O8,formatHex:O8,formatHex8:$$,formatRgb:f8,toString:f8}));function O8(){return`#${t0(this.r)}${t0(this.g)}${t0(this.b)}`}function $$(){return`#${t0(this.r)}${t0(this.g)}${t0(this.b)}${t0((isNaN(this.opacity)?1:this.opacity)*255)}`}function f8(){let _=E5(this.opacity);return`${_===1?"rgb(":"rgba("}${o0(this.r)}, ${o0(this.g)}, ${o0(this.b)}${_===1?")":`, ${_})`}`}function E5(_){return isNaN(_)?1:Math.max(0,Math.min(1,_))}function o0(_){return Math.max(0,Math.min(255,Math.round(_)||0))}function t0(_){return _=o0(_),(_<16?"0":"")+_.toString(16)}function I8(_,Q,J,q){if(q<=0)_=Q=J=NaN;else if(J<=0||J>=1)_=Q=NaN;else if(Q<=0)_=NaN;return new $0(_,Q,J,q)}function P8(_){if(_ instanceof $0)return new $0(_.h,_.s,_.l,_.opacity);if(!(_ instanceof n2))_=q0(_);if(!_)return new $0;if(_ instanceof $0)return _;_=_.rgb();var Q=_.r/255,J=_.g/255,q=_.b/255,U=Math.min(Q,J,q),G=Math.max(Q,J,q),Z=NaN,F=G-U,L=(G+U)/2;if(F){if(Q===G)Z=(J-q)/F+(J<q)*6;else if(J===G)Z=(q-Q)/F+2;else Z=(Q-J)/F+4;F/=L<0.5?G+U:2-G-U,Z*=60}else F=L>0&&L<1?0:Z;return new $0(Z,F,L,_.opacity)}function N8(_,Q,J,q){return arguments.length===1?P8(_):new $0(_,Q,J,q==null?1:q)}function $0(_,Q,J,q){this.h=+_,this.s=+Q,this.l=+J,this.opacity=+q}s2($0,N8,R3(n2,{brighter(_){return _=_==null?h5:Math.pow(h5,_),new $0(this.h,this.s,this.l*_,this.opacity)},darker(_){return _=_==null?t2:Math.pow(t2,_),new $0(this.h,this.s,this.l*_,this.opacity)},rgb(){var _=this.h%360+(this.h<0)*360,Q=isNaN(_)||isNaN(this.s)?0:this.s,J=this.l,q=J+(J<0.5?J:1-J)*Q,U=2*J-q;return new i1(O3(_>=240?_-240:_+120,U,q),O3(_,U,q),O3(_<120?_+240:_-120,U,q),this.opacity)},clamp(){return new $0(w8(this.h),D5(this.s),D5(this.l),E5(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)},formatHsl(){let _=E5(this.opacity);return`${_===1?"hsl(":"hsla("}${w8(this.h)}, ${D5(this.s)*100}%, ${D5(this.l)*100}%${_===1?")":`, ${_})`}`}}));function w8(_){return _=(_||0)%360,_<0?_+360:_}function D5(_){return Math.max(0,Math.min(1,_||0))}function O3(_,Q,J){return(_<60?Q+(J-Q)*_/60:_<180?J:_<240?Q+(J-Q)*(240-_)/60:Q)*255}function f3(_,Q,J,q,U){var G=_*_,Z=G*_;return((1-3*_+3*G-Z)*Q+(4-6*G+3*Z)*J+(1+3*_+3*G-3*Z)*q+Z*U)/6}function I3(_){var Q=_.length-1;return function(J){var q=J<=0?J=0:J>=1?(J=1,Q-1):Math.floor(J*Q),U=_[q],G=_[q+1],Z=q>0?_[q-1]:2*U-G,F=q<Q-1?_[q+2]:2*G-U;return f3((J-q/Q)*Q,Z,U,G,F)}}function w3(_){var Q=_.length;return function(J){var q=Math.floor(((J%=1)<0?++J:J)*Q),U=_[(q+Q-1)%Q],G=_[q%Q],Z=_[(q+1)%Q],F=_[(q+2)%Q];return f3((J-q/Q)*Q,U,G,Z,F)}}var e2=(_)=>()=>_;function q$(_,Q){return function(J){return _+J*Q}}function U$(_,Q,J){return _=Math.pow(_,J),Q=Math.pow(Q,J)-_,J=1/J,function(q){return Math.pow(_+q*Q,J)}}function C8(_){return(_=+_)===1?x5:function(Q,J){return J-Q?U$(Q,J,_):e2(isNaN(Q)?J:Q)}}function x5(_,Q){var J=Q-_;return J?q$(_,J):e2(isNaN(_)?Q:_)}var n0=function _(Q){var J=C8(Q);function q(U,G){var Z=J((U=w2(U)).r,(G=w2(G)).r),F=J(U.g,G.g),L=J(U.b,G.b),Y=x5(U.opacity,G.opacity);return function(H){return U.r=Z(H),U.g=F(H),U.b=L(H),U.opacity=Y(H),U+""}}return q.gamma=_,q}(1);function S8(_){return function(Q){var J=Q.length,q=Array(J),U=Array(J),G=Array(J),Z,F;for(Z=0;Z<J;++Z)F=w2(Q[Z]),q[Z]=F.r||0,U[Z]=F.g||0,G[Z]=F.b||0;return q=_(q),U=_(U),G=_(G),F.opacity=1,function(L){return F.r=q(L),F.g=U(L),F.b=G(L),F+""}}}var G$=S8(I3),Z$=S8(w3);function P3(_,Q){if(!Q)Q=[];var J=_?Math.min(Q.length,_.length):0,q=Q.slice(),U;return function(G){for(U=0;U<J;++U)q[U]=_[U]*(1-G)+Q[U]*G;return q}}function k8(_){return ArrayBuffer.isView(_)&&!(_ instanceof DataView)}function y8(_,Q){var J=Q?Q.length:0,q=_?Math.min(J,_.length):0,U=Array(q),G=Array(J),Z;for(Z=0;Z<q;++Z)U[Z]=z0(_[Z],Q[Z]);for(;Z<J;++Z)G[Z]=Q[Z];return function(F){for(Z=0;Z<q;++Z)G[Z]=U[Z](F);return G}}function N3(_,Q){var J=new Date;return _=+_,Q=+Q,function(q){return J.setTime(_*(1-q)+Q*q),J}}function g1(_,Q){return _=+_,Q=+Q,function(J){return _*(1-J)+Q*J}}function C3(_,Q){var J={},q={},U;if(_===null||typeof _!=="object")_={};if(Q===null||typeof Q!=="object")Q={};for(U in Q)if(U in _)J[U]=z0(_[U],Q[U]);else q[U]=Q[U];return function(G){for(U in J)q[U]=J[U](G);return q}}var k3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,S3=new RegExp(k3.source,"g");function F$(_){return function(){return _}}function K$(_){return function(Q){return _(Q)+""}}function P2(_,Q){var J=k3.lastIndex=S3.lastIndex=0,q,U,G,Z=-1,F=[],L=[];_=_+"",Q=Q+"";while((q=k3.exec(_))&&(U=S3.exec(Q))){if((G=U.index)>J)if(G=Q.slice(J,G),F[Z])F[Z]+=G;else F[++Z]=G;if((q=q[0])===(U=U[0]))if(F[Z])F[Z]+=U;else F[++Z]=U;else F[++Z]=null,L.push({i:Z,x:g1(q,U)});J=S3.lastIndex}if(J<Q.length)if(G=Q.slice(J),F[Z])F[Z]+=G;else F[++Z]=G;return F.length<2?L[0]?K$(L[0].x):F$(Q):(Q=L.length,function(Y){for(var H=0,K;H<Q;++H)F[(K=L[H]).i]=K.x(Y);return F.join("")})}function z0(_,Q){var J=typeof Q,q;return Q==null||J==="boolean"?e2(Q):(J==="number"?g1:J==="string"?(q=q0(Q))?(Q=q,n0):P2:Q instanceof q0?n0:Q instanceof Date?N3:k8(Q)?P3:Array.isArray(Q)?y8:typeof Q.valueOf!=="function"&&typeof Q.toString!=="function"||isNaN(Q)?C3:g1)(_,Q)}var v8=180/Math.PI,m5={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function g5(_,Q,J,q,U,G){var Z,F,L;if(Z=Math.sqrt(_*_+Q*Q))_/=Z,Q/=Z;if(L=_*J+Q*q)J-=_*L,q-=Q*L;if(F=Math.sqrt(J*J+q*q))J/=F,q/=F,L/=F;if(_*q<Q*J)_=-_,Q=-Q,L=-L,Z=-Z;return{translateX:U,translateY:G,rotate:Math.atan2(Q,_)*v8,skewX:Math.atan(L)*v8,scaleX:Z,scaleY:F}}var p5;function j8(_){let Q=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(_+"");return Q.isIdentity?m5:g5(Q.a,Q.b,Q.c,Q.d,Q.e,Q.f)}function V8(_){if(_==null)return m5;if(!p5)p5=document.createElementNS("http://www.w3.org/2000/svg","g");if(p5.setAttribute("transform",_),!(_=p5.transform.baseVal.consolidate()))return m5;return _=_.matrix,g5(_.a,_.b,_.c,_.d,_.e,_.f)}function u8(_,Q,J,q){function U(Y){return Y.length?Y.pop()+" ":""}function G(Y,H,K,X,z,W){if(Y!==K||H!==X){var O=z.push("translate(",null,Q,null,J);W.push({i:O-4,x:g1(Y,K)},{i:O-2,x:g1(H,X)})}else if(K||X)z.push("translate("+K+Q+X+J)}function Z(Y,H,K,X){if(Y!==H){if(Y-H>180)H+=360;else if(H-Y>180)Y+=360;X.push({i:K.push(U(K)+"rotate(",null,q)-2,x:g1(Y,H)})}else if(H)K.push(U(K)+"rotate("+H+q)}function F(Y,H,K,X){if(Y!==H)X.push({i:K.push(U(K)+"skewX(",null,q)-2,x:g1(Y,H)});else if(H)K.push(U(K)+"skewX("+H+q)}function L(Y,H,K,X,z,W){if(Y!==K||H!==X){var O=z.push(U(z)+"scale(",null,",",null,")");W.push({i:O-4,x:g1(Y,K)},{i:O-2,x:g1(H,X)})}else if(K!==1||X!==1)z.push(U(z)+"scale("+K+","+X+")")}return function(Y,H){var K=[],X=[];return Y=_(Y),H=_(H),G(Y.translateX,Y.translateY,H.translateX,H.translateY,K,X),Z(Y.rotate,H.rotate,K,X),F(Y.skewX,H.skewX,K,X),L(Y.scaleX,Y.scaleY,H.scaleX,H.scaleY,K,X),Y=H=null,function(z){var W=-1,O=X.length,T;while(++W<O)K[(T=X[W]).i]=T.x(z);return K.join("")}}}var y3=u8(j8,"px, ","px)","deg)"),v3=u8(V8,", ",")",")");var H$=0.000000000001;function b8(_){return((_=Math.exp(_))+1/_)/2}function X$(_){return((_=Math.exp(_))-1/_)/2}function Y$(_){return((_=Math.exp(2*_))-1)/(_+1)}var e0=function _(Q,J,q){function U(G,Z){var F=G[0],L=G[1],Y=G[2],H=Z[0],K=Z[1],X=Z[2],z=H-F,W=K-L,O=z*z+W*W,T,B;if(O<H$)B=Math.log(X/Y)/Q,T=function(P){return[F+P*z,L+P*W,Y*Math.exp(Q*P*B)]};else{var w=Math.sqrt(O),A=(X*X-Y*Y+q*O)/(2*Y*J*w),R=(X*X-Y*Y-q*O)/(2*X*J*w),I=Math.log(Math.sqrt(A*A+1)-A),C=Math.log(Math.sqrt(R*R+1)-R);B=(C-I)/Q,T=function(P){var S=P*B,N=b8(I),v=Y/(J*w)*(N*Y$(Q*S+I)-X$(I));return[F+v*z,L+v*W,Y*N/b8(Q*S+I)]}}return T.duration=B*1000*Q/Math.SQRT2,T}return U.rho=function(G){var Z=Math.max(0.001,+G),F=Z*Z,L=F*F;return _(Z,F,L)},U}(Math.SQRT2,2,4);var N2=0,Q5=0,_5=0,h8=1000,c5,J5,l5=0,_2=0,r5=0,$5=typeof performance==="object"&&performance.now?performance:Date,E8=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(_){setTimeout(_,17)};function U5(){return _2||(E8(L$),_2=$5.now()+r5)}function L$(){_2=0}function q5(){this._call=this._time=this._next=null}q5.prototype=i5.prototype={constructor:q5,restart:function(_,Q,J){if(typeof _!=="function")throw TypeError("callback is not a function");if(J=(J==null?U5():+J)+(Q==null?0:+Q),!this._next&&J5!==this){if(J5)J5._next=this;else c5=this;J5=this}this._call=_,this._time=J,j3()},stop:function(){if(this._call)this._call=null,this._time=1/0,j3()}};function i5(_,Q,J){var q=new q5;return q.restart(_,Q,J),q}function x8(){U5(),++N2;var _=c5,Q;while(_){if((Q=_2-_._time)>=0)_._call.call(void 0,Q);_=_._next}--N2}function D8(){_2=(l5=$5.now())+r5,N2=Q5=0;try{x8()}finally{N2=0,W$(),_2=0}}function z$(){var _=$5.now(),Q=_-l5;if(Q>h8)r5-=Q,l5=_}function W$(){var _,Q=c5,J,q=1/0;while(Q)if(Q._call){if(q>Q._time)q=Q._time;_=Q,Q=Q._next}else J=Q._next,Q._next=null,Q=_?_._next=J:c5=J;J5=_,j3(q)}function j3(_){if(N2)return;if(Q5)Q5=clearTimeout(Q5);var Q=_-_2;if(Q>24){if(_<1/0)Q5=setTimeout(D8,_-$5.now()-r5);if(_5)_5=clearInterval(_5)}else{if(!_5)l5=$5.now(),_5=setInterval(z$,h8);N2=1,E8(D8)}}function G5(_,Q,J){var q=new q5;return Q=Q==null?0:+Q,q.restart((U)=>{q.stop(),_(U+Q)},Q,J),q}var A$=a0("start","end","cancel","interrupt"),B$=[],p8=0,m8=1,a5=2,d5=3,g8=4,s5=5,Z5=6;function O0(_,Q,J,q,U,G){var Z=_.__transition;if(!Z)_.__transition={};else if(J in Z)return;M$(_,J,{name:Q,index:q,group:U,on:A$,tween:B$,time:G.time,delay:G.delay,duration:G.duration,ease:G.ease,timer:null,state:p8})}function F5(_,Q){var J=j1(_,Q);if(J.state>p8)throw Error("too late; already scheduled");return J}function E1(_,Q){var J=j1(_,Q);if(J.state>d5)throw Error("too late; already running");return J}function j1(_,Q){var J=_.__transition;if(!J||!(J=J[Q]))throw Error("transition not found");return J}function M$(_,Q,J){var q=_.__transition,U;q[Q]=J,J.timer=i5(G,0,J.time);function G(Y){if(J.state=m8,J.timer.restart(Z,J.delay,J.time),J.delay<=Y)Z(Y-J.delay)}function Z(Y){var H,K,X,z;if(J.state!==m8)return L();for(H in q){if(z=q[H],z.name!==J.name)continue;if(z.state===d5)return G5(Z);if(z.state===g8)z.state=Z5,z.timer.stop(),z.on.call("interrupt",_,_.__data__,z.index,z.group),delete q[H];else if(+H<Q)z.state=Z5,z.timer.stop(),z.on.call("cancel",_,_.__data__,z.index,z.group),delete q[H]}if(G5(function(){if(J.state===d5)J.state=g8,J.timer.restart(F,J.delay,J.time),F(Y)}),J.state=a5,J.on.call("start",_,_.__data__,J.index,J.group),J.state!==a5)return;J.state=d5,U=Array(X=J.tween.length);for(H=0,K=-1;H<X;++H)if(z=J.tween[H].value.call(_,_.__data__,J.index,J.group))U[++K]=z;U.length=K+1}function F(Y){var H=Y<J.duration?J.ease.call(null,Y/J.duration):(J.timer.restart(L),J.state=s5,1),K=-1,X=U.length;while(++K<X)U[K].call(_,H);if(J.state===s5)J.on.call("end",_,_.__data__,J.index,J.group),L()}function L(){J.state=Z5,J.timer.stop(),delete q[Q];for(var Y in q)return;delete _.__transition}}function u0(_,Q){var J=_.__transition,q,U,G=!0,Z;if(!J)return;Q=Q==null?null:Q+"";for(Z in J){if((q=J[Z]).name!==Q){G=!1;continue}U=q.state>a5&&q.state<s5,q.state=Z5,q.timer.stop(),q.on.call(U?"interrupt":"cancel",_,_.__data__,q.index,q.group),delete J[Z]}if(G)delete _.__transition}function V3(_){return this.each(function(){u0(this,_)})}function T$(_,Q){var J,q;return function(){var U=E1(this,_),G=U.tween;if(G!==J){q=J=G;for(var Z=0,F=q.length;Z<F;++Z)if(q[Z].name===Q){q=q.slice(),q.splice(Z,1);break}}U.tween=q}}function R$(_,Q,J){var q,U;if(typeof J!=="function")throw Error();return function(){var G=E1(this,_),Z=G.tween;if(Z!==q){U=(q=Z).slice();for(var F={name:Q,value:J},L=0,Y=U.length;L<Y;++L)if(U[L].name===Q){U[L]=F;break}if(L===Y)U.push(F)}G.tween=U}}function u3(_,Q){var J=this._id;if(_+="",arguments.length<2){var q=j1(this.node(),J).tween;for(var U=0,G=q.length,Z;U<G;++U)if((Z=q[U]).name===_)return Z.value;return null}return this.each((Q==null?T$:R$)(J,_,Q))}function C2(_,Q,J){var q=_._id;return _.each(function(){var U=E1(this,q);(U.value||(U.value={}))[Q]=J.apply(this,arguments)}),function(U){return j1(U,q).value[Q]}}function K5(_,Q){var J;return(typeof Q==="number"?g1:Q instanceof q0?n0:(J=q0(Q))?(Q=J,n0):P2)(_,Q)}function O$(_){return function(){this.removeAttribute(_)}}function f$(_){return function(){this.removeAttributeNS(_.space,_.local)}}function I$(_,Q,J){var q,U=J+"",G;return function(){var Z=this.getAttribute(_);return Z===U?null:Z===q?G:G=Q(q=Z,J)}}function w$(_,Q,J){var q,U=J+"",G;return function(){var Z=this.getAttributeNS(_.space,_.local);return Z===U?null:Z===q?G:G=Q(q=Z,J)}}function P$(_,Q,J){var q,U,G;return function(){var Z,F=J(this),L;if(F==null)return void this.removeAttribute(_);return Z=this.getAttribute(_),L=F+"",Z===L?null:Z===q&&L===U?G:(U=L,G=Q(q=Z,F))}}function N$(_,Q,J){var q,U,G;return function(){var Z,F=J(this),L;if(F==null)return void this.removeAttributeNS(_.space,_.local);return Z=this.getAttributeNS(_.space,_.local),L=F+"",Z===L?null:Z===q&&L===U?G:(U=L,G=Q(q=Z,F))}}function b3(_,Q){var J=Y0(_),q=J==="transform"?v3:K5;return this.attrTween(_,typeof Q==="function"?(J.local?N$:P$)(J,q,C2(this,"attr."+_,Q)):Q==null?(J.local?f$:O$)(J):(J.local?w$:I$)(J,q,Q))}function C$(_,Q){return function(J){this.setAttribute(_,Q.call(this,J))}}function S$(_,Q){return function(J){this.setAttributeNS(_.space,_.local,Q.call(this,J))}}function k$(_,Q){var J,q;function U(){var G=Q.apply(this,arguments);if(G!==q)J=(q=G)&&S$(_,G);return J}return U._value=Q,U}function y$(_,Q){var J,q;function U(){var G=Q.apply(this,arguments);if(G!==q)J=(q=G)&&C$(_,G);return J}return U._value=Q,U}function D3(_,Q){var J="attr."+_;if(arguments.length<2)return(J=this.tween(J))&&J._value;if(Q==null)return this.tween(J,null);if(typeof Q!=="function")throw Error();var q=Y0(_);return this.tween(J,(q.local?k$:y$)(q,Q))}function v$(_,Q){return function(){F5(this,_).delay=+Q.apply(this,arguments)}}function j$(_,Q){return Q=+Q,function(){F5(this,_).delay=Q}}function h3(_){var Q=this._id;return arguments.length?this.each((typeof _==="function"?v$:j$)(Q,_)):j1(this.node(),Q).delay}function V$(_,Q){return function(){E1(this,_).duration=+Q.apply(this,arguments)}}function u$(_,Q){return Q=+Q,function(){E1(this,_).duration=Q}}function E3(_){var Q=this._id;return arguments.length?this.each((typeof _==="function"?V$:u$)(Q,_)):j1(this.node(),Q).duration}function b$(_,Q){if(typeof Q!=="function")throw Error();return function(){E1(this,_).ease=Q}}function x3(_){var Q=this._id;return arguments.length?this.each(b$(Q,_)):j1(this.node(),Q).ease}function D$(_,Q){return function(){var J=Q.apply(this,arguments);if(typeof J!=="function")throw Error();E1(this,_).ease=J}}function m3(_){if(typeof _!=="function")throw Error();return this.each(D$(this._id,_))}function g3(_){if(typeof _!=="function")_=R2(_);for(var Q=this._groups,J=Q.length,q=Array(J),U=0;U<J;++U)for(var G=Q[U],Z=G.length,F=q[U]=[],L,Y=0;Y<Z;++Y)if((L=G[Y])&&_.call(L,L.__data__,Y,G))F.push(L);return new l1(q,this._parents,this._name,this._id)}function p3(_){if(_._id!==this._id)throw Error();for(var Q=this._groups,J=_._groups,q=Q.length,U=J.length,G=Math.min(q,U),Z=Array(q),F=0;F<G;++F)for(var L=Q[F],Y=J[F],H=L.length,K=Z[F]=Array(H),X,z=0;z<H;++z)if(X=L[z]||Y[z])K[z]=X;for(;F<q;++F)Z[F]=Q[F];return new l1(Z,this._parents,this._name,this._id)}function h$(_){return(_+"").trim().split(/^|\s+/).every(function(Q){var J=Q.indexOf(".");if(J>=0)Q=Q.slice(0,J);return!Q||Q==="start"})}function E$(_,Q,J){var q,U,G=h$(Q)?F5:E1;return function(){var Z=G(this,_),F=Z.on;if(F!==q)(U=(q=F).copy()).on(Q,J);Z.on=U}}function c3(_,Q){var J=this._id;return arguments.length<2?j1(this.node(),J).on.on(_):this.each(E$(J,_,Q))}function x$(_){return function(){var Q=this.parentNode;for(var J in this.__transition)if(+J!==_)return;if(Q)Q.removeChild(this)}}function l3(){return this.on("end.remove",x$(this._id))}function r3(_){var Q=this._name,J=this._id;if(typeof _!=="function")_=j0(_);for(var q=this._groups,U=q.length,G=Array(U),Z=0;Z<U;++Z)for(var F=q[Z],L=F.length,Y=G[Z]=Array(L),H,K,X=0;X<L;++X)if((H=F[X])&&(K=_.call(H,H.__data__,X,F))){if("__data__"in H)K.__data__=H.__data__;Y[X]=K,O0(Y[X],Q,J,X,Y,j1(H,J))}return new l1(G,this._parents,Q,J)}function i3(_){var Q=this._name,J=this._id;if(typeof _!=="function")_=O2(_);for(var q=this._groups,U=q.length,G=[],Z=[],F=0;F<U;++F)for(var L=q[F],Y=L.length,H,K=0;K<Y;++K)if(H=L[K]){for(var X=_.call(H,H.__data__,K,L),z,W=j1(H,J),O=0,T=X.length;O<T;++O)if(z=X[O])O0(z,Q,J,O,X,W);G.push(X),Z.push(H)}return new l1(G,Z,Q,J)}var m$=T0.prototype.constructor;function d3(){return new m$(this._groups,this._parents)}function g$(_,Q){var J,q,U;return function(){var G=V0(this,_),Z=(this.style.removeProperty(_),V0(this,_));return G===Z?null:G===J&&Z===q?U:U=Q(J=G,q=Z)}}function c8(_){return function(){this.style.removeProperty(_)}}function p$(_,Q,J){var q,U=J+"",G;return function(){var Z=V0(this,_);return Z===U?null:Z===q?G:G=Q(q=Z,J)}}function c$(_,Q,J){var q,U,G;return function(){var Z=V0(this,_),F=J(this),L=F+"";if(F==null)L=F=(this.style.removeProperty(_),V0(this,_));return Z===L?null:Z===q&&L===U?G:(U=L,G=Q(q=Z,F))}}function l$(_,Q){var J,q,U,G="style."+Q,Z="end."+G,F;return function(){var L=E1(this,_),Y=L.on,H=L.value[G]==null?F||(F=c8(Q)):void 0;if(Y!==J||U!==H)(q=(J=Y).copy()).on(Z,U=H);L.on=q}}function a3(_,Q,J){var q=(_+="")==="transform"?y3:K5;return Q==null?this.styleTween(_,g$(_,q)).on("end.style."+_,c8(_)):typeof Q==="function"?this.styleTween(_,c$(_,q,C2(this,"style."+_,Q))).each(l$(this._id,_)):this.styleTween(_,p$(_,q,Q),J).on("end.style."+_,null)}function r$(_,Q,J){return function(q){this.style.setProperty(_,Q.call(this,q),J)}}function i$(_,Q,J){var q,U;function G(){var Z=Q.apply(this,arguments);if(Z!==U)q=(U=Z)&&r$(_,Z,J);return q}return G._value=Q,G}function s3(_,Q,J){var q="style."+(_+="");if(arguments.length<2)return(q=this.tween(q))&&q._value;if(Q==null)return this.tween(q,null);if(typeof Q!=="function")throw Error();return this.tween(q,i$(_,Q,J==null?"":J))}function d$(_){return function(){this.textContent=_}}function a$(_){return function(){var Q=_(this);this.textContent=Q==null?"":Q}}function t3(_){return this.tween("text",typeof _==="function"?a$(C2(this,"text",_)):d$(_==null?"":_+""))}function s$(_){return function(Q){this.textContent=_.call(this,Q)}}function t$(_){var Q,J;function q(){var U=_.apply(this,arguments);if(U!==J)Q=(J=U)&&s$(U);return Q}return q._value=_,q}function o3(_){var Q="text";if(arguments.length<1)return(Q=this.tween(Q))&&Q._value;if(_==null)return this.tween(Q,null);if(typeof _!=="function")throw Error();return this.tween(Q,t$(_))}function n3(){var _=this._name,Q=this._id,J=t5();for(var q=this._groups,U=q.length,G=0;G<U;++G)for(var Z=q[G],F=Z.length,L,Y=0;Y<F;++Y)if(L=Z[Y]){var H=j1(L,Q);O0(L,_,J,Y,Z,{time:H.time+H.delay+H.duration,delay:0,duration:H.duration,ease:H.ease})}return new l1(q,this._parents,_,J)}function e3(){var _,Q,J=this,q=J._id,U=J.size();return new Promise(function(G,Z){var F={value:Z},L={value:function(){if(--U===0)G()}};if(J.each(function(){var Y=E1(this,q),H=Y.on;if(H!==_)Q=(_=H).copy(),Q._.cancel.push(F),Q._.interrupt.push(F),Q._.end.push(L);Y.on=Q}),U===0)G()})}var o$=0;function l1(_,Q,J,q){this._groups=_,this._parents=Q,this._name=J,this._id=q}function l8(_){return T0().transition(_)}function t5(){return++o$}var f0=T0.prototype;l1.prototype=l8.prototype={constructor:l1,select:r3,selectAll:i3,selectChild:f0.selectChild,selectChildren:f0.selectChildren,filter:g3,merge:p3,selection:d3,transition:n3,call:f0.call,nodes:f0.nodes,node:f0.node,size:f0.size,empty:f0.empty,each:f0.each,on:c3,attr:b3,attrTween:D3,style:a3,styleTween:s3,text:t3,textTween:o3,remove:l3,tween:u3,delay:h3,duration:E3,ease:x3,easeVarying:m3,end:e3,[Symbol.iterator]:f0[Symbol.iterator]};function o5(_){return((_*=2)<=1?_*_*_:(_-=2)*_*_+2)/2}var n$={time:null,delay:0,duration:250,ease:o5};function e$(_,Q){var J;while(!(J=_.__transition)||!(J=J[Q]))if(!(_=_.parentNode))throw Error(`transition ${Q} not found`);return J}function _6(_){var Q,J;if(_ instanceof l1)Q=_._id,_=_._name;else Q=t5(),(J=n$).time=U5(),_=_==null?null:_+"";for(var q=this._groups,U=q.length,G=0;G<U;++G)for(var Z=q[G],F=Z.length,L,Y=0;Y<F;++Y)if(L=Z[Y])O0(L,_,Q,Y,Z,J||e$(L,Q));return new l1(q,this._parents,_,Q)}T0.prototype.interrupt=V3;T0.prototype.transition=_6;var H5=(_)=>()=>_;function Q6(_,{sourceEvent:Q,target:J,transform:q,dispatch:U}){Object.defineProperties(this,{type:{value:_,enumerable:!0,configurable:!0},sourceEvent:{value:Q,enumerable:!0,configurable:!0},target:{value:J,enumerable:!0,configurable:!0},transform:{value:q,enumerable:!0,configurable:!0},_:{value:U}})}function U0(_,Q,J){this.k=_,this.x=Q,this.y=J}U0.prototype={constructor:U0,scale:function(_){return _===1?this:new U0(this.k*_,this.x,this.y)},translate:function(_,Q){return _===0&Q===0?this:new U0(this.k,this.x+this.k*_,this.y+this.k*Q)},apply:function(_){return[_[0]*this.k+this.x,_[1]*this.k+this.y]},applyX:function(_){return _*this.k+this.x},applyY:function(_){return _*this.k+this.y},invert:function(_){return[(_[0]-this.x)/this.k,(_[1]-this.y)/this.k]},invertX:function(_){return(_-this.x)/this.k},invertY:function(_){return(_-this.y)/this.k},rescaleX:function(_){return _.copy().domain(_.range().map(this.invertX,this).map(_.invert,_))},rescaleY:function(_){return _.copy().domain(_.range().map(this.invertY,this).map(_.invert,_))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Q2=new U0(1,0,0);X5.prototype=U0.prototype;function X5(_){while(!_.__zoom)if(!(_=_.parentNode))return Q2;return _.__zoom}function n5(_){_.stopImmediatePropagation()}function J2(_){_.preventDefault(),_.stopImmediatePropagation()}function _q(_){return(!_.ctrlKey||_.type==="wheel")&&!_.button}function Qq(){var _=this;if(_ instanceof SVGElement){if(_=_.ownerSVGElement||_,_.hasAttribute("viewBox"))return _=_.viewBox.baseVal,[[_.x,_.y],[_.x+_.width,_.y+_.height]];return[[0,0],[_.width.baseVal.value,_.height.baseVal.value]]}return[[0,0],[_.clientWidth,_.clientHeight]]}function r8(){return this.__zoom||Q2}function Jq(_){return-_.deltaY*(_.deltaMode===1?0.05:_.deltaMode?1:0.002)*(_.ctrlKey?10:1)}function $q(){return navigator.maxTouchPoints||"ontouchstart"in this}function qq(_,Q,J){var q=_.invertX(Q[0][0])-J[0][0],U=_.invertX(Q[1][0])-J[1][0],G=_.invertY(Q[0][1])-J[0][1],Z=_.invertY(Q[1][1])-J[1][1];return _.translate(U>q?(q+U)/2:Math.min(0,q)||Math.max(0,U),Z>G?(G+Z)/2:Math.min(0,G)||Math.max(0,Z))}function Y5(){var _=_q,Q=Qq,J=qq,q=Jq,U=$q,G=[0,1/0],Z=[[-1/0,-1/0],[1/0,1/0]],F=250,L=e0,Y=a0("start","zoom","end"),H,K,X,z=500,W=150,O=0,T=10;function B(k){k.property("__zoom",r8).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",v).filter(U).on("touchstart.zoom",j).on("touchmove.zoom",m).on("touchend.zoom touchcancel.zoom",p).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}B.transform=function(k,D,V,E){var u=k.selection?k.selection():k;if(u.property("__zoom",r8),k!==u)I(k,D,V,E);else u.interrupt().each(function(){C(this,arguments).event(E).start().zoom(null,typeof D==="function"?D.apply(this,arguments):D).end()})},B.scaleBy=function(k,D,V,E){B.scaleTo(k,function(){var u=this.__zoom.k,h=typeof D==="function"?D.apply(this,arguments):D;return u*h},V,E)},B.scaleTo=function(k,D,V,E){B.transform(k,function(){var u=Q.apply(this,arguments),h=this.__zoom,f=V==null?R(u):typeof V==="function"?V.apply(this,arguments):V,y=h.invert(f),g=typeof D==="function"?D.apply(this,arguments):D;return J(A(w(h,g),f,y),u,Z)},V,E)},B.translateBy=function(k,D,V,E){B.transform(k,function(){return J(this.__zoom.translate(typeof D==="function"?D.apply(this,arguments):D,typeof V==="function"?V.apply(this,arguments):V),Q.apply(this,arguments),Z)},null,E)},B.translateTo=function(k,D,V,E,u){B.transform(k,function(){var h=Q.apply(this,arguments),f=this.__zoom,y=E==null?R(h):typeof E==="function"?E.apply(this,arguments):E;return J(Q2.translate(y[0],y[1]).scale(f.k).translate(typeof D==="function"?-D.apply(this,arguments):-D,typeof V==="function"?-V.apply(this,arguments):-V),h,Z)},E,u)};function w(k,D){return D=Math.max(G[0],Math.min(G[1],D)),D===k.k?k:new U0(D,k.x,k.y)}function A(k,D,V){var E=D[0]-V[0]*k.k,u=D[1]-V[1]*k.k;return E===k.x&&u===k.y?k:new U0(k.k,E,u)}function R(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function I(k,D,V,E){k.on("start.zoom",function(){C(this,arguments).event(E).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(E).end()}).tween("zoom",function(){var u=this,h=arguments,f=C(u,h).event(E),y=Q.apply(u,h),g=V==null?R(y):typeof V==="function"?V.apply(u,h):V,b=Math.max(y[1][0]-y[0][0],y[1][1]-y[0][1]),t=u.__zoom,o=typeof D==="function"?D.apply(u,h):D,d=L(t.invert(g).concat(b/t.k),o.invert(g).concat(b/o.k));return function(a){if(a===1)a=o;else{var c=d(a),n=b/c[2];a=new U0(n,g[0]-c[0]*n,g[1]-c[1]*n)}f.zoom(null,a)}})}function C(k,D,V){return!V&&k.__zooming||new P(k,D)}function P(k,D){this.that=k,this.args=D,this.active=0,this.sourceEvent=null,this.extent=Q.apply(k,D),this.taps=0}P.prototype={event:function(k){if(k)this.sourceEvent=k;return this},start:function(){if(++this.active===1)this.that.__zooming=this,this.emit("start");return this},zoom:function(k,D){if(this.mouse&&k!=="mouse")this.mouse[1]=D.invert(this.mouse[0]);if(this.touch0&&k!=="touch")this.touch0[1]=D.invert(this.touch0[0]);if(this.touch1&&k!=="touch")this.touch1[1]=D.invert(this.touch1[0]);return this.that.__zoom=D,this.emit("zoom"),this},end:function(){if(--this.active===0)delete this.that.__zooming,this.emit("end");return this},emit:function(k){var D=v1(this.that).datum();Y.call(k,this.that,new Q6(k,{sourceEvent:this.sourceEvent,target:B,type:k,transform:this.that.__zoom,dispatch:Y}),D)}};function S(k,...D){if(!_.apply(this,arguments))return;var V=C(this,D).event(k),E=this.__zoom,u=Math.max(G[0],Math.min(G[1],E.k*Math.pow(2,q.apply(this,arguments)))),h=m1(k);if(V.wheel){if(V.mouse[0][0]!==h[0]||V.mouse[0][1]!==h[1])V.mouse[1]=E.invert(V.mouse[0]=h);clearTimeout(V.wheel)}else if(E.k===u)return;else V.mouse=[h,E.invert(h)],u0(this),V.start();J2(k),V.wheel=setTimeout(f,W),V.zoom("mouse",J(A(w(E,u),V.mouse[0],V.mouse[1]),V.extent,Z));function f(){V.wheel=null,V.end()}}function N(k,...D){if(X||!_.apply(this,arguments))return;var V=k.currentTarget,E=C(this,D,!0).event(k),u=v1(k.view).on("mousemove.zoom",g,!0).on("mouseup.zoom",b,!0),h=m1(k,V),f=k.clientX,y=k.clientY;f2(k.view),n5(k),E.mouse=[h,this.__zoom.invert(h)],u0(this),E.start();function g(t){if(J2(t),!E.moved){var o=t.clientX-f,d=t.clientY-y;E.moved=o*o+d*d>O}E.event(t).zoom("mouse",J(A(E.that.__zoom,E.mouse[0]=m1(t,V),E.mouse[1]),E.extent,Z))}function b(t){u.on("mousemove.zoom mouseup.zoom",null),r2(t.view,E.moved),J2(t),E.event(t).end()}}function v(k,...D){if(!_.apply(this,arguments))return;var V=this.__zoom,E=m1(k.changedTouches?k.changedTouches[0]:k,this),u=V.invert(E),h=V.k*(k.shiftKey?0.5:2),f=J(A(w(V,h),E,u),Q.apply(this,D),Z);if(J2(k),F>0)v1(this).transition().duration(F).call(I,f,E,k);else v1(this).call(B.transform,f,E,k)}function j(k,...D){if(!_.apply(this,arguments))return;var V=k.touches,E=V.length,u=C(this,D,k.changedTouches.length===E).event(k),h,f,y,g;n5(k);for(f=0;f<E;++f)if(y=V[f],g=m1(y,this),g=[g,this.__zoom.invert(g),y.identifier],!u.touch0)u.touch0=g,h=!0,u.taps=1+!!H;else if(!u.touch1&&u.touch0[2]!==g[2])u.touch1=g,u.taps=0;if(H)H=clearTimeout(H);if(h){if(u.taps<2)K=g[0],H=setTimeout(function(){H=null},z);u0(this),u.start()}}function m(k,...D){if(!this.__zooming)return;var V=C(this,D).event(k),E=k.changedTouches,u=E.length,h,f,y,g;J2(k);for(h=0;h<u;++h)if(f=E[h],y=m1(f,this),V.touch0&&V.touch0[2]===f.identifier)V.touch0[0]=y;else if(V.touch1&&V.touch1[2]===f.identifier)V.touch1[0]=y;if(f=V.that.__zoom,V.touch1){var b=V.touch0[0],t=V.touch0[1],o=V.touch1[0],d=V.touch1[1],a=(a=o[0]-b[0])*a+(a=o[1]-b[1])*a,c=(c=d[0]-t[0])*c+(c=d[1]-t[1])*c;f=w(f,Math.sqrt(a/c)),y=[(b[0]+o[0])/2,(b[1]+o[1])/2],g=[(t[0]+d[0])/2,(t[1]+d[1])/2]}else if(V.touch0)y=V.touch0[0],g=V.touch0[1];else return;V.zoom("touch",J(A(f,y,g),V.extent,Z))}function p(k,...D){if(!this.__zooming)return;var V=C(this,D).event(k),E=k.changedTouches,u=E.length,h,f;if(n5(k),X)clearTimeout(X);X=setTimeout(function(){X=null},z);for(h=0;h<u;++h)if(f=E[h],V.touch0&&V.touch0[2]===f.identifier)delete V.touch0;else if(V.touch1&&V.touch1[2]===f.identifier)delete V.touch1;if(V.touch1&&!V.touch0)V.touch0=V.touch1,delete V.touch1;if(V.touch0)V.touch0[1]=this.__zoom.invert(V.touch0[0]);else if(V.end(),V.taps===2){if(f=m1(f,this),Math.hypot(K[0]-f[0],K[1]-f[1])<T){var y=v1(this).on("dblclick.zoom");if(y)y.apply(this,arguments)}}}return B.wheelDelta=function(k){return arguments.length?(q=typeof k==="function"?k:H5(+k),B):q},B.filter=function(k){return arguments.length?(_=typeof k==="function"?k:H5(!!k),B):_},B.touchable=function(k){return arguments.length?(U=typeof k==="function"?k:H5(!!k),B):U},B.extent=function(k){return arguments.length?(Q=typeof k==="function"?k:H5([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),B):Q},B.scaleExtent=function(k){return arguments.length?(G[0]=+k[0],G[1]=+k[1],B):[G[0],G[1]]},B.translateExtent=function(k){return arguments.length?(Z[0][0]=+k[0][0],Z[1][0]=+k[1][0],Z[0][1]=+k[0][1],Z[1][1]=+k[1][1],B):[[Z[0][0],Z[0][1]],[Z[1][0],Z[1][1]]]},B.constrain=function(k){return arguments.length?(J=k,B):J},B.duration=function(k){return arguments.length?(F=+k,B):F},B.interpolate=function(k){return arguments.length?(L=k,B):L},B.on=function(){var k=Y.on.apply(Y,arguments);return k===Y?B:k},B.clickDistance=function(k){return arguments.length?(O=(k=+k)*k,B):Math.sqrt(O)},B.tapDistance=function(k){return arguments.length?(T=+k,B):T},B}var r1={error001:(_="react")=>`Seems like you have not used ${_==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${_}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:(_)=>`Node type "${_}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:(_)=>`The old edge with id=${_} does not exist.`,error009:(_)=>`Marker type "${_}" doesn't exist.`,error008:(_,{id:Q,sourceHandle:J,targetHandle:q})=>`Couldn't create edge for ${_} handle id: "${_==="source"?J:q}", edge id: ${Q}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:(_)=>`Edge type "${_}" not found. Using fallback type "default".`,error012:(_)=>`Node with id "${_}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(_="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${_}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:(_)=>`Edge with id "${_}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},v2=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],G6=["Enter"," ","Escape"],Z6={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:_,x:Q,y:J})=>`Moved selected node ${_}. New position, x: ${Q}, y: ${J}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},E0;(function(_){_.Strict="strict",_.Loose="loose"})(E0||(E0={}));var I0;(function(_){_.Free="free",_.Vertical="vertical",_.Horizontal="horizontal"})(I0||(I0={}));var $2;(function(_){_.Partial="partial",_.Full="full"})($2||($2={}));var F6={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},W0;(function(_){_.Bezier="default",_.Straight="straight",_.Step="step",_.SmoothStep="smoothstep",_.SimpleBezier="simplebezier"})(W0||(W0={}));var k2;(function(_){_.Arrow="arrow",_.ArrowClosed="arrowclosed"})(k2||(k2={}));var $1;(function(_){_.Left="left",_.Top="top",_.Right="right",_.Bottom="bottom"})($1||($1={}));var i8={[$1.Left]:$1.Right,[$1.Right]:$1.Left,[$1.Top]:$1.Bottom,[$1.Bottom]:$1.Top},K6=(_)=>!!_&&typeof _==="object"&&("id"in _)&&("source"in _)&&("target"in _),G7=(_)=>!!_&&typeof _==="object"&&("id"in _)&&("position"in _)&&!("source"in _)&&!("target"in _),H6=(_)=>!!_&&typeof _==="object"&&("id"in _)&&("internals"in _)&&!("source"in _)&&!("target"in _);var z5=(_,Q=[0,0])=>{let{width:J,height:q}=Q0(_),U=_.origin??Q,G=J*U[0],Z=q*U[1];return{x:_.position.x-G,y:_.position.y-Z}},X6=(_,Q={nodeOrigin:[0,0]})=>{if(!Q.nodeLookup)console.warn("Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows.");if(_.length===0)return{x:0,y:0,width:0,height:0};let J=!1,q=_.reduce((U,G)=>{let Z=typeof G==="string",F=!Q.nodeLookup&&!Z?G:void 0;if(Q.nodeLookup)F=Z?Q.nodeLookup.get(G):!H6(G)?Q.nodeLookup.get(G.id):G;if(!F)return U;return J=!0,q4(U,Q4(F,Q.nodeOrigin))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return J?U4(q):{x:0,y:0,width:0,height:0}},Z2=(_,Q={})=>{let J={x:1/0,y:1/0,x2:-1/0,y2:-1/0},q=!1;return _.forEach((U)=>{if(Q.filter===void 0||Q.filter(U))J=q4(J,Q4(U)),q=!0}),q?U4(J):{x:0,y:0,width:0,height:0}},J4=(_,Q,[J,q,U]=[0,0,1],G=!1,Z=!1)=>{let F=(Q.x-J)/U,L=(Q.y-q)/U,Y=Q.width/U,H=Q.height/U,K=[];for(let X of _.values()){let{measured:z,selectable:W=!0,hidden:O=!1}=X;if(Z&&!W||O)continue;let T=z.width??X.width??X.initialWidth??0,B=z.height??X.height??X.initialHeight??0,{x:w,y:A}=X.internals.positionAbsolute,R=X7(F,L,Y,H,w,A,T,B),I=T*B,C=G&&R>0;if(!X.internals.handleBounds||C||R>=I||X.dragging)K.push(X)}return K},Z7=(_,Q)=>{let J=new Set;return _.forEach((q)=>{J.add(q.id)}),Q.filter((q)=>J.has(q.source)||J.has(q.target))};function Uq(_,Q){let J=new Map,q=Q?.nodes?new Set(Q.nodes.map((U)=>U.id)):null;return _.forEach((U)=>{let G;if(Q?.includeHiddenNodes){let{width:Z,height:F}=Q0(U);G=Z>0&&F>0}else G=Boolean(U.measured.width&&U.measured.height&&!U.hidden);if(G&&(!q||q.has(U.id)))J.set(U.id,U)}),J}async function F7({nodes:_,width:Q,height:J,panZoom:q,minZoom:U,maxZoom:G},Z){if(_.size===0)return!0;let F=Uq(_,Z),L=Z2(F),Y=A5(L,Q,J,Z?.minZoom??U,Z?.maxZoom??G,Z?.padding??0.1);return await q.setViewport(Y,{duration:Z?.duration,ease:Z?.ease,interpolate:Z?.interpolate}),!0}function Y6({nodeId:_,nextPosition:Q,nodeLookup:J,nodeOrigin:q=[0,0],nodeExtent:U,onError:G}){let Z=J.get(_),F=Z.parentId?J.get(Z.parentId):void 0,{x:L,y:Y}=F?F.internals.positionAbsolute:{x:0,y:0},H=Z.origin??q,K=Z.extent||U;if(Z.extent==="parent"&&!Z.expandParent)if(!F)G?.("005",r1.error005());else{let{width:z,height:W}=Q0(F);if(z&&W)K=[[L,Y],[L+z,Y+W]]}else if(F&&G2(Z.extent))K=[[Z.extent[0][0]+L,Z.extent[0][1]+Y],[Z.extent[1][0]+L,Z.extent[1][1]+Y]];let X=G2(K)?q2(Q,K,Z.measured):Q;if(Z.measured.width===void 0||Z.measured.height===void 0)G?.("015",r1.error015());return{position:{x:X.x-L+(Z.measured.width??0)*H[0],y:X.y-Y+(Z.measured.height??0)*H[1]},positionAbsolute:X}}async function K7({nodesToRemove:_=[],edgesToRemove:Q=[],nodes:J,edges:q,onBeforeDelete:U}){let G=new Set(_.map((X)=>X.id)),Z=[];for(let X of J){if(X.deletable===!1)continue;let z=G.has(X.id),W=!z&&X.parentId&&Z.find((O)=>O.id===X.parentId);if(z||W)Z.push(X)}let F=new Set(Q.map((X)=>X.id)),L=q.filter((X)=>X.deletable!==!1),H=Z7(Z,L);for(let X of L)if(F.has(X.id)&&!H.find((W)=>W.id===X.id))H.push(X);if(!U)return{edges:H,nodes:Z};let K=await U({nodes:Z,edges:H});if(typeof K==="boolean")return K?{edges:H,nodes:Z}:{edges:[],nodes:[]};return K}var y2=(_,Q=0,J=1)=>Math.min(Math.max(_,Q),J),q2=(_={x:0,y:0},Q,J)=>({x:y2(_.x,Q[0][0],Q[1][0]-(J?.width??0)),y:y2(_.y,Q[0][1],Q[1][1]-(J?.height??0))});function H7(_,Q,J){let{width:q,height:U}=Q0(J),{x:G,y:Z}=J.internals.positionAbsolute;return q2(_,[[G,Z],[G+q,Z+U]],Q)}var d8=(_,Q,J)=>{if(_<Q)return y2(Math.abs(_-Q),1,Q)/Q;else if(_>J)return-y2(Math.abs(_-J),1,Q)/Q;return 0},$4=(_,Q,J=15,q=40)=>{let U=d8(_.x,q,Q.width-q)*J,G=d8(_.y,q,Q.height-q)*J;return[U,G]},q4=(_,Q)=>({x:Math.min(_.x,Q.x),y:Math.min(_.y,Q.y),x2:Math.max(_.x2,Q.x2),y2:Math.max(_.y2,Q.y2)}),U6=({x:_,y:Q,width:J,height:q})=>({x:_,y:Q,x2:_+J,y2:Q+q}),U4=({x:_,y:Q,x2:J,y2:q})=>({x:_,y:Q,width:J-_,height:q-Q}),j2=(_,Q=[0,0])=>{let{x:J,y:q}=H6(_)?_.internals.positionAbsolute:z5(_,Q);return{x:J,y:q,width:_.measured?.width??_.width??_.initialWidth??0,height:_.measured?.height??_.height??_.initialHeight??0}},Q4=(_,Q=[0,0])=>{let{x:J,y:q}=H6(_)?_.internals.positionAbsolute:z5(_,Q);return{x:J,y:q,x2:J+(_.measured?.width??_.width??_.initialWidth??0),y2:q+(_.measured?.height??_.height??_.initialHeight??0)}},L6=(_,Q)=>U4(q4(U6(_),U6(Q))),X7=(_,Q,J,q,U,G,Z,F)=>{let L=Math.max(0,Math.min(_+J,U+Z)-Math.max(_,U)),Y=Math.max(0,Math.min(Q+q,G+F)-Math.max(Q,G));return Math.ceil(L*Y)},W5=(_,Q)=>X7(_.x,_.y,_.width,_.height,Q.x,Q.y,Q.width,Q.height),z6=(_)=>e1(_.width)&&e1(_.height)&&e1(_.x)&&e1(_.y),e1=(_)=>!isNaN(_)&&isFinite(_),W6=(_,Q)=>(J,q)=>{console.warn(`[${_}]: ${q} Help: ${Q}error#${J}`)},V2=(_,Q=[1,1])=>{return{x:Q[0]*Math.round(_.x/Q[0]),y:Q[1]*Math.round(_.y/Q[1])}},u2=({x:_,y:Q},[J,q,U],G=!1,Z=[1,1])=>{let F={x:(_-J)/U,y:(Q-q)/U};return G?V2(F,Z):F},U2=({x:_,y:Q},[J,q,U])=>{return{x:_*U+J,y:Q*U+q}};function S2(_,Q){if(typeof _==="number")return Math.floor((Q-Q/(1+_))*0.5);if(typeof _==="string"&&_.endsWith("px")){let J=parseFloat(_);if(!Number.isNaN(J))return Math.floor(J)}if(typeof _==="string"&&_.endsWith("%")){let J=parseFloat(_);if(!Number.isNaN(J))return Math.floor(Q*J*0.01)}return console.error(`The padding value "${_}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Gq(_,Q,J){if(typeof _==="string"||typeof _==="number"){let q=S2(_,J),U=S2(_,Q);return{top:q,right:U,bottom:q,left:U,x:U*2,y:q*2}}if(typeof _==="object"){let q=S2(_.top??_.y??0,J),U=S2(_.bottom??_.y??0,J),G=S2(_.left??_.x??0,Q),Z=S2(_.right??_.x??0,Q);return{top:q,right:Z,bottom:U,left:G,x:G+Z,y:q+U}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Zq(_,Q,J,q,U,G){let{x:Z,y:F}=U2(_,[Q,J,q]),{x:L,y:Y}=U2({x:_.x+_.width,y:_.y+_.height},[Q,J,q]),H=U-L,K=G-Y;return{left:Math.floor(Z),top:Math.floor(F),right:Math.floor(H),bottom:Math.floor(K)}}var A5=(_,Q,J,q,U,G)=>{let Z=Gq(G,Q,J),F=(Q-Z.x)/_.width,L=(J-Z.y)/_.height,Y=Math.min(F,L),H=y2(Y,q,U),K=_.x+_.width/2,X=_.y+_.height/2,z=Q/2-K*H,W=J/2-X*H,O=Zq(_,z,W,H,Q,J),T={left:Math.min(O.left-Z.left,0),top:Math.min(O.top-Z.top,0),right:Math.min(O.right-Z.right,0),bottom:Math.min(O.bottom-Z.bottom,0)};return{x:z-T.left+T.right,y:W-T.top+T.bottom,zoom:H}},b2=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function G2(_){return _!==void 0&&_!==null&&_!=="parent"}function Q0(_){return{width:_.measured?.width??_.width??_.initialWidth??0,height:_.measured?.height??_.height??_.initialHeight??0}}function A6(_){return(_.measured?.width??_.width??_.initialWidth)!==void 0&&(_.measured?.height??_.height??_.initialHeight)!==void 0}function B6(_,Q={width:0,height:0},J,q,U){let G={..._},Z=q.get(J);if(Z){let F=Z.origin||U;G.x+=Z.internals.positionAbsolute.x-(Q.width??0)*F[0],G.y+=Z.internals.positionAbsolute.y-(Q.height??0)*F[1]}return G}function M6(_,Q){if(_.size!==Q.size)return!1;for(let J of _)if(!Q.has(J))return!1;return!0}function Y7(){let _,Q;return{promise:new Promise((q,U)=>{_=q,Q=U}),resolve:_,reject:Q}}function L7(_){return{...Z6,..._||{}}}function Fq(_){if(typeof document>"u")return!0;let Q=document.querySelector(`.${_}-flow__pane`);if(!Q||!Q.isConnected)return!0;let J=getComputedStyle(Q);if(J.display==="none")return!0;if(J.visibility==="hidden"||J.visibility==="collapse")return!0;if(J.opacity==="0")return!0;if(J.width==="0"&&J.height==="0")return!0;let q=Q.getBoundingClientRect();if(q.width===0&&q.height===0)return!0;let U=document.querySelector(`.${_}-flow__attribution`);if(!U||!U.isConnected)return!1;let G=getComputedStyle(U);if(G.display==="none")return!1;if(G.visibility==="hidden"||G.visibility==="collapse")return!1;if(G.opacity==="0")return!1;let Z=U.getBoundingClientRect();if(Z.width===0&&Z.height===0)return!1;return!0}var a8=!1;function z7(_){if(a8)return;a8=!0;let Q=`${_.charAt(0).toUpperCase()+_.slice(1)} Flow`;setTimeout(()=>{if(!Fq(_))console.warn(`${Q}: It seems like you are hiding the attribution. Please only do this when you are subscribed to ${Q} Pro: https://${_}flow.dev/remove-attr
|
|
28
|
+
%cYou can ignore this warning if you are subscribed.`,"font-style: italic;")},1000)}function T6(_){return _===null?null:_?"valid":"invalid"}function L5(_,{snapGrid:Q=[0,0],snapToGrid:J=!1,transform:q,containerBounds:U}){let{x:G,y:Z}=_0(_),F=u2({x:G-(U?.left??0),y:Z-(U?.top??0)},q),{x:L,y:Y}=J?V2(F,Q):F;return{xSnapped:L,ySnapped:Y,...F}}var G4=(_)=>({width:_.offsetWidth,height:_.offsetHeight}),R6=(_)=>_?.getRootNode?.()||window?.document,Kq=["INPUT","SELECT","TEXTAREA"];function O6(_){let Q=_.composedPath?.()?.[0]||_.target;if(Q?.nodeType!==1)return!1;return Kq.includes(Q.nodeName)||Q.hasAttribute("contenteditable")||!!Q.closest(".nokey")}var f6=(_)=>("clientX"in _),_0=(_,Q)=>{let J=f6(_),q=J?_.clientX:_.touches?.[0].clientX,U=J?_.clientY:_.touches?.[0].clientY;return{x:q-(Q?.left??0),y:U-(Q?.top??0)}},s8=(_,Q,J,q,U)=>{let G=Q.querySelectorAll(`.${_}`);if(!G||!G.length)return null;return Array.from(G).map((Z)=>{let F=Z.getBoundingClientRect();return{id:Z.getAttribute("data-handleid"),type:_,nodeId:U,position:Z.getAttribute("data-handlepos"),x:(F.left-J.left)/q,y:(F.top-J.top)/q,...G4(Z)}})};function Z4({sourceX:_,sourceY:Q,targetX:J,targetY:q,sourceControlX:U,sourceControlY:G,targetControlX:Z,targetControlY:F}){let L=_*0.125+U*0.375+Z*0.375+J*0.125,Y=Q*0.125+G*0.375+F*0.375+q*0.125,H=Math.abs(L-_),K=Math.abs(Y-Q);return[L,Y,H,K]}function e5(_,Q){if(_>=0)return 0.5*_;return Q*25*Math.sqrt(-_)}function t8({pos:_,x1:Q,y1:J,x2:q,y2:U,c:G}){switch(_){case $1.Left:return[Q-e5(Q-q,G),J];case $1.Right:return[Q+e5(q-Q,G),J];case $1.Top:return[Q,J-e5(J-U,G)];case $1.Bottom:return[Q,J+e5(U-J,G)]}}function F4({sourceX:_,sourceY:Q,sourcePosition:J=$1.Bottom,targetX:q,targetY:U,targetPosition:G=$1.Top,curvature:Z=0.25}){let[F,L]=t8({pos:J,x1:_,y1:Q,x2:q,y2:U,c:Z}),[Y,H]=t8({pos:G,x1:q,y1:U,x2:_,y2:Q,c:Z}),[K,X,z,W]=Z4({sourceX:_,sourceY:Q,targetX:q,targetY:U,sourceControlX:F,sourceControlY:L,targetControlX:Y,targetControlY:H});return[`M${_},${Q} C${F},${L} ${Y},${H} ${q},${U}`,K,X,z,W]}function I6({sourceX:_,sourceY:Q,targetX:J,targetY:q}){let U=Math.abs(J-_)/2,G=J<_?J+U:J-U,Z=Math.abs(q-Q)/2,F=q<Q?q+Z:q-Z;return[G,F,U,Z]}function W7({sourceNode:_,targetNode:Q,selected:J=!1,zIndex:q=0,elevateOnSelect:U=!1,zIndexMode:G="basic"}){if(G==="manual")return q;let Z=U&&J?q+1000:q,F=Math.max(_.parentId||U&&_.selected?_.internals.z:0,Q.parentId||U&&Q.selected?Q.internals.z:0);return Z+F}function A7({sourceNode:_,targetNode:Q,width:J,height:q,transform:U}){let G=q4(Q4(_),Q4(Q));if(G.x===G.x2)G.x2+=1;if(G.y===G.y2)G.y2+=1;let Z={x:-U[0]/U[2],y:-U[1]/U[2],width:J/U[2],height:q/U[2]};return W5(Z,U4(G))>0}var Hq=({source:_,sourceHandle:Q,target:J,targetHandle:q})=>`xy-edge__${_}${Q||""}-${J}${q||""}`,Xq=(_,Q)=>{return Q.some((J)=>J.source===_.source&&J.target===_.target&&(J.sourceHandle===_.sourceHandle||!J.sourceHandle&&!_.sourceHandle)&&(J.targetHandle===_.targetHandle||!J.targetHandle&&!_.targetHandle))},B7=(_,Q,J={})=>{if(!_.source||!_.target)return J.onError?.("006",r1.error006()),Q;let q=J.getEdgeId||Hq,U;if(K6(_))U={..._};else U={..._,id:q(_)};if(Xq(U,Q))return Q;if(U.sourceHandle===null)delete U.sourceHandle;if(U.targetHandle===null)delete U.targetHandle;return Q.concat(U)};function K4({sourceX:_,sourceY:Q,targetX:J,targetY:q}){let[U,G,Z,F]=I6({sourceX:_,sourceY:Q,targetX:J,targetY:q});return[`M ${_},${Q}L ${J},${q}`,U,G,Z,F]}var o8={[$1.Left]:{x:-1,y:0},[$1.Right]:{x:1,y:0},[$1.Top]:{x:0,y:-1},[$1.Bottom]:{x:0,y:1}},Yq=({source:_,sourcePosition:Q=$1.Bottom,target:J})=>{if(Q===$1.Left||Q===$1.Right)return _.x<J.x?{x:1,y:0}:{x:-1,y:0};return _.y<J.y?{x:0,y:1}:{x:0,y:-1}},n8=(_,Q)=>Math.sqrt(Math.pow(Q.x-_.x,2)+Math.pow(Q.y-_.y,2));function Lq({source:_,sourcePosition:Q=$1.Bottom,target:J,targetPosition:q=$1.Top,center:U,offset:G,stepPosition:Z}){let F=o8[Q],L=o8[q],Y={x:_.x+F.x*G,y:_.y+F.y*G},H={x:J.x+L.x*G,y:J.y+L.y*G},K=Yq({source:Y,sourcePosition:Q,target:H}),X=K.x!==0?"x":"y",z=K[X],W=[],O,T,B={x:0,y:0},w={x:0,y:0},[,,A,R]=I6({sourceX:_.x,sourceY:_.y,targetX:J.x,targetY:J.y});if(F[X]*L[X]===-1){if(X==="x")O=U.x??Y.x+(H.x-Y.x)*Z,T=U.y??(Y.y+H.y)/2;else O=U.x??(Y.x+H.x)/2,T=U.y??Y.y+(H.y-Y.y)*Z;let S=[{x:O,y:Y.y},{x:O,y:H.y}],N=[{x:Y.x,y:T},{x:H.x,y:T}];if(F[X]===z)W=X==="x"?S:N;else W=X==="x"?N:S}else{let S=[{x:Y.x,y:H.y}],N=[{x:H.x,y:Y.y}];if(X==="x")W=F.x===z?N:S;else W=F.y===z?S:N;if(Q===q){let k=Math.abs(_[X]-J[X]);if(k<=G){let D=Math.min(G-1,G-k);if(F[X]===z)B[X]=(Y[X]>_[X]?-1:1)*D;else w[X]=(H[X]>J[X]?-1:1)*D}}if(Q!==q){let k=X==="x"?"y":"x",D=F[X]===L[k],V=Y[k]>H[k],E=Y[k]<H[k];if(F[X]===1&&(!D&&V||D&&E)||F[X]!==1&&(!D&&E||D&&V))W=X==="x"?S:N}let v={x:Y.x+B.x,y:Y.y+B.y},j={x:H.x+w.x,y:H.y+w.y},m=Math.max(Math.abs(v.x-W[0].x),Math.abs(j.x-W[0].x)),p=Math.max(Math.abs(v.y-W[0].y),Math.abs(j.y-W[0].y));if(m>=p)O=(v.x+j.x)/2,T=W[0].y;else O=W[0].x,T=(v.y+j.y)/2}let I={x:Y.x+B.x,y:Y.y+B.y},C={x:H.x+w.x,y:H.y+w.y};return[[_,...I.x!==W[0].x||I.y!==W[0].y?[I]:[],...W,...C.x!==W[W.length-1].x||C.y!==W[W.length-1].y?[C]:[],J],O,T,A,R]}function zq(_,Q,J,q){let U=Math.min(n8(_,Q)/2,n8(Q,J)/2,q),{x:G,y:Z}=Q;if(_.x===G&&G===J.x||_.y===Z&&Z===J.y)return`L${G} ${Z}`;if(_.y===Z){let Y=_.x<J.x?-1:1,H=_.y<J.y?1:-1;return`L ${G+U*Y},${Z}Q ${G},${Z} ${G},${Z+U*H}`}let F=_.x<J.x?1:-1,L=_.y<J.y?-1:1;return`L ${G},${Z+U*L}Q ${G},${Z} ${G+U*F},${Z}`}function B5({sourceX:_,sourceY:Q,sourcePosition:J=$1.Bottom,targetX:q,targetY:U,targetPosition:G=$1.Top,borderRadius:Z=5,centerX:F,centerY:L,offset:Y=20,stepPosition:H=0.5}){let[K,X,z,W,O]=Lq({source:{x:_,y:Q},sourcePosition:J,target:{x:q,y:U},targetPosition:G,center:{x:F,y:L},offset:Y,stepPosition:H}),T=`M${K[0].x} ${K[0].y}`;for(let B=1;B<K.length-1;B++)T+=zq(K[B-1],K[B],K[B+1],Z);return T+=`L${K[K.length-1].x} ${K[K.length-1].y}`,[T,X,z,W,O]}function e8(_){return _&&!!(_.internals.handleBounds||_.handles?.length)&&!!(_.measured.width||_.width||_.initialWidth)}function M7(_){let{sourceNode:Q,targetNode:J}=_;if(!e8(Q)||!e8(J))return null;let q=Q.internals.handleBounds||_7(Q.handles),U=J.internals.handleBounds||_7(J.handles),G=Q7(q?.source??[],_.sourceHandle),Z=Q7(_.connectionMode===E0.Strict?U?.target??[]:(U?.target??[]).concat(U?.source??[]),_.targetHandle);if(!G||!Z)return _.onError?.("008",r1.error008(!G?"source":"target",{id:_.id,sourceHandle:_.sourceHandle,targetHandle:_.targetHandle})),null;let F=G?.position||$1.Bottom,L=Z?.position||$1.Top,Y=x0(Q,G,F),H=x0(J,Z,L);return{sourceX:Y.x,sourceY:Y.y,targetX:H.x,targetY:H.y,sourcePosition:F,targetPosition:L}}function _7(_){if(!_)return null;let Q=[],J=[];for(let q of _)if(q.width=q.width??1,q.height=q.height??1,q.type==="source")Q.push(q);else if(q.type==="target")J.push(q);return{source:Q,target:J}}function x0(_,Q,J=$1.Left,q=!1){let U=(Q?.x??0)+_.internals.positionAbsolute.x,G=(Q?.y??0)+_.internals.positionAbsolute.y,{width:Z,height:F}=Q??Q0(_);if(q)return{x:U+Z/2,y:G+F/2};switch(Q?.position??J){case $1.Top:return{x:U+Z/2,y:G};case $1.Right:return{x:U+Z,y:G+F/2};case $1.Bottom:return{x:U+Z/2,y:G+F};case $1.Left:return{x:U,y:G+F/2}}}function Q7(_,Q){if(!_)return null;return(!Q?_[0]:_.find((J)=>J.id===Q))||null}function H4(_,Q){if(!_)return"";if(typeof _==="string")return _;return`${Q?`${Q}__`:""}${Object.keys(_).sort().map((q)=>`${q}=${_[q]}`).join("&")}`}function T7(_,{id:Q,defaultColor:J,defaultMarkerStart:q,defaultMarkerEnd:U}){let G=new Set;return _.reduce((Z,F)=>{return[F.markerStart||q,F.markerEnd||U].forEach((L)=>{if(L&&typeof L==="object"){let Y=H4(L,Q);if(!G.has(Y))Z.push({id:Y,color:L.color||J,...L}),G.add(Y)}}),Z},[]).sort((Z,F)=>Z.id.localeCompare(F.id))}function R7(_,Q,J,q,U){let G=0.5;if(U==="start")G=0;else if(U==="end")G=1;let Z=[(_.x+_.width*G)*Q.zoom+Q.x,_.y*Q.zoom+Q.y-q],F=[-100*G,-100];switch(J){case $1.Right:Z=[(_.x+_.width)*Q.zoom+Q.x+q,(_.y+_.height*G)*Q.zoom+Q.y],F=[0,-100*G];break;case $1.Bottom:Z[1]=(_.y+_.height)*Q.zoom+Q.y+q,F[1]=0;break;case $1.Left:Z=[_.x*Q.zoom+Q.x-q,(_.y+_.height*G)*Q.zoom+Q.y],F=[-100,-100*G];break}return`translate(${Z[0]}px, ${Z[1]}px) translate(${F[0]}%, ${F[1]}%)`}var O7=1000,Wq=10,w6={nodeOrigin:[0,0],nodeExtent:v2,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Aq={...w6,checkEquality:!0};function P6(_,Q){let J={..._};for(let q in Q)if(Q[q]!==void 0)J[q]=Q[q];return J}function f7(_,Q,J){let q=P6(w6,J);for(let U of _.values())if(U.parentId)C6(U,_,Q,q);else{let G=z5(U,q.nodeOrigin),Z=G2(U.extent)?U.extent:q.nodeExtent,F=q2(G,Z,Q0(U));U.internals.positionAbsolute=F}}function Bq(_,Q){if(!_.handles)return!_.measured?void 0:Q?.internals.handleBounds;let J=[],q=[];for(let U of _.handles){let G={id:U.id,width:U.width??1,height:U.height??1,nodeId:_.id,x:U.x,y:U.y,position:U.position,type:U.type};if(U.type==="source")J.push(G);else if(U.type==="target")q.push(G)}return{source:J,target:q}}function N6(_){return _==="manual"}function X4(_,Q,J,q={}){let U=P6(Aq,q),G={i:0},Z=new Map(Q),F=U?.elevateNodesOnSelect&&!N6(U.zIndexMode)?O7:0,L=_.length>0,Y=!1;Q.clear(),J.clear();for(let H of _){let K=Z.get(H.id);if(U.checkEquality&&H===K?.internals.userNode)Q.set(H.id,K);else{let X=z5(H,U.nodeOrigin),z=G2(H.extent)?H.extent:U.nodeExtent,W=q2(X,z,Q0(H));K={...U.defaults,...H,measured:{width:H.measured?.width,height:H.measured?.height},internals:{positionAbsolute:W,handleBounds:Bq(H,K),z:I7(H,F,U.zIndexMode),userNode:H}},Q.set(H.id,K)}if((K.measured===void 0||K.measured.width===void 0||K.measured.height===void 0)&&!K.hidden)L=!1;if(H.parentId)C6(K,Q,J,q,G);Y||=H.selected??!1}return{nodesInitialized:L,hasSelectedNodes:Y}}function Mq(_,Q){if(!_.parentId)return;let J=Q.get(_.parentId);if(J)J.set(_.id,_);else Q.set(_.parentId,new Map([[_.id,_]]))}function C6(_,Q,J,q,U){let{elevateNodesOnSelect:G,nodeOrigin:Z,nodeExtent:F,zIndexMode:L}=P6(w6,q),Y=_.parentId,H=Q.get(Y);if(!H){console.warn(`Parent node ${Y} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}if(Mq(_,J),U&&!H.parentId&&H.internals.rootParentIndex===void 0&&L==="auto")H.internals.rootParentIndex=++U.i,H.internals.z=H.internals.z+U.i*Wq;if(U&&H.internals.rootParentIndex!==void 0)U.i=H.internals.rootParentIndex;let K=G&&!N6(L)?O7:0,{x:X,y:z,z:W}=Tq(_,H,Z,F,K,L),{positionAbsolute:O}=_.internals,T=X!==O.x||z!==O.y;if(T||W!==_.internals.z)Q.set(_.id,{..._,internals:{..._.internals,positionAbsolute:T?{x:X,y:z}:O,z:W}})}function I7(_,Q,J){let q=e1(_.zIndex)?_.zIndex:0;if(N6(J))return q;return q+(_.selected?Q:0)}function Tq(_,Q,J,q,U,G){let{x:Z,y:F}=Q.internals.positionAbsolute,L=Q0(_),Y=z5(_,J),H=G2(_.extent)?q2(Y,_.extent,L):Y,K=q2({x:Z+H.x,y:F+H.y},q,L);if(_.extent==="parent")K=H7(K,L,Q);let X=I7(_,U,G),z=Q.internals.z??0;return{x:K.x,y:K.y,z:z>=X?z+1:X}}function Y4(_,Q,J,q=[0,0]){let U=[],G=new Map;for(let Z of _){let F=Q.get(Z.parentId);if(!F)continue;let L=G.get(Z.parentId)?.expandedRect??j2(F),Y=L6(L,Z.rect);G.set(Z.parentId,{expandedRect:Y,parent:F})}if(G.size>0)G.forEach(({expandedRect:Z,parent:F},L)=>{let Y=F.internals.positionAbsolute,H=Q0(F),K=F.origin??q,X=Z.x<Y.x?Math.round(Math.abs(Y.x-Z.x)):0,z=Z.y<Y.y?Math.round(Math.abs(Y.y-Z.y)):0,W=Math.max(H.width,Math.round(Z.width)),O=Math.max(H.height,Math.round(Z.height)),T=(W-H.width)*K[0],B=(O-H.height)*K[1];if(X>0||z>0||T||B)U.push({id:L,type:"position",position:{x:F.position.x-X+T,y:F.position.y-z+B}}),J.get(L)?.forEach((w)=>{if(!_.some((A)=>A.id===w.id))U.push({id:w.id,type:"position",position:{x:w.position.x+X,y:w.position.y+z}})});if(H.width<Z.width||H.height<Z.height||X||z)U.push({id:L,type:"dimensions",setAttributes:!0,dimensions:{width:W+(X?K[0]*X-T:0),height:O+(z?K[1]*z-B:0)}})});return U}function w7(_,Q,J,q,U,G,Z){let F=q?.querySelector(".xyflow__viewport"),L=!1;if(!F)return{changes:[],updatedInternals:L};let Y=[],H=window.getComputedStyle(F),{m22:K}=new window.DOMMatrixReadOnly(H.transform),X=[];for(let z of _.values()){let W=Q.get(z.id);if(!W)continue;if(W.hidden){Q.set(W.id,{...W,internals:{...W.internals,handleBounds:void 0}}),L=!0;continue}let O=G4(z.nodeElement),T=W.measured.width!==O.width||W.measured.height!==O.height;if(!!(O.width&&O.height&&(T||!W.internals.handleBounds||z.force))){let w=z.nodeElement.getBoundingClientRect(),A=G2(W.extent)?W.extent:G,{positionAbsolute:R}=W.internals;if(W.parentId&&W.extent==="parent"){let C=Q.get(W.parentId);if(C)R=H7(R,O,C)}else if(A)R=q2(R,A,O);let I={...W,measured:O,internals:{...W.internals,positionAbsolute:R,handleBounds:{source:s8("source",z.nodeElement,w,K,W.id),target:s8("target",z.nodeElement,w,K,W.id)}}};if(Q.set(W.id,I),W.parentId)C6(I,Q,J,{nodeOrigin:U,zIndexMode:Z});if(L=!0,T){if(Y.push({id:W.id,type:"dimensions",dimensions:O}),W.expandParent&&W.parentId)X.push({id:W.id,parentId:W.parentId,rect:j2(I,U)})}}}if(X.length>0){let z=Y4(X,Q,J,U);Y.push(...z)}return{changes:Y,updatedInternals:L}}async function P7({delta:_,panZoom:Q,transform:J,translateExtent:q,width:U,height:G}){if(!Q||!_.x&&!_.y)return!1;let Z=await Q.setViewportConstrained({x:J[0]+_.x,y:J[1]+_.y,zoom:J[2]},[[0,0],[U,G]],q);return!!Z&&(Z.x!==J[0]||Z.y!==J[1]||Z.k!==J[2])}function J7(_,Q,J,q,U,G){let Z=U,F=q.get(Z)||new Map;q.set(Z,F.set(J,Q)),Z=`${U}-${_}`;let L=q.get(Z)||new Map;if(q.set(Z,L.set(J,Q)),G){Z=`${U}-${_}-${G}`;let Y=q.get(Z)||new Map;q.set(Z,Y.set(J,Q))}}function S6(_,Q,J){_.clear(),Q.clear();for(let q of J){let{source:U,target:G,sourceHandle:Z=null,targetHandle:F=null}=q,L={edgeId:q.id,source:U,target:G,sourceHandle:Z,targetHandle:F},Y=`${U}-${Z}--${G}-${F}`,H=`${G}-${F}--${U}-${Z}`;J7("source",L,H,_,U,Z),J7("target",L,Y,_,G,F),Q.set(q.id,q)}}function N7(_,Q){if(!_.parentId)return!1;let J=Q.get(_.parentId);if(!J)return!1;if(J.selected)return!0;return N7(J,Q)}function $7(_,Q,J){let q=_;do{if(q?.matches?.(Q))return!0;if(q===J)return!1;q=q?.parentElement}while(q);return!1}function Rq(_,Q,J,q){let U=new Map;for(let[G,Z]of _)if((Z.selected||Z.id===q)&&(!Z.parentId||!N7(Z,_))&&(Z.draggable||Q&&typeof Z.draggable>"u")){let F=_.get(G);if(F)U.set(G,{id:G,position:F.position||{x:0,y:0},distance:{x:J.x-F.internals.positionAbsolute.x,y:J.y-F.internals.positionAbsolute.y},extent:F.extent,parentId:F.parentId,origin:F.origin,expandParent:F.expandParent,internals:{positionAbsolute:F.internals.positionAbsolute||{x:0,y:0}},measured:{width:F.measured.width??0,height:F.measured.height??0}})}return U}function J6({nodeId:_,dragItems:Q,nodeLookup:J,dragging:q=!0}){let U=[];for(let[Z,F]of Q){let L=J.get(Z)?.internals.userNode;if(L)U.push({...L,position:F.position,dragging:q})}if(!_)return[U[0],U];let G=J.get(_)?.internals.userNode;return[!G?U[0]:{...G,position:Q.get(_)?.position||G.position,dragging:q},U]}function Oq({dragItems:_,snapGrid:Q,x:J,y:q}){let U=_.values().next().value;if(!U)return null;let G={x:J-U.distance.x,y:q-U.distance.y},Z=V2(G,Q);return{x:Z.x-G.x,y:Z.y-G.y}}function C7({onNodeMouseDown:_,getStoreItems:Q,onDragStart:J,onDrag:q,onDragStop:U}){let G={x:null,y:null},Z=0,F=new Map,L=!1,Y={x:0,y:0},H=null,K=!1,X=null,z=!1,W=!1,O=null;function T({noDragClassName:w,handleSelector:A,domNode:R,isSelectable:I,nodeId:C,nodeClickDistance:P=0}){X=v1(R);function S({x:m,y:p}){let{nodeLookup:k,nodeExtent:D,snapGrid:V,snapToGrid:E,nodeOrigin:u,onNodeDrag:h,onSelectionDrag:f,onError:y,updateNodePositions:g}=Q();G={x:m,y:p};let b=!1,t=F.size>1,o=t&&D?U6(Z2(F)):null,d=t&&E?Oq({dragItems:F,snapGrid:V,x:m,y:p}):null;for(let[a,c]of F){if(!k.has(a))continue;let n={x:m-c.distance.x,y:p-c.distance.y};if(E)n=d?{x:Math.round(n.x+d.x),y:Math.round(n.y+d.y)}:V2(n,V);let Q1=null;if(t&&D&&!c.extent&&o){let{positionAbsolute:U1}=c.internals,Y1=U1.x-o.x+D[0][0],s=U1.x+c.measured.width-o.x2+D[1][0],K1=U1.y-o.y+D[0][1],O1=U1.y+c.measured.height-o.y2+D[1][1];Q1=[[Y1,K1],[s,O1]]}let{position:F1,positionAbsolute:J1}=Y6({nodeId:a,nextPosition:n,nodeLookup:k,nodeExtent:Q1?Q1:D,nodeOrigin:u,onError:y});b=b||c.position.x!==F1.x||c.position.y!==F1.y,c.position=F1,c.internals.positionAbsolute=J1}if(W=W||b,!b)return;if(g(F,!0),O&&(q||h||!C&&f)){let[a,c]=J6({nodeId:C,dragItems:F,nodeLookup:k});if(q?.(O,F,a,c),h?.(O,a,c),!C)f?.(O,c)}}async function N(){if(!H)return;let{transform:m,panBy:p,autoPanSpeed:k,autoPanOnNodeDrag:D}=Q();if(!D){L=!1,cancelAnimationFrame(Z);return}let[V,E]=$4(Y,H,k);if(V!==0||E!==0){if(G.x=(G.x??0)-V/m[2],G.y=(G.y??0)-E/m[2],await p({x:V,y:E}))S(G)}Z=requestAnimationFrame(N)}function v(m){let{nodeLookup:p,multiSelectionActive:k,nodesDraggable:D,transform:V,snapGrid:E,snapToGrid:u,selectNodesOnDrag:h,onNodeDragStart:f,onSelectionDragStart:y,unselectNodesAndEdges:g}=Q();if(K=!0,(!h||!I)&&!k&&C){if(!p.get(C)?.selected)g()}if(I&&h&&C)_?.(C);let b=L5(m.sourceEvent,{transform:V,snapGrid:E,snapToGrid:u,containerBounds:H});if(G=b,F=Rq(p,D,b,C),F.size>0&&(J||f||!C&&y)){let[t,o]=J6({nodeId:C,dragItems:F,nodeLookup:p});if(J?.(m.sourceEvent,F,t,o),f?.(m.sourceEvent,t,o),!C)y?.(m.sourceEvent,o)}}let j=a2().clickDistance(P).on("start",(m)=>{let{domNode:p,nodeDragThreshold:k,transform:D,snapGrid:V,snapToGrid:E}=Q();if(H=p?.getBoundingClientRect()||null,z=!1,W=!1,O=m.sourceEvent,k===0)v(m);G=L5(m.sourceEvent,{transform:D,snapGrid:V,snapToGrid:E,containerBounds:H}),Y=_0(m.sourceEvent,H)}).on("drag",(m)=>{let{autoPanOnNodeDrag:p,transform:k,snapGrid:D,snapToGrid:V,nodeDragThreshold:E,nodeLookup:u}=Q(),h=L5(m.sourceEvent,{transform:k,snapGrid:D,snapToGrid:V,containerBounds:H});if(O=m.sourceEvent,m.sourceEvent.type==="touchmove"&&m.sourceEvent.touches.length>1||C&&!u.has(C))z=!0;if(z)return;if(!L&&p&&K)L=!0,N();if(!K){let f=_0(m.sourceEvent,H),y=f.x-Y.x,g=f.y-Y.y;if(Math.sqrt(y*y+g*g)>E)v(m)}if((G.x!==h.xSnapped||G.y!==h.ySnapped)&&F&&K)Y=_0(m.sourceEvent,H),S(h)}).on("end",(m)=>{if(!K||z){if(z&&F.size>0)Q().updateNodePositions(F,!1);return}if(L=!1,K=!1,cancelAnimationFrame(Z),F.size>0){let{nodeLookup:p,updateNodePositions:k,onNodeDragStop:D,onSelectionDragStop:V}=Q();if(W)k(F,!1),W=!1;if(U||D||!C&&V){let[E,u]=J6({nodeId:C,dragItems:F,nodeLookup:p,dragging:!1});if(U?.(m.sourceEvent,F,E,u),D?.(m.sourceEvent,E,u),!C)V?.(m.sourceEvent,u)}}}).filter((m)=>{let p=m.target;return!m.button&&(!w||!$7(p,`.${w}`,R))&&(!A||$7(p,A,R))});X.call(j)}function B(){X?.on(".drag",null)}return{update:T,destroy:B}}function fq(_,Q,J){let q=[],U={x:_.x-J,y:_.y-J,width:J*2,height:J*2};for(let G of Q.values())if(W5(U,j2(G))>0)q.push(G);return q}var Iq=250;function wq(_,Q,J,q){let U=[],G=1/0,Z=fq(_,J,Q+Iq);for(let F of Z){let L=[...F.internals.handleBounds?.source??[],...F.internals.handleBounds?.target??[]];for(let Y of L){if(q.nodeId===Y.nodeId&&q.type===Y.type&&q.id===Y.id)continue;let{x:H,y:K}=x0(F,Y,Y.position,!0),X=Math.sqrt(Math.pow(H-_.x,2)+Math.pow(K-_.y,2));if(X>Q)continue;if(X<G)U=[{...Y,x:H,y:K}],G=X;else if(X===G)U.push({...Y,x:H,y:K})}}if(!U.length)return null;if(U.length>1){let F=q.type==="source"?"target":"source";return U.find((L)=>L.type===F)??U[0]}return U[0]}function S7(_,Q,J,q,U,G=!1){let Z=q.get(_);if(!Z)return null;let F=U==="strict"?Z.internals.handleBounds?.[Q]:[...Z.internals.handleBounds?.source??[],...Z.internals.handleBounds?.target??[]],L=(J?F?.find((Y)=>Y.id===J):F?.[0])??null;return L&&G?{...L,...x0(Z,L,L.position,!0)}:L}function k7(_,Q){if(_)return _;else if(Q?.classList.contains("target"))return"target";else if(Q?.classList.contains("source"))return"source";return null}function Pq(_,Q){let J=null;if(Q)J=!0;else if(_&&!Q)J=!1;return J}var y7=()=>!0;function Nq(_,{connectionMode:Q,connectionRadius:J,handleId:q,nodeId:U,edgeUpdaterType:G,isTarget:Z,domNode:F,nodeLookup:L,lib:Y,autoPanOnConnect:H,flowId:K,panBy:X,cancelConnection:z,onConnectStart:W,onConnect:O,onConnectEnd:T,isValidConnection:B=y7,onReconnectEnd:w,updateConnection:A,getTransform:R,getFromHandle:I,autoPanSpeed:C,dragThreshold:P=1,handleDomNode:S}){let N=R6(_.target),v=0,j,{x:m,y:p}=_0(_),k=k7(G,S),D=F?.getBoundingClientRect(),V=!1;if(!D||!k)return;let E=S7(U,k,q,L,Q);if(!E)return;let u=_0(_,D),h=!1,f=null,y=!1,g=null;function b(){if(!H||!D)return;let[F1,J1]=$4(u,D,C);X({x:F1,y:J1}),v=requestAnimationFrame(b)}let t={...E,nodeId:U,type:k,position:E.position},o=L.get(U),a={inProgress:!0,isValid:null,from:x0(o,t,$1.Left,!0),fromHandle:t,fromPosition:t.position,fromNode:o,to:u,toHandle:null,toPosition:i8[t.position],toNode:null,pointer:u};function c(){V=!0,A(a),W?.(_,{nodeId:U,handleId:q,handleType:k})}if(P===0)c();function n(F1){if(!V){let{x:O1,y:Z1}=_0(F1),D1=O1-m,x1=Z1-p;if(!(D1*D1+x1*x1>P*P))return;c()}if(!I()||!t){Q1(F1);return}let J1=R();if(u=_0(F1,D),j=wq(u2(u,J1,!1,[1,1]),J,L,t),!h)b(),h=!0;let U1=v7(F1,{handle:j,connectionMode:Q,fromNodeId:U,fromHandleId:q,fromType:Z?"target":"source",isValidConnection:B,doc:N,lib:Y,flowId:K,nodeLookup:L});g=U1.handleDomNode,f=U1.connection,y=Pq(!!j,U1.isValid);let Y1=L.get(U),s=Y1?x0(Y1,t,$1.Left,!0):a.from,K1={...a,from:s,isValid:y,to:U1.toHandle&&y?U2({x:U1.toHandle.x,y:U1.toHandle.y},J1):u,toHandle:U1.toHandle,toPosition:y&&U1.toHandle?U1.toHandle.position:i8[t.position],toNode:U1.toHandle?L.get(U1.toHandle.nodeId):null,pointer:u};A(K1),a=K1}function Q1(F1){if("touches"in F1&&F1.touches.length>0)return;if(V){if((j||g)&&f&&y)O?.(f);let{inProgress:J1,...U1}=a,Y1={...U1,toPosition:a.toHandle?a.toPosition:null};if(T?.(F1,Y1),G)w?.(F1,Y1)}z(),cancelAnimationFrame(v),h=!1,y=!1,f=null,g=null,N.removeEventListener("mousemove",n),N.removeEventListener("mouseup",Q1),N.removeEventListener("touchmove",n),N.removeEventListener("touchend",Q1)}N.addEventListener("mousemove",n),N.addEventListener("mouseup",Q1),N.addEventListener("touchmove",n),N.addEventListener("touchend",Q1)}function v7(_,{handle:Q,connectionMode:J,fromNodeId:q,fromHandleId:U,fromType:G,doc:Z,lib:F,flowId:L,isValidConnection:Y=y7,nodeLookup:H}){let K=G==="target",X=Q?Z.querySelector(`.${F}-flow__handle[data-id="${L}-${Q?.nodeId}-${Q?.id}-${Q?.type}"]`):null,{x:z,y:W}=_0(_),O=Z.elementFromPoint(z,W),T=O?.classList.contains(`${F}-flow__handle`)?O:X,B={handleDomNode:T,isValid:!1,connection:null,toHandle:null};if(T){let w=k7(void 0,T),A=T.getAttribute("data-nodeid"),R=T.getAttribute("data-handleid"),I=T.classList.contains("connectable"),C=T.classList.contains("connectableend");if(!A||!w)return B;let P={source:K?A:q,sourceHandle:K?R:U,target:K?q:A,targetHandle:K?U:R};B.connection=P;let N=I&&C&&(J===E0.Strict?K&&w==="source"||!K&&w==="target":A!==q||R!==U);B.isValid=N&&Y(P),B.toHandle=S7(A,w,R,H,J,!0)}return B}var L4={onPointerDown:Nq,isValid:v7};function j7({domNode:_,panZoom:Q,getTransform:J,getViewScale:q}){let U=v1(_);function G({translateExtent:F,width:L,height:Y,zoomStep:H=1,pannable:K=!0,zoomable:X=!0,inversePan:z=!1}){let W=(A)=>{if(A.sourceEvent.type!=="wheel"||!Q)return;let R=J(),I=A.sourceEvent.ctrlKey&&b2()?10:1,C=-A.sourceEvent.deltaY*(A.sourceEvent.deltaMode===1?0.05:A.sourceEvent.deltaMode?1:0.002)*H,P=R[2]*Math.pow(2,C*I);Q.scaleTo(P)},O=[0,0],T=(A)=>{if(A.sourceEvent.type==="mousedown"||A.sourceEvent.type==="touchstart")O=[A.sourceEvent.clientX??A.sourceEvent.touches[0].clientX,A.sourceEvent.clientY??A.sourceEvent.touches[0].clientY]},B=(A)=>{let R=J();if(A.sourceEvent.type!=="mousemove"&&A.sourceEvent.type!=="touchmove"||!Q)return;let I=[A.sourceEvent.clientX??A.sourceEvent.touches[0].clientX,A.sourceEvent.clientY??A.sourceEvent.touches[0].clientY],C=[I[0]-O[0],I[1]-O[1]];O=I;let P=q()*Math.max(R[2],Math.log(R[2]))*(z?-1:1),S={x:R[0]-C[0]*P,y:R[1]-C[1]*P},N=[[0,0],[L,Y]];Q.setViewportConstrained({x:S.x,y:S.y,zoom:R[2]},N,F)},w=Y5().on("start",T).on("zoom",K?B:null).on("zoom.wheel",X?W:null);U.call(w,{})}function Z(){U.on("zoom",null)}return{update:G,destroy:Z,pointer:m1}}var z4=(_)=>({x:_.x,y:_.y,zoom:_.k}),$6=({x:_,y:Q,zoom:J})=>Q2.translate(_,Q).scale(J),h0=(_,Q)=>_.target.closest(`.${Q}`),V7=(_,Q)=>Q===2&&Array.isArray(_)&&_.includes(2),Cq=(_)=>((_*=2)<=1?_*_*_:(_-=2)*_*_+2)/2,q6=(_,Q=0,J=Cq,q=()=>{})=>{let U=typeof Q==="number"&&Q>0;if(!U)q();return U?_.transition().duration(Q).ease(J).on("end",q):_},u7=(_)=>{let Q=_.ctrlKey&&b2()?10:1;return-_.deltaY*(_.deltaMode===1?0.05:_.deltaMode?1:0.002)*Q};function Sq({zoomPanValues:_,noWheelClassName:Q,d3Selection:J,d3Zoom:q,panOnScrollMode:U,panOnScrollSpeed:G,zoomOnPinch:Z,onPanZoomStart:F,onPanZoom:L,onPanZoomEnd:Y}){return(H)=>{if(h0(H,Q)){if(H.ctrlKey)H.preventDefault();return!1}H.preventDefault(),H.stopImmediatePropagation();let K=J.property("__zoom").k||1;if(H.ctrlKey&&Z){let T=m1(H),B=u7(H),w=K*Math.pow(2,B);q.scaleTo(J,w,T,H);return}let X=H.deltaMode===1?20:1,z=U===I0.Vertical?0:H.deltaX*X,W=U===I0.Horizontal?0:H.deltaY*X;if(!b2()&&H.shiftKey&&U!==I0.Vertical)z=H.deltaY*X,W=0;q.translateBy(J,-(z/K)*G,-(W/K)*G,{internal:!0});let O=z4(J.property("__zoom"));if(clearTimeout(_.panScrollTimeout),!_.isPanScrolling)_.isPanScrolling=!0,F?.(H,O);else L?.(H,O);_.panScrollTimeout=setTimeout(()=>{Y?.(H,O),_.isPanScrolling=!1},150)}}function kq({noWheelClassName:_,preventScrolling:Q,d3ZoomHandler:J}){return function(q,U){let G=q.type==="wheel",Z=!Q&&G&&!q.ctrlKey,F=h0(q,_);if(q.ctrlKey&&G&&F)q.preventDefault();if(Z||F)return null;q.preventDefault(),J.call(this,q,U)}}function yq({zoomPanValues:_,onDraggingChange:Q,onPanZoomStart:J}){return(q)=>{if(q.sourceEvent?.internal)return;let U=z4(q.transform);if(_.mouseButton=q.sourceEvent?.button||0,_.isZoomingOrPanning=!0,_.prevViewport=U,q.sourceEvent?.type==="mousedown")Q(!0);if(J)J?.(q.sourceEvent,U)}}function vq({zoomPanValues:_,panOnDrag:Q,onPaneContextMenu:J,onTransformChange:q,onPanZoom:U}){return(G)=>{if(_.usedRightMouseButton=!!(J&&V7(Q,_.mouseButton??0)),!G.sourceEvent?.sync)q([G.transform.x,G.transform.y,G.transform.k]);if(U&&!G.sourceEvent?.internal)U?.(G.sourceEvent,z4(G.transform))}}function jq({zoomPanValues:_,panOnDrag:Q,panOnScroll:J,onDraggingChange:q,onPanZoomEnd:U,onPaneContextMenu:G}){return(Z)=>{if(Z.sourceEvent?.internal)return;if(_.isZoomingOrPanning=!1,G&&V7(Q,_.mouseButton??0)&&!_.usedRightMouseButton&&Z.sourceEvent)G(Z.sourceEvent);if(_.usedRightMouseButton=!1,q(!1),U){let F=z4(Z.transform);_.prevViewport=F,clearTimeout(_.timerId),_.timerId=setTimeout(()=>{U?.(Z.sourceEvent,F)},J?150:0)}}}function Vq({panActivationKeyPressed:_,zoomActivationKeyPressed:Q,zoomOnScroll:J,zoomOnPinch:q,panOnDrag:U,panOnScroll:G,zoomOnDoubleClick:Z,userSelectionActive:F,noWheelClassName:L,noPanClassName:Y,lib:H,connectionInProgress:K}){return(X)=>{let z=Q||J,W=q&&X.ctrlKey,O=X.type==="wheel";if(X.button===1&&X.type==="mousedown"&&(h0(X,`${H}-flow__node`)||h0(X,`${H}-flow__edge`)||h0(X,`${H}-flow__selection`)||h0(X,`${H}-flow__nodesselection`)))return!0;if(!U&&!z&&!G&&!Z&&!q)return!1;if(F)return!1;if(K&&!O)return!1;if(h0(X,L)&&O)return!1;if(h0(X,Y)&&(!O||G&&O&&!Q))return!1;if(!q&&X.ctrlKey&&O)return!1;if(!q&&X.type==="touchstart"&&X.touches?.length>1)return X.preventDefault(),!1;if(!z&&!G&&!W&&O)return!1;if(!U&&(X.type==="mousedown"||X.type==="touchstart"))return!1;if(Array.isArray(U)&&!U.includes(X.button)&&X.type==="mousedown")return!1;let T=Array.isArray(U)&&U.includes(X.button)||!X.button||X.button<=1;return(!X.ctrlKey||O||_)&&T}}function b7({domNode:_,minZoom:Q,maxZoom:J,translateExtent:q,viewport:U,onPanZoom:G,onPanZoomStart:Z,onPanZoomEnd:F,onDraggingChange:L}){let Y={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},H=_.getBoundingClientRect(),K=[[0,0],[H.width,H.height]];(typeof ResizeObserver<"u"?new ResizeObserver((p)=>{let k=p[0];if(k)K=[[0,0],[k.contentRect.width,k.contentRect.height]]}):null)?.observe(_);let z=Y5().extent(()=>K).scaleExtent([Q,J]).translateExtent(q),W=v1(_).call(z);R({x:U.x,y:U.y,zoom:y2(U.zoom,Q,J)},[[0,0],[H.width,H.height]],q);let O=W.on("wheel.zoom"),T=W.on("dblclick.zoom");z.wheelDelta(u7);async function B(p,k){if(W)return new Promise((D)=>{z?.interpolate(k?.interpolate==="linear"?z0:e0).transform(q6(W,k?.duration,k?.ease,()=>D(!0)),p)});return!1}function w({noWheelClassName:p,noPanClassName:k,onPaneContextMenu:D,userSelectionActive:V,panOnScroll:E,panOnDrag:u,panOnScrollMode:h,panOnScrollSpeed:f,preventScrolling:y,zoomOnPinch:g,zoomOnScroll:b,zoomOnDoubleClick:t,panActivationKeyPressed:o=!1,zoomActivationKeyPressed:d,lib:a,onTransformChange:c,connectionInProgress:n,paneClickDistance:Q1,selectionOnDrag:F1}){if(V&&!Y.isZoomingOrPanning)A();let J1=E&&!d&&!V;z.clickDistance(F1?1/0:!e1(Q1)||Q1<0?0:Q1);let U1=J1?Sq({zoomPanValues:Y,noWheelClassName:p,d3Selection:W,d3Zoom:z,panOnScrollMode:h,panOnScrollSpeed:f,zoomOnPinch:g,onPanZoomStart:Z,onPanZoom:G,onPanZoomEnd:F}):kq({noWheelClassName:p,preventScrolling:y,d3ZoomHandler:O});W.on("wheel.zoom",U1,{passive:!1});let Y1=yq({zoomPanValues:Y,onDraggingChange:L,onPanZoomStart:Z});z.on("start",Y1);let s=vq({zoomPanValues:Y,panOnDrag:u,onPaneContextMenu:!!D,onPanZoom:G,onTransformChange:c});z.on("zoom",s);let K1=jq({zoomPanValues:Y,panOnDrag:u,panOnScroll:E,onPaneContextMenu:D,onPanZoomEnd:F,onDraggingChange:L});z.on("end",K1);let O1=Vq({panActivationKeyPressed:o,zoomActivationKeyPressed:d,panOnDrag:u,zoomOnScroll:b,panOnScroll:E,zoomOnDoubleClick:t,zoomOnPinch:g,userSelectionActive:V,noPanClassName:k,noWheelClassName:p,lib:a,connectionInProgress:n});if(z.filter(O1),t)W.on("dblclick.zoom",T);else W.on("dblclick.zoom",null)}function A(){z.on("zoom",null)}async function R(p,k,D){let V=$6(p),E=z?.constrain()(V,k,D);if(E)await B(E);return E}async function I(p,k){let D=$6(p);return await B(D,k),D}function C(p){if(W){let k=$6(p),D=W.property("__zoom");if(D.k!==p.zoom||D.x!==p.x||D.y!==p.y)z?.transform(W,k,null,{sync:!0})}}function P(){let p=W?X5(W.node()):{x:0,y:0,k:1};return{x:p.x,y:p.y,zoom:p.k}}async function S(p,k){if(W)return new Promise((D)=>{z?.interpolate(k?.interpolate==="linear"?z0:e0).scaleTo(q6(W,k?.duration,k?.ease,()=>D(!0)),p)});return!1}async function N(p,k){if(W)return new Promise((D)=>{z?.interpolate(k?.interpolate==="linear"?z0:e0).scaleBy(q6(W,k?.duration,k?.ease,()=>D(!0)),p)});return!1}function v(p){z?.scaleExtent(p)}function j(p){z?.translateExtent(p)}function m(p){let k=!e1(p)||p<0?0:p;z?.clickDistance(k)}return{update:w,destroy:A,setViewport:I,setViewportConstrained:R,getViewport:P,scaleTo:S,scaleBy:N,setScaleExtent:v,setTranslateExtent:j,syncViewport:C,setClickDistance:m}}var m0;(function(_){_.Line="line",_.Handle="handle"})(m0||(m0={}));function uq({width:_,prevWidth:Q,height:J,prevHeight:q,affectsX:U,affectsY:G}){let Z=_-Q,F=J-q,L=[Z>0?1:Z<0?-1:0,F>0?1:F<0?-1:0];if(Z&&U)L[0]=L[0]*-1;if(F&&G)L[1]=L[1]*-1;return L}function q7(_){let Q=_.includes("right")||_.includes("left"),J=_.includes("bottom")||_.includes("top"),q=_.includes("left"),U=_.includes("top");return{isHorizontal:Q,isVertical:J,affectsX:q,affectsY:U}}function b0(_,Q){return Math.max(0,Q-_)}function D0(_,Q){return Math.max(0,_-Q)}function _4(_,Q,J){return Math.max(0,Q-_,_-J)}function U7(_,Q){return _?!Q:Q}function bq(_,Q,J,q,U,G,Z,F){let{affectsX:L,affectsY:Y}=Q,{isHorizontal:H,isVertical:K}=Q,X=H&&K,{xSnapped:z,ySnapped:W}=J,{minWidth:O,maxWidth:T,minHeight:B,maxHeight:w}=q,{x:A,y:R,width:I,height:C,aspectRatio:P}=_,S=Math.floor(H?z-_.pointerX:0),N=Math.floor(K?W-_.pointerY:0),v=I+(L?-S:S),j=C+(Y?-N:N),m=-G[0]*I,p=-G[1]*C,k=_4(v,O,T),D=_4(j,B,w);if(Z){let u=0,h=0;if(L&&S<0)u=b0(A+S+m,Z[0][0]);else if(!L&&S>0)u=D0(A+v+m,Z[1][0]);if(Y&&N<0)h=b0(R+N+p,Z[0][1]);else if(!Y&&N>0)h=D0(R+j+p,Z[1][1]);k=Math.max(k,u),D=Math.max(D,h)}if(F){let u=0,h=0;if(L&&S>0)u=D0(A+S,F[0][0]);else if(!L&&S<0)u=b0(A+v,F[1][0]);if(Y&&N>0)h=D0(R+N,F[0][1]);else if(!Y&&N<0)h=b0(R+j,F[1][1]);k=Math.max(k,u),D=Math.max(D,h)}if(U){if(H){let u=_4(v/P,B,w)*P;if(k=Math.max(k,u),Z){let h=0;if(!L&&!Y||L&&!Y&&X)h=D0(R+p+v/P,Z[1][1])*P;else h=b0(R+p+(L?S:-S)/P,Z[0][1])*P;k=Math.max(k,h)}if(F){let h=0;if(!L&&!Y||L&&!Y&&X)h=b0(R+v/P,F[1][1])*P;else h=D0(R+(L?S:-S)/P,F[0][1])*P;k=Math.max(k,h)}}if(K){let u=_4(j*P,O,T)/P;if(D=Math.max(D,u),Z){let h=0;if(!L&&!Y||Y&&!L&&X)h=D0(A+j*P+m,Z[1][0])/P;else h=b0(A+(Y?N:-N)*P+m,Z[0][0])/P;D=Math.max(D,h)}if(F){let h=0;if(!L&&!Y||Y&&!L&&X)h=b0(A+j*P,F[1][0])/P;else h=D0(A+(Y?N:-N)*P,F[0][0])/P;D=Math.max(D,h)}}}if(N=N+(N<0?D:-D),S=S+(S<0?k:-k),U)if(X)if(v>j*P)N=(U7(L,Y)?-S:S)/P;else S=(U7(L,Y)?-N:N)*P;else if(H)N=S/P,Y=L;else S=N*P,L=Y;let V=L?A+S:A,E=Y?R+N:R;return{width:I+(L?-S:S),height:C+(Y?-N:N),x:G[0]*S*(!L?1:-1)+V,y:G[1]*N*(!Y?1:-1)+E}}var D7={width:0,height:0,x:0,y:0},Dq={...D7,pointerX:0,pointerY:0,aspectRatio:1};function hq(_,Q,J){let q=Q.position.x+_.position.x,U=Q.position.y+_.position.y,G=_.measured.width??0,Z=_.measured.height??0,F=J[0]*G,L=J[1]*Z;return[[q-F,U-L],[q+G-F,U+Z-L]]}function h7({domNode:_,nodeId:Q,getStoreItems:J,onChange:q,onEnd:U}){let G=v1(_),Z={controlDirection:q7("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function F({controlPosition:Y,boundaries:H,keepAspectRatio:K,resizeDirection:X,onResizeStart:z,onResize:W,onResizeEnd:O,shouldResize:T}){let B={...D7},w={...Dq};Z={boundaries:H,resizeDirection:X,keepAspectRatio:K,controlDirection:q7(Y)};let A=void 0,R=null,I=[],C=void 0,P=void 0,S=void 0,N=a2().on("start",(v)=>{let{nodeLookup:j,transform:m,snapGrid:p,snapToGrid:k,nodeOrigin:D,paneDomNode:V}=J();if(A=j.get(Q),!A)return;R=V?.getBoundingClientRect()??null;let{xSnapped:E,ySnapped:u}=L5(v.sourceEvent,{transform:m,snapGrid:p,snapToGrid:k,containerBounds:R});if(B={width:A.measured.width??0,height:A.measured.height??0,x:A.position.x??0,y:A.position.y??0},w={...B,pointerX:E,pointerY:u,aspectRatio:B.width/B.height},C=void 0,P=G2(A.extent)?A.extent:void 0,A.parentId&&(A.extent==="parent"||A.expandParent))C=j.get(A.parentId);if(C&&A.extent==="parent")P=[[0,0],[C.measured.width,C.measured.height]];I=[],S=void 0;for(let[h,f]of j)if(f.parentId===Q){if(I.push({id:h,position:{...f.position},extent:f.extent}),f.extent==="parent"||f.expandParent){let y=hq(f,A,f.origin??D);if(S)S=[[Math.min(y[0][0],S[0][0]),Math.min(y[0][1],S[0][1])],[Math.max(y[1][0],S[1][0]),Math.max(y[1][1],S[1][1])]];else S=y}}z?.(v,{...B})}).on("drag",(v)=>{let{transform:j,snapGrid:m,snapToGrid:p,nodeOrigin:k}=J(),D=L5(v.sourceEvent,{transform:j,snapGrid:m,snapToGrid:p,containerBounds:R}),V=[];if(!A)return;let{x:E,y:u,width:h,height:f}=B,y={},g=A.origin??k,{width:b,height:t,x:o,y:d}=bq(w,Z.controlDirection,D,Z.boundaries,Z.keepAspectRatio,g,P,S),a=b!==h,c=t!==f,n=o!==E&&a,Q1=d!==u&&c;if(!n&&!Q1&&!a&&!c)return;let F1={prevValues:{...B},startX:w.x,startY:w.y,childNodes:I.map((s)=>({...s,position:{...s.position}}))};if(n||Q1||g[0]===1||g[1]===1){if(y.x=n?o:B.x,y.y=Q1?d:B.y,B.x=y.x,B.y=y.y,I.length>0){let s=o-E,K1=d-u;for(let O1 of I)O1.position={x:O1.position.x-s+g[0]*(b-h),y:O1.position.y-K1+g[1]*(t-f)},V.push(O1)}}if(a||c)y.width=a&&(!Z.resizeDirection||Z.resizeDirection==="horizontal")?b:B.width,y.height=c&&(!Z.resizeDirection||Z.resizeDirection==="vertical")?t:B.height,B.width=y.width,B.height=y.height;if(C&&A.expandParent){let s=g[0]*(y.width??0);if(y.x&&y.x<s)B.x=s,w.x=w.x-(y.x-s);let K1=g[1]*(y.height??0);if(y.y&&y.y<K1)B.y=K1,w.y=w.y-(y.y-K1)}let J1=uq({width:B.width,prevWidth:h,height:B.height,prevHeight:f,affectsX:Z.controlDirection.affectsX,affectsY:Z.controlDirection.affectsY}),U1={...B,direction:J1};if(T?.(v,U1)===!1){B=F1.prevValues,w.x=F1.startX,w.y=F1.startY,I.forEach((s,K1)=>{s.position=F1.childNodes[K1].position});return}W?.(v,U1),q(y,V)}).on("end",(v)=>{O?.(v,{...B}),U?.({...B})});G.call(N)}function L(){G.on(".drag",null)}return{update:F,destroy:L}}var c7=h1(X0(),1),l7=h1(x7(),1);var m7=(_)=>{let Q,J=new Set,q=(H,K)=>{let X=typeof H==="function"?H(Q):H;if(!Object.is(X,Q)){let z=Q;Q=(K!=null?K:typeof X!=="object"||X===null)?X:Object.assign({},Q,X),J.forEach((W)=>W(Q,z))}},U=()=>Q,L={setState:q,getState:U,getInitialState:()=>Y,subscribe:(H)=>{return J.add(H),()=>J.delete(H)},destroy:()=>{if((import.meta.env?import.meta.env.MODE:void 0)!=="production")console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.");J.clear()}},Y=Q=_(q,U,L);return L},g7=(_)=>_?m7(_):m7;var{useDebugValue:mq}=c7.default,{useSyncExternalStoreWithSelector:gq}=l7.default,pq=(_)=>_;function k6(_,Q=pq,J){let q=gq(_.subscribe,_.getState,_.getServerState||_.getInitialState,Q,J);return mq(q),q}var p7=(_,Q)=>{let J=g7(_),q=(U,G=Q)=>k6(J,U,G);return Object.assign(q,J),q},r7=(_,Q)=>_?p7(_,Q):p7;function P1(_,Q){if(Object.is(_,Q))return!0;if(typeof _!=="object"||_===null||typeof Q!=="object"||Q===null)return!1;if(_ instanceof Map&&Q instanceof Map){if(_.size!==Q.size)return!1;for(let[q,U]of _)if(!Object.is(U,Q.get(q)))return!1;return!0}if(_ instanceof Set&&Q instanceof Set){if(_.size!==Q.size)return!1;for(let q of _)if(!Q.has(q))return!1;return!0}let J=Object.keys(_);if(J.length!==Object.keys(Q).length)return!1;for(let q of J)if(!Object.prototype.hasOwnProperty.call(Q,q)||!Object.is(_[q],Q[q]))return!1;return!0}var O9=h1(a7(),1),T4=r.createContext(null),rq=T4.Provider,f9=r1.error001("react");function B1(_,Q){let J=r.useContext(T4);if(J===null)throw Error(f9);return k6(J,_,Q)}function N1(){let _=r.useContext(T4);if(_===null)throw Error(f9);return r.useMemo(()=>({getState:_.getState,setState:_.setState,subscribe:_.subscribe}),[_])}var s7={display:"none"},iq={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},I9="react-flow__node-desc",w9="react-flow__edge-desc",dq="react-flow__aria-live",aq=(_)=>_.ariaLiveMessage,sq=(_)=>_.ariaLabelConfig;function tq({rfId:_}){let Q=B1(aq);return l.jsx("div",{id:`${dq}-${_}`,"aria-live":"assertive","aria-atomic":"true",style:iq,children:Q})}function oq({rfId:_,disableKeyboardA11y:Q}){let J=B1(sq);return l.jsxs(l.Fragment,{children:[l.jsx("div",{id:`${I9}-${_}`,style:s7,children:Q?J["node.a11yDescription.default"]:J["node.a11yDescription.keyboardDisabled"]}),l.jsx("div",{id:`${w9}-${_}`,style:s7,children:J["edge.a11yDescription.default"]}),!Q&&l.jsx(tq,{rfId:_})]})}var K2=r.forwardRef(({position:_="top-left",children:Q,className:J,style:q,...U},G)=>{let Z=`${_}`.split("-");return l.jsx("div",{className:C1(["react-flow__panel",J,...Z]),style:q,ref:G,...U,children:Q})});K2.displayName="Panel";var t7="https://reactflow.dev/attribution";function nq({proOptions:_,position:Q="bottom-right"}){if(r.useEffect(()=>{z7("react")},[]),_?.hideAttribution)return null;return l.jsx(K2,{position:Q,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${t7}`,children:l.jsx("a",{href:t7,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var eq=(_)=>{let Q=[],J=[];for(let[,q]of _.nodeLookup)if(q.selected)Q.push(q.internals.userNode);for(let[,q]of _.edgeLookup)if(q.selected)J.push(q);return{selectedNodes:Q,selectedEdges:J}},W4=(_)=>_.id;function _U(_,Q){return P1(_.selectedNodes.map(W4),Q.selectedNodes.map(W4))&&P1(_.selectedEdges.map(W4),Q.selectedEdges.map(W4))}function QU({onSelectionChange:_}){let Q=N1(),{selectedNodes:J,selectedEdges:q}=B1(eq,_U);return r.useEffect(()=>{let U={nodes:J,edges:q};_?.(U),Q.getState().onSelectionChangeHandlers.forEach((G)=>G(U))},[J,q,_]),null}var JU=(_)=>!!_.onSelectionChangeHandlers;function $U({onSelectionChange:_}){let Q=B1(JU);if(_||Q)return l.jsx(QU,{onSelectionChange:_});return null}var P9=[0,0],qU={x:0,y:0,zoom:1},UU=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],o7=[...UU,"rfId"],GU=(_)=>({setNodes:_.setNodes,setEdges:_.setEdges,setMinZoom:_.setMinZoom,setMaxZoom:_.setMaxZoom,setTranslateExtent:_.setTranslateExtent,setNodeExtent:_.setNodeExtent,reset:_.reset,setDefaultNodesAndEdges:_.setDefaultNodesAndEdges}),n7={translateExtent:v2,nodeOrigin:P9,minZoom:0.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function ZU(_){let{setNodes:Q,setEdges:J,setMinZoom:q,setMaxZoom:U,setTranslateExtent:G,setNodeExtent:Z,reset:F,setDefaultNodesAndEdges:L}=B1(GU,P1),Y=N1();r.useEffect(()=>{return L(_.defaultNodes,_.defaultEdges),()=>{H.current=n7,F()}},[]);let H=r.useRef(n7);return r.useEffect(()=>{for(let K of o7){let X=_[K],z=H.current[K];if(X===z)continue;if(typeof _[K]>"u")continue;if(K==="nodes")Q(X);else if(K==="edges")J(X);else if(K==="minZoom")q(X);else if(K==="maxZoom")U(X);else if(K==="translateExtent")G(X);else if(K==="nodeExtent")Z(X);else if(K==="ariaLabelConfig")Y.setState({ariaLabelConfig:L7(X)});else if(K==="fitView")Y.setState({fitViewQueued:X});else if(K==="fitViewOptions")Y.setState({fitViewOptions:X});else Y.setState({[K]:X})}H.current=_},o7.map((K)=>_[K])),null}function e7(){if(typeof window>"u"||!window.matchMedia)return null;return window.matchMedia("(prefers-color-scheme: dark)")}function FU(_){let[Q,J]=r.useState(_==="system"?null:_);return r.useEffect(()=>{if(_!=="system"){J(_);return}let q=e7(),U=()=>J(q?.matches?"dark":"light");return U(),q?.addEventListener("change",U),()=>{q?.removeEventListener("change",U)}},[_]),Q!==null?Q:e7()?.matches?"dark":"light"}var _9=typeof document<"u"?document:null;function M5(_=null,Q={target:_9,actInsideInputWithModifier:!0}){let[J,q]=r.useState(!1),U=r.useRef(!1),G=r.useRef(new Set([])),[Z,F]=r.useMemo(()=>{if(_!==null){let Y=(Array.isArray(_)?_:[_]).filter((K)=>typeof K==="string").map((K)=>K.replace(/\+/g,`
|
|
242
29
|
`).replace(`
|
|
243
30
|
|
|
244
31
|
`,`
|
|
245
32
|
+`).split(`
|
|
246
|
-
`)),R=T.reduce((L,M)=>L.concat(...M),[]);return[T,R]}return[[],[]]},[Q]);return K1.useEffect(()=>{let O=U?.target??GT,T=U?.actInsideInputWithModifier??!0;if(Q!==null){let R=(f)=>{if(X.current=f.ctrlKey||f.metaKey||f.shiftKey||f.altKey,(!X.current||X.current&&!T)&&BX(f))return!1;let D=FT(f.code,B);if(W.current.add(f[D]),ZT(z,W.current,!1)){let V=f.composedPath?.()?.[0]||f.target,k=V?.nodeName==="BUTTON"||V?.nodeName==="A";if(U.preventDefault!==!1&&(X.current||!k))f.preventDefault();K(!0)}},L=(f)=>{let I=FT(f.code,B);if(ZT(z,W.current,!0))K(!1),W.current.clear();else W.current.delete(f[I]);if(f.key==="Meta")W.current.clear();X.current=!1},M=()=>{W.current.clear(),K(!1)};return O?.addEventListener("keydown",R),O?.addEventListener("keyup",L),window.addEventListener("blur",M),window.addEventListener("contextmenu",M),()=>{O?.removeEventListener("keydown",R),O?.removeEventListener("keyup",L),window.removeEventListener("blur",M),window.removeEventListener("contextmenu",M)}}},[Q,K]),Z}function ZT(Q,U,Z){return Q.filter((K)=>Z||K.length===U.size).some((K)=>K.every((X)=>U.has(X)))}function FT(Q,U){return U.includes(Q)?"code":"key"}var JS=()=>{let Q=C0();return K1.useMemo(()=>{return{zoomIn:async(U)=>{let{panZoom:Z}=Q.getState();return Z?Z.scaleBy(1.2,U):!1},zoomOut:async(U)=>{let{panZoom:Z}=Q.getState();return Z?Z.scaleBy(0.8333333333333334,U):!1},zoomTo:async(U,Z)=>{let{panZoom:K}=Q.getState();return K?K.scaleTo(U,Z):!1},getZoom:()=>Q.getState().transform[2],setViewport:async(U,Z)=>{let{transform:[K,X,W],panZoom:z}=Q.getState();if(!z)return!1;return await z.setViewport({x:U.x??K,y:U.y??X,zoom:U.zoom??W},Z),!0},getViewport:()=>{let[U,Z,K]=Q.getState().transform;return{x:U,y:Z,zoom:K}},setCenter:async(U,Z,K)=>{return Q.getState().setCenter(U,Z,K)},fitBounds:async(U,Z)=>{let{width:K,height:X,minZoom:W,maxZoom:z,panZoom:B}=Q.getState(),O=MJ(U,K,X,W,z,Z?.padding??0.1);if(!B)return!1;return await B.setViewport(O,{duration:Z?.duration,ease:Z?.ease,interpolate:Z?.interpolate}),!0},screenToFlowPosition:(U,Z={})=>{let{transform:K,snapGrid:X,snapToGrid:W,domNode:z}=Q.getState();if(!z)return U;let{x:B,y:O}=z.getBoundingClientRect(),T={x:U.x-B,y:U.y-O},R=Z.snapGrid??X,L=Z.snapToGrid??W;return n7(T,K,L,R)},flowToScreenPosition:(U)=>{let{transform:Z,domNode:K}=Q.getState();if(!K)return U;let{x:X,y:W}=K.getBoundingClientRect(),z=w8(U,Z);return{x:z.x+X,y:z.y+W}}}},[])};function DT(Q,U){let Z=[],K=new Map,X=[];for(let W of Q)if(W.type==="add"){X.push(W);continue}else if(W.type==="remove"||W.type==="replace")K.set(W.id,[W]);else{let z=K.get(W.id);if(z)z.push(W);else K.set(W.id,[W])}for(let W of U){let z=K.get(W.id);if(!z){Z.push(W);continue}if(z[0].type==="remove")continue;if(z[0].type==="replace"){Z.push({...z[0].item});continue}let B={...W};for(let O of z)$S(O,B);Z.push(B)}if(X.length)X.forEach((W)=>{if(W.index!==void 0)Z.splice(W.index,0,{...W.item});else Z.push({...W.item})});return Z}function $S(Q,U){switch(Q.type){case"select":{U.selected=Q.selected;break}case"position":{if(typeof Q.position<"u")U.position=Q.position;if(typeof Q.dragging<"u")U.dragging=Q.dragging;break}case"dimensions":{if(typeof Q.dimensions<"u"){if(U.measured={...Q.dimensions},Q.setAttributes){if(Q.setAttributes===!0||Q.setAttributes==="width")U.width=Q.dimensions.width;if(Q.setAttributes===!0||Q.setAttributes==="height")U.height=Q.dimensions.height}}if(typeof Q.resizing==="boolean")U.resizing=Q.resizing;break}}}function yT(Q,U){return DT(Q,U)}function QS(Q,U){return DT(Q,U)}function P8(Q,U){return{id:Q,type:"select",selected:U}}function _9(Q,U=new Set,Z=!1){let K=[];for(let[X,W]of Q){let z=U.has(X);if(!(W.selected===void 0&&!z)&&W.selected!==z){if(Z)W.selected=z;K.push(P8(W.id,z))}}return K}function KT({items:Q=[],lookup:U}){let Z=[],K=new Map(Q.map((X)=>[X.id,X]));for(let[X,W]of Q.entries()){let z=U.get(W.id),B=z?.internals?.userNode??z;if(B!==void 0&&B!==W)Z.push({id:W.id,item:W,type:"replace"});if(B===void 0)Z.push({item:W,type:"add",index:X})}for(let[X]of U)if(K.get(X)===void 0)Z.push({id:X,type:"remove"});return Z}function XT(Q){return{id:Q.id,type:"remove"}}var qS=KX("React Flow","https://reactflow.dev/");function US(Q,U,Z={}){return fM(Q,U,{...Z,onError:Z.onError??qS})}var HT=(Q)=>WM(Q),GS=(Q)=>QX(Q);function vT(Q){return K1.forwardRef(Q)}var ET=typeof window<"u"?K1.useLayoutEffect:K1.useEffect;function YT(Q){let[U,Z]=K1.useState(BigInt(0)),[K]=K1.useState(()=>ZS(()=>Z((X)=>X+BigInt(1))));return ET(()=>{let X=K.get();if(X.length)Q(X),K.reset()},[U]),K}function ZS(Q){let U=[];return{get:()=>U,reset:()=>{U=[]},push:(Z)=>{U.push(Z),Q()}}}var bT=K1.createContext(null);function FS({children:Q}){let U=C0(),Z=K1.useCallback((B)=>{let{nodes:O=[],setNodes:T,hasDefaultNodes:R,onNodesChange:L,nodeLookup:M,fitViewQueued:f,onNodesChangeMiddlewareMap:I}=U.getState(),D=O;for(let k of B)D=typeof k==="function"?k(D):k;let V=KT({items:D,lookup:M});for(let k of I.values())V=k(V);if(R)T(D);if(V.length>0)L?.(V);else if(f)window.requestAnimationFrame(()=>{let{fitViewQueued:k,nodes:h,setNodes:P}=U.getState();if(k)P(h)})},[]),K=YT(Z),X=K1.useCallback((B)=>{let{edges:O=[],setEdges:T,hasDefaultEdges:R,onEdgesChange:L,edgeLookup:M}=U.getState(),f=O;for(let I of B)f=typeof I==="function"?I(f):I;if(R)T(f);else if(L)L(KT({items:f,lookup:M}))},[]),W=YT(X),z=K1.useMemo(()=>({nodeQueue:K,edgeQueue:W}),[]);return F1.jsx(bT.Provider,{value:z,children:Q})}function KS(){let Q=K1.useContext(bT);if(!Q)throw Error("useBatchContext must be used within a BatchProvider");return Q}var XS=(Q)=>!!Q.panZoom;function OJ(){let Q=JS(),U=C0(),Z=KS(),K=G0(XS),X=K1.useMemo(()=>{let W=(L)=>U.getState().nodeLookup.get(L),z=(L)=>{Z.nodeQueue.push(L)},B=(L)=>{Z.edgeQueue.push(L)},O=(L)=>{let{nodeLookup:M,nodeOrigin:f}=U.getState(),I=HT(L)?L:M.get(L.id),D=I.parentId?HX(I.position,I.measured,I.parentId,M,f):I.position,V={...I,position:D,width:I.measured?.width??I.width,height:I.measured?.height??I.height};return t7(V)},T=(L,M,f={replace:!1})=>{z((I)=>I.map((D)=>{if(D.id===L){let V=typeof M==="function"?M(D):M;return f.replace&&HT(V)?V:{...D,...V}}return D}))},R=(L,M,f={replace:!1})=>{B((I)=>I.map((D)=>{if(D.id===L){let V=typeof M==="function"?M(D):M;return f.replace&&GS(V)?V:{...D,...V}}return D}))};return{getNodes:()=>U.getState().nodes.map((L)=>({...L})),getNode:(L)=>W(L)?.internals.userNode,getInternalNode:W,getEdges:()=>{let{edges:L=[]}=U.getState();return L.map((M)=>({...M}))},getEdge:(L)=>U.getState().edgeLookup.get(L),setNodes:z,setEdges:B,addNodes:(L)=>{let M=Array.isArray(L)?L:[L];Z.nodeQueue.push((f)=>[...f,...M])},addEdges:(L)=>{let M=Array.isArray(L)?L:[L];Z.edgeQueue.push((f)=>[...f,...M])},toObject:()=>{let{nodes:L=[],edges:M=[],transform:f}=U.getState(),[I,D,V]=f;return{nodes:L.map((k)=>({...k})),edges:M.map((k)=>({...k})),viewport:{x:I,y:D,zoom:V}}},deleteElements:async({nodes:L=[],edges:M=[]})=>{let{nodes:f,edges:I,onNodesDelete:D,onEdgesDelete:V,triggerNodeChanges:k,triggerEdgeChanges:h,onDelete:P,onBeforeDelete:C}=U.getState(),{nodes:v,edges:b}=await AM({nodesToRemove:L,edgesToRemove:M,nodes:f,edges:I,onBeforeDelete:C}),E=b.length>0,p=v.length>0;if(E){let a=b.map(XT);V?.(b),h(a)}if(p){let a=v.map(XT);D?.(v),k(a)}if(p||E)P?.({nodes:v,edges:b});return{deletedNodes:v,deletedEdges:b}},getIntersectingNodes:(L,M=!0,f)=>{let I=FX(L),D=I?L:O(L),V=f!==void 0;if(!D)return[];return(f||U.getState().nodes).filter((k)=>{let h=U.getState().nodeLookup.get(k.id);if(h&&!I&&(k.id===L.id||!h.internals.positionAbsolute))return!1;let P=t7(V?k:h),C=LJ(P,D);return M&&C>0||C>=P.width*P.height||C>=D.width*D.height})},isNodeIntersecting:(L,M,f=!0)=>{let D=FX(L)?L:O(L);if(!D)return!1;let V=LJ(D,M);return f&&V>0||V>=M.width*M.height||V>=D.width*D.height},updateNode:T,updateNodeData:(L,M,f={replace:!1})=>{T(L,(I)=>{let D=typeof M==="function"?M(I):M;return f.replace?{...I,data:D}:{...I,data:{...I.data,...D}}},f)},updateEdge:R,updateEdgeData:(L,M,f={replace:!1})=>{R(L,(I)=>{let D=typeof M==="function"?M(I):M;return f.replace?{...I,data:D}:{...I,data:{...I.data,...D}}},f)},getNodesBounds:(L)=>{let{nodeLookup:M,nodeOrigin:f}=U.getState();return UX(L,{nodeLookup:M,nodeOrigin:f})},getHandleConnections:({type:L,id:M,nodeId:f})=>Array.from(U.getState().connectionLookup.get(`${f}-${L}${M?`-${M}`:""}`)?.values()??[]),getNodeConnections:({type:L,handleId:M,nodeId:f})=>Array.from(U.getState().connectionLookup.get(`${f}${L?M?`-${L}-${M}`:`-${L}`:""}`)?.values()??[]),fitView:async(L)=>{let M=U.getState().fitViewResolver??TM();return U.setState({fitViewQueued:!0,fitViewOptions:L,fitViewResolver:M}),Z.nodeQueue.push((f)=>[...f]),M.promise}}},[]);return K1.useMemo(()=>{return{...X,...Q,viewportInitialized:K}},[K])}var WT=(Q)=>Q.selected,HS=typeof window<"u"?window:void 0;function YS({deleteKeyCode:Q,multiSelectionKeyCode:U}){let Z=C0(),{deleteElements:K}=OJ(),X=RJ(Q,{actInsideInputWithModifier:!1}),W=RJ(U,{target:HS});K1.useEffect(()=>{if(X){let{edges:z,nodes:B}=Z.getState();K({nodes:B.filter(WT),edges:z.filter(WT)}),Z.setState({nodesSelectionActive:!1})}},[X]),K1.useEffect(()=>{Z.setState({multiSelectionActive:W})},[W])}function WS(Q){let U=C0();K1.useEffect(()=>{let Z=()=>{if(!Q.current||!(Q.current.checkVisibility?.()??!0))return!1;let K=jq(Q.current);if(K.height===0||K.width===0)U.getState().onError?.("004",x2.error004());U.setState({width:K.width||500,height:K.height||500})};if(Q.current){Z(),window.addEventListener("resize",Z);let K=new ResizeObserver(()=>Z());return K.observe(Q.current),()=>{if(window.removeEventListener("resize",Z),K&&Q.current)K.unobserve(Q.current)}}},[])}var cq={position:"absolute",width:"100%",height:"100%",top:0,left:0},zS=(Q)=>({userSelectionActive:Q.userSelectionActive,lib:Q.lib,connectionInProgress:Q.connection.inProgress});function BS({onPaneContextMenu:Q,zoomOnScroll:U=!0,zoomOnPinch:Z=!0,panOnScroll:K=!1,panActivationKeyPressed:X,panOnScrollSpeed:W=0.5,panOnScrollMode:z=B3.Free,zoomOnDoubleClick:B=!0,panOnDrag:O=!0,defaultViewport:T,translateExtent:R,minZoom:L,maxZoom:M,zoomActivationKeyCode:f,preventScrolling:I=!0,children:D,noWheelClassName:V,noPanClassName:k,onViewportChange:h,isControlledViewport:P,paneClickDistance:C,selectionOnDrag:v}){let b=C0(),E=K1.useRef(null),{userSelectionActive:p,lib:a,connectionInProgress:m}=G0(zS,N0),_1=RJ(f),$1=K1.useRef();WS(E);let J1=K1.useCallback((y)=>{if(h?.({x:y[0],y:y[1],zoom:y[2]}),!P)b.setState({transform:y})},[h,P]);return K1.useEffect(()=>{if(E.current){$1.current=pM({domNode:E.current,minZoom:L,maxZoom:M,translateExtent:R,viewport:T,onDraggingChange:(d)=>b.setState((g)=>g.paneDragging===d?g:{paneDragging:d}),onPanZoomStart:(d,g)=>{let{onViewportChangeStart:n,onMoveStart:j}=b.getState();j?.(d,g),n?.(g)},onPanZoom:(d,g)=>{let{onViewportChange:n,onMove:j}=b.getState();j?.(d,g),n?.(g)},onPanZoomEnd:(d,g)=>{let{onViewportChangeEnd:n,onMoveEnd:j}=b.getState();j?.(d,g),n?.(g)}});let{x:y,y:u,zoom:x}=$1.current.getViewport();return b.setState({panZoom:$1.current,transform:[y,u,x],domNode:E.current.closest(".react-flow")}),()=>{$1.current?.destroy()}}},[]),K1.useEffect(()=>{$1.current?.update({onPaneContextMenu:Q,zoomOnScroll:U,zoomOnPinch:Z,panOnScroll:K,panActivationKeyPressed:X,panOnScrollSpeed:W,panOnScrollMode:z,zoomOnDoubleClick:B,panOnDrag:O,zoomActivationKeyPressed:_1,preventScrolling:I,noPanClassName:k,userSelectionActive:p,noWheelClassName:V,lib:a,onTransformChange:J1,connectionInProgress:m,selectionOnDrag:v,paneClickDistance:C})},[Q,U,Z,K,X,W,z,B,O,_1,I,k,p,V,a,J1,m,v,C]),F1.jsx("div",{className:"react-flow__renderer",ref:E,style:cq,children:D})}var AS=(Q)=>({userSelectionActive:Q.userSelectionActive,userSelectionRect:Q.userSelectionRect});function LS(){let{userSelectionActive:Q,userSelectionRect:U}=G0(AS,N0);if(!(Q&&U))return null;return F1.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:U.width,height:U.height,transform:`translate(${U.x}px, ${U.y}px)`}})}var NX=(Q,U)=>{return(Z)=>{if(Z.target!==U.current)return;Q?.(Z)}},MS=(Q)=>({userSelectionActive:Q.userSelectionActive,elementsSelectable:Q.elementsSelectable,dragging:Q.paneDragging,panBy:Q.panBy,autoPanSpeed:Q.autoPanSpeed});function TS({isSelecting:Q,selectionKeyPressed:U,selectionMode:Z=R8.Full,panOnDrag:K,autoPanOnSelection:X,paneClickDistance:W,selectionOnDrag:z,onSelectionStart:B,onSelectionEnd:O,onPaneClick:T,onPaneContextMenu:R,onPaneScroll:L,onPaneMouseEnter:M,onPaneMouseMove:f,onPaneMouseLeave:I,children:D}){let V=K1.useRef(0),k=C0(),{userSelectionActive:h,elementsSelectable:P,dragging:C,panBy:v,autoPanSpeed:b}=G0(MS,N0),E=P&&(Q||h),p=K1.useRef(null),a=K1.useRef(),m=K1.useRef(new Set),_1=K1.useRef(new Set),$1=K1.useRef(!1),J1=K1.useRef(!1),y=K1.useRef({x:0,y:0}),u=K1.useRef(!1),x=(X1)=>{if(J1.current||$1.current||k.getState().connection.inProgress){J1.current=!1,$1.current=!1;return}T?.(X1),k.getState().resetSelectedElements(),k.setState({nodesSelectionActive:!1})},d=(X1)=>{if(Array.isArray(K)&&K?.includes(2)){X1.preventDefault();return}R?.(X1)},g=L?(X1)=>L(X1):void 0,n=(X1)=>{if(J1.current)X1.stopPropagation(),J1.current=!1},j=(X1)=>{if(X1.pointerType==="touch"&&K!==!1&&!U)return;let{domNode:f1,transform:l1}=k.getState();if(a.current=f1?.getBoundingClientRect(),!a.current)return;let W1=X1.target===p.current;if(!W1&&!!X1.target.closest(".nokey")||!Q||!(z&&W1||U)||X1.button!==0||!X1.isPrimary)return;X1.target?.setPointerCapture?.(X1.pointerId),J1.current=!1;let{x:c1,y:E1}=D5(X1.nativeEvent,a.current),j1=n7({x:c1,y:E1},l1);if(k.setState({userSelectionRect:{width:0,height:0,startX:j1.x,startY:j1.y,x:c1,y:E1}}),!W1)X1.stopPropagation(),X1.preventDefault()};function i(X1,f1){let{userSelectionRect:l1}=k.getState();if(!l1)return;let{transform:W1,nodeLookup:S1,edgeLookup:v1,connectionLookup:c1,triggerNodeChanges:E1,triggerEdgeChanges:j1,defaultEdgeOptions:V0}=k.getState(),b1={x:l1.startX,y:l1.startY},{x:Z2,y:_0}=w8(b1,W1),h2={startX:b1.x,startY:b1.y,x:X1<Z2?X1:Z2,y:f1<_0?f1:_0,width:Math.abs(X1-Z2),height:Math.abs(f1-_0)},z2=m.current,I2=_1.current;m.current=new Set(Pq(S1,h2,W1,Z===R8.Partial,!0).map((P2)=>P2.id)),_1.current=new Set;let f2=V0?.selectable??!0;for(let P2 of m.current){let B2=c1.get(P2);if(!B2)continue;for(let{edgeId:A2}of B2.values()){let L2=v1.get(A2);if(L2&&(L2.selectable??f2))_1.current.add(A2)}}if(!YX(z2,m.current)){let P2=_9(S1,m.current,!0);E1(P2)}if(!YX(I2,_1.current)){let P2=_9(v1,_1.current);j1(P2)}k.setState({userSelectionRect:h2,userSelectionActive:!0,nodesSelectionActive:!1})}function q1(){if(!X||!a.current)return;let[X1,f1]=Nq(y.current,a.current,b);v({x:X1,y:f1}).then((l1)=>{if(!J1.current||!l1){V.current=requestAnimationFrame(q1);return}let{x:W1,y:S1}=y.current;i(W1,S1),V.current=requestAnimationFrame(q1)})}let Q1=()=>{cancelAnimationFrame(V.current),V.current=0,u.current=!1};K1.useEffect(()=>{return()=>Q1()},[]);let Y1=(X1)=>{let{userSelectionRect:f1,transform:l1,resetSelectedElements:W1}=k.getState();if(!a.current||!f1)return;let{x:S1,y:v1}=D5(X1.nativeEvent,a.current);y.current={x:S1,y:v1};let c1=w8({x:f1.startX,y:f1.startY},l1);if(!J1.current){let E1=U?0:W;if(Math.hypot(S1-c1.x,v1-c1.y)<=E1)return;W1(),B?.(X1)}if(J1.current=!0,!u.current)q1(),u.current=!0;i(S1,v1)},L1=(X1)=>{if(!E){if(X1.target===p.current&&k.getState().connection.inProgress)$1.current=!0;return}if(X1.button!==0)return;if(X1.target?.releasePointerCapture?.(X1.pointerId),!h&&X1.target===p.current&&k.getState().userSelectionRect)x?.(X1);if(k.setState({userSelectionActive:!1,userSelectionRect:null}),J1.current)O?.(X1),k.setState({nodesSelectionActive:m.current.size>0});Q1()},M1=(X1)=>{X1.target?.releasePointerCapture?.(X1.pointerId),Q1()},I1=K===!0||Array.isArray(K)&&K.includes(0);return F1.jsxs("div",{className:y0(["react-flow__pane",{draggable:I1,dragging:C,selection:Q}]),onClick:E?void 0:NX(x,p),onContextMenu:NX(d,p),onWheel:NX(g,p),onPointerEnter:E?void 0:M,onPointerMove:E?Y1:f,onPointerUp:L1,onPointerCancel:E?M1:void 0,onPointerDownCapture:E?j:void 0,onClickCapture:E?n:void 0,onPointerLeave:I,ref:p,style:cq,children:[D,F1.jsx(LS,{})]})}function SX({id:Q,store:U,unselect:Z=!1,nodeRef:K}){let{addSelectedNodes:X,unselectNodesAndEdges:W,multiSelectionActive:z,nodeLookup:B,onError:O}=U.getState(),T=B.get(Q);if(!T){O?.("012",x2.error012(Q));return}if(U.setState({nodesSelectionActive:!1}),!T.selected)X([Q]);else if(Z||T.selected&&z)W({nodes:[T],edges:[]}),requestAnimationFrame(()=>K?.current?.blur())}function uT({nodeRef:Q,disabled:U=!1,noDragClassName:Z,handleSelector:K,nodeId:X,isSelectable:W,nodeClickDistance:z}){let B=C0(),[O,T]=K1.useState(!1),R=K1.useRef();return K1.useEffect(()=>{if(U)return;return R.current=vM({getStoreItems:()=>B.getState(),onNodeMouseDown:(L)=>{SX({id:L,store:B,nodeRef:Q})},onDragStart:()=>{T(!0)},onDragStop:()=>{T(!1)}}),()=>{R.current?.destroy(),R.current=void 0}},[U,B,Q]),K1.useEffect(()=>{if(U||!Q.current||!R.current)return;R.current.update({noDragClassName:Z,handleSelector:K,domNode:Q.current,isSelectable:W,nodeId:X,nodeClickDistance:z})},[Z,K,U,W,Q,X,z]),O}var RS=(Q)=>(U)=>U.selected&&(U.draggable||Q&&typeof U.draggable>"u");function xT(){let Q=C0();return K1.useCallback((Z)=>{let{nodeExtent:K,snapToGrid:X,snapGrid:W,nodesDraggable:z,onError:B,updateNodePositions:O,nodeLookup:T,nodeOrigin:R}=Q.getState(),L=new Map,M=RS(z),f=X?W[0]:5,I=X?W[1]:5,D=Z.direction.x*f*Z.factor,V=Z.direction.y*I*Z.factor;for(let[,k]of T){if(!M(k))continue;let h={x:k.internals.positionAbsolute.x+D,y:k.internals.positionAbsolute.y+V};if(X)h=o7(h,W);let{position:P,positionAbsolute:C}=GX({nodeId:k.id,nextPosition:h,nodeLookup:T,nodeExtent:K,nodeOrigin:R,onError:B});k.position=P,k.internals.positionAbsolute=C,L.set(k.id,k)}O(L)},[])}var jX=K1.createContext(null),OS=jX.Provider;jX.Consumer;var VX=()=>{return K1.useContext(jX)},wS=(Q)=>({connectOnClick:Q.connectOnClick,noPanClassName:Q.noPanClassName,rfId:Q.rfId}),hT=K1.createContext(null);function IS({children:Q}){let U=G0(wS,N0);return F1.jsx(hT.Provider,{value:U,children:Q})}function fS(){let Q=K1.useContext(hT);if(!Q)throw Error("useHandleConfig must be used within a HandleConfigProvider");return Q}var PS={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},NS=(Q,U,Z)=>(K)=>{let{connectionClickStartHandle:X,connectionMode:W,connection:z}=K,{fromHandle:B,toHandle:O,isValid:T}=z;if(!B&&!X)return PS;let R=O?.nodeId===Q&&O?.id===U&&O?.type===Z;return{connectingFrom:B?.nodeId===Q&&B?.id===U&&B?.type===Z,connectingTo:R,clickConnecting:X?.nodeId===Q&&X?.id===U&&X?.type===Z,isPossibleEndHandle:W===A6.Strict?B?.type!==Z:Q!==B?.nodeId||U!==B?.id,connectionInProcess:!!B,clickConnectionInProcess:!!X,valid:R&&T}};function CS({type:Q="source",position:U=C1.Top,isValidConnection:Z,isConnectable:K=!0,isConnectableStart:X=!0,isConnectableEnd:W=!0,id:z,onConnect:B,children:O,className:T,onMouseDown:R,onTouchStart:L,...M},f){let I=z||null,D=Q==="target",V=C0(),k=VX(),{connectOnClick:h,noPanClassName:P,rfId:C}=fS(),{connectingFrom:v,connectingTo:b,clickConnecting:E,isPossibleEndHandle:p,connectionInProcess:a,clickConnectionInProcess:m,valid:_1}=G0(NS(k,I,Q),N0);if(!k)V.getState().onError?.("010",x2.error010());let $1=(u)=>{let{defaultEdgeOptions:x,onConnect:d,hasDefaultEdges:g}=V.getState(),n={...x,...u};if(g){let{edges:j,setEdges:i,onError:q1}=V.getState();i(US(n,j,{onError:q1}))}d?.(n),B?.(n)},J1=(u)=>{if(!k)return;let x=AX(u.nativeEvent);if(X&&(x&&u.button===0||!x)){let d=V.getState();bq.onPointerDown(u.nativeEvent,{handleDomNode:u.currentTarget,autoPanOnConnect:d.autoPanOnConnect,connectionMode:d.connectionMode,connectionRadius:d.connectionRadius,domNode:d.domNode,nodeLookup:d.nodeLookup,lib:d.lib,isTarget:D,handleId:I,nodeId:k,flowId:d.rfId,panBy:d.panBy,cancelConnection:d.cancelConnection,onConnectStart:d.onConnectStart,onConnectEnd:(...g)=>V.getState().onConnectEnd?.(...g),updateConnection:d.updateConnection,onConnect:$1,isValidConnection:Z||((...g)=>V.getState().isValidConnection?.(...g)??!0),getTransform:()=>V.getState().transform,getFromHandle:()=>V.getState().connection.fromHandle,autoPanSpeed:d.autoPanSpeed,dragThreshold:d.connectionDragThreshold})}if(x)R?.(u);else L?.(u)},y=(u)=>{let{onClickConnectStart:x,onClickConnectEnd:d,connectionClickStartHandle:g,connectionMode:n,isValidConnection:j,lib:i,rfId:q1,nodeLookup:Q1,connection:Y1}=V.getState();if(!k||!g&&!X)return;if(!g){x?.(u.nativeEvent,{nodeId:k,handleId:I,handleType:Q}),V.setState({connectionClickStartHandle:{nodeId:k,type:Q,id:I}});return}let L1=zX(u.target),M1=Z||j,{connection:I1,isValid:X1}=bq.isValid(u.nativeEvent,{handle:{nodeId:k,id:I,type:Q},connectionMode:n,fromNodeId:g.nodeId,fromHandleId:g.id||null,fromType:g.type,isValidConnection:M1,flowId:q1,doc:L1,lib:i,nodeLookup:Q1});if(X1&&I1)$1(I1);let f1=structuredClone(Y1);delete f1.inProgress,f1.toPosition=f1.toHandle?f1.toHandle.position:null,d?.(u,f1),V.setState({connectionClickStartHandle:null})};return F1.jsx("div",{"data-handleid":I,"data-nodeid":k,"data-handlepos":U,"data-id":`${C}-${k}-${I}-${Q}`,className:y0(["react-flow__handle",`react-flow__handle-${U}`,"nodrag",P,T,{source:!D,target:D,connectable:K,connectablestart:X,connectableend:W,clickconnecting:E,connectingfrom:v,connectingto:b,valid:_1,connectionindicator:K&&(!a||p)&&(a||m?W:X)}]),onMouseDown:J1,onTouchStart:J1,onClick:h?y:void 0,ref:f,...M,children:O})}var mq=K1.memo(vT(CS));function SS({data:Q,isConnectable:U,sourcePosition:Z=C1.Bottom}){return F1.jsxs(F1.Fragment,{children:[Q?.label,F1.jsx(mq,{type:"source",position:Z,isConnectable:U})]})}function jS({data:Q,isConnectable:U,targetPosition:Z=C1.Top,sourcePosition:K=C1.Bottom}){return F1.jsxs(F1.Fragment,{children:[F1.jsx(mq,{type:"target",position:Z,isConnectable:U}),Q?.label,F1.jsx(mq,{type:"source",position:K,isConnectable:U})]})}function VS(){return null}function kS({data:Q,isConnectable:U,targetPosition:Z=C1.Top}){return F1.jsxs(F1.Fragment,{children:[F1.jsx(mq,{type:"target",position:Z,isConnectable:U}),Q?.label]})}var gq={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},zT={input:SS,default:jS,output:kS,group:VS};function DS(Q){if(Q.internals.handleBounds===void 0)return{width:Q.width??Q.initialWidth??Q.style?.width,height:Q.height??Q.initialHeight??Q.style?.height};return{width:Q.width??Q.style?.width,height:Q.height??Q.style?.height}}var yS=(Q)=>{let{width:U,height:Z,x:K,y:X}=f8(Q.nodeLookup,{filter:(W)=>!!W.selected});return{width:k5(U)?U:null,height:k5(Z)?Z:null,userSelectionActive:Q.userSelectionActive,transformString:`translate(${Q.transform[0]}px,${Q.transform[1]}px) scale(${Q.transform[2]}) translate(${K}px,${X}px)`}};function vS({onSelectionContextMenu:Q,noPanClassName:U,disableKeyboardA11y:Z}){let K=C0(),{width:X,height:W,transformString:z,userSelectionActive:B}=G0(yS,N0),O=xT(),T=K1.useRef(null);K1.useEffect(()=>{if(!Z)T.current?.focus({preventScroll:!0})},[Z]);let R=!B&&X!==null&&W!==null;if(uT({nodeRef:T,disabled:!R}),!R)return null;let L=Q?(f)=>{let I=K.getState().nodes.filter((D)=>D.selected);Q(f,I)}:void 0,M=(f)=>{if(Object.prototype.hasOwnProperty.call(gq,f.key))f.preventDefault(),O({direction:gq[f.key],factor:f.shiftKey?4:1})};return F1.jsx("div",{className:y0(["react-flow__nodesselection","react-flow__container",U]),style:{transform:z},children:F1.jsx("div",{ref:T,className:"react-flow__nodesselection-rect",onContextMenu:L,tabIndex:Z?void 0:-1,onKeyDown:Z?void 0:M,style:{width:X,height:W}})})}var BT=typeof window<"u"?window:void 0,ES=(Q)=>{return{nodesSelectionActive:Q.nodesSelectionActive,userSelectionActive:Q.userSelectionActive}};function mT({children:Q,onPaneClick:U,onPaneMouseEnter:Z,onPaneMouseMove:K,onPaneMouseLeave:X,onPaneContextMenu:W,onPaneScroll:z,paneClickDistance:B,deleteKeyCode:O,selectionKeyCode:T,selectionOnDrag:R,selectionMode:L,onSelectionStart:M,onSelectionEnd:f,multiSelectionKeyCode:I,panActivationKeyCode:D,zoomActivationKeyCode:V,elementsSelectable:k,zoomOnScroll:h,zoomOnPinch:P,panOnScroll:C,panOnScrollSpeed:v,panOnScrollMode:b,zoomOnDoubleClick:E,panOnDrag:p,autoPanOnSelection:a,defaultViewport:m,translateExtent:_1,minZoom:$1,maxZoom:J1,preventScrolling:y,onSelectionContextMenu:u,noWheelClassName:x,noPanClassName:d,disableKeyboardA11y:g,onViewportChange:n,isControlledViewport:j}){let{nodesSelectionActive:i,userSelectionActive:q1}=G0(ES,N0),Q1=RJ(T,{target:BT}),Y1=RJ(D,{target:BT}),L1=Y1||p,M1=Y1||C,I1=R&&L1!==!0,X1=Q1||q1||I1;return YS({deleteKeyCode:O,multiSelectionKeyCode:I}),F1.jsx(BS,{onPaneContextMenu:W,elementsSelectable:k,zoomOnScroll:h,zoomOnPinch:P,panOnScroll:M1,panActivationKeyPressed:Y1,panOnScrollSpeed:v,panOnScrollMode:b,zoomOnDoubleClick:E,panOnDrag:!Q1&&L1,defaultViewport:m,translateExtent:_1,minZoom:$1,maxZoom:J1,zoomActivationKeyCode:V,preventScrolling:y,noWheelClassName:x,noPanClassName:d,onViewportChange:n,isControlledViewport:j,paneClickDistance:B,selectionOnDrag:I1,children:F1.jsxs(TS,{onSelectionStart:M,onSelectionEnd:f,onPaneClick:U,onPaneMouseEnter:Z,onPaneMouseMove:K,onPaneMouseLeave:X,onPaneContextMenu:W,onPaneScroll:z,panOnDrag:L1,autoPanOnSelection:a,isSelecting:!!X1,selectionMode:L,selectionKeyPressed:Q1,paneClickDistance:B,selectionOnDrag:I1,children:[Q,i&&F1.jsx(vS,{onSelectionContextMenu:u,noPanClassName:d,disableKeyboardA11y:g})]})})}mT.displayName="FlowRenderer";var bS=K1.memo(mT),uS=(Q)=>(U)=>{return Q?Pq(U.nodeLookup,{x:0,y:0,width:U.width,height:U.height},U.transform,!0).map((Z)=>Z.id):Array.from(U.nodeLookup.keys())};function xS(Q){return G0(K1.useCallback(uS(Q),[Q]),N0)}var hS=(Q)=>Q.updateNodeInternals;function mS(){let Q=G0(hS),[U]=K1.useState(()=>{if(typeof ResizeObserver>"u")return null;return new ResizeObserver((Z)=>{let K=new Map;Z.forEach((X)=>{let W=X.target.getAttribute("data-id");K.set(W,{id:W,nodeElement:X.target,force:!0})}),Q(K)})});return K1.useEffect(()=>{return()=>{U?.disconnect()}},[U]),U}function gS({node:Q,nodeType:U,hasDimensions:Z,resizeObserver:K}){let X=C0(),W=K1.useRef(null),z=K1.useRef(null),B=K1.useRef(Q.sourcePosition),O=K1.useRef(Q.targetPosition),T=K1.useRef(U),R=Z&&!!Q.internals.handleBounds;return K1.useEffect(()=>{if(W.current&&!Q.hidden&&(!R||z.current!==W.current)){if(z.current)K?.unobserve(z.current);K?.observe(W.current),z.current=W.current}},[R,Q.hidden]),K1.useEffect(()=>{return()=>{if(z.current)K?.unobserve(z.current),z.current=null}},[]),K1.useEffect(()=>{if(W.current){let L=T.current!==U,M=B.current!==Q.sourcePosition,f=O.current!==Q.targetPosition;if(L||M||f)T.current=U,B.current=Q.sourcePosition,O.current=Q.targetPosition,X.getState().updateNodeInternals(new Map([[Q.id,{id:Q.id,nodeElement:W.current,force:!0}]]))}},[Q.id,U,Q.sourcePosition,Q.targetPosition]),W}function pS({id:Q,onClick:U,onMouseEnter:Z,onMouseMove:K,onMouseLeave:X,onContextMenu:W,onDoubleClick:z,nodesDraggable:B,elementsSelectable:O,nodesConnectable:T,nodesFocusable:R,resizeObserver:L,noDragClassName:M,noPanClassName:f,disableKeyboardA11y:I,rfId:D,nodeTypes:V,nodeClickDistance:k,onError:h}){let{node:P,internals:C,isParent:v}=G0((X1)=>{let f1=X1.nodeLookup.get(Q),l1=X1.parentLookup.has(Q);return{node:f1,internals:f1.internals,isParent:l1}},N0),b=P.type||"default",E=V?.[b]||zT[b];if(E===void 0)h?.("003",x2.error003(b)),b="default",E=V?.default||zT.default;let p=!!(P.draggable||B&&typeof P.draggable>"u"),a=!!(P.selectable||O&&typeof P.selectable>"u"),m=!!(P.connectable||T&&typeof P.connectable>"u"),_1=!!(P.focusable||R&&typeof P.focusable>"u"),$1=C0(),J1=XX(P),y=gS({node:P,nodeType:b,hasDimensions:J1,resizeObserver:L}),u=uT({nodeRef:y,disabled:P.hidden||!p,noDragClassName:M,handleSelector:P.dragHandle,nodeId:Q,isSelectable:a,nodeClickDistance:k}),x=xT();if(P.hidden)return null;let d=y5(P),g=DS(P),n=a||p||U||Z||K||X,j=Z?(X1)=>Z(X1,{...C.userNode}):void 0,i=K?(X1)=>K(X1,{...C.userNode}):void 0,q1=X?(X1)=>X(X1,{...C.userNode}):void 0,Q1=W?(X1)=>W(X1,{...C.userNode}):void 0,Y1=z?(X1)=>z(X1,{...C.userNode}):void 0,L1=(X1)=>{let{selectNodesOnDrag:f1,nodeDragThreshold:l1}=$1.getState();if(a&&(!f1||!p||l1>0))SX({id:Q,store:$1,nodeRef:y});if(U)U(X1,{...C.userNode})},M1=(X1)=>{if(BX(X1.nativeEvent)||I)return;if(_X.includes(X1.key)&&a){let f1=X1.key==="Escape";SX({id:Q,store:$1,unselect:f1,nodeRef:y})}else if(p&&P.selected&&Object.prototype.hasOwnProperty.call(gq,X1.key)){X1.preventDefault();let{ariaLabelConfig:f1}=$1.getState();$1.setState({ariaLiveMessage:f1["node.a11yDescription.ariaLiveMessage"]({direction:X1.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),x({direction:gq[X1.key],factor:X1.shiftKey?4:1})}},I1=()=>{if(I||!y.current?.matches(":focus-visible"))return;let{transform:X1,width:f1,height:l1,autoPanOnNodeFocus:W1,setCenter:S1}=$1.getState();if(!W1)return;if(!(Pq(new Map([[Q,P]]),{x:0,y:0,width:f1,height:l1},X1,!0).length>0))S1(P.position.x+d.width/2,P.position.y+d.height/2,{zoom:X1[2]})};return F1.jsx("div",{className:y0(["react-flow__node",`react-flow__node-${b}`,{[f]:p},P.className,{selected:P.selected,selectable:a,parent:v,draggable:p,dragging:u}]),ref:y,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:n?"all":"none",visibility:J1?"visible":"hidden",...P.style,...g},"data-id":Q,"data-testid":`rf__node-${Q}`,onMouseEnter:j,onMouseMove:i,onMouseLeave:q1,onContextMenu:Q1,onClick:L1,onDoubleClick:Y1,onKeyDown:_1?M1:void 0,tabIndex:_1?0:void 0,onFocus:_1?I1:void 0,role:P.ariaRole??(_1?"group":void 0),"aria-roledescription":"node","aria-describedby":I?void 0:`${jT}-${D}`,"aria-label":P.ariaLabel,...P.domAttributes,children:F1.jsx(OS,{value:Q,children:F1.jsx(E,{id:Q,data:P.data,type:b,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:P.selected??!1,selectable:a,draggable:p,deletable:P.deletable??!0,isConnectable:m,sourcePosition:P.sourcePosition,targetPosition:P.targetPosition,dragging:u,dragHandle:P.dragHandle,zIndex:C.z,parentId:P.parentId,...d})})})}var cS=K1.memo(pS),lS=(Q)=>({nodesConnectable:Q.nodesConnectable,nodesFocusable:Q.nodesFocusable,elementsSelectable:Q.elementsSelectable,onError:Q.onError});function gT(Q){let{nodesConnectable:U,nodesFocusable:Z,elementsSelectable:K,onError:X}=G0(lS,N0),W=xS(Q.onlyRenderVisibleElements),z=mS();return F1.jsx("div",{className:"react-flow__nodes",style:cq,children:W.map((B)=>{return F1.jsx(cS,{id:B,nodeTypes:Q.nodeTypes,nodeExtent:Q.nodeExtent,onClick:Q.onNodeClick,onMouseEnter:Q.onNodeMouseEnter,onMouseMove:Q.onNodeMouseMove,onMouseLeave:Q.onNodeMouseLeave,onContextMenu:Q.onNodeContextMenu,onDoubleClick:Q.onNodeDoubleClick,noDragClassName:Q.noDragClassName,noPanClassName:Q.noPanClassName,rfId:Q.rfId,disableKeyboardA11y:Q.disableKeyboardA11y,resizeObserver:z,nodesDraggable:Q.nodesDraggable??!0,nodesConnectable:U,nodesFocusable:Z,elementsSelectable:K,nodeClickDistance:Q.nodeClickDistance,onError:X},B)})})}gT.displayName="NodeRenderer";var rS=K1.memo(gT);function dS(Q){return G0(K1.useCallback((Z)=>{if(!Q)return Z.edges.map((X)=>X.id);let K=[];if(Z.width&&Z.height)for(let X of Z.edges){let W=Z.nodeLookup.get(X.source),z=Z.nodeLookup.get(X.target);if(W&&z&&IM({sourceNode:W,targetNode:z,width:Z.width,height:Z.height,transform:Z.transform}))K.push(X.id)}return K},[Q]),N0)}var iS=({color:Q="none",strokeWidth:U=1})=>{let Z={strokeWidth:U,...Q&&{stroke:Q}};return F1.jsx("polyline",{className:"arrow",style:Z,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},aS=({color:Q="none",strokeWidth:U=1})=>{let Z={strokeWidth:U,...Q&&{stroke:Q,fill:Q}};return F1.jsx("polyline",{className:"arrowclosed",style:Z,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},AT={[i7.Arrow]:iS,[i7.ArrowClosed]:aS};function sS(Q){let U=C0();return K1.useMemo(()=>{if(!Object.prototype.hasOwnProperty.call(AT,Q))return U.getState().onError?.("009",x2.error009(Q)),null;return AT[Q]},[Q])}var tS=({id:Q,type:U,color:Z,width:K=12.5,height:X=12.5,markerUnits:W="strokeWidth",strokeWidth:z,orient:B="auto-start-reverse"})=>{let O=sS(U);if(!O)return null;return F1.jsx("marker",{className:"react-flow__arrowhead",id:Q,markerWidth:`${K}`,markerHeight:`${X}`,viewBox:"-10 -10 20 20",markerUnits:W,orient:B,refX:"0",refY:"0",children:F1.jsx(O,{color:Z,strokeWidth:z})})},pT=({defaultColor:Q,rfId:U})=>{let Z=G0((W)=>W.edges),K=G0((W)=>W.defaultEdgeOptions),X=K1.useMemo(()=>{return NM(Z,{id:U,defaultColor:Q,defaultMarkerStart:K?.markerStart,defaultMarkerEnd:K?.markerEnd})},[Z,K,U,Q]);if(!X.length)return null;return F1.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:F1.jsx("defs",{children:X.map((W)=>F1.jsx(tS,{id:W.id,type:W.type,color:W.color,width:W.width,height:W.height,markerUnits:W.markerUnits,strokeWidth:W.strokeWidth,orient:W.orient},W.id))})})};pT.displayName="MarkerDefinitions";var oS=K1.memo(pT);function cT({x:Q,y:U,label:Z,labelStyle:K,labelShowBg:X=!0,labelBgStyle:W,labelBgPadding:z=[2,4],labelBgBorderRadius:B=2,children:O,className:T,...R}){let[L,M]=K1.useState({x:1,y:0,width:0,height:0}),f=y0(["react-flow__edge-textwrapper",T]),I=K1.useRef(null);if(K1.useEffect(()=>{if(I.current){let D=I.current.getBBox();M({x:D.x,y:D.y,width:D.width,height:D.height})}},[Z]),!Z)return null;return F1.jsxs("g",{transform:`translate(${Q-L.width/2} ${U-L.height/2})`,className:f,visibility:L.width?"visible":"hidden",...R,children:[X&&F1.jsx("rect",{width:L.width+2*z[0],x:-z[0],y:-z[1],height:L.height+2*z[1],className:"react-flow__edge-textbg",style:W,rx:B,ry:B}),F1.jsx("text",{className:"react-flow__edge-text",y:L.height/2,dy:"0.3em",ref:I,style:K,children:Z}),O]})}cT.displayName="EdgeText";var nS=K1.memo(cT);function lq({path:Q,labelX:U,labelY:Z,label:K,labelStyle:X,labelShowBg:W,labelBgStyle:z,labelBgPadding:B,labelBgBorderRadius:O,interactionWidth:T=20,...R}){return F1.jsxs(F1.Fragment,{children:[F1.jsx("path",{...R,d:Q,fill:"none",className:y0(["react-flow__edge-path",R.className])}),T?F1.jsx("path",{d:Q,fill:"none",strokeOpacity:0,strokeWidth:T,className:"react-flow__edge-interaction"}):null,K&&k5(U)&&k5(Z)?F1.jsx(nS,{x:U,y:Z,label:K,labelStyle:X,labelShowBg:W,labelBgStyle:z,labelBgPadding:B,labelBgBorderRadius:O}):null]})}function LT({pos:Q,x1:U,y1:Z,x2:K,y2:X}){if(Q===C1.Left||Q===C1.Right)return[0.5*(U+K),Z];return[U,0.5*(Z+X)]}function lT({sourceX:Q,sourceY:U,sourcePosition:Z=C1.Bottom,targetX:K,targetY:X,targetPosition:W=C1.Top}){let[z,B]=LT({pos:Z,x1:Q,y1:U,x2:K,y2:X}),[O,T]=LT({pos:W,x1:K,y1:X,x2:Q,y2:U}),[R,L,M,f]=Vq({sourceX:Q,sourceY:U,targetX:K,targetY:X,sourceControlX:z,sourceControlY:B,targetControlX:O,targetControlY:T});return[`M${Q},${U} C${z},${B} ${O},${T} ${K},${X}`,R,L,M,f]}function rT(Q){return K1.memo(({id:U,sourceX:Z,sourceY:K,targetX:X,targetY:W,sourcePosition:z,targetPosition:B,label:O,labelStyle:T,labelShowBg:R,labelBgStyle:L,labelBgPadding:M,labelBgBorderRadius:f,style:I,markerEnd:D,markerStart:V,interactionWidth:k})=>{let[h,P,C]=lT({sourceX:Z,sourceY:K,sourcePosition:z,targetX:X,targetY:W,targetPosition:B}),v=Q.isInternal?void 0:U;return F1.jsx(lq,{id:v,path:h,labelX:P,labelY:C,label:O,labelStyle:T,labelShowBg:R,labelBgStyle:L,labelBgPadding:M,labelBgBorderRadius:f,style:I,markerEnd:D,markerStart:V,interactionWidth:k})})}var eS=rT({isInternal:!1}),dT=rT({isInternal:!0});eS.displayName="SimpleBezierEdge";dT.displayName="SimpleBezierEdgeInternal";function iT(Q){return K1.memo(({id:U,sourceX:Z,sourceY:K,targetX:X,targetY:W,label:z,labelStyle:B,labelShowBg:O,labelBgStyle:T,labelBgPadding:R,labelBgBorderRadius:L,style:M,sourcePosition:f=C1.Bottom,targetPosition:I=C1.Top,markerEnd:D,markerStart:V,pathOptions:k,interactionWidth:h})=>{let[P,C,v]=TJ({sourceX:Z,sourceY:K,sourcePosition:f,targetX:X,targetY:W,targetPosition:I,borderRadius:k?.borderRadius,offset:k?.offset,stepPosition:k?.stepPosition}),b=Q.isInternal?void 0:U;return F1.jsx(lq,{id:b,path:P,labelX:C,labelY:v,label:z,labelStyle:B,labelShowBg:O,labelBgStyle:T,labelBgPadding:R,labelBgBorderRadius:L,style:M,markerEnd:D,markerStart:V,interactionWidth:h})})}var aT=iT({isInternal:!1}),sT=iT({isInternal:!0});aT.displayName="SmoothStepEdge";sT.displayName="SmoothStepEdgeInternal";function tT(Q){return K1.memo(({id:U,...Z})=>{let K=Q.isInternal?void 0:U;return F1.jsx(aT,{...Z,id:K,pathOptions:K1.useMemo(()=>({borderRadius:0,offset:Z.pathOptions?.offset}),[Z.pathOptions?.offset])})})}var _j=tT({isInternal:!1}),oT=tT({isInternal:!0});_j.displayName="StepEdge";oT.displayName="StepEdgeInternal";function nT(Q){return K1.memo(({id:U,sourceX:Z,sourceY:K,targetX:X,targetY:W,label:z,labelStyle:B,labelShowBg:O,labelBgStyle:T,labelBgPadding:R,labelBgBorderRadius:L,style:M,markerEnd:f,markerStart:I,interactionWidth:D})=>{let[V,k,h]=Dq({sourceX:Z,sourceY:K,targetX:X,targetY:W}),P=Q.isInternal?void 0:U;return F1.jsx(lq,{id:P,path:V,labelX:k,labelY:h,label:z,labelStyle:B,labelShowBg:O,labelBgStyle:T,labelBgPadding:R,labelBgBorderRadius:L,style:M,markerEnd:f,markerStart:I,interactionWidth:D})})}var Jj=nT({isInternal:!1}),eT=nT({isInternal:!0});Jj.displayName="StraightEdge";eT.displayName="StraightEdgeInternal";function _R(Q){return K1.memo(({id:U,sourceX:Z,sourceY:K,targetX:X,targetY:W,sourcePosition:z=C1.Bottom,targetPosition:B=C1.Top,label:O,labelStyle:T,labelShowBg:R,labelBgStyle:L,labelBgPadding:M,labelBgBorderRadius:f,style:I,markerEnd:D,markerStart:V,pathOptions:k,interactionWidth:h})=>{let[P,C,v]=kq({sourceX:Z,sourceY:K,sourcePosition:z,targetX:X,targetY:W,targetPosition:B,curvature:k?.curvature}),b=Q.isInternal?void 0:U;return F1.jsx(lq,{id:b,path:P,labelX:C,labelY:v,label:O,labelStyle:T,labelShowBg:R,labelBgStyle:L,labelBgPadding:M,labelBgBorderRadius:f,style:I,markerEnd:D,markerStart:V,interactionWidth:h})})}var $j=_R({isInternal:!1}),JR=_R({isInternal:!0});$j.displayName="BezierEdge";JR.displayName="BezierEdgeInternal";var MT={default:JR,straight:eT,step:oT,smoothstep:sT,simplebezier:dT},TT={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Qj=(Q,U,Z)=>{if(Z===C1.Left)return Q-U;if(Z===C1.Right)return Q+U;return Q},qj=(Q,U,Z)=>{if(Z===C1.Top)return Q-U;if(Z===C1.Bottom)return Q+U;return Q},RT="react-flow__edgeupdater";function OT({position:Q,centerX:U,centerY:Z,radius:K=10,onMouseDown:X,onMouseEnter:W,onMouseOut:z,type:B}){return F1.jsx("circle",{onMouseDown:X,onMouseEnter:W,onMouseOut:z,className:y0([RT,`${RT}-${B}`]),cx:Qj(U,K,Q),cy:qj(Z,K,Q),r:K,stroke:"transparent",fill:"transparent"})}function Uj({isReconnectable:Q,reconnectRadius:U,edge:Z,sourceX:K,sourceY:X,targetX:W,targetY:z,sourcePosition:B,targetPosition:O,onReconnect:T,onReconnectStart:R,onReconnectEnd:L,setReconnecting:M,setUpdateHover:f}){let I=C0(),D=(C,v)=>{if(C.button!==0)return;let{autoPanOnConnect:b,domNode:E,connectionMode:p,connectionRadius:a,lib:m,onConnectStart:_1,cancelConnection:$1,nodeLookup:J1,rfId:y,panBy:u,updateConnection:x}=I.getState(),d=v.type==="target",g=(i,q1)=>{M(!1),L?.(i,Z,v.type,q1)},n=(i)=>T?.(Z,i),j=(i,q1)=>{M(!0),R?.(C,Z,v.type),_1?.(i,q1)};bq.onPointerDown(C.nativeEvent,{autoPanOnConnect:b,connectionMode:p,connectionRadius:a,domNode:E,handleId:v.id,nodeId:v.nodeId,nodeLookup:J1,isTarget:d,edgeUpdaterType:v.type,lib:m,flowId:y,cancelConnection:$1,panBy:u,isValidConnection:(...i)=>I.getState().isValidConnection?.(...i)??!0,onConnect:n,onConnectStart:j,onConnectEnd:(...i)=>I.getState().onConnectEnd?.(...i),onReconnectEnd:g,updateConnection:x,getTransform:()=>I.getState().transform,getFromHandle:()=>I.getState().connection.fromHandle,dragThreshold:I.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},V=(C)=>D(C,{nodeId:Z.target,id:Z.targetHandle??null,type:"target"}),k=(C)=>D(C,{nodeId:Z.source,id:Z.sourceHandle??null,type:"source"}),h=()=>f(!0),P=()=>f(!1);return F1.jsxs(F1.Fragment,{children:[(Q===!0||Q==="source")&&F1.jsx(OT,{position:B,centerX:K,centerY:X,radius:U,onMouseDown:V,onMouseEnter:h,onMouseOut:P,type:"source"}),(Q===!0||Q==="target")&&F1.jsx(OT,{position:O,centerX:W,centerY:z,radius:U,onMouseDown:k,onMouseEnter:h,onMouseOut:P,type:"target"})]})}function Gj({id:Q,edgesFocusable:U,edgesReconnectable:Z,elementsSelectable:K,onClick:X,onDoubleClick:W,onContextMenu:z,onMouseEnter:B,onMouseMove:O,onMouseLeave:T,reconnectRadius:R,onReconnect:L,onReconnectStart:M,onReconnectEnd:f,rfId:I,edgeTypes:D,noPanClassName:V,onError:k,disableKeyboardA11y:h}){let P=G0((S1)=>S1.edgeLookup.get(Q)),C=G0((S1)=>S1.defaultEdgeOptions);P=C?{...C,...P}:P;let v=P.type||"default",b=D?.[v]||MT[v];if(b===void 0)k?.("011",x2.error011(v)),v="default",b=D?.default||MT.default;let E=!!(P.focusable||U&&typeof P.focusable>"u"),p=typeof L<"u"&&(P.reconnectable||Z&&typeof P.reconnectable>"u"),a=!!(P.selectable||K&&typeof P.selectable>"u"),m=K1.useRef(null),[_1,$1]=K1.useState(!1),[J1,y]=K1.useState(!1),u=C0(),{zIndex:x=P.zIndex,sourceX:d,sourceY:g,targetX:n,targetY:j,sourcePosition:i,targetPosition:q1}=G0(K1.useCallback((S1)=>{let v1=S1.nodeLookup.get(P.source),c1=S1.nodeLookup.get(P.target);if(!v1||!c1)return TT;let E1=PM({id:Q,sourceNode:v1,targetNode:c1,sourceHandle:P.sourceHandle||null,targetHandle:P.targetHandle||null,connectionMode:S1.connectionMode,onError:k}),j1=wM({selected:P.selected,zIndex:P.zIndex,sourceNode:v1,targetNode:c1,elevateOnSelect:S1.elevateEdgesOnSelect,zIndexMode:S1.zIndexMode});return{...E1||TT,zIndex:j1}},[P.source,P.target,P.sourceHandle,P.targetHandle,P.selected,P.zIndex,k]),N0),Q1=K1.useMemo(()=>P.markerStart?`url('#${yq(P.markerStart,I)}')`:void 0,[P.markerStart,I]),Y1=K1.useMemo(()=>P.markerEnd?`url('#${yq(P.markerEnd,I)}')`:void 0,[P.markerEnd,I]);if(P.hidden||d===null||g===null||n===null||j===null)return null;let L1=(S1)=>{let{addSelectedEdges:v1,unselectNodesAndEdges:c1,multiSelectionActive:E1}=u.getState();if(a)if(u.setState({nodesSelectionActive:!1}),P.selected&&E1)c1({nodes:[],edges:[P]}),m.current?.blur();else v1([Q]);if(X)X(S1,P)},M1=W?(S1)=>{W(S1,{...P})}:void 0,I1=z?(S1)=>{z(S1,{...P})}:void 0,X1=B?(S1)=>{B(S1,{...P})}:void 0,f1=O?(S1)=>{O(S1,{...P})}:void 0,l1=T?(S1)=>{T(S1,{...P})}:void 0,W1=(S1)=>{if(!h&&_X.includes(S1.key)&&a){let{unselectNodesAndEdges:v1,addSelectedEdges:c1}=u.getState();if(S1.key==="Escape")m.current?.blur(),v1({edges:[P]});else c1([Q])}};return F1.jsx("svg",{style:{zIndex:x},children:F1.jsxs("g",{className:y0(["react-flow__edge",`react-flow__edge-${v}`,P.className,V,{selected:P.selected,animated:P.animated,inactive:!a&&!X,updating:_1,selectable:a}]),onClick:L1,onDoubleClick:M1,onContextMenu:I1,onMouseEnter:X1,onMouseMove:f1,onMouseLeave:l1,onKeyDown:E?W1:void 0,tabIndex:E?0:void 0,role:P.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":Q,"data-testid":`rf__edge-${Q}`,"aria-label":P.ariaLabel===null?void 0:P.ariaLabel||`Edge from ${P.source} to ${P.target}`,"aria-describedby":E?`${VT}-${I}`:void 0,ref:m,...P.domAttributes,children:[!J1&&F1.jsx(b,{id:Q,source:P.source,target:P.target,type:P.type,selected:P.selected,animated:P.animated,selectable:a,deletable:P.deletable??!0,label:P.label,labelStyle:P.labelStyle,labelShowBg:P.labelShowBg,labelBgStyle:P.labelBgStyle,labelBgPadding:P.labelBgPadding,labelBgBorderRadius:P.labelBgBorderRadius,sourceX:d,sourceY:g,targetX:n,targetY:j,sourcePosition:i,targetPosition:q1,data:P.data,style:P.style,sourceHandleId:P.sourceHandle,targetHandleId:P.targetHandle,markerStart:Q1,markerEnd:Y1,pathOptions:"pathOptions"in P?P.pathOptions:void 0,interactionWidth:P.interactionWidth}),p&&F1.jsx(Uj,{edge:P,isReconnectable:p,reconnectRadius:R,onReconnect:L,onReconnectStart:M,onReconnectEnd:f,sourceX:d,sourceY:g,targetX:n,targetY:j,sourcePosition:i,targetPosition:q1,setUpdateHover:$1,setReconnecting:y})]})})}var Zj=K1.memo(Gj),Fj=(Q)=>({edgesFocusable:Q.edgesFocusable,edgesReconnectable:Q.edgesReconnectable,elementsSelectable:Q.elementsSelectable,connectionMode:Q.connectionMode,onError:Q.onError});function $R({defaultMarkerColor:Q,onlyRenderVisibleElements:U,rfId:Z,edgeTypes:K,noPanClassName:X,onReconnect:W,onEdgeContextMenu:z,onEdgeMouseEnter:B,onEdgeMouseMove:O,onEdgeMouseLeave:T,onEdgeClick:R,reconnectRadius:L,onEdgeDoubleClick:M,onReconnectStart:f,onReconnectEnd:I,disableKeyboardA11y:D}){let{edgesFocusable:V,edgesReconnectable:k,elementsSelectable:h,onError:P}=G0(Fj,N0),C=dS(U);return F1.jsxs("div",{className:"react-flow__edges",children:[F1.jsx(oS,{defaultColor:Q,rfId:Z}),C.map((v)=>{return F1.jsx(Zj,{id:v,edgesFocusable:V,edgesReconnectable:k,elementsSelectable:h,noPanClassName:X,onReconnect:W,onContextMenu:z,onMouseEnter:B,onMouseMove:O,onMouseLeave:T,onClick:R,reconnectRadius:L,onDoubleClick:M,onReconnectStart:f,onReconnectEnd:I,rfId:Z,onError:P,edgeTypes:K,disableKeyboardA11y:D},v)})]})}$R.displayName="EdgeRenderer";var Kj=K1.memo($R),wT=(Q)=>`translate(${Q[0]}px,${Q[1]}px) scale(${Q[2]})`;function Xj({children:Q}){let U=C0(),Z=K1.useRef(null),[K]=K1.useState(()=>U.getState().transform);return ET(()=>{let X=null,W=()=>{let z=U.getState().transform;if(X&&z[0]===X[0]&&z[1]===X[1]&&z[2]===X[2])return;if(X=z,Z.current)Z.current.style.transform=wT(z)};return W(),U.subscribe(W)},[U]),F1.jsx("div",{ref:Z,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:wT(K)},children:Q})}function Hj(Q){let U=OJ(),Z=K1.useRef(!1);K1.useEffect(()=>{if(!Z.current&&U.viewportInitialized&&Q)setTimeout(()=>Q(U),1),Z.current=!0},[Q,U.viewportInitialized])}var Yj=(Q)=>Q.panZoom?.syncViewport;function Wj(Q){let U=G0(Yj),Z=C0();return K1.useEffect(()=>{if(Q)U?.(Q),Z.setState({transform:[Q.x,Q.y,Q.zoom]})},[Q,U]),null}function IT(Q){return Q.connection.inProgress?{...Q.connection,to:n7(Q.connection.to,Q.transform)}:{...Q.connection}}function zj(Q){if(Q)return(Z)=>{let K=IT(Z);return Q(K)};return IT}function Bj(Q){let U=zj(Q);return G0(U,N0)}var Aj=(Q)=>({nodesConnectable:Q.nodesConnectable,isValid:Q.connection.isValid,inProgress:Q.connection.inProgress,width:Q.width,height:Q.height});function Lj({containerStyle:Q,style:U,type:Z,component:K}){let{nodesConnectable:X,width:W,height:z,isValid:B,inProgress:O}=G0(Aj,N0);if(!(W&&X&&O))return null;return F1.jsx("svg",{style:Q,width:W,height:z,className:"react-flow__connectionline react-flow__container",children:F1.jsx("g",{className:y0(["react-flow__connection",WX(B)]),children:F1.jsx(QR,{style:U,type:Z,CustomComponent:K,isValid:B})})})}var QR=({style:Q,type:U=y4.Bezier,CustomComponent:Z,isValid:K})=>{let{inProgress:X,from:W,fromNode:z,fromHandle:B,fromPosition:O,to:T,toNode:R,toHandle:L,toPosition:M,pointer:f}=Bj();if(!X)return;if(Z)return F1.jsx(Z,{connectionLineType:U,connectionLineStyle:Q,fromNode:z,fromHandle:B,fromX:W.x,fromY:W.y,toX:T.x,toY:T.y,fromPosition:O,toPosition:M,connectionStatus:WX(K),toNode:R,toHandle:L,pointer:f});let I="",D={sourceX:W.x,sourceY:W.y,sourcePosition:O,targetX:T.x,targetY:T.y,targetPosition:M};switch(U){case y4.Bezier:[I]=kq(D);break;case y4.SimpleBezier:[I]=lT(D);break;case y4.Step:[I]=TJ({...D,borderRadius:0});break;case y4.SmoothStep:[I]=TJ(D);break;default:[I]=Dq(D)}return F1.jsx("path",{d:I,fill:"none",className:"react-flow__connection-path",style:Q})};QR.displayName="ConnectionLine";var Mj={};function fT(Q=Mj){let U=K1.useRef(Q),Z=C0();K1.useEffect(()=>{{let K=new Set([...Object.keys(U.current),...Object.keys(Q)]);for(let X of K)if(U.current[X]!==Q[X]){Z.getState().onError?.("002",x2.error002());break}U.current=Q}},[Q])}function Tj(){let Q=C0(),U=K1.useRef(!1);K1.useEffect(()=>{if(!U.current){let Z=document.querySelector(".react-flow__pane");if(Z&&window.getComputedStyle(Z).zIndex!=="1")Q.getState().onError?.("013",x2.error013("react"));U.current=!0}},[])}function qR({nodeTypes:Q,edgeTypes:U,onInit:Z,onNodeClick:K,onEdgeClick:X,onNodeDoubleClick:W,onEdgeDoubleClick:z,onNodeMouseEnter:B,onNodeMouseMove:O,onNodeMouseLeave:T,onNodeContextMenu:R,onSelectionContextMenu:L,onSelectionStart:M,onSelectionEnd:f,connectionLineType:I,connectionLineStyle:D,connectionLineComponent:V,connectionLineContainerStyle:k,selectionKeyCode:h,selectionOnDrag:P,selectionMode:C,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:E,deleteKeyCode:p,onlyRenderVisibleElements:a,elementsSelectable:m,defaultViewport:_1,translateExtent:$1,minZoom:J1,maxZoom:y,preventScrolling:u,defaultMarkerColor:x,zoomOnScroll:d,zoomOnPinch:g,panOnScroll:n,panOnScrollSpeed:j,panOnScrollMode:i,zoomOnDoubleClick:q1,panOnDrag:Q1,autoPanOnSelection:Y1,onPaneClick:L1,onPaneMouseEnter:M1,onPaneMouseMove:I1,onPaneMouseLeave:X1,onPaneScroll:f1,onPaneContextMenu:l1,paneClickDistance:W1,nodeClickDistance:S1,onEdgeContextMenu:v1,onEdgeMouseEnter:c1,onEdgeMouseMove:E1,onEdgeMouseLeave:j1,reconnectRadius:V0,onReconnect:b1,onReconnectStart:Z2,onReconnectEnd:_0,noDragClassName:h2,noWheelClassName:z2,noPanClassName:I2,disableKeyboardA11y:f2,nodeExtent:P2,rfId:B2,viewport:A2,onViewportChange:L2,nodesDraggable:M3}){return fT(Q),fT(U),Tj(),Hj(Z),Wj(A2),F1.jsx(bS,{onPaneClick:L1,onPaneMouseEnter:M1,onPaneMouseMove:I1,onPaneMouseLeave:X1,onPaneContextMenu:l1,onPaneScroll:f1,paneClickDistance:W1,deleteKeyCode:p,selectionKeyCode:h,selectionOnDrag:P,selectionMode:C,onSelectionStart:M,onSelectionEnd:f,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:E,elementsSelectable:m,zoomOnScroll:d,zoomOnPinch:g,zoomOnDoubleClick:q1,panOnScroll:n,panOnScrollSpeed:j,panOnScrollMode:i,panOnDrag:Q1,autoPanOnSelection:Y1,defaultViewport:_1,translateExtent:$1,minZoom:J1,maxZoom:y,onSelectionContextMenu:L,preventScrolling:u,noDragClassName:h2,noWheelClassName:z2,noPanClassName:I2,disableKeyboardA11y:f2,onViewportChange:L2,isControlledViewport:!!A2,children:F1.jsxs(Xj,{children:[F1.jsx(Kj,{edgeTypes:U,onEdgeClick:X,onEdgeDoubleClick:z,onReconnect:b1,onReconnectStart:Z2,onReconnectEnd:_0,onlyRenderVisibleElements:a,onEdgeContextMenu:v1,onEdgeMouseEnter:c1,onEdgeMouseMove:E1,onEdgeMouseLeave:j1,reconnectRadius:V0,defaultMarkerColor:x,noPanClassName:I2,disableKeyboardA11y:f2,rfId:B2}),F1.jsx(Lj,{style:D,type:I,component:V,containerStyle:k}),F1.jsx("div",{className:"react-flow__edgelabel-renderer"}),F1.jsx(rS,{nodeTypes:Q,onNodeClick:K,onNodeDoubleClick:W,onNodeMouseEnter:B,onNodeMouseMove:O,onNodeMouseLeave:T,onNodeContextMenu:R,nodeClickDistance:S1,onlyRenderVisibleElements:a,noPanClassName:I2,noDragClassName:h2,disableKeyboardA11y:f2,nodeExtent:P2,rfId:B2,nodesDraggable:M3}),F1.jsx("div",{className:"react-flow__viewport-portal"})]})})}qR.displayName="GraphView";var Rj=K1.memo(qR),Oj=KX("React Flow","https://reactflow.dev/"),PT=({nodes:Q,edges:U,defaultNodes:Z,defaultEdges:K,width:X,height:W,fitView:z,fitViewOptions:B,minZoom:O=0.5,maxZoom:T=2,nodeOrigin:R,nodeExtent:L,zIndexMode:M="basic"}={})=>{let f=new Map,I=new Map,D=new Map,V=new Map,k=K??U??[],h=Z??Q??[],P=R??[0,0],C=L??s7;wX(D,V,k);let{nodesInitialized:v}=vq(h,f,I,{nodeOrigin:P,nodeExtent:C,zIndexMode:M}),b=[0,0,1];if(z&&X&&W){let E=f8(f,{filter:(_1)=>!!((_1.width||_1.initialWidth)&&(_1.height||_1.initialHeight))}),{x:p,y:a,zoom:m}=MJ(E,X,W,O,T,B?.padding??0.1);b=[p,a,m]}return{rfId:"1",width:X??0,height:W??0,transform:b,nodes:h,nodesInitialized:v,nodeLookup:f,parentLookup:I,edges:k,edgeLookup:V,connectionLookup:D,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:Z!==void 0,hasDefaultEdges:K!==void 0,panZoom:null,minZoom:O,maxZoom:T,translateExtent:s7,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:A6.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:P,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:z??!1,fitViewOptions:B,fitViewResolver:null,connection:{...$X},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Oj,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:JX,zIndexMode:M,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},wj=({nodes:Q,edges:U,defaultNodes:Z,defaultEdges:K,width:X,height:W,fitView:z,fitViewOptions:B,minZoom:O,maxZoom:T,nodeOrigin:R,nodeExtent:L,zIndexMode:M})=>nM((f,I)=>{async function D(){let{nodeLookup:V,panZoom:k,fitViewOptions:h,fitViewResolver:P,width:C,height:v,minZoom:b,maxZoom:E}=I();if(!k)return;await BM({nodes:V,width:C,height:v,panZoom:k,minZoom:b,maxZoom:E},h),P?.resolve(!0),f({fitViewResolver:null})}return{...PT({nodes:Q,edges:U,width:X,height:W,fitView:z,fitViewOptions:B,minZoom:O,maxZoom:T,nodeOrigin:R,nodeExtent:L,defaultNodes:Z,defaultEdges:K,zIndexMode:M}),setNodes:(V)=>{let{nodeLookup:k,parentLookup:h,nodeOrigin:P,nodeExtent:C,elevateNodesOnSelect:v,fitViewQueued:b,zIndexMode:E,nodesSelectionActive:p}=I(),{nodesInitialized:a,hasSelectedNodes:m}=vq(V,k,h,{nodeOrigin:P,nodeExtent:C,elevateNodesOnSelect:v,checkEquality:!0,zIndexMode:E}),_1=p&&m;if(b&&a)D(),f({nodes:V,nodesInitialized:a,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:_1});else f({nodes:V,nodesInitialized:a,nodesSelectionActive:_1})},setEdges:(V)=>{let{connectionLookup:k,edgeLookup:h}=I();wX(k,h,V),f({edges:V})},setDefaultNodesAndEdges:(V,k)=>{if(V){let{setNodes:h}=I();h(V),f({hasDefaultNodes:!0})}if(k){let{setEdges:h}=I();h(k),f({hasDefaultEdges:!0})}},updateNodeInternals:(V)=>{let{triggerNodeChanges:k,nodeLookup:h,parentLookup:P,domNode:C,nodeOrigin:v,nodeExtent:b,debug:E,fitViewQueued:p,zIndexMode:a}=I(),{changes:m,updatedInternals:_1}=kM(V,h,P,C,v,b,a);if(!_1)return;if(jM(h,P,{nodeOrigin:v,nodeExtent:b,zIndexMode:a}),p)D(),f({fitViewQueued:!1,fitViewOptions:void 0});else f({});if(m?.length>0){if(E)console.log("React Flow: trigger node changes",m);k?.(m)}},updateNodePositions:(V,k=!1)=>{let h=[],P=[],{nodeLookup:C,triggerNodeChanges:v,connection:b,updateConnection:E,onNodesChangeMiddlewareMap:p}=I();for(let[a,m]of V){let _1=C.get(a),$1=!!(_1?.expandParent&&_1?.parentId&&m?.position),J1={id:a,type:"position",position:$1?{x:Math.max(0,m.position.x),y:Math.max(0,m.position.y)}:m.position,dragging:k};if(_1&&b.inProgress&&b.fromNode.id===_1.id){let y=L6(_1,b.fromHandle,C1.Left,!0);E({...b,from:y})}if($1&&_1.parentId)h.push({id:a,parentId:_1.parentId,rect:{...m.internals.positionAbsolute,width:m.measured.width??0,height:m.measured.height??0}});P.push(J1)}if(h.length>0){let{parentLookup:a,nodeOrigin:m}=I(),_1=Eq(h,C,a,m);P.push(..._1)}for(let a of p.values())P=a(P);v(P)},triggerNodeChanges:(V)=>{let{onNodesChange:k,setNodes:h,nodes:P,hasDefaultNodes:C,debug:v}=I();if(V?.length){if(C){let b=yT(V,P);h(b)}if(v)console.log("React Flow: trigger node changes",V);k?.(V)}},triggerEdgeChanges:(V)=>{let{onEdgesChange:k,setEdges:h,edges:P,hasDefaultEdges:C,debug:v}=I();if(V?.length){if(C){let b=QS(V,P);h(b)}if(v)console.log("React Flow: trigger edge changes",V);k?.(V)}},addSelectedNodes:(V)=>{let{multiSelectionActive:k,edgeLookup:h,nodeLookup:P,triggerNodeChanges:C,triggerEdgeChanges:v}=I();if(k){let b=V.map((E)=>P8(E,!0));C(b);return}C(_9(P,new Set([...V]),!0)),v(_9(h))},addSelectedEdges:(V)=>{let{multiSelectionActive:k,edgeLookup:h,nodeLookup:P,triggerNodeChanges:C,triggerEdgeChanges:v}=I();if(k){let b=V.map((E)=>P8(E,!0));v(b);return}v(_9(h,new Set([...V]))),C(_9(P,new Set,!0))},unselectNodesAndEdges:({nodes:V,edges:k}={})=>{let{edges:h,nodes:P,nodeLookup:C,triggerNodeChanges:v,triggerEdgeChanges:b}=I(),E=V?V:P,p=k?k:h,a=[];for(let _1 of E){if(!_1.selected)continue;let $1=C.get(_1.id);if($1)$1.selected=!1;a.push(P8(_1.id,!1))}let m=[];for(let _1 of p){if(!_1.selected)continue;m.push(P8(_1.id,!1))}v(a),b(m)},setMinZoom:(V)=>{let{panZoom:k,maxZoom:h}=I();k?.setScaleExtent([V,h]),f({minZoom:V})},setMaxZoom:(V)=>{let{panZoom:k,minZoom:h}=I();k?.setScaleExtent([h,V]),f({maxZoom:V})},setTranslateExtent:(V)=>{I().panZoom?.setTranslateExtent(V),f({translateExtent:V})},resetSelectedElements:()=>{let{edges:V,nodes:k,triggerNodeChanges:h,triggerEdgeChanges:P,elementsSelectable:C}=I();if(!C)return;let v=k.reduce((E,p)=>p.selected?[...E,P8(p.id,!1)]:E,[]),b=V.reduce((E,p)=>p.selected?[...E,P8(p.id,!1)]:E,[]);h(v),P(b)},setNodeExtent:(V)=>{let{nodes:k,nodeLookup:h,parentLookup:P,nodeOrigin:C,elevateNodesOnSelect:v,nodeExtent:b,zIndexMode:E}=I();if(V[0][0]===b[0][0]&&V[0][1]===b[0][1]&&V[1][0]===b[1][0]&&V[1][1]===b[1][1])return;vq(k,h,P,{nodeOrigin:C,nodeExtent:V,elevateNodesOnSelect:v,checkEquality:!1,zIndexMode:E}),f({nodeExtent:V})},panBy:(V)=>{let{transform:k,width:h,height:P,panZoom:C,translateExtent:v}=I();return DM({delta:V,panZoom:C,transform:k,translateExtent:v,width:h,height:P})},setCenter:async(V,k,h)=>{let{width:P,height:C,maxZoom:v,panZoom:b}=I();if(!b)return!1;let E=typeof h?.zoom<"u"?h.zoom:v;return await b.setViewport({x:P/2-V*E,y:C/2-k*E,zoom:E},{duration:h?.duration,ease:h?.ease,interpolate:h?.interpolate}),!0},cancelConnection:()=>{f({connection:{...$X}})},updateConnection:(V)=>{f({connection:V})},reset:()=>f({...PT()})}},Object.is);function kX({initialNodes:Q,initialEdges:U,defaultNodes:Z,defaultEdges:K,initialWidth:X,initialHeight:W,initialMinZoom:z,initialMaxZoom:B,initialFitViewOptions:O,fitView:T,nodeOrigin:R,nodeExtent:L,zIndexMode:M,children:f}){let[I]=K1.useState(()=>wj({nodes:Q,edges:U,defaultNodes:Z,defaultEdges:K,width:X,height:W,fitView:T,minZoom:z,maxZoom:B,fitViewOptions:O,nodeOrigin:R,nodeExtent:L,zIndexMode:M}));return F1.jsx(uC,{value:I,children:F1.jsx(FS,{children:F1.jsx(IS,{children:f})})})}function Ij({children:Q,nodes:U,edges:Z,defaultNodes:K,defaultEdges:X,width:W,height:z,fitView:B,fitViewOptions:O,minZoom:T,maxZoom:R,nodeOrigin:L,nodeExtent:M,zIndexMode:f}){if(K1.useContext(pq))return F1.jsx(F1.Fragment,{children:Q});return F1.jsx(kX,{initialNodes:U,initialEdges:Z,defaultNodes:K,defaultEdges:X,initialWidth:W,initialHeight:z,fitView:B,initialFitViewOptions:O,initialMinZoom:T,initialMaxZoom:R,nodeOrigin:L,nodeExtent:M,zIndexMode:f,children:Q})}var fj={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Pj({nodes:Q,edges:U,defaultNodes:Z,defaultEdges:K,className:X,nodeTypes:W,edgeTypes:z,onNodeClick:B,onEdgeClick:O,onInit:T,onMove:R,onMoveStart:L,onMoveEnd:M,onConnect:f,onConnectStart:I,onConnectEnd:D,onClickConnectStart:V,onClickConnectEnd:k,onNodeMouseEnter:h,onNodeMouseMove:P,onNodeMouseLeave:C,onNodeContextMenu:v,onNodeDoubleClick:b,onNodeDragStart:E,onNodeDrag:p,onNodeDragStop:a,onNodesDelete:m,onEdgesDelete:_1,onDelete:$1,onSelectionChange:J1,onSelectionDragStart:y,onSelectionDrag:u,onSelectionDragStop:x,onSelectionContextMenu:d,onSelectionStart:g,onSelectionEnd:n,onBeforeDelete:j,connectionMode:i,connectionLineType:q1=y4.Bezier,connectionLineStyle:Q1,connectionLineComponent:Y1,connectionLineContainerStyle:L1,deleteKeyCode:M1="Backspace",selectionKeyCode:I1="Shift",selectionOnDrag:X1=!1,selectionMode:f1=R8.Full,panActivationKeyCode:l1="Space",multiSelectionKeyCode:W1=e7()?"Meta":"Control",zoomActivationKeyCode:S1=e7()?"Meta":"Control",snapToGrid:v1,snapGrid:c1,onlyRenderVisibleElements:E1=!1,selectNodesOnDrag:j1,nodesDraggable:V0,autoPanOnNodeFocus:b1,nodesConnectable:Z2,nodesFocusable:_0,nodeOrigin:h2=kT,edgesFocusable:z2,edgesReconnectable:I2,elementsSelectable:f2=!0,defaultViewport:P2=tC,minZoom:B2=0.5,maxZoom:A2=2,translateExtent:L2=s7,preventScrolling:M3=!0,nodeExtent:v5,defaultMarkerColor:b4="#b1b1b7",zoomOnScroll:u4=!0,zoomOnPinch:x4=!0,panOnScroll:I6=!1,panOnScrollSpeed:e5=0.5,panOnScrollMode:S=B3.Free,zoomOnDoubleClick:e=!0,panOnDrag:A1=!0,onPaneClick:R1,onPaneMouseEnter:P1,onPaneMouseMove:h1,onPaneMouseLeave:m1,onPaneScroll:U0,onPaneContextMenu:V1,paneClickDistance:J2=1,nodeClickDistance:N2=0,children:_4,onReconnect:f6,onReconnectStart:SJ,onReconnectEnd:v8,onEdgeContextMenu:E8,onEdgeDoubleClick:E5,onEdgeMouseEnter:m2,onEdgeMouseMove:jJ,onEdgeMouseLeave:eq,reconnectRadius:G9=10,onNodesChange:VJ,onEdgesChange:b8,noDragClassName:g2="nodrag",noWheelClassName:kJ="nowheel",noPanClassName:u8="nopan",fitView:Z9,fitViewOptions:x8,connectOnClick:DJ,attributionPosition:yJ,proOptions:T3,defaultEdgeOptions:vJ,elevateNodesOnSelect:EJ=!0,elevateEdgesOnSelect:bJ=!1,disableKeyboardA11y:F9=!1,autoPanOnConnect:uJ,autoPanOnNodeDrag:C2,autoPanOnSelection:R3=!0,autoPanSpeed:h4,connectionRadius:xJ,isValidConnection:P6,onError:h8,style:K9,id:O3,nodeDragThreshold:w3,connectionDragThreshold:X9,viewport:_U,onViewportChange:JU,width:hJ,height:H9,colorMode:Y9="light",debug:mJ,onScroll:W9,ariaLabelConfig:gJ,zIndexMode:pJ="basic",...cJ},z9){let I3=O3||"1",N6=_S(Y9),$U=K1.useCallback((B9)=>{B9.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),W9?.(B9)},[W9]);return F1.jsx("div",{"data-testid":"rf__wrapper",...cJ,onScroll:$U,style:{...K9,...fj},ref:z9,className:y0(["react-flow",X,N6]),id:O3,role:"application",children:F1.jsxs(Ij,{nodes:Q,edges:U,width:hJ,height:H9,fitView:Z9,fitViewOptions:x8,minZoom:B2,maxZoom:A2,nodeOrigin:h2,nodeExtent:v5,zIndexMode:pJ,children:[F1.jsx(eC,{nodes:Q,edges:U,defaultNodes:Z,defaultEdges:K,onConnect:f,onConnectStart:I,onConnectEnd:D,onClickConnectStart:V,onClickConnectEnd:k,nodesDraggable:V0,autoPanOnNodeFocus:b1,nodesConnectable:Z2,nodesFocusable:_0,edgesFocusable:z2,edgesReconnectable:I2,elementsSelectable:f2,elevateNodesOnSelect:EJ,elevateEdgesOnSelect:bJ,minZoom:B2,maxZoom:A2,nodeExtent:v5,onNodesChange:VJ,onEdgesChange:b8,snapToGrid:v1,snapGrid:c1,connectionMode:i,translateExtent:L2,connectOnClick:DJ,defaultEdgeOptions:vJ,fitView:Z9,fitViewOptions:x8,onNodesDelete:m,onEdgesDelete:_1,onDelete:$1,onNodeDragStart:E,onNodeDrag:p,onNodeDragStop:a,onSelectionDrag:u,onSelectionDragStart:y,onSelectionDragStop:x,onMove:R,onMoveStart:L,onMoveEnd:M,noPanClassName:u8,nodeOrigin:h2,rfId:I3,autoPanOnConnect:uJ,autoPanOnNodeDrag:C2,autoPanSpeed:h4,onError:h8,connectionRadius:xJ,isValidConnection:P6,selectNodesOnDrag:j1,nodeDragThreshold:w3,connectionDragThreshold:X9,onBeforeDelete:j,debug:mJ,ariaLabelConfig:gJ,zIndexMode:pJ}),F1.jsx(Rj,{onInit:T,onNodeClick:B,onEdgeClick:O,onNodeMouseEnter:h,onNodeMouseMove:P,onNodeMouseLeave:C,onNodeContextMenu:v,onNodeDoubleClick:b,nodeTypes:W,edgeTypes:z,connectionLineType:q1,connectionLineStyle:Q1,connectionLineComponent:Y1,connectionLineContainerStyle:L1,selectionKeyCode:I1,selectionOnDrag:X1,selectionMode:f1,deleteKeyCode:M1,multiSelectionKeyCode:W1,panActivationKeyCode:l1,zoomActivationKeyCode:S1,onlyRenderVisibleElements:E1,defaultViewport:P2,translateExtent:L2,minZoom:B2,maxZoom:A2,preventScrolling:M3,zoomOnScroll:u4,zoomOnPinch:x4,zoomOnDoubleClick:e,panOnScroll:I6,panOnScrollSpeed:e5,panOnScrollMode:S,panOnDrag:A1,autoPanOnSelection:R3,onPaneClick:R1,onPaneMouseEnter:P1,onPaneMouseMove:h1,onPaneMouseLeave:m1,onPaneScroll:U0,onPaneContextMenu:V1,paneClickDistance:J2,nodeClickDistance:N2,onSelectionContextMenu:d,onSelectionStart:g,onSelectionEnd:n,onReconnect:f6,onReconnectStart:SJ,onReconnectEnd:v8,onEdgeContextMenu:E8,onEdgeDoubleClick:E5,onEdgeMouseEnter:m2,onEdgeMouseMove:jJ,onEdgeMouseLeave:eq,reconnectRadius:G9,defaultMarkerColor:b4,noDragClassName:g2,noWheelClassName:kJ,noPanClassName:u8,rfId:I3,disableKeyboardA11y:F9,nodeExtent:v5,viewport:_U,onViewportChange:JU,nodesDraggable:V0}),F1.jsx(sC,{onSelectionChange:J1}),_4,F1.jsx(lC,{proOptions:T3,position:yJ}),F1.jsx(cC,{rfId:I3,disableKeyboardA11y:F9})]})})}var UR=vT(Pj);function GR(Q){let[U,Z]=K1.useState(Q),K=K1.useCallback((X)=>Z((W)=>yT(X,W)),[]);return[U,Z,K]}var Zm=x2.error014();function Nj({dimensions:Q,lineWidth:U,variant:Z,className:K}){return F1.jsx("path",{strokeWidth:U,d:`M${Q[0]/2} 0 V${Q[1]} M0 ${Q[1]/2} H${Q[0]}`,className:y0(["react-flow__background-pattern",Z,K])})}function Cj({radius:Q,className:U}){return F1.jsx("circle",{cx:Q,cy:Q,r:Q,className:y0(["react-flow__background-pattern","dots",U])})}var v4;(function(Q){Q.Lines="lines",Q.Dots="dots",Q.Cross="cross"})(v4||(v4={}));var Sj={[v4.Dots]:1,[v4.Lines]:1,[v4.Cross]:6},jj=(Q)=>({transform:Q.transform,patternId:`pattern-${Q.rfId}`});function ZR({id:Q,variant:U=v4.Dots,gap:Z=20,size:K,lineWidth:X=1,offset:W=0,color:z,bgColor:B,style:O,className:T,patternClassName:R}){let L=K1.useRef(null),{transform:M,patternId:f}=G0(jj,N0),I=K||Sj[U],D=U===v4.Dots,V=U===v4.Cross,k=Array.isArray(Z)?Z:[Z,Z],h=[k[0]*M[2]||1,k[1]*M[2]||1],P=I*M[2],C=Array.isArray(W)?W:[W,W],v=V?[P,P]:h,b=[C[0]*M[2]+v[0]/2,C[1]*M[2]+v[1]/2],E=`${f}${Q?Q:""}`;return F1.jsxs("svg",{className:y0(["react-flow__background",T]),style:{...O,...cq,"--xy-background-color-props":B,"--xy-background-pattern-color-props":z},ref:L,"data-testid":"rf__background",children:[F1.jsx("pattern",{id:E,x:M[0]%h[0],y:M[1]%h[1],width:h[0],height:h[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${b[0]},-${b[1]})`,children:D?F1.jsx(Cj,{radius:P/2,className:R}):F1.jsx(Nj,{dimensions:v,lineWidth:X,variant:U,className:R})}),F1.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}ZR.displayName="Background";var FR=K1.memo(ZR);function Vj(){return F1.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:F1.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function kj(){return F1.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:F1.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Dj(){return F1.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:F1.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function yj(){return F1.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:F1.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function vj(){return F1.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:F1.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function hq({children:Q,className:U,...Z}){return F1.jsx("button",{type:"button",className:y0(["react-flow__controls-button",U]),...Z,children:Q})}var Ej=(Q)=>({isInteractive:Q.nodesDraggable||Q.nodesConnectable||Q.elementsSelectable,minZoomReached:Q.transform[2]<=Q.minZoom,maxZoomReached:Q.transform[2]>=Q.maxZoom,ariaLabelConfig:Q.ariaLabelConfig});function KR({style:Q,showZoom:U=!0,showFitView:Z=!0,showInteractive:K=!0,fitViewOptions:X,onZoomIn:W,onZoomOut:z,onFitView:B,onInteractiveChange:O,className:T,children:R,position:L="bottom-left",orientation:M="vertical","aria-label":f}){let I=C0(),{isInteractive:D,minZoomReached:V,maxZoomReached:k,ariaLabelConfig:h}=G0(Ej,N0),{zoomIn:P,zoomOut:C,fitView:v}=OJ(),b=()=>{P(),W?.()},E=()=>{C(),z?.()},p=()=>{v(X),B?.()},a=()=>{I.setState({nodesDraggable:!D,nodesConnectable:!D,elementsSelectable:!D}),O?.(!D)};return F1.jsxs(N8,{className:y0(["react-flow__controls",M==="horizontal"?"horizontal":"vertical",T]),position:L,style:Q,"data-testid":"rf__controls","aria-label":f??h["controls.ariaLabel"],children:[U&&F1.jsxs(F1.Fragment,{children:[F1.jsx(hq,{onClick:b,className:"react-flow__controls-zoomin",title:h["controls.zoomIn.ariaLabel"],"aria-label":h["controls.zoomIn.ariaLabel"],disabled:k,children:F1.jsx(Vj,{})}),F1.jsx(hq,{onClick:E,className:"react-flow__controls-zoomout",title:h["controls.zoomOut.ariaLabel"],"aria-label":h["controls.zoomOut.ariaLabel"],disabled:V,children:F1.jsx(kj,{})})]}),Z&&F1.jsx(hq,{className:"react-flow__controls-fitview",onClick:p,title:h["controls.fitView.ariaLabel"],"aria-label":h["controls.fitView.ariaLabel"],children:F1.jsx(Dj,{})}),K&&F1.jsx(hq,{className:"react-flow__controls-interactive",onClick:a,title:h["controls.interactive.ariaLabel"],"aria-label":h["controls.interactive.ariaLabel"],children:D?F1.jsx(vj,{}):F1.jsx(yj,{})}),R]})}KR.displayName="Controls";var XR=K1.memo(KR);function bj({id:Q,x:U,y:Z,width:K,height:X,style:W,color:z,strokeColor:B,strokeWidth:O,className:T,borderRadius:R,shapeRendering:L,selected:M,onClick:f}){let{background:I,backgroundColor:D}=W||{},V=z||I||D;return F1.jsx("rect",{className:y0(["react-flow__minimap-node",{selected:M},T]),x:U,y:Z,rx:R,ry:R,width:K,height:X,style:{fill:V,stroke:B,strokeWidth:O},shapeRendering:L,onClick:f?(k)=>f(k,Q):void 0})}var uj=K1.memo(bj),xj=(Q)=>Q.nodes.map((U)=>U.id),CX=(Q)=>Q instanceof Function?Q:()=>Q;function hj({nodeStrokeColor:Q,nodeColor:U,nodeClassName:Z="",nodeBorderRadius:K=5,nodeStrokeWidth:X,nodeComponent:W=uj,onClick:z}){let B=G0(xj,N0),O=CX(U),T=CX(Q),R=CX(Z),L=typeof window>"u"||!!window.chrome?"crispEdges":"geometricPrecision";return F1.jsx(F1.Fragment,{children:B.map((M)=>F1.jsx(gj,{id:M,nodeColorFunc:O,nodeStrokeColorFunc:T,nodeClassNameFunc:R,nodeBorderRadius:K,nodeStrokeWidth:X,NodeComponent:W,onClick:z,shapeRendering:L},M))})}function mj({id:Q,nodeColorFunc:U,nodeStrokeColorFunc:Z,nodeClassNameFunc:K,nodeBorderRadius:X,nodeStrokeWidth:W,shapeRendering:z,NodeComponent:B,onClick:O}){let{node:T,x:R,y:L,width:M,height:f}=G0((I)=>{let D=I.nodeLookup.get(Q);if(!D)return{node:void 0,x:0,y:0,width:0,height:0};let V=D.internals.userNode,{x:k,y:h}=D.internals.positionAbsolute,{width:P,height:C}=y5(V);return{node:V,x:k,y:h,width:P,height:C}},N0);if(!T||T.hidden||!XX(T))return null;return F1.jsx(B,{x:R,y:L,width:M,height:f,style:T.style,selected:!!T.selected,className:K(T),color:U(T),borderRadius:X,strokeColor:Z(T),strokeWidth:W,shapeRendering:z,onClick:O,id:T.id})}var gj=K1.memo(mj),pj=K1.memo(hj),cj=200,lj=150,rj=(Q)=>!Q.hidden,dj=(Q)=>{let U={x:-Q.transform[0]/Q.transform[2],y:-Q.transform[1]/Q.transform[2],width:Q.width/Q.transform[2],height:Q.height/Q.transform[2]},Z=!1;for(let K of Q.nodeLookup.values())if(!K.hidden){Z=!0;break}return{viewBB:U,boundingRect:Z?ZX(f8(Q.nodeLookup,{filter:rj}),U):U,rfId:Q.rfId,panZoom:Q.panZoom,translateExtent:Q.translateExtent,flowWidth:Q.width,flowHeight:Q.height,ariaLabelConfig:Q.ariaLabelConfig}},NT=(Q,U)=>Q.x===U.x&&Q.y===U.y&&Q.width===U.width&&Q.height===U.height,ij=(Q,U)=>NT(Q.viewBB,U.viewBB)&&NT(Q.boundingRect,U.boundingRect)&&Q.rfId===U.rfId&&Q.panZoom===U.panZoom&&Q.translateExtent===U.translateExtent&&Q.flowWidth===U.flowWidth&&Q.flowHeight===U.flowHeight&&Q.ariaLabelConfig===U.ariaLabelConfig,aj="react-flow__minimap-desc";function HR({style:Q,className:U,nodeStrokeColor:Z,nodeColor:K,nodeClassName:X="",nodeBorderRadius:W=5,nodeStrokeWidth:z,nodeComponent:B,bgColor:O,maskColor:T,maskStrokeColor:R,maskStrokeWidth:L,position:M="bottom-right",onClick:f,onNodeClick:I,pannable:D=!1,zoomable:V=!1,ariaLabel:k,inversePan:h,zoomStep:P=1,offsetScale:C=5}){let v=C0(),b=K1.useRef(null),{boundingRect:E,panZoom:p,viewBB:a,rfId:m,translateExtent:_1,flowWidth:$1,flowHeight:J1,ariaLabelConfig:y}=G0(dj,ij),u=Q?.width??cj,x=Q?.height??lj,d=E.width/u,g=E.height/x,n=Math.max(d,g),j=n*u,i=n*x,q1=C*n,Q1=E.x-(j-E.width)/2-q1,Y1=E.y-(i-E.height)/2-q1,L1=j+q1*2,M1=i+q1*2,I1=`${aj}-${m}`,X1=K1.useRef(0),f1=K1.useRef();X1.current=n,K1.useEffect(()=>{let c1=v.getState().panZoom;if(b.current&&c1)return f1.current=hM({domNode:b.current,panZoom:c1,getTransform:()=>v.getState().transform,getViewScale:()=>X1.current}),()=>{f1.current?.destroy()}},[p]),K1.useEffect(()=>{f1.current?.update({translateExtent:_1,width:$1,height:J1,inversePan:h,pannable:D,zoomStep:P,zoomable:V})},[D,V,h,P,_1,$1,J1]);let l1=f?(c1)=>{let[E1,j1]=f1.current?.pointer(c1)||[0,0];f(c1,{x:E1,y:j1})}:void 0,W1=K1.useCallback((c1,E1)=>{let j1=v.getState().nodeLookup.get(E1).internals.userNode;I?.(c1,j1)},[I]),S1=I?W1:void 0,v1=k??y["minimap.ariaLabel"];return F1.jsx(N8,{position:M,style:{...Q,"--xy-minimap-background-color-props":typeof O==="string"?O:void 0,"--xy-minimap-mask-background-color-props":typeof T==="string"?T:void 0,"--xy-minimap-mask-stroke-color-props":typeof R==="string"?R:void 0,"--xy-minimap-mask-stroke-width-props":typeof L==="number"?L*n:void 0,"--xy-minimap-node-background-color-props":typeof K==="string"?K:void 0,"--xy-minimap-node-stroke-color-props":typeof Z==="string"?Z:void 0,"--xy-minimap-node-stroke-width-props":typeof z==="number"?z:void 0},className:y0(["react-flow__minimap",U]),"data-testid":"rf__minimap",children:F1.jsxs("svg",{width:u,height:x,viewBox:`${Q1} ${Y1} ${L1} ${M1}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":I1,ref:b,onClick:l1,children:[v1&&F1.jsx("title",{id:I1,children:v1}),F1.jsx(pj,{onClick:S1,nodeColor:K,nodeStrokeColor:Z,nodeBorderRadius:W,nodeClassName:X,nodeStrokeWidth:z,nodeComponent:B}),F1.jsx("path",{className:"react-flow__minimap-mask",d:`M${Q1-q1},${Y1-q1}h${L1+q1*2}v${M1+q1*2}h${-L1-q1*2}z
|
|
247
|
-
M${a.x},${a.y}h${a.width}v${a.height}h${-a.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}HR.displayName="MiniMap";var YR=K1.memo(HR),sj=(Q)=>(U)=>Q?`${Math.max(1/U.transform[2],1)}`:void 0,tj={[M6.Line]:"right",[M6.Handle]:"bottom-right"};function oj({nodeId:Q,position:U,variant:Z=M6.Handle,className:K,style:X=void 0,children:W,color:z,minWidth:B=10,minHeight:O=10,maxWidth:T=Number.MAX_VALUE,maxHeight:R=Number.MAX_VALUE,keepAspectRatio:L=!1,resizeDirection:M,autoScale:f=!0,shouldResize:I,onResizeStart:D,onResize:V,onResizeEnd:k}){let h=VX(),P=typeof Q==="string"?Q:h,C=C0(),v=K1.useRef(null),b=Z===M6.Handle,E=G0(K1.useCallback(sj(b&&f),[b,f]),N0),p=K1.useRef(null),a=U??tj[Z];K1.useEffect(()=>{if(!v.current||!P)return;if(!p.current)p.current=lM({domNode:v.current,nodeId:P,getStoreItems:()=>{let{nodeLookup:_1,transform:$1,snapGrid:J1,snapToGrid:y,nodeOrigin:u,domNode:x}=C.getState();return{nodeLookup:_1,transform:$1,snapGrid:J1,snapToGrid:y,nodeOrigin:u,paneDomNode:x}},onChange:(_1,$1)=>{let{triggerNodeChanges:J1,nodeLookup:y,parentLookup:u,nodeOrigin:x}=C.getState(),d=[],g={x:_1.x,y:_1.y},n=y.get(P);if(n&&n.expandParent&&n.parentId){let j=n.origin??x,i=_1.width??n.measured.width??0,q1=_1.height??n.measured.height??0,Q1={id:n.id,parentId:n.parentId,rect:{width:i,height:q1,...HX({x:_1.x??n.position.x,y:_1.y??n.position.y},{width:i,height:q1},n.parentId,y,j)}},Y1=Eq([Q1],y,u,x);d.push(...Y1),g.x=_1.x?Math.max(j[0]*i,_1.x):void 0,g.y=_1.y?Math.max(j[1]*q1,_1.y):void 0}if(g.x!==void 0&&g.y!==void 0){let j={id:P,type:"position",position:{...g}};d.push(j)}if(_1.width!==void 0&&_1.height!==void 0){let i={id:P,type:"dimensions",resizing:!0,setAttributes:!M?!0:M==="horizontal"?"width":"height",dimensions:{width:_1.width,height:_1.height}};d.push(i)}for(let j of $1){let i={...j,type:"position"};d.push(i)}J1(d)},onEnd:({width:_1,height:$1})=>{let J1={id:P,type:"dimensions",resizing:!1,dimensions:{width:_1,height:$1}};C.getState().triggerNodeChanges([J1])}});return p.current.update({controlPosition:a,boundaries:{minWidth:B,minHeight:O,maxWidth:T,maxHeight:R},keepAspectRatio:L,resizeDirection:M,onResizeStart:D,onResize:V,onResizeEnd:k,shouldResize:I}),()=>{p.current?.destroy()}},[a,B,O,T,R,L,D,V,k,I]);let m=a.split("-");return F1.jsx("div",{className:y0(["react-flow__resize-control","nodrag",...m,Z,K]),ref:v,style:{...X,scale:E,...z&&{[b?"backgroundColor":"borderColor"]:z}},children:W})}var Fm=K1.memo(oj);var nj=(Q)=>Q.domNode?.querySelector(".react-flow__renderer");function ej({children:Q}){let U=G0(nj);if(!U)return null;return CT.createPortal(Q,U)}var _V=(Q,U)=>Q?.internals.positionAbsolute.x!==U?.internals.positionAbsolute.x||Q?.internals.positionAbsolute.y!==U?.internals.positionAbsolute.y||Q?.measured.width!==U?.measured.width||Q?.measured.height!==U?.measured.height||Q?.selected!==U?.selected||Q?.internals.z!==U?.internals.z,JV=(Q,U)=>{if(Q.size!==U.size)return!1;for(let[Z,K]of Q)if(_V(K,U.get(Z)))return!1;return!0},$V=(Q)=>({x:Q.transform[0],y:Q.transform[1],zoom:Q.transform[2],selectedNodesCount:Q.nodes.filter((U)=>U.selected).length});function WR({nodeId:Q,children:U,className:Z,style:K,isVisible:X,position:W=C1.Top,offset:z=10,align:B="center",...O}){let T=VX(),R=K1.useCallback((v)=>{return(Array.isArray(Q)?Q:[Q||T||""]).reduce((p,a)=>{let m=v.nodeLookup.get(a);if(m)p.set(m.id,m);return p},new Map)},[Q,T]),L=G0(R,JV),{x:M,y:f,zoom:I,selectedNodesCount:D}=G0($V,N0);if(!(typeof X==="boolean"?X:L.size===1&&L.values().next().value?.selected&&D===1)||!L.size)return null;let k=f8(L),h=Array.from(L.values()),P=Math.max(...h.map((v)=>v.internals.z+1)),C={position:"absolute",transform:CM(k,{x:M,y:f,zoom:I},W,z,B),zIndex:P,...K};return F1.jsx(ej,{children:F1.jsx("div",{style:C,className:y0(["react-flow__node-toolbar",Z]),...O,"data-id":h.reduce((v,b)=>`${v}${b.id} `,"").trim(),children:U})})}var _2=u0(i5(),1);var zR={x:{title:"X",fill:"currentColor",d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"},youtube:{title:"YouTube",fill:"#FF0000",d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"},tiktok:{title:"TikTok",fill:"currentColor",d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"},discord:{title:"Discord",fill:"#5865F2",d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"},resend:{title:"Resend",fill:"currentColor",d:"M2.023 0v24h5.553v-8.434h2.998L15.326 24h6.65l-5.372-9.258a7.652 7.652 0 0 0 3.316-3.016c.709-1.21 1.062-2.57 1.062-4.08 0-1.462-.353-2.767-1.062-3.91-.709-1.165-1.692-2.079-2.95-2.742C15.737.331 14.355 0 12.823 0Zm5.553 4.87h4.219c.731 0 1.349.125 1.851.376.526.252.925.618 1.2 1.098.274.457.412.994.412 1.611S15.132 9.12 14.88 9.6c-.229.48-.572.856-1.03 1.13-.434.252-.948.38-1.542.38H7.576Z"},linkedin:{title:"LinkedIn",fill:"#0A66C2",d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"},reddit:{title:"Reddit",fill:"#FF4500",d:"M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z"},bluesky:{title:"Bluesky",fill:"#0285FF",d:"M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.815 2.736 3.713 3.66 6.383 3.364.136-.02.275-.039.415-.056-.138.022-.276.04-.415.056-3.912.58-7.387 2.005-2.83 7.078 5.013 5.19 6.87-1.113 7.823-4.308.953 3.195 2.05 9.271 7.733 4.308 4.267-4.308 1.172-6.498-2.74-7.078a8.741 8.741 0 0 1-.415-.056c.14.017.279.036.415.056 2.67.297 5.568-.628 6.383-3.364.246-.828.624-5.79.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8Z"},instagram:{title:"Instagram",fill:"#FF0069",d:"M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077"},github:{title:"GitHub",fill:"currentColor",d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"},stripe:{title:"Stripe",fill:"#635BFF",d:"M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"},slack:{title:"Slack",fill:"#4A154B",d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"},openai:{title:"OpenAI",fill:"#412991",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"},anthropic:{title:"Anthropic",fill:"currentColor",d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"},twilio:{title:"Twilio",fill:"#F22F46",d:"M12 0C5.381-.008.008 5.352 0 11.971V12c0 6.64 5.359 12 12 12 6.64 0 12-5.36 12-12 0-6.641-5.36-12-12-12zm0 20.801c-4.846.015-8.786-3.904-8.801-8.75V12c-.014-4.846 3.904-8.786 8.75-8.801H12c4.847-.014 8.786 3.904 8.801 8.75V12c.015 4.847-3.904 8.786-8.75 8.801H12zm5.44-11.76c0 1.359-1.12 2.479-2.481 2.479-1.366-.007-2.472-1.113-2.479-2.479 0-1.361 1.12-2.481 2.479-2.481 1.361 0 2.481 1.12 2.481 2.481zm0 5.919c0 1.36-1.12 2.48-2.481 2.48-1.367-.008-2.473-1.114-2.479-2.48 0-1.359 1.12-2.479 2.479-2.479 1.361-.001 2.481 1.12 2.481 2.479zm-5.919 0c0 1.36-1.12 2.48-2.479 2.48-1.368-.007-2.475-1.113-2.481-2.48 0-1.359 1.12-2.479 2.481-2.479 1.358-.001 2.479 1.12 2.479 2.479zm0-5.919c0 1.359-1.12 2.479-2.479 2.479-1.367-.007-2.475-1.112-2.481-2.479 0-1.361 1.12-2.481 2.481-2.481 1.358 0 2.479 1.12 2.479 2.481z"},sendgrid:{title:"SendGrid",fill:"#51A9E3",d:"M.8 24h13.6c.88 0 1.6-.72 1.6-1.6v-4.8c0-.88-.72-1.6-1.6-1.6H9.6c-.88 0-1.6-.72-1.6-1.6V9.6C8 8.72 7.28 8 6.4 8H1.6C.72 8 0 8.72 0 9.6v13.6c0 .44.36.8.8.8zM23.2 0H9.6C8.72 0 8 .72 8 1.6v4.8C8 7.28 8.72 8 9.6 8h4.8c.88 0 1.6.72 1.6 1.6v4.8c0 .88.72 1.6 1.6 1.6h4.8c.88 0 1.6-.72 1.6-1.6V.8c0-.44-.36-.8-.8-.8Z"},mailgun:{title:"Mailgun",fill:"#F06B66",d:"M11.837 0c6.602 0 11.984 5.381 11.984 11.994-.017 2.99-3.264 4.84-5.844 3.331a3.805 3.805 0 0 1-.06-.035l-.055-.033-.022.055c-2.554 4.63-9.162 4.758-11.894.232-2.732-4.527.46-10.313 5.746-10.416a6.868 6.868 0 0 1 7.002 6.866 1.265 1.265 0 0 0 2.52 0c0-5.18-4.197-9.38-9.377-9.387C4.611 2.594.081 10.41 3.683 16.673c3.238 5.632 11.08 6.351 15.289 1.402l1.997 1.686A11.95 11.95 0 0 1 11.837 24C2.6 23.72-2.87 13.543 1.992 5.684A12.006 12.006 0 0 1 11.837 0Zm0 7.745c-3.276-.163-5.5 3.281-4.003 6.2a4.26 4.26 0 0 0 4.014 2.31c3.276-.171 5.137-3.824 3.35-6.575a4.26 4.26 0 0 0-3.36-1.935Zm0 2.53c1.324 0 2.152 1.433 1.49 2.58a1.72 1.72 0 0 1-1.49.86 1.72 1.72 0 1 1 0-3.44Z"},notion:{title:"Notion",fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"},linear:{title:"Linear",fill:"#5E6AD2",d:"M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"},jira:{title:"Jira",fill:"#0052CC",d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0Z"},hubspot:{title:"HubSpot",fill:"#FF7A59",d:"M18.164 7.93V5.084a2.198 2.198 0 001.267-1.978v-.067A2.2 2.2 0 0017.238.845h-.067a2.2 2.2 0 00-2.193 2.193v.067a2.196 2.196 0 001.252 1.973l.013.006v2.852a6.22 6.22 0 00-2.969 1.31l.012-.01-7.828-6.095A2.497 2.497 0 104.3 4.656l-.012.006 7.697 5.991a6.176 6.176 0 00-1.038 3.446c0 1.343.425 2.588 1.147 3.607l-.013-.02-2.342 2.343a1.968 1.968 0 00-.58-.095h-.002a2.033 2.033 0 102.033 2.033 1.978 1.978 0 00-.1-.595l.005.014 2.317-2.317a6.247 6.247 0 104.782-11.134l-.036-.005zm-.964 9.378a3.206 3.206 0 113.215-3.207v.002a3.206 3.206 0 01-3.207 3.207z"},paypal:{title:"PayPal",fill:"#003087",d:"M7.016 19.198h-4.2a.562.562 0 0 1-.555-.65L5.093.584A.692.692 0 0 1 5.776 0h7.222c3.417 0 5.904 2.488 5.846 5.5-.006.25-.027.5-.066.747A6.794 6.794 0 0 1 12.071 12H8.743a.69.69 0 0 0-.682.583l-.325 2.056-.013.083-.692 4.39-.015.087zM19.79 6.142c-.01.087-.01.175-.023.261a7.76 7.76 0 0 1-7.695 6.598H9.007l-.283 1.795-.013.083-.692 4.39-.134.843-.014.088H6.86l-.497 3.15a.562.562 0 0 0 .555.65h3.612c.34 0 .63-.249.683-.585l.952-6.031a.692.692 0 0 1 .683-.584h2.126a6.793 6.793 0 0 0 6.707-5.752c.306-1.95-.466-3.744-1.89-4.906z"},shopify:{title:"Shopify",fill:"#7AB55C",d:"M15.337 23.979l7.216-1.561s-2.604-17.613-2.625-17.73c-.018-.116-.114-.192-.211-.192s-1.929-.136-1.929-.136-1.275-1.274-1.439-1.411c-.045-.037-.075-.057-.121-.074l-.914 21.104h.023zM11.71 11.305s-.81-.424-1.774-.424c-1.447 0-1.504.906-1.504 1.141 0 1.232 3.24 1.715 3.24 4.629 0 2.295-1.44 3.76-3.406 3.76-2.354 0-3.54-1.465-3.54-1.465l.646-2.086s1.245 1.066 2.28 1.066c.675 0 .975-.545.975-.932 0-1.619-2.654-1.694-2.654-4.359-.034-2.237 1.571-4.416 4.827-4.416 1.257 0 1.875.361 1.875.361l-.945 2.715-.02.01zM11.17.83c.136 0 .271.038.405.135-.984.465-2.064 1.639-2.508 3.992-.656.213-1.293.405-1.889.578C7.697 3.75 8.951.84 11.17.84V.83zm1.235 2.949v.135c-.754.232-1.583.484-2.394.736.466-1.777 1.333-2.645 2.085-2.971.193.501.309 1.176.309 2.1zm.539-2.234c.694.074 1.141.867 1.429 1.755-.349.114-.735.231-1.158.366v-.252c0-.752-.096-1.371-.271-1.871v.002zm2.992 1.289c-.02 0-.06.021-.078.021s-.289.075-.714.21c-.423-1.233-1.176-2.37-2.508-2.37h-.115C12.135.209 11.669 0 11.265 0 8.159 0 6.675 3.877 6.21 5.846c-1.194.365-2.063.636-2.16.674-.675.213-.694.232-.772.87-.075.462-1.83 14.063-1.83 14.063L15.009 24l.927-21.166z"},sentry:{title:"Sentry",fill:"#362D59",d:"M13.91 2.505c-.873-1.448-2.972-1.448-3.844 0L6.904 7.92a15.478 15.478 0 0 1 8.53 12.811h-2.221A13.301 13.301 0 0 0 5.784 9.814l-2.926 5.06a7.65 7.65 0 0 1 4.435 5.848H2.194a.365.365 0 0 1-.298-.534l1.413-2.402a5.16 5.16 0 0 0-1.614-.913L.296 19.275a2.182 2.182 0 0 0 .812 2.999 2.24 2.24 0 0 0 1.086.288h6.983a9.322 9.322 0 0 0-3.845-8.318l1.11-1.922a11.47 11.47 0 0 1 4.95 10.24h5.915a17.242 17.242 0 0 0-7.885-15.28l2.244-3.845a.37.37 0 0 1 .504-.13c.255.14 9.75 16.708 9.928 16.9a.365.365 0 0 1-.327.543h-2.287c.029.612.029 1.223 0 1.831h2.297a2.206 2.206 0 0 0 1.922-3.31z"},vercel:{title:"Vercel",fill:"currentColor",d:"M24 22.525H0l12-21.05 12 21.05z"},supabase:{title:"Supabase",fill:"#3FCF8E",d:"M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"},clerk:{title:"Clerk",fill:"#6C47FF",d:"m21.47 20.829-2.881-2.881a.572.572 0 0 0-.7-.084 6.854 6.854 0 0 1-7.081 0 .576.576 0 0 0-.7.084l-2.881 2.881a.576.576 0 0 0-.103.69.57.57 0 0 0 .166.186 12 12 0 0 0 14.113 0 .58.58 0 0 0 .239-.423.576.576 0 0 0-.172-.453Zm.002-17.668-2.88 2.88a.569.569 0 0 1-.701.084A6.857 6.857 0 0 0 8.724 8.08a6.862 6.862 0 0 0-1.222 3.692 6.86 6.86 0 0 0 .978 3.764.573.573 0 0 1-.083.699l-2.881 2.88a.567.567 0 0 1-.864-.063A11.993 11.993 0 0 1 6.771 2.7a11.99 11.99 0 0 1 14.637-.405.566.566 0 0 1 .232.418.57.57 0 0 1-.168.448Zm-7.118 12.261a3.427 3.427 0 1 0 0-6.854 3.427 3.427 0 0 0 0 6.854Z"},aws:{title:"Amazon Web Services",fill:"#232F3E",d:"M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z"},figma:{title:"Figma",fill:"#F24E1E",d:"M15.852 8.981h-4.588V0h4.588c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.491-4.49 4.491zM12.735 7.51h3.117c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-3.117V7.51zm0 1.471H8.148c-2.476 0-4.49-2.014-4.49-4.49S5.672 0 8.148 0h4.588v8.981zm-4.587-7.51c-1.665 0-3.019 1.355-3.019 3.019s1.354 3.02 3.019 3.02h3.117V1.471H8.148zm4.587 15.019H8.148c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h4.588v8.98zM8.148 8.981c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h3.117V8.981H8.148zM8.172 24c-2.489 0-4.515-2.014-4.515-4.49s2.014-4.49 4.49-4.49h4.588v4.441c0 2.503-2.047 4.539-4.563 4.539zm-.024-7.51a3.023 3.023 0 0 0-3.019 3.019c0 1.665 1.365 3.019 3.044 3.019 1.705 0 3.093-1.376 3.093-3.068v-2.97H8.148zm7.704 0h-.098c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h.098c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.49-4.49 4.49zm-.097-7.509c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h.098c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-.098z"},airtable:{title:"Airtable",fill:"#18BFFF",d:"M11.992 1.966c-.434 0-.87.086-1.28.257L1.779 5.917c-.503.208-.49.908.012 1.116l8.982 3.558a3.266 3.266 0 0 0 2.454 0l8.982-3.558c.503-.196.503-.908.012-1.116l-8.957-3.694a3.255 3.255 0 0 0-1.272-.257zM23.4 8.056a.589.589 0 0 0-.222.045l-10.012 3.877a.612.612 0 0 0-.38.564v8.896a.6.6 0 0 0 .821.552L23.62 18.1a.583.583 0 0 0 .38-.551V8.653a.6.6 0 0 0-.6-.596zM.676 8.095a.644.644 0 0 0-.48.19C.086 8.396 0 8.53 0 8.69v8.355c0 .442.515.737.908.54l6.27-3.006.307-.147 2.969-1.436c.466-.22.43-.908-.061-1.092L.883 8.138a.57.57 0 0 0-.207-.044z"},intercom:{title:"Intercom",fill:"#6AFDEF",d:"M21 0H3C1.343 0 0 1.343 0 3v18c0 1.658 1.343 3 3 3h18c1.658 0 3-1.342 3-3V3c0-1.657-1.342-3-3-3zm-5.801 4.399c0-.44.36-.8.802-.8.44 0 .8.36.8.8v10.688c0 .442-.36.801-.8.801-.443 0-.802-.359-.802-.801V4.399zM11.2 3.994c0-.44.357-.799.8-.799s.8.359.8.799v11.602c0 .44-.357.8-.8.8s-.8-.36-.8-.8V3.994zm-4 .405c0-.44.359-.8.799-.8.443 0 .802.36.802.8v10.688c0 .442-.36.801-.802.801-.44 0-.799-.359-.799-.801V4.399zM3.199 6c0-.442.36-.8.802-.8.44 0 .799.358.799.8v7.195c0 .441-.359.8-.799.8-.443 0-.802-.36-.802-.8V6zM20.52 18.202c-.123.105-3.086 2.593-8.52 2.593-5.433 0-8.397-2.486-8.521-2.593-.335-.288-.375-.792-.086-1.128.285-.334.79-.375 1.125-.09.047.041 2.693 2.211 7.481 2.211 4.848 0 7.456-2.186 7.479-2.207.334-.289.839-.25 1.128.086.289.336.25.84-.086 1.128zm.281-5.007c0 .441-.36.8-.801.8-.441 0-.801-.36-.801-.8V6c0-.442.361-.8.801-.8.441 0 .801.357.801.8v7.195z"},posthog:{title:"PostHog",fill:"currentColor",d:"M9.854 14.5 5 9.647.854 5.5A.5.5 0 0 0 0 5.854V8.44a.5.5 0 0 0 .146.353L5 13.647l.147.146L9.854 18.5l.146.147v-.049c.065.03.134.049.207.049h2.586a.5.5 0 0 0 .353-.854L9.854 14.5zm0-5-4-4a.487.487 0 0 0-.409-.144.515.515 0 0 0-.356.21.493.493 0 0 0-.089.288V8.44a.5.5 0 0 0 .147.353l9 9a.5.5 0 0 0 .853-.354v-2.585a.5.5 0 0 0-.146-.354l-5-5zm1-4a.5.5 0 0 0-.854.354V8.44a.5.5 0 0 0 .147.353l4 4a.5.5 0 0 0 .853-.354V9.854a.5.5 0 0 0-.146-.354l-4-4zm12.647 11.515a3.863 3.863 0 0 1-2.232-1.1l-4.708-4.707a.5.5 0 0 0-.854.354v6.585a.5.5 0 0 0 .5.5H23.5a.5.5 0 0 0 .5-.5v-.6c0-.276-.225-.497-.499-.532zm-5.394.032a.8.8 0 1 1 0-1.6.8.8 0 0 1 0 1.6zM.854 15.5a.5.5 0 0 0-.854.354v2.293a.5.5 0 0 0 .5.5h2.293c.222 0 .39-.135.462-.309a.493.493 0 0 0-.109-.545L.854 15.501zM5 14.647.854 10.5a.5.5 0 0 0-.854.353v2.586a.5.5 0 0 0 .146.353L4.854 18.5l.146.147h2.793a.5.5 0 0 0 .353-.854L5 14.647z"},datadog:{title:"Datadog",fill:"#632CA6",d:"M19.57 17.04l-1.997-1.316-1.665 2.782-1.937-.567-1.706 2.604.087.82 9.274-1.71-.538-5.794zm-8.649-2.498l1.488-.204c.241.108.409.15.697.223.45.117.97.23 1.741-.16.18-.088.553-.43.704-.625l6.096-1.106.622 7.527-10.444 1.882zm11.325-2.712l-.602.115L20.488 0 .789 2.285l2.427 19.693 2.306-.334c-.184-.263-.471-.581-.96-.989-.68-.564-.44-1.522-.039-2.127.53-1.022 3.26-2.322 3.106-3.956-.056-.594-.15-1.368-.702-1.898-.02.22.017.432.017.432s-.227-.289-.34-.683c-.112-.15-.2-.199-.319-.4-.085.233-.073.503-.073.503s-.186-.437-.216-.807c-.11.166-.137.48-.137.48s-.241-.69-.186-1.062c-.11-.323-.436-.965-.343-2.424.6.421 1.924.321 2.44-.439.171-.251.288-.939-.086-2.293-.24-.868-.835-2.16-1.066-2.651l-.028.02c.122.395.374 1.223.47 1.625.293 1.218.372 1.642.234 2.204-.116.488-.397.808-1.107 1.165-.71.358-1.653-.514-1.713-.562-.69-.55-1.224-1.447-1.284-1.883-.062-.477.275-.763.445-1.153-.243.07-.514.192-.514.192s.323-.334.722-.624c.165-.109.262-.178.436-.323a9.762 9.762 0 0 0-.456.003s.42-.227.855-.392c-.318-.014-.623-.003-.623-.003s.937-.419 1.678-.727c.509-.208 1.006-.147 1.286.257.367.53.752.817 1.569.996.501-.223.653-.337 1.284-.509.554-.61.99-.688.99-.688s-.216.198-.274.51c.314-.249.66-.455.66-.455s-.134.164-.259.426l.03.043c.366-.22.797-.394.797-.394s-.123.156-.268.358c.277-.002.838.012 1.056.037 1.285.028 1.552-1.374 2.045-1.55.618-.22.894-.353 1.947.68.903.888 1.609 2.477 1.259 2.833-.294.295-.874-.115-1.516-.916a3.466 3.466 0 0 1-.716-1.562 1.533 1.533 0 0 0-.497-.85s.23.51.23.96c0 .246.03 1.165.424 1.68-.039.076-.057.374-.1.43-.458-.554-1.443-.95-1.604-1.067.544.445 1.793 1.468 2.273 2.449.453.927.186 1.777.416 1.997.065.063.976 1.197 1.15 1.767.306.994.019 2.038-.381 2.685l-1.117.174c-.163-.045-.273-.068-.42-.153.08-.143.241-.5.243-.572l-.063-.111c-.348.492-.93.97-1.414 1.245-.633.359-1.363.304-1.838.156-1.348-.415-2.623-1.327-2.93-1.566 0 0-.01.191.048.234.34.383 1.119 1.077 1.872 1.56l-1.605.177.759 5.908c-.337.048-.39.071-.757.124-.325-1.147-.946-1.895-1.624-2.332-.599-.384-1.424-.47-2.214-.314l-.05.059a2.851 2.851 0 0 1 1.863.444c.654.413 1.181 1.481 1.375 2.124.248.822.42 1.7-.248 2.632-.476.662-1.864 1.028-2.986.237.3.481.705.876 1.25.95.809.11 1.577-.03 2.106-.574.452-.464.69-1.434.628-2.456l.714-.104.258 1.834 11.827-1.424zM15.05 6.848c-.034.075-.085.125-.007.37l.004.014.013.032.032.073c.14.287.295.558.552.696.067-.011.136-.019.207-.023.242-.01.395.028.492.08.009-.048.01-.119.005-.222-.018-.364.072-.982-.626-1.308-.264-.122-.634-.084-.757.068a.302.302 0 0 1 .058.013c.186.066.06.13.027.207m1.958 3.392c-.092-.05-.52-.03-.821.005-.574.068-1.193.267-1.328.372-.247.191-.135.523.047.66.511.382.96.638 1.432.575.29-.038.546-.497.728-.914.124-.288.124-.598-.058-.698m-5.077-2.942c.162-.154-.805-.355-1.556.156-.554.378-.571 1.187-.041 1.646.053.046.096.078.137.104a4.77 4.77 0 0 1 1.396-.412c.113-.125.243-.345.21-.745-.044-.542-.455-.456-.146-.749"},algolia:{title:"Algolia",fill:"#003DFF",d:"M12 0C5.445 0 .103 5.285.01 11.817c-.097 6.634 5.285 12.131 11.92 12.17a11.91 11.91 0 0 0 5.775-1.443.281.281 0 0 0 .052-.457l-1.122-.994a.79.79 0 0 0-.833-.14 9.693 9.693 0 0 1-3.923.77c-5.36-.067-9.692-4.527-9.607-9.888.084-5.293 4.417-9.573 9.73-9.573h9.73v17.296l-5.522-4.907a.407.407 0 0 0-.596.063 4.52 4.52 0 0 1-3.934 1.793 4.538 4.538 0 0 1-4.192-4.168 4.53 4.53 0 0 1 4.512-4.872 4.532 4.532 0 0 1 4.509 4.126c.018.205.11.397.265.533l1.438 1.275a.28.28 0 0 0 .462-.158 6.82 6.82 0 0 0 .099-1.725c-.232-3.376-2.966-6.092-6.345-6.3-3.873-.24-7.11 2.79-7.214 6.588-.1 3.7 2.933 6.892 6.634 6.974a6.75 6.75 0 0 0 4.136-1.294l7.212 6.394a.48.48 0 0 0 .797-.36V.456A.456.456 0 0 0 23.54 0Z"},cloudflare:{title:"Cloudflare",fill:"#F38020",d:"M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727"},upstash:{title:"Upstash",fill:"#00E9A3",d:"M13.8027 0C11.193 0 8.583.9952 6.5918 2.9863c-3.9823 3.9823-3.9823 10.4396 0 14.4219 1.9911 1.9911 5.2198 1.9911 7.211 0 1.991-1.9911 1.991-5.2198 0-7.211L12 12c.9956.9956.9956 2.6098 0 3.6055-.9956.9955-2.6099.9955-3.6055 0-2.9866-2.9868-2.9866-7.8297 0-10.8164 2.9868-2.9868 7.8297-2.9868 10.8164 0l1.8028-1.8028C19.0225.9952 16.4125 0 13.8027 0zM12 12c-.9956-.9956-.9956-2.6098 0-3.6055.9956-.9955 2.6098-.9955 3.6055 0 2.9867 2.9868 2.9867 7.8297 0 10.8164-2.9867 2.9868-7.8297 2.9868-10.8164 0l-1.8028 1.8028c3.9823 3.9822 10.4396 3.9822 14.4219 0 3.9823-3.9824 3.9823-10.4396 0-14.4219-.9956-.9956-2.3006-1.4922-3.6055-1.4922-1.3048 0-2.6099.4966-3.6054 1.4922-1.9912 1.9912-1.9912 5.2198 0 7.211z"},mixpanel:{title:"Mixpanel",fill:"#7856FF",d:"M6.967 9.996h3.053c-.763-.477-1.048-1.145-1.431-2.384L7.443 3.366C6.919 1.458 6.49.551 4.39.551H.004v1.145h.621c1.286 0 1.431.477 1.814 1.908L3.44 7.326c.524 1.814 1.337 2.67 3.53 2.67h-.003Zm7.06 0h3.053c2.194 0 2.956-.86 3.484-2.67l1.001-3.722c.382-1.431.57-1.908 1.814-1.908H24V.551h-4.34c-2.146 0-2.576.86-3.053 2.815l-1.145 4.246c-.384 1.286-.673 1.907-1.435 2.384Zm-4.007 4.008h4.007V9.996H10.02v4.008ZM0 23.449h4.39c2.1 0 2.529-.907 3.053-2.815l1.146-4.246c.383-1.239.668-1.907 1.431-2.384H6.967c-2.194 0-3.007.86-3.531 2.67l-1.001 3.722c-.383 1.431-.524 1.907-1.814 1.907H0v1.146Zm19.65 0h4.343v-1.146h-.622c-1.239 0-1.431-.476-1.814-1.907l-1.001-3.722c-.524-1.814-1.286-2.67-3.483-2.67h-3.046c.762.477 1.041 1.098 1.424 2.384l1.145 4.246c.477 1.955.907 2.815 3.054 2.815Z"},gemini:{title:"Google Gemini",fill:"#8E75B2",d:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"}};var y1=u0(wJ(),1),qV="https://brand.volter.ai/logo/twin-world/svg?size=64&variant=mono";function rq({href:Q,onClick:U}){return y1.jsxDEV("h1",{children:y1.jsxDEV("a",{href:Q,onClick:U,children:[y1.jsxDEV("img",{src:qV,alt:"",width:24,height:24,style:{verticalAlign:"middle"}},void 0,!1,void 0,this),y1.jsxDEV("span",{className:"brand-name",children:" Volter World"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}async function z5(Q){return(await Q.json().catch(()=>({}))).error??`answered ${Q.status}`}function AR(Q,U,Z=0,K=""){let[X,W]=_2.useState({state:"loading"});return _2.useEffect(()=>{W({state:"loading"})},[K,U]),_2.useEffect(()=>{if(!U)return;let z=!0;return(async()=>{try{let B=await Q(U),O=B.ok?{state:"ok",data:await B.json()}:{state:"error",status:B.status,error:await z5(B)};if(z)W(O)}catch(B){if(z)W({state:"error",status:0,error:String(B)})}})(),()=>{z=!1}},[K,U,Z]),X}function B5({load:Q,what:U,retry:Z,lines:K=3}){if(Q.state==="loading")return y1.jsxDEV(UV,{lines:K,label:`Loading ${U}…`},void 0,!1,void 0,this);if(Q.state==="error")return y1.jsxDEV("div",{role:"alert",className:"error-state",children:[y1.jsxDEV("span",{children:["Could not read ",U,": ",Q.error]},void 0,!0,void 0,this),Z?y1.jsxDEV("button",{type:"button",onClick:Z,children:"Try again"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return null}function UV({lines:Q=3,label:U="Loading…"}){return y1.jsxDEV("div",{className:"skeleton",role:"status","aria-label":U,children:Array.from({length:Q},(Z,K)=>y1.jsxDEV("span",{style:{width:`${[92,76,84,64,88][K%5]}%`}},K,!1,void 0,this))},void 0,!1,void 0,this)}function h0({iso:Q,time:U}){if(!Q)return y1.jsxDEV("span",{children:"—"},void 0,!1,void 0,this);let Z=new Date(Q);return y1.jsxDEV("time",{dateTime:Q,title:Q,children:Number.isNaN(Z.getTime())?Q:U?Z.toLocaleTimeString():Z.toLocaleString()},void 0,!1,void 0,this)}var IJ=(Q)=>Q?new Date(Q).toLocaleString():"—";function dq(Q){let U=Q?Date.parse(Q):Number.NaN;if(Number.isNaN(U))return"—";let Z=Math.max(0,Math.round((Date.now()-U)/1000));return Z<60?"just now":Z<3600?`${Math.round(Z/60)}m ago`:Z<86400?`${Math.round(Z/3600)}h ago`:`${Math.round(Z/86400)}d ago`}function J9(Q,U){let Z=U.replace(/[_-]+/g," "),K=Z.endsWith("s")?Z:/[^aeiou]y$/.test(Z)?`${Z.slice(0,-1)}ies`:/(ch|sh|x)$/.test(Z)?`${Z}es`:`${Z}s`;return`${Q} ${Q===1?Z:K}`}var EX=(Q)=>Q.length<=1?Q.join(""):`${Q.slice(0,-1).join(", ")} and ${Q[Q.length-1]}`,GV={github:"GitHub",openai:"OpenAI",aws:"AWS",hubspot:"HubSpot",paypal:"PayPal",youtube:"YouTube",tiktok:"TikTok",linkedin:"LinkedIn",xai:"xAI",sendgrid:"SendGrid",elevenlabs:"ElevenLabs",assemblyai:"AssemblyAI",planetscale:"PlanetScale",googleoauth:"Google sign-in",npm:"npm","npm-registry":"npm registry",posthog:"PostHog",mongodb:"MongoDB",pagerduty:"PagerDuty",mailgun:"Mailgun",turbopuffer:"turbopuffer"},F0=(Q)=>GV[Q]??Q.charAt(0).toUpperCase()+Q.slice(1);function A5({vendor:Q}){let U=zR[Q];return y1.jsxDEV("span",{className:U?"mark logo":"mark","aria-hidden":"true",children:U?y1.jsxDEV("svg",{viewBox:"0 0 24 24",children:y1.jsxDEV("path",{d:U.d,fill:U.fill},void 0,!1,void 0,this)},void 0,!1,void 0,this):F0(Q).charAt(0)},void 0,!1,void 0,this)}var BR=(Q)=>{Q.currentTarget.closest("details")?.removeAttribute("open")},DX="volter.theme",LR=()=>{try{let Q=localStorage.getItem(DX);return Q==="light"||Q==="dark"?Q:"system"}catch{return"system"}};function bX(Q=LR()){let U=document.documentElement;if(Q==="system")U.removeAttribute("data-theme");else U.setAttribute("data-theme",Q)}function MR(){let[Q,U]=_2.useState(LR),Z=(K)=>{try{if(K==="system")localStorage.removeItem(DX);else localStorage.setItem(DX,K)}catch{}bX(K),U(K)};return y1.jsxDEV("div",{className:"theme-choice",role:"radiogroup","aria-label":"Theme",children:["system","light","dark"].map((K)=>y1.jsxDEV("button",{type:"button",role:"radio","aria-checked":Q===K,onClick:()=>Z(K),children:K==="system"?"System":K==="light"?"Light":"Dark"},K,!1,void 0,this))},void 0,!1,void 0,this)}function TR(){return _2.useEffect(()=>{let Q=()=>[...document.querySelectorAll("details.menu[open], details.clock-more[open]")],U=(K)=>{if(K.key!=="Escape"||document.querySelector("dialog[open]"))return;let X=Q();if(!X.length)return;for(let W of X)W.removeAttribute("open");X[X.length-1].querySelector("summary")?.focus()},Z=(K)=>{let X=K.target;for(let W of Q())if(!X||!W.contains(X))W.removeAttribute("open")};return document.addEventListener("keydown",U),document.addEventListener("click",Z),()=>{document.removeEventListener("keydown",U),document.removeEventListener("click",Z)}},[]),null}function S8({open:Q,onClose:U,title:Z,children:K,footer:X,wide:W}){let z=_2.useRef(null),B=_2.useId();return _2.useEffect(()=>{let O=z.current;if(!O)return;if(Q&&!O.open){O.showModal();let T=O.querySelector(".dialog-body :is(input:not([type=hidden]):not([disabled]), select, textarea)");if(T?.focus(),T instanceof HTMLInputElement&&T.value&&/^(text|search|email|url)$/.test(T.type))T.select()}if(!Q&&O.open)O.close()},[Q]),y1.jsxDEV("dialog",{ref:z,className:W?"dialog wide":"dialog","aria-labelledby":B,onClose:U,onCancel:(O)=>{O.preventDefault(),U()},onMouseDown:(O)=>{if(O.target===z.current)U()},children:Q?y1.jsxDEV(y1.Fragment,{children:[y1.jsxDEV("div",{className:"dialog-head",children:[y1.jsxDEV("h2",{id:B,children:Z},void 0,!1,void 0,this),y1.jsxDEV("button",{type:"button",className:"icon-button","aria-label":"Close",onClick:U,children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),y1.jsxDEV("div",{className:"dialog-body",children:K},void 0,!1,void 0,this),X?y1.jsxDEV("div",{className:"dialog-foot",children:X},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null},void 0,!1,void 0,this)}var yX="volter:confirm";function o5(Q){return new Promise((U)=>{window.dispatchEvent(new CustomEvent(yX,{detail:{ask:Q,resolve:U}}))})}function RR(){let[Q,U]=_2.useState(null),[Z,K]=_2.useState("");_2.useEffect(()=>{let B=(O)=>{K(""),U(O.detail)};return window.addEventListener(yX,B),()=>window.removeEventListener(yX,B)},[]);let X=(B)=>{Q?.resolve(B),U(null)},W=Q?.ask,z=!W?.typed||Z===W.typed;return y1.jsxDEV(S8,{open:Boolean(Q),onClose:()=>X(!1),title:W?.title??"",footer:y1.jsxDEV(y1.Fragment,{children:[y1.jsxDEV("button",{type:"button",onClick:()=>X(!1),children:"Cancel"},void 0,!1,void 0,this),y1.jsxDEV("button",{type:"button",className:W?.danger?"danger-button":"primary",disabled:!z,onClick:()=>X(!0),children:W?.action},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:[W?.body?y1.jsxDEV("div",{className:"confirm-body",children:W.body},void 0,!1,void 0,this):null,W?.typed?y1.jsxDEV("div",{className:"typed-confirm",children:[y1.jsxDEV("p",{children:["Type ",y1.jsxDEV("code",{children:W.typed},void 0,!1,void 0,this)," to confirm."]},void 0,!0,void 0,this),y1.jsxDEV("input",{autoFocus:!0,"aria-label":`Type ${W.typed} to confirm`,value:Z,onChange:(B)=>K(B.target.value),onKeyDown:(B)=>{if(B.key==="Enter"&&z)X(!0)},autoComplete:"off",spellCheck:!1},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}var vX="volter:toast";function t2(Q,U="ok"){window.dispatchEvent(new CustomEvent(vX,{detail:{text:Q,kind:U}}))}function OR(){let[Q,U]=_2.useState([]);return _2.useEffect(()=>{let Z=0,K=(X)=>{let{text:W,kind:z}=X.detail,B=++Z;if(U((O)=>[...O.slice(-3),{id:B,text:W,kind:z}]),z!=="error")setTimeout(()=>U((O)=>O.filter((T)=>T.id!==B)),4500)};return window.addEventListener(vX,K),()=>window.removeEventListener(vX,K)},[]),y1.jsxDEV("div",{className:"toasts",role:"region","aria-label":"Notifications",children:Q.map((Z)=>y1.jsxDEV("div",{className:`toast ${Z.kind}`,role:Z.kind==="error"?"alert":"status",children:[y1.jsxDEV("span",{children:Z.text},void 0,!1,void 0,this),y1.jsxDEV("button",{type:"button",className:"icon-button","aria-label":"Dismiss",onClick:()=>U((K)=>K.filter((X)=>X.id!==Z.id)),children:"✕"},void 0,!1,void 0,this)]},Z.id,!0,void 0,this))},void 0,!1,void 0,this)}function uX({value:Q,label:U,secret:Z}){let[K,X]=_2.useState(!1);return y1.jsxDEV("div",{className:"copy-field",children:[U?y1.jsxDEV("span",{className:"copy-label",children:U},void 0,!1,void 0,this):null,y1.jsxDEV("div",{className:"copy-row",children:[y1.jsxDEV("input",{readOnly:!0,value:Q,"aria-label":U??"Value",onFocus:(z)=>z.currentTarget.select(),spellCheck:!1},void 0,!1,void 0,this),y1.jsxDEV("button",{type:"button",onClick:()=>{navigator.clipboard?.writeText(Q).then(()=>{X(!0),setTimeout(()=>X(!1),1600),t2(Z?"Copied. Keep it somewhere safe":"Copied")}).catch(()=>t2("Your browser would not copy it: select it and copy","error"))},children:K?"Copied":"Copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function xX({label:Q,items:U}){return y1.jsxDEV("details",{className:"menu row-menu",children:[y1.jsxDEV("summary",{className:"icon-button",role:"button","aria-haspopup":"menu","aria-label":Q,title:Q,children:"⋯"},void 0,!1,void 0,this),y1.jsxDEV("div",{className:"popover menu-list",role:"menu",children:U.filter((Z)=>Boolean(Z)).map((Z)=>Z.href?y1.jsxDEV("a",{role:"menuitem",href:Z.href,className:Z.danger?"danger-item":void 0,onClick:BR,children:Z.label},Z.label,!1,void 0,this):y1.jsxDEV("button",{type:"button",role:"menuitem",disabled:Z.disabled,className:Z.danger?"danger-item":void 0,onClick:(K)=>{BR(K),Z.onSelect?.()},children:Z.label},Z.label,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function wR({title:Q,children:U,action:Z}){return y1.jsxDEV("div",{className:"empty-state",children:[y1.jsxDEV("p",{className:"empty-title",children:Q},void 0,!1,void 0,this),U?y1.jsxDEV("div",{className:"empty-body",children:U},void 0,!1,void 0,this):null,Z?y1.jsxDEV("div",{className:"empty-action",children:Z},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function IR(){return _2.useEffect(()=>{let Q=(Z)=>{let K=document.querySelector("main.app"),X=Z.target;if(K?.hasAttribute("data-drawer")&&X&&!X.closest(".side")&&!X.closest(".drawer-button"))K.removeAttribute("data-drawer")},U=(Z)=>{if(Z.key==="Escape")ZV()};return document.addEventListener("click",Q),document.addEventListener("keydown",U),()=>{document.removeEventListener("click",Q),document.removeEventListener("keydown",U)}},[]),y1.jsxDEV("button",{type:"button",className:"icon-button drawer-button","aria-label":"Menu",onClick:()=>{document.querySelector("main.app")?.toggleAttribute("data-drawer")},children:"☰"},void 0,!1,void 0,this)}var ZV=()=>{document.querySelector("main.app")?.removeAttribute("data-drawer")};var ER=u0(CR(),1);function mX(Q={}){let U=(K,X)=>Q.tools?`${X} (\`${K}\`)`:`\`${K}\``,Z=["Set up Volter World for this app, so its calls to Stripe, Slack, GitHub, OpenAI and the other services it uses go to local twins instead of the real APIs. The app keeps its real SDKs and code.","",Q.tools?"1. You have the Volter World tools (volter mcp). If the `volter` command is missing, install it: `npm install -g @volter/world`.":"1. Install the command and your agent tooling: `npm install -g @volter/world`, then `volter agents install --yes`.",`2. In the app's folder, ${U("volter world init --install","world_init")}: it detects the vendors the app calls and installs their twins. Show me the vendors it detected and why, before keeping them.`,`3. ${Q.tools?"Start it with world_up":"Start it: `volter world up`"}, then run the tests inside it: ${U("volter world run -- <the test command>","world_run")}. Fix anything that fails because a call went to the real service.`,`4. Tell me what the app did at each vendor (${U("volter world log","world_log")}), and give me the dashboard link (${Q.tools?"world_view":"`volter world view --no-open`, started in the background: it keeps running"}).`];if(Q.platform){let K=Q.world??"<org>/<world>";Z.push(`5. Share it with my team on ${Q.platform}: ${U(`volter login ${Q.platform}`,"platform_login")} gives a link and a code for me to approve in my browser. Once I have, link it with ${U(`volter remote add origin ${K} --create`,"remote_link with create: true")}${Q.world?"":" (ask me for <org>/<world>)"}, then send what the app did: ${U('volter world changeset -m "<what and why>"',"world_changeset")} and ${U("volter world push","world_push")}.`)}return Z.push("","The guide: https://world.volter.ai/docs/guides/use-with-a-coding-agent.md"),Z.join(`
|
|
248
|
-
`)}var H=u0(wJ(),1),iq="volter.console.token",NJ=document.getElementById("root"),q0=NJ.dataset.base??"/-/console",B0=window.location.origin,w6=(NJ.dataset.worlds??B0).replace(/\/+$/,""),bR=(NJ.dataset.names??"").split(",").filter((Q)=>Q!==""),R6=NJ.dataset.worldOrigin==="1",k8=window.fetch.bind(window),O6="(session)",uR="(pass)",fJ=(Q)=>{try{if(Q&&!R6)sessionStorage.setItem(iq,Q);else sessionStorage.removeItem(iq);localStorage.removeItem(iq)}catch{}},xR="volter.console.portal",hR=(Q)=>{try{if(typeof Q==="string"&&/^https?:$/.test(new URL(Q).protocol))sessionStorage.setItem(xR,new URL(Q).origin)}catch{}},HV=()=>{return y8.get("token")??""},o2=()=>{try{let Q=sessionStorage.getItem(xR)??"";return Q&&/^https?:$/.test(new URL(Q).protocol)?new URL(Q).origin:""}catch{return""}},YV=()=>{let Q=HV();if(R6){if(fJ(""),y8.get("pass"))return uR;let U=new URLSearchParams(window.location.search).has("signin");if(U)try{window.history.replaceState(null,"",window.location.pathname+window.location.hash)}catch{}return Q||(U?"":O6)}if(Q)return fJ(Q),Q;try{return sessionStorage.getItem(iq)??""}catch{return""}};async function X0(Q,U,Z={}){return k8(`${B0}${U}`,{...Z,headers:{...Z.headers??{},...Q===O6?{}:{"x-volter-token":Q},...Z.body&&!Z.headers?.["content-type"]?{"content-type":"application/json"}:{}}})}function L5(Q,U,Z=0){return AR((K)=>X0(Q,K),U,Z,Q)}var U9=(Q)=>{let U=new Date(Q),Z=(K)=>String(K).padStart(2,"0");return`${U.getFullYear()}-${Z(U.getMonth()+1)}-${Z(U.getDate())}T${Z(U.getHours())}:${Z(U.getMinutes())}`},SR=(Q)=>new Date(Math.ceil(Date.parse(Q)/60000)*60000).toISOString(),nq=(Q)=>Q.operation==="observed"?`observed${Q.provenance==="placeholder"?" (default data)":" (vendor)"}`:Q.receipt?`${Q.receipt.status??""} ${Q.receipt.externalId??""} ${Q.receipt.reason??""}`.trim():Q.provenance==="placeholder"?"default data":"unpushed",mR=(Q)=>Q.actor?`${Q.actor.kind}${Q.actor.id?` ${Q.actor.id}`:""}`:"—",gR=(Q)=>{let U=/^[0-9a-f]{2}-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/.exec(Q??"");return U?{trace:U[1],span:U[2]}:null},lX="volter.console.snapshots",L3=()=>{try{return JSON.parse(sessionStorage.getItem(lX)??"{}")}catch{return{}}},pR=new Map,rX=(Q)=>{if(R6){if(Q.token||Q.readToken)pR.set(Q.name,{token:Q.token,readToken:Q.readToken});Q={...Q,token:"",readToken:""}}try{sessionStorage.setItem(lX,JSON.stringify({...L3(),[Q.name]:Q}))}catch{}},cR=(Q)=>pR.get(Q)?.readToken||L3()[Q]?.readToken||"",PJ=(Q)=>{try{let U=L3();delete U[Q],sessionStorage.setItem(lX,JSON.stringify(U))}catch{}},y8=new URLSearchParams(window.location.hash.slice(1)),Q9=y8.get("close")??"";function CJ(Q){if(typeof Q!=="string")return null;let U;try{U=new URL(Q)}catch{return null}return(U.protocol==="http:"||U.protocol==="https:")&&U.origin===Q.replace(/\/+$/,"")?U:null}function dX(Q){let U=CJ(Q);if(!U)return null;let Z=new URL(B0);if(U.protocol!==Z.protocol||U.port!==Z.port)return null;if(U.hostname===Z.hostname)return U.origin;let K=/^[a-z0-9](?:[a-z0-9]|-(?!-))*--[a-z0-9](?:[a-z0-9]|-(?!-))*\./;if(!K.test(U.hostname))return null;let X=U.hostname.replace(K,"");return X===Z.hostname||K.test(Z.hostname)&&X===Z.hostname.replace(K,"")?U.origin:null}function WV(Q){let U;try{U=JSON.parse(Q)}catch{return null}let Z=/^[a-z0-9][a-z0-9-]*\/[a-z0-9][a-z0-9-]*$/i;if(typeof U.name!=="string"||!Z.test(U.name)||typeof U.parent!=="string"||!Z.test(U.parent)||typeof U.at!=="string")return null;let K=U.parentOrigin===void 0?void 0:dX(U.parentOrigin);return{name:U.name,parent:U.parent,token:typeof U.token==="string"?U.token:"",readToken:typeof U.readToken==="string"?U.readToken:"",at:U.at,expiresAt:typeof U.expiresAt==="string"?U.expiresAt:null,...K?{parentOrigin:K}:{}}}{let Q=y8.get("snapshot");if(Q){let U=WV(Q);if(U&&!L3()[U.name])rX(U)}}var lR="volter.console.home",rR=(Q)=>{let U=CJ(Q);if(!U)return null;let Z=new URL(B0).hostname,K=Z.replace(/^[a-z0-9](?:[a-z0-9]|-(?!-))*--[a-z0-9](?:[a-z0-9]|-(?!-))*\./,"");return U.hostname===Z||U.hostname===K?U.origin:null};{let Q=rR(y8.get("home"));if(Q)try{sessionStorage.setItem(lR,Q)}catch{}}if(["token","pass","portal","snapshot","home","close"].some((Q)=>y8.has(Q)))try{window.history.replaceState(null,"",window.location.pathname+window.location.search)}catch{}var q9=()=>{try{return rR(sessionStorage.getItem(lR))??""}catch{return""}};function iX(Q,U,Z,K){let X=new URLSearchParams({token:U,home:q9()||B0}),W=L3()[Z];if(W)X.set("snapshot",JSON.stringify(W));window.location.replace(`${Q}${K??`${window.location.pathname}${window.location.search}`}#${X.toString()}`)}function V8(){return window.location.pathname.slice(q0.length).split("/").filter(Boolean).map((Q)=>{try{return decodeURIComponent(Q)}catch{return""}})}var jR=/^[a-z0-9](?:[a-z0-9]|-(?!-))*$/i,T6=(Q,U)=>Q&&U&&jR.test(Q)&&jR.test(U)?`${Q}/${U}`:"";function v0(Q){window.history.pushState(null,"",`${q0}/${Q.map(encodeURIComponent).join("/")}`),window.dispatchEvent(new PopStateEvent("popstate"))}function cX(Q,U){let Z=dX(L3()[Q]?.origin);if(Z&&Z!==B0){iX(Z,cR(Q),Q,`${q0}/${U.map(encodeURIComponent).join("/")}`);return}v0(U)}async function VR(){let[Q,U]=V8(),Z=T6(Q,U),K=Z?[Z]:bR;if(K.length===0){let X=await k8(`${B0}/-/ping`).catch(()=>null);K=X?.ok?(await X.json().catch(()=>({}))).worlds??[]:[]}K=K.filter((X)=>{let[W,z,...B]=X.split("/");return B.length===0&&T6(W,z)===X});for(let X of K){let W=await k8(`${B0}/-/${X}/session`,{method:"POST"}).catch(()=>null);if(!W)continue;let z=await W.json().catch(()=>({})),B=CJ(z.origin)?.origin;if(W.status===409&&B&&B!==B0)return window.location.replace(`${B}${q0}/${X}`),"moved";if(W.ok&&z.local)return{token:typeof z.token==="string"&&z.token?z.token:O6}}return null}function zV(){let[Q,U]=B1.useState(YV()),[Z,K]=B1.useState(!1),[X,W]=B1.useState(!1),[z,B]=B1.useState(""),[O,T]=B1.useState(null),[R,L]=B1.useState(null),[M,f]=B1.useState(V8());B1.useEffect(()=>{let x=()=>f(V8());return window.addEventListener("popstate",x),()=>window.removeEventListener("popstate",x)},[]),B1.useEffect(()=>{let[x,d]=V8(),g=T6(x,d),[n,j]=g?g.split("/"):[],i=L3()[Q9];if(!Q9||!Q||!n||!j||!i?.made||i.parent!==`${n}/${j}`||T6(...Q9.split("/"))!==Q9)return;try{window.history.replaceState(null,"",window.location.pathname+window.location.search)}catch{}X0(Q,`/-/${n}/${j}/branches/${Q9}`,{method:"DELETE"}).catch(()=>null).then(()=>PJ(Q9))},[Q]);let I=B1.useCallback(async(x)=>{if(L(null),!x){let j=await VR();if(j==="moved")return;if(j){if(K(!0),j.token!==O6)fJ(j.token);U(j.token);return}T(null),W(!0);return}if(R6&&x===O6){let j=await VR();if(j==="moved")return;if(j)K(!0)}if(R6&&x===uR){let[j,i]=V8(),q1=T6(j,i),[Q1,Y1]=q1?q1.split("/"):[],L1=Q1&&Y1?await k8(`${B0}/-/${Q1}/${Y1}/session`,{method:"POST",headers:{"x-volter-pass":y8.get("pass")??""}}).catch(()=>null):null;if(!L1){L(`${B0} did not answer: no session was opened`),T(null);return}if(!L1.ok){L(`${await z5(L1)}. Open it again from the platform.`),T(null);return}hR((await L1.json().catch(()=>({}))).issuer),U(O6);return}if(R6&&x!==O6){let[j,i]=V8(),q1=T6(j,i),[Q1,Y1]=q1?q1.split("/"):[],L1=Q1&&Y1?await k8(`${B0}/-/${Q1}/${Y1}/session`,{method:"POST",headers:{"x-volter-token":x}}).catch(()=>null):null;if(!L1){L(`${B0} did not answer: no session was opened`),T(null);return}if(!L1.ok){let M1=await z5(L1);L(L1.status===401||L1.status===403?`That token does not open ${Q1}/${Y1}.`:L1.status===409?`${Q1}/${Y1}'s session lives at another origin: ${M1}`:`The World could not open a session (${L1.status}): ${M1}`),T(null);return}U(O6);return}let d=R6?new Response(null,{status:404}):await X0(x,"/-/worlds");if(d.ok){let{worlds:j}=await d.json();T({kind:"admin",worlds:j});return}if(d.status===429){L("You are asking faster than the platform allows — wait a moment and reload."),T(null);return}if(d.status>=500){let j=await d.json().catch(()=>({}));L(`The platform could not list your worlds${j.error?`: ${j.error}`:""}. Reload; if it stays, the status page says what is wrong.`),T(null);return}let g=bR;if(g.length===0){let j=await k8(`${B0}/-/ping`);if(!j.ok){L(`${B0} does not answer as a host`),T(null);return}if(g=(await j.json()).worlds??[],g.length===0){L(`${B0} does not list its worlds: open the console with the World's URL (volter world console <url>/<org>/<world>)`),T(null);return}}let n=[];for(let j of g){let i=await X0(x,`/-/${j}/twins`);if(i.ok){let q1=await i.json();n.push({name:j,base:`${w6}/${j}`,twins:(q1.twins??[]).map((Q1)=>({vendor:Q1.twin,protocol:Q1.protocol??null,root:Q1.root??null}))})}}if(n.length===0){L("This link or key opens no World here: it was revoked, or it has ended."),T(null);return}T({kind:"world",worlds:n})},[]);B1.useEffect(()=>{I(Q)},[Q,I]);let D=(x)=>O?.kind==="admin"?O.worlds.find((d)=>d.name===x)?.token??Q:Q,[V,k]=B1.useState("");if(!Q||!O&&!R)return H.jsxDEV("main",{children:[H.jsxDEV(rq,{href:`${q0}/`},void 0,!1,void 0,this),Q&&!O&&!R||!Q&&!X?H.jsxDEV("p",{children:"Opening…"},void 0,!1,void 0,this):H.jsxDEV("form",{onSubmit:(x)=>{x.preventDefault(),fJ(z.trim()),U(z.trim())},children:[H.jsxDEV("p",{children:"A host's admin token opens every world it serves; a world's token opens that world."},void 0,!1,void 0,this),H.jsxDEV("label",{children:["Token ",H.jsxDEV("input",{name:"token",type:"password",value:z,onChange:(x)=>B(x.target.value),autoFocus:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("button",{type:"submit",children:"Open"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);let h=()=>{if(Z){window.location.reload();return}if(R6){let[x,d]=V8(),g=T6(x,d),[n,j]=g?g.split("/"):[],i=()=>window.location.replace(o2()?`${o2()}/`:`${B0}${q0}/${n&&j?`${n}/${j}`:""}?signin`);if(setTimeout(i,2000),n&&j)k8(`${B0}/-/${n}/${j}/session/end`,{method:"POST"}).catch(()=>null).then(i);else i();return}if(O)for(let x of O.worlds)navigator.sendBeacon(`${x.base.replace(/\/[^/]+\/[^/]+$/,"")}/-/${x.name}/session/end`);fJ(""),U(""),B(""),T(null),v0([])};if(R||!O)return H.jsxDEV("main",{children:[H.jsxDEV(rq,{href:`${q0}/`},void 0,!1,void 0,this),H.jsxDEV("p",{role:"alert",children:R??"nothing answered"},void 0,!1,void 0,this),o2()?H.jsxDEV("a",{className:"button",href:`${o2()}/`,children:["Back to ",new URL(o2()).host]},void 0,!0,void 0,this):H.jsxDEV("button",{onClick:h,children:Z?"Try again":"Use another token"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);let[P,C,v,b,E]=M,p=v==="~",a=/^[A-Za-z0-9_-]+$/,m=p||!v||!a.test(v)?void 0:v,_1=E&&a.test(E)?E:void 0,$1=T6(P,C),J1=$1?L3()[$1]??null:null,y=(x)=>cR(x)||D(x),u=async(x)=>{let d=dX(x.parentOrigin);if(d&&d!==B0){PJ(x.name),window.location.assign(`${d}${q0}/${x.parent}#close=${encodeURIComponent(x.name)}`);return}if(x.made)await X0(D(x.parent),`/-/${x.parent}/branches/${x.name}`,{method:"DELETE"}).catch(()=>null),PJ(x.name);v0(x.parent.split("/"))};return H.jsxDEV("main",{className:$1?"app":void 0,children:[H.jsxDEV("header",{children:[$1?H.jsxDEV(IR,{},void 0,!1,void 0,this):null,H.jsxDEV(rq,{href:`${q9()&&q9()!==B0?q9():""}${q0}/`,onClick:(x)=>{if(q9()&&q9()!==B0)return;x.preventDefault(),v0([])}},void 0,!1,void 0,this),H.jsxDEV("nav",{"aria-label":"breadcrumb",className:"crumbs",children:[$1?H.jsxDEV(H.Fragment,{children:[H.jsxDEV("span",{className:"crumb-sep","aria-hidden":"true",children:"/"},void 0,!1,void 0,this),H.jsxDEV("span",{children:$1.split("/")[0]},void 0,!1,void 0,this),H.jsxDEV("span",{className:"crumb-sep","aria-hidden":"true",children:"/"},void 0,!1,void 0,this),H.jsxDEV("a",{href:`${q0}/${$1}`,className:"crumb-world",onClick:(x)=>{x.preventDefault(),v0($1.split("/"))},children:$1.split("/")[1]},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,m?H.jsxDEV("span",{children:[" / ",m]},void 0,!0,void 0,this):null,p&&b==="trace"?H.jsxDEV("span",{children:" / trace"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),o2()?H.jsxDEV("a",{href:`${o2()}/${$1?encodeURIComponent($1.split("/")[0]):""}`,title:`Back to the platform at ${new URL(o2()).host}`,className:"back-link",children:["← ",H.jsxDEV("span",{className:"back-text",children:$1?`${$1.split("/")[0]}'s Worlds`:new URL(o2()).host},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,H.jsxDEV("span",{className:"mode",children:Z?"on this machine":J1?"a snapshot, read only":V?`signed in as ${V}`:O.kind==="admin"?"host: admin":"opened with a link or key"},void 0,!1,void 0,this),Z?null:H.jsxDEV("button",{onClick:h,children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$1?H.jsxDEV(MV,{name:$1,token:y($1),twin:m,tab:p?b??"overview":"overview",arg:p?_1:void 0,admin:J1?null:O.kind==="admin"?Q:null,snapshot:J1,onReturn:u,opens:(x)=>!!L3()[x]||O.kind==="admin"&&O.worlds.some((d)=>d.name===x),onRemoved:()=>{I(Q),v0([])},onWho:k},$1,!1,void 0,this):H.jsxDEV(BV,{mode:O,admin:O.kind==="admin"?Q:null,reload:()=>I(Q)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function BV({mode:Q,admin:U,reload:Z}){let[K,X]=B1.useState(""),[W,z]=B1.useState(""),[B,O]=B1.useState(""),[T,R]=B1.useState(null),L=async(V)=>{if(!await o5({title:`Rotate the tokens of ${V}?`,body:"Every app, script and person holding the current tokens loses access at once. The new ones are shown once.",action:"Rotate tokens",danger:!0}))return;let k=await X0(U,`/-/worlds/${V}/rotate`,{method:"POST"}),h=await k.json().catch(()=>({}));R(k.ok?`rotated ${V}: the new tokens are shown once — token ${h.token} · read token ${h.readToken}`:h.error??`answered ${k.status}`),await Z()},M=async(V)=>{let k=await X0(U,`/-/worlds/${V}`,{method:"DELETE"}),h=await k.json().catch(()=>({}));R(k.ok?`removed ${V}`:h.error??`answered ${k.status}`),await Z()},[f,I]=B1.useState(!1),D=async(V)=>{V.preventDefault(),R(null),I(!0);try{let k=await X0(U,"/-/worlds",{method:"POST",body:JSON.stringify({org:K,world:W,vendors:B.split(",").map((P)=>P.trim()).filter(Boolean)})}),h=await k.json();if(!k.ok){R(h.error??`the host answered ${k.status}`);return}R(`provisioned ${h.name}`),z(""),O(""),await Z()}finally{I(!1)}};return H.jsxDEV("section",{"aria-labelledby":"worlds",children:[H.jsxDEV("h2",{id:"worlds",children:"Worlds"},void 0,!1,void 0,this),H.jsxDEV("p",{className:"lede",children:"A World is a copy of the services your app uses (Stripe, Slack, GitHub…), with none of the real consequences: your app talks to it, and you can see everything it did on each vendor's own screens."},void 0,!1,void 0,this),H.jsxDEV("table",{children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"world"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"address"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"stand-ins for"},void 0,!1,void 0,this),U?H.jsxDEV("th",{children:"actions"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:Q.worlds.map((V)=>H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:H.jsxDEV("a",{href:`${q0}/${V.name}`,onClick:(k)=>{k.preventDefault(),v0(V.name.split("/"))},children:V.name},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:H.jsxDEV("code",{children:V.base},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:V.twins.map((k)=>F0(k.vendor)).join(", ")||"—"},void 0,!1,void 0,this),U?H.jsxDEV("td",{children:[H.jsxDEV("button",{type:"button","aria-label":`Rotate the tokens of ${V.name}`,onClick:()=>void L(V.name),children:"Rotate tokens"},void 0,!1,void 0,this)," ",H.jsxDEV("button",{type:"button","aria-label":`Remove ${V.name}`,onClick:()=>void o5({title:`Remove ${V.name}?`,body:"The host stops serving it and its whole history goes with it. This cannot be undone.",action:"Remove World",danger:!0,typed:V.name}).then((k)=>{if(k)M(V.name)}),children:"Remove world"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},V.name,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U?H.jsxDEV("form",{onSubmit:D,"aria-labelledby":"provision",children:[H.jsxDEV("h3",{id:"provision",children:"Provision a world"},void 0,!1,void 0,this),H.jsxDEV("label",{children:["Org ",H.jsxDEV("input",{name:"org",value:K,onChange:(V)=>X(V.target.value),required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("label",{children:["World ",H.jsxDEV("input",{name:"world",value:W,onChange:(V)=>z(V.target.value),required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("label",{children:["Twins ",H.jsxDEV("input",{name:"vendors",value:B,onChange:(V)=>O(V.target.value),placeholder:"github, slack",required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("button",{type:"submit",disabled:f,children:f?"Provisioning… (a host boots the world; ten seconds or so)":"Provision"},void 0,!1,void 0,this),T?H.jsxDEV("p",{role:"status",children:T},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):T?H.jsxDEV("p",{role:"status",children:T},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}var gX=[["overview","Dashboard"],["branches","Branches"],["settings","Settings"],["branch","Overview"],["changes","Changes"],["changesets","Changesets"],["activity","Activity"],["vendors","Vendors"],["canvas","All screens"]],AV={dashboard:"overview",mirrors:"vendors",screens:"canvas",timeline:"activity",monitoring:"activity",trace:"activity",operations:"settings"},D8=(Q,U)=>`${w6}/${Q}/${U}/`,kR={verify:"verified",use:"used",issue:"issued",revoke:"revoked",rotate:"rotated",seed:"seeded",upsert:"saved",set:"set",start:"started",finish:"finished",fail:"failed",schedule:"scheduled",deliver:"delivered",like:"liked",follow:"followed",reply:"replied",create:"created",update:"updated",delete:"deleted",record:"recorded",remove:"removed",add:"added",send:"sent",post:"posted",postmessage:"posted",cancel:"canceled",close:"closed",open:"opened",publish:"published",upload:"uploaded",invite:"invited",archive:"archived",merge:"merged",refund:"refunded",capture:"captured",confirm:"confirmed",pay:"paid"};function n5(Q){let U=Q.operation??Q.op,Z=(U.includes(".")?U.slice(U.lastIndexOf(".")+1):U).toLowerCase(),K=Q.subject.type.replace(/[_-]+/g," ").trim(),X=`${K.charAt(0).toUpperCase()}${K.slice(1)}`,W=/(^|\.)twin\./.test(U)||/^seed_/.test(Z),z=U.replace(/[._]+/g," ").trim(),B=W?`${X} seeded`:kR[Z]?`${X} ${kR[Z]}`:`${z.charAt(0).toUpperCase()}${z.slice(1)}`,O=Q.fields??{},T=["title","name","email","text","subject","summary","description"].map((L)=>O[L]).find((L)=>typeof L==="string"&&L.trim()!=="")??null,R=T===null?null:T.replace(/<([@#!])[^|>]*\|([^>]+)>/g,(L,M,f)=>`${M==="!"?"@":M}${f}`).replace(/<(?:https?:[^|>]+)\|([^>]+)>/g,"$1").replace(/<(https?:[^>]+)>/g,"$1");return{what:B,label:R===null?null:R.length>80?`${R.slice(0,79)}…`:R}}var aq=(Q)=>/token|password|secret|key|credential/i.test(Q.subject.type)&&Q.subject.id.length>6?`••••${Q.subject.id.slice(-4)}`:Q.subject.id,oq=(Q,U)=>!Q.actor?"":Q.actor.kind==="system"?`by ${F0(U)}`:Q.actor.id?`by ${Q.actor.id}`:Q.actor.kind==="agent"||Q.actor.kind==="app"?"by your app":`by ${Q.actor.kind}`,LV=(Q)=>Q.operation==="observed"||Q.receipt||Q.provenance==="placeholder"?nq(Q):null;function MV({name:Q,token:U,twin:Z,tab:K,arg:X,admin:W,snapshot:z,onReturn:B,opens:O,onRemoved:T,onWho:R}){let[L,M]=B1.useState("pending"),[f,I]=B1.useState(null),[D,V]=B1.useState(0),[k,h]=B1.useState(null);B1.useEffect(()=>{let Q1=!0;return I(null),X0(U,`/-/${Q}/session`,{method:"POST"}).then(async(Y1)=>{let L1=await Y1.json().catch(()=>({}));if(hR(L1.issuer),L1.who)R?.(L1.who);h(typeof L1.signsAs==="string"?L1.signsAs:null);let M1=CJ(L1.origin)?.origin;if(Y1.status===409&&M1&&M1!==B0){iX(M1,U,Q);return}if(!Q1)return;if(M(!Y1.ok?"unknown":L1.scope==="read"?"read":L1.scope==="write"?"write":"unknown"),!Y1.ok)I(L1.error??`answered ${Y1.status}`)}).catch((Y1)=>{if(Q1)M("unknown"),I(`the World did not answer: ${Y1 instanceof Error?Y1.message:String(Y1)}`)}),()=>{Q1=!1}},[Q,U,D]);let P=f?{state:"error",error:f}:L==="pending"?{state:"pending"}:{state:"ok",scope:L},C=L==="write",v=(Q1)=>{if(Q1.status===403)M("read")},[b,E]=B1.useState(0);B1.useEffect(()=>{let Q1=setInterval(()=>{if(!document.hidden)E((Y1)=>Y1+1)},5000);return()=>clearInterval(Q1)},[]);let[p,a]=B1.useState(0),m=L5(U,`/-/${Q}/clock`,b+p),_1=L5(U,`/-/${Q}/twins`),$1=L5(U,`/-/${Q}/branches`,p),J1=L5(U,`/-/${Q}/map`,Math.floor(b/2)),y=!($1.state==="error"&&($1.status===404||$1.status===405));if(Z)return H.jsxDEV(cV,{name:Q,token:U,twin:Z},void 0,!1,void 0,this);let u=gX.some(([Q1])=>Q1===K)?K:AV[K]??"overview",x=_1.state==="ok"?_1.data.twins.map((Q1)=>Q1.twin):[],d=(Q1)=>J1.state==="ok"?(J1.data.twins.find((Y1)=>Y1.twin===Q1)?.resources??[]).reduce((Y1,L1)=>Y1+L1.count,0):0,g=u==="vendors"&&X?X:void 0,n=()=>{M("pending"),V((Q1)=>Q1+1)};if(u==="canvas"||u==="vendors"&&!g)return H.jsxDEV(bV,{name:Q,twins:_1,session:P,retry:n,snapshot:z,back:()=>v0(Q.split("/"))},void 0,!1,void 0,this);let j=g?F0(g):gX.find(([Q1])=>Q1===u)?.[1]??"",i=(Q1)=>(Y1)=>{Y1.preventDefault(),v0([...Q.split("/"),...Q1])},q1=(Q1,Y1=gX.find(([L1])=>L1===Q1)?.[1]??Q1)=>{let L1=u===Q1&&!g;return H.jsxDEV("a",{href:`${q0}/${Q}/~/${Q1}`,"aria-current":L1?"page":void 0,className:L1?"on":void 0,onClick:i(["~",Q1]),children:Y1},void 0,!1,void 0,this)};return H.jsxDEV("div",{className:"shell",children:[H.jsxDEV("aside",{className:"side",children:[H.jsxDEV("nav",{"aria-label":`${Q} pages`,className:"side-nav",children:[H.jsxDEV(TV,{name:Q},void 0,!1,void 0,this),H.jsxDEV("p",{className:"side-group",children:"World"},void 0,!1,void 0,this),q1("overview"),y?q1("branches"):null,q1("settings"),H.jsxDEV(RV,{name:Q,snapshot:z,branches:y?$1:null,opens:O},void 0,!1,void 0,this),H.jsxDEV("p",{className:"side-group",children:"Branch"},void 0,!1,void 0,this),q1("branch"),q1("changes"),q1("changesets"),q1("activity"),H.jsxDEV("p",{className:"side-group",children:"Vendors"},void 0,!1,void 0,this),H.jsxDEV("a",{href:`${q0}/${Q}/~/canvas`,className:"all-screens",onClick:i(["~","canvas"]),children:[H.jsxDEV("span",{className:"mark","aria-hidden":"true",children:"▦"},void 0,!1,void 0,this),H.jsxDEV("span",{children:"All screens"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("ul",{className:"side-vendors",children:x.map((Q1)=>H.jsxDEV("li",{children:H.jsxDEV("a",{href:`${q0}/${Q}/~/vendors/${Q1}`,"aria-current":g===Q1?"page":void 0,className:g===Q1?"on":void 0,onClick:i(["~","vendors",Q1]),children:[H.jsxDEV(A5,{vendor:Q1},void 0,!1,void 0,this),H.jsxDEV("span",{children:F0(Q1)},void 0,!1,void 0,this),H.jsxDEV("span",{className:"count",children:d(Q1)||""},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},Q1,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("div",{className:"side-foot",children:H.jsxDEV(MR,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("div",{className:"content",children:[z?H.jsxDEV("div",{className:"snapshot",role:"region","aria-label":"Snapshot",children:[H.jsxDEV("span",{children:["You are looking at ",H.jsxDEV("strong",{children:z.parent},void 0,!1,void 0,this)," as it was at ",H.jsxDEV(h0,{iso:z.at},void 0,!1,void 0,this)," · a read-only copy (read-only snapshot) · ",z.expiresAt?Date.parse(z.expiresAt)<=Date.now()?H.jsxDEV(H.Fragment,{children:["gone since ",H.jsxDEV(h0,{iso:z.expiresAt},void 0,!1,void 0,this)]},void 0,!0,void 0,this):H.jsxDEV(H.Fragment,{children:["goes away ",H.jsxDEV(h0,{iso:z.expiresAt},void 0,!1,void 0,this)]},void 0,!0,void 0,this):"kept until you go back"]},void 0,!0,void 0,this),H.jsxDEV("button",{type:"button",onClick:()=>void B(z),children:"Return to live"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,H.jsxDEV("div",{className:"content-head",children:[H.jsxDEV("h2",{id:"world",children:[g?H.jsxDEV("span",{className:"vendor-cell",children:[H.jsxDEV(A5,{vendor:g},void 0,!1,void 0,this),j]},void 0,!0,void 0,this):j,L==="read"?H.jsxDEV(H.Fragment,{children:[" ",H.jsxDEV("span",{className:"badge read-only",title:"This token reads the World; it changes nothing",children:"Read only"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV("div",{className:"head-actions",children:[H.jsxDEV(IV,{name:Q,token:U,clock:m,canWrite:C&&!z,onChanged:()=>a((Q1)=>Q1+1),refused:v},void 0,!1,void 0,this),!z&&C&&y&&$1.state!=="loading"?H.jsxDEV(fV,{name:Q,token:U,clock:m,refused:v},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("div",{role:"region","aria-labelledby":"world",className:"panel",children:[u==="overview"?H.jsxDEV(wV,{name:Q,token:U,map:J1,vendors:x,twins:_1,session:P,branches:y?$1:null,canWrite:C&&!z,tick:b,...z?{snapshotOf:z.parent}:{}},void 0,!1,void 0,this):null,u==="branch"?H.jsxDEV(OV,{name:Q,token:U,map:J1,vendors:x,tick:b},void 0,!1,void 0,this):null,u==="vendors"?H.jsxDEV(CV,{name:Q,token:U,twins:_1,session:P,retry:n,selected:g},void 0,!1,void 0,this):null,u==="activity"&&K==="trace"?H.jsxDEV(yV,{name:Q,token:U,id:X??""},void 0,!1,void 0,this):null,u==="activity"&&K!=="trace"?H.jsxDEV(DV,{name:Q,token:U,vendors:x},void 0,!1,void 0,this):null,u==="changes"?H.jsxDEV(mV,{name:Q,token:U},void 0,!1,void 0,this):null,u==="changesets"?H.jsxDEV(xV,{name:Q,token:U,signsAs:k,canWrite:C&&!z,rooted:J1.state==="ok"?J1.data.twins.filter((Q1)=>Q1.root).map((Q1)=>Q1.twin):[],...X?{open:X}:{},refused:v},void 0,!1,void 0,this):null,u==="branches"?H.jsxDEV(PV,{name:Q,token:U,canWrite:C,branches:y?$1:null,opens:O,onBranchesChanged:()=>a((Q1)=>Q1+1),refused:v},void 0,!1,void 0,this):null,u==="settings"?H.jsxDEV(pV,{name:Q,token:U,admin:W,canWrite:C,refused:v,onRemoved:T},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function DR({text:Q}){return H.jsxDEV("button",{type:"button",className:"agent-prompt-button",onClick:()=>{navigator.clipboard?.writeText(Q).then(()=>t2("Copied the prompt: paste it into your coding agent"),()=>t2("Could not copy the prompt","error"))},children:"Copy a prompt for your coding agent"},void 0,!1,void 0,this)}function TV({name:Q}){return H.jsxDEV("details",{className:"menu connect-side",children:[H.jsxDEV("summary",{className:"button connect-button",children:"Connect"},void 0,!1,void 0,this),o2()?H.jsxDEV("div",{className:"popover",children:[H.jsxDEV("p",{children:"Point your app's SDKs here, with a key made on the platform; its calls to these vendors land in this World:"},void 0,!1,void 0,this),H.jsxDEV("pre",{children:[w6,"/",Q,"/<vendor>"]},void 0,!0,void 0,this),H.jsxDEV("a",{className:"button",href:`${o2()}/${encodeURIComponent(Q.split("/")[0]??"")}`,children:"Make a key on the platform"},void 0,!1,void 0,this),H.jsxDEV("p",{className:"mode",children:["Or push a World from your machine: ",H.jsxDEV("code",{children:["volter remote add origin ",Q]},void 0,!0,void 0,this),", then ",H.jsxDEV("code",{children:"volter world push"},void 0,!1,void 0,this),"."]},void 0,!0,void 0,this),H.jsxDEV(DR,{text:mX({platform:o2(),world:Q})},void 0,!1,void 0,this)]},void 0,!0,void 0,this):H.jsxDEV("div",{className:"popover",children:[H.jsxDEV("p",{children:"Run your app in this World; its calls to these vendors land here:"},void 0,!1,void 0,this),H.jsxDEV("pre",{children:"volter world run -- npm start"},void 0,!1,void 0,this),H.jsxDEV("p",{className:"mode",children:["Or point an SDK at ",H.jsxDEV("code",{children:[w6,"/",Q,"/<vendor>"]},void 0,!0,void 0,this)," with the token in ",H.jsxDEV("code",{children:".volter/token"},void 0,!1,void 0,this),"."]},void 0,!0,void 0,this),H.jsxDEV(DR,{text:mX()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function RV({name:Q,snapshot:U,branches:Z,opens:K}){let X=(B)=>B.split("/").pop()??B,W=U?.parent??Q,z=Z?.state==="ok"?Z.data.branches.filter((B)=>B.name!==Q):[];return H.jsxDEV("details",{className:"menu branch-picker",children:[H.jsxDEV("summary",{children:[H.jsxDEV("svg",{className:"branch-glyph",viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true",children:H.jsxDEV("path",{fill:"currentColor",d:"M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm0 2.122a2.25 2.25 0 1 0-1.5 0v5.256a2.25 2.25 0 1 0 1.5 0V9.5h4.25A2.25 2.25 0 0 0 11.5 7.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75H5V5.372ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm6.5-9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("span",{className:"branch-name",children:U?X(Q):Z?.state==="ok"&&Z.data.checkedOut||X(W)},void 0,!1,void 0,this),H.jsxDEV("span",{className:"badge",children:U?"snapshot":"live"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("div",{className:"popover",children:[H.jsxDEV("p",{className:"mode",children:"Branch"},void 0,!1,void 0,this),H.jsxDEV("ul",{className:"branch-list",children:[H.jsxDEV("li",{children:H.jsxDEV("a",{href:`${q0}/${W}`,"aria-current":!U?"page":void 0,onClick:(B)=>{B.preventDefault(),v0(W.split("/"))},children:[X(W)," ",H.jsxDEV("span",{className:"mode",children:"live"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),U?H.jsxDEV("li",{children:H.jsxDEV("a",{href:`${q0}/${Q}`,"aria-current":"page",onClick:(B)=>B.preventDefault(),children:[X(Q)," ",H.jsxDEV("span",{className:"mode",children:["as of ",H.jsxDEV(h0,{iso:U.at},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,z.map((B)=>H.jsxDEV("li",{children:K(B.name)?H.jsxDEV("a",{href:`${q0}/${B.name}`,onClick:(O)=>{O.preventDefault(),cX(B.name,B.name.split("/"))},children:[X(B.name)," ",H.jsxDEV("span",{className:"mode",children:B.at?.instant?H.jsxDEV(H.Fragment,{children:["as of ",H.jsxDEV(h0,{iso:B.at.instant},void 0,!1,void 0,this)]},void 0,!0,void 0,this):"copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):H.jsxDEV("span",{className:"mode",title:"Its token was handed to whoever made it",children:X(B.name)},void 0,!1,void 0,this)},B.name,!1,void 0,this))]},void 0,!0,void 0,this),Z?.state==="ok"&&(Z.data.named?.length??0)>1?H.jsxDEV(H.Fragment,{children:[H.jsxDEV("p",{className:"mode",children:"This World's branches"},void 0,!1,void 0,this),H.jsxDEV("ul",{className:"branch-list",children:Z.data.named.map((B)=>H.jsxDEV("li",{children:H.jsxDEV("span",{"aria-current":B.name===Z.data.checkedOut?"true":void 0,children:[B.name," ",H.jsxDEV("span",{className:"mode",children:B.name===Z.data.checkedOut?"served here":H.jsxDEV("code",{children:["volter world checkout ",B.name]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},B.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,Z?.state==="ok"&&z.length===0&&!U&&(Z.data.named?.length??0)<=1?H.jsxDEV("p",{className:"mode",children:"No branches yet. “View an earlier moment…” opens one."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function OV({name:Q,token:U,map:Z,vendors:K,tick:X}){let W=L5(U,`/-/${Q}/timeline?limit=500`,Math.floor(X/3)),z=Z.state==="ok"?Z.data.twins:[],B=(P)=>(C)=>{C.preventDefault(),v0([...Q.split("/"),...P])},O=Date.now(),T=24,R=3600000,L=W.state==="ok"?W.data.entries:[],M=K.map((P)=>{let C=Array(24).fill(0);for(let v of L){if(v.twin!==P)continue;let b=Date.parse(v.entry.occurredAt),E=23-Math.floor((O-b)/3600000);if(E>=0&&E<24)C[E]+=1}return{vendor:P,counts:C}}),f=Array(24).fill(0).map((P,C)=>M.reduce((v,b)=>v+b.counts[C],0)),I=Math.max(1,...f),D=720,V=160,k=30,h=["var(--volter-data-base)","#7c5cff","#e3572b","#1f9d6b","#d9a400","#2b7de3","#c2417e","#6b7280","#0ea5a4"];return H.jsxDEV(H.Fragment,{children:[H.jsxDEV("div",{className:"block",children:H.jsxDEV("table",{className:"dense services","aria-label":"Vendors on this branch",children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"Vendor"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Details"},void 0,!1,void 0,this),H.jsxDEV("th",{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:K.map((P)=>{let C=z.find((b)=>b.twin===P),v=[...C?.resources??[]].filter((b)=>b.count>0).sort((b,E)=>E.count-b.count);return H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:H.jsxDEV("span",{className:"vendor-cell",children:[H.jsxDEV(A5,{vendor:P},void 0,!1,void 0,this),H.jsxDEV("a",{href:`${q0}/${Q}/~/vendors/${P}`,onClick:B(["~","vendors",P]),children:F0(P)},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:C?.root?"badge rooted":"badge",children:C?.root?"connected":"stand-in"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{className:"mode",children:v.length?v.slice(0,4).map((b)=>J9(b.count,b.type)).join(" · "):"nothing yet"},void 0,!1,void 0,this),H.jsxDEV("td",{className:"num",children:C?.mirror?H.jsxDEV("a",{href:`${q0}/${Q}/~/vendors/${P}`,onClick:B(["~","vendors",P]),children:"Screens"},void 0,!1,void 0,this):null},void 0,!1,void 0,this)]},P,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("div",{className:"block chart-block",children:[H.jsxDEV("div",{className:"block-head",children:[H.jsxDEV("h3",{children:"Activity, last 24 hours"},void 0,!1,void 0,this),H.jsxDEV("a",{href:`${q0}/${Q}/~/activity`,onClick:B(["~","activity"]),children:"All activity"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV(B5,{load:W,what:"the activity"},void 0,!1,void 0,this),W.state==="ok"?H.jsxDEV("div",{className:"pad",children:[H.jsxDEV("svg",{viewBox:"0 0 720 182",className:"chart",role:"img","aria-label":`Writes per hour over the last day: ${f.reduce((P,C)=>P+C,0)} in all`,children:[[0.5,1].map((P)=>H.jsxDEV("line",{x1:0,x2:720,y1:160-P*160,y2:160-P*160,className:"grid"},P,!1,void 0,this)),H.jsxDEV("line",{x1:0,x2:720,y1:160,y2:160,className:"axis"},void 0,!1,void 0,this),f.map((P,C)=>{let v=160;return H.jsxDEV("g",{children:M.map((b,E)=>{let p=b.counts[C]/I*152;if(p===0)return null;return v-=p,H.jsxDEV("rect",{x:C*30+2,y:v,width:26,height:p,fill:h[E%h.length],rx:2,children:H.jsxDEV("title",{children:`${F0(b.vendor)}: ${b.counts[C]} in the hour ${23-C===0?"now":`${23-C}h ago`}`},void 0,!1,void 0,this)},b.vendor,!1,void 0,this)})},C,!1,void 0,this)}),[0,6,12,18,23].map((P)=>H.jsxDEV("text",{x:P*30+15,y:176,className:"tick",children:23-P===0?"now":`-${23-P}h`},P,!1,void 0,this))]},void 0,!0,void 0,this),H.jsxDEV("ul",{className:"legend",children:M.filter((P)=>P.counts.some((C)=>C>0)).map((P)=>H.jsxDEV("li",{children:[H.jsxDEV("span",{className:"swatch",style:{background:h[K.indexOf(P.vendor)%h.length]}},void 0,!1,void 0,this),F0(P.vendor)," ",H.jsxDEV("span",{className:"mode",children:P.counts.reduce((C,v)=>C+v,0)},void 0,!1,void 0,this)]},P.vendor,!0,void 0,this))},void 0,!1,void 0,this),f.every((P)=>P===0)?H.jsxDEV("p",{className:"mode",children:"Nothing was written in the last day. Run your app in this World and its calls show up here."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var pX=0.2;function wV({name:Q,token:U,map:Z,vendors:K,twins:X,session:W,branches:z,canWrite:B,tick:O,snapshotOf:T}){let R=L5(U,`/-/${Q}/diff`,Math.floor(O/2)),L=L5(U,`/-/${Q}/timeline?limit=8`,O),M=Z.state==="ok"?Z.data.twins:[],f=L.state==="ok"?L.data.entries:[],I=X.state==="ok"?X.data.twins.filter((P)=>P.mirror).map((P)=>P.twin):[],D=(P)=>(C)=>{C.preventDefault(),v0([...Q.split("/"),...P])},V=(P)=>{let C=[...M.find((v)=>v.twin===P)?.resources??[]].filter((v)=>v.count>0).sort((v,b)=>b.count-v.count);return C.length?C.slice(0,2).map((v)=>J9(v.count,v.type)).join(" · "):"empty"},k=R.state==="ok"?R.data.changes.length:null,h=z?.state==="ok"?z.data.branches:[];return H.jsxDEV("div",{className:"dash",children:[H.jsxDEV("section",{className:"block dash-screens","aria-labelledby":"screens-head",children:[H.jsxDEV("div",{className:"block-head",children:[H.jsxDEV("h3",{id:"screens-head",children:["Screens ",H.jsxDEV("span",{className:"badge live",children:"live"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("span",{className:"mode",children:[K.length," vendor",K.length===1?"":"s",k!==null?H.jsxDEV(H.Fragment,{children:[" · ",H.jsxDEV("a",{href:`${q0}/${Q}/~/changes`,onClick:D(["~","changes"]),children:[k," change",k===1?"":"s"," since start"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV("a",{className:"button",href:`${q0}/${Q}/~/canvas`,onClick:D(["~","canvas"]),children:"Open all screens"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W.state==="ok"?H.jsxDEV("ul",{className:"thumbs",children:K.map((P)=>H.jsxDEV("li",{children:H.jsxDEV("a",{href:`${q0}/${Q}/~/vendors/${P}`,onClick:D(["~","vendors",P]),"aria-label":`${F0(P)}'s screens`,children:[H.jsxDEV("span",{className:"thumb",children:[I.includes(P)?H.jsxDEV("iframe",{title:`${F0(P)} preview`,src:D8(Q,P),loading:"lazy",tabIndex:-1,style:{width:`${100/pX}%`,height:`${100/pX}%`,transform:`scale(${pX})`}},void 0,!1,void 0,this):H.jsxDEV("span",{className:"thumb-none",children:"No screens"},void 0,!1,void 0,this),H.jsxDEV("span",{className:M.find((C)=>C.twin===P)?.root?"badge rooted thumb-status":"badge thumb-status",children:M.find((C)=>C.twin===P)?.root?"connected":"stand-in"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("span",{className:"thumb-foot",children:[H.jsxDEV(A5,{vendor:P},void 0,!1,void 0,this),H.jsxDEV("b",{children:F0(P)},void 0,!1,void 0,this),H.jsxDEV("span",{className:"mode",children:V(P)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},P,!1,void 0,this))},void 0,!1,void 0,this):H.jsxDEV("p",{className:"mode pad",children:W.state==="error"?`The World did not open its screens: ${W.error}`:"Opening…"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("div",{className:"dash-side",children:z?H.jsxDEV("section",{className:"block","aria-labelledby":"branches-head",children:[H.jsxDEV("div",{className:"block-head",children:[H.jsxDEV("h3",{id:"branches-head",children:"Branches"},void 0,!1,void 0,this),H.jsxDEV("a",{href:`${q0}/${Q}/~/branches`,onClick:D(["~","branches"]),children:"All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("ul",{className:"mini-feed",children:[H.jsxDEV("li",{children:[H.jsxDEV("svg",{className:"branch-glyph",viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true",children:H.jsxDEV("path",{fill:"currentColor",d:"M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm0 2.122a2.25 2.25 0 1 0-1.5 0v5.256a2.25 2.25 0 1 0 1.5 0V9.5h4.25A2.25 2.25 0 0 0 11.5 7.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75H5V5.372ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm6.5-9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("span",{className:"mini-what",children:T?H.jsxDEV(H.Fragment,{children:[H.jsxDEV("b",{children:Q.split("/")[1]},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"badge",children:"snapshot"},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:["of ",T.split("/")[1]]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):H.jsxDEV(H.Fragment,{children:[H.jsxDEV("b",{children:Q.split("/")[1]},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"badge",children:"live"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),h.slice(0,3).map((P)=>H.jsxDEV("li",{children:[H.jsxDEV("svg",{className:"branch-glyph",viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true",children:H.jsxDEV("path",{fill:"currentColor",d:"M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm0 2.122a2.25 2.25 0 1 0-1.5 0v5.256a2.25 2.25 0 1 0 1.5 0V9.5h4.25A2.25 2.25 0 0 0 11.5 7.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75H5V5.372ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm6.5-9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("span",{className:"mini-what",children:[P.name.split("/").pop()," ",H.jsxDEV("span",{className:"mode",children:P.at?.instant?`as of ${new Date(P.at.instant).toLocaleString()}`:"copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},P.name,!0,void 0,this))]},void 0,!0,void 0,this),B?H.jsxDEV("p",{className:"mode pad",children:"“View an earlier moment…” above opens a branch as the World was then."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null},void 0,!1,void 0,this),H.jsxDEV("section",{className:"block dash-activity","aria-labelledby":"activity-head",children:[H.jsxDEV("div",{className:"block-head",children:[H.jsxDEV("h3",{id:"activity-head",children:"Recent activity"},void 0,!1,void 0,this),H.jsxDEV("a",{href:`${q0}/${Q}/~/activity`,onClick:D(["~","activity"]),children:"View all"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV(B5,{load:L,what:"the activity"},void 0,!1,void 0,this),L.state==="ok"&&f.length===0?H.jsxDEV("div",{className:"empty-block",children:[H.jsxDEV("strong",{children:"No activity yet"},void 0,!1,void 0,this),H.jsxDEV("span",{className:"mode",children:"Run your app in this World and its calls show up here."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):H.jsxDEV("ul",{className:"mini-feed",children:f.map((P)=>{let C=n5(P.entry);return H.jsxDEV("li",{children:[H.jsxDEV(A5,{vendor:P.twin},void 0,!1,void 0,this),H.jsxDEV("span",{className:"mini-what",children:[H.jsxDEV("strong",{children:C.what},void 0,!1,void 0,this),C.label?H.jsxDEV("span",{className:"mode",children:[" ",C.label]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV("span",{className:"mode num",title:P.entry.occurredAt,children:dq(P.entry.occurredAt)},void 0,!1,void 0,this)]},E4(P),!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function IV({name:Q,token:U,clock:Z,canWrite:K,onChanged:X,refused:W}){let[z,B]=B1.useState(!1),[O,T]=B1.useState(""),[R,L]=B1.useState(""),[M,f]=B1.useState(null),[I,D]=B1.useState(!1),V=Z.state==="ok"?Z.data:null,k=async(v,b,E)=>{D(!0),f(null);try{let p=await X0(U,`/-/${Q}/${b}`,{method:b==="clock"?"PUT":"POST",body:JSON.stringify(E)});if(!p.ok){W(p),f({ok:!1,text:await z5(p)});return}let a=await p.json();f({ok:!0,text:`${v} — the World is at ${new Date(a.at).toLocaleString()}`}),B(!1),X()}catch(p){f({ok:!1,text:`the World did not answer: ${p instanceof Error?p.message:String(p)}`})}finally{D(!1)}},h=(v)=>{v.preventDefault();let b=new Date(O);if(Number.isNaN(b.getTime())){f({ok:!1,text:"Pick a date and time."});return}if(V&&b.getTime()<Date.parse(V.at)){f({ok:!1,text:`The World's clock only moves forward: pick a time after ${new Date(V.at).toLocaleString()}.`});return}k("Clock set","clock",{at:b.toISOString()})},P=(v,b)=>{k(`Advanced ${b}`,"clock/advance",{by:v})},C=[["1h","1 hour"],["1d","1 day"],["7d","1 week"],["30d","30 days"]];return H.jsxDEV("div",{className:`clock${V?.frozen?" frozen":""}`,role:"region","aria-label":"World clock",children:[H.jsxDEV("p",{className:"clock-now",children:Z.state==="loading"?H.jsxDEV("span",{className:"mode",children:"clock…"},void 0,!1,void 0,this):Z.state==="error"?H.jsxDEV("span",{className:"mode",children:["Clock: ",Z.error]},void 0,!0,void 0,this):V.frozen?H.jsxDEV(H.Fragment,{children:[H.jsxDEV("span",{className:"badge",children:"Simulation"},void 0,!1,void 0,this)," World time ",H.jsxDEV("strong",{children:H.jsxDEV(h0,{iso:V.at},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):H.jsxDEV(H.Fragment,{children:["World time ",H.jsxDEV("strong",{children:H.jsxDEV(h0,{iso:V.at},void 0,!1,void 0,this)},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:"· real time"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),K&&V?H.jsxDEV("details",{className:"clock-more",children:[H.jsxDEV("summary",{children:"Simulate time…"},void 0,!1,void 0,this),H.jsxDEV("div",{className:"popover",children:[H.jsxDEV("p",{className:"mode",children:"Move this World's clock forward to see what happens later: renewals, expiries, scheduled sends. Like a test clock, it only moves forward; to look back, use “View an earlier moment…”."},void 0,!1,void 0,this),H.jsxDEV("div",{className:"clock-controls",children:[H.jsxDEV("button",{type:"button","aria-expanded":z,onClick:()=>{B(!z),T(U9(SR(V.at))),f(null)},children:"Set time…"},void 0,!1,void 0,this),H.jsxDEV("div",{role:"group","aria-label":"Advance the clock",className:"advance",children:[H.jsxDEV("span",{className:"mode",children:"Advance"},void 0,!1,void 0,this),C.map(([v,b])=>H.jsxDEV("button",{type:"button","aria-label":`Advance ${b}`,disabled:I||!V.frozen,title:V.frozen?void 0:"Set the time first: advancing moves a set clock",onClick:()=>P(v,b),children:b},v,!1,void 0,this)),H.jsxDEV("form",{className:"inline",onSubmit:(v)=>{if(v.preventDefault(),!/^\d+[smhd]$/.test(R.trim())){f({ok:!1,text:"Advance by a number and a unit: 90m, 12h, 3d."});return}P(R.trim(),`by ${R.trim()}`)},children:[H.jsxDEV("label",{className:"sr",children:["Advance by ",H.jsxDEV("input",{name:"advanceBy",value:R,onChange:(v)=>L(v.target.value),placeholder:"90m, 12h, 3d",size:9,disabled:!V.frozen},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("button",{type:"submit",disabled:I||!V.frozen,children:"Advance"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!V.frozen?H.jsxDEV("p",{className:"mode",children:"The World runs on real time. Set a time to start simulating; then advance it."},void 0,!1,void 0,this):null,z?H.jsxDEV("form",{className:"inline","aria-label":"Set the World time",onSubmit:h,noValidate:!0,children:[H.jsxDEV("label",{children:["World time ",H.jsxDEV("input",{name:"worldTime",type:"datetime-local",value:O,min:U9(SR(V.at)),onChange:(v)=>T(v.target.value),required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("span",{className:"mode",children:Intl.DateTimeFormat().resolvedOptions().timeZone},void 0,!1,void 0,this),H.jsxDEV("button",{type:"submit",disabled:I,children:"Set time"},void 0,!1,void 0,this),H.jsxDEV("button",{type:"button",onClick:()=>B(!1),children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null,M?H.jsxDEV("p",{role:M.ok?"status":"alert",children:M.text},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function fV({name:Q,token:U,clock:Z,refused:K}){let[X,W]=B1.useState(!1),[z,B]=B1.useState(""),[O,T]=B1.useState(null),[R,L]=B1.useState(!1),M=Z.state==="ok"?Z.data.at:new Date().toISOString(),f=B1.useRef(null);return B1.useEffect(()=>{if(!X)return;let D=(k)=>{if(k.key==="Escape"&&!document.querySelector("dialog[open]"))W(!1),f.current?.querySelector("button")?.focus()},V=(k)=>{if(!f.current?.contains(k.target))W(!1)};return document.addEventListener("keydown",D),document.addEventListener("click",V),()=>{document.removeEventListener("keydown",D),document.removeEventListener("click",V)}},[X]),H.jsxDEV("div",{className:"as-of",ref:f,children:[H.jsxDEV("button",{type:"button","aria-expanded":X,title:"Open a read-only copy of this World as it was at a moment you pick",onClick:()=>{W(!X),B(U9(M)),T(null)},children:"View an earlier moment…"},void 0,!1,void 0,this),X?H.jsxDEV("form",{className:"inline","aria-label":"View the World as of a past moment",onSubmit:async(D)=>{D.preventDefault(),T(null);let V=new Date(z);if(Number.isNaN(V.getTime())){T("Pick a date and time.");return}if(V.getTime()>Date.parse(M)){T(`That is after the World's present (${new Date(M).toLocaleString()}); a snapshot looks back.`);return}L(!0);try{let k=await X0(U,`/-/${Q}/branches`,{method:"POST",body:JSON.stringify({at:{instant:V.toISOString()},ttl:3600})});if(!k.ok){K(k),T(await z5(k));return}let h=await k.json();rX({name:h.name,parent:Q,token:h.token,readToken:h.readToken,at:V.toISOString(),expiresAt:h.expiresAt??null,parentOrigin:B0,made:!0});let P=CJ(h.origin)?.origin;if(P&&P!==B0){iX(P,h.readToken,h.name,`${q0}/${h.name}`);return}v0(h.name.split("/"))}catch(k){T(`the World did not answer: ${k instanceof Error?k.message:String(k)}`)}finally{L(!1)}},noValidate:!0,children:[H.jsxDEV("label",{children:["As of ",H.jsxDEV("input",{name:"asOf",type:"datetime-local",value:z,max:U9(M),onChange:(D)=>B(D.target.value),required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("button",{type:"submit",disabled:R,children:R?"Opening…":"Open snapshot"},void 0,!1,void 0,this),H.jsxDEV("span",{className:"mode",children:"Opens a read-only copy of this World as it was then; the copy goes away within the hour."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,O?H.jsxDEV("p",{role:"alert",children:O},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function PV({name:Q,token:U,canWrite:Z,branches:K,opens:X,onBranchesChanged:W,refused:z}){let B=L5(U,`/-/${Q}/map`),[O,T]=B1.useState(null),R=async(M)=>{if(!await o5({title:`Delete the branch ${M}?`,body:"Whoever holds its tokens loses it, and its history goes with it.",action:"Delete branch",danger:!0}))return;let f=await X0(U,`/-/${Q}/branches/${M}`,{method:"DELETE"}).catch((I)=>I);if(f instanceof Error){T(`delete ${M}: the World did not answer (${f.message})`);return}if(!f.ok){z(f),T(`delete ${M}: ${await z5(f)}`);return}PJ(M),T(`deleted ${M}`),W()},L=B.state==="ok"?B.data.twins.reduce((M,f)=>M+f.resources.reduce((I,D)=>I+D.count,0),0):0;if(K)return H.jsxDEV(NV,{name:Q,token:U,canWrite:Z,branches:K,opens:X,note:O,remove:R,onChanged:W,refused:z},void 0,!1,void 0,this);return H.jsxDEV(H.Fragment,{children:[H.jsxDEV("h3",{children:"Map"},void 0,!1,void 0,this),H.jsxDEV(B5,{load:B,what:"the World's map"},void 0,!1,void 0,this),B.state==="ok"?B.data.twins.length===0?H.jsxDEV("p",{children:"This World holds no twins."},void 0,!1,void 0,this):H.jsxDEV(H.Fragment,{children:[H.jsxDEV("p",{className:"mode",children:[B.data.twins.length," twin",B.data.twins.length===1?"":"s"," · ",L," resource",L===1?"":"s"]},void 0,!0,void 0,this),H.jsxDEV("ul",{className:"map","aria-label":"Twins in this World",children:B.data.twins.map((M)=>{let f=[...M.resources].sort((I,D)=>D.count-I.count);return H.jsxDEV("li",{className:"card","aria-labelledby":`map-${M.twin}`,children:[H.jsxDEV("div",{className:"card-head",children:[H.jsxDEV("h4",{id:`map-${M.twin}`,className:"vendor",children:M.twin},void 0,!1,void 0,this),H.jsxDEV("span",{className:M.root?"badge rooted":"badge",children:M.root?"rooted":"simulated"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("p",{className:"mode",children:[M.root?H.jsxDEV(H.Fragment,{children:["rooted at ",H.jsxDEV("code",{children:M.root.url},void 0,!1,void 0,this)]},void 0,!0,void 0,this):"simulated — no vendor behind it"," · position ",M.position]},void 0,!0,void 0,this),f.length===0?H.jsxDEV("p",{className:"mode",children:"Holds nothing yet."},void 0,!1,void 0,this):H.jsxDEV("ul",{className:"resources",children:[f.slice(0,6).map((I)=>H.jsxDEV("li",{children:[H.jsxDEV("span",{children:I.type},void 0,!1,void 0,this)," ",H.jsxDEV("strong",{children:I.count},void 0,!1,void 0,this)]},I.type,!0,void 0,this)),f.length>6?H.jsxDEV("li",{className:"mode",children:["+",f.length-6," more types"]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV("p",{className:"card-actions",children:[M.mirror?H.jsxDEV("a",{className:"button",href:D8(Q,M.twin),target:"_blank",rel:"noopener noreferrer",children:["Open ",M.twin]},void 0,!0,void 0,this):H.jsxDEV("span",{className:"mode",children:"no mirror"},void 0,!1,void 0,this),H.jsxDEV("a",{href:`${q0}/${Q}/${M.twin}`,"aria-label":`Log and tree of ${M.twin}`,onClick:(I)=>{I.preventDefault(),v0([...Q.split("/"),M.twin])},children:"Log & tree"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},M.twin,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function NV({name:Q,token:U,canWrite:Z,branches:K,opens:X,note:W,remove:z,onChanged:B,refused:O}){let T=(g)=>g.split("/").pop()??g,R=K.state==="ok"?K.data.branches:[],[L,M]=B1.useState(!1),[f,I]=B1.useState(!1),[D,V]=B1.useState(null),[k,h]=B1.useState(""),[P,C]=B1.useState("now"),[v,b]=B1.useState(""),[E,p]=B1.useState("24"),[a,m]=B1.useState(null),[_1,$1]=B1.useState(null),J1=async(g)=>{m(g),$1(null);let n=await X0(U,`/-/${Q}/branches/${encodeURIComponent(g)}/serve`,{method:"POST"}).catch(()=>null);if(n?.ok){location.reload();return}m(null),$1(n?(await n.json().catch(()=>null))?.error??`${n.status}`:`${B0} did not answer`)},y=async(g,n)=>{let j=await X0(U,`/-/${Q}/branches`,{method:"POST",body:JSON.stringify(g)}).catch(()=>null);if(!j)return`${B0} did not answer`;if(!j.ok)return O(j),await z5(j);let i=await j.json();return rX({name:i.name,parent:Q,token:i.token??"",readToken:i.readToken,at:n,expiresAt:i.expiresAt??null,parentOrigin:B0,...i.origin?{origin:i.origin}:{}}),i},u=async(g)=>{g.preventDefault(),V(null);let n=P==="at"?new Date(v):null;if(n&&Number.isNaN(n.getTime())){V("Pick a date and time, or make it as of now.");return}if(n&&n.getTime()>Date.now()){V("A branch is made as of now or a moment before it.");return}let j=Math.round(Number(E)*3600);I(!0);let i=await y({ttl:j,...n?{at:{instant:n.toISOString()}}:{live:!0},...k.trim()?{label:k.trim()}:{}},(n??new Date).toISOString());if(I(!1),typeof i==="string"){V(i);return}M(!1),h(""),t2(`Made ${T(i.name)}`),B()},x=async(g)=>{if(!await o5({title:`Reset ${T(g.name)} to ${T(Q)}?`,body:`A fresh copy of ${T(Q)} as it is now replaces it, with the same label and the time it had left; what was written to it goes. The copy has a new address and new keys: an app, a CI job or a pull request's preview that holds this branch's must be given the new one.`,action:"Reset branch",danger:!0}))return;let n=g.expiresAt?Math.max(3600,Math.round((Date.parse(g.expiresAt)-Date.now())/1000)):86400,j=T(g.name).startsWith(`${T(Q)}-`)?T(g.name).slice(T(Q).length+1):"",i=/^([a-z0-9][a-z0-9-]*)-[0-9a-f]{4}$/.exec(j)?.[1],q1=await y({ttl:n,live:!0,...i&&!i.startsWith("at-")?{label:i}:{}},new Date().toISOString());if(typeof q1==="string"){t2(`Reset ${T(g.name)}: ${q1}`,"error");return}let Q1=await X0(U,`/-/${Q}/branches/${g.name}`,{method:"DELETE"}).catch(()=>null);if(Q1?.ok)PJ(g.name);t2(Q1?.ok?`Reset: ${T(q1.name)} is ${T(Q)} as it is now`:`Made ${T(q1.name)}; ${T(g.name)} was not removed`),B()},d=(g)=>[...X(g.name)?[{label:"Compare with parent",onSelect:()=>cX(g.name,[...g.name.split("/"),"~","changes"])}]:[],...Z?[{label:"Reset to parent…",onSelect:()=>void x(g)},{label:"Delete…",danger:!0,onSelect:()=>void z(g.name)}]:[]];return H.jsxDEV("div",{"aria-labelledby":"branches",children:[H.jsxDEV("div",{className:"branches-head",children:[H.jsxDEV("p",{className:"lede",children:["Branch this World to look at it as it was, or to change it without touching ",H.jsxDEV("b",{children:T(Q)},void 0,!1,void 0,this),". A branch made here opens read-only in this tab; its parent removes it."]},void 0,!0,void 0,this),Z?H.jsxDEV("button",{type:"button",className:"primary",onClick:()=>{V(null),b(U9(new Date().toISOString())),M(!0)},children:"New branch"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),W?H.jsxDEV("p",{role:"status",children:W},void 0,!1,void 0,this):null,H.jsxDEV(B5,{load:K,what:"the branches"},void 0,!1,void 0,this),K.state==="ok"?H.jsxDEV("div",{className:"block",children:[H.jsxDEV("table",{className:"dense","aria-label":"Branches",children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{id:"branches",children:"Branch"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Parent"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"As of"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Made"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Goes away"},void 0,!1,void 0,this),H.jsxDEV("th",{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:[H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:[H.jsxDEV("b",{children:K.data.checkedOut??T(Q)},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"badge",children:K.data.checkedOut?"served here":"default"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("td",{className:"mode",children:"—"},void 0,!1,void 0,this),H.jsxDEV("td",{className:"mode",children:"live"},void 0,!1,void 0,this),H.jsxDEV("td",{className:"mode",children:"—"},void 0,!1,void 0,this),H.jsxDEV("td",{className:"mode",children:"kept"},void 0,!1,void 0,this),H.jsxDEV("td",{},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R.map((g)=>{let n=d(g);return H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:H.jsxDEV("b",{children:T(g.name)},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:T(Q)},void 0,!1,void 0,this),H.jsxDEV("td",{children:g.at?.instant?H.jsxDEV(h0,{iso:g.at.instant},void 0,!1,void 0,this):"when it was made"},void 0,!1,void 0,this),H.jsxDEV("td",{children:H.jsxDEV(h0,{iso:g.createdAt},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:g.expiresAt?H.jsxDEV(h0,{iso:g.expiresAt},void 0,!1,void 0,this):"kept"},void 0,!1,void 0,this),H.jsxDEV("td",{className:"num row-actions",children:[X(g.name)?H.jsxDEV("button",{type:"button","aria-label":`Open ${g.name}`,onClick:()=>cX(g.name,g.name.split("/")),children:"Open"},void 0,!1,void 0,this):H.jsxDEV("span",{className:"mode",title:"Its token was handed to whoever made it",children:"opened by whoever made it"},void 0,!1,void 0,this),n.length?H.jsxDEV(xX,{label:`More for ${T(g.name)}`,items:n},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},g.name,!0,void 0,this)})]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),R.length===0?H.jsxDEV("p",{className:"mode pad",children:"No snapshots yet."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null,K.state==="ok"&&(K.data.named?.length??0)>0?H.jsxDEV(H.Fragment,{children:[H.jsxDEV("p",{className:"lede",children:["This World's own branches (",H.jsxDEV("code",{children:"volter world branch"},void 0,!1,void 0,this),"). One runs at a time; ",K.data.canServe?H.jsxDEV(H.Fragment,{children:"“Serve here” stops this one's twins and serves that one in its place."},void 0,!1,void 0,this):H.jsxDEV(H.Fragment,{children:["this host serves one of them; another is served by ",H.jsxDEV("code",{children:"volter world checkout <branch>"},void 0,!1,void 0,this)," where the World lives, then serving again."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_1?H.jsxDEV("p",{role:"alert",children:_1},void 0,!1,void 0,this):null,H.jsxDEV("div",{className:"block",children:H.jsxDEV("table",{className:"dense","aria-label":"World branches",children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"Branch"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"State"},void 0,!1,void 0,this),H.jsxDEV("th",{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:K.data.named.map((g)=>H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:[H.jsxDEV("b",{children:g.name},void 0,!1,void 0,this),g.name===K.data.checkedOut?H.jsxDEV(H.Fragment,{children:[" ",H.jsxDEV("span",{className:"badge",children:"served here"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV("td",{className:"mode",children:g.running?"running":"stopped"},void 0,!1,void 0,this),H.jsxDEV("td",{className:"num row-actions",children:Z&&K.data.canServe&&g.name!==K.data.checkedOut?H.jsxDEV("button",{type:"button",disabled:a!==null,onClick:()=>void J1(g.name),children:a===g.name?"Switching…":"Serve here"},void 0,!1,void 0,this):null},void 0,!1,void 0,this)]},g.name,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,H.jsxDEV(S8,{open:L,onClose:()=>{if(!f)M(!1)},title:`New branch of ${T(Q)}`,footer:H.jsxDEV(H.Fragment,{children:[H.jsxDEV("button",{type:"button",onClick:()=>M(!1),disabled:f,children:"Cancel"},void 0,!1,void 0,this),H.jsxDEV("button",{type:"submit",form:"new-branch",className:"primary",disabled:f,children:f?"Making…":"Make branch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:H.jsxDEV("form",{id:"new-branch",onSubmit:(g)=>void u(g),className:"stack",children:[H.jsxDEV("label",{children:[H.jsxDEV("span",{children:["Name ",H.jsxDEV("span",{className:"mode",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("input",{name:"branchLabel",value:k,onChange:(g)=>h(g.target.value.toLowerCase()),placeholder:"checkout-flow",pattern:"[a-z0-9][a-z0-9-]{0,23}",maxLength:24},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("fieldset",{className:"choice",children:[H.jsxDEV("legend",{children:"As of"},void 0,!1,void 0,this),H.jsxDEV("label",{className:"check",children:[H.jsxDEV("input",{type:"radio",name:"branchWhen",checked:P==="now",onChange:()=>C("now")},void 0,!1,void 0,this)," ",H.jsxDEV("span",{children:"Now: the World as it is, its clock running on"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("label",{className:"check",children:[H.jsxDEV("input",{type:"radio",name:"branchWhen",checked:P==="at",onChange:()=>C("at")},void 0,!1,void 0,this)," ",H.jsxDEV("span",{children:"A moment before now: the World as it was then, its clock stopped there"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),P==="at"?H.jsxDEV("input",{type:"datetime-local","aria-label":"As of",value:v,max:U9(new Date().toISOString()),onChange:(g)=>b(g.target.value)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV("label",{children:[H.jsxDEV("span",{children:"Goes away after"},void 0,!1,void 0,this),H.jsxDEV("select",{name:"branchLife",value:E,onChange:(g)=>p(g.target.value),children:[H.jsxDEV("option",{value:"1",children:"1 hour"},void 0,!1,void 0,this),H.jsxDEV("option",{value:"24",children:"1 day"},void 0,!1,void 0,this),H.jsxDEV("option",{value:"72",children:"3 days"},void 0,!1,void 0,this),H.jsxDEV("option",{value:"168",children:"7 days"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),D?H.jsxDEV("p",{role:"alert",children:D},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function CV({name:Q,token:U,twins:Z,session:K,retry:X,selected:W}){let z=L5(U,`/-/${Q}/map`),B=Z.state==="ok"?Z.data.twins:[],O=(L)=>{let M=z.state==="ok"?z.data.twins.find((I)=>I.twin===L):void 0;if(!M)return"";let f=[...M.resources].filter((I)=>I.count>0).sort((I,D)=>D.count-I.count);return f.length===0?"nothing yet":f.slice(0,3).map((I)=>J9(I.count,I.type)).join(" · ")+(f.length>3?" · …":"")},T=(L)=>z.state==="ok"?z.data.twins.find((M)=>M.twin===L)?.root?.url??null:null,R=B.find((L)=>L.twin===W);if(!R)return Z.state==="ok"?H.jsxDEV("p",{className:"mode",children:["This World has no vendor named ",W,". ",H.jsxDEV("a",{href:`${q0}/${Q}/~/canvas`,onClick:(L)=>{L.preventDefault(),v0([...Q.split("/"),"~","canvas"])},children:"All screens"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):H.jsxDEV(B5,{load:Z,what:"the vendors"},void 0,!1,void 0,this);return H.jsxDEV(H.Fragment,{children:[H.jsxDEV(B5,{load:Z,what:"the vendors"},void 0,!1,void 0,this),Z.state==="ok"&&B.length===0?H.jsxDEV("p",{children:"No vendors in this World yet."},void 0,!1,void 0,this):null,R?H.jsxDEV("div",{className:"vendors",children:H.jsxDEV("div",{className:"stage",children:[H.jsxDEV("div",{className:"stage-bar",children:[H.jsxDEV(A5,{vendor:R.twin},void 0,!1,void 0,this),H.jsxDEV("span",{className:"mode",children:[O(R.twin)||"empty",T(R.twin)?` · connected to ${T(R.twin)}`:" · stand-in"]},void 0,!0,void 0,this),H.jsxDEV("span",{className:"stage-actions",children:[B.filter((L)=>L.mirror).length>1?H.jsxDEV("a",{className:"button",href:`${q0}/${Q}/~/vendors`,onClick:(L)=>{L.preventDefault(),v0([...Q.split("/"),"~","vendors"])},children:"All vendors"},void 0,!1,void 0,this):null,R.mirror?H.jsxDEV("a",{className:"button",href:D8(Q,R.twin),target:"_blank",rel:"noopener noreferrer","aria-label":`Open ${F0(R.twin)} in a new tab`,children:"Open in new tab ↗"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K.state==="ok"&&K.scope==="read"?H.jsxDEV("p",{className:"mode stage-note",children:"You are looking read only: the screens browse, and refuse changes."},void 0,!1,void 0,this):null,K.state==="pending"?H.jsxDEV("p",{className:"mode",role:"status",children:"Opening…"},void 0,!1,void 0,this):null,K.state==="error"?H.jsxDEV("p",{role:"alert",children:["The World did not open its screens: ",K.error," ",H.jsxDEV("button",{type:"button",onClick:X,children:"Try again"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,K.state==="ok"?R.mirror?H.jsxDEV("iframe",{title:`${R.twin} mirror`,src:D8(Q,R.twin)},R.twin,!1,void 0,this):H.jsxDEV("p",{className:"empty",children:[F0(R.twin)," has no screens here yet. What your app did there is in ",H.jsxDEV("a",{href:`${q0}/${Q}/~/activity`,onClick:(L)=>{L.preventDefault(),v0([...Q.split("/"),"~","activity"])},children:"Activity"},void 0,!1,void 0,this),"."]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function SV(Q){let U=[];for(let Z of Q){let K=U[U.length-1];if(K&&(K[0].operation??K[0].op)===(Z.operation??Z.op))K.push(Z);else U.push([Z])}return U}function jV(Q){let U=[];for(let Z of Q){let K=U[U.length-1],X=Array.isArray(K)?K[0]:K;if(X&&X.twin===Z.twin&&(X.entry.operation??X.entry.op)===(Z.entry.operation??Z.entry.op))if(Array.isArray(K))K.push(Z);else U[U.length-1]=[X,Z];else U.push(Z)}return U.flatMap((Z)=>Array.isArray(Z)&&Z.length<3?Z:[Z])}var VV=50,E4=(Q)=>`${Q.twin}:${Q.position}`,dR=(Q,U)=>Date.parse(U.entry.occurredAt)-Date.parse(Q.entry.occurredAt)||Q.twin.localeCompare(U.twin)||U.position-Q.position;function kV(Q){let U=[];for(let Z of Q){let K=new Date(Z.entry.occurredAt),X=K.toDateString(),W=U[U.length-1];if(!W||W.day!==X)W={day:X,label:K.toLocaleDateString(void 0,{weekday:"short",year:"numeric",month:"short",day:"numeric"}),instants:[]},U.push(W);let z=W.instants[W.instants.length-1];if(z&&Date.parse(z.at)===K.getTime())z.items.push(Z);else W.instants.push({at:Z.entry.occurredAt,items:[Z]})}return U}function yR({name:Q,p:U}){let Z=U.entry,K=gR(Z.traceparent),X=n5(Z),W=LV(Z);return H.jsxDEV("li",{className:"entry",title:`${Z.operation??Z.op} ${Z.subject.type}:${Z.subject.id} · ${mR(Z)} · ${nq(Z)}`,children:[H.jsxDEV("span",{className:"twin-chip",children:[H.jsxDEV(A5,{vendor:U.twin},void 0,!1,void 0,this),F0(U.twin)]},void 0,!0,void 0,this),H.jsxDEV("span",{className:"op",children:X.what},void 0,!1,void 0,this),X.label?H.jsxDEV("span",{className:"label",children:["“",X.label,"”"]},void 0,!0,void 0,this):H.jsxDEV("code",{className:"subject",children:aq(Z)},void 0,!1,void 0,this),H.jsxDEV("span",{className:"actor mode",children:oq(Z,U.twin)},void 0,!1,void 0,this),W?H.jsxDEV("span",{className:"standing",children:W},void 0,!1,void 0,this):null,K?H.jsxDEV("a",{className:"trace-link",href:`${q0}/${Q}/~/trace/${K.trace}`,"aria-label":`View trace ${K.trace.slice(0,8)}`,onClick:(z)=>{z.preventDefault(),v0([...Q.split("/"),"~","trace",K.trace])},children:"trace"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function DV({name:Q,token:U,vendors:Z}){let[K,X]=B1.useState(null),[W,z]=B1.useState(null),[B,O]=B1.useState(null),[T,R]=B1.useState(null),[L,M]=B1.useState(!1),[f,I]=B1.useState(null),[D,V]=B1.useState({items:[],gap:null}),k=B1.useCallback((E)=>`/-/${Q}/timeline?limit=${VV}${K?`&twin=${encodeURIComponent(K)}`:""}${E?`&before=${encodeURIComponent(E)}`:""}`,[Q,K]),h=B1.useRef(null);h.current=W,B1.useEffect(()=>{let E=!0;z(null),R(null),V({items:[],gap:null}),(async()=>{let a=await X0(U,k());if(!E)return;if(!a.ok){R(await z5(a));return}let m=await a.json();if(!E)return;z(m.entries),O(m.next)})().catch((a)=>{if(E)R(`the World did not answer: ${a instanceof Error?a.message:String(a)}`)});let p=setInterval(()=>{let a=h.current;if(a===null||document.hidden)return;X0(U,k()).then(async(m)=>{if(!m.ok||!E)return;let _1=await m.json();if(!E)return;if(a.length===0){if(_1.entries.length)z(_1.entries),O(_1.next);return}let $1=new Set((h.current??a).map(E4)),J1=_1.entries.filter((y)=>!$1.has(E4(y)));V({items:J1,gap:J1.length===_1.entries.length&&_1.next?_1:null})}).catch(()=>null)},3000);return()=>{E=!1,clearInterval(p)}},[U,k]);let P=()=>{if(D.gap)z(D.gap.entries),O(D.gap.next);else z((E)=>[...D.items,...E??[]].sort(dR));V({items:[],gap:null})},C=async()=>{if(!B)return;M(!0),I(null);try{let E=await X0(U,k(B));if(!E.ok){I(await z5(E));return}let p=await E.json();z((a)=>{let m=new Set((a??[]).map(E4));return[...a??[],...p.entries.filter((_1)=>!m.has(E4(_1)))]}),O(p.next)}catch(E){I(`the World did not answer: ${E instanceof Error?E.message:String(E)}`)}finally{M(!1)}},v=B1.useMemo(()=>kV(W??[]),[W]),b=D.items.length;return H.jsxDEV(H.Fragment,{children:[H.jsxDEV("div",{role:"group","aria-label":"Filter by twin",className:"chips",children:[H.jsxDEV("button",{type:"button","aria-pressed":K===null,onClick:()=>X(null),children:"All vendors"},void 0,!1,void 0,this),Z.map((E)=>H.jsxDEV("button",{type:"button","aria-pressed":K===E,"aria-label":E,onClick:()=>X(K===E?null:E),children:F0(E)},E,!1,void 0,this))]},void 0,!0,void 0,this),H.jsxDEV("div",{"aria-live":"polite",className:"pill-slot",children:b>0?H.jsxDEV("button",{type:"button",className:"pill",onClick:P,children:[D.gap?`${b}+`:b," new change",b===1?"":"s"," — show"]},void 0,!0,void 0,this):null},void 0,!1,void 0,this),T?H.jsxDEV("p",{role:"alert",children:["Could not read the timeline: ",T]},void 0,!0,void 0,this):W===null?H.jsxDEV("p",{className:"mode",role:"status",children:"Loading the timeline…"},void 0,!1,void 0,this):W.length===0?K?H.jsxDEV("p",{children:["Nothing has happened in ",K," yet."]},void 0,!0,void 0,this):H.jsxDEV("div",{className:"empty",children:[H.jsxDEV("p",{children:H.jsxDEV("strong",{children:"Nothing has happened in this World yet."},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("p",{className:"mode",children:["An entry arrives each time something changes a twin: an app (or a seed script) calling a twin's API at ",H.jsxDEV("code",{children:[w6,"/",Q,"/<twin>"]},void 0,!0,void 0,this),", a mirror's form, a changeset landing. They show here within a few seconds."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):H.jsxDEV("div",{className:"feed","aria-label":"Timeline",children:[v.map((E)=>H.jsxDEV("div",{role:"group","aria-label":E.label,className:"day",children:[H.jsxDEV("h3",{className:"day-head",children:E.label},void 0,!1,void 0,this),H.jsxDEV("ol",{className:"instants",children:E.instants.map((p)=>H.jsxDEV("li",{className:"instant",children:[H.jsxDEV("div",{className:"instant-time",title:p.items.length>1?"These happened at the same moment of the World's clock: their order across vendors is not known.":void 0,children:H.jsxDEV(h0,{iso:p.at,time:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("ul",{className:"entries",children:jV(p.items).map((a)=>Array.isArray(a)?H.jsxDEV("li",{className:"entry run",children:H.jsxDEV("details",{children:[H.jsxDEV("summary",{children:[H.jsxDEV("span",{className:"twin-chip",children:[H.jsxDEV(A5,{vendor:a[0].twin},void 0,!1,void 0,this),F0(a[0].twin)]},void 0,!0,void 0,this)," ",H.jsxDEV("span",{className:"op",children:[J9(a.length,a[0].entry.subject.type)," ",n5(a[0].entry).what.split(" ").slice(-1)[0]]},void 0,!0,void 0,this)," ",H.jsxDEV("span",{className:"actor mode",children:oq(a[0].entry,a[0].twin)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("ul",{className:"entries",children:a.map((m)=>H.jsxDEV(yR,{name:Q,p:m},E4(m),!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},E4(a[0]),!1,void 0,this):H.jsxDEV(yR,{name:Q,p:a},E4(a),!1,void 0,this))},void 0,!1,void 0,this)]},`${p.at}:${E4(p.items[0])}`,!0,void 0,this))},void 0,!1,void 0,this)]},E.day,!0,void 0,this)),B?H.jsxDEV("button",{type:"button",onClick:()=>void C(),disabled:L,"aria-busy":L,children:"Load older"},void 0,!1,void 0,this):H.jsxDEV("p",{className:"mode",children:["The beginning of this World",K?`'s ${K}`:"","."]},void 0,!0,void 0,this),f?H.jsxDEV("p",{role:"alert",children:["Could not load older changes: ",f]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function yV({name:Q,token:U,id:Z}){let K=/^[0-9a-f]{32}$/.test(Z),X=L5(U,K?`/-/${Q}/timeline?trace=${Z}&limit=500`:null),W=X.state==="ok"?[...X.data.entries].sort((T,R)=>-dR(T,R)):[],z=[...new Set(W.map((T)=>T.twin))],B=W[0]?Date.parse(W[0].entry.occurredAt):0,O=H.jsxDEV("a",{href:`${q0}/${Q}/~/timeline`,onClick:(T)=>{T.preventDefault(),v0([...Q.split("/"),"~","timeline"])},children:"← Timeline"},void 0,!1,void 0,this);return H.jsxDEV(H.Fragment,{children:[H.jsxDEV("p",{children:O},void 0,!1,void 0,this),H.jsxDEV("h3",{children:["Trace ",H.jsxDEV("code",{children:Z},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!K?H.jsxDEV("p",{role:"alert",children:[Z?`${Z} is not a trace id`:"No trace named",": a W3C trace id is 32 hex characters."]},void 0,!0,void 0,this):H.jsxDEV(B5,{load:X,what:"the trace"},void 0,!1,void 0,this),X.state==="ok"&&W.length===0?H.jsxDEV("div",{className:"empty",children:[H.jsxDEV("p",{children:H.jsxDEV("strong",{children:"Nothing in this World carries this trace."},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("p",{className:"mode",children:["Causes are followed through the W3C ",H.jsxDEV("code",{children:"traceparent"},void 0,!1,void 0,this)," header: an app instrumented with OpenTelemetry sends it with each call, and every entry that call writes keeps it — so one click in the app can be read across Stripe, Slack and the rest. Without it the World knows the order of what happened, not what caused what."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null,W.length>0?H.jsxDEV(H.Fragment,{children:[H.jsxDEV("p",{className:"mode",children:[W.length," step",W.length===1?"":"s"," across ",z.length," twin",z.length===1?"":"s",X.state==="ok"&&X.data.next?" · the first 500 shown":""]},void 0,!0,void 0,this),H.jsxDEV("div",{role:"table","aria-label":"Trace waterfall",className:"waterfall",style:{gridTemplateColumns:`minmax(130px, auto) repeat(${z.length}, minmax(140px, 1fr))`},children:[H.jsxDEV("div",{role:"row",className:"wf-row wf-head",children:[H.jsxDEV("span",{role:"columnheader",children:"time"},void 0,!1,void 0,this),z.map((T)=>H.jsxDEV("span",{role:"columnheader",children:T},T,!1,void 0,this))]},void 0,!0,void 0,this),W.map((T)=>{let R=Date.parse(T.entry.occurredAt)-B,L=gR(T.entry.traceparent)?.span;return H.jsxDEV("div",{role:"row",className:"wf-row",children:[H.jsxDEV("span",{role:"cell",className:"wf-time",children:[H.jsxDEV(h0,{iso:T.entry.occurredAt,time:!0},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:["+",R," ms"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z.map((M)=>H.jsxDEV("span",{role:"cell",className:M===T.twin?"wf-cell on":"wf-cell",children:M===T.twin?H.jsxDEV("details",{children:[H.jsxDEV("summary",{children:[T.entry.operation??T.entry.op," ",H.jsxDEV("code",{children:[T.entry.subject.type,":",T.entry.subject.id]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("p",{className:"mode",children:[mR(T.entry)," · ",nq(T.entry)," · position ",T.position,L?H.jsxDEV(H.Fragment,{children:[" · span ",H.jsxDEV("code",{children:L},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV(iR,{fields:T.entry.fields},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null},M,!1,void 0,this))]},E4(T),!0,void 0,this)})]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function iR({fields:Q}){let U=Object.entries(Q??{});if(U.length===0)return H.jsxDEV("p",{className:"mode",children:"No fields."},void 0,!1,void 0,this);return H.jsxDEV("dl",{className:"fields",children:U.map(([Z,K])=>H.jsxDEV(B1.default.Fragment,{children:[H.jsxDEV("dt",{children:Z},void 0,!1,void 0,this),H.jsxDEV("dd",{children:H.jsxDEV("code",{children:typeof K==="string"?K:JSON.stringify(K)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},Z,!0,void 0,this))},void 0,!1,void 0,this)}var sq=1280,tq=820,vR=160;function vV({data:Q}){let{world:U,vendor:Z,active:K,open:X}=Q;return H.jsxDEV(H.Fragment,{children:[H.jsxDEV(WR,{isVisible:!0,position:C1.Top,align:"start",className:"frame-label",children:[H.jsxDEV(A5,{vendor:Z},void 0,!1,void 0,this),H.jsxDEV("span",{children:F0(Z)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("div",{className:K?"frame on":"frame",style:{width:sq,height:tq},children:[H.jsxDEV("div",{className:"frame-bar",title:"Drag to move",children:[H.jsxDEV(A5,{vendor:Z},void 0,!1,void 0,this),H.jsxDEV("strong",{children:F0(Z)},void 0,!1,void 0,this),H.jsxDEV("span",{className:"frame-url",children:D8(U,Z).replace(/^https?:\/\//,"")},void 0,!1,void 0,this),H.jsxDEV("a",{className:"nodrag",href:`${q0}/${U}/~/vendors/${Z}`,onClick:(W)=>{W.preventDefault(),X(Z)},children:"Open"},void 0,!1,void 0,this),H.jsxDEV("a",{className:"nodrag",href:D8(U,Z),target:"_blank",rel:"noopener noreferrer","aria-label":`Open ${F0(Z)} in a new tab`,children:"↗"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("div",{className:K?"frame-body nodrag nopan nowheel":"frame-body",children:H.jsxDEV("iframe",{title:`${Z} mirror`,src:D8(U,Z),loading:"lazy",style:{pointerEvents:K?"auto":"none"}},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var EV={screen:vV};function bV(Q){return H.jsxDEV(kX,{children:H.jsxDEV(uV,{...Q},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function uV({name:Q,twins:U,session:Z,retry:K,snapshot:X,back:W}){let z=U.state==="ok"?U.data.twins.filter((E)=>E.mirror).map((E)=>E.twin):[],B=`volter.canvas.${Q}`,[O,T]=B1.useState(null),[R,L]=B1.useState(!0),M=OJ(),f=B1.useCallback((E)=>v0([...Q.split("/"),"~","vendors",E]),[Q]),I=Math.max(1,Math.ceil(Math.sqrt(z.length))),D=B1.useCallback(()=>{let E={};try{E=JSON.parse(localStorage.getItem(B)??"{}")}catch{}return z.map((p,a)=>({id:p,type:"screen",dragHandle:".frame-bar",position:E[p]??{x:a%I*(sq+vR),y:Math.floor(a/I)*(tq+vR)},data:{world:Q,vendor:p,active:!1,open:f}}))},[z.join(","),Q,I,f]),[V,k,h]=GR([]);B1.useEffect(()=>{k(D())},[D,k]),B1.useEffect(()=>{k((E)=>E.map((p)=>p.data.active===(p.id===O)?p:{...p,data:{...p.data,active:p.id===O}}))},[O,k]),B1.useEffect(()=>{let E=(p)=>{if(p.key==="Escape")T(null)};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[]);let P=()=>{try{localStorage.setItem(B,JSON.stringify(Object.fromEntries(V.map((E)=>[E.id,E.position]))))}catch{}},C=(E)=>{T(E);let p=M.getNode(E);if(!p)return;let a=Math.min((window.innerWidth-300)/sq,(window.innerHeight-120)/tq,1);M.setCenter(p.position.x+sq/2-130/a,p.position.y+tq/2,{zoom:a,duration:400})},v=typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches,b=Z.state==="ok"&&U.state==="ok";return H.jsxDEV("div",{className:"canvas full",role:"region","aria-label":"Every vendor's screens",children:H.jsxDEV(UR,{nodes:b?V:[],onNodesChange:h,nodeTypes:EV,onNodeDragStop:P,onNodeClick:(E,p)=>T(p.id),onPaneClick:()=>T(null),fitView:!0,fitViewOptions:{padding:{top:"64px",left:"272px",right:"32px",bottom:"32px"}},minZoom:0.05,maxZoom:1.5,nodesConnectable:!1,elementsSelectable:!1,panOnScroll:!1,zoomOnDoubleClick:!1,colorMode:v?"dark":"light",proOptions:{hideAttribution:!0},children:[H.jsxDEV(FR,{variant:v4.Dots,gap:28,size:1.4},void 0,!1,void 0,this),H.jsxDEV(N8,{position:"top-left",className:"float layers",children:[H.jsxDEV("div",{className:"float-head",children:[H.jsxDEV("button",{type:"button",className:"back",onClick:W,"aria-label":`Back to ${Q}`,children:"←"},void 0,!1,void 0,this),H.jsxDEV("span",{className:"float-title",children:[H.jsxDEV("strong",{children:Q.split("/")[1]},void 0,!1,void 0,this),H.jsxDEV("span",{className:"mode",children:[Q.split("/")[0],X?" · snapshot":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("button",{type:"button",className:"ghost","aria-expanded":R,"aria-label":R?"Hide the screens list":"Show the screens list",onClick:()=>L(!R),children:R?"▾":"▸"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),R?H.jsxDEV("ul",{className:"layer-list","aria-label":"Screens",children:[z.map((E)=>H.jsxDEV("li",{children:H.jsxDEV("button",{type:"button",className:O===E?"on":void 0,onClick:()=>C(E),children:[H.jsxDEV(A5,{vendor:E},void 0,!1,void 0,this),H.jsxDEV("span",{children:F0(E)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},E,!1,void 0,this)),U.state==="ok"&&z.length===0?H.jsxDEV("li",{className:"mode",children:"No vendor in this World has screens."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null,H.jsxDEV(B5,{load:U,what:"the vendors"},void 0,!1,void 0,this),Z.state==="pending"?H.jsxDEV("p",{className:"mode",role:"status",children:"Opening…"},void 0,!1,void 0,this):null,Z.state==="error"?H.jsxDEV("p",{role:"alert",children:["The World did not open its screens: ",Z.error," ",H.jsxDEV("button",{type:"button",onClick:K,children:"Try again"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV(N8,{position:"top-center",className:"float hint mode",children:O?`Using ${F0(O)} · Esc to leave`:"Drag to pan · scroll to zoom · click a screen to use it"},void 0,!1,void 0,this),H.jsxDEV(XR,{showInteractive:!1,position:"bottom-left"},void 0,!1,void 0,this),H.jsxDEV(YR,{pannable:!0,zoomable:!0,nodeBorderRadius:8,position:"bottom-right"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var aR=(Q)=>{let U=new Map;for(let Z of Q.actions)U.set(Z.service,[...U.get(Z.service)??[],{...Z.action,service:Z.service,op:Z.action.op??Z.action.operation??""}]);return[...U.entries()]};function sR(Q){if(Q.applied)return Q.applied.outcome==="applied"?{label:"Deployed",tone:"done"}:Q.applied.outcome==="partial"?{label:"Partly deployed",tone:"warn"}:{label:"Deploy refused",tone:"bad"};let U=Q.currentHash??Q.contentHash,Z=Q.approvals.filter((X)=>X.contentHash===U).length,K=Q.verification&&Q.verification.contentHash===U?Q.verification:null;if(K&&!K.passed)return{label:"Checks failed",tone:"bad"};if(Z>0)return{label:`Approved by ${Z}`,tone:"good"};if(K)return{label:"Verified",tone:"good"};return{label:"Not verified",tone:"plain"}}function xV({name:Q,token:U,signsAs:Z,canWrite:K,rooted:X,open:W,refused:z}){let[B,O]=B1.useState(0),T=L5(U,`/-/${Q}/changesets`,B),R=(M)=>(f)=>{f.preventDefault(),v0([...Q.split("/"),"~","changesets",M])};if(W){let M=T.state==="ok"?T.data.changesets.find((f)=>f.name===W):void 0;return H.jsxDEV(H.Fragment,{children:[H.jsxDEV("p",{className:"crumbs-line",children:H.jsxDEV("a",{href:`${q0}/${Q}/~/changesets`,onClick:(f)=>{f.preventDefault(),v0([...Q.split("/"),"~","changesets"])},children:"← Changesets"},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV(B5,{load:T,what:"the changesets"},void 0,!1,void 0,this),T.state==="ok"&&!M?H.jsxDEV("p",{className:"mode",children:["This World has no changeset named ",W,"."]},void 0,!0,void 0,this):null,M?H.jsxDEV(hV,{name:Q,token:U,signsAs:Z,c:M,canWrite:K,rooted:X,refused:z,onChanged:()=>O((f)=>f+1)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}let L=T.state==="ok"?[...T.data.changesets].sort((M,f)=>f.createdAt.localeCompare(M.createdAt)):[];return H.jsxDEV(H.Fragment,{children:[H.jsxDEV("p",{className:"lede",children:"A changeset is what this World changed, cut into a piece a person reviews: what it does at each vendor, the World's checks over it, and who approved it. Where the World has a real account behind a vendor, an approved changeset deploys there, with a receipt for each change."},void 0,!1,void 0,this),H.jsxDEV(B5,{load:T,what:"the changesets"},void 0,!1,void 0,this),T.state==="ok"&&L.length===0?H.jsxDEV(wR,{title:"No changesets yet",children:H.jsxDEV("p",{children:["Cut one from what your app did in this World: ",H.jsxDEV("code",{children:'volter world changeset -m "What it does and why"'},void 0,!1,void 0,this),". Pushed to a shared World, it shows up here for review."]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,L.length>0?H.jsxDEV("div",{className:"block",children:H.jsxDEV("table",{className:"dense","aria-label":"Changesets",children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"Changeset"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Changes"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Made"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Status"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:L.map((M)=>{let f=sR(M),I=aR(M).map(([D,V])=>`${V.length} at ${F0(D)}`).join(" · ");return H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:[H.jsxDEV("a",{href:`${q0}/${Q}/~/changesets/${M.name}`,onClick:R(M.name),children:H.jsxDEV("b",{children:M.message??M.name},void 0,!1,void 0,this)},void 0,!1,void 0,this),M.message?H.jsxDEV("span",{className:"mode mono",children:[" ",M.name]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV("td",{className:"mode",children:I||"nothing"},void 0,!1,void 0,this),H.jsxDEV("td",{className:"mode",children:H.jsxDEV(h0,{iso:M.createdAt},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:H.jsxDEV("span",{className:`badge cs-${f.tone}`,children:f.label},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},M.name,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function hV({name:Q,token:U,signsAs:Z,c:K,canWrite:X,rooted:W,refused:z,onChanged:B}){let[O,T]=B1.useState(null),[R,L]=B1.useState(!1),[M,f]=B1.useState(""),[I,D]=B1.useState(""),V=sR(K),k=aR(K),h=k.map(([m])=>m),P=h.some((m)=>W.includes(m)),C=(m)=>m===(K.currentHash??K.contentHash),v=async(m,_1,$1,J1)=>{T(m);try{let y=await X0(U,_1,{method:"POST",...$1===void 0?{}:{body:JSON.stringify($1)}});if(!y.ok)return z(y),t2(`${m}: ${await z5(y)}`,"error"),!1;if(J1)t2(J1);return B(),!0}catch(y){return t2(`${m}: the World did not answer (${y instanceof Error?y.message:String(y)})`,"error"),!1}finally{T(null)}},b=()=>{v("Verify",`/-/${Q}/changesets/${K.name}/verify`,void 0,"Verified: the checks ran over it")},E=async(m)=>{if(m.preventDefault(),await v("Approve",`/-/${Q}/changesets/${K.name}/approve`,{...M.trim()?{note:M.trim()}:{},...Z===null&&I.trim()?{as:I.trim()}:{}},"Approved"))L(!1),f("")},p=async()=>{if(!await o5({title:`Deploy ${K.name} to the real vendors?`,body:H.jsxDEV(H.Fragment,{children:["It performs its ",K.actions.length," change",K.actions.length===1?"":"s"," against the real account",h.filter((m)=>W.includes(m)).length===1?"":"s"," behind ",EX(h.filter((m)=>W.includes(m)).map(F0)),". This cannot be taken back here."]},void 0,!0,void 0,this),action:"Deploy",danger:!0,typed:K.name}))return;v("Deploy",`/-/${Q}/deploy/${K.name}`,{confirm:K.name},"Deployed: the receipts are below")},a=!X?"This session reads the World; it changes nothing":K.applied?"Already deployed":null;return H.jsxDEV("div",{className:"changeset","aria-labelledby":"changeset-title",children:[H.jsxDEV("div",{className:"changeset-head",children:[H.jsxDEV("div",{children:[H.jsxDEV("h3",{id:"changeset-title",children:[K.message??K.name," ",H.jsxDEV("span",{className:`badge cs-${V.tone}`,children:V.label},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("p",{className:"mode",children:[H.jsxDEV("code",{children:K.name},void 0,!1,void 0,this)," · made ",H.jsxDEV(h0,{iso:K.createdAt},void 0,!1,void 0,this)," · ",K.actions.length," change",K.actions.length===1?"":"s"," at ",EX(h.map(F0))||"no vendor"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("div",{className:"changeset-actions",children:[H.jsxDEV("button",{type:"button",onClick:b,disabled:Boolean(a)||O!==null,title:a??"Replay it in a throwaway World and run the World's checks",children:O==="Verify"?"Verifying…":"Verify"},void 0,!1,void 0,this),H.jsxDEV("button",{type:"button",onClick:()=>L(!0),disabled:Boolean(a)||O!==null,title:a??"Sign its current contents as yourself",children:"Approve…"},void 0,!1,void 0,this),P?H.jsxDEV("button",{type:"button",className:"primary",onClick:()=>void p(),disabled:Boolean(a)||O!==null,title:a??"Perform it against the real accounts behind this World",children:O==="Deploy"?"Deploying…":"Deploy…"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),a&&!K.applied?H.jsxDEV("p",{className:"mode",children:[a,"."]},void 0,!0,void 0,this):null,!P&&!K.applied?H.jsxDEV("p",{className:"mode",children:"It stays in this World: no vendor it changes has a real account behind it here (a shared World with a root deploys; see Settings › Real services)."},void 0,!1,void 0,this):null,K.narration?H.jsxDEV("p",{className:"narration",children:K.narration},void 0,!1,void 0,this):null,H.jsxDEV("h4",{children:"Changes"},void 0,!1,void 0,this),k.length===0?H.jsxDEV("p",{className:"mode",children:"It changes nothing."},void 0,!1,void 0,this):H.jsxDEV(tR,{groups:k,idPrefix:`cs-${K.name}`},void 0,!1,void 0,this),H.jsxDEV("h4",{children:"Checks"},void 0,!1,void 0,this),!K.verification?H.jsxDEV("p",{className:"mode",children:"Not verified yet. Verify replays it in a throwaway World and runs this World's checks over the result."},void 0,!1,void 0,this):H.jsxDEV("div",{className:C(K.verification.contentHash)?"":"stale",children:[H.jsxDEV("p",{children:[K.verification.passed?"✓ Passed":"✗ Failed"," · ",H.jsxDEV(h0,{iso:K.verification.at},void 0,!1,void 0,this),C(K.verification.contentHash)?null:H.jsxDEV("span",{className:"mode",children:" · on an earlier version of it: verify again"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K.verification.results.length?H.jsxDEV("ul",{className:"checks",children:K.verification.results.map((m)=>H.jsxDEV("li",{children:[m.passed?"✓":"✗"," ",H.jsxDEV("code",{children:m.id},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:F0(m.service)},void 0,!1,void 0,this)]},m.id,!0,void 0,this))},void 0,!1,void 0,this):null,K.verification.refusals?.length?H.jsxDEV("ul",{className:"checks",children:K.verification.refusals.map((m,_1)=>H.jsxDEV("li",{children:["✗ ",H.jsxDEV("code",{children:m.check},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:[F0(m.service),": ",m.reason]},void 0,!0,void 0,this)]},_1,!0,void 0,this))},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV("h4",{children:"Approvals"},void 0,!1,void 0,this),K.approvals.length===0?H.jsxDEV("p",{className:"mode",children:"No one has approved it."},void 0,!1,void 0,this):H.jsxDEV("ul",{className:"approvals",children:K.approvals.map((m,_1)=>H.jsxDEV("li",{children:[H.jsxDEV("b",{children:m.principal},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:[H.jsxDEV(h0,{iso:m.at},void 0,!1,void 0,this),C(m.contentHash)?"":" · signed an earlier version"]},void 0,!0,void 0,this),m.note?H.jsxDEV("div",{className:"mode",children:["“",m.note,"”"]},void 0,!0,void 0,this):null]},_1,!0,void 0,this))},void 0,!1,void 0,this),K.applied?H.jsxDEV(H.Fragment,{children:[H.jsxDEV("h4",{children:"Deployed"},void 0,!1,void 0,this),H.jsxDEV("p",{children:[K.applied.outcome==="applied"?"Every change reached the real vendors":K.applied.outcome==="partial"?"Some changes reached the real vendors":"The deploy was refused"," · ",H.jsxDEV(h0,{iso:K.applied.at},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K.applied.refusal?.length?H.jsxDEV("ul",{className:"checks",children:K.applied.refusal.map((m,_1)=>H.jsxDEV("li",{className:"mode",children:m},_1,!1,void 0,this))},void 0,!1,void 0,this):null,K.applied.receipts.length?H.jsxDEV("ul",{className:"receipts",children:K.applied.receipts.map((m)=>H.jsxDEV("li",{children:[H.jsxDEV("span",{className:m.status==="failed"?"badge cs-bad":"badge cs-done",children:m.status},void 0,!1,void 0,this)," ",F0(m.service)," ",m.url?H.jsxDEV("a",{href:m.url,target:"_blank",rel:"noopener noreferrer",children:m.externalId??m.url},void 0,!1,void 0,this):m.externalId?H.jsxDEV("code",{children:m.externalId},void 0,!1,void 0,this):null,m.error?H.jsxDEV("span",{className:"mode",children:[" · ",m.error]},void 0,!0,void 0,this):null]},m.actionId,!0,void 0,this))},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null,H.jsxDEV(S8,{open:R,onClose:()=>{if(!O)L(!1)},title:`Approve ${K.name}`,footer:H.jsxDEV(H.Fragment,{children:[H.jsxDEV("button",{type:"button",onClick:()=>L(!1),disabled:O!==null,children:"Cancel"},void 0,!1,void 0,this),H.jsxDEV("button",{type:"submit",form:"approve-changeset",className:"primary",disabled:O!==null,children:O==="Approve"?"Approving…":"Approve"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:H.jsxDEV("form",{id:"approve-changeset",onSubmit:(m)=>void E(m),className:"stack",children:[H.jsxDEV("p",{className:"mode",children:["You sign its contents as they stand now",Z?H.jsxDEV(H.Fragment,{children:[", recorded as ",H.jsxDEV("b",{children:Z},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,". A later change to it shows your approval as for an earlier version."]},void 0,!0,void 0,this),Z===null?H.jsxDEV("label",{children:[H.jsxDEV("span",{children:"Approving as"},void 0,!1,void 0,this),H.jsxDEV("input",{name:"approveAs",value:I,onChange:(m)=>D(m.target.value),maxLength:80,required:!0,placeholder:"your name or email",autoComplete:"off"},void 0,!1,void 0,this),H.jsxDEV("span",{className:"mode",children:"This World was opened with its token, which names no person: the approval records the name you give."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,H.jsxDEV("label",{children:[H.jsxDEV("span",{children:["Note ",H.jsxDEV("span",{className:"mode",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("textarea",{name:"approveNote",value:M,onChange:(m)=>f(m.target.value),rows:3,maxLength:500},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function tR({groups:Q,idPrefix:U}){return H.jsxDEV(H.Fragment,{children:Q.map(([Z,K])=>H.jsxDEV("div",{className:"compare",role:"group","aria-labelledby":`${U}-${Z}`,children:[H.jsxDEV("h3",{id:`${U}-${Z}`,className:"vendor-cell",children:[H.jsxDEV(A5,{vendor:Z},void 0,!1,void 0,this),F0(Z)," ",H.jsxDEV("span",{className:"mode",children:["· ",K.length," change",K.length===1?"":"s"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("ul",{children:SV(K).map((X)=>X.length>=3?H.jsxDEV("li",{children:H.jsxDEV("details",{children:[H.jsxDEV("summary",{children:[H.jsxDEV("span",{className:"op",children:[J9(X.length,X[0].subject.type)," ",n5(X[0]).what.split(" ").slice(-1)[0]]},void 0,!0,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:[X.map((W)=>n5(W).label??aq(W)).slice(0,4).join(", "),X.length>4?", …":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("ul",{children:X.map((W)=>H.jsxDEV("li",{children:[H.jsxDEV("span",{className:"op",children:n5(W).what},void 0,!1,void 0,this)," ",n5(W).label?H.jsxDEV("span",{className:"label",children:["“",n5(W).label,"”"]},void 0,!0,void 0,this):H.jsxDEV("code",{children:aq(W)},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:[H.jsxDEV(h0,{iso:W.occurredAt},void 0,!1,void 0,this)," · ",oq(W,Z)]},void 0,!0,void 0,this)]},W.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},X[0].id,!1,void 0,this):X.map((W)=>H.jsxDEV("li",{children:H.jsxDEV("details",{children:[H.jsxDEV("summary",{children:[H.jsxDEV("span",{className:"op",children:n5(W).what},void 0,!1,void 0,this)," ",n5(W).label?H.jsxDEV("span",{className:"label",children:["“",n5(W).label,"”"]},void 0,!0,void 0,this):H.jsxDEV("code",{children:aq(W)},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:[H.jsxDEV(h0,{iso:W.occurredAt},void 0,!1,void 0,this)," · ",oq(W,Z)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV(iR,{fields:W.fields},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},W.id,!1,void 0,this)))},void 0,!1,void 0,this)]},Z,!0,void 0,this))},void 0,!1,void 0,this)}function mV({name:Q,token:U}){let Z=L5(U,`/-/${Q}/diff`),K=B1.useMemo(()=>{let X=new Map;if(Z.state==="ok")for(let W of Z.data.changes)X.set(W.twin,[...X.get(W.twin)??[],W.entry]);return[...X.entries()]},[Z]);return H.jsxDEV(H.Fragment,{children:[H.jsxDEV(B5,{load:Z,what:"the changes"},void 0,!1,void 0,this),Z.state==="ok"?H.jsxDEV(H.Fragment,{children:[H.jsxDEV("p",{className:"mode",children:["What this World changed since it started",Z.data.base.at?H.jsxDEV(H.Fragment,{children:[" (",H.jsxDEV(h0,{iso:Z.data.base.at},void 0,!1,void 0,this),", ",H.jsxDEV("code",{children:Z.data.base.id},void 0,!1,void 0,this),")"]},void 0,!0,void 0,this):H.jsxDEV(H.Fragment,{children:[" (",H.jsxDEV("code",{children:Z.data.base.id},void 0,!1,void 0,this),")"]},void 0,!0,void 0,this),": ",Z.data.changes.length," change",Z.data.changes.length===1?"":"s"," at ",K.length," vendor",K.length===1?"":"s",". A changeset takes these to the real services."]},void 0,!0,void 0,this),K.length===0?H.jsxDEV("p",{className:"empty",children:["No changes since ",Z.data.base.id,Z.data.base.at?H.jsxDEV(H.Fragment,{children:[" (",H.jsxDEV(h0,{iso:Z.data.base.at},void 0,!1,void 0,this),")"]},void 0,!0,void 0,this):null,"."]},void 0,!0,void 0,this):H.jsxDEV(tR,{groups:K,idPrefix:"changes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function gV({name:Q,token:U}){let[Z,K]=B1.useState(0),X=L5(U,`/-/${Q}/keys`,Z),[W,z]=B1.useState(!1),[B,O]=B1.useState(""),[T,R]=B1.useState("write"),[L,M]=B1.useState(!1),[f,I]=B1.useState(null),[D,V]=B1.useState(null),[k,h]=B1.useState(null),P=async()=>{let b=`Read-only link · ${new Date().toLocaleDateString(void 0,{month:"short",day:"numeric"})}`,E=await X0(U,`/-/${Q}/keys`,{method:"POST",body:JSON.stringify({name:b,scope:"read"})}).catch(()=>null),p=E?await E.json().catch(()=>({})):{error:`${B0} did not answer`};if(!E?.ok||!p.key){t2(p.error??"refused","error");return}h(`${window.location.origin}${q0}/${Q}#${new URLSearchParams({token:p.key}).toString()}`),K((a)=>a+1)},C=async(b)=>{b.preventDefault(),M(!0),I(null);let E=await X0(U,`/-/${Q}/keys`,{method:"POST",body:JSON.stringify({name:B.trim(),scope:T})}).catch(()=>null);M(!1);let p=E?await E.json().catch(()=>({})):{error:`${B0} did not answer`};if(!E?.ok||!p.key){I(p.error??"refused");return}z(!1),V({key:p.key,name:B.trim()}),O(""),K((a)=>a+1)},v=async(b)=>{if(!await o5({title:`Revoke ${b.name}?`,body:"Whatever holds it loses this World at once.",action:"Revoke key",danger:!0}))return;let E=await X0(U,`/-/${Q}/keys/${b.id}`,{method:"DELETE"});if(E.ok)t2(`Revoked ${b.name}`);else t2(await z5(E),"error");K((p)=>p+1)};return H.jsxDEV("section",{"aria-labelledby":"keys-head",className:"keys",children:[H.jsxDEV("div",{className:"keys-head",children:[H.jsxDEV("div",{children:[H.jsxDEV("h3",{id:"keys-head",children:"Keys"},void 0,!1,void 0,this),H.jsxDEV("p",{className:"mode",children:"What an app, a script or a CI job holds to reach this World: each named for what holds it and revoked alone. People open the World as themselves; keys are for software."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o2()?H.jsxDEV("a",{className:"button primary",href:`${o2()}/${encodeURIComponent(Q.split("/")[0]??"")}`,children:"Make a key on the platform"},void 0,!1,void 0,this):H.jsxDEV("div",{className:"head-actions",children:[H.jsxDEV("button",{type:"button",onClick:()=>void P(),children:"Share a read-only link"},void 0,!1,void 0,this),H.jsxDEV("button",{type:"button",className:"primary",onClick:()=>{I(null),z(!0)},children:"Make a key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV(B5,{load:X,what:"the keys",retry:()=>K((b)=>b+1)},void 0,!1,void 0,this),X.state==="ok"?X.data.keys.length===0?H.jsxDEV("p",{className:"mode",children:"No keys yet. The World's own token opens it too."},void 0,!1,void 0,this):H.jsxDEV("table",{className:"dense","aria-label":"Keys",children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"Name"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Access"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Made"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"Last used"},void 0,!1,void 0,this),H.jsxDEV("th",{className:"num",children:H.jsxDEV("span",{className:"sr",children:"Actions"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:X.data.keys.map((b)=>H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:b.name},void 0,!1,void 0,this),H.jsxDEV("td",{children:b.scope==="write"?"Read and write":"Read only"},void 0,!1,void 0,this),H.jsxDEV("td",{className:"mode",children:H.jsxDEV("span",{title:IJ(b.createdAt),children:dq(b.createdAt)},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{className:"mode",children:b.lastUsedAt?dq(b.lastUsedAt):"never"},void 0,!1,void 0,this),H.jsxDEV("td",{className:"num",children:H.jsxDEV(xX,{label:`More for ${b.name}`,items:[{label:"Revoke…",danger:!0,onSelect:()=>void v(b)}]},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},b.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,H.jsxDEV(S8,{open:W,onClose:()=>{if(!L)z(!1)},title:"Make a key",footer:H.jsxDEV(H.Fragment,{children:[H.jsxDEV("button",{type:"button",onClick:()=>z(!1),disabled:L,children:"Cancel"},void 0,!1,void 0,this),H.jsxDEV("button",{type:"submit",form:"make-key",disabled:L||!B.trim(),children:L?"Making…":"Make key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:H.jsxDEV("form",{id:"make-key",onSubmit:C,"aria-label":"Make a key",children:[H.jsxDEV("label",{children:["Name ",H.jsxDEV("input",{autoFocus:!0,name:"keyName",value:B,onChange:(b)=>O(b.target.value),placeholder:"ci, staging app…",maxLength:80,required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("label",{children:["Access ",H.jsxDEV("select",{value:T,onChange:(b)=>R(b.target.value==="read"?"read":"write"),children:[H.jsxDEV("option",{value:"write",children:"Read and write"},void 0,!1,void 0,this),H.jsxDEV("option",{value:"read",children:"Read only"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),f?H.jsxDEV("p",{role:"alert",children:f},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV(S8,{open:Boolean(D),onClose:()=>V(null),title:`${D?.name??"The key"} is ready`,footer:H.jsxDEV("button",{type:"button",className:"primary",onClick:()=>V(null),children:"Done"},void 0,!1,void 0,this),children:[H.jsxDEV("p",{className:"mode",children:"Copy it now: it is shown this once. Put it where the app reads its secrets."},void 0,!1,void 0,this),D?H.jsxDEV(uX,{label:"Key",value:D.key,secret:!0},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV(S8,{open:Boolean(k),onClose:()=>h(null),title:"A read-only link",footer:H.jsxDEV("button",{type:"button",className:"primary",onClick:()=>h(null),children:"Done"},void 0,!1,void 0,this),children:[H.jsxDEV("p",{className:"mode",children:"Whoever opens it sees this World's pages and changes nothing. Copy it now: it is shown this once. It is listed under Keys, where revoking it closes the link at once."},void 0,!1,void 0,this),k?H.jsxDEV(uX,{label:"Link",value:k,secret:!0},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function pV({name:Q,token:U,admin:Z,canWrite:K,refused:X,onRemoved:W}){let[z,B]=B1.useState(null),[O,T]=B1.useState(null),[R,L]=B1.useState(null),[M,f]=B1.useState(null),[I,D]=B1.useState(null),V=B1.useCallback(async()=>{let C=await X0(U,`/-/${Q}/twins`);B(C.ok?(await C.json()).twins:[]);let v=await X0(U,`/-/${Q}/requests?hours=24`);D(v.ok?await v.json():null);let b=await X0(U,`/-/${Q}/changesets`);T(b.ok?(await b.json()).changesets:[])},[Q,U]);B1.useEffect(()=>{V()},[V]);let k=async(C,v,b)=>{L(null);let E=await X0(U,v,b);if(!E.ok)X(E);L(E.ok?`${C}: done`:`${C}: ${await z5(E)}`),await V()},h=async()=>{if(!await o5({title:`Rotate the tokens of ${Q}?`,body:"Every app, script and person holding the current tokens loses access at once. The new ones are shown once.",action:"Rotate tokens",danger:!0}))return;let C=await X0(Z,`/-/worlds/${Q}/rotate`,{method:"POST"});if(C.ok)f(await C.json()),L("rotated: the new tokens are shown once");else L(`rotate: answered ${C.status}`)},P=async()=>{if(!await o5({title:`Remove ${Q}?`,body:"The host stops serving it and its whole history goes with it. This cannot be undone.",action:"Remove World",danger:!0,typed:Q}))return;let C=await X0(Z,`/-/worlds/${Q}`,{method:"DELETE"}).catch((v)=>v);if(C instanceof Error){L(`remove: the host did not answer (${C.message})`);return}if(C.ok)W();else L(`remove: answered ${C.status}`)};return H.jsxDEV(H.Fragment,{children:[R?H.jsxDEV("p",{role:"status",children:R},void 0,!1,void 0,this):null,M?H.jsxDEV("p",{role:"status",children:["token ",H.jsxDEV("code",{children:M.token},void 0,!1,void 0,this)," · read token ",H.jsxDEV("code",{children:M.readToken},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,K?H.jsxDEV(gV,{name:Q,token:U},void 0,!1,void 0,this):null,H.jsxDEV("h3",{children:"Real services"},void 0,!1,void 0,this),H.jsxDEV("p",{className:"mode",children:"Every vendor here is a stand-in. Connect one to its real service to read the real state into this World; give it the real key to send this World's changes there (a changeset's Deploy, below)."},void 0,!1,void 0,this),z===null?H.jsxDEV("p",{children:"Loading…"},void 0,!1,void 0,this):H.jsxDEV("table",{"aria-label":"Real services",children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"vendor"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"real service"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"real key"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"last read from it"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"last sent"},void 0,!1,void 0,this),K?H.jsxDEV("th",{},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:z.map((C)=>H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:H.jsxDEV("a",{href:`${q0}/${Q}/${C.twin}`,title:`Its log and stored state · ${C.position??0} changes held${C.protocol?.major!==void 0?` · protocol ${C.protocol.major}${C.protocol.standing&&C.protocol.standing!=="current"?` (${C.protocol.standing})`:""}`:""}`,onClick:(v)=>{v.preventDefault(),v0([...Q.split("/"),C.twin])},children:F0(C.twin)},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:C.root?.url?H.jsxDEV("code",{children:C.root.url},void 0,!1,void 0,this):H.jsxDEV("span",{className:"mode",children:"not connected"},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:C.credential?`sealed ${C.credential.fingerprint??""} · ${IJ(C.credential.placedAt)}`:H.jsxDEV("span",{className:"mode",children:"none"},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:C.refresh?.failed?H.jsxDEV("span",{role:"alert",children:["failed ×",C.refresh.failed.count??1,": ",C.refresh.failed.reason??""]},void 0,!0,void 0,this):C.root?IJ(C.refresh?.observedAt??C.refresh?.at):H.jsxDEV("span",{className:"mode",children:"—"},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:C.lastReceipt?`${C.lastReceipt.status??""} ${C.lastReceipt.externalId??""} ${C.lastReceipt.reason??""}`.trim():H.jsxDEV("span",{className:"mode",children:"—"},void 0,!1,void 0,this)},void 0,!1,void 0,this),K?H.jsxDEV("td",{children:[H.jsxDEV("button",{onClick:()=>void o5({title:`Read ${F0(C.twin)} now?`,body:`The real ${F0(C.twin)}'s current state is read into this World. Nothing is written to ${F0(C.twin)}.`,action:"Read from it"}).then((v)=>{if(v)k(`refresh ${C.twin}`,`/-/${Q}/twins/${C.twin}/refresh`,{method:"POST"})}),disabled:!C.root,title:"Read the real service's current state into this World",children:"Read from it"},void 0,!1,void 0,this)," ",H.jsxDEV("button",{onClick:()=>{let v=window.prompt(`The real ${F0(C.twin)}'s address (its API's URL); empty disconnects it`,C.root?.url??"");if(v===null)return;k(`root ${C.twin}`,`/-/${Q}/twins/${C.twin}/root`,{method:"PUT",body:JSON.stringify(v?{url:v}:null)})},title:"Connect this vendor to the real service's URL (empty disconnects it)",children:"Connect…"},void 0,!1,void 0,this)," ",H.jsxDEV("button",{onClick:()=>{let v=window.prompt(`The real ${F0(C.twin)} key: it is sealed beside this World and never shown again`);if(!v)return;k(`seal ${C.twin}`,`/-/${Q}/twins/${C.twin}/credential`,{method:"PUT",body:v,headers:{"content-type":"text/plain"}})},title:"Give this World the real service's key; it is sealed and never shown again",children:"Real key…"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},C.twin,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("h3",{children:"Traffic (last 24 hours)"},void 0,!1,void 0,this),I&&(I.journalFailures??0)>0?H.jsxDEV("p",{className:"mode",role:"alert",children:[I.journalFailures," request ",I.journalFailures===1?"line was":"lines were"," not kept by this World's server since it started (its links, and the twins it runs in its own process): those requests are missing below."]},void 0,!0,void 0,this):null,I===null?H.jsxDEV("p",{className:"mode",children:"No request report for this world."},void 0,!1,void 0,this):I.requests===0?H.jsxDEV("p",{className:"mode",children:["No requests recorded in the last 24 hours. Recording is kept unless the World runs with ",H.jsxDEV("code",{children:"VOLTER_TWIN_REQUEST_JOURNAL=0"},void 0,!1,void 0,this),"; what the requests changed is always in Activity."]},void 0,!0,void 0,this):H.jsxDEV("table",{"aria-label":"Requests by twin",children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"vendor"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"requests"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"by status"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"p50"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"p95"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"top routes"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:I.twins.map((C)=>H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:C.twin},void 0,!1,void 0,this),H.jsxDEV("td",{children:C.requests},void 0,!1,void 0,this),H.jsxDEV("td",{children:Object.entries(C.byStatus).map(([v,b])=>`${v}: ${b}`).join(" · ")||"—"},void 0,!1,void 0,this),H.jsxDEV("td",{children:C.p50Ms===null?"—":`${C.p50Ms} ms`},void 0,!1,void 0,this),H.jsxDEV("td",{children:C.p95Ms===null?"—":`${C.p95Ms} ms`},void 0,!1,void 0,this),H.jsxDEV("td",{children:C.topRoutes.slice(0,5).map((v)=>H.jsxDEV("div",{children:[H.jsxDEV("code",{children:v.route},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:["×",v.requests]},void 0,!0,void 0,this)]},v.route,!0,void 0,this))},void 0,!1,void 0,this)]},C.twin,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("h3",{children:"Sending changes to the real services"},void 0,!1,void 0,this),H.jsxDEV("p",{className:"mode",children:["A changeset is a set of this World's changes (",H.jsxDEV("code",{children:'volter world changeset -m "…"'},void 0,!1,void 0,this),"), verified and approved, then deployed to each connected real service."]},void 0,!0,void 0,this),O===null?H.jsxDEV("p",{children:"Loading…"},void 0,!1,void 0,this):O.length===0?H.jsxDEV("p",{className:"mode",children:"No changesets yet."},void 0,!1,void 0,this):H.jsxDEV("table",{children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"name"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"changes"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"approvals"},void 0,!1,void 0,this),K?H.jsxDEV("th",{children:"actions"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:O.map((C)=>H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:C.name},void 0,!1,void 0,this),H.jsxDEV("td",{children:Array.isArray(C.actions)?C.actions.length:"—"},void 0,!1,void 0,this),H.jsxDEV("td",{children:Array.isArray(C.approvals)?C.approvals.length:0},void 0,!1,void 0,this),K?H.jsxDEV("td",{children:[H.jsxDEV("button",{onClick:()=>void k(`verify ${C.name}`,`/-/${Q}/changesets/${encodeURIComponent(C.name)}/verify`,{method:"POST"}),children:"Verify"},void 0,!1,void 0,this)," ",H.jsxDEV("button",{onClick:()=>{let v=window.prompt(`Approve ${C.name} as`);if(!v)return;k(`approve ${C.name}`,`/-/${Q}/changesets/${encodeURIComponent(C.name)}/approve`,{method:"POST",body:JSON.stringify({as:v})})},children:"Approve"},void 0,!1,void 0,this)," ",H.jsxDEV("button",{onClick:()=>void o5({title:`Deploy ${C.name}?`,body:"Its changes are sent to the real services now. That is what the World exists to keep you from doing by accident.",action:"Deploy to the real services",danger:!0,typed:C.name}).then((v)=>{if(v)k(`deploy ${C.name}`,`/-/${Q}/deploy/${encodeURIComponent(C.name)}`,{method:"POST",body:JSON.stringify({confirm:C.name})})}),children:"Deploy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},C.name,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Z?H.jsxDEV("div",{className:"danger",role:"region","aria-label":"Danger zone",children:[H.jsxDEV("h3",{children:"Danger zone"},void 0,!1,void 0,this),H.jsxDEV("p",{children:[H.jsxDEV("button",{onClick:()=>void h(),children:"Rotate tokens"},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:"New tokens for this World; every app, script and browser using the old ones is signed out."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.jsxDEV("p",{children:[H.jsxDEV("button",{onClick:()=>void P(),children:"Remove world"},void 0,!1,void 0,this)," ",H.jsxDEV("span",{className:"mode",children:"Deletes this World and everything in it."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function cV({name:Q,token:U,twin:Z}){let[K,X]=B1.useState("log"),[W,z]=B1.useState(null),[B,O]=B1.useState(null);B1.useEffect(()=>{(async()=>{let I=await X0(U,`/-/${Q}/log/${Z}?limit=1`);if(!I.ok){z({position:0,entries:[]});return}let{position:D}=await I.json(),V=Math.max(0,D-200),h=await(await X0(U,`/-/${Q}/log/${Z}?after=${V}&limit=200&receipts=1`)).json();z({position:h.position,entries:[...h.entries].reverse()});let P=await X0(U,`/-/${Q}/checkpoint/${Z}`);O(P.ok?(await P.json()).tree:[])})()},[Q,U,Z]);let[T,R]=B1.useState(!1);B1.useEffect(()=>{X0(U,`/-/${Q}/twins/${Z}/status`).then(async(I)=>R(I.ok&&(await I.json()).mirror===!0),()=>R(!1))},[Q,U,Z]);let L=`${w6}/${Q}/${Z}/mirror/`,M=()=>{let I=document.createElement("form");I.method="POST",I.action=`${w6}/-/${Q}/session`;for(let[D,V]of[["token",U],["next",`/${Q}/${Z}/mirror/`]]){let k=document.createElement("input");k.type="hidden",k.name=D,k.value=V,I.append(k)}document.body.append(I),I.submit(),I.remove()},f=(I)=>I.operation==="observed"?`observed${I.provenance==="placeholder"?" (default data)":" (vendor)"}`:I.receipt?`${I.receipt.status??""} ${I.receipt.externalId??""} ${I.receipt.reason??""}`.trim():I.provenance==="placeholder"?"default data":"unpushed";return H.jsxDEV("section",{"aria-labelledby":"twin",children:[H.jsxDEV("h2",{id:"twin",children:[Z," in ",Q]},void 0,!0,void 0,this),H.jsxDEV("p",{children:["position ",W?.position??"…"," · ",H.jsxDEV("code",{children:[w6,"/",Q,"/",Z]},void 0,!0,void 0,this),T?H.jsxDEV(H.Fragment,{children:[" · ",H.jsxDEV("a",{href:L,onClick:(I)=>{I.preventDefault(),M()},children:["Open as ",Z," shows it"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),H.jsxDEV("div",{role:"tablist",children:[H.jsxDEV("button",{role:"tab","aria-selected":K==="log",onClick:()=>X("log"),children:"Log"},void 0,!1,void 0,this),H.jsxDEV("button",{role:"tab","aria-selected":K==="tree",onClick:()=>X("tree"),children:"Tree"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K==="log"?W===null?H.jsxDEV("p",{children:"Loading…"},void 0,!1,void 0,this):W.entries.length===0?H.jsxDEV("p",{children:"No changes yet."},void 0,!1,void 0,this):H.jsxDEV("table",{children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"when"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"operation"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"subject"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"actor"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"standing"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:W.entries.map((I)=>H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:IJ(I.occurredAt)},void 0,!1,void 0,this),H.jsxDEV("td",{children:I.operation??I.op},void 0,!1,void 0,this),H.jsxDEV("td",{children:H.jsxDEV("code",{children:[I.subject.type,":",I.subject.id]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:I.actor?`${I.actor.kind}${I.actor.id?` ${I.actor.id}`:""}`:"—"},void 0,!1,void 0,this),H.jsxDEV("td",{children:nq(I)},void 0,!1,void 0,this)]},I.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):B===null?H.jsxDEV("p",{children:"Loading…"},void 0,!1,void 0,this):B.length===0?H.jsxDEV("p",{children:"The tree is empty."},void 0,!1,void 0,this):H.jsxDEV("table",{children:[H.jsxDEV("thead",{children:H.jsxDEV("tr",{children:[H.jsxDEV("th",{children:"type"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"id"},void 0,!1,void 0,this),H.jsxDEV("th",{children:"fields"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("tbody",{children:B.filter((I)=>I.deleted!==!0).slice(0,500).map((I)=>{let{type:D,id:V,...k}=I;return H.jsxDEV("tr",{children:[H.jsxDEV("td",{children:D},void 0,!1,void 0,this),H.jsxDEV("td",{children:H.jsxDEV("code",{children:V},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.jsxDEV("td",{children:H.jsxDEV("pre",{children:JSON.stringify(k,null,1).slice(0,600)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},`${D}:${V}`,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}bX();ER.createRoot(NJ).render(H.jsxDEV(H.Fragment,{children:[H.jsxDEV(zV,{},void 0,!1,void 0,this),H.jsxDEV(OR,{},void 0,!1,void 0,this),H.jsxDEV(RR,{},void 0,!1,void 0,this),H.jsxDEV(TR,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this));
|
|
33
|
+
`)),H=Y.reduce((K,X)=>K.concat(...X),[]);return[Y,H]}return[[],[]]},[_]);return r.useEffect(()=>{let L=Q?.target??_9,Y=Q?.actInsideInputWithModifier??!0;if(_!==null){let H=(z)=>{if(U.current=z.ctrlKey||z.metaKey||z.shiftKey||z.altKey,(!U.current||U.current&&!Y)&&O6(z))return!1;let O=J9(z.code,F);if(G.current.add(z[O]),Q9(Z,G.current,!1)){let T=z.composedPath?.()?.[0]||z.target,B=T?.nodeName==="BUTTON"||T?.nodeName==="A";if(Q.preventDefault!==!1&&(U.current||!B))z.preventDefault();q(!0)}},K=(z)=>{let W=J9(z.code,F);if(Q9(Z,G.current,!0))q(!1),G.current.clear();else G.current.delete(z[W]);if(z.key==="Meta")G.current.clear();U.current=!1},X=()=>{G.current.clear(),q(!1)};return L?.addEventListener("keydown",H),L?.addEventListener("keyup",K),window.addEventListener("blur",X),window.addEventListener("contextmenu",X),()=>{L?.removeEventListener("keydown",H),L?.removeEventListener("keyup",K),window.removeEventListener("blur",X),window.removeEventListener("contextmenu",X)}}},[_,q]),J}function Q9(_,Q,J){return _.filter((q)=>J||q.length===Q.size).some((q)=>q.every((U)=>Q.has(U)))}function J9(_,Q){return Q.includes(_)?"code":"key"}var KU=()=>{let _=N1();return r.useMemo(()=>{return{zoomIn:async(Q)=>{let{panZoom:J}=_.getState();return J?J.scaleBy(1.2,Q):!1},zoomOut:async(Q)=>{let{panZoom:J}=_.getState();return J?J.scaleBy(0.8333333333333334,Q):!1},zoomTo:async(Q,J)=>{let{panZoom:q}=_.getState();return q?q.scaleTo(Q,J):!1},getZoom:()=>_.getState().transform[2],setViewport:async(Q,J)=>{let{transform:[q,U,G],panZoom:Z}=_.getState();if(!Z)return!1;return await Z.setViewport({x:Q.x??q,y:Q.y??U,zoom:Q.zoom??G},J),!0},getViewport:()=>{let[Q,J,q]=_.getState().transform;return{x:Q,y:J,zoom:q}},setCenter:async(Q,J,q)=>{return _.getState().setCenter(Q,J,q)},fitBounds:async(Q,J)=>{let{width:q,height:U,minZoom:G,maxZoom:Z,panZoom:F}=_.getState(),L=A5(Q,q,U,G,Z,J?.padding??0.1);if(!F)return!1;return await F.setViewport(L,{duration:J?.duration,ease:J?.ease,interpolate:J?.interpolate}),!0},screenToFlowPosition:(Q,J={})=>{let{transform:q,snapGrid:U,snapToGrid:G,domNode:Z}=_.getState();if(!Z)return Q;let{x:F,y:L}=Z.getBoundingClientRect(),Y={x:Q.x-F,y:Q.y-L},H=J.snapGrid??U,K=J.snapToGrid??G;return u2(Y,q,K,H)},flowToScreenPosition:(Q)=>{let{transform:J,domNode:q}=_.getState();if(!q)return Q;let{x:U,y:G}=q.getBoundingClientRect(),Z=U2(Q,J);return{x:Z.x+U,y:Z.y+G}}}},[])};function N9(_,Q){let J=[],q=new Map,U=[];for(let G of _)if(G.type==="add"){U.push(G);continue}else if(G.type==="remove"||G.type==="replace")q.set(G.id,[G]);else{let Z=q.get(G.id);if(Z)Z.push(G);else q.set(G.id,[G])}for(let G of Q){let Z=q.get(G.id);if(!Z){J.push(G);continue}if(Z[0].type==="remove")continue;if(Z[0].type==="replace"){J.push({...Z[0].item});continue}let F={...G};for(let L of Z)HU(L,F);J.push(F)}if(U.length)U.forEach((G)=>{if(G.index!==void 0)J.splice(G.index,0,{...G.item});else J.push({...G.item})});return J}function HU(_,Q){switch(_.type){case"select":{Q.selected=_.selected;break}case"position":{if(typeof _.position<"u")Q.position=_.position;if(typeof _.dragging<"u")Q.dragging=_.dragging;break}case"dimensions":{if(typeof _.dimensions<"u"){if(Q.measured={..._.dimensions},_.setAttributes){if(_.setAttributes===!0||_.setAttributes==="width")Q.width=_.dimensions.width;if(_.setAttributes===!0||_.setAttributes==="height")Q.height=_.dimensions.height}}if(typeof _.resizing==="boolean")Q.resizing=_.resizing;break}}}function C9(_,Q){return N9(_,Q)}function XU(_,Q){return N9(_,Q)}function F2(_,Q){return{id:_,type:"select",selected:Q}}function D2(_,Q=new Set,J=!1){let q=[];for(let[U,G]of _){let Z=Q.has(U);if(!(G.selected===void 0&&!Z)&&G.selected!==Z){if(J)G.selected=Z;q.push(F2(G.id,Z))}}return q}function $9({items:_=[],lookup:Q}){let J=[],q=new Map(_.map((U)=>[U.id,U]));for(let[U,G]of _.entries()){let Z=Q.get(G.id),F=Z?.internals?.userNode??Z;if(F!==void 0&&F!==G)J.push({id:G.id,item:G,type:"replace"});if(F===void 0)J.push({item:G,type:"add",index:U})}for(let[U]of Q)if(q.get(U)===void 0)J.push({id:U,type:"remove"});return J}function q9(_){return{id:_.id,type:"remove"}}var YU=W6("React Flow","https://reactflow.dev/");function LU(_,Q,J={}){return B7(_,Q,{...J,onError:J.onError??YU})}var U9=(_)=>G7(_),zU=(_)=>K6(_);function S9(_){return r.forwardRef(_)}var k9=typeof window<"u"?r.useLayoutEffect:r.useEffect;function G9(_){let[Q,J]=r.useState(BigInt(0)),[q]=r.useState(()=>WU(()=>J((U)=>U+BigInt(1))));return k9(()=>{let U=q.get();if(U.length)_(U),q.reset()},[Q]),q}function WU(_){let Q=[];return{get:()=>Q,reset:()=>{Q=[]},push:(J)=>{Q.push(J),_()}}}var y9=r.createContext(null);function AU({children:_}){let Q=N1(),J=r.useCallback((F)=>{let{nodes:L=[],setNodes:Y,hasDefaultNodes:H,onNodesChange:K,nodeLookup:X,fitViewQueued:z,onNodesChangeMiddlewareMap:W}=Q.getState(),O=L;for(let B of F)O=typeof B==="function"?B(O):B;let T=$9({items:O,lookup:X});for(let B of W.values())T=B(T);if(H)Y(O);if(T.length>0)K?.(T);else if(z)window.requestAnimationFrame(()=>{let{fitViewQueued:B,nodes:w,setNodes:A}=Q.getState();if(B)A(w)})},[]),q=G9(J),U=r.useCallback((F)=>{let{edges:L=[],setEdges:Y,hasDefaultEdges:H,onEdgesChange:K,edgeLookup:X}=Q.getState(),z=L;for(let W of F)z=typeof W==="function"?W(z):W;if(H)Y(z);else if(K)K($9({items:z,lookup:X}))},[]),G=G9(U),Z=r.useMemo(()=>({nodeQueue:q,edgeQueue:G}),[]);return l.jsx(y9.Provider,{value:Z,children:_})}function BU(){let _=r.useContext(y9);if(!_)throw Error("useBatchContext must be used within a BatchProvider");return _}var MU=(_)=>!!_.panZoom;function T5(){let _=KU(),Q=N1(),J=BU(),q=B1(MU),U=r.useMemo(()=>{let G=(K)=>Q.getState().nodeLookup.get(K),Z=(K)=>{J.nodeQueue.push(K)},F=(K)=>{J.edgeQueue.push(K)},L=(K)=>{let{nodeLookup:X,nodeOrigin:z}=Q.getState(),W=U9(K)?K:X.get(K.id),O=W.parentId?B6(W.position,W.measured,W.parentId,X,z):W.position,T={...W,position:O,width:W.measured?.width??W.width,height:W.measured?.height??W.height};return j2(T)},Y=(K,X,z={replace:!1})=>{Z((W)=>W.map((O)=>{if(O.id===K){let T=typeof X==="function"?X(O):X;return z.replace&&U9(T)?T:{...O,...T}}return O}))},H=(K,X,z={replace:!1})=>{F((W)=>W.map((O)=>{if(O.id===K){let T=typeof X==="function"?X(O):X;return z.replace&&zU(T)?T:{...O,...T}}return O}))};return{getNodes:()=>Q.getState().nodes.map((K)=>({...K})),getNode:(K)=>G(K)?.internals.userNode,getInternalNode:G,getEdges:()=>{let{edges:K=[]}=Q.getState();return K.map((X)=>({...X}))},getEdge:(K)=>Q.getState().edgeLookup.get(K),setNodes:Z,setEdges:F,addNodes:(K)=>{let X=Array.isArray(K)?K:[K];J.nodeQueue.push((z)=>[...z,...X])},addEdges:(K)=>{let X=Array.isArray(K)?K:[K];J.edgeQueue.push((z)=>[...z,...X])},toObject:()=>{let{nodes:K=[],edges:X=[],transform:z}=Q.getState(),[W,O,T]=z;return{nodes:K.map((B)=>({...B})),edges:X.map((B)=>({...B})),viewport:{x:W,y:O,zoom:T}}},deleteElements:async({nodes:K=[],edges:X=[]})=>{let{nodes:z,edges:W,onNodesDelete:O,onEdgesDelete:T,triggerNodeChanges:B,triggerEdgeChanges:w,onDelete:A,onBeforeDelete:R}=Q.getState(),{nodes:I,edges:C}=await K7({nodesToRemove:K,edgesToRemove:X,nodes:z,edges:W,onBeforeDelete:R}),P=C.length>0,S=I.length>0;if(P){let N=C.map(q9);T?.(C),w(N)}if(S){let N=I.map(q9);O?.(I),B(N)}if(S||P)A?.({nodes:I,edges:C});return{deletedNodes:I,deletedEdges:C}},getIntersectingNodes:(K,X=!0,z)=>{let W=z6(K),O=W?K:L(K),T=z!==void 0;if(!O)return[];return(z||Q.getState().nodes).filter((B)=>{let w=Q.getState().nodeLookup.get(B.id);if(w&&!W&&(B.id===K.id||!w.internals.positionAbsolute))return!1;let A=j2(T?B:w),R=W5(A,O);return X&&R>0||R>=A.width*A.height||R>=O.width*O.height})},isNodeIntersecting:(K,X,z=!0)=>{let O=z6(K)?K:L(K);if(!O)return!1;let T=W5(O,X);return z&&T>0||T>=X.width*X.height||T>=O.width*O.height},updateNode:Y,updateNodeData:(K,X,z={replace:!1})=>{Y(K,(W)=>{let O=typeof X==="function"?X(W):X;return z.replace?{...W,data:O}:{...W,data:{...W.data,...O}}},z)},updateEdge:H,updateEdgeData:(K,X,z={replace:!1})=>{H(K,(W)=>{let O=typeof X==="function"?X(W):X;return z.replace?{...W,data:O}:{...W,data:{...W.data,...O}}},z)},getNodesBounds:(K)=>{let{nodeLookup:X,nodeOrigin:z}=Q.getState();return X6(K,{nodeLookup:X,nodeOrigin:z})},getHandleConnections:({type:K,id:X,nodeId:z})=>Array.from(Q.getState().connectionLookup.get(`${z}-${K}${X?`-${X}`:""}`)?.values()??[]),getNodeConnections:({type:K,handleId:X,nodeId:z})=>Array.from(Q.getState().connectionLookup.get(`${z}${K?X?`-${K}-${X}`:`-${K}`:""}`)?.values()??[]),fitView:async(K)=>{let X=Q.getState().fitViewResolver??Y7();return Q.setState({fitViewQueued:!0,fitViewOptions:K,fitViewResolver:X}),J.nodeQueue.push((z)=>[...z]),X.promise}}},[]);return r.useMemo(()=>{return{...U,..._,viewportInitialized:q}},[q])}var Z9=(_)=>_.selected,TU=typeof window<"u"?window:void 0;function RU({deleteKeyCode:_,multiSelectionKeyCode:Q}){let J=N1(),{deleteElements:q}=T5(),U=M5(_,{actInsideInputWithModifier:!1}),G=M5(Q,{target:TU});r.useEffect(()=>{if(U){let{edges:Z,nodes:F}=J.getState();q({nodes:F.filter(Z9),edges:Z.filter(Z9)}),J.setState({nodesSelectionActive:!1})}},[U]),r.useEffect(()=>{J.setState({multiSelectionActive:G})},[G])}function OU(_){let Q=N1();r.useEffect(()=>{let J=()=>{if(!_.current||!(_.current.checkVisibility?.()??!0))return!1;let q=G4(_.current);if(q.height===0||q.width===0)Q.getState().onError?.("004",r1.error004());Q.setState({width:q.width||500,height:q.height||500})};if(_.current){J(),window.addEventListener("resize",J);let q=new ResizeObserver(()=>J());return q.observe(_.current),()=>{if(window.removeEventListener("resize",J),q&&_.current)q.unobserve(_.current)}}},[])}var R4={position:"absolute",width:"100%",height:"100%",top:0,left:0},fU=(_)=>({userSelectionActive:_.userSelectionActive,lib:_.lib,connectionInProgress:_.connection.inProgress});function IU({onPaneContextMenu:_,zoomOnScroll:Q=!0,zoomOnPinch:J=!0,panOnScroll:q=!1,panActivationKeyPressed:U,panOnScrollSpeed:G=0.5,panOnScrollMode:Z=I0.Free,zoomOnDoubleClick:F=!0,panOnDrag:L=!0,defaultViewport:Y,translateExtent:H,minZoom:K,maxZoom:X,zoomActivationKeyCode:z,preventScrolling:W=!0,children:O,noWheelClassName:T,noPanClassName:B,onViewportChange:w,isControlledViewport:A,paneClickDistance:R,selectionOnDrag:I}){let C=N1(),P=r.useRef(null),{userSelectionActive:S,lib:N,connectionInProgress:v}=B1(fU,P1),j=M5(z),m=r.useRef();OU(P);let p=r.useCallback((k)=>{if(w?.({x:k[0],y:k[1],zoom:k[2]}),!A)C.setState({transform:k})},[w,A]);return r.useEffect(()=>{if(P.current){m.current=b7({domNode:P.current,minZoom:K,maxZoom:X,translateExtent:H,viewport:Y,onDraggingChange:(E)=>C.setState((u)=>u.paneDragging===E?u:{paneDragging:E}),onPanZoomStart:(E,u)=>{let{onViewportChangeStart:h,onMoveStart:f}=C.getState();f?.(E,u),h?.(u)},onPanZoom:(E,u)=>{let{onViewportChange:h,onMove:f}=C.getState();f?.(E,u),h?.(u)},onPanZoomEnd:(E,u)=>{let{onViewportChangeEnd:h,onMoveEnd:f}=C.getState();f?.(E,u),h?.(u)}});let{x:k,y:D,zoom:V}=m.current.getViewport();return C.setState({panZoom:m.current,transform:[k,D,V],domNode:P.current.closest(".react-flow")}),()=>{m.current?.destroy()}}},[]),r.useEffect(()=>{m.current?.update({onPaneContextMenu:_,zoomOnScroll:Q,zoomOnPinch:J,panOnScroll:q,panActivationKeyPressed:U,panOnScrollSpeed:G,panOnScrollMode:Z,zoomOnDoubleClick:F,panOnDrag:L,zoomActivationKeyPressed:j,preventScrolling:W,noPanClassName:B,userSelectionActive:S,noWheelClassName:T,lib:N,onTransformChange:p,connectionInProgress:v,selectionOnDrag:I,paneClickDistance:R})},[_,Q,J,q,U,G,Z,F,L,j,W,B,S,T,N,p,v,I,R]),l.jsx("div",{className:"react-flow__renderer",ref:P,style:R4,children:O})}var wU=(_)=>({userSelectionActive:_.userSelectionActive,userSelectionRect:_.userSelectionRect});function PU(){let{userSelectionActive:_,userSelectionRect:Q}=B1(wU,P1);if(!(_&&Q))return null;return l.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:Q.width,height:Q.height,transform:`translate(${Q.x}px, ${Q.y}px)`}})}var v6=(_,Q)=>{return(J)=>{if(J.target!==Q.current)return;_?.(J)}},NU=(_)=>({userSelectionActive:_.userSelectionActive,elementsSelectable:_.elementsSelectable,dragging:_.paneDragging,panBy:_.panBy,autoPanSpeed:_.autoPanSpeed});function CU({isSelecting:_,selectionKeyPressed:Q,selectionMode:J=$2.Full,panOnDrag:q,autoPanOnSelection:U,paneClickDistance:G,selectionOnDrag:Z,onSelectionStart:F,onSelectionEnd:L,onPaneClick:Y,onPaneContextMenu:H,onPaneScroll:K,onPaneMouseEnter:X,onPaneMouseMove:z,onPaneMouseLeave:W,children:O}){let T=r.useRef(0),B=N1(),{userSelectionActive:w,elementsSelectable:A,dragging:R,panBy:I,autoPanSpeed:C}=B1(NU,P1),P=A&&(_||w),S=r.useRef(null),N=r.useRef(),v=r.useRef(new Set),j=r.useRef(new Set),m=r.useRef(!1),p=r.useRef(!1),k=r.useRef({x:0,y:0}),D=r.useRef(!1),V=(c)=>{if(p.current||m.current||B.getState().connection.inProgress){p.current=!1,m.current=!1;return}Y?.(c),B.getState().resetSelectedElements(),B.setState({nodesSelectionActive:!1})},E=(c)=>{if(Array.isArray(q)&&q?.includes(2)){c.preventDefault();return}H?.(c)},u=K?(c)=>K(c):void 0,h=(c)=>{if(p.current)c.stopPropagation(),p.current=!1},f=(c)=>{if(c.pointerType==="touch"&&q!==!1&&!Q)return;let{domNode:n,transform:Q1}=B.getState();if(N.current=n?.getBoundingClientRect(),!N.current)return;let F1=c.target===S.current;if(!F1&&!!c.target.closest(".nokey")||!_||!(Z&&F1||Q)||c.button!==0||!c.isPrimary)return;c.target?.setPointerCapture?.(c.pointerId),p.current=!1;let{x:Y1,y:s}=_0(c.nativeEvent,N.current),K1=u2({x:Y1,y:s},Q1);if(B.setState({userSelectionRect:{width:0,height:0,startX:K1.x,startY:K1.y,x:Y1,y:s}}),!F1)c.stopPropagation(),c.preventDefault()};function y(c,n){let{userSelectionRect:Q1}=B.getState();if(!Q1)return;let{transform:F1,nodeLookup:J1,edgeLookup:U1,connectionLookup:Y1,triggerNodeChanges:s,triggerEdgeChanges:K1,defaultEdgeOptions:O1}=B.getState(),Z1={x:Q1.startX,y:Q1.startY},{x:D1,y:x1}=U2(Z1,F1),t1={startX:Z1.x,startY:Z1.y,x:c<D1?c:D1,y:n<x1?n:x1,width:Math.abs(c-D1),height:Math.abs(n-x1)},k0=v.current,F0=j.current;v.current=new Set(J4(J1,t1,F1,J===$2.Partial,!0).map((d1)=>d1.id)),j.current=new Set;let M0=O1?.selectable??!0;for(let d1 of v.current){let o1=Y1.get(d1);if(!o1)continue;for(let{edgeId:n1}of o1.values()){let K0=U1.get(n1);if(K0&&(K0.selectable??M0))j.current.add(n1)}}if(!M6(k0,v.current)){let d1=D2(J1,v.current,!0);s(d1)}if(!M6(F0,j.current)){let d1=D2(U1,j.current);K1(d1)}B.setState({userSelectionRect:t1,userSelectionActive:!0,nodesSelectionActive:!1})}function g(){if(!U||!N.current)return;let[c,n]=$4(k.current,N.current,C);I({x:c,y:n}).then((Q1)=>{if(!p.current||!Q1){T.current=requestAnimationFrame(g);return}let{x:F1,y:J1}=k.current;y(F1,J1),T.current=requestAnimationFrame(g)})}let b=()=>{cancelAnimationFrame(T.current),T.current=0,D.current=!1};r.useEffect(()=>{return()=>b()},[]);let t=(c)=>{let{userSelectionRect:n,transform:Q1,resetSelectedElements:F1}=B.getState();if(!N.current||!n)return;let{x:J1,y:U1}=_0(c.nativeEvent,N.current);k.current={x:J1,y:U1};let Y1=U2({x:n.startX,y:n.startY},Q1);if(!p.current){let s=Q?0:G;if(Math.hypot(J1-Y1.x,U1-Y1.y)<=s)return;F1(),F?.(c)}if(p.current=!0,!D.current)g(),D.current=!0;y(J1,U1)},o=(c)=>{if(!P){if(c.target===S.current&&B.getState().connection.inProgress)m.current=!0;return}if(c.button!==0)return;if(c.target?.releasePointerCapture?.(c.pointerId),!w&&c.target===S.current&&B.getState().userSelectionRect)V?.(c);if(B.setState({userSelectionActive:!1,userSelectionRect:null}),p.current)L?.(c),B.setState({nodesSelectionActive:v.current.size>0});b()},d=(c)=>{c.target?.releasePointerCapture?.(c.pointerId),b()},a=q===!0||Array.isArray(q)&&q.includes(0);return l.jsxs("div",{className:C1(["react-flow__pane",{draggable:a,dragging:R,selection:_}]),onClick:P?void 0:v6(V,S),onContextMenu:v6(E,S),onWheel:v6(u,S),onPointerEnter:P?void 0:X,onPointerMove:P?t:z,onPointerUp:o,onPointerCancel:P?d:void 0,onPointerDownCapture:P?f:void 0,onClickCapture:P?h:void 0,onPointerLeave:W,ref:S,style:R4,children:[O,l.jsx(PU,{})]})}function V6({id:_,store:Q,unselect:J=!1,nodeRef:q}){let{addSelectedNodes:U,unselectNodesAndEdges:G,multiSelectionActive:Z,nodeLookup:F,onError:L}=Q.getState(),Y=F.get(_);if(!Y){L?.("012",r1.error012(_));return}if(Q.setState({nodesSelectionActive:!1}),!Y.selected)U([_]);else if(J||Y.selected&&Z)G({nodes:[Y],edges:[]}),requestAnimationFrame(()=>q?.current?.blur())}function v9({nodeRef:_,disabled:Q=!1,noDragClassName:J,handleSelector:q,nodeId:U,isSelectable:G,nodeClickDistance:Z}){let F=N1(),[L,Y]=r.useState(!1),H=r.useRef();return r.useEffect(()=>{if(Q)return;return H.current=C7({getStoreItems:()=>F.getState(),onNodeMouseDown:(K)=>{V6({id:K,store:F,nodeRef:_})},onDragStart:()=>{Y(!0)},onDragStop:()=>{Y(!1)}}),()=>{H.current?.destroy(),H.current=void 0}},[Q,F,_]),r.useEffect(()=>{if(Q||!_.current||!H.current)return;H.current.update({noDragClassName:J,handleSelector:q,domNode:_.current,isSelectable:G,nodeId:U,nodeClickDistance:Z})},[J,q,Q,G,_,U,Z]),L}var SU=(_)=>(Q)=>Q.selected&&(Q.draggable||_&&typeof Q.draggable>"u");function j9(){let _=N1();return r.useCallback((J)=>{let{nodeExtent:q,snapToGrid:U,snapGrid:G,nodesDraggable:Z,onError:F,updateNodePositions:L,nodeLookup:Y,nodeOrigin:H}=_.getState(),K=new Map,X=SU(Z),z=U?G[0]:5,W=U?G[1]:5,O=J.direction.x*z*J.factor,T=J.direction.y*W*J.factor;for(let[,B]of Y){if(!X(B))continue;let w={x:B.internals.positionAbsolute.x+O,y:B.internals.positionAbsolute.y+T};if(U)w=V2(w,G);let{position:A,positionAbsolute:R}=Y6({nodeId:B.id,nextPosition:w,nodeLookup:Y,nodeExtent:q,nodeOrigin:H,onError:F});B.position=A,B.internals.positionAbsolute=R,K.set(B.id,B)}L(K)},[])}var u6=r.createContext(null),kU=u6.Provider;u6.Consumer;var b6=()=>{return r.useContext(u6)},yU=(_)=>({connectOnClick:_.connectOnClick,noPanClassName:_.noPanClassName,rfId:_.rfId}),V9=r.createContext(null);function vU({children:_}){let Q=B1(yU,P1);return l.jsx(V9.Provider,{value:Q,children:_})}function jU(){let _=r.useContext(V9);if(!_)throw Error("useHandleConfig must be used within a HandleConfigProvider");return _}var VU={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},uU=(_,Q,J)=>(q)=>{let{connectionClickStartHandle:U,connectionMode:G,connection:Z}=q,{fromHandle:F,toHandle:L,isValid:Y}=Z;if(!F&&!U)return VU;let H=L?.nodeId===_&&L?.id===Q&&L?.type===J;return{connectingFrom:F?.nodeId===_&&F?.id===Q&&F?.type===J,connectingTo:H,clickConnecting:U?.nodeId===_&&U?.id===Q&&U?.type===J,isPossibleEndHandle:G===E0.Strict?F?.type!==J:_!==F?.nodeId||Q!==F?.id,connectionInProcess:!!F,clickConnectionInProcess:!!U,valid:H&&Y}};function bU({type:_="source",position:Q=$1.Top,isValidConnection:J,isConnectable:q=!0,isConnectableStart:U=!0,isConnectableEnd:G=!0,id:Z,onConnect:F,children:L,className:Y,onMouseDown:H,onTouchStart:K,...X},z){let W=Z||null,O=_==="target",T=N1(),B=b6(),{connectOnClick:w,noPanClassName:A,rfId:R}=jU(),{connectingFrom:I,connectingTo:C,clickConnecting:P,isPossibleEndHandle:S,connectionInProcess:N,clickConnectionInProcess:v,valid:j}=B1(uU(B,W,_),P1);if(!B)T.getState().onError?.("010",r1.error010());let m=(D)=>{let{defaultEdgeOptions:V,onConnect:E,hasDefaultEdges:u}=T.getState(),h={...V,...D};if(u){let{edges:f,setEdges:y,onError:g}=T.getState();y(LU(h,f,{onError:g}))}E?.(h),F?.(h)},p=(D)=>{if(!B)return;let V=f6(D.nativeEvent);if(U&&(V&&D.button===0||!V)){let E=T.getState();L4.onPointerDown(D.nativeEvent,{handleDomNode:D.currentTarget,autoPanOnConnect:E.autoPanOnConnect,connectionMode:E.connectionMode,connectionRadius:E.connectionRadius,domNode:E.domNode,nodeLookup:E.nodeLookup,lib:E.lib,isTarget:O,handleId:W,nodeId:B,flowId:E.rfId,panBy:E.panBy,cancelConnection:E.cancelConnection,onConnectStart:E.onConnectStart,onConnectEnd:(...u)=>T.getState().onConnectEnd?.(...u),updateConnection:E.updateConnection,onConnect:m,isValidConnection:J||((...u)=>T.getState().isValidConnection?.(...u)??!0),getTransform:()=>T.getState().transform,getFromHandle:()=>T.getState().connection.fromHandle,autoPanSpeed:E.autoPanSpeed,dragThreshold:E.connectionDragThreshold})}if(V)H?.(D);else K?.(D)},k=(D)=>{let{onClickConnectStart:V,onClickConnectEnd:E,connectionClickStartHandle:u,connectionMode:h,isValidConnection:f,lib:y,rfId:g,nodeLookup:b,connection:t}=T.getState();if(!B||!u&&!U)return;if(!u){V?.(D.nativeEvent,{nodeId:B,handleId:W,handleType:_}),T.setState({connectionClickStartHandle:{nodeId:B,type:_,id:W}});return}let o=R6(D.target),d=J||f,{connection:a,isValid:c}=L4.isValid(D.nativeEvent,{handle:{nodeId:B,id:W,type:_},connectionMode:h,fromNodeId:u.nodeId,fromHandleId:u.id||null,fromType:u.type,isValidConnection:d,flowId:g,doc:o,lib:y,nodeLookup:b});if(c&&a)m(a);let n=structuredClone(t);delete n.inProgress,n.toPosition=n.toHandle?n.toHandle.position:null,E?.(D,n),T.setState({connectionClickStartHandle:null})};return l.jsx("div",{"data-handleid":W,"data-nodeid":B,"data-handlepos":Q,"data-id":`${R}-${B}-${W}-${_}`,className:C1(["react-flow__handle",`react-flow__handle-${Q}`,"nodrag",A,Y,{source:!O,target:O,connectable:q,connectablestart:U,connectableend:G,clickconnecting:P,connectingfrom:I,connectingto:C,valid:j,connectionindicator:q&&(!N||S)&&(N||v?G:U)}]),onMouseDown:p,onTouchStart:p,onClick:w?k:void 0,ref:z,...X,children:L})}var B4=r.memo(S9(bU));function DU({data:_,isConnectable:Q,sourcePosition:J=$1.Bottom}){return l.jsxs(l.Fragment,{children:[_?.label,l.jsx(B4,{type:"source",position:J,isConnectable:Q})]})}function hU({data:_,isConnectable:Q,targetPosition:J=$1.Top,sourcePosition:q=$1.Bottom}){return l.jsxs(l.Fragment,{children:[l.jsx(B4,{type:"target",position:J,isConnectable:Q}),_?.label,l.jsx(B4,{type:"source",position:q,isConnectable:Q})]})}function EU(){return null}function xU({data:_,isConnectable:Q,targetPosition:J=$1.Top}){return l.jsxs(l.Fragment,{children:[l.jsx(B4,{type:"target",position:J,isConnectable:Q}),_?.label]})}var M4={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},F9={input:DU,default:hU,output:xU,group:EU};function mU(_){if(_.internals.handleBounds===void 0)return{width:_.width??_.initialWidth??_.style?.width,height:_.height??_.initialHeight??_.style?.height};return{width:_.width??_.style?.width,height:_.height??_.style?.height}}var gU=(_)=>{let{width:Q,height:J,x:q,y:U}=Z2(_.nodeLookup,{filter:(G)=>!!G.selected});return{width:e1(Q)?Q:null,height:e1(J)?J:null,userSelectionActive:_.userSelectionActive,transformString:`translate(${_.transform[0]}px,${_.transform[1]}px) scale(${_.transform[2]}) translate(${q}px,${U}px)`}};function pU({onSelectionContextMenu:_,noPanClassName:Q,disableKeyboardA11y:J}){let q=N1(),{width:U,height:G,transformString:Z,userSelectionActive:F}=B1(gU,P1),L=j9(),Y=r.useRef(null);r.useEffect(()=>{if(!J)Y.current?.focus({preventScroll:!0})},[J]);let H=!F&&U!==null&&G!==null;if(v9({nodeRef:Y,disabled:!H}),!H)return null;let K=_?(z)=>{let W=q.getState().nodes.filter((O)=>O.selected);_(z,W)}:void 0,X=(z)=>{if(Object.prototype.hasOwnProperty.call(M4,z.key))z.preventDefault(),L({direction:M4[z.key],factor:z.shiftKey?4:1})};return l.jsx("div",{className:C1(["react-flow__nodesselection","react-flow__container",Q]),style:{transform:Z},children:l.jsx("div",{ref:Y,className:"react-flow__nodesselection-rect",onContextMenu:K,tabIndex:J?void 0:-1,onKeyDown:J?void 0:X,style:{width:U,height:G}})})}var K9=typeof window<"u"?window:void 0,cU=(_)=>{return{nodesSelectionActive:_.nodesSelectionActive,userSelectionActive:_.userSelectionActive}};function u9({children:_,onPaneClick:Q,onPaneMouseEnter:J,onPaneMouseMove:q,onPaneMouseLeave:U,onPaneContextMenu:G,onPaneScroll:Z,paneClickDistance:F,deleteKeyCode:L,selectionKeyCode:Y,selectionOnDrag:H,selectionMode:K,onSelectionStart:X,onSelectionEnd:z,multiSelectionKeyCode:W,panActivationKeyCode:O,zoomActivationKeyCode:T,elementsSelectable:B,zoomOnScroll:w,zoomOnPinch:A,panOnScroll:R,panOnScrollSpeed:I,panOnScrollMode:C,zoomOnDoubleClick:P,panOnDrag:S,autoPanOnSelection:N,defaultViewport:v,translateExtent:j,minZoom:m,maxZoom:p,preventScrolling:k,onSelectionContextMenu:D,noWheelClassName:V,noPanClassName:E,disableKeyboardA11y:u,onViewportChange:h,isControlledViewport:f}){let{nodesSelectionActive:y,userSelectionActive:g}=B1(cU,P1),b=M5(Y,{target:K9}),t=M5(O,{target:K9}),o=t||S,d=t||R,a=H&&o!==!0,c=b||g||a;return RU({deleteKeyCode:L,multiSelectionKeyCode:W}),l.jsx(IU,{onPaneContextMenu:G,elementsSelectable:B,zoomOnScroll:w,zoomOnPinch:A,panOnScroll:d,panActivationKeyPressed:t,panOnScrollSpeed:I,panOnScrollMode:C,zoomOnDoubleClick:P,panOnDrag:!b&&o,defaultViewport:v,translateExtent:j,minZoom:m,maxZoom:p,zoomActivationKeyCode:T,preventScrolling:k,noWheelClassName:V,noPanClassName:E,onViewportChange:h,isControlledViewport:f,paneClickDistance:F,selectionOnDrag:a,children:l.jsxs(CU,{onSelectionStart:X,onSelectionEnd:z,onPaneClick:Q,onPaneMouseEnter:J,onPaneMouseMove:q,onPaneMouseLeave:U,onPaneContextMenu:G,onPaneScroll:Z,panOnDrag:o,autoPanOnSelection:N,isSelecting:!!c,selectionMode:K,selectionKeyPressed:b,paneClickDistance:F,selectionOnDrag:a,children:[_,y&&l.jsx(pU,{onSelectionContextMenu:D,noPanClassName:E,disableKeyboardA11y:u})]})})}u9.displayName="FlowRenderer";var lU=r.memo(u9),rU=(_)=>(Q)=>{return _?J4(Q.nodeLookup,{x:0,y:0,width:Q.width,height:Q.height},Q.transform,!0).map((J)=>J.id):Array.from(Q.nodeLookup.keys())};function iU(_){return B1(r.useCallback(rU(_),[_]),P1)}var dU=(_)=>_.updateNodeInternals;function aU(){let _=B1(dU),[Q]=r.useState(()=>{if(typeof ResizeObserver>"u")return null;return new ResizeObserver((J)=>{let q=new Map;J.forEach((U)=>{let G=U.target.getAttribute("data-id");q.set(G,{id:G,nodeElement:U.target,force:!0})}),_(q)})});return r.useEffect(()=>{return()=>{Q?.disconnect()}},[Q]),Q}function sU({node:_,nodeType:Q,hasDimensions:J,resizeObserver:q}){let U=N1(),G=r.useRef(null),Z=r.useRef(null),F=r.useRef(_.sourcePosition),L=r.useRef(_.targetPosition),Y=r.useRef(Q),H=J&&!!_.internals.handleBounds;return r.useEffect(()=>{if(G.current&&!_.hidden&&(!H||Z.current!==G.current)){if(Z.current)q?.unobserve(Z.current);q?.observe(G.current),Z.current=G.current}},[H,_.hidden]),r.useEffect(()=>{return()=>{if(Z.current)q?.unobserve(Z.current),Z.current=null}},[]),r.useEffect(()=>{if(G.current){let K=Y.current!==Q,X=F.current!==_.sourcePosition,z=L.current!==_.targetPosition;if(K||X||z)Y.current=Q,F.current=_.sourcePosition,L.current=_.targetPosition,U.getState().updateNodeInternals(new Map([[_.id,{id:_.id,nodeElement:G.current,force:!0}]]))}},[_.id,Q,_.sourcePosition,_.targetPosition]),G}function tU({id:_,onClick:Q,onMouseEnter:J,onMouseMove:q,onMouseLeave:U,onContextMenu:G,onDoubleClick:Z,nodesDraggable:F,elementsSelectable:L,nodesConnectable:Y,nodesFocusable:H,resizeObserver:K,noDragClassName:X,noPanClassName:z,disableKeyboardA11y:W,rfId:O,nodeTypes:T,nodeClickDistance:B,onError:w}){let{node:A,internals:R,isParent:I}=B1((c)=>{let n=c.nodeLookup.get(_),Q1=c.parentLookup.has(_);return{node:n,internals:n.internals,isParent:Q1}},P1),C=A.type||"default",P=T?.[C]||F9[C];if(P===void 0)w?.("003",r1.error003(C)),C="default",P=T?.default||F9.default;let S=!!(A.draggable||F&&typeof A.draggable>"u"),N=!!(A.selectable||L&&typeof A.selectable>"u"),v=!!(A.connectable||Y&&typeof A.connectable>"u"),j=!!(A.focusable||H&&typeof A.focusable>"u"),m=N1(),p=A6(A),k=sU({node:A,nodeType:C,hasDimensions:p,resizeObserver:K}),D=v9({nodeRef:k,disabled:A.hidden||!S,noDragClassName:X,handleSelector:A.dragHandle,nodeId:_,isSelectable:N,nodeClickDistance:B}),V=j9();if(A.hidden)return null;let E=Q0(A),u=mU(A),h=N||S||Q||J||q||U,f=J?(c)=>J(c,{...R.userNode}):void 0,y=q?(c)=>q(c,{...R.userNode}):void 0,g=U?(c)=>U(c,{...R.userNode}):void 0,b=G?(c)=>G(c,{...R.userNode}):void 0,t=Z?(c)=>Z(c,{...R.userNode}):void 0,o=(c)=>{let{selectNodesOnDrag:n,nodeDragThreshold:Q1}=m.getState();if(N&&(!n||!S||Q1>0))V6({id:_,store:m,nodeRef:k});if(Q)Q(c,{...R.userNode})},d=(c)=>{if(O6(c.nativeEvent)||W)return;if(G6.includes(c.key)&&N){let n=c.key==="Escape";V6({id:_,store:m,unselect:n,nodeRef:k})}else if(S&&A.selected&&Object.prototype.hasOwnProperty.call(M4,c.key)){c.preventDefault();let{ariaLabelConfig:n}=m.getState();m.setState({ariaLiveMessage:n["node.a11yDescription.ariaLiveMessage"]({direction:c.key.replace("Arrow","").toLowerCase(),x:~~R.positionAbsolute.x,y:~~R.positionAbsolute.y})}),V({direction:M4[c.key],factor:c.shiftKey?4:1})}},a=()=>{if(W||!k.current?.matches(":focus-visible"))return;let{transform:c,width:n,height:Q1,autoPanOnNodeFocus:F1,setCenter:J1}=m.getState();if(!F1)return;if(!(J4(new Map([[_,A]]),{x:0,y:0,width:n,height:Q1},c,!0).length>0))J1(A.position.x+E.width/2,A.position.y+E.height/2,{zoom:c[2]})};return l.jsx("div",{className:C1(["react-flow__node",`react-flow__node-${C}`,{[z]:S},A.className,{selected:A.selected,selectable:N,parent:I,draggable:S,dragging:D}]),ref:k,style:{zIndex:R.z,transform:`translate(${R.positionAbsolute.x}px,${R.positionAbsolute.y}px)`,pointerEvents:h?"all":"none",visibility:p?"visible":"hidden",...A.style,...u},"data-id":_,"data-testid":`rf__node-${_}`,onMouseEnter:f,onMouseMove:y,onMouseLeave:g,onContextMenu:b,onClick:o,onDoubleClick:t,onKeyDown:j?d:void 0,tabIndex:j?0:void 0,onFocus:j?a:void 0,role:A.ariaRole??(j?"group":void 0),"aria-roledescription":"node","aria-describedby":W?void 0:`${I9}-${O}`,"aria-label":A.ariaLabel,...A.domAttributes,children:l.jsx(kU,{value:_,children:l.jsx(P,{id:_,data:A.data,type:C,positionAbsoluteX:R.positionAbsolute.x,positionAbsoluteY:R.positionAbsolute.y,selected:A.selected??!1,selectable:N,draggable:S,deletable:A.deletable??!0,isConnectable:v,sourcePosition:A.sourcePosition,targetPosition:A.targetPosition,dragging:D,dragHandle:A.dragHandle,zIndex:R.z,parentId:A.parentId,...E})})})}var oU=r.memo(tU),nU=(_)=>({nodesConnectable:_.nodesConnectable,nodesFocusable:_.nodesFocusable,elementsSelectable:_.elementsSelectable,onError:_.onError});function b9(_){let{nodesConnectable:Q,nodesFocusable:J,elementsSelectable:q,onError:U}=B1(nU,P1),G=iU(_.onlyRenderVisibleElements),Z=aU();return l.jsx("div",{className:"react-flow__nodes",style:R4,children:G.map((F)=>{return l.jsx(oU,{id:F,nodeTypes:_.nodeTypes,nodeExtent:_.nodeExtent,onClick:_.onNodeClick,onMouseEnter:_.onNodeMouseEnter,onMouseMove:_.onNodeMouseMove,onMouseLeave:_.onNodeMouseLeave,onContextMenu:_.onNodeContextMenu,onDoubleClick:_.onNodeDoubleClick,noDragClassName:_.noDragClassName,noPanClassName:_.noPanClassName,rfId:_.rfId,disableKeyboardA11y:_.disableKeyboardA11y,resizeObserver:Z,nodesDraggable:_.nodesDraggable??!0,nodesConnectable:Q,nodesFocusable:J,elementsSelectable:q,nodeClickDistance:_.nodeClickDistance,onError:U},F)})})}b9.displayName="NodeRenderer";var eU=r.memo(b9);function _G(_){return B1(r.useCallback((J)=>{if(!_)return J.edges.map((U)=>U.id);let q=[];if(J.width&&J.height)for(let U of J.edges){let G=J.nodeLookup.get(U.source),Z=J.nodeLookup.get(U.target);if(G&&Z&&A7({sourceNode:G,targetNode:Z,width:J.width,height:J.height,transform:J.transform}))q.push(U.id)}return q},[_]),P1)}var QG=({color:_="none",strokeWidth:Q=1})=>{let J={strokeWidth:Q,..._&&{stroke:_}};return l.jsx("polyline",{className:"arrow",style:J,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},JG=({color:_="none",strokeWidth:Q=1})=>{let J={strokeWidth:Q,..._&&{stroke:_,fill:_}};return l.jsx("polyline",{className:"arrowclosed",style:J,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},H9={[k2.Arrow]:QG,[k2.ArrowClosed]:JG};function $G(_){let Q=N1();return r.useMemo(()=>{if(!Object.prototype.hasOwnProperty.call(H9,_))return Q.getState().onError?.("009",r1.error009(_)),null;return H9[_]},[_])}var qG=({id:_,type:Q,color:J,width:q=12.5,height:U=12.5,markerUnits:G="strokeWidth",strokeWidth:Z,orient:F="auto-start-reverse"})=>{let L=$G(Q);if(!L)return null;return l.jsx("marker",{className:"react-flow__arrowhead",id:_,markerWidth:`${q}`,markerHeight:`${U}`,viewBox:"-10 -10 20 20",markerUnits:G,orient:F,refX:"0",refY:"0",children:l.jsx(L,{color:J,strokeWidth:Z})})},D9=({defaultColor:_,rfId:Q})=>{let J=B1((G)=>G.edges),q=B1((G)=>G.defaultEdgeOptions),U=r.useMemo(()=>{return T7(J,{id:Q,defaultColor:_,defaultMarkerStart:q?.markerStart,defaultMarkerEnd:q?.markerEnd})},[J,q,Q,_]);if(!U.length)return null;return l.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:l.jsx("defs",{children:U.map((G)=>l.jsx(qG,{id:G.id,type:G.type,color:G.color,width:G.width,height:G.height,markerUnits:G.markerUnits,strokeWidth:G.strokeWidth,orient:G.orient},G.id))})})};D9.displayName="MarkerDefinitions";var UG=r.memo(D9);function h9({x:_,y:Q,label:J,labelStyle:q,labelShowBg:U=!0,labelBgStyle:G,labelBgPadding:Z=[2,4],labelBgBorderRadius:F=2,children:L,className:Y,...H}){let[K,X]=r.useState({x:1,y:0,width:0,height:0}),z=C1(["react-flow__edge-textwrapper",Y]),W=r.useRef(null);if(r.useEffect(()=>{if(W.current){let O=W.current.getBBox();X({x:O.x,y:O.y,width:O.width,height:O.height})}},[J]),!J)return null;return l.jsxs("g",{transform:`translate(${_-K.width/2} ${Q-K.height/2})`,className:z,visibility:K.width?"visible":"hidden",...H,children:[U&&l.jsx("rect",{width:K.width+2*Z[0],x:-Z[0],y:-Z[1],height:K.height+2*Z[1],className:"react-flow__edge-textbg",style:G,rx:F,ry:F}),l.jsx("text",{className:"react-flow__edge-text",y:K.height/2,dy:"0.3em",ref:W,style:q,children:J}),L]})}h9.displayName="EdgeText";var GG=r.memo(h9);function O4({path:_,labelX:Q,labelY:J,label:q,labelStyle:U,labelShowBg:G,labelBgStyle:Z,labelBgPadding:F,labelBgBorderRadius:L,interactionWidth:Y=20,...H}){return l.jsxs(l.Fragment,{children:[l.jsx("path",{...H,d:_,fill:"none",className:C1(["react-flow__edge-path",H.className])}),Y?l.jsx("path",{d:_,fill:"none",strokeOpacity:0,strokeWidth:Y,className:"react-flow__edge-interaction"}):null,q&&e1(Q)&&e1(J)?l.jsx(GG,{x:Q,y:J,label:q,labelStyle:U,labelShowBg:G,labelBgStyle:Z,labelBgPadding:F,labelBgBorderRadius:L}):null]})}function X9({pos:_,x1:Q,y1:J,x2:q,y2:U}){if(_===$1.Left||_===$1.Right)return[0.5*(Q+q),J];return[Q,0.5*(J+U)]}function E9({sourceX:_,sourceY:Q,sourcePosition:J=$1.Bottom,targetX:q,targetY:U,targetPosition:G=$1.Top}){let[Z,F]=X9({pos:J,x1:_,y1:Q,x2:q,y2:U}),[L,Y]=X9({pos:G,x1:q,y1:U,x2:_,y2:Q}),[H,K,X,z]=Z4({sourceX:_,sourceY:Q,targetX:q,targetY:U,sourceControlX:Z,sourceControlY:F,targetControlX:L,targetControlY:Y});return[`M${_},${Q} C${Z},${F} ${L},${Y} ${q},${U}`,H,K,X,z]}function x9(_){return r.memo(({id:Q,sourceX:J,sourceY:q,targetX:U,targetY:G,sourcePosition:Z,targetPosition:F,label:L,labelStyle:Y,labelShowBg:H,labelBgStyle:K,labelBgPadding:X,labelBgBorderRadius:z,style:W,markerEnd:O,markerStart:T,interactionWidth:B})=>{let[w,A,R]=E9({sourceX:J,sourceY:q,sourcePosition:Z,targetX:U,targetY:G,targetPosition:F}),I=_.isInternal?void 0:Q;return l.jsx(O4,{id:I,path:w,labelX:A,labelY:R,label:L,labelStyle:Y,labelShowBg:H,labelBgStyle:K,labelBgPadding:X,labelBgBorderRadius:z,style:W,markerEnd:O,markerStart:T,interactionWidth:B})})}var ZG=x9({isInternal:!1}),m9=x9({isInternal:!0});ZG.displayName="SimpleBezierEdge";m9.displayName="SimpleBezierEdgeInternal";function g9(_){return r.memo(({id:Q,sourceX:J,sourceY:q,targetX:U,targetY:G,label:Z,labelStyle:F,labelShowBg:L,labelBgStyle:Y,labelBgPadding:H,labelBgBorderRadius:K,style:X,sourcePosition:z=$1.Bottom,targetPosition:W=$1.Top,markerEnd:O,markerStart:T,pathOptions:B,interactionWidth:w})=>{let[A,R,I]=B5({sourceX:J,sourceY:q,sourcePosition:z,targetX:U,targetY:G,targetPosition:W,borderRadius:B?.borderRadius,offset:B?.offset,stepPosition:B?.stepPosition}),C=_.isInternal?void 0:Q;return l.jsx(O4,{id:C,path:A,labelX:R,labelY:I,label:Z,labelStyle:F,labelShowBg:L,labelBgStyle:Y,labelBgPadding:H,labelBgBorderRadius:K,style:X,markerEnd:O,markerStart:T,interactionWidth:w})})}var p9=g9({isInternal:!1}),c9=g9({isInternal:!0});p9.displayName="SmoothStepEdge";c9.displayName="SmoothStepEdgeInternal";function l9(_){return r.memo(({id:Q,...J})=>{let q=_.isInternal?void 0:Q;return l.jsx(p9,{...J,id:q,pathOptions:r.useMemo(()=>({borderRadius:0,offset:J.pathOptions?.offset}),[J.pathOptions?.offset])})})}var FG=l9({isInternal:!1}),r9=l9({isInternal:!0});FG.displayName="StepEdge";r9.displayName="StepEdgeInternal";function i9(_){return r.memo(({id:Q,sourceX:J,sourceY:q,targetX:U,targetY:G,label:Z,labelStyle:F,labelShowBg:L,labelBgStyle:Y,labelBgPadding:H,labelBgBorderRadius:K,style:X,markerEnd:z,markerStart:W,interactionWidth:O})=>{let[T,B,w]=K4({sourceX:J,sourceY:q,targetX:U,targetY:G}),A=_.isInternal?void 0:Q;return l.jsx(O4,{id:A,path:T,labelX:B,labelY:w,label:Z,labelStyle:F,labelShowBg:L,labelBgStyle:Y,labelBgPadding:H,labelBgBorderRadius:K,style:X,markerEnd:z,markerStart:W,interactionWidth:O})})}var KG=i9({isInternal:!1}),d9=i9({isInternal:!0});KG.displayName="StraightEdge";d9.displayName="StraightEdgeInternal";function a9(_){return r.memo(({id:Q,sourceX:J,sourceY:q,targetX:U,targetY:G,sourcePosition:Z=$1.Bottom,targetPosition:F=$1.Top,label:L,labelStyle:Y,labelShowBg:H,labelBgStyle:K,labelBgPadding:X,labelBgBorderRadius:z,style:W,markerEnd:O,markerStart:T,pathOptions:B,interactionWidth:w})=>{let[A,R,I]=F4({sourceX:J,sourceY:q,sourcePosition:Z,targetX:U,targetY:G,targetPosition:F,curvature:B?.curvature}),C=_.isInternal?void 0:Q;return l.jsx(O4,{id:C,path:A,labelX:R,labelY:I,label:L,labelStyle:Y,labelShowBg:H,labelBgStyle:K,labelBgPadding:X,labelBgBorderRadius:z,style:W,markerEnd:O,markerStart:T,interactionWidth:w})})}var HG=a9({isInternal:!1}),s9=a9({isInternal:!0});HG.displayName="BezierEdge";s9.displayName="BezierEdgeInternal";var Y9={default:s9,straight:d9,step:r9,smoothstep:c9,simplebezier:m9},L9={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},XG=(_,Q,J)=>{if(J===$1.Left)return _-Q;if(J===$1.Right)return _+Q;return _},YG=(_,Q,J)=>{if(J===$1.Top)return _-Q;if(J===$1.Bottom)return _+Q;return _},z9="react-flow__edgeupdater";function W9({position:_,centerX:Q,centerY:J,radius:q=10,onMouseDown:U,onMouseEnter:G,onMouseOut:Z,type:F}){return l.jsx("circle",{onMouseDown:U,onMouseEnter:G,onMouseOut:Z,className:C1([z9,`${z9}-${F}`]),cx:XG(Q,q,_),cy:YG(J,q,_),r:q,stroke:"transparent",fill:"transparent"})}function LG({isReconnectable:_,reconnectRadius:Q,edge:J,sourceX:q,sourceY:U,targetX:G,targetY:Z,sourcePosition:F,targetPosition:L,onReconnect:Y,onReconnectStart:H,onReconnectEnd:K,setReconnecting:X,setUpdateHover:z}){let W=N1(),O=(R,I)=>{if(R.button!==0)return;let{autoPanOnConnect:C,domNode:P,connectionMode:S,connectionRadius:N,lib:v,onConnectStart:j,cancelConnection:m,nodeLookup:p,rfId:k,panBy:D,updateConnection:V}=W.getState(),E=I.type==="target",u=(y,g)=>{X(!1),K?.(y,J,I.type,g)},h=(y)=>Y?.(J,y),f=(y,g)=>{X(!0),H?.(R,J,I.type),j?.(y,g)};L4.onPointerDown(R.nativeEvent,{autoPanOnConnect:C,connectionMode:S,connectionRadius:N,domNode:P,handleId:I.id,nodeId:I.nodeId,nodeLookup:p,isTarget:E,edgeUpdaterType:I.type,lib:v,flowId:k,cancelConnection:m,panBy:D,isValidConnection:(...y)=>W.getState().isValidConnection?.(...y)??!0,onConnect:h,onConnectStart:f,onConnectEnd:(...y)=>W.getState().onConnectEnd?.(...y),onReconnectEnd:u,updateConnection:V,getTransform:()=>W.getState().transform,getFromHandle:()=>W.getState().connection.fromHandle,dragThreshold:W.getState().connectionDragThreshold,handleDomNode:R.currentTarget})},T=(R)=>O(R,{nodeId:J.target,id:J.targetHandle??null,type:"target"}),B=(R)=>O(R,{nodeId:J.source,id:J.sourceHandle??null,type:"source"}),w=()=>z(!0),A=()=>z(!1);return l.jsxs(l.Fragment,{children:[(_===!0||_==="source")&&l.jsx(W9,{position:F,centerX:q,centerY:U,radius:Q,onMouseDown:T,onMouseEnter:w,onMouseOut:A,type:"source"}),(_===!0||_==="target")&&l.jsx(W9,{position:L,centerX:G,centerY:Z,radius:Q,onMouseDown:B,onMouseEnter:w,onMouseOut:A,type:"target"})]})}function zG({id:_,edgesFocusable:Q,edgesReconnectable:J,elementsSelectable:q,onClick:U,onDoubleClick:G,onContextMenu:Z,onMouseEnter:F,onMouseMove:L,onMouseLeave:Y,reconnectRadius:H,onReconnect:K,onReconnectStart:X,onReconnectEnd:z,rfId:W,edgeTypes:O,noPanClassName:T,onError:B,disableKeyboardA11y:w}){let A=B1((J1)=>J1.edgeLookup.get(_)),R=B1((J1)=>J1.defaultEdgeOptions);A=R?{...R,...A}:A;let I=A.type||"default",C=O?.[I]||Y9[I];if(C===void 0)B?.("011",r1.error011(I)),I="default",C=O?.default||Y9.default;let P=!!(A.focusable||Q&&typeof A.focusable>"u"),S=typeof K<"u"&&(A.reconnectable||J&&typeof A.reconnectable>"u"),N=!!(A.selectable||q&&typeof A.selectable>"u"),v=r.useRef(null),[j,m]=r.useState(!1),[p,k]=r.useState(!1),D=N1(),{zIndex:V=A.zIndex,sourceX:E,sourceY:u,targetX:h,targetY:f,sourcePosition:y,targetPosition:g}=B1(r.useCallback((J1)=>{let U1=J1.nodeLookup.get(A.source),Y1=J1.nodeLookup.get(A.target);if(!U1||!Y1)return L9;let s=M7({id:_,sourceNode:U1,targetNode:Y1,sourceHandle:A.sourceHandle||null,targetHandle:A.targetHandle||null,connectionMode:J1.connectionMode,onError:B}),K1=W7({selected:A.selected,zIndex:A.zIndex,sourceNode:U1,targetNode:Y1,elevateOnSelect:J1.elevateEdgesOnSelect,zIndexMode:J1.zIndexMode});return{...s||L9,zIndex:K1}},[A.source,A.target,A.sourceHandle,A.targetHandle,A.selected,A.zIndex,B]),P1),b=r.useMemo(()=>A.markerStart?`url('#${H4(A.markerStart,W)}')`:void 0,[A.markerStart,W]),t=r.useMemo(()=>A.markerEnd?`url('#${H4(A.markerEnd,W)}')`:void 0,[A.markerEnd,W]);if(A.hidden||E===null||u===null||h===null||f===null)return null;let o=(J1)=>{let{addSelectedEdges:U1,unselectNodesAndEdges:Y1,multiSelectionActive:s}=D.getState();if(N)if(D.setState({nodesSelectionActive:!1}),A.selected&&s)Y1({nodes:[],edges:[A]}),v.current?.blur();else U1([_]);if(U)U(J1,A)},d=G?(J1)=>{G(J1,{...A})}:void 0,a=Z?(J1)=>{Z(J1,{...A})}:void 0,c=F?(J1)=>{F(J1,{...A})}:void 0,n=L?(J1)=>{L(J1,{...A})}:void 0,Q1=Y?(J1)=>{Y(J1,{...A})}:void 0,F1=(J1)=>{if(!w&&G6.includes(J1.key)&&N){let{unselectNodesAndEdges:U1,addSelectedEdges:Y1}=D.getState();if(J1.key==="Escape")v.current?.blur(),U1({edges:[A]});else Y1([_])}};return l.jsx("svg",{style:{zIndex:V},children:l.jsxs("g",{className:C1(["react-flow__edge",`react-flow__edge-${I}`,A.className,T,{selected:A.selected,animated:A.animated,inactive:!N&&!U,updating:j,selectable:N}]),onClick:o,onDoubleClick:d,onContextMenu:a,onMouseEnter:c,onMouseMove:n,onMouseLeave:Q1,onKeyDown:P?F1:void 0,tabIndex:P?0:void 0,role:A.ariaRole??(P?"group":"img"),"aria-roledescription":"edge","data-id":_,"data-testid":`rf__edge-${_}`,"aria-label":A.ariaLabel===null?void 0:A.ariaLabel||`Edge from ${A.source} to ${A.target}`,"aria-describedby":P?`${w9}-${W}`:void 0,ref:v,...A.domAttributes,children:[!p&&l.jsx(C,{id:_,source:A.source,target:A.target,type:A.type,selected:A.selected,animated:A.animated,selectable:N,deletable:A.deletable??!0,label:A.label,labelStyle:A.labelStyle,labelShowBg:A.labelShowBg,labelBgStyle:A.labelBgStyle,labelBgPadding:A.labelBgPadding,labelBgBorderRadius:A.labelBgBorderRadius,sourceX:E,sourceY:u,targetX:h,targetY:f,sourcePosition:y,targetPosition:g,data:A.data,style:A.style,sourceHandleId:A.sourceHandle,targetHandleId:A.targetHandle,markerStart:b,markerEnd:t,pathOptions:"pathOptions"in A?A.pathOptions:void 0,interactionWidth:A.interactionWidth}),S&&l.jsx(LG,{edge:A,isReconnectable:S,reconnectRadius:H,onReconnect:K,onReconnectStart:X,onReconnectEnd:z,sourceX:E,sourceY:u,targetX:h,targetY:f,sourcePosition:y,targetPosition:g,setUpdateHover:m,setReconnecting:k})]})})}var WG=r.memo(zG),AG=(_)=>({edgesFocusable:_.edgesFocusable,edgesReconnectable:_.edgesReconnectable,elementsSelectable:_.elementsSelectable,connectionMode:_.connectionMode,onError:_.onError});function t9({defaultMarkerColor:_,onlyRenderVisibleElements:Q,rfId:J,edgeTypes:q,noPanClassName:U,onReconnect:G,onEdgeContextMenu:Z,onEdgeMouseEnter:F,onEdgeMouseMove:L,onEdgeMouseLeave:Y,onEdgeClick:H,reconnectRadius:K,onEdgeDoubleClick:X,onReconnectStart:z,onReconnectEnd:W,disableKeyboardA11y:O}){let{edgesFocusable:T,edgesReconnectable:B,elementsSelectable:w,onError:A}=B1(AG,P1),R=_G(Q);return l.jsxs("div",{className:"react-flow__edges",children:[l.jsx(UG,{defaultColor:_,rfId:J}),R.map((I)=>{return l.jsx(WG,{id:I,edgesFocusable:T,edgesReconnectable:B,elementsSelectable:w,noPanClassName:U,onReconnect:G,onContextMenu:Z,onMouseEnter:F,onMouseMove:L,onMouseLeave:Y,onClick:H,reconnectRadius:K,onDoubleClick:X,onReconnectStart:z,onReconnectEnd:W,rfId:J,onError:A,edgeTypes:q,disableKeyboardA11y:O},I)})]})}t9.displayName="EdgeRenderer";var BG=r.memo(t9),A9=(_)=>`translate(${_[0]}px,${_[1]}px) scale(${_[2]})`;function MG({children:_}){let Q=N1(),J=r.useRef(null),[q]=r.useState(()=>Q.getState().transform);return k9(()=>{let U=null,G=()=>{let Z=Q.getState().transform;if(U&&Z[0]===U[0]&&Z[1]===U[1]&&Z[2]===U[2])return;if(U=Z,J.current)J.current.style.transform=A9(Z)};return G(),Q.subscribe(G)},[Q]),l.jsx("div",{ref:J,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:A9(q)},children:_})}function TG(_){let Q=T5(),J=r.useRef(!1);r.useEffect(()=>{if(!J.current&&Q.viewportInitialized&&_)setTimeout(()=>_(Q),1),J.current=!0},[_,Q.viewportInitialized])}var RG=(_)=>_.panZoom?.syncViewport;function OG(_){let Q=B1(RG),J=N1();return r.useEffect(()=>{if(_)Q?.(_),J.setState({transform:[_.x,_.y,_.zoom]})},[_,Q]),null}function B9(_){return _.connection.inProgress?{..._.connection,to:u2(_.connection.to,_.transform)}:{..._.connection}}function fG(_){if(_)return(J)=>{let q=B9(J);return _(q)};return B9}function IG(_){let Q=fG(_);return B1(Q,P1)}var wG=(_)=>({nodesConnectable:_.nodesConnectable,isValid:_.connection.isValid,inProgress:_.connection.inProgress,width:_.width,height:_.height});function PG({containerStyle:_,style:Q,type:J,component:q}){let{nodesConnectable:U,width:G,height:Z,isValid:F,inProgress:L}=B1(wG,P1);if(!(G&&U&&L))return null;return l.jsx("svg",{style:_,width:G,height:Z,className:"react-flow__connectionline react-flow__container",children:l.jsx("g",{className:C1(["react-flow__connection",T6(F)]),children:l.jsx(o9,{style:Q,type:J,CustomComponent:q,isValid:F})})})}var o9=({style:_,type:Q=W0.Bezier,CustomComponent:J,isValid:q})=>{let{inProgress:U,from:G,fromNode:Z,fromHandle:F,fromPosition:L,to:Y,toNode:H,toHandle:K,toPosition:X,pointer:z}=IG();if(!U)return;if(J)return l.jsx(J,{connectionLineType:Q,connectionLineStyle:_,fromNode:Z,fromHandle:F,fromX:G.x,fromY:G.y,toX:Y.x,toY:Y.y,fromPosition:L,toPosition:X,connectionStatus:T6(q),toNode:H,toHandle:K,pointer:z});let W="",O={sourceX:G.x,sourceY:G.y,sourcePosition:L,targetX:Y.x,targetY:Y.y,targetPosition:X};switch(Q){case W0.Bezier:[W]=F4(O);break;case W0.SimpleBezier:[W]=E9(O);break;case W0.Step:[W]=B5({...O,borderRadius:0});break;case W0.SmoothStep:[W]=B5(O);break;default:[W]=K4(O)}return l.jsx("path",{d:W,fill:"none",className:"react-flow__connection-path",style:_})};o9.displayName="ConnectionLine";var NG={};function M9(_=NG){let Q=r.useRef(_),J=N1();r.useEffect(()=>{{let q=new Set([...Object.keys(Q.current),...Object.keys(_)]);for(let U of q)if(Q.current[U]!==_[U]){J.getState().onError?.("002",r1.error002());break}Q.current=_}},[_])}function CG(){let _=N1(),Q=r.useRef(!1);r.useEffect(()=>{if(!Q.current){let J=document.querySelector(".react-flow__pane");if(J&&window.getComputedStyle(J).zIndex!=="1")_.getState().onError?.("013",r1.error013("react"));Q.current=!0}},[])}function n9({nodeTypes:_,edgeTypes:Q,onInit:J,onNodeClick:q,onEdgeClick:U,onNodeDoubleClick:G,onEdgeDoubleClick:Z,onNodeMouseEnter:F,onNodeMouseMove:L,onNodeMouseLeave:Y,onNodeContextMenu:H,onSelectionContextMenu:K,onSelectionStart:X,onSelectionEnd:z,connectionLineType:W,connectionLineStyle:O,connectionLineComponent:T,connectionLineContainerStyle:B,selectionKeyCode:w,selectionOnDrag:A,selectionMode:R,multiSelectionKeyCode:I,panActivationKeyCode:C,zoomActivationKeyCode:P,deleteKeyCode:S,onlyRenderVisibleElements:N,elementsSelectable:v,defaultViewport:j,translateExtent:m,minZoom:p,maxZoom:k,preventScrolling:D,defaultMarkerColor:V,zoomOnScroll:E,zoomOnPinch:u,panOnScroll:h,panOnScrollSpeed:f,panOnScrollMode:y,zoomOnDoubleClick:g,panOnDrag:b,autoPanOnSelection:t,onPaneClick:o,onPaneMouseEnter:d,onPaneMouseMove:a,onPaneMouseLeave:c,onPaneScroll:n,onPaneContextMenu:Q1,paneClickDistance:F1,nodeClickDistance:J1,onEdgeContextMenu:U1,onEdgeMouseEnter:Y1,onEdgeMouseMove:s,onEdgeMouseLeave:K1,reconnectRadius:O1,onReconnect:Z1,onReconnectStart:D1,onReconnectEnd:x1,noDragClassName:t1,noWheelClassName:k0,noPanClassName:F0,disableKeyboardA11y:M0,nodeExtent:d1,rfId:o1,viewport:n1,onViewportChange:K0,nodesDraggable:B2}){return M9(_),M9(Q),CG(),TG(J),OG(n1),l.jsx(lU,{onPaneClick:o,onPaneMouseEnter:d,onPaneMouseMove:a,onPaneMouseLeave:c,onPaneContextMenu:Q1,onPaneScroll:n,paneClickDistance:F1,deleteKeyCode:S,selectionKeyCode:w,selectionOnDrag:A,selectionMode:R,onSelectionStart:X,onSelectionEnd:z,multiSelectionKeyCode:I,panActivationKeyCode:C,zoomActivationKeyCode:P,elementsSelectable:v,zoomOnScroll:E,zoomOnPinch:u,zoomOnDoubleClick:g,panOnScroll:h,panOnScrollSpeed:f,panOnScrollMode:y,panOnDrag:b,autoPanOnSelection:t,defaultViewport:j,translateExtent:m,minZoom:p,maxZoom:k,onSelectionContextMenu:K,preventScrolling:D,noDragClassName:t1,noWheelClassName:k0,noPanClassName:F0,disableKeyboardA11y:M0,onViewportChange:K0,isControlledViewport:!!n1,children:l.jsxs(MG,{children:[l.jsx(BG,{edgeTypes:Q,onEdgeClick:U,onEdgeDoubleClick:Z,onReconnect:Z1,onReconnectStart:D1,onReconnectEnd:x1,onlyRenderVisibleElements:N,onEdgeContextMenu:U1,onEdgeMouseEnter:Y1,onEdgeMouseMove:s,onEdgeMouseLeave:K1,reconnectRadius:O1,defaultMarkerColor:V,noPanClassName:F0,disableKeyboardA11y:M0,rfId:o1}),l.jsx(PG,{style:O,type:W,component:T,containerStyle:B}),l.jsx("div",{className:"react-flow__edgelabel-renderer"}),l.jsx(eU,{nodeTypes:_,onNodeClick:q,onNodeDoubleClick:G,onNodeMouseEnter:F,onNodeMouseMove:L,onNodeMouseLeave:Y,onNodeContextMenu:H,nodeClickDistance:J1,onlyRenderVisibleElements:N,noPanClassName:F0,noDragClassName:t1,disableKeyboardA11y:M0,nodeExtent:d1,rfId:o1,nodesDraggable:B2}),l.jsx("div",{className:"react-flow__viewport-portal"})]})})}n9.displayName="GraphView";var SG=r.memo(n9),kG=W6("React Flow","https://reactflow.dev/"),T9=({nodes:_,edges:Q,defaultNodes:J,defaultEdges:q,width:U,height:G,fitView:Z,fitViewOptions:F,minZoom:L=0.5,maxZoom:Y=2,nodeOrigin:H,nodeExtent:K,zIndexMode:X="basic"}={})=>{let z=new Map,W=new Map,O=new Map,T=new Map,B=q??Q??[],w=J??_??[],A=H??[0,0],R=K??v2;S6(O,T,B);let{nodesInitialized:I}=X4(w,z,W,{nodeOrigin:A,nodeExtent:R,zIndexMode:X}),C=[0,0,1];if(Z&&U&&G){let P=Z2(z,{filter:(j)=>!!((j.width||j.initialWidth)&&(j.height||j.initialHeight))}),{x:S,y:N,zoom:v}=A5(P,U,G,L,Y,F?.padding??0.1);C=[S,N,v]}return{rfId:"1",width:U??0,height:G??0,transform:C,nodes:w,nodesInitialized:I,nodeLookup:z,parentLookup:W,edges:B,edgeLookup:T,connectionLookup:O,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:J!==void 0,hasDefaultEdges:q!==void 0,panZoom:null,minZoom:L,maxZoom:Y,translateExtent:v2,nodeExtent:R,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:E0.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:A,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:Z??!1,fitViewOptions:F,fitViewResolver:null,connection:{...F6},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:kG,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Z6,zIndexMode:X,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},yG=({nodes:_,edges:Q,defaultNodes:J,defaultEdges:q,width:U,height:G,fitView:Z,fitViewOptions:F,minZoom:L,maxZoom:Y,nodeOrigin:H,nodeExtent:K,zIndexMode:X})=>r7((z,W)=>{async function O(){let{nodeLookup:T,panZoom:B,fitViewOptions:w,fitViewResolver:A,width:R,height:I,minZoom:C,maxZoom:P}=W();if(!B)return;await F7({nodes:T,width:R,height:I,panZoom:B,minZoom:C,maxZoom:P},w),A?.resolve(!0),z({fitViewResolver:null})}return{...T9({nodes:_,edges:Q,width:U,height:G,fitView:Z,fitViewOptions:F,minZoom:L,maxZoom:Y,nodeOrigin:H,nodeExtent:K,defaultNodes:J,defaultEdges:q,zIndexMode:X}),setNodes:(T)=>{let{nodeLookup:B,parentLookup:w,nodeOrigin:A,nodeExtent:R,elevateNodesOnSelect:I,fitViewQueued:C,zIndexMode:P,nodesSelectionActive:S}=W(),{nodesInitialized:N,hasSelectedNodes:v}=X4(T,B,w,{nodeOrigin:A,nodeExtent:R,elevateNodesOnSelect:I,checkEquality:!0,zIndexMode:P}),j=S&&v;if(C&&N)O(),z({nodes:T,nodesInitialized:N,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:j});else z({nodes:T,nodesInitialized:N,nodesSelectionActive:j})},setEdges:(T)=>{let{connectionLookup:B,edgeLookup:w}=W();S6(B,w,T),z({edges:T})},setDefaultNodesAndEdges:(T,B)=>{if(T){let{setNodes:w}=W();w(T),z({hasDefaultNodes:!0})}if(B){let{setEdges:w}=W();w(B),z({hasDefaultEdges:!0})}},updateNodeInternals:(T)=>{let{triggerNodeChanges:B,nodeLookup:w,parentLookup:A,domNode:R,nodeOrigin:I,nodeExtent:C,debug:P,fitViewQueued:S,zIndexMode:N}=W(),{changes:v,updatedInternals:j}=w7(T,w,A,R,I,C,N);if(!j)return;if(f7(w,A,{nodeOrigin:I,nodeExtent:C,zIndexMode:N}),S)O(),z({fitViewQueued:!1,fitViewOptions:void 0});else z({});if(v?.length>0){if(P)console.log("React Flow: trigger node changes",v);B?.(v)}},updateNodePositions:(T,B=!1)=>{let w=[],A=[],{nodeLookup:R,triggerNodeChanges:I,connection:C,updateConnection:P,onNodesChangeMiddlewareMap:S}=W();for(let[N,v]of T){let j=R.get(N),m=!!(j?.expandParent&&j?.parentId&&v?.position),p={id:N,type:"position",position:m?{x:Math.max(0,v.position.x),y:Math.max(0,v.position.y)}:v.position,dragging:B};if(j&&C.inProgress&&C.fromNode.id===j.id){let k=x0(j,C.fromHandle,$1.Left,!0);P({...C,from:k})}if(m&&j.parentId)w.push({id:N,parentId:j.parentId,rect:{...v.internals.positionAbsolute,width:v.measured.width??0,height:v.measured.height??0}});A.push(p)}if(w.length>0){let{parentLookup:N,nodeOrigin:v}=W(),j=Y4(w,R,N,v);A.push(...j)}for(let N of S.values())A=N(A);I(A)},triggerNodeChanges:(T)=>{let{onNodesChange:B,setNodes:w,nodes:A,hasDefaultNodes:R,debug:I}=W();if(T?.length){if(R){let C=C9(T,A);w(C)}if(I)console.log("React Flow: trigger node changes",T);B?.(T)}},triggerEdgeChanges:(T)=>{let{onEdgesChange:B,setEdges:w,edges:A,hasDefaultEdges:R,debug:I}=W();if(T?.length){if(R){let C=XU(T,A);w(C)}if(I)console.log("React Flow: trigger edge changes",T);B?.(T)}},addSelectedNodes:(T)=>{let{multiSelectionActive:B,edgeLookup:w,nodeLookup:A,triggerNodeChanges:R,triggerEdgeChanges:I}=W();if(B){let C=T.map((P)=>F2(P,!0));R(C);return}R(D2(A,new Set([...T]),!0)),I(D2(w))},addSelectedEdges:(T)=>{let{multiSelectionActive:B,edgeLookup:w,nodeLookup:A,triggerNodeChanges:R,triggerEdgeChanges:I}=W();if(B){let C=T.map((P)=>F2(P,!0));I(C);return}I(D2(w,new Set([...T]))),R(D2(A,new Set,!0))},unselectNodesAndEdges:({nodes:T,edges:B}={})=>{let{edges:w,nodes:A,nodeLookup:R,triggerNodeChanges:I,triggerEdgeChanges:C}=W(),P=T?T:A,S=B?B:w,N=[];for(let j of P){if(!j.selected)continue;let m=R.get(j.id);if(m)m.selected=!1;N.push(F2(j.id,!1))}let v=[];for(let j of S){if(!j.selected)continue;v.push(F2(j.id,!1))}I(N),C(v)},setMinZoom:(T)=>{let{panZoom:B,maxZoom:w}=W();B?.setScaleExtent([T,w]),z({minZoom:T})},setMaxZoom:(T)=>{let{panZoom:B,minZoom:w}=W();B?.setScaleExtent([w,T]),z({maxZoom:T})},setTranslateExtent:(T)=>{W().panZoom?.setTranslateExtent(T),z({translateExtent:T})},resetSelectedElements:()=>{let{edges:T,nodes:B,triggerNodeChanges:w,triggerEdgeChanges:A,elementsSelectable:R}=W();if(!R)return;let I=B.reduce((P,S)=>S.selected?[...P,F2(S.id,!1)]:P,[]),C=T.reduce((P,S)=>S.selected?[...P,F2(S.id,!1)]:P,[]);w(I),A(C)},setNodeExtent:(T)=>{let{nodes:B,nodeLookup:w,parentLookup:A,nodeOrigin:R,elevateNodesOnSelect:I,nodeExtent:C,zIndexMode:P}=W();if(T[0][0]===C[0][0]&&T[0][1]===C[0][1]&&T[1][0]===C[1][0]&&T[1][1]===C[1][1])return;X4(B,w,A,{nodeOrigin:R,nodeExtent:T,elevateNodesOnSelect:I,checkEquality:!1,zIndexMode:P}),z({nodeExtent:T})},panBy:(T)=>{let{transform:B,width:w,height:A,panZoom:R,translateExtent:I}=W();return P7({delta:T,panZoom:R,transform:B,translateExtent:I,width:w,height:A})},setCenter:async(T,B,w)=>{let{width:A,height:R,maxZoom:I,panZoom:C}=W();if(!C)return!1;let P=typeof w?.zoom<"u"?w.zoom:I;return await C.setViewport({x:A/2-T*P,y:R/2-B*P,zoom:P},{duration:w?.duration,ease:w?.ease,interpolate:w?.interpolate}),!0},cancelConnection:()=>{z({connection:{...F6}})},updateConnection:(T)=>{z({connection:T})},reset:()=>z({...T9()})}},Object.is);function D6({initialNodes:_,initialEdges:Q,defaultNodes:J,defaultEdges:q,initialWidth:U,initialHeight:G,initialMinZoom:Z,initialMaxZoom:F,initialFitViewOptions:L,fitView:Y,nodeOrigin:H,nodeExtent:K,zIndexMode:X,children:z}){let[W]=r.useState(()=>yG({nodes:_,edges:Q,defaultNodes:J,defaultEdges:q,width:U,height:G,fitView:Y,minZoom:Z,maxZoom:F,fitViewOptions:L,nodeOrigin:H,nodeExtent:K,zIndexMode:X}));return l.jsx(rq,{value:W,children:l.jsx(AU,{children:l.jsx(vU,{children:z})})})}function vG({children:_,nodes:Q,edges:J,defaultNodes:q,defaultEdges:U,width:G,height:Z,fitView:F,fitViewOptions:L,minZoom:Y,maxZoom:H,nodeOrigin:K,nodeExtent:X,zIndexMode:z}){if(r.useContext(T4))return l.jsx(l.Fragment,{children:_});return l.jsx(D6,{initialNodes:Q,initialEdges:J,defaultNodes:q,defaultEdges:U,initialWidth:G,initialHeight:Z,fitView:F,initialFitViewOptions:L,initialMinZoom:Y,initialMaxZoom:H,nodeOrigin:K,nodeExtent:X,zIndexMode:z,children:_})}var jG={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function VG({nodes:_,edges:Q,defaultNodes:J,defaultEdges:q,className:U,nodeTypes:G,edgeTypes:Z,onNodeClick:F,onEdgeClick:L,onInit:Y,onMove:H,onMoveStart:K,onMoveEnd:X,onConnect:z,onConnectStart:W,onConnectEnd:O,onClickConnectStart:T,onClickConnectEnd:B,onNodeMouseEnter:w,onNodeMouseMove:A,onNodeMouseLeave:R,onNodeContextMenu:I,onNodeDoubleClick:C,onNodeDragStart:P,onNodeDrag:S,onNodeDragStop:N,onNodesDelete:v,onEdgesDelete:j,onDelete:m,onSelectionChange:p,onSelectionDragStart:k,onSelectionDrag:D,onSelectionDragStop:V,onSelectionContextMenu:E,onSelectionStart:u,onSelectionEnd:h,onBeforeDelete:f,connectionMode:y,connectionLineType:g=W0.Bezier,connectionLineStyle:b,connectionLineComponent:t,connectionLineContainerStyle:o,deleteKeyCode:d="Backspace",selectionKeyCode:a="Shift",selectionOnDrag:c=!1,selectionMode:n=$2.Full,panActivationKeyCode:Q1="Space",multiSelectionKeyCode:F1=b2()?"Meta":"Control",zoomActivationKeyCode:J1=b2()?"Meta":"Control",snapToGrid:U1,snapGrid:Y1,onlyRenderVisibleElements:s=!1,selectNodesOnDrag:K1,nodesDraggable:O1,autoPanOnNodeFocus:Z1,nodesConnectable:D1,nodesFocusable:x1,nodeOrigin:t1=P9,edgesFocusable:k0,edgesReconnectable:F0,elementsSelectable:M0=!0,defaultViewport:d1=qU,minZoom:o1=0.5,maxZoom:n1=2,translateExtent:K0=v2,preventScrolling:B2=!0,nodeExtent:y0,defaultMarkerColor:M2="#b1b1b7",zoomOnScroll:T2=!0,zoomOnPinch:m2=!0,panOnScroll:k5=!1,panOnScrollSpeed:r0=0.5,panOnScrollMode:M=I0.Free,zoomOnDoubleClick:x=!0,panOnDrag:e=!0,onPaneClick:_1,onPaneMouseEnter:q1,onPaneMouseMove:z1,onPaneMouseLeave:L1,onPaneScroll:f1,onPaneContextMenu:W1,paneClickDistance:H0=1,nodeClickDistance:v0=0,children:v4,onReconnect:j4,onReconnectStart:t_,onReconnectEnd:o_,onEdgeContextMenu:n_,onEdgeDoubleClick:e_,onEdgeMouseEnter:_Q,onEdgeMouseMove:QQ,onEdgeMouseLeave:JQ,reconnectRadius:$Q=10,onNodesChange:qQ,onEdgesChange:UQ,noDragClassName:GQ="nodrag",noWheelClassName:ZQ="nowheel",noPanClassName:n6="nopan",fitView:e6,fitViewOptions:_8,connectOnClick:FQ,attributionPosition:KQ,proOptions:HQ,defaultEdgeOptions:XQ,elevateNodesOnSelect:YQ=!0,elevateEdgesOnSelect:LQ=!1,disableKeyboardA11y:Q8=!1,autoPanOnConnect:zQ,autoPanOnNodeDrag:WQ,autoPanOnSelection:AQ=!0,autoPanSpeed:BQ,connectionRadius:MQ,isValidConnection:TQ,onError:RQ,style:OQ,id:J8,nodeDragThreshold:fQ,connectionDragThreshold:IQ,viewport:wQ,onViewportChange:PQ,width:NQ,height:CQ,colorMode:SQ="light",debug:kQ,onScroll:$8,ariaLabelConfig:yQ,zIndexMode:q8="basic",...vQ},jQ){let V4=J8||"1",VQ=FU(SQ),uQ=r.useCallback((U8)=>{U8.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),$8?.(U8)},[$8]);return l.jsx("div",{"data-testid":"rf__wrapper",...vQ,onScroll:uQ,style:{...OQ,...jG},ref:jQ,className:C1(["react-flow",U,VQ]),id:J8,role:"application",children:l.jsxs(vG,{nodes:_,edges:Q,width:NQ,height:CQ,fitView:e6,fitViewOptions:_8,minZoom:o1,maxZoom:n1,nodeOrigin:t1,nodeExtent:y0,zIndexMode:q8,children:[l.jsx(ZU,{nodes:_,edges:Q,defaultNodes:J,defaultEdges:q,onConnect:z,onConnectStart:W,onConnectEnd:O,onClickConnectStart:T,onClickConnectEnd:B,nodesDraggable:O1,autoPanOnNodeFocus:Z1,nodesConnectable:D1,nodesFocusable:x1,edgesFocusable:k0,edgesReconnectable:F0,elementsSelectable:M0,elevateNodesOnSelect:YQ,elevateEdgesOnSelect:LQ,minZoom:o1,maxZoom:n1,nodeExtent:y0,onNodesChange:qQ,onEdgesChange:UQ,snapToGrid:U1,snapGrid:Y1,connectionMode:y,translateExtent:K0,connectOnClick:FQ,defaultEdgeOptions:XQ,fitView:e6,fitViewOptions:_8,onNodesDelete:v,onEdgesDelete:j,onDelete:m,onNodeDragStart:P,onNodeDrag:S,onNodeDragStop:N,onSelectionDrag:D,onSelectionDragStart:k,onSelectionDragStop:V,onMove:H,onMoveStart:K,onMoveEnd:X,noPanClassName:n6,nodeOrigin:t1,rfId:V4,autoPanOnConnect:zQ,autoPanOnNodeDrag:WQ,autoPanSpeed:BQ,onError:RQ,connectionRadius:MQ,isValidConnection:TQ,selectNodesOnDrag:K1,nodeDragThreshold:fQ,connectionDragThreshold:IQ,onBeforeDelete:f,debug:kQ,ariaLabelConfig:yQ,zIndexMode:q8}),l.jsx(SG,{onInit:Y,onNodeClick:F,onEdgeClick:L,onNodeMouseEnter:w,onNodeMouseMove:A,onNodeMouseLeave:R,onNodeContextMenu:I,onNodeDoubleClick:C,nodeTypes:G,edgeTypes:Z,connectionLineType:g,connectionLineStyle:b,connectionLineComponent:t,connectionLineContainerStyle:o,selectionKeyCode:a,selectionOnDrag:c,selectionMode:n,deleteKeyCode:d,multiSelectionKeyCode:F1,panActivationKeyCode:Q1,zoomActivationKeyCode:J1,onlyRenderVisibleElements:s,defaultViewport:d1,translateExtent:K0,minZoom:o1,maxZoom:n1,preventScrolling:B2,zoomOnScroll:T2,zoomOnPinch:m2,zoomOnDoubleClick:x,panOnScroll:k5,panOnScrollSpeed:r0,panOnScrollMode:M,panOnDrag:e,autoPanOnSelection:AQ,onPaneClick:_1,onPaneMouseEnter:q1,onPaneMouseMove:z1,onPaneMouseLeave:L1,onPaneScroll:f1,onPaneContextMenu:W1,paneClickDistance:H0,nodeClickDistance:v0,onSelectionContextMenu:E,onSelectionStart:u,onSelectionEnd:h,onReconnect:j4,onReconnectStart:t_,onReconnectEnd:o_,onEdgeContextMenu:n_,onEdgeDoubleClick:e_,onEdgeMouseEnter:_Q,onEdgeMouseMove:QQ,onEdgeMouseLeave:JQ,reconnectRadius:$Q,defaultMarkerColor:M2,noDragClassName:GQ,noWheelClassName:ZQ,noPanClassName:n6,rfId:V4,disableKeyboardA11y:Q8,nodeExtent:y0,viewport:wQ,onViewportChange:PQ,nodesDraggable:O1}),l.jsx($U,{onSelectionChange:p}),v4,l.jsx(nq,{proOptions:HQ,position:KQ}),l.jsx(oq,{rfId:V4,disableKeyboardA11y:Q8})]})})}var e9=S9(VG);function __(_){let[Q,J]=r.useState(_),q=r.useCallback((U)=>J((G)=>C9(U,G)),[]);return[Q,J,q]}var fB=r1.error014();function uG({dimensions:_,lineWidth:Q,variant:J,className:q}){return l.jsx("path",{strokeWidth:Q,d:`M${_[0]/2} 0 V${_[1]} M0 ${_[1]/2} H${_[0]}`,className:C1(["react-flow__background-pattern",J,q])})}function bG({radius:_,className:Q}){return l.jsx("circle",{cx:_,cy:_,r:_,className:C1(["react-flow__background-pattern","dots",Q])})}var A0;(function(_){_.Lines="lines",_.Dots="dots",_.Cross="cross"})(A0||(A0={}));var DG={[A0.Dots]:1,[A0.Lines]:1,[A0.Cross]:6},hG=(_)=>({transform:_.transform,patternId:`pattern-${_.rfId}`});function Q_({id:_,variant:Q=A0.Dots,gap:J=20,size:q,lineWidth:U=1,offset:G=0,color:Z,bgColor:F,style:L,className:Y,patternClassName:H}){let K=r.useRef(null),{transform:X,patternId:z}=B1(hG,P1),W=q||DG[Q],O=Q===A0.Dots,T=Q===A0.Cross,B=Array.isArray(J)?J:[J,J],w=[B[0]*X[2]||1,B[1]*X[2]||1],A=W*X[2],R=Array.isArray(G)?G:[G,G],I=T?[A,A]:w,C=[R[0]*X[2]+I[0]/2,R[1]*X[2]+I[1]/2],P=`${z}${_?_:""}`;return l.jsxs("svg",{className:C1(["react-flow__background",Y]),style:{...L,...R4,"--xy-background-color-props":F,"--xy-background-pattern-color-props":Z},ref:K,"data-testid":"rf__background",children:[l.jsx("pattern",{id:P,x:X[0]%w[0],y:X[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${C[0]},-${C[1]})`,children:O?l.jsx(bG,{radius:A/2,className:H}):l.jsx(uG,{dimensions:I,lineWidth:U,variant:Q,className:H})}),l.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}Q_.displayName="Background";var J_=r.memo(Q_);function EG(){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:l.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function xG(){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:l.jsx("path",{d:"M0 0h32v4.2H0z"})})}function mG(){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:l.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function gG(){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:l.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function pG(){return l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:l.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function A4({children:_,className:Q,...J}){return l.jsx("button",{type:"button",className:C1(["react-flow__controls-button",Q]),...J,children:_})}var cG=(_)=>({isInteractive:_.nodesDraggable||_.nodesConnectable||_.elementsSelectable,minZoomReached:_.transform[2]<=_.minZoom,maxZoomReached:_.transform[2]>=_.maxZoom,ariaLabelConfig:_.ariaLabelConfig});function $_({style:_,showZoom:Q=!0,showFitView:J=!0,showInteractive:q=!0,fitViewOptions:U,onZoomIn:G,onZoomOut:Z,onFitView:F,onInteractiveChange:L,className:Y,children:H,position:K="bottom-left",orientation:X="vertical","aria-label":z}){let W=N1(),{isInteractive:O,minZoomReached:T,maxZoomReached:B,ariaLabelConfig:w}=B1(cG,P1),{zoomIn:A,zoomOut:R,fitView:I}=T5(),C=()=>{A(),G?.()},P=()=>{R(),Z?.()},S=()=>{I(U),F?.()},N=()=>{W.setState({nodesDraggable:!O,nodesConnectable:!O,elementsSelectable:!O}),L?.(!O)};return l.jsxs(K2,{className:C1(["react-flow__controls",X==="horizontal"?"horizontal":"vertical",Y]),position:K,style:_,"data-testid":"rf__controls","aria-label":z??w["controls.ariaLabel"],children:[Q&&l.jsxs(l.Fragment,{children:[l.jsx(A4,{onClick:C,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:B,children:l.jsx(EG,{})}),l.jsx(A4,{onClick:P,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:T,children:l.jsx(xG,{})})]}),J&&l.jsx(A4,{className:"react-flow__controls-fitview",onClick:S,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:l.jsx(mG,{})}),q&&l.jsx(A4,{className:"react-flow__controls-interactive",onClick:N,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:O?l.jsx(pG,{}):l.jsx(gG,{})}),H]})}$_.displayName="Controls";var q_=r.memo($_);function lG({id:_,x:Q,y:J,width:q,height:U,style:G,color:Z,strokeColor:F,strokeWidth:L,className:Y,borderRadius:H,shapeRendering:K,selected:X,onClick:z}){let{background:W,backgroundColor:O}=G||{},T=Z||W||O;return l.jsx("rect",{className:C1(["react-flow__minimap-node",{selected:X},Y]),x:Q,y:J,rx:H,ry:H,width:q,height:U,style:{fill:T,stroke:F,strokeWidth:L},shapeRendering:K,onClick:z?(B)=>z(B,_):void 0})}var rG=r.memo(lG),iG=(_)=>_.nodes.map((Q)=>Q.id),j6=(_)=>_ instanceof Function?_:()=>_;function dG({nodeStrokeColor:_,nodeColor:Q,nodeClassName:J="",nodeBorderRadius:q=5,nodeStrokeWidth:U,nodeComponent:G=rG,onClick:Z}){let F=B1(iG,P1),L=j6(Q),Y=j6(_),H=j6(J),K=typeof window>"u"||!!window.chrome?"crispEdges":"geometricPrecision";return l.jsx(l.Fragment,{children:F.map((X)=>l.jsx(sG,{id:X,nodeColorFunc:L,nodeStrokeColorFunc:Y,nodeClassNameFunc:H,nodeBorderRadius:q,nodeStrokeWidth:U,NodeComponent:G,onClick:Z,shapeRendering:K},X))})}function aG({id:_,nodeColorFunc:Q,nodeStrokeColorFunc:J,nodeClassNameFunc:q,nodeBorderRadius:U,nodeStrokeWidth:G,shapeRendering:Z,NodeComponent:F,onClick:L}){let{node:Y,x:H,y:K,width:X,height:z}=B1((W)=>{let O=W.nodeLookup.get(_);if(!O)return{node:void 0,x:0,y:0,width:0,height:0};let T=O.internals.userNode,{x:B,y:w}=O.internals.positionAbsolute,{width:A,height:R}=Q0(T);return{node:T,x:B,y:w,width:A,height:R}},P1);if(!Y||Y.hidden||!A6(Y))return null;return l.jsx(F,{x:H,y:K,width:X,height:z,style:Y.style,selected:!!Y.selected,className:q(Y),color:Q(Y),borderRadius:U,strokeColor:J(Y),strokeWidth:G,shapeRendering:Z,onClick:L,id:Y.id})}var sG=r.memo(aG),tG=r.memo(dG),oG=200,nG=150,eG=(_)=>!_.hidden,_Z=(_)=>{let Q={x:-_.transform[0]/_.transform[2],y:-_.transform[1]/_.transform[2],width:_.width/_.transform[2],height:_.height/_.transform[2]},J=!1;for(let q of _.nodeLookup.values())if(!q.hidden){J=!0;break}return{viewBB:Q,boundingRect:J?L6(Z2(_.nodeLookup,{filter:eG}),Q):Q,rfId:_.rfId,panZoom:_.panZoom,translateExtent:_.translateExtent,flowWidth:_.width,flowHeight:_.height,ariaLabelConfig:_.ariaLabelConfig}},R9=(_,Q)=>_.x===Q.x&&_.y===Q.y&&_.width===Q.width&&_.height===Q.height,QZ=(_,Q)=>R9(_.viewBB,Q.viewBB)&&R9(_.boundingRect,Q.boundingRect)&&_.rfId===Q.rfId&&_.panZoom===Q.panZoom&&_.translateExtent===Q.translateExtent&&_.flowWidth===Q.flowWidth&&_.flowHeight===Q.flowHeight&&_.ariaLabelConfig===Q.ariaLabelConfig,JZ="react-flow__minimap-desc";function U_({style:_,className:Q,nodeStrokeColor:J,nodeColor:q,nodeClassName:U="",nodeBorderRadius:G=5,nodeStrokeWidth:Z,nodeComponent:F,bgColor:L,maskColor:Y,maskStrokeColor:H,maskStrokeWidth:K,position:X="bottom-right",onClick:z,onNodeClick:W,pannable:O=!1,zoomable:T=!1,ariaLabel:B,inversePan:w,zoomStep:A=1,offsetScale:R=5}){let I=N1(),C=r.useRef(null),{boundingRect:P,panZoom:S,viewBB:N,rfId:v,translateExtent:j,flowWidth:m,flowHeight:p,ariaLabelConfig:k}=B1(_Z,QZ),D=_?.width??oG,V=_?.height??nG,E=P.width/D,u=P.height/V,h=Math.max(E,u),f=h*D,y=h*V,g=R*h,b=P.x-(f-P.width)/2-g,t=P.y-(y-P.height)/2-g,o=f+g*2,d=y+g*2,a=`${JZ}-${v}`,c=r.useRef(0),n=r.useRef();c.current=h,r.useEffect(()=>{let Y1=I.getState().panZoom;if(C.current&&Y1)return n.current=j7({domNode:C.current,panZoom:Y1,getTransform:()=>I.getState().transform,getViewScale:()=>c.current}),()=>{n.current?.destroy()}},[S]),r.useEffect(()=>{n.current?.update({translateExtent:j,width:m,height:p,inversePan:w,pannable:O,zoomStep:A,zoomable:T})},[O,T,w,A,j,m,p]);let Q1=z?(Y1)=>{let[s,K1]=n.current?.pointer(Y1)||[0,0];z(Y1,{x:s,y:K1})}:void 0,F1=r.useCallback((Y1,s)=>{let K1=I.getState().nodeLookup.get(s).internals.userNode;W?.(Y1,K1)},[W]),J1=W?F1:void 0,U1=B??k["minimap.ariaLabel"];return l.jsx(K2,{position:X,style:{..._,"--xy-minimap-background-color-props":typeof L==="string"?L:void 0,"--xy-minimap-mask-background-color-props":typeof Y==="string"?Y:void 0,"--xy-minimap-mask-stroke-color-props":typeof H==="string"?H:void 0,"--xy-minimap-mask-stroke-width-props":typeof K==="number"?K*h:void 0,"--xy-minimap-node-background-color-props":typeof q==="string"?q:void 0,"--xy-minimap-node-stroke-color-props":typeof J==="string"?J:void 0,"--xy-minimap-node-stroke-width-props":typeof Z==="number"?Z:void 0},className:C1(["react-flow__minimap",Q]),"data-testid":"rf__minimap",children:l.jsxs("svg",{width:D,height:V,viewBox:`${b} ${t} ${o} ${d}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":a,ref:C,onClick:Q1,children:[U1&&l.jsx("title",{id:a,children:U1}),l.jsx(tG,{onClick:J1,nodeColor:q,nodeStrokeColor:J,nodeBorderRadius:G,nodeClassName:U,nodeStrokeWidth:Z,nodeComponent:F}),l.jsx("path",{className:"react-flow__minimap-mask",d:`M${b-g},${t-g}h${o+g*2}v${d+g*2}h${-o-g*2}z
|
|
34
|
+
M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}U_.displayName="MiniMap";var G_=r.memo(U_),$Z=(_)=>(Q)=>_?`${Math.max(1/Q.transform[2],1)}`:void 0,qZ={[m0.Line]:"right",[m0.Handle]:"bottom-right"};function UZ({nodeId:_,position:Q,variant:J=m0.Handle,className:q,style:U=void 0,children:G,color:Z,minWidth:F=10,minHeight:L=10,maxWidth:Y=Number.MAX_VALUE,maxHeight:H=Number.MAX_VALUE,keepAspectRatio:K=!1,resizeDirection:X,autoScale:z=!0,shouldResize:W,onResizeStart:O,onResize:T,onResizeEnd:B}){let w=b6(),A=typeof _==="string"?_:w,R=N1(),I=r.useRef(null),C=J===m0.Handle,P=B1(r.useCallback($Z(C&&z),[C,z]),P1),S=r.useRef(null),N=Q??qZ[J];r.useEffect(()=>{if(!I.current||!A)return;if(!S.current)S.current=h7({domNode:I.current,nodeId:A,getStoreItems:()=>{let{nodeLookup:j,transform:m,snapGrid:p,snapToGrid:k,nodeOrigin:D,domNode:V}=R.getState();return{nodeLookup:j,transform:m,snapGrid:p,snapToGrid:k,nodeOrigin:D,paneDomNode:V}},onChange:(j,m)=>{let{triggerNodeChanges:p,nodeLookup:k,parentLookup:D,nodeOrigin:V}=R.getState(),E=[],u={x:j.x,y:j.y},h=k.get(A);if(h&&h.expandParent&&h.parentId){let f=h.origin??V,y=j.width??h.measured.width??0,g=j.height??h.measured.height??0,b={id:h.id,parentId:h.parentId,rect:{width:y,height:g,...B6({x:j.x??h.position.x,y:j.y??h.position.y},{width:y,height:g},h.parentId,k,f)}},t=Y4([b],k,D,V);E.push(...t),u.x=j.x?Math.max(f[0]*y,j.x):void 0,u.y=j.y?Math.max(f[1]*g,j.y):void 0}if(u.x!==void 0&&u.y!==void 0){let f={id:A,type:"position",position:{...u}};E.push(f)}if(j.width!==void 0&&j.height!==void 0){let y={id:A,type:"dimensions",resizing:!0,setAttributes:!X?!0:X==="horizontal"?"width":"height",dimensions:{width:j.width,height:j.height}};E.push(y)}for(let f of m){let y={...f,type:"position"};E.push(y)}p(E)},onEnd:({width:j,height:m})=>{let p={id:A,type:"dimensions",resizing:!1,dimensions:{width:j,height:m}};R.getState().triggerNodeChanges([p])}});return S.current.update({controlPosition:N,boundaries:{minWidth:F,minHeight:L,maxWidth:Y,maxHeight:H},keepAspectRatio:K,resizeDirection:X,onResizeStart:O,onResize:T,onResizeEnd:B,shouldResize:W}),()=>{S.current?.destroy()}},[N,F,L,Y,H,K,O,T,B,W]);let v=N.split("-");return l.jsx("div",{className:C1(["react-flow__resize-control","nodrag",...v,J,q]),ref:I,style:{...U,scale:P,...Z&&{[C?"backgroundColor":"borderColor"]:Z}},children:G})}var IB=r.memo(UZ);var GZ=(_)=>_.domNode?.querySelector(".react-flow__renderer");function ZZ({children:_}){let Q=B1(GZ);if(!Q)return null;return O9.createPortal(_,Q)}var FZ=(_,Q)=>_?.internals.positionAbsolute.x!==Q?.internals.positionAbsolute.x||_?.internals.positionAbsolute.y!==Q?.internals.positionAbsolute.y||_?.measured.width!==Q?.measured.width||_?.measured.height!==Q?.measured.height||_?.selected!==Q?.selected||_?.internals.z!==Q?.internals.z,KZ=(_,Q)=>{if(_.size!==Q.size)return!1;for(let[J,q]of _)if(FZ(q,Q.get(J)))return!1;return!0},HZ=(_)=>({x:_.transform[0],y:_.transform[1],zoom:_.transform[2],selectedNodesCount:_.nodes.filter((Q)=>Q.selected).length});function Z_({nodeId:_,children:Q,className:J,style:q,isVisible:U,position:G=$1.Top,offset:Z=10,align:F="center",...L}){let Y=b6(),H=r.useCallback((I)=>{return(Array.isArray(_)?_:[_||Y||""]).reduce((S,N)=>{let v=I.nodeLookup.get(N);if(v)S.set(v.id,v);return S},new Map)},[_,Y]),K=B1(H,KZ),{x:X,y:z,zoom:W,selectedNodesCount:O}=B1(HZ,P1);if(!(typeof U==="boolean"?U:K.size===1&&K.values().next().value?.selected&&O===1)||!K.size)return null;let B=Z2(K),w=Array.from(K.values()),A=Math.max(...w.map((I)=>I.internals.z+1)),R={position:"absolute",transform:R7(B,{x:X,y:z,zoom:W},G,Z,F),zIndex:A,...q};return l.jsx(ZZ,{children:l.jsx("div",{style:R,className:C1(["react-flow__node-toolbar",J]),...L,"data-id":w.reduce((I,C)=>`${I}${C.id} `,"").trim(),children:Q})})}var b1=h1(X0(),1);var F_={x:{title:"X",fill:"currentColor",d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"},youtube:{title:"YouTube",fill:"#FF0000",d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"},tiktok:{title:"TikTok",fill:"currentColor",d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"},discord:{title:"Discord",fill:"#5865F2",d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"},resend:{title:"Resend",fill:"currentColor",d:"M2.023 0v24h5.553v-8.434h2.998L15.326 24h6.65l-5.372-9.258a7.652 7.652 0 0 0 3.316-3.016c.709-1.21 1.062-2.57 1.062-4.08 0-1.462-.353-2.767-1.062-3.91-.709-1.165-1.692-2.079-2.95-2.742C15.737.331 14.355 0 12.823 0Zm5.553 4.87h4.219c.731 0 1.349.125 1.851.376.526.252.925.618 1.2 1.098.274.457.412.994.412 1.611S15.132 9.12 14.88 9.6c-.229.48-.572.856-1.03 1.13-.434.252-.948.38-1.542.38H7.576Z"},linkedin:{title:"LinkedIn",fill:"#0A66C2",d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"},reddit:{title:"Reddit",fill:"#FF4500",d:"M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z"},bluesky:{title:"Bluesky",fill:"#0285FF",d:"M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.815 2.736 3.713 3.66 6.383 3.364.136-.02.275-.039.415-.056-.138.022-.276.04-.415.056-3.912.58-7.387 2.005-2.83 7.078 5.013 5.19 6.87-1.113 7.823-4.308.953 3.195 2.05 9.271 7.733 4.308 4.267-4.308 1.172-6.498-2.74-7.078a8.741 8.741 0 0 1-.415-.056c.14.017.279.036.415.056 2.67.297 5.568-.628 6.383-3.364.246-.828.624-5.79.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8Z"},instagram:{title:"Instagram",fill:"#FF0069",d:"M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077"},github:{title:"GitHub",fill:"currentColor",d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"},stripe:{title:"Stripe",fill:"#635BFF",d:"M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"},slack:{title:"Slack",fill:"#4A154B",d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"},openai:{title:"OpenAI",fill:"#412991",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"},anthropic:{title:"Anthropic",fill:"currentColor",d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"},twilio:{title:"Twilio",fill:"#F22F46",d:"M12 0C5.381-.008.008 5.352 0 11.971V12c0 6.64 5.359 12 12 12 6.64 0 12-5.36 12-12 0-6.641-5.36-12-12-12zm0 20.801c-4.846.015-8.786-3.904-8.801-8.75V12c-.014-4.846 3.904-8.786 8.75-8.801H12c4.847-.014 8.786 3.904 8.801 8.75V12c.015 4.847-3.904 8.786-8.75 8.801H12zm5.44-11.76c0 1.359-1.12 2.479-2.481 2.479-1.366-.007-2.472-1.113-2.479-2.479 0-1.361 1.12-2.481 2.479-2.481 1.361 0 2.481 1.12 2.481 2.481zm0 5.919c0 1.36-1.12 2.48-2.481 2.48-1.367-.008-2.473-1.114-2.479-2.48 0-1.359 1.12-2.479 2.479-2.479 1.361-.001 2.481 1.12 2.481 2.479zm-5.919 0c0 1.36-1.12 2.48-2.479 2.48-1.368-.007-2.475-1.113-2.481-2.48 0-1.359 1.12-2.479 2.481-2.479 1.358-.001 2.479 1.12 2.479 2.479zm0-5.919c0 1.359-1.12 2.479-2.479 2.479-1.367-.007-2.475-1.112-2.481-2.479 0-1.361 1.12-2.481 2.481-2.481 1.358 0 2.479 1.12 2.479 2.481z"},sendgrid:{title:"SendGrid",fill:"#51A9E3",d:"M.8 24h13.6c.88 0 1.6-.72 1.6-1.6v-4.8c0-.88-.72-1.6-1.6-1.6H9.6c-.88 0-1.6-.72-1.6-1.6V9.6C8 8.72 7.28 8 6.4 8H1.6C.72 8 0 8.72 0 9.6v13.6c0 .44.36.8.8.8zM23.2 0H9.6C8.72 0 8 .72 8 1.6v4.8C8 7.28 8.72 8 9.6 8h4.8c.88 0 1.6.72 1.6 1.6v4.8c0 .88.72 1.6 1.6 1.6h4.8c.88 0 1.6-.72 1.6-1.6V.8c0-.44-.36-.8-.8-.8Z"},mailgun:{title:"Mailgun",fill:"#F06B66",d:"M11.837 0c6.602 0 11.984 5.381 11.984 11.994-.017 2.99-3.264 4.84-5.844 3.331a3.805 3.805 0 0 1-.06-.035l-.055-.033-.022.055c-2.554 4.63-9.162 4.758-11.894.232-2.732-4.527.46-10.313 5.746-10.416a6.868 6.868 0 0 1 7.002 6.866 1.265 1.265 0 0 0 2.52 0c0-5.18-4.197-9.38-9.377-9.387C4.611 2.594.081 10.41 3.683 16.673c3.238 5.632 11.08 6.351 15.289 1.402l1.997 1.686A11.95 11.95 0 0 1 11.837 24C2.6 23.72-2.87 13.543 1.992 5.684A12.006 12.006 0 0 1 11.837 0Zm0 7.745c-3.276-.163-5.5 3.281-4.003 6.2a4.26 4.26 0 0 0 4.014 2.31c3.276-.171 5.137-3.824 3.35-6.575a4.26 4.26 0 0 0-3.36-1.935Zm0 2.53c1.324 0 2.152 1.433 1.49 2.58a1.72 1.72 0 0 1-1.49.86 1.72 1.72 0 1 1 0-3.44Z"},notion:{title:"Notion",fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632z"},linear:{title:"Linear",fill:"#5E6AD2",d:"M2.886 4.18A11.982 11.982 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556c-.524.33-1.075.62-1.65.866L.951 7.277c.247-.575.537-1.126.866-1.65ZM.322 9.163l14.515 14.515c-.71.172-1.443.282-2.195.322L0 11.358a12 12 0 0 1 .322-2.195Zm-.17 4.862 9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"},jira:{title:"Jira",fill:"#0052CC",d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0Z"},hubspot:{title:"HubSpot",fill:"#FF7A59",d:"M18.164 7.93V5.084a2.198 2.198 0 001.267-1.978v-.067A2.2 2.2 0 0017.238.845h-.067a2.2 2.2 0 00-2.193 2.193v.067a2.196 2.196 0 001.252 1.973l.013.006v2.852a6.22 6.22 0 00-2.969 1.31l.012-.01-7.828-6.095A2.497 2.497 0 104.3 4.656l-.012.006 7.697 5.991a6.176 6.176 0 00-1.038 3.446c0 1.343.425 2.588 1.147 3.607l-.013-.02-2.342 2.343a1.968 1.968 0 00-.58-.095h-.002a2.033 2.033 0 102.033 2.033 1.978 1.978 0 00-.1-.595l.005.014 2.317-2.317a6.247 6.247 0 104.782-11.134l-.036-.005zm-.964 9.378a3.206 3.206 0 113.215-3.207v.002a3.206 3.206 0 01-3.207 3.207z"},paypal:{title:"PayPal",fill:"#003087",d:"M7.016 19.198h-4.2a.562.562 0 0 1-.555-.65L5.093.584A.692.692 0 0 1 5.776 0h7.222c3.417 0 5.904 2.488 5.846 5.5-.006.25-.027.5-.066.747A6.794 6.794 0 0 1 12.071 12H8.743a.69.69 0 0 0-.682.583l-.325 2.056-.013.083-.692 4.39-.015.087zM19.79 6.142c-.01.087-.01.175-.023.261a7.76 7.76 0 0 1-7.695 6.598H9.007l-.283 1.795-.013.083-.692 4.39-.134.843-.014.088H6.86l-.497 3.15a.562.562 0 0 0 .555.65h3.612c.34 0 .63-.249.683-.585l.952-6.031a.692.692 0 0 1 .683-.584h2.126a6.793 6.793 0 0 0 6.707-5.752c.306-1.95-.466-3.744-1.89-4.906z"},shopify:{title:"Shopify",fill:"#7AB55C",d:"M15.337 23.979l7.216-1.561s-2.604-17.613-2.625-17.73c-.018-.116-.114-.192-.211-.192s-1.929-.136-1.929-.136-1.275-1.274-1.439-1.411c-.045-.037-.075-.057-.121-.074l-.914 21.104h.023zM11.71 11.305s-.81-.424-1.774-.424c-1.447 0-1.504.906-1.504 1.141 0 1.232 3.24 1.715 3.24 4.629 0 2.295-1.44 3.76-3.406 3.76-2.354 0-3.54-1.465-3.54-1.465l.646-2.086s1.245 1.066 2.28 1.066c.675 0 .975-.545.975-.932 0-1.619-2.654-1.694-2.654-4.359-.034-2.237 1.571-4.416 4.827-4.416 1.257 0 1.875.361 1.875.361l-.945 2.715-.02.01zM11.17.83c.136 0 .271.038.405.135-.984.465-2.064 1.639-2.508 3.992-.656.213-1.293.405-1.889.578C7.697 3.75 8.951.84 11.17.84V.83zm1.235 2.949v.135c-.754.232-1.583.484-2.394.736.466-1.777 1.333-2.645 2.085-2.971.193.501.309 1.176.309 2.1zm.539-2.234c.694.074 1.141.867 1.429 1.755-.349.114-.735.231-1.158.366v-.252c0-.752-.096-1.371-.271-1.871v.002zm2.992 1.289c-.02 0-.06.021-.078.021s-.289.075-.714.21c-.423-1.233-1.176-2.37-2.508-2.37h-.115C12.135.209 11.669 0 11.265 0 8.159 0 6.675 3.877 6.21 5.846c-1.194.365-2.063.636-2.16.674-.675.213-.694.232-.772.87-.075.462-1.83 14.063-1.83 14.063L15.009 24l.927-21.166z"},sentry:{title:"Sentry",fill:"#362D59",d:"M13.91 2.505c-.873-1.448-2.972-1.448-3.844 0L6.904 7.92a15.478 15.478 0 0 1 8.53 12.811h-2.221A13.301 13.301 0 0 0 5.784 9.814l-2.926 5.06a7.65 7.65 0 0 1 4.435 5.848H2.194a.365.365 0 0 1-.298-.534l1.413-2.402a5.16 5.16 0 0 0-1.614-.913L.296 19.275a2.182 2.182 0 0 0 .812 2.999 2.24 2.24 0 0 0 1.086.288h6.983a9.322 9.322 0 0 0-3.845-8.318l1.11-1.922a11.47 11.47 0 0 1 4.95 10.24h5.915a17.242 17.242 0 0 0-7.885-15.28l2.244-3.845a.37.37 0 0 1 .504-.13c.255.14 9.75 16.708 9.928 16.9a.365.365 0 0 1-.327.543h-2.287c.029.612.029 1.223 0 1.831h2.297a2.206 2.206 0 0 0 1.922-3.31z"},vercel:{title:"Vercel",fill:"currentColor",d:"M24 22.525H0l12-21.05 12 21.05z"},supabase:{title:"Supabase",fill:"#3FCF8E",d:"M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"},clerk:{title:"Clerk",fill:"#6C47FF",d:"m21.47 20.829-2.881-2.881a.572.572 0 0 0-.7-.084 6.854 6.854 0 0 1-7.081 0 .576.576 0 0 0-.7.084l-2.881 2.881a.576.576 0 0 0-.103.69.57.57 0 0 0 .166.186 12 12 0 0 0 14.113 0 .58.58 0 0 0 .239-.423.576.576 0 0 0-.172-.453Zm.002-17.668-2.88 2.88a.569.569 0 0 1-.701.084A6.857 6.857 0 0 0 8.724 8.08a6.862 6.862 0 0 0-1.222 3.692 6.86 6.86 0 0 0 .978 3.764.573.573 0 0 1-.083.699l-2.881 2.88a.567.567 0 0 1-.864-.063A11.993 11.993 0 0 1 6.771 2.7a11.99 11.99 0 0 1 14.637-.405.566.566 0 0 1 .232.418.57.57 0 0 1-.168.448Zm-7.118 12.261a3.427 3.427 0 1 0 0-6.854 3.427 3.427 0 0 0 0 6.854Z"},aws:{title:"Amazon Web Services",fill:"#232F3E",d:"M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z"},figma:{title:"Figma",fill:"#F24E1E",d:"M15.852 8.981h-4.588V0h4.588c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.491-4.49 4.491zM12.735 7.51h3.117c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-3.117V7.51zm0 1.471H8.148c-2.476 0-4.49-2.014-4.49-4.49S5.672 0 8.148 0h4.588v8.981zm-4.587-7.51c-1.665 0-3.019 1.355-3.019 3.019s1.354 3.02 3.019 3.02h3.117V1.471H8.148zm4.587 15.019H8.148c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h4.588v8.98zM8.148 8.981c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h3.117V8.981H8.148zM8.172 24c-2.489 0-4.515-2.014-4.515-4.49s2.014-4.49 4.49-4.49h4.588v4.441c0 2.503-2.047 4.539-4.563 4.539zm-.024-7.51a3.023 3.023 0 0 0-3.019 3.019c0 1.665 1.365 3.019 3.044 3.019 1.705 0 3.093-1.376 3.093-3.068v-2.97H8.148zm7.704 0h-.098c-2.476 0-4.49-2.014-4.49-4.49s2.014-4.49 4.49-4.49h.098c2.476 0 4.49 2.014 4.49 4.49s-2.014 4.49-4.49 4.49zm-.097-7.509c-1.665 0-3.019 1.355-3.019 3.019s1.355 3.019 3.019 3.019h.098c1.665 0 3.019-1.355 3.019-3.019s-1.355-3.019-3.019-3.019h-.098z"},airtable:{title:"Airtable",fill:"#18BFFF",d:"M11.992 1.966c-.434 0-.87.086-1.28.257L1.779 5.917c-.503.208-.49.908.012 1.116l8.982 3.558a3.266 3.266 0 0 0 2.454 0l8.982-3.558c.503-.196.503-.908.012-1.116l-8.957-3.694a3.255 3.255 0 0 0-1.272-.257zM23.4 8.056a.589.589 0 0 0-.222.045l-10.012 3.877a.612.612 0 0 0-.38.564v8.896a.6.6 0 0 0 .821.552L23.62 18.1a.583.583 0 0 0 .38-.551V8.653a.6.6 0 0 0-.6-.596zM.676 8.095a.644.644 0 0 0-.48.19C.086 8.396 0 8.53 0 8.69v8.355c0 .442.515.737.908.54l6.27-3.006.307-.147 2.969-1.436c.466-.22.43-.908-.061-1.092L.883 8.138a.57.57 0 0 0-.207-.044z"},intercom:{title:"Intercom",fill:"#6AFDEF",d:"M21 0H3C1.343 0 0 1.343 0 3v18c0 1.658 1.343 3 3 3h18c1.658 0 3-1.342 3-3V3c0-1.657-1.342-3-3-3zm-5.801 4.399c0-.44.36-.8.802-.8.44 0 .8.36.8.8v10.688c0 .442-.36.801-.8.801-.443 0-.802-.359-.802-.801V4.399zM11.2 3.994c0-.44.357-.799.8-.799s.8.359.8.799v11.602c0 .44-.357.8-.8.8s-.8-.36-.8-.8V3.994zm-4 .405c0-.44.359-.8.799-.8.443 0 .802.36.802.8v10.688c0 .442-.36.801-.802.801-.44 0-.799-.359-.799-.801V4.399zM3.199 6c0-.442.36-.8.802-.8.44 0 .799.358.799.8v7.195c0 .441-.359.8-.799.8-.443 0-.802-.36-.802-.8V6zM20.52 18.202c-.123.105-3.086 2.593-8.52 2.593-5.433 0-8.397-2.486-8.521-2.593-.335-.288-.375-.792-.086-1.128.285-.334.79-.375 1.125-.09.047.041 2.693 2.211 7.481 2.211 4.848 0 7.456-2.186 7.479-2.207.334-.289.839-.25 1.128.086.289.336.25.84-.086 1.128zm.281-5.007c0 .441-.36.8-.801.8-.441 0-.801-.36-.801-.8V6c0-.442.361-.8.801-.8.441 0 .801.357.801.8v7.195z"},posthog:{title:"PostHog",fill:"currentColor",d:"M9.854 14.5 5 9.647.854 5.5A.5.5 0 0 0 0 5.854V8.44a.5.5 0 0 0 .146.353L5 13.647l.147.146L9.854 18.5l.146.147v-.049c.065.03.134.049.207.049h2.586a.5.5 0 0 0 .353-.854L9.854 14.5zm0-5-4-4a.487.487 0 0 0-.409-.144.515.515 0 0 0-.356.21.493.493 0 0 0-.089.288V8.44a.5.5 0 0 0 .147.353l9 9a.5.5 0 0 0 .853-.354v-2.585a.5.5 0 0 0-.146-.354l-5-5zm1-4a.5.5 0 0 0-.854.354V8.44a.5.5 0 0 0 .147.353l4 4a.5.5 0 0 0 .853-.354V9.854a.5.5 0 0 0-.146-.354l-4-4zm12.647 11.515a3.863 3.863 0 0 1-2.232-1.1l-4.708-4.707a.5.5 0 0 0-.854.354v6.585a.5.5 0 0 0 .5.5H23.5a.5.5 0 0 0 .5-.5v-.6c0-.276-.225-.497-.499-.532zm-5.394.032a.8.8 0 1 1 0-1.6.8.8 0 0 1 0 1.6zM.854 15.5a.5.5 0 0 0-.854.354v2.293a.5.5 0 0 0 .5.5h2.293c.222 0 .39-.135.462-.309a.493.493 0 0 0-.109-.545L.854 15.501zM5 14.647.854 10.5a.5.5 0 0 0-.854.353v2.586a.5.5 0 0 0 .146.353L4.854 18.5l.146.147h2.793a.5.5 0 0 0 .353-.854L5 14.647z"},datadog:{title:"Datadog",fill:"#632CA6",d:"M19.57 17.04l-1.997-1.316-1.665 2.782-1.937-.567-1.706 2.604.087.82 9.274-1.71-.538-5.794zm-8.649-2.498l1.488-.204c.241.108.409.15.697.223.45.117.97.23 1.741-.16.18-.088.553-.43.704-.625l6.096-1.106.622 7.527-10.444 1.882zm11.325-2.712l-.602.115L20.488 0 .789 2.285l2.427 19.693 2.306-.334c-.184-.263-.471-.581-.96-.989-.68-.564-.44-1.522-.039-2.127.53-1.022 3.26-2.322 3.106-3.956-.056-.594-.15-1.368-.702-1.898-.02.22.017.432.017.432s-.227-.289-.34-.683c-.112-.15-.2-.199-.319-.4-.085.233-.073.503-.073.503s-.186-.437-.216-.807c-.11.166-.137.48-.137.48s-.241-.69-.186-1.062c-.11-.323-.436-.965-.343-2.424.6.421 1.924.321 2.44-.439.171-.251.288-.939-.086-2.293-.24-.868-.835-2.16-1.066-2.651l-.028.02c.122.395.374 1.223.47 1.625.293 1.218.372 1.642.234 2.204-.116.488-.397.808-1.107 1.165-.71.358-1.653-.514-1.713-.562-.69-.55-1.224-1.447-1.284-1.883-.062-.477.275-.763.445-1.153-.243.07-.514.192-.514.192s.323-.334.722-.624c.165-.109.262-.178.436-.323a9.762 9.762 0 0 0-.456.003s.42-.227.855-.392c-.318-.014-.623-.003-.623-.003s.937-.419 1.678-.727c.509-.208 1.006-.147 1.286.257.367.53.752.817 1.569.996.501-.223.653-.337 1.284-.509.554-.61.99-.688.99-.688s-.216.198-.274.51c.314-.249.66-.455.66-.455s-.134.164-.259.426l.03.043c.366-.22.797-.394.797-.394s-.123.156-.268.358c.277-.002.838.012 1.056.037 1.285.028 1.552-1.374 2.045-1.55.618-.22.894-.353 1.947.68.903.888 1.609 2.477 1.259 2.833-.294.295-.874-.115-1.516-.916a3.466 3.466 0 0 1-.716-1.562 1.533 1.533 0 0 0-.497-.85s.23.51.23.96c0 .246.03 1.165.424 1.68-.039.076-.057.374-.1.43-.458-.554-1.443-.95-1.604-1.067.544.445 1.793 1.468 2.273 2.449.453.927.186 1.777.416 1.997.065.063.976 1.197 1.15 1.767.306.994.019 2.038-.381 2.685l-1.117.174c-.163-.045-.273-.068-.42-.153.08-.143.241-.5.243-.572l-.063-.111c-.348.492-.93.97-1.414 1.245-.633.359-1.363.304-1.838.156-1.348-.415-2.623-1.327-2.93-1.566 0 0-.01.191.048.234.34.383 1.119 1.077 1.872 1.56l-1.605.177.759 5.908c-.337.048-.39.071-.757.124-.325-1.147-.946-1.895-1.624-2.332-.599-.384-1.424-.47-2.214-.314l-.05.059a2.851 2.851 0 0 1 1.863.444c.654.413 1.181 1.481 1.375 2.124.248.822.42 1.7-.248 2.632-.476.662-1.864 1.028-2.986.237.3.481.705.876 1.25.95.809.11 1.577-.03 2.106-.574.452-.464.69-1.434.628-2.456l.714-.104.258 1.834 11.827-1.424zM15.05 6.848c-.034.075-.085.125-.007.37l.004.014.013.032.032.073c.14.287.295.558.552.696.067-.011.136-.019.207-.023.242-.01.395.028.492.08.009-.048.01-.119.005-.222-.018-.364.072-.982-.626-1.308-.264-.122-.634-.084-.757.068a.302.302 0 0 1 .058.013c.186.066.06.13.027.207m1.958 3.392c-.092-.05-.52-.03-.821.005-.574.068-1.193.267-1.328.372-.247.191-.135.523.047.66.511.382.96.638 1.432.575.29-.038.546-.497.728-.914.124-.288.124-.598-.058-.698m-5.077-2.942c.162-.154-.805-.355-1.556.156-.554.378-.571 1.187-.041 1.646.053.046.096.078.137.104a4.77 4.77 0 0 1 1.396-.412c.113-.125.243-.345.21-.745-.044-.542-.455-.456-.146-.749"},algolia:{title:"Algolia",fill:"#003DFF",d:"M12 0C5.445 0 .103 5.285.01 11.817c-.097 6.634 5.285 12.131 11.92 12.17a11.91 11.91 0 0 0 5.775-1.443.281.281 0 0 0 .052-.457l-1.122-.994a.79.79 0 0 0-.833-.14 9.693 9.693 0 0 1-3.923.77c-5.36-.067-9.692-4.527-9.607-9.888.084-5.293 4.417-9.573 9.73-9.573h9.73v17.296l-5.522-4.907a.407.407 0 0 0-.596.063 4.52 4.52 0 0 1-3.934 1.793 4.538 4.538 0 0 1-4.192-4.168 4.53 4.53 0 0 1 4.512-4.872 4.532 4.532 0 0 1 4.509 4.126c.018.205.11.397.265.533l1.438 1.275a.28.28 0 0 0 .462-.158 6.82 6.82 0 0 0 .099-1.725c-.232-3.376-2.966-6.092-6.345-6.3-3.873-.24-7.11 2.79-7.214 6.588-.1 3.7 2.933 6.892 6.634 6.974a6.75 6.75 0 0 0 4.136-1.294l7.212 6.394a.48.48 0 0 0 .797-.36V.456A.456.456 0 0 0 23.54 0Z"},cloudflare:{title:"Cloudflare",fill:"#F38020",d:"M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727"},upstash:{title:"Upstash",fill:"#00E9A3",d:"M13.8027 0C11.193 0 8.583.9952 6.5918 2.9863c-3.9823 3.9823-3.9823 10.4396 0 14.4219 1.9911 1.9911 5.2198 1.9911 7.211 0 1.991-1.9911 1.991-5.2198 0-7.211L12 12c.9956.9956.9956 2.6098 0 3.6055-.9956.9955-2.6099.9955-3.6055 0-2.9866-2.9868-2.9866-7.8297 0-10.8164 2.9868-2.9868 7.8297-2.9868 10.8164 0l1.8028-1.8028C19.0225.9952 16.4125 0 13.8027 0zM12 12c-.9956-.9956-.9956-2.6098 0-3.6055.9956-.9955 2.6098-.9955 3.6055 0 2.9867 2.9868 2.9867 7.8297 0 10.8164-2.9867 2.9868-7.8297 2.9868-10.8164 0l-1.8028 1.8028c3.9823 3.9822 10.4396 3.9822 14.4219 0 3.9823-3.9824 3.9823-10.4396 0-14.4219-.9956-.9956-2.3006-1.4922-3.6055-1.4922-1.3048 0-2.6099.4966-3.6054 1.4922-1.9912 1.9912-1.9912 5.2198 0 7.211z"},mixpanel:{title:"Mixpanel",fill:"#7856FF",d:"M6.967 9.996h3.053c-.763-.477-1.048-1.145-1.431-2.384L7.443 3.366C6.919 1.458 6.49.551 4.39.551H.004v1.145h.621c1.286 0 1.431.477 1.814 1.908L3.44 7.326c.524 1.814 1.337 2.67 3.53 2.67h-.003Zm7.06 0h3.053c2.194 0 2.956-.86 3.484-2.67l1.001-3.722c.382-1.431.57-1.908 1.814-1.908H24V.551h-4.34c-2.146 0-2.576.86-3.053 2.815l-1.145 4.246c-.384 1.286-.673 1.907-1.435 2.384Zm-4.007 4.008h4.007V9.996H10.02v4.008ZM0 23.449h4.39c2.1 0 2.529-.907 3.053-2.815l1.146-4.246c.383-1.239.668-1.907 1.431-2.384H6.967c-2.194 0-3.007.86-3.531 2.67l-1.001 3.722c-.383 1.431-.524 1.907-1.814 1.907H0v1.146Zm19.65 0h4.343v-1.146h-.622c-1.239 0-1.431-.476-1.814-1.907l-1.001-3.722c-.524-1.814-1.286-2.67-3.483-2.67h-3.046c.762.477 1.041 1.098 1.424 2.384l1.145 4.246c.477 1.955.907 2.815 3.054 2.815Z"},gemini:{title:"Google Gemini",fill:"#8E75B2",d:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"}};var G1=h1(R5(),1),YZ="https://brand.volter.ai/logo/twin-world/svg?size=64&variant=mono";function O5({href:_,onClick:Q}){return G1.jsxDEV("h1",{children:G1.jsxDEV("a",{href:_,onClick:Q,children:[G1.jsxDEV("img",{src:YZ,alt:"",width:24,height:24,style:{verticalAlign:"middle"}},void 0,!1,void 0,this),G1.jsxDEV("span",{className:"brand-name",children:" Volter World"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}async function P0(_){return(await _.json().catch(()=>({}))).error??`answered ${_.status}`}function H_(_,Q,J=0,q=""){let[U,G]=b1.useState({state:"loading"});return b1.useEffect(()=>{G({state:"loading"})},[q,Q]),b1.useEffect(()=>{if(!Q)return;let Z=!0;return(async()=>{try{let F=await _(Q),L=F.ok?{state:"ok",data:await F.json()}:{state:"error",status:F.status,error:await P0(F)};if(Z)G(L)}catch(F){if(Z)G({state:"error",status:0,error:String(F)})}})(),()=>{Z=!1}},[q,Q,J]),U}function p1({load:_,what:Q,retry:J,lines:q=3}){if(_.state==="loading")return G1.jsxDEV(LZ,{lines:q,label:`Loading ${Q}…`},void 0,!1,void 0,this);if(_.state==="error")return G1.jsxDEV("div",{role:"alert",className:"error-state",children:[G1.jsxDEV("span",{children:["Could not read ",Q,": ",_.error]},void 0,!0,void 0,this),J?G1.jsxDEV("button",{type:"button",onClick:J,children:"Try again"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this);return null}function LZ({lines:_=3,label:Q="Loading…"}){return G1.jsxDEV("div",{className:"skeleton",role:"status","aria-label":Q,children:Array.from({length:_},(J,q)=>G1.jsxDEV("span",{style:{width:`${[92,76,84,64,88][q%5]}%`}},q,!1,void 0,this))},void 0,!1,void 0,this)}function R1({iso:_,time:Q}){if(!_)return G1.jsxDEV("span",{children:"—"},void 0,!1,void 0,this);let J=new Date(_);return G1.jsxDEV("time",{dateTime:_,title:_,children:Number.isNaN(J.getTime())?_:Q?J.toLocaleTimeString():J.toLocaleString()},void 0,!1,void 0,this)}var x6=(_)=>_?new Date(_).toLocaleString():"—";function m6(_){let Q=_?Date.parse(_):Number.NaN;if(Number.isNaN(Q))return"—";let J=Math.max(0,Math.round((Date.now()-Q)/1000));return J<60?"just now":J<3600?`${Math.round(J/60)}m ago`:J<86400?`${Math.round(J/3600)}h ago`:`${Math.round(J/86400)}d ago`}function k1(_,Q){let J=Q.replace(/[_-]+/g," "),q=J.endsWith("s")?J:/[^aeiou]y$/.test(J)?`${J.slice(0,-1)}ies`:/(ch|sh|x)$/.test(J)?`${J}es`:`${J}s`;return`${_} ${_===1?J:q}`}var X2=(_)=>_.length<=1?_.join(""):`${_.slice(0,-1).join(", ")} and ${_[_.length-1]}`,zZ={github:"GitHub",openai:"OpenAI",aws:"AWS",hubspot:"HubSpot",paypal:"PayPal",youtube:"YouTube",tiktok:"TikTok",linkedin:"LinkedIn",xai:"xAI",sendgrid:"SendGrid",elevenlabs:"ElevenLabs",assemblyai:"AssemblyAI",planetscale:"PlanetScale",googleoauth:"Google sign-in",npm:"npm","npm-registry":"npm registry",posthog:"PostHog",mongodb:"MongoDB",pagerduty:"PagerDuty",mailgun:"Mailgun",turbopuffer:"turbopuffer"},H1=(_)=>zZ[_]??_.charAt(0).toUpperCase()+_.slice(1);function u1({vendor:_}){let Q=F_[_];return G1.jsxDEV("span",{className:Q?"mark logo":"mark","aria-hidden":"true",children:Q?G1.jsxDEV("svg",{viewBox:"0 0 24 24",children:G1.jsxDEV("path",{d:Q.d,fill:Q.fill},void 0,!1,void 0,this)},void 0,!1,void 0,this):H1(_).charAt(0)},void 0,!1,void 0,this)}var K_=(_)=>{_.currentTarget.closest("details")?.removeAttribute("open")},WZ="volter.theme",g6=()=>{try{let _=localStorage.getItem(WZ);return _==="light"||_==="dark"?_:"system"}catch{return"system"}};function X_(_=g6()){let Q=document.documentElement;if(_==="system")Q.removeAttribute("data-theme");else Q.setAttribute("data-theme",_)}function Y_(){return b1.useEffect(()=>{let _=()=>[...document.querySelectorAll("details.menu[open], details.clock-more[open]")],Q=(q)=>{if(q.key!=="Escape"||document.querySelector("dialog[open]"))return;let U=_();if(!U.length)return;for(let G of U)G.removeAttribute("open");U[U.length-1].querySelector("summary")?.focus()},J=(q)=>{let U=q.target;for(let G of _())if(!U||!G.contains(U))G.removeAttribute("open")};return document.addEventListener("keydown",Q),document.addEventListener("click",J),()=>{document.removeEventListener("keydown",Q),document.removeEventListener("click",J)}},[]),null}function s1({open:_,onClose:Q,title:J,children:q,footer:U,wide:G}){let Z=b1.useRef(null),F=b1.useId();return b1.useEffect(()=>{let L=Z.current;if(!L)return;if(_&&!L.open){L.showModal();let Y=L.querySelector(".dialog-body :is(input:not([type=hidden]):not([disabled]), select, textarea)");if(Y?.focus(),Y instanceof HTMLInputElement&&Y.value&&/^(text|search|email|url)$/.test(Y.type))Y.select()}if(!_&&L.open)L.close()},[_]),G1.jsxDEV("dialog",{ref:Z,className:G==="window"?"dialog window":G?"dialog wide":"dialog","aria-labelledby":F,onClose:Q,onCancel:(L)=>{L.preventDefault(),Q()},onMouseDown:(L)=>{if(L.target===Z.current)Q()},children:_?G1.jsxDEV(G1.Fragment,{children:[G1.jsxDEV("div",{className:"dialog-head",children:[G1.jsxDEV("h2",{id:F,children:J},void 0,!1,void 0,this),G1.jsxDEV("button",{type:"button",className:"icon-button","aria-label":"Close",onClick:Q,children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G1.jsxDEV("div",{className:"dialog-body",children:q},void 0,!1,void 0,this),U?G1.jsxDEV("div",{className:"dialog-foot",children:U},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null},void 0,!1,void 0,this)}var h6="volter:confirm";function B0(_){return new Promise((Q)=>{window.dispatchEvent(new CustomEvent(h6,{detail:{ask:_,resolve:Q}}))})}function L_(){let[_,Q]=b1.useState(null),[J,q]=b1.useState("");b1.useEffect(()=>{let F=(L)=>{q(""),Q(L.detail)};return window.addEventListener(h6,F),()=>window.removeEventListener(h6,F)},[]);let U=(F)=>{_?.resolve(F),Q(null)},G=_?.ask,Z=!G?.typed||J===G.typed;return G1.jsxDEV(s1,{open:Boolean(_),onClose:()=>U(!1),title:G?.title??"",footer:G1.jsxDEV(G1.Fragment,{children:[G1.jsxDEV("button",{type:"button",onClick:()=>U(!1),children:"Cancel"},void 0,!1,void 0,this),G1.jsxDEV("button",{type:"button",className:G?.danger?"danger-button":"primary",disabled:!Z,onClick:()=>U(!0),children:G?.action},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:[G?.body?G1.jsxDEV("div",{className:"confirm-body",children:G.body},void 0,!1,void 0,this):null,G?.typed?G1.jsxDEV("div",{className:"typed-confirm",children:[G1.jsxDEV("p",{children:["Type ",G1.jsxDEV("code",{children:G.typed},void 0,!1,void 0,this)," to confirm."]},void 0,!0,void 0,this),G1.jsxDEV("input",{autoFocus:!0,"aria-label":`Type ${G.typed} to confirm`,value:J,onChange:(F)=>q(F.target.value),onKeyDown:(F)=>{if(F.key==="Enter"&&Z)U(!0)},autoComplete:"off",spellCheck:!1},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}var E6="volter:toast";function V1(_,Q="ok"){window.dispatchEvent(new CustomEvent(E6,{detail:{text:_,kind:Q}}))}function z_(){let[_,Q]=b1.useState([]);return b1.useEffect(()=>{let J=0,q=(U)=>{let{text:G,kind:Z}=U.detail,F=++J;if(Q((L)=>[...L.slice(-3),{id:F,text:G,kind:Z}]),Z!=="error")setTimeout(()=>Q((L)=>L.filter((Y)=>Y.id!==F)),4500)};return window.addEventListener(E6,q),()=>window.removeEventListener(E6,q)},[]),G1.jsxDEV("div",{className:"toasts",role:"region","aria-label":"Notifications",children:_.map((J)=>G1.jsxDEV("div",{className:`toast ${J.kind}`,role:J.kind==="error"?"alert":"status",children:[G1.jsxDEV("span",{children:J.text},void 0,!1,void 0,this),G1.jsxDEV("button",{type:"button",className:"icon-button","aria-label":"Dismiss",onClick:()=>Q((q)=>q.filter((U)=>U.id!==J.id)),children:"✕"},void 0,!1,void 0,this)]},J.id,!0,void 0,this))},void 0,!1,void 0,this)}function p6({value:_,label:Q,secret:J}){let[q,U]=b1.useState(!1);return G1.jsxDEV("div",{className:"copy-field",children:[Q?G1.jsxDEV("span",{className:"copy-label",children:Q},void 0,!1,void 0,this):null,G1.jsxDEV("div",{className:"copy-row",children:[G1.jsxDEV("input",{readOnly:!0,value:_,"aria-label":Q??"Value",onFocus:(Z)=>Z.currentTarget.select(),spellCheck:!1},void 0,!1,void 0,this),G1.jsxDEV("button",{type:"button",onClick:()=>{navigator.clipboard?.writeText(_).then(()=>{U(!0),setTimeout(()=>U(!1),1600),V1(J?"Copied. Keep it somewhere safe":"Copied")}).catch(()=>V1("Your browser would not copy it: select it and copy","error"))},children:q?"Copied":"Copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function W_({label:_,items:Q}){return G1.jsxDEV("details",{className:"menu row-menu",children:[G1.jsxDEV("summary",{className:"icon-button",role:"button","aria-haspopup":"menu","aria-label":_,title:_,children:"⋯"},void 0,!1,void 0,this),G1.jsxDEV("div",{className:"popover menu-list",role:"menu",children:Q.filter((J)=>Boolean(J)).map((J)=>J.href?G1.jsxDEV("a",{role:"menuitem",href:J.href,className:J.danger?"danger-item":void 0,onClick:K_,children:J.label},J.label,!1,void 0,this):G1.jsxDEV("button",{type:"button",role:"menuitem",disabled:J.disabled,className:J.danger?"danger-item":void 0,onClick:(q)=>{K_(q),J.onSelect?.()},children:J.label},J.label,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function f5({title:_,children:Q,action:J}){return G1.jsxDEV("div",{className:"empty-state",children:[G1.jsxDEV("p",{className:"empty-title",children:_},void 0,!1,void 0,this),Q?G1.jsxDEV("div",{className:"empty-body",children:Q},void 0,!1,void 0,this):null,J?G1.jsxDEV("div",{className:"empty-action",children:J},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function A_(){return b1.useEffect(()=>{let _=(J)=>{let q=document.querySelector("main.app"),U=J.target;if(q?.hasAttribute("data-drawer")&&U&&!U.closest(".side")&&!U.closest(".drawer-button"))q.removeAttribute("data-drawer")},Q=(J)=>{if(J.key==="Escape")AZ()};return document.addEventListener("click",_),document.addEventListener("keydown",Q),()=>{document.removeEventListener("click",_),document.removeEventListener("keydown",Q)}},[]),G1.jsxDEV("button",{type:"button",className:"icon-button drawer-button","aria-label":"Menu",onClick:()=>{document.querySelector("main.app")?.toggleAttribute("data-drawer")},children:"☰"},void 0,!1,void 0,this)}var AZ=()=>{document.querySelector("main.app")?.removeAttribute("data-drawer")};function f4(_={}){let Q=(q,U)=>_.tools?`${U} (\`${q}\`)`:`\`${q}\``,J=["Set up Volter World for this app, so its calls to Stripe, Slack, GitHub, OpenAI and the other services it uses go to local twins instead of the real APIs. The app keeps its real SDKs and code.","",_.tools?"1. You have the Volter World tools (volter mcp). If the `volter` command is missing, install it: `npm install -g @volter/world`.":"1. Install the command and your agent tooling: `npm install -g @volter/world`, then `volter agents install --yes`.",`2. In the app's folder, ${Q("volter world init --install","world_init")}: it detects the vendors the app calls and installs their twins. Show me the vendors it detected and why, before keeping them.`,`3. ${_.tools?"Start it with world_up":"Start it: `volter world up`"}, then run the tests inside it: ${Q("volter world run -- <the test command>","world_run")}. Fix anything that fails because a call went to the real service.`,`4. Tell me what the app did at each vendor (${Q("volter world log","world_log")}), and give me the dashboard link (${_.tools?"world_view":"`volter world view --no-open`, started in the background: it keeps running"}).`];if(_.platform){let q=_.world??"<org>/<world>";J.push(`5. Share it with my team on ${_.platform}: ${Q(`volter login ${_.platform}`,"platform_login")} gives a link and a code for me to approve in my browser. Once I have, link it with ${Q(`volter remote add origin ${q} --create`,"remote_link with create: true")}${_.world?"":" (ask me for <org>/<world>)"}, then send what the app did: ${Q('volter world changeset -m "<what and why>"',"world_changeset")} and ${Q("volter world push","world_push")}.`)}return J.push("","The guide: https://world.volter.ai/docs/guides/use-with-a-coding-agent.md"),J.join(`
|
|
35
|
+
`)}var B_={"git-commit-horizontal":[["rect",{x:"9",y:"9",width:"6",height:"6"}],["path",{d:"M3 12h6M15 12h6"}]],"arrow-down-to-line":[["path",{d:"M12 17V3"}],["path",{d:"m6 11 6 6 6-6"}],["path",{d:"M19 21H5"}]],"arrow-up-from-line":[["path",{d:"m18 9-6-6-6 6"}],["path",{d:"M12 3v14"}],["path",{d:"M5 21h14"}]],"git-branch":[["rect",{x:"4",y:"3",width:"4",height:"4"}],["rect",{x:"4",y:"17",width:"4",height:"4"}],["rect",{x:"16",y:"5",width:"4",height:"4"}],["path",{d:"M6 7v10M18 9v2a4 4 0 0 1-4 4H6"}]],monitor:[["rect",{x:"3",y:"4",width:"18",height:"13"}],["path",{d:"M8 21h8M12 17v4"}]],vault:[["rect",{width:"18",height:"18",x:"3",y:"3"}],["rect",{x:"6.3",y:"6.3",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}],["path",{d:"m7.9 7.9 2.7 2.7"}],["rect",{x:"15.3",y:"6.3",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}],["path",{d:"m13.4 10.6 2.7-2.7"}],["rect",{x:"6.3",y:"15.3",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}],["path",{d:"m7.9 16.1 2.7-2.7"}],["rect",{x:"15.3",y:"15.3",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}],["path",{d:"m13.4 13.4 2.7 2.7"}],["circle",{cx:"12",cy:"12",r:"2"}]],settings:[["circle",{cx:"12",cy:"12",r:"3"}],["circle",{cx:"12",cy:"12",r:"7"}],["path",{d:"M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9L7 7M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1"}]],history:[["path",{d:"M3 12a9 9 0 1 0 3-6.7"}],["path",{d:"M3 4v5h5"}],["path",{d:"M12 7v5l3 3"}]],activity:[["path",{d:"M2 12h4l3-8 6 16 3-8h4"}]],"file-diff":[["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"}],["path",{d:"M9 10h6"}],["path",{d:"M12 13V7"}],["path",{d:"M9 17h6"}]],"square-plus":[["rect",{x:"4",y:"4",width:"16",height:"16"}],["path",{d:"M12 8v8M8 12h8"}]],"square-minus":[["rect",{width:"18",height:"18",x:"3",y:"3"}],["path",{d:"M8 12h8"}]],"square-dot":[["rect",{width:"18",height:"18",x:"3",y:"3"}],["rect",{x:"10.8",y:"10.8",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}]],cloud:[["path",{d:"M7 19a5 5 0 0 1-.5-10A6 6 0 0 1 18 8a4.5 4.5 0 0 1 .5 11z"}]],"refresh-cw":[["path",{d:"M20 12a8 8 0 0 1-14.3 4.9M4 12a8 8 0 0 1 14.3-4.9"}],["path",{d:"M19 3v5h-5M5 21v-5h5"}]],clock:[["circle",{cx:"12",cy:"12",r:"9"}],["path",{d:"M12 7v5l3 3"}]],"key-round":[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}],["rect",{x:"15.3",y:"6.3",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}]],plug:[["path",{d:"M9 3v5M15 3v5M6 8h12v4a6 6 0 0 1-12 0zM12 18v3"}]],"list-checks":[["path",{d:"M11 6h9M11 12h9M11 18h9"}],["path",{d:"M3 6l1.5 1.5L7 5M3 12l1.5 1.5L7 11M3 18l1.5 1.5L7 17"}]],palette:[["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"}],["rect",{x:"12.3",y:"5.3",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}],["rect",{x:"16.3",y:"9.3",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}],["rect",{x:"5.3",y:"11.3",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}],["rect",{x:"7.3",y:"6.3",width:"2.4",height:"2.4",fill:"currentColor",stroke:"none"}]],check:[["path",{d:"M4 12l5 5L20 6"}]],plus:[["path",{d:"M12 4v16M4 12h16"}]],"chevron-down":[["path",{d:"M5 9l7 7 7-7"}]],"external-link":[["path",{d:"M14 4h6v6M20 4l-9 9"}],["path",{d:"M18 14v6H4V6h6"}]],"table-2":[["path",{d:"M3 9h18"}],["path",{d:"M9 3v18"}],["rect",{x:"3",y:"3",width:"18",height:"18"}]],"scroll-text":[["path",{d:"M15 12h-5"}],["path",{d:"M15 8h-5"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"}]],"layout-grid":[["rect",{x:"4",y:"4",width:"7",height:"7"}],["rect",{x:"13",y:"4",width:"7",height:"7"}],["rect",{x:"4",y:"13",width:"7",height:"7"}],["rect",{x:"13",y:"13",width:"7",height:"7"}]],globe:[["circle",{cx:"12",cy:"12",r:"9"}],["path",{d:"M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"}]],"arrow-left":[["path",{d:"M20 12H5M11 6l-6 6 6 6"}]],link:[["path",{d:"M9 15l6-6"}],["path",{d:"M11 6l2-2a4.2 4.2 0 0 1 6 6l-2 2M13 18l-2 2a4.2 4.2 0 0 1-6-6l2-2"}]],user:[["circle",{cx:"12",cy:"8",r:"4"}],["path",{d:"M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1"}]],"log-out":[["path",{d:"M10 4H4v16h6M9 12h11M16 8l4 4-4 4"}]]};var $=h1(R5(),1),I4="volter.console.token",N5=document.getElementById("root"),X1=N5.dataset.base??"/-/console",M1=window.location.origin,W2=(N5.dataset.worlds??M1).replace(/\/+$/,""),N_=(N5.dataset.names??"").split(",").filter((_)=>_!==""),g0=N5.dataset.worldOrigin==="1",z2=window.fetch.bind(window),p0="(session)",C_="(pass)",I5=(_)=>{try{if(_&&!g0)sessionStorage.setItem(I4,_);else sessionStorage.removeItem(I4);localStorage.removeItem(I4)}catch{}},S_="volter.console.portal",k_=(_)=>{try{if(typeof _==="string"&&/^https?:$/.test(new URL(_).protocol))sessionStorage.setItem(S_,new URL(_).origin)}catch{}},BZ=()=>{return A2.get("token")??""},c1=()=>{try{let _=sessionStorage.getItem(S_)??"";return _&&/^https?:$/.test(new URL(_).protocol)?new URL(_).origin:""}catch{return""}},MZ=()=>{let _=BZ();if(g0){if(I5(""),A2.get("pass"))return C_;let Q=new URLSearchParams(window.location.search).has("signin");if(Q)try{window.history.replaceState(null,"",window.location.pathname+window.location.hash)}catch{}return _||(Q?"":p0)}if(_)return I5(_),_;try{return sessionStorage.getItem(I4)??""}catch{return""}};function y1(_){let Q=_.trim();if(/not ready/i.test(Q)&&/(never verified|not verified|no approvals)/i.test(Q)){let G=[],Z=[];if(/(never verified|not verified)/i.test(Q))G.push("it is not verified yet"),Z.push("verify");if(/no approvals/i.test(Q))G.push("no one has approved it"),Z.push("approve");return{text:`Not ready to deploy: ${X2(G)}.`,acts:Z}}let J=/no credential (?:is )?sealed for ([a-z0-9_-]+)/i.exec(Q);if(J)return{text:`No credential is sealed for ${H1(J[1])}: seal one in Settings › Vault.`,acts:["vault"]};if(/has no origin/i.test(Q))return{text:"This World has no remote: name one in Settings › Remote.",acts:["remote"]};let q=/the ([a-z0-9_-]+) twin has no root/i.exec(Q)??/:\s*([a-z0-9_, -]+?) (?:has|have) no root/i.exec(Q);if(q){let G=q[1].split(/,\s*/).filter(Boolean).map(H1);return{text:`${X2(G)} ${G.length===1?"is":"are"} not connected to ${G.length===1?"its":"their"} real service: Settings › Real services.`,acts:["settings"]}}if(/opening a seal is/i.test(Q))return{text:"A key cannot seal a credential: open the World as yourself.",acts:[]};if(/a key manages no keys/i.test(Q))return{text:"A key cannot manage keys: open the World as yourself.",acts:[]};if(/^PUT origin:/i.test(Q))return{text:"That is not a World's address: https://<host>/<org>/<world>",acts:[]};if(/^clock: \{/i.test(Q))return{text:"Pick a date and time.",acts:[]};if(/^advance: \{/i.test(Q))return{text:"Advance by a number and a unit: 90m, 12h, 3d.",acts:[]};if(/^branches: \{/i.test(Q))return{text:"That branch could not be made: pick now, or an instant before it.",acts:[]};if(/^approve: \{/i.test(Q))return{text:"Name who approves.",acts:[]};if(/a browser deploys only what it names/i.test(Q))return{text:"A deploy is confirmed by its name: use Deploy again.",acts:[]};if(/^no such door/i.test(Q))return{text:"This World does not answer that here.",acts:[]};return{text:Q.replace(/\s*[—–-]+\s*(?:run\s+)?`[^`]*`/g,"").replace(/\s*[—–-]+\s*(?:PUT|POST|GET|DELETE)\s+\/-\/\S+(?:\s*\{[^}]*\})?/g,"").replace(/\s*\(\s*`[^`]*`\s*\)/g,"").replace(/`(?:volter|printf|curl|npm|bun)[^`]*`/g,"").replace(/:\s*\{[^}]*\}/g,"").replace(/\(\s*\)/g,"").replace(/\s*;\s*(?=[;.]|$)/g,"").replace(/\s+([,.;:])/g,"$1").trim()||_,acts:[]}}var J0=async(_)=>y1(await P0(_)).text,TZ={vault:["vault","Open Vault"],remote:["remote","Open Remote"],settings:["settings/services","Open Real services"]};function y_({name:_,acts:Q}){let J=Q.map((q)=>TZ[q]).filter((q)=>Boolean(q));if(J.length===0)return null;return $.jsxDEV($.Fragment,{children:J.map(([q,U])=>$.jsxDEV(i.default.Fragment,{children:[" ",$.jsxDEV("a",{href:`${X1}/${_}/~/${q}`,onClick:(G)=>{G.preventDefault(),T1([..._.split("/"),"~",...q.split("/")])},children:U},void 0,!1,void 0,this)]},q,!0,void 0,this))},void 0,!1,void 0,this)}async function I1(_,Q,J={}){return z2(`${M1}${Q}`,{...J,headers:{...J.headers??{},..._===p0?{}:{"x-volter-token":_},...J.body&&!J.headers?.["content-type"]?{"content-type":"application/json"}:{}}})}function w1(_,Q,J=0){let q=H_((U)=>I1(_,U),Q,J,_);return q.state==="error"?{...q,error:y1(q.error).text}:q}var x2=(_)=>{let Q=new Date(_),J=(q)=>String(q).padStart(2,"0");return`${Q.getFullYear()}-${J(Q.getMonth()+1)}-${J(Q.getDate())}T${J(Q.getHours())}:${J(Q.getMinutes())}`},M_=(_)=>new Date(Math.ceil(Date.parse(_)/60000)*60000).toISOString(),v_=(_)=>_.operation==="observed"?`observed${_.provenance==="placeholder"?" (default data)":" (vendor)"}`:_.receipt?`${_.receipt.status??""} ${_.receipt.externalId??""} ${_.receipt.reason??""}`.trim():_.provenance==="placeholder"?"default data":"unpushed",RZ=(_)=>{let Q=/^[0-9a-f]{2}-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/.exec(_??"");return Q?{trace:Q[1],span:Q[2]}:null},i6="volter.console.snapshots",C0=()=>{try{return JSON.parse(sessionStorage.getItem(i6)??"{}")}catch{return{}}},j_=new Map,d6=(_)=>{if(g0){if(_.token||_.readToken)j_.set(_.name,{token:_.token,readToken:_.readToken});_={..._,token:"",readToken:""}}try{sessionStorage.setItem(i6,JSON.stringify({...C0(),[_.name]:_}))}catch{}},a6=(_)=>j_.get(_)?.readToken||C0()[_]?.readToken||"",w4=(_)=>{try{let Q=C0();delete Q[_],sessionStorage.setItem(i6,JSON.stringify(Q))}catch{}},A2=new URLSearchParams(window.location.hash.slice(1)),h2=A2.get("close")??"";function C5(_){if(typeof _!=="string")return null;let Q;try{Q=new URL(_)}catch{return null}return(Q.protocol==="http:"||Q.protocol==="https:")&&Q.origin===_.replace(/\/+$/,"")?Q:null}function s6(_){let Q=C5(_);if(!Q)return null;let J=new URL(M1);if(Q.protocol!==J.protocol||Q.port!==J.port)return null;if(Q.hostname===J.hostname)return Q.origin;let q=/^[a-z0-9](?:[a-z0-9]|-(?!-))*--[a-z0-9](?:[a-z0-9]|-(?!-))*\./;if(!q.test(Q.hostname))return null;let U=Q.hostname.replace(q,"");return U===J.hostname||q.test(J.hostname)&&U===J.hostname.replace(q,"")?Q.origin:null}function OZ(_){let Q;try{Q=JSON.parse(_)}catch{return null}let J=/^[a-z0-9][a-z0-9-]*\/[a-z0-9][a-z0-9-]*$/i;if(typeof Q.name!=="string"||!J.test(Q.name)||typeof Q.parent!=="string"||!J.test(Q.parent)||typeof Q.at!=="string")return null;let q=Q.parentOrigin===void 0?void 0:s6(Q.parentOrigin);return{name:Q.name,parent:Q.parent,token:typeof Q.token==="string"?Q.token:"",readToken:typeof Q.readToken==="string"?Q.readToken:"",at:Q.at,expiresAt:typeof Q.expiresAt==="string"?Q.expiresAt:null,...q?{parentOrigin:q}:{}}}{let _=A2.get("snapshot");if(_){let Q=OZ(_);if(Q&&!C0()[Q.name])d6(Q)}}var V_="volter.console.home",u_=(_)=>{let Q=C5(_);if(!Q)return null;let J=new URL(M1).hostname,q=J.replace(/^[a-z0-9](?:[a-z0-9]|-(?!-))*--[a-z0-9](?:[a-z0-9]|-(?!-))*\./,"");return Q.hostname===J||Q.hostname===q?Q.origin:null};{let _=u_(A2.get("home"));if(_)try{sessionStorage.setItem(V_,_)}catch{}}if(["token","pass","portal","snapshot","home","close"].some((_)=>A2.has(_)))try{window.history.replaceState(null,"",window.location.pathname+window.location.search)}catch{}var G0=()=>{try{return u_(sessionStorage.getItem(V_))??""}catch{return""}};function t6(_,Q,J,q){let U=new URLSearchParams({token:Q,home:G0()||M1}),G=C0()[J];if(G)U.set("snapshot",JSON.stringify(G));window.location.replace(`${_}${q??`${window.location.pathname}${window.location.search}`}#${U.toString()}`)}var S4=N5.dataset.route==="memory"?"":null;function gB(_){S4=_,window.dispatchEvent(new PopStateEvent("popstate"))}function Y2(){return(S4??window.location.pathname.slice(X1.length)).split("/").filter(Boolean).map((_)=>{try{return decodeURIComponent(_)}catch{return""}})}var T_=/^[a-z0-9](?:[a-z0-9]|-(?!-))*$/i,N0=(_,Q)=>_&&Q&&T_.test(_)&&T_.test(Q)?`${_}/${Q}`:"";function T1(_){let Q=`/${_.map(encodeURIComponent).join("/")}`;if(S4!==null)S4=Q;else window.history.pushState(null,"",`${X1}${Q}`);window.dispatchEvent(new PopStateEvent("popstate"))}function b_(_,Q){let J=s6(C0()[_]?.origin);if(J&&J!==M1){t6(J,a6(_),_,`${X1}/${Q.map(encodeURIComponent).join("/")}`);return}T1(Q)}async function R_(){let[_,Q]=Y2(),J=N0(_,Q),q=J?[J]:N_;if(q.length===0){let U=await z2(`${M1}/-/ping`).catch(()=>null);q=U?.ok?(await U.json().catch(()=>({}))).worlds??[]:[]}q=q.filter((U)=>{let[G,Z,...F]=U.split("/");return F.length===0&&N0(G,Z)===U});for(let U of q){let G=await z2(`${M1}/-/${U}/session`,{method:"POST"}).catch(()=>null);if(!G)continue;let Z=await G.json().catch(()=>({})),F=C5(Z.origin)?.origin;if(G.status===409&&F&&F!==M1)return window.location.replace(`${F}${X1}/${U}`),"moved";if(G.ok&&Z.local)return{token:typeof Z.token==="string"&&Z.token?Z.token:p0}}return null}function fZ(){let[_,Q]=i.useState(g6),J=(q)=>()=>{try{if(q==="system")localStorage.removeItem("volter.theme");else localStorage.setItem("volter.theme",q)}catch{}X_(q),Q(q)};return $.jsxDEV($.Fragment,{children:[$.jsxDEV("p",{className:"menu-label",children:"Appearance"},void 0,!1,void 0,this),$.jsxDEV("div",{className:"theme-choice",role:"radiogroup","aria-label":"Appearance",children:["system","light","dark"].map((q)=>$.jsxDEV("button",{type:"button",role:"radio","aria-checked":_===q,onClick:J(q),children:q==="system"?"System":q==="light"?"Light":"Dark"},q,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function IZ(){let[_,Q]=i.useState(MZ()),[J,q]=i.useState(!1),[U,G]=i.useState(!1),[Z,F]=i.useState(""),[L,Y]=i.useState(null),[H,K]=i.useState(null),[X,z]=i.useState(Y2());i.useEffect(()=>{let y=()=>z(Y2());return window.addEventListener("popstate",y),()=>window.removeEventListener("popstate",y)},[]),i.useEffect(()=>{let[y,g]=Y2(),b=N0(y,g),[t,o]=b?b.split("/"):[],d=C0()[h2];if(!h2||!_||!t||!o||!d?.made||d.parent!==`${t}/${o}`||N0(...h2.split("/"))!==h2)return;try{window.history.replaceState(null,"",window.location.pathname+window.location.search)}catch{}I1(_,`/-/${t}/${o}/branches/${h2}`,{method:"DELETE"}).catch(()=>null).then(()=>w4(h2))},[_]);let W=i.useCallback(async(y)=>{if(K(null),!y){let o=await R_();if(o==="moved")return;if(o){if(q(!0),o.token!==p0)I5(o.token);Q(o.token);return}Y(null),G(!0);return}if(g0&&y===p0){let o=await R_();if(o==="moved")return;if(o)q(!0)}if(g0&&y===C_){let[o,d]=Y2(),a=N0(o,d),[c,n]=a?a.split("/"):[],Q1=c&&n?await z2(`${M1}/-/${c}/${n}/session`,{method:"POST",headers:{"x-volter-pass":A2.get("pass")??""}}).catch(()=>null):null;if(!Q1){K(`${M1} did not answer: no session was opened`),Y(null);return}if(!Q1.ok){K(`${await J0(Q1)}. Open it again from the platform.`),Y(null);return}k_((await Q1.json().catch(()=>({}))).issuer),Q(p0);return}if(g0&&y!==p0){let[o,d]=Y2(),a=N0(o,d),[c,n]=a?a.split("/"):[],Q1=c&&n?await z2(`${M1}/-/${c}/${n}/session`,{method:"POST",headers:{"x-volter-token":y}}).catch(()=>null):null;if(!Q1){K(`${M1} did not answer: no session was opened`),Y(null);return}if(!Q1.ok){let F1=await J0(Q1);K(Q1.status===401||Q1.status===403?`That token does not open ${c}/${n}.`:Q1.status===409?`${c}/${n}'s session lives at another origin: ${F1}`:`The World could not open a session (${Q1.status}): ${F1}`),Y(null);return}Q(p0);return}let g=g0?new Response(null,{status:404}):await I1(y,"/-/worlds");if(g.ok){let{worlds:o}=await g.json();Y({kind:"admin",worlds:o});return}if(g.status===429){K("You are asking faster than the platform allows — wait a moment and reload."),Y(null);return}if(g.status>=500){let o=await g.json().catch(()=>({}));K(`The platform could not list your worlds${o.error?`: ${o.error}`:""}. Reload; if it stays, the status page says what is wrong.`),Y(null);return}let b=N_;if(b.length===0){let o=await z2(`${M1}/-/ping`);if(!o.ok){K(`${M1} does not answer as a host`),Y(null);return}if(b=(await o.json()).worlds??[],b.length===0){K(`${M1} does not list its Worlds: open a World at its own address, ${M1}${X1}/<org>/<world>`),Y(null);return}}let t=[];for(let o of b){let d=await I1(y,`/-/${o}/twins`);if(d.ok){let a=await d.json();t.push({name:o,base:`${W2}/${o}`,twins:(a.twins??[]).map((c)=>({vendor:c.twin,protocol:c.protocol??null,root:c.root??null}))})}}if(t.length===0){K("This link or key opens no World here: it was revoked, or it has ended."),Y(null);return}Y({kind:"world",worlds:t})},[]);i.useEffect(()=>{W(_)},[_,W]);let O=(y)=>L?.kind==="admin"?L.worlds.find((g)=>g.name===y)?.token??_:_,[T,B]=i.useState("");if(!_||!L&&!H)return $.jsxDEV("main",{className:"app gate",children:$.jsxDEV("div",{className:"gate-window",children:[$.jsxDEV(O5,{href:`${X1}/`},void 0,!1,void 0,this),_&&!L&&!H||!_&&!U?$.jsxDEV("p",{className:"mode",children:"Opening…"},void 0,!1,void 0,this):$.jsxDEV("form",{onSubmit:(y)=>{y.preventDefault(),I5(Z.trim()),Q(Z.trim())},className:"stack",children:[$.jsxDEV("h2",{children:"Open a World"},void 0,!1,void 0,this),$.jsxDEV("p",{className:"mode",children:"A World's token opens that World. A host's admin token opens every World it serves."},void 0,!1,void 0,this),$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"Token"},void 0,!1,void 0,this),$.jsxDEV("input",{name:"token",type:"password",value:Z,onChange:(y)=>F(y.target.value),autoFocus:!0,autoComplete:"off"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("button",{type:"submit",className:"primary",children:"Open"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);let w=()=>{if(J){window.location.reload();return}if(g0){let[y,g]=Y2(),b=N0(y,g),[t,o]=b?b.split("/"):[],d=()=>window.location.replace(c1()?`${c1()}/`:`${M1}${X1}/${t&&o?`${t}/${o}`:""}?signin`);if(setTimeout(d,2000),t&&o)z2(`${M1}/-/${t}/${o}/session/end`,{method:"POST"}).catch(()=>null).then(d);else d();return}if(L)for(let y of L.worlds)navigator.sendBeacon(`${y.base.replace(/\/[^/]+\/[^/]+$/,"")}/-/${y.name}/session/end`);I5(""),Q(""),F(""),Y(null),T1([])};if(H||!L)return $.jsxDEV("main",{className:"app gate",children:$.jsxDEV("div",{className:"gate-window",children:[$.jsxDEV(O5,{href:`${X1}/`},void 0,!1,void 0,this),$.jsxDEV("h2",{children:"Could not open it"},void 0,!1,void 0,this),$.jsxDEV("p",{role:"alert",children:H??"nothing answered"},void 0,!1,void 0,this),c1()?$.jsxDEV("a",{className:"button primary",href:`${c1()}/`,children:["Back to ",new URL(c1()).host]},void 0,!0,void 0,this):$.jsxDEV("button",{type:"button",className:"primary",onClick:w,children:J?"Try again":"Use another token"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);let[A,R,I,C,P,S,N]=X,v=I==="~",j=/^[A-Za-z0-9_-]+$/,m=/^[^\u0000-\u001f\u007f]{1,200}$/,p=v||!I||!j.test(I)?void 0:I,k=P&&j.test(P)?S!==void 0&&C!=="changes"&&C!=="screens"?N0(P,S)||void 0:P:void 0,D=C==="changes"&&P==="changesets"&&S&&j.test(S)?S:C==="screens"&&S&&N&&/^[A-Za-z0-9_.-]+$/.test(S)&&m.test(N)?`${S}:${N}`:void 0,V=N0(A,R),E=V?C0()[V]??null:null,u=(y)=>a6(y)||O(y),h=E?L.kind==="admin"?L.worlds.find((y)=>y.name===E.parent)?.token??null:L.worlds.some((y)=>y.name===E.parent)?_:null:null,f=async(y)=>{let g=s6(y.parentOrigin);if(g&&g!==M1){w4(y.name),window.location.assign(`${g}${X1}/${y.parent}#close=${encodeURIComponent(y.name)}`);return}if(y.made)await I1(O(y.parent),`/-/${y.parent}/branches/${y.name}`,{method:"DELETE"}).catch(()=>null),w4(y.name);T1(y.parent.split("/"))};return $.jsxDEV("main",{className:V?"app workspace":"app home",children:[V?null:$.jsxDEV("header",{children:[V?$.jsxDEV(A_,{},void 0,!1,void 0,this):null,$.jsxDEV(O5,{href:`${G0()&&G0()!==M1?G0():""}${X1}/`,onClick:(y)=>{if(G0()&&G0()!==M1)return;y.preventDefault(),T1([])}},void 0,!1,void 0,this),$.jsxDEV("nav",{"aria-label":"breadcrumb",className:"crumbs",children:[V?$.jsxDEV($.Fragment,{children:[$.jsxDEV("span",{className:"crumb-sep","aria-hidden":"true",children:"/"},void 0,!1,void 0,this),$.jsxDEV("span",{children:V.split("/")[0]},void 0,!1,void 0,this),$.jsxDEV("span",{className:"crumb-sep","aria-hidden":"true",children:"/"},void 0,!1,void 0,this),$.jsxDEV("a",{href:`${X1}/${V}`,className:"crumb-world",onClick:(y)=>{y.preventDefault(),T1(V.split("/"))},children:V.split("/")[1]},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,p?$.jsxDEV("span",{children:[" / ",p]},void 0,!0,void 0,this):null,v&&C==="trace"?$.jsxDEV("span",{children:" / trace"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),c1()?$.jsxDEV("a",{href:`${c1()}/${V?encodeURIComponent(V.split("/")[0]):""}`,title:`Back to the platform at ${new URL(c1()).host}`,className:"back-link",children:["← ",$.jsxDEV("span",{className:"back-text",children:V?`${V.split("/")[0]}'s Worlds`:new URL(c1()).host},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,V?null:$.jsxDEV("span",{className:"mode",children:J?"on this machine":T?`signed in as ${T}`:L.kind==="admin"?"host: admin":"opened with a link or key"},void 0,!1,void 0,this),V||J?null:$.jsxDEV("button",{onClick:w,children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V?$.jsxDEV(NZ,{name:V,token:u(V),twin:p,tab:v?C??"overview":"overview",arg:v?k:void 0,...v&&D?{sub:D}:{},admin:E?null:L.kind==="admin"?_:null,snapshot:E,parentToken:h,who:{local:J,person:T||null,admin:L.kind==="admin"},onSignOut:w,onReturn:f,opens:(y)=>!!C0()[y]||L.kind==="admin"&&L.worlds.some((g)=>g.name===y),onRemoved:()=>{W(_),T1([])},onWho:B,worlds:L.worlds.map((y)=>y.name)},V,!1,void 0,this):$.jsxDEV(wZ,{mode:L,admin:L.kind==="admin"?_:null,reload:()=>W(_)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function wZ({mode:_,admin:Q,reload:J}){let[q,U]=i.useState(""),[G,Z]=i.useState(""),[F,L]=i.useState(""),[Y,H]=i.useState(null),K=async(P)=>{if(!await B0({title:`Rotate the tokens of ${P}?`,body:"Every app, script and person holding the current tokens loses access at once. The new ones are shown once.",action:"Rotate tokens",danger:!0}))return;let S=await I1(Q,`/-/worlds/${P}/rotate`,{method:"POST"}),N=await S.json().catch(()=>({}));H(S.ok?`rotated ${P}: the new tokens are shown once — token ${N.token} · read token ${N.readToken}`:N.error?y1(N.error).text:`answered ${S.status}`),await J()},X=async(P)=>{let S=await I1(Q,`/-/worlds/${P}`,{method:"DELETE"}),N=await S.json().catch(()=>({}));H(S.ok?`removed ${P}`:N.error?y1(N.error).text:`answered ${S.status}`),await J()},[z,W]=i.useState(!1),[O,T]=i.useState(!1),[B,w]=i.useState(""),A=async(P)=>{P.preventDefault(),H(null),W(!0);try{let S=await I1(Q,"/-/worlds",{method:"POST",body:JSON.stringify({org:q,world:G,vendors:F.split(",").map((v)=>v.trim()).filter(Boolean)})}),N=await S.json();if(!S.ok){H(N.error?y1(N.error).text:`the host answered ${S.status}`);return}H(`provisioned ${N.name}`),Z(""),L(""),T(!1),await J()}finally{W(!1)}},R=B.trim().toLowerCase(),I=_.worlds.filter((P)=>!R||P.name.toLowerCase().includes(R)||P.twins.some((S)=>S.vendor.includes(R))),C=[...new Set(I.map((P)=>P.name.split("/")[0]))];return $.jsxDEV("section",{className:"home-window","aria-labelledby":"worlds",children:[$.jsxDEV("div",{className:"home-head",children:[$.jsxDEV("h2",{id:"worlds",children:"Worlds"},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:[k1(_.worlds.length,"World")," ",Q?"this host serves":"this key opens"]},void 0,!0,void 0,this),Q?$.jsxDEV("button",{type:"button",className:"primary",onClick:()=>{H(null),T(!0)},children:[$.jsxDEV(A1,{name:"plus",size:16},void 0,!1,void 0,this),"New World"]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"home-find",children:$.jsxDEV("input",{type:"search",placeholder:"Filter by World or vendor","aria-label":"Filter Worlds",value:B,onChange:(P)=>w(P.target.value)},void 0,!1,void 0,this)},void 0,!1,void 0,this),Y&&!O?$.jsxDEV("p",{role:"status",className:"home-note",children:Y},void 0,!1,void 0,this):null,C.map((P)=>$.jsxDEV(i.default.Fragment,{children:[$.jsxDEV("p",{className:"menu-label home-org",children:P},void 0,!1,void 0,this),$.jsxDEV("ul",{className:"home-list",children:I.filter((S)=>S.name.split("/")[0]===P).map((S)=>$.jsxDEV("li",{children:[$.jsxDEV("a",{href:`${X1}/${S.name}`,onClick:(N)=>{N.preventDefault(),T1(S.name.split("/"))},children:[$.jsxDEV(A1,{name:"globe",size:20},void 0,!1,void 0,this),$.jsxDEV("span",{className:"ws-row-text",children:[$.jsxDEV("b",{children:S.name.split("/")[1]},void 0,!1,void 0,this),$.jsxDEV("small",{children:$.jsxDEV("code",{children:S.base},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("span",{className:"home-vendors",children:S.twins.map((N)=>$.jsxDEV("span",{title:H1(N.vendor),children:$.jsxDEV(u1,{vendor:N.vendor},void 0,!1,void 0,this)},N.vendor,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Q?$.jsxDEV("details",{className:"menu home-more",children:[$.jsxDEV("summary",{"aria-label":`More for ${S.name}`,children:"⋯"},void 0,!1,void 0,this),$.jsxDEV("div",{className:"popover menu-list",children:[$.jsxDEV("button",{type:"button",onClick:(N)=>{N.currentTarget.closest("details")?.removeAttribute("open"),K(S.name)},children:"Rotate tokens…"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button",className:"danger-item",onClick:(N)=>{N.currentTarget.closest("details")?.removeAttribute("open"),B0({title:`Remove ${S.name}?`,body:"The host stops serving it and its whole history goes with it. This cannot be undone.",action:"Remove World",danger:!0,typed:S.name}).then((v)=>{if(v)X(S.name)})},children:"Remove World…"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null]},S.name,!0,void 0,this))},void 0,!1,void 0,this)]},P,!0,void 0,this)),I.length===0?$.jsxDEV("p",{className:"mode home-note",children:R?`No World matches ${B}.`:"No Worlds here yet."},void 0,!1,void 0,this):null,$.jsxDEV(s1,{open:O,onClose:()=>{if(!z)T(!1)},title:"New World",footer:$.jsxDEV($.Fragment,{children:[$.jsxDEV("button",{type:"button",onClick:()=>T(!1),disabled:z,children:"Cancel"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"submit",form:"provision",className:"primary",disabled:z,children:z?"Making… (ten seconds or so)":"Make World"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:$.jsxDEV("form",{id:"provision",onSubmit:A,className:"stack",children:[$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"Org"},void 0,!1,void 0,this),$.jsxDEV("input",{name:"org",value:q,onChange:(P)=>U(P.target.value),required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"World"},void 0,!1,void 0,this),$.jsxDEV("input",{name:"world",value:G,onChange:(P)=>Z(P.target.value),required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"Vendors"},void 0,!1,void 0,this),$.jsxDEV("input",{name:"vendors",value:F,onChange:(P)=>L(P.target.value),placeholder:"stripe, slack",required:!0},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:"A twin of each, with its default data."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y?$.jsxDEV("p",{role:"status",children:Y},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var PZ=["changes","events","trace","vendors","screens","canvas","branches","settings","remote","vault"],w5=(_,Q)=>`${W2}/${_}/${Q}/`,O_={verify:"verified",use:"used",issue:"issued",revoke:"revoked",rotate:"rotated",seed:"seeded",upsert:"saved",set:"set",start:"started",finish:"finished",fail:"failed",schedule:"scheduled",deliver:"delivered",like:"liked",follow:"followed",reply:"replied",create:"created",update:"updated",delete:"deleted",record:"recorded",remove:"removed",add:"added",send:"sent",post:"posted",postmessage:"posted",cancel:"canceled",close:"closed",open:"opened",publish:"published",upload:"uploaded",invite:"invited",archive:"archived",merge:"merged",refund:"refunded",capture:"captured",confirm:"confirmed",pay:"paid"};function Z0(_){let Q=_.operation??_.op,J=(Q.includes(".")?Q.slice(Q.lastIndexOf(".")+1):Q).toLowerCase(),q=_.subject.type.replace(/[_-]+/g," ").trim(),U=`${q.charAt(0).toUpperCase()}${q.slice(1)}`,G=/(^|\.)twin\./.test(Q)||/^seed_/.test(J),Z=Q.replace(/[._]+/g," ").trim(),F=G?`${U} seeded`:O_[J]?`${U} ${O_[J]}`:`${Z.charAt(0).toUpperCase()}${Z.slice(1)}`,L=_.fields??{},Y=["title","name","email","text","subject","summary","description"].map((K)=>L[K]).find((K)=>typeof K==="string"&&K.trim()!=="")??null,H=Y===null?null:Y.replace(/<([@#!])[^|>]*\|([^>]+)>/g,(K,X,z)=>`${X==="!"?"@":X}${z}`).replace(/<(?:https?:[^|>]+)\|([^>]+)>/g,"$1").replace(/<(https?:[^>]+)>/g,"$1");return{what:F,label:H===null?null:H.length>80?`${H.slice(0,79)}…`:H}}var c0=(_)=>/token|password|secret|key|credential/i.test(_.subject.type)&&_.subject.id.length>6?`••••${_.subject.id.slice(-4)}`:_.subject.id;function NZ({name:_,token:Q,twin:J,tab:q,arg:U,sub:G,admin:Z,snapshot:F,parentToken:L,who:Y,onSignOut:H,onReturn:K,opens:X,onRemoved:z,onWho:W,worlds:O=[]}){let[T,B]=i.useState("pending"),[w,A]=i.useState(null),[R,I]=i.useState(0),[C,P]=i.useState(null);i.useEffect(()=>{let a=!0;return A(null),I1(Q,`/-/${_}/session`,{method:"POST"}).then(async(c)=>{let n=await c.json().catch(()=>({}));if(k_(n.issuer),n.who)W?.(n.who);P(typeof n.signsAs==="string"?n.signsAs:null);let Q1=C5(n.origin)?.origin;if(c.status===409&&Q1&&Q1!==M1){t6(Q1,Q,_);return}if(!a)return;if(B(!c.ok?"unknown":n.scope==="read"?"read":n.scope==="write"?"write":"unknown"),!c.ok)A(n.error?y1(n.error).text:`answered ${c.status}`)}).catch((c)=>{if(a)B("unknown"),A(`the World did not answer: ${c instanceof Error?c.message:String(c)}`)}),()=>{a=!1}},[_,Q,R]);let S=w?{state:"error",error:w}:T==="pending"?{state:"pending"}:{state:"ok",scope:T},N=T==="write",v=(a)=>{if(a.status!==403)return;a.clone().json().then((c)=>{if(/read token|opens only reads|write access|reads only/i.test(c?.error??""))B("read")},()=>null)},[j,m]=i.useState(0);i.useEffect(()=>{let a=setInterval(()=>{if(!document.hidden)m((c)=>c+1)},5000);return()=>clearInterval(a)},[]);let[p,k]=i.useState(0),D=w1(Q,`/-/${_}/clock`,j+p),V=w1(Q,`/-/${_}/twins`),E=w1(Q,`/-/${_}/branches`,p),u=w1(Q,`/-/${_}/map`,Math.floor(j/2)),h=!(E.state==="error"&&(E.status===404||E.status===405)),f=PZ.includes(q)?q:"overview",y=V.state==="ok"?V.data.twins.map((a)=>a.twin):[],g=f==="vendors"&&U?U:void 0,b=()=>{B("pending"),I((a)=>a+1)};if(f==="canvas"||f==="vendors"&&!g||q==="screens"&&!U)return $.jsxDEV(oZ,{name:_,token:Q,twins:V,session:S,retry:b,snapshot:F,back:()=>T1(_.split("/"))},void 0,!1,void 0,this);let o=q==="settings"?{kind:"settings",tab:((a)=>D_.find(([c])=>c===a)?.[0]??"account")(U)}:q==="remote"?{kind:"settings",tab:"remote"}:q==="vault"?{kind:"settings",tab:"vault"}:q==="branches"?{kind:"branches",...U?{open:U}:{}}:null,d=J?"vendor":q==="screens"&&U?"screen":f==="vendors"&&g?"vendor":q==="trace"?"trace":q==="events"?"events":q==="changes"&&U==="changesets"?"history":"changes";return $.jsxDEV(DZ,{name:_,token:Q,view:d,win:o,who:Y,snapshot:F,onReturn:K,onSignOut:H,worlds:O,session:S,retry:b,...d==="vendor"?{arg:J??g}:d==="events"||d==="trace"||d==="screen"?U?{arg:U}:{}:{},...G?{sub:G}:{},twins:V,map:u,branches:h?E:null,clock:D,canWrite:N&&!F,refused:v,signsAs:C,opens:X,tick:j,admin:Z,onRemoved:z,onClock:()=>k((a)=>a+1),scope:F?"read":T},void 0,!1,void 0,this)}function A1({name:_,size:Q=20}){return $.jsxDEV("svg",{className:"icon",viewBox:"0 0 24 24",width:Q,height:Q,fill:"none",stroke:"currentColor",strokeWidth:Q<=16?1.75:1.5,strokeLinecap:"square",strokeLinejoin:"miter","aria-hidden":"true",children:(B_[_]??[]).map(([J,q],U)=>i.default.createElement(J,{key:U,...q}))},void 0,!1,void 0,this)}function k4(_){let Q=(J)=>{let q=(J.operation??J.op).toLowerCase();return q.includes(".")?q.slice(q.lastIndexOf(".")+1):q};if(_.some((J)=>/^(delete|remove|archive|revoke)/.test(Q(J))||J.fields?.deleted===!0))return{icon:"square-minus",word:"removed",tone:"removed"};if(/^(create|add|insert|issue|send|post|upload|invite|record|seed)/.test(Q(_[0])))return{icon:"square-plus",word:"made",tone:"added"};return{icon:"square-dot",word:"changed",tone:"changed"}}var D_=[["account","Account","user"],["changesets","Changesets","git-commit-horizontal"],["remote","Remote","cloud"],["access","Access","key-round"],["services","Real services","plug"],["vault","Vault","vault"],["checks","Checks","list-checks"],["clock","Clock","clock"],["appearance","Appearance","palette"]],CZ=(_,Q)=>{let J=Q.split("/").pop()??Q,q=_.split("/").pop()??"";return J.startsWith(`${q}-`)?J.slice(q.length+1):J},L2=(_)=>_.replace(/^_+/,"").replace(/[_-]+/g," ");function h_({record:_,history:Q,screens:J}){let q=_.writes[_.writes.length-1],U=Z0(q),G=k4(_.writes),Z=new Set(_.writes.map((X)=>X.id)),F=_.writes[0].occurredAt,L={};if(Q){for(let X of Q)if(!Z.has(X.id)&&!X.landsId&&!X.aliasOf&&X.subject.type===q.subject.type&&X.subject.id===q.subject.id&&X.occurredAt<=F)Object.assign(L,X.fields??{})}let Y={...L};for(let X of _.writes)Object.assign(Y,X.fields??{});let H=G.tone==="added"&&Object.keys(L).length===0,K=[...new Set([...Object.keys(L),...Object.keys(Y)])].filter((X)=>!a_(L[X],Y[X]));return $.jsxDEV("div",{className:"ws-diff","aria-label":`${U.label??c0(q)}: its changes`,children:[$.jsxDEV("div",{className:"ws-diff-head",children:[$.jsxDEV("span",{className:`ws-kind ${G.tone}`,title:G.word,children:$.jsxDEV(A1,{name:G.icon,size:16},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV(u1,{vendor:_.twin},void 0,!1,void 0,this),$.jsxDEV("div",{className:"cell-label",children:[$.jsxDEV("b",{children:U.label??c0(q)},void 0,!1,void 0,this),$.jsxDEV("small",{children:[H1(_.twin)," · ",q.subject.type.replace(/^_+/,"").replace(/[_-]+/g," ")," ",$.jsxDEV("code",{children:c0(q)},void 0,!1,void 0,this)," · ",G.word," here"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),J&&G.tone!=="removed"?$.jsxDEV("a",{className:"ws-on-screens",href:`${X1}/${J}/~/screens/${_.twin}/${q.subject.type}/${encodeURIComponent(q.subject.id)}`,onClick:(X)=>{X.preventDefault(),T1([...J.split("/"),"~","screens",_.twin,q.subject.type,q.subject.id])},children:[$.jsxDEV(A1,{name:"monitor",size:16},void 0,!1,void 0,this),"On ",H1(_.twin),"'s screens"]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("ol",{className:"ws-writes",children:_.writes.map((X)=>$.jsxDEV("li",{children:[$.jsxDEV("b",{children:Z0(X).what},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:[$.jsxDEV(R1,{iso:X.occurredAt},void 0,!1,void 0,this)," · ",P5(X)]},void 0,!0,void 0,this)]},X.id,!0,void 0,this))},void 0,!1,void 0,this),Q===null?$.jsxDEV("p",{className:"mode pad",children:"Reading its history…"},void 0,!1,void 0,this):K.length===0?$.jsxDEV("p",{className:"mode pad",children:"No field holds a new value."},void 0,!1,void 0,this):$.jsxDEV("table",{className:"ws-fields","aria-label":"Fields before and after",children:[$.jsxDEV("thead",{children:$.jsxDEV("tr",{children:[$.jsxDEV("th",{children:"Field"},void 0,!1,void 0,this),H?null:$.jsxDEV("th",{children:"Before"},void 0,!1,void 0,this),$.jsxDEV("th",{children:G.tone==="removed"?"After":"Now"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("tbody",{children:K.map((X)=>$.jsxDEV("tr",{children:[$.jsxDEV("th",{scope:"row",children:$.jsxDEV("code",{children:X},void 0,!1,void 0,this)},void 0,!1,void 0,this),H?null:$.jsxDEV("td",{className:X in L?"was":"none",children:X in L?$.jsxDEV(S0,{v:L[X]},void 0,!1,void 0,this):$.jsxDEV("span",{className:"mode",children:"—"},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{className:X in Y?"now":"none",children:X in Y?$.jsxDEV(S0,{v:Y[X]},void 0,!1,void 0,this):$.jsxDEV("span",{className:"mode",children:"—"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},X,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function E_({records:_,selected:Q,onPick:J,label:q}){let[U,G]=i.useState(()=>{try{return localStorage.getItem("volter.console.records")==="tree"}catch{return!1}}),Z=(Y)=>{G(Y);try{localStorage.setItem("volter.console.records",Y?"tree":"path")}catch{}},F=(Y,H)=>{let K=Y.writes[Y.writes.length-1],X=Z0(K),z=k4(Y.writes);return $.jsxDEV("li",{children:$.jsxDEV("button",{type:"button",className:[Q===Y.key?"on":"",H?"nested":""].join(" ").trim()||void 0,"aria-pressed":Q===Y.key,onClick:()=>J(Y.key),children:[H?null:$.jsxDEV(u1,{vendor:Y.twin},void 0,!1,void 0,this),$.jsxDEV("span",{className:"ws-row-text",children:[$.jsxDEV("b",{children:X.label??c0(K)},void 0,!1,void 0,this),$.jsxDEV("small",{children:[L2(K.subject.type)," · ",X.what.split(" ").slice(-1)[0],Y.writes.length>1?` · ${k1(Y.writes.length,"write")}`:""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("span",{className:`ws-kind ${z.tone}`,title:z.word,"aria-label":z.word,children:$.jsxDEV(A1,{name:z.icon,size:16},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},Y.key,!1,void 0,this)},L=[...new Set(_.map((Y)=>Y.twin))];return $.jsxDEV($.Fragment,{children:[$.jsxDEV("div",{className:"ws-view-switch",role:"group","aria-label":"List the records by",children:[$.jsxDEV("button",{type:"button","aria-pressed":!U,className:U?void 0:"on",onClick:()=>Z(!1),children:"Path"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button","aria-pressed":U,className:U?"on":void 0,onClick:()=>Z(!0),children:"Tree"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("ul",{className:"ws-list","aria-label":q,children:U?L.map((Y)=>{let H=_.filter((K)=>K.twin===Y);return $.jsxDEV("li",{className:"ws-group",children:[$.jsxDEV("p",{className:"ws-group-head",children:[$.jsxDEV(u1,{vendor:Y},void 0,!1,void 0,this),$.jsxDEV("b",{children:H1(Y)},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:H.length},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("ul",{children:H.map((K)=>F(K,!0))},void 0,!1,void 0,this)]},Y,!0,void 0,this)}):_.map((Y)=>F(Y,!1))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function SZ({name:_,token:Q,branches:J,opens:q,refused:U,onChanged:G}){let[Z,F]=i.useState(""),[L,Y]=i.useState(!1),H=J?.state==="ok"&&J.data.checkedOut||_.split("/")[1],K=J?.state==="ok"&&J.data.named?.length?J.data.named:[{name:H,running:!0}],X=J?.state==="ok"?J.data.branches:[],z=Z.trim().toLowerCase(),W=(T)=>!z||T.toLowerCase().includes(z),O=(T)=>{T.currentTarget.closest("details")?.removeAttribute("open")};return $.jsxDEV("details",{className:"menu ws-pick",children:[$.jsxDEV("summary",{title:"The branch served here",children:[$.jsxDEV(A1,{name:"git-branch",size:16},void 0,!1,void 0,this),$.jsxDEV("span",{className:"ws-pick-label",children:[$.jsxDEV("small",{children:"Branch"},void 0,!1,void 0,this),$.jsxDEV("b",{children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(A1,{name:"chevron-down",size:16},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"popover ws-branch-menu",children:[$.jsxDEV("div",{className:"ws-branch-find",children:[$.jsxDEV("input",{type:"search",placeholder:"Filter","aria-label":"Filter branches",value:Z,onChange:(T)=>F(T.target.value)},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button",onClick:(T)=>{O(T),Y(!0)},disabled:!J,children:"New branch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("p",{className:"menu-label",children:"This World"},void 0,!1,void 0,this),$.jsxDEV("ul",{className:"ws-branch-list",children:K.filter((T)=>W(T.name)).map((T)=>$.jsxDEV("li",{className:T.name===H?"current":void 0,children:[$.jsxDEV("span",{className:"tick",children:T.name===H?$.jsxDEV(A1,{name:"check",size:16},void 0,!1,void 0,this):$.jsxDEV(A1,{name:"git-branch",size:16},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("span",{className:"name",children:T.name},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:T.name===H?"served here":T.running?"running":"stopped"},void 0,!1,void 0,this)]},T.name,!0,void 0,this))},void 0,!1,void 0,this),$.jsxDEV("p",{className:"menu-label",children:"Branches of it"},void 0,!1,void 0,this),X.length===0?$.jsxDEV("p",{className:"mode ws-branch-none",children:"None yet. New branch makes one, from now or as the World was."},void 0,!1,void 0,this):$.jsxDEV("ul",{className:"ws-branch-list",children:X.filter((T)=>W(T.name)).map((T)=>{let B=$.jsxDEV($.Fragment,{children:[$.jsxDEV("span",{className:"tick",children:$.jsxDEV(A1,{name:"git-branch",size:16},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("span",{className:"name",children:CZ(_,T.name)},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:T.at?.instant?$.jsxDEV($.Fragment,{children:["as of ",$.jsxDEV(R1,{iso:T.at.instant,time:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this):"live"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w=T.expiresAt?`Goes away ${new Date(T.expiresAt).toLocaleString()}`:"Kept";return $.jsxDEV("li",{children:q(T.name)?$.jsxDEV("a",{href:`${X1}/${T.name}`,title:w,onClick:(A)=>{A.preventDefault(),O(A),b_(T.name,T.name.split("/"))},children:B},void 0,!1,void 0,this):$.jsxDEV("span",{title:`${w}. Its tokens went to whoever made it; it opens from their page.`,children:B},void 0,!1,void 0,this)},T.name,!1,void 0,this)})},void 0,!1,void 0,this),$.jsxDEV("div",{className:"ws-branch-foot",children:$.jsxDEV("a",{href:`${X1}/${_}/~/branches`,onClick:(T)=>{T.preventDefault(),O(T),T1([..._.split("/"),"~","branches"])},children:"Manage branches…"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(g_,{name:_,token:Q,open:L,onClose:()=>Y(!1),onMade:G,refused:U},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function x_({name:_,view:Q,changes:J,changesets:q}){let U=(G)=>(Z)=>{Z.preventDefault(),T1([..._.split("/"),"~",...G])};return $.jsxDEV("nav",{className:"tabs ws-pane-tabs","aria-label":"Changes and history",children:[$.jsxDEV("a",{href:`${X1}/${_}/~/changes`,className:Q==="changes"?"on":void 0,"aria-current":Q==="changes"?"page":void 0,onClick:U(["changes"]),children:["Changes",J?$.jsxDEV("span",{className:"count",children:J},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("a",{href:`${X1}/${_}/~/changes/changesets`,className:Q==="history"?"on":void 0,"aria-current":Q==="history"?"page":void 0,onClick:U(["changes","changesets"]),children:["History",q?$.jsxDEV("span",{className:"count",children:q},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function kZ({name:_,token:Q,sets:J,sub:q,signsAs:U,canWrite:G,rooted:Z,refused:F,onChanged:L,changes:Y,mirrored:H,required:K}){let[X,z]=i.useState(null),[W,O]=i.useState(!1),T=J.state==="ok"?[...J.data.changesets].sort((S,N)=>N.createdAt.localeCompare(S.createdAt)):[],B=T.find((S)=>S.name===q)??T[0],w=i.useMemo(()=>{let S=new Map;for(let N of B?i_(B):[]){let v=`${N.twin}:${N.entry.subject.type}:${N.entry.subject.id}`,j=S.get(v)??{key:v,twin:N.twin,writes:[]};j.writes.push(N.entry),S.set(v,j)}return[...S.values()]},[B]),A=w.find((S)=>S.key===X)??w[0],R=w1(Q,A?`/-/${_}/log/${A.twin}`:null),I={added:0,removed:0,changed:0};for(let S of w)I[k4(S.writes).tone]=(I[k4(S.writes).tone]??0)+1;let C=B?y4(B):null,P=B?d_(B,K):null;return $.jsxDEV("div",{className:"ws-two",children:[$.jsxDEV("div",{className:"ws-files",children:[$.jsxDEV(x_,{name:_,view:"history",changes:Y,changesets:T.length},void 0,!1,void 0,this),$.jsxDEV(p1,{load:J,what:"the changesets",lines:4},void 0,!1,void 0,this),$.jsxDEV("ul",{className:"ws-list ws-commits","aria-label":"Changesets",children:T.map((S)=>{let N=B?.name===S.name,v=y4(S).label==="Not sent";return $.jsxDEV("li",{children:$.jsxDEV("a",{href:`${X1}/${_}/~/changes/changesets/${S.name}`,className:N?"on":void 0,"aria-current":N?"true":void 0,onClick:(j)=>{j.preventDefault(),z(null),T1([..._.split("/"),"~","changes","changesets",S.name])},children:[$.jsxDEV("span",{className:"ws-row-text",children:[$.jsxDEV("b",{children:r6(S)},void 0,!1,void 0,this),$.jsxDEV("small",{children:[S.owner??(S.cutBy?P4(S.cutBy):"unrecorded")," • ",$.jsxDEV(R1,{iso:S.createdAt},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),v?$.jsxDEV("span",{className:"ws-unpushed",title:"Not pushed to the remote yet",children:$.jsxDEV(A1,{name:"arrow-up-from-line",size:16},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},S.name,!1,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-pane-right",children:[J.state==="ok"&&!B?$.jsxDEV(f5,{title:"No changesets yet",children:$.jsxDEV("p",{children:"Cut one from Changes: the cut box is at its foot."},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,B&&C&&P?$.jsxDEV($.Fragment,{children:[$.jsxDEV("div",{className:"ws-commit-head",children:[$.jsxDEV("div",{className:"ws-commit-title",children:[$.jsxDEV("h3",{children:r6(B)},void 0,!1,void 0,this),$.jsxDEV("p",{className:"ws-commit-stat",children:[$.jsxDEV(A1,{name:"file-diff",size:16},void 0,!1,void 0,this)," ",k1(w.length,"changed record"),I.added?$.jsxDEV("span",{className:"plus",children:[" +",I.added]},void 0,!0,void 0,this):null,I.removed?$.jsxDEV("span",{className:"minus",children:[" −",I.removed]},void 0,!0,void 0,this):null,I.changed?$.jsxDEV("span",{className:"dot",children:[" •",I.changed]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("p",{className:"mode ws-commit-meta",children:[$.jsxDEV("code",{children:B.name},void 0,!1,void 0,this)," · ",$.jsxDEV(R1,{iso:B.createdAt},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("p",{className:"ws-commit-who",children:[["Owner",B.owner??(B.cutBy&&/^(token|token:read)$|^key:(?!.* for:)/.test(B.cutBy)?"no person: a service’s":"unrecorded")],["Cut by",B.cutBy?B.pushedBy&&B.applied===null&&B.cutBy==="machine"?"the machine it was cut on":P4(B.cutBy):"unrecorded"],...B.pushedBy?[["Pushed by",P4(B.pushedBy)]]:[]].map(([S,N])=>$.jsxDEV("span",{children:[$.jsxDEV("span",{className:"mode",children:S},void 0,!1,void 0,this)," ",N]},S,!0,void 0,this))},void 0,!1,void 0,this),B.pushedBy?$.jsxDEV("p",{className:"mode ws-commit-meta",children:B.applied===null?"Owner and cut by are as the World it was cut in recorded them; pushed by is this World's own record.":"Owner and cut by are this World’s record; pushed by is as the remote recorded it."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("button",{type:"button",onClick:()=>O(!0),title:"Where it went, the checks, the approvals; Verify, Approve and Deploy",children:[$.jsxDEV("span",{className:`badge cs-${C.tone}`,children:C.label},void 0,!1,void 0,this),$.jsxDEV("span",{className:`badge cs-${P.tone}`,children:P.label},void 0,!1,void 0,this),"Review…"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-two inner",children:[$.jsxDEV("div",{className:"ws-files",children:$.jsxDEV(E_,{records:w,...A?{selected:A.key}:{},onPick:z,label:"Records it changed"},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("div",{className:"ws-detail",children:A?$.jsxDEV(h_,{record:A,history:R.state==="ok"?R.data.entries:R.state==="error"?[]:null,...H.includes(A.twin)?{screens:_}:{}},void 0,!1,void 0,this):$.jsxDEV("p",{className:"mode pad",children:"It changes nothing."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(s1,{open:W,onClose:()=>O(!1),title:`Review: ${r6(B)}`,wide:!0,children:[$.jsxDEV(P_,{name:_,token:Q,signsAs:U,c:B,canWrite:G,rooted:Z,refused:F,onChanged:L,part:"head",required:K},`h:${B.name}`,!1,void 0,this),$.jsxDEV(P_,{name:_,token:Q,signsAs:U,c:B,canWrite:G,rooted:Z,refused:F,onChanged:L,part:"review",required:K},`r:${B.name}`,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function yZ({name:_,token:Q,vendors:J,vendor:q,tick:U}){let[G,Z]=i.useState(f_*4),[F,L]=i.useState(""),[Y,H]=i.useState(null),K=w1(Q,`/-/${_}/timeline?limit=${G}${q?`&twin=${encodeURIComponent(q)}`:""}`,Math.floor(U/2)),X=K.state==="ok"?aZ(K.data.entries):[],z=[...new Set(X.map((I)=>Z0(I.entry).what))].sort(),W=X.filter((I)=>!F||Z0(I.entry).what===F),O=W.find((I)=>E2(I)===Y)??W[0],T=(I)=>(C)=>{C.preventDefault(),H(null),T1([..._.split("/"),"~","events",...I?[I]:[]])},B=O?.entry.input&&typeof O.entry.input==="object"?O.entry.input.body:void 0,w=O?RZ(O.entry.traceparent):null,A=O?I_(O):null,R=O?lZ(O.entry):[];return $.jsxDEV("div",{className:"ws-events",children:[$.jsxDEV("div",{className:"ws-filterbar",children:[$.jsxDEV("nav",{className:"ws-seg","aria-label":"Vendor",children:[$.jsxDEV("a",{href:`${X1}/${_}/~/events`,className:!q?"on":void 0,"aria-current":!q?"page":void 0,onClick:T(),children:"All"},void 0,!1,void 0,this),J.map((I)=>$.jsxDEV("a",{href:`${X1}/${_}/~/events/${I}`,className:q===I?"on":void 0,"aria-current":q===I?"page":void 0,onClick:T(I),children:[$.jsxDEV(u1,{vendor:I},void 0,!1,void 0,this),H1(I)]},I,!0,void 0,this))]},void 0,!0,void 0,this),$.jsxDEV("select",{"aria-label":"Operation",value:F,onChange:(I)=>{L(I.target.value),H(null)},children:[$.jsxDEV("option",{value:"",children:"Every operation"},void 0,!1,void 0,this),z.map((I)=>$.jsxDEV("option",{value:I,children:I},I,!1,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-grid-wrap",children:[$.jsxDEV(p1,{load:K,what:"the events",lines:6},void 0,!1,void 0,this),$.jsxDEV("table",{className:"ws-grid","aria-label":"Events",children:[$.jsxDEV("thead",{children:$.jsxDEV("tr",{children:[$.jsxDEV("th",{children:"Time"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Vendor"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"What"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Record"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"By"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Receipt"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("tbody",{children:W.map((I)=>{let C=Z0(I.entry),P=I_(I),S=O&&E2(I)===E2(O);return $.jsxDEV("tr",{className:S?"on":void 0,"aria-selected":S,onClick:()=>H(E2(I)),children:[$.jsxDEV("td",{className:"mono",children:$.jsxDEV(R1,{iso:I.entry.occurredAt,time:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:$.jsxDEV("span",{className:"vendor-cell",children:[$.jsxDEV(u1,{vendor:I.twin},void 0,!1,void 0,this),H1(I.twin)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:$.jsxDEV("b",{children:C.what},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{className:"ws-cell-clip",children:C.label?`“${C.label}”`:$.jsxDEV("code",{children:c0(I.entry)},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{className:"mode",children:P5(I.entry,I.caller)},void 0,!1,void 0,this),$.jsxDEV("td",{children:P?$.jsxDEV("span",{className:P.bad?"badge cs-bad":P.status==="deployed"?"badge cs-done":"badge",children:P.status},void 0,!1,void 0,this):$.jsxDEV("span",{className:"mode",children:v_(I.entry)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},E2(I),!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-event-detail",children:O?$.jsxDEV($.Fragment,{children:[$.jsxDEV("div",{className:"ws-event-line",children:[$.jsxDEV("span",{className:"badge",children:c_(O.entry)},void 0,!1,void 0,this),A?$.jsxDEV("span",{className:A.bad?"badge cs-bad":"badge cs-good",children:A.status},void 0,!1,void 0,this):null,$.jsxDEV("code",{children:[O.entry.subject.type,":",c0(O.entry)]},void 0,!0,void 0,this),$.jsxDEV("span",{className:"mode",children:[$.jsxDEV(R1,{iso:O.entry.occurredAt},void 0,!1,void 0,this)," · ",P5(O.entry,O.caller)]},void 0,!0,void 0,this),w?$.jsxDEV("a",{href:`${X1}/${_}/~/trace/${w.trace}`,onClick:(I)=>{I.preventDefault(),T1([..._.split("/"),"~","trace",w.trace])},children:"Its trace →"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-event-panes",children:[$.jsxDEV("div",{role:"region","aria-label":"The request",children:[$.jsxDEV("h4",{children:"Request"},void 0,!1,void 0,this),B!==void 0?$.jsxDEV(iZ,{body:B},void 0,!1,void 0,this):$.jsxDEV("p",{className:"mode",children:"No request body: the World or the vendor wrote it."},void 0,!1,void 0,this),R.length?$.jsxDEV($.Fragment,{children:[$.jsxDEV("h4",{children:"Usage"},void 0,!1,void 0,this),$.jsxDEV("dl",{className:"fields",children:R.map(([I,C])=>$.jsxDEV(i.default.Fragment,{children:[$.jsxDEV("dt",{children:I},void 0,!1,void 0,this),$.jsxDEV("dd",{children:C},void 0,!1,void 0,this)]},I,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("div",{role:"region","aria-label":"What it wrote",children:[$.jsxDEV("h4",{children:"Written"},void 0,!1,void 0,this),$.jsxDEV(r_,{fields:O.entry.fields},void 0,!1,void 0,this),$.jsxDEV("h4",{children:O.copies.length?"Receipts":"Receipt"},void 0,!1,void 0,this),$.jsxDEV("p",{className:"mode",children:O.copies.length?O.copies.map((I)=>I.entry.receipt?.status??"landed copy").join(" · "):dZ(O.entry)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):$.jsxDEV("p",{className:"mode pad",children:"Nothing written here yet."},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("div",{className:"ws-foot mode",children:[$.jsxDEV("span",{children:[O?`${W.indexOf(O)+1} of ${W.length}`:W.length," events",q?` at ${H1(q)}`:""]},void 0,!0,void 0,this),K.state==="ok"&&K.data.next?$.jsxDEV("button",{type:"button",onClick:()=>Z((I)=>I+f_*4),children:"Load older"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function vZ({name:_,token:Q,id:J}){let q=/^[0-9a-f]{32}$/.test(J),U=w1(Q,q?`/-/${_}/timeline?trace=${J}&limit=500`:null),G=U.state==="ok"?[...U.data.entries].sort((K,X)=>-p_(K,X)):[],[Z,F]=i.useState(null),L=G[0]?Date.parse(G[0].entry.occurredAt):0,Y=G.length?Math.max(1,Date.parse(G[G.length-1].entry.occurredAt)-L):1,H=[...new Set(G.map((K)=>K.twin))];return $.jsxDEV("div",{className:"ws-sheet ws-trace",children:[$.jsxDEV("p",{className:"crumbs-line",children:$.jsxDEV("a",{href:`${X1}/${_}/~/events`,onClick:(K)=>{K.preventDefault(),T1([..._.split("/"),"~","events"])},children:[$.jsxDEV(A1,{name:"arrow-left",size:16},void 0,!1,void 0,this)," Events"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("h2",{children:[G[0]?`${Z0(G[0].entry).what} …`:"Trace"," ",$.jsxDEV("code",{className:"mode",children:J.slice(0,12)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!q?$.jsxDEV("p",{role:"alert",children:[J?`${J} is not a trace id`:"No trace named",": a W3C trace id is 32 hex characters."]},void 0,!0,void 0,this):$.jsxDEV(p1,{load:U,what:"the trace"},void 0,!1,void 0,this),G.length?$.jsxDEV("p",{className:"ws-trace-meta",children:["Started ",$.jsxDEV("b",{children:$.jsxDEV(R1,{iso:G[0].entry.occurredAt},void 0,!1,void 0,this)},void 0,!1,void 0,this)," · Took ",$.jsxDEV("b",{children:[Y," ms"]},void 0,!0,void 0,this)," · Vendors ",$.jsxDEV("b",{children:H.map(H1).join(", ")},void 0,!1,void 0,this)," · Writes ",$.jsxDEV("b",{children:G.length},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,U.state==="ok"&&G.length===0?$.jsxDEV(f5,{title:"Nothing in this World carries this trace",children:$.jsxDEV("p",{children:["An app instrumented with OpenTelemetry sends a ",$.jsxDEV("code",{children:"traceparent"},void 0,!1,void 0,this)," with each call, and every write that call makes keeps it, so one click reads across every vendor."]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,G.length?$.jsxDEV("div",{className:"ws-spans",role:"table","aria-label":"The trace's writes",children:[$.jsxDEV("div",{className:"ws-span head",role:"row",children:[$.jsxDEV("span",{role:"columnheader",children:"Vendor and what"},void 0,!1,void 0,this),$.jsxDEV("span",{role:"columnheader",className:"ws-ticks",children:[$.jsxDEV("span",{children:"0 ms"},void 0,!1,void 0,this),$.jsxDEV("span",{children:[Math.round(Y/2)," ms"]},void 0,!0,void 0,this),$.jsxDEV("span",{children:[Y," ms"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.map((K)=>{let X=Date.parse(K.entry.occurredAt)-L,z=E2(K),W=Z0(K.entry);return $.jsxDEV(i.default.Fragment,{children:[$.jsxDEV("div",{className:Z===z?"ws-span on":"ws-span",role:"row",onClick:()=>F(Z===z?null:z),children:[$.jsxDEV("span",{role:"cell",className:"ws-span-name",children:[$.jsxDEV(u1,{vendor:K.twin},void 0,!1,void 0,this),$.jsxDEV("b",{children:H1(K.twin)},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:[W.what,W.label?` “${W.label}”`:""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("span",{role:"cell",className:"ws-span-track",children:[$.jsxDEV("span",{className:"ws-span-dot",style:{left:`${X/Y*100}%`}},void 0,!1,void 0,this),$.jsxDEV("span",{className:"ws-span-at mode",style:{left:`${X/Y*100}%`},children:["+",X," ms"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Z===z?$.jsxDEV("div",{className:"ws-span-detail",children:[$.jsxDEV("p",{className:"mode",children:[$.jsxDEV("code",{children:c_(K.entry)},void 0,!1,void 0,this)," on ",$.jsxDEV("code",{children:[K.entry.subject.type,":",c0(K.entry)]},void 0,!0,void 0,this)," · ",P5(K.entry,K.caller)," · ",v_(K.entry)]},void 0,!0,void 0,this),$.jsxDEV(r_,{fields:K.entry.fields},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},z,!0,void 0,this)})]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function jZ({name:_,token:Q,vendor:J,mirrored:q,tick:U}){let G=w1(Q,`/-/${_}/checkpoint/${J}`,Math.floor(U/6)),Z=G.state==="ok"?G.data.tree.filter((R)=>R.deleted!==!0):[],F=[...new Set(Z.map((R)=>R.type))].map((R)=>({type:R,count:Z.filter((I)=>I.type===R).length})).sort((R,I)=>Number(R.type.startsWith("_"))-Number(I.type.startsWith("_"))||L2(R.type).localeCompare(L2(I.type))),[L,Y]=i.useState(null),[H,K]=i.useState(null),X=F.some((R)=>R.type===L)?L:F[0]?.type,z=Z.filter((R)=>R.type===X),W=z.find((R)=>R.id===H)??z[0],O=["name","email","title","text","description","subject","amount","percent_off","unit_amount","currency","status","channel","customer","product"],T=new Set(["id","type","object","livemode","created","updated","updatedAt","deleted"]),B=(R)=>!T.has(R)&&z.some((I)=>I[R]!==void 0&&I[R]!==null&&typeof I[R]!=="object"),w=[...new Set(z.flatMap((R)=>Object.keys(R)))],A=[...O.filter(B),...w.filter((R)=>!O.includes(R)&&B(R))].slice(0,4);return $.jsxDEV("div",{className:"ws-table-app",children:[$.jsxDEV("nav",{className:"ws-tables","aria-label":`${H1(J)}'s records`,children:[$.jsxDEV("div",{className:"ws-list-head",children:$.jsxDEV("span",{className:"vendor-cell",children:[$.jsxDEV(u1,{vendor:J},void 0,!1,void 0,this),H1(J)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV(p1,{load:G,what:"what it stores",lines:4},void 0,!1,void 0,this),$.jsxDEV("p",{className:"menu-label",children:"Stores"},void 0,!1,void 0,this),F.map((R)=>$.jsxDEV("a",{href:`#${R.type}`,className:X===R.type?"on":void 0,"aria-current":X===R.type?"true":void 0,onClick:(I)=>{I.preventDefault(),Y(R.type),K(null)},children:[$.jsxDEV(A1,{name:"table-2",size:16},void 0,!1,void 0,this),$.jsxDEV("span",{children:L2(R.type)},void 0,!1,void 0,this),$.jsxDEV("span",{className:"count",children:R.count},void 0,!1,void 0,this)]},R.type,!0,void 0,this)),$.jsxDEV("p",{className:"menu-label",children:"Also"},void 0,!1,void 0,this),$.jsxDEV("a",{href:`${X1}/${_}/~/events/${J}`,onClick:(R)=>{R.preventDefault(),T1([..._.split("/"),"~","events",J])},children:[$.jsxDEV(A1,{name:"activity",size:16},void 0,!1,void 0,this),$.jsxDEV("span",{children:"Its events"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q?$.jsxDEV("a",{href:`${X1}/${_}/~/screens/${J}`,onClick:(R)=>{R.preventDefault(),T1([..._.split("/"),"~","screens",J])},children:[$.jsxDEV(A1,{name:"monitor",size:16},void 0,!1,void 0,this),$.jsxDEV("span",{children:"Its screens"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-grid-wrap",children:[G.state==="ok"&&F.length===0?$.jsxDEV(f5,{title:`${H1(J)} stores nothing yet`,children:$.jsxDEV("p",{children:"What your app makes there shows here, by type."},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,z.length?$.jsxDEV("table",{className:"ws-grid","aria-label":`${L2(X??"")} records`,children:[$.jsxDEV("thead",{children:$.jsxDEV("tr",{children:[$.jsxDEV("th",{children:"id"},void 0,!1,void 0,this),A.map((R)=>$.jsxDEV("th",{children:R},R,!1,void 0,this)),$.jsxDEV("th",{children:"updated"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("tbody",{children:z.map((R)=>$.jsxDEV("tr",{className:W?.id===R.id?"on":void 0,"aria-selected":W?.id===R.id,onClick:()=>K(R.id),children:[$.jsxDEV("td",{children:$.jsxDEV("code",{children:R.id},void 0,!1,void 0,this)},void 0,!1,void 0,this),A.map((I)=>$.jsxDEV("td",{className:"ws-cell-clip",children:R[I]===void 0||R[I]===null?$.jsxDEV("span",{className:"mode",children:"—"},void 0,!1,void 0,this):String(R[I])},I,!1,void 0,this)),$.jsxDEV("td",{className:"mode",children:typeof R.updatedAt==="string"?$.jsxDEV(R1,{iso:R.updatedAt},void 0,!1,void 0,this):"—"},void 0,!1,void 0,this)]},R.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("aside",{className:"ws-record","aria-label":"The selected record",children:W?$.jsxDEV($.Fragment,{children:[$.jsxDEV("div",{className:"ws-list-head",children:[$.jsxDEV("span",{children:L2(W.type)},void 0,!1,void 0,this),$.jsxDEV("code",{children:W.id},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("dl",{className:"ws-record-fields",children:Object.entries(W).filter(([R])=>R!=="type"&&R!=="id").map(([R,I])=>$.jsxDEV(i.default.Fragment,{children:[$.jsxDEV("dt",{children:R},void 0,!1,void 0,this),$.jsxDEV("dd",{children:$.jsxDEV(S0,{v:I},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},R,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null},void 0,!1,void 0,this),$.jsxDEV("div",{className:"ws-foot mode",children:W?`${z.indexOf(W)+1} of ${k1(z.length,L2(X??"record"))}`:""},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function VZ({name:_,vendor:Q,holding:J,session:q,retry:U,show:G}){return $.jsxDEV("div",{className:"ws-screen",children:[$.jsxDEV("div",{className:"ws-screen-bar",children:[$.jsxDEV("span",{className:"vendor-cell",children:[$.jsxDEV(u1,{vendor:Q},void 0,!1,void 0,this),$.jsxDEV("b",{children:H1(Q)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("span",{className:"mode",children:J},void 0,!1,void 0,this),$.jsxDEV("a",{href:`${X1}/${_}/~/vendors/${Q}`,onClick:(Z)=>{Z.preventDefault(),T1([..._.split("/"),"~","vendors",Q])},children:[$.jsxDEV(A1,{name:"table-2",size:16},void 0,!1,void 0,this),"Its records"]},void 0,!0,void 0,this),$.jsxDEV("a",{href:w5(_,Q),target:"_blank",rel:"noopener noreferrer",children:[$.jsxDEV(A1,{name:"external-link",size:16},void 0,!1,void 0,this),"New tab"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),q.state==="ok"&&q.scope==="read"?$.jsxDEV("p",{className:"mode ws-screens-note",children:"You are looking read only: the screens browse, and refuse changes."},void 0,!1,void 0,this):null,q.state==="pending"?$.jsxDEV("p",{className:"mode ws-screens-note",role:"status",children:"Opening…"},void 0,!1,void 0,this):null,q.state==="error"?$.jsxDEV("p",{role:"alert",className:"ws-screens-note",children:["The World did not open its screens: ",q.error," ",$.jsxDEV("button",{type:"button",onClick:U,children:"Try again"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,q.state==="ok"?$.jsxDEV("iframe",{title:`${H1(Q)}, as this World shows it`,src:`${w5(_,Q)}${G?`?show=${encodeURIComponent(G)}`:""}`},`${Q}:${G??""}`,!1,void 0,this):null]},void 0,!0,void 0,this)}function uZ({name:_,token:Q,who:J,scope:q}){let[U,G]=i.useState(0),Z=w1(Q,`/-/${_}/twins`),F=w1(Q,`/-/${_}/rules`,U),L=F.state==="ok"?F.data.changesets:null,[Y,H]=i.useState(null),[K,X]=i.useState(null),[z,W]=i.useState(!1),[O,T]=i.useState([]),B=Y??L?.approvals??1,w=K??L?.summary??"required",A=L!==null&&(B!==(L.approvals??1)||w!==(L.summary??"required")),R=(v,j)=>{if(T((m)=>[{ok:v,text:j,at:new Date().toISOString(),n:++S5},...m].slice(0,3)),!v)V1(j,"error")},I=async(v)=>{v.preventDefault(),W(!0);try{let j=await I1(Q,`/-/${_}/rules`,{method:"PUT",body:JSON.stringify({changesets:{approvals:B,summary:w}})});if(!j.ok){R(!1,`Save: ${await J0(j)}`);return}R(!0,`Saved: ${B===0?"no approval":k1(B,"approval")} before a deploy; a summary ${w==="required"?"required":"generated when none is given"}.`),H(null),X(null),G((m)=>m+1)}finally{W(!1)}},C={gated:"a person deploys an approved changeset",auto:"a push deploys at once",hold:"nothing deploys"},P=J.person?$.jsxDEV($.Fragment,{children:[$.jsxDEV("b",{children:J.person},void 0,!1,void 0,this),J.local?", signed in on this machine":""]},void 0,!0,void 0,this):J.local?$.jsxDEV($.Fragment,{children:[$.jsxDEV("b",{children:"this machine"},void 0,!1,void 0,this),": no one is signed in here, so no person owns them until they are pushed by one"]},void 0,!0,void 0,this):J.admin?$.jsxDEV($.Fragment,{children:$.jsxDEV("b",{children:"the host's admin"},void 0,!1,void 0,this)},void 0,!1,void 0,this):$.jsxDEV($.Fragment,{children:[$.jsxDEV("b",{children:"this token"},void 0,!1,void 0,this),", a service"]},void 0,!0,void 0,this),S=Z.state==="ok"?Z.data.twins.filter((v)=>v.root?.url):[],N=q!=="write"?"This session reads the World; it changes no rules":null;return $.jsxDEV($.Fragment,{children:[$.jsxDEV("h3",{className:"settings-head",children:"Changesets"},void 0,!1,void 0,this),$.jsxDEV("p",{className:"mode",children:"This World's rules, kept with it and shared by everyone who works in it. A person or the World's token changes them; a key never does, so an agent cannot relax the review its own changes go through."},void 0,!1,void 0,this),$.jsxDEV(p1,{load:F,what:"the rules",lines:2},void 0,!1,void 0,this),$.jsxDEV("form",{className:"ws-rules",onSubmit:(v)=>void I(v),"aria-label":"Changeset rules",children:[$.jsxDEV("div",{className:"ws-rule",children:[$.jsxDEV("h4",{children:"Recorded as"},void 0,!1,void 0,this),$.jsxDEV("p",{children:["What you cut here is recorded as ",P,". An agent's or an app's key cuts as itself, for the person it was made for; a World's token cuts as a service."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-rule",children:[$.jsxDEV("h4",{children:"A cut's summary"},void 0,!1,void 0,this),$.jsxDEV("fieldset",{className:"choice",disabled:Boolean(N)||L===null,children:[$.jsxDEV("label",{className:"check",children:[$.jsxDEV("input",{type:"radio",name:"summary",checked:w==="required",onChange:()=>X("required")},void 0,!1,void 0,this)," ",$.jsxDEV("span",{children:"Required: whoever cuts says what it does and why"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("label",{className:"check",children:[$.jsxDEV("input",{type:"radio",name:"summary",checked:w==="generated",onChange:()=>X("generated")},void 0,!1,void 0,this)," ",$.jsxDEV("span",{children:"Generated from its changes when none is given"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("p",{className:"mode",children:"Either way a cut takes every change not yet in a changeset: there is no staging."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-rule",children:[$.jsxDEV("h4",{children:"Ready to deploy"},void 0,!1,void 0,this),$.jsxDEV("ul",{className:"ws-rule-list",children:$.jsxDEV("li",{children:[$.jsxDEV(A1,{name:"check",size:16},void 0,!1,void 0,this),"Verified: replayed in a throwaway World, the World's checks passing"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("label",{className:"ws-rule-row",children:[$.jsxDEV("span",{children:"Approved by"},void 0,!1,void 0,this),$.jsxDEV("select",{value:B,onChange:(v)=>H(Number(v.target.value)),disabled:Boolean(N)||L===null,"aria-label":"Approvals required",children:[0,1,2,3,4,5].map((v)=>$.jsxDEV("option",{value:v,children:v===0?"no one: verified is enough":v===1?"1 person":`${v} different people`},v,!1,void 0,this))},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:"for its contents as they stand"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-rule",children:[$.jsxDEV("h4",{children:"Deploys to"},void 0,!1,void 0,this),Z.state==="ok"&&S.length===0?$.jsxDEV("p",{className:"mode",children:"No vendor here is connected to its real service, so nothing deploys from this World."},void 0,!1,void 0,this):null,S.length?$.jsxDEV("ul",{className:"ws-rule-list",children:S.map((v)=>$.jsxDEV("li",{children:[$.jsxDEV(u1,{vendor:v.twin},void 0,!1,void 0,this),H1(v.twin),": ",C[v.root.deploy??"gated"]??"gated"]},v.twin,!0,void 0,this))},void 0,!1,void 0,this):null,$.jsxDEV("p",{className:"mode",children:[$.jsxDEV("a",{href:`${X1}/${_}/~/settings/services`,onClick:(v)=>{v.preventDefault(),T1([..._.split("/"),"~","settings","services"])},children:"Real services"},void 0,!1,void 0,this)," sets each vendor's deploy policy."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(l0,{log:O,name:_},void 0,!1,void 0,this),$.jsxDEV("div",{className:"row-actions",children:[$.jsxDEV("button",{type:"submit",className:"primary",disabled:Boolean(N)||z||!A,title:N??void 0,children:z?"Saving…":"Save"},void 0,!1,void 0,this),A?$.jsxDEV("button",{type:"button",onClick:()=>{H(null),X(null)},children:"Cancel"},void 0,!1,void 0,this):null,N?$.jsxDEV("span",{className:"mode",children:[N,"."]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function bZ({who:_,scope:Q,snapshot:J,portal:q,onSignOut:U}){let G=Q==="write"?"Reads and changes this World":Q==="read"?"Reads this World; changes nothing":"…",[Z,F]=J?["A snapshot",`of ${J.parent}, read only`]:_.local&&_.person?[_.person,"Signed in on this machine: this World is served here, and acts as you"]:_.local?["This machine","Served here, with no one signed in: what you do is recorded as this machine"]:_.person?[_.person,q?`Signed in through ${new URL(q).host}`:"Signed in"]:_.admin?["The host's admin","Opened with the host admin token: every World it serves"]:["A link or key","Opened with a token for this World"];return $.jsxDEV($.Fragment,{children:[$.jsxDEV("h3",{className:"settings-head",children:"Account"},void 0,!1,void 0,this),$.jsxDEV("div",{className:"ws-account",children:[$.jsxDEV("span",{className:"ws-account-face","aria-hidden":"true",children:$.jsxDEV(A1,{name:_.person?"user":_.local?"monitor":J?"clock":"key-round",size:20},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("div",{className:"cell-label",children:[$.jsxDEV("b",{children:Z},void 0,!1,void 0,this),$.jsxDEV("small",{children:F},void 0,!1,void 0,this),$.jsxDEV("small",{children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_.local||J?null:$.jsxDEV("p",{children:$.jsxDEV("button",{type:"button",onClick:U,children:[$.jsxDEV(A1,{name:"log-out",size:16},void 0,!1,void 0,this),_.person?"Sign out":_.admin?"Sign out of the host":"Use another token"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q&&_.person?$.jsxDEV("p",{className:"mode",children:["Your profile, orgs and keys are on ",$.jsxDEV("a",{href:`${q}/`,children:new URL(q).host},void 0,!1,void 0,this),"."]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function DZ({name:_,token:Q,view:J,sub:q,arg:U,win:G,who:Z,snapshot:F,onReturn:L,onSignOut:Y,worlds:H,session:K,retry:X,twins:z,map:W,branches:O,clock:T,canWrite:B,refused:w,signsAs:A,opens:R,tick:I,admin:C,onRemoved:P,onClock:S,scope:N}){let v=s_(_,Q,I,w),[j,m]=i.useState(0),p=j*1e5+Math.floor(I/2),k=w1(Q,`/-/${_}/diff`,p),D=w1(Q,`/-/${_}/changesets`,p),V=w1(Q,`/-/${_}/rules`,p),[E,u]=i.useState(null),h=(s)=>(K1)=>{K1?.preventDefault(),T1([..._.split("/"),"~",...s])},f=z.state==="ok"?z.data.twins.map((s)=>s.twin):[],y=W.state==="ok"?W.data.twins.filter((s)=>s.mirror).map((s)=>s.twin):[],g=W.state==="ok"?W.data.twins.filter((s)=>s.root).map((s)=>s.twin):[],b=(s)=>W.state==="ok"?(W.data.twins.find((K1)=>K1.twin===s)?.resources??[]).reduce((K1,O1)=>K1+O1.count,0):0,t=O?.state==="ok"&&O.data.checkedOut||_.split("/")[1],o=i.useMemo(()=>{if(k.state!=="ok")return[];let s=new Map;for(let K1 of k.data.changes){let O1=`${K1.twin}:${K1.entry.subject.type}:${K1.entry.subject.id}`,Z1=s.get(O1)??{key:O1,twin:K1.twin,writes:[]};Z1.writes.push(K1.entry),s.set(O1,Z1)}return[...s.values()]},[k]),d=o.find((s)=>s.key===E)??o[0],a=w1(Q,J==="changes"&&d?`/-/${_}/log/${d.twin}`:null,p),c=k.state==="ok"?k.data.changes.length:0,n=v.waiting.length,Q1=v.there,F1=v.origin.state==="ok"?v.origin.data.origin:null,J1=!B?"This session reads the World; it changes nothing":!Q1?"No remote: name one in Settings › Remote":null,U1=(s,K1,O1,Z1,D1,x1)=>$.jsxDEV("a",{href:`${X1}/${_}/~/${Z1}`,className:s?"on":void 0,"aria-current":s?"page":void 0,onClick:D1,children:[K1,$.jsxDEV("span",{children:O1},void 0,!1,void 0,this),x1?$.jsxDEV("span",{className:"count",children:x1},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),Y1=(s)=>{s.currentTarget.closest("details")?.removeAttribute("open")};return $.jsxDEV("div",{className:"ws",children:[$.jsxDEV("div",{className:"ws-bar",role:"toolbar","aria-label":`${_} toolbar`,children:[$.jsxDEV("div",{className:"ws-left",children:[$.jsxDEV(O5,{href:`${X1}/${_}`,onClick:(s)=>{s.preventDefault(),h(["changes"])()}},void 0,!1,void 0,this),$.jsxDEV("details",{className:"menu ws-pick",children:[$.jsxDEV("summary",{title:"This World",children:[$.jsxDEV(A1,{name:"globe",size:16},void 0,!1,void 0,this),$.jsxDEV("span",{className:"ws-pick-label",children:[$.jsxDEV("small",{children:"World"},void 0,!1,void 0,this),$.jsxDEV("b",{children:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(A1,{name:"chevron-down",size:16},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"popover menu-list ws-world-menu",children:[Z.local?null:$.jsxDEV($.Fragment,{children:[$.jsxDEV("p",{className:"menu-label",children:"Worlds"},void 0,!1,void 0,this),H.map((s)=>$.jsxDEV("a",{href:`${X1}/${s}`,className:s===_?"on":void 0,onClick:(K1)=>{K1.preventDefault(),Y1(K1),T1(s.split("/"))},children:[s===_?$.jsxDEV(A1,{name:"check",size:16},void 0,!1,void 0,this):$.jsxDEV(A1,{name:"globe",size:16},void 0,!1,void 0,this),s]},s,!0,void 0,this)),$.jsxDEV("a",{href:`${G0()&&G0()!==M1?G0():""}${X1}/`,onClick:(s)=>{if(G0()&&G0()!==M1)return;s.preventDefault(),Y1(s),T1([])},children:[$.jsxDEV(A1,{name:"layout-grid",size:16},void 0,!1,void 0,this),"All Worlds",c1()?` on ${new URL(c1()).host}`:""]},void 0,!0,void 0,this),$.jsxDEV("hr",{},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("p",{className:"menu-label",children:"Connect an app"},void 0,!1,void 0,this),c1()?$.jsxDEV($.Fragment,{children:[$.jsxDEV("p",{className:"ws-menu-text",children:"Point your app's SDKs here with a key made on the platform; its calls to these vendors land in this World:"},void 0,!1,void 0,this),$.jsxDEV("pre",{children:[W2,"/",_,"/<vendor>"]},void 0,!0,void 0,this),$.jsxDEV(c6,{text:f4({platform:c1(),world:_})},void 0,!1,void 0,this)]},void 0,!0,void 0,this):!Z.local?$.jsxDEV($.Fragment,{children:[$.jsxDEV("p",{className:"ws-menu-text",children:"Point your app's SDKs here with a key from Settings › Access; its calls to these vendors land in this World:"},void 0,!1,void 0,this),$.jsxDEV("pre",{children:[W2,"/",_,"/<vendor>"]},void 0,!0,void 0,this),$.jsxDEV(c6,{text:f4()},void 0,!1,void 0,this)]},void 0,!0,void 0,this):$.jsxDEV($.Fragment,{children:[$.jsxDEV("p",{className:"ws-menu-text",children:"Run it in this World; its calls to these vendors land here:"},void 0,!1,void 0,this),$.jsxDEV("pre",{children:"volter world run -- npm start"},void 0,!1,void 0,this),$.jsxDEV("p",{className:"ws-menu-text mode",children:["Or point an SDK at ",$.jsxDEV("code",{children:[W2,"/",_,"/<vendor>"]},void 0,!0,void 0,this)," with the token in ",$.jsxDEV("code",{children:".volter/token"},void 0,!1,void 0,this),"."]},void 0,!0,void 0,this),$.jsxDEV(c6,{text:f4()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("hr",{},void 0,!1,void 0,this),$.jsxDEV("a",{href:`${X1}/${_}/~/settings`,onClick:(s)=>{Y1(s),h(["settings"])(s)},children:[$.jsxDEV(A1,{name:"settings",size:16},void 0,!1,void 0,this),"Settings…"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(SZ,{name:_,token:Q,branches:O,opens:R,refused:w,onChanged:S},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-where",title:"Where this is",children:[$.jsxDEV("span",{children:_},void 0,!1,void 0,this),$.jsxDEV("span",{className:"sep",children:":"},void 0,!1,void 0,this),$.jsxDEV("span",{children:t},void 0,!1,void 0,this),$.jsxDEV("span",{className:"sep",children:":"},void 0,!1,void 0,this),F1?$.jsxDEV("a",{href:`${X1}/${_}/~/remote`,onClick:h(["remote"]),children:["origin ",F1.namespace,n?$.jsxDEV("b",{children:[" ↑",n]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this):$.jsxDEV("a",{href:`${X1}/${_}/~/remote`,onClick:h(["remote"]),children:"no remote"},void 0,!1,void 0,this),$.jsxDEV("span",{className:"sep",children:":"},void 0,!1,void 0,this),$.jsxDEV("a",{href:`${X1}/${_}/~/settings/clock`,onClick:h(["settings","clock"]),children:T.state==="ok"?$.jsxDEV($.Fragment,{children:[T.data.frozen?"stopped at ":"",$.jsxDEV(R1,{iso:T.data.at,time:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this):"…"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-right",children:[$.jsxDEV("button",{type:"button",className:"ws-btn",onClick:()=>void v.pull(),disabled:Boolean(J1)||v.busy!==null,title:J1??`Fetch what ${Q1} has and move this branch onto it`,children:[$.jsxDEV(A1,{name:"arrow-down-to-line",size:16},void 0,!1,void 0,this),v.busy==="Pull"?"Pulling…":"Pull"]},void 0,!0,void 0,this),$.jsxDEV("button",{type:"button",className:"ws-btn",onClick:()=>void v.push(),disabled:Boolean(J1)||v.busy!==null||n===0,title:J1??(n?`Push ${k1(n,"changeset")} to ${Q1}`:`Every changeset is at ${Q1}`),children:[$.jsxDEV(A1,{name:"arrow-up-from-line",size:16},void 0,!1,void 0,this),v.busy==="Push"?"Pushing…":"Push",n?$.jsxDEV("span",{className:"ws-btn-count",children:n},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("button",{type:"button",className:"ws-btn icon-only","aria-label":"Settings",title:"Settings",onClick:()=>h(["settings"])(),children:$.jsxDEV(A1,{name:"settings",size:16},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F?$.jsxDEV("div",{className:"ws-banner",role:"region","aria-label":"Snapshot",children:[$.jsxDEV(A1,{name:"clock",size:16},void 0,!1,void 0,this),$.jsxDEV("span",{children:["You are looking at ",$.jsxDEV("b",{children:F.parent},void 0,!1,void 0,this)," as it was at ",$.jsxDEV(R1,{iso:F.at},void 0,!1,void 0,this),": a read-only snapshot",F.expiresAt?$.jsxDEV($.Fragment,{children:[", gone ",$.jsxDEV(R1,{iso:F.expiresAt},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,"."]},void 0,!0,void 0,this),$.jsxDEV("button",{type:"button",onClick:()=>void L(F),children:"Return to live"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,v.log.length?$.jsxDEV("div",{className:"ws-said",children:$.jsxDEV(l0,{log:v.log.slice(0,1),name:_},void 0,!1,void 0,this)},void 0,!1,void 0,this):null,$.jsxDEV("div",{className:"ws-body",children:[$.jsxDEV("nav",{className:"ws-side","aria-label":`${_} places`,children:[y.length?$.jsxDEV("a",{href:`${X1}/${_}/~/screens`,className:J==="screen"?"ws-screens-entry on":"ws-screens-entry",onClick:h(["screens"]),title:`${k1(y.length,"screen")}: ${X2(y.map(H1))}`,children:[$.jsxDEV(A1,{name:"layout-grid",size:16},void 0,!1,void 0,this),$.jsxDEV("span",{children:"Screens"},void 0,!1,void 0,this),$.jsxDEV("span",{className:"ws-screens-marks",children:[y.slice(0,3).map((s)=>$.jsxDEV(u1,{vendor:s},s,!1,void 0,this)),y.length>3?$.jsxDEV("span",{className:"more",children:["+",y.length-3]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("span",{className:"count",children:y.length},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,$.jsxDEV("p",{className:"side-group",children:"Workspace"},void 0,!1,void 0,this),U1(J==="changes"||J==="history",$.jsxDEV(A1,{name:"file-diff",size:16},void 0,!1,void 0,this),"Changes","changes",h(["changes"]),o.length?String(o.length):void 0),U1(J==="events"&&!U||J==="trace",$.jsxDEV(A1,{name:"activity",size:16},void 0,!1,void 0,this),"Events","events",h(["events"])),$.jsxDEV("p",{className:"side-group",children:"Records"},void 0,!1,void 0,this),f.map((s)=>$.jsxDEV(i.default.Fragment,{children:U1(J==="vendor"&&U===s,$.jsxDEV(u1,{vendor:s},void 0,!1,void 0,this),H1(s),`vendors/${s}`,h(["vendors",s]),b(s)?String(b(s)):void 0)},s,!1,void 0,this)),$.jsxDEV("p",{className:"side-group",children:"Remote"},void 0,!1,void 0,this),U1(!1,$.jsxDEV(A1,{name:"cloud",size:16},void 0,!1,void 0,this),Q1?"origin":"Name a remote…","remote",h(["remote"]),n?`↑${n}`:void 0)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-main",role:"main",children:[J==="changes"?$.jsxDEV("div",{className:"ws-status",children:[$.jsxDEV("div",{className:"ws-files",children:[$.jsxDEV(x_,{name:_,view:"changes",changes:o.length,changesets:D.state==="ok"?D.data.changesets.length:0},void 0,!1,void 0,this),$.jsxDEV("div",{className:"ws-list-head",children:[$.jsxDEV("span",{children:"Not in a changeset"},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:k.state==="ok"?`${k1(o.length,"record")} · ${k1(c,"write")}`:""},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(p1,{load:k,what:"the changes",lines:4},void 0,!1,void 0,this),$.jsxDEV(E_,{records:o,...d?{selected:d.key}:{},onPick:u,label:"Changed records"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"ws-detail",children:[k.state==="ok"&&!d?$.jsxDEV(f5,{title:"No changes on this branch",action:n>0&&Q1?$.jsxDEV("button",{type:"button",className:"primary",disabled:Boolean(J1)||v.busy!==null,onClick:()=>void v.push(),children:["Push ",k1(n,"changeset")," to origin"]},void 0,!0,void 0,this):void 0,children:$.jsxDEV("p",{children:["What your app writes to this World lands here, record by record, to cut into a changeset. Everything since ",k.data.base.at?$.jsxDEV(R1,{iso:k.data.base.at},void 0,!1,void 0,this):$.jsxDEV("code",{children:k.data.base.id},void 0,!1,void 0,this)," is in one already."]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,d?$.jsxDEV(h_,{record:d,history:a.state==="ok"?a.data.entries:a.state==="error"?[]:null,...y.includes(d.twin)?{screens:_}:{}},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV(_F,{pinned:!0,generated:V.state==="ok"&&V.data.changesets.summary==="generated",author:{face:$.jsxDEV(A1,{name:Z.person?"user":Z.local?"monitor":"key-round",size:18},void 0,!1,void 0,this),who:Z.person??(Z.local?"This machine":Z.admin?"The host's admin":"A token"),account:`${X1}/${_}/~/settings/account`,branch:t},name:_,token:Q,changes:c,canWrite:B,refused:w,onCut:()=>{m((s)=>s+1),u(null)}},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,J==="history"?$.jsxDEV(kZ,{name:_,token:Q,sets:D,changes:o.length,mirrored:y,required:V.state==="ok"?V.data.changesets.approvals??1:1,...q?{sub:q}:{},signsAs:A,canWrite:B,rooted:g,refused:w,onChanged:()=>m((s)=>s+1)},void 0,!1,void 0,this):null,J==="events"?$.jsxDEV(yZ,{name:_,token:Q,vendors:f,...U&&f.includes(U)?{vendor:U}:{},tick:I},U??"",!1,void 0,this):null,J==="trace"?$.jsxDEV(vZ,{name:_,token:Q,id:U??""},void 0,!1,void 0,this):null,J==="vendor"&&U?$.jsxDEV(jZ,{name:_,token:Q,vendor:U,mirrored:y.includes(U),tick:I},U,!1,void 0,this):null,J==="screen"&&U?$.jsxDEV(VZ,{name:_,vendor:U,...q?{show:q}:{},holding:EZ(W.state==="ok"?W.data.twins.find((s)=>s.twin===U)?.resources??[]:[]),session:K,retry:X},U,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(s1,{open:G?.kind==="settings",onClose:()=>h(["changes"])(),title:"Settings",wide:"window",children:G?.kind==="settings"?$.jsxDEV("div",{className:"ws-settings",children:[$.jsxDEV("nav",{"aria-label":"Settings",children:D_.map(([s,K1,O1])=>$.jsxDEV("a",{href:`${X1}/${_}/~/settings/${s}`,className:G.tab===s?"on":void 0,"aria-current":G.tab===s?"page":void 0,onClick:h(["settings",s]),children:[$.jsxDEV(A1,{name:O1,size:16},void 0,!1,void 0,this),K1]},s,!0,void 0,this))},void 0,!1,void 0,this),$.jsxDEV("div",{className:"ws-settings-pane",children:[N==="read"?$.jsxDEV("p",{className:"mode",children:[$.jsxDEV("span",{className:"badge read-only",children:"Read only"},void 0,!1,void 0,this)," This session reads the World; it changes nothing."]},void 0,!0,void 0,this):null,G.tab==="account"?$.jsxDEV(bZ,{who:Z,scope:N,snapshot:F,portal:c1(),onSignOut:Y},void 0,!1,void 0,this):null,G.tab==="changesets"?$.jsxDEV(uZ,{name:_,token:Q,who:Z,scope:N},void 0,!1,void 0,this):null,G.tab==="remote"?$.jsxDEV(JF,{name:_,token:Q,canWrite:B,tick:I,refused:w},void 0,!1,void 0,this):null,G.tab==="access"||G.tab==="services"||G.tab==="checks"||G.tab==="clock"?$.jsxDEV(qF,{name:_,token:Q,admin:C,canWrite:B,refused:w,onRemoved:P,only:G.tab},void 0,!1,void 0,this):null,G.tab==="vault"?$.jsxDEV($F,{name:_,token:Q,canWrite:B,refused:w},void 0,!1,void 0,this):null,G.tab==="appearance"?$.jsxDEV($.Fragment,{children:[$.jsxDEV("h3",{className:"settings-head",children:"Appearance"},void 0,!1,void 0,this),$.jsxDEV(fZ,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null},void 0,!1,void 0,this),$.jsxDEV(s1,{open:G?.kind==="branches",onClose:()=>h(["changes"])(),title:"Branches",wide:!0,children:G?.kind==="branches"?$.jsxDEV(gZ,{name:_,token:Q,canWrite:B,branches:O,opens:R,...G.open?{open:G.open}:{},onChanged:S,refused:w},void 0,!1,void 0,this):null},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function c6({text:_}){return $.jsxDEV("button",{type:"button",className:"agent-prompt-button",onClick:()=>{navigator.clipboard?.writeText(_).then(()=>V1("Copied the prompt: paste it into your coding agent"),()=>V1("Could not copy the prompt","error"))},children:"Copy a prompt for your coding agent"},void 0,!1,void 0,this)}var o6=(_)=>`${_.url.replace(/\/+$/,"")}/${_.namespace}`,hZ=(_)=>_.filter((Q)=>Q.applied===null||Q.applied.outcome==="refused"),EZ=(_,Q=4)=>{let J=[..._].filter((q)=>q.count>0).sort((q,U)=>U.count-q.count);return J.length?J.slice(0,Q).map((q)=>k1(q.count,q.type.replace(/^_+/,""))).join(" · ")+(J.length>Q?` · +${J.length-Q} more`:""):"nothing yet"},m_=$.jsxDEV("svg",{className:"branch-glyph",viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true",children:$.jsxDEV("path",{fill:"currentColor",d:"M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm0 2.122a2.25 2.25 0 1 0-1.5 0v5.256a2.25 2.25 0 1 0 1.5 0V9.5h4.25A2.25 2.25 0 0 0 11.5 7.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75H5V5.372ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm6.5-9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"},void 0,!1,void 0,this)},void 0,!1,void 0,this);function xZ({name:_,token:Q,clock:J,canWrite:q,onChanged:U,refused:G,open:Z}){let[F,L]=i.useState(!1),[Y,H]=i.useState(""),[K,X]=i.useState(""),[z,W]=i.useState(null),[O,T]=i.useState(!1),B=J.state==="ok"?J.data:null,w=async(C,P,S)=>{T(!0),W(null);try{let N=await I1(Q,`/-/${_}/${P}`,{method:P==="clock"?"PUT":"POST",body:JSON.stringify(S)});if(!N.ok){G(N),W({ok:!1,text:await J0(N)});return}let v=await N.json();W({ok:!0,text:`${C} — the World is at ${new Date(v.at).toLocaleString()}`}),L(!1),U()}catch(N){W({ok:!1,text:`the World did not answer: ${N instanceof Error?N.message:String(N)}`})}finally{T(!1)}},A=(C)=>{C.preventDefault();let P=new Date(Y);if(Number.isNaN(P.getTime())){W({ok:!1,text:"Pick a date and time."});return}if(B&&P.getTime()<Date.parse(B.at)){W({ok:!1,text:`The World's clock only moves forward: pick a time after ${new Date(B.at).toLocaleString()}.`});return}w("Clock set","clock",{at:P.toISOString()})},R=(C,P)=>{w(`Advanced ${P}`,"clock/advance",{by:C})},I=[["1h","1 hour"],["1d","1 day"],["7d","1 week"],["30d","30 days"]];return $.jsxDEV("div",{className:`clock${B?.frozen?" frozen":""}`,role:"region","aria-label":"World clock",children:[$.jsxDEV("p",{className:"clock-now",children:J.state==="loading"?$.jsxDEV("span",{className:"mode",children:"clock…"},void 0,!1,void 0,this):J.state==="error"?$.jsxDEV("span",{className:"mode",children:["Clock: ",J.error]},void 0,!0,void 0,this):B.frozen?$.jsxDEV($.Fragment,{children:[$.jsxDEV("span",{className:"badge",children:"Simulation"},void 0,!1,void 0,this)," World time ",$.jsxDEV("strong",{children:$.jsxDEV(R1,{iso:B.at},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):$.jsxDEV($.Fragment,{children:["World time ",$.jsxDEV("strong",{children:$.jsxDEV(R1,{iso:B.at},void 0,!1,void 0,this)},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:"· real time"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q&&B?$.jsxDEV("details",{className:Z?"clock-more inline":"clock-more",open:Z||void 0,children:[$.jsxDEV("summary",{children:"Simulate time…"},void 0,!1,void 0,this),$.jsxDEV("div",{className:Z?void 0:"popover",children:[$.jsxDEV("p",{className:"mode",children:"Move this World's clock forward to see what happens later: renewals, expiries, scheduled sends. Like a test clock, it only moves forward; to look back, the branch picker’s Manage branches… views an earlier moment."},void 0,!1,void 0,this),$.jsxDEV("div",{className:"clock-controls",children:[$.jsxDEV("button",{type:"button","aria-expanded":F,onClick:()=>{L(!F),H(x2(M_(B.at))),W(null)},children:"Set time…"},void 0,!1,void 0,this),$.jsxDEV("div",{role:"group","aria-label":"Advance the clock",className:"advance",children:[$.jsxDEV("span",{className:"mode",children:"Advance"},void 0,!1,void 0,this),I.map(([C,P])=>$.jsxDEV("button",{type:"button","aria-label":`Advance ${P}`,disabled:O||!B.frozen,title:B.frozen?void 0:"Set the time first: advancing moves a set clock",onClick:()=>R(C,P),children:P},C,!1,void 0,this)),$.jsxDEV("form",{className:"inline",onSubmit:(C)=>{if(C.preventDefault(),!/^\d+[smhd]$/.test(K.trim())){W({ok:!1,text:"Advance by a number and a unit: 90m, 12h, 3d."});return}R(K.trim(),`by ${K.trim()}`)},children:[$.jsxDEV("label",{className:"sr",children:["Advance by ",$.jsxDEV("input",{name:"advanceBy",value:K,onChange:(C)=>X(C.target.value),placeholder:"90m, 12h, 3d",size:9,disabled:!B.frozen},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("button",{type:"submit",disabled:O||!B.frozen,children:"Advance"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!B.frozen?$.jsxDEV("p",{className:"mode",children:"The World runs on real time. Set a time to start simulating; then advance it."},void 0,!1,void 0,this):null,F?$.jsxDEV("form",{className:"inline","aria-label":"Set the World time",onSubmit:A,noValidate:!0,children:[$.jsxDEV("label",{children:["World time ",$.jsxDEV("input",{name:"worldTime",type:"datetime-local",value:Y,min:x2(M_(B.at)),onChange:(C)=>H(C.target.value),required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("span",{className:"mode",children:Intl.DateTimeFormat().resolvedOptions().timeZone},void 0,!1,void 0,this),$.jsxDEV("button",{type:"submit",disabled:O,children:"Set time"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button",onClick:()=>L(!1),children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null,z?$.jsxDEV("p",{role:z.ok?"status":"alert",children:z.text},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function mZ({name:_,token:Q,clock:J,refused:q}){let[U,G]=i.useState(!1),[Z,F]=i.useState(""),[L,Y]=i.useState(null),[H,K]=i.useState(!1),X=J.state==="ok"?J.data.at:new Date().toISOString(),z=i.useRef(null);return i.useEffect(()=>{if(!U)return;let O=(B)=>{if(B.key==="Escape"&&!document.querySelector("dialog[open]"))G(!1),z.current?.querySelector("button")?.focus()},T=(B)=>{if(!z.current?.contains(B.target))G(!1)};return document.addEventListener("keydown",O),document.addEventListener("click",T),()=>{document.removeEventListener("keydown",O),document.removeEventListener("click",T)}},[U]),$.jsxDEV("div",{className:"as-of",ref:z,children:[$.jsxDEV("button",{type:"button","aria-expanded":U,title:"Open a read-only copy of this World as it was at a moment you pick",onClick:()=>{G(!U),F(x2(X)),Y(null)},children:"View an earlier moment…"},void 0,!1,void 0,this),U?$.jsxDEV("form",{className:"inline","aria-label":"View the World as of a past moment",onSubmit:async(O)=>{O.preventDefault(),Y(null);let T=new Date(Z);if(Number.isNaN(T.getTime())){Y("Pick a date and time.");return}if(T.getTime()>Date.parse(X)){Y(`That is after the World's present (${new Date(X).toLocaleString()}); a snapshot looks back.`);return}K(!0);try{let B=await I1(Q,`/-/${_}/branches`,{method:"POST",body:JSON.stringify({at:{instant:T.toISOString()},ttl:3600})});if(!B.ok){q(B),Y(await J0(B));return}let w=await B.json();d6({name:w.name,parent:_,token:w.token,readToken:w.readToken,at:T.toISOString(),expiresAt:w.expiresAt??null,parentOrigin:M1,made:!0});let A=C5(w.origin)?.origin;if(A&&A!==M1){t6(A,w.readToken,w.name,`${X1}/${w.name}`);return}T1(w.name.split("/"))}catch(B){Y(`the World did not answer: ${B instanceof Error?B.message:String(B)}`)}finally{K(!1)}},noValidate:!0,children:[$.jsxDEV("label",{children:["As of ",$.jsxDEV("input",{name:"asOf",type:"datetime-local",value:Z,max:x2(X),onChange:(O)=>F(O.target.value),required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("button",{type:"submit",disabled:H,children:H?"Opening…":"Open snapshot"},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:"Opens a read-only copy of this World as it was then; the copy goes away within the hour."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,L?$.jsxDEV("p",{role:"alert",children:L},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function g_({name:_,token:Q,open:J,onClose:q,onMade:U,refused:G}){let Z=(P)=>P.split("/").pop()??P,[F,L]=i.useState(!1),[Y,H]=i.useState(null),[K,X]=i.useState(""),[z,W]=i.useState("now"),[O,T]=i.useState(""),[B,w]=i.useState("24"),[A,R]=i.useState(!0);i.useEffect(()=>{if(J)H(null),T(x2(new Date().toISOString()))},[J]);let I=async(P)=>{P.preventDefault(),H(null);let S=z==="at"?new Date(O):null;if(S&&Number.isNaN(S.getTime())){H("Pick a date and time, or make it as of now.");return}if(S&&S.getTime()>Date.now()){H("A branch is made as of now or a moment before it.");return}L(!0);let N=await I1(Q,`/-/${_}/branches`,{method:"POST",body:JSON.stringify({ttl:Math.round(Number(B)*3600),...S?{at:{instant:S.toISOString()}}:A?{live:!0}:{},...K.trim()?{label:K.trim()}:{}})}).catch(()=>null);if(L(!1),!N){H(`${M1} did not answer`);return}if(!N.ok){G(N),H(await J0(N));return}let v=await N.json();d6({name:v.name,parent:_,token:v.token??"",readToken:v.readToken,at:(S??new Date).toISOString(),expiresAt:v.expiresAt??null,parentOrigin:M1,...v.origin?{origin:v.origin}:{}}),q(),X(""),V1(`Made ${Z(v.name)}`),U()};return $.jsxDEV(s1,{open:J,onClose:()=>{if(!F)q()},title:`New branch of ${Z(_)}`,footer:$.jsxDEV($.Fragment,{children:[$.jsxDEV("button",{type:"button",onClick:()=>q(),disabled:F,children:"Cancel"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"submit",form:"new-branch",className:"primary",disabled:F,children:F?"Making…":"Make branch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:$.jsxDEV("form",{id:"new-branch",onSubmit:(P)=>void I(P),className:"stack",children:[$.jsxDEV("label",{children:[$.jsxDEV("span",{children:["Label ",$.jsxDEV("span",{className:"mode",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("input",{name:"branchLabel",value:K,onChange:(P)=>X(P.target.value.toLowerCase()),placeholder:"checkout-flow",pattern:"[a-z0-9][a-z0-9\\-]{0,23}",maxLength:24},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("fieldset",{className:"choice",children:[$.jsxDEV("legend",{children:"From"},void 0,!1,void 0,this),$.jsxDEV("label",{className:"check",children:[$.jsxDEV("input",{type:"radio",name:"branchWhen",checked:z==="now",onChange:()=>W("now")},void 0,!1,void 0,this)," ",$.jsxDEV("span",{children:"Now: the World as it is"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z==="now"?$.jsxDEV("label",{className:"check sub",children:[$.jsxDEV("input",{type:"checkbox",name:"branchLive",checked:A,onChange:(P)=>R(P.target.checked)},void 0,!1,void 0,this)," ",$.jsxDEV("span",{children:"Live: its clock keeps this World's time, as a pull request's preview does (else it stops now)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,$.jsxDEV("label",{className:"check",children:[$.jsxDEV("input",{type:"radio",name:"branchWhen",checked:z==="at",onChange:()=>W("at")},void 0,!1,void 0,this)," ",$.jsxDEV("span",{children:"An instant before now: the World as it was then, its clock stopped there"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),z==="at"?$.jsxDEV("input",{type:"datetime-local","aria-label":"As of",value:O,max:x2(new Date().toISOString()),onChange:(P)=>T(P.target.value)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"Goes away after"},void 0,!1,void 0,this),$.jsxDEV("select",{name:"branchLife",value:B,onChange:(P)=>w(P.target.value),children:[$.jsxDEV("option",{value:"1",children:"1 hour"},void 0,!1,void 0,this),$.jsxDEV("option",{value:"24",children:"1 day"},void 0,!1,void 0,this),$.jsxDEV("option",{value:"72",children:"3 days"},void 0,!1,void 0,this),$.jsxDEV("option",{value:"168",children:"7 days"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y?$.jsxDEV("p",{role:"alert",children:Y},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function gZ({name:_,token:Q,canWrite:J,branches:q,opens:U,open:G,onChanged:Z,refused:F,snapshotOf:L}){let Y=w1(Q,`/-/${_}/clock`),H=(w)=>w.split("/").pop()??w,[K,X]=i.useState(!1),z=(w)=>(A)=>{A.preventDefault(),T1([..._.split("/"),"~","branches",...w?w.split("/"):[]])};if(!q)return $.jsxDEV("p",{className:"mode",children:"This host makes no branches of a World."},void 0,!1,void 0,this);let W=q.state==="ok"?q.data.branches:[],O=q.state==="ok"&&(q.data.named?.length??0)>0?q.data.named:[{name:H(_),running:!0}],T=q.state==="ok"?q.data.checkedOut??H(_):H(_),B=async(w)=>{if(!await B0({title:`Remove the branch ${H(w)}?`,body:"Whoever holds its tokens loses it, and its history goes with it.",action:"Remove branch",danger:!0}))return;let A=await I1(Q,`/-/${_}/branches/${w}`,{method:"DELETE"}).catch((R)=>R);if(A instanceof Error){V1(`Remove ${H(w)}: the World did not answer (${A.message})`,"error");return}if(!A.ok){F(A),V1(`Remove ${H(w)}: ${await J0(A)}`,"error");return}w4(w),V1(`Removed ${H(w)}`),Z(),T1([..._.split("/"),"~","branches"])};if(G){let w=G.includes("/")?W.find((R)=>R.name===G):void 0,A=G.includes("/")?void 0:O.find((R)=>R.name===G);return $.jsxDEV($.Fragment,{children:[$.jsxDEV("p",{className:"crumbs-line",children:$.jsxDEV("a",{href:`${X1}/${_}/~/branches`,onClick:z(),children:"← Branches"},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV(p1,{load:q,what:"the branches"},void 0,!1,void 0,this),q.state==="ok"&&!w&&!A?$.jsxDEV("p",{className:"mode",children:["This World has no branch named ",G,"."]},void 0,!0,void 0,this):null,w?$.jsxDEV(pZ,{name:_,b:w,canWrite:J,opens:U(w.name),remove:()=>void B(w.name)},void 0,!1,void 0,this):null,A&&!w?$.jsxDEV(cZ,{name:_,token:Q,b:A,served:A.name===T,canWrite:J,canServe:q.state==="ok"&&Boolean(q.data.canServe)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}return $.jsxDEV("div",{"aria-labelledby":"branches",children:[$.jsxDEV("div",{className:"branches-head",children:[$.jsxDEV("p",{className:"lede",children:["Branch this World to look at it as it was, or to change it without touching ",$.jsxDEV("b",{children:T},void 0,!1,void 0,this),". Each branch's name opens its page."]},void 0,!0,void 0,this),J?$.jsxDEV("div",{className:"head-actions",children:[L?null:$.jsxDEV(mZ,{name:_,token:Q,clock:Y,refused:F},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button",className:"primary",onClick:()=>X(!0),children:"New branch"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV(p1,{load:q,what:"the branches"},void 0,!1,void 0,this),q.state==="ok"?$.jsxDEV("div",{className:"block",children:$.jsxDEV("table",{className:"dense","aria-label":"Branches",children:[$.jsxDEV("thead",{children:$.jsxDEV("tr",{children:[$.jsxDEV("th",{id:"branches",children:"Branch"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Parent"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"As of"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Made"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Goes away"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("tbody",{children:[O.map((w)=>$.jsxDEV("tr",{children:[$.jsxDEV("td",{children:[$.jsxDEV("a",{href:`${X1}/${_}/~/branches/${w.name}`,onClick:z(w.name),children:$.jsxDEV("b",{children:w.name},void 0,!1,void 0,this)},void 0,!1,void 0,this),w.name===T?$.jsxDEV($.Fragment,{children:[" ",$.jsxDEV("span",{className:"badge live",children:"served here"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):w.running?null:$.jsxDEV($.Fragment,{children:[" ",$.jsxDEV("span",{className:"badge",children:"stopped"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("td",{className:"mode",children:"—"},void 0,!1,void 0,this),$.jsxDEV("td",{className:"mode",children:"live"},void 0,!1,void 0,this),$.jsxDEV("td",{className:"mode",children:"—"},void 0,!1,void 0,this),$.jsxDEV("td",{className:"mode",children:"kept"},void 0,!1,void 0,this)]},`own:${w.name}`,!0,void 0,this)),W.map((w)=>$.jsxDEV("tr",{children:[$.jsxDEV("td",{children:$.jsxDEV("a",{href:`${X1}/${_}/~/branches/${w.name}`,onClick:z(w.name),children:$.jsxDEV("b",{children:H(w.name)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:H(w.from??_)},void 0,!1,void 0,this),$.jsxDEV("td",{children:w.at?.instant?$.jsxDEV(R1,{iso:w.at.instant},void 0,!1,void 0,this):$.jsxDEV("span",{className:"mode",children:"live"},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:$.jsxDEV(R1,{iso:w.createdAt},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:w.expiresAt?$.jsxDEV(R1,{iso:w.expiresAt},void 0,!1,void 0,this):"kept"},void 0,!1,void 0,this)]},w.name,!0,void 0,this))]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null,$.jsxDEV(g_,{name:_,token:Q,open:K,onClose:()=>X(!1),onMade:Z,refused:F},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function pZ({name:_,b:Q,canWrite:J,opens:q,remove:U}){let G=(L)=>L.split("/").pop()??L,Z=a6(Q.name),F=w1(Z,Z?`/-/${Q.name}/diff`:null);return $.jsxDEV("div",{className:"branch-page",children:[$.jsxDEV("div",{className:"changeset-head",children:[$.jsxDEV("h3",{children:[m_," ",G(Q.name)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"changeset-actions",children:[q?$.jsxDEV("button",{type:"button",className:"primary",onClick:()=>b_(Q.name,Q.name.split("/")),children:"Open"},void 0,!1,void 0,this):null,J?$.jsxDEV("button",{type:"button",className:"danger-button",onClick:U,children:"Remove…"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"block",children:$.jsxDEV("dl",{className:"fields pad",children:[$.jsxDEV("dt",{children:"Name"},void 0,!1,void 0,this),$.jsxDEV("dd",{children:$.jsxDEV("code",{children:Q.name},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("dt",{children:"Parent"},void 0,!1,void 0,this),$.jsxDEV("dd",{children:G(Q.from??_)},void 0,!1,void 0,this),$.jsxDEV("dt",{children:"As of"},void 0,!1,void 0,this),$.jsxDEV("dd",{children:Q.at?.instant?$.jsxDEV(R1,{iso:Q.at.instant},void 0,!1,void 0,this):"live: it keeps its parent's time"},void 0,!1,void 0,this),$.jsxDEV("dt",{children:"Made"},void 0,!1,void 0,this),$.jsxDEV("dd",{children:$.jsxDEV(R1,{iso:Q.createdAt},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("dt",{children:"Goes away"},void 0,!1,void 0,this),$.jsxDEV("dd",{children:Q.expiresAt?$.jsxDEV(R1,{iso:Q.expiresAt},void 0,!1,void 0,this):"kept"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),!q?$.jsxDEV("p",{className:"mode",children:"Its tokens were handed to whoever made it: it opens, and shows its own changes, in their tab."},void 0,!1,void 0,this):null,F.state==="ok"?$.jsxDEV($.Fragment,{children:[$.jsxDEV("h4",{children:"Its changes"},void 0,!1,void 0,this),F.data.changes.length===0?$.jsxDEV("p",{className:"mode",children:"Nothing written on it since it branched."},void 0,!1,void 0,this):$.jsxDEV(eZ,{changes:F.data.changes,idPrefix:`branch-${G(Q.name)}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function cZ({name:_,token:Q,b:J,served:q,canWrite:U,canServe:G}){let[Z,F]=i.useState(!1),[L,Y]=i.useState(null),H=async()=>{F(!0),Y(null);let K=await I1(Q,`/-/${_}/branches/${encodeURIComponent(J.name)}/serve`,{method:"POST"}).catch(()=>null);if(K?.ok){location.reload();return}F(!1),Y(K?await J0(K):`${M1} did not answer`)};return $.jsxDEV("div",{className:"branch-page",children:[$.jsxDEV("div",{className:"changeset-head",children:[$.jsxDEV("h3",{children:[m_," ",J.name," ",q?$.jsxDEV("span",{className:"badge live",children:"served here"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"changeset-actions",children:U&&G&&!q?$.jsxDEV("button",{type:"button",className:"primary",disabled:Z,onClick:()=>void H(),children:Z?"Switching…":"Serve here"},void 0,!1,void 0,this):null},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"block",children:$.jsxDEV("dl",{className:"fields pad",children:[$.jsxDEV("dt",{children:"Name"},void 0,!1,void 0,this),$.jsxDEV("dd",{children:$.jsxDEV("code",{children:J.name},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("dt",{children:"Kind"},void 0,!1,void 0,this),$.jsxDEV("dd",{children:"one of this World's own branches"},void 0,!1,void 0,this),$.jsxDEV("dt",{children:"State"},void 0,!1,void 0,this),$.jsxDEV("dd",{children:J.running?"running":"stopped"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),q?$.jsxDEV("p",{className:"mode",children:["This is the branch these pages show: its changes are on ",$.jsxDEV("a",{href:`${X1}/${_}/~/changes`,onClick:(K)=>{K.preventDefault(),T1([..._.split("/"),"~","changes"])},children:"Changes"},void 0,!1,void 0,this),"."]},void 0,!0,void 0,this):G?$.jsxDEV("p",{className:"mode",children:["“Serve here” stops this one's twins and serves ",J.name," in its place."]},void 0,!0,void 0,this):$.jsxDEV("p",{className:"mode",children:"This host serves one of the World's own branches at a time, and does not switch them from this page."},void 0,!1,void 0,this),L?$.jsxDEV("p",{role:"alert",children:L},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}var f_=50,E2=(_)=>`${_.twin}:${_.position}`,p_=(_,Q)=>Date.parse(Q.entry.occurredAt)-Date.parse(_.entry.occurredAt)||_.twin.localeCompare(Q.twin)||Q.position-_.position,P4=(_)=>{if(!_)return"someone";if(_.startsWith("key:")){let[Q,J]=_.slice(4).split(" for:");return J?`${Q}, for ${J}`:Q||"a key"}if(_.startsWith("person:"))return _.slice(7);return _==="machine"?"this machine":_==="person"?"a session with no name":_==="token:read"?"the read-only token":_==="token"?"the World's token":_},P5=(_,Q)=>{let J=typeof Q==="string"?Q:typeof _.caller==="string"?_.caller:"";if(J.startsWith("key:")&&J.length>4)return`by ${P4(J)}`;if(J.startsWith("person:")&&J.length>7)return`by ${J.slice(7)}`;if(J==="machine")return"by this machine";if(J==="person")return"by a session with no name";if(J==="key")return"by a key";if(J==="token:read")return"by the read-only token";if(J==="token")return"by the World's token";return _.actor?.kind==="system"?"by the vendor":_.actor?.id?`by ${_.actor.id}`:"by an app"},c_=(_)=>_.operation??_.op;function lZ(_){let Q=_.fields??{},J=Q.usage!==null&&typeof Q.usage==="object"?Q.usage:Q,q=(...Y)=>Y.map((H)=>J[H]??Q[H]).find((H)=>typeof H==="number"),U=[],G=q("prompt_tokens","input_tokens"),Z=q("completion_tokens","output_tokens"),F=q("total_tokens");if(G!==void 0)U.push(["tokens in",G.toLocaleString()]);if(Z!==void 0)U.push(["tokens out",Z.toLocaleString()]);if(F!==void 0)U.push(["tokens in all",F.toLocaleString()]);let L=q("cost_usd","cost");if(L!==void 0)U.push(["cost",`$${L<0.01?L.toPrecision(2):L.toFixed(2)}`]);return U}function l_({text:_,at:Q=280}){if(_.length<=Q)return $.jsxDEV("span",{className:"text",children:_},void 0,!1,void 0,this);return $.jsxDEV("details",{className:"folded",children:[$.jsxDEV("summary",{children:[$.jsxDEV("span",{className:"text",children:[_.slice(0,Q),"…"]},void 0,!0,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:["show all ",_.length.toLocaleString()," characters"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("span",{className:"text",children:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function S0({v:_}){if(typeof _==="string")return $.jsxDEV(l_,{text:_},void 0,!1,void 0,this);if(_===null||typeof _!=="object")return $.jsxDEV("code",{children:String(_)},void 0,!1,void 0,this);let Q=JSON.stringify(_,null,2);return Q.length<=160?$.jsxDEV("code",{children:JSON.stringify(_)},void 0,!1,void 0,this):$.jsxDEV("details",{className:"folded",children:[$.jsxDEV("summary",{children:$.jsxDEV("code",{children:[JSON.stringify(_).slice(0,120),"…"]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("pre",{children:Q},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var rZ=(_)=>typeof _==="string"?_:Array.isArray(_)?_.map((Q)=>Q&&typeof Q==="object"&&typeof Q.text==="string"?Q.text:"").filter(Boolean).join(`
|
|
36
|
+
`):JSON.stringify(_??"");function iZ({body:_}){if(_===null||typeof _!=="object"||Array.isArray(_))return $.jsxDEV(S0,{v:_},void 0,!1,void 0,this);let Q=_,J=Array.isArray(Q.messages)?Q.messages:null,q=Object.entries(Q).filter(([U])=>!(J&&U==="messages"));return $.jsxDEV($.Fragment,{children:[q.length?$.jsxDEV("dl",{className:"fields",children:q.map(([U,G])=>$.jsxDEV(i.default.Fragment,{children:[$.jsxDEV("dt",{children:U},void 0,!1,void 0,this),$.jsxDEV("dd",{children:$.jsxDEV(S0,{v:G},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},U,!0,void 0,this))},void 0,!1,void 0,this):null,J?$.jsxDEV("ol",{className:"messages",children:J.map((U,G)=>$.jsxDEV("li",{children:[$.jsxDEV("span",{className:"role",children:typeof U.role==="string"?U.role:"message"},void 0,!1,void 0,this),$.jsxDEV(l_,{text:rZ(U.content)},void 0,!1,void 0,this)]},G,!0,void 0,this))},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)}function r_({fields:_}){let Q=Object.entries(_??{});if(Q.length===0)return $.jsxDEV("p",{className:"mode",children:"No fields."},void 0,!1,void 0,this);return $.jsxDEV("dl",{className:"fields",children:Q.map(([J,q])=>$.jsxDEV(i.default.Fragment,{children:[$.jsxDEV("dt",{children:J},void 0,!1,void 0,this),$.jsxDEV("dd",{children:$.jsxDEV(S0,{v:q},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},J,!0,void 0,this))},void 0,!1,void 0,this)}var dZ=(_)=>_.receipt?`${_.receipt.status??""}${_.receipt.externalId?` · ${_.receipt.externalId}`:""}${_.receipt.reason?` · ${_.receipt.reason}`:""}`:_.operation==="observed"?"observed from the vendor":_.provenance==="placeholder"?"default data":"none: it has not left this World";function aZ(_){let Q=new Map,J=[],q=[],U=new Map;for(let G of _){if(G.entry.landsId||G.entry.aliasOf){q.push(G);continue}let Z={...G,copies:[]};if(J.push(Z),!Q.has(`${G.twin}:${G.entry.id}`))Q.set(`${G.twin}:${G.entry.id}`,Z);if(!U.has(`${G.twin}:${G.entry.subject.type}:${G.entry.subject.id}`))U.set(`${G.twin}:${G.entry.subject.type}:${G.entry.subject.id}`,Z)}for(let G of q){let Z=G.entry.landsId?Q.get(`${G.twin}:${G.entry.landsId}`):G.entry.aliasOf?U.get(`${G.twin}:${G.entry.subject.type}:${G.entry.aliasOf}`):void 0;if(Z)Z.copies.push(G);else J.push({...G,copies:[]})}return J.sort(p_)}var l6={deployed:5,confirmed:4,landed:3,replayed:2,skipped:1};function I_(_){let Q=[_.entry.receipt,..._.copies.map((U)=>U.entry.receipt)].filter((U)=>Boolean(U?.status));if(Q.length===0)return null;let J=Q.find((U)=>U.status==="failed"||U.status==="refused"),q=[...Q].sort((U,G)=>(l6[G.status]??0)-(l6[U.status]??0))[0];return J&&!(l6[q.status]>=5)?{status:J.status,bad:!0}:{status:q.status,bad:!1}}var N4=1280,C4=820,w_=160;function sZ({data:_}){let{world:Q,vendor:J,active:q,open:U,changed:G}=_;return $.jsxDEV($.Fragment,{children:[$.jsxDEV(Z_,{isVisible:!0,position:$1.Top,align:"start",className:"frame-label",children:[$.jsxDEV(u1,{vendor:J},void 0,!1,void 0,this),$.jsxDEV("span",{children:H1(J)},void 0,!1,void 0,this),G?$.jsxDEV("a",{className:"frame-changed nodrag",href:`${X1}/${Q}/~/changes`,onClick:(Z)=>{Z.preventDefault(),T1([...Q.split("/"),"~","changes"])},title:`${k1(G,"record")} changed here, not in a changeset: see them in Changes`,children:[$.jsxDEV(A1,{name:"square-dot",size:14},void 0,!1,void 0,this),G]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("div",{className:q?"frame on":"frame",style:{width:N4,height:C4},children:[$.jsxDEV("div",{className:"frame-bar",title:"Drag to move",children:[$.jsxDEV(u1,{vendor:J},void 0,!1,void 0,this),$.jsxDEV("strong",{children:H1(J)},void 0,!1,void 0,this),$.jsxDEV("span",{className:"frame-url",children:w5(Q,J).replace(/^https?:\/\//,"")},void 0,!1,void 0,this),$.jsxDEV("a",{className:"nodrag",href:`${X1}/${Q}/~/screens/${J}`,onClick:(Z)=>{Z.preventDefault(),U(J)},children:"Open"},void 0,!1,void 0,this),$.jsxDEV("a",{className:"nodrag",href:w5(Q,J),target:"_blank",rel:"noopener noreferrer","aria-label":`Open ${H1(J)} in a new tab`,children:"↗"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:q?"frame-body nodrag nopan nowheel":"frame-body",children:$.jsxDEV("iframe",{title:`${J} mirror`,src:w5(Q,J),loading:"lazy",style:{pointerEvents:q?"auto":"none"}},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var tZ={screen:sZ};function oZ(_){return $.jsxDEV(D6,{children:$.jsxDEV(nZ,{..._},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function nZ({name:_,token:Q,twins:J,session:q,retry:U,snapshot:G,back:Z}){let F=w1(Q,`/-/${_}/diff`),L=i.useMemo(()=>{let j={};if(F.state==="ok")for(let m of F.data.changes)(j[m.twin]??=new Set).add(`${m.entry.subject.type}:${m.entry.subject.id}`);return Object.fromEntries(Object.entries(j).map(([m,p])=>[m,p.size]))},[F]),Y=(j)=>L[j]??0,H=J.state==="ok"?J.data.twins.filter((j)=>j.mirror).map((j)=>j.twin):[],K=`volter.canvas.${_}`,[X,z]=i.useState(null),[W,O]=i.useState(!0),T=T5(),B=i.useCallback((j)=>T1([..._.split("/"),"~","screens",j]),[_]),w=Math.max(1,Math.ceil(Math.sqrt(H.length))),A=i.useCallback(()=>{let j={};try{j=JSON.parse(localStorage.getItem(K)??"{}")}catch{}return H.map((m,p)=>({id:m,type:"screen",dragHandle:".frame-bar",position:j[m]??{x:p%w*(N4+w_),y:Math.floor(p/w)*(C4+w_)},data:{world:_,vendor:m,active:!1,open:B,changed:L[m]??0}}))},[H.join(","),_,w,B,L]),[R,I,C]=__([]);i.useEffect(()=>{I(A())},[A,I]),i.useEffect(()=>{I((j)=>j.map((m)=>m.data.active===(m.id===X)?m:{...m,data:{...m.data,active:m.id===X}}))},[X,I]),i.useEffect(()=>{let j=(m)=>{if(m.key==="Escape")z(null)};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[]);let P=()=>{try{localStorage.setItem(K,JSON.stringify(Object.fromEntries(R.map((j)=>[j.id,j.position]))))}catch{}},S=(j)=>{z(j);let m=T.getNode(j);if(!m)return;let p=Math.min((window.innerWidth-300)/N4,(window.innerHeight-120)/C4,1);T.setCenter(m.position.x+N4/2-130/p,m.position.y+C4/2,{zoom:p,duration:400})},N=typeof window<"u"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches,v=q.state==="ok"&&J.state==="ok";return $.jsxDEV("div",{className:"canvas full",role:"region","aria-label":"Every vendor's screens",children:$.jsxDEV(e9,{nodes:v?R:[],onNodesChange:C,nodeTypes:tZ,onNodeDragStop:P,onNodeClick:(j,m)=>z(m.id),onPaneClick:()=>z(null),fitView:!0,fitViewOptions:{padding:{top:"64px",left:"272px",right:"32px",bottom:"32px"}},minZoom:0.05,maxZoom:1.5,nodesConnectable:!1,elementsSelectable:!1,panOnScroll:!1,zoomOnDoubleClick:!1,colorMode:N?"dark":"light",proOptions:{hideAttribution:!0},children:[$.jsxDEV(J_,{variant:A0.Dots,gap:28,size:1.4},void 0,!1,void 0,this),$.jsxDEV(K2,{position:"top-left",className:"float layers",children:[$.jsxDEV("div",{className:"float-head",children:[$.jsxDEV("button",{type:"button",className:"back",onClick:Z,"aria-label":`Back to ${_}`,children:"←"},void 0,!1,void 0,this),$.jsxDEV("span",{className:"float-title",children:[$.jsxDEV("strong",{children:_.split("/")[1]},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:[_.split("/")[0],G?" · snapshot":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("button",{type:"button",className:"ghost","aria-expanded":W,"aria-label":W?"Hide the screens list":"Show the screens list",onClick:()=>O(!W),children:W?"▾":"▸"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W?$.jsxDEV("ul",{className:"layer-list","aria-label":"Screens",children:H.map((j)=>$.jsxDEV("li",{children:$.jsxDEV("button",{type:"button",className:X===j?"on":void 0,onClick:()=>S(j),children:[$.jsxDEV(u1,{vendor:j},void 0,!1,void 0,this),$.jsxDEV("span",{children:H1(j)},void 0,!1,void 0,this),Y(j)?$.jsxDEV("span",{className:"layer-changed",title:`${k1(Y(j),"record")} changed, not in a changeset`,children:[$.jsxDEV(A1,{name:"square-dot",size:14},void 0,!1,void 0,this),Y(j)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},j,!1,void 0,this))},void 0,!1,void 0,this):null,$.jsxDEV(p1,{load:J,what:"the vendors"},void 0,!1,void 0,this),q.state==="pending"?$.jsxDEV("p",{className:"mode",role:"status",children:"Opening…"},void 0,!1,void 0,this):null,q.state==="error"?$.jsxDEV("p",{role:"alert",children:["The World did not open its screens: ",q.error," ",$.jsxDEV("button",{type:"button",onClick:U,children:"Try again"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV(K2,{position:"top-center",className:"float hint mode",children:X?`Using ${H1(X)} · Esc to leave`:"Drag to pan · scroll to zoom · click a screen to use it"},void 0,!1,void 0,this),$.jsxDEV(q_,{showInteractive:!1,position:"bottom-left"},void 0,!1,void 0,this),$.jsxDEV(G_,{pannable:!0,zoomable:!0,nodeBorderRadius:8,position:"bottom-right"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var i_=(_)=>_.actions.map((Q)=>({twin:Q.service,entry:{...Q.action,service:Q.service,op:Q.action.op??Q.action.operation??""}}));function y4(_){let Q=_.actions.length,J=_.applied?.receipts??[],q=_.deployed??[],U=new Set([...q.filter((F)=>F.status==="deployed"),...J.filter((F)=>F.status==="confirmed")].map((F)=>F.actionId)).size,G=new Set([...q.filter((F)=>F.status==="refused"||F.status==="failed"),...J.filter((F)=>F.status==="failed")].map((F)=>F.actionId)).size,Z={performed:U,failed:G,total:Q};if(Q>0&&U>=Q)return{label:"Deployed",tone:"done",...Z};if(U>0)return{label:`Partly deployed: ${U} of ${Q}`,tone:"warn",...Z};if(G>0)return{label:`${G} refused or failed`,tone:"bad",...Z};if(J.some((F)=>F.status==="replayed")&&J.every((F)=>F.status==="replayed"||F.status==="skipped"))return{label:"Pushed",tone:"good",...Z};return{label:"Not sent",tone:"plain",...Z}}var r6=(_)=>_.message??_.narration?.split(`
|
|
37
|
+
`)[0]?.replace(/ setting .*$/,"")??_.name;function d_(_,Q=1){let J=_.currentHash??_.contentHash,q=_.readiness?.approvers??new Set(_.approvals.filter((G)=>G.contentHash===J).map((G)=>G.principal)).size,U=_.verification&&_.verification.contentHash===J?_.verification:null;if(U&&!U.passed)return{label:"Checks failed",tone:"bad"};if(q>0&&q<Q)return{label:`Approved by ${q} of ${Q}`,tone:"plain"};if(q>0)return{label:`Approved by ${q}`,tone:"good"};if(U)return{label:"Verified",tone:"good"};return{label:"Not verified",tone:"plain"}}function P_({name:_,token:Q,signsAs:J,c:q,canWrite:U,rooted:G,refused:Z,onChanged:F,part:L,required:Y}){let H=L==="head",K=L==="review",[X,z]=i.useState(null),[W,O]=i.useState(!1),[T,B]=i.useState(""),[w,A]=i.useState(""),[R,I]=i.useState(null),C=w1(Q,`/-/${_}/origin`),P=y4(q),S=d_(q,Y),N=i_(q),v=[...new Set(N.map((b)=>b.twin))],j=v.some((b)=>G.includes(b)),m=(b)=>b===(q.currentHash??q.contentHash),p=q.applied?.receipts??[],k=(q.deployed??[]).filter((b)=>b.status!=="landed"),D=p.filter((b)=>b.status==="confirmed").length,V=k.filter((b)=>b.status==="deployed"),E=async(b,t,o,d)=>{z(b),I(null);try{let a=await I1(Q,t,{method:"POST",...o===void 0?{}:{body:JSON.stringify(o)}});if(!a.ok)return Z(a),I({what:b,...y1(await P0(a))}),!1;if(d)V1(d);return F(),!0}catch(a){return I({what:b,text:`the World did not answer (${a instanceof Error?a.message:String(a)})`,acts:[]}),!1}finally{z(null)}},u=()=>{E("Verify",`/-/${_}/changesets/${q.name}/verify`,void 0,"Verified: the checks ran over it")},h=async(b)=>{if(b.preventDefault(),await E("Approve",`/-/${_}/changesets/${q.name}/approve`,{...T.trim()?{note:T.trim()}:{},...J===null&&w.trim()?{as:w.trim()}:{}},"Approved"))O(!1),B("")},f=async()=>{let b=v.filter((t)=>G.includes(t));if(!await B0({title:`Deploy ${q.name} to the real vendors?`,body:$.jsxDEV($.Fragment,{children:["It performs its ",q.actions.length," change",q.actions.length===1?"":"s"," against the real account",b.length===1?"":"s"," behind ",X2(b.map(H1)),". This cannot be taken back here."]},void 0,!0,void 0,this),action:"Deploy",danger:!0,typed:q.name}))return;z("Deploy"),I(null);try{let t=await I1(Q,`/-/${_}/deploy/${q.name}`,{method:"POST",body:JSON.stringify({confirm:q.name})});if(!t.ok){Z(t),I({what:"Deploy",...y1(await P0(t))});return}let o=await I1(Q,`/-/${_}/changesets/${q.name}`),d=o.ok?await o.json():null;if(!d){V1("Deploy: sent; reading its receipts failed","info"),F();return}let a=y4(d);V1(`Deploy: ${a.performed} of ${a.total} change${a.total===1?"":"s"} performed at the vendor${a.failed?`; ${a.failed} refused or failed`:""}`,a.failed?"error":a.performed?"ok":"info"),F()}catch(t){I({what:"Deploy",text:`the World did not answer (${t instanceof Error?t.message:String(t)})`,acts:[]})}finally{z(null)}},y=!U?"This session reads the World; it changes nothing":P.label==="Deployed"?"Already deployed: every change was performed at the vendor":null,g=C.state==="ok"&&C.data.origin?o6(C.data.origin):null;return $.jsxDEV("div",{className:"changeset","aria-labelledby":"changeset-title",children:[H?$.jsxDEV($.Fragment,{children:[$.jsxDEV("div",{className:"changeset-head",children:[$.jsxDEV("div",{children:[$.jsxDEV("h3",{id:"changeset-title",children:[q.message??q.name," ",$.jsxDEV("span",{className:`badge cs-${P.tone}`,children:P.label},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:`badge cs-${S.tone}`,children:S.label},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("p",{className:"mode",children:[$.jsxDEV("code",{children:q.name},void 0,!1,void 0,this)," · made ",$.jsxDEV(R1,{iso:q.createdAt},void 0,!1,void 0,this)," · ",q.actions.length," change",q.actions.length===1?"":"s"," at ",X2(v.map(H1))||"no vendor"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"changeset-actions",children:[$.jsxDEV("button",{type:"button",onClick:u,disabled:Boolean(y)||X!==null,title:y??"Replay it in a throwaway World and run the World's checks",children:X==="Verify"?"Verifying…":"Verify"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button",onClick:()=>O(!0),disabled:Boolean(y)||X!==null,title:y??"Sign its current contents as yourself",children:"Approve…"},void 0,!1,void 0,this),j?$.jsxDEV("button",{type:"button",className:"primary",onClick:()=>void f(),disabled:Boolean(y)||X!==null,title:y??"Perform it against the real accounts behind this World",children:X==="Deploy"?"Deploying…":"Deploy…"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),y&&P.label!=="Deployed"?$.jsxDEV("p",{className:"mode",children:[y,"."]},void 0,!0,void 0,this):null,R?$.jsxDEV("div",{role:"alert",className:"refusal",children:[$.jsxDEV("span",{children:[$.jsxDEV("b",{children:R.what},void 0,!1,void 0,this),": ",R.text]},void 0,!0,void 0,this),R.acts.includes("verify")&&U?$.jsxDEV("button",{type:"button",onClick:u,disabled:X!==null,children:"Verify"},void 0,!1,void 0,this):null,R.acts.includes("approve")&&U?$.jsxDEV("button",{type:"button",onClick:()=>O(!0),disabled:X!==null,children:"Approve…"},void 0,!1,void 0,this):null,$.jsxDEV(y_,{name:_,acts:R.acts},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this):null,K?$.jsxDEV($.Fragment,{children:[q.narration?$.jsxDEV("p",{className:"narration",children:q.narration},void 0,!1,void 0,this):null,$.jsxDEV("h4",{children:"Where it went"},void 0,!1,void 0,this),$.jsxDEV("div",{className:"block where",children:[P.performed>0?$.jsxDEV("p",{className:"pad",children:[P.performed>=P.total?"Deployed":"Partly deployed",": ",P.performed," of ",P.total," change",P.total===1?"":"s"," performed at ",X2([...new Set([...V.map((b)=>b.service),...p.filter((b)=>b.status==="confirmed").map((b)=>b.service)].map(H1))]),V.length?` (${V.length} from here`:" (",V.length&&D?", ":"",D?`${D} by the remote`:"",")."]},void 0,!0,void 0,this):P.label==="Pushed"?$.jsxDEV("p",{className:"pad",children:["Pushed to the remote",g?$.jsxDEV($.Fragment,{children:[" ",$.jsxDEV("code",{children:g},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,q.applied?$.jsxDEV($.Fragment,{children:[" · ",$.jsxDEV(R1,{iso:q.applied.at},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,": every change was replayed there. No vendor has performed any of it."]},void 0,!0,void 0,this):P.failed===0?$.jsxDEV("p",{className:"pad",children:["Not sent: it is only in this World.",q.applied?.outcome==="refused"?" A push was refused (below); Push sends it again.":$.jsxDEV($.Fragment,{children:[" Push sends it to the remote World",j?"; Deploy, to the real vendors behind it":"","."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null,P.failed>0?$.jsxDEV("p",{className:"pad failed",role:"alert",children:[P.failed," change",P.failed===1?" was":"s were"," refused or failed at the vendor",[...k.filter((b)=>b.reason&&(b.status==="refused"||b.status==="failed")).map((b)=>b.reason),...p.filter((b)=>b.status==="failed"&&b.error).map((b)=>b.error)].slice(0,3).map((b)=>`: ${y1(b).text}`).join(""),"."]},void 0,!0,void 0,this):null,q.applied?.refusal?.length?$.jsxDEV("ul",{className:"checks pad",children:q.applied.refusal.map((b,t)=>$.jsxDEV("li",{className:"mode",children:y1(b).text},t,!1,void 0,this))},void 0,!1,void 0,this):null,k.length?$.jsxDEV($.Fragment,{children:[$.jsxDEV("p",{className:"pad where-sub mode",children:"At the vendor"},void 0,!1,void 0,this),$.jsxDEV("ul",{className:"receipts pad",children:k.map((b)=>$.jsxDEV("li",{children:[$.jsxDEV("span",{className:b.status==="refused"||b.status==="failed"?"badge cs-bad":b.status==="deployed"?"badge cs-done":"badge",children:b.status},void 0,!1,void 0,this)," ",H1(b.service)," ",b.status==="deployed"?b.url?$.jsxDEV("a",{href:b.url,target:"_blank",rel:"noopener noreferrer",children:b.externalId??b.url},void 0,!1,void 0,this):b.externalId?$.jsxDEV("code",{children:b.externalId},void 0,!1,void 0,this):null:null,b.reason?$.jsxDEV("span",{className:"mode",children:[" · ",y1(b.reason).text]},void 0,!0,void 0,this):null," ",$.jsxDEV("span",{className:"mode",children:["· ",$.jsxDEV(R1,{iso:b.at},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},`v:${b.actionId}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,p.length?$.jsxDEV($.Fragment,{children:[$.jsxDEV("p",{className:"pad where-sub mode",children:"At the remote"},void 0,!1,void 0,this),$.jsxDEV("ul",{className:"receipts pad",children:p.map((b)=>$.jsxDEV("li",{children:[$.jsxDEV("span",{className:b.status==="failed"?"badge cs-bad":b.status==="confirmed"?"badge cs-done":"badge",children:b.status},void 0,!1,void 0,this)," ",H1(b.service)," ",$.jsxDEV("span",{className:"mode",children:b.status==="replayed"?"replayed at the remote World":b.status==="confirmed"?"performed at the vendor by the remote":""},void 0,!1,void 0,this),b.status==="confirmed"&&b.externalId?$.jsxDEV($.Fragment,{children:[" ",$.jsxDEV("code",{children:b.externalId},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,b.error?$.jsxDEV("span",{className:"mode",children:[" · ",y1(b.error).text]},void 0,!0,void 0,this):null]},`r:${b.actionId}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),!j&&P.label!=="Deployed"?$.jsxDEV("p",{className:"mode",children:["No vendor it changes is connected to its real service here, so it does not deploy from this World. ",$.jsxDEV("a",{href:`${X1}/${_}/~/settings/services`,onClick:(b)=>{b.preventDefault(),T1([..._.split("/"),"~","settings","services"])},children:"Connect a vendor in Settings › Real services"},void 0,!1,void 0,this)," to deploy."]},void 0,!0,void 0,this):null,$.jsxDEV("h4",{children:"Checks"},void 0,!1,void 0,this),!q.verification?$.jsxDEV("p",{className:"mode",children:"Not verified yet. Verify replays it in a throwaway World and runs this World's checks over the result."},void 0,!1,void 0,this):$.jsxDEV("div",{className:m(q.verification.contentHash)?"":"stale",children:[$.jsxDEV("p",{children:[q.verification.passed?"✓ Passed":"✗ Failed"," · ",$.jsxDEV(R1,{iso:q.verification.at},void 0,!1,void 0,this),m(q.verification.contentHash)?null:$.jsxDEV("span",{className:"mode",children:" · on an earlier version of it: verify again"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q.verification.results.length?$.jsxDEV("ul",{className:"checks",children:q.verification.results.map((b)=>$.jsxDEV("li",{children:[b.passed?"✓":"✗"," ",$.jsxDEV("code",{children:b.id},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:H1(b.service)},void 0,!1,void 0,this)]},b.id,!0,void 0,this))},void 0,!1,void 0,this):null,q.verification.refusals?.length?$.jsxDEV("ul",{className:"checks",children:q.verification.refusals.map((b,t)=>$.jsxDEV("li",{children:["✗ ",$.jsxDEV("code",{children:b.check},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:[H1(b.service),": ",b.reason]},void 0,!0,void 0,this)]},t,!0,void 0,this))},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("h4",{children:"Approvals"},void 0,!1,void 0,this),q.approvals.length===0?$.jsxDEV("p",{className:"mode",children:"No one has approved it."},void 0,!1,void 0,this):$.jsxDEV("ul",{className:"approvals",children:q.approvals.map((b,t)=>$.jsxDEV("li",{children:[$.jsxDEV("b",{children:b.principal},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:[$.jsxDEV(R1,{iso:b.at},void 0,!1,void 0,this),m(b.contentHash)?"":" · signed an earlier version"]},void 0,!0,void 0,this),b.note?$.jsxDEV("div",{className:"mode",children:["“",b.note,"”"]},void 0,!0,void 0,this):null]},t,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,$.jsxDEV(s1,{open:W,onClose:()=>{if(!X)O(!1)},title:`Approve ${q.name}`,footer:$.jsxDEV($.Fragment,{children:[$.jsxDEV("button",{type:"button",onClick:()=>O(!1),disabled:X!==null,children:"Cancel"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"submit",form:"approve-changeset",className:"primary",disabled:X!==null,children:X==="Approve"?"Approving…":"Approve"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:$.jsxDEV("form",{id:"approve-changeset",onSubmit:(b)=>void h(b),className:"stack",children:[$.jsxDEV("p",{className:"mode",children:["You sign its contents as they stand now",J?$.jsxDEV($.Fragment,{children:[", recorded as ",$.jsxDEV("b",{children:J},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,". A later change to it shows your approval as for an earlier version."]},void 0,!0,void 0,this),J===null?$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"Approving as"},void 0,!1,void 0,this),$.jsxDEV("input",{name:"approveAs",value:w,onChange:(b)=>A(b.target.value),maxLength:80,required:!0,placeholder:"your name or email",autoComplete:"off"},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:"This World was opened with its token, which names no person: the approval records the name you give."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,$.jsxDEV("label",{children:[$.jsxDEV("span",{children:["Note ",$.jsxDEV("span",{className:"mode",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("textarea",{name:"approveNote",value:T,onChange:(b)=>B(b.target.value),rows:3,maxLength:500},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var a_=(_,Q)=>JSON.stringify(_)===JSON.stringify(Q);function eZ({changes:_,idPrefix:Q}){let J=[...new Set(_.map((q)=>q.twin))];return $.jsxDEV($.Fragment,{children:J.map((q)=>{let U=_.filter((Z)=>Z.twin===q).map((Z)=>Z.entry),G=[...new Set(U.map((Z)=>`${Z.subject.type}:${Z.subject.id}`))];return $.jsxDEV("div",{className:"compare",role:"group","aria-labelledby":`${Q}-${q}`,children:[$.jsxDEV("h3",{id:`${Q}-${q}`,className:"vendor-cell",children:[$.jsxDEV(u1,{vendor:q},void 0,!1,void 0,this),H1(q)," ",$.jsxDEV("span",{className:"mode",children:["· ",k1(G.length,"record"),", ",k1(U.length,"write")]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("ul",{children:G.map((Z)=>{let F=U.filter((K)=>`${K.subject.type}:${K.subject.id}`===Z),L=F[F.length-1],Y=Z0(L),H={};return $.jsxDEV("li",{className:"record",children:[$.jsxDEV("p",{className:"record-head",children:[$.jsxDEV("span",{className:"kind",children:L.subject.type.replace(/^_+/,"").replace(/[_-]+/g," ")},void 0,!1,void 0,this)," ",Y.label?$.jsxDEV("span",{className:"label",children:["“",Y.label,"”"]},void 0,!0,void 0,this):null," ",$.jsxDEV("code",{children:c0(L)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F.map((K)=>{let X=K.fields??{},z=Object.entries(X).filter(([O,T])=>!(O in H)||!a_(H[O],T)),W=H;return H={...H,...X},$.jsxDEV("div",{className:"write",children:[$.jsxDEV("p",{className:"mode",children:[$.jsxDEV("span",{className:"op",children:Z0(K).what},void 0,!1,void 0,this)," · ",$.jsxDEV(R1,{iso:K.occurredAt},void 0,!1,void 0,this)," · ",P5(K)]},void 0,!0,void 0,this),z.length===0?$.jsxDEV("p",{className:"mode",children:"It set no field to a new value."},void 0,!1,void 0,this):$.jsxDEV("dl",{className:"fields field-diff","aria-label":`Fields ${Z0(K).what} set`,children:z.map(([O,T])=>$.jsxDEV(i.default.Fragment,{children:[$.jsxDEV("dt",{children:O},void 0,!1,void 0,this),$.jsxDEV("dd",{children:O in W?$.jsxDEV("span",{className:"changed",children:[$.jsxDEV("del",{children:$.jsxDEV(S0,{v:W[O]},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("span",{className:"arrow","aria-label":"becomes",children:"→"},void 0,!1,void 0,this),$.jsxDEV("ins",{children:$.jsxDEV(S0,{v:T},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):$.jsxDEV(S0,{v:T},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},O,!0,void 0,this))},void 0,!1,void 0,this)]},K.id,!0,void 0,this)})]},Z,!0,void 0,this)})},void 0,!1,void 0,this)]},q,!0,void 0,this)})},void 0,!1,void 0,this)}function _F({name:_,token:Q,changes:J,canWrite:q,refused:U,onCut:G,pinned:Z,generated:F,inputRef:L,author:Y}){let[H,K]=i.useState(""),[X,z]=i.useState(!1),[W,O]=i.useState([]),T=(w,A,R)=>{O((I)=>[{ok:w,text:A,at:new Date().toISOString(),n:++S5,...R?.length?{acts:R}:{}},...I].slice(0,4))},B=async(w)=>{w.preventDefault(),z(!0);try{let A=await I1(Q,`/-/${_}/changesets`,{method:"POST",body:JSON.stringify(H.trim()?{message:H.trim()}:{})});if(!A.ok){U(A);let I=y1(await P0(A));T(!1,`Cut a changeset: ${I.text}`,I.acts);return}let R=await A.json();T(!0,`Cut ${R.name??"a changeset"}: ${k1(R.actions?.length??0,"change")}, ready to review in History and push.`),K(""),G()}catch(A){T(!1,`Cut a changeset: the World did not answer (${A instanceof Error?A.message:String(A)})`)}finally{z(!1)}};if(Z){let w=!q?"This session reads the World; it changes nothing":J===0?"Nothing to cut: no change is outside a changeset":null;return $.jsxDEV("div",{className:"ws-cut",children:[$.jsxDEV(l0,{log:W,name:_},void 0,!1,void 0,this),$.jsxDEV("form",{onSubmit:(A)=>void B(A),"aria-label":"Cut a changeset",children:[Y?$.jsxDEV("a",{className:"ws-author",href:Y.account,title:`${Y.who}: your account`,onClick:(A)=>{A.preventDefault(),T1(Y.account.slice(X1.length+1).split("/"))},children:Y.face},void 0,!1,void 0,this):null,$.jsxDEV("input",{ref:L,name:"changesetMessage","aria-label":"Summary",value:H,onChange:(A)=>K(A.target.value),placeholder:J===0?"Nothing to cut":F?"Summary (optional)":"Summary (required)",required:!F,maxLength:200,disabled:Boolean(w),title:w??void 0},void 0,!1,void 0,this),$.jsxDEV("button",{type:"submit",className:"primary",disabled:Boolean(w)||X,title:w??void 0,children:X?"Cutting…":J===0?"Cut a changeset":$.jsxDEV($.Fragment,{children:["Cut ",k1(J,"change"),Y?$.jsxDEV($.Fragment,{children:[" on ",$.jsxDEV("b",{children:Y.branch},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}if(!q||J===0)return $.jsxDEV(l0,{log:W,name:_},void 0,!1,void 0,this);return $.jsxDEV($.Fragment,{children:[$.jsxDEV("form",{className:"block cut pad",onSubmit:(w)=>void B(w),"aria-label":"Cut a changeset",children:[$.jsxDEV("label",{children:[$.jsxDEV("span",{children:["Cut ",J===1?"this change":`these ${J} changes`," into a changeset: what it does and why"]},void 0,!0,void 0,this),$.jsxDEV("input",{name:"changesetMessage",value:H,onChange:(w)=>K(w.target.value),placeholder:"Welcome email for new sign-ups",required:!0,maxLength:200,disabled:J===0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("button",{type:"submit",className:"primary",disabled:X||J===0,children:X?"Cutting…":"Cut a changeset"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(l0,{log:W,name:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function QF({name:_,token:Q}){let[J,q]=i.useState(0),U=w1(Q,`/-/${_}/keys`,J),[G,Z]=i.useState(!1),[F,L]=i.useState(""),[Y,H]=i.useState("write"),[K,X]=i.useState(!1),[z,W]=i.useState(null),[O,T]=i.useState(null),[B,w]=i.useState(null),A=async()=>{let C=`Read-only link · ${new Date().toLocaleDateString(void 0,{month:"short",day:"numeric"})}`,P=await I1(Q,`/-/${_}/keys`,{method:"POST",body:JSON.stringify({name:C,scope:"read"})}).catch(()=>null),S=P?await P.json().catch(()=>({})):{error:`${M1} did not answer`};if(!P?.ok||!S.key){V1(S.error?y1(S.error).text:"refused","error");return}w(`${window.location.origin}${X1}/${_}#${new URLSearchParams({token:S.key}).toString()}`),q((N)=>N+1)},R=async(C)=>{C.preventDefault(),X(!0),W(null);let P=await I1(Q,`/-/${_}/keys`,{method:"POST",body:JSON.stringify({name:F.trim(),scope:Y})}).catch(()=>null);X(!1);let S=P?await P.json().catch(()=>({})):{error:`${M1} did not answer`};if(!P?.ok||!S.key){W(S.error?y1(S.error).text:"refused");return}Z(!1),T({key:S.key,name:F.trim()}),L(""),q((N)=>N+1)},I=async(C)=>{if(!await B0({title:`Revoke ${C.name}?`,body:"Whatever holds it loses this World at once.",action:"Revoke key",danger:!0}))return;let P=await I1(Q,`/-/${_}/keys/${C.id}`,{method:"DELETE"});if(P.ok)V1(`Revoked ${C.name}`);else V1(await J0(P),"error");q((S)=>S+1)};return $.jsxDEV("section",{"aria-labelledby":"keys-head",className:"keys",children:[$.jsxDEV("div",{className:"keys-head",children:[$.jsxDEV("div",{children:[$.jsxDEV("h3",{id:"keys-head",children:"Keys"},void 0,!1,void 0,this),$.jsxDEV("p",{className:"mode",children:"What an app, a script or a CI job holds to reach this World: each named for what holds it and revoked alone. People open the World as themselves; keys are for software."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),c1()?$.jsxDEV("a",{className:"button primary",href:`${c1()}/${encodeURIComponent(_.split("/")[0]??"")}`,children:"Make a key on the platform"},void 0,!1,void 0,this):$.jsxDEV("div",{className:"head-actions",children:[$.jsxDEV("button",{type:"button",onClick:()=>void A(),children:"Share a read-only link"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button",className:"primary",onClick:()=>{W(null),Z(!0)},children:"Make a key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(p1,{load:U,what:"the keys",retry:()=>q((C)=>C+1)},void 0,!1,void 0,this),U.state==="ok"?U.data.keys.length===0?$.jsxDEV("p",{className:"mode",children:"No keys yet. The World's own token opens it too."},void 0,!1,void 0,this):$.jsxDEV("table",{className:"dense","aria-label":"Keys",children:[$.jsxDEV("thead",{children:$.jsxDEV("tr",{children:[$.jsxDEV("th",{children:"Name"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"For"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Access"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Made"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Last used"},void 0,!1,void 0,this),$.jsxDEV("th",{className:"num",children:$.jsxDEV("span",{className:"sr",children:"Actions"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("tbody",{children:U.data.keys.map((C)=>$.jsxDEV("tr",{children:[$.jsxDEV("td",{children:C.name},void 0,!1,void 0,this),$.jsxDEV("td",{children:C.person??$.jsxDEV("span",{className:"mode",title:"It acts as itself: a service",children:"no one: a service"},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:C.scope==="write"?"Read and write":"Read only"},void 0,!1,void 0,this),$.jsxDEV("td",{className:"mode",children:$.jsxDEV("span",{title:x6(C.createdAt),children:m6(C.createdAt)},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{className:"mode",children:C.lastUsedAt?m6(C.lastUsedAt):"never"},void 0,!1,void 0,this),$.jsxDEV("td",{className:"num",children:$.jsxDEV(W_,{label:`More for ${C.name}`,items:[{label:"Revoke…",danger:!0,onSelect:()=>void I(C)}]},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},C.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,$.jsxDEV(s1,{open:G,onClose:()=>{if(!K)Z(!1)},title:"Make a key",footer:$.jsxDEV($.Fragment,{children:[$.jsxDEV("button",{type:"button",onClick:()=>Z(!1),disabled:K,children:"Cancel"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"submit",form:"make-key",disabled:K||!F.trim(),children:K?"Making…":"Make key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:$.jsxDEV("form",{id:"make-key",onSubmit:R,"aria-label":"Make a key",children:[$.jsxDEV("label",{children:["Name ",$.jsxDEV("input",{autoFocus:!0,name:"keyName",value:F,onChange:(C)=>L(C.target.value),placeholder:"ci, staging app…",maxLength:80,required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("label",{children:["Access ",$.jsxDEV("select",{value:Y,onChange:(C)=>H(C.target.value==="read"?"read":"write"),children:[$.jsxDEV("option",{value:"write",children:"Read and write"},void 0,!1,void 0,this),$.jsxDEV("option",{value:"read",children:"Read only"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z?$.jsxDEV("p",{role:"alert",children:z},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV(s1,{open:Boolean(O),onClose:()=>T(null),title:`${O?.name??"The key"} is ready`,footer:$.jsxDEV("button",{type:"button",className:"primary",onClick:()=>T(null),children:"Done"},void 0,!1,void 0,this),children:[$.jsxDEV("p",{className:"mode",children:"Copy it now: it is shown this once. Put it where the app reads its secrets."},void 0,!1,void 0,this),O?$.jsxDEV(p6,{label:"Key",value:O.key,secret:!0},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV(s1,{open:Boolean(B),onClose:()=>w(null),title:"A read-only link",footer:$.jsxDEV("button",{type:"button",className:"primary",onClick:()=>w(null),children:"Done"},void 0,!1,void 0,this),children:[$.jsxDEV("p",{className:"mode",children:"Whoever opens it sees this World's pages and changes nothing. Copy it now: it is shown this once. It is listed under Keys, where revoking it closes the link at once."},void 0,!1,void 0,this),B?$.jsxDEV(p6,{label:"Link",value:B,secret:!0},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var S5=0;function l0({log:_,name:Q}){if(_.length===0)return null;return $.jsxDEV("ul",{className:"narration-log",role:"status","aria-live":"polite",children:_.map((J)=>$.jsxDEV("li",{className:J.ok?"ok":"bad",children:[$.jsxDEV("span",{className:"mode",children:$.jsxDEV(R1,{iso:J.at,time:!0},void 0,!1,void 0,this)},void 0,!1,void 0,this)," ",J.text,J.acts?$.jsxDEV(y_,{name:Q,acts:J.acts},void 0,!1,void 0,this):null]},J.n,!0,void 0,this))},void 0,!1,void 0,this)}function s_(_,Q,J,q){let[U,G]=i.useState(0),Z=U*1e5+Math.floor(J/2),F=w1(Q,`/-/${_}/origin`,Z),L=w1(Q,`/-/${_}/diff`,Z),Y=w1(Q,`/-/${_}/changesets`,Z),[H,K]=i.useState([]),[X,z]=i.useState(null),W=(I,C,P)=>{if(K((S)=>[{ok:I,text:C,at:new Date().toISOString(),n:++S5,...P?.length?{acts:P}:{}},...S].slice(0,8)),!I)V1(C,"error")},O=async(I,C,P)=>{z(I);try{let S=await I1(Q,`/-/${_}/${C}`,P);if(!S.ok){q(S);let N=y1(await P0(S));return W(!1,`${I}: ${N.text}`,N.acts),null}return await S.json()}catch(S){return W(!1,`${I}: the World did not answer (${S instanceof Error?S.message:String(S)})`),null}finally{z(null),G((S)=>S+1)}},T=F.state==="ok"&&F.data.origin?o6(F.data.origin):null,B=L.state==="ok"?L.data.changes.length:null,w=Y.state==="ok"?hZ(Y.data.changesets).sort((I,C)=>I.createdAt.localeCompare(C.createdAt)):[];return{origin:F,diff:L,sets:Y,there:T,changes:B,waiting:w,log:H,busy:X,say:W,send:O,push:async()=>{let I=await O("Push","origin/push",{method:"POST"});if(!I)return;if(I.pushed.length===0){W(!0,"Nothing to push: every changeset is already at the remote.");return}for(let C of I.pushed){let P=C.receipts??[],S=P.filter((p)=>p.status==="replayed").length,N=P.filter((p)=>p.status==="confirmed").length,v=P.filter((p)=>p.status==="failed").length,j=C.outcome==="applied"&&v===0;if(C.outcome==="refused"){W(!1,`Push of ${C.changeset} was refused${C.refusal?.length?`: ${C.refusal.map((p)=>y1(p).text).join("; ")}`:""}.`);continue}let m=[`${S} of ${k1(P.length,"change")} replayed there`,...N?[`${N} performed at the vendor by the remote`]:[],...v?[`${v} failed`]:[]];W(j,`${C.outcome==="partial"?"Partly pushed":"Pushed"} ${C.changeset} to ${T??"the remote"}: ${m.join("; ")}${C.refusal?.length?` (${C.refusal.map((p)=>y1(p).text).join("; ")})`:""}.`)}},pull:async()=>{let I=await O("Pull","origin/pull",{method:"POST"});if(!I)return;let C=Object.entries(I.appended).filter(([,S])=>S>0),P=I.rebased.flatMap((S)=>S.conflicts.map((N)=>`${H1(S.twin)} ${N.subject.type}:${N.subject.id} ${N.field}`));W(P.length===0,`Pulled from ${T??"the remote"}: ${C.length?C.map(([S,N])=>`${k1(N,"entry")} at ${H1(S)}`).join(", "):"nothing new"}${P.length?`; conflicts at ${P.join(", ")}`:""}.`)}}}function JF({name:_,token:Q,canWrite:J,tick:q,refused:U}){let{origin:G,there:Z,changes:F,log:L,busy:Y,say:H,send:K,push:X,pull:z}=s_(_,Q,q,U),[W,O]=i.useState(""),[T,B]=i.useState(""),[w,A]=i.useState(!1),R=async(C)=>{C.preventDefault();let P=await K("Name the remote","origin",{method:"PUT",body:JSON.stringify({url:W.trim(),token:T.trim()})});if(P){let S=Object.values(P.appended??{}).reduce((N,v)=>N+v,0);H(!0,`The remote is ${o6(P.origin)}: its history came in (${k1(S,"entry")}).`),B(""),A(!1)}},I=!J?"This session reads the World; it changes nothing":null;return $.jsxDEV($.Fragment,{children:[$.jsxDEV("div",{className:"block remote",children:[$.jsxDEV("div",{className:"block-head",children:[$.jsxDEV("h3",{children:"Origin"},void 0,!1,void 0,this),J?$.jsxDEV("button",{type:"button",onClick:()=>{O(Z??""),A(!w)},"aria-expanded":w,children:Z?"Change the remote…":"Name a remote…"},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("div",{className:"pad",children:[G.state==="ok"?Z?$.jsxDEV("p",{children:[$.jsxDEV("code",{className:"big",children:Z},void 0,!1,void 0,this),G.data.origin?.fetchedAt?$.jsxDEV("span",{className:"mode",children:[" · last fetched ",$.jsxDEV(R1,{iso:G.data.origin.fetchedAt},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this):$.jsxDEV("p",{children:"No remote — this World keeps its default data. Name one to push its changesets to a shared World and pull what others pushed there."},void 0,!1,void 0,this):$.jsxDEV(p1,{load:G,what:"the remote",lines:1},void 0,!1,void 0,this),w?$.jsxDEV("form",{className:"stack origin-form",onSubmit:(C)=>void R(C),"aria-label":"Name the remote",children:[$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"The World's address"},void 0,!1,void 0,this),$.jsxDEV("input",{name:"originUrl",value:W,onChange:(C)=>O(C.target.value),placeholder:"https://worlds.example.com/acme/team",required:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"A key or token that opens it"},void 0,!1,void 0,this),$.jsxDEV("input",{name:"originToken",type:"password",value:T,onChange:(C)=>B(C.target.value),required:!0,autoComplete:"off"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("p",{className:"mode",children:"Naming it brings its history in. Your pushes are recorded there as whoever this key was made for, or as the key itself."},void 0,!1,void 0,this),$.jsxDEV("div",{className:"row-actions",children:[$.jsxDEV("button",{type:"submit",className:"primary",disabled:Y!==null,children:Y==="Name the remote"?"Bringing its history in…":"Save the remote"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button",onClick:()=>A(!1),children:"Cancel"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(l0,{log:L,name:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function $F({name:_,token:Q,canWrite:J,refused:q}){let[U,G]=i.useState(0),Z=w1(Q,`/-/${_}/twins`,U),F=w1(Q,`/-/${_}/links`,U),L=w1(Q,`/-/${_}/requests?hours=24`,U),[Y,H]=i.useState({}),[K,X]=i.useState(null),[z,W]=i.useState(""),[O,T]=i.useState(!1),[B,w]=i.useState([]),A=(N,v,j)=>{if(w((m)=>[{ok:N,text:v,at:new Date().toISOString(),n:++S5,...j?.length?{acts:j}:{}},...m].slice(0,6)),!N)V1(v,"error")},R=F.state==="ok"?Object.keys(F.data.links).sort():[];i.useEffect(()=>{let N=!0;return Promise.all(R.map(async(v)=>{let j=await I1(Q,`/-/${_}/twins/${v}/credential`).catch(()=>null),m=j?.ok?await j.json():null;return[v,m?.credential??null]})).then((v)=>{if(N)H(Object.fromEntries(v))}),()=>{N=!1}},[_,Q,R.join(","),U]);let I=async(N)=>{if(N.preventDefault(),!K||!z)return;T(!0);let v=await I1(Q,`/-/${_}/twins/${K.vendor}/credential`,{method:"PUT",body:z,headers:{"content-type":"text/plain"}}).catch(()=>null);if(T(!1),!v){A(!1,`Seal ${K.vendor}: ${M1} did not answer`);return}if(!v.ok){q(v);let m=y1(await P0(v));A(!1,`Seal ${H1(K.vendor)}: ${m.text}`,m.acts);return}let j=await v.json().catch(()=>({}));A(!0,`Sealed a credential for ${H1(K.vendor)}${j.fingerprint?` (${j.fingerprint})`:""}: it opens for ${j.boundTo??K.to} only, and is never shown again.`),W(""),X(null),G((m)=>m+1)},C=async(N)=>{if(!await B0({title:`Remove the link ${N}?`,body:`Requests to ${W2}/${_}/${N}/… stop being forwarded to ${F.state==="ok"?F.data.links[N]?.origin:"its origin"}.`,action:"Remove link",danger:!0}))return;let v=await I1(Q,`/-/${_}/links/${N}`,{method:"DELETE"}).catch(()=>null);if(!v?.ok){if(v)q(v);A(!1,`Remove ${N}: ${v?await J0(v):"the World did not answer"}`);return}A(!0,`Removed the link ${N}.`),G((j)=>j+1)},P=(N)=>N?$.jsxDEV($.Fragment,{children:[$.jsxDEV("span",{className:"badge rooted",children:"sealed"},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:[N.fingerprint?$.jsxDEV("code",{children:N.fingerprint},void 0,!1,void 0,this):null," · ",$.jsxDEV(R1,{iso:N.placedAt},void 0,!1,void 0,this),N.sealedBy?` · by ${N.sealedBy==="vault"?"the vault":"the host's key"}`:""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):$.jsxDEV("span",{className:"mode",children:"none"},void 0,!1,void 0,this),S=Z.state==="ok"?Z.data.twins:[];return $.jsxDEV($.Fragment,{children:[$.jsxDEV("p",{className:"lede",children:"A real vendor's credential lives in one place, sealed: beside this World, bound to where it goes. It is never readable back; this page says only that one is sealed, when, by what, and for where."},void 0,!1,void 0,this),$.jsxDEV(l0,{log:B,name:_},void 0,!1,void 0,this),$.jsxDEV("section",{className:"block","aria-labelledby":"creds-head",children:[$.jsxDEV("div",{className:"block-head",children:$.jsxDEV("h3",{id:"creds-head",children:"Vendors"},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV(p1,{load:Z,what:"the vendors"},void 0,!1,void 0,this),Z.state==="ok"?$.jsxDEV("table",{className:"dense","aria-label":"Credentials by vendor",children:[$.jsxDEV("thead",{children:$.jsxDEV("tr",{children:[$.jsxDEV("th",{children:"Vendor"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Credential"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Bound to"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Real service"},void 0,!1,void 0,this),J?$.jsxDEV("th",{className:"num",children:$.jsxDEV("span",{className:"sr",children:"Actions"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("tbody",{children:S.map((N)=>$.jsxDEV("tr",{children:[$.jsxDEV("td",{children:$.jsxDEV("span",{className:"vendor-cell",children:[$.jsxDEV(u1,{vendor:N.twin},void 0,!1,void 0,this),H1(N.twin)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:P(N.credential)},void 0,!1,void 0,this),$.jsxDEV("td",{children:N.credential?.boundTo?$.jsxDEV("code",{children:N.credential.boundTo},void 0,!1,void 0,this):$.jsxDEV("span",{className:"mode",children:"—"},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:N.root?.url?$.jsxDEV("code",{children:N.root.url},void 0,!1,void 0,this):$.jsxDEV("span",{className:"mode",children:"none: a stand-in"},void 0,!1,void 0,this)},void 0,!1,void 0,this),J?$.jsxDEV("td",{className:"num",children:$.jsxDEV("button",{type:"button",disabled:!N.root?.url,title:N.root?.url?`Seal ${H1(N.twin)}'s real credential for ${N.root.url}`:"Connect it to its real service first (Settings › Real services): a credential is sealed for where it goes",onClick:()=>{W(""),X({vendor:N.twin,to:N.root.url})},children:N.credential?"Replace…":"Seal a credential…"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},N.twin,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,Z.state==="ok"&&S.every((N)=>!N.root?.url)?$.jsxDEV("p",{className:"mode pad",children:"No vendor here has a real service behind it, so none holds a credential. Connect one in Settings › Real services; its credential is sealed here."},void 0,!1,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV("section",{className:"block","aria-labelledby":"links-head",children:[$.jsxDEV("div",{className:"block-head",children:[$.jsxDEV("h3",{id:"links-head",children:"Links"},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:"a vendor with no twin, forwarded with its sealed credential"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV(p1,{load:F,what:"the links"},void 0,!1,void 0,this),F.state==="ok"&&R.length===0?$.jsxDEV("p",{className:"mode pad",children:["No links. A link forwards requests for a vendor with no twin here, at ",$.jsxDEV("code",{children:[W2,"/",_,"/<link>/…"]},void 0,!0,void 0,this),", to that vendor's real API with the credential sealed for it."]},void 0,!0,void 0,this):null,R.length?$.jsxDEV("table",{className:"dense","aria-label":"Links",children:[$.jsxDEV("thead",{children:$.jsxDEV("tr",{children:[$.jsxDEV("th",{children:"Link"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Origin"},void 0,!1,void 0,this),$.jsxDEV("th",{className:"num",children:"Requests, 24h"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Credential"},void 0,!1,void 0,this),J?$.jsxDEV("th",{className:"num",children:$.jsxDEV("span",{className:"sr",children:"Actions"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("tbody",{children:R.map((N)=>{let v=F.state==="ok"?F.data.links[N].origin:"",j=L.state==="ok"?L.data.twins.find((m)=>m.twin===N):void 0;return $.jsxDEV("tr",{children:[$.jsxDEV("td",{children:$.jsxDEV("b",{children:N},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:$.jsxDEV("code",{children:v},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{className:"num",children:j?$.jsxDEV("span",{title:Object.entries(j.byStatus).map(([m,p])=>`${m}: ${p}`).join(" · "),children:j.requests},void 0,!1,void 0,this):$.jsxDEV("span",{className:"mode",children:"—"},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:[P(Y[N]??null),Y[N]?.boundTo?$.jsxDEV("div",{className:"mode",children:["bound to ",$.jsxDEV("code",{children:Y[N].boundTo},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),J?$.jsxDEV("td",{className:"num row-actions",children:[$.jsxDEV("button",{type:"button",onClick:()=>{W(""),X({vendor:N,to:v})},children:Y[N]?"Replace…":"Seal a credential…"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button",onClick:()=>void C(N),children:"Remove…"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},N,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this),$.jsxDEV(s1,{open:Boolean(K),onClose:()=>{if(!O)X(null)},title:`Seal ${K?H1(K.vendor):""}'s credential`,footer:$.jsxDEV($.Fragment,{children:[$.jsxDEV("button",{type:"button",onClick:()=>X(null),disabled:O,children:"Cancel"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"submit",form:"seal-credential",className:"primary",disabled:O||!z,children:O?"Sealing…":"Seal it"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:$.jsxDEV("form",{id:"seal-credential",className:"stack",onSubmit:(N)=>void I(N),children:[$.jsxDEV("p",{className:"mode",children:["It is sealed for ",$.jsxDEV("code",{children:K?.to},void 0,!1,void 0,this)," and opens there only. It is never shown again, here or anywhere."]},void 0,!0,void 0,this),$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"The real key"},void 0,!1,void 0,this),$.jsxDEV("input",{name:"credential",type:"password",value:z,onChange:(N)=>W(N.target.value),autoComplete:"off",required:!0,autoFocus:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function qF({name:_,token:Q,admin:J,canWrite:q,refused:U,onRemoved:G,only:Z}){let F=(u)=>!Z||Z===u,[L,Y]=i.useState(0),H=w1(Q,`/-/${_}/twins`,L),K=w1(Q,`/-/${_}/checks`,L),[X,z]=i.useState(0),W=w1(Q,`/-/${_}/clock`,X),[O,T]=i.useState([]),[B,w]=i.useState(null),[A,R]=i.useState(null),[I,C]=i.useState(""),[P,S]=i.useState("gated"),[N,v]=i.useState(!1),j=(u,h,f)=>{if(T((y)=>[{ok:u,text:h,at:new Date().toISOString(),n:++S5,...f?.length?{acts:f}:{}},...y].slice(0,6)),!u)V1(h,"error")},m=async(u,h,f)=>{let y=await I1(Q,h,f).catch(()=>null);if(!y)return j(!1,`${u}: the World did not answer`),!1;if(!y.ok){U(y);let g=y1(await P0(y));return j(!1,`${u}: ${g.text}`,g.acts),!1}return j(!0,`${u}: done.`),Y((g)=>g+1),!0},p=async(u)=>{if(u.preventDefault(),!A)return;v(!0);let h=A.root??{},f=await m(I.trim()?`Connect ${H1(A.twin)} to ${I.trim()}`:`Disconnect ${H1(A.twin)}`,`/-/${_}/twins/${A.twin}/root`,{method:"PUT",body:JSON.stringify(I.trim()?{...h,url:I.trim(),deploy:P}:null)});if(v(!1),f)R(null)},k=async()=>{if(!await B0({title:`Rotate the tokens of ${_}?`,body:"Every app, script and person holding the current tokens loses access at once. The new ones are shown once.",action:"Rotate tokens",danger:!0}))return;let u=await I1(J,`/-/worlds/${_}/rotate`,{method:"POST"});if(u.ok)w(await u.json()),j(!0,"Rotated: the new tokens are shown once, below.");else j(!1,`Rotate: ${await J0(u)}`)},D=async()=>{if(!await B0({title:`Remove ${_}?`,body:"The host stops serving it and its whole history goes with it. This cannot be undone.",action:"Remove World",danger:!0,typed:_}))return;let u=await I1(J,`/-/worlds/${_}`,{method:"DELETE"}).catch((h)=>h);if(u instanceof Error){j(!1,`Remove: the host did not answer (${u.message})`);return}if(u.ok)G();else j(!1,`Remove: ${await J0(u)}`)},V=H.state==="ok"?H.data.twins:[],E={gated:"gated: a person deploys an approved changeset",auto:"auto: a push deploys at once",hold:"hold: nothing deploys"};return $.jsxDEV($.Fragment,{children:[$.jsxDEV(l0,{log:O,name:_},void 0,!1,void 0,this),F("access")?$.jsxDEV($.Fragment,{children:[$.jsxDEV("h3",{className:"settings-head",children:"Access"},void 0,!1,void 0,this),q?$.jsxDEV(QF,{name:_,token:Q},void 0,!1,void 0,this):$.jsxDEV("p",{className:"mode",children:"This session reads the World: its keys are managed by whoever holds its token."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,F("services")?$.jsxDEV($.Fragment,{children:[$.jsxDEV("h3",{className:"settings-head",children:"Real services"},void 0,!1,void 0,this),$.jsxDEV("p",{className:"mode",children:[V.some((u)=>u.root?.url)?null:"Every vendor here is a stand-in. ","Connect a vendor to its real service to read the real state into this World; its real credential is sealed in the Vault, and an approved changeset deploys there by its policy."]},void 0,!0,void 0,this),$.jsxDEV(p1,{load:H,what:"the vendors"},void 0,!1,void 0,this),H.state==="ok"?$.jsxDEV("div",{className:"block",children:$.jsxDEV("table",{className:"dense","aria-label":"Real services",children:[$.jsxDEV("thead",{children:$.jsxDEV("tr",{children:[$.jsxDEV("th",{children:"Vendor"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Real service"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Deploy policy"},void 0,!1,void 0,this),$.jsxDEV("th",{children:"Last read from it"},void 0,!1,void 0,this),q?$.jsxDEV("th",{className:"num",children:$.jsxDEV("span",{className:"sr",children:"Actions"},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("tbody",{children:V.map((u)=>{let h=u.root;return $.jsxDEV("tr",{children:[$.jsxDEV("td",{children:$.jsxDEV("span",{className:"vendor-cell",children:[$.jsxDEV(u1,{vendor:u.twin},void 0,!1,void 0,this),$.jsxDEV("a",{href:`${X1}/${_}/${u.twin}`,title:`Its log and stored state · ${u.position??0} entries`,onClick:(f)=>{f.preventDefault(),T1([..._.split("/"),u.twin])},children:H1(u.twin)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{children:h?.url?$.jsxDEV("code",{children:h.url},void 0,!1,void 0,this):$.jsxDEV("span",{className:"mode",children:"not connected"},void 0,!1,void 0,this)},void 0,!1,void 0,this),$.jsxDEV("td",{className:"mode",children:h?.url?E[h.deploy??""]??h.deploy??"—":"—"},void 0,!1,void 0,this),$.jsxDEV("td",{children:u.refresh?.failed?$.jsxDEV("span",{role:"alert",children:["failed ×",u.refresh.failed.count??1,": ",u.refresh.failed.reason??""]},void 0,!0,void 0,this):h?.url?x6(u.refresh?.observedAt??u.refresh?.at):$.jsxDEV("span",{className:"mode",children:"—"},void 0,!1,void 0,this)},void 0,!1,void 0,this),q?$.jsxDEV("td",{className:"num row-actions",children:[$.jsxDEV("button",{type:"button",onClick:()=>{C(h?.url??""),S(h?.deploy==="auto"||h?.deploy==="hold"?h.deploy:"gated"),R(u)},children:h?.url?"Change…":"Connect…"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"button",disabled:!h?.url,title:h?.url?"Read the real service's current state into this World":"Connect it first",onClick:()=>void B0({title:`Read ${H1(u.twin)} now?`,body:`The real ${H1(u.twin)}'s current state is read into this World. Nothing is written to ${H1(u.twin)}.`,action:"Read from it"}).then((f)=>{if(f)m(`Read from ${H1(u.twin)}`,`/-/${_}/twins/${u.twin}/refresh`,{method:"POST"})}),children:"Read from it"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},u.twin,!0,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null,F("clock")?$.jsxDEV($.Fragment,{children:[$.jsxDEV("h3",{className:"settings-head",children:"Clock"},void 0,!1,void 0,this),$.jsxDEV("p",{className:"mode",children:"The instant every vendor here stamps from. Set it and move it forward to see what happens later: renewals, expiries, scheduled sends."},void 0,!1,void 0,this),$.jsxDEV(xZ,{name:_,token:Q,clock:W,canWrite:q,onChanged:()=>z((u)=>u+1),refused:U,open:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,F("checks")?$.jsxDEV($.Fragment,{children:[$.jsxDEV("h3",{className:"settings-head",children:"Checks"},void 0,!1,void 0,this),$.jsxDEV("p",{className:"mode",children:"JavaScript the World runs over every change before it is performed (a changeset's Verify runs them too)."},void 0,!1,void 0,this),$.jsxDEV(p1,{load:K,what:"the checks"},void 0,!1,void 0,this),K.state==="ok"?K.data.checks.length===0?$.jsxDEV("p",{className:"mode",children:"No checks: every change is performed as it comes."},void 0,!1,void 0,this):$.jsxDEV("div",{className:"block",children:$.jsxDEV("table",{className:"dense","aria-label":"Checks",children:$.jsxDEV("tbody",{children:K.data.checks.map((u)=>$.jsxDEV("tr",{children:$.jsxDEV("td",{children:$.jsxDEV("code",{children:u},void 0,!1,void 0,this)},void 0,!1,void 0,this)},u,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this):null]},void 0,!0,void 0,this):null,J&&!Z?$.jsxDEV("div",{className:"danger",role:"region","aria-label":"Danger zone",children:[$.jsxDEV("h3",{children:"Danger zone"},void 0,!1,void 0,this),B?$.jsxDEV("p",{role:"status",children:["token ",$.jsxDEV("code",{children:B.token},void 0,!1,void 0,this)," · read token ",$.jsxDEV("code",{children:B.readToken},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null,$.jsxDEV("p",{children:[$.jsxDEV("button",{type:"button",onClick:()=>void k(),children:"Rotate tokens"},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:"New tokens for this World; every app, script and browser using the old ones is signed out."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("p",{children:[$.jsxDEV("button",{type:"button",onClick:()=>void D(),children:"Remove world"},void 0,!1,void 0,this)," ",$.jsxDEV("span",{className:"mode",children:"Deletes this World and everything in it."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):null,$.jsxDEV(s1,{open:Boolean(A),onClose:()=>{if(!N)R(null)},title:`Connect ${A?H1(A.twin):""} to its real service`,footer:$.jsxDEV($.Fragment,{children:[$.jsxDEV("button",{type:"button",onClick:()=>R(null),disabled:N,children:"Cancel"},void 0,!1,void 0,this),$.jsxDEV("button",{type:"submit",form:"connect-root",className:"primary",disabled:N,children:N?"Saving…":I.trim()?"Connect":"Disconnect"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),children:$.jsxDEV("form",{id:"connect-root",className:"stack",onSubmit:(u)=>void p(u),children:[$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"The real service's API address"},void 0,!1,void 0,this),$.jsxDEV("input",{name:"rootUrl",value:I,onChange:(u)=>C(u.target.value),placeholder:"https://api.openai.com",autoFocus:!0},void 0,!1,void 0,this),$.jsxDEV("span",{className:"mode",children:"Empty disconnects it."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),$.jsxDEV("label",{children:[$.jsxDEV("span",{children:"Deploy policy"},void 0,!1,void 0,this),$.jsxDEV("select",{name:"rootDeploy",value:P,onChange:(u)=>S(u.target.value==="auto"?"auto":u.target.value==="hold"?"hold":"gated"),children:["gated","auto","hold"].map((u)=>$.jsxDEV("option",{value:u,children:E[u]},u,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function pB(){return $.jsxDEV($.Fragment,{children:[$.jsxDEV(IZ,{},void 0,!1,void 0,this),$.jsxDEV(z_,{},void 0,!1,void 0,this),$.jsxDEV(L_,{},void 0,!1,void 0,this),$.jsxDEV(Y_,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}export{gB as openAt,N5 as ROOT,pB as ConsolePage};
|