boxglow 0.1.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3404 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=N(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(ee(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ne=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function re(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,ne)}catch(e){ne(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ie(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else re(ie.bind(null,e))}var F={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ie,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=re,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),m=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),ee=Symbol.for(`react.profiler`),N=Symbol.for(`react.consumer`),P=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),ne=Symbol.for(`react.suspense`),re=Symbol.for(`react.suspense_list`),ie=Symbol.for(`react.memo`),F=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),oe=Symbol.for(`react.legacy_hidden`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.for(`react.view_transition`),le=Symbol.for(`react.recoverable`),ue=Symbol.iterator;function de(e){return typeof e!=`object`||!e?null:(e=ue&&e[ue]||e[`@@iterator`],typeof e==`function`?e:null)}var fe=Symbol.for(`react.client.reference`);function pe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case ee:return`Profiler`;case M:return`StrictMode`;case ne:return`Suspense`;case re:return`SuspenseList`;case ae:return`Activity`;case ce:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case P:return e.displayName||`Context`;case N:return(e._context.displayName||`Context`)+`.Consumer`;case te:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ie:return t=e.displayName||null,t===null?pe(e.type)||`Memo`:t;case F:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var me=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ge=[],_e=-1;function ve(e){return{current:e}}function ye(e){0>_e||(e.current=ge[_e],ge[_e]=null,_e--)}function be(e,t){_e++,ge[_e]=e.current,e.current=t}var xe=ve(null),Se=ve(null),Ce=ve(null),we=ve(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?dp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=dp(t),e=fp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,be(we,e)),t=xe.current;var n=fp(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function Oe(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),sh._currentValue=he)}var ke,Ae;function je(e){if(ke===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ke=t&&t[1]||``,Ae=-1<e.stack.indexOf(`
2
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
- `+ke+e+Ae}var Me=!1;function Ne(e,t){if(!e||Me)return``;Me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
- `),l=s.split(`
5
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?je(n):``}function Pe(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je(`Lazy`);case 13:return e.child!==t&&t!==null?je(`Suspense Fallback`):je(`Suspense`);case 19:return je(`SuspenseList`);case 0:case 15:return Ne(e.type,!1);case 11:return Ne(e.type.render,!1);case 1:return Ne(e.type,!0);case 31:return je(`Activity`);case 30:return je(`ViewTransition`);default:return``}}function Fe(e){try{var t=``,n=null;do t+=Pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
- Error generating stack: `+e.message+`
8
- `+e.stack}}var Ie=Object.prototype.hasOwnProperty,Le=t.unstable_scheduleCallback,Re=t.unstable_cancelCallback,ze=t.unstable_shouldYield,Be=t.unstable_requestPaint,Ve=t.unstable_now,He=t.unstable_getCurrentPriorityLevel,Ue=t.unstable_ImmediatePriority,We=t.unstable_UserBlockingPriority,Ge=t.unstable_NormalPriority,Ke=t.unstable_LowPriority,qe=t.unstable_IdlePriority,Je=t.log,Ye=t.unstable_setDisableYieldValue,Xe=null,Ze=null;function Qe(e){if(typeof Je==`function`&&Ye(e),Ze&&typeof Ze.setStrictMode==`function`)try{Ze.setStrictMode(Xe,e)}catch{}}var $e=Math.clz32?Math.clz32:nt,et=Math.log,tt=Math.LN2;function nt(e){return e>>>=0,e===0?32:31-(et(e)/tt|0)|0}var rt=256,it=262144,at=4194304;function ot(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function st(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ot(n))):i=ot(o):i=ot(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ot(n))):i=ot(o)):i=ot(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ct(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function lt(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-$e(n),i=1<<r;t|=e[r],n&=~i}return t}function ut(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function dt(){var e=at;return at<<=1,!(at&62914560)&&(at=4194304),e}function ft(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-$e(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ht(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ht(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-$e(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$e(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function _t(e,t){var n=t&-t;return n=n&42?1:vt(n),(n&(e.suspendedLanes|t))===0?n:0}function vt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function yt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function bt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function xt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var St=Math.random().toString(36).slice(2),Ct=`__reactFiber$`+St,wt=`__reactProps$`+St,Tt=`__reactContainer$`+St,Et=`__reactEvents$`+St,Dt=`__reactListeners$`+St,Ot=`__reactHandles$`+St,kt=`__reactResources$`+St,At=`__reactMarker$`+St,jt=`__reactLoad$`+St;function Mt(e){delete e[Ct],delete e[wt],delete e[Dt],delete e[Ot]}function Nt(e){var t;if(t=e[Ct])return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pm(e);e!==null;){if(n=e[Ct])return n;e=pm(e)}return t}e=n,n=e.parentNode}return null}function Pt(e){if(e=e[Ct]||e[Tt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ft(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function It(e){var t=e[kt];return t||=e[kt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Lt(e){e[At]=!0}function Rt(e){e[jt]=void 0}var zt=new Set,Bt={};function Vt(e,t){Ht(e,t),Ht(e+`Capture`,t)}function Ht(e,t){for(Bt[e]=t,e=0;e<t.length;e++)zt.add(t[e])}var Ut=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]*$`),Wt={},Gt={};function Kt(e){return Ie.call(Gt,e)?!0:Ie.call(Wt,e)?!1:Ut.test(e)?Gt[e]=!0:(Wt[e]=!0,!1)}var R=!1;function qt(){var e=R;return R=!1,e}function Jt(e,t,n){if(Kt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Yt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Xt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Zt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Qt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function $t(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function en(e){if(!e._valueTracker){var t=Qt(e)?`checked`:`value`;e._valueTracker=$t(e,t,``+e[t])}}function tn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Qt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var nn=/[\n"\\]/g;function rn(e){return e.replace(nn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function an(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Zt(t)):e.value!==``+Zt(t)&&(e.value=``+Zt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):sn(e,Zt(n)):o===`number`&&e.value==t?sn(e,Zt(e.value)):sn(e,Zt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Zt(s):e.removeAttribute(`name`)}function on(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){en(e);return}n=n==null?``:``+Zt(n),t=t==null?n:``+Zt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),en(e)}function sn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function cn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Zt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ln(e,t,n){if(t!=null&&(t=``+Zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Zt(n)}function un(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(me(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Zt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),en(e)}function dn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function pn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||fn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function mn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,R=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(pn(e,a,r),R=!0)}else for(var o in t)t.hasOwnProperty(o)&&pn(e,o,t[o])}function hn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var gn=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`],[`maskType`,`mask-type`],[`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`]]),_n=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function vn(e){return _n.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function yn(){}var bn=null;function xn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sn=null,Cn=null;function wn(e){var t=Pt(e);if(t&&(e=t.stateNode)){var n=e[wt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(an(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+rn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[wt]||null;if(!a)throw Error(i(90));an(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&tn(r)}break a;case`textarea`:ln(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&cn(e,!!n.multiple,t,!1)}}}var Tn=!1;function En(e,t,n){if(Tn)return e(t,n);Tn=!0;try{return e(t)}finally{if(Tn=!1,(Sn!==null||Cn!==null)&&(Hd(),Sn&&(t=Sn,e=Cn,Cn=Sn=null,wn(t),e)))for(t=0;t<e.length;t++)wn(e[t])}}function Dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[wt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var On=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,kn=!1;if(On)try{var An={};Object.defineProperty(An,"passive",{get:function(){kn=!0}}),window.addEventListener(`test`,An,An),window.removeEventListener(`test`,An,An)}catch{kn=!1}var jn=null,Mn=null,Nn=null;function Pn(){if(Nn)return Nn;var e,t=Mn,n=t.length,r,i=`value`in jn?jn.value:jn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Nn=i.slice(e,1<r?1-r:void 0)}function Fn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function In(){return!0}function Ln(){return!1}function Rn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?In:Ln,this.isPropagationStopped=Ln,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=In)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=In)},persist:function(){},isPersistent:In}),t}var zn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bn=Rn(zn),Vn=D({},zn,{view:0,detail:0}),Hn=Rn(Vn),Un,Wn,Gn,Kn=D({},Vn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Gn&&(Gn&&e.type===`mousemove`?(Un=e.screenX-Gn.screenX,Wn=e.screenY-Gn.screenY):Wn=Un=0,Gn=e),Un)},movementY:function(e){return`movementY`in e?e.movementY:Wn}}),qn=Rn(Kn),Jn=Rn(D({},Kn,{dataTransfer:0})),Yn=Rn(D({},Vn,{relatedTarget:0})),Xn=Rn(D({},zn,{animationName:0,elapsedTime:0,pseudoElement:0})),Zn=Rn(D({},zn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Qn=Rn(D({},zn,{data:0})),$n={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},er={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`},tr={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function nr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=tr[e])?!!t[e]:!1}function rr(){return nr}var ir=Rn(D({},Vn,{key:function(e){if(e.key){var t=$n[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Fn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?er[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rr,charCode:function(e){return e.type===`keypress`?Fn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Fn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),ar=Rn(D({},Kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),or=Rn(D({},zn,{submitter:0})),sr=Rn(D({},Vn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rr})),cr=Rn(D({},zn,{propertyName:0,elapsedTime:0,pseudoElement:0})),lr=Rn(D({},Kn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),ur=Rn(D({},zn,{newState:0,oldState:0,source:0})),dr=[9,13,27,32],fr=On&&`CompositionEvent`in window,pr=null;On&&`documentMode`in document&&(pr=document.documentMode);var mr=On&&`TextEvent`in window&&!pr,hr=On&&(!fr||pr&&8<pr&&11>=pr),gr=` `,_r=!1;function vr(e,t){switch(e){case`keyup`:return dr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function yr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var br=!1;function xr(e,t){switch(e){case`compositionend`:return yr(t);case`keypress`:return t.which===32?(_r=!0,gr):null;case`textInput`:return e=t.data,e===gr&&_r?null:e;default:return null}}function Sr(e,t){if(br)return e===`compositionend`||!fr&&vr(e,t)?(e=Pn(),Nn=Mn=jn=null,br=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return hr&&t.locale!==`ko`?null:t.data;default:return null}}var Cr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Cr[e.type]:t===`textarea`}function Tr(e,t,n,r){Sn?Cn?Cn.push(r):Cn=[r]:Sn=r,t=Jf(t,`onChange`),0<t.length&&(n=new Bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Er=null,Dr=null;function Or(e){Vf(e,0)}function kr(e){if(tn(Ft(e)))return e}function Ar(e,t){if(e===`change`)return t}var jr=!1;if(On){var Mr;if(On){var Nr=`oninput`in document;if(!Nr){var Pr=document.createElement(`div`);Pr.setAttribute(`oninput`,`return;`),Nr=typeof Pr.oninput==`function`}Mr=Nr}else Mr=!1;jr=Mr&&(!document.documentMode||9<document.documentMode)}function Fr(){Er&&(Er.detachEvent(`onpropertychange`,Ir),Dr=Er=null)}function Ir(e){if(e.propertyName===`value`&&kr(Dr)){var t=[];Tr(t,Dr,e,xn(e)),En(Or,t)}}function Lr(e,t,n){e===`focusin`?(Fr(),Er=t,Dr=n,Er.attachEvent(`onpropertychange`,Ir)):e===`focusout`&&Fr()}function Rr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return kr(Dr)}function zr(e,t){if(e===`click`)return kr(t)}function Br(e,t){if(e===`input`||e===`change`)return kr(t)}function Vr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Hr=typeof Object.is==`function`?Object.is:Vr;function Ur(e,t){if(Hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ie.call(t,i)||!Hr(e[i],t[i]))return!1}return!0}function Wr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Gr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kr(e,t){var n=Gr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Gr(n)}}function qr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wr(e.document)}return t}function Yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Xr=On&&`documentMode`in document&&11>=document.documentMode,Zr=null,Qr=null,$r=null,ei=!1;function ti(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ei||Zr==null||Zr!==Wr(r)||(r=Zr,`selectionStart`in r&&Yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$r&&Ur($r,r)||($r=r,r=Jf(Qr,`onSelect`),0<r.length&&(t=new Bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function ni(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ri={animationend:ni(`Animation`,`AnimationEnd`),animationiteration:ni(`Animation`,`AnimationIteration`),animationstart:ni(`Animation`,`AnimationStart`),transitionrun:ni(`Transition`,`TransitionRun`),transitionstart:ni(`Transition`,`TransitionStart`),transitioncancel:ni(`Transition`,`TransitionCancel`),transitionend:ni(`Transition`,`TransitionEnd`)},ii={},ai={};On&&(ai=document.createElement(`div`).style,`AnimationEvent`in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),`TransitionEvent`in window||delete ri.transitionend.transition);function oi(e){if(ii[e])return ii[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ai)return ii[e]=t[n];return e}var si=oi(`animationend`),ci=oi(`animationiteration`),li=oi(`animationstart`),ui=oi(`transitionrun`),di=oi(`transitionstart`),fi=oi(`transitioncancel`),pi=oi(`transitionend`),mi=new Map,hi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);hi.push(`scrollEnd`);function gi(e,t){mi.set(e,t),Vt(t,[e])}var _i=0;function vi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Cd.identifierPrefix;var n=_i++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function yi(e){if(e==null||typeof e==`string`)return e;var t=null,n=jd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function bi(e,t){return e=yi(e),t=yi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var xi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Si=[],Ci=0,wi=0;function Ti(){for(var e=Ci,t=wi=Ci=0;t<e;){var n=Si[t];Si[t++]=null;var r=Si[t];Si[t++]=null;var i=Si[t];Si[t++]=null;var a=Si[t];if(Si[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ki(n,i,a)}}function Ei(e,t,n,r){Si[Ci++]=e,Si[Ci++]=t,Si[Ci++]=n,Si[Ci++]=r,wi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Di(e,t,n,r){return Ei(e,t,n,r),Ai(e)}function Oi(e,t){return Ei(e,null,null,t),Ai(e)}function ki(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-$e(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ai(e){if(50<Md)throw Md=0,Nd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ji={};function Mi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ni(e,t,n,r){return new Mi(e,t,n,r)}function Pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fi(e,t){var n=e.alternate;return n===null?(n=Ni(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ii(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Li(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Pi(r)&&(s=1);else if(typeof r==`string`)s=Jm(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ae:return e=Ni(31,n,t,a),e.elementType=ae,e.lanes=o,e;case j:return Ri(n.children,a,o,t);case M:s=8,a|=24;break;case ee:return e=Ni(12,n,t,a|2),e.elementType=ee,e.lanes=o,e;case ne:return e=Ni(13,n,t,a),e.elementType=ne,e.lanes=o,e;case re:return e=Ni(19,n,t,a),e.elementType=re,e.lanes=o,e;case oe:case ce:return e=a|32,e=Ni(30,n,t,e),e.elementType=ce,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case P:s=10;break a;case N:s=9;break a;case te:s=11;break a;case ie:s=14;break a;case F:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ni(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ri(e,t,n,r){return e=Ni(7,e,r,t),e.lanes=n,e}function zi(e,t,n){return e=Ni(6,e,null,t),e.lanes=n,e}function Bi(e){var t=Ni(18,null,null,0);return t.stateNode=e,t}function Vi(e,t,n){return t=Ni(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hi=new WeakMap;function Ui(e,t){if(typeof e==`object`&&e){var n=Hi.get(e);return n===void 0?(t={value:e,source:t,stack:Fe(t)},Hi.set(e,t),t):n}return{value:e,source:t,stack:Fe(t)}}var Wi=[],Gi=0,Ki=null,qi=0,Ji=[],Yi=0,Xi=null,Zi=1,Qi=``;function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ki,Ki=e,qi=t}function ea(e,t,n){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Xi=e;var r=Zi;e=Qi;var i=32-$e(r)-1;r&=~(1<<i),n+=1;var a=32-$e(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Zi=1<<32-$e(t)+i|n<<i|r,Qi=a+e}else Zi=1<<a|n<<i|r,Qi=e}function ta(e){e.return!==null&&($i(e,1),ea(e,1,0))}function na(e){for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null;for(;e===Xi;)Xi=Ji[--Yi],Ji[Yi]=null,Qi=Ji[--Yi],Ji[Yi]=null,Zi=Ji[--Yi],Ji[Yi]=null}function ra(e,t){Ji[Yi++]=Zi,Ji[Yi++]=Qi,Ji[Yi++]=Xi,Zi=t.id,Qi=t.overflow,Xi=e}var ia=null,aa=null,z=!1,oa=null,sa=!1,ca=Error(i(519));function la(e){throw ha(Ui(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ca}function ua(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ct]=e,t[wt]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<zf.length;n++)Q(zf[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),on(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),un(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||ep(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=yn),t=!0):t=!1,t||la(e,!0)}function da(e){for(ia=e.return;ia;)switch(ia.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:ia=ia.return}}function fa(e){if(e!==ia)return!1;if(!z)return da(e),z=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||mp(e.type,e.memoizedProps)),n=!n),n&&aa&&la(e),da(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=fm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));aa=fm(e)}else t===27?(t=aa,Cp(e.type)?(e=dm,dm=null,aa=e):aa=t):aa=ia?um(e.stateNode.nextSibling):null;return!0}function pa(){aa=ia=null,z=!1}function ma(){var e=oa;return e!==null&&(hd===null?hd=e:hd.push.apply(hd,e),oa=null),e}function ha(e){oa===null?oa=[e]:oa.push(e)}var ga=ve(null),_a=null,va=null;function ya(e,t,n){be(ga,t._currentValue),t._currentValue=n}function ba(e){e._currentValue=ga.current,ye(ga)}function xa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Sa(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),xa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),xa(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),xa(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ca(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Hr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&Sa(t,e,n,r),t.flags|=262144,e!==null}function wa(e){for(e=e.firstContext;e!==null;){if(!Hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ta(e){_a=e,va=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ea(e){return Oa(_a,e)}function Da(e,t){return _a===null&&Ta(e),Oa(e,t)}function Oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},va===null){if(e===null)throw Error(i(308));va=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else va=va.next=t;return n}var ka=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},B=t.unstable_scheduleCallback,Aa=t.unstable_NormalPriority,ja={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ma(){return{controller:new ka,data:new Map,refCount:0}}function Na(e){e.refCount--,e.refCount===0&&B(Aa,function(){e.controller.abort()})}function Pa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Fa=null;function Ia(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var La=null,Ra=0,za=0,Ba=null;function Va(e,t){if(La===null){var n=La=[];Ra=0,za=Pf(),Ba={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ra++,t.then(Ha,Ha),t}function Ha(){if(--Ra===0&&(Fa=null,La!==null)){Ba!==null&&(Ba.status=`fulfilled`);var e=La;La=null,za=0,Ba=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ua(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Wa=I.S;I.S=function(e,t){if(vd=Ve(),typeof t==`object`&&t&&typeof t.then==`function`&&Va(e,t),Fa!==null)for(var n=xf;n!==null;)Pa(n,Fa),n=n.next;if(n=e.types,n!==null){for(var r=xf;r!==null;)Pa(r,n),r=r.next;if(za!==0){r=Fa,r===null&&(r=Fa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Wa!==null&&Wa(e,t)};var Ga=ve(null);function Ka(){var e=Ga.current;return e===null?td.pooledCache:e}function qa(e,t){t===null?be(Ga,Ga.current):be(Ga,t.pool)}function Ja(){var e=Ka();return e===null?null:{parent:ja._currentValue,pool:e}}var Ya=Error(i(460)),Xa=Error(i(474)),Za=Error(i(542)),Qa={then:function(){}};function $a(e){return e=e.status,e===`fulfilled`||e===`rejected`}function eo(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(yn,yn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,io(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(yn,yn);else{if(e=td,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,io(e),e}throw no=t,Ya}}function to(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(no=e,Ya):e}}var no=null;function ro(){if(no===null)throw Error(i(459));var e=no;return no=null,e}function io(e){if(e===Ya||e===Za)throw Error(i(483))}var ao=null,oo=0;function so(e){var t=oo;return oo+=1,ao===null&&(ao=[]),eo(ao,e,t)}function co(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function lo(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function uo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=zi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),co(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===F&&to(i)===t.type)?(t=a(t,n.props),co(t,n),t.return=e,t):(t=Li(n.type,n.key,n.props,null,e.mode,r),co(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ri(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=zi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Li(t.type,t.key,t.props,null,e.mode,n),co(n,t),n.return=e,n;case A:return t=Vi(t,e.mode,n),t.return=e,t;case F:return t=to(t),f(e,t,n)}if(me(t)||de(t))return t=Ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,so(t),n);if(t.$$typeof===P)return f(e,Da(e,t),n);lo(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case F:return n=to(n),p(e,t,n,r)}if(me(n)||de(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,so(n),r);if(n.$$typeof===P)return p(e,t,Da(e,n),r);lo(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case F:return r=to(r),m(e,t,n,r,i)}if(me(r)||de(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,so(r),i);if(r.$$typeof===P)return m(e,t,n,Da(t,r),i);lo(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),z&&$i(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return z&&$i(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),z&&$i(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),z&&$i(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return z&&$i(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),z&&$i(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),co(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===F&&to(l)===r.type){n(e,r.sibling),c=a(r,o.props),co(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Ri(o.props.children,e.mode,c,o.key),co(c,o),c.return=e,e=c):(c=Li(o.type,o.key,o.props,null,e.mode,c),co(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Vi(o,e.mode,c),c.return=e,e=c}return s(e);case F:return o=to(o),_(e,r,o,c)}if(me(o))return h(e,r,o,c);if(de(o)){if(l=de(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,so(o),c);if(o.$$typeof===P)return _(e,r,Da(e,o),c);lo(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=zi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{oo=0;var i=_(e,t,n,r);return ao=null,i}catch(t){if(t===Ya||t===Za)throw t;var a=Ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var fo=uo(!0),po=uo(!1),mo=!1;function ho(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function go(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _o(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ai(e),ki(e,null,n),t}return Ei(e,r,t,n),Ai(e)}function yo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gt(e,n)}}function bo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var xo=!1;function So(){if(xo){var e=Ba;if(e!==null)throw e}}function Co(e,t,n,r){xo=!1;var i=e.updateQueue;mo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(q&f)===f:(r&f)===f){f!==0&&f===za&&(xo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:mo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ld|=o,e.lanes=o,e.memoizedState=d}}function wo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function To(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)wo(n[e],t)}var Eo=ve(null),Do=ve(0);function Oo(e,t){e=sd,be(Do,e),be(Eo,t),sd=e|t.baseLanes}function ko(){be(Do,sd),be(Eo,Eo.current)}function Ao(){sd=Do.current,ye(Eo),ye(Do)}var jo=ve(null),Mo=null;function No(e){var t=e.alternate;be(Ro,Ro.current&1),be(jo,e),Mo===null&&(t===null||Eo.current!==null||t.memoizedState!==null)&&(Mo=e)}function Po(e){be(Ro,Ro.current),be(jo,e),Mo===null&&(Mo=e)}function Fo(e){e.tag===22?(be(Ro,Ro.current),be(jo,e),Mo===null&&(Mo=e)):Io()}function Io(){be(Ro,Ro.current),be(jo,jo.current)}function Lo(e){ye(jo),Mo===e&&(Mo=null),ye(Ro)}var Ro=ve(0);function zo(e,t){be(jo,jo.current),be(Ro,t)}function Bo(e){ye(Ro),ye(jo),Mo===e&&(Mo=null)}function Vo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sm(n)||cm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ho=0,V=null,Uo=null,Wo=null,Go=!1,Ko=!1,qo=!1,Jo=0,Yo=0,Xo=null,Zo=0;function Qo(){throw Error(i(321))}function $o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Hr(e[n],t[n]))return!1;return!0}function es(e,t,n,r,i,a){return Ho=a,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?_c:vc,qo=!1,a=n(r,i),qo=!1,Ko&&(a=ns(t,n,r,i)),ts(e),a}function ts(e){I.H=gc;var t=Uo!==null&&Uo.next!==null;if(Ho=0,Wo=Uo=V=null,Go=!1,Yo=0,Xo=null,t)throw Error(i(300));e===null||Nc||(e=e.dependencies,e!==null&&wa(e)&&(Nc=!0))}function ns(e,t,n,r){V=e;var a=0;do{if(Ko&&(Xo=null),Yo=0,Ko=!1,25<=a)throw Error(i(301));if(a+=1,Wo=Uo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=yc,o=t(n,r)}while(Ko);return o}function rs(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?us(t):t,e=e.useState()[0],(Uo===null?null:Uo.memoizedState)!==e&&(V.flags|=1024),t}function is(){var e=Jo!==0;return Jo=0,e}function as(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function os(e){if(Go){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Go=!1}Ho=0,Wo=Uo=V=null,Ko=!1,Yo=Jo=0,Xo=null}function ss(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wo===null?V.memoizedState=Wo=e:Wo=Wo.next=e,Wo}function cs(){if(Uo===null){var e=V.alternate;e=e===null?null:e.memoizedState}else e=Uo.next;var t=Wo===null?V.memoizedState:Wo.next;if(t!==null)Wo=t,Uo=e;else{if(e===null)throw V.alternate===null?Error(i(467)):Error(i(310));Uo=e,e={memoizedState:Uo.memoizedState,baseState:Uo.baseState,baseQueue:Uo.baseQueue,queue:Uo.queue,next:null},Wo===null?V.memoizedState=Wo=e:Wo=Wo.next=e}return Wo}function ls(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function us(e){var t=Yo;return Yo+=1,Xo===null&&(Xo=[]),e=eo(Xo,e,t),t=V,(Wo===null?t.memoizedState:Wo.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?_c:vc),e}function ds(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return us(e);if(e.$$typeof===le)return;if(e.$$typeof===P)return Ea(e)}throw Error(i(438,String(e)))}function fs(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=V.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ls(),V.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=se;return t.index++,n}function ps(e,t){return typeof t==`function`?t(e):t}function ms(e){return hs(cs(),Uo,e)}function hs(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Ho&f)===f:(q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===za&&(d=!0);else if((Ho&p)===p){u=u.next,p===za&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,V.lanes|=p,ld|=p;f=u.action,qo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,V.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Hr(o,e.memoizedState)&&(Nc=!0,d&&(n=Ba,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function gs(e){var t=cs(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Hr(o,t.memoizedState)||(Nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function _s(e,t,n){var r=V,a=cs(),o=z;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Hr((Uo||a).memoizedState,n);if(s&&(a.memoizedState=n,Nc=!0),a=a.queue,Hs(bs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Wo!==null&&!!(Wo.memoizedState.tag&1),Ls(e?9:8,{destroy:void 0},ys.bind(null,r,a,n,t),null),e){if(r.flags|=2048,td===null)throw Error(i(349));o||Ho&127||vs(r,t,n)}return n}function vs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=ls(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ys(e,t,n,r){t.value=n,t.getSnapshot=r,xs(t)&&Ss(e)}function bs(e,t,n){return n(function(){xs(t)&&Ss(e)})}function xs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hr(e,n)}catch{return!0}}function Ss(e){var t=Oi(e,2);t!==null&&Ld(t,e,2)}function Cs(e){var t=ss();if(typeof e==`function`){var n=e;if(e=n(),qo){Qe(!0);try{n()}finally{Qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:e},t}function ws(e,t,n,r){return e.baseState=n,hs(e,Uo,typeof r==`function`?r:ps)}function Ts(e,t,n,r,a){if(pc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Es(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Es(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};o.types=a===null?null:a.types,I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Ds(e,t,s)}catch(n){ks(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Ds(e,t,a)}catch(n){ks(e,t,n)}}function Ds(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Os(e,t,n)},function(n){return ks(e,t,n)}):Os(e,t,n)}function Os(e,t,n){t.status=`fulfilled`,t.value=n,As(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Es(e,n)))}function ks(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,As(t),t=t.next;while(t!==r)}e.action=null}function As(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function js(e,t){return t}function Ms(e,t){if(z){var n=td.formState;if(n!==null){a:{var r=V;if(z){if(aa){b:{for(var i=aa,a=sa;i.nodeType!==8;){if(!a){i=null;break b}if(i=um(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){aa=um(i.nextSibling),r=i.data===`F!`;break a}}la(r)}r=!1}r&&(t=n[0])}}return n=ss(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:js,lastRenderedState:t},n.queue=r,n=uc.bind(null,V,r),r.dispatch=n,r=Cs(!1),a=fc.bind(null,V,!1,r.queue),r=ss(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ts.bind(null,V,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ns(e){return Ps(cs(),Uo,e)}function Ps(e,t,n){if(t=hs(e,t,js)[0],e=ms(ps)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=us(t)}catch(e){throw e===Ya?Za:e}else r=t;t=cs();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(V.flags|=2048,Ls(9,{destroy:void 0},Fs.bind(null,i,n),null)),[r,a,e]}function Fs(e,t){e.action=t}function Is(e){var t=cs(),n=Uo;if(n!==null)return Ps(t,n,e);cs(),t=t.memoizedState,n=cs();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=V.updateQueue,t===null&&(t=ls(),V.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Rs(){return cs().memoizedState}function zs(e,t,n,r){var i=ss();V.flags|=e,i.memoizedState=Ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function Bs(e,t,n,r){var i=cs();r=r===void 0?null:r;var a=i.memoizedState.inst;Uo!==null&&r!==null&&$o(r,Uo.memoizedState.deps)?i.memoizedState=Ls(t,a,n,r):(V.flags|=e,i.memoizedState=Ls(1|t,a,n,r))}function Vs(e,t){zs(8390656,8,e,t)}function Hs(e,t){Bs(2048,8,e,t)}function Us(e){V.flags|=4;var t=V.updateQueue;if(t===null)t=ls(),V.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ws(e){var t=cs().memoizedState;return Us({ref:t,nextImpl:e}),function(){if(G&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Gs(e,t){return Bs(4,2,e,t)}function Ks(e,t){return Bs(4,4,e,t)}function qs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Js(e,t,n){n=n==null?null:n.concat([e]),Bs(4,4,qs.bind(null,t,e),n)}function Ys(){}function Xs(e,t){var n=cs();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&$o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Zs(e,t){var n=cs();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&$o(t,r[1]))return r[0];if(r=e(),qo){Qe(!0);try{e()}finally{Qe(!1)}}return n.memoizedState=[r,t],r}function Qs(e,t,n){return n===void 0||Ho&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=Fd(),V.lanes|=e,ld|=e,n)}function $s(e,t,n,r){return Hr(n,t)?n:Eo.current===null?!(Ho&106)||Ho&1073741824&&!(q&261930)?(Nc=!0,e.memoizedState=n):(e=Fd(),V.lanes|=e,ld|=e,t):(e=Qs(e,n,r),Hr(e,t)||(Nc=!0),e)}function ec(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};s.types=o===null?null:o.types,I.T=s,fc(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?dc(e,t,Ua(c,r),Pd(e)):dc(e,t,r,Pd(e))}catch(n){dc(e,t,{then:function(){},status:`rejected`,reason:n},Pd())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function tc(){}function nc(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=rc(e).queue;ec(e,a,t,he,n===null?tc:function(){return ic(e),n(r)})}function rc(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ps,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ic(e){var t=rc(e);t.next===null&&(t=e.alternate.memoizedState),dc(e,t.next.queue,{},Pd())}function ac(){return Ea(sh)}function oc(){return cs().memoizedState}function sc(){return cs().memoizedState}function cc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Pd();e=_o(n);var r=vo(t,e,n);r!==null&&(Ld(r,t,n),yo(r,t,n)),t={cache:Ma()},e.payload=t;return}t=t.return}}function lc(e,t,n){var r=Pd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},pc(e)?mc(t,n):(n=Di(e,t,n,r),n!==null&&(Ld(n,e,r),hc(n,t,r)))}function uc(e,t,n){dc(e,t,n,Pd())}function dc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(pc(e))mc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Hr(s,o))return Ei(e,t,i,0),td===null&&Ti(),!1}catch{}if(n=Di(e,t,i,r),n!==null)return Ld(n,e,r),hc(n,t,r),!0}return!1}function fc(e,t,n,r){if(r={lane:2,revertLane:Pf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},pc(e)){if(t)throw Error(i(479))}else t=Di(e,n,r,2),t!==null&&Ld(t,e,2)}function pc(e){var t=e.alternate;return e===V||t!==null&&t===V}function mc(e,t){Ko=Go=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gt(e,n)}}var gc={readContext:Ea,use:ds,useCallback:Qo,useContext:Qo,useEffect:Qo,useImperativeHandle:Qo,useLayoutEffect:Qo,useInsertionEffect:Qo,useMemo:Qo,useReducer:Qo,useRef:Qo,useState:Qo,useDebugValue:Qo,useDeferredValue:Qo,useTransition:Qo,useSyncExternalStore:Qo,useId:Qo,useHostTransitionStatus:Qo,useFormState:Qo,useActionState:Qo,useOptimistic:Qo,useMemoCache:Qo,useCacheRefresh:Qo,useEffectEvent:Qo},_c={readContext:Ea,use:ds,useCallback:function(e,t){return ss().memoizedState=[e,t===void 0?null:t],e},useContext:Ea,useEffect:Vs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),zs(4194308,4,qs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zs(4194308,4,e,t)},useInsertionEffect:function(e,t){zs(4,2,e,t)},useMemo:function(e,t){var n=ss();t=t===void 0?null:t;var r=e();if(qo){Qe(!0);try{e()}finally{Qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ss();if(n!==void 0){var i=n(t);if(qo){Qe(!0);try{n(t)}finally{Qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=lc.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=ss();return e={current:e},t.memoizedState=e},useState:function(e){e=Cs(e);var t=e.queue,n=uc.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){return Qs(ss(),e,t)},useTransition:function(){var e=Cs(!1);return e=ec.bind(null,V,e.queue,!0,!1),ss().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=V,a=ss();if(z){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),td===null)throw Error(i(349));q&127||vs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Vs(bs.bind(null,r,o,e),[e]),r.flags|=2048,Ls(9,{destroy:void 0},ys.bind(null,r,o,n,t),null),n},useId:function(){var e=ss(),t=td.identifierPrefix;if(z){var n=Qi,r=Zi;n=(r&~(1<<32-$e(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Jo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Zo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ac,useFormState:Ms,useActionState:Ms,useOptimistic:function(e){var t=ss();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=fc.bind(null,V,!0,n),n.dispatch=t,[e,t]},useMemoCache:fs,useCacheRefresh:function(){return ss().memoizedState=cc.bind(null,V)},useEffectEvent:function(e){var t=ss(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},vc={readContext:Ea,use:ds,useCallback:Xs,useContext:Ea,useEffect:Hs,useImperativeHandle:Js,useInsertionEffect:Gs,useLayoutEffect:Ks,useMemo:Zs,useReducer:ms,useRef:Rs,useState:function(){return ms(ps)},useDebugValue:Ys,useDeferredValue:function(e,t){return $s(cs(),Uo.memoizedState,e,t)},useTransition:function(){var e=ms(ps)[0],t=cs().memoizedState;return[typeof e==`boolean`?e:us(e),t]},useSyncExternalStore:_s,useId:oc,useHostTransitionStatus:ac,useFormState:Ns,useActionState:Ns,useOptimistic:function(e,t){return ws(cs(),Uo,e,t)},useMemoCache:fs,useCacheRefresh:sc,useEffectEvent:Ws},yc={readContext:Ea,use:ds,useCallback:Xs,useContext:Ea,useEffect:Hs,useImperativeHandle:Js,useInsertionEffect:Gs,useLayoutEffect:Ks,useMemo:Zs,useReducer:gs,useRef:Rs,useState:function(){return gs(ps)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=cs();return Uo===null?Qs(n,e,t):$s(n,Uo.memoizedState,e,t)},useTransition:function(){var e=gs(ps)[0],t=cs().memoizedState;return[typeof e==`boolean`?e:us(e),t]},useSyncExternalStore:_s,useId:oc,useHostTransitionStatus:ac,useFormState:Is,useActionState:Is,useOptimistic:function(e,t){var n=cs();return Uo===null?(n.baseState=e,[e,n.queue.dispatch]):ws(n,Uo,e,t)},useMemoCache:fs,useCacheRefresh:sc,useEffectEvent:Ws};function bc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=_o(r);i.payload=t,n!=null&&(i.callback=n),t=vo(e,i,r),t!==null&&(Ld(t,e,r),yo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=_o(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=vo(e,i,r),t!==null&&(Ld(t,e,r),yo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pd(),r=_o(n);r.tag=2,t!=null&&(r.callback=t),t=vo(e,r,n),t!==null&&(Ld(t,e,n),yo(t,e,n))}};function Sc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ur(n,r)||!Ur(i,a):!0}function H(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xc.enqueueReplaceState(t,t.state,null)}function U(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Cc(e){xi(e)}function wc(e){console.error(e)}function Tc(e){xi(e)}function Ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Dc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Oc(e,t,n){return n=_o(n),n.tag=3,n.payload={element:null},n.callback=function(){Ec(e,t)},n}function kc(e){return e=_o(e),e.tag=3,e}function Ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Dc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Dc(t,n,r),typeof i!=`function`&&(xd===null?xd=new Set([this]):xd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function jc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ca(t,n,a,!0),n=jo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Mo===null?Yd():n.alternate===null&&cd===0&&(cd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Qa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),hf(e,r,a)),!1;case 22:return n.flags|=65536,r===Qa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),hf(e,r,a)),!1}throw Error(i(435,n.tag))}return hf(e,r,a),Yd(),!1}if(z)return t=jo.current,t===null?(r!==ca&&(t=Error(i(423),{cause:r}),ha(Ui(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ui(r,n),a=Oc(e.stateNode,r,a),bo(e,a),cd!==4&&(cd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ca&&(e=Error(i(422),{cause:r}),ha(Ui(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ui(o,n),md===null?md=[o]:md.push(o),cd!==4&&(cd=2),t===null)return!0;r=Ui(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Oc(n.stateNode,r,e),bo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(xd===null||!xd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=kc(a),Ac(a,e,n,r),bo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Mc=Error(i(461)),Nc=!1;function Pc(e,t,n,r){t.child=e===null?po(t,null,n,r):fo(t,e.child,n,r)}function Fc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ta(t),r=es(e,t,n,o,a,i),s=is(),e!==null&&!Nc?(as(e,t,i),ll(e,t,i)):(z&&s&&ta(t),t.flags|=1,Pc(e,t,r,i),t.child)}function Ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Lc(e,t,a,r,i)):(e=Li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ul(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ur:n,n(o,r)&&e.ref===t.ref)return ll(e,t,i)}return t.flags|=1,e=Fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Lc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ur(a,r)&&e.ref===t.ref){if(Nc=!1,t.pendingProps=r=a,ul(e,i))e.flags&131072&&(Nc=!0);else return t.lanes=e.lanes,ll(e,t,i)}}return Gc(e,t,n,r,i)}function Rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Bc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&qa(t,a===null?null:a.cachePool),a===null?ko():Oo(t,a),Fo(t);else return r=t.lanes=536870912,Bc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&qa(t,null),ko(),Io()):(qa(t,a.cachePool),Oo(t,a),Io(),t.memoizedState=null);return Pc(e,t,i,n),t.child}function zc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bc(e,t,n,r,i){var a=Ka();return a=a===null?null:{parent:ja._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&qa(t,null),ko(),Fo(t),e!==null&&Ca(e,t,r,!0),t.childLanes=i,null}function Vc(e,t){return t=el({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hc(e,t,n){return fo(t,e.child,null,n),e=Vc(t,t.pendingProps),e.flags|=2,Lo(t),t.memoizedState=null,e}function Uc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(z){if(r.mode===`hidden`)return e=Vc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},zc(null,e);if(Po(t),(e=aa)?(e=om(e,sa),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=536870912,null}return Vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Po(t),a){if(t.flags&256)t.flags&=-257,t=Hc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Nc||Ca(e,t,n,!1),a=(n&e.childLanes)!==0,Nc||a){if(Eo.current===null){if(r=td,r!==null&&(s=_t(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Oi(e,s),Ld(r,e,s),Mc;Yd()}t=Hc(e,t,n)}else e=o.treeContext,aa=um(s.nextSibling),ia=t,z=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=Vc(t,r),t.flags|=134221824;return t}return e=Fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Gc(e,t,n,r,i){return Ta(t),n=es(e,t,n,r,void 0,i),r=is(),e!==null&&!Nc?(as(e,t,i),ll(e,t,i)):(z&&r&&ta(t),t.flags|=1,Pc(e,t,n,i),t.child)}function Kc(e,t,n,r,i,a){return Ta(t),t.updateQueue=null,n=ns(t,r,n,i),ts(e),r=is(),e!==null&&!Nc?(as(e,t,a),ll(e,t,a)):(z&&r&&ta(t),t.flags|=1,Pc(e,t,n,a),t.child)}function qc(e,t,n,r,i){if(Ta(t),t.stateNode===null){var a=ji,o=n.contextType;typeof o==`object`&&o&&(a=Ea(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=xc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ho(t),o=n.contextType,a.context=typeof o==`object`&&o?Ea(o):ji,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(bc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&xc.enqueueReplaceState(a,a.state,null),Co(t,r,a,i),So(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=U(n,s);a.props=c;var l=a.context,u=n.contextType;o=ji,typeof u==`object`&&u&&(o=Ea(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&H(t,a,r,o),mo=!1;var f=t.memoizedState;a.state=f,Co(t,r,a,i),So(),l=t.memoizedState,s||f!==l||mo?(typeof d==`function`&&(bc(t,n,d,r),l=t.memoizedState),(c=mo||Sc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,go(e,t),o=t.memoizedProps,u=U(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ji,typeof l==`object`&&l&&(c=Ea(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&H(t,a,r,c),mo=!1,f=t.memoizedState,a.state=f,Co(t,r,a,i),So();var p=t.memoizedState;o!==d||f!==p||mo||e!==null&&e.dependencies!==null&&wa(e.dependencies)?(typeof s==`function`&&(bc(t,n,s,r),p=t.memoizedState),(u=mo||Sc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&wa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Wc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=fo(t,e.child,null,i),t.child=fo(t,null,n,i)):Pc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ll(e,t,i),e}function Jc(e,t,n,r){return pa(),t.flags|=256,Pc(e,t,n,r),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xc(e){return{baseLanes:e,cachePool:Ja()}}function Zc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=fd),e}function Qc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Ro.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(z){if(i?No(t):Io(),(e=aa)?(e=om(e,sa),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Xi===null?null:{id:Zi,overflow:Qi},retryLane:536870912,hydrationErrors:null},n=Bi(e),n.return=t,t.child=n,ia=t,aa=null)):e=null,e===null)throw la(t);return t.lanes=cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Io(),i=t.mode,a=el({mode:`hidden`,children:a},i),r=Ri(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Xc(n),r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(null,r)):(No(t),$c(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return nl(e,t,a,o,r,c,s,n)}return i?(Io(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Fi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ri(i,a,n,null),i.flags|=2):i=Fi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,zc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Xc(n):(a=i.cachePool,a===null?a=Ja():(s=ja._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Zc(e,o,n),t.memoizedState=Yc,zc(e.child,r)):(No(t),n=e.child,e=n.sibling,n=Fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function $c(e,t){return t=el({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function el(e,t){return e=Ni(22,e,null,t),e.lanes=0,e}function tl(e,t,n){return fo(t,e.child,null,n),e=$c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nl(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(No(t),t.flags&=-257,tl(e,t,c)):t.memoizedState===null?(Io(),o=a.fallback,s=t.mode,a=el({mode:`visible`,children:a.children},s),o=Ri(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,fo(t,e.child,null,c),a=t.child,a.memoizedState=Xc(c),a.childLanes=Zc(e,r,c),t.memoizedState=Yc,zc(null,a)):(Io(),t.child=e.child,t.flags|=128,null);if(No(t),cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ha({value:a,source:null,stack:null})),tl(e,t,c)}if(Nc||Ca(e,t,c,!1),r=(c&e.childLanes)!==0,Nc||r){if(Eo.current!==null)return tl(e,t,c);if(r=td,r!==null&&(a=_t(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Oi(e,a),Ld(r,e,a),Mc;return sm(o)||Yd(),tl(e,t,c)}return sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,aa=um(o.nextSibling),ia=t,z=!0,oa=null,sa=!1,e!==null&&ra(t,e),t=$c(t,a.children),t.flags|=134221824,t)}function rl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),xa(e.return,t,n)}function il(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Vo(n)===null&&(t=e),e=e.sibling}return t}function al(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function ol(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function sl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Ro.current;if(t.flags&128)return zo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,zo(t,o),i===`backwards`&&e!==null?(ol(e),Pc(e,t,r,n),ol(e)):Pc(e,t,r,n),r=z?qi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rl(e,n,t);else if(e.tag===19)rl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,ol(t)),al(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Vo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}al(t,!0,n,null,a,r);break;case`together`:al(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=il(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),al(t,!1,i,n,a,r)}return t.child}function cl(e,t,n){var r=t.pendingProps;return ya(t,t.type,r.value),Pc(e,t,r.children,n),t.child}function ll(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ca(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ul(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&wa(e)))}function dl(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),ya(t,ja,e.memoizedState.cache),pa();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:ya(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Po(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return No(t),t.flags|=128,null;r=Ca(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Qc(e,t,n):(No(t),e=ll(e,t,n),e===null?null:e.sibling)}No(t);break;case 19:if(t.flags&128)return sl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ca(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return sl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),zo(t,Ro.current),r)break;return null;case 22:return t.lanes=0,Rc(e,t,n,t.pendingProps);case 24:ya(t,ja,e.memoizedState.cache)}return ll(e,t,n)}function fl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Nc=!0;else{if(!ul(e,n)&&!(t.flags&128))return Nc=!1,dl(e,t,n);Nc=!!(e.flags&131072)}}else Nc=!1,z&&t.flags&1048576&&ea(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=to(t.elementType),t.type=e,typeof e==`function`)Pi(e)?(r=U(e,r),t.tag=1,t=qc(null,t,e,r,n)):(t.tag=0,t=Gc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===te){t.tag=11,t=Fc(null,t,e,r,n);break a}if(a===ie){t.tag=14,t=Ic(null,t,e,r,n);break a}if(a===P){t.tag=10,t.type=e,t=cl(null,t,n);break a}}throw t=pe(e)||e,Error(i(306,t,``))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=U(r,t.pendingProps),qc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,go(e,t),Co(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ya(t,ja,r),r!==o.cache&&Sa(t,[ja],n,!0),So(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Jc(e,t,r,n);break a}if(r!==a){a=Ui(Error(i(424)),t),ha(a),t=Jc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(aa=um(e.firstChild),ia=t,z=!0,oa=null,sa=!0,n=po(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(pa(),r===a){t=ll(e,t,n);break a}Pc(e,t,r,n)}t=t.child}return t;case 26:return Wc(e,t),e===null?(n=Pm(t.type,null,t.pendingProps,null))?t.memoizedState=n:z||(t.stateNode=pp(t.type,t.pendingProps,Ce.current,t)):t.memoizedState=Pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&z&&(r=t.stateNode=gm(t.type,t.pendingProps,Ce.current),ia=t,sa=!0,a=aa,Cp(t.type)?(dm=a,aa=um(r.firstChild)):aa=a),Pc(e,t,t.pendingProps.children,n),Wc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&z&&((a=r=aa)&&(r=im(r,t.type,t.pendingProps,sa),r===null?a=!1:(t.stateNode=r,ia=t,aa=um(r.firstChild),sa=!1,a=!0)),a||la(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,mp(a,o)?r=null:s!==null&&mp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=es(e,t,rs,null,null,n),sh._currentValue=a),Wc(e,t),Pc(e,t,r,n),t.child;case 6:return e===null&&z&&((e=n=aa)&&(n=am(n,t.pendingProps,sa),n===null?e=!1:(t.stateNode=n,ia=t,aa=null,e=!0)),e||la(t)),null;case 13:return Qc(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fo(t,null,r,n):Pc(e,t,r,n),t.child;case 11:return Fc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Wc(e,t),Pc(e,t,r,n),t.child;case 8:return Pc(e,t,t.pendingProps.children,n),t.child;case 12:return Pc(e,t,t.pendingProps.children,n),t.child;case 10:return cl(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,Ta(t),a=Ea(a),r=r(a),t.flags|=1,Pc(e,t,r,n),t.child;case 14:return Ic(e,t,t.type,t.pendingProps,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 19:return sl(e,t,n);case 31:return Uc(e,t,n);case 22:return Rc(e,t,n,t.pendingProps);case 24:return Ta(t),r=Ea(ja),e===null?(a=Ka(),a===null&&(a=td,o=Ma(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ho(t),ya(t,ja,a)):((e.lanes&n)!==0&&(go(e,t),Co(t,null,null,n),So()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ya(t,ja,r),r!==a.cache&&Sa(t,[ja],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ya(t,ja,r))),Pc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:z&&ta(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Wc(e,t),Pc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function pl(e){e.flags|=4}function ml(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Ym(t,r):Ym(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Kd())e.flags|=8192;else throw no=Qa,Xa}}else e.flags&=-16777217}function hl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Xm(t)){if(Kd())e.flags|=8192;else throw no=Qa,Xa}}function gl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:dt(),e.lanes|=t,pd|=t)}function _l(e,t){if(!z)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function vl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function yl(e,t,n){var r=t.pendingProps;switch(na(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vl(t),null;case 1:return vl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ba(ja),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(fa(t)?pl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ma())),vl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(pl(t),o===null?(vl(t),ml(t,a,null,r,n)):(vl(t),hl(t,o))):o?o===e.memoizedState?(vl(t),t.flags&=-16777217):(pl(t),vl(t),hl(t,o)):(e=e.memoizedProps,e!==r&&pl(t),vl(t),ml(t,a,e,r,n)),null;case 27:if(Oe(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}e=xe.current,fa(t)?ua(t,e):(e=gm(a,r,n),t.stateNode=e,pl(t))}return vl(t),t.subtreeFlags&=-33554433,null;case 5:if(Oe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return vl(t),t.subtreeFlags&=-33554433,null}if(o=xe.current,fa(t))ua(t,o);else{var s=up(Ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ct]=t,o[wt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(rp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&pl(t)}}return vl(t),t.subtreeFlags&=-33554433,ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,fa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ia,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ep(e.nodeValue,n)),e||la(t,!0)}else e=up(e).createTextNode(r),e[Ct]=t,t.stateNode=e}return vl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=fa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ct]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),e=!1}else n=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Lo(t),t):(Lo(t),null);if(t.flags&128)throw Error(i(558))}return vl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=fa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ct]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vl(t),a=!1}else a=ma(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Lo(t),t):(Lo(t),null)}return Lo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),gl(t,t.updateQueue),vl(t),null);case 4:return Ee(),e===null&&Wf(t.stateNode.containerInfo),t.flags|=67108864,vl(t),null;case 10:return ba(t.type),vl(t),null;case 19:if(Bo(t),r=t.memoizedState,r===null)return vl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)_l(r,!1);else{if(cd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Vo(e),o!==null){for(t.flags|=128,_l(r,!1),e=o.updateQueue,t.updateQueue=e,gl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Ii(n,e),n=n.sibling;return zo(t,Ro.current&1|2),z&&$i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ve()>yd&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Vo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,gl(t,e),_l(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!z)return vl(t),null}else 2*Ve()-r.renderingStartTime>yd&&n!==536870912&&(t.flags|=128,a=!0,_l(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ve(),e.sibling=null,o=Ro.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||z?zo(t,o):(n=o,be(jo,t),be(Ro,n),Mo===null&&(Mo=t)),z&&$i(t,r.treeForkCount),e}return vl(t),null;case 22:case 23:return Lo(t),Ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),n=t.updateQueue,n!==null&&gl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ye(Ga),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ba(ja),vl(t),null;case 25:return null;case 30:return t.flags|=33554432,vl(t),null}throw Error(i(156,t.tag))}function bl(e,t){switch(na(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ba(ja),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Oe(t),null;case 31:if(t.memoizedState!==null){if(Lo(t),t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Bo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ee(),null;case 10:return ba(t.type),null;case 22:case 23:return Lo(t),Ao(),e!==null&&ye(Ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ba(ja),null;case 25:return null;default:return null}}function xl(e,t){switch(na(t),t.tag){case 3:ba(ja),Ee();break;case 26:case 27:case 5:Oe(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&Lo(t);break;case 13:Lo(t);break;case 19:Bo(t);break;case 10:ba(t.type);break;case 22:case 23:Lo(t),Ao(),e!==null&&ye(Ga);break;case 24:ba(ja)}}function Sl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){X(t,t.return,e)}}function Cl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){X(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){X(t,t.return,e)}}function wl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{To(t,n)}catch(t){X(e,e.return,t)}}}function Tl(e,t,n){n.props=U(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){X(e,t,n)}}function El(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=vi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Fp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Ip(e);h(e.child,!1,$p,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){X(e,t,n)}}function Dl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){X(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){X(e,t,n)}else n.current=null}}function Ol(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)tm(e.stateNode,t[n])}function kl(e){for(var t=e.return;t!==null&&(Ml(t)&&tm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function Al(e){for(var t=e.return;t!==null&&(Ml(t)&&nm(e.stateNode,t.stateNode),!jl(t));)t=t.return}function jl(e){return e.tag===5||e.tag===3||e.tag===27}function Ml(e){return e&&e.tag===7&&e.stateNode!==null}function Nl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){X(e,e.return,t)}}function Pl(e,t,n){try{var r=e.stateNode;ap(r,e.type,n,t),r[wt]=t}catch(t){X(e,e.return,t)}}function Fl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cp(e.type)||e.tag===4}function Il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Fl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Cp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ll(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yn)),Ol(e,r),R=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Cp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Ll(e,t,n,r),e=e.sibling;e!==null;)Ll(e,t,n,r),e=e.sibling}function Rl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Ol(e,r),R=!0;else if(i!==4&&(i===27&&(Ol(e,r),r=null,Cp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Rl(e,t,n,r),e=e.sibling;e!==null;)Rl(e,t,n,r),e=e.sibling}function zl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);rp(t,r,n),t[Ct]=e,t[wt]=n}catch(t){X(e,e.return,t)}}var Bl=!1,Vl=null;function Hl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Bl=!0)}var Ul=null;function Wl(){var e=Ul;return Ul=null,e}var Gl=0;function Kl(e,t,n,r,i){return Gl=0,ql(e.child,t,n,r,i)}function ql(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=kp(o);r.push(s),s.view&&(a=!0)}else a||kp(o).view&&(a=!0);Bl=!0,Ep(o,Gl===0?t:t+`_`+Gl,n),Gl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||ql(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Jl(e,t){for(;e!==null;)e.tag===5?Dp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Jl(e.child,t)),e=e.sibling}function Yl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Yl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=bi(t.default,t.share),t!==`none`&&(Kl(e,n,t,null,!1)||Jl(e.child,!1))}e=e.sibling}}function Xl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=vi(r,n),a=bi(r.default,n.paired?r.share:r.enter);a===`none`?Yl(e):Kl(e,i,a,null,!1)?(Yl(e),n.paired||t||Id(e,r.onEnter)):Jl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e,t),e=e.sibling;else Yl(e)}function Zl(e){if(Vl!==null&&Vl.size!==0){var t=Vl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=bi(n.default,n.share);if(a!==`none`&&(Kl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Id(e,n.onShare)):Jl(e.child,!1)),t.delete(r),t.size===0)break}}}Zl(e)}e=e.sibling}}}function Ql(e){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode),r=Vl===null?void 0:Vl.get(n),i=bi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Kl(e,n,i,null,!1)?r===void 0?Id(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Vl.delete(n),Id(e,t.onShare)):Jl(e.child,!1)),Vl!==null&&Zl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e),e=e.sibling;else Vl!==null&&Zl(e)}function $l(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=vi(t,e.stateNode);t=bi(t.default,t.update),e.flags&=-5,t!==`none`&&Kl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&$l(e);e=e.sibling}}function eu(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Jl(e.child,!1))}eu(e)}e=e.sibling}}function tu(e){if(e.tag===30)e.stateNode.paired=null,Jl(e.child,!1),eu(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)tu(e),e=e.sibling;else eu(e)}function nu(e){for(e=e.child;e!==null;)e.tag===30?Jl(e.child,!1):e.subtreeFlags&33554432&&nu(e),e=e.sibling}function ru(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Gl<a.length){var l=a[Gl],u=kp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Ep(c,Gl===0?n:n+`_`+Gl,i),s&&e.flags&4||(Ul===null&&(Ul=[]),Ul.push(c,Gl===0?r:r+`_`+Gl,t.memoizedProps)),Gl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:ru(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function iu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=vi(n,r),a=bi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Ap)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Gl=0,i=ru(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Id(e,n.onUpdate))}else e.subtreeFlags&33554432&&iu(e,t);e=e.sibling}}var au=!1,W=!1,ou=!1,su=!1,cu=typeof WeakSet==`function`?WeakSet:Set,lu=null,uu=!1,du=!1,fu=!1,pu=!1;function mu(e,t,n){if(e=e.containerInfo,cp=gh,e=Jr(e),Yr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(lp={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,lu=t,t=n?9270:1024;lu!==null;){if(e=lu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Ql(r[a]);if(e.alternate===null&&e.flags&2)n&&Hl(e),hu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Ql(r),hu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Hl(e),hu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,lu=r):(n&&$l(e),hu(n))}}Vl=null}function hu(e){for(;lu!==null;){var t=lu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=U(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){X(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)rm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:rm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=vi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=bi(a.default,a.update),a!==`none`&&Kl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,lu=r;break}lu=t.return}}function gu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Iu(e,n),r&4&&Sl(5,n);break;case 1:if(Iu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){X(n,n.return,e)}else{var i=U(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){X(n,n.return,e)}}}r&64&&wl(n),r&512&&El(n,n.return);break;case 3:if(Iu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{To(e,t)}catch(e){X(n,n.return,e)}}break;case 27:t===null&&r&4&&zl(n);case 26:case 5:Iu(e,n),t===null&&r&4&&Nl(n),r&512&&El(n,n.return);break;case 12:Iu(e,n);break;case 31:Iu(e,n),r&4&&Tu(e,n);break;case 13:Iu(e,n),r&4&&Eu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=vf.bind(null,n),lm(e,n))));break;case 22:if(r=n.memoizedState!==null||au,!r){var a=t!==null&&t.memoizedState!==null||W;t=au,i=W,au=r,(W=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Ru(e,n,r)):Iu(e,n),au=t,W=i}break;case 30:Iu(e,n),r&512&&El(n,n.return);break;case 7:r&512&&El(n,n.return);default:Iu(e,n)}}function _u(e,t){for(e=e.child;e!==null;)vu(e,t),e=e.sibling}function vu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){X(e,e.return,t)}yu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,R=!0}catch(t){X(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Tp(s,!0):Tp(e.stateNode,!1)}catch(t){X(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&_u(e,t);break;default:_u(e,t)}}function yu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:vu(n,r);break a;case 22:n.memoizedState===null&&yu(n,r);break a;default:yu(n,r)}}e=e.sibling}}function bu(e){var t=e.alternate;t!==null&&(e.alternate=null,bu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Mt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var xu=null,Su=!1;function Cu(e,t,n){for(n=n.child;n!==null;)wu(e,t,n),n=n.sibling}function wu(e,t,n){if(Ze&&typeof Ze.onCommitFiberUnmount==`function`)try{Ze.onCommitFiberUnmount(Xe,n)}catch{}switch(n.tag){case 26:W||Dl(n,t),Cu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!W&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:W||Dl(n,t),Al(n);var r=xu,i=Su;Cp(n.type)&&(xu=n.stateNode,Su=!1),Cu(e,t,n),_m(n.stateNode,n.type,n.memoizedProps),xu=r,Su=i;break;case 5:W||Dl(n,t),Al(n);case 6:if(n.tag===6&&Al(n),r=xu,i=Su,xu=null,Cu(e,t,n),xu=r,Su=i,xu!==null){if(Su)try{(xu.nodeType===9?xu.body:xu.nodeName===`HTML`?xu.ownerDocument.body:xu).removeChild(n.stateNode),R=!0}catch(e){X(n,t,e)}else try{xu.removeChild(n.stateNode),R=!0}catch(e){X(n,t,e)}}break;case 18:xu!==null&&(Su?(e=xu,wp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):wp(xu,n.stateNode));break;case 4:r=xu,i=Su,xu=n.stateNode.containerInfo,Su=!0,Cu(e,t,n),xu=r,Su=i;break;case 0:case 11:case 14:case 15:Cl(2,n,t),W||Cl(4,n,t),Cu(e,t,n);break;case 1:W||(Dl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Tl(n,t,r)),Cu(e,t,n);break;case 21:Cu(e,t,n);break;case 22:W=(r=W)||n.memoizedState!==null,Cu(e,t,n),W=r;break;case 30:Dl(n,t),Cu(e,t,n);break;case 7:W||Dl(n,t),Cu(e,t,n);break;default:Cu(e,t,n)}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){X(t,t.return,e)}}}function Eu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){X(t,t.return,e)}}function Du(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cu),t;default:throw Error(i(435,e.tag))}}function Ou(e,t){var n=Du(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=yf.bind(null,e,t);t.then(r,r)}})}function ku(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Cp(l.type)){xu=l.stateNode,Su=!1;break a}break;case 5:xu=l.stateNode,Su=!1;break a;case 3:case 4:xu=l.stateNode.containerInfo,Su=!0;break a}l=l.return}if(xu===null)throw Error(i(160));wu(s,c,o),xu=null,Su=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ju(t,e,n),t=t.sibling}var Au=null;function ju(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}ku(t,e,n),Mu(e),a&4&&(Cl(3,e,e.return),Sl(3,e),Cl(5,e,e.return));break;case 1:ku(t,e,n),Mu(e),a&512&&(W||r===null||Dl(r,r.return)),a&64&&au&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Au,ku(t,e,n),Mu(e),a&512&&(W||r===null||Dl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(au)e.stateNode=pp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[At]||r[Ct]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),rp(r,t,n),r[Ct]=e,Lt(r),t=r;break a;case`link`:if(o=Km(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Km(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),rp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[Ct]=e,Lt(r),t=r}e.stateNode=t}}else au||qm(o,e.type,e.stateNode)}else e.stateNode=Vm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||W||t.parentNode.removeChild(t)):a.count--,n===null?au||qm(o,e.type,e.stateNode):Vm(o,n,e.memoizedProps))}break;case 27:ku(t,e,n),Mu(e),a&512&&(W||r===null||Dl(r,r.return)),r!==null&&a&4&&Pl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ou,ou=!1,ku(t,e,n),ou=o,Mu(e),a&512&&(W||r===null||Dl(r,r.return)),e.flags&32){t=e.stateNode;try{dn(t,``),R=!0}catch(t){X(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Pl(e,t,r===null?t:r.memoizedProps)),a&1024&&(su=!0);break;case 6:if(ku(t,e,n),Mu(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,R=!0}catch(t){X(e,e.return,t)}}break;case 3:if(R=!1,Gm=null,o=Au,Au=xm(t.containerInfo),ku(t,e,n),Au=o,Mu(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){X(e,e.return,t)}su&&(su=!1,Nu(e)),R=!1;break;case 4:a=ou,ou=au,r=qt(),o=Au,Au=xm(e.stateNode.containerInfo),ku(t,e,n),Mu(e),Au=o,R&&du&&(fu=!0),R=r,ou=a;break;case 12:ku(t,e,n),Mu(e);break;case 31:ku(t,e,n),Mu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 13:ku(t,e,n),Mu(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(_d=Ve()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=au,l=W,u=ou;au=c||o,ou=u||o,W=l||s,ku(t,e,n),W=l,ou=u,au=c,Mu(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||au||W||(t=s||W,n=au,r=W,au=o||au,W=t,Lu(e,2),au=n,W=r),!o&&ou||_u(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Ou(e,n))));break;case 19:ku(t,e,n),Mu(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ou(e,t)));break;case 30:a&512&&(W||r===null||Dl(r,r.return)),a=qt(),o=du,s=(n&335544064)===n,c=e.memoizedProps,du=s&&bi(c.default,c.update)!==`none`,ku(t,e,n),Mu(e),s&&r!==null&&R&&(e.flags|=4),du=o,R=a;break;case 21:break;case 7:a&512&&(W||r===null||Dl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:ku(t,e,n),Mu(e)}}function Mu(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Fl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ml(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(jl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Rl(e,Il(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(dn(l,``),n.flags&=-33),Rl(e,Il(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Ll(e,Il(e),u,s);break;default:throw Error(i(161))}}catch(t){X(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Pu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Fu(t,e),t=t.sibling;else iu(t,!1)}function Fu(e,t){var n=e.alternate;if(n===null)Xl(e,!1);else switch(e.tag){case 3:if(pu=uu=!1,Wl(),Pu(t,e),!uu&&!fu){if(e=Ul,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Dp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),pu=!0}Ul=null;break;case 5:Pu(t,e);break;case 4:r=uu,uu=!1,Pu(t,e),uu&&(fu=!0),uu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Pu(t,e):Xl(e,!1));break;case 30:r=uu,i=Wl(),uu=!1,Pu(t,e),uu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=vi(a,o),o=vi(n.memoizedProps,o);var s=bi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Gl=0,t=ru(e,n,t,o,s,a,!0),Gl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Id(e,e.memoizedProps.onUpdate),Ul=i):i!==null&&(i.push.apply(i,Ul),Ul=i),uu=e.flags&32?!0:r;break;default:Pu(t,e)}}function Iu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gu(e,t.alternate,t),t=t.sibling}function Lu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Cl(4,n,n.return),Lu(n,r);break;case 1:Dl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Tl(n,n.return,i),Lu(n,r);break;case 27:r&2&&_m(n.stateNode,n.type,n.memoizedProps);case 5:Dl(n,n.return),n.tag!==5&&n.tag!==27||Al(n),Lu(n,r);break;case 6:Al(n);break;case 26:Dl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||W||i.parentNode.removeChild(i),Lu(n,r);break;case 22:n.memoizedState===null&&Lu(n,r);break;case 30:Dl(n,n.return),Lu(n,r);break;case 7:Dl(n,n.return);default:Lu(n,r)}e=e.sibling}}function Ru(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Ru(i,a,n),Sl(4,a);break;case 1:if(Ru(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){X(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)wo(l[i],c)}catch(e){X(r,r.return,e)}}s&&o&64&&wl(a),El(a,a.return);break;case 27:n&2&&zl(a);case 5:a.tag!==5&&a.tag!==27||kl(a),Ru(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 6:kl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||au||qm(xm(c.ownerDocument),a.type,c),Ru(i,a,n),s&&r===null&&o&4&&Nl(a),El(a,a.return);break;case 12:Ru(i,a,n);break;case 31:Ru(i,a,n),s&&o&4&&Tu(i,a);break;case 13:Ru(i,a,n),s&&o&4&&Eu(i,a);break;case 22:a.memoizedState===null&&Ru(i,a,n),El(a,a.return);break;case 30:Ru(i,a,n),El(a,a.return);break;case 7:El(a,a.return);default:Ru(i,a,n)}t=t.sibling}}function zu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Na(n))}function Bu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Na(e))}function Vu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Hu(e,t,n,r),t=t.sibling;else i&&nu(t)}function Hu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&tu(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Vu(e,t,n,r),a&2048&&Sl(9,t);break;case 1:Vu(e,t,n,r);break;case 3:Vu(e,t,n,r),i&&pu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Na(a)));break;case 12:if(a&2048){Vu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){X(t,t.return,e)}}else Vu(e,t,n,r);break;case 31:Vu(e,t,n,r);break;case 13:Vu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&tu(t),o._visibility&2?Vu(e,t,n,r):(o._visibility|=2,Uu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&tu(s),o._visibility&2?Vu(e,t,n,r):Wu(e,t)),a&2048&&zu(s,t);break;case 24:Vu(e,t,n,r),a&2048&&Bu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Jl(a.child,!0),Jl(t.child,!0))),Vu(e,t,n,r);break;default:Vu(e,t,n,r)}}function Uu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Uu(a,o,s,c,i),Sl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Uu(a,o,s,c,i)):u._visibility&2?Uu(a,o,s,c,i):Wu(a,o),i&&l&2048&&zu(o.alternate,o);break;case 24:Uu(a,o,s,c,i),i&&l&2048&&Bu(o.alternate,o);break;default:Uu(a,o,s,c,i)}t=t.sibling}}function Wu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Wu(n,r),i&2048&&zu(r.alternate,r);break;case 24:Wu(n,r),i&2048&&Bu(r.alternate,r);break;default:Wu(n,r)}t=t.sibling}}var Gu=8192;function Ku(e,t,n){if(e.subtreeFlags&Gu)for(e=e.child;e!==null;)qu(e,t,n),e=e.sibling}function qu(e,t,n){switch(e.tag){case 26:Ku(e,t,n),e.flags&Gu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Qm(n,e)):$m(n,Au,e.memoizedState,e.memoizedProps));break;case 5:Ku(e,t,n),e.flags&Gu&&(e=e.stateNode,(t&335544128)===t&&Qm(n,e));break;case 3:case 4:var r=Au;Au=xm(e.stateNode.containerInfo),Ku(e,t,n),Au=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Gu,Gu=16777216,Ku(e,t,n),Gu=r):Ku(e,t,n));break;case 30:if((e.flags&Gu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Vl===null&&(Vl=new Map),Vl.set(r,i)}Ku(e,t,n);break;default:Ku(e,t,n)}}function Ju(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Yu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Qu(r,e)}Ju(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xu(e),e=e.sibling}function Xu(e){switch(e.tag){case 0:case 11:case 15:Yu(e),e.flags&2048&&Cl(9,e,e.return);break;case 3:Yu(e);break;case 12:Yu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zu(e)):Yu(e);break;default:Yu(e)}}function Zu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];lu=r,Qu(r,e)}Ju(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cl(8,t,t.return),Zu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Zu(t));break;default:Zu(t)}e=e.sibling}}function Qu(e,t){for(;lu!==null;){var n=lu;switch(n.tag){case 0:case 11:case 15:Cl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,lu=r;else a:for(n=e;lu!==null;){r=lu;var i=r.sibling,a=r.return;if(bu(r),r===n){lu=null;break a}if(i!==null){i.return=a,lu=i;break a}lu=a}}}var $u={getCacheForType:function(e){var t=Ea(ja),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ea(ja).controller.signal}},ed=typeof WeakMap==`function`?WeakMap:Map,G=0,td=null,K=null,q=0,nd=0,rd=null,id=!1,ad=!1,od=!1,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=null,hd=null,gd=!1,_d=0,vd=0,yd=1/0,bd=null,xd=null,Sd=0,Cd=null,wd=null,Td=0,Ed=0,Dd=null,Od=null,kd=null,Ad=null,jd=null,Md=0,Nd=null;function Pd(){return G&2&&q!==0?q&-q:I.T===null?bt():Pf()}function Fd(){if(fd===0){if(!(q&536870912)||z){var e=it;it<<=1,!(it&3932160)&&(it=262144),fd=e}else fd=536870912}return e=jo.current,e!==null&&(e.flags|=32),fd}function Id(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Fp(vi(e.memoizedProps,n))),Ad===null&&(Ad=[]),Ad.push(t.bind(null,r))}}function Ld(e,t,n){(e===td&&(nd===2||nd===9)||e.cancelPendingCommit!==null)&&(Wd(e,0),Vd(e,q,fd,!1)),pt(e,n),(!(G&2)||e!==td)&&(e===td&&(!(G&2)&&(ud|=n),cd===4&&Vd(e,q,fd,!1)),Df(e))}function Rd(e,t,n){if(G&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||ct(e,t),a=r?Qd(e,t):Xd(e,t,!0),o=r;do{if(a===0){ad&&!r&&Vd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Bd(n)){a=Xd(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=md;var l=c.current.memoizedState.isDehydrated;if(l&&(Wd(c,s).flags|=256),s=Xd(c,s,!1),s!==2&&s!==6){if(od&&!l){c.errorRecoveryDisabledLanes|=o,ud|=o,a=4;break a}o=hd,hd=a,o!==null&&(hd===null?hd=o:hd.push.apply(hd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Wd(e,0),Vd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Vd(r,t,fd,!id);break a;case 2:hd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=_d+300-Ve(),10<a)){if(Vd(r,t,fd,!id),st(r,0,!0)!==0)break a;Td=t,r.timeoutHandle=_p(zd.bind(null,r,n,hd,bd,gd,t,fd,ud,pd,id,o,`Throttled`,-0,0),a);break a}zd(r,n,hd,bd,gd,t,fd,ud,pd,id,o,null,-0,0)}break}while(1);Df(e)}function zd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;if(d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yn},Vl=null,qu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?_d-Ve():(a&4194048)===a?vd-Ve():0,m=eh(d,m),m!==null)){Td=a,e.cancelPendingCommit=m(of.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Vd(e,a,o,!l);return}of(e,t,a,n,r,i,o,s,c,l,u,d)}function Bd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vd(e,t,n,r){t=lt(e,t),t&=~dd,t&=~ud,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-$e(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ht(e,n,t)}function Hd(){return G&6?!0:(Of(0,!1),!1)}function Ud(){if(K!==null){if(nd===0)var e=K.return;else e=K,va=_a=null,os(e),ao=null,oo=0,e=K;for(;e!==null;)xl(e.alternate,e),e=e.return;K=null}}function Wd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,vp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Td=0,Ud(),td=e,K=n=Fi(e.current,null),q=t,nd=0,rd=null,id=!1,ad=ct(e,t),od=!1,pd=fd=dd=ud=ld=cd=0,hd=md=null,gd=!1,sd=lt(e,t),Ti(),n}function Gd(e,t){V=null,I.H=gc,t===Ya||t===Za?(t=ro(),nd=3):t===Xa?(t=ro(),nd=4):nd=t===Mc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,rd=t,K===null&&(cd=1,Ec(e,Ui(t,e.current)))}function Kd(){var e=jo.current;return e===null?!0:(q&4194048)===q?Mo===null:(q&62914560)===q||q&536870912?e===Mo:!1}function qd(){var e=I.H;return I.H=gc,e===null?gc:e}function Jd(){var e=I.A;return I.A=$u,e}function Yd(){cd=4,id||(q&4194048)!==q&&jo.current!==null||(ad=!0),!(ld&134217727)&&!(ud&134217727)||td===null||Vd(td,q,fd,!1)}function Xd(e,t,n){var r=G;G|=2;var i=qd(),a=Jd();(td!==e||q!==t)&&(bd=null,Wd(e,t)),t=!1;var o=cd;a:do try{if(nd!==0&&K!==null){var s=K,c=rd;switch(nd){case 8:Ud(),o=6;break a;case 3:case 2:case 9:case 6:jo.current===null&&(t=!0);var l=nd;if(nd=0,rd=null,nf(e,s,c,l),n&&ad){o=0;break a}break;default:l=nd,nd=0,rd=null,nf(e,s,c,l)}}Zd(),o=cd;break}catch(t){Gd(e,t)}while(1);return t&&e.shellSuspendCounter++,va=_a=null,G=r,I.H=i,I.A=a,K===null&&(td=null,q=0,Ti()),o}function Zd(){for(;K!==null;)ef(K)}function Qd(e,t){var n=G;G|=2;var r=qd(),a=Jd();td!==e||q!==t?(bd=null,yd=Ve()+500,Wd(e,t)):ad=ct(e,t);a:do try{if(nd!==0&&K!==null){t=K;var o=rd;b:switch(nd){case 1:nd=0,rd=null,nf(e,t,o,1);break;case 2:case 9:if($a(o)){nd=0,rd=null,tf(t);break}t=function(){nd!==2&&nd!==9||td!==e||(nd=7),Df(e)},o.then(t,t);break a;case 3:nd=7;break a;case 4:nd=5;break a;case 7:$a(o)?(nd=0,rd=null,tf(t)):(nd=0,rd=null,nf(e,t,o,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?Xm(s):c.stateNode.complete){nd=0,rd=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,rf(u))}break b}}nd=0,rd=null,nf(e,t,o,5);break;case 6:nd=0,rd=null,nf(e,t,o,6);break;case 8:Ud(),cd=6;break a;default:throw Error(i(462))}}$d();break}catch(t){Gd(e,t)}while(1);return va=_a=null,I.H=r,I.A=a,G=n,K===null?(td=null,q=0,Ti(),cd):0}function $d(){for(;K!==null&&!ze();)ef(K)}function ef(e){var t=fl(e.alternate,e,sd);e.memoizedProps=e.pendingProps,t===null?rf(e):K=t}function tf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=Kc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:os(t);var r=t;r===ia&&(z?(da(r),r.tag===5&&r.stateNode!=null&&(aa=r.stateNode)):(da(r),z=!0));default:xl(n,t),t=K=Ii(t,sd),t=fl(n,t,sd)}e.memoizedProps=e.pendingProps,t===null?rf(e):K=t}function nf(e,t,n,r){va=_a=null,os(t),ao=null,oo=0;var i=t.return;try{if(jc(e,i,t,n,q)){cd=1,Ec(e,Ui(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;cd=1,Ec(e,Ui(n,e.current)),K=null;return}t.flags&32768?(z||r===1?e=!0:ad||q&536870912?e=!1:(id=e=!0,(r===2||r===9||r===3||r===6)&&(r=jo.current,r!==null&&r.tag===13&&(r.flags|=16384))),af(t,e)):rf(t)}function rf(e){var t=e;do{if(t.flags&32768){af(t,id);return}e=t.return;var n=yl(t.alternate,t,sd);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);cd===0&&(cd=5)}function af(e,t){do{var n=bl(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);cd=6,K=null}function of(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do Y();while(Sd!==0);if(G&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===td&&(K=td=null,q=0),wd=t,Cd=e,Td=n,Dd=a,Od=r,sf(e,t,n,s,c,l,f)}}function sf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ed=s,s|=wi,mt(e,n,s,r,i,a),Ad=null,(n&335544064)===n?(jd=Ia(e),r=10262):(jd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,bf(Ge,function(){return pf(),null})):(e.callbackNode=null,e.callbackPriority=0),Bl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=I.T,I.T=null,i=L.p,L.p=2,a=G,G|=4;try{mu(e,t,n)}finally{G=a,L.p=i,I.T=r}}Sd=1,Bl?kd=Np(o,e.containerInfo,jd,uf,df,lf,ff,pf,cf,null,null):(uf(),df(),ff())}function cf(e){if(Sd!==0){var t=Cd.onRecoverableError;t(e,{componentStack:null})}}function lf(){Sd===3&&(Sd=0,Fu(wd,Cd),Sd=4)}function uf(){if(Sd===1){Sd=0;var e=Cd,t=wd,n=Td,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=I.T,I.T=null;var i=L.p;L.p=2;var a=G;G|=4;try{du=fu=!1,ju(t,e,n),n=lp;var o=Jr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&qr(s.ownerDocument.documentElement,s)){if(c!==null&&Yr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Kr(s,h),v=Kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!cp,lp=cp=null}finally{G=a,L.p=i,I.T=r}}e.current=t,Sd=2}}function df(){if(Sd===2){Sd=0;var e=Cd,t=wd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=G;G|=4;try{gu(e,t.alternate,t)}finally{G=i,L.p=r,I.T=n}}Sd=3}}function ff(){if(Sd===4||Sd===3){Sd=0;var e=kd;kd=null,Be();var t=Cd,n=wd,r=Td,i=Od,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Sd=5:(Sd=0,wd=Cd=null,J(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(xd=null),yt(r),n=n.stateNode,Ze&&typeof Ze.onCommitFiberRoot==`function`)try{Ze.onCommitFiberRoot(Xe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=I.T,a=L.p,L.p=2,I.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{I.T=n,L.p=a}}if(i=Ad,o=jd,jd=null,i!==null&&(Ad=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Td&3&&Y(),Df(t),a=t.pendingLanes,r&261930&&a&42?t===Nd?Md++:(Md=0,Nd=t):(Md=0,Nd=null),Of(0,!1)}}function J(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Na(t)))}function Y(){return kd!==null&&(kd.skipTransition(),kd=null),uf(),df(),ff(),pf()}function pf(){if(Sd!==5)return!1;var e=Cd,t=Ed;Ed=0;var n=yt(Td),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=Dd,Dd=null;var o=Cd,s=Td;if(Sd=0,wd=Cd=null,Td=0,G&6)throw Error(i(331));var c=G;if(G|=4,Xu(o.current),Hu(o,o.current,s,n),G=c,Of(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot==`function`)try{Ze.onPostCommitFiberRoot(Xe,o)}catch{}return!0}finally{L.p=a,I.T=r,J(e,t)}}function mf(e,t,n){t=Ui(n,t),t=Oc(e.stateNode,t,2),e=vo(e,t,2),e!==null&&(pt(e,2),Df(e))}function X(e,t,n){if(e.tag===3)mf(e,e,n);else for(;t!==null;){if(t.tag===3){mf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(xd===null||!xd.has(r))){e=Ui(n,e),n=kc(2),r=vo(t,n,2),r!==null&&(Ac(n,r,t,e),pt(r,2),Df(r));break}}t=t.return}}function hf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ed;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(od=!0,i.add(n),e=gf.bind(null,e,t,n),t.then(e,e))}function gf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,td===e&&(q&n)===n&&(cd===4||cd===3&&(q&62914560)===q&&300>Ve()-_d?G&2?dd|=n:Wd(e,0):dd|=n,pd===q&&(pd=0)),Df(e)}function _f(e,t){t===0&&(t=dt()),e=Oi(e,t),e!==null&&(pt(e,t),Df(e))}function vf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_f(e,n)}function yf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),_f(e,n)}function bf(e,t){return Le(e,t)}var xf=null,Sf=null,Cf=!1,wf=!1,Tf=!1,Ef=0;function Df(e){e!==Sf&&e.next===null&&(Sf===null?xf=Sf=e:Sf=Sf.next=e),wf=!0,Cf||(Cf=!0,Z())}function Of(e,t){if(!Tf&&wf){Tf=!0;do for(var n=!1,r=xf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-$e(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Nf(r,a))}else a=q,a=st(r,r===td?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ct(r,a)||(n=!0,Nf(r,a))}r=r.next}while(n);Tf=!1}}function kf(){Af()}function Af(){wf=Cf=!1;var e=0;Ef!==0&&gp()&&(e=Ef);for(var t=Ve(),n=null,r=xf;r!==null;){var i=r.next,a=jf(r,t);a===0?(r.next=null,n===null?xf=i:n.next=i,i===null&&(Sf=n)):(n=r,(e!==0||a&3)&&(wf=!0)),r=i}Sd!==0&&Sd!==5||Of(e,!1),Ef!==0&&(Ef=0)}function jf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-$e(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=ut(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=td,n=q,n=st(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(nd===2||nd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Re(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ct(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Re(r),yt(n)){case 2:case 8:n=We;break;case 32:n=Ge;break;case 268435456:n=qe;break;default:n=Ge}return r=Mf.bind(null,e),n=Le(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Re(r),e.callbackPriority=2,e.callbackNode=null,2}function Mf(e,t){if(Sd!==0&&Sd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Y()&&e.callbackNode!==n)return null;var r=q;return r=st(e,e===td?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Rd(e,r,t),jf(e,Ve()),e.callbackNode!=null&&e.callbackNode===n?Mf.bind(null,e):null)}function Nf(e,t){if(Y())return null;Rd(e,t,!0)}function Z(){xp(function(){G&6?Le(Ue,kf):Af()})}function Pf(){if(Ef===0){var e=za;e===0&&(e=rt,rt<<=1,!(rt&261888)&&(rt=256)),Ef=e}return Ef}function Ff(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:vn(e)}function If(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Ff((i[wt]||null).action),o=r.submitter;o&&(t=(t=o[wt]||null)?Ff(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Bn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ef!==0){var e=new FormData(i,o);nc(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),nc(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Lf=0;Lf<hi.length;Lf++){var Rf=hi[Lf];gi(Rf.toLowerCase(),`on`+(Rf[0].toUpperCase()+Rf.slice(1)))}gi(si,`onAnimationEnd`),gi(ci,`onAnimationIteration`),gi(li,`onAnimationStart`),gi(`dblclick`,`onDoubleClick`),gi(`focusin`,`onFocus`),gi(`focusout`,`onBlur`),gi(ui,`onTransitionRun`),gi(di,`onTransitionStart`),gi(fi,`onTransitionCancel`),gi(pi,`onTransitionEnd`),Ht(`onMouseEnter`,[`mouseout`,`mouseover`]),Ht(`onMouseLeave`,[`mouseout`,`mouseover`]),Ht(`onPointerEnter`,[`pointerout`,`pointerover`]),Ht(`onPointerLeave`,[`pointerout`,`pointerover`]),Vt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Vt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Vt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Vt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Vt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var zf=`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(` `),Bf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(zf));function Vf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){xi(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[Et];n===void 0&&(n=t[Et]=new Set);var r=e+`__bubble`;n.has(r)||(Gf(t,e,2,!1),n.add(r))}function Hf(e,t,n){var r=0;t&&(r|=4),Gf(n,e,r,t)}var Uf=`_reactListening`+Math.random().toString(36).slice(2);function Wf(e){if(!e[Uf]){e[Uf]=!0,zt.forEach(function(t){t!==`selectionchange`&&(Bf.has(t)||Hf(t,!1,e),Hf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uf]||(t[Uf]=!0,Hf(`selectionchange`,!1,t))}}function Gf(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!kn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Kf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Nt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}En(function(){var r=a,i=xn(n),s=[];a:{var c=mi.get(e);if(c!==void 0){var l=Bn,u=e;switch(e){case`keypress`:if(Fn(n)===0)break a;case`keydown`:case`keyup`:l=ir;break;case`focusin`:u=`focus`,l=Yn;break;case`focusout`:u=`blur`,l=Yn;break;case`beforeblur`:case`afterblur`:l=Yn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=qn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=sr;break;case si:case ci:case li:l=Xn;break;case pi:l=cr;break;case`scroll`:case`scrollend`:l=Hn;break;case`wheel`:l=lr;break;case`copy`:case`cut`:case`paste`:l=Zn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=ar;break;case`submit`:l=or;break;case`toggle`:case`beforetoggle`:l=ur}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Dn(m,p),g!=null&&d.push(qf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==bn&&(u=n.relatedTarget||n.fromElement)&&(Nt(u)||u[Tt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Nt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=qn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=ar,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ft(c),h=l==null?u:Ft(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Nt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Yf):null,c!==null&&Xf(s,u,c,d,!1),l!==null&&f!==null&&Xf(s,f,l,d,!0)))}a:{if(c=r?Ft(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Ar;else if(wr(c)){if(jr)_=Br;else{_=Rr;var v=Lr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&hn(r.elementType)&&(_=Ar):_=zr;if(_&&=_(e,r)){Tr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ft(r):window,e){case`focusin`:(wr(v)||v.contentEditable===`true`)&&(Zr=v,Qr=r,$r=null);break;case`focusout`:$r=Qr=Zr=null;break;case`mousedown`:ei=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:ei=!1,ti(s,n,i);break;case`selectionchange`:if(Xr)break;case`keydown`:case`keyup`:ti(s,n,i)}var y;if(fr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else br?vr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(hr&&n.locale!==`ko`&&(br||b!==`onCompositionStart`?b===`onCompositionEnd`&&br&&(y=Pn()):(jn=i,Mn=`value`in jn?jn.value:jn.textContent,br=!0)),v=Jf(r,b),0<v.length&&(b=new Qn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=yr(n),y!==null&&(b.data=y)))),(y=mr?xr(e,n):Sr(e,n))&&(b=Jf(r,`onBeforeInput`),0<b.length&&(v=new Qn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),If(s,e,r,n,i)}Vf(s,t)})}function qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Dn(e,n),i!=null&&r.unshift(qf(e,i,a)),i=Dn(e,t),i!=null&&r.push(qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Yf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Dn(n,a),l!=null&&o.unshift(qf(n,l,c))):i||(l=Dn(n,a),l!=null&&o.push(qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zf=/\r\n?/g,Qf=/\u0000|\uFFFD/g;function $f(e){return(typeof e==`string`?e:``+e).replace(Zf,`
9
- `).replace(Qf,``)}function ep(e,t){return t=$f(t),$f(e)===t}function tp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||dn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&dn(e,``+r);else return;break;case`className`:Yt(e,`class`,r);break;case`tabIndex`:Yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Yt(e,n,r);break;case`style`:mn(e,r,o);return;case`data`:if(t!==`object`){Yt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=vn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&tp(e,t,`name`,a.name,a,null),tp(e,t,`formEncType`,a.formEncType,a,null),tp(e,t,`formMethod`,a.formMethod,a,null),tp(e,t,`formTarget`,a.formTarget,a,null)):(tp(e,t,`encType`,a.encType,a,null),tp(e,t,`method`,a.method,a,null),tp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=vn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=yn);return;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=vn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`: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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Jt(e,`popover`,r);break;case`xlinkActuate`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Xt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Jt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=gn.get(n)||n,Jt(e,n,r);else return}R=!0}function np(e,t,n,r,a,o){switch(n){case`style`:mn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)dn(e,r);else if(typeof r==`number`||typeof r==`bigint`)dn(e,``+r);else return;break;case`onScroll`:r!=null&&Q(`scroll`,e);return;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=yn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Bt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[wt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}R=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Jt(e,n,r)}return}R=!0}function rp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:tp(e,t,o,s,n,null)}}a&&tp(e,t,`srcSet`,n.srcSet,n,null),r&&tp(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:tp(e,t,r,d,n,null)}}on(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:tp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&cn(e,!!r,n,!0):cn(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:tp(e,t,s,c,n,null)}un(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:tp(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<zf.length;r++)Q(zf[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:tp(e,t,u,r,n,null)}return;default:if(hn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&np(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&tp(e,t,c,r,n,null))}var ip={};function ap(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||tp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(R=!0),o=m;break;case`name`:m!==f&&(R=!0),a=m;break;case`checked`:m!==f&&(R=!0),u=m;break;case`defaultChecked`:m!==f&&(R=!0),d=m;break;case`value`:m!==f&&(R=!0),s=m;break;case`defaultValue`:m!==f&&(R=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&tp(e,t,p,m,r,f)}}an(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||tp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(R=!0),p=o;break;case`defaultValue`:o!==l&&(R=!0),c=o;break;case`multiple`:o!==l&&(R=!0),s=o;default:o!==l&&tp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?cn(e,!!n,n?[]:``,!1):cn(e,!!n,t,!0)):cn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:tp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(R=!0),p=a;break;case`defaultValue`:a!==o&&(R=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&tp(e,t,s,a,r,o)}ln(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:tp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(R=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:tp(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&tp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:tp(e,t,u,p,r,m)}return;default:if(hn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&np(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||np(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&tp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||tp(e,t,f,p,r,m)}function op(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function sp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&op(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&op(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var cp=null,lp=null;function up(e){return e.nodeType===9?e:e.ownerDocument}function dp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function fp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function pp(e,t,n,r){return n=up(n).createElement(e),n[Ct]=r,n[wt]=t,rp(n,e,t),Lt(n),n}function mp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var hp=null;function gp(){var e=window.event;return e&&e.type===`popstate`?e!==hp&&(hp=e,!0):(hp=null,!1)}var _p=typeof setTimeout==`function`?setTimeout:void 0,vp=typeof clearTimeout==`function`?clearTimeout:void 0,yp=typeof Promise==`function`?Promise:void 0,bp=typeof requestAnimationFrame==`function`?requestAnimationFrame:_p,xp=typeof queueMicrotask==`function`?queueMicrotask:yp===void 0?_p:function(e){return yp.resolve(null).then(e).catch(Sp)};function Sp(e){setTimeout(function(){throw e})}function Cp(e){return e===`head`}function wp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[At]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vm(e.ownerDocument.body)}n=i}while(n);Hh(t)}function Tp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Ep(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Dp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Op(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function kp(e){return Op(e.getBoundingClientRect(),getComputedStyle(e),e)}function Ap(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Op(t,n,e)}function jp(e){return e.documentElement.clientHeight}function Mp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Np(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(jp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Zm(f),u>$){s.length=o;break}f=new Promise(Mp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Pp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Pp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Pp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Fp(e){return{name:e,group:new Pp(`group`,e),imagePair:new Pp(`image-pair`,e),old:new Pp(`old`,e),new:new Pp(`new`,e)}}function Ip(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Ip.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Vp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=zp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),h(this._fragmentFiber.child,!1,Lp,e,s,r)}this._eventListeners=a}};function Lp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Ip.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Vp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=zp(i.optionsOrUseCapture),h(this._fragmentFiber.child,!1,Rp,e,n,i),r.splice(t,1),a!==null&&a()}};function Rp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function zp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Bp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Vp(e,t,n,r){if(e.length===0)return-1;r=Bp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Bp(a.optionsOrUseCapture)===r)return i}return-1}Ip.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Ip.prototype.focus=function(e){h(this._fragmentFiber.child,!0,Hp,e,void 0,void 0)};function Hp(e,t){return e.tag!==6&&(e=b(e),mm(e,t))}Ip.prototype.focusLast=function(e){var t=[];h(this._fragmentFiber.child,!0,Up,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Hp(t[n],e);n--);};function Up(e,t){return t.push(e),!1}Ip.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=up(e).activeElement,e!==null&&h(this._fragmentFiber.child,!1,Wp,e,void 0,void 0))};function Wp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Ip.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),h(this._fragmentFiber.child,!1,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag!==6&&(e=b(e),t.observe(e),!1)}Ip.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),h(this._fragmentFiber.child,!1,Kp,e,void 0,void 0);for(var n=t=0;n<qp.length;n++){var r=qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):qp[t++]=r}qp.length=t}};function Kp(e,t){return e.tag!==6&&(e=b(e),t.unobserve(e),!1)}var qp=[],Jp=!1;function Yp(e,t,n){qp.push({fragmentInstance:e,observer:t,instance:n}),Jp||(Jp=!0,hm(function(){Jp=!1;var e=qp;qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Ip.prototype.getClientRects=function(){var e=[];return h(this._fragmentFiber.child,!1,Xp,e,void 0,void 0),e};function Xp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Ip.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Ip.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];h(this._fragmentFiber.child,!1,Up,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Zp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Zp(e,t,n,r,i){var a=Nt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(h(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(h(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Qp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Ip.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];h(this._fragmentFiber.child,!1,Up,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Qp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Qp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function $p(e,t){return e=b(e),em(e,t),!1}function em(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<qp.length;i++){var a=qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(qp[r++]=a)}qp.length=r,n.observe(e)}),em(e,t))}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Yp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function rm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rm(n),Mt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function im(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[At])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=um(e.nextSibling),e===null)break}return null}function am(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=um(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=um(e.nextSibling),e===null))return null;return e}function sm(e){return e.data===`$?`||e.data===`$~`}function cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function um(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var dm=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return um(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function hm(e){bp(function(){bp(function(t){return e(t)})})}function gm(e,t,n){switch(t=up(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function _m(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&tp(e,t,r,null,ip,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===yn&&(e.onclick=null),Mt(e)}function vm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Mt(e)}var ym=new Map,bm=new Set;function xm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sm=L.d;L.d={f:Cm,r:wm,D:Dm,C:Om,L:km,m:Am,X:Mm,S:jm,M:Nm};function Cm(){var e=Sm.f(),t=Hd();return e||t}function wm(e){var t=Pt(e);t!==null&&t.tag===5&&t.type===`form`?ic(t):Sm.r(e)}var Tm=typeof document>`u`?null:document;function Em(e,t,n){var r=Tm;if(r&&typeof t==`string`&&t){var i=rn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bm.has(i)||(bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),rp(t,`link`,e),Lt(t),r.head.appendChild(t)))}}function Dm(e){Sm.D(e),Em(`dns-prefetch`,e,null)}function Om(e,t){Sm.C(e,t),Em(`preconnect`,e,t)}function km(e,t,n){Sm.L(e,t,n);var r=Tm;if(r&&e&&t){var i=`link[rel="preload"][as="`+rn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+rn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+rn(n.imageSizes)+`"]`)):i+=`[href="`+rn(e)+`"]`;var a=i;switch(t){case`style`:a=Fm(e);break;case`script`:a=zm(e)}if(!(ym.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),ym.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Im(a))||t===`script`&&r.querySelector(Bm(a))))){var o=r.createElement(`link`);rp(o,`link`,e),t===`style`&&(o[jt]=!0,o.onload=o.onerror=function(){Rt(o)}),Lt(o),r.head.appendChild(o)}}}function Am(e,t){Sm.m(e,t);var n=Tm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+rn(r)+`"][href="`+rn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zm(e)}if(!ym.has(a)&&(e=D({rel:`modulepreload`,href:e},t),ym.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bm(a)))return}r=n.createElement(`link`),rp(r,`link`,e),Lt(r),n.head.appendChild(r)}}}function jm(e,t,n){Sm.S(e,t,n);var r=Tm;if(r&&e){var i=It(r).hoistableStyles,a=Fm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Im(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=ym.get(a))&&Um(e,n);var c=o=r.createElement(`link`);Lt(c),rp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Hm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mm(e,t){Sm.X(e,t);var n=Tm;if(n&&e){var r=It(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=D({src:e,async:!0},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Lt(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t){Sm.M(e,t);var n=Tm;if(n&&e){var r=It(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Lt(a),rp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t,n,r){var a=(a=Ce.current)?xm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Fm(n.href),t=It(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Fm(n.href);var o=It(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Im(e)))?o._p||(s.instance=o,s.state.loading=5):(o=ym.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ym.set(e,o)),Rm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=zm(n),t=It(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Fm(e){return`href="`+rn(e)+`"`}function Im(e){return`link[rel="stylesheet"][`+e+`]`}function Lm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Rm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[jt]){r.loading=1;return}}else t=e.createElement(`link`),t[jt]=!0,t.onload=t.onerror=Rt.bind(null,t),rp(t,`link`,n),Lt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function zm(e){return`[src="`+rn(e)+`"]`}function Bm(e){return`script[async]`+e}function Vm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+rn(n.href)+`"]`);if(r)return t.instance=r,Lt(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Lt(r),rp(r,`style`,a),Hm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Fm(n.href);var o=e.querySelector(Im(a));if(o)return t.state.loading|=4,t.instance=o,Lt(o),o;r=Lm(n),(a=ym.get(a))&&Um(r,a),o=(e.ownerDocument||e).createElement(`link`),Lt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),rp(o,`link`,r),t.state.loading|=4,Hm(o,n.precedence,e),t.instance=o;case`script`:return o=zm(n.src),(a=e.querySelector(Bm(o)))?(t.instance=a,Lt(a),a):(r=n,(a=ym.get(o))&&(r=D({},n),Wm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Lt(a),rp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hm(r,n.precedence,e));return t.instance}function Hm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gm=null;function Km(e,t,n){if(Gm===null){var r=new Map,i=Gm=new Map;i.set(n,r)}else i=Gm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[At]||a[Ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Ym(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Xm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Zm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Qm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Zm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function $m(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Fm(r.href),a=t.querySelector(Im(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Lt(a);return}a=t.ownerDocument||t,r=Lm(r),(i=ym.get(i))&&Um(r,i),a=a.createElement(`link`),Lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),rp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$===0&&($=62500*sp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:P,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ft(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.hiddenUpdates=ft(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ni(3,null,null,t),e.current=a,a.stateNode=e,t=Ma(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ho(a),e}function uh(e){return e?(e=ji,e):ji}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=_o(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=vo(e,r,t),n!==null&&(Ld(n,e,t),yo(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Oi(e,67108864);t!==null&&Ld(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Pd();t=vt(t);var n=Oi(e,t);n!==null&&Ld(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,yh(e,t,n,r)}finally{L.p=a,I.T=i}}function vh(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,yh(e,t,n,r)}finally{L.p=a,I.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Kf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Pt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=ot(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-$e(o);s.entanglements[1]|=c,o&=~c}Df(a),!(G&6)&&(yd=Ve()+500,Of(0,!1))}}break;case 31:case 13:s=Oi(a,2),s!==null&&Ld(s,a,2),Hd(),ph(a,2)}if(a=bh(r),a===null&&Kf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Kf(e,t,r,null,n)}}function bh(e){return e=xn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=Nt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`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`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(He()){case Ue:return 2;case We:return 8;case Ge:case Ke:return 32;case qe:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Pt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=Nt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,xt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,xt(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bn=r,n.target.dispatchEvent(r),bn=null}else return t=Pt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=Pt(n);a!==null&&(e.splice(t,3),t-=3,nc(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[wt]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[wt]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,Pd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Hd(),t[Tt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=bt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.0`)throw Error(i(527,Kh,`19.3.0`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Xe=Jh.inject(qh),Ze=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Cc,s=wc,c=Tc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[Tt]=t.current,Wf(e),new Wh(t)}})),g=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),v=o(((e,t)=>{t.exports=_()})),y=c(u(),1),b=c(g(),1),x=v();function S(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=S(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var C={value:()=>{}};function w(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new T(n)}function T(e){this._=e}function E(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}T.prototype=w.prototype={constructor:T,on:function(e,t){var n=this._,r=E(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=D(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=O(n[i],e.name,t);else if(t==null)for(i in n)n[i]=O(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new T(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function D(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function O(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=C,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var k={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function A(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),k.hasOwnProperty(t)?{space:k[t],local:e}:e}function j(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function M(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ee(e){var t=A(e);return(t.local?M:j)(t)}function N(){}function P(e){return e==null?N:function(){return this.querySelector(e)}}function te(e){typeof e!=`function`&&(e=P(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new Bt(r,this._parents)}function ne(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function re(){return[]}function ie(e){return e==null?re:function(){return this.querySelectorAll(e)}}function F(e){return function(){return ne(e.apply(this,arguments))}}function ae(e){e=typeof e==`function`?F(e):ie(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new Bt(r,i)}function oe(e){return function(){return this.matches(e)}}function se(e){return function(t){return t.matches(e)}}var ce=Array.prototype.find;function le(e){return function(){return ce.call(this.children,e)}}function ue(){return this.firstElementChild}function de(e){return this.select(e==null?ue:le(typeof e==`function`?e:se(e)))}var fe=Array.prototype.filter;function pe(){return Array.from(this.children)}function me(e){return function(){return fe.call(this.children,e)}}function I(e){return this.selectAll(e==null?pe:me(typeof e==`function`?e:se(e)))}function L(e){typeof e!=`function`&&(e=oe(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Bt(r,this._parents)}function he(e){return Array(e.length)}function ge(){return new Bt(this._enter||this._groups.map(he),this._parents)}function _e(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}_e.prototype={constructor:_e,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function ve(e){return function(){return e}}function ye(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new _e(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function be(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new _e(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function xe(e){return e.__data__}function Se(e,t){if(!arguments.length)return Array.from(this,xe);var n=t?be:ye,r=this._parents,i=this._groups;typeof e!=`function`&&(e=ve(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=Ce(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new Bt(o,r),o._enter=s,o._exit=c,o}function Ce(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function we(){return new Bt(this._exit||this._groups.map(he),this._parents)}function Te(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Ee(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Bt(s,this._parents)}function De(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Oe(e){e||=ke;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new Bt(i,this._parents).order()}function ke(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ae(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function je(){return Array.from(this)}function Me(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Ne(){let e=0;for(let t of this)++e;return e}function Pe(){return!this.node()}function Fe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Ie(e){return function(){this.removeAttribute(e)}}function Le(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Re(e,t){return function(){this.setAttribute(e,t)}}function ze(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Be(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Ve(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function He(e,t){var n=A(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Le:Ie:typeof t==`function`?n.local?Ve:Be:n.local?ze:Re)(n,t))}function Ue(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function We(e){return function(){this.style.removeProperty(e)}}function Ge(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ke(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function qe(e,t,n){return arguments.length>1?this.each((t==null?We:typeof t==`function`?Ke:Ge)(e,t,n??``)):Je(this.node(),e)}function Je(e,t){return e.style.getPropertyValue(t)||Ue(e).getComputedStyle(e,null).getPropertyValue(t)}function Ye(e){return function(){delete this[e]}}function Xe(e,t){return function(){this[e]=t}}function Ze(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Qe(e,t){return arguments.length>1?this.each((t==null?Ye:typeof t==`function`?Ze:Xe)(e,t)):this.node()[e]}function $e(e){return e.trim().split(/^|\s+/)}function et(e){return e.classList||new tt(e)}function tt(e){this._node=e,this._names=$e(e.getAttribute(`class`)||``)}tt.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function nt(e,t){for(var n=et(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function rt(e,t){for(var n=et(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function it(e){return function(){nt(this,e)}}function at(e){return function(){rt(this,e)}}function ot(e,t){return function(){(t.apply(this,arguments)?nt:rt)(this,e)}}function st(e,t){var n=$e(e+``);if(arguments.length<2){for(var r=et(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?ot:t?it:at)(n,t))}function ct(){this.textContent=``}function lt(e){return function(){this.textContent=e}}function ut(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function dt(e){return arguments.length?this.each(e==null?ct:(typeof e==`function`?ut:lt)(e)):this.node().textContent}function ft(){this.innerHTML=``}function pt(e){return function(){this.innerHTML=e}}function mt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function ht(e){return arguments.length?this.each(e==null?ft:(typeof e==`function`?mt:pt)(e)):this.node().innerHTML}function gt(){this.nextSibling&&this.parentNode.appendChild(this)}function _t(){return this.each(gt)}function vt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yt(){return this.each(vt)}function bt(e){var t=typeof e==`function`?e:ee(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function xt(){return null}function St(e,t){var n=typeof e==`function`?e:ee(e),r=t==null?xt:typeof t==`function`?t:P(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Ct(){var e=this.parentNode;e&&e.removeChild(this)}function wt(){return this.each(Ct)}function Tt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Et(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Dt(e){return this.select(e?Et:Tt)}function Ot(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function kt(e){return function(t){e.call(this,t,this.__data__)}}function At(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function jt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Mt(e,t,n){return function(){var r=this.__on,i,a=kt(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Nt(e,t,n){var r=At(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Mt:jt,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Pt(e,t,n){var r=Ue(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Ft(e,t){return function(){return Pt(this,e,t)}}function It(e,t){return function(){return Pt(this,e,t.apply(this,arguments))}}function Lt(e,t){return this.each((typeof t==`function`?It:Ft)(e,t))}function*Rt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var zt=[null];function Bt(e,t){this._groups=e,this._parents=t}function Vt(){return new Bt([[document.documentElement]],zt)}function Ht(){return this}Bt.prototype=Vt.prototype={constructor:Bt,select:te,selectAll:ae,selectChild:de,selectChildren:I,filter:L,data:Se,enter:ge,exit:we,join:Te,merge:Ee,selection:Ht,order:De,sort:Oe,call:Ae,nodes:je,node:Me,size:Ne,empty:Pe,each:Fe,attr:He,style:qe,property:Qe,classed:st,text:dt,html:ht,raise:_t,lower:yt,append:bt,insert:St,remove:wt,clone:Dt,datum:Ot,on:Nt,dispatch:Lt,[Symbol.iterator]:Rt};function Ut(e){return typeof e==`string`?new Bt([[document.querySelector(e)]],[document.documentElement]):new Bt([[e]],zt)}function Wt(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Gt(e,t){if(e=Wt(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var Kt={passive:!1},R={capture:!0,passive:!1};function qt(e){e.stopImmediatePropagation()}function Jt(e){e.preventDefault(),e.stopImmediatePropagation()}function Yt(e){var t=e.document.documentElement,n=Ut(e).on(`dragstart.drag`,Jt,R);`onselectstart`in t?n.on(`selectstart.drag`,Jt,R):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function Xt(e,t){var n=e.document.documentElement,r=Ut(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,Jt,R),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Zt=e=>()=>e;function Qt(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}Qt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function $t(e){return!e.ctrlKey&&!e.button}function en(){return this.parentNode}function tn(e,t){return t??{x:e.x,y:e.y}}function nn(){return navigator.maxTouchPoints||`ontouchstart`in this}function rn(){var e=$t,t=en,n=tn,r=nn,i={},a=w(`start`,`drag`,`end`),o=0,s,c,l,u,d=0;function f(e){e.on(`mousedown.drag`,p).filter(r).on(`touchstart.drag`,g).on(`touchmove.drag`,_,Kt).on(`touchend.drag touchcancel.drag`,v).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function p(n,r){if(!u&&e.call(this,n,r)){var i=y(this,t.call(this,n,r),n,r,`mouse`);i&&(Ut(n.view).on(`mousemove.drag`,m,R).on(`mouseup.drag`,h,R),Yt(n.view),qt(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function m(e){if(Jt(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>d}i.mouse(`drag`,e)}function h(e){Ut(e.view).on(`mousemove.drag mouseup.drag`,null),Xt(e.view,l),Jt(e),i.mouse(`end`,e)}function g(n,r){if(e.call(this,n,r))for(var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s=0,c;s<o;++s)(c=y(this,a,n,r,i[s].identifier,i[s]))&&(qt(n),c(`start`,n,i[s]))}function _(e){for(var t=e.changedTouches,n=t.length,r=0,a;r<n;++r)(a=i[t[r].identifier])&&(Jt(e),a(`drag`,e,t[r]))}function v(e){var t=e.changedTouches,n=t.length,r,a;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&(qt(e),a(`end`,e,t[r]))}function y(e,t,r,s,c,l){var u=a.copy(),d=Gt(l||r,t),p,m,h;if((h=n.call(e,new Qt(`beforestart`,{sourceEvent:r,target:f,identifier:c,active:o,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),s))!=null)return p=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,a,l){var g=d,_;switch(r){case`start`:i[c]=n,_=o++;break;case`end`:delete i[c],--o;case`drag`:d=Gt(l||a,t),_=o}u.call(r,e,new Qt(r,{sourceEvent:a,subject:h,target:f,identifier:c,active:_,x:d[0]+p,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),s)}}return f.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Zt(!!t),f):e},f.container=function(e){return arguments.length?(t=typeof e==`function`?e:Zt(e),f):t},f.subject=function(e){return arguments.length?(n=typeof e==`function`?e:Zt(e),f):n},f.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:Zt(!!e),f):r},f.on=function(){var e=a.on.apply(a,arguments);return e===a?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}function an(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function on(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function sn(){}var cn=.7,ln=1/cn,un=`\\s*([+-]?\\d+)\\s*`,dn=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,fn=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,pn=/^#([0-9a-f]{3,8})$/,mn=RegExp(`^rgb\\(${un},${un},${un}\\)$`),hn=RegExp(`^rgb\\(${fn},${fn},${fn}\\)$`),gn=RegExp(`^rgba\\(${un},${un},${un},${dn}\\)$`),_n=RegExp(`^rgba\\(${fn},${fn},${fn},${dn}\\)$`),vn=RegExp(`^hsl\\(${dn},${fn},${fn}\\)$`),yn=RegExp(`^hsla\\(${dn},${fn},${fn},${dn}\\)$`),bn={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};an(sn,Tn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xn,formatHex:xn,formatHex8:Sn,formatHsl:Cn,formatRgb:wn,toString:wn});function xn(){return this.rgb().formatHex()}function Sn(){return this.rgb().formatHex8()}function Cn(){return Rn(this).formatHsl()}function wn(){return this.rgb().formatRgb()}function Tn(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=pn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?En(t):n===3?new An(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Dn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Dn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=mn.exec(e))?new An(t[1],t[2],t[3],1):(t=hn.exec(e))?new An(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=gn.exec(e))?Dn(t[1],t[2],t[3],t[4]):(t=_n.exec(e))?Dn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vn.exec(e))?Ln(t[1],t[2]/100,t[3]/100,1):(t=yn.exec(e))?Ln(t[1],t[2]/100,t[3]/100,t[4]):bn.hasOwnProperty(e)?En(bn[e]):e===`transparent`?new An(NaN,NaN,NaN,0):null}function En(e){return new An(e>>16&255,e>>8&255,e&255,1)}function Dn(e,t,n,r){return r<=0&&(e=t=n=NaN),new An(e,t,n,r)}function On(e){return e instanceof sn||(e=Tn(e)),e?(e=e.rgb(),new An(e.r,e.g,e.b,e.opacity)):new An}function kn(e,t,n,r){return arguments.length===1?On(e):new An(e,t,n,r??1)}function An(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}an(An,kn,on(sn,{brighter(e){return e=e==null?ln:ln**+e,new An(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?cn:cn**+e,new An(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new An(Fn(this.r),Fn(this.g),Fn(this.b),Pn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:jn,formatHex:jn,formatHex8:Mn,formatRgb:Nn,toString:Nn}));function jn(){return`#${In(this.r)}${In(this.g)}${In(this.b)}`}function Mn(){return`#${In(this.r)}${In(this.g)}${In(this.b)}${In((isNaN(this.opacity)?1:this.opacity)*255)}`}function Nn(){let e=Pn(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Fn(this.r)}, ${Fn(this.g)}, ${Fn(this.b)}${e===1?`)`:`, ${e})`}`}function Pn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function In(e){return e=Fn(e),(e<16?`0`:``)+e.toString(16)}function Ln(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Bn(e,t,n,r)}function Rn(e){if(e instanceof Bn)return new Bn(e.h,e.s,e.l,e.opacity);if(e instanceof sn||(e=Tn(e)),!e)return new Bn;if(e instanceof Bn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Bn(o,s,c,e.opacity)}function zn(e,t,n,r){return arguments.length===1?Rn(e):new Bn(e,t,n,r??1)}function Bn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}an(Bn,zn,on(sn,{brighter(e){return e=e==null?ln:ln**+e,new Bn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?cn:cn**+e,new Bn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new An(Un(e>=240?e-240:e+120,i,r),Un(e,i,r),Un(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Bn(Vn(this.h),Hn(this.s),Hn(this.l),Pn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Pn(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Vn(this.h)}, ${Hn(this.s)*100}%, ${Hn(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function Vn(e){return e=(e||0)%360,e<0?e+360:e}function Hn(e){return Math.max(0,Math.min(1,e||0))}function Un(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Wn=e=>()=>e;function Gn(e,t){return function(n){return e+n*t}}function Kn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function qn(e){return(e=+e)==1?Jn:function(t,n){return n-t?Kn(t,n,e):Wn(isNaN(t)?n:t)}}function Jn(e,t){var n=t-e;return n?Gn(e,n):Wn(isNaN(e)?t:e)}var Yn=(function e(t){var n=qn(t);function r(e,t){var r=n((e=kn(e)).r,(t=kn(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Jn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Xn(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Zn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Qn(e,t){for(var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o=0;o<r;++o)i[o]=sr(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function $n(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function er(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function tr(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=sr(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var nr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,rr=new RegExp(nr.source,`g`);function ir(e){return function(){return e}}function ar(e){return function(t){return e(t)+``}}function or(e,t){var n=nr.lastIndex=rr.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=nr.exec(e))&&(i=rr.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:er(r,i)})),n=rr.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?ar(c[0].x):ir(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function sr(e,t){var n=typeof t,r;return t==null||n===`boolean`?Wn(t):(n===`number`?er:n===`string`?(r=Tn(t))?(t=r,Yn):or:t instanceof Tn?Yn:t instanceof Date?$n:Zn(t)?Xn:Array.isArray(t)?Qn:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?tr:er)(e,t)}var cr=180/Math.PI,lr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ur(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*cr,skewX:Math.atan(c)*cr,scaleX:o,scaleY:s}}var dr;function fr(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?lr:ur(t.a,t.b,t.c,t.d,t.e,t.f)}function pr(e){return e==null||(dr||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),dr.setAttribute(`transform`,e),!(e=dr.transform.baseVal.consolidate()))?lr:(e=e.matrix,ur(e.a,e.b,e.c,e.d,e.e,e.f))}function mr(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:er(e,i)},{i:c-2,x:er(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:er(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:er(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:er(e,n)},{i:s-2,x:er(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var hr=mr(fr,`px, `,`px)`,`deg)`),gr=mr(pr,`, `,`)`,`)`),_r=1e-12;function vr(e){return((e=Math.exp(e))+1/e)/2}function yr(e){return((e=Math.exp(e))-1/e)/2}function br(e){return((e=Math.exp(2*e))-1)/(e+1)}var xr=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<_r)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=vr(y),c=s/(n*g)*(i*br(t*r+y)-yr(y));return[a+c*d,o+c*f,s*i/vr(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),Sr=0,Cr=0,wr=0,Tr=1e3,Er,Dr,Or=0,kr=0,Ar=0,jr=typeof performance==`object`&&performance.now?performance:Date,Mr=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Nr(){return kr||=(Mr(Pr),jr.now()+Ar)}function Pr(){kr=0}function Fr(){this._call=this._time=this._next=null}Fr.prototype=Ir.prototype={constructor:Fr,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Nr():+n)+(t==null?0:+t),!this._next&&Dr!==this&&(Dr?Dr._next=this:Er=this,Dr=this),this._call=e,this._time=n,Vr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vr())}};function Ir(e,t,n){var r=new Fr;return r.restart(e,t,n),r}function Lr(){Nr(),++Sr;for(var e=Er,t;e;)(t=kr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Sr}function Rr(){kr=(Or=jr.now())+Ar,Sr=Cr=0;try{Lr()}finally{Sr=0,Br(),kr=0}}function zr(){var e=jr.now(),t=e-Or;t>Tr&&(Ar-=t,Or=e)}function Br(){for(var e,t=Er,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Er=n);Dr=e,Vr(r)}function Vr(e){Sr||(Cr&&=clearTimeout(Cr),e-kr>24?(e<1/0&&(Cr=setTimeout(Rr,e-jr.now()-Ar)),wr&&=clearInterval(wr)):(wr||=(Or=jr.now(),setInterval(zr,Tr)),Sr=1,Mr(Rr)))}function Hr(e,t,n){var r=new Fr;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Ur=w(`start`,`end`,`cancel`,`interrupt`),Wr=[];function Gr(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Yr(e,n,{name:t,index:r,group:i,on:Ur,tween:Wr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Kr(e,t){var n=Jr(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function qr(e,t){var n=Jr(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Jr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Yr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Ir(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return Hr(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(Hr(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Xr(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Zr(e){return this.each(function(){Xr(this,e)})}function Qr(e,t){var n,r;return function(){var i=qr(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function $r(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=qr(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function ei(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Jr(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Qr:$r)(n,e,t))}function ti(e,t,n){var r=e._id;return e.each(function(){var e=qr(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Jr(e,r).value[t]}}function ni(e,t){var n;return(typeof t==`number`?er:t instanceof Tn?Yn:(n=Tn(t))?(t=n,Yn):or)(e,t)}function ri(e){return function(){this.removeAttribute(e)}}function ii(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ai(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function oi(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function si(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function ci(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function li(e,t){var n=A(e),r=n===`transform`?gr:ni;return this.attrTween(e,typeof t==`function`?(n.local?ci:si)(n,r,ti(this,`attr.`+e,t)):t==null?(n.local?ii:ri)(n):(n.local?oi:ai)(n,r,t))}function ui(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function di(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function fi(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&di(e,i)),n}return i._value=t,i}function pi(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ui(e,i)),n}return i._value=t,i}function mi(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=A(e);return this.tween(n,(r.local?fi:pi)(r,t))}function hi(e,t){return function(){Kr(this,e).delay=+t.apply(this,arguments)}}function gi(e,t){return t=+t,function(){Kr(this,e).delay=t}}function _i(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?hi:gi)(t,e)):Jr(this.node(),t).delay}function vi(e,t){return function(){qr(this,e).duration=+t.apply(this,arguments)}}function yi(e,t){return t=+t,function(){qr(this,e).duration=t}}function bi(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?vi:yi)(t,e)):Jr(this.node(),t).duration}function xi(e,t){if(typeof t!=`function`)throw Error();return function(){qr(this,e).ease=t}}function Si(e){var t=this._id;return arguments.length?this.each(xi(t,e)):Jr(this.node(),t).ease}function Ci(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();qr(this,e).ease=n}}function wi(e){if(typeof e!=`function`)throw Error();return this.each(Ci(this._id,e))}function Ti(e){typeof e!=`function`&&(e=oe(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new ea(r,this._parents,this._name,this._id)}function Ei(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new ea(o,this._parents,this._name,this._id)}function Di(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Oi(e,t,n){var r,i,a=Di(t)?Kr:qr;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function ki(e,t){var n=this._id;return arguments.length<2?Jr(this.node(),n).on.on(e):this.each(Oi(n,e,t))}function Ai(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ji(){return this.on(`end.remove`,Ai(this._id))}function Mi(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=P(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,Gr(l[f],t,n,f,l,Jr(u,n)));return new ea(a,this._parents,t,n)}function Ni(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=ie(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Jr(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&Gr(p,t,n,h,f,m);a.push(f),o.push(u)}return new ea(a,o,t,n)}var Pi=Vt.prototype.constructor;function Fi(){return new Pi(this._groups,this._parents)}function Ii(e,t){var n,r,i;return function(){var a=Je(this,e),o=(this.style.removeProperty(e),Je(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function Li(e){return function(){this.style.removeProperty(e)}}function Ri(e,t,n){var r,i=n+``,a;return function(){var o=Je(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function zi(e,t,n){var r,i,a;return function(){var o=Je(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Je(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function Bi(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=qr(this,e),l=c.on,u=c.value[a]==null?s||=Li(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function Vi(e,t,n){var r=(e+=``)==`transform`?hr:ni;return t==null?this.styleTween(e,Ii(e,r)).on(`end.style.`+e,Li(e)):typeof t==`function`?this.styleTween(e,zi(e,r,ti(this,`style.`+e,t))).each(Bi(this._id,e)):this.styleTween(e,Ri(e,r,t),n).on(`end.style.`+e,null)}function Hi(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Ui(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Hi(e,a,n)),r}return a._value=t,a}function Wi(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,Ui(e,t,n??``))}function Gi(e){return function(){this.textContent=e}}function Ki(e){return function(){var t=e(this);this.textContent=t??``}}function qi(e){return this.tween(`text`,typeof e==`function`?Ki(ti(this,`text`,e)):Gi(e==null?``:e+``))}function Ji(e){return function(t){this.textContent=e.call(this,t)}}function Yi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ji(r)),t}return r._value=e,r}function Xi(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,Yi(e))}function Zi(){for(var e=this._name,t=this._id,n=ta(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Jr(c,t);Gr(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ea(r,this._parents,e,n)}function Qi(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=qr(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var $i=0;function ea(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ta(){return++$i}var na=Vt.prototype;ea.prototype={constructor:ea,select:Mi,selectAll:Ni,selectChild:na.selectChild,selectChildren:na.selectChildren,filter:Ti,merge:Ei,selection:Fi,transition:Zi,call:na.call,nodes:na.nodes,node:na.node,size:na.size,empty:na.empty,each:na.each,on:ki,attr:li,attrTween:mi,style:Vi,styleTween:Wi,text:qi,textTween:Xi,remove:ji,tween:ei,delay:_i,duration:bi,ease:Si,easeVarying:wi,end:Qi,[Symbol.iterator]:na[Symbol.iterator]};function ra(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ia={time:null,delay:0,duration:250,ease:ra};function aa(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function z(e){var t,n;e instanceof ea?(t=e._id,e=e._name):(t=ta(),(n=ia).time=Nr(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&Gr(c,e,t,l,o,n||aa(c,t));return new ea(r,this._parents,e,t)}Vt.prototype.interrupt=Zr,Vt.prototype.transition=z;var oa=e=>()=>e;function sa(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ca(e,t,n){this.k=e,this.x=t,this.y=n}ca.prototype={constructor:ca,scale:function(e){return e===1?this:new ca(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ca(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var la=new ca(1,0,0);ua.prototype=ca.prototype;function ua(e){for(;!e.__zoom;)if(!(e=e.parentNode))return la;return e.__zoom}function da(e){e.stopImmediatePropagation()}function fa(e){e.preventDefault(),e.stopImmediatePropagation()}function pa(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function ma(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function ha(){return this.__zoom||la}function ga(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function _a(){return navigator.maxTouchPoints||`ontouchstart`in this}function va(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function ya(){var e=pa,t=ma,n=va,r=ga,i=_a,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=xr,l=w(`start`,`zoom`,`end`),u,d,f,p=500,m=150,h=0,g=10;function _(e){e.property(`__zoom`,ha).on(`wheel.zoom`,T,{passive:!1}).on(`mousedown.zoom`,E).on(`dblclick.zoom`,D).filter(i).on(`touchstart.zoom`,O).on(`touchmove.zoom`,k).on(`touchend.zoom touchcancel.zoom`,A).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}_.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,ha),e===i?i.interrupt().each(function(){S(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):x(e,t,n,r)},_.scaleBy=function(e,t,n,r){_.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},_.scaleTo=function(e,r,i,a){_.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?b(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(y(v(a,l),s,c),e,o)},i,a)},_.translateBy=function(e,r,i,a){_.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},_.translateTo=function(e,r,i,a,s){_.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?b(e):typeof a==`function`?a.apply(this,arguments):a;return n(la.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function v(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new ca(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new ca(e.k,r,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function x(e,n,r,i){e.on(`start.zoom`,function(){S(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){S(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=S(e,a).event(i),s=t.apply(e,a),l=r==null?b(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new ca(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function S(e,t,n){return!n&&e.__zooming||new C(e,t)}function C(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}C.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=Ut(this.that).datum();l.call(e,this.that,new sa(e,{sourceEvent:this.sourceEvent,target:_,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function T(t,...i){if(!e.apply(this,arguments))return;var s=S(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=Gt(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],Xr(this),s.start();fa(t),s.wheel=setTimeout(d,m),s.zoom(`mouse`,n(y(v(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function E(t,...r){if(f||!e.apply(this,arguments))return;var i=t.currentTarget,a=S(this,r,!0).event(t),s=Ut(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,p,!0),c=Gt(t,i),l=t.clientX,u=t.clientY;Yt(t.view),da(t),a.mouse=[c,this.__zoom.invert(c)],Xr(this),a.start();function d(e){if(fa(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>h}a.event(e).zoom(`mouse`,n(y(a.that.__zoom,a.mouse[0]=Gt(e,i),a.mouse[1]),a.extent,o))}function p(e){s.on(`mousemove.zoom mouseup.zoom`,null),Xt(e.view,a.moved),fa(e),a.event(e).end()}}function D(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=Gt(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(y(v(a,u),c,l),t.apply(this,i),o);fa(r),s>0?Ut(this).transition().duration(s).call(x,d,c,r):Ut(this).call(_.transform,d,c,r)}}function O(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=S(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(da(t),s=0;s<i;++s)c=r[s],l=Gt(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!u);u&&=clearTimeout(u),o&&(a.taps<2&&(d=l[0],u=setTimeout(function(){u=null},p)),Xr(this),a.start())}}function k(e,...t){if(this.__zooming){var r=S(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(fa(e),s=0;s<a;++s)c=i[s],l=Gt(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=v(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(y(c,l,u),r.extent,o))}}function A(e,...t){if(this.__zooming){var n=S(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(da(e),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=Gt(o,this),Math.hypot(d[0]-o[0],d[1]-o[1])<g)){var s=Ut(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return _.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:oa(+e),_):r},_.filter=function(t){return arguments.length?(e=typeof t==`function`?t:oa(!!t),_):e},_.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:oa(!!e),_):i},_.extent=function(e){return arguments.length?(t=typeof e==`function`?e:oa([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),_):t},_.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],_):[a[0],a[1]]},_.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],_):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},_.constrain=function(e){return arguments.length?(n=e,_):n},_.duration=function(e){return arguments.length?(s=+e,_):s},_.interpolate=function(e){return arguments.length?(c=e,_):c},_.on=function(){var e=l.on.apply(l,arguments);return e===l?_:e},_.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,_):Math.sqrt(h)},_.tapDistance=function(e){return arguments.length?(g=+e,_):g},_}var ba={error001:(e=`react`)=>`Seems like you have not used ${e===`svelte`?`SvelteFlowProvider`:`ReactFlowProvider`} as an ancestor. Help: https://${e}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:e=>`Node type "${e}" 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e===`source`?n:r}", edge id: ${t}.`,error010:()=>`Handle: No node id found. Make sure to only use a Handle inside a custom Node.`,error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e=`react`)=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>`useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.`,error015:()=>`It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.`,error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},xa=[[-1/0,-1/0],[1/0,1/0]],Sa=[`Enter`,` `,`Escape`],Ca={"node.a11yDescription.default":`Press enter or space to select a node. Press delete to remove it and escape to cancel.`,"node.a11yDescription.keyboardDisabled":`Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.`,"node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":`Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.`,"controls.ariaLabel":`Control Panel`,"controls.zoomIn.ariaLabel":`Zoom In`,"controls.zoomOut.ariaLabel":`Zoom Out`,"controls.fitView.ariaLabel":`Fit View`,"controls.interactive.ariaLabel":`Toggle Interactivity`,"minimap.ariaLabel":`Mini Map`,"handle.ariaLabel":`Handle`},wa;(function(e){e.Strict=`strict`,e.Loose=`loose`})(wa||={});var Ta;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})(Ta||={});var Ea;(function(e){e.Partial=`partial`,e.Full=`full`})(Ea||={});var Da={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},Oa;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(Oa||={});var ka;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(ka||={});var B;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})(B||={});var Aa={[B.Left]:B.Right,[B.Right]:B.Left,[B.Top]:B.Bottom,[B.Bottom]:B.Top},ja=e=>!!e&&typeof e==`object`&&`id`in e&&`source`in e&&`target`in e,Ma=e=>!!e&&typeof e==`object`&&`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),Na=e=>!!e&&typeof e==`object`&&`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),Pa=(e,t=[0,0])=>{let{width:n,height:r}=ho(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},Fa=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1,r=e.reduce((e,r)=>{let i=typeof r==`string`,a=!t.nodeLookup&&!i?r:void 0;return t.nodeLookup&&(a=i?t.nodeLookup.get(r):Na(r)?r:t.nodeLookup.get(r.id)),a?(n=!0,Ja(e,Qa(a,t.nodeOrigin))):e},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?Xa(r):{x:0,y:0,width:0,height:0}},Ia=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(t.filter===void 0||t.filter(e))&&(n=Ja(n,Qa(e)),r=!0)}),r?Xa(n):{x:0,y:0,width:0,height:0}},La=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s=(t.x-n)/i,c=(t.y-r)/i,l=t.width/i,u=t.height/i,d=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??0,f=e.height??t.height??t.initialHeight??0,{x:p,y:m}=t.internals.positionAbsolute,h=eo(s,c,l,u,p,m,i,f),g=i*f,_=a&&h>0;(!t.internals.handleBounds||_||h>=g||t.dragging)&&d.push(t)}return d},Ra=(e,t)=>{let n=new Set;return e.forEach(e=>{n.add(e.id)}),t.filter(e=>n.has(e.source)||n.has(e.target))};function za(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{let i;if(t?.includeHiddenNodes){let{width:t,height:n}=ho(e);i=t>0&&n>0}else i=!!(e.measured.width&&e.measured.height&&!e.hidden);i&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function Ba({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return!0;let s=fo(Ia(za(e,o)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(s,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),!0}function Va({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r,d=o.extent||i;if(o.extent===`parent`&&!o.expandParent){if(!s)a?.(`005`,ba.error005());else{let{width:e,height:t}=ho(s);e&&t&&(d=[[c,l],[c+e,l+t]])}}else s&&mo(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);let f=mo(d)?Wa(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,ba.error015()),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function Ha({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a=new Set(e.map(e=>e.id)),o=[];for(let e of n){if(e.deletable===!1)continue;let t=a.has(e.id),n=!t&&e.parentId&&o.find(t=>t.id===e.parentId);(t||n)&&o.push(e)}let s=new Set(t.map(e=>e.id)),c=r.filter(e=>e.deletable!==!1),l=Ra(o,c);for(let e of c)s.has(e.id)&&!l.find(t=>t.id===e.id)&&l.push(e);if(!i)return{edges:l,nodes:o};let u=await i({nodes:o,edges:l});return typeof u==`boolean`?u?{edges:l,nodes:o}:{edges:[],nodes:[]}:u}var Ua=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Wa=(e={x:0,y:0},t,n)=>({x:Ua(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Ua(e.y,t[0][1],t[1][1]-(n?.height??0))});function Ga(e,t,n){let{width:r,height:i}=ho(n),{x:a,y:o}=n.internals.positionAbsolute;return Wa(e,[[a,o],[a+r,o+i]],t)}var Ka=(e,t,n)=>e<t?Ua(Math.abs(e-t),1,t)/t:e>n?-Ua(Math.abs(e-n),1,t)/t:0,qa=(e,t,n=15,r=40)=>[Ka(e.x,r,t.width-r)*n,Ka(e.y,r,t.height-r)*n],Ja=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Ya=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Xa=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Za=(e,t=[0,0])=>{let{x:n,y:r}=Na(e)?e.internals.positionAbsolute:Pa(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Qa=(e,t=[0,0])=>{let{x:n,y:r}=Na(e)?e.internals.positionAbsolute:Pa(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},$a=(e,t)=>Xa(Ja(Ya(e),Ya(t))),eo=(e,t,n,r,i,a,o,s)=>{let c=Math.max(0,Math.min(e+n,i+o)-Math.max(e,i)),l=Math.max(0,Math.min(t+r,a+s)-Math.max(t,a));return Math.ceil(c*l)},to=(e,t)=>eo(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),no=e=>ro(e.width)&&ro(e.height)&&ro(e.x)&&ro(e.y),ro=e=>!isNaN(e)&&isFinite(e),io=(e,t)=>(e,t)=>{},ao=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),oo=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?ao(s,o):s},so=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function co(e,t){if(typeof e==`number`)return Math.floor((t-t/(1+e))*.5);if(typeof e==`string`&&e.endsWith(`px`)){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e==`string`&&e.endsWith(`%`)){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function lo(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=co(e,n),i=co(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=co(e.top??e.y??0,n),i=co(e.bottom??e.y??0,n),a=co(e.left??e.x??0,t),o=co(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function uo(e,t,n,r,i,a){let{x:o,y:s}=so(e,[t,n,r]),{x:c,y:l}=so({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}var fo=(e,t,n,r,i,a)=>{let o=lo(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=Ua(Math.min(s,c),r,i),u=e.x+e.width/2,d=e.y+e.height/2,f=t/2-u*l,p=n/2-d*l,m=uo(e,f,p,l,t,n),h={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:f-h.left+h.right,y:p-h.top+h.bottom,zoom:l}},po=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function mo(e){return e!=null&&e!==`parent`}function ho(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function go(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function _o(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function vo(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function yo(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function bo(e){return{...Ca,...e||{}}}function xo(e){return e===null?null:e?`valid`:`invalid`}function So(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=Oo(e),s=oo({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?ao(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var Co=e=>({width:e.offsetWidth,height:e.offsetHeight}),wo=e=>e?.getRootNode?.()||window?.document,To=[`INPUT`,`SELECT`,`TEXTAREA`];function Eo(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?To.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var Do=e=>`clientX`in e,Oo=(e,t)=>{let n=Do(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},ko=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...Co(t)}})};function Ao({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}function jo(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Mo({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case B.Left:return[t-jo(t-r,a),n];case B.Right:return[t+jo(r-t,a),n];case B.Top:return[t,n-jo(n-i,a)];case B.Bottom:return[t,n+jo(i-n,a)]}}function No({sourceX:e,sourceY:t,sourcePosition:n=B.Bottom,targetX:r,targetY:i,targetPosition:a=B.Top,curvature:o=.25}){let[s,c]=Mo({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=Mo({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=Ao({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}function Po({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function Fo({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a=`basic`}){return a===`manual`?r:(i&&n?r+1e3:r)+Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0)}function Io({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=Ja(Qa(e),Qa(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),to({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},Xa(a))>0}var Lo=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,Ro=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),zo=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.(`006`,ba.error006()),t;let r=n.getEdgeId||Lo,i;return i=ja(e)?{...e}:{...e,id:r(e)},Ro(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Bo({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=Po({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var Vo={[B.Left]:{x:-1,y:0},[B.Right]:{x:1,y:0},[B.Top]:{x:0,y:-1},[B.Bottom]:{x:0,y:1}},Ho=({source:e,sourcePosition:t=B.Bottom,target:n})=>t===B.Left||t===B.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},V=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);function Uo({source:e,sourcePosition:t=B.Bottom,target:n,targetPosition:r=B.Top,center:i,offset:a,stepPosition:o}){let s=Vo[t],c=Vo[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=Ho({source:l,sourcePosition:t,target:u}),f=d.x===0?`y`:`x`,p=d[f],m=[],h,g,_={x:0,y:0},v={x:0,y:0},[,,y,b]=Po({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f===`x`?(h=i.x??l.x+(u.x-l.x)*o,g=i.y??(l.y+u.y)/2):(h=i.x??(l.x+u.x)/2,g=i.y??l.y+(u.y-l.y)*o);let e=[{x:h,y:l.y},{x:h,y:u.y}],t=[{x:l.x,y:g},{x:u.x,y:g}];m=s[f]===p?f===`x`?e:t:f===`x`?t:e}else{let i=[{x:l.x,y:u.y}],o=[{x:u.x,y:l.y}];if(m=f===`x`?s.x===p?o:i:s.y===p?i:o,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);s[f]===p?_[f]=(l[f]>e[f]?-1:1)*r:v[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){let e=f===`x`?`y`:`x`,t=s[f]===c[e],n=l[e]>u[e],r=l[e]<u[e];(s[f]===1&&(!t&&n||t&&r)||s[f]!==1&&(!t&&r||t&&n))&&(m=f===`x`?i:o)}let d={x:l.x+_.x,y:l.y+_.y},y={x:u.x+v.x,y:u.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(y.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(y.y-m[0].y))?(h=(d.x+y.x)/2,g=m[0].y):(h=m[0].x,g=(d.y+y.y)/2)}let x={x:l.x+_.x,y:l.y+_.y},S={x:u.x+v.x,y:u.y+v.y};return[[e,...x.x!==m[0].x||x.y!==m[0].y?[x]:[],...m,...S.x!==m[m.length-1].x||S.y!==m[m.length-1].y?[S]:[],n],h,g,y,b]}function Wo(e,t,n,r){let i=Math.min(V(e,t)/2,V(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function Go({sourceX:e,sourceY:t,sourcePosition:n=B.Bottom,targetX:r,targetY:i,targetPosition:a=B.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=Uo({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u}),g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=Wo(d[e-1],d[e],d[e+1],o);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function Ko(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function qo(e){let{sourceNode:t,targetNode:n}=e;if(!Ko(t)||!Ko(n))return null;let r=t.internals.handleBounds||Jo(t.handles),i=n.internals.handleBounds||Jo(n.handles),a=Xo(r?.source??[],e.sourceHandle),o=Xo(e.connectionMode===wa.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,ba.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||B.Bottom,c=o?.position||B.Top,l=Yo(t,a,s),u=Yo(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function Jo(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type===`source`?t.push(r):r.type===`target`&&n.push(r);return{source:t,target:n}}function Yo(e,t,n=B.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??ho(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case B.Top:return{x:i+o/2,y:a};case B.Right:return{x:i+o,y:a+s/2};case B.Bottom:return{x:i+o/2,y:a+s};case B.Left:return{x:i,y:a+s/2}}}function Xo(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function Zo(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function Qo(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&typeof r==`object`){let i=Zo(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}var $o=1e3,es=10,ts={nodeOrigin:[0,0],nodeExtent:xa,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{}},ns={...ts,checkEquality:!0};function rs(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function is(e,t,n){let r=rs(ts,n);for(let n of e.values())if(n.parentId)ls(n,e,t,r);else{let e=Wa(Pa(n,r.nodeOrigin),mo(n.extent)?n.extent:r.nodeExtent,ho(n));n.internals.positionAbsolute=e}}function as(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};t.type===`source`?n.push(i):t.type===`target`&&r.push(i)}return{source:n,target:r}}function os(e){return e===`manual`}function ss(e,t,n,r={}){let i=rs(ns,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!os(i.zIndexMode)?$o:0,c=e.length>0,l=!1;t.clear(),n.clear();for(let u of e){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=Wa(Pa(u,i.nodeOrigin),mo(u.extent)?u.extent:i.nodeExtent,ho(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:as(u,e),z:us(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}(e.measured===void 0||e.measured.width===void 0||e.measured.height===void 0)&&!e.hidden&&(c=!1),u.parentId&&ls(e,t,n,r,a),l||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:l}}function cs(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function ls(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=rs(ts,r),l=e.parentId,u=t.get(l);if(!u){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}cs(e,n),i&&!u.parentId&&u.internals.rootParentIndex===void 0&&c===`auto`&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+i.i*es),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);let{x:d,y:f,z:p}=ds(e,u,o,s,a&&!os(c)?$o:0,c),{positionAbsolute:m}=e.internals,h=d!==m.x||f!==m.y;(h||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:f}:m,z:p}})}function us(e,t,n){let r=ro(e.zIndex)?e.zIndex:0;return os(n)?r:r+(e.selected?t:0)}function ds(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=ho(e),l=Pa(e,n),u=mo(e.extent)?Wa(l,e.extent,c):l,d=Wa({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=Ga(d,c,t));let f=us(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function fs(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=$a(a.get(n.parentId)?.expandedRect??Za(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,c=ho(a),l=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(c.width,Math.round(t.width)),p=Math.max(c.height,Math.round(t.height)),m=(f-c.width)*l[0],h=(p-c.height)*l[1];(u>0||d>0||m||h)&&(i.push({id:o,type:`position`,position:{x:a.position.x-u+m,y:a.position.y-d+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:`position`,position:{x:t.position.x+u,y:t.position.y+d}})})),(c.width<t.width||c.height<t.height||u||d)&&i.push({id:o,type:`dimensions`,setAttributes:!0,dimensions:{width:f+(u?l[0]*u-m:0),height:p+(d?l[1]*d-h:0)}})}),i}function ps(e,t,n,r,i,a,o){let s=r?.querySelector(`.xyflow__viewport`),c=!1;if(!s)return{changes:[],updatedInternals:c};let l=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),c=!0;continue}let s=Co(r.nodeElement),u=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(u||!e.internals.handleBounds||r.force)){let p=r.nodeElement.getBoundingClientRect(),m=mo(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;if(e.parentId&&e.extent===`parent`){let n=t.get(e.parentId);n&&(h=Ga(h,s,n))}else m&&(h=Wa(h,m,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:ko(`source`,r.nodeElement,p,d,e.id),target:ko(`target`,r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&ls(g,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,u&&(l.push({id:e.id,type:`dimensions`,dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:Za(g,i)}))}}if(f.length>0){let e=fs(f,t,n,i);l.push(...e)}return{changes:l,updatedInternals:c}}async function ms({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return!1;let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r);return!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2])}function hs(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function gs(e,t,n){e.clear(),t.clear();for(let r of n){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},c=`${n}-${a}--${i}-${o}`;hs(`source`,s,`${i}-${o}--${n}-${a}`,e,n,a),hs(`target`,s,c,e,i,o),t.set(r.id,r)}}function _s(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:_s(n,t):!1}function vs(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function ys(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!_s(o,e))&&(o.draggable||t&&o.draggable===void 0)){let t=e.get(a);t&&i.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}function bs({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function xs({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=ao(a,t);return{x:o.x-a.x,y:o.y-a.y}}function Ss({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u=null,d=!1,f=null,p=!1,m=!1,h=null;function g({noDragClassName:g,handleSelector:_,domNode:v,isSelectable:y,nodeId:b,nodeClickDistance:x=0}){f=Ut(v);function S({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:c,snapToGrid:l,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:g}=t();a={x:e,y:n};let _=!1,v=s.size>1,y=v&&o?Ya(Ia(s)):null,x=v&&l?xs({dragItems:s,snapGrid:c,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};l&&(a=x?{x:Math.round(a.x+x.x),y:Math.round(a.y+x.y)}:ao(a,c));let s=null;if(v&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0],i=e.y-y.y+o[0][1],a=e.y+r.measured.height-y.y2+o[1][1];s=[[t,i],[n,a]]}let{position:d,positionAbsolute:f}=Va({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:u,onError:p});_=_||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(m||=_,_&&(g(s,!0),h&&(r||d||!b&&f))){let[e,t]=bs({nodeId:b,dragItems:s,nodeLookup:i});r?.(h,s,e,t),d?.(h,e,t),b||f?.(h,t)}}async function C(){if(!u)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){c=!1,cancelAnimationFrame(o);return}let[s,d]=qa(l,u,r);(s!==0||d!==0)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-d/e[2],await n({x:s,y:d})&&S(a)),o=requestAnimationFrame(C)}function w(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:c,transform:l,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:_}=t();d=!0,(!m||!y)&&!o&&b&&(i.get(b)?.selected||_()),y&&m&&b&&e?.(b);let v=So(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=v,s=ys(i,c,v,b),s.size>0&&(n||h||!b&&g)){let[e,t]=bs({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}let T=rn().clickDistance(x).on(`start`,e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();u=n?.getBoundingClientRect()||null,p=!1,m=!1,h=e.sourceEvent,r===0&&w(e),a=So(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:u}),l=Oo(e.sourceEvent,u)}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:f,nodeLookup:m}=t(),g=So(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:u});if(h=e.sourceEvent,(e.sourceEvent.type===`touchmove`&&e.sourceEvent.touches.length>1||b&&!m.has(b))&&(p=!0),!p){if(!c&&n&&d&&(c=!0,C()),!d){let t=Oo(e.sourceEvent,u),n=t.x-l.x,r=t.y-l.y;Math.sqrt(n*n+r*r)>f&&w(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&d&&(l=Oo(e.sourceEvent,u),S(g))}}).on(`end`,e=>{if(!d||p){p&&s.size>0&&t().updateNodePositions(s,!1);return}if(c=!1,d=!1,cancelAnimationFrame(o),s.size>0){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(m&&=(r(s,!1),!1),i||a||!b&&o){let[t,r]=bs({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),b||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!vs(t,`.${g}`,v))&&(!_||vs(t,_,v))});f.call(T)}function _(){f?.on(`.drag`,null)}return{update:g,destroy:_}}function Cs(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())to(i,Za(e))>0&&r.push(e);return r}var ws=250;function Ts(e,t,n,r){let i=[],a=1/0,o=Cs(e,n,t+ws);for(let n of o){let o=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=Yo(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function Es(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===`strict`?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...Yo(o,c,c.position,!0)}:c}function Ds(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function Os(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var ks=()=>!0;function As(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:_=ks,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=wo(e.target),E=0,D,{x:O,y:k}=Oo(e),A=Ds(a,w),j=s?.getBoundingClientRect(),M=!1;if(!j||!A)return;let ee=Es(i,A,r,c,t);if(!ee)return;let N=Oo(e,j),P=!1,te=null,ne=!1,re=null;function ie(){if(!u||!j)return;let[e,t]=qa(N,j,S);f({x:e,y:t}),E=requestAnimationFrame(ie)}let F={...ee,nodeId:i,type:A,position:ee.position},ae=c.get(i),oe={inProgress:!0,isValid:null,from:Yo(ae,F,B.Left,!0),fromHandle:F,fromPosition:F.position,fromNode:ae,to:N,toHandle:null,toPosition:Aa[F.position],toNode:null,pointer:N};function se(){M=!0,y(oe),m?.(e,{nodeId:i,handleId:r,handleType:A})}C===0&&se();function ce(e){if(!M){let{x:t,y:n}=Oo(e),r=t-O,i=n-k;if(!(r*r+i*i>C*C))return;se()}if(!x()||!F){le(e);return}let a=b();N=Oo(e,j),D=Ts(oo(N,a,!1,[1,1]),n,c,F),P||=(ie(),!0);let s=js(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});re=s.handleDomNode,te=s.connection,ne=Os(!!D,s.isValid);let u=c.get(i),f=u?Yo(u,F,B.Left,!0):oe.from,p={...oe,from:f,isValid:ne,to:s.toHandle&&ne?so({x:s.toHandle.x,y:s.toHandle.y},a):N,toHandle:s.toHandle,toPosition:ne&&s.toHandle?s.toHandle.position:Aa[F.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:N};y(p),oe=p}function le(e){if(!(`touches`in e&&e.touches.length>0)){if(M){(D||re)&&te&&ne&&h?.(te);let{inProgress:t,...n}=oe,r={...n,toPosition:oe.toHandle?oe.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),P=!1,ne=!1,te=null,re=null,T.removeEventListener(`mousemove`,ce),T.removeEventListener(`mouseup`,le),T.removeEventListener(`touchmove`,ce),T.removeEventListener(`touchend`,le)}}T.addEventListener(`mousemove`,ce),T.addEventListener(`mouseup`,le),T.addEventListener(`touchmove`,ce),T.addEventListener(`touchend`,le)}function js(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=ks,nodeLookup:u}){let d=a===`target`,f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=Oo(e),h=o.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,_={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){let e=Ds(void 0,g),t=g.getAttribute(`data-nodeid`),a=g.getAttribute(`data-handleid`),o=g.classList.contains(`connectable`),s=g.classList.contains(`connectableend`);if(!t||!e)return _;let c={source:d?t:r,sourceHandle:d?a:i,target:d?r:t,targetHandle:d?i:a};_.connection=c,_.isValid=o&&s&&(n===wa.Strict?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=Es(t,e,a,u,n,!0)}return _}var Ms={onPointerDown:As,isValid:js};function Ns({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=Ut(e);function a({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:c=!0,zoomable:l=!0,inversePan:u=!1}){let d=e=>{if(e.sourceEvent.type!==`wheel`||!t)return;let r=n(),i=e.sourceEvent.ctrlKey&&po()?10:1,a=-e.sourceEvent.deltaY*(e.sourceEvent.deltaMode===1?.05:e.sourceEvent.deltaMode?1:.002)*s,o=r[2]*2**(a*i);t.scaleTo(o)},f=[0,0],p=ya().on(`start`,e=>{(e.sourceEvent.type===`mousedown`||e.sourceEvent.type===`touchstart`)&&(f=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on(`zoom`,c?i=>{let s=n();if(i.sourceEvent.type!==`mousemove`&&i.sourceEvent.type!==`touchmove`||!t)return;let c=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],l=[c[0]-f[0],c[1]-f[1]];f=c;let d=r()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),p={x:s[0]-l[0]*d,y:s[1]-l[1]*d},m=[[0,0],[a,o]];t.setViewportConstrained({x:p.x,y:p.y,zoom:s[2]},m,e)}:null).on(`zoom.wheel`,l?d:null);i.call(p,{})}function o(){i.on(`zoom`,null)}return{update:a,destroy:o,pointer:Gt}}var Ps=e=>({x:e.x,y:e.y,zoom:e.k}),Fs=({x:e,y:t,zoom:n})=>la.translate(e,t).scale(n),Is=(e,t)=>e.target.closest(`.${t}`),Ls=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Rs=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,zs=(e,t=0,n=Rs,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on(`end`,r):e},Bs=e=>{let t=e.ctrlKey&&po()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Vs({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return u=>{if(Is(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();let d=n.property(`__zoom`).k||1;if(u.ctrlKey&&o){let e=Gt(u),t=d*2**Bs(u);r.scaleTo(n,t,e,u);return}let f=u.deltaMode===1?20:1,p=i===Ta.Vertical?0:u.deltaX*f,m=i===Ta.Horizontal?0:u.deltaY*f;!po()&&u.shiftKey&&i!==Ta.Vertical&&(p=u.deltaY*f,m=0),r.translateBy(n,-(p/d)*a,-(m/d)*a,{internal:!0});let h=Ps(n.property(`__zoom`));clearTimeout(e.panScrollTimeout),e.isPanScrolling?c?.(u,h):(e.isPanScrolling=!0,s?.(u,h)),e.panScrollTimeout=setTimeout(()=>{l?.(u,h),e.isPanScrolling=!1},150)}}function Hs({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=Is(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function Us({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=Ps(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type===`mousedown`&&t(!0),n&&n?.(r.sourceEvent,i)}}function Ws({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&Ls(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Ps(a.transform))}}function Gs({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&Ls(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=Ps(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function Ks({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:i,panOnScroll:a,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:c,noPanClassName:l,lib:u,connectionInProgress:d}){return f=>{let p=t||n,m=r&&f.ctrlKey,h=f.type===`wheel`;if(f.button===1&&f.type===`mousedown`&&(Is(f,`${u}-flow__node`)||Is(f,`${u}-flow__edge`)||Is(f,`${u}-flow__selection`)||Is(f,`${u}-flow__nodesselection`)))return!0;if(!i&&!p&&!a&&!o&&!r||s||d&&!h||Is(f,c)&&h||Is(f,l)&&(!h||a&&h&&!t)||!r&&f.ctrlKey&&h)return!1;if(!r&&f.type===`touchstart`&&f.touches?.length>1)return f.preventDefault(),!1;if(!p&&!a&&!m&&h||!i&&(f.type===`mousedown`||f.type===`touchstart`)||Array.isArray(i)&&!i.includes(f.button)&&f.type===`mousedown`)return!1;let g=Array.isArray(i)&&i.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||h||e)&&g}}function qs({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=[[0,0],[u.width,u.height]];(typeof ResizeObserver<`u`?new ResizeObserver(e=>{let t=e[0];t&&(d=[[0,0],[t.contentRect.width,t.contentRect.height]])}):null)?.observe(e);let f=ya().extent(()=>d).scaleExtent([t,n]).translateExtent(r),p=Ut(e).call(f);y({x:i.x,y:i.y,zoom:Ua(i.zoom,t,n)},[[0,0],[u.width,u.height]],r);let m=p.on(`wheel.zoom`),h=p.on(`dblclick.zoom`);f.wheelDelta(Bs);async function g(e,t){return p?new Promise(n=>{f?.interpolate(t?.interpolate===`linear`?sr:xr).transform(zs(p,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function _({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:u,panOnScrollMode:d,panOnScrollSpeed:g,preventScrolling:_,zoomOnPinch:y,zoomOnScroll:b,zoomOnDoubleClick:x,panActivationKeyPressed:S=!1,zoomActivationKeyPressed:C,lib:w,onTransformChange:T,connectionInProgress:E,paneClickDistance:D,selectionOnDrag:O}){r&&!l.isZoomingOrPanning&&v();let k=i&&!C&&!r;f.clickDistance(O?1/0:!ro(D)||D<0?0:D);let A=k?Vs({zoomPanValues:l,noWheelClassName:e,d3Selection:p,d3Zoom:f,panOnScrollMode:d,panOnScrollSpeed:g,zoomOnPinch:y,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):Hs({noWheelClassName:e,preventScrolling:_,d3ZoomHandler:m});p.on(`wheel.zoom`,A,{passive:!1});let j=Us({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:o});f.on(`start`,j);let M=Ws({zoomPanValues:l,panOnDrag:u,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:T});f.on(`zoom`,M);let ee=Gs({zoomPanValues:l,panOnDrag:u,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:c});f.on(`end`,ee);let N=Ks({panActivationKeyPressed:S,zoomActivationKeyPressed:C,panOnDrag:u,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:x,zoomOnPinch:y,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:w,connectionInProgress:E});f.filter(N),x?p.on(`dblclick.zoom`,h):p.on(`dblclick.zoom`,null)}function v(){f.on(`zoom`,null)}async function y(e,t,n){let r=Fs(e),i=f?.constrain()(r,t,n);return i&&await g(i),i}async function b(e,t){let n=Fs(e);return await g(n,t),n}function x(e){if(p){let t=Fs(e),n=p.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&f?.transform(p,t,null,{sync:!0})}}function S(){let e=p?ua(p.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}async function C(e,t){return p?new Promise(n=>{f?.interpolate(t?.interpolate===`linear`?sr:xr).scaleTo(zs(p,t?.duration,t?.ease,()=>n(!0)),e)}):!1}async function w(e,t){return p?new Promise(n=>{f?.interpolate(t?.interpolate===`linear`?sr:xr).scaleBy(zs(p,t?.duration,t?.ease,()=>n(!0)),e)}):!1}function T(e){f?.scaleExtent(e)}function E(e){f?.translateExtent(e)}function D(e){let t=!ro(e)||e<0?0:e;f?.clickDistance(t)}return{update:_,destroy:v,setViewport:b,setViewportConstrained:y,getViewport:S,scaleTo:C,scaleBy:w,setScaleExtent:T,setTranslateExtent:E,syncViewport:x,setClickDistance:D}}var Js;(function(e){e.Line=`line`,e.Handle=`handle`})(Js||={});function Ys({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]*=-1),s&&a&&(c[1]*=-1),c}function Xs(e){return{isHorizontal:e.includes(`right`)||e.includes(`left`),isVertical:e.includes(`bottom`)||e.includes(`top`),affectsX:e.includes(`left`),affectsY:e.includes(`top`)}}function Zs(e,t){return Math.max(0,t-e)}function Qs(e,t){return Math.max(0,e-t)}function $s(e,t,n){return Math.max(0,t-e,e-n)}function ec(e,t){return e?!t:t}function tc(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t,{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v}=r,{x:y,y:b,width:x,height:S,aspectRatio:C}=e,w=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?m-e.pointerY:0),E=x+(c?-w:w),D=S+(l?-T:T),O=-a[0]*x,k=-a[1]*S,A=$s(E,h,g),j=$s(D,_,v);if(o){let e=0,t=0;c&&w<0?e=Zs(y+w+O,o[0][0]):!c&&w>0&&(e=Qs(y+E+O,o[1][0])),l&&T<0?t=Zs(b+T+k,o[0][1]):!l&&T>0&&(t=Qs(b+D+k,o[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(s){let e=0,t=0;c&&w>0?e=Qs(y+w,s[0][0]):!c&&w<0&&(e=Zs(y+E,s[1][0])),l&&T>0?t=Qs(b+T,s[0][1]):!l&&T<0&&(t=Zs(b+D,s[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(i){if(u){let e=$s(E/C,_,v)*C;if(A=Math.max(A,e),o){let e=0;e=!c&&!l||c&&!l&&f?Qs(b+k+E/C,o[1][1])*C:Zs(b+k+(c?w:-w)/C,o[0][1])*C,A=Math.max(A,e)}if(s){let e=0;e=!c&&!l||c&&!l&&f?Zs(b+E/C,s[1][1])*C:Qs(b+(c?w:-w)/C,s[0][1])*C,A=Math.max(A,e)}}if(d){let e=$s(D*C,h,g)/C;if(j=Math.max(j,e),o){let e=0;e=!c&&!l||l&&!c&&f?Qs(y+D*C+O,o[1][0])/C:Zs(y+(l?T:-T)*C+O,o[0][0])/C,j=Math.max(j,e)}if(s){let e=0;e=!c&&!l||l&&!c&&f?Zs(y+D*C,s[1][0])/C:Qs(y+(l?T:-T)*C,s[0][0])/C,j=Math.max(j,e)}}}T+=T<0?j:-j,w+=w<0?A:-A,i&&(f?E>D*C?T=(ec(c,l)?-w:w)/C:w=(ec(c,l)?-T:T)*C:u?(T=w/C,l=c):(w=T*C,c=l));let M=c?y+w:y,ee=l?b+T:b;return{width:x+(c?-w:w),height:S+(l?-T:T),x:a[0]*w*(c?-1:1)+M,y:a[1]*T*(l?-1:1)+ee}}var nc={width:0,height:0,x:0,y:0},rc={...nc,pointerX:0,pointerY:0,aspectRatio:1};function ic(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function ac({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=Ut(e),o={controlDirection:Xs(`bottom-right`),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:e,boundaries:s,keepAspectRatio:c,resizeDirection:l,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m={...nc},h={...rc};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:Xs(e)};let g,_=null,v=[],y,b,x,S=rn().on(`start`,e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:c}=n();if(g=r.get(t),!g)return;_=c?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:d}=So(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:_});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},h={...m,pointerX:l,pointerY:d,aspectRatio:m.width/m.height},y=void 0,b=mo(g.extent)?g.extent:void 0,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId)),y&&g.extent===`parent`&&(b=[[0,0],[y.measured.width,y.measured.height]]),v=[],x=void 0;for(let[e,n]of r)if(n.parentId===t&&(v.push({id:e,position:{...n.position},extent:n.extent}),n.extent===`parent`||n.expandParent)){let e=ic(n,g,n.origin??s);x=x?[[Math.min(e[0][0],x[0][0]),Math.min(e[0][1],x[0][1])],[Math.max(e[1][0],x[1][0]),Math.max(e[1][1],x[1][1])]]:e}u?.(e,{...m})}).on(`drag`,e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),c=So(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:S,height:C}=m,w={},T=g.origin??s,{width:E,height:D,x:O,y:k}=tc(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,T,b,x),A=E!==S,j=D!==C,M=O!==u&&A,ee=k!==f&&j;if(!M&&!ee&&!A&&!j)return;let N={prevValues:{...m},startX:h.x,startY:h.y,childNodes:v.map(e=>({...e,position:{...e.position}}))};if((M||ee||T[0]===1||T[1]===1)&&(w.x=M?O:m.x,w.y=ee?k:m.y,m.x=w.x,m.y=w.y,v.length>0)){let e=O-u,t=k-f;for(let n of v)n.position={x:n.position.x-e+T[0]*(E-S),y:n.position.y-t+T[1]*(D-C)},l.push(n)}if((A||j)&&(w.width=A&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?E:m.width,w.height=j&&(!o.resizeDirection||o.resizeDirection===`vertical`)?D:m.height,m.width=w.width,m.height=w.height),y&&g.expandParent){let e=T[0]*(w.width??0);w.x&&w.x<e&&(m.x=e,h.x-=w.x-e);let t=T[1]*(w.height??0);w.y&&w.y<t&&(m.y=t,h.y-=w.y-t)}let P=Ys({width:m.width,prevWidth:S,height:m.height,prevHeight:C,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),te={...m,direction:P};if(p?.(e,te)===!1){m=N.prevValues,h.x=N.startX,h.y=N.startY,v.forEach((e,t)=>{e.position=N.childNodes[t].position});return}d?.(e,te),r(w,l)}).on(`end`,e=>{f?.(e,{...m}),i?.({...m})});a.call(S)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}var oc=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),sc=o(((e,t)=>{t.exports=oc()})),cc=o((e=>{var t=u(),n=sc();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),lc=c(o(((e,t)=>{t.exports=cc()}))(),1),uc=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},dc=e=>e?uc(e):uc,{useDebugValue:fc}=y.default,{useSyncExternalStoreWithSelector:pc}=lc.default,mc=e=>e;function hc(e,t=mc,n){let r=pc(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return fc(r),r}var gc=(e,t)=>{let n=dc(e),r=(e,r=t)=>hc(n,e,r);return Object.assign(r,n),r},_c=(e,t)=>e?gc(e,t):gc;function vc(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var yc=m(),bc=(0,y.createContext)(null),xc=bc.Provider,Sc=ba.error001(`react`);function H(e,t){let n=(0,y.useContext)(bc);if(n===null)throw Error(Sc);return hc(n,e,t)}function U(){let e=(0,y.useContext)(bc);if(e===null)throw Error(Sc);return(0,y.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var Cc={display:`none`},wc={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},Tc=`react-flow__node-desc`,Ec=`react-flow__edge-desc`,Dc=`react-flow__aria-live`,Oc=e=>e.ariaLiveMessage,kc=e=>e.ariaLabelConfig;function Ac({rfId:e}){let t=H(Oc);return(0,x.jsx)(`div`,{id:`${Dc}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:wc,children:t})}function jc({rfId:e,disableKeyboardA11y:t}){let n=H(kc);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`div`,{id:`${Tc}-${e}`,style:Cc,children:t?n[`node.a11yDescription.default`]:n[`node.a11yDescription.keyboardDisabled`]}),(0,x.jsx)(`div`,{id:`${Ec}-${e}`,style:Cc,children:n[`edge.a11yDescription.default`]}),!t&&(0,x.jsx)(Ac,{rfId:e})]})}var Mc=(0,y.forwardRef)(({position:e=`top-left`,children:t,className:n,style:r,...i},a)=>{let o=`${e}`.split(`-`);return(0,x.jsx)(`div`,{className:S([`react-flow__panel`,n,...o]),style:r,ref:a,...i,children:t})});Mc.displayName=`Panel`;var Nc=`https://reactflow.dev?utm_source=attribution`;function Pc({proOptions:e,position:t=`bottom-right`}){return(0,y.useEffect)(()=>{},[]),e?.hideAttribution?null:(0,x.jsx)(Mc,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${Nc}`,children:(0,x.jsx)(`a`,{href:Nc,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`})})}var Fc=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},Ic=e=>e.id;function Lc(e,t){return vc(e.selectedNodes.map(Ic),t.selectedNodes.map(Ic))&&vc(e.selectedEdges.map(Ic),t.selectedEdges.map(Ic))}function Rc({onSelectionChange:e}){let t=U(),{selectedNodes:n,selectedEdges:r}=H(Fc,Lc);return(0,y.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}var zc=e=>!!e.onSelectionChangeHandlers;function Bc({onSelectionChange:e}){let t=H(zc);return e||t?(0,x.jsx)(Rc,{onSelectionChange:e}):null}var Vc=[0,0],Hc={x:0,y:0,zoom:1},Uc=[...`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`.split(`.`),`rfId`],Wc=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Gc={translateExtent:xa,nodeOrigin:Vc,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function Kc(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:s,setDefaultNodesAndEdges:c}=H(Wc,vc),l=U();(0,y.useEffect)(()=>(c(e.defaultNodes,e.defaultEdges),()=>{u.current=Gc,s()}),[]);let u=(0,y.useRef)(Gc);return(0,y.useEffect)(()=>{for(let s of Uc){let c=e[s];c!==u.current[s]&&e[s]!==void 0&&(s===`nodes`?t(c):s===`edges`?n(c):s===`minZoom`?r(c):s===`maxZoom`?i(c):s===`translateExtent`?a(c):s===`nodeExtent`?o(c):s===`ariaLabelConfig`?l.setState({ariaLabelConfig:bo(c)}):s===`fitView`?l.setState({fitViewQueued:c}):s===`fitViewOptions`?l.setState({fitViewOptions:c}):l.setState({[s]:c}))}u.current=e},Uc.map(t=>e[t])),null}function qc(){return typeof window>`u`||!window.matchMedia?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function Jc(e){let[t,n]=(0,y.useState)(e===`system`?null:e);return(0,y.useEffect)(()=>{if(e!==`system`){n(e);return}let t=qc(),r=()=>n(t?.matches?`dark`:`light`);return r(),t?.addEventListener(`change`,r),()=>{t?.removeEventListener(`change`,r)}},[e]),t===null?qc()?.matches?`dark`:`light`:t}var Yc=typeof document<`u`?document:null;function Xc(e=null,t={target:Yc,actInsideInputWithModifier:!0}){let[n,r]=(0,y.useState)(!1),i=(0,y.useRef)(!1),a=(0,y.useRef)(new Set([])),[o,s]=(0,y.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(/\+/g,`
10
- `).replace(`
11
-
12
- `,`
13
- +`).split(`
14
- `));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,y.useEffect)(()=>{let n=t?.target??Yc,c=t?.actInsideInputWithModifier??!0;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!c)&&Eo(e))return!1;let n=Qc(e.code,s);if(a.current.add(e[n]),Zc(o,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName===`BUTTON`||n?.nodeName===`A`;t.preventDefault!==!1&&(i.current||!a)&&e.preventDefault(),r(!0)}},l=e=>{let t=Qc(e.code,s);Zc(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),e.key===`Meta`&&a.current.clear(),i.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener(`keydown`,e),n?.addEventListener(`keyup`,l),window.addEventListener(`blur`,u),window.addEventListener(`contextmenu`,u),()=>{n?.removeEventListener(`keydown`,e),n?.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,u),window.removeEventListener(`contextmenu`,u)}}},[e,r]),n}function Zc(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function Qc(e,t){return t.includes(e)?`code`:`key`}var $c=()=>{let e=U();return(0,y.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),!0):!1},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=fo(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i;return oo(l,r,n.snapToGrid??a,u)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=so(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function el(e,t){let n=[],r=new Map,i=[];for(let t of e)if(t.type===`add`){i.push(t);continue}else if(t.type===`remove`||t.type===`replace`)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if(t[0].type===`remove`)continue;if(t[0].type===`replace`){n.push({...t[0].item});continue}let i={...e};for(let e of t)tl(e,i);n.push(i)}return i.length&&i.forEach(e=>{e.index===void 0?n.push({...e.item}):n.splice(e.index,0,{...e.item})}),n}function tl(e,t){switch(e.type){case`select`:t.selected=e.selected;break;case`position`:e.position!==void 0&&(t.position=e.position),e.dragging!==void 0&&(t.dragging=e.dragging);break;case`dimensions`:e.dimensions!==void 0&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes===`width`)&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes===`height`)&&(t.height=e.dimensions.height))),typeof e.resizing==`boolean`&&(t.resizing=e.resizing)}}function nl(e,t){return el(e,t)}function rl(e,t){return el(e,t)}function il(e,t){return{id:e,type:`select`,selected:t}}function al(e,t=new Set,n=!1){let r=[];for(let[i,a]of e){let e=t.has(i);(a.selected!==void 0||e)&&a.selected!==e&&(n&&(a.selected=e),r.push(il(a.id,e)))}return r}function ol({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:`replace`}),a===void 0&&n.push({item:i,type:`add`,index:r})}for(let[e]of t)r.get(e)===void 0&&n.push({id:e,type:`remove`});return n}function sl(e){return{id:e.id,type:`remove`}}var cl=io(`React Flow`,`https://reactflow.dev/`);function ll(e,t,n={}){return zo(e,t,{...n,onError:n.onError??cl})}var ul=e=>Ma(e),dl=e=>ja(e);function fl(e){return(0,y.forwardRef)(e)}var pl=typeof window<`u`?y.useLayoutEffect:y.useEffect;function ml(e){let[t,n]=(0,y.useState)(BigInt(0)),[r]=(0,y.useState)(()=>hl(()=>n(e=>e+BigInt(1))));return pl(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function hl(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var gl=(0,y.createContext)(null);function _l({children:e}){let t=U(),n=ml((0,y.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c}=t.getState(),l=n;for(let t of e)l=typeof t==`function`?t(l):t;let u=ol({items:l,lookup:o});for(let e of c.values())u=e(u);i&&r(l),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=ml((0,y.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s=typeof t==`function`?t(s):t;i?r(s):a&&a(ol({items:s,lookup:o}))},[])),i=(0,y.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,x.jsx)(gl.Provider,{value:i,children:e})}function vl(){let e=(0,y.useContext)(gl);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var yl=e=>!!e.panZoom;function bl(){let e=$c(),t=U(),n=vl(),r=H(yl),i=(0,y.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},i=e=>{n.edgeQueue.push(e)},a=e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState(),i=ul(e)?e:n.get(e.id),a=i.parentId?_o(i.position,i.measured,i.parentId,n,r):i.position;return Za({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height})},o=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&ul(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&dl(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:c,onDelete:l,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await Ha({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(sl);o?.(f),c(e)}if(m){let e=d.map(sl);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=no(e),o=i?e:a(e),s=r!==void 0;return o?(r||t.getState().nodes).filter(r=>{let a=t.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let c=Za(s?r:a),l=to(c,o);return n&&l>0||l>=c.width*c.height||l>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=no(e)?e:a(e);if(!r)return!1;let i=to(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState();return Fa(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:``}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:``}`)?.values()??[]),fitView:async e=>{let r=t.getState().fitViewResolver??yo();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,y.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var xl=e=>e.selected,Sl=typeof window<`u`?window:void 0;function Cl({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=U(),{deleteElements:r}=bl(),i=Xc(e,{actInsideInputWithModifier:!1}),a=Xc(t,{target:Sl});(0,y.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(xl),edges:e.filter(xl)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,y.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function wl(e){let t=U();(0,y.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=Co(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,ba.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener(`resize`,n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener(`resize`,n),t&&e.current&&t.unobserve(e.current)}}},[])}var Tl={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},El=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Dl({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:i,panOnScrollSpeed:a=.5,panOnScrollMode:o=Ta.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:l,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:h,noWheelClassName:g,noPanClassName:_,onViewportChange:v,isControlledViewport:b,paneClickDistance:S,selectionOnDrag:C}){let w=U(),T=(0,y.useRef)(null),{userSelectionActive:E,lib:D,connectionInProgress:O}=H(El,vc),k=Xc(p),A=(0,y.useRef)();wl(T);let j=(0,y.useCallback)(e=>{v?.({x:e[0],y:e[1],zoom:e[2]}),b||w.setState({transform:e})},[v,b]);return(0,y.useEffect)(()=>{if(T.current){A.current=qs({domNode:T.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:l,onDraggingChange:e=>w.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=w.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=w.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=w.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=A.current.getViewport();return w.setState({panZoom:A.current,transform:[e,t,n],domNode:T.current.closest(`.react-flow`)}),()=>{A.current?.destroy()}}},[]),(0,y.useEffect)(()=>{A.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:i,panOnScrollSpeed:a,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:c,zoomActivationKeyPressed:k,preventScrolling:m,noPanClassName:_,userSelectionActive:E,noWheelClassName:g,lib:D,onTransformChange:j,connectionInProgress:O,selectionOnDrag:C,paneClickDistance:S})},[e,t,n,r,i,a,o,s,c,k,m,_,E,g,D,j,O,C,S]),(0,x.jsx)(`div`,{className:`react-flow__renderer`,ref:T,style:Tl,children:h})}var Ol=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function kl(){let{userSelectionActive:e,userSelectionRect:t}=H(Ol,vc);return e&&t?(0,x.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Al=(e,t)=>n=>{n.target===t.current&&e?.(n)},jl=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Ml({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Ea.Full,panOnDrag:r,autoPanOnSelection:i,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:s,onSelectionEnd:c,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){let g=(0,y.useRef)(0),_=U(),{userSelectionActive:v,elementsSelectable:b,dragging:C,panBy:w,autoPanSpeed:T}=H(jl,vc),E=b&&(e||v),D=(0,y.useRef)(null),O=(0,y.useRef)(),k=(0,y.useRef)(new Set),A=(0,y.useRef)(new Set),j=(0,y.useRef)(!1),M=(0,y.useRef)(!1),ee=(0,y.useRef)({x:0,y:0}),N=(0,y.useRef)(!1),P=e=>{if(M.current||j.current||_.getState().connection.inProgress){M.current=!1,j.current=!1;return}l?.(e),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},te=e=>{if(Array.isArray(r)&&r?.includes(2)){e.preventDefault();return}u?.(e)},ne=d?e=>d(e):void 0,re=e=>{M.current&&=(e.stopPropagation(),!1)},ie=n=>{if(n.pointerType===`touch`&&r!==!1&&!t)return;let{domNode:i,transform:a}=_.getState();if(O.current=i?.getBoundingClientRect(),!O.current)return;let s=n.target===D.current;if(!s&&n.target.closest(`.nokey`)||!e||!(o&&s||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),M.current=!1;let{x:c,y:l}=Oo(n.nativeEvent,O.current),u=oo({x:c,y:l},a);_.setState({userSelectionRect:{width:0,height:0,startX:u.x,startY:u.y,x:c,y:l}}),s||(n.stopPropagation(),n.preventDefault())};function F(e,t){let{userSelectionRect:r}=_.getState();if(!r)return;let{transform:i,nodeLookup:a,edgeLookup:o,connectionLookup:s,triggerNodeChanges:c,triggerEdgeChanges:l,defaultEdgeOptions:u}=_.getState(),d={x:r.startX,y:r.startY},{x:f,y:p}=so(d,i),m={startX:d.x,startY:d.y,x:e<f?e:f,y:t<p?t:p,width:Math.abs(e-f),height:Math.abs(t-p)},h=k.current,g=A.current;k.current=new Set(La(a,m,i,n===Ea.Partial,!0).map(e=>e.id)),A.current=new Set;let v=u?.selectable??!0;for(let e of k.current){let t=s.get(e);if(t)for(let{edgeId:e}of t.values()){let t=o.get(e);t&&(t.selectable??v)&&A.current.add(e)}}vo(h,k.current)||c(al(a,k.current,!0)),vo(g,A.current)||l(al(o,A.current)),_.setState({userSelectionRect:m,userSelectionActive:!0,nodesSelectionActive:!1})}function ae(){if(!i||!O.current)return;let[e,t]=qa(ee.current,O.current,T);w({x:e,y:t}).then(e=>{if(!M.current||!e){g.current=requestAnimationFrame(ae);return}let{x:t,y:n}=ee.current;F(t,n),g.current=requestAnimationFrame(ae)})}let oe=()=>{cancelAnimationFrame(g.current),g.current=0,N.current=!1};(0,y.useEffect)(()=>()=>oe(),[]);let se=e=>{let{userSelectionRect:n,transform:r,resetSelectedElements:i}=_.getState();if(!O.current||!n)return;let{x:o,y:c}=Oo(e.nativeEvent,O.current);ee.current={x:o,y:c};let l=so({x:n.startX,y:n.startY},r);if(!M.current){let n=t?0:a;if(Math.hypot(o-l.x,c-l.y)<=n)return;i(),s?.(e)}M.current=!0,N.current||=(ae(),!0),F(o,c)},ce=e=>{if(!E){e.target===D.current&&_.getState().connection.inProgress&&(j.current=!0);return}e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!v&&e.target===D.current&&_.getState().userSelectionRect&&P?.(e),_.setState({userSelectionActive:!1,userSelectionRect:null}),M.current&&(c?.(e),_.setState({nodesSelectionActive:k.current.size>0})),oe())},le=e=>{e.target?.releasePointerCapture?.(e.pointerId),oe()},ue=r===!0||Array.isArray(r)&&r.includes(0);return(0,x.jsxs)(`div`,{className:S([`react-flow__pane`,{draggable:ue,dragging:C,selection:e}]),onClick:E?void 0:Al(P,D),onContextMenu:Al(te,D),onWheel:Al(ne,D),onPointerEnter:E?void 0:f,onPointerMove:E?se:p,onPointerUp:ce,onPointerCancel:E?le:void 0,onPointerDownCapture:E?ie:void 0,onClickCapture:E?re:void 0,onPointerLeave:m,ref:D,style:Tl,children:[h,(0,x.jsx)(kl,{})]})}function Nl({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);if(!l){c?.(`012`,ba.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])}function Pl({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){let s=U(),[c,l]=(0,y.useState)(!1),u=(0,y.useRef)();return(0,y.useEffect)(()=>{if(!t)return u.current=Ss({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{Nl({id:t,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}}),()=>{u.current?.destroy(),u.current=void 0}},[t,s,e]),(0,y.useEffect)(()=>{!t&&e.current&&u.current&&u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o})},[n,r,t,a,e,i,o]),c}var Fl=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function Il(){let e=U();return(0,y.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:c,nodeOrigin:l}=e.getState(),u=new Map,d=Fl(a),f=r?i[0]:5,p=r?i[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of c){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=ao(t,i));let{position:a,positionAbsolute:s}=Va({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:l,onError:o});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}var Ll=(0,y.createContext)(null),Rl=Ll.Provider;Ll.Consumer;var zl=()=>(0,y.useContext)(Ll),Bl=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Vl=(0,y.createContext)(null);function Hl({children:e}){let t=H(Bl,vc);return(0,x.jsx)(Vl.Provider,{value:t,children:e})}function Ul(){let e=(0,y.useContext)(Vl);if(!e)throw Error(`useHandleConfig must be used within a HandleConfigProvider`);return e}var Wl={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},Gl=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o;if(!s&&!i)return Wl;let u=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===wa.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function Kl({type:e=`source`,position:t=B.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:l,onMouseDown:u,onTouchStart:d,...f},p){let m=o||null,h=e===`target`,g=U(),_=zl(),{connectOnClick:v,noPanClassName:y,rfId:b}=Ul(),{connectingFrom:C,connectingTo:w,clickConnecting:T,isPossibleEndHandle:E,connectionInProcess:D,clickConnectionInProcess:O,valid:k}=H(Gl(_,m,e),vc);_||g.getState().onError?.(`010`,ba.error010());let A=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t,onError:n}=g.getState();t(ll(i,e,{onError:n}))}n?.(i),s?.(i)},j=e=>{if(!_)return;let t=Do(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=g.getState();Ms.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:h,handleId:m,nodeId:_,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:A,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?u?.(e):d?.(e)};return(0,x.jsx)(`div`,{"data-handleid":m,"data-nodeid":_,"data-handlepos":t,"data-id":`${b}-${_}-${m}-${e}`,className:S([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,y,l,{source:!h,target:h,connectable:r,connectablestart:i,connectableend:a,clickconnecting:T,connectingfrom:C,connectingto:w,valid:k,connectionindicator:r&&(!D||E)&&(D||O?a:i)}]),onMouseDown:j,onTouchStart:j,onClick:v?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c,lib:l,rfId:u,nodeLookup:d,connection:f}=g.getState();if(!_||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:_,handleId:m,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:_,type:e,id:m}});return}let p=wo(t.target),h=n||c,{connection:v,isValid:y}=Ms.isValid(t.nativeEvent,{handle:{nodeId:_,id:m,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:h,flowId:u,doc:p,lib:l,nodeLookup:d});y&&v&&A(v);let b=structuredClone(f);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),g.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:c})}var ql=(0,y.memo)(fl(Kl));function Jl({data:e,isConnectable:t,sourcePosition:n=B.Bottom}){return(0,x.jsxs)(x.Fragment,{children:[e?.label,(0,x.jsx)(ql,{type:`source`,position:n,isConnectable:t})]})}function Yl({data:e,isConnectable:t,targetPosition:n=B.Top,sourcePosition:r=B.Bottom}){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(ql,{type:`target`,position:n,isConnectable:t}),e?.label,(0,x.jsx)(ql,{type:`source`,position:r,isConnectable:t})]})}function Xl(){return null}function Zl({data:e,isConnectable:t,targetPosition:n=B.Top}){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(ql,{type:`target`,position:n,isConnectable:t}),e?.label]})}var Ql={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},$l={input:Jl,default:Yl,output:Zl,group:Xl};function eu(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var tu=e=>{let{width:t,height:n,x:r,y:i}=Ia(e.nodeLookup,{filter:e=>!!e.selected});return{width:ro(t)?t:null,height:ro(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function nu({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=U(),{width:i,height:a,transformString:o,userSelectionActive:s}=H(tu,vc),c=Il(),l=(0,y.useRef)(null);(0,y.useEffect)(()=>{n||l.current?.focus({preventScroll:!0})},[n]);let u=!s&&i!==null&&a!==null;if(Pl({nodeRef:l,disabled:!u}),!u)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,x.jsx)(`div`,{className:S([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:o},children:(0,x.jsx)(`div`,{ref:l,className:`react-flow__nodesselection-rect`,onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(Ql,e.key)&&(e.preventDefault(),c({direction:Ql[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var ru=typeof window<`u`?window:void 0,iu=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function au({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:b,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:T,autoPanOnSelection:E,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,preventScrolling:j,onSelectionContextMenu:M,noWheelClassName:ee,noPanClassName:N,disableKeyboardA11y:P,onViewportChange:te,isControlledViewport:ne}){let{nodesSelectionActive:re,userSelectionActive:ie}=H(iu,vc),F=Xc(l,{target:ru}),ae=Xc(h,{target:ru}),oe=ae||T,se=ae||b,ce=u&&oe!==!0,le=F||ie||ce;return Cl({deleteKeyCode:c,multiSelectionKeyCode:m}),(0,x.jsx)(Dl,{onPaneContextMenu:a,elementsSelectable:_,zoomOnScroll:v,zoomOnPinch:y,panOnScroll:se,panActivationKeyPressed:ae,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:!F&&oe,defaultViewport:D,translateExtent:O,minZoom:k,maxZoom:A,zoomActivationKeyCode:g,preventScrolling:j,noWheelClassName:ee,noPanClassName:N,onViewportChange:te,isControlledViewport:ne,paneClickDistance:s,selectionOnDrag:ce,children:(0,x.jsxs)(Ml,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:oe,autoPanOnSelection:E,isSelecting:!!le,selectionMode:d,selectionKeyPressed:F,paneClickDistance:s,selectionOnDrag:ce,children:[e,re&&(0,x.jsx)(nu,{onSelectionContextMenu:M,noPanClassName:N,disableKeyboardA11y:P})]})})}au.displayName=`FlowRenderer`;var W=(0,y.memo)(au),ou=e=>t=>e?La(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys());function su(e){return H((0,y.useCallback)(ou(e),[e]),vc)}var cu=e=>e.updateNodeInternals;function lu(){let e=H(cu),[t]=(0,y.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,y.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function uu({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=U(),a=(0,y.useRef)(null),o=(0,y.useRef)(null),s=(0,y.useRef)(e.sourcePosition),c=(0,y.useRef)(e.targetPosition),l=(0,y.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,y.useEffect)(()=>{a.current&&!e.hidden&&(!u||o.current!==a.current)&&(o.current&&r?.unobserve(o.current),r?.observe(a.current),o.current=a.current)},[u,e.hidden]),(0,y.useEffect)(()=>()=>{o.current&&=(r?.unobserve(o.current),null)},[]),(0,y.useEffect)(()=>{if(a.current){let n=l.current!==t,r=s.current!==e.sourcePosition,o=c.current!==e.targetPosition;(n||r||o)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function du({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:m,rfId:h,nodeTypes:g,nodeClickDistance:_,onError:v}){let{node:y,internals:b,isParent:C}=H(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},vc),w=y.type||`default`,T=g?.[w]||$l[w];T===void 0&&(v?.(`003`,ba.error003(w)),w=`default`,T=g?.default||$l.default);let E=!!(y.draggable||s&&y.draggable===void 0),D=!!(y.selectable||c&&y.selectable===void 0),O=!!(y.connectable||l&&y.connectable===void 0),k=!!(y.focusable||u&&y.focusable===void 0),A=U(),j=go(y),M=uu({node:y,nodeType:w,hasDimensions:j,resizeObserver:d}),ee=Pl({nodeRef:M,disabled:y.hidden||!E,noDragClassName:f,handleSelector:y.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:_}),N=Il();if(y.hidden)return null;let P=ho(y),te=eu(y),ne=D||E||t||n||r||i,re=n?e=>n(e,{...b.userNode}):void 0,ie=r?e=>r(e,{...b.userNode}):void 0,F=i?e=>i(e,{...b.userNode}):void 0,ae=a?e=>a(e,{...b.userNode}):void 0,oe=o?e=>o(e,{...b.userNode}):void 0,se=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=A.getState();D&&(!r||!E||i>0)&&Nl({id:e,store:A,nodeRef:M}),t&&t(n,{...b.userNode})},ce=t=>{if(!(Eo(t.nativeEvent)||m)){if(Sa.includes(t.key)&&D){let n=t.key===`Escape`;Nl({id:e,store:A,unselect:n,nodeRef:M})}else if(E&&y.selected&&Object.prototype.hasOwnProperty.call(Ql,t.key)){t.preventDefault();let{ariaLabelConfig:e}=A.getState();A.setState({ariaLiveMessage:e[`node.a11yDescription.ariaLiveMessage`]({direction:t.key.replace(`Arrow`,``).toLowerCase(),x:~~b.positionAbsolute.x,y:~~b.positionAbsolute.y})}),N({direction:Ql[t.key],factor:t.shiftKey?4:1})}}},le=()=>{if(m||!M.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=A.getState();i&&(La(new Map([[e,y]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(y.position.x+P.width/2,y.position.y+P.height/2,{zoom:t[2]}))};return(0,x.jsx)(`div`,{className:S([`react-flow__node`,`react-flow__node-${w}`,{[p]:E},y.className,{selected:y.selected,selectable:D,parent:C,draggable:E,dragging:ee}]),ref:M,style:{zIndex:b.z,transform:`translate(${b.positionAbsolute.x}px,${b.positionAbsolute.y}px)`,pointerEvents:ne?`all`:`none`,visibility:j?`visible`:`hidden`,...y.style,...te},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:re,onMouseMove:ie,onMouseLeave:F,onContextMenu:ae,onClick:se,onDoubleClick:oe,onKeyDown:k?ce:void 0,tabIndex:k?0:void 0,onFocus:k?le:void 0,role:y.ariaRole??(k?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":m?void 0:`${Tc}-${h}`,"aria-label":y.ariaLabel,...y.domAttributes,children:(0,x.jsx)(Rl,{value:e,children:(0,x.jsx)(T,{id:e,data:y.data,type:w,positionAbsoluteX:b.positionAbsolute.x,positionAbsoluteY:b.positionAbsolute.y,selected:y.selected??!1,selectable:D,draggable:E,deletable:y.deletable??!0,isConnectable:O,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:ee,dragHandle:y.dragHandle,zIndex:b.z,parentId:y.parentId,...P})})})}var fu=(0,y.memo)(du),pu=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function mu(e){let{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:i}=H(pu,vc),a=su(e.onlyRenderVisibleElements),o=lu();return(0,x.jsx)(`div`,{className:`react-flow__nodes`,style:Tl,children:a.map(a=>(0,x.jsx)(fu,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:o,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:i},a))})}mu.displayName=`NodeRenderer`;var hu=(0,y.memo)(mu);function gu(e){return H((0,y.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);let n=[];if(t.width&&t.height)for(let e of t.edges){let r=t.nodeLookup.get(e.source),i=t.nodeLookup.get(e.target);r&&i&&Io({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),vc)}var _u=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,x.jsx)(`polyline`,{className:`arrow`,style:n,strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`})},vu=({color:e=`none`,strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,x.jsx)(`polyline`,{className:`arrowclosed`,style:n,strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`})},yu={[ka.Arrow]:_u,[ka.ArrowClosed]:vu};function bu(e){let t=U();return(0,y.useMemo)(()=>Object.prototype.hasOwnProperty.call(yu,e)?yu[e]:(t.getState().onError?.(`009`,ba.error009(e)),null),[e])}var xu=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:s=`auto-start-reverse`})=>{let c=bu(t);return c?(0,x.jsx)(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:s,refX:`0`,refY:`0`,children:(0,x.jsx)(c,{color:n,strokeWidth:o})}):null},Su=({defaultColor:e,rfId:t})=>{let n=H(e=>e.edges),r=H(e=>e.defaultEdgeOptions),i=(0,y.useMemo)(()=>Qo(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,x.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,x.jsx)(`defs`,{children:i.map(e=>(0,x.jsx)(xu,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};Su.displayName=`MarkerDefinitions`;var Cu=(0,y.memo)(Su);function wu({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...u}){let[d,f]=(0,y.useState)({x:1,y:0,width:0,height:0}),p=S([`react-flow__edge-textwrapper`,l]),m=(0,y.useRef)(null);return(0,y.useEffect)(()=>{if(m.current){let e=m.current.getBBox();f({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,x.jsxs)(`g`,{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?`visible`:`hidden`,...u,children:[i&&(0,x.jsx)(`rect`,{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:`react-flow__edge-textbg`,style:a,rx:s,ry:s}),(0,x.jsx)(`text`,{className:`react-flow__edge-text`,y:d.height/2,dy:`0.3em`,ref:m,style:r,children:n}),c]}):null}wu.displayName=`EdgeText`;var Tu=(0,y.memo)(wu);function Eu({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...u}){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`path`,{...u,d:e,fill:`none`,className:S([`react-flow__edge-path`,u.className])}),l?(0,x.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:l,className:`react-flow__edge-interaction`}):null,r&&ro(t)&&ro(n)?(0,x.jsx)(Tu,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function Du({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===B.Left||e===B.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function Ou({sourceX:e,sourceY:t,sourcePosition:n=B.Bottom,targetX:r,targetY:i,targetPosition:a=B.Top}){let[o,s]=Du({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=Du({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=Ao({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function ku(e){return(0,y.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})=>{let[v,y,b]=Ou({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),S=e.isInternal?void 0:t;return(0,x.jsx)(Eu,{id:S,path:v,labelX:y,labelY:b,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_})})}var Au=ku({isInternal:!1}),ju=ku({isInternal:!0});Au.displayName=`SimpleBezierEdge`,ju.displayName=`SimpleBezierEdgeInternal`;function Mu(e){return(0,y.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=B.Bottom,targetPosition:m=B.Top,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,S]=Go({sourceX:n,sourceY:r,sourcePosition:p,targetX:i,targetY:a,targetPosition:m,borderRadius:_?.borderRadius,offset:_?.offset,stepPosition:_?.stepPosition}),C=e.isInternal?void 0:t;return(0,x.jsx)(Eu,{id:C,path:y,labelX:b,labelY:S,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:v})})}var Nu=Mu({isInternal:!1}),Pu=Mu({isInternal:!0});Nu.displayName=`SmoothStepEdge`,Pu.displayName=`SmoothStepEdgeInternal`;function Fu(e){return(0,y.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,x.jsx)(Nu,{...n,id:r,pathOptions:(0,y.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var Iu=Fu({isInternal:!1}),Lu=Fu({isInternal:!0});Iu.displayName=`StepEdge`,Lu.displayName=`StepEdgeInternal`;function Ru(e){return(0,y.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{let[g,_,v]=Bo({sourceX:n,sourceY:r,targetX:i,targetY:a}),y=e.isInternal?void 0:t;return(0,x.jsx)(Eu,{id:y,path:g,labelX:_,labelY:v,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}var zu=Ru({isInternal:!1}),Bu=Ru({isInternal:!0});zu.displayName=`StraightEdge`,Bu.displayName=`StraightEdgeInternal`;function Vu(e){return(0,y.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=B.Bottom,targetPosition:s=B.Top,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:_,interactionWidth:v})=>{let[y,b,S]=No({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:_?.curvature}),C=e.isInternal?void 0:t;return(0,x.jsx)(Eu,{id:C,path:y,labelX:b,labelY:S,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:v})})}var Hu=Vu({isInternal:!1}),Uu=Vu({isInternal:!0});Hu.displayName=`BezierEdge`,Uu.displayName=`BezierEdgeInternal`;var Wu={default:Uu,straight:Bu,step:Lu,smoothstep:Pu,simplebezier:ju},Gu={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Ku=(e,t,n)=>n===B.Left?e-t:n===B.Right?e+t:e,qu=(e,t,n)=>n===B.Top?e-t:n===B.Bottom?e+t:e,Ju=`react-flow__edgeupdater`;function Yu({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return(0,x.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:S([Ju,`${Ju}-${s}`]),cx:Ku(t,r,e),cy:qu(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function Xu({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){let m=U(),h=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:c,cancelConnection:p,nodeLookup:h,rfId:g,panBy:_,updateConnection:v}=m.getState(),y=t.type===`target`;Ms.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:p,panBy:_,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>l?.(n,e),onConnectStart:(r,i)=>{f(!0),u?.(e,n,t.type),c?.(r,i)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),d?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:`target`}),_=e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:`source`}),v=()=>p(!0),y=()=>p(!1);return(0,x.jsxs)(x.Fragment,{children:[(e===!0||e===`source`)&&(0,x.jsx)(Yu,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:g,onMouseEnter:v,onMouseOut:y,type:`source`}),(e===!0||e===`target`)&&(0,x.jsx)(Yu,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:_,onMouseEnter:v,onMouseOut:y,type:`target`})]})}function Zu({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:m,edgeTypes:h,noPanClassName:g,onError:_,disableKeyboardA11y:v}){let b=H(t=>t.edgeLookup.get(e)),C=H(e=>e.defaultEdgeOptions);b=C?{...C,...b}:b;let w=b.type||`default`,T=h?.[w]||Wu[w];T===void 0&&(_?.(`011`,ba.error011(w)),w=`default`,T=h?.default||Wu.default);let E=!!(b.focusable||t&&b.focusable===void 0),D=d!==void 0&&(b.reconnectable||n&&b.reconnectable===void 0),O=!!(b.selectable||r&&b.selectable===void 0),k=(0,y.useRef)(null),[A,j]=(0,y.useState)(!1),[M,ee]=(0,y.useState)(!1),N=U(),{zIndex:P=b.zIndex,sourceX:te,sourceY:ne,targetX:re,targetY:ie,sourcePosition:F,targetPosition:ae}=H((0,y.useCallback)(t=>{let n=t.nodeLookup.get(b.source),r=t.nodeLookup.get(b.target);if(!n||!r)return Gu;let i=qo({id:e,sourceNode:n,targetNode:r,sourceHandle:b.sourceHandle||null,targetHandle:b.targetHandle||null,connectionMode:t.connectionMode,onError:_}),a=Fo({selected:b.selected,zIndex:b.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode});return{...i||Gu,zIndex:a}},[b.source,b.target,b.sourceHandle,b.targetHandle,b.selected,b.zIndex,_]),vc),oe=(0,y.useMemo)(()=>b.markerStart?`url('#${Zo(b.markerStart,m)}')`:void 0,[b.markerStart,m]),se=(0,y.useMemo)(()=>b.markerEnd?`url('#${Zo(b.markerEnd,m)}')`:void 0,[b.markerEnd,m]);if(b.hidden||te===null||ne===null||re===null||ie===null)return null;let ce=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=N.getState();O&&(N.setState({nodesSelectionActive:!1}),b.selected&&a?(r({nodes:[],edges:[b]}),k.current?.blur()):n([e])),i&&i(t,b)},le=a?e=>{a(e,{...b})}:void 0,ue=o?e=>{o(e,{...b})}:void 0,de=s?e=>{s(e,{...b})}:void 0,fe=c?e=>{c(e,{...b})}:void 0,pe=l?e=>{l(e,{...b})}:void 0;return(0,x.jsx)(`svg`,{style:{zIndex:P},children:(0,x.jsxs)(`g`,{className:S([`react-flow__edge`,`react-flow__edge-${w}`,b.className,g,{selected:b.selected,animated:b.animated,inactive:!O&&!i,updating:A,selectable:O}]),onClick:ce,onDoubleClick:le,onContextMenu:ue,onMouseEnter:de,onMouseMove:fe,onMouseLeave:pe,onKeyDown:E?t=>{if(!v&&Sa.includes(t.key)&&O){let{unselectNodesAndEdges:n,addSelectedEdges:r}=N.getState();t.key===`Escape`?(k.current?.blur(),n({edges:[b]})):r([e])}}:void 0,tabIndex:E?0:void 0,role:b.ariaRole??(E?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":b.ariaLabel===null?void 0:b.ariaLabel||`Edge from ${b.source} to ${b.target}`,"aria-describedby":E?`${Ec}-${m}`:void 0,ref:k,...b.domAttributes,children:[!M&&(0,x.jsx)(T,{id:e,source:b.source,target:b.target,type:b.type,selected:b.selected,animated:b.animated,selectable:O,deletable:b.deletable??!0,label:b.label,labelStyle:b.labelStyle,labelShowBg:b.labelShowBg,labelBgStyle:b.labelBgStyle,labelBgPadding:b.labelBgPadding,labelBgBorderRadius:b.labelBgBorderRadius,sourceX:te,sourceY:ne,targetX:re,targetY:ie,sourcePosition:F,targetPosition:ae,data:b.data,style:b.style,sourceHandleId:b.sourceHandle,targetHandleId:b.targetHandle,markerStart:oe,markerEnd:se,pathOptions:`pathOptions`in b?b.pathOptions:void 0,interactionWidth:b.interactionWidth}),D&&(0,x.jsx)(Xu,{edge:b,isReconnectable:D,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:te,sourceY:ne,targetX:re,targetY:ie,sourcePosition:F,targetPosition:ae,setUpdateHover:j,setReconnecting:ee})]})})}var Qu=(0,y.memo)(Zu),$u=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function ed({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:h}){let{edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,onError:y}=H($u,vc),b=gu(t);return(0,x.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,x.jsx)(Cu,{defaultColor:e,rfId:n}),b.map(e=>(0,x.jsx)(Qu,{id:e,edgesFocusable:g,edgesReconnectable:_,elementsSelectable:v,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,rfId:n,onError:y,edgeTypes:r,disableKeyboardA11y:h},e))]})}ed.displayName=`EdgeRenderer`;var G=(0,y.memo)(ed),td=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function K({children:e}){let t=U(),n=(0,y.useRef)(null),[r]=(0,y.useState)(()=>t.getState().transform);return pl(()=>{let e=null,r=()=>{let r=t.getState().transform;e&&r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]||(e=r,n.current&&(n.current.style.transform=td(r)))};return r(),t.subscribe(r)},[t]),(0,x.jsx)(`div`,{ref:n,className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:td(r)},children:e})}function q(e){let t=bl(),n=(0,y.useRef)(!1);(0,y.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var nd=e=>e.panZoom?.syncViewport;function rd(e){let t=H(nd),n=U();return(0,y.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function id(e){return e.connection.inProgress?{...e.connection,to:oo(e.connection.to,e.transform)}:{...e.connection}}function ad(e){return e?t=>e(id(t)):id}function od(e){return H(ad(e),vc)}var sd=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function cd({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=H(sd,vc);return a&&i&&c?(0,x.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,x.jsx)(`g`,{className:S([`react-flow__connection`,xo(s)]),children:(0,x.jsx)(ld,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}var ld=({style:e,type:t=Oa.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:l,toNode:u,toHandle:d,toPosition:f,pointer:p}=od();if(!i)return;if(n)return(0,x.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:f,connectionStatus:xo(r),toNode:u,toHandle:d,pointer:p});let m=``,h={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:f};switch(t){case Oa.Bezier:[m]=No(h);break;case Oa.SimpleBezier:[m]=Ou(h);break;case Oa.Step:[m]=Go({...h,borderRadius:0});break;case Oa.SmoothStep:[m]=Go(h);break;default:[m]=Bo(h)}return(0,x.jsx)(`path`,{d:m,fill:`none`,className:`react-flow__connection-path`,style:e})};ld.displayName=`ConnectionLine`;var ud={};function dd(e=ud){(0,y.useRef)(e),U(),(0,y.useEffect)(()=>{},[e])}function fd(){U(),(0,y.useRef)(!1),(0,y.useEffect)(()=>{},[])}function pd({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:_,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,deleteKeyCode:T,onlyRenderVisibleElements:E,elementsSelectable:D,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,preventScrolling:M,defaultMarkerColor:ee,zoomOnScroll:N,zoomOnPinch:P,panOnScroll:te,panOnScrollSpeed:ne,panOnScrollMode:re,zoomOnDoubleClick:ie,panOnDrag:F,autoPanOnSelection:ae,onPaneClick:oe,onPaneMouseEnter:se,onPaneMouseMove:ce,onPaneMouseLeave:le,onPaneScroll:ue,onPaneContextMenu:de,paneClickDistance:fe,nodeClickDistance:pe,onEdgeContextMenu:me,onEdgeMouseEnter:I,onEdgeMouseMove:L,onEdgeMouseLeave:he,reconnectRadius:ge,onReconnect:_e,onReconnectStart:ve,onReconnectEnd:ye,noDragClassName:be,noWheelClassName:xe,noPanClassName:Se,disableKeyboardA11y:Ce,nodeExtent:we,rfId:Te,viewport:Ee,onViewportChange:De,nodesDraggable:Oe}){return dd(e),dd(t),fd(),q(n),rd(Ee),(0,x.jsx)(W,{onPaneClick:oe,onPaneMouseEnter:se,onPaneMouseMove:ce,onPaneMouseLeave:le,onPaneContextMenu:de,onPaneScroll:ue,paneClickDistance:fe,deleteKeyCode:T,selectionKeyCode:v,selectionOnDrag:y,selectionMode:b,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,elementsSelectable:D,zoomOnScroll:N,zoomOnPinch:P,zoomOnDoubleClick:ie,panOnScroll:te,panOnScrollSpeed:ne,panOnScrollMode:re,panOnDrag:F,autoPanOnSelection:ae,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,onSelectionContextMenu:d,preventScrolling:M,noDragClassName:be,noWheelClassName:xe,noPanClassName:Se,disableKeyboardA11y:Ce,onViewportChange:De,isControlledViewport:!!Ee,children:(0,x.jsxs)(K,{children:[(0,x.jsx)(G,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:_e,onReconnectStart:ve,onReconnectEnd:ye,onlyRenderVisibleElements:E,onEdgeContextMenu:me,onEdgeMouseEnter:I,onEdgeMouseMove:L,onEdgeMouseLeave:he,reconnectRadius:ge,defaultMarkerColor:ee,noPanClassName:Se,disableKeyboardA11y:Ce,rfId:Te}),(0,x.jsx)(cd,{style:h,type:m,component:g,containerStyle:_}),(0,x.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,x.jsx)(hu,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:u,nodeClickDistance:pe,onlyRenderVisibleElements:E,noPanClassName:Se,noDragClassName:be,disableKeyboardA11y:Ce,nodeExtent:we,rfId:Te,nodesDraggable:Oe}),(0,x.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}pd.displayName=`GraphView`;var md=(0,y.memo)(pd),hd=io(`React Flow`,`https://reactflow.dev/`),gd=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??xa;gs(h,g,_);let{nodesInitialized:x}=ss(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=fo(Ia(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),i,a,c,l,s?.padding??.1);S=[e,t,n]}return{rfId:`1`,width:i??0,height:a??0,transform:S,nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:_,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:xa,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:wa.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:y,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:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...Da},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:hd,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:Ca,zIndexMode:f,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}},_d=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>_c((p,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=m();t&&(await Ba({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...gd({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,fitViewQueued:o,zIndexMode:s,nodesSelectionActive:c}=m(),{nodesInitialized:l,hasSelectedNodes:u}=ss(e,t,n,{nodeOrigin:r,nodeExtent:i,elevateNodesOnSelect:a,checkEquality:!0,zIndexMode:s}),d=c&&u;o&&l?(h(),p({nodes:e,nodesInitialized:l,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:d})):p({nodes:e,nodesInitialized:l,nodesSelectionActive:d})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();gs(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:c,zIndexMode:l}=m(),{changes:u,updatedInternals:d}=ps(e,n,r,i,a,o,l);d&&(is(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:l}),c?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log(`React Flow: trigger node changes`,u),t?.(u)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:c}=m();for(let[a,c]of e){let e=i.get(a),l=!!(e?.expandParent&&e?.parentId&&c?.position),u={id:a,type:`position`,position:l?{x:Math.max(0,c.position.x),y:Math.max(0,c.position.y)}:c.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=Yo(e,o.fromHandle,B.Left,!0);s({...o,from:t})}l&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...c.internals.positionAbsolute,width:c.measured.width??0,height:c.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=fs(n,i,e,t);r.push(...a)}for(let e of c.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=m();e?.length&&(i&&n(nl(e,r)),a&&console.log(`React Flow: trigger node changes`,e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=m();e?.length&&(i&&n(rl(e,r)),a&&console.log(`React Flow: trigger edge changes`,e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){i(e.map(e=>il(e,!0)));return}i(al(r,new Set([...e]),!0)),a(al(n))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){a(e.map(e=>il(e,!0)));return}a(al(n,new Set([...e]))),i(al(r,new Set,!0))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=m(),s=e||r,c=t||n,l=[];for(let e of s){if(!e.selected)continue;let t=i.get(e.id);t&&(t.selected=!1),l.push(il(e.id,!1))}let u=[];for(let e of c)e.selected&&u.push(il(e.id,!1));a(l),o(u)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=m();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,il(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,il(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=m();(e[0][0]!==o[0][0]||e[0][1]!==o[0][1]||e[1][0]!==o[1][0]||e[1][1]!==o[1][1])&&(ss(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=m();return ms({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=m();if(!o)return!1;let s=n?.zoom===void 0?a:n.zoom;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0},cancelConnection:()=>{p({connection:{...Da}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...gd()})}},Object.is);function vd({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){let[m]=(0,y.useState)(()=>_d({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:l,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return(0,x.jsx)(xc,{value:m,children:(0,x.jsx)(_l,{children:(0,x.jsx)(Hl,{children:p})})})}function yd({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,y.useContext)(bc)?(0,x.jsx)(x.Fragment,{children:e}):(0,x.jsx)(vd,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}var bd={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function xd({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,onNodeMouseEnter:v,onNodeMouseMove:b,onNodeMouseLeave:C,onNodeContextMenu:w,onNodeDoubleClick:T,onNodeDragStart:E,onNodeDrag:D,onNodeDragStop:O,onNodesDelete:k,onEdgesDelete:A,onDelete:j,onSelectionChange:M,onSelectionDragStart:ee,onSelectionDrag:N,onSelectionDragStop:P,onSelectionContextMenu:te,onSelectionStart:ne,onSelectionEnd:re,onBeforeDelete:ie,connectionMode:F,connectionLineType:ae=Oa.Bezier,connectionLineStyle:oe,connectionLineComponent:se,connectionLineContainerStyle:ce,deleteKeyCode:le=`Backspace`,selectionKeyCode:ue=`Shift`,selectionOnDrag:de=!1,selectionMode:fe=Ea.Full,panActivationKeyCode:pe=`Space`,multiSelectionKeyCode:me=po()?`Meta`:`Control`,zoomActivationKeyCode:I=po()?`Meta`:`Control`,snapToGrid:L,snapGrid:he,onlyRenderVisibleElements:ge=!1,selectNodesOnDrag:_e,nodesDraggable:ve,autoPanOnNodeFocus:ye,nodesConnectable:be,nodesFocusable:xe,nodeOrigin:Se=Vc,edgesFocusable:Ce,edgesReconnectable:we,elementsSelectable:Te=!0,defaultViewport:Ee=Hc,minZoom:De=.5,maxZoom:Oe=2,translateExtent:ke=xa,preventScrolling:Ae=!0,nodeExtent:je,defaultMarkerColor:Me=`#b1b1b7`,zoomOnScroll:Ne=!0,zoomOnPinch:Pe=!0,panOnScroll:Fe=!1,panOnScrollSpeed:Ie=.5,panOnScrollMode:Le=Ta.Free,zoomOnDoubleClick:Re=!0,panOnDrag:ze=!0,onPaneClick:Be,onPaneMouseEnter:Ve,onPaneMouseMove:He,onPaneMouseLeave:Ue,onPaneScroll:We,onPaneContextMenu:Ge,paneClickDistance:Ke=1,nodeClickDistance:qe=0,children:Je,onReconnect:Ye,onReconnectStart:Xe,onReconnectEnd:Ze,onEdgeContextMenu:Qe,onEdgeDoubleClick:$e,onEdgeMouseEnter:et,onEdgeMouseMove:tt,onEdgeMouseLeave:nt,reconnectRadius:rt=10,onNodesChange:it,onEdgesChange:at,noDragClassName:ot=`nodrag`,noWheelClassName:st=`nowheel`,noPanClassName:ct=`nopan`,fitView:lt,fitViewOptions:ut,connectOnClick:dt,attributionPosition:ft,proOptions:pt,defaultEdgeOptions:mt,elevateNodesOnSelect:ht=!0,elevateEdgesOnSelect:gt=!1,disableKeyboardA11y:_t=!1,autoPanOnConnect:vt,autoPanOnNodeDrag:yt,autoPanOnSelection:bt=!0,autoPanSpeed:xt,connectionRadius:St,isValidConnection:Ct,onError:wt,style:Tt,id:Et,nodeDragThreshold:Dt,connectionDragThreshold:Ot,viewport:kt,onViewportChange:At,width:jt,height:Mt,colorMode:Nt=`light`,debug:Pt,onScroll:Ft,ariaLabelConfig:It,zIndexMode:Lt=`basic`,...Rt},zt){let Bt=Et||`1`,Vt=Jc(Nt),Ht=(0,y.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),Ft?.(e)},[Ft]);return(0,x.jsx)(`div`,{"data-testid":`rf__wrapper`,...Rt,onScroll:Ht,style:{...Tt,...bd},ref:zt,className:S([`react-flow`,i,Vt]),id:Et,role:`application`,children:(0,x.jsxs)(yd,{nodes:e,edges:t,width:jt,height:Mt,fitView:lt,fitViewOptions:ut,minZoom:De,maxZoom:Oe,nodeOrigin:Se,nodeExtent:je,zIndexMode:Lt,children:[(0,x.jsx)(Kc,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:_,nodesDraggable:ve,autoPanOnNodeFocus:ye,nodesConnectable:be,nodesFocusable:xe,edgesFocusable:Ce,edgesReconnectable:we,elementsSelectable:Te,elevateNodesOnSelect:ht,elevateEdgesOnSelect:gt,minZoom:De,maxZoom:Oe,nodeExtent:je,onNodesChange:it,onEdgesChange:at,snapToGrid:L,snapGrid:he,connectionMode:F,translateExtent:ke,connectOnClick:dt,defaultEdgeOptions:mt,fitView:lt,fitViewOptions:ut,onNodesDelete:k,onEdgesDelete:A,onDelete:j,onNodeDragStart:E,onNodeDrag:D,onNodeDragStop:O,onSelectionDrag:N,onSelectionDragStart:ee,onSelectionDragStop:P,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:ct,nodeOrigin:Se,rfId:Bt,autoPanOnConnect:vt,autoPanOnNodeDrag:yt,autoPanSpeed:xt,onError:wt,connectionRadius:St,isValidConnection:Ct,selectNodesOnDrag:_e,nodeDragThreshold:Dt,connectionDragThreshold:Ot,onBeforeDelete:ie,debug:Pt,ariaLabelConfig:It,zIndexMode:Lt}),(0,x.jsx)(md,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:b,onNodeMouseLeave:C,onNodeContextMenu:w,onNodeDoubleClick:T,nodeTypes:a,edgeTypes:o,connectionLineType:ae,connectionLineStyle:oe,connectionLineComponent:se,connectionLineContainerStyle:ce,selectionKeyCode:ue,selectionOnDrag:de,selectionMode:fe,deleteKeyCode:le,multiSelectionKeyCode:me,panActivationKeyCode:pe,zoomActivationKeyCode:I,onlyRenderVisibleElements:ge,defaultViewport:Ee,translateExtent:ke,minZoom:De,maxZoom:Oe,preventScrolling:Ae,zoomOnScroll:Ne,zoomOnPinch:Pe,zoomOnDoubleClick:Re,panOnScroll:Fe,panOnScrollSpeed:Ie,panOnScrollMode:Le,panOnDrag:ze,autoPanOnSelection:bt,onPaneClick:Be,onPaneMouseEnter:Ve,onPaneMouseMove:He,onPaneMouseLeave:Ue,onPaneScroll:We,onPaneContextMenu:Ge,paneClickDistance:Ke,nodeClickDistance:qe,onSelectionContextMenu:te,onSelectionStart:ne,onSelectionEnd:re,onReconnect:Ye,onReconnectStart:Xe,onReconnectEnd:Ze,onEdgeContextMenu:Qe,onEdgeDoubleClick:$e,onEdgeMouseEnter:et,onEdgeMouseMove:tt,onEdgeMouseLeave:nt,reconnectRadius:rt,defaultMarkerColor:Me,noDragClassName:ot,noWheelClassName:st,noPanClassName:ct,rfId:Bt,disableKeyboardA11y:_t,nodeExtent:je,viewport:kt,onViewportChange:At,nodesDraggable:ve}),(0,x.jsx)(Bc,{onSelectionChange:M}),Je,(0,x.jsx)(Pc,{proOptions:pt,position:ft}),(0,x.jsx)(jc,{rfId:Bt,disableKeyboardA11y:_t})]})})}var Sd=fl(xd),Cd=e=>e.domNode?.querySelector(`.react-flow__edgelabel-renderer`);function wd({children:e}){let t=H(Cd);return t?(0,yc.createPortal)(e,t):null}function Td(e){let[t,n]=(0,y.useState)(e);return[t,n,(0,y.useCallback)(e=>n(t=>nl(e,t)),[])]}ba.error014();function Ed({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,x.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:S([`react-flow__background-pattern`,n,r])})}function Dd({radius:e,className:t}){return(0,x.jsx)(`circle`,{cx:e,cy:e,r:e,className:S([`react-flow__background-pattern`,`dots`,t])})}var Od;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(Od||={});var kd={[Od.Dots]:1,[Od.Lines]:1,[Od.Cross]:6},Ad=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function jd({id:e,variant:t=Od.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:l,patternClassName:u}){let d=(0,y.useRef)(null),{transform:f,patternId:p}=H(Ad,vc),m=r||kd[t],h=t===Od.Dots,g=t===Od.Cross,_=Array.isArray(n)?n:[n,n],v=[_[0]*f[2]||1,_[1]*f[2]||1],b=m*f[2],C=Array.isArray(a)?a:[a,a],w=g?[b,b]:v,T=[C[0]*f[2]+w[0]/2,C[1]*f[2]+w[1]/2],E=`${p}${e||``}`;return(0,x.jsxs)(`svg`,{className:S([`react-flow__background`,l]),style:{...c,...Tl,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":`rf__background`,children:[(0,x.jsx)(`pattern`,{id:E,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${T[0]},-${T[1]})`,children:h?(0,x.jsx)(Dd,{radius:b/2,className:u}):(0,x.jsx)(Ed,{dimensions:w,lineWidth:i,variant:t,className:u})}),(0,x.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${E})`})]})}jd.displayName=`Background`;var Md=(0,y.memo)(jd);function Nd(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,x.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function Pd(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,x.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function Fd(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,x.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 Id(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,x.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 Ld(){return(0,x.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,x.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 Rd({children:e,className:t,...n}){return(0,x.jsx)(`button`,{type:`button`,className:S([`react-flow__controls-button`,t]),...n,children:e})}var zd=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Bd({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:l,children:u,position:d=`bottom-left`,orientation:f=`vertical`,"aria-label":p}){let m=U(),{isInteractive:h,minZoomReached:g,maxZoomReached:_,ariaLabelConfig:v}=H(zd,vc),{zoomIn:y,zoomOut:b,fitView:C}=bl();return(0,x.jsxs)(Mc,{className:S([`react-flow__controls`,f===`horizontal`?`horizontal`:`vertical`,l]),position:d,style:e,"data-testid":`rf__controls`,"aria-label":p??v[`controls.ariaLabel`],children:[t&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Rd,{onClick:()=>{y(),a?.()},className:`react-flow__controls-zoomin`,title:v[`controls.zoomIn.ariaLabel`],"aria-label":v[`controls.zoomIn.ariaLabel`],disabled:_,children:(0,x.jsx)(Nd,{})}),(0,x.jsx)(Rd,{onClick:()=>{b(),o?.()},className:`react-flow__controls-zoomout`,title:v[`controls.zoomOut.ariaLabel`],"aria-label":v[`controls.zoomOut.ariaLabel`],disabled:g,children:(0,x.jsx)(Pd,{})})]}),n&&(0,x.jsx)(Rd,{className:`react-flow__controls-fitview`,onClick:()=>{C(i),s?.()},title:v[`controls.fitView.ariaLabel`],"aria-label":v[`controls.fitView.ariaLabel`],children:(0,x.jsx)(Fd,{})}),r&&(0,x.jsx)(Rd,{className:`react-flow__controls-interactive`,onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),c?.(!h)},title:v[`controls.interactive.ariaLabel`],"aria-label":v[`controls.interactive.ariaLabel`],children:h?(0,x.jsx)(Ld,{}):(0,x.jsx)(Id,{})}),u]})}Bd.displayName=`Controls`;var Vd=(0,y.memo)(Bd);function Hd({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:l,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){let{background:m,backgroundColor:h}=a||{},g=o||m||h;return(0,x.jsx)(`rect`,{className:S([`react-flow__minimap-node`,{selected:f},l]),x:t,y:n,rx:u,ry:u,width:r,height:i,style:{fill:g,stroke:s,strokeWidth:c},shapeRendering:d,onClick:p?t=>p(t,e):void 0})}var Ud=(0,y.memo)(Hd),Wd=e=>e.nodes.map(e=>e.id),Gd=e=>e instanceof Function?e:()=>e;function Kd({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=Ud,onClick:o}){let s=H(Wd,vc),c=Gd(t),l=Gd(e),u=Gd(n),d=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,x.jsx)(x.Fragment,{children:s.map(e=>(0,x.jsx)(Jd,{id:e,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},e))})}function qd({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){let{node:l,x:u,y:d,width:f,height:p}=H(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=ho(r);return{node:r,x:i,y:a,width:o,height:s}},vc);return!l||l.hidden||!go(l)?null:(0,x.jsx)(s,{x:u,y:d,width:f,height:p,style:l.style,selected:!!l.selected,className:r(l),color:t(l),borderRadius:i,strokeColor:n(l),strokeWidth:a,shapeRendering:o,onClick:c,id:l.id})}var Jd=(0,y.memo)(qd),Yd=(0,y.memo)(Kd),Xd=200,Zd=150,Qd=e=>!e.hidden,$d=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},n=!1;for(let t of e.nodeLookup.values())if(!t.hidden){n=!0;break}return{viewBB:t,boundingRect:n?$a(Ia(e.nodeLookup,{filter:Qd}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},ef=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,tf=(e,t)=>ef(e.viewBB,t.viewBB)&&ef(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,nf=`react-flow__minimap-desc`;function rf({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:u,maskStrokeWidth:d,position:f=`bottom-right`,onClick:p,onNodeClick:m,pannable:h=!1,zoomable:g=!1,ariaLabel:_,inversePan:v,zoomStep:b=1,offsetScale:C=5}){let w=U(),T=(0,y.useRef)(null),{boundingRect:E,panZoom:D,viewBB:O,rfId:k,translateExtent:A,flowWidth:j,flowHeight:M,ariaLabelConfig:ee}=H($d,tf),N=e?.width??Xd,P=e?.height??Zd,te=E.width/N,ne=E.height/P,re=Math.max(te,ne),ie=re*N,F=re*P,ae=C*re,oe=E.x-(ie-E.width)/2-ae,se=E.y-(F-E.height)/2-ae,ce=ie+ae*2,le=F+ae*2,ue=`${nf}-${k}`,de=(0,y.useRef)(0),fe=(0,y.useRef)();de.current=re,(0,y.useEffect)(()=>{let e=w.getState().panZoom;if(T.current&&e)return fe.current=Ns({domNode:T.current,panZoom:e,getTransform:()=>w.getState().transform,getViewScale:()=>de.current}),()=>{fe.current?.destroy()}},[D]),(0,y.useEffect)(()=>{fe.current?.update({translateExtent:A,width:j,height:M,inversePan:v,pannable:h,zoomStep:b,zoomable:g})},[h,g,v,b,A,j,M]);let pe=p?e=>{let[t,n]=fe.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,me=(0,y.useCallback)((e,t)=>{let n=w.getState().nodeLookup.get(t).internals.userNode;m?.(e,n)},[m]),I=m?me:void 0,L=_??ee[`minimap.ariaLabel`];return(0,x.jsx)(Mc,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof c==`string`?c:void 0,"--xy-minimap-mask-background-color-props":typeof l==`string`?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof u==`string`?u:void 0,"--xy-minimap-mask-stroke-width-props":typeof d==`number`?d*re:void 0,"--xy-minimap-node-background-color-props":typeof r==`string`?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n==`string`?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o==`number`?o:void 0},className:S([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,x.jsxs)(`svg`,{width:N,height:P,viewBox:`${oe} ${se} ${ce} ${le}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":ue,ref:T,onClick:pe,children:[L&&(0,x.jsx)(`title`,{id:ue,children:L}),(0,x.jsx)(Yd,{onClick:I,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),(0,x.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${oe-ae},${se-ae}h${ce+ae*2}v${le+ae*2}h${-ce-ae*2}z
15
- M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}rf.displayName=`MiniMap`;var af=(0,y.memo)(rf),of=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,sf={[Js.Line]:`right`,[Js.Handle]:`bottom-right`};function cf({nodeId:e,position:t,variant:n=Js.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:_}){let v=zl(),b=typeof e==`string`?e:v,C=U(),w=(0,y.useRef)(null),T=n===Js.Handle,E=H((0,y.useCallback)(of(T&&p),[T,p]),vc),D=(0,y.useRef)(null),O=t??sf[n];(0,y.useEffect)(()=>{if(w.current&&b)return D.current||=ac({domNode:w.current,nodeId:b,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=C.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=C.getState(),o=[],s={x:e.x,y:e.y},c=r.get(b);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=fs([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,..._o({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:b,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:b,type:`dimensions`,resizing:!0,setAttributes:f?f===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:b,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};C.getState().triggerNodeChanges([n])}}),D.current.update({controlPosition:O,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:_,shouldResize:m}),()=>{D.current?.destroy()}},[O,s,c,l,u,d,h,g,_,m]);let k=O.split(`-`);return(0,x.jsx)(`div`,{className:S([`react-flow__resize-control`,`nodrag`,...k,n,r]),ref:w,style:{...i,scale:E,...o&&{[T?`backgroundColor`:`borderColor`]:o}},children:a})}(0,y.memo)(cf);var lf=[{key:`study`,label:`検討`,en:`study`,color:`#6b7075`},{key:`research`,label:`調査`,en:`research`,color:`#7a5230`},{key:`design`,label:`設計`,en:`design`,color:`#2f6fb3`},{key:`ui`,label:`デザイン`,en:`ui`,color:`#c0427a`},{key:`build`,label:`実装`,en:`build`,color:`#5a4fcf`},{key:`verify`,label:`検証`,en:`verify`,color:`#26753d`},{key:`evaluate`,label:`評価`,en:`evaluate`,color:`#8a6508`},{key:`improve`,label:`改善`,en:`improve`,color:`#b5581a`},{key:`fix`,label:`課題解決`,en:`fix`,color:`#c0392b`},{key:`docs`,label:`文書`,en:`docs`,color:`#5f6f3a`},{key:`ops`,label:`運用`,en:`ops`,color:`#1f7a8c`},{key:`other`,label:`その他`,en:`other`,color:`#8a8f94`,neutral:!0}];function uf(e){if(e)return lf.find(t=>t.key===e)}var df=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,ff=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=df[n[e]&63];return t},J=`root`,Y=()=>ff(10),pf=()=>new Date().toISOString(),mf=e=>structuredClone(e);function X(e){let t=e.nextKey??1;return e.nextKey=t+1,`B${t}`}function hf(e){let t=new Set;for(let n of Object.values(e.blocks))n.key&&t.add(n.key);let n=e.nextKey??1;for(let r of Object.values(e.blocks))if(!(r.id===`root`||r.key)){for(;t.has(`B${n}`);)n++;r.key=`B${n}`,t.add(r.key),n++}e.nextKey=Math.max(n,e.nextKey??1)}var gf={left:120,top:76},_f=60;function vf(e,t){let n=e.blocks[t];return n?_f+(Math.min(3,Math.max(1,Math.ceil(n.title.length*14/400)))-1)*18+16:gf.top}function yf(e){let t=pf(),n={id:J,parentId:null,title:e,description:``,status:`black`,assigneeIds:[],position:{x:0,y:0},collapsed:!1,artifacts:[],activity:null,decisions:[]},r={id:Y(),blockId:J,direction:`out`,name:`最終成果物`,description:``,required:!0,artifacts:[]};return bf({schemaVersion:5,id:Y(),name:e,description:``,createdAt:t,visibility:`private`,members:[],blocks:{[J]:n},ports:{[r.id]:r},edges:{},terminals:{in:{x:0,y:200},out:{x:1100,y:200}},log:[],agents:{},nextKey:1},e).project}function bf(e,t){let n=mf(e),r=xf(n),i=Y(),a=r.length===0?40:Math.max(...r.map(e=>e.position.y))+400;n.blocks[i]={id:i,key:X(n),kind:`project`,parentId:J,title:t,description:``,status:`black`,assigneeIds:[],position:{x:300,y:a},collapsed:!1,artifacts:[],activity:null,decisions:[]};let o={id:Y(),blockId:i,direction:`out`,name:`最終成果物`,description:``,required:!0,artifacts:[]};n.ports[o.id]=o;let s=Z(n,J,`out`).find(e=>Ff(n,{portId:e.id,side:`inner`}).length===0);s||(s={id:Y(),blockId:J,direction:`out`,name:r.length===0?`最終成果物`:`${t} の成果物`,description:``,required:!0,artifacts:[]},n.ports[s.id]=s);let c=Y();return n.edges[c]={id:c,from:{portId:o.id,side:`outer`},to:{portId:s.id,side:`inner`},kind:`up`,auto:!1},{project:n,blockId:i}}function xf(e){return jf(e,J).filter(e=>e.kind===`project`)}function Sf(e){return xf(e)[0]?.id??`root`}function Cf(e){let t=xf(e),n=t.length>0?t.map(e=>e.id):[J],r=[];for(let t of n)r.push(...jf(e,t).filter(e=>kf(e)!==`project`));return r.sort((e,t)=>e.position.y-t.position.y||e.position.x-t.position.x)}function wf(e,t){let n=new Set(Cf(e).map(e=>e.id)),r=t;for(;r!==null;){if(n.has(r))return r;r=e.blocks[r]?.parentId??null}return null}function Tf(e,t,n){let r=n;for(;r!==null;){if(r===t)return!0;r=e.blocks[r]?.parentId??null}return!1}function Ef(e){let t=Object.values(e.blocks).filter(e=>e.id!==`root`&&kf(e)!==`project`&&!e.collapsed).map(e=>e.id);if(t.length===0)return e;let n={...e.blocks};for(let e of t)n[e]={...n[e],collapsed:!0};return{...e,blocks:n}}function Df(e,t){let n=e.blocks[t]?.parentId??null;if(n===null||n===`root`)return null;let r=e.blocks[n];return!r||kf(r)===`project`?null:n}function Of(e,t){let n=[],r=t;for(;r!==null&&r!==`root`;){let t=e.blocks[r];if(!t||kf(t)===`project`)break;n.unshift(t),r=t.parentId}return n}var kf=e=>e.kind??`task`;function Af(e,t=``){return{id:Y(),title:e,url:t,kind:t?`url`:`note`,note:``}}function jf(e,t){return Object.values(e.blocks).filter(e=>e.parentId===t)}function Mf(e,t){let n=[],r=[t];for(;r.length>0;){let t=r.pop();for(let i of jf(e,t))n.push(i),r.push(i.id)}return n}function Nf(e,t){let n=[],r=e.blocks[t]?.parentId??null;for(;r!==null;){let t=e.blocks[r];if(!t)break;n.push(t),r=t.parentId}return n}function Z(e,t,n){return Object.values(e.ports).filter(e=>e.blockId===t&&(n===void 0||e.direction===n))}var Pf=(e,t)=>e.portId===t.portId&&e.side===t.side;function Ff(e,t){return Object.values(e.edges).filter(e=>Pf(e.to,t))}function If(e,t){return Object.values(e.edges).filter(e=>Pf(e.from,t))}function Lf(e,t){let n=e.ports[t.portId];if(!n)return null;let r=e.blocks[n.blockId];return r?t.side===`inner`?r.id:r.parentId:null}function Rf(e,t){return Nf(e,t).some(e=>e.collapsed)}function zf(e,t,n){let r=e.ports[t.portId],i=e.ports[n.portId];if(!r||!i)return{ok:!1,reason:`ポートが見つかりません`};if(t.portId===n.portId)return{ok:!1,reason:`同じポートどうしはつなげません`};let a=r.direction===`out`&&t.side===`outer`||r.direction===`in`&&t.side===`inner`,o=i.direction===`in`&&n.side===`outer`||i.direction===`out`&&n.side===`inner`;if(!a)return{ok:!1,reason:`線は出力ポート (または親の入力) から引いてください`};if(!o)return{ok:!1,reason:`線は入力ポート (または親の出力) につないでください`};let s=Lf(e,t),c=Lf(e,n);if(s===null||c===null||s!==c)return{ok:!1,reason:`同じ階層のポートどうしだけつなげます`};let l;return l=r.direction===`out`&&i.direction===`in`?`sibling`:r.direction===`out`&&i.direction===`out`?`up`:r.direction===`in`&&i.direction===`in`?`down`:`through`,l===`sibling`&&Bf(e,r.blockId,i.blockId)?{ok:!1,reason:`循環する結線はできません`}:{ok:!0,kind:l}}function Bf(e,t,n){if(t===n)return!0;let r=new Set,i=[n];for(;i.length>0;){let n=i.pop();if(n===t)return!0;if(!r.has(n)){r.add(n);for(let t of Z(e,n,`out`))for(let n of If(e,{portId:t.id,side:`outer`})){if(n.kind!==`sibling`)continue;let t=e.ports[n.to.portId]?.blockId;t&&i.push(t)}}}return!1}function Vf(e){return mf(e)}function Q(e,t){let n=Vf(e),r=Y(),i=jf(n,t.parentId),a;a=t.parentId===`root`?i.length===0?{x:260,y:80}:{x:Math.max(...i.map(e=>e.position.x))+300,y:80}:i.length===0?{x:gf.left,y:vf(e,t.parentId)}:{x:gf.left,y:Math.max(...i.map(e=>e.position.y))+110},n.blocks[r]={id:r,key:X(n),parentId:t.parentId,title:t.title,description:``,status:`black`,assigneeIds:[],position:t.position??a,collapsed:!1,artifacts:[],activity:null,decisions:[]};let o={id:Y(),blockId:r,direction:`out`,name:t.outputName??`出力`,description:``,required:!0,artifacts:[]};n.ports[o.id]=o,t.actor&&mp(n,{actor:t.actor,kind:`added`,blockId:r,message:`「${t.title}」を追加`});let s=n.blocks[t.parentId];return s&&s.id!==`root`&&s.status===`black`&&(s.status=`gray`),{project:np(n),blockId:r}}function Hf(e,t,n){let r=Vf(e),i=r.blocks[t];return i?(Object.assign(i,n),r):e}function Uf(e,t,n){let r=mf(e),i=r.blocks[t];return i?(i.position=i.parentId!==null&&i.parentId!==`root`?{x:Math.max(gf.left,n.x),y:Math.max(vf(r,i.parentId),n.y)}:n,r):e}function Wf(e,t,n){let r=mf(e);return r.terminals[t]=n,r}function Gf(e,t){if(t===`root`)return e;let n=Vf(e),r=new Set([t,...Mf(n,t).map(e=>e.id)]),i=new Set(Object.values(n.ports).filter(e=>r.has(e.blockId)).map(e=>e.id));for(let e of Object.values(n.edges))(i.has(e.from.portId)||i.has(e.to.portId))&&delete n.edges[e.id];for(let e of i)delete n.ports[e];for(let e of r)delete n.blocks[e];return np(n)}function Kf(e,t){if(t.direction===`out`&&t.blockId!==`root`&&!Yf(e,t.blockId))return{project:e,portId:Z(e,t.blockId,`out`)[0]?.id??``};let n=Vf(e),r=Y();return n.ports[r]={id:r,blockId:t.blockId,direction:t.direction,name:t.name,description:``,required:!0,artifacts:[]},t.direction===`out`&&kf(n.blocks[t.blockId])===`project`&&qf(n,r),{project:np(n),portId:r}}function qf(e,t){let n=e.ports[t];if(!n||n.direction!==`out`||Object.values(e.edges).some(n=>n.from.portId===t&&n.from.side===`outer`&&e.ports[n.to.portId]?.blockId===`root`))return;let r={id:Y(),blockId:J,direction:`out`,name:n.name,description:n.description,required:!0,artifacts:[]};e.ports[r.id]=r;let i=Y();e.edges[i]={id:i,from:{portId:t,side:`outer`},to:{portId:r.id,side:`inner`},kind:`up`,auto:!0}}function Jf(e,t){let n=Object.values(e.edges).find(n=>n.from.portId===t&&n.from.side===`outer`&&e.ports[n.to.portId]?.blockId===`root`);return n?e.ports[n.to.portId]??null:null}function Yf(e,t){return kf(e.blocks[t])===`project`||t===`root`||Z(e,t,`out`).length===0||jf(e,t).length>0}function Xf(e,t,n){let r=Vf(e),i=r.ports[t];if(!i)return e;if(Object.assign(i,n),n.name!==void 0&&i.direction===`out`&&kf(r.blocks[i.blockId])===`project`){let e=Jf(r,t);e&&(e.name=n.name)}return r}function Zf(e,t){let n=e.ports[t];if(!n||n.promotedFrom)return e;let r=Vf(e);if(n.direction===`out`&&kf(r.blocks[n.blockId])===`project`){let e=Jf(r,t);if(e){for(let t of Object.values(r.edges))(t.from.portId===e.id||t.to.portId===e.id)&&delete r.edges[t.id];delete r.ports[e.id]}}for(let e of Object.values(r.edges))(e.from.portId===t||e.to.portId===t)&&delete r.edges[e.id];return delete r.ports[t],np(r)}function Qf(e,t,n){let r=zf(e,t,n);if(!r.ok)return{project:e,error:r.reason};let i=Vf(e);for(let e of Ff(i,n))delete i.edges[e.id];let a=Y();return i.edges[a]={id:a,from:t,to:n,kind:r.kind,auto:!1},{project:np(i),edgeId:a}}function $f(e,t){if(!e.edges[t])return e;let n=Vf(e);return delete n.edges[t],np(n)}function ep(e,t,n){let r=Vf(e),i={id:Y(),name:t,color:n};return r.members.push(i),{project:r,memberId:i.id}}function tp(e,t){let n=Vf(e);n.members=n.members.filter(e=>e.id!==t);for(let e of Object.values(n.blocks))e.assigneeIds=e.assigneeIds.filter(e=>e!==t);return n}function np(e){let t=mf(e);for(let e=0;e<64;e++){let e=!1;for(let n of Object.values(t.edges))n.auto&&Ff(t,n.to).some(e=>!e.auto)&&(delete t.edges[n.id],e=!0);for(let n of Object.values(t.ports))if(n.promotedFrom&&!(If(t,{portId:n.id,side:`inner`}).length>0)){for(let e of Object.values(t.edges))(e.from.portId===n.id||e.to.portId===n.id)&&delete t.edges[e.id];delete t.ports[n.id],e=!0}for(let n of Object.values(t.ports)){if(!n.promotedFrom||!t.ports[n.id])continue;let r=Object.values(t.ports).find(e=>e.id!==n.id&&e.blockId===n.blockId&&e.direction===`in`&&e.promotedFrom&&e.name===n.name);if(r){for(let e of Object.values(t.edges))e.from.portId===r.id&&(e.from={...e.from,portId:n.id}),e.to.portId===r.id&&(e.to={...e.to,portId:n.id});delete t.ports[r.id],e=!0}}for(let n of Object.values(t.ports)){if(n.direction!==`in`)continue;let r=t.blocks[n.blockId];if(!r||r.parentId===null||Ff(t,{portId:n.id,side:`outer`}).length>0)continue;let i=Object.values(t.ports).find(e=>e.blockId===r.parentId&&e.direction===`in`&&e.promotedFrom&&e.name===n.name);i||(i={id:Y(),blockId:r.parentId,direction:`in`,name:n.name,description:n.description,required:n.required,artifacts:[],promotedFrom:n.id},t.ports[i.id]=i);let a=Y();t.edges[a]={id:a,from:{portId:i.id,side:`inner`},to:{portId:n.id,side:`outer`},kind:`down`,auto:!0},e=!0}if(!e)break}return t}function rp(e,t){let n=e.blocks[t];if(!n)return 0;if(n.status===`white`)return 100;if(typeof n.progress==`number`)return Math.max(0,Math.min(100,n.progress));let r=jf(e,t);return r.length===0?0:Math.round(r.reduce((t,n)=>t+rp(e,n.id),0)/r.length)}function ip(e,t){let n=Mf(e,t).filter(e=>kf(e)!==`project`),r=n.length>0?n:t===`root`?[]:[e.blocks[t]].filter(e=>e&&kf(e)!==`project`),i=e=>r.filter(t=>t.status===e).length,a=i(`white`),o=r.length,s=t===`root`?(()=>{let t=xf(e);return t.length===0?0:Math.round(t.reduce((t,n)=>t+rp(e,n.id),0)/t.length)})():rp(e,t);return{total:o,white:a,gray:i(`gray`),black:i(`black`),ratio:o===0?0:a/o,percent:s}}function ap(e,t,n,r){let i=e.blocks[t];if(!i)return e;let a=Vf(e);return n===null?delete a.blocks[t].progress:a.blocks[t].progress=Math.max(0,Math.min(100,Math.round(n))),n!==null&&i.status===`black`&&n>0&&(a.blocks[t].status=`gray`),mp(a,{actor:r,kind:`note`,blockId:t,message:`「${i.title}」の進捗 ${n===null?`自動`:n+`%`}`}),a}function op(e,t,n=new Set){let r=`${t.portId}:${t.side}`;if(n.has(r))return!1;n.add(r);let i=e.ports[t.portId];if(!i)return!1;if(i.direction===`out`){let t=e.blocks[i.blockId];return i.artifacts.length>0||t?.status===`white`}return i.artifacts.length>0||Ff(e,{portId:i.id,side:`outer`}).some(t=>op(e,t.from,n))}function sp(e,t){return op(e,t.from)}function cp(e,t){let n=e.ports[t];return!n||n.direction!==`in`?!1:n.artifacts.length>0||Ff(e,{portId:t,side:`outer`}).some(t=>sp(e,t))}function lp(e,t){return Z(e,t,`in`).filter(t=>t.required&&!cp(e,t.id))}function up(e,t){let n=e.blocks[t];if(!n||n.status===`white`||jf(e,t).some(e=>e.status!==`white`))return!1;let r=Z(e,t,`out`);return r.length>0&&r.every(e=>e.artifacts.length>0)}function dp(e){let{updatedAt:t,version:n,...r}=e;return JSON.stringify(r,null,2)}function fp(e){let t;try{t=JSON.parse(e)}catch{throw Error(`JSON として読めません`)}if(typeof t!=`object`||!t)throw Error(`プロジェクトの形式ではありません`);let n=t,r=Number(n.schemaVersion);if(![1,2,3,4,5].includes(r))throw Error(`対応していないデータ形式の版です (schemaVersion=${String(n.schemaVersion)})`);if(!n.blocks||!n.ports||!n.edges||!n.blocks.root)throw Error(`ブロック・ポート・線のデータが足りません`);let i={schemaVersion:5,id:typeof n.id==`string`?n.id:Y(),name:typeof n.name==`string`?n.name:`無題`,description:typeof n.description==`string`?n.description:``,createdAt:typeof n.createdAt==`string`?n.createdAt:pf(),visibility:n.visibility??`private`,members:Array.isArray(n.members)?n.members:[],blocks:n.blocks,ports:n.ports,edges:n.edges,terminals:n.terminals??{in:{x:0,y:200},out:{x:1100,y:200}},log:Array.isArray(n.log)?n.log:[],agents:n.agents&&typeof n.agents==`object`?n.agents:{},nextKey:typeof n.nextKey==`number`?n.nextKey:1,inputGroups:Array.isArray(n.inputGroups)?n.inputGroups:[]};for(let e of Object.values(i.ports))e.groupId&&!i.inputGroups.some(t=>t.id===e.groupId)&&delete e.groupId;for(let e of Object.values(i.blocks))e.activity===void 0&&(e.activity=null),Array.isArray(e.decisions)||(e.decisions=[]),Array.isArray(e.artifacts)||(e.artifacts=[]),Array.isArray(e.assigneeIds)||(e.assigneeIds=[]),e.progress!==void 0&&typeof e.progress!=`number`&&delete e.progress;if(r<4)for(let e of Object.values(i.ports))e.direction===`in`&&(e.required=!0);hf(i);for(let e of Object.values(i.ports))i.blocks[e.blockId]||delete i.ports[e.id];for(let e of Object.values(i.edges))(!i.ports[e.from.portId]||!i.ports[e.to.portId])&&delete i.edges[e.id];return np(pp(i))}function pp(e){let t=jf(e,J).filter(e=>kf(e)!==`project`);if(t.length===0)return e;let n=mf(e),r=Y();n.blocks[r]={id:r,key:X(n),kind:`project`,parentId:J,title:n.name,description:n.description,status:`gray`,assigneeIds:[],position:{x:300,y:40},collapsed:!1,artifacts:[],activity:null,decisions:[]};let i=Math.min(...t.map(e=>e.position.x)),a=Math.min(...t.map(e=>e.position.y));for(let e of t)n.blocks[e.id].parentId=r,n.blocks[e.id].position={x:e.position.x-i+gf.left,y:e.position.y-a+vf(n,r)};for(let e of Object.values(n.edges)){let t=n.ports[e.to.portId],i=n.ports[e.from.portId];if(t&&i){if(e.kind===`up`&&t.blockId===`root`&&e.to.side===`inner`){let i=Z(n,r,`out`).find(e=>e.name===t.name);if(!i){i={id:Y(),blockId:r,direction:`out`,name:t.name,description:t.description,required:!0,artifacts:[]},n.ports[i.id]=i;let e=Y();n.edges[e]={id:e,from:{portId:i.id,side:`outer`},to:{portId:t.id,side:`inner`},kind:`up`,auto:!1}}e.to={portId:i.id,side:`inner`}}if(e.kind===`down`&&i.blockId===`root`&&e.from.side===`inner`){if(e.auto){delete n.edges[e.id];continue}let t=Z(n,r,`in`).find(e=>e.name===i.name);if(!t){t={id:Y(),blockId:r,direction:`in`,name:i.name,description:i.description,required:i.required,artifacts:[]},n.ports[t.id]=t;let e=Y();n.edges[e]={id:e,from:{portId:i.id,side:`inner`},to:{portId:t.id,side:`outer`},kind:`down`,auto:!1}}e.from={portId:t.id,side:`inner`}}}}for(let e of Z(n,J,`in`))e.promotedFrom&&delete n.ports[e.id];for(let e of Object.values(n.edges))(!n.ports[e.from.portId]||!n.ports[e.to.portId])&&delete n.edges[e.id];if(Z(n,r,`out`).length===0){let e={id:Y(),blockId:r,direction:`out`,name:`最終成果物`,description:``,required:!0,artifacts:[]};n.ports[e.id]=e;let t=Z(n,J,`out`)[0];if(t&&Ff(n,{portId:t.id,side:`inner`}).length===0){let r=Y();n.edges[r]={id:r,from:{portId:e.id,side:`outer`},to:{portId:t.id,side:`inner`},kind:`up`,auto:!1}}}return n}function mp(e,t){e.log.push({id:Y(),at:pf(),...t}),e.log.length>500&&e.log.splice(0,e.log.length-500),e.agents[t.actor]={lastSeen:pf()}}function hp(e,t,n,r,i){let a=Vf(e),o=a.blocks[t];if(!o||t===`root`)return e;o.activity={actor:n,state:r,note:i,since:pf()},r===`working`&&o.status===`black`&&(o.status=`gray`);let s=r===`working`?`started`:r===`blocked`?`blocked`:`note`,c=r===`working`?`開始`:r===`blocked`?`詰まり`:r===`waiting_review`?`確認待ち`:`判断待ち`;return mp(a,{actor:n,kind:s,blockId:t,message:`「${o.title}」${c}${i?`: `+i:``}`}),a}function gp(e,t){let n=Vf(e),r=n.blocks[t];return r?(r.activity=null,n):e}function _p(e,t,n,r,i=[],a=``){let o=e.blocks[t];if(!o||t===`root`)return{project:e};let s=Vf(e),c={id:Y(),question:r,options:i,askedBy:n,askedAt:pf(),...a?{context:a}:{}};return s.blocks[t].decisions.push(c),s.blocks[t].activity={actor:n,state:`needs_decision`,note:r,since:pf()},mp(s,{actor:n,kind:`asked`,blockId:t,message:`「${o.title}」で判断待ち: ${r}`}),{project:s,decisionId:c.id}}function vp(e,t,n,r,i){let a=e.blocks[t],o=a?.decisions.find(e=>e.id===n);if(!a||!o)return e;let s=Vf(e),c=s.blocks[t].decisions.find(e=>e.id===n);return c.answer=r,c.answeredBy=i,c.answeredAt=pf(),s.blocks[t].activity?.state===`needs_decision`&&(s.blocks[t].activity=null),mp(s,{actor:i,kind:`answered`,blockId:t,message:`「${a.title}」の判断: ${o.question} → ${r}`}),s}function yp(e,t,n,r,i){let a=e.blocks[t],o=a?.decisions.find(e=>e.id===n);if(!a||!o||o.answer===void 0||!r.trim()||r.trim()===o.answer)return e;let s=Vf(e),c=s.blocks[t].decisions.find(e=>e.id===n);return c.answer=r.trim(),c.answeredBy=i,c.answeredAt=pf(),mp(s,{actor:i,kind:`answered`,blockId:t,message:`「${a.title}」の判断の答えを直した: ${o.question} → ${r.trim()}`}),s}function bp(e){return e.answer===void 0?{rejected:[...e.options]}:{chosen:e.answer,rejected:e.options.filter(t=>t!==e.answer)}}function xp(e,t,n,r,i=``){let a=e.blocks[t],o=a?.decisions.find(e=>e.id===n);if(!a||!o||o.answer===void 0)return e;let s=Vf(e),c=s.blocks[t].decisions.find(e=>e.id===n);return c.history=[...c.history??[],{answer:o.answer,by:o.answeredBy??``,at:o.answeredAt??pf(),note:i||void 0}],delete c.answer,delete c.answeredBy,delete c.answeredAt,s.blocks[t].activity={actor:r,state:`needs_decision`,note:o.question,since:pf()},mp(s,{actor:r,kind:`asked`,blockId:t,message:`「${a.title}」の判断をやり直し: ${o.question} (前の答え: ${o.answer}${i?`。理由: `+i:``})`}),s}function Sp(e){let t=[];for(let n of Object.values(e.blocks))for(let e of n.decisions)e.answer===void 0&&t.push({block:n,decision:e});return t}function Cp(e){let t=Object.values(e.blocks).filter(e=>e.id!==`root`&&kf(e)!==`project`),n=t.filter(e=>e.activity?.state===`working`).map(e=>({block:e,actor:e.activity.actor,note:e.activity.note,since:e.activity.since})),r=t.filter(e=>e.activity?.state===`blocked`||e.activity?.state===`waiting_review`).map(e=>({block:e,actor:e.activity.actor,note:e.activity.note})),i=t.filter(t=>t.status===`black`&&!t.activity&&jf(e,t.id).length===0).sort((t,n)=>Number(lp(e,t.id).length>0)-Number(lp(e,n.id).length>0));return{total:t.length,white:t.filter(e=>e.status===`white`).length,gray:t.filter(e=>e.status===`gray`).length,black:t.filter(e=>e.status===`black`).length,working:n,blocked:r,decisions:Sp(e),next:i,overdue:t.filter(e=>jp(e))}}function wp(e,t){let n=e.blocks[t],r=jf(e,t),i=n=>n===t?`parent`:e.blocks[n]?.title??`?`,a=[],o=new Set(r.map(e=>e.id));for(let n of Object.values(e.edges)){if(n.auto)continue;let r=e.ports[n.from.portId],s=e.ports[n.to.portId];if(!r||!s)continue;let c=(e,n)=>n===`inner`?e.blockId===t:o.has(e.blockId);c(r,n.from.side)&&c(s,n.to.side)&&a.push({from:`${i(r.blockId)}.${r.name}`,to:`${i(s.blockId)}.${s.name}`})}return{title:n.title,category:n.category,description:n.description,inputs:Z(e,t,`in`).filter(e=>!e.promotedFrom).map(e=>({name:e.name,description:e.description,required:e.required})),outputs:Z(e,t,`out`).map(e=>({name:e.name,description:e.description})),children:r.sort((e,t)=>e.position.y-t.position.y||e.position.x-t.position.x).map(t=>wp(e,t.id)),connections:a}}function Tp(e,t,n={}){let r=e.blocks[t],i=pf();return{schema:`boxglow-block`,schemaVersion:1,id:r.template?.id??Y(),name:n.name??r.title,version:(r.template?.version??0)+1,description:n.description??r.description,tags:n.tags??[],createdAt:i,updatedAt:i,root:wp(e,t)}}function Ep(e,t,n,r,i){let a=Q(e,{parentId:t,title:n.title,outputName:n.outputs[0]?.name,position:i}),o=a.project,s=a.blockId;o.blocks[s].description=n.description,o.blocks[s].template=r,n.category&&(o.blocks[s].category=n.category),n.outputs[0]&&(o=Xf(o,Z(o,s,`out`)[0].id,{description:n.outputs[0].description}));for(let e of n.outputs.slice(1)){let t=Kf(o,{blockId:s,direction:`out`,name:e.name});o=Xf(t.project,t.portId,{description:e.description})}for(let e of n.inputs){let t=Kf(o,{blockId:s,direction:`in`,name:e.name});o=Xf(t.project,t.portId,{description:e.description,required:e.required})}if(n.children.length>0){let e={},t=vf(o,s);for(let i of n.children){let n=Ep(o,s,i,r,{x:gf.left,y:t});o=n.project,e[i.title]=n.blockId,t+=120}let i=(t,n)=>{for(let{title:r,portName:i}of zp(t)){let t=r===`parent`,a=t?s:e[r];if(!a)continue;let c=Z(o,a,t?n===`out`?`in`:`out`:n).find(e=>e.name===i);if(c)return{portId:c.id,side:t?`inner`:`outer`}}return null};for(let e of n.connections){let t=i(e.from,`out`),n=i(e.to,`in`);t&&n&&(o=Qf(o,t,n).project)}o.blocks[s].status=`gray`}return{project:o,blockId:s}}function Dp(e,t,n,r,i){let a={id:n.id,name:n.name,version:n.version},o=Ep(e,t,n.root,a,i),s=o.project;return mp(s,{actor:r,kind:`added`,blockId:o.blockId,message:`テンプレート「${n.name}」v${n.version} を挿入: ${n.root.title}`}),{project:np(s),blockId:o.blockId}}function Op(e){let t;try{t=JSON.parse(e)}catch{throw Error(`JSON として読めません`)}let n=t;if(!n||n.schema!==`boxglow-block`||!n.root||typeof n.root.title!=`string`)throw Error(`Boxglow のテンプレート (boxglow-block) ではありません`);let r=e=>({title:e.title??`無題`,description:e.description??``,category:typeof e.category==`string`?e.category:void 0,inputs:(e.inputs??[]).map(e=>({name:e.name,description:e.description??``,required:e.required??!0})),outputs:(e.outputs??[]).map(e=>({name:e.name,description:e.description??``})),children:(e.children??[]).map(r),connections:e.connections??[]});return{schema:`boxglow-block`,schemaVersion:1,id:n.id??Y(),name:n.name??n.root.title,version:n.version??1,description:n.description??``,tags:n.tags??[],createdAt:n.createdAt??pf(),updatedAt:n.updatedAt??pf(),root:r(n.root)}}function kp(e,t,n){if(!e.blocks[t])return e;if(n&&!uf(n))throw Error(`知らないカテゴリです: ${n}`);let r=Vf(e);return n?r.blocks[t].category=n:delete r.blocks[t].category,r}function Ap(e,t,n,r){let i=e.blocks[t];if(!i)return e;let a=Vf(e),o=a.blocks[t],s=(e,t)=>{t!==void 0&&(t===null||t===``||typeof t==`number`&&Number.isNaN(t)?delete o[e]:o[e]=t)};s(`startDate`,n.startDate),s(`dueDate`,n.dueDate),s(`estimateHours`,n.estimateHours),s(`actualHours`,n.actualHours);let c=[];return n.dueDate!==void 0&&c.push(`期日 ${n.dueDate??`なし`}`),n.startDate!==void 0&&c.push(`開始 ${n.startDate??`なし`}`),n.actualHours!==void 0&&c.push(`実績 ${n.actualHours??0}h`),n.estimateHours!==void 0&&c.push(`見積 ${n.estimateHours??0}h`),c.length>0&&mp(a,{actor:r,kind:`note`,blockId:t,message:`「${i.title}」${c.join(`, `)}`}),a}function jp(e,t=new Date){return!e.dueDate||e.status===`white`?!1:new Date(e.dueDate+`T23:59:59`).getTime()<t.getTime()}function Mp(e,t=new Date){if(!e.dueDate)return null;let n=new Date(e.dueDate+`T00:00:00`),r=new Date(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((n.getTime()-r.getTime())/864e5)}function Np(e,t,n=20){let r=t.trim().toLowerCase();if(!r)return[];let i=Object.values(e.blocks).filter(e=>e.id!==J),a=i.filter(e=>e.key?.toLowerCase()===r),o=e=>uf(e.category),s=i.filter(e=>!a.includes(e)&&(e.title.toLowerCase().includes(r)||(e.key??``).toLowerCase().includes(r)||e.description.toLowerCase().includes(r)||o(e)?.label===t.trim()||o(e)?.en===r));return[...a,...s].slice(0,n)}function Pp(e,t,n=new Set){if(n.has(t))return null;n.add(t);let r=e.ports[t];if(!r||r.direction!==`in`)return null;let i=Ff(e,{portId:t,side:`outer`})[0];if(!i)return null;let a=e.ports[i.from.portId];return a?a.direction===`out`||a.blockId===`root`?a:Pp(e,a.id,n)??a:null}function Fp(e,t){let n=e.ports[t];if(!n)return``;if(n.direction===`out`)return n.description;let r=Pp(e,t);return r?r.description:n.description}function Ip(e,t){let n=[],r=t;for(;r!==null;)n.push(r),r=e.blocks[r]?.parentId??null;return n}function Lp(e,t,n,r){let i=Z(e,t,n).find(e=>e.name===r&&!e.promotedFrom);if(i)return i;let a=Kf(e,{blockId:t,direction:n,name:r});return Object.assign(e,a.project),e.ports[a.portId]??null}function Rp(e,t,n){let r=Lf(e,t),i=Lf(e,n);if(r===null||i===null)return;let a=e.ports[t.portId],o=e.ports[n.portId];if(!a||!o)return;let s=Ip(e,r),c=Ip(e,i),l=s.find(e=>c.includes(e));if(!l)return;let u=t;for(let t of s.slice(0,s.indexOf(l))){if(t===`root`)return;let n=Lp(e,t,`out`,a.name);if(!n)return;let r=Qf(e,u,{portId:n.id,side:`inner`});r.error||Object.assign(e,r.project),u={portId:n.id,side:`outer`}}for(let t of c.slice(0,c.indexOf(l)).reverse()){if(t===`root`)return;let n=Lp(e,t,`in`,o.name);if(!n)return;let r=Qf(e,u,{portId:n.id,side:`outer`});r.error||Object.assign(e,r.project),u={portId:n.id,side:`inner`}}let d=Qf(e,u,n);d.error||Object.assign(e,d.project)}function zp(e){let t=[];for(let n=e.indexOf(`.`);n>=0;n=e.indexOf(`.`,n+1)){let r=e.slice(0,n),i=e.slice(n+1);r&&i&&t.push({title:r,portName:i})}return t}function Bp(e,t,n,r){let i=e.blocks[t],a=e.blocks[n];if(!i||!a||t===`root`||n===`root`||i.parentId===n||kf(i)===`project`||n===t||Mf(e,t).some(e=>e.id===n))return e;let o=Vf(e),s=i.parentId,c=new Set(Z(o,t).map(e=>e.id)),l=[];for(let e of Object.values(o.edges)){let t=c.has(e.from.portId)&&e.from.side===`outer`,r=c.has(e.to.portId)&&e.to.side===`outer`;if(!t&&!r||(delete o.edges[e.id],e.auto))continue;let i=t?e.from:e.to,a=t?e.to:e.from,u=o.ports[a.portId];if(u&&(a.side!==`outer`||u.blockId!==n)){if(a.side===`inner`&&u.blockId===s&&s!==null){if(r){let e=Ff(o,{portId:u.id,side:`outer`})[0];e&&l.push({from:e.from,to:i})}else for(let e of If(o,{portId:u.id,side:`outer`}))l.push({from:i,to:e.to});continue}l.push(t?{from:i,to:a}:{from:a,to:i})}}o.blocks[t].parentId=n,o.blocks[t].position={x:Math.max(gf.left,r.x),y:Math.max(vf(o,n),r.y)};for(let e of l)Rp(o,e.from,e.to);return o.blocks[n].status===`black`&&(o.blocks[n].status=`gray`),o.blocks[n].collapsed=!1,mp(o,{actor:`human`,kind:`note`,blockId:t,message:`「${i.title}」を「${a.title}」の中へ移動`}),np(o)}function Vp(e,t,n){let r=e.ports[t.portId],i=e.blocks[n];if(!r||!i||n===`root`)return{project:e,error:`つなぐ先が見つかりません`};let a=Lf(e,t),o=r.direction===`in`&&t.side===`inner`&&i.parentId===r.blockId,s=a!==null&&i.parentId===a;if(r.direction===`out`&&t.side===`outer`&&e.blocks[r.blockId]?.parentId===n){let r=Z(e,n,`out`),i=r.find(t=>Ff(e,{portId:t.id,side:`inner`}).length===0)??r[0];return i?Qf(e,t,{portId:i.id,side:`inner`}):{project:e,error:`親に出力がありません`}}if(!s&&!o)return{project:e,error:`同じ階層の箱 (または親子) にだけつなげます`};let c=Z(e,n,`in`).find(t=>Ff(e,{portId:t.id,side:`outer`}).every(e=>e.auto)&&!t.promotedFrom),l=e;if(!c){let t=Kf(e,{blockId:n,direction:`in`,name:r.name});l=t.project,c=l.ports[t.portId]}return Qf(l,t,{portId:c.id,side:`outer`})}function Hp(e,t,n){let r=e.blocks[t];if(!r||r.parentId===null)return e;let i=mf(e),a=n(i,t);for(let e=0;e<8;e++){let e=i.blocks[t],r=jf(i,e.parentId).find(r=>{if(r.id===t)return!1;let o=n(i,r.id);return e.position.x<r.position.x+o.width+24&&e.position.x+a.width+24>r.position.x&&e.position.y<r.position.y+o.height+24&&e.position.y+a.height+24>r.position.y});if(!r)break;let o=n(i,r.id),s=[{x:r.position.x+o.width+24,y:e.position.y,d:r.position.x+o.width+24-e.position.x},{x:e.position.x,y:r.position.y+o.height+24,d:r.position.y+o.height+24-e.position.y},{x:r.position.x-a.width-24,y:e.position.y,d:e.position.x-(r.position.x-a.width-24)},{x:e.position.x,y:r.position.y-a.height-24,d:e.position.y-(r.position.y-a.height-24)}].filter(e=>e.d>=0),c=e.parentId!==J,l=s.filter(t=>!c||t.x>=gf.left&&t.y>=vf(i,e.parentId)),u=(l.length>0?l:s).sort((e,t)=>e.d-t.d)[0];if(!u)break;i.blocks[t].position={x:u.x,y:u.y}}return i}var Up=e=>e.inputGroups??[];function Wp(e,t){return Z(e,J,`in`).filter(e=>t===null?!e.groupId:e.groupId===t)}function Gp(e,t){let n=Vf(e),r=n.inputGroups??=[],i=Y(),a=r.length===0?n.terminals.in.y+160:Math.max(...r.map(e=>e.position.y))+160;return r.push({id:i,name:t,description:``,position:{x:n.terminals.in.x,y:a}}),mp(n,{actor:`human`,kind:`added`,message:`入力グループ「${t}」を追加`}),{project:n,groupId:i}}function Kp(e,t,n){let r=Vf(e),i=(r.inputGroups??[]).find(e=>e.id===t);return i?(Object.assign(i,n),r):e}function qp(e,t){let n=Vf(e);n.inputGroups=(n.inputGroups??[]).filter(e=>e.id!==t);for(let e of Object.values(n.ports))e.groupId===t&&delete e.groupId;return n}function Jp(e,t,n){let r=e.ports[t];if(!r||r.blockId!==`root`||r.direction!==`in`)return e;let i=Vf(e);return n?i.ports[t].groupId=n:delete i.ports[t].groupId,i}function Yp(e,t,n){let r=mf(e),i=(r.inputGroups??[]).find(e=>e.id===t);return i?(i.position=n,r):e}function Xp(e,t){let n=(e.inputGroups??[]).find(e=>e.id===t),r=Wp(e,t).map(e=>({name:e.name,description:e.description,artifacts:e.artifacts.map(e=>({title:e.title,url:e.url}))}));return JSON.stringify({schema:`boxglow-input-group`,name:n?.name??``,description:n?.description??``,inputs:r},null,2)}function Zp(e,t){let n;try{n=JSON.parse(t)}catch{throw Error(`JSON として読めません`)}if(n.schema!==`boxglow-input-group`||!Array.isArray(n.inputs))throw Error(`入力グループの JSON (boxglow-input-group) ではありません`);let r=Gp(e,n.name??`Inputs`),i=Kp(r.project,r.groupId,{description:n.description??``});for(let e of n.inputs){let t=Kf(i,{blockId:J,direction:`in`,name:e.name});i=Xf(t.project,t.portId,{description:e.description??``,artifacts:(e.artifacts??[]).map(e=>Af(e.title,e.url??``))}),i=Jp(i,t.portId,r.groupId)}return{project:i,groupId:r.groupId}}function Qp(e,t){let n=e,r=new Set(Object.values(e.blocks).filter(e=>e.id!==J).map(e=>e.parentId));for(let e of r){let r=jf(n,e).sort((e,t)=>e.position.y-t.position.y||e.position.x-t.position.x);for(let e=1;e<r.length;e++)n=Hp(n,r[e].id,t)}return n}function $p(e){let t=e.trim(),n=t.match(/\/browse\/([A-Z][A-Z0-9_]+-\d+)/i);if(n)return n[1].toUpperCase();if(n=t.match(/\/issues\/(\d+)/),n)return`#${n[1]}`;if(n=t.match(/\/pull\/(\d+)/),n)return`PR #${n[1]}`;try{return new URL(t).hostname.replace(/^www\./,``)}catch{return t.slice(0,20)}}function em(e,t){let n=new Set([t]),r=Object.values(e.edges),i=e.edges[t];if(!i)return n;let a=[i];for(;a.length>0;){let t=a.pop(),i=e.ports[t.from.portId];if(!i)continue;let o=t.from.side===`outer`?`inner`:`outer`;for(let e of r)e.to.portId===i.id&&e.to.side===o&&!n.has(e.id)&&(n.add(e.id),a.push(e))}let o=[i];for(;o.length>0;){let t=o.pop(),i=e.ports[t.to.portId];if(!i)continue;let a=t.to.side===`outer`?`inner`:`outer`;for(let e of r)e.from.portId===i.id&&e.from.side===a&&!n.has(e.id)&&(n.add(e.id),o.push(e))}return n}function tm(e,t){let n=0;for(let r of e){let e=r.codePointAt(0)??0;n+=e>11903?t*1.05:t*.6}return n}function nm(e){let t=e=>tm(e,10)+14+6,n=22;return e.isProject||(n+=t(`In Progress`)),e.assigneeText?n+=t(e.assigneeText):e.unassigned&&(n+=t(`未担当`)),e.hasPercent&&(n+=t(`100%`)),e.activityText&&(n+=t(e.activityText)),e.hasReady&&(n+=t(`Ready`)),e.hasDue&&(n+=t(`期日 10/15`)),n+=e.keyLen*7+8,n}function rm(e,t){let n=e.blocks[t];return!!n&&!n.collapsed&&jf(e,t).length>0}function im(e,t){let n=e.blocks[t],r=Z(e,t,`in`),i=Z(e,t,`out`),a=Math.max(r.length,i.length,1),o=jf(e,t),s=22+(n?.kind===`project`?66:0)+(o.length>0?30:0),c=tm(n?.title??``,14)+4,l=s+c,u=l>460?Math.min(3,Math.ceil(c/(460-s))):1,d=nm({assigneeText:``,unassigned:!1,hasPercent:!!n&&n.status!==`white`&&(o.length>0||typeof n.progress==`number`&&n.progress>0),activityText:n?.activity?`${{working:`作業中`,blocked:`詰まり`,needs_decision:`判断待ち`,waiting_review:`確認待ち`}[n.activity.state]??``} (${(e=>{let t=e.toLowerCase();return t.startsWith(`claude`)?`Claude Code`:t.startsWith(`codex`)?`Codex`:t.startsWith(`human:`)?e.slice(6):e})(n.activity.actor)})`:null,hasDue:!!n?.dueDate&&n.status!==`white`,keyLen:(n?.key??``).length,isProject:n?.kind===`project`,hasReady:!!n&&n.status===`black`&&n.kind!==`project`&&r.length>0&&lp(e,n.id).length===0}),f=Math.min(460,Math.max(240,l,d)),p=36+(u-1)*18+24,m=Math.max(0,...r.map(e=>tm(e.name,11)+(e.name?14:0)+(e.required?0:tm(`(任意)`,9)+4))),h=Math.max(0,...i.map(e=>tm(e.name,11))),g=12+m+24+h+10,_=Math.max(240,f,Math.min(580,g)),v=p+a*26+12;if(!rm(e,t))return{width:_,height:v,headerH:p};let y=0,b=0;for(let t of o){let n=im(e,t.id);y=Math.max(y,t.position.x+n.width),b=Math.max(b,t.position.y+n.height)}return{width:Math.max(320,_,y+96),height:Math.max(v+16,b+104+12+(p-44)),headerH:p}}function am(e,t){let n=Z(e,J,t).length;return 44+Math.max(n,1)*26+12}var om=144,sm=96,cm=3e3;function lm(e,t){let n=structuredClone(e),r=jf(n,t);if(r.length===0)return n;for(let e of r)jf(n,e.id).length>0&&(n=lm(n,e.id));let i=r.map(e=>e.id),a=new Map;for(let e of i){let t=new Set;for(let r of Z(n,e,`out`))for(let e of If(n,{portId:r.id,side:`outer`})){if(e.kind!==`sibling`)continue;let r=n.ports[e.to.portId]?.blockId;r&&i.includes(r)&&t.add(r)}a.set(e,[...t])}let o=new Map,s=new Set,c=e=>{if(o.has(e))return o.get(e);if(s.has(e))return 0;s.add(e);let t=0;for(let n of i)a.get(n).includes(e)&&(t=Math.max(t,c(n)+1));return s.delete(e),o.set(e,t),t};for(let e of i)c(e);let l=Math.max(...i.map(e=>o.get(e))),u=new Map;[...r].sort((e,t)=>e.position.y-t.position.y||e.position.x-t.position.x).forEach((e,t)=>u.set(e.id,t));let d=new Map;for(let e of i)d.set(e,i.filter(t=>a.get(t).includes(e)));for(let e=0;e<2;e++){for(let e=1;e<=l;e++){let t=i.filter(t=>o.get(t)===e),n=new Map;for(let e of t){let t=d.get(e);n.set(e,t.length===0?u.get(e):t.reduce((e,t)=>e+u.get(t),0)/t.length)}t.sort((e,t)=>n.get(e)-n.get(t)||u.get(e)-u.get(t)),t.forEach((e,t)=>u.set(e,t))}for(let e=l-1;e>=0;e--){let t=i.filter(t=>o.get(t)===e),n=new Map;for(let e of t){let t=a.get(e);n.set(e,t.length===0?u.get(e):t.reduce((e,t)=>e+u.get(t),0)/t.length)}t.sort((e,t)=>n.get(e)-n.get(t)||u.get(e)-u.get(t)),t.forEach((e,t)=>u.set(e,t))}}let f=Array(Math.max(1,l)).fill(0);for(let e of i)for(let t of a.get(e)){let n=o.get(e),r=o.get(t);for(let e=Math.min(n,r);e<Math.max(n,r);e++)f[e]++}let p=e=>Math.max(om,72+16*Math.max(0,(f[e]??0)-1)+16),m=t===`root`?200+om:gf.left,h=t===`root`?40:vf(n,t),g=m,_=h,v=h,y=h;for(let e=0;e<=l;e++){let t=r.filter(t=>o.get(t.id)===e).sort((e,t)=>u.get(e.id)-u.get(t.id)),i=Math.max(0,...t.map(e=>im(n,e.id).width));e>0&&g+i>m+cm&&(g=m,_=y+192);let a=_;for(let e of t){let t=im(n,e.id);n.blocks[e.id].position={x:g,y:a},a+=t.height+sm}y=Math.max(y,a-sm),v=Math.max(v,y),g+=i+p(e)}if(t===`root`){let e=Math.max(h,(h+v)/2-am(n,`in`)/2);n.terminals.in={x:0,y:e};let t=e+am(n,`in`)+sm;for(let e of n.inputGroups??[])e.position={x:0,y:t},t+=44+Math.max(1,Object.values(n.ports).filter(t=>t.blockId===`root`&&t.groupId===e.id).length)*26+12+sm;n.terminals.out={x:g,y:Math.max(h,(h+v)/2-am(n,`out`)/2)}}return n}function um(e){return lm(e,J)}function dm(e,t){let n=jf(e,t),r=t===`root`?200+om:gf.left,i=t===`root`?40:vf(e,t);if(n.length===0)return{x:r,y:i};let a=i,o=1/0;for(let t of n){let n=im(e,t.id);a=Math.max(a,t.position.y+n.height),o=Math.min(o,t.position.x)}return{x:Math.max(r,o),y:a+sm}}var fm=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},pm=(e=>e?fm(e):fm),mm=e=>e;function hm(e,t=mm){let n=y.useSyncExternalStore(e.subscribe,y.useCallback(()=>t(e.getState()),[e,t]),y.useCallback(()=>t(e.getInitialState()),[e,t]));return y.useDebugValue(n),n}var gm=e=>{let t=pm(e),n=e=>hm(t,e);return Object.assign(n,t),n},_m=(e=>e?gm(e):gm);function vm(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function ym(e,t){let n,r=()=>{if(n)return n;let r=indexedDB.open(e);return r.onupgradeneeded=()=>r.result.createObjectStore(t),n=vm(r),n.then(e=>{e.onclose=()=>n=void 0},()=>{n=void 0}),n};return(e,n)=>r().then(r=>n(r.transaction(t,e).objectStore(t)))}var bm;function xm(){return bm||=ym(`keyval-store`,`keyval`),bm}function Sm(e,t=xm()){return t(`readonly`,t=>vm(t.get(e)))}function Cm(e,t,n=xm()){return n(`readwrite`,n=>(n.put(t,e),vm(n.transaction)))}function wm(e,t=xm()){return t(`readwrite`,t=>(t.delete(e),vm(t.transaction)))}var Tm=`boxglow:lastFileHandle`,Em=()=>typeof window<`u`&&typeof window.showOpenFilePicker==`function`;async function Dm(){if(!window.showOpenFilePicker)return null;try{let[e]=await window.showOpenFilePicker({multiple:!1,types:[{description:`Boxglow project`,accept:{"application/json":[`.json`]}}]});return await Cm(Tm,e),e}catch{return null}}async function Om(){try{return await Sm(Tm)??null}catch{return null}}async function km(e,t=`readwrite`){try{return await e.queryPermission({mode:t})===`granted`||await e.requestPermission({mode:t})===`granted`}catch{return!1}}async function Am(e){let t=await e.getFile();return{text:await t.text(),lastModified:t.lastModified}}async function jm(e,t){let n=await e.createWritable();return await n.write(t),await n.close(),(await e.getFile()).lastModified}function Mm(){let e=yf(`Web アプリを公開する`);e.description=`小さな Web アプリを、要件の整理から公開まで箱に分けて進める例。箱が完了するごとに、右端の最終成果物に近づく。`;let t=xf(e)[0].id;e.blocks[t].description=e.description,e.blocks[t].status=`gray`;let n=ep(e,`さとう`,`#0d8080`);e=n.project;let r=ep(e,`たなか`,`#e8875e`);e=r.project;let i=Z(e,t,`out`)[0];e=Xf(e,i.id,{name:`公開した Web アプリ`,description:`誰でも開ける URL と、使い方の説明`}),e=Xf(e,Z(e,J,`out`)[0].id,{name:`公開した Web アプリ`});let a=Kf(e,{blockId:t,direction:`in`,name:`企画メモ`});e=Xf(a.project,a.portId,{description:`何を作りたいかの箇条書き`,artifacts:[Af(`企画メモ (Notion)`,`https://example.com/plan`)]});let o=Q(e,{parentId:t,title:`要件を決める`,position:{x:48,y:72}});e=o.project;let s=Q(e,{parentId:t,title:`設計する`,position:{x:400,y:72}});e=s.project;let c=Q(e,{parentId:t,title:`実装する`,position:{x:80,y:320}});e=c.project;let l=Q(e,{parentId:t,title:`公開する`,position:{x:780,y:420}});e=l.project,e=kp(e,o.blockId,`study`),e=kp(e,s.blockId,`design`),e=kp(e,c.blockId,`build`),e=kp(e,l.blockId,`ops`);let u=Kf(e,{blockId:o.blockId,direction:`in`,name:`企画メモ`});e=u.project;let d=Z(e,o.blockId,`out`)[0];e=Xf(e,d.id,{name:`要件一覧`,artifacts:[Af(`要件一覧 v1`,`https://example.com/requirements`)]}),e=Hf(e,o.blockId,{status:`white`,assigneeIds:[n.memberId],description:`企画メモを読み、機能を箇条書きにする。優先度を付ける。`}),e=Qf(e,{portId:a.portId,side:`inner`},{portId:u.portId,side:`outer`}).project;let f=Kf(e,{blockId:s.blockId,direction:`in`,name:`要件一覧`});e=f.project;let p=Z(e,s.blockId,`out`)[0];e=Xf(e,p.id,{name:`設計書`,description:`画面設計 (Figma) と API 仕様 (OpenAPI) をまとめたもの`,artifacts:[Af(`画面設計 (Figma)`,`https://example.com/figma`),Af(`OpenAPI 定義`,`https://example.com/openapi.yaml`)]}),e=Hf(e,s.blockId,{status:`white`,assigneeIds:[n.memberId]}),e=Qf(e,{portId:d.id,side:`outer`},{portId:f.portId,side:`outer`}).project;let m=Kf(e,{blockId:c.blockId,direction:`in`,name:`設計書`});e=m.project;let h=Z(e,c.blockId,`out`)[0];e=Xf(e,h.id,{name:`動くアプリ一式`,description:`テストが通ったビルド成果物`}),e=Hf(e,c.blockId,{status:`gray`,assigneeIds:[n.memberId,r.memberId],description:`設計をもとに部品を作り、組み合わせて動く状態にする。`}),e=Qf(e,{portId:p.id,side:`outer`},{portId:m.portId,side:`outer`}).project;let g=Q(e,{parentId:c.blockId,title:`フロントエンド`,position:{x:48,y:72}});e=g.project;let _=Q(e,{parentId:c.blockId,title:`バックエンド`,position:{x:48,y:232}});e=_.project;let v=Q(e,{parentId:c.blockId,title:`結合テスト`,position:{x:360,y:152}});e=v.project,e=kp(e,v.blockId,`verify`),e=kp(e,g.blockId,`build`),e=kp(e,_.blockId,`build`);let y=Kf(e,{blockId:g.blockId,direction:`in`,name:`設計書`});e=y.project;let b=Z(e,g.blockId,`out`)[0];e=Xf(e,b.id,{name:`画面の実装`,artifacts:[Af(`PR #12`,`https://example.com/pr/12`)]}),e=Hf(e,g.blockId,{status:`white`,assigneeIds:[r.memberId]}),e=Qf(e,{portId:m.portId,side:`inner`},{portId:y.portId,side:`outer`}).project;let x=Kf(e,{blockId:_.blockId,direction:`in`,name:`設計書`});e=x.project;let S=Z(e,_.blockId,`out`)[0];e=Xf(e,S.id,{name:`API の実装`}),e=Hf(e,_.blockId,{status:`gray`,assigneeIds:[n.memberId],description:`OpenAPI 定義どおりに API を作る。認証はまだ未定。`}),e=Qf(e,{portId:m.portId,side:`inner`},{portId:x.portId,side:`outer`}).project;let C=Kf(e,{blockId:v.blockId,direction:`in`,name:`画面の実装`});e=C.project;let w=Kf(e,{blockId:v.blockId,direction:`in`,name:`API の実装`});e=w.project,e=Kf(e,{blockId:v.blockId,direction:`in`,name:`テストデータ`}).project;let T=Z(e,v.blockId,`out`)[0];e=Xf(e,T.id,{name:`テスト済みビルド`}),e=Qf(e,{portId:b.id,side:`outer`},{portId:C.portId,side:`outer`}).project,e=Qf(e,{portId:S.id,side:`outer`},{portId:w.portId,side:`outer`}).project,e=Qf(e,{portId:T.id,side:`outer`},{portId:h.id,side:`inner`}).project;let E=Kf(e,{blockId:l.blockId,direction:`in`,name:`動くアプリ一式`});e=E.project;let D=Z(e,l.blockId,`out`)[0];return e=Xf(e,D.id,{name:`公開 URL`}),e=Hf(e,l.blockId,{description:`どこに置くかは未定。候補: 静的ホスティング。`}),e=Qf(e,{portId:h.id,side:`outer`},{portId:E.portId,side:`outer`}).project,e=Qf(e,{portId:D.id,side:`outer`},{portId:i.id,side:`inner`}).project,e=hp(e,_.blockId,`claude-code`,`working`,`OpenAPI 定義から API のひな形を生成中`),e=ap(e,_.blockId,40,`claude-code`),e=_p(e,l.blockId,`codex`,`公開先はどれにしますか?`,[`静的ホスティング`,`自前のサーバー`]).project,um(Ef(e))}var Nm=`{
16
- "schemaVersion": 5,
17
- "id": "X885RhS6ZN",
18
- "name": "Logic DAW",
19
- "description": "",
20
- "createdAt": "2026-10-02T21:23:03.532Z",
21
- "visibility": "private",
22
- "members": [],
23
- "blocks": {
24
- "root": {
25
- "id": "root",
26
- "parentId": null,
27
- "title": "Logic DAW",
28
- "description": "",
29
- "status": "black",
30
- "assigneeIds": [],
31
- "position": {
32
- "x": 0,
33
- "y": 0
34
- },
35
- "collapsed": false,
36
- "artifacts": [],
37
- "activity": null,
38
- "decisions": []
39
- },
40
- "Qi_8UqGvoN": {
41
- "id": "Qi_8UqGvoN",
42
- "key": "B1",
43
- "kind": "project",
44
- "parentId": "root",
45
- "title": "Logic DAW",
46
- "description": "",
47
- "status": "gray",
48
- "assigneeIds": [],
49
- "position": {
50
- "x": 344,
51
- "y": 40
52
- },
53
- "collapsed": false,
54
- "artifacts": [],
55
- "activity": null,
56
- "decisions": []
57
- },
58
- "xJhwet2eK4": {
59
- "id": "xJhwet2eK4",
60
- "key": "B2",
61
- "parentId": "Qi_8UqGvoN",
62
- "title": "企画と設計",
63
- "description": "Ref クロックと論理回路ブロックで音の出るタイミングを組み立てて遊ぶ、ブラウザで動く小さな DAW。何を作るかを決めて設計書にする",
64
- "status": "white",
65
- "assigneeIds": [],
66
- "position": {
67
- "x": 120,
68
- "y": 76
69
- },
70
- "collapsed": true,
71
- "artifacts": [],
72
- "activity": null,
73
- "decisions": [],
74
- "category": "design"
75
- },
76
- "FiH1BjJOTX": {
77
- "id": "FiH1BjJOTX",
78
- "key": "B3",
79
- "parentId": "Qi_8UqGvoN",
80
- "title": "サウンドエンジン",
81
- "description": "画面に依存しない中身。クロック・論理ブロック・音源・パッチ",
82
- "status": "gray",
83
- "assigneeIds": [],
84
- "position": {
85
- "x": 617.6999999999999,
86
- "y": 76
87
- },
88
- "collapsed": true,
89
- "artifacts": [],
90
- "activity": null,
91
- "decisions": [],
92
- "category": "build",
93
- "dueDate": "2026-11-10",
94
- "estimateHours": 60
95
- },
96
- "uZ_7SUgizp": {
97
- "id": "uZ_7SUgizp",
98
- "key": "B4",
99
- "parentId": "Qi_8UqGvoN",
100
- "title": "画面",
101
- "description": "ブロックを置いて結線し、再生して遊ぶ画面",
102
- "status": "gray",
103
- "assigneeIds": [],
104
- "position": {
105
- "x": 1183.0499999999997,
106
- "y": 76
107
- },
108
- "collapsed": true,
109
- "artifacts": [],
110
- "activity": null,
111
- "decisions": [],
112
- "category": "ui",
113
- "dueDate": "2026-11-30",
114
- "estimateHours": 40
115
- },
116
- "CVcGYJiFyf": {
117
- "id": "CVcGYJiFyf",
118
- "key": "B5",
119
- "parentId": "Qi_8UqGvoN",
120
- "title": "品質と公開",
121
- "description": "実測で確かめてから公開する",
122
- "status": "gray",
123
- "assigneeIds": [],
124
- "position": {
125
- "x": 1759.9499999999996,
126
- "y": 76
127
- },
128
- "collapsed": true,
129
- "artifacts": [],
130
- "activity": null,
131
- "decisions": [],
132
- "category": "ops",
133
- "dueDate": "2026-12-15"
134
- },
135
- "9WPT6_CRiu": {
136
- "id": "9WPT6_CRiu",
137
- "key": "B6",
138
- "parentId": "xJhwet2eK4",
139
- "title": "要件をまとめる",
140
- "description": "何で遊びたいか、何を作らないかを決める",
141
- "status": "white",
142
- "assigneeIds": [],
143
- "position": {
144
- "x": 120,
145
- "y": 76
146
- },
147
- "collapsed": true,
148
- "artifacts": [],
149
- "activity": null,
150
- "decisions": []
151
- },
152
- "DIRmqMXT2l": {
153
- "id": "DIRmqMXT2l",
154
- "key": "B7",
155
- "parentId": "xJhwet2eK4",
156
- "title": "コアを設計する",
157
- "description": "Ref クロック・論理ブロック・音源・パッチ形式の設計",
158
- "status": "white",
159
- "assigneeIds": [],
160
- "position": {
161
- "x": 645.7499999999999,
162
- "y": 76
163
- },
164
- "collapsed": true,
165
- "artifacts": [],
166
- "activity": null,
167
- "decisions": []
168
- },
169
- "9h2eE_cSiA": {
170
- "id": "9h2eE_cSiA",
171
- "key": "B8",
172
- "parentId": "9WPT6_CRiu",
173
- "title": "遊び方の絵を描く",
174
- "description": "クロック → 分周 → AND → トリガ → 音源 の流れを 1 枚に",
175
- "status": "white",
176
- "assigneeIds": [],
177
- "position": {
178
- "x": 120,
179
- "y": 76
180
- },
181
- "collapsed": true,
182
- "artifacts": [],
183
- "activity": null,
184
- "decisions": []
185
- },
186
- "dQFr5sVxfL": {
187
- "id": "dQFr5sVxfL",
188
- "key": "B9",
189
- "parentId": "9WPT6_CRiu",
190
- "title": "性能目標を決める",
191
- "description": "対象ブラウザ、ジッタ 2ms 以内、ブロック 64 個まで",
192
- "status": "white",
193
- "assigneeIds": [],
194
- "position": {
195
- "x": 634.1999999999999,
196
- "y": 76
197
- },
198
- "collapsed": true,
199
- "artifacts": [],
200
- "activity": null,
201
- "decisions": []
202
- },
203
- "6sEOLrrbpE": {
204
- "id": "6sEOLrrbpE",
205
- "key": "B10",
206
- "parentId": "9WPT6_CRiu",
207
- "title": "用語と画面の骨子を書く",
208
- "description": "Ref クロック・tick・分周比・ゲート・トリガの定義と画面の 3 領域",
209
- "status": "white",
210
- "assigneeIds": [],
211
- "position": {
212
- "x": 1166.5499999999997,
213
- "y": 76
214
- },
215
- "collapsed": true,
216
- "artifacts": [],
217
- "activity": null,
218
- "decisions": []
219
- },
220
- "LQ-3HVFrbh": {
221
- "id": "LQ-3HVFrbh",
222
- "key": "B11",
223
- "parentId": "DIRmqMXT2l",
224
- "title": "タイミングモデルを決める",
225
- "description": "固定 Hz の Ref クロックを N 分周して tick。BPM は分周比。lookahead 100ms",
226
- "status": "white",
227
- "assigneeIds": [],
228
- "position": {
229
- "x": 120,
230
- "y": 76
231
- },
232
- "collapsed": true,
233
- "artifacts": [],
234
- "activity": null,
235
- "decisions": [
236
- {
237
- "id": "2CC3MVmyri",
238
- "question": "クロックの基準はどちらにしますか?",
239
- "options": [
240
- "BPM を基準にして tick を割る",
241
- "固定 Hz の Ref クロックを N 分周する (BPM は分周比で表す)",
242
- "両方を切り替えられるようにする"
243
- ],
244
- "askedBy": "claude-code",
245
- "askedAt": "2026-10-02T21:23:05.422Z",
246
- "answer": "固定 Hz の Ref クロックを N 分周する (BPM は分周比で表す)",
247
- "answeredBy": "human",
248
- "answeredAt": "2026-10-02T21:23:05.464Z"
249
- }
250
- ]
251
- },
252
- "2B7PJf8hxm": {
253
- "id": "2B7PJf8hxm",
254
- "key": "B12",
255
- "parentId": "DIRmqMXT2l",
256
- "title": "ブロックの仕様を書く",
257
- "description": "分周器 / カウンタ / AND / OR / NOT / エッジ検出 / ゲート / トリガ。ループ禁止",
258
- "status": "white",
259
- "assigneeIds": [],
260
- "position": {
261
- "x": 766.1999999999998,
262
- "y": 76
263
- },
264
- "collapsed": true,
265
- "artifacts": [],
266
- "activity": null,
267
- "decisions": []
268
- },
269
- "E4vV7YM9M0": {
270
- "id": "E4vV7YM9M0",
271
- "key": "B13",
272
- "parentId": "DIRmqMXT2l",
273
- "title": "音源とミキサを設計する",
274
- "description": "トリガで鳴るオシレータとサンプル、ゲイン、ディレイのノード構成",
275
- "status": "white",
276
- "assigneeIds": [],
277
- "position": {
278
- "x": 1488.2999999999997,
279
- "y": 76
280
- },
281
- "collapsed": true,
282
- "artifacts": [],
283
- "activity": null,
284
- "decisions": []
285
- },
286
- "yWRDC8wwD6": {
287
- "id": "yWRDC8wwD6",
288
- "key": "B14",
289
- "parentId": "DIRmqMXT2l",
290
- "title": "パッチ形式を決める",
291
- "description": "ブロック・結線・パラメータを patch.json に。Git で差分が読める形",
292
- "status": "white",
293
- "assigneeIds": [],
294
- "position": {
295
- "x": 2141.0999999999995,
296
- "y": 76
297
- },
298
- "collapsed": true,
299
- "artifacts": [],
300
- "activity": null,
301
- "decisions": []
302
- },
303
- "rSAsjzr_gM": {
304
- "id": "rSAsjzr_gM",
305
- "key": "B15",
306
- "parentId": "FiH1BjJOTX",
307
- "title": "クロックとスケジューラ",
308
- "description": "Ref クロックの分周と lookahead のイベント予約",
309
- "status": "white",
310
- "assigneeIds": [],
311
- "position": {
312
- "x": 120,
313
- "y": 76
314
- },
315
- "collapsed": true,
316
- "artifacts": [],
317
- "activity": null,
318
- "decisions": []
319
- },
320
- "5nvO49jnqp": {
321
- "id": "5nvO49jnqp",
322
- "key": "B16",
323
- "parentId": "FiH1BjJOTX",
324
- "title": "論理ブロック",
325
- "description": "tick ごとに同期評価する論理ブロック群",
326
- "status": "gray",
327
- "assigneeIds": [],
328
- "position": {
329
- "x": 711.7499999999998,
330
- "y": 76
331
- },
332
- "collapsed": true,
333
- "artifacts": [],
334
- "activity": null,
335
- "decisions": [],
336
- "progress": 50
337
- },
338
- "nTEnZA2lre": {
339
- "id": "nTEnZA2lre",
340
- "key": "B17",
341
- "parentId": "FiH1BjJOTX",
342
- "title": "音源とミキサ",
343
- "description": "トリガを受けて鳴らす音源と、ゲイン・エフェクト",
344
- "status": "gray",
345
- "assigneeIds": [],
346
- "position": {
347
- "x": 1336.4999999999995,
348
- "y": 76
349
- },
350
- "collapsed": true,
351
- "artifacts": [],
352
- "activity": null,
353
- "decisions": []
354
- },
355
- "oWJCfRAhRe": {
356
- "id": "oWJCfRAhRe",
357
- "key": "B18",
358
- "parentId": "FiH1BjJOTX",
359
- "title": "パッチの保存と読み込み",
360
- "description": "patch.json の読み書きと検証",
361
- "status": "gray",
362
- "assigneeIds": [],
363
- "position": {
364
- "x": 1951.3499999999995,
365
- "y": 76
366
- },
367
- "collapsed": true,
368
- "artifacts": [],
369
- "activity": null,
370
- "decisions": []
371
- },
372
- "TKoBbn5oqq": {
373
- "id": "TKoBbn5oqq",
374
- "key": "B19",
375
- "parentId": "rSAsjzr_gM",
376
- "title": "Ref クロックを作る",
377
- "description": "48 kHz 基準のカウンタを AudioContext の時刻に同期させる",
378
- "status": "white",
379
- "assigneeIds": [],
380
- "position": {
381
- "x": 120,
382
- "y": 76
383
- },
384
- "collapsed": true,
385
- "artifacts": [],
386
- "activity": null,
387
- "decisions": []
388
- },
389
- "oe3g3G7YMT": {
390
- "id": "oe3g3G7YMT",
391
- "key": "B20",
392
- "parentId": "rSAsjzr_gM",
393
- "title": "分周器とカウンタを作る",
394
- "description": "2 のべき乗と 3 の倍数の分周、N 進カウンタ",
395
- "status": "white",
396
- "assigneeIds": [],
397
- "position": {
398
- "x": 662.2499999999998,
399
- "y": 76
400
- },
401
- "collapsed": true,
402
- "artifacts": [],
403
- "activity": null,
404
- "decisions": []
405
- },
406
- "Xe-TZBGtRd": {
407
- "id": "Xe-TZBGtRd",
408
- "key": "B21",
409
- "parentId": "rSAsjzr_gM",
410
- "title": "lookahead で予約する",
411
- "description": "100ms 先までのイベントを Web Audio に予約する",
412
- "status": "white",
413
- "assigneeIds": [],
414
- "position": {
415
- "x": 1250.6999999999996,
416
- "y": 76
417
- },
418
- "collapsed": true,
419
- "artifacts": [],
420
- "activity": null,
421
- "decisions": []
422
- },
423
- "bt03QZOzRy": {
424
- "id": "bt03QZOzRy",
425
- "key": "B22",
426
- "parentId": "5nvO49jnqp",
427
- "title": "ブロックの型を定義する",
428
- "description": "入力 1 本・出力分岐可、状態を持つブロックの共通の型",
429
- "status": "white",
430
- "assigneeIds": [],
431
- "position": {
432
- "x": 120,
433
- "y": 76
434
- },
435
- "collapsed": true,
436
- "artifacts": [],
437
- "activity": null,
438
- "decisions": []
439
- },
440
- "O1WPIQ7rSm": {
441
- "id": "O1WPIQ7rSm",
442
- "key": "B23",
443
- "parentId": "5nvO49jnqp",
444
- "title": "ゲートを実装する",
445
- "description": "AND / OR / NOT の評価",
446
- "status": "white",
447
- "assigneeIds": [],
448
- "position": {
449
- "x": 790.9499999999997,
450
- "y": 76
451
- },
452
- "collapsed": true,
453
- "artifacts": [],
454
- "activity": null,
455
- "decisions": []
456
- },
457
- "BL-IQJddOL": {
458
- "id": "BL-IQJddOL",
459
- "key": "B24",
460
- "parentId": "5nvO49jnqp",
461
- "title": "エッジ検出とゲート信号を実装する",
462
- "description": "立ち上がり検出と、ゲートで通す / 止める",
463
- "status": "gray",
464
- "assigneeIds": [],
465
- "position": {
466
- "x": 1447.0499999999993,
467
- "y": 76
468
- },
469
- "collapsed": true,
470
- "artifacts": [],
471
- "activity": {
472
- "actor": "claude-code",
473
- "state": "working",
474
- "note": "立ち上がり検出の状態の持ち方を実装中",
475
- "since": "2026-10-02T21:23:05.515Z"
476
- },
477
- "decisions": []
478
- },
479
- "aqTgOYdngd": {
480
- "id": "aqTgOYdngd",
481
- "key": "B25",
482
- "parentId": "5nvO49jnqp",
483
- "title": "評価器を実装する",
484
- "description": "tick ごとに全ブロックを同期評価し、トリガを出す",
485
- "status": "black",
486
- "assigneeIds": [],
487
- "position": {
488
- "x": 2119.6499999999987,
489
- "y": 76
490
- },
491
- "collapsed": true,
492
- "artifacts": [],
493
- "activity": null,
494
- "decisions": []
495
- },
496
- "K-20xmNf3W": {
497
- "id": "K-20xmNf3W",
498
- "key": "B26",
499
- "parentId": "nTEnZA2lre",
500
- "title": "オシレータ音源を作る",
501
- "description": "矩形・三角・ノコギリ。トリガで短く鳴る",
502
- "status": "black",
503
- "assigneeIds": [],
504
- "position": {
505
- "x": 120,
506
- "y": 76
507
- },
508
- "collapsed": true,
509
- "artifacts": [],
510
- "activity": null,
511
- "decisions": []
512
- },
513
- "_CMF_NQtrT": {
514
- "id": "_CMF_NQtrT",
515
- "key": "B27",
516
- "parentId": "nTEnZA2lre",
517
- "title": "サンプル再生を作る",
518
- "description": "ドラム音のサンプルをトリガで再生",
519
- "status": "black",
520
- "assigneeIds": [],
521
- "position": {
522
- "x": 733.1999999999998,
523
- "y": 76
524
- },
525
- "collapsed": true,
526
- "artifacts": [],
527
- "activity": {
528
- "actor": "claude-code",
529
- "state": "needs_decision",
530
- "note": "ドラムのサンプル音源は最初から同梱しますか?",
531
- "since": "2026-10-02T21:23:05.561Z"
532
- },
533
- "decisions": [
534
- {
535
- "id": "oe3agsib4k",
536
- "question": "ドラムのサンプル音源は最初から同梱しますか?",
537
- "options": [
538
- "オシレータだけで始める",
539
- "ドラムのサンプル 4 種を同梱する"
540
- ],
541
- "askedBy": "claude-code",
542
- "askedAt": "2026-10-02T21:23:05.561Z"
543
- }
544
- ]
545
- },
546
- "GEaS1KjrlU": {
547
- "id": "GEaS1KjrlU",
548
- "key": "B28",
549
- "parentId": "nTEnZA2lre",
550
- "title": "ミキサとエフェクトを作る",
551
- "description": "チャンネルごとのゲインとディレイ",
552
- "status": "black",
553
- "assigneeIds": [],
554
- "position": {
555
- "x": 1410.7499999999995,
556
- "y": 76
557
- },
558
- "collapsed": true,
559
- "artifacts": [],
560
- "activity": null,
561
- "decisions": []
562
- },
563
- "B0b9JruhHD": {
564
- "id": "B0b9JruhHD",
565
- "key": "B29",
566
- "parentId": "oWJCfRAhRe",
567
- "title": "パッチ形式を実装する",
568
- "description": "patch.json の型と検証 (壊れたファイルの扱い)",
569
- "status": "black",
570
- "assigneeIds": [],
571
- "position": {
572
- "x": 120,
573
- "y": 76
574
- },
575
- "collapsed": true,
576
- "artifacts": [],
577
- "activity": null,
578
- "decisions": []
579
- },
580
- "ouhZJIaFW5": {
581
- "id": "ouhZJIaFW5",
582
- "key": "B30",
583
- "parentId": "oWJCfRAhRe",
584
- "title": "読み書きを実装する",
585
- "description": "保存・読み込み・ブラウザ内保存",
586
- "status": "black",
587
- "assigneeIds": [],
588
- "position": {
589
- "x": 804.1499999999997,
590
- "y": 76
591
- },
592
- "collapsed": true,
593
- "artifacts": [],
594
- "activity": null,
595
- "decisions": []
596
- },
597
- "PmWXgxcTz1": {
598
- "id": "PmWXgxcTz1",
599
- "key": "B31",
600
- "parentId": "uZ_7SUgizp",
601
- "title": "ラック (配置と結線)",
602
- "description": "ブロックを置いて出力から入力へドラッグで結線する",
603
- "status": "gray",
604
- "assigneeIds": [],
605
- "position": {
606
- "x": 120,
607
- "y": 76
608
- },
609
- "collapsed": true,
610
- "artifacts": [],
611
- "activity": null,
612
- "decisions": []
613
- },
614
- "WpHHR1WTSj": {
615
- "id": "WpHHR1WTSj",
616
- "key": "B32",
617
- "parentId": "uZ_7SUgizp",
618
- "title": "トランスポート",
619
- "description": "再生 / 停止、Ref クロックの Hz、分周比、tick の表示",
620
- "status": "gray",
621
- "assigneeIds": [],
622
- "position": {
623
- "x": 715.0499999999997,
624
- "y": 76
625
- },
626
- "collapsed": true,
627
- "artifacts": [],
628
- "activity": null,
629
- "decisions": []
630
- },
631
- "WBeew96LXK": {
632
- "id": "WBeew96LXK",
633
- "key": "B33",
634
- "parentId": "uZ_7SUgizp",
635
- "title": "パラメータ編集とプリセット",
636
- "description": "選んだブロックの編集と、最初から鳴る 3 つのパッチ",
637
- "status": "gray",
638
- "assigneeIds": [],
639
- "position": {
640
- "x": 1328.2499999999995,
641
- "y": 76
642
- },
643
- "collapsed": true,
644
- "artifacts": [],
645
- "activity": null,
646
- "decisions": []
647
- },
648
- "PU3j5HywQV": {
649
- "id": "PU3j5HywQV",
650
- "key": "B34",
651
- "parentId": "PmWXgxcTz1",
652
- "title": "ブロックを描く",
653
- "description": "種類ごとの見た目と入出力の丸",
654
- "status": "black",
655
- "assigneeIds": [],
656
- "position": {
657
- "x": 120,
658
- "y": 76
659
- },
660
- "collapsed": true,
661
- "artifacts": [],
662
- "activity": null,
663
- "decisions": []
664
- },
665
- "ap_49HK8Re": {
666
- "id": "ap_49HK8Re",
667
- "key": "B35",
668
- "parentId": "PmWXgxcTz1",
669
- "title": "ドラッグで結線する",
670
- "description": "出力の丸から入力の丸へ。ループは拒否して理由を出す",
671
- "status": "black",
672
- "assigneeIds": [],
673
- "position": {
674
- "x": 733.1999999999998,
675
- "y": 76
676
- },
677
- "collapsed": true,
678
- "artifacts": [],
679
- "activity": null,
680
- "decisions": []
681
- },
682
- "LldtwPLSlE": {
683
- "id": "LldtwPLSlE",
684
- "key": "B36",
685
- "parentId": "PmWXgxcTz1",
686
- "title": "ラックに並べる",
687
- "description": "ブロックの配置、移動、削除",
688
- "status": "black",
689
- "assigneeIds": [],
690
- "position": {
691
- "x": 1273.7999999999997,
692
- "y": 76
693
- },
694
- "collapsed": true,
695
- "artifacts": [],
696
- "activity": null,
697
- "decisions": []
698
- },
699
- "F1Tm512LwZ": {
700
- "id": "F1Tm512LwZ",
701
- "key": "B37",
702
- "parentId": "WpHHR1WTSj",
703
- "title": "再生と停止を作る",
704
- "description": "AudioContext の開始、停止、全ブロックのリセット",
705
- "status": "black",
706
- "assigneeIds": [],
707
- "position": {
708
- "x": 120,
709
- "y": 76
710
- },
711
- "collapsed": true,
712
- "artifacts": [],
713
- "activity": null,
714
- "decisions": []
715
- },
716
- "KSdQlTjUl0": {
717
- "id": "KSdQlTjUl0",
718
- "key": "B38",
719
- "parentId": "WpHHR1WTSj",
720
- "title": "クロック表示を作る",
721
- "description": "Hz・分周比・現在の tick を見せる",
722
- "status": "black",
723
- "assigneeIds": [],
724
- "position": {
725
- "x": 665.5499999999998,
726
- "y": 76
727
- },
728
- "collapsed": true,
729
- "artifacts": [],
730
- "activity": null,
731
- "decisions": []
732
- },
733
- "AQKvUX2KGX": {
734
- "id": "AQKvUX2KGX",
735
- "key": "B39",
736
- "parentId": "WBeew96LXK",
737
- "title": "編集パネルを作る",
738
- "description": "分周比・しきい値・音色の編集",
739
- "status": "black",
740
- "assigneeIds": [],
741
- "position": {
742
- "x": 120,
743
- "y": 76
744
- },
745
- "collapsed": true,
746
- "artifacts": [],
747
- "activity": null,
748
- "decisions": []
749
- },
750
- "6eXlIjcUu7": {
751
- "id": "6eXlIjcUu7",
752
- "key": "B40",
753
- "parentId": "WBeew96LXK",
754
- "title": "プリセットを 3 つ作る",
755
- "description": "4 つ打ち、ポリリズム、ランダム風",
756
- "status": "black",
757
- "assigneeIds": [],
758
- "position": {
759
- "x": 766.1999999999997,
760
- "y": 76
761
- },
762
- "collapsed": true,
763
- "artifacts": [],
764
- "activity": null,
765
- "decisions": []
766
- },
767
- "t2xB0FIfXa": {
768
- "id": "t2xB0FIfXa",
769
- "key": "B41",
770
- "parentId": "WBeew96LXK",
771
- "title": "画面を組み上げる",
772
- "description": "ラック・トランスポート・編集パネルを 1 画面に",
773
- "status": "black",
774
- "assigneeIds": [],
775
- "position": {
776
- "x": 1395.8999999999994,
777
- "y": 76
778
- },
779
- "collapsed": true,
780
- "artifacts": [],
781
- "activity": null,
782
- "decisions": []
783
- },
784
- "QyyIDjhzd8": {
785
- "id": "QyyIDjhzd8",
786
- "key": "B42",
787
- "parentId": "CVcGYJiFyf",
788
- "title": "検証",
789
- "description": "タイミング精度とブラウザ差を実測し、遊んで直す",
790
- "status": "gray",
791
- "assigneeIds": [],
792
- "position": {
793
- "x": 120,
794
- "y": 76
795
- },
796
- "collapsed": true,
797
- "artifacts": [],
798
- "activity": null,
799
- "decisions": []
800
- },
801
- "v6bbrx9K93": {
802
- "id": "v6bbrx9K93",
803
- "key": "B43",
804
- "parentId": "CVcGYJiFyf",
805
- "title": "公開",
806
- "description": "ビルドして配信し、紹介ページと一緒に公開する",
807
- "status": "gray",
808
- "assigneeIds": [],
809
- "position": {
810
- "x": 685.3499999999998,
811
- "y": 76
812
- },
813
- "collapsed": true,
814
- "artifacts": [],
815
- "activity": null,
816
- "decisions": []
817
- },
818
- "yGW8Ae72fv": {
819
- "id": "yGW8Ae72fv",
820
- "key": "B44",
821
- "parentId": "QyyIDjhzd8",
822
- "title": "ジッタを計測する",
823
- "description": "1 分間のトリガ時刻を記録して 2ms 以内か",
824
- "status": "black",
825
- "assigneeIds": [],
826
- "position": {
827
- "x": 120,
828
- "y": 76
829
- },
830
- "collapsed": true,
831
- "artifacts": [],
832
- "activity": null,
833
- "decisions": []
834
- },
835
- "4hlmsTDUeV": {
836
- "id": "4hlmsTDUeV",
837
- "key": "B45",
838
- "parentId": "QyyIDjhzd8",
839
- "title": "ブラウザ差を確認する",
840
- "description": "Chrome / Firefox / Safari で同じパッチが同じ音で鳴るか",
841
- "status": "black",
842
- "assigneeIds": [],
843
- "position": {
844
- "x": 647.3999999999999,
845
- "y": 76
846
- },
847
- "collapsed": true,
848
- "artifacts": [],
849
- "activity": null,
850
- "decisions": []
851
- },
852
- "u9EvSIo2D9": {
853
- "id": "u9EvSIo2D9",
854
- "key": "B46",
855
- "parentId": "QyyIDjhzd8",
856
- "title": "試遊して直す",
857
- "description": "3 人に 10 分遊んでもらい、詰まった所を直す",
858
- "status": "black",
859
- "assigneeIds": [],
860
- "position": {
861
- "x": 1176.4499999999998,
862
- "y": 76
863
- },
864
- "collapsed": true,
865
- "artifacts": [],
866
- "activity": null,
867
- "decisions": []
868
- },
869
- "IMFPBAf-pu": {
870
- "id": "IMFPBAf-pu",
871
- "key": "B47",
872
- "parentId": "v6bbrx9K93",
873
- "title": "ビルドして配信する",
874
- "description": "vite build して GitHub Pages に置く",
875
- "status": "black",
876
- "assigneeIds": [],
877
- "position": {
878
- "x": 120,
879
- "y": 76
880
- },
881
- "collapsed": true,
882
- "artifacts": [],
883
- "activity": null,
884
- "decisions": []
885
- },
886
- "I4uQZmQ75f": {
887
- "id": "I4uQZmQ75f",
888
- "key": "B48",
889
- "parentId": "v6bbrx9K93",
890
- "title": "紹介ページを書く",
891
- "description": "README とデモ GIF、遊び方 3 ステップ",
892
- "status": "black",
893
- "assigneeIds": [],
894
- "position": {
895
- "x": 576.4499999999998,
896
- "y": 76
897
- },
898
- "collapsed": true,
899
- "artifacts": [],
900
- "activity": null,
901
- "decisions": []
902
- },
903
- "3Nr7xa8TFw": {
904
- "id": "3Nr7xa8TFw",
905
- "key": "B49",
906
- "parentId": "v6bbrx9K93",
907
- "title": "公開して告知する",
908
- "description": "タグ v1.0.0、ブログと SNS",
909
- "status": "black",
910
- "assigneeIds": [],
911
- "position": {
912
- "x": 966.8999999999997,
913
- "y": 76
914
- },
915
- "collapsed": true,
916
- "artifacts": [],
917
- "activity": null,
918
- "decisions": []
919
- }
920
- },
921
- "ports": {
922
- "UAvNJMXfiB": {
923
- "id": "UAvNJMXfiB",
924
- "blockId": "root",
925
- "direction": "out",
926
- "name": "公開された Logic DAW (URL)",
927
- "description": "",
928
- "required": true,
929
- "artifacts": []
930
- },
931
- "fg2eQl3RiW": {
932
- "id": "fg2eQl3RiW",
933
- "blockId": "Qi_8UqGvoN",
934
- "direction": "out",
935
- "name": "公開された Logic DAW (URL)",
936
- "description": "",
937
- "required": true,
938
- "artifacts": []
939
- },
940
- "fy01mWHoRz": {
941
- "id": "fy01mWHoRz",
942
- "blockId": "xJhwet2eK4",
943
- "direction": "out",
944
- "name": "設計書 (docs/design.md)",
945
- "description": "",
946
- "required": true,
947
- "artifacts": [
948
- {
949
- "id": "R6vErw44ji",
950
- "title": "設計書",
951
- "url": "",
952
- "kind": "file",
953
- "note": "",
954
- "path": "docs/design.md"
955
- }
956
- ]
957
- },
958
- "QJHUXdI5Hm": {
959
- "id": "QJHUXdI5Hm",
960
- "blockId": "xJhwet2eK4",
961
- "direction": "in",
962
- "name": "企画メモ (何で遊びたいか)",
963
- "description": "",
964
- "required": true,
965
- "artifacts": []
966
- },
967
- "TA-aOKc8qD": {
968
- "id": "TA-aOKc8qD",
969
- "blockId": "Qi_8UqGvoN",
970
- "direction": "in",
971
- "name": "企画メモ (何で遊びたいか)",
972
- "description": "",
973
- "required": true,
974
- "artifacts": [],
975
- "promotedFrom": "QJHUXdI5Hm"
976
- },
977
- "hT--v-Bfi9": {
978
- "id": "hT--v-Bfi9",
979
- "blockId": "root",
980
- "direction": "in",
981
- "name": "企画メモ (何で遊びたいか)",
982
- "description": "",
983
- "required": true,
984
- "artifacts": [],
985
- "promotedFrom": "TA-aOKc8qD"
986
- },
987
- "_tT7ETNmmk": {
988
- "id": "_tT7ETNmmk",
989
- "blockId": "xJhwet2eK4",
990
- "direction": "in",
991
- "name": "論理回路の基礎知識 (資料)",
992
- "description": "",
993
- "required": true,
994
- "artifacts": []
995
- },
996
- "ovok6n6Nq0": {
997
- "id": "ovok6n6Nq0",
998
- "blockId": "Qi_8UqGvoN",
999
- "direction": "in",
1000
- "name": "論理回路の基礎知識 (資料)",
1001
- "description": "",
1002
- "required": true,
1003
- "artifacts": [],
1004
- "promotedFrom": "_tT7ETNmmk"
1005
- },
1006
- "h23ZuuBQVq": {
1007
- "id": "h23ZuuBQVq",
1008
- "blockId": "root",
1009
- "direction": "in",
1010
- "name": "論理回路の基礎知識 (資料)",
1011
- "description": "",
1012
- "required": true,
1013
- "artifacts": [],
1014
- "promotedFrom": "ovok6n6Nq0"
1015
- },
1016
- "zZioHWEFMi": {
1017
- "id": "zZioHWEFMi",
1018
- "blockId": "FiH1BjJOTX",
1019
- "direction": "out",
1020
- "name": "エンジン一式 (src/engine/index.ts)",
1021
- "description": "",
1022
- "required": true,
1023
- "artifacts": []
1024
- },
1025
- "uJpcX-UPx_": {
1026
- "id": "uJpcX-UPx_",
1027
- "blockId": "FiH1BjJOTX",
1028
- "direction": "in",
1029
- "name": "設計書 (docs/design.md)",
1030
- "description": "",
1031
- "required": true,
1032
- "artifacts": []
1033
- },
1034
- "B3vs5ee3X5": {
1035
- "id": "B3vs5ee3X5",
1036
- "blockId": "FiH1BjJOTX",
1037
- "direction": "in",
1038
- "name": "Web Audio API の仕様",
1039
- "description": "",
1040
- "required": true,
1041
- "artifacts": []
1042
- },
1043
- "v99e7fqoqJ": {
1044
- "id": "v99e7fqoqJ",
1045
- "blockId": "Qi_8UqGvoN",
1046
- "direction": "in",
1047
- "name": "Web Audio API の仕様",
1048
- "description": "",
1049
- "required": true,
1050
- "artifacts": [],
1051
- "promotedFrom": "B3vs5ee3X5"
1052
- },
1053
- "F2EnIfh3_Q": {
1054
- "id": "F2EnIfh3_Q",
1055
- "blockId": "root",
1056
- "direction": "in",
1057
- "name": "Web Audio API の仕様",
1058
- "description": "",
1059
- "required": true,
1060
- "artifacts": [],
1061
- "promotedFrom": "v99e7fqoqJ"
1062
- },
1063
- "eGI-VIk1Ei": {
1064
- "id": "eGI-VIk1Ei",
1065
- "blockId": "uZ_7SUgizp",
1066
- "direction": "out",
1067
- "name": "画面一式 (src/ui/App.tsx)",
1068
- "description": "",
1069
- "required": true,
1070
- "artifacts": []
1071
- },
1072
- "ejZYaEiQ6L": {
1073
- "id": "ejZYaEiQ6L",
1074
- "blockId": "uZ_7SUgizp",
1075
- "direction": "in",
1076
- "name": "エンジン一式 (src/engine/index.ts)",
1077
- "description": "",
1078
- "required": true,
1079
- "artifacts": []
1080
- },
1081
- "8Jt2-0LipW": {
1082
- "id": "8Jt2-0LipW",
1083
- "blockId": "CVcGYJiFyf",
1084
- "direction": "out",
1085
- "name": "公開された Logic DAW (URL)",
1086
- "description": "",
1087
- "required": true,
1088
- "artifacts": []
1089
- },
1090
- "LfxvKcMQhc": {
1091
- "id": "LfxvKcMQhc",
1092
- "blockId": "CVcGYJiFyf",
1093
- "direction": "in",
1094
- "name": "画面一式 (src/ui/App.tsx)",
1095
- "description": "",
1096
- "required": true,
1097
- "artifacts": []
1098
- },
1099
- "4c-A-SRf-2": {
1100
- "id": "4c-A-SRf-2",
1101
- "blockId": "9WPT6_CRiu",
1102
- "direction": "out",
1103
- "name": "要件 (docs/requirements.md)",
1104
- "description": "",
1105
- "required": true,
1106
- "artifacts": [
1107
- {
1108
- "id": "5HetHMKNKc",
1109
- "title": "要件",
1110
- "url": "",
1111
- "kind": "file",
1112
- "note": "",
1113
- "path": "docs/requirements.md"
1114
- }
1115
- ]
1116
- },
1117
- "xTc3MB1coA": {
1118
- "id": "xTc3MB1coA",
1119
- "blockId": "9WPT6_CRiu",
1120
- "direction": "in",
1121
- "name": "企画メモ (何で遊びたいか)",
1122
- "description": "",
1123
- "required": true,
1124
- "artifacts": []
1125
- },
1126
- "W8ebXS8Hjc": {
1127
- "id": "W8ebXS8Hjc",
1128
- "blockId": "DIRmqMXT2l",
1129
- "direction": "out",
1130
- "name": "設計書 (docs/design.md)",
1131
- "description": "",
1132
- "required": true,
1133
- "artifacts": [
1134
- {
1135
- "id": "LDVfIlKGbC",
1136
- "title": "設計書",
1137
- "url": "",
1138
- "kind": "file",
1139
- "note": "",
1140
- "path": "docs/design.md"
1141
- }
1142
- ]
1143
- },
1144
- "kvS3InugGs": {
1145
- "id": "kvS3InugGs",
1146
- "blockId": "DIRmqMXT2l",
1147
- "direction": "in",
1148
- "name": "要件 (docs/requirements.md)",
1149
- "description": "",
1150
- "required": true,
1151
- "artifacts": []
1152
- },
1153
- "mAvgYpZWOH": {
1154
- "id": "mAvgYpZWOH",
1155
- "blockId": "DIRmqMXT2l",
1156
- "direction": "in",
1157
- "name": "論理回路の基礎知識 (資料)",
1158
- "description": "",
1159
- "required": true,
1160
- "artifacts": []
1161
- },
1162
- "22r3SR4SOv": {
1163
- "id": "22r3SR4SOv",
1164
- "blockId": "9h2eE_cSiA",
1165
- "direction": "out",
1166
- "name": "遊び方の絵 (docs/play.png)",
1167
- "description": "",
1168
- "required": true,
1169
- "artifacts": [
1170
- {
1171
- "id": "YfhQntFL44",
1172
- "title": "遊び方の絵",
1173
- "url": "",
1174
- "kind": "file",
1175
- "note": "",
1176
- "path": "docs/play.png"
1177
- }
1178
- ]
1179
- },
1180
- "5uOi3cMDfx": {
1181
- "id": "5uOi3cMDfx",
1182
- "blockId": "9h2eE_cSiA",
1183
- "direction": "in",
1184
- "name": "企画メモ (何で遊びたいか)",
1185
- "description": "",
1186
- "required": true,
1187
- "artifacts": []
1188
- },
1189
- "HUP_vV7Vbi": {
1190
- "id": "HUP_vV7Vbi",
1191
- "blockId": "dQFr5sVxfL",
1192
- "direction": "out",
1193
- "name": "性能目標 (docs/targets.md)",
1194
- "description": "",
1195
- "required": true,
1196
- "artifacts": [
1197
- {
1198
- "id": "YNacOywlxB",
1199
- "title": "性能目標",
1200
- "url": "",
1201
- "kind": "file",
1202
- "note": "",
1203
- "path": "docs/targets.md"
1204
- }
1205
- ]
1206
- },
1207
- "DGrmfwlx8f": {
1208
- "id": "DGrmfwlx8f",
1209
- "blockId": "dQFr5sVxfL",
1210
- "direction": "in",
1211
- "name": "遊び方の絵 (docs/play.png)",
1212
- "description": "",
1213
- "required": true,
1214
- "artifacts": []
1215
- },
1216
- "tA6p6STOr8": {
1217
- "id": "tA6p6STOr8",
1218
- "blockId": "6sEOLrrbpE",
1219
- "direction": "out",
1220
- "name": "要件 (docs/requirements.md)",
1221
- "description": "",
1222
- "required": true,
1223
- "artifacts": [
1224
- {
1225
- "id": "vx3AuX_wEM",
1226
- "title": "要件",
1227
- "url": "",
1228
- "kind": "file",
1229
- "note": "",
1230
- "path": "docs/requirements.md"
1231
- }
1232
- ]
1233
- },
1234
- "4T9YYqx8us": {
1235
- "id": "4T9YYqx8us",
1236
- "blockId": "6sEOLrrbpE",
1237
- "direction": "in",
1238
- "name": "性能目標 (docs/targets.md)",
1239
- "description": "",
1240
- "required": true,
1241
- "artifacts": []
1242
- },
1243
- "zTvSTSq1hq": {
1244
- "id": "zTvSTSq1hq",
1245
- "blockId": "LQ-3HVFrbh",
1246
- "direction": "out",
1247
- "name": "タイミングモデルの章 (docs/design.md#clock)",
1248
- "description": "",
1249
- "required": true,
1250
- "artifacts": [
1251
- {
1252
- "id": "xdqFeZTmGA",
1253
- "title": "タイミングモデル",
1254
- "url": "",
1255
- "kind": "file",
1256
- "note": "",
1257
- "path": "docs/design.md"
1258
- }
1259
- ]
1260
- },
1261
- "ObLi0Io4S5": {
1262
- "id": "ObLi0Io4S5",
1263
- "blockId": "LQ-3HVFrbh",
1264
- "direction": "in",
1265
- "name": "要件 (docs/requirements.md)",
1266
- "description": "",
1267
- "required": true,
1268
- "artifacts": []
1269
- },
1270
- "4EmmVBE157": {
1271
- "id": "4EmmVBE157",
1272
- "blockId": "LQ-3HVFrbh",
1273
- "direction": "in",
1274
- "name": "論理回路の基礎知識 (資料)",
1275
- "description": "",
1276
- "required": true,
1277
- "artifacts": []
1278
- },
1279
- "ou46CmUSog": {
1280
- "id": "ou46CmUSog",
1281
- "blockId": "2B7PJf8hxm",
1282
- "direction": "out",
1283
- "name": "ブロック仕様の章 (docs/design.md#blocks)",
1284
- "description": "",
1285
- "required": true,
1286
- "artifacts": [
1287
- {
1288
- "id": "tn5eVw8OjB",
1289
- "title": "ブロック仕様",
1290
- "url": "",
1291
- "kind": "file",
1292
- "note": "",
1293
- "path": "docs/design.md"
1294
- }
1295
- ]
1296
- },
1297
- "tpgAsR93nJ": {
1298
- "id": "tpgAsR93nJ",
1299
- "blockId": "2B7PJf8hxm",
1300
- "direction": "in",
1301
- "name": "タイミングモデルの章 (docs/design.md#clock)",
1302
- "description": "",
1303
- "required": true,
1304
- "artifacts": []
1305
- },
1306
- "BrkAmelKc6": {
1307
- "id": "BrkAmelKc6",
1308
- "blockId": "E4vV7YM9M0",
1309
- "direction": "out",
1310
- "name": "音源の章 (docs/design.md#audio)",
1311
- "description": "",
1312
- "required": true,
1313
- "artifacts": [
1314
- {
1315
- "id": "PbBT5ChLYa",
1316
- "title": "音源の章",
1317
- "url": "",
1318
- "kind": "file",
1319
- "note": "",
1320
- "path": "docs/design.md"
1321
- }
1322
- ]
1323
- },
1324
- "tTNt2AiDvF": {
1325
- "id": "tTNt2AiDvF",
1326
- "blockId": "E4vV7YM9M0",
1327
- "direction": "in",
1328
- "name": "ブロック仕様の章 (docs/design.md#blocks)",
1329
- "description": "",
1330
- "required": true,
1331
- "artifacts": []
1332
- },
1333
- "VQQ9-P729l": {
1334
- "id": "VQQ9-P729l",
1335
- "blockId": "yWRDC8wwD6",
1336
- "direction": "out",
1337
- "name": "設計書 (docs/design.md)",
1338
- "description": "",
1339
- "required": true,
1340
- "artifacts": [
1341
- {
1342
- "id": "opu58L8Gv-",
1343
- "title": "設計書",
1344
- "url": "",
1345
- "kind": "file",
1346
- "note": "",
1347
- "path": "docs/design.md"
1348
- }
1349
- ]
1350
- },
1351
- "0Oq9-Om1uQ": {
1352
- "id": "0Oq9-Om1uQ",
1353
- "blockId": "yWRDC8wwD6",
1354
- "direction": "in",
1355
- "name": "音源の章 (docs/design.md#audio)",
1356
- "description": "",
1357
- "required": true,
1358
- "artifacts": []
1359
- },
1360
- "Rc5jvXed44": {
1361
- "id": "Rc5jvXed44",
1362
- "blockId": "rSAsjzr_gM",
1363
- "direction": "out",
1364
- "name": "スケジューラ (src/engine/scheduler.ts)",
1365
- "description": "",
1366
- "required": true,
1367
- "artifacts": [
1368
- {
1369
- "id": "nIqgEZzYCe",
1370
- "title": "スケジューラ",
1371
- "url": "",
1372
- "kind": "file",
1373
- "note": "",
1374
- "path": "src/engine/scheduler.ts"
1375
- }
1376
- ]
1377
- },
1378
- "eWofB4yUGk": {
1379
- "id": "eWofB4yUGk",
1380
- "blockId": "rSAsjzr_gM",
1381
- "direction": "in",
1382
- "name": "設計書 (docs/design.md)",
1383
- "description": "",
1384
- "required": true,
1385
- "artifacts": []
1386
- },
1387
- "PNUwk1z1wg": {
1388
- "id": "PNUwk1z1wg",
1389
- "blockId": "5nvO49jnqp",
1390
- "direction": "out",
1391
- "name": "評価器 (src/engine/logic.ts)",
1392
- "description": "",
1393
- "required": true,
1394
- "artifacts": []
1395
- },
1396
- "diIpJHZrdB": {
1397
- "id": "diIpJHZrdB",
1398
- "blockId": "5nvO49jnqp",
1399
- "direction": "in",
1400
- "name": "スケジューラ (src/engine/scheduler.ts)",
1401
- "description": "",
1402
- "required": true,
1403
- "artifacts": []
1404
- },
1405
- "61jwEgzJkd": {
1406
- "id": "61jwEgzJkd",
1407
- "blockId": "nTEnZA2lre",
1408
- "direction": "out",
1409
- "name": "音声出力 (src/engine/audio/mixer.ts)",
1410
- "description": "",
1411
- "required": true,
1412
- "artifacts": []
1413
- },
1414
- "8jQGqXsyyK": {
1415
- "id": "8jQGqXsyyK",
1416
- "blockId": "nTEnZA2lre",
1417
- "direction": "in",
1418
- "name": "評価器 (src/engine/logic.ts)",
1419
- "description": "",
1420
- "required": true,
1421
- "artifacts": []
1422
- },
1423
- "r6bCJHBXwq": {
1424
- "id": "r6bCJHBXwq",
1425
- "blockId": "nTEnZA2lre",
1426
- "direction": "in",
1427
- "name": "Web Audio API の仕様",
1428
- "description": "",
1429
- "required": true,
1430
- "artifacts": []
1431
- },
1432
- "x4q5P41c2W": {
1433
- "id": "x4q5P41c2W",
1434
- "blockId": "oWJCfRAhRe",
1435
- "direction": "out",
1436
- "name": "エンジン一式 (src/engine/index.ts)",
1437
- "description": "",
1438
- "required": true,
1439
- "artifacts": []
1440
- },
1441
- "E-RiLBQYrz": {
1442
- "id": "E-RiLBQYrz",
1443
- "blockId": "oWJCfRAhRe",
1444
- "direction": "in",
1445
- "name": "音声出力 (src/engine/audio/mixer.ts)",
1446
- "description": "",
1447
- "required": true,
1448
- "artifacts": []
1449
- },
1450
- "NjZ1r6WIZa": {
1451
- "id": "NjZ1r6WIZa",
1452
- "blockId": "TKoBbn5oqq",
1453
- "direction": "out",
1454
- "name": "クロック (src/engine/clock.ts)",
1455
- "description": "",
1456
- "required": true,
1457
- "artifacts": [
1458
- {
1459
- "id": "GW5TD8PO61",
1460
- "title": "クロック",
1461
- "url": "",
1462
- "kind": "file",
1463
- "note": "",
1464
- "path": "src/engine/clock.ts"
1465
- }
1466
- ]
1467
- },
1468
- "DmlNCBayRq": {
1469
- "id": "DmlNCBayRq",
1470
- "blockId": "TKoBbn5oqq",
1471
- "direction": "in",
1472
- "name": "設計書 (docs/design.md)",
1473
- "description": "",
1474
- "required": true,
1475
- "artifacts": []
1476
- },
1477
- "eh9eB-8IQC": {
1478
- "id": "eh9eB-8IQC",
1479
- "blockId": "oe3g3G7YMT",
1480
- "direction": "out",
1481
- "name": "分周器 (src/engine/divider.ts)",
1482
- "description": "",
1483
- "required": true,
1484
- "artifacts": [
1485
- {
1486
- "id": "Tb64juNkdc",
1487
- "title": "分周器",
1488
- "url": "",
1489
- "kind": "file",
1490
- "note": "",
1491
- "path": "src/engine/divider.ts"
1492
- }
1493
- ]
1494
- },
1495
- "10bDGnti1O": {
1496
- "id": "10bDGnti1O",
1497
- "blockId": "oe3g3G7YMT",
1498
- "direction": "in",
1499
- "name": "クロック (src/engine/clock.ts)",
1500
- "description": "",
1501
- "required": true,
1502
- "artifacts": []
1503
- },
1504
- "HaRprcCBb2": {
1505
- "id": "HaRprcCBb2",
1506
- "blockId": "Xe-TZBGtRd",
1507
- "direction": "out",
1508
- "name": "スケジューラ (src/engine/scheduler.ts)",
1509
- "description": "",
1510
- "required": true,
1511
- "artifacts": [
1512
- {
1513
- "id": "MJIvtpBhS7",
1514
- "title": "スケジューラ",
1515
- "url": "",
1516
- "kind": "file",
1517
- "note": "",
1518
- "path": "src/engine/scheduler.ts"
1519
- }
1520
- ]
1521
- },
1522
- "LuoGxmETA6": {
1523
- "id": "LuoGxmETA6",
1524
- "blockId": "Xe-TZBGtRd",
1525
- "direction": "in",
1526
- "name": "分周器 (src/engine/divider.ts)",
1527
- "description": "",
1528
- "required": true,
1529
- "artifacts": []
1530
- },
1531
- "UOUnrNqA4O": {
1532
- "id": "UOUnrNqA4O",
1533
- "blockId": "bt03QZOzRy",
1534
- "direction": "out",
1535
- "name": "型定義 (src/engine/blocks/types.ts)",
1536
- "description": "",
1537
- "required": true,
1538
- "artifacts": [
1539
- {
1540
- "id": "M5lYRHxIUs",
1541
- "title": "型定義",
1542
- "url": "",
1543
- "kind": "file",
1544
- "note": "",
1545
- "path": "src/engine/blocks/types.ts"
1546
- }
1547
- ]
1548
- },
1549
- "WIc_zMUPk8": {
1550
- "id": "WIc_zMUPk8",
1551
- "blockId": "bt03QZOzRy",
1552
- "direction": "in",
1553
- "name": "スケジューラ (src/engine/scheduler.ts)",
1554
- "description": "",
1555
- "required": true,
1556
- "artifacts": []
1557
- },
1558
- "7rdWMFN1Qx": {
1559
- "id": "7rdWMFN1Qx",
1560
- "blockId": "O1WPIQ7rSm",
1561
- "direction": "out",
1562
- "name": "ゲート (src/engine/blocks/gates.ts)",
1563
- "description": "",
1564
- "required": true,
1565
- "artifacts": [
1566
- {
1567
- "id": "TBmPbSUKgO",
1568
- "title": "ゲート",
1569
- "url": "",
1570
- "kind": "file",
1571
- "note": "",
1572
- "path": "src/engine/blocks/gates.ts"
1573
- }
1574
- ]
1575
- },
1576
- "lVwsQiNOat": {
1577
- "id": "lVwsQiNOat",
1578
- "blockId": "O1WPIQ7rSm",
1579
- "direction": "in",
1580
- "name": "型定義 (src/engine/blocks/types.ts)",
1581
- "description": "",
1582
- "required": true,
1583
- "artifacts": []
1584
- },
1585
- "2ABl9uQU_K": {
1586
- "id": "2ABl9uQU_K",
1587
- "blockId": "BL-IQJddOL",
1588
- "direction": "out",
1589
- "name": "エッジ検出 (src/engine/blocks/edge.ts)",
1590
- "description": "",
1591
- "required": true,
1592
- "artifacts": []
1593
- },
1594
- "fvRe5iIwzH": {
1595
- "id": "fvRe5iIwzH",
1596
- "blockId": "BL-IQJddOL",
1597
- "direction": "in",
1598
- "name": "ゲート (src/engine/blocks/gates.ts)",
1599
- "description": "",
1600
- "required": true,
1601
- "artifacts": []
1602
- },
1603
- "qgZc6zvdSq": {
1604
- "id": "qgZc6zvdSq",
1605
- "blockId": "aqTgOYdngd",
1606
- "direction": "out",
1607
- "name": "評価器 (src/engine/logic.ts)",
1608
- "description": "",
1609
- "required": true,
1610
- "artifacts": []
1611
- },
1612
- "7alskTKs5m": {
1613
- "id": "7alskTKs5m",
1614
- "blockId": "aqTgOYdngd",
1615
- "direction": "in",
1616
- "name": "エッジ検出 (src/engine/blocks/edge.ts)",
1617
- "description": "",
1618
- "required": true,
1619
- "artifacts": []
1620
- },
1621
- "wTK-zFXIl-": {
1622
- "id": "wTK-zFXIl-",
1623
- "blockId": "K-20xmNf3W",
1624
- "direction": "out",
1625
- "name": "オシレータ (src/engine/audio/osc.ts)",
1626
- "description": "",
1627
- "required": true,
1628
- "artifacts": []
1629
- },
1630
- "Wh8MtlNFbF": {
1631
- "id": "Wh8MtlNFbF",
1632
- "blockId": "K-20xmNf3W",
1633
- "direction": "in",
1634
- "name": "評価器 (src/engine/logic.ts)",
1635
- "description": "",
1636
- "required": true,
1637
- "artifacts": []
1638
- },
1639
- "rZHl7JKTav": {
1640
- "id": "rZHl7JKTav",
1641
- "blockId": "K-20xmNf3W",
1642
- "direction": "in",
1643
- "name": "Web Audio API の仕様",
1644
- "description": "",
1645
- "required": true,
1646
- "artifacts": []
1647
- },
1648
- "MBtOwLhUMn": {
1649
- "id": "MBtOwLhUMn",
1650
- "blockId": "_CMF_NQtrT",
1651
- "direction": "out",
1652
- "name": "サンプラ (src/engine/audio/sampler.ts)",
1653
- "description": "",
1654
- "required": true,
1655
- "artifacts": []
1656
- },
1657
- "A6aFCCF3Zr": {
1658
- "id": "A6aFCCF3Zr",
1659
- "blockId": "_CMF_NQtrT",
1660
- "direction": "in",
1661
- "name": "オシレータ (src/engine/audio/osc.ts)",
1662
- "description": "",
1663
- "required": true,
1664
- "artifacts": []
1665
- },
1666
- "L80wr7lTxz": {
1667
- "id": "L80wr7lTxz",
1668
- "blockId": "GEaS1KjrlU",
1669
- "direction": "out",
1670
- "name": "音声出力 (src/engine/audio/mixer.ts)",
1671
- "description": "",
1672
- "required": true,
1673
- "artifacts": []
1674
- },
1675
- "qBdXhEaDrC": {
1676
- "id": "qBdXhEaDrC",
1677
- "blockId": "GEaS1KjrlU",
1678
- "direction": "in",
1679
- "name": "サンプラ (src/engine/audio/sampler.ts)",
1680
- "description": "",
1681
- "required": true,
1682
- "artifacts": []
1683
- },
1684
- "QJ6WG9q_4D": {
1685
- "id": "QJ6WG9q_4D",
1686
- "blockId": "B0b9JruhHD",
1687
- "direction": "out",
1688
- "name": "パッチの型 (src/engine/patch/schema.ts)",
1689
- "description": "",
1690
- "required": true,
1691
- "artifacts": []
1692
- },
1693
- "Y8U78Ai1EL": {
1694
- "id": "Y8U78Ai1EL",
1695
- "blockId": "B0b9JruhHD",
1696
- "direction": "in",
1697
- "name": "音声出力 (src/engine/audio/mixer.ts)",
1698
- "description": "",
1699
- "required": true,
1700
- "artifacts": []
1701
- },
1702
- "G6Azpcaj5d": {
1703
- "id": "G6Azpcaj5d",
1704
- "blockId": "ouhZJIaFW5",
1705
- "direction": "out",
1706
- "name": "エンジン一式 (src/engine/index.ts)",
1707
- "description": "",
1708
- "required": true,
1709
- "artifacts": []
1710
- },
1711
- "2apx-GP8jT": {
1712
- "id": "2apx-GP8jT",
1713
- "blockId": "ouhZJIaFW5",
1714
- "direction": "in",
1715
- "name": "パッチの型 (src/engine/patch/schema.ts)",
1716
- "description": "",
1717
- "required": true,
1718
- "artifacts": []
1719
- },
1720
- "rqWJ55QcxB": {
1721
- "id": "rqWJ55QcxB",
1722
- "blockId": "PmWXgxcTz1",
1723
- "direction": "out",
1724
- "name": "ラック画面 (src/ui/Rack.tsx)",
1725
- "description": "",
1726
- "required": true,
1727
- "artifacts": []
1728
- },
1729
- "pT_7vIsYOF": {
1730
- "id": "pT_7vIsYOF",
1731
- "blockId": "PmWXgxcTz1",
1732
- "direction": "in",
1733
- "name": "エンジン一式 (src/engine/index.ts)",
1734
- "description": "",
1735
- "required": true,
1736
- "artifacts": []
1737
- },
1738
- "9FWTdTieUE": {
1739
- "id": "9FWTdTieUE",
1740
- "blockId": "WpHHR1WTSj",
1741
- "direction": "out",
1742
- "name": "トランスポート (src/ui/Transport.tsx)",
1743
- "description": "",
1744
- "required": true,
1745
- "artifacts": []
1746
- },
1747
- "Jyc6hva2px": {
1748
- "id": "Jyc6hva2px",
1749
- "blockId": "WpHHR1WTSj",
1750
- "direction": "in",
1751
- "name": "ラック画面 (src/ui/Rack.tsx)",
1752
- "description": "",
1753
- "required": true,
1754
- "artifacts": []
1755
- },
1756
- "jT4DeSMVmu": {
1757
- "id": "jT4DeSMVmu",
1758
- "blockId": "WBeew96LXK",
1759
- "direction": "out",
1760
- "name": "画面一式 (src/ui/App.tsx)",
1761
- "description": "",
1762
- "required": true,
1763
- "artifacts": []
1764
- },
1765
- "aYYETNLKZW": {
1766
- "id": "aYYETNLKZW",
1767
- "blockId": "WBeew96LXK",
1768
- "direction": "in",
1769
- "name": "トランスポート (src/ui/Transport.tsx)",
1770
- "description": "",
1771
- "required": true,
1772
- "artifacts": []
1773
- },
1774
- "YVLDUdLYvp": {
1775
- "id": "YVLDUdLYvp",
1776
- "blockId": "PU3j5HywQV",
1777
- "direction": "out",
1778
- "name": "ブロック部品 (src/ui/Block.tsx)",
1779
- "description": "",
1780
- "required": true,
1781
- "artifacts": []
1782
- },
1783
- "a7AhfqxBPh": {
1784
- "id": "a7AhfqxBPh",
1785
- "blockId": "PU3j5HywQV",
1786
- "direction": "in",
1787
- "name": "エンジン一式 (src/engine/index.ts)",
1788
- "description": "",
1789
- "required": true,
1790
- "artifacts": []
1791
- },
1792
- "sqElXXu_Ar": {
1793
- "id": "sqElXXu_Ar",
1794
- "blockId": "ap_49HK8Re",
1795
- "direction": "out",
1796
- "name": "結線 (src/ui/Wire.tsx)",
1797
- "description": "",
1798
- "required": true,
1799
- "artifacts": []
1800
- },
1801
- "XxH1wFwKWK": {
1802
- "id": "XxH1wFwKWK",
1803
- "blockId": "ap_49HK8Re",
1804
- "direction": "in",
1805
- "name": "ブロック部品 (src/ui/Block.tsx)",
1806
- "description": "",
1807
- "required": true,
1808
- "artifacts": []
1809
- },
1810
- "OtMpwABByO": {
1811
- "id": "OtMpwABByO",
1812
- "blockId": "LldtwPLSlE",
1813
- "direction": "out",
1814
- "name": "ラック画面 (src/ui/Rack.tsx)",
1815
- "description": "",
1816
- "required": true,
1817
- "artifacts": []
1818
- },
1819
- "tFnHc2q3tj": {
1820
- "id": "tFnHc2q3tj",
1821
- "blockId": "LldtwPLSlE",
1822
- "direction": "in",
1823
- "name": "結線 (src/ui/Wire.tsx)",
1824
- "description": "",
1825
- "required": true,
1826
- "artifacts": []
1827
- },
1828
- "TXXwYnq2J2": {
1829
- "id": "TXXwYnq2J2",
1830
- "blockId": "F1Tm512LwZ",
1831
- "direction": "out",
1832
- "name": "再生制御 (src/ui/Play.tsx)",
1833
- "description": "",
1834
- "required": true,
1835
- "artifacts": []
1836
- },
1837
- "CZJeTP5jR4": {
1838
- "id": "CZJeTP5jR4",
1839
- "blockId": "F1Tm512LwZ",
1840
- "direction": "in",
1841
- "name": "ラック画面 (src/ui/Rack.tsx)",
1842
- "description": "",
1843
- "required": true,
1844
- "artifacts": []
1845
- },
1846
- "F7XehEP0A2": {
1847
- "id": "F7XehEP0A2",
1848
- "blockId": "KSdQlTjUl0",
1849
- "direction": "out",
1850
- "name": "トランスポート (src/ui/Transport.tsx)",
1851
- "description": "",
1852
- "required": true,
1853
- "artifacts": []
1854
- },
1855
- "3OOTepM5Nw": {
1856
- "id": "3OOTepM5Nw",
1857
- "blockId": "KSdQlTjUl0",
1858
- "direction": "in",
1859
- "name": "再生制御 (src/ui/Play.tsx)",
1860
- "description": "",
1861
- "required": true,
1862
- "artifacts": []
1863
- },
1864
- "ctIDOikvgt": {
1865
- "id": "ctIDOikvgt",
1866
- "blockId": "AQKvUX2KGX",
1867
- "direction": "out",
1868
- "name": "編集パネル (src/ui/Inspector.tsx)",
1869
- "description": "",
1870
- "required": true,
1871
- "artifacts": []
1872
- },
1873
- "qZO1r3p8a6": {
1874
- "id": "qZO1r3p8a6",
1875
- "blockId": "AQKvUX2KGX",
1876
- "direction": "in",
1877
- "name": "トランスポート (src/ui/Transport.tsx)",
1878
- "description": "",
1879
- "required": true,
1880
- "artifacts": []
1881
- },
1882
- "y6i8ahMdSP": {
1883
- "id": "y6i8ahMdSP",
1884
- "blockId": "6eXlIjcUu7",
1885
- "direction": "out",
1886
- "name": "プリセット (src/ui/presets/*.json)",
1887
- "description": "",
1888
- "required": true,
1889
- "artifacts": []
1890
- },
1891
- "3PS7it03Jj": {
1892
- "id": "3PS7it03Jj",
1893
- "blockId": "6eXlIjcUu7",
1894
- "direction": "in",
1895
- "name": "編集パネル (src/ui/Inspector.tsx)",
1896
- "description": "",
1897
- "required": true,
1898
- "artifacts": []
1899
- },
1900
- "HQGgswzHUV": {
1901
- "id": "HQGgswzHUV",
1902
- "blockId": "t2xB0FIfXa",
1903
- "direction": "out",
1904
- "name": "画面一式 (src/ui/App.tsx)",
1905
- "description": "",
1906
- "required": true,
1907
- "artifacts": []
1908
- },
1909
- "N-bgqWDS3S": {
1910
- "id": "N-bgqWDS3S",
1911
- "blockId": "t2xB0FIfXa",
1912
- "direction": "in",
1913
- "name": "プリセット (src/ui/presets/*.json)",
1914
- "description": "",
1915
- "required": true,
1916
- "artifacts": []
1917
- },
1918
- "9a9r0a5lOz": {
1919
- "id": "9a9r0a5lOz",
1920
- "blockId": "QyyIDjhzd8",
1921
- "direction": "out",
1922
- "name": "テスト結果 (docs/test-report.md)",
1923
- "description": "",
1924
- "required": true,
1925
- "artifacts": []
1926
- },
1927
- "ASpIe_527b": {
1928
- "id": "ASpIe_527b",
1929
- "blockId": "QyyIDjhzd8",
1930
- "direction": "in",
1931
- "name": "画面一式 (src/ui/App.tsx)",
1932
- "description": "",
1933
- "required": true,
1934
- "artifacts": []
1935
- },
1936
- "Ds32mFN3eV": {
1937
- "id": "Ds32mFN3eV",
1938
- "blockId": "v6bbrx9K93",
1939
- "direction": "out",
1940
- "name": "公開された Logic DAW (URL)",
1941
- "description": "",
1942
- "required": true,
1943
- "artifacts": []
1944
- },
1945
- "xsfNsmYr2j": {
1946
- "id": "xsfNsmYr2j",
1947
- "blockId": "v6bbrx9K93",
1948
- "direction": "in",
1949
- "name": "テスト結果 (docs/test-report.md)",
1950
- "description": "",
1951
- "required": true,
1952
- "artifacts": []
1953
- },
1954
- "5dcKHJ4p-Q": {
1955
- "id": "5dcKHJ4p-Q",
1956
- "blockId": "yGW8Ae72fv",
1957
- "direction": "out",
1958
- "name": "計測結果 (docs/jitter.csv)",
1959
- "description": "",
1960
- "required": true,
1961
- "artifacts": []
1962
- },
1963
- "pwujrlHO3-": {
1964
- "id": "pwujrlHO3-",
1965
- "blockId": "yGW8Ae72fv",
1966
- "direction": "in",
1967
- "name": "画面一式 (src/ui/App.tsx)",
1968
- "description": "",
1969
- "required": true,
1970
- "artifacts": []
1971
- },
1972
- "bG6ndY52zr": {
1973
- "id": "bG6ndY52zr",
1974
- "blockId": "4hlmsTDUeV",
1975
- "direction": "out",
1976
- "name": "確認表 (docs/browsers.md)",
1977
- "description": "",
1978
- "required": true,
1979
- "artifacts": []
1980
- },
1981
- "wI-vtTK_mg": {
1982
- "id": "wI-vtTK_mg",
1983
- "blockId": "4hlmsTDUeV",
1984
- "direction": "in",
1985
- "name": "計測結果 (docs/jitter.csv)",
1986
- "description": "",
1987
- "required": true,
1988
- "artifacts": []
1989
- },
1990
- "Ir89lGty_J": {
1991
- "id": "Ir89lGty_J",
1992
- "blockId": "u9EvSIo2D9",
1993
- "direction": "out",
1994
- "name": "テスト結果 (docs/test-report.md)",
1995
- "description": "",
1996
- "required": true,
1997
- "artifacts": []
1998
- },
1999
- "9s-0cJGQ0R": {
2000
- "id": "9s-0cJGQ0R",
2001
- "blockId": "u9EvSIo2D9",
2002
- "direction": "in",
2003
- "name": "確認表 (docs/browsers.md)",
2004
- "description": "",
2005
- "required": true,
2006
- "artifacts": []
2007
- },
2008
- "Qt4dePcO4S": {
2009
- "id": "Qt4dePcO4S",
2010
- "blockId": "IMFPBAf-pu",
2011
- "direction": "out",
2012
- "name": "配信 URL",
2013
- "description": "",
2014
- "required": true,
2015
- "artifacts": []
2016
- },
2017
- "6qhxjNs28v": {
2018
- "id": "6qhxjNs28v",
2019
- "blockId": "IMFPBAf-pu",
2020
- "direction": "in",
2021
- "name": "テスト結果 (docs/test-report.md)",
2022
- "description": "",
2023
- "required": true,
2024
- "artifacts": []
2025
- },
2026
- "HhjhNogYEM": {
2027
- "id": "HhjhNogYEM",
2028
- "blockId": "I4uQZmQ75f",
2029
- "direction": "out",
2030
- "name": "紹介ページ (README.md)",
2031
- "description": "",
2032
- "required": true,
2033
- "artifacts": []
2034
- },
2035
- "IYbH9CxLvI": {
2036
- "id": "IYbH9CxLvI",
2037
- "blockId": "I4uQZmQ75f",
2038
- "direction": "in",
2039
- "name": "配信 URL",
2040
- "description": "",
2041
- "required": true,
2042
- "artifacts": []
2043
- },
2044
- "YNYryx87fx": {
2045
- "id": "YNYryx87fx",
2046
- "blockId": "3Nr7xa8TFw",
2047
- "direction": "out",
2048
- "name": "公開された Logic DAW (URL)",
2049
- "description": "",
2050
- "required": true,
2051
- "artifacts": []
2052
- },
2053
- "FQNilKoyoK": {
2054
- "id": "FQNilKoyoK",
2055
- "blockId": "3Nr7xa8TFw",
2056
- "direction": "in",
2057
- "name": "紹介ページ (README.md)",
2058
- "description": "",
2059
- "required": true,
2060
- "artifacts": []
2061
- }
2062
- },
2063
- "edges": {
2064
- "wIpfrnT3CO": {
2065
- "id": "wIpfrnT3CO",
2066
- "from": {
2067
- "portId": "fg2eQl3RiW",
2068
- "side": "outer"
2069
- },
2070
- "to": {
2071
- "portId": "UAvNJMXfiB",
2072
- "side": "inner"
2073
- },
2074
- "kind": "up",
2075
- "auto": false
2076
- },
2077
- "kPspvQptM_": {
2078
- "id": "kPspvQptM_",
2079
- "from": {
2080
- "portId": "TA-aOKc8qD",
2081
- "side": "inner"
2082
- },
2083
- "to": {
2084
- "portId": "QJHUXdI5Hm",
2085
- "side": "outer"
2086
- },
2087
- "kind": "down",
2088
- "auto": true
2089
- },
2090
- "XPh0DnERW_": {
2091
- "id": "XPh0DnERW_",
2092
- "from": {
2093
- "portId": "hT--v-Bfi9",
2094
- "side": "inner"
2095
- },
2096
- "to": {
2097
- "portId": "TA-aOKc8qD",
2098
- "side": "outer"
2099
- },
2100
- "kind": "down",
2101
- "auto": true
2102
- },
2103
- "-mPj8p4TwH": {
2104
- "id": "-mPj8p4TwH",
2105
- "from": {
2106
- "portId": "ovok6n6Nq0",
2107
- "side": "inner"
2108
- },
2109
- "to": {
2110
- "portId": "_tT7ETNmmk",
2111
- "side": "outer"
2112
- },
2113
- "kind": "down",
2114
- "auto": true
2115
- },
2116
- "vdcbfiaXgr": {
2117
- "id": "vdcbfiaXgr",
2118
- "from": {
2119
- "portId": "h23ZuuBQVq",
2120
- "side": "inner"
2121
- },
2122
- "to": {
2123
- "portId": "ovok6n6Nq0",
2124
- "side": "outer"
2125
- },
2126
- "kind": "down",
2127
- "auto": true
2128
- },
2129
- "9iSVJFWGPv": {
2130
- "id": "9iSVJFWGPv",
2131
- "from": {
2132
- "portId": "v99e7fqoqJ",
2133
- "side": "inner"
2134
- },
2135
- "to": {
2136
- "portId": "B3vs5ee3X5",
2137
- "side": "outer"
2138
- },
2139
- "kind": "down",
2140
- "auto": true
2141
- },
2142
- "mTeWq_m0xx": {
2143
- "id": "mTeWq_m0xx",
2144
- "from": {
2145
- "portId": "F2EnIfh3_Q",
2146
- "side": "inner"
2147
- },
2148
- "to": {
2149
- "portId": "v99e7fqoqJ",
2150
- "side": "outer"
2151
- },
2152
- "kind": "down",
2153
- "auto": true
2154
- },
2155
- "oM4cczmlIR": {
2156
- "id": "oM4cczmlIR",
2157
- "from": {
2158
- "portId": "QJHUXdI5Hm",
2159
- "side": "inner"
2160
- },
2161
- "to": {
2162
- "portId": "xTc3MB1coA",
2163
- "side": "outer"
2164
- },
2165
- "kind": "down",
2166
- "auto": false
2167
- },
2168
- "rkUiCbvtLC": {
2169
- "id": "rkUiCbvtLC",
2170
- "from": {
2171
- "portId": "4c-A-SRf-2",
2172
- "side": "outer"
2173
- },
2174
- "to": {
2175
- "portId": "kvS3InugGs",
2176
- "side": "outer"
2177
- },
2178
- "kind": "sibling",
2179
- "auto": false
2180
- },
2181
- "XNmygsSNTu": {
2182
- "id": "XNmygsSNTu",
2183
- "from": {
2184
- "portId": "_tT7ETNmmk",
2185
- "side": "inner"
2186
- },
2187
- "to": {
2188
- "portId": "mAvgYpZWOH",
2189
- "side": "outer"
2190
- },
2191
- "kind": "down",
2192
- "auto": false
2193
- },
2194
- "K4KuN57zlh": {
2195
- "id": "K4KuN57zlh",
2196
- "from": {
2197
- "portId": "W8ebXS8Hjc",
2198
- "side": "outer"
2199
- },
2200
- "to": {
2201
- "portId": "fy01mWHoRz",
2202
- "side": "inner"
2203
- },
2204
- "kind": "up",
2205
- "auto": false
2206
- },
2207
- "rplJD2LQUw": {
2208
- "id": "rplJD2LQUw",
2209
- "from": {
2210
- "portId": "xTc3MB1coA",
2211
- "side": "inner"
2212
- },
2213
- "to": {
2214
- "portId": "5uOi3cMDfx",
2215
- "side": "outer"
2216
- },
2217
- "kind": "down",
2218
- "auto": false
2219
- },
2220
- "4dKygJKSVW": {
2221
- "id": "4dKygJKSVW",
2222
- "from": {
2223
- "portId": "22r3SR4SOv",
2224
- "side": "outer"
2225
- },
2226
- "to": {
2227
- "portId": "DGrmfwlx8f",
2228
- "side": "outer"
2229
- },
2230
- "kind": "sibling",
2231
- "auto": false
2232
- },
2233
- "AhwGTPPl3c": {
2234
- "id": "AhwGTPPl3c",
2235
- "from": {
2236
- "portId": "HUP_vV7Vbi",
2237
- "side": "outer"
2238
- },
2239
- "to": {
2240
- "portId": "4T9YYqx8us",
2241
- "side": "outer"
2242
- },
2243
- "kind": "sibling",
2244
- "auto": false
2245
- },
2246
- "h_R7kfV_uw": {
2247
- "id": "h_R7kfV_uw",
2248
- "from": {
2249
- "portId": "tA6p6STOr8",
2250
- "side": "outer"
2251
- },
2252
- "to": {
2253
- "portId": "4c-A-SRf-2",
2254
- "side": "inner"
2255
- },
2256
- "kind": "up",
2257
- "auto": false
2258
- },
2259
- "ckBgugfRuu": {
2260
- "id": "ckBgugfRuu",
2261
- "from": {
2262
- "portId": "kvS3InugGs",
2263
- "side": "inner"
2264
- },
2265
- "to": {
2266
- "portId": "ObLi0Io4S5",
2267
- "side": "outer"
2268
- },
2269
- "kind": "down",
2270
- "auto": false
2271
- },
2272
- "H00Ibky9m3": {
2273
- "id": "H00Ibky9m3",
2274
- "from": {
2275
- "portId": "mAvgYpZWOH",
2276
- "side": "inner"
2277
- },
2278
- "to": {
2279
- "portId": "4EmmVBE157",
2280
- "side": "outer"
2281
- },
2282
- "kind": "down",
2283
- "auto": false
2284
- },
2285
- "-1e9184axM": {
2286
- "id": "-1e9184axM",
2287
- "from": {
2288
- "portId": "zTvSTSq1hq",
2289
- "side": "outer"
2290
- },
2291
- "to": {
2292
- "portId": "tpgAsR93nJ",
2293
- "side": "outer"
2294
- },
2295
- "kind": "sibling",
2296
- "auto": false
2297
- },
2298
- "_zChd1lYTI": {
2299
- "id": "_zChd1lYTI",
2300
- "from": {
2301
- "portId": "ou46CmUSog",
2302
- "side": "outer"
2303
- },
2304
- "to": {
2305
- "portId": "tTNt2AiDvF",
2306
- "side": "outer"
2307
- },
2308
- "kind": "sibling",
2309
- "auto": false
2310
- },
2311
- "ZyuegNfLZU": {
2312
- "id": "ZyuegNfLZU",
2313
- "from": {
2314
- "portId": "BrkAmelKc6",
2315
- "side": "outer"
2316
- },
2317
- "to": {
2318
- "portId": "0Oq9-Om1uQ",
2319
- "side": "outer"
2320
- },
2321
- "kind": "sibling",
2322
- "auto": false
2323
- },
2324
- "15nfaPDhIU": {
2325
- "id": "15nfaPDhIU",
2326
- "from": {
2327
- "portId": "VQQ9-P729l",
2328
- "side": "outer"
2329
- },
2330
- "to": {
2331
- "portId": "W8ebXS8Hjc",
2332
- "side": "inner"
2333
- },
2334
- "kind": "up",
2335
- "auto": false
2336
- },
2337
- "eKYTLQWaYk": {
2338
- "id": "eKYTLQWaYk",
2339
- "from": {
2340
- "portId": "uJpcX-UPx_",
2341
- "side": "inner"
2342
- },
2343
- "to": {
2344
- "portId": "eWofB4yUGk",
2345
- "side": "outer"
2346
- },
2347
- "kind": "down",
2348
- "auto": false
2349
- },
2350
- "Vfv3nveyrC": {
2351
- "id": "Vfv3nveyrC",
2352
- "from": {
2353
- "portId": "Rc5jvXed44",
2354
- "side": "outer"
2355
- },
2356
- "to": {
2357
- "portId": "diIpJHZrdB",
2358
- "side": "outer"
2359
- },
2360
- "kind": "sibling",
2361
- "auto": false
2362
- },
2363
- "cKQZmWSTPD": {
2364
- "id": "cKQZmWSTPD",
2365
- "from": {
2366
- "portId": "PNUwk1z1wg",
2367
- "side": "outer"
2368
- },
2369
- "to": {
2370
- "portId": "8jQGqXsyyK",
2371
- "side": "outer"
2372
- },
2373
- "kind": "sibling",
2374
- "auto": false
2375
- },
2376
- "_fXP6O-Fza": {
2377
- "id": "_fXP6O-Fza",
2378
- "from": {
2379
- "portId": "B3vs5ee3X5",
2380
- "side": "inner"
2381
- },
2382
- "to": {
2383
- "portId": "r6bCJHBXwq",
2384
- "side": "outer"
2385
- },
2386
- "kind": "down",
2387
- "auto": false
2388
- },
2389
- "-0z3FXcuoV": {
2390
- "id": "-0z3FXcuoV",
2391
- "from": {
2392
- "portId": "61jwEgzJkd",
2393
- "side": "outer"
2394
- },
2395
- "to": {
2396
- "portId": "E-RiLBQYrz",
2397
- "side": "outer"
2398
- },
2399
- "kind": "sibling",
2400
- "auto": false
2401
- },
2402
- "kjdCzvhPHA": {
2403
- "id": "kjdCzvhPHA",
2404
- "from": {
2405
- "portId": "x4q5P41c2W",
2406
- "side": "outer"
2407
- },
2408
- "to": {
2409
- "portId": "zZioHWEFMi",
2410
- "side": "inner"
2411
- },
2412
- "kind": "up",
2413
- "auto": false
2414
- },
2415
- "Y5YINJ5ZhX": {
2416
- "id": "Y5YINJ5ZhX",
2417
- "from": {
2418
- "portId": "eWofB4yUGk",
2419
- "side": "inner"
2420
- },
2421
- "to": {
2422
- "portId": "DmlNCBayRq",
2423
- "side": "outer"
2424
- },
2425
- "kind": "down",
2426
- "auto": false
2427
- },
2428
- "YZqEhdtW68": {
2429
- "id": "YZqEhdtW68",
2430
- "from": {
2431
- "portId": "NjZ1r6WIZa",
2432
- "side": "outer"
2433
- },
2434
- "to": {
2435
- "portId": "10bDGnti1O",
2436
- "side": "outer"
2437
- },
2438
- "kind": "sibling",
2439
- "auto": false
2440
- },
2441
- "2EAOaHLR41": {
2442
- "id": "2EAOaHLR41",
2443
- "from": {
2444
- "portId": "eh9eB-8IQC",
2445
- "side": "outer"
2446
- },
2447
- "to": {
2448
- "portId": "LuoGxmETA6",
2449
- "side": "outer"
2450
- },
2451
- "kind": "sibling",
2452
- "auto": false
2453
- },
2454
- "Ef65DHxRrZ": {
2455
- "id": "Ef65DHxRrZ",
2456
- "from": {
2457
- "portId": "HaRprcCBb2",
2458
- "side": "outer"
2459
- },
2460
- "to": {
2461
- "portId": "Rc5jvXed44",
2462
- "side": "inner"
2463
- },
2464
- "kind": "up",
2465
- "auto": false
2466
- },
2467
- "_f2VWcLIcz": {
2468
- "id": "_f2VWcLIcz",
2469
- "from": {
2470
- "portId": "diIpJHZrdB",
2471
- "side": "inner"
2472
- },
2473
- "to": {
2474
- "portId": "WIc_zMUPk8",
2475
- "side": "outer"
2476
- },
2477
- "kind": "down",
2478
- "auto": false
2479
- },
2480
- "puDqUpfUGK": {
2481
- "id": "puDqUpfUGK",
2482
- "from": {
2483
- "portId": "UOUnrNqA4O",
2484
- "side": "outer"
2485
- },
2486
- "to": {
2487
- "portId": "lVwsQiNOat",
2488
- "side": "outer"
2489
- },
2490
- "kind": "sibling",
2491
- "auto": false
2492
- },
2493
- "9TQXHPaWkx": {
2494
- "id": "9TQXHPaWkx",
2495
- "from": {
2496
- "portId": "7rdWMFN1Qx",
2497
- "side": "outer"
2498
- },
2499
- "to": {
2500
- "portId": "fvRe5iIwzH",
2501
- "side": "outer"
2502
- },
2503
- "kind": "sibling",
2504
- "auto": false
2505
- },
2506
- "ImE6PoBfU7": {
2507
- "id": "ImE6PoBfU7",
2508
- "from": {
2509
- "portId": "2ABl9uQU_K",
2510
- "side": "outer"
2511
- },
2512
- "to": {
2513
- "portId": "7alskTKs5m",
2514
- "side": "outer"
2515
- },
2516
- "kind": "sibling",
2517
- "auto": false
2518
- },
2519
- "R1fI4Mu1fd": {
2520
- "id": "R1fI4Mu1fd",
2521
- "from": {
2522
- "portId": "qgZc6zvdSq",
2523
- "side": "outer"
2524
- },
2525
- "to": {
2526
- "portId": "PNUwk1z1wg",
2527
- "side": "inner"
2528
- },
2529
- "kind": "up",
2530
- "auto": false
2531
- },
2532
- "FtvCnnD0M8": {
2533
- "id": "FtvCnnD0M8",
2534
- "from": {
2535
- "portId": "8jQGqXsyyK",
2536
- "side": "inner"
2537
- },
2538
- "to": {
2539
- "portId": "Wh8MtlNFbF",
2540
- "side": "outer"
2541
- },
2542
- "kind": "down",
2543
- "auto": false
2544
- },
2545
- "aVov7F5UO6": {
2546
- "id": "aVov7F5UO6",
2547
- "from": {
2548
- "portId": "r6bCJHBXwq",
2549
- "side": "inner"
2550
- },
2551
- "to": {
2552
- "portId": "rZHl7JKTav",
2553
- "side": "outer"
2554
- },
2555
- "kind": "down",
2556
- "auto": false
2557
- },
2558
- "9wjbnVipre": {
2559
- "id": "9wjbnVipre",
2560
- "from": {
2561
- "portId": "wTK-zFXIl-",
2562
- "side": "outer"
2563
- },
2564
- "to": {
2565
- "portId": "A6aFCCF3Zr",
2566
- "side": "outer"
2567
- },
2568
- "kind": "sibling",
2569
- "auto": false
2570
- },
2571
- "tivYKjzB-d": {
2572
- "id": "tivYKjzB-d",
2573
- "from": {
2574
- "portId": "MBtOwLhUMn",
2575
- "side": "outer"
2576
- },
2577
- "to": {
2578
- "portId": "qBdXhEaDrC",
2579
- "side": "outer"
2580
- },
2581
- "kind": "sibling",
2582
- "auto": false
2583
- },
2584
- "YSpYWmuj-v": {
2585
- "id": "YSpYWmuj-v",
2586
- "from": {
2587
- "portId": "L80wr7lTxz",
2588
- "side": "outer"
2589
- },
2590
- "to": {
2591
- "portId": "61jwEgzJkd",
2592
- "side": "inner"
2593
- },
2594
- "kind": "up",
2595
- "auto": false
2596
- },
2597
- "SU7t9cQuQT": {
2598
- "id": "SU7t9cQuQT",
2599
- "from": {
2600
- "portId": "E-RiLBQYrz",
2601
- "side": "inner"
2602
- },
2603
- "to": {
2604
- "portId": "Y8U78Ai1EL",
2605
- "side": "outer"
2606
- },
2607
- "kind": "down",
2608
- "auto": false
2609
- },
2610
- "ZwvAqfSEUg": {
2611
- "id": "ZwvAqfSEUg",
2612
- "from": {
2613
- "portId": "QJ6WG9q_4D",
2614
- "side": "outer"
2615
- },
2616
- "to": {
2617
- "portId": "2apx-GP8jT",
2618
- "side": "outer"
2619
- },
2620
- "kind": "sibling",
2621
- "auto": false
2622
- },
2623
- "pOsCqXUQqu": {
2624
- "id": "pOsCqXUQqu",
2625
- "from": {
2626
- "portId": "G6Azpcaj5d",
2627
- "side": "outer"
2628
- },
2629
- "to": {
2630
- "portId": "x4q5P41c2W",
2631
- "side": "inner"
2632
- },
2633
- "kind": "up",
2634
- "auto": false
2635
- },
2636
- "F1DnRMpxci": {
2637
- "id": "F1DnRMpxci",
2638
- "from": {
2639
- "portId": "ejZYaEiQ6L",
2640
- "side": "inner"
2641
- },
2642
- "to": {
2643
- "portId": "pT_7vIsYOF",
2644
- "side": "outer"
2645
- },
2646
- "kind": "down",
2647
- "auto": false
2648
- },
2649
- "Y75n9D669P": {
2650
- "id": "Y75n9D669P",
2651
- "from": {
2652
- "portId": "rqWJ55QcxB",
2653
- "side": "outer"
2654
- },
2655
- "to": {
2656
- "portId": "Jyc6hva2px",
2657
- "side": "outer"
2658
- },
2659
- "kind": "sibling",
2660
- "auto": false
2661
- },
2662
- "v8xwhJy9A0": {
2663
- "id": "v8xwhJy9A0",
2664
- "from": {
2665
- "portId": "9FWTdTieUE",
2666
- "side": "outer"
2667
- },
2668
- "to": {
2669
- "portId": "aYYETNLKZW",
2670
- "side": "outer"
2671
- },
2672
- "kind": "sibling",
2673
- "auto": false
2674
- },
2675
- "SrO-Rg1cIJ": {
2676
- "id": "SrO-Rg1cIJ",
2677
- "from": {
2678
- "portId": "jT4DeSMVmu",
2679
- "side": "outer"
2680
- },
2681
- "to": {
2682
- "portId": "eGI-VIk1Ei",
2683
- "side": "inner"
2684
- },
2685
- "kind": "up",
2686
- "auto": false
2687
- },
2688
- "aDwrtYmw7k": {
2689
- "id": "aDwrtYmw7k",
2690
- "from": {
2691
- "portId": "pT_7vIsYOF",
2692
- "side": "inner"
2693
- },
2694
- "to": {
2695
- "portId": "a7AhfqxBPh",
2696
- "side": "outer"
2697
- },
2698
- "kind": "down",
2699
- "auto": false
2700
- },
2701
- "uGaHApTOvI": {
2702
- "id": "uGaHApTOvI",
2703
- "from": {
2704
- "portId": "YVLDUdLYvp",
2705
- "side": "outer"
2706
- },
2707
- "to": {
2708
- "portId": "XxH1wFwKWK",
2709
- "side": "outer"
2710
- },
2711
- "kind": "sibling",
2712
- "auto": false
2713
- },
2714
- "GfXj9UesCc": {
2715
- "id": "GfXj9UesCc",
2716
- "from": {
2717
- "portId": "sqElXXu_Ar",
2718
- "side": "outer"
2719
- },
2720
- "to": {
2721
- "portId": "tFnHc2q3tj",
2722
- "side": "outer"
2723
- },
2724
- "kind": "sibling",
2725
- "auto": false
2726
- },
2727
- "0XR7r9EobB": {
2728
- "id": "0XR7r9EobB",
2729
- "from": {
2730
- "portId": "OtMpwABByO",
2731
- "side": "outer"
2732
- },
2733
- "to": {
2734
- "portId": "rqWJ55QcxB",
2735
- "side": "inner"
2736
- },
2737
- "kind": "up",
2738
- "auto": false
2739
- },
2740
- "kn-2damUCM": {
2741
- "id": "kn-2damUCM",
2742
- "from": {
2743
- "portId": "Jyc6hva2px",
2744
- "side": "inner"
2745
- },
2746
- "to": {
2747
- "portId": "CZJeTP5jR4",
2748
- "side": "outer"
2749
- },
2750
- "kind": "down",
2751
- "auto": false
2752
- },
2753
- "UHDvpwRB1K": {
2754
- "id": "UHDvpwRB1K",
2755
- "from": {
2756
- "portId": "TXXwYnq2J2",
2757
- "side": "outer"
2758
- },
2759
- "to": {
2760
- "portId": "3OOTepM5Nw",
2761
- "side": "outer"
2762
- },
2763
- "kind": "sibling",
2764
- "auto": false
2765
- },
2766
- "CzUcnxNVZH": {
2767
- "id": "CzUcnxNVZH",
2768
- "from": {
2769
- "portId": "F7XehEP0A2",
2770
- "side": "outer"
2771
- },
2772
- "to": {
2773
- "portId": "9FWTdTieUE",
2774
- "side": "inner"
2775
- },
2776
- "kind": "up",
2777
- "auto": false
2778
- },
2779
- "RpG4Puz7rQ": {
2780
- "id": "RpG4Puz7rQ",
2781
- "from": {
2782
- "portId": "aYYETNLKZW",
2783
- "side": "inner"
2784
- },
2785
- "to": {
2786
- "portId": "qZO1r3p8a6",
2787
- "side": "outer"
2788
- },
2789
- "kind": "down",
2790
- "auto": false
2791
- },
2792
- "QQ7rot2QCv": {
2793
- "id": "QQ7rot2QCv",
2794
- "from": {
2795
- "portId": "ctIDOikvgt",
2796
- "side": "outer"
2797
- },
2798
- "to": {
2799
- "portId": "3PS7it03Jj",
2800
- "side": "outer"
2801
- },
2802
- "kind": "sibling",
2803
- "auto": false
2804
- },
2805
- "rwOKi-C3Ko": {
2806
- "id": "rwOKi-C3Ko",
2807
- "from": {
2808
- "portId": "y6i8ahMdSP",
2809
- "side": "outer"
2810
- },
2811
- "to": {
2812
- "portId": "N-bgqWDS3S",
2813
- "side": "outer"
2814
- },
2815
- "kind": "sibling",
2816
- "auto": false
2817
- },
2818
- "TtZE5pGdLn": {
2819
- "id": "TtZE5pGdLn",
2820
- "from": {
2821
- "portId": "HQGgswzHUV",
2822
- "side": "outer"
2823
- },
2824
- "to": {
2825
- "portId": "jT4DeSMVmu",
2826
- "side": "inner"
2827
- },
2828
- "kind": "up",
2829
- "auto": false
2830
- },
2831
- "MpLYfxaYvg": {
2832
- "id": "MpLYfxaYvg",
2833
- "from": {
2834
- "portId": "LfxvKcMQhc",
2835
- "side": "inner"
2836
- },
2837
- "to": {
2838
- "portId": "ASpIe_527b",
2839
- "side": "outer"
2840
- },
2841
- "kind": "down",
2842
- "auto": false
2843
- },
2844
- "IDaxtGvvEs": {
2845
- "id": "IDaxtGvvEs",
2846
- "from": {
2847
- "portId": "9a9r0a5lOz",
2848
- "side": "outer"
2849
- },
2850
- "to": {
2851
- "portId": "xsfNsmYr2j",
2852
- "side": "outer"
2853
- },
2854
- "kind": "sibling",
2855
- "auto": false
2856
- },
2857
- "LcrUHRUz-t": {
2858
- "id": "LcrUHRUz-t",
2859
- "from": {
2860
- "portId": "Ds32mFN3eV",
2861
- "side": "outer"
2862
- },
2863
- "to": {
2864
- "portId": "8Jt2-0LipW",
2865
- "side": "inner"
2866
- },
2867
- "kind": "up",
2868
- "auto": false
2869
- },
2870
- "OGj1R12eqA": {
2871
- "id": "OGj1R12eqA",
2872
- "from": {
2873
- "portId": "ASpIe_527b",
2874
- "side": "inner"
2875
- },
2876
- "to": {
2877
- "portId": "pwujrlHO3-",
2878
- "side": "outer"
2879
- },
2880
- "kind": "down",
2881
- "auto": false
2882
- },
2883
- "cbNrDJZcy4": {
2884
- "id": "cbNrDJZcy4",
2885
- "from": {
2886
- "portId": "5dcKHJ4p-Q",
2887
- "side": "outer"
2888
- },
2889
- "to": {
2890
- "portId": "wI-vtTK_mg",
2891
- "side": "outer"
2892
- },
2893
- "kind": "sibling",
2894
- "auto": false
2895
- },
2896
- "e71B27cCGg": {
2897
- "id": "e71B27cCGg",
2898
- "from": {
2899
- "portId": "bG6ndY52zr",
2900
- "side": "outer"
2901
- },
2902
- "to": {
2903
- "portId": "9s-0cJGQ0R",
2904
- "side": "outer"
2905
- },
2906
- "kind": "sibling",
2907
- "auto": false
2908
- },
2909
- "yZ2SgB9eq_": {
2910
- "id": "yZ2SgB9eq_",
2911
- "from": {
2912
- "portId": "Ir89lGty_J",
2913
- "side": "outer"
2914
- },
2915
- "to": {
2916
- "portId": "9a9r0a5lOz",
2917
- "side": "inner"
2918
- },
2919
- "kind": "up",
2920
- "auto": false
2921
- },
2922
- "FtvRoMTtGp": {
2923
- "id": "FtvRoMTtGp",
2924
- "from": {
2925
- "portId": "xsfNsmYr2j",
2926
- "side": "inner"
2927
- },
2928
- "to": {
2929
- "portId": "6qhxjNs28v",
2930
- "side": "outer"
2931
- },
2932
- "kind": "down",
2933
- "auto": false
2934
- },
2935
- "JUB_sZoU18": {
2936
- "id": "JUB_sZoU18",
2937
- "from": {
2938
- "portId": "Qt4dePcO4S",
2939
- "side": "outer"
2940
- },
2941
- "to": {
2942
- "portId": "IYbH9CxLvI",
2943
- "side": "outer"
2944
- },
2945
- "kind": "sibling",
2946
- "auto": false
2947
- },
2948
- "ckhappDTA8": {
2949
- "id": "ckhappDTA8",
2950
- "from": {
2951
- "portId": "HhjhNogYEM",
2952
- "side": "outer"
2953
- },
2954
- "to": {
2955
- "portId": "FQNilKoyoK",
2956
- "side": "outer"
2957
- },
2958
- "kind": "sibling",
2959
- "auto": false
2960
- },
2961
- "1Wte57suDD": {
2962
- "id": "1Wte57suDD",
2963
- "from": {
2964
- "portId": "YNYryx87fx",
2965
- "side": "outer"
2966
- },
2967
- "to": {
2968
- "portId": "Ds32mFN3eV",
2969
- "side": "inner"
2970
- },
2971
- "kind": "up",
2972
- "auto": false
2973
- },
2974
- "rgGGxy_AQE": {
2975
- "id": "rgGGxy_AQE",
2976
- "from": {
2977
- "portId": "fy01mWHoRz",
2978
- "side": "outer"
2979
- },
2980
- "to": {
2981
- "portId": "uJpcX-UPx_",
2982
- "side": "outer"
2983
- },
2984
- "kind": "sibling",
2985
- "auto": false
2986
- },
2987
- "MgCLLcQKGo": {
2988
- "id": "MgCLLcQKGo",
2989
- "from": {
2990
- "portId": "zZioHWEFMi",
2991
- "side": "outer"
2992
- },
2993
- "to": {
2994
- "portId": "ejZYaEiQ6L",
2995
- "side": "outer"
2996
- },
2997
- "kind": "sibling",
2998
- "auto": false
2999
- },
3000
- "peqigBMKQp": {
3001
- "id": "peqigBMKQp",
3002
- "from": {
3003
- "portId": "eGI-VIk1Ei",
3004
- "side": "outer"
3005
- },
3006
- "to": {
3007
- "portId": "LfxvKcMQhc",
3008
- "side": "outer"
3009
- },
3010
- "kind": "sibling",
3011
- "auto": false
3012
- },
3013
- "rO_C-cad-D": {
3014
- "id": "rO_C-cad-D",
3015
- "from": {
3016
- "portId": "8Jt2-0LipW",
3017
- "side": "outer"
3018
- },
3019
- "to": {
3020
- "portId": "fg2eQl3RiW",
3021
- "side": "inner"
3022
- },
3023
- "kind": "up",
3024
- "auto": false
3025
- }
3026
- },
3027
- "terminals": {
3028
- "in": {
3029
- "x": 0,
3030
- "y": 139
3031
- },
3032
- "out": {
3033
- "x": 2725.6999999999994,
3034
- "y": 165
3035
- }
3036
- },
3037
- "log": [
3038
- {
3039
- "id": "-jeCySEanY",
3040
- "at": "2026-10-02T21:23:03.585Z",
3041
- "actor": "claude-code",
3042
- "kind": "added",
3043
- "blockId": "xJhwet2eK4",
3044
- "message": "「企画と設計」を追加"
3045
- },
3046
- {
3047
- "id": "cV0vLqp5XP",
3048
- "at": "2026-10-02T21:23:03.617Z",
3049
- "actor": "claude-code",
3050
- "kind": "added",
3051
- "blockId": "FiH1BjJOTX",
3052
- "message": "「サウンドエンジン」を追加"
3053
- },
3054
- {
3055
- "id": "M1xQQbWOdN",
3056
- "at": "2026-10-02T21:23:03.650Z",
3057
- "actor": "claude-code",
3058
- "kind": "added",
3059
- "blockId": "uZ_7SUgizp",
3060
- "message": "「画面」を追加"
3061
- },
3062
- {
3063
- "id": "ctEhMFaKQm",
3064
- "at": "2026-10-02T21:23:03.681Z",
3065
- "actor": "claude-code",
3066
- "kind": "added",
3067
- "blockId": "CVcGYJiFyf",
3068
- "message": "「品質と公開」を追加"
3069
- },
3070
- {
3071
- "id": "XFgphkcHeK",
3072
- "at": "2026-10-02T21:23:03.718Z",
3073
- "actor": "claude-code",
3074
- "kind": "split",
3075
- "blockId": "xJhwet2eK4",
3076
- "message": "「企画と設計」を 2 個に分解: 要件をまとめる, コアを設計する"
3077
- },
3078
- {
3079
- "id": "BpcAXKJip4",
3080
- "at": "2026-10-02T21:23:03.754Z",
3081
- "actor": "claude-code",
3082
- "kind": "split",
3083
- "blockId": "9WPT6_CRiu",
3084
- "message": "「要件をまとめる」を 3 個に分解: 遊び方の絵を描く, 性能目標を決める, 用語と画面の骨子を書く"
3085
- },
3086
- {
3087
- "id": "CuQ_GinyeK",
3088
- "at": "2026-10-02T21:23:03.801Z",
3089
- "actor": "claude-code",
3090
- "kind": "split",
3091
- "blockId": "DIRmqMXT2l",
3092
- "message": "「コアを設計する」を 4 個に分解: タイミングモデルを決める, ブロックの仕様を書く, 音源とミキサを設計する, パッチ形式を決める"
3093
- },
3094
- {
3095
- "id": "3SF1nwWsU2",
3096
- "at": "2026-10-02T21:23:03.842Z",
3097
- "actor": "claude-code",
3098
- "kind": "split",
3099
- "blockId": "FiH1BjJOTX",
3100
- "message": "「サウンドエンジン」を 4 個に分解: クロックとスケジューラ, 論理ブロック, 音源とミキサ, パッチの保存と読み込み"
3101
- },
3102
- {
3103
- "id": "ng1G_iTDZn",
3104
- "at": "2026-10-02T21:23:03.887Z",
3105
- "actor": "claude-code",
3106
- "kind": "split",
3107
- "blockId": "rSAsjzr_gM",
3108
- "message": "「クロックとスケジューラ」を 3 個に分解: Ref クロックを作る, 分周器とカウンタを作る, lookahead で予約する"
3109
- },
3110
- {
3111
- "id": "CZNU4YCX6W",
3112
- "at": "2026-10-02T21:23:03.937Z",
3113
- "actor": "claude-code",
3114
- "kind": "split",
3115
- "blockId": "5nvO49jnqp",
3116
- "message": "「論理ブロック」を 4 個に分解: ブロックの型を定義する, ゲートを実装する, エッジ検出とゲート信号を実装する, 評価器を実装する"
3117
- },
3118
- {
3119
- "id": "lAsDPkhOxi",
3120
- "at": "2026-10-02T21:23:03.985Z",
3121
- "actor": "claude-code",
3122
- "kind": "split",
3123
- "blockId": "nTEnZA2lre",
3124
- "message": "「音源とミキサ」を 3 個に分解: オシレータ音源を作る, サンプル再生を作る, ミキサとエフェクトを作る"
3125
- },
3126
- {
3127
- "id": "NnYSoqi2Fy",
3128
- "at": "2026-10-02T21:23:04.027Z",
3129
- "actor": "claude-code",
3130
- "kind": "split",
3131
- "blockId": "oWJCfRAhRe",
3132
- "message": "「パッチの保存と読み込み」を 2 個に分解: パッチ形式を実装する, 読み書きを実装する"
3133
- },
3134
- {
3135
- "id": "Dqm7QsD1iU",
3136
- "at": "2026-10-02T21:23:04.072Z",
3137
- "actor": "claude-code",
3138
- "kind": "split",
3139
- "blockId": "uZ_7SUgizp",
3140
- "message": "「画面」を 3 個に分解: ラック (配置と結線), トランスポート, パラメータ編集とプリセット"
3141
- },
3142
- {
3143
- "id": "Cp9Z4rNsbZ",
3144
- "at": "2026-10-02T21:23:04.125Z",
3145
- "actor": "claude-code",
3146
- "kind": "split",
3147
- "blockId": "PmWXgxcTz1",
3148
- "message": "「ラック (配置と結線)」を 3 個に分解: ブロックを描く, ドラッグで結線する, ラックに並べる"
3149
- },
3150
- {
3151
- "id": "SK-o7G4wFP",
3152
- "at": "2026-10-02T21:23:04.179Z",
3153
- "actor": "claude-code",
3154
- "kind": "split",
3155
- "blockId": "WpHHR1WTSj",
3156
- "message": "「トランスポート」を 2 個に分解: 再生と停止を作る, クロック表示を作る"
3157
- },
3158
- {
3159
- "id": "3oLfkE8FAm",
3160
- "at": "2026-10-02T21:23:04.238Z",
3161
- "actor": "claude-code",
3162
- "kind": "split",
3163
- "blockId": "WBeew96LXK",
3164
- "message": "「パラメータ編集とプリセット」を 3 個に分解: 編集パネルを作る, プリセットを 3 つ作る, 画面を組み上げる"
3165
- },
3166
- {
3167
- "id": "vYV-tHiF7q",
3168
- "at": "2026-10-02T21:23:04.297Z",
3169
- "actor": "claude-code",
3170
- "kind": "split",
3171
- "blockId": "CVcGYJiFyf",
3172
- "message": "「品質と公開」を 2 個に分解: 検証, 公開"
3173
- },
3174
- {
3175
- "id": "vUVE88QBhT",
3176
- "at": "2026-10-02T21:23:04.360Z",
3177
- "actor": "claude-code",
3178
- "kind": "split",
3179
- "blockId": "QyyIDjhzd8",
3180
- "message": "「検証」を 3 個に分解: ジッタを計測する, ブラウザ差を確認する, 試遊して直す"
3181
- },
3182
- {
3183
- "id": "fILtpI2LoC",
3184
- "at": "2026-10-02T21:23:04.425Z",
3185
- "actor": "claude-code",
3186
- "kind": "split",
3187
- "blockId": "v6bbrx9K93",
3188
- "message": "「公開」を 3 個に分解: ビルドして配信する, 紹介ページを書く, 公開して告知する"
3189
- },
3190
- {
3191
- "id": "D-FxzrfWIs",
3192
- "at": "2026-10-02T21:23:04.675Z",
3193
- "actor": "claude-code",
3194
- "kind": "done",
3195
- "blockId": "9h2eE_cSiA",
3196
- "message": "「遊び方の絵を描く」完了 (遊び方の絵)"
3197
- },
3198
- {
3199
- "id": "8gx7-BXdOR",
3200
- "at": "2026-10-02T21:23:04.722Z",
3201
- "actor": "claude-code",
3202
- "kind": "done",
3203
- "blockId": "dQFr5sVxfL",
3204
- "message": "「性能目標を決める」完了 (性能目標)"
3205
- },
3206
- {
3207
- "id": "gMGb1o8hBZ",
3208
- "at": "2026-10-02T21:23:04.767Z",
3209
- "actor": "claude-code",
3210
- "kind": "done",
3211
- "blockId": "6sEOLrrbpE",
3212
- "message": "「用語と画面の骨子を書く」完了 (要件)"
3213
- },
3214
- {
3215
- "id": "kmDkOOSGlg",
3216
- "at": "2026-10-02T21:23:04.814Z",
3217
- "actor": "claude-code",
3218
- "kind": "done",
3219
- "blockId": "LQ-3HVFrbh",
3220
- "message": "「タイミングモデルを決める」完了 (タイミングモデル)"
3221
- },
3222
- {
3223
- "id": "GEkLvUwBE2",
3224
- "at": "2026-10-02T21:23:04.859Z",
3225
- "actor": "claude-code",
3226
- "kind": "done",
3227
- "blockId": "2B7PJf8hxm",
3228
- "message": "「ブロックの仕様を書く」完了 (ブロック仕様)"
3229
- },
3230
- {
3231
- "id": "-uyZJjDBJE",
3232
- "at": "2026-10-02T21:23:04.907Z",
3233
- "actor": "claude-code",
3234
- "kind": "done",
3235
- "blockId": "E4vV7YM9M0",
3236
- "message": "「音源とミキサを設計する」完了 (音源の章)"
3237
- },
3238
- {
3239
- "id": "KoMqs7u8B9",
3240
- "at": "2026-10-02T21:23:04.955Z",
3241
- "actor": "claude-code",
3242
- "kind": "done",
3243
- "blockId": "yWRDC8wwD6",
3244
- "message": "「パッチ形式を決める」完了 (設計書)"
3245
- },
3246
- {
3247
- "id": "nPwQKYaUB3",
3248
- "at": "2026-10-02T21:23:05.003Z",
3249
- "actor": "claude-code",
3250
- "kind": "done",
3251
- "blockId": "TKoBbn5oqq",
3252
- "message": "「Ref クロックを作る」完了 (クロック)"
3253
- },
3254
- {
3255
- "id": "wfDGxtCd3e",
3256
- "at": "2026-10-02T21:23:05.049Z",
3257
- "actor": "claude-code",
3258
- "kind": "done",
3259
- "blockId": "oe3g3G7YMT",
3260
- "message": "「分周器とカウンタを作る」完了 (分周器)"
3261
- },
3262
- {
3263
- "id": "Lf9w9cwPt0",
3264
- "at": "2026-10-02T21:23:05.096Z",
3265
- "actor": "claude-code",
3266
- "kind": "done",
3267
- "blockId": "Xe-TZBGtRd",
3268
- "message": "「lookahead で予約する」完了 (スケジューラ)"
3269
- },
3270
- {
3271
- "id": "2X4c12YfZr",
3272
- "at": "2026-10-02T21:23:05.141Z",
3273
- "actor": "claude-code",
3274
- "kind": "done",
3275
- "blockId": "bt03QZOzRy",
3276
- "message": "「ブロックの型を定義する」完了 (型定義)"
3277
- },
3278
- {
3279
- "id": "nXAIEMcojW",
3280
- "at": "2026-10-02T21:23:05.191Z",
3281
- "actor": "claude-code",
3282
- "kind": "done",
3283
- "blockId": "O1WPIQ7rSm",
3284
- "message": "「ゲートを実装する」完了 (ゲート)"
3285
- },
3286
- {
3287
- "id": "D4P_9CXgiw",
3288
- "at": "2026-10-02T21:23:05.234Z",
3289
- "actor": "claude-code",
3290
- "kind": "done",
3291
- "blockId": "9WPT6_CRiu",
3292
- "message": "「要件をまとめる」完了 (要件)"
3293
- },
3294
- {
3295
- "id": "PUeat61S65",
3296
- "at": "2026-10-02T21:23:05.282Z",
3297
- "actor": "claude-code",
3298
- "kind": "done",
3299
- "blockId": "DIRmqMXT2l",
3300
- "message": "「コアを設計する」完了 (設計書)"
3301
- },
3302
- {
3303
- "id": "zNw4AubD3h",
3304
- "at": "2026-10-02T21:23:05.328Z",
3305
- "actor": "claude-code",
3306
- "kind": "done",
3307
- "blockId": "xJhwet2eK4",
3308
- "message": "「企画と設計」完了 (設計書)"
3309
- },
3310
- {
3311
- "id": "Tbisw3uNEu",
3312
- "at": "2026-10-02T21:23:05.377Z",
3313
- "actor": "claude-code",
3314
- "kind": "done",
3315
- "blockId": "rSAsjzr_gM",
3316
- "message": "「クロックとスケジューラ」完了 (スケジューラ)"
3317
- },
3318
- {
3319
- "id": "T5yA8VjylJ",
3320
- "at": "2026-10-02T21:23:05.422Z",
3321
- "actor": "claude-code",
3322
- "kind": "asked",
3323
- "blockId": "LQ-3HVFrbh",
3324
- "message": "「タイミングモデルを決める」で判断待ち: クロックの基準はどちらにしますか?"
3325
- },
3326
- {
3327
- "id": "_Ua1ljPOL2",
3328
- "at": "2026-10-02T21:23:05.466Z",
3329
- "actor": "human",
3330
- "kind": "answered",
3331
- "blockId": "LQ-3HVFrbh",
3332
- "message": "「タイミングモデルを決める」の判断: クロックの基準はどちらにしますか? → 固定 Hz の Ref クロックを N 分周する (BPM は分周比で表す)"
3333
- },
3334
- {
3335
- "id": "xITgPxlPjU",
3336
- "at": "2026-10-02T21:23:05.517Z",
3337
- "actor": "claude-code",
3338
- "kind": "started",
3339
- "blockId": "BL-IQJddOL",
3340
- "message": "「エッジ検出とゲート信号を実装する」開始: 立ち上がり検出の状態の持ち方を実装中"
3341
- },
3342
- {
3343
- "id": "l5EwaWuvlA",
3344
- "at": "2026-10-02T21:23:05.561Z",
3345
- "actor": "claude-code",
3346
- "kind": "asked",
3347
- "blockId": "_CMF_NQtrT",
3348
- "message": "「サンプル再生を作る」で判断待ち: ドラムのサンプル音源は最初から同梱しますか?"
3349
- },
3350
- {
3351
- "id": "bpNtiJeHlB",
3352
- "at": "2026-10-02T21:23:05.607Z",
3353
- "actor": "claude-code",
3354
- "kind": "note",
3355
- "blockId": "FiH1BjJOTX",
3356
- "message": "「サウンドエンジン」期日 2026-11-10, 見積 60h"
3357
- },
3358
- {
3359
- "id": "8_W0MSV5cG",
3360
- "at": "2026-10-02T21:23:05.651Z",
3361
- "actor": "claude-code",
3362
- "kind": "note",
3363
- "blockId": "uZ_7SUgizp",
3364
- "message": "「画面」期日 2026-11-30, 見積 40h"
3365
- },
3366
- {
3367
- "id": "pbnrBBPDFy",
3368
- "at": "2026-10-02T21:23:05.695Z",
3369
- "actor": "claude-code",
3370
- "kind": "note",
3371
- "blockId": "CVcGYJiFyf",
3372
- "message": "「品質と公開」期日 2026-12-15"
3373
- },
3374
- {
3375
- "id": "Kwlx9WjEqb",
3376
- "at": "2026-10-02T21:23:05.740Z",
3377
- "actor": "claude-code",
3378
- "kind": "note",
3379
- "blockId": "5nvO49jnqp",
3380
- "message": "「論理ブロック」の進捗 50%"
3381
- }
3382
- ],
3383
- "agents": {
3384
- "claude-code": {
3385
- "lastSeen": "2026-10-02T21:23:05.740Z"
3386
- },
3387
- "human": {
3388
- "lastSeen": "2026-10-02T21:23:05.466Z"
3389
- }
3390
- },
3391
- "nextKey": 50,
3392
- "inputGroups": []
3393
- }
3394
- `,Pm=`boxglow:index`,Fm=e=>`boxglow:project:${e}`;async function Im(){return[...await Sm(Pm)??[]].sort((e,t)=>e.updatedAt<t.updatedAt?1:-1)}async function Lm(e){return Sm(Fm(e))}async function Rm(e){await Cm(Fm(e.id),e);let t=await Sm(Pm)??[];await Cm(Pm,[{id:e.id,name:e.name,updatedAt:new Date().toISOString()},...t.filter(t=>t.id!==e.id)])}async function zm(e){await wm(Fm(e)),await Cm(Pm,(await Sm(Pm)??[]).filter(t=>t.id!==e))}var Bm=400,Vm={blockId:null,edgeId:null,terminal:null,terminalGroup:null,project:!1,timeline:!1},Hm=null;function Um(e){try{let t=localStorage.getItem(`boxglow:me:${e.id}`);return t&&e.members.some(e=>e.id===t)?t:null}catch{return null}}function Wm(e){try{let t=localStorage.getItem(`boxglow:scope:${e.id}`);return t&&e.blocks[t]?t:null}catch{return null}}function Gm(e){return!1}var Km=null,qm=0,Jm=null,Ym=``,Xm=null,Zm=e=>new URL(e,document.baseURI).toString();async function Qm(e){Ym=e;let t=await fetch(Zm(`api/project`),{method:`PUT`,headers:{"content-type":`application/json`},body:e});if(!t.ok)throw Error(`サーバに書けません (${t.status})`)}var $m=1500,$=_m((e,t)=>{let n=()=>{let{project:n,ephemeral:r,readonly:i}=t();!n||r||i||(e({saveState:`unsaved`}),Hm&&clearTimeout(Hm),Hm=setTimeout(async()=>{let n=t().project;if(n){e({saveState:`saving`});try{if(t().source===`serve`)await Qm(dp(n)+`
3395
- `),e({saveState:`saved`});else if(t().source===`file`&&Km){if(!await km(Km,`readwrite`)){e({saveState:`unsaved`,toast:`ファイルへの書き込みが許可されていません (Save を押すともう一度確認します)`});return}qm=await jm(Km,dp(n)+`
3396
- `),e({saveState:`saved`})}else await Rm(n),e({saveState:`saved`}),t().refreshList()}catch(t){e({saveState:`unsaved`,toast:`保存に失敗しました: ${String(t)}`})}}},Bm))},r=()=>{Jm&&clearInterval(Jm),Jm=null,Km=null,Xm&&Xm.close(),Xm=null},i=e=>{let t=new URL(window.location.href);t.hash=e?`p=${e}`:``,history.replaceState(null,``,t.toString())};return{project:null,ephemeral:!1,source:`idb`,fileName:null,readonly:!1,viewScope:null,setViewScope:n=>{let{project:r,selection:i}=t();if(!r)return;let a=n&&r.blocks[n]?n:null;try{a?localStorage.setItem(`boxglow:scope:${r.id}`,a):localStorage.removeItem(`boxglow:scope:${r.id}`)}catch{}e({viewScope:a,selection:a&&!Tf(r,a,i.blockId)?{...i,blockId:null,edgeId:null}:i})},saveNow:()=>{let{project:r,ephemeral:i,readonly:a}=t();!r||i||a||(Hm&&clearTimeout(Hm),Hm=null,n(),Hm&&=(clearTimeout(Hm),null),(async()=>{e({saveState:`saving`});try{if(t().source===`serve`)await Qm(dp(t().project)+`
3397
- `);else if(t().source===`file`&&Km){if(!await km(Km,`readwrite`)){e({saveState:`unsaved`,toast:`ファイルへの書き込みが許可されていません`});return}qm=await jm(Km,dp(t().project)+`
3398
- `)}else await Rm(t().project),t().refreshList();e({saveState:`saved`})}catch(t){e({saveState:`unsaved`,toast:`保存に失敗しました: ${t instanceof Error?t.message:String(t)}`})}})())},toggleCollapsed:e=>{let{project:n}=t();n&&n.blocks[e]&&(Object.values(n.blocks).some(t=>t.parentId===e)||wf(n,e)===e)&&t().setViewScope(e)},embed:!1,projects:[],selection:Vm,past:[],future:[],toast:null,meId:null,editMode:!1,setEditMode:t=>e({editMode:t}),setMe:n=>{let r=t().project;if(r)try{n?localStorage.setItem(`boxglow:me:${r.id}`,n):localStorage.removeItem(`boxglow:me:${r.id}`)}catch{}e({meId:n})},focus:null,focusBlock:(n,r)=>{let{project:i,viewScope:a}=t();if(r?.scope!==!1&&i&&i.blocks[n]){let e=Df(i,n);e!==a&&t().setViewScope(e)}e({focus:{blockId:n,nonce:Date.now()}})},saveState:`none`,apply:(r,i)=>{let{project:a,past:o,readonly:s}=t();if(!a||s)return;let c=r(a);if(c===a)return;c=Ef(c),i?.history!==!1&&(c=Qp(c,im));let l=i?.history??!0;e({project:c,past:l?[...o.slice(-99),a]:o,future:l?[]:t().future}),n()},undo:()=>{let{project:r,past:i,future:a}=t();if(!r||i.length===0)return;let o=i[i.length-1];e({project:o,past:i.slice(0,-1),future:[r,...a]}),n()},redo:()=>{let{project:r,past:i,future:a}=t();if(!r||a.length===0)return;let[o,...s]=a;e({project:o,past:[...i,r],future:s}),n()},select:t=>e({selection:{...Vm,...t}}),setToast:t=>e({toast:t}),refreshList:async()=>e({projects:await Im()}),newProject:async e=>{let n=yf(e||`無題のプロジェクト`);await Rm(n),t().openProjectObject(n,!1),t().setEditMode(!0),await t().refreshList()},openProject:async e=>{let n=await Lm(e);return n?(t().openProjectObject(n,!1),!0):!1},openProjectObject:(t,n)=>{r(),e({project:t,ephemeral:n,source:`idb`,fileName:null,past:[],future:[],selection:Vm,viewScope:Wm(t),saveState:n?`none`:`saved`,meId:Um(t),editMode:Gm(t)}),i(n?null:t.id)},openLocalFile:async n=>{if(!await km(n,`read`))return e({toast:`ファイルの読み書きが許可されませんでした`}),!1;let a;try{let e=await Am(n);a=e.text,qm=e.lastModified}catch(t){return e({toast:`ファイルを読めません: ${String(t)}`}),!1}let o;try{o=fp(a)}catch(t){return e({toast:t instanceof Error?t.message:String(t)}),!1}return r(),Km=n,e({project:o,ephemeral:!1,source:`file`,fileName:n.name,past:[],future:[],selection:Vm,viewScope:Wm(o),saveState:`saved`,meId:Um(o),editMode:Gm(o)}),i(null),Jm=setInterval(async()=>{if(Km)try{let n=await Km.getFile();if(n.lastModified===qm||Hm)return;qm=n.lastModified;let r=fp(await n.text()),i=t().project,a=t().selection,o=a.blockId&&r.blocks[a.blockId]?a:a.blockId?Vm:a;e({project:r,past:i?[...t().past.slice(-99),i]:t().past,future:[],selection:o,saveState:`saved`})}catch{}},$m),!0},openFromServer:async()=>{let n,a=`boxglow.json`;try{let e=await fetch(Zm(`api/project`),{cache:`no-store`});if(!e.ok)throw Error(`HTTP ${e.status}`);n=await e.text(),a=decodeURIComponent(e.headers.get(`x-boxglow-file`)??a)}catch(t){return e({toast:`サーバから読めません (npx boxglow serve が動いていますか): ${String(t)}`}),!1}let o;try{o=fp(n)}catch(t){return e({toast:t instanceof Error?t.message:String(t)}),!1}r(),Ym=n,e({project:o,ephemeral:!1,source:`serve`,fileName:a,past:[],future:[],selection:Vm,viewScope:Wm(o),saveState:`saved`,meId:Um(o),editMode:Gm(o)}),i(null);let s=async()=>{if(Hm){setTimeout(s,700);return}try{let n=await(await fetch(Zm(`api/project`),{cache:`no-store`})).text();if(n===Ym)return;Ym=n;let r=fp(n),i=t().project,a=t().selection,o=a.blockId&&r.blocks[a.blockId]?a:a.blockId?Vm:a;e({project:r,past:i?[...t().past.slice(-99),i]:t().past,future:[],selection:o,saveState:`saved`})}catch{}};return Xm=new EventSource(Zm(`api/events`)),Xm.addEventListener(`change`,()=>{s()}),!0},importJSON:async n=>{let r=fp(n);await Rm(r),t().openProjectObject(r,!1),await t().refreshList(),e({toast:`「${r.name}」を読み込みました`})},openSample:()=>{t().openProjectObject(Mm(),!0)},openExample:()=>{t().openProjectObject(fp(Nm),!0)},copyToMine:async()=>{let{project:n}=t();if(!n)return;let r=structuredClone(n);r.id=crypto.randomUUID().slice(0,10),r.name=`${r.name} (複製)`,await Rm(r),t().openProjectObject(r,!1),await t().refreshList(),e({toast:`自分のプロジェクトとして保存しました`})},deleteProject:async e=>{await zm(e),t().project?.id===e&&t().closeProject(),await t().refreshList()},closeProject:()=>{r(),e({project:null,past:[],future:[],selection:Vm,viewScope:null,saveState:`none`,ephemeral:!1,source:`idb`,fileName:null}),i(null)},setMode:t=>e({...t})}});function eh(e,t,n=null){return t.blockId&&e.blocks[t.blockId]?t.blockId:n&&e.blocks[n]?n:Sf(e)}function th(){let e=$(e=>e.project),t=$(e=>e.viewScope);return(0,y.useMemo)(()=>{if(!e)return null;let n=Ef(e);return t&&n.blocks[t]?.collapsed?{...n,blocks:{...n.blocks,[t]:{...n.blocks[t],collapsed:!1}}}:n},[e,t])}function nh(e){let t=Wp(e,null).length;return 44+Math.max(t,1)*26+12}var rh=e=>44+e*26+13,ih=(e,t,n)=>`${e}:${t}:${n}`;function ah(e){if(!e)return null;let t=e.split(`:`);if(t.length!==3)return null;let n=t[2];return n!==`outer`&&n!==`inner`?null:{portId:t[1],side:n}}function oh(e,t){let n=e.ports[t];return n?n.blockId===`root`?n.direction===`in`?n.groupId?`root-in:${n.groupId}`:`root-in`:`root-out`:n.blockId:null}function sh(e,t){let n=Wp(e,t).length;return 44+Math.max(n,1)*26+12}function ch(e,t,n){let r=e.ports[t.from.portId]?.blockId,i=e.ports[t.to.portId]?.blockId,a=t=>{let r=t;for(;r;){if(r===n)return!0;r=e.blocks[r]?.parentId}return!1};return a(r)||a(i)}function lh(e,t){let n=0,r=e.blocks[t]?.parentId??null;for(;r!==null&&r!==`root`;)n++,r=e.blocks[r]?.parentId??null;return n}var uh=`scope-in`,dh=`scope-out`,fh=144,ph=40;function mh(e,t,n){let r=n;for(;r!==null;){if(r===t)return!0;r=e.blocks[r]?.parentId??null}return!1}function hh(e,t,n){let r=e.blocks[t]?.parentId??null;for(;r!==null&&r!==`root`;){let t=e.blocks[r];if(!t)break;if(t.collapsed)return!0;if(r===n)break;r=t.parentId}return!1}function gh(e,t){let n=0,r=0,i=t;for(;i!==null&&i!==`root`;){let t=e.blocks[i];if(!t)break;n+=t.position.x,r+=t.position.y,i=t.parentId}return{x:n,y:r}}function _h(e,t){let n=[],r=t.scope&&e.blocks[t.scope]?t.scope:null;if(r){let i=im(e,r),a=gh(e,r),o=e.blocks[r];n.push({id:r,type:`block`,position:a,data:{blockId:r,dimmed:!1,mine:!!t.meId&&o.assigneeIds.includes(t.meId),headerH:i.headerH,major:!1},width:i.width,height:i.height,selected:t.selectedBlockId===r,draggable:!1,selectable:!0,zIndex:0});let s=Z(e,r,`in`).length,c=Z(e,r,`out`).length;n.push({id:uh,type:`terminal`,position:{x:a.x-fh-200,y:a.y+ph},data:{which:`in`,scopeId:r},width:200,height:44+Math.max(s,1)*26+12,draggable:!1,selectable:!0,zIndex:2}),n.push({id:dh,type:`terminal`,position:{x:a.x+i.width+fh,y:a.y+ph},data:{which:`out`,scopeId:r},width:200,height:44+Math.max(c,1)*26+12,draggable:!1,selectable:!0,zIndex:2});let l=Object.values(e.blocks).filter(t=>t.id!==`root`&&t.id!==r&&mh(e,r,t.id));l.sort((t,n)=>lh(e,t.id)-lh(e,n.id));for(let i of l){let a=im(e,i.id);n.push({id:i.id,type:`block`,position:i.position,parentId:i.parentId,data:{blockId:i.id,dimmed:t.matcher?!t.matcher(i.id):!1,mine:!!t.meId&&i.assigneeIds.includes(t.meId),headerH:a.headerH},width:a.width,height:a.height,hidden:hh(e,i.id,r),selected:t.selectedBlockId===i.id,draggable:!t.readonly,selectable:!0,zIndex:2*lh(e,i.id)})}return n}n.push({id:`root-in`,type:`terminal`,position:e.terminals.in,data:{which:`in`},width:200,height:nh(e),draggable:!t.readonly,selectable:!0,zIndex:2});for(let r of Up(e))n.push({id:`root-in:${r.id}`,type:`terminal`,position:r.position,data:{which:`in`,groupId:r.id},width:200,height:sh(e,r.id),draggable:!t.readonly,selectable:!0,zIndex:2});n.push({id:`root-out`,type:`terminal`,position:e.terminals.out,data:{which:`out`},width:200,height:am(e,`out`),draggable:!t.readonly,selectable:!0,zIndex:2});let i=Object.values(e.blocks).filter(e=>e.id!==J);i.sort((t,n)=>lh(e,t.id)-lh(e,n.id));let a=new Set(Cf(e).map(e=>e.id));for(let r of i){let i=im(e,r.id),o=r.parentId!==null&&r.parentId!==`root`;n.push({id:r.id,type:`block`,position:r.position,parentId:o?r.parentId:void 0,data:{blockId:r.id,dimmed:t.matcher?!t.matcher(r.id):!1,mine:!!t.meId&&r.assigneeIds.includes(t.meId),headerH:i.headerH,major:a.has(r.id)},width:i.width,height:i.height,hidden:Rf(e,r.id),selected:t.selectedBlockId===r.id,draggable:!t.readonly,selectable:!0,zIndex:2*lh(e,r.id)})}return n}function vh(e,t){let n=[],r=t.scope&&e.blocks[t.scope]?t.scope:null,i=t.selectedEdgeId?em(e,t.selectedEdgeId):new Set;for(let a of Object.values(e.edges)){let o=e.ports[a.from.portId],s=e.ports[a.to.portId];if(!o||!s)continue;let c=oh(e,o.id),l=oh(e,s.id);if(!c||!l)continue;let u=t=>{let n=e.ports[t.portId];return n?r?n.blockId===`root`||!mh(e,r,n.blockId)?!1:n.blockId===r?t.side===`inner`:!(hh(e,n.blockId,r)||t.side===`inner`&&!rm(e,n.blockId)):n.blockId===`root`||!(Rf(e,n.blockId)||t.side===`inner`&&!rm(e,n.blockId)):!1},d=!u(a.from)||!u(a.to),f=sp(e,a);n.push({id:a.id,type:`routed`,source:c,sourceHandle:ih(o.direction,o.id,a.from.side),target:l,targetHandle:ih(s.direction,s.id,a.to.side),hidden:d,selected:t.selectedEdgeId===a.id,data:{net:i.has(a.id)&&t.selectedEdgeId!==a.id,arrow:s.direction===`in`},className:[a.auto?`edge-auto`:``,f?`edge-ready`:``,t.selectedBlockId?ch(e,a,t.selectedBlockId)?`edge-hot`:`edge-dim`:t.selectedEdgeId?i.has(a.id)?`edge-net`:`edge-dim`:``].filter(Boolean).join(` `)||void 0,label:t.selectedEdgeId===a.id||t.selectedBlockId&&ch(e,a,t.selectedBlockId)?o.direction===`out`?o.name:s.name:void 0,labelShowBg:!0,labelBgPadding:[6,3],labelBgBorderRadius:6,labelStyle:{fontSize:11,fill:`var(--text)`},labelBgStyle:{fill:`var(--bg-card)`,stroke:`var(--line-soft)`,strokeWidth:1},zIndex:1})}if(r){let i=e=>t.selectedBlockId&&t.selectedBlockId!==r?{...e,className:`${e.className??``} edge-dim`.trim()}:e;for(let t of Z(e,r,`in`)){let a=Object.values(e.edges).filter(e=>e.to.portId===t.id&&e.to.side===`outer`),o=t.artifacts.length>0||a.some(t=>sp(e,t));n.push(i({id:`scope-in:${t.id}`,type:`routed`,data:{arrow:!0},source:uh,sourceHandle:ih(`in`,t.id,`inner`),target:r,targetHandle:ih(`in`,t.id,`outer`),selectable:!1,className:o?`edge-ready`:void 0,zIndex:1}))}for(let t of Z(e,r,`out`)){let a=t.artifacts.length>0||e.blocks[r].status===`white`;n.push(i({id:`scope-out:${t.id}`,type:`routed`,source:r,sourceHandle:ih(`out`,t.id,`outer`),target:dh,targetHandle:ih(`out`,t.id,`inner`),selectable:!1,className:a?`edge-ready`:void 0,zIndex:1}))}}return n}function yh(e){let t=e.toLowerCase();return t.startsWith(`claude`)?`CC`:t.startsWith(`codex`)?`CX`:t.startsWith(`gemini`)?`GM`:t.startsWith(`copilot`)?`CP`:t.startsWith(`human:`)?e.slice(6,7).toUpperCase()||`H`:e.slice(0,2).toUpperCase()}function bh(e){let t=e.toLowerCase();return t.startsWith(`claude`)?`Claude Code`:t.startsWith(`codex`)?`Codex`:t.startsWith(`gemini`)?`Gemini`:t.startsWith(`copilot`)?`Copilot`:t.startsWith(`human:`)?e.slice(6)||`人`:t===`human`?`人`:e}var xh={working:`作業中`,blocked:`詰まり`,needs_decision:`判断待ち`,waiting_review:`確認待ち`};function Sh(e,t=Date.now()){let n=Math.max(0,(t-new Date(e).getTime())/1e3);return n<60?`今`:n<3600?`${Math.floor(n/60)} 分`:n<86400?`${Math.floor(n/3600)} 時間`:`${Math.floor(n/86400)} 日`}function Ch(e){let t=Sh(e);return t===`今`?`たった今`:`${t}前から`}function wh(e){let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}`}var Th={black:`New`,gray:`In Progress`,white:`Done`},Eh={black:`New: 出力 (何を作るか) は決めたが、まだ手を付けていない (BlackBox)`,gray:`In Progress: 分解中、または作業中 (GrayBox)`,white:`Done: 出力に成果物が付いて完了 (WhiteBox)`};function Dh({status:e}){let t=Th[e];return e===`white`?(0,x.jsxs)(`svg`,{className:`status-icon done`,width:`18`,height:`18`,viewBox:`0 0 18 18`,"aria-label":t,children:[(0,x.jsx)(`circle`,{cx:`9`,cy:`9`,r:`8`}),(0,x.jsx)(`path`,{d:`M5 9.5l2.6 2.6L13 6.8`,fill:`none`,stroke:`#fbfbfb`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`})]}):e===`gray`?(0,x.jsxs)(`svg`,{className:`status-icon progress`,width:`18`,height:`18`,viewBox:`0 0 18 18`,"aria-label":t,children:[(0,x.jsx)(`circle`,{cx:`9`,cy:`9`,r:`7`,fill:`none`,strokeWidth:`2`}),(0,x.jsx)(`path`,{d:`M9 2a7 7 0 0 0 0 14z`})]}):(0,x.jsx)(`svg`,{className:`status-icon new`,width:`18`,height:`18`,viewBox:`0 0 18 18`,"aria-label":t,children:(0,x.jsx)(`circle`,{cx:`9`,cy:`9`,r:`7`,fill:`none`,strokeWidth:`2`,strokeDasharray:`3 2.5`})})}var Oh=(0,y.memo)(function({data:e,selected:t,width:n,height:r}){let{blockId:i}=e,a=e.headerH??44,o=e=>a+e*26+13,s=$(e=>e.readonly),c=th(),l=(0,y.useMemo)(()=>{let e=c,t=e.blocks[i],n=Z(e,i,`in`),r=Z(e,i,`out`),a=jf(e,i).length,o=ip(e,i);return{title:t?.title??``,status:t?.status??`black`,collapsed:t?.collapsed??!1,expanded:rm(e,i),kids:a,progressRatio:o.ratio,progressText:`${o.white}/${o.total}`,ins:n.map(t=>({id:t.id,name:t.name,required:t.required,promoted:!!t.promotedFrom,ready:cp(e,t.id)})),outs:r.map(e=>({id:e.id,name:e.name})),activity:t?.activity??null,percent:rp(e,i),isProject:t?.kind===`project`,fromTemplate:t?.template?.name??null,category:uf(t?.category)??null,startable:!!t&&t.status===`black`&&t.kind!==`project`&&n.length>0&&lp(e,i).length===0,issue:t?.issue?{url:t.issue,key:$p(t.issue)}:null,depth:Math.min(4,Math.max(1,Nf(e,i).length)),key:t?.key??``,dueDate:t?.dueDate??null,overdue:t?jp(t):!1,daysLeft:t?Mp(t):null}},[c,i]),u=(0,y.useRef)(l.status),[d,f]=(0,y.useState)(!1);(0,y.useEffect)(()=>{if(u.current!==`white`&&l.status===`white`){f(!0);let e=setTimeout(()=>f(!1),1300);return()=>clearTimeout(e)}u.current=l.status},[l.status]);let p=$(e=>e.toggleCollapsed),m=e=>{e.stopPropagation(),p(i)},h=t=>{t.stopPropagation(),(l.kids>0||e.major)&&p(i)},g=[`bg-block`,`status-${l.status}`,`depth-${l.depth}`,l.expanded?`expanded`:``,t?`selected`:``,e.dimmed?`dimmed`:``,d?`just-glowed`:``,l.activity?`activity-${l.activity.state}`:``,l.isProject?`kind-project`:``,e.mine?`mine`:``,e.dropTarget?`drop-target`:``,l.category?`has-cat`:``].filter(Boolean).join(` `);return(0,x.jsxs)(`div`,{className:g,style:{width:n,height:r,...l.category?{"--cat":l.category.color}:{}},onDoubleClick:h,children:[(0,x.jsxs)(`div`,{className:`bg-block__head`,style:{height:a-24},children:[l.category&&(0,x.jsx)(`span`,{className:`bg-block__cat${l.category.neutral?` neutral`:``}`,title:`カテゴリ: ${l.category.label}`,children:l.category.label}),l.isProject&&(0,x.jsx)(`span`,{className:`bg-block__tag`,children:`Project`}),!l.isProject&&(0,x.jsx)(Dh,{status:l.status}),(0,x.jsx)(`span`,{className:`bg-block__title`,title:l.fromTemplate?`${l.title} (部品: ${l.fromTemplate})`:l.title,children:l.title}),(l.kids>0||e.major)&&(0,x.jsx)(`button`,{className:`bg-block__toggle nodrag`,onClick:m,title:e.major?`この大項目のタブを開く (中の箱 ${l.kids} 個)`:`中の箱を見る (${l.kids} 個)`,children:`▸`})]}),(0,x.jsxs)(`div`,{className:`bg-block__meta`,children:[!l.isProject&&(0,x.jsx)(`span`,{className:`meta-chip status-${l.status}`,title:`状態`,children:Th[l.status]}),l.status!==`white`&&l.percent>0&&(0,x.jsxs)(`span`,{className:`meta-chip`,title:l.kids>0?`下の階層の完了 ${l.progressText}`:`進捗`,children:[l.percent,`%`]}),l.activity&&(0,x.jsxs)(`span`,{className:`meta-chip activity ${l.activity.state}`,title:`${l.activity.actor}: ${xh[l.activity.state]} ${l.activity.note}`,children:[xh[l.activity.state],` (`,bh(l.activity.actor),`)`]}),l.dueDate&&l.status!==`white`&&(0,x.jsxs)(`span`,{className:`meta-chip ${l.overdue?`overdue`:``}`,title:`期日 ${l.dueDate}${l.daysLeft===null?``:l.daysLeft<0?` (${-l.daysLeft} 日超過)`:` (あと ${l.daysLeft} 日)`}`,children:[`期日 `,l.dueDate.slice(5).replace(`-`,`/`)]}),l.startable&&(0,x.jsx)(`span`,{className:`meta-chip ready`,title:`必須の入力がそろっています (着手できます)`,children:`Ready`}),l.issue&&(0,x.jsx)(`a`,{className:`meta-chip issue nodrag`,href:l.issue.url,target:`_blank`,rel:`noreferrer`,title:`外部の課題: ${l.issue.url}`,onClick:e=>e.stopPropagation(),children:l.issue.key}),l.fromTemplate&&(0,x.jsx)(`span`,{className:`meta-chip muted`,title:`部品: ${l.fromTemplate}`,children:`部品`}),(0,x.jsx)(`span`,{className:`bg-block__key`,title:`ID (検索や CLI で使えます)`,children:l.key})]}),!l.expanded&&(0,x.jsxs)(`div`,{className:`bg-block__ports`,children:[(0,x.jsx)(`div`,{children:l.ins.map(e=>(0,x.jsxs)(`div`,{className:`bg-block__port in ${e.required?``:`optional`} ${e.promoted?`promoted`:``} ${e.ready?`ready`:``}`,title:e.ready?`${e.name} (用意できています)`:e.required?e.name:`${e.name} (任意: 無くても着手できます)`,children:[e.ready?`● `:``,e.name,!e.required&&(0,x.jsx)(`span`,{className:`opt`,children:`(任意)`})]},e.id))}),(0,x.jsx)(`div`,{children:l.outs.map(e=>(0,x.jsx)(`div`,{className:`bg-block__port out`,title:e.name,children:e.name},e.id))})]}),l.status!==`white`&&(l.kids>0||l.percent>0)&&(0,x.jsx)(`div`,{className:`bg-block__progress`,title:l.kids>0?`下の階層の完了 ${l.progressText} (${l.percent}%)`:`進捗 ${l.percent}%`,children:(0,x.jsx)(`span`,{style:{width:`${l.percent}%`}})}),l.ins.map((e,t)=>(0,x.jsx)(ql,{type:`target`,position:B.Left,id:ih(`in`,e.id,`outer`),className:e.promoted?`port-promoted`:``,style:{top:o(t)},isConnectable:!s},`${e.id}-outer`)),l.expanded&&l.ins.map((e,t)=>(0,x.jsx)(ql,{type:`source`,position:B.Right,id:ih(`in`,e.id,`inner`),className:`port-inner`,title:`${e.name} を中のブロックへ (ここから中の箱の入力へドラッグ)`,style:{top:o(t),zIndex:2,left:-7,right:`auto`,transform:`translate(-50%, -50%)`},isConnectable:!s},`${e.id}-inner`)),l.outs.map((e,t)=>(0,x.jsx)(ql,{type:`source`,position:B.Right,id:ih(`out`,e.id,`outer`),className:`port-out`,style:{top:o(t),zIndex:1},isConnectable:!s},`${e.id}-outer`)),l.expanded&&l.outs.map((e,t)=>(0,x.jsx)(ql,{type:`target`,position:B.Left,id:ih(`out`,e.id,`inner`),className:`port-inner`,title:`中のブロックの出力を ${e.name} へ`,style:{top:o(t),zIndex:0,right:-7,left:`auto`,transform:`translate(50%, -50%)`},isConnectable:!s},`${e.id}-inner`))]})}),kh=(0,y.memo)(function({data:e,selected:t,height:n}){let r=e.which,i=e.groupId??null,a=e.scopeId??null,o=$(e=>e.readonly),s=$(e=>e.project),c=(0,y.useMemo)(()=>(a?Z(s,a,r):r===`in`?Wp(s,i):Z(s,J,`out`)).map(e=>({id:e.id,name:e.name,promoted:!!e.promotedFrom,hasArtifact:e.artifacts.length>0})),[s,r,i,a]),l=i?Up(s).find(e=>e.id===i)?.name??``:null;return(0,x.jsxs)(`div`,{className:`bg-terminal ${t?`selected`:``}`,style:{height:n},children:[(0,x.jsx)(`div`,{className:`bg-terminal__head`,children:(0,x.jsx)(`span`,{className:`truncate`,title:l??void 0,children:r===`in`?l??`Inputs`:`Outputs`})}),c.length===0&&(0,x.jsx)(`div`,{className:`bg-terminal__empty`,children:r===`in`?a?`No inputs`:i?`空のグループ (右のパネルで入力を入れる)`:`供給元のない入力がここに上がります`:`No outputs`}),c.map(e=>(0,x.jsxs)(`div`,{className:`bg-terminal__row ${e.promoted?`promoted`:``}`,title:e.promoted?`下の階層の未接続の入力 (自動)`:e.name,children:[e.hasArtifact?`● `:``,e.name]},e.id)),c.map((e,t)=>(0,x.jsx)(ql,{type:r===`in`?`source`:`target`,position:r===`in`?B.Right:B.Left,id:ih(r,e.id,`inner`),className:`${r===`in`?`port-out`:``} ${e.promoted?`port-promoted`:``}`,style:{top:rh(t)},isConnectable:!o},e.id))]})}),Ah=36,jh=e=>e.wall?12:Ah,Mh=40,Nh=1e5,Ph=40,Fh=1500,Ih=8,Lh=600;function Rh(e,t,n,r){let i=Math.abs(e.y-t.y)<.5;if(i===Math.abs(n.y-r.y)<.5)return!1;let[a,o,s,c]=i?[e,t,n,r]:[n,r,e,t],l=Math.min(a.x,o.x),u=Math.max(a.x,o.x),d=Math.min(s.y,c.y),f=Math.max(s.y,c.y);return s.x>l+1&&s.x<u-1&&a.y>d+1&&a.y<f-1}function zh(e,t){let n=0;for(let r=1;r<e.length;r++)for(let i of t)for(let t=1;t<i.length;t++)Rh(e[r-1],e[r],i[t-1],i[t])&&n++;return n}function Bh(e,t,n){let r=jh(n);return Hh(e,t,{x:n.x-r+1,y:n.y-r+1,width:n.width+2*r-2,height:n.height+2*r-2})}function Vh(e){let t=1e3;return[{x:e.x-t,y:e.y-t,width:t,height:e.height+2*t,wall:`left`},{x:e.x+e.width,y:e.y-t,width:t,height:e.height+2*t,wall:`right`},{x:e.x-t,y:e.y-t,width:e.width+2*t,height:1076,wall:`top`},{x:e.x-t,y:e.y+e.height,width:e.width+2*t,height:t,wall:`bottom`}]}function Hh(e,t,n){let r=Math.min(e.x,t.x),i=Math.max(e.x,t.x),a=Math.min(e.y,t.y),o=Math.max(e.y,t.y),s=n.x+1,c=n.y+1,l=n.x+n.width-1,u=n.y+n.height-1;return i>=s&&r<=l&&o>=c&&a<=u}function Uh(e,t,n=[],r=[]){let i=0,a=0,o=0;for(let s=1;s<e.length;s++){let c=e[s-1],l=e[s];i+=Math.abs(l.x-c.x)+Math.abs(l.y-c.y);for(let e of t)Hh(c,l,e)?a++:Bh(c,l,e)&&o++;if(s>1&&s<e.length-1)for(let e of[...n,...r])Hh(c,l,e)?a++:Bh(c,l,e)&&o++;else for(let e of n)Hh(c,l,{x:e.x+Ih,y:e.y+Ih,width:e.width-16,height:e.height-16})&&a++}return i+a*Nh+o*Fh+(e.length-2)*Ph}function Wh(e){let t=[];for(let n of e){let e=t[t.length-1];e&&e.x===n.x&&e.y===n.y||t.push(n)}for(let e=1;e<t.length-1;){let n=t[e-1],r=t[e],i=t[e+1];n.x===r.x&&r.x===i.x||n.y===r.y&&r.y===i.y?t.splice(e,1):e++}return t}function Gh(e,t,n){if(t<e)return[];let r=n.filter(([n,r])=>r>=e&&n<=t).sort((e,t)=>e[0]-t[0]),i=[],a=e;for(let[e,t]of r)e>a&&i.push((a+e)/2,a,e),a=Math.max(a,t);return a<t&&i.push((a+t)/2,a,t),i.length===0&&i.push((e+t)/2),i}function Kh(e,t,n,r=0,i=[],a=null,o=[]){let s=t.x-e.x,c=s>0?Math.max(4,Math.min(Mh,s/2-2)):Mh,l=e.x+c+r,u=t.x-c-r;s>0&&l>u&&(l=(e.x+t.x)/2,u=l);let d=[],f=n.map(e=>[e.x-Ah,e.x+e.width+Ah]),p=(e,t)=>n.filter(n=>n.x+n.width+Ah>=Math.min(e,t)&&n.x-Ah<=Math.max(e,t)).map(e=>[e.y-Ah,e.y+e.height+Ah]);if(l<=u)for(let n of[l,u,(l+u)/2,...Gh(l,u,f)]){let i=Math.max(l,Math.min(u,n+r));d.push([e,{x:i,y:e.y},{x:i,y:t.y},t])}let m=l,h=u,g=Math.min(m,h),_=Math.max(m,h),v=[...p(g,_),...i.filter(e=>e.x+e.width+Ah>=g&&e.x-Ah<=_).map(e=>[e.y-Ah,e.y+e.height+Ah])],y=[...n,...i].flatMap(e=>[e.y-Ah,e.y+e.height+Ah]),b=Math.min(e.y,t.y,...y)-40,x=Math.max(e.y,t.y,...y)+40;a&&(b=Math.max(b,a.y+76+12),x=Math.min(x,a.y+a.height-12),x<b&&(x=b));let S=[...Gh(b,x,v),b,x],C=l<=u?[...new Set([l,u,...Gh(l,u,f)])].filter(e=>e>=l&&e<=u):[m];for(let n of S)for(let r of C)d.push([e,{x:r,y:e.y},{x:r,y:n},{x:h,y:n},{x:h,y:t.y},t]),d.push([e,{x:m,y:e.y},{x:m,y:n},{x:r,y:n},{x:r,y:t.y},t]);if(l>u){let r=[...n,...i],a=Math.max(l,...r.map(e=>e.x+e.width+Ah))+40,o=Math.min(u,...r.map(e=>e.x-Ah))-40,s=(e,t,n)=>[...new Set(e)].sort((e,n)=>Math.abs(e-t)-Math.abs(n-t)).slice(0,n),c=s([l,...Gh(l,a,f).filter(e=>e>=l)],l,8),p=s([u,...Gh(o,u,f).filter(e=>e<=u)],u,8);for(let n of S)for(let r of c)for(let i of p)d.push([e,{x:r,y:e.y},{x:r,y:n},{x:i,y:n},{x:i,y:t.y},t])}let w=a?Vh(a):[],T=d[0],E=1/0;for(let e of d){let t=Wh(e),r=Uh(t,n,i,w);if(o.length>0&&(r+=zh(t,o)*Lh),a)for(let e=1;e<t.length;e++){let n=t[e-1],i=t[e],o=e=>e.x>=a.x-1&&e.x<=a.x+a.width+1&&e.y>=a.y-1&&e.y<=a.y+a.height+1;(!o(n)||!o(i))&&(r+=Nh)}r<E&&(E=r,T=t)}return Wh(T)}function qh(e,t=10){if(e.length===0)return``;if(e.length===1)return`M ${e[0].x} ${e[0].y}`;let n=`M ${e[0].x} ${e[0].y}`;for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1],s=Math.min(t,Math.abs(a.x-i.x)/2+Math.abs(a.y-i.y)/2,Math.abs(o.x-a.x)/2+Math.abs(o.y-a.y)/2),c=a.x-Math.sign(a.x-i.x)*s,l=a.y-Math.sign(a.y-i.y)*s,u=a.x+Math.sign(o.x-a.x)*s,d=a.y+Math.sign(o.y-a.y)*s;n+=` L ${c} ${l} Q ${a.x} ${a.y} ${u} ${d}`}let r=e[e.length-1];return n+=` L ${r.x} ${r.y}`,n}var Jh=(0,y.memo)(function(e){let{id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,markerEnd:o,style:s,label:c,labelStyle:l,labelBgStyle:u,selected:d,data:f}=e,p=!!f?.hot,m=!!f?.net,h=!!f?.arrow,g=f?.path??[{x:n,y:r},{x:i,y:a}],_=qh(g),v=qh((e=>{if(e.length<2)return e;let t=(e,t,n)=>{let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1,o=Math.min(n,a*.6)/a;return{x:e.x+r*o,y:e.y+i*o}},n=t(e[0],e[1],14),r=t(e[e.length-1],e[e.length-2],14);return[n,...e.slice(1,-1),r]})(g)),y={len:-1,x:(n+i)/2,y:(r+a)/2};for(let e=1;e<g.length;e++){let t=g[e-1],n=g[e];if(Math.abs(t.y-n.y)<.5){let e=Math.abs(n.x-t.x);e>y.len&&(y={len:e,x:(t.x+n.x)/2,y:t.y})}}let b={x:y.x,y:y.y-14},S=``;if(h&&g.length>=2){let e=g[g.length-1],t=g[g.length-2],n=e.x-t.x,r=e.y-t.y,i=Math.hypot(n,r)||1,a=n/i,o=r/i,s=e.x-a*12,c=e.y-o*12;S=`M ${e.x} ${e.y} L ${s-o*5} ${c+a*5} L ${s+o*5} ${c-a*5} Z`}return(0,x.jsxs)(x.Fragment,{children:[(d||p||m)&&(0,x.jsx)(`path`,{d:_,className:`react-flow__edge-halo`}),(0,x.jsx)(Eu,{id:t,path:_,markerEnd:o,style:s,interactionWidth:0}),S&&(0,x.jsx)(`path`,{d:S,className:`react-flow__edge-arrow`}),(0,x.jsx)(`path`,{d:v,fill:`none`,stroke:`transparent`,strokeWidth:14,className:`react-flow__edge-interaction`}),c&&(0,x.jsx)(wd,{children:(0,x.jsx)(`div`,{className:`nodrag nopan`,style:{position:`absolute`,transform:`translate(-50%, -50%) translate(${b.x}px, ${b.y}px)`,fontSize:11,padding:`2px 6px`,borderRadius:6,background:u?.fill??`var(--bg-card)`,border:`1px solid var(--line-soft)`,color:l?.fill??`var(--text)`,pointerEvents:`none`,opacity:1,zIndex:1e3,whiteSpace:`nowrap`,boxShadow:`0 1px 2px rgba(0,0,0,0.15)`},children:c})})]})}),Yh=16,Xh=16;function Zh(e,t){let n=new Map(e.map(e=>[e.id,e])),r=new Map,i=new Map,a=new Map,o=new Map;for(let r of t){let t=n.get(r.source),s=n.get(r.target),c=t&&s?s.parentId===r.source?s.parentId:(t.parentId,r.target,t.parentId):``;i.set(r.id,c);let l=e.filter(e=>e.id!==r.source&&e.id!==r.target&&e.parentId===c&&e.rect.width>0).map(e=>e.rect),u=t&&s?s.parentId===r.source?r.source:t.parentId===r.target?r.target:null:null,d=[t,s].filter(e=>e&&e.id!==u&&e.rect.width>0).map(e=>e.rect),f=c?n.get(c):void 0,p=f&&f.rect.width>0?f.rect:null;if(o.set(r.id,{obstacles:l,ends:d,bounds:p}),!a.has(c)){let t=e.filter(e=>e.parentId===c&&e.rect.width>0).map(e=>e.rect);p&&t.push(...Vh(p)),a.set(c,t)}}let s=e=>{let n=i.get(e.id),a=[];for(let o of t){if(o.id===e.id||i.get(o.id)!==n)continue;let t=r.get(o.id);t&&a.push(t)}return a};for(let e=0;e<2;e++)for(let e of t){let t=o.get(e.id),n=s(e);r.set(e.id,Kh(e.s,e.t,t.obstacles,0,t.ends,t.bounds,n))}for(let e=0;e<4;e++)tg(r,i,a),$h(r,i,a);return r}function Qh(e,t,n,r){let i=-1/0,a=1/0;for(let o of r){if(o.wall===`left`||o.wall===`right`)continue;let r=jh(o);if(o.x+o.width+r<t||o.x-r>n)continue;let s=o.y-r,c=o.y+o.height+r;c<=e?i=Math.max(i,c):s>=e||e-s<c-e?a=Math.min(a,s):i=Math.max(i,c)}return a<i?[e,e]:[i,a]}function $h(e,t,n){let r=new Map;for(let[n,i]of e){let e=t.get(n)??``;for(let t=0;t+1<i.length;t++){let a=i[t],o=i[t+1];if(Math.abs(a.y-o.y)<.5&&Math.abs(a.x-o.x)>=2){if(t===0||t+1===i.length-1)continue;let s=r.get(e)??[];s.push({edgeId:n,idx:t,y:a.y,x0:Math.min(a.x,o.x),x1:Math.max(a.x,o.x)}),r.set(e,s)}}}for(let[t,i]of r){let r=n.get(t)??[];i.sort((e,t)=>e.y-t.y);let a=i.map((e,t)=>t),o=e=>a[e]===e?e:a[e]=o(a[e]);for(let e=0;e<i.length;e++)for(let t=e+1;t<i.length&&!(i[t].y-i[e].y>Xh);t++)i[e].edgeId!==i[t].edgeId&&Math.min(i[e].x1,i[t].x1)-Math.max(i[e].x0,i[t].x0)>0&&(a[o(t)]=o(e));let s=new Map;for(let e=0;e<i.length;e++){let t=o(e),n=s.get(t)??[];n.push(i[e]),s.set(t,n)}for(let t of s.values()){if(t.length<2)continue;let n=[...new Set(t.map(e=>e.edgeId))];if(n.length<2)continue;let i=t.reduce((e,t)=>e+t.y,0)/t.length,a=n.map(n=>{let r=t.filter(e=>e.edgeId===n),i=e.get(n),a=0,o=0,s=0;for(let e of r){let t=i[e.idx-1],n=i[e.idx+2];t&&(a+=t.y<e.y?-1:1),n&&(a+=n.y<e.y?-1:1),o+=(e.x0+e.x1)/2,s+=e.x1-e.x0}return{id:n,side:a,midX:o/Math.max(1,r.length),span:s}}).sort((e,t)=>e.side-t.side||(e.side<0?e.span-t.span:e.side>0?t.span-e.span:e.midX-t.midX)).map(e=>e.id),o=-1/0,s=1/0;for(let e of t){let[t,n]=Qh(e.y,e.x0,e.x1,r);o=Math.max(o,t),s=Math.min(s,n)}let c=Number.isFinite(o)&&Number.isFinite(s)?Math.max(0,s-o):192,l=Math.max(6,Math.min(Yh,Math.min(192,c)/Math.max(1,a.length-1))),u=i,d=(a.length-1)/2*l;Number.isFinite(o)&&u-d<o&&(u=o+d),Number.isFinite(s)&&u+d>s&&(u=s-d),a.forEach((n,r)=>{let i=u+(r-(a.length-1)/2)*l,o=e.get(n);for(let e of t)e.edgeId===n&&(o[e.idx]={...o[e.idx],y:i},o[e.idx+1]={...o[e.idx+1],y:i})})}}}function eg(e,t,n,r){let i=-1/0,a=1/0;for(let o of r){if(o.wall===`top`||o.wall===`bottom`)continue;let r=jh(o);if(o.y+o.height+r<t||o.y-r>n)continue;let s=o.x-r,c=o.x+o.width+r;c<=e?i=Math.max(i,c):s>=e||e-s<c-e?a=Math.min(a,s):i=Math.max(i,c)}return a<i?[e,e]:[i,a]}function tg(e,t,n){let r=new Map;for(let[n,i]of e){let e=t.get(n)??``;for(let t=0;t+1<i.length;t++){let a=i[t],o=i[t+1];if(Math.abs(a.x-o.x)<.5&&Math.abs(a.y-o.y)>=2){if(t===0||t+1===i.length-1)continue;let s=r.get(e)??[];s.push({edgeId:n,idx:t,x:a.x,y0:Math.min(a.y,o.y),y1:Math.max(a.y,o.y)}),r.set(e,s)}}}for(let[t,i]of r){let r=n.get(t)??[];i.sort((e,t)=>e.x-t.x);let a=i.map((e,t)=>t),o=e=>a[e]===e?e:a[e]=o(a[e]);for(let e=0;e<i.length;e++)for(let t=e+1;t<i.length&&!(i[t].x-i[e].x>Xh);t++)i[e].edgeId!==i[t].edgeId&&Math.min(i[e].y1,i[t].y1)-Math.max(i[e].y0,i[t].y0)>0&&(a[o(t)]=o(e));let s=new Map;for(let e=0;e<i.length;e++){let t=o(e),n=s.get(t)??[];n.push(i[e]),s.set(t,n)}for(let t of s.values()){if(t.length<2)continue;let n=[...new Set(t.map(e=>e.edgeId))];if(n.length<2)continue;let i=t.reduce((e,t)=>e+t.x,0)/t.length,a=n.map(n=>{let r=t.filter(e=>e.edgeId===n),i=e.get(n),a=0,o=0,s=0;for(let e of r){let t=i[e.idx-1],n=i[e.idx+2];t&&(a+=t.x<e.x?-1:1),n&&(a+=n.x<e.x?-1:1),o+=(e.y0+e.y1)/2,s+=e.y1-e.y0}return{id:n,side:a,midY:o/Math.max(1,r.length),span:s}}).sort((e,t)=>e.side-t.side||(e.side<0?e.span-t.span:e.side>0?t.span-e.span:e.midY-t.midY)).map(e=>e.id),o=-1/0,s=1/0;for(let e of t){let[t,n]=eg(e.x,e.y0,e.y1,r);o=Math.max(o,t),s=Math.min(s,n)}let c=Number.isFinite(o)&&Number.isFinite(s)?Math.max(0,s-o):192,l=Math.max(6,Math.min(Yh,Math.min(192,c)/Math.max(1,a.length-1))),u=i,d=(a.length-1)/2*l;Number.isFinite(o)&&u-d<o&&(u=o+d),Number.isFinite(s)&&u+d>s&&(u=s-d),a.forEach((n,r)=>{let i=u+(r-(a.length-1)/2)*l,o=e.get(n);for(let e of t)e.edgeId===n&&(o[e.idx]={...o[e.idx],x:i},o[e.idx+1]={...o[e.idx+1],x:i})})}}}var ng={padding:.15,minZoom:.05,maxZoom:1},rg={block:Oh,terminal:kh},ig=e=>{let t=[];for(let n of e.nodes){if(n.hidden)continue;let r=e.nodeLookup.get(n.id),i=r?.internals.positionAbsolute??n.position,a=r?.measured.width??n.width??0,o=r?.measured.height??n.height??0;t.push(`N\t${n.id}\t${n.parentId??``}\t${Math.round(i.x)}\t${Math.round(i.y)}\t${Math.round(a)}\t${Math.round(o)}`);let s=r?.internals.handleBounds;for(let e of[...s?.source??[],...s?.target??[]])t.push(`H\t${n.id}\t${e.id??``}\t${Math.round(i.x+e.x+e.width/2)}\t${Math.round(i.y+e.y+e.height/2)}`)}return t.join(`
3399
- `)};function ag(e){let t=[],n=new Map;for(let r of e.split(`
3400
- `)){if(!r)continue;let e=r.split(` `);e[0]===`N`?t.push({id:e[1],parentId:e[2],rect:{x:Number(e[3]),y:Number(e[4]),width:Number(e[5]),height:Number(e[6])}}):e[0]===`H`&&n.set(`${e[1]}|${e[2]}`,{x:Number(e[3]),y:Number(e[4])})}return{nodeRects:t,handles:n}}var og={routed:Jh};function sg({project:e,matcher:t}){let n=$(e=>e.readonly),r=$(e=>e.editMode),i=!n&&r,a=$(e=>e.selection),o=$(e=>e.select),s=$(e=>e.apply),c=$(e=>e.setToast),l=$(e=>e.focus),u=$(e=>e.meId),d=$(e=>e.focusBlock),f=$(e=>e.viewScope),p=bl();(0,y.useEffect)(()=>{window.boxglow={...window.boxglow??{},rf:p}},[p]);let[m,h]=(0,y.useState)(null);(0,y.useEffect)(()=>{if(!l)return;let e=setTimeout(()=>{let e=p.getInternalNode(l.blockId);if(!e)return;let t=e.measured.width??240,n=e.measured.height??80,r=e.internals.positionAbsolute,{zoom:i}=p.getViewport(),{x:a,y:o}=p.flowToScreenPosition({x:r.x,y:r.y}),s=document.querySelector(`.react-flow`),c=s?.clientWidth??window.innerWidth,u=s?.clientHeight??window.innerHeight;a>=0&&o>=0&&a+t*i<=c&&o+n*i<=u||p.setCenter(r.x+t/2,r.y+n/2,{zoom:i,duration:300})},120);return()=>clearTimeout(e)},[l,p]);let[g,_,v]=Td([]);(0,y.useEffect)(()=>{_(_h(e,{selectedBlockId:a.blockId,readonly:!i,matcher:t??void 0,meId:u,scope:f}))},[e,a.blockId,i,t,u,f,_]),(0,y.useEffect)(()=>{_(e=>e.map(e=>e.type===`block`?{...e,data:{...e.data,dropTarget:e.id===m}}:e))},[m,_]);let b=(0,y.useRef)(!1),S=(0,y.useRef)(!1);(0,y.useEffect)(()=>{if(!b.current){b.current=!0;return}S.current=!0},[f]),(0,y.useEffect)(()=>{if(!S.current||!p.getNodes().every(e=>e.hidden||(e.measured?.width??0)>0))return;S.current=!1;let e=setTimeout(()=>void p.fitView({...ng,duration:250}),30);return()=>clearTimeout(e)},[g,p]);let[C,w]=(0,y.useState)(null),T=(0,y.useMemo)(()=>vh(e,{selectedEdgeId:a.edgeId,selectedBlockId:a.blockId,scope:f}),[e,a.edgeId,a.blockId,f]),E=H(ig),D=(0,y.useMemo)(()=>{let{nodeRects:e,handles:t}=ag(E),n=[];for(let e of T){if(e.hidden)continue;let r=t.get(`${e.source}|${e.sourceHandle??``}`),i=t.get(`${e.target}|${e.targetHandle??``}`);r&&i&&n.push({id:e.id,source:e.source,target:e.target,s:r,t:i})}let r=Zh(e,n);return T.map(e=>{let t=r.get(e.id),n=C&&(e.source===C||e.target===C),i=n||(e.className??``).includes(`edge-hot`);return{...e,data:{...e.data??{},path:t,hot:!!i},className:n?`${(e.className??``).replace(`edge-dim`,``)} edge-hot`:e.className}})},[T,E,C]),O=(0,y.useCallback)(e=>{v(e);for(let t of e)if(t.type===`select`&&t.selected){if(t.id===`root-in`)o({terminal:`in`});else if(t.id.startsWith(`root-in:`))o({terminal:`in`,terminalGroup:t.id.slice(8)});else if(t.id===`root-out`)o({terminal:`out`});else if(t.id===`scope-in`||t.id===`scope-out`){let e=$.getState().viewScope;e&&o({blockId:e})}else o({blockId:t.id});d(t.id,{scope:!1})}},[v,o,d]),k=(0,y.useCallback)(t=>{let n=p.getInternalNode(t);if(!n)return null;let r=n.internals.positionAbsolute.x+(n.measured.width??0)/2,i=n.internals.positionAbsolute.y+(n.measured.height??0)/2,a=new Set,o=[t];for(;o.length>0;){let t=o.pop();for(let n of Object.values(e.blocks))n.parentId===t&&(a.add(n.id),o.push(n.id))}let s=null;for(let n of Object.values(e.blocks)){if(n.id===`root`||n.id===t||a.has(n.id)||Rf(e,n.id))continue;let o=p.getInternalNode(n.id);if(!o)continue;let c=o.internals.positionAbsolute.x,l=o.internals.positionAbsolute.y,u=o.measured.width??0,d=o.measured.height??0;if(r<c||r>c+u||i<l||i>l+d)continue;let f=0,m=n.parentId;for(;m;)f++,m=e.blocks[m]?.parentId??null;(!s||f>s.depth)&&(s={id:n.id,depth:f})}return s?.id??null},[e,p]),A=(0,y.useCallback)((t,n)=>{if(n.type!==`block`)return;let r=k(n.id),i=e.blocks[n.id];h(r&&i&&r!==i.parentId?r:null)},[k,e]),j=(0,y.useCallback)((t,n,r)=>{h(null),s(t=>{let n=t;for(let t of r)if(t.id===`root-in`)n=Wf(n,`in`,t.position);else if(t.id.startsWith(`root-in:`))n=Yp(n,t.id.slice(8),t.position);else if(t.id===`root-out`)n=Wf(n,`out`,t.position);else{let r=n.blocks[t.id],i=r&&r.kind!==`project`?k(t.id):null;if(i&&r&&i!==r.parentId){let r=p.getInternalNode(t.id),a=p.getInternalNode(i);if(r&&a){let o=rm(e,i)?{x:r.internals.positionAbsolute.x-a.internals.positionAbsolute.x,y:r.internals.positionAbsolute.y-a.internals.positionAbsolute.y}:dm(n,i);n=Bp(n,t.id,i,o),n=Hp(n,t.id,im);continue}}n=Uf(n,t.id,t.position),n=Hp(n,t.id,im)}return n})},[s,k,p]),M=(0,y.useCallback)((e,t)=>{if(t.isValid||!t.fromHandle||!t.fromHandle.id)return;let n=ah(t.fromHandle.id);if(!n)return;let r=`changedTouches`in e?e.changedTouches[0]:e,i=(document.elementFromPoint(r.clientX,r.clientY)?.closest(`.react-flow__node-block`))?.getAttribute(`data-id`);if(!i)return;let a;s(e=>{let t=Vp(e,n,i);return a=t.error,t.project}),a&&c(a)},[s,c]),ee=(0,y.useCallback)(e=>{let t=ah(e.sourceHandle),n=ah(e.targetHandle);if(!t||!n)return;let r;s(e=>{let i=Qf(e,t,n);return r=i.error,i.project}),r&&c(r)},[s,c]),N=(0,y.useCallback)(t=>{let n=ah(t.sourceHandle),r=ah(t.targetHandle);return!n||!r?!1:zf(e,n,r).ok},[e]),P=(0,y.useCallback)((e,t)=>o({edgeId:t.id}),[o]),te=(0,y.useCallback)(()=>o({}),[o]);return(0,x.jsxs)(Sd,{nodes:g,edges:D,nodeTypes:rg,edgeTypes:og,onNodeMouseEnter:(e,t)=>w(t.id),onNodeMouseLeave:()=>w(null),onNodesChange:O,onNodeDrag:A,onNodeDragStop:j,onConnect:ee,onConnectEnd:M,connectionRadius:40,isValidConnection:N,onEdgeClick:P,onPaneClick:te,nodesDraggable:i,nodesConnectable:i,elementsSelectable:!0,deleteKeyCode:null,selectionKeyCode:null,multiSelectionKeyCode:null,zoomOnDoubleClick:!1,fitView:!0,fitViewOptions:ng,minZoom:.05,maxZoom:2,proOptions:{hideAttribution:!1},children:[(0,x.jsx)(Md,{variant:Od.Lines,gap:32,lineWidth:1,color:`var(--bg-grid)`}),(0,x.jsx)(Vd,{showInteractive:!1,position:`bottom-left`,fitViewOptions:ng}),(0,x.jsx)(af,{position:`bottom-right`,pannable:!0,zoomable:!0,nodeColor:t=>{if(t.type===`terminal`)return`var(--primary)`;let n=e.blocks[t.id]?.status;return n===`white`?`var(--box-white-bg)`:n===`gray`?`var(--box-gray-bg)`:`var(--box-black-bg)`},nodeStrokeColor:`var(--line)`,maskColor:`rgba(127,127,127,0.15)`})]})}function cg({artifacts:e,onChange:t,readonly:n,addLabel:r=`Add`}){let[i,a]=(0,y.useState)(!1),[o,s]=(0,y.useState)(``),[c,l]=(0,y.useState)(``),u=()=>{o.trim()&&(t([...e,Af(o.trim(),c.trim())]),s(``),l(``),a(!1))};return(0,x.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[e.map(r=>(0,x.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px]`,children:[r.kind===`git`&&(0,x.jsx)(`span`,{className:`chip`,style:{cursor:`default`,fontSize:10,padding:`0 5px`},title:`Git: ${r.path??``} @ ${(r.commit??``).slice(0,7)}${r.repo?` (`+r.repo+`)`:``}`,children:`git`}),r.url?(0,x.jsx)(`a`,{className:`truncate underline`,style:{color:`var(--primary-strong)`},href:r.url,target:`_blank`,rel:`noopener noreferrer`,title:r.kind===`git`?`${r.path} @ ${(r.commit??``).slice(0,7)}`:r.url,children:r.title}):(0,x.jsx)(`span`,{className:`truncate`,title:r.kind===`git`?`${r.path} @ ${(r.commit??``).slice(0,7)}`:void 0,children:r.title}),r.kind===`git`&&r.state===`moved`&&(0,x.jsx)(`span`,{className:`chip`,style:{cursor:`default`,fontSize:10,padding:`0 5px`,borderColor:`var(--accent)`},title:`ファイルの移動を検出し、パスを付け替えました`,children:`moved`}),r.kind===`git`&&r.state===`missing`&&(0,x.jsx)(`span`,{className:`chip`,style:{cursor:`default`,fontSize:10,padding:`0 5px`,borderColor:`var(--danger)`,color:`var(--danger)`},title:`現在のリポジトリに見つかりません (コミットからは取り出せます)`,children:`missing`}),!n&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm ml-auto`,title:`Remove`,onClick:()=>t(e.filter(e=>e.id!==r.id)),children:`×`})]},r.id)),!n&&!i&&(0,x.jsxs)(`button`,{className:`btn btn-ghost btn-sm self-start`,onClick:()=>a(!0),children:[`+ `,r]}),!n&&i&&(0,x.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,x.jsx)(`input`,{className:`input`,autoFocus:!0,placeholder:`名前 (例: 設計書 v1, PR #12)`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&u(),e.key===`Escape`&&a(!1)}}),(0,x.jsx)(`input`,{className:`input`,placeholder:`URL (任意)`,value:c,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Enter`&&u(),e.key===`Escape`&&a(!1)}}),(0,x.jsxs)(`div`,{className:`flex gap-1`,children:[(0,x.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:u,disabled:!o.trim(),children:`Add`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>a(!1),children:`Cancel`})]})]})]})}function lg({project:e,blockId:t,direction:n,readonly:r,title:i,allowAdd:a=!0,groupId:o}){let s=$(e=>e.apply),c=t===`root`&&n===`in`&&o!==void 0?Wp(e,o):Z(e,t,n),l=t===`root`&&n===`in`?Up(e):[],[u,d]=(0,y.useState)(null),f=e=>!r&&!e&&(n===`in`||c.length>1);return(0,x.jsxs)(`section`,{className:`sec`,children:[(0,x.jsxs)(`div`,{className:`sec__head`,children:[(0,x.jsxs)(`span`,{className:`label`,children:[(0,x.jsx)(`span`,{className:`io-mark ${n}`,"aria-hidden":`true`,children:`→`}),i]}),!r&&a&&(0,x.jsxs)(`button`,{className:`btn btn-sm`,title:n===`in`?`入力を追加`:`出力を追加`,onClick:()=>s(e=>{let r=Kf(e,{blockId:t,direction:n,name:n===`in`?`新しい入力`:`新しい出力`});return o?Jp(r.project,r.portId,o):r.project}),children:[`+ `,n===`in`?`入力を追加`:`出力を追加`]})]}),c.length===0&&(0,x.jsx)(`div`,{className:`text-[12px] px-1`,style:{color:`var(--text-muted)`},children:`None`}),c.map(t=>{let i=n===`in`?Pp(e,t.id):null,a=i?i.blockId===`root`?`Project Inputs`:e.blocks[i.blockId]?.title??`?`:null,o=i?i.description:t.description;return(0,x.jsxs)(`div`,{className:`port-card`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,x.jsx)(`input`,{className:`input input-plain font-bold`,value:t.name,disabled:r,title:t.promotedFrom?`下の階層の未接続の入力 (自動)。元の入力をつなぐと消えます`:void 0,style:t.promotedFrom?{fontStyle:`italic`,opacity:.75}:void 0,onChange:e=>s(n=>Xf(n,t.id,{name:e.target.value}))}),n===`in`&&!t.promotedFrom&&!t.required&&(0,x.jsx)(`span`,{className:`meta-chip muted`,title:`任意: 無くても着手できます`,children:`任意`}),l.length>0&&!r&&(0,x.jsxs)(`select`,{className:`input input-plain`,style:{width:110,fontSize:11},value:t.groupId??``,title:`入力グループ`,onChange:e=>s(n=>Jp(n,t.id,e.target.value||null)),children:[(0,x.jsx)(`option`,{value:``,children:`Inputs`}),l.map(e=>(0,x.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>d(u===t.id?null:t.id),title:`形式・制約などの設定`,children:u===t.id?`▴`:`▾`}),f(!!t.promotedFrom)&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,title:`Remove`,onClick:()=>s(e=>Zf(e,t.id)),children:`×`})]}),(0,x.jsxs)(`div`,{className:`pl-1 pb-1`,children:[i?(0,x.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:[`from `,a,`「`,i.name,`」`,i.artifacts.length>0?` (${i.artifacts.map(e=>e.title).join(`, `)})`:``]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`div`,{className:`text-[11px] mt-1`,style:{color:`var(--text-muted)`},children:n===`in`?`入力物 (この入力の実体)`:`成果物 (この出力の実体)`}),(0,x.jsx)(cg,{artifacts:t.artifacts,readonly:r,addLabel:n===`in`?`入力物を追加`:`成果物を追加`,onChange:e=>s(n=>Xf(n,t.id,{artifacts:e}))})]}),o&&u!==t.id&&(0,x.jsx)(`div`,{className:`text-[11px] mt-1`,style:{color:`var(--text-muted)`},children:o})]}),u===t.id&&(0,x.jsxs)(`div`,{className:`flex flex-col gap-1 pl-2 pb-2`,children:[i?(0,x.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:[`形式・制約は供給元「`,i.name,`」の出力で書きます`,i.description?`: ${i.description}`:``]}):(0,x.jsx)(`input`,{className:`input`,placeholder:`形式・制約 (任意。例: Markdown、PNG 1920x1080、API は OpenAPI 3)`,value:t.description,disabled:r,onChange:e=>s(n=>Xf(n,t.id,{description:e.target.value}))}),n===`in`&&!t.promotedFrom&&(0,x.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,children:[(0,x.jsxs)(`div`,{className:`seg`,style:{width:`auto`},children:[(0,x.jsx)(`button`,{className:`seg__btn`,"data-on":t.required,disabled:r,onClick:()=>s(e=>Xf(e,t.id,{required:!0})),title:`必須: この入力がそろうまで着手できない (箱の Ready に効く)`,children:`必須`}),(0,x.jsx)(`button`,{className:`seg__btn`,"data-on":!t.required,disabled:r,onClick:()=>s(e=>Xf(e,t.id,{required:!1})),title:`任意: 無くても着手できる`,children:`任意`})]}),(0,x.jsx)(`span`,{style:{color:`var(--text-muted)`},children:t.required?`そろうまで着手できない`:`無くても着手できる`})]})]})]},t.id)})]})}function ug({side:e,width:t,min:n,max:r,onWidth:i,style:a}){let[o,s]=(0,y.useState)(!1);return(0,x.jsx)(`div`,{className:`resize-handle ${e}`,"data-active":o,style:a,onPointerDown:a=>{a.preventDefault();let o=a.clientX,c=t,l=a.currentTarget;l.setPointerCapture(a.pointerId),s(!0);let u=t=>{let a=t.clientX-o,s=e===`left`?c-a:c+a;i(Math.round(Math.max(n,Math.min(r,s))))},d=()=>{s(!1),l.removeEventListener(`pointermove`,u),l.removeEventListener(`pointerup`,d),l.removeEventListener(`pointercancel`,d)};l.addEventListener(`pointermove`,u),l.addEventListener(`pointerup`,d),l.addEventListener(`pointercancel`,d)},title:`ドラッグで幅を変える`})}function dg({value:e,onChange:t,disabled:n,danger:r}){let i=(0,y.useRef)(null),a=()=>{let e=i.current;if(e&&!n)try{e.showPicker?.()}catch{e.focus()}};return(0,x.jsxs)(`span`,{className:`date-field`,children:[(0,x.jsx)(`input`,{ref:i,type:`date`,className:`input input-plain`,value:e,disabled:n,style:r?{color:`var(--danger)`}:void 0,onClick:a,onChange:e=>t(e.target.value)}),(0,x.jsx)(`button`,{type:`button`,className:`date-field__btn`,disabled:n,onClick:a,title:`カレンダーから選ぶ`,"aria-label":`カレンダーから選ぶ`,children:(0,x.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,children:[(0,x.jsx)(`rect`,{x:`2`,y:`3.5`,width:`12`,height:`10.5`,rx:`2`}),(0,x.jsx)(`path`,{d:`M2 7h12M5.5 2v3M10.5 2v3`})]})})]})}var fg=`boxglow:theme`;function pg(){try{let e=localStorage.getItem(fg);if(e===`light`||e===`dark`)return e}catch{}return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function mg(e,t=!0){if(document.documentElement.dataset.theme=e,t)try{localStorage.setItem(fg,e)}catch{}}function hg(){mg(pg(),!1),window.matchMedia(`(prefers-color-scheme: dark)`).addEventListener(`change`,e=>{let t=null;try{t=localStorage.getItem(fg)}catch{}t||mg(e.matches?`dark`:`light`,!1)})}function gg(e,t,n=`text/plain`){let r=new Blob([t],{type:`${n};charset=utf-8`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=e,document.body.appendChild(a),a.click(),a.remove(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}async function _g(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}function vg(e){return new Promise(t=>{let n=document.createElement(`input`);n.type=`file`,n.accept=e,n.onchange=async()=>{let e=n.files?.[0];if(!e)return t(null);t(await e.text())},n.oncancel=()=>t(null),n.click()})}var yg=e=>e.replace(/[\\/:*?"<>|]/g,`_`).trim()||`boxglow`;function bg(){let e=$(e=>e.projects),t=$(e=>e.refreshList),n=$(e=>e.newProject),r=$(e=>e.openProject),i=$(e=>e.deleteProject),a=$(e=>e.importJSON),o=$(e=>e.openSample),s=$(e=>e.setToast),c=$(e=>e.openLocalFile),[l,u]=(0,y.useState)(``),[d,f]=(0,y.useState)(null);return(0,y.useEffect)(()=>{t(),Om().then(f)},[t]),(0,x.jsx)(`div`,{className:`modal-backdrop`,children:(0,x.jsxs)(`div`,{className:`card modal p-6 flex flex-col gap-5`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`h1`,{className:`text-[26px] flex items-center gap-2`,children:[(0,x.jsx)(`span`,{className:`tree-glyph white`,style:{width:28,height:28,fontSize:16,lineHeight:`24px`,boxShadow:`0 0 12px 3px var(--box-white-glow)`},children:`✓`}),`Boxglow`]}),(0,x.jsx)(`p`,{className:`mt-1`,style:{color:`var(--text-muted)`},children:`AI エージェントとチームの作業を、箱と線で一目で。`})]}),(0,x.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,x.jsx)(`input`,{className:`input`,style:{flex:1,minWidth:200},placeholder:`New project name`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>e.key===`Enter`&&l.trim()&&n(l.trim())}),(0,x.jsx)(`button`,{className:`btn btn-primary`,disabled:!l.trim(),onClick:()=>n(l.trim()),children:`Create`}),(0,x.jsx)(`button`,{className:`btn`,onClick:async()=>{let e=await vg(`.json,application/json`);if(e)try{await a(e)}catch(e){s(e instanceof Error?e.message:String(e))}},children:`Import JSON`}),(0,x.jsx)(`button`,{className:`btn btn-accent`,onClick:o,children:`Open Sample`})]}),Em()?(0,x.jsxs)(`div`,{className:`flex flex-col gap-2 p-3 rounded-lg`,style:{border:`2px solid var(--primary)`,background:`var(--primary-soft)`},children:[(0,x.jsx)(`div`,{className:`font-head text-[15px]`,children:`Open a repo file (boxglow.json)`}),(0,x.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:[`Claude Code / Codex が `,(0,x.jsx)(`b`,{children:`npx boxglow`}),` で更新するファイルをそのまま開きます。変更は 1〜2 秒で画面に反映され、画面での編集はファイルに書き戻されます。`]}),(0,x.jsxs)(`div`,{className:`flex gap-2 flex-wrap`,children:[(0,x.jsx)(`button`,{className:`btn btn-primary`,onClick:async()=>{let e=await Dm();e&&await c(e)},children:`Open boxglow.json`}),d&&(0,x.jsxs)(`button`,{className:`btn`,onClick:()=>c(d),title:`前回開いたファイル`,children:[`Reopen `,d.name]})]})]}):(0,x.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:`リポジトリ内の boxglow.json を直接開いて AI エージェントと共有するには、Chrome または Edge で開いてください。`}),(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`div`,{className:`label mb-1`,children:`Projects`}),e.length===0?(0,x.jsx)(`div`,{className:`text-[13px]`,style:{color:`var(--text-muted)`},children:`まだありません。上から作るか、サンプルを開いてみてください。`}):(0,x.jsx)(`div`,{className:`flex flex-col gap-1`,children:e.map(e=>(0,x.jsxs)(`div`,{className:`flex items-center gap-2 tree-row`,onClick:()=>r(e.id),children:[(0,x.jsx)(`span`,{className:`truncate font-head text-[15px]`,children:e.name}),(0,x.jsx)(`span`,{className:`text-[11px] ml-auto flex-none`,style:{color:`var(--text-muted)`},children:new Date(e.updatedAt).toLocaleString(`ja-JP`)}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm btn-danger flex-none`,title:`削除`,onClick:t=>{t.stopPropagation(),confirm(`「${e.name}」を削除します。よろしいですか?`)&&i(e.id)},children:`×`})]},e.id))})]}),(0,x.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:[`すきま研究所日誌 (`,(0,x.jsx)(`a`,{className:`underline`,href:`https://www.sukimalog.com/`,style:{color:`var(--primary-strong)`},children:`sukimalog.com`}),`) のアプリ。 紹介記事に使い方の説明があります。`]})]})})}var xg=`boxglow:templates`;async function Sg(){return[...await Sm(xg)??[]].sort((e,t)=>e.updatedAt<t.updatedAt?1:-1)}async function Cg(e){await Cm(xg,[e,...(await Sm(xg)??[]).filter(t=>t.id!==e.id)])}async function wg(e){await Cm(xg,(await Sm(xg)??[]).filter(t=>t.id!==e))}function Tg({project:e,blockId:t,decisionId:n}){let r=$(e=>e.readonly),i=$(e=>e.apply),[a,o]=(0,y.useState)(``),[s,c]=(0,y.useState)(null),l=e.blocks[t]?.decisions.find(e=>e.id===n);if(!l)return null;let u=e=>{e.trim()&&(i(r=>vp(r,t,n,e.trim(),`human`)),o(``))},d=()=>{s!==null&&s.trim()&&(i(e=>yp(e,t,n,s,`human`)),c(null))},f=(e,t)=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t())};return(0,x.jsxs)(`div`,{className:`flex flex-col gap-2 pl-2`,style:{borderLeft:`3px solid var(--accent)`},children:[(0,x.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:[yh(l.askedBy),` からの質問 (`,Ch(l.askedAt),`)`]}),(0,x.jsx)(`div`,{className:`text-[13px] font-bold`,children:l.question}),l.context&&(0,x.jsx)(`div`,{className:`text-[12px] whitespace-pre-wrap`,style:{color:`var(--text-muted)`,background:`var(--bg-paper)`,border:`1px solid var(--line-soft)`,borderRadius:8,padding:`6px 8px`},children:l.context}),l.answer===void 0?r?null:(0,x.jsxs)(x.Fragment,{children:[l.options.length>0&&(0,x.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:l.options.map(e=>(0,x.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>u(e),children:e},e))}),(0,x.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,x.jsx)(`textarea`,{className:`input`,rows:3,placeholder:l.options.length>0?`または自由に書く (複数行可)`:`回答を書く (複数行可)`,value:a,onChange:e=>o(e.target.value),onKeyDown:e=>f(e,()=>u(a))}),(0,x.jsxs)(`div`,{className:`flex items-center gap-2 justify-end`,children:[(0,x.jsx)(`span`,{className:`text-[11px]`,style:{color:`var(--text-muted)`},children:`Enter は改行。送るのはボタンか Ctrl+Enter`}),(0,x.jsx)(`button`,{className:`btn btn-primary btn-sm`,disabled:!a.trim(),onClick:()=>u(a),children:`Answer`})]})]})]}):(0,x.jsxs)(`div`,{className:`flex flex-col gap-1 text-[13px]`,children:[s===null?(0,x.jsxs)(`div`,{className:`whitespace-pre-wrap`,children:[`選んだ: `,(0,x.jsx)(`b`,{children:l.answer}),` `,(0,x.jsxs)(`span`,{style:{color:`var(--text-muted)`},children:[`(`,l.answeredBy,`)`]})]}):(0,x.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,x.jsx)(`textarea`,{className:`input`,rows:3,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>f(e,d),autoFocus:!0}),(0,x.jsxs)(`div`,{className:`flex gap-1 justify-end`,children:[(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>c(null),children:`Cancel`}),(0,x.jsx)(`button`,{className:`btn btn-primary btn-sm`,disabled:!s.trim(),onClick:d,title:`Ctrl+Enter でも保存`,children:`Save`})]})]}),bp(l).rejected.length>0&&(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 text-[12px]`,style:{color:`var(--text-muted)`},children:[`残した候補:`,bp(l).rejected.map(e=>(0,x.jsx)(`span`,{className:`meta-chip muted`,style:{fontSize:11},children:e},e))]}),(l.history??[]).length>0&&(0,x.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:[`以前の答え: `,l.history.map(e=>`${e.answer} (${e.by}${e.note?`、`+e.note:``})`).join(` → `)]}),!r&&s===null&&(0,x.jsxs)(`div`,{className:`flex gap-1`,children:[(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>c(l.answer??``),title:`答えの文面を直す (書き間違いや補足。選び直しではない)`,children:`Edit`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>{let e=prompt(`やり直す理由 (任意)`)??``;i(r=>xp(r,t,n,`human`,e))},title:`方針転換: 答えを履歴に残して、候補から選び直す`,children:`やり直す`})]})]})]})}function Eg({project:e,blockId:t,onJump:n}){let r=e.blocks[t];if(!r)return null;let i=Nf(e,t).filter(e=>e.id!==J).reverse().map(e=>e.title).join(` › `);return(0,x.jsxs)(`div`,{className:`dec-head`,role:`button`,tabIndex:0,onClick:()=>n(t),onKeyDown:e=>e.key===`Enter`&&n(t),title:`この箱を画面で選ぶ`,children:[(0,x.jsx)(`span`,{className:`dec-key`,children:r.key}),(0,x.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i&&(0,x.jsx)(`div`,{className:`text-[11px] truncate`,style:{color:`var(--text-muted)`},children:i}),(0,x.jsx)(`div`,{className:`text-[13px] font-bold truncate`,children:r.title})]}),(0,x.jsx)(`span`,{className:`btn btn-sm flex-none`,children:`箱へ →`})]})}function Dg({project:e}){let t=$(e=>e.select),n=$(e=>e.focusBlock),r=Cp(e),i=e=>{t({blockId:e}),n(e)},a=[...e.log].reverse().slice(0,100);return(0,x.jsxs)(`div`,{className:`flex flex-col gap-4 p-3`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-1 mb-0`,children:[(0,x.jsx)(`span`,{className:`label flex-1`,children:`Activity`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>t({}),title:`閉じる (Esc)`,children:`×`})]}),(0,x.jsxs)(`div`,{className:`text-[13px]`,children:[`Done `,r.white,` / `,r.total,` · 作業中 `,r.working.length,` · 判断待ち `,r.decisions.length,r.blocked.length>0?` · 詰まり ${r.blocked.length}`:``]}),r.decisions.length>0&&(0,x.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,x.jsx)(`span`,{className:`label`,children:`Decisions (あなたの回答で AI が進めます)`}),r.decisions.map(({block:t,decision:n})=>(0,x.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,x.jsx)(Eg,{project:e,blockId:t.id,onJump:i}),(0,x.jsx)(Tg,{project:e,blockId:t.id,decisionId:n.id})]},n.id))]}),(r.working.length>0||r.blocked.length>0)&&(0,x.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,x.jsx)(`span`,{className:`label`,children:`Working`}),[...r.working,...r.blocked.map(t=>({...t,since:e.blocks[t.block.id].activity?.since??``}))].map(t=>(0,x.jsxs)(`button`,{className:`tree-row text-left`,onClick:()=>i(t.block.id),children:[(0,x.jsx)(`span`,{className:`tl-actor`,children:yh(t.actor)}),(0,x.jsx)(`span`,{className:`dec-key`,children:t.block.key}),(0,x.jsxs)(`span`,{className:`truncate`,children:[(0,x.jsx)(`b`,{children:t.block.title}),` `,xh[e.blocks[t.block.id].activity.state],` `,t.note]}),(0,x.jsx)(`span`,{className:`ml-auto text-[11px] flex-none`,style:{color:`var(--text-muted)`},children:t.since?Ch(t.since):``})]},t.block.id))]}),r.next.length>0&&(0,x.jsxs)(`section`,{className:`flex flex-col gap-1`,children:[(0,x.jsx)(`span`,{className:`label`,children:`Next (未着手)`}),(0,x.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:r.next.slice(0,8).map(e=>(0,x.jsx)(`button`,{className:`chip`,onClick:()=>i(e.id),children:e.title},e.id))})]}),(0,x.jsxs)(`section`,{children:[(0,x.jsx)(`span`,{className:`label`,children:`Log`}),a.length===0&&(0,x.jsx)(`div`,{className:`text-[12px] mt-1`,style:{color:`var(--text-muted)`},children:`まだありません。CLI や画面の操作で記録されます。`}),a.map(t=>(0,x.jsxs)(`div`,{className:`tl-row`,style:{cursor:t.blockId?`pointer`:`default`},onClick:()=>t.blockId&&e.blocks[t.blockId]&&i(t.blockId),children:[(0,x.jsx)(`span`,{className:`tl-time`,children:wh(t.at)}),(0,x.jsx)(`span`,{className:`tl-actor`,title:t.actor,children:yh(t.actor)}),(0,x.jsx)(`span`,{children:t.message})]},t.id))]})]})}var Og={black:`New (BlackBox: 出力だけ決めてある)`,gray:`In Progress (GrayBox: 分解中・作業中)`,white:`Done (WhiteBox: 出力に成果物が付いて完了)`};function kg(e,t){let n=[`- **${t.name}**`],r=Fp(e,t.id);r&&n.push(`: ${r}`),t.direction===`in`&&!t.required&&n.push(` (任意)`),t.artifacts.length>0&&n.push(` / `+t.artifacts.map(e=>e.url?`[${e.title}](${e.url})`:e.title).join(`, `));let i=t.direction===`in`?Ff(e,{portId:t.id,side:`outer`}).map(t=>Ag(e,t.from.portId)):If(e,{portId:t.id,side:`outer`}).map(t=>jg(e,t.to.portId));return i.length>0&&n.push(` (${t.direction===`in`?`供給元`:`行き先`}: ${i.join(`, `)})`),n.join(``)}function Ag(e,t){let n=e.ports[t];if(!n)return`?`;let r=e.blocks[n.blockId];return`${r?.id===`root`?`プロジェクトの入力`:r?.title??`?`}.${n.name}`}function jg(e,t){let n=e.ports[t];if(!n)return`?`;let r=e.blocks[n.blockId];return`${r?.id===`root`?`プロジェクトの出力`:r?.title??`?`}.${n.name}`}function Mg(e,t,n,r){let i=e.blocks[t];if(!i)return``;let a=`#`.repeat(Math.min(n,6)),o=[];if(o.push(`${a} ${i.id===`root`?`プロジェクト: ${e.name}`:`${i.key?i.key+` `:``}${i.title}`}`),o.push(``),i.id!==`root`){o.push(`- 状態: ${Og[i.status]}`);let t=uf(i.category);t&&o.push(`- カテゴリ: ${t.label}`);let n=i.assigneeIds.map(t=>e.members.find(e=>e.id===t)?.name).filter(Boolean);n.length>0&&o.push(`- 担当: ${n.join(`, `)}`);let r=ip(e,i.id);jf(e,i.id).length>0&&o.push(`- 進捗: 下の階層 ${r.white}/${r.total} が完了`)}if(i.id!==`root`&&i.decisions.length>0){o.push(`- 判断:`);for(let e of i.decisions){let t=bp(e);o.push(` - ${e.question}${e.answer===void 0?` (未回答)`:` → ${e.answer}`}${t.rejected.length?`。残した候補: ${t.rejected.join(` / `)}`:``}${(e.history??[]).length?`。以前の答え: ${e.history.map(e=>e.answer).join(` → `)}`:``}`)}}i.description&&(o.push(``),o.push(i.description));let s=Z(e,i.id,`in`),c=Z(e,i.id,`out`);o.push(``),o.push(`**入力** (${s.length===0?`なし`:`${s.length} 件`})`);for(let t of s)o.push(kg(e,t));o.push(``),o.push(`**出力** (${c.length} 件)`);for(let t of c)o.push(kg(e,t));if(i.artifacts.length>0){o.push(``),o.push(`**関連資料**`);for(let e of i.artifacts)o.push(`- ${e.url?`[${e.title}](${e.url})`:e.title}${e.note?`: ${e.note}`:``}`)}if(o.push(``),r)for(let t of jf(e,i.id))o.push(Mg(e,t.id,n+1,!0));return o.join(`
3401
- `)}function Ng(e){let t=ip(e,J);return[`# ${e.name}`,``,e.description,``,`全体の進捗: ${t.white}/${t.total} ブロックが完了 (BlackBox ${t.black} / GrayBox ${t.gray} / WhiteBox ${t.white})`,``,`ブロックは「入力から出力を作るタスク」。BlackBox は出力だけ決まっていて中身が未定、GrayBox は分解中・着手中、WhiteBox は完了。`,``].join(`
3402
- `)+Mg(e,J,2,!0)}function Pg(e,t,n){let r=e.blocks[t];if(!r)return``;let i=[...Nf(e,t)].reverse().map(t=>t.id===`root`?e.name:t.title),a=[];a.push(`# 依頼: ${r.title}`),a.push(``),a.push(`このタスクは「${i.join(` > `)}」の中の 1 ブロックです。ブロックは「入力から出力を作る作業」で、出力の成果物が確定したら完了 (WhiteBox) になります。`),a.push(``),a.push(Mg(e,t,2,!1));let o=jf(e,r.parentId??`root`).filter(e=>e.id!==t);if(o.length>0){a.push(`## 同じ階層の他のブロック`),a.push(``);for(let e of o)a.push(`- ${e.title} (${Og[e.status]})`);a.push(``)}let s=jf(e,t);if(s.length>0){a.push(`## 現在の下の階層`),a.push(``);for(let e of s)a.push(`- ${e.title} (${Og[e.status]})`);a.push(``)}return a.push(`## お願い`),a.push(``),n===`plan`?a.push(`上の入力から出力を得るための手順を提案してください。前提が足りなければ、追加で必要な入力を挙げてください。`):n===`decompose`?(a.push(`このブロックを、入力と出力を持つ小さなブロックに分解してください。次の JSON 形式で答えてください。`),a.push(``),a.push("```json"),a.push(JSON.stringify({blocks:[{title:`ブロック名`,description:`やること`,inputs:[`入力名`],outputs:[`出力名`]}],connections:[{from:`ブロック名.出力名`,to:`ブロック名.入力名`}]},null,2)),a.push("```")):a.push(`入力と出力の定義に抜けや曖昧さがないか指摘してください。出力が「確定した」と言える条件も提案してください。`),a.push(``),a.join(`
3403
- `)}function Fg(e,t){let n=jf(e,t),r=[`flowchart LR`],i=e=>e.replace(/"/g,`'`);r.push(` IN(["入力"])`),r.push(` OUT(["出力"])`);for(let e of n){let t=e.status===`white`?`["${i(e.title)}"]`:e.status===`gray`?`[["${i(e.title)}"]]`:`{{"${i(e.title)}"}}`;r.push(` ${e.id}${t}`)}for(let a of Object.values(e.edges)){let o=e.ports[a.from.portId],s=e.ports[a.to.portId];if(!o||!s)continue;let c=o.blockId===t?`IN`:n.some(e=>e.id===o.blockId)?o.blockId:null,l=s.blockId===t?`OUT`:n.some(e=>e.id===s.blockId)?s.blockId:null;if(!c||!l)continue;let u=o.direction===`out`?o.name:s.name;r.push(` ${c} ${a.auto?`-.->`:`-->`}|${i(u)}| ${l}`)}r.push(` classDef white fill:#fbfbfb,stroke:#3a3f46,color:#2f343a`),r.push(` classDef gray fill:#d9dde1,stroke:#3a3f46,color:#2f343a`),r.push(` classDef black fill:#3a3f46,stroke:#3a3f46,color:#e8eaed`);for(let e of n)r.push(` class ${e.id} ${e.status}`);return r.join(`
3404
- `)}var Ig=[`#0d8080`,`#e8875e`,`#3aa85a`,`#6b7075`,`#2f6fb3`,`#a0522d`],Lg={black:`?`,gray:`~`,white:`✓`},Rg={statuses:new Set([`black`,`gray`,`white`]),memberId:null,unassigned:!1,category:null};function zg(e,t,n){let r=e.blocks[t];return!(!r||!n.statuses.has(r.status)||n.memberId&&!r.assigneeIds.includes(n.memberId)||n.unassigned&&(r.assigneeIds.length>0||kf(r)===`project`)||n.category&&r.category!==n.category)}var Bg=e=>e.statuses.size===3&&e.memberId===null&&!e.unassigned&&e.category===null;function Vg({project:e,parentId:t,depth:n,selectedId:r,onSelect:i,closed:a,onToggle:o}){let s=jf(e,t).sort((e,t)=>e.position.y-t.position.y||e.position.x-t.position.x);return(0,x.jsx)(x.Fragment,{children:s.map(t=>{let s=jf(e,t.id).length>0,c=a.has(t.id);return(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`div`,{className:`tree-row`,"data-selected":r===t.id,style:{paddingLeft:8+n*14},onClick:()=>i(t.id),title:t.title,children:[s?(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,style:{padding:`0 4px`},onClick:e=>{e.stopPropagation(),o(t.id)},title:c?`開く`:`閉じる`,children:c?`▸`:`▾`}):(0,x.jsx)(`span`,{style:{width:20,display:`inline-block`}}),(0,x.jsx)(`span`,{className:`tree-glyph ${t.status}`,children:Lg[t.status]}),(0,x.jsx)(`span`,{className:`truncate`,children:t.title})]}),s&&!c&&(0,x.jsx)(Vg,{project:e,parentId:t.id,depth:n+1,selectedId:r,onSelect:i,closed:a,onToggle:o})]},t.id)})})}function Hg({project:e,filter:t,onFilter:n,onClose:r,width:i}){let a=$(e=>e.readonly),o=$(e=>e.selection),s=$(e=>e.select),c=$(e=>e.apply),[l,u]=(0,y.useState)(()=>new Set),d=e=>u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[f,p]=(0,y.useState)(``),[m,h]=(0,y.useState)(Ig[0]),g=$(e=>e.focusBlock),_=$(e=>e.setToast),v=$(e=>e.meId),b=$(e=>e.setMe),[S,C]=(0,y.useState)([]);(0,y.useEffect)(()=>{Sg().then(C)},[]);let w=()=>void Sg().then(C),T=t=>{let n=eh(e,o,$.getState().viewScope);c(e=>{let r=Dp(e,n,t,`human`);return setTimeout(()=>{s({blockId:r.blockId}),g(r.blockId)},0),r.project})},E=async()=>{let e=await vg(`.json,application/json`);if(e)try{await Cg(Op(e)),w(),_(`テンプレートをライブラリに追加しました`)}catch(e){_(e instanceof Error?e.message:String(e))}},D=e=>{let r=new Set(t.statuses);r.has(e)?r.delete(e):r.add(e),r.size!==0&&n({...t,statuses:r})},O=()=>{f.trim()&&(c(e=>ep(e,f.trim(),m).project),p(``),h(Ig[(Ig.indexOf(m)+1)%Ig.length]))},[k,A]=(0,y.useState)(`tree`),j=[{id:`tree`,label:`Tree`,hint:`箱の一覧 (押すと選ぶ)`},{id:`filter`,label:`Filter`,hint:`状態や担当で箱を絞る`},{id:`members`,label:`Members`,hint:`担当にする人を登録。自分を決める`},{id:`parts`,label:`Parts`,hint:`他のプロジェクトでも使い回す箱`}];return(0,x.jsxs)(`div`,{className:`drawer card`,style:{width:i},children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-1 mb-2`,children:[(0,x.jsx)(`div`,{className:`seg flex-1`,style:{gridTemplateColumns:`repeat(4, 1fr)`},children:j.map(e=>(0,x.jsx)(`button`,{className:`seg__btn`,"data-on":k===e.id,onClick:()=>A(e.id),title:e.hint,style:{padding:`6px 2px`,fontSize:12},children:e.label},e.id))}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:r,title:`Close`,children:`×`})]}),(0,x.jsx)(`div`,{className:`text-[11px] mb-2`,style:{color:`var(--text-muted)`},children:j.find(e=>e.id===k)?.hint}),k===`tree`&&(jf(e,`root`).length===0?(0,x.jsx)(`div`,{className:`text-[12px] px-2`,style:{color:`var(--text-muted)`},children:`No blocks yet`}):(0,x.jsx)(Vg,{project:e,parentId:`root`,depth:0,selectedId:o.blockId,onSelect:e=>{s({blockId:e}),g(e)},closed:l,onToggle:d})),k===`filter`&&(0,x.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[[`black`,`gray`,`white`].map(e=>(0,x.jsxs)(`button`,{className:`chip`,"data-on":t.statuses.has(e),onClick:()=>D(e),children:[(0,x.jsx)(`span`,{className:`tree-glyph ${e}`,style:{width:12,height:12,fontSize:8,lineHeight:`8px`},children:Lg[e]}),Th[e]]},e)),v&&(0,x.jsx)(`button`,{className:`chip`,"data-on":t.memberId===v,onClick:()=>n({...t,memberId:t.memberId===v?null:v,unassigned:!1}),title:`自分の担当だけ`,children:`Mine`}),(0,x.jsx)(`button`,{className:`chip`,"data-on":t.unassigned,onClick:()=>n({...t,unassigned:!t.unassigned,memberId:null}),title:`担当がいない箱だけ`,children:`未担当`}),e.members.filter(e=>e.id!==v).map(e=>(0,x.jsxs)(`button`,{className:`chip`,"data-on":t.memberId===e.id,onClick:()=>n({...t,memberId:t.memberId===e.id?null:e.id,unassigned:!1}),title:`${e.name} の担当だけ`,children:[(0,x.jsx)(`span`,{className:`avatar`,style:{background:e.color,width:16,height:16,fontSize:9},children:e.name.slice(0,1)}),e.name]},e.id)),(0,x.jsx)(`div`,{className:`label mt-3`,children:`Category`}),(0,x.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:lf.map(e=>(0,x.jsxs)(`button`,{className:`chip cat-chip${e.neutral?` neutral`:``}`,"data-on":t.category===e.key,style:{"--cat":e.color},onClick:()=>n({...t,category:t.category===e.key?null:e.key}),title:`${e.label} の箱だけ`,children:[(0,x.jsx)(`span`,{className:`cat-chip__dot`}),e.label]},e.key))}),!Bg(t)&&(0,x.jsx)(`button`,{className:`chip mt-3`,onClick:()=>n({...Rg,statuses:new Set(Rg.statuses)}),children:`Clear`})]}),k===`parts`&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`text-[11px] mb-1`,style:{color:`var(--text-muted)`},children:[`挿入先: `,(()=>{let t=eh(e,o,$.getState().viewScope),n=e.blocks[t];return n?kf(n)===`project`?n.title:`${n.title} の隣`:`最上位`})()]}),(0,x.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[S.length===0&&(0,x.jsx)(`div`,{className:`text-[12px] px-1`,style:{color:`var(--text-muted)`},children:`箱を選び、右の「⋯」から「Save as Part」すると、ここに並びます。`}),S.map(e=>(0,x.jsxs)(`div`,{className:`flex items-center gap-1 text-[13px] px-1`,children:[(0,x.jsx)(`span`,{className:`truncate`,title:`${e.description||e.name} (v${e.version}${e.tags.length?`, `+e.tags.join(`, `):``})`,children:e.name}),(0,x.jsxs)(`span`,{className:`text-[10px]`,style:{color:`var(--text-muted)`},children:[`v`,e.version]}),(0,x.jsxs)(`span`,{className:`ml-auto flex gap-0.5`,children:[!a&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,title:`挿入`,onClick:()=>T(e),children:`Insert`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,title:`JSON で保存 (他のリポジトリや人と共有)`,onClick:()=>gg(`${yg(e.name)}.boxglow-block.json`,JSON.stringify(e,null,2),`application/json`),children:`↓`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,title:`ライブラリから消す`,onClick:()=>{confirm(`テンプレート「${e.name}」を消しますか?`)&&wg(e.id).then(w)},children:`×`})]})]},e.id)),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm self-start`,onClick:E,children:`Import`})]})]}),k===`members`&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`div`,{className:`flex flex-col gap-1`,children:e.members.map(e=>(0,x.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px] px-1`,children:[(0,x.jsx)(`span`,{className:`avatar`,style:{background:e.color},children:e.name.slice(0,1)}),(0,x.jsx)(`span`,{className:`truncate`,children:e.name}),(0,x.jsx)(`button`,{className:`chip ml-auto`,"data-on":v===e.id,onClick:()=>b(v===e.id?null:e.id),title:`このブラウザでは自分として扱う (自分の担当の箱に帯が付く)`,children:v===e.id?`Me`:`Set as me`}),!a&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,title:`外す`,onClick:()=>c(t=>tp(t,e.id)),children:`×`})]},e.id))}),!a&&(0,x.jsxs)(`div`,{className:`flex items-center gap-1 mt-2`,children:[(0,x.jsx)(`span`,{className:`avatar flex-none`,style:{background:m,cursor:`pointer`},title:`色を変える`,onClick:()=>h(Ig[(Ig.indexOf(m)+1)%Ig.length]),children:f.slice(0,1)||`+`}),(0,x.jsx)(`input`,{className:`input`,placeholder:`Name`,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>e.key===`Enter`&&O()}),(0,x.jsx)(`button`,{className:`btn btn-sm`,onClick:O,disabled:!f.trim(),children:`Add`})]})]})]})}function Ug({title:e,children:t}){let n=$(e=>e.select);return(0,x.jsxs)(`div`,{className:`flex items-center gap-1 mb-2`,children:[(0,x.jsx)(`span`,{className:`label truncate flex-1`,title:e,children:e}),t,(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>n({}),title:`閉じる (Esc)`,children:`×`})]})}function Wg({project:e,onOpenDrawer:t}){let n=$(e=>e.selection);return n.edgeId&&e.edges[n.edgeId]?(0,x.jsx)(Jg,{project:e,edgeId:n.edgeId}):n.blockId&&e.blocks[n.blockId]?(0,x.jsx)(qg,{project:e,blockId:n.blockId,onOpenDrawer:t}):n.terminal?(0,x.jsx)(Kg,{project:e,which:n.terminal,groupId:n.terminalGroup}):n.project?(0,x.jsx)(Gg,{project:e}):n.timeline?(0,x.jsx)(Dg,{project:e}):null}function Gg({project:e}){let t=$(e=>e.readonly),n=$(e=>e.apply),r=ip(e,J);return(0,x.jsxs)(`div`,{className:`flex flex-col gap-4 p-3`,children:[(0,x.jsx)(Ug,{title:`Project`}),(0,x.jsx)(`input`,{className:`input font-head text-[16px]`,value:e.name,disabled:t,onChange:e=>n(t=>({...structuredClone(t),name:e.target.value}))}),(0,x.jsx)(`textarea`,{className:`input`,placeholder:`ゴール (何を達成したいか)`,value:e.description,disabled:t,onChange:e=>n(t=>({...structuredClone(t),description:e.target.value}))}),(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`div`,{className:`progress-bar`,children:(0,x.jsx)(`span`,{style:{width:`${Math.round(r.ratio*100)}%`}})}),(0,x.jsxs)(`div`,{className:`text-[12px] mt-1`,style:{color:`var(--text-muted)`},children:[`完了 `,r.white,` / `,r.total]})]})]})}function Kg({project:e,which:t,groupId:n}){let r=$(e=>e.readonly),i=$(e=>e.apply),a=$(e=>e.select),o=$(e=>e.setToast),s=n?Up(e).find(e=>e.id===n)??null:null,c=Up(e),l=t===`out`?`Project Outputs`:s?`Input Group`:`Project Inputs`;return(0,x.jsxs)(`div`,{className:`flex flex-col gap-3 p-3`,children:[(0,x.jsx)(Ug,{title:l}),s&&(0,x.jsxs)(`section`,{className:`sec`,children:[(0,x.jsxs)(`div`,{className:`sec__head`,children:[(0,x.jsx)(`span`,{className:`label`,children:`Group`}),(0,x.jsxs)(`span`,{className:`flex gap-1`,children:[(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,title:`このグループを JSON に書き出す (他のプロジェクトで読み込める)`,onClick:()=>gg(`${yg(s.name)}.boxglow-inputs.json`,Xp(e,s.id),`application/json`),children:`Export`}),!r&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm btn-danger`,title:`グループを消す (入力は Inputs に戻る)`,onClick:()=>{confirm(`グループ「${s.name}」を消しますか? (入力は Inputs に戻ります)`)&&(a({terminal:`in`}),i(e=>qp(e,s.id)))},children:`Delete`})]})]}),(0,x.jsx)(`input`,{className:`input font-head text-[15px]`,value:s.name,disabled:r,placeholder:`Group name`,onChange:e=>i(t=>Kp(t,s.id,{name:e.target.value}))}),(0,x.jsx)(`input`,{className:`input`,value:s.description,disabled:r,placeholder:`説明 (任意。例: PCI-SIG の仕様書一式)`,onChange:e=>i(t=>Kp(t,s.id,{description:e.target.value}))})]}),(0,x.jsx)(lg,{project:e,blockId:J,direction:t,readonly:r,title:t===`in`?`Inputs`:`Outputs`,allowAdd:t===`out`||!!s,groupId:t===`in`?s?s.id:null:void 0}),t===`in`&&!s&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:`ここには、下の階層で供給元が決まっていない入力が自動で上がります。各入力はグループに移せます。`}),(0,x.jsxs)(`section`,{className:`sec`,children:[(0,x.jsxs)(`div`,{className:`sec__head`,children:[(0,x.jsx)(`span`,{className:`label`,children:`Groups`}),!r&&(0,x.jsxs)(`span`,{className:`flex gap-1`,children:[(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>{let e=prompt(`グループの名前 (例: PCIe 仕様書)`);e?.trim()&&i(t=>{let n=Gp(t,e.trim());return setTimeout(()=>a({terminal:`in`,terminalGroup:n.groupId}),0),n.project})},children:`+ Group`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:async()=>{let e=await vg(`.json,application/json`);if(e)try{i(t=>{let n=Zp(t,e);return setTimeout(()=>a({terminal:`in`,terminalGroup:n.groupId}),0),n.project})}catch(e){o(e instanceof Error?e.message:String(e))}},title:`他のプロジェクトで書き出したグループを読み込む`,children:`Import`})]})]}),c.length===0&&(0,x.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:`仕様書などを種類ごとに分けるときは、グループを作って入力を入れます (例: PCIe 仕様書、DDR 仕様書)。`}),c.map(t=>(0,x.jsxs)(`button`,{className:`tree-row text-left`,onClick:()=>a({terminal:`in`,terminalGroup:t.id}),children:[(0,x.jsx)(`span`,{className:`truncate`,children:t.name}),(0,x.jsx)(`span`,{className:`ml-auto text-[11px]`,style:{color:`var(--text-muted)`},children:Wp(e,t.id).length})]},t.id))]})]})]})}function qg({project:e,blockId:t}){let n=$(e=>e.readonly),r=$(e=>e.apply),i=$(e=>e.select),a=$(e=>e.setToast),o=$(e=>e.meId),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(null),[d,f]=(0,y.useState)(!0),[p,m]=(0,y.useState)(!1),[h,g]=(0,y.useState)(``),[_,v]=(0,y.useState)(`status`),b=e.blocks[t],S=h.trim()?e.members.filter(e=>e.name.toLowerCase().includes(h.trim().toLowerCase())&&!b.assigneeIds.includes(e.id)).slice(0,8):[],C=jf(e,t),w=[...Nf(e,t)].reverse(),T=up(e,t),E=ip(e,t),D=b.decisions.filter(e=>e.answer===void 0),O=rp(e,t),k=kf(b)===`project`;(0,y.useEffect)(()=>{c(!1),u(null),f(!0),m(!1),g(``)},[t]);let A=e=>r(n=>Hf(n,t,{status:e})),j=e=>r(n=>{let r=n.blocks[t].assigneeIds;return Hf(n,t,{assigneeIds:r.includes(e)?r.filter(t=>t!==e):[...r,e]})}),M=()=>{C.length>0&&!confirm(`「${b.title}」と下の階層のブロックを削除します。よろしいですか?`)||(i({}),r(e=>Gf(e,t)))},ee=async n=>{c(!1),await _g(Pg(e,t,n))?a(`AI に渡すテキストをコピーしました`):u(n)};return(0,x.jsxs)(`div`,{className:`flex flex-col gap-4 p-3`,children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,x.jsx)(`span`,{className:`label truncate flex-1`,title:w.map(e=>e.id===`root`?``:e.title).filter(Boolean).join(` › `),children:k?`Project`:w.map(e=>e.id===`root`?``:e.title).filter(Boolean).join(` › `)||`Top`}),(0,x.jsx)(`button`,{className:`chip`,style:{fontFamily:`ui-monospace, monospace`},title:`短い ID (押すとコピー。検索や CLI で使えます)`,onClick:async()=>{await _g(b.key??``)&&a(`ID ${b.key} をコピーしました`)},children:b.key}),!n&&(0,x.jsxs)(`div`,{className:`relative`,children:[(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>m(!p),title:`More`,children:`⋯`}),p&&(0,x.jsxs)(`div`,{className:`card absolute right-0 mt-1 p-1 flex flex-col z-30`,style:{minWidth:200},children:[!k&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:async()=>{m(!1);let n=Tp(e,t,{tags:(prompt(`部品の札 (例: 画像処理, 認証。カンマ区切り。省略可)`)??``).split(/[,、]/).map(e=>e.trim()).filter(Boolean)});await Cg(n),a(`「${n.name}」を部品として保存しました (☰ の「部品」から挿入)`)},children:`Save as Part`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:()=>{m(!1),u(`plan`),v(`more`)},children:`Show AI text`}),(0,x.jsx)(`div`,{style:{borderTop:`1px solid var(--line-soft)`,margin:`4px 0`}}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start btn-danger`,onClick:M,children:`Delete`})]})]}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>i({}),title:`閉じる (Esc)`,children:`×`})]}),(0,x.jsx)(`input`,{className:`input font-head text-[16px]`,value:b.title,disabled:n,placeholder:`Title (何を作るか)`,onChange:e=>r(n=>Hf(n,t,{title:e.target.value})),onKeyDown:e=>{(e.key===`Enter`||e.key===`Escape`)&&e.target.blur()}}),(0,x.jsx)(`div`,{className:`seg`,style:{gridTemplateColumns:`repeat(5, 1fr)`},children:[[`status`,`Status`],[`io`,`I/O`],[`owner`,`Owner`],[`dates`,`Dates`],[`more`,`More`]].map(([n,r])=>(0,x.jsxs)(`button`,{className:`seg__btn`,"data-on":_===n,onClick:()=>v(n),style:{padding:`6px 2px`,fontSize:12},title:n===`status`?`状態・進捗・活動・判断`:n===`io`?`入力と出力 (成果物)`:n===`owner`?`担当`:n===`dates`?`開始日・期日・時間`:`AI に渡す・メモ・資料`,children:[r,n===`status`&&D.length>0&&(0,x.jsx)(`span`,{className:`dot decision`,style:{marginLeft:4,display:`inline-block`,width:6,height:6,borderRadius:999,background:`var(--accent)`}}),n===`io`&&(0,x.jsxs)(`span`,{style:{marginLeft:4,fontSize:10,opacity:.7},children:[Z(e,t,`in`).length,`/`,Z(e,t,`out`).length]})]},n))}),_===`status`&&(0,x.jsxs)(`section`,{className:`sec`,children:[(0,x.jsx)(`div`,{className:`sec__head`,children:(0,x.jsx)(`span`,{className:`label`,children:`Status`})}),(0,x.jsx)(`div`,{className:`seg`,children:[`black`,`gray`,`white`].map(e=>(0,x.jsxs)(`button`,{className:`seg__btn`,"data-on":b.status===e,disabled:n,onClick:()=>A(e),title:Eh[e],children:[(0,x.jsx)(`span`,{className:`tree-glyph ${e}`,children:Lg[e]}),(0,x.jsx)(`span`,{children:Th[e]})]},e))}),T&&!n&&(0,x.jsx)(`button`,{className:`btn btn-primary btn-sm w-full`,onClick:()=>A(`white`),title:`下の階層が全部完了し、出力に成果物が付いています`,children:`完了にできます → Done`}),b.status!==`white`&&kf(b)!==`project`&&Z(e,t,`in`).length>0&&(()=>{let n=lp(e,t);return n.length===0?(0,x.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--primary-strong)`},children:`必須の入力はそろっています (着手できます)`}):(0,x.jsxs)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:[`必須の入力待ち: `,n.map(e=>e.name).join(`, `)]})})(),k&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`div`,{className:`sec__head mt-2`,children:(0,x.jsx)(`span`,{className:`label`,children:`Repository`})}),(0,x.jsx)(`input`,{className:`input`,placeholder:`パスや URL (例: ../mg-core、github.com/you/repo)`,value:b.repo??``,disabled:n,onChange:e=>r(n=>Hf(n,t,{repo:e.target.value}),{history:!1}),onBlur:e=>r(n=>Hf(n,t,{repo:e.target.value.trim()||void 0}))}),(0,x.jsx)(`div`,{className:`text-[11px]`,style:{color:`var(--text-muted)`},children:`複数のリポジトリをまたぐときは、boxglow.json を上のフォルダに 1 つ置き、各リポジトリの AI には環境変数 BOXGLOW_FILE でその場所を教えます`})]}),(0,x.jsx)(`div`,{className:`sec__head mt-2`,children:(0,x.jsx)(`span`,{className:`label`,children:`Category`})}),(0,x.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:lf.map(e=>(0,x.jsxs)(`button`,{className:`chip cat-chip${e.neutral?` neutral`:``}`,"data-on":b.category===e.key,disabled:n,style:{"--cat":e.color},onClick:()=>r(n=>kp(n,t,b.category===e.key?null:e.key)),title:`${e.label} (${e.en})`,children:[(0,x.jsx)(`span`,{className:`cat-chip__dot`}),e.label]},e.key))}),b.status!==`white`&&(0,x.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,style:{color:`var(--text-muted)`},children:[(0,x.jsx)(`input`,{type:`range`,min:0,max:100,step:5,value:O,disabled:n,className:`flex-1`,title:`進捗 (ドラッグで入力)`,onChange:e=>r(n=>ap(n,t,Number(e.target.value),`human`),{history:!1}),onMouseUp:e=>r(n=>ap(n,t,Number(e.target.value),`human`))}),(0,x.jsxs)(`span`,{style:{minWidth:36,textAlign:`right`},children:[O,`%`]}),typeof b.progress==`number`?(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,title:`手入力をやめて、下の階層から自動で計算する`,onClick:()=>r(e=>ap(e,t,null,`human`)),children:`Auto`}):C.length>0?(0,x.jsxs)(`span`,{title:`下の階層の完了数`,children:[E.white,`/`,E.total]}):null]}),b.activity&&(0,x.jsxs)(`div`,{className:`flex flex-col gap-1 pl-2`,style:{borderLeft:`3px solid ${b.activity.state===`needs_decision`?`var(--accent)`:`var(--primary)`}`},children:[(0,x.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,children:[(0,x.jsx)(`span`,{className:`tl-actor`,children:yh(b.activity.actor)}),(0,x.jsx)(`b`,{children:xh[b.activity.state]}),(0,x.jsx)(`span`,{style:{color:`var(--text-muted)`},children:Ch(b.activity.since)}),!n&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm ml-auto`,title:`活動の印を消す`,onClick:()=>r(e=>gp(e,t)),children:`×`})]}),b.activity.note&&b.activity.state!==`needs_decision`&&(0,x.jsx)(`div`,{className:`text-[13px]`,children:b.activity.note})]}),D.map(n=>(0,x.jsx)(Tg,{project:e,blockId:t,decisionId:n.id},n.id)),b.decisions.filter(e=>e.answer!==void 0).length>0&&(0,x.jsxs)(`details`,{className:`text-[12px]`,children:[(0,x.jsxs)(`summary`,{style:{cursor:`pointer`,color:`var(--text-muted)`},children:[`判断の記録 (`,b.decisions.filter(e=>e.answer!==void 0).length,`)`]}),(0,x.jsx)(`div`,{className:`flex flex-col gap-3 mt-2`,children:b.decisions.filter(e=>e.answer!==void 0).map(n=>(0,x.jsx)(Tg,{project:e,blockId:t,decisionId:n.id},n.id))})]})]}),_===`owner`&&(0,x.jsxs)(`section`,{className:`sec`,children:[(0,x.jsx)(`div`,{className:`sec__head`,children:(0,x.jsx)(`span`,{className:`label`,children:`Owner`})}),(0,x.jsxs)(`div`,{className:`flex items-center gap-1 flex-wrap`,children:[b.assigneeIds.map(t=>{let r=e.members.find(e=>e.id===t);return r?(0,x.jsxs)(`span`,{className:`chip`,"data-on":r.id===o,style:{cursor:`default`},title:r.id===o?`${r.name} (自分)`:r.name,children:[(0,x.jsx)(`span`,{className:`avatar`,style:{background:r.color,width:16,height:16,fontSize:9},children:r.name.slice(0,1)}),r.name,!n&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,style:{padding:`0 2px`},title:`外す`,onClick:()=>j(r.id),children:`×`})]},t):null}),b.assigneeIds.length===0&&(0,x.jsx)(`span`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:`未担当`}),!n&&o&&!b.assigneeIds.includes(o)&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>j(o),title:`自分を担当にする`,children:`Me`})]}),!n&&(0,x.jsxs)(`div`,{className:`relative`,children:[(0,x.jsx)(`input`,{className:`input`,placeholder:e.members.length===0?`名前を打って Enter で登録`:`名前で検索して Enter で割り当て`,value:h,onChange:e=>g(e.target.value),onKeyDown:e=>{if(e.key===`Escape`){g(``);return}if(e.key!==`Enter`)return;let n=S[0];if(n){b.assigneeIds.includes(n.id)||j(n.id),g(``);return}let i=h.trim();i&&(r(e=>{let n=ep(e,i,Ig[e.members.length%Ig.length]);return Hf(n.project,t,{assigneeIds:[...n.project.blocks[t].assigneeIds,n.memberId]})}),g(``))}}),h.trim()&&(0,x.jsxs)(`div`,{className:`card absolute left-0 right-0 mt-1 p-1 flex flex-col z-30`,style:{maxHeight:220,overflow:`auto`},children:[S.map(e=>(0,x.jsxs)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onMouseDown:e=>e.preventDefault(),onClick:()=>{b.assigneeIds.includes(e.id)||j(e.id),g(``)},children:[(0,x.jsx)(`span`,{className:`avatar`,style:{background:e.color,width:16,height:16,fontSize:9,marginRight:6},children:e.name.slice(0,1)}),e.name]},e.id)),S.length===0&&(0,x.jsxs)(`div`,{className:`text-[12px] p-1`,style:{color:`var(--text-muted)`},children:[`見つかりません。Enter で「`,h.trim(),`」を登録して割り当て`]})]})]})]}),_===`dates`&&(0,x.jsxs)(`section`,{className:`sec`,children:[(0,x.jsx)(`div`,{className:`sec__head`,children:(0,x.jsx)(`span`,{className:`label`,children:`Schedule`})}),(0,x.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-3 gap-y-1 text-[12px]`,children:[(0,x.jsxs)(`label`,{className:`flex items-center gap-2 col-span-2`,children:[(0,x.jsx)(`span`,{style:{color:`var(--text-muted)`,minWidth:32},children:`開始`}),(0,x.jsx)(dg,{value:b.startDate??``,disabled:n,onChange:e=>r(n=>Ap(n,t,{startDate:e||null},`human`))})]}),(0,x.jsxs)(`label`,{className:`flex items-center gap-2 col-span-2`,children:[(0,x.jsx)(`span`,{style:{color:jp(b)?`var(--danger)`:`var(--text-muted)`,minWidth:32},children:`期日`}),(0,x.jsx)(dg,{value:b.dueDate??``,disabled:n,danger:jp(b),onChange:e=>r(n=>Ap(n,t,{dueDate:e||null},`human`))})]}),(0,x.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(`span`,{style:{color:`var(--text-muted)`,minWidth:32},children:`見積`}),(0,x.jsx)(`input`,{type:`number`,min:0,step:.5,className:`input input-plain`,placeholder:`h`,value:b.estimateHours??``,disabled:n,onChange:e=>r(n=>Ap(n,t,{estimateHours:e.target.value===``?null:Number(e.target.value)},`human`))}),(0,x.jsx)(`span`,{style:{color:`var(--text-muted)`},children:`h`})]}),(0,x.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(`span`,{style:{color:`var(--text-muted)`,minWidth:32},children:`実績`}),(0,x.jsx)(`input`,{type:`number`,min:0,step:.5,className:`input input-plain`,placeholder:`h`,value:b.actualHours??``,disabled:n,onChange:e=>r(n=>Ap(n,t,{actualHours:e.target.value===``?null:Number(e.target.value)},`human`))}),(0,x.jsx)(`span`,{style:{color:`var(--text-muted)`},children:`h`})]})]}),b.dueDate&&b.status!==`white`&&(()=>{let e=Mp(b);return e===null?null:(0,x.jsx)(`div`,{className:`text-[12px]`,style:{color:e<0?`var(--danger)`:`var(--text-muted)`},children:e<0?`期日を ${-e} 日過ぎています`:e===0?`期日は今日です`:`期日まであと ${e} 日`})})()]}),_===`io`&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(lg,{project:e,blockId:t,direction:`in`,readonly:n,title:`Inputs`}),(0,x.jsx)(lg,{project:e,blockId:t,direction:`out`,readonly:n,title:`Outputs`,allowAdd:Yf(e,t)})]}),_===`more`&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`section`,{className:`sec`,children:[(0,x.jsx)(`div`,{className:`sec__head`,children:(0,x.jsx)(`span`,{className:`label`,children:`Issue`})}),(0,x.jsx)(`input`,{className:`input`,placeholder:`JIRA / Redmine / GitHub Issue の URL`,value:b.issue??``,disabled:n,onChange:e=>r(n=>Hf(n,t,{issue:e.target.value}),{history:!1}),onBlur:e=>r(n=>Hf(n,t,{issue:e.target.value.trim()||void 0}))}),b.issue&&(0,x.jsxs)(`a`,{className:`text-[12px] underline`,href:b.issue,target:`_blank`,rel:`noreferrer`,style:{color:`var(--primary-strong)`},children:[`開く: `,$p(b.issue)]})]}),(0,x.jsxs)(`section`,{className:`sec`,children:[(0,x.jsxs)(`div`,{className:`sec__head`,children:[(0,x.jsx)(`span`,{className:`label`,children:`AI`}),(0,x.jsxs)(`button`,{className:`btn btn-sm`,"data-on":s,onClick:()=>c(!s),title:`この箱の入出力と位置づけを Markdown にしてコピーして AI に渡す`,children:[`Copy for AI `,s?`▴`:`▾`]})]}),s&&(0,x.jsxs)(`div`,{className:`flex flex-col pl-2`,style:{borderLeft:`3px solid var(--line-soft)`},children:[(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:()=>ee(`plan`),children:`手順を提案してもらう (コピー)`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:()=>ee(`decompose`),children:`分解案を JSON でもらう (コピー)`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:()=>ee(`review`),children:`入出力の抜けを指摘してもらう (コピー)`})]}),l&&(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`textarea`,{className:`input`,style:{minHeight:180,fontSize:12},readOnly:!0,value:Pg(e,t,l)}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>u(null),children:`Close`})]})]}),(0,x.jsxs)(`section`,{className:`sec`,children:[(0,x.jsxs)(`div`,{className:`sec__head`,children:[(0,x.jsxs)(`span`,{className:`label`,children:[`Notes`,b.description||b.artifacts.length>0?` *`:``]}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>f(!d),children:d?`▴`:`▾`})]}),d&&(0,x.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,x.jsx)(`textarea`,{className:`input`,placeholder:`メモ (入力から出力をどう作るか)`,value:b.description,disabled:n,onChange:e=>r(n=>Hf(n,t,{description:e.target.value}))}),(0,x.jsx)(cg,{artifacts:b.artifacts,readonly:n,addLabel:`Link`,onChange:e=>r(n=>Hf(n,t,{artifacts:e}))})]})]})]})]})}function Jg({project:e,edgeId:t}){let n=$(e=>e.readonly),r=$(e=>e.apply),i=$(e=>e.select),a=e.edges[t],o=e.ports[a.from.portId],s=e.ports[a.to.portId],c=t=>t===`root`?`プロジェクト`:e.blocks[t]?.title??`?`;return(0,x.jsxs)(`div`,{className:`flex flex-col gap-3 p-3`,children:[(0,x.jsx)(Ug,{title:`Wire`}),(0,x.jsxs)(`div`,{className:`text-[13px]`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`b`,{children:c(o.blockId)}),`「`,o.name,`」`]}),(0,x.jsx)(`div`,{className:`my-1`,style:{color:`var(--text-muted)`},children:`↓`}),(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`b`,{children:c(s.blockId)}),`「`,s.name,`」`]})]}),a.auto?(0,x.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:`自動の線。手動でつなぐと置き換わります。`}):!n&&(0,x.jsx)(`button`,{className:`btn btn-sm self-start`,onClick:()=>{i({}),r(e=>$f(e,t))},children:`Disconnect`})]})}function Yg({project:e,onToggleDrawer:t,onHelp:n}){let r=$(e=>e.readonly),i=$(e=>e.ephemeral),a=$(e=>e.saveState),o=$(e=>e.apply),s=$(e=>e.undo),c=$(e=>e.redo),l=$(e=>e.past.length),u=$(e=>e.future.length),d=$(e=>e.select),f=$(e=>e.focusBlock),p=$(e=>e.selection),m=$(e=>e.closeProject),h=$(e=>e.importJSON),g=$(e=>e.copyToMine),_=$(e=>e.setToast),[v,b]=(0,y.useState)(pg()),[S,C]=(0,y.useState)(!1),[w,T]=(0,y.useState)(``),[E,D]=(0,y.useState)(!1),O=(0,y.useRef)(null),k=w.trim()?Np(e,w,12):[],A=e=>{d({blockId:e}),f(e),T(``),D(!1)};(0,y.useEffect)(()=>{let e=e=>{let t=e.target;(!t||t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`)&&e.key===`/`&&(e.preventDefault(),D(!0),setTimeout(()=>O.current?.focus(),0))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,y.useEffect)(()=>{let e=()=>C(!1);return S&&window.addEventListener(`click`,e),()=>window.removeEventListener(`click`,e)},[S]);let j=()=>{let e=v===`dark`?`light`:`dark`;mg(e),b(e)},M=()=>{let e=prompt(`追加するプロジェクトの名前 (リポジトリごとに 1 つなど)`);e?.trim()&&o(t=>{let n=bf(t,e.trim());return setTimeout(()=>{d({blockId:n.blockId}),f(n.blockId)},0),n.project})},ee=()=>{let t=eh(e,p,$.getState().viewScope);o(e=>{let n=Q(e,{parentId:t,title:`新しいブロック`}),r=structuredClone(n.project);return r.blocks[t]&&(r.blocks[t].collapsed=!1),setTimeout(()=>{d({blockId:n.blockId}),f(n.blockId)},0),r})},N=()=>gg(`${yg(e.name)}.boxglow.json`,dp(e),`application/json`),P=()=>gg(`${yg(e.name)}.md`,Ng(e),`text/markdown`),te=async()=>{_(await _g(Fg(e,p.blockId??`root`))?`Mermaid をコピーしました`:`コピーできませんでした`)},ne=async()=>{let e=await vg(`.json,application/json`);if(e)try{await h(e)}catch(e){_(e instanceof Error?e.message:String(e))}},re=$(e=>e.fileName),ie=$(e=>e.editMode),F=$(e=>e.setEditMode),ae=$(e=>e.saveNow),oe=r?`Read only`:i?`Sample (not saved)`:a===`saving`?`Saving…`:a===`unsaved`?`Unsaved`:`Saved`,se=i?`サンプルは保存されません。Save で自分のプロジェクトとして保存`:re?`${re} に自動で保存します (変更から 1 秒後)。Save で今すぐ書きます`:`このブラウザに自動で保存します`,ce=Cp(e),le=ce.working.length+ce.blocked.length;return(0,x.jsxs)(`header`,{className:`flex items-center gap-3 px-3 h-full`,style:{paddingTop:9,paddingBottom:7,borderBottom:`2px solid var(--line)`,background:`var(--bg-card)`},children:[(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:t,title:`階層 / 絞り込み / メンバー / 部品`,children:`☰`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:m,title:`Home (プロジェクト一覧へ)`,"aria-label":`Home`,children:(0,x.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,x.jsx)(`path`,{d:`M3 11.5 12 4l9 7.5`}),(0,x.jsx)(`path`,{d:`M5.5 10.5V20h13v-9.5`}),(0,x.jsx)(`path`,{d:`M10 20v-5h4v5`})]})}),(0,x.jsxs)(`span`,{className:`save-chip ${a===`unsaved`?`unsaved`:``}`,title:se,children:[re&&(0,x.jsx)(`span`,{className:`save-chip__file`,children:re}),(0,x.jsx)(`span`,{children:oe})]}),i&&!r&&(0,x.jsx)(`button`,{className:`btn btn-sm`,onClick:g,title:`自分のプロジェクトとして保存`,children:`Save`}),!i&&!r&&(0,x.jsx)(`button`,{className:`btn btn-sm`,onClick:ae,disabled:a===`saved`||a===`saving`,title:se,children:`Save`}),(0,x.jsxs)(`button`,{className:`summary-chip`,"data-on":p.timeline,onClick:()=>d({timeline:!p.timeline}),title:`今の状況 (作業中・判断待ち・ログ)`,children:[le>0&&(0,x.jsx)(`span`,{className:`dot`}),le>0&&(0,x.jsxs)(`span`,{children:[(0,x.jsx)(`span`,{className:`summary-chip__txt`,children:`作業中 `}),le]}),ce.decisions.length>0&&(0,x.jsx)(`span`,{className:`dot decision`}),ce.decisions.length>0&&(0,x.jsxs)(`span`,{children:[(0,x.jsx)(`span`,{className:`summary-chip__txt`,children:`判断待ち `}),ce.decisions.length]}),le===0&&ce.decisions.length===0&&(0,x.jsx)(`span`,{children:`Activity`})]}),(0,x.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[!r&&(0,x.jsxs)(`button`,{className:`mode-toggle`,"data-on":ie,onClick:()=>F(!ie),title:ie?`Edit モード: ドラッグで移動・結線・階層移動ができます。押すと View (閲覧) に`:`View モード: ドラッグでの編集は効きません。押すと Edit に`,children:[(0,x.jsx)(`span`,{className:`mode-toggle__knob`}),(0,x.jsx)(`span`,{children:ie?`Edit`:`View`})]}),(0,x.jsxs)(`div`,{className:`relative`,children:[(0,x.jsx)(`input`,{ref:O,className:`input search-box`,placeholder:`Search ID / 題名`,value:w,onChange:e=>{T(e.target.value),D(!0)},onFocus:()=>D(!0),onKeyDown:e=>{e.key===`Enter`&&k[0]&&A(k[0].id),e.key===`Escape`&&(D(!1),T(``),e.target.blur())},onBlur:()=>setTimeout(()=>D(!1),150)}),E&&w.trim()&&k.length>0&&(0,x.jsx)(`div`,{className:`card absolute right-0 mt-1 p-1 flex flex-col z-30`,style:{minWidth:280,maxHeight:320,overflow:`auto`},children:k.map(e=>(0,x.jsxs)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onMouseDown:e=>e.preventDefault(),onClick:()=>A(e.id),children:[(0,x.jsx)(`span`,{className:`chip`,style:{fontFamily:`ui-monospace, monospace`,marginRight:6},children:e.key}),(0,x.jsx)(`span`,{className:`truncate`,children:e.title})]},e.id))}),E&&w.trim()&&k.length===0&&(0,x.jsx)(`div`,{className:`card absolute right-0 mt-1 p-2 text-[12px] z-30`,style:{minWidth:200,color:`var(--text-muted)`},children:`見つかりません`})]}),!r&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:ee,title:`ブロックを追加 (N)。箱を選んでいればその中に、選んでいなければプロジェクトの中に`,children:`+ Block`}),(0,x.jsx)(`button`,{className:`btn btn-sm`,onClick:M,title:`最上位にプロジェクトの箱を足す (リポジトリごとに 1 つなど)`,children:`+ Project`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm hidden md:inline-flex`,onClick:s,disabled:l===0,title:`元に戻す (Ctrl+Z)`,children:`↶`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm hidden md:inline-flex`,onClick:c,disabled:u===0,title:`やり直す (Ctrl+Y)`,children:`↷`})]}),(0,x.jsxs)(`div`,{className:`relative`,children:[(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:e=>{e.stopPropagation(),C(!S)},title:`Menu`,children:`⋯`}),S&&(0,x.jsxs)(`div`,{className:`card absolute right-0 mt-1 p-1 flex flex-col z-30`,style:{minWidth:220},children:[!r&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:()=>o(e=>um(Ef(e))),title:`依存関係で並べ直す (箱は畳んだ前提)`,children:`Auto Layout`}),!r&&(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:M,title:`同じファイルにプロジェクトの箱を足す`,children:`New Project`}),!r&&(0,x.jsx)(`div`,{style:{borderTop:`1px solid var(--line-soft)`,margin:`4px 0`}}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:N,children:`Export JSON`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:P,children:`Export Markdown`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:te,children:`Copy Mermaid`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:ne,children:`Import JSON`}),(0,x.jsx)(`div`,{style:{borderTop:`1px solid var(--line-soft)`,margin:`4px 0`}}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:n,children:`Help`}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm justify-start`,onClick:m,children:`Home`})]})]}),(0,x.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:j,title:v===`dark`?`Light mode`:`Dark mode`,children:v===`dark`?`☀`:`☾`})]})]})}var Xg=240;function Zg({project:e,majors:t,scope:n,onSelect:r}){let i=(0,y.useRef)(null),[a,o]=(0,y.useState)(!1),[s,c]=(0,y.useState)(!1),[l,u]=(0,y.useState)(!1),d=()=>{let e=i.current;e&&(o(e.scrollLeft>1),c(e.scrollLeft+e.clientWidth<e.scrollWidth-1))};(0,y.useEffect)(()=>{d();let e=i.current;if(!e)return;let t=new ResizeObserver(d);return t.observe(e),()=>t.disconnect()},[t.length]),(0,y.useEffect)(()=>{(i.current?.querySelector(`.canvas-tab[data-on="true"]`))?.scrollIntoView({inline:`nearest`,block:`nearest`}),setTimeout(d,0)},[n]),(0,y.useEffect)(()=>{if(!l)return;let e=e=>{e.target.closest?.(`.tab-list, .tab-list-btn`)||u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return window.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t)}},[l]);let f=e=>i.current?.scrollBy({left:e,behavior:`smooth`}),p=e=>{r(e),u(!1)};return(0,x.jsxs)(`div`,{className:`canvas-tabs`,role:`tablist`,children:[(0,x.jsxs)(`div`,{className:`tab-nav`,children:[(0,x.jsx)(`button`,{className:`tab-nav-btn tab-list-btn`,"data-on":l,onClick:()=>u(e=>!e),title:`タブの一覧 (押して選ぶ)`,children:`≡`}),(0,x.jsx)(`button`,{className:`tab-nav-btn`,disabled:!a,onClick:()=>f(-240),title:`左へ`,children:`◀`}),(0,x.jsx)(`button`,{className:`tab-nav-btn`,disabled:!s,onClick:()=>f(Xg),title:`右へ`,children:`▶`})]}),(0,x.jsxs)(`div`,{className:`tab-strip`,ref:i,onScroll:d,children:[(0,x.jsx)(`button`,{className:`canvas-tab`,role:`tab`,"data-on":n===null,onClick:()=>p(null),title:`大項目の一覧を俯瞰する (中はそれぞれのタブで)`,children:`All`}),t.map(e=>(0,x.jsxs)(`button`,{className:`canvas-tab`,role:`tab`,"data-on":n===e.id,onClick:()=>p(e.id),title:`${e.title} の中を見る`,children:[(0,x.jsx)(Dh,{status:e.status}),(0,x.jsx)(`span`,{className:`truncate`,children:e.title})]},e.id))]}),l&&(0,x.jsxs)(`div`,{className:`tab-list card`,role:`menu`,children:[(0,x.jsxs)(`button`,{className:`tab-list-row`,"data-on":n===null,onClick:()=>p(null),children:[(0,x.jsx)(`span`,{className:`tab-list-icon`,children:`⊞`}),(0,x.jsx)(`span`,{className:`truncate`,children:`All`})]}),t.map(t=>{let r=ip(e,t.id);return(0,x.jsxs)(`button`,{className:`tab-list-row`,"data-on":n===t.id,onClick:()=>p(t.id),title:t.title,children:[(0,x.jsx)(Dh,{status:t.status}),(0,x.jsx)(`span`,{className:`truncate`,children:t.title}),(0,x.jsx)(`span`,{className:`tab-list-prog`,children:r.total>0?`${r.percent}%`:``})]},t.id)})]})]})}function Qg(e,t,n,r){try{let i=Number(localStorage.getItem(e));return Number.isFinite(i)&&i>=n&&i<=r?i:t}catch{return t}}function $g(e,t){try{localStorage.setItem(e,String(t))}catch{}}var e_={min:260,max:760,def:320},t_={min:220,max:640,def:280};function n_(){let e=$(e=>e.project),t=th(),n=$(e=>e.embed),r=$(e=>e.readonly),i=$(e=>e.toast),a=$(e=>e.setToast),o=$(e=>e.selection),s=$(e=>e.select),c=$(e=>e.focusBlock),l=$(e=>e.apply),u=$(e=>e.undo),d=$(e=>e.redo),f=$(e=>e.setMode),p=$(e=>e.openSample),m=$(e=>e.openExample),h=$(e=>e.openProject),g=$(e=>e.openFromServer),_=$(e=>e.viewScope),v=$(e=>e.setViewScope),[b,S]=(0,y.useState)(!1),[C,w]=(0,y.useState)(()=>Qg(`boxglow:rightW`,e_.def,e_.min,e_.max)),[T,E]=(0,y.useState)(()=>Qg(`boxglow:drawerW`,t_.def,t_.min,t_.max)),D=(0,y.useCallback)(e=>{w(e),$g(`boxglow:rightW`,e)},[]),O=(0,y.useCallback)(e=>{E(e),$g(`boxglow:drawerW`,e)},[]),[k,A]=(0,y.useState)(!1),[j,M]=(0,y.useState)({...Rg,statuses:new Set(Rg.statuses)});(0,y.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get(`view`)===`article`,n=t||e.get(`embed`)===`1`;f({embed:n,readonly:t||e.get(`readonly`)===`1`});let r=e.get(`theme`);(r===`dark`||r===`light`)&&mg(r,!1);let i=null;if(n&&window.parent!==window)try{let e=window.parent.document.documentElement,t=()=>{let t=e.dataset.theme;(t===`dark`||t===`light`)&&mg(t,!1)};t(),i=new MutationObserver(t),i.observe(e,{attributes:!0,attributeFilter:[`data-theme`]})}catch{}if(t||e.get(`demo`)===`daw`)m();else if(e.get(`demo`)===`1`)p();else if(e.get(`serve`)===`1`)g();else{let e=window.location.hash.match(/p=([\w-]+)/);e&&h(e[1])}return()=>i?.disconnect()},[f,p,m,h,g]),(0,y.useEffect)(()=>{if(!i)return;let e=setTimeout(()=>a(null),3200);return()=>clearTimeout(e)},[i,a]),(0,y.useEffect)(()=>{let e=e=>{let t=e.target;if(t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.tagName===`SELECT`||t.isContentEditable))return;let n=$.getState().project;if(!n)return;let i=$.getState().selection;if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`z`)e.preventDefault(),e.shiftKey?d():u();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`y`)e.preventDefault(),d();else if(e.key===`Delete`||e.key===`Backspace`){if(r||!$.getState().editMode)return;if(i.edgeId){let e=n.edges[i.edgeId];e&&!e.auto&&(s({}),l(e=>$f(e,i.edgeId)))}else if(i.blockId){let e=n.blocks[i.blockId],t=Object.values(n.blocks).filter(e=>e.parentId===i.blockId).length;e&&(t===0||confirm(`「${e.title}」と下の階層のブロックを削除します。よろしいですか?`))&&(s({}),l(e=>Gf(e,i.blockId)))}}else if(e.key.toLowerCase()===`n`&&!e.ctrlKey&&!e.metaKey){if(r)return;let e=eh(n,i,$.getState().viewScope);l(t=>{let n=Q(t,{parentId:e,title:`新しいブロック`}),r=structuredClone(n.project);return r.blocks[e]&&(r.blocks[e].collapsed=!1),setTimeout(()=>{s({blockId:n.blockId}),c(n.blockId)},0),r})}else e.key===`Escape`&&(s({}),A(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[l,u,d,s,r,c]);let ee=(0,y.useMemo)(()=>!e||Bg(j)?null:t=>zg(e,t,j),[e,j]),N=(0,y.useCallback)(()=>S(e=>!e),[]),P=(0,y.useCallback)(()=>S(!0),[]),te=e?ip(e,J):null,ne=(0,y.useMemo)(()=>{let e=new URL(window.location.href);return e.searchParams.delete(`embed`),e.searchParams.delete(`readonly`),e.searchParams.delete(`view`),e.searchParams.set(`demo`,`daw`),e.toString()},[]),re=!!e&&!n&&(o.blockId!==null||o.edgeId!==null||o.terminal!==null||o.project||o.timeline),ie=[`app-grid`,n?`embed`:``,re?``:`no-right`].filter(Boolean).join(` `),F=(0,y.useMemo)(()=>e?Cf(e):[],[e]),ae=!!e&&F.length>0,oe=_&&e?.blocks[_]?_:null,se=(0,y.useMemo)(()=>e&&oe?Of(e,oe):[],[e,oe]),ce=se[0]?.id??null;return(0,x.jsxs)(`div`,{className:ie,style:{"--right-w":`${C}px`},children:[(0,x.jsx)(`div`,{className:`app-top`,children:e&&!n&&(0,x.jsx)(Yg,{project:e,onToggleDrawer:N,onHelp:()=>A(!0)})}),(0,x.jsxs)(`main`,{className:`app-main relative min-w-0 min-h-0`,children:[(0,x.jsxs)(`div`,{className:`canvas-wrap`,children:[e&&(0,x.jsx)(vd,{children:(0,x.jsx)(sg,{project:t??e,matcher:ee})}),e&&b&&!n&&(0,x.jsx)(Hg,{project:t??e,filter:j,onFilter:M,onClose:()=>S(!1),width:T}),e&&b&&!n&&(0,x.jsx)(ug,{side:`right`,width:T,min:t_.min,max:t_.max,onWidth:O,style:{left:8+T-5,top:8,bottom:8}}),e&&(se.length>0||!n&&!Bg(j))&&(0,x.jsxs)(`div`,{className:`scope-path`,style:{left:b&&!n?8+T+8:8},children:[se.length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`button`,{className:`scope-crumb`,onClick:()=>v(null),title:`大項目の一覧へ`,children:`All`}),se.map((e,t)=>(0,x.jsxs)(`span`,{className:`contents`,children:[(0,x.jsx)(`span`,{className:`scope-sep`,children:`›`}),t===se.length-1?(0,x.jsx)(`span`,{className:`scope-crumb current`,title:e.title,children:e.title}):(0,x.jsx)(`button`,{className:`scope-crumb`,onClick:()=>v(e.id),title:`${e.title} へ戻る`,children:e.title})]},e.id))]}),!n&&!Bg(j)&&(0,x.jsx)(`button`,{className:`chip`,"data-on":`true`,onClick:()=>M({...Rg,statuses:new Set(Rg.statuses)}),title:`絞り込みを解除`,children:`Filtered ×`})]}),n&&(0,x.jsx)(`a`,{className:`btn btn-accent absolute top-2 right-2 z-10`,href:ne,target:`_blank`,rel:`noopener noreferrer`,children:`Open full ↗`}),n&&se.length===0&&(0,x.jsx)(`span`,{className:`absolute top-2 left-2 z-10 font-head text-[14px] px-2 py-1 rounded-lg`,style:{background:`var(--bg-card)`,border:`2px solid var(--line)`},children:`Boxglow`})]}),ae&&(0,x.jsx)(Zg,{project:e,majors:F,scope:ce,onSelect:v}),!e&&!n&&(0,x.jsx)(bg,{}),k&&(0,x.jsx)(`div`,{className:`modal-backdrop`,onClick:()=>A(!1),children:(0,x.jsxs)(`div`,{className:`card modal p-5 flex flex-col gap-2`,style:{width:420},onClick:e=>e.stopPropagation(),children:[(0,x.jsx)(`div`,{className:`font-head text-[16px]`,children:`Help`}),(0,x.jsx)(`table`,{className:`help-table`,children:(0,x.jsxs)(`tbody`,{children:[(0,x.jsxs)(`tr`,{children:[(0,x.jsx)(`td`,{children:`ブロックを置く`}),(0,x.jsxs)(`td`,{children:[(0,x.jsx)(`span`,{className:`kbd`,children:`N`}),` または「+ Block」(選んだ箱の中に)`]})]}),(0,x.jsxs)(`tr`,{children:[(0,x.jsx)(`td`,{children:`Edit / View`}),(0,x.jsx)(`td`,{children:`上の切替。Edit のときだけドラッグで移動・結線・階層移動と Del が効く`})]}),(0,x.jsxs)(`tr`,{children:[(0,x.jsx)(`td`,{children:`結線`}),(0,x.jsx)(`td`,{children:`丸から相手の丸、または相手の箱へドラッグ (近くで離せばつながる)`})]}),(0,x.jsxs)(`tr`,{children:[(0,x.jsx)(`td`,{children:`階層を移す`}),(0,x.jsx)(`td`,{children:`箱をドラッグして別の箱の中に落とす`})]}),(0,x.jsxs)(`tr`,{children:[(0,x.jsx)(`td`,{children:`下の階層を畳む / 展開`}),(0,x.jsx)(`td`,{children:`ブロックをダブルクリック`})]}),(0,x.jsxs)(`tr`,{children:[(0,x.jsx)(`td`,{children:`削除`}),(0,x.jsx)(`td`,{children:(0,x.jsx)(`span`,{className:`kbd`,children:`Del`})})]}),(0,x.jsxs)(`tr`,{children:[(0,x.jsx)(`td`,{children:`元に戻す / やり直す`}),(0,x.jsxs)(`td`,{children:[(0,x.jsx)(`span`,{className:`kbd`,children:`Ctrl+Z`}),` / `,(0,x.jsx)(`span`,{className:`kbd`,children:`Ctrl+Y`})]})]}),(0,x.jsxs)(`tr`,{children:[(0,x.jsx)(`td`,{children:`選択を解除`}),(0,x.jsx)(`td`,{children:(0,x.jsx)(`span`,{className:`kbd`,children:`Esc`})})]})]})}),(0,x.jsx)(`div`,{className:`text-[12px]`,style:{color:`var(--text-muted)`},children:`箱は「入力から出力を作るタスク」。出力を先に決め、大きな箱は「分解する」で中に箱を置く。供給元の無い入力は左端の入力まで自動で点線が伸びる。`}),(0,x.jsx)(`button`,{className:`btn btn-sm self-end`,onClick:()=>A(!1),children:`Close`})]})})]}),(0,x.jsxs)(`aside`,{className:`panel right ${re?``:`hidden-panel`}`,children:[e&&re&&(0,x.jsx)(ug,{side:`left`,width:C,min:e_.min,max:e_.max,onWidth:D}),e&&re&&(0,x.jsx)(Wg,{project:e,onOpenDrawer:P})]}),(0,x.jsxs)(`footer`,{className:`app-footer flex items-center gap-3 px-3 text-[12px]`,style:{borderTop:`2px solid var(--line)`,background:`var(--bg-card)`},children:[e&&te&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`span`,{className:`font-head`,children:[`Done `,te.white,` / `,te.total,` · `,te.percent,`%`]}),(0,x.jsx)(`div`,{className:`progress-bar`,style:{width:160},children:(0,x.jsx)(`span`,{style:{width:`${te.percent}%`}})}),n&&(0,x.jsx)(`a`,{className:`underline`,href:ne,target:`_blank`,rel:`noopener noreferrer`,style:{color:`var(--primary-strong)`},children:`Boxglow で開く`})]}),!e&&(0,x.jsx)(`span`,{style:{color:`var(--text-muted)`},children:`Boxglow`}),(0,x.jsxs)(`span`,{className:`ml-auto text-[10px]`,style:{color:`var(--text-muted)`},title:`ビルド日時 (日本時間)。古い場合は再読み込み (Ctrl+F5) してください`,children:[`build `,`2026-10-03 18:11`]})]}),i&&(0,x.jsx)(`div`,{className:`toast`,role:`status`,children:i})]})}hg(),window.boxglow={store:$},b.createRoot(document.getElementById(`root`)).render((0,x.jsx)(y.StrictMode,{children:(0,x.jsx)(n_,{})}));