wizardflow 0.1.0__py3-none-any.whl
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.
- wizardflow/__init__.py +143 -0
- wizardflow/_render.py +38 -0
- wizardflow/_ui/404.html +25 -0
- wizardflow/_ui/__next.__PAGE__.txt +10 -0
- wizardflow/_ui/__next._full.txt +22 -0
- wizardflow/_ui/__next._head.txt +6 -0
- wizardflow/_ui/__next._index.txt +6 -0
- wizardflow/_ui/__next._tree.txt +5 -0
- wizardflow/_ui/_next/static/chunks/05-c3ty_6dwfk.js +1 -0
- wizardflow/_ui/_next/static/chunks/09s72r58ijxwx.js +1 -0
- wizardflow/_ui/_next/static/chunks/0cz1d0mv5g_q7.js +1 -0
- wizardflow/_ui/_next/static/chunks/0mz_v1wicwnmn.css +2 -0
- wizardflow/_ui/_next/static/chunks/0u1x9l49cgb30.js +1 -0
- wizardflow/_ui/_next/static/chunks/0ux_7aev0a2kt.js +36 -0
- wizardflow/_ui/_next/static/chunks/0vq8h3vx9uqg5.js +114 -0
- wizardflow/_ui/_next/static/chunks/142r2alz4_x6t.js +1 -0
- wizardflow/_ui/_next/static/chunks/14mrh2-p_w84d.js +1 -0
- wizardflow/_ui/_next/static/chunks/18clj6xsyhc_j.css +3 -0
- wizardflow/_ui/_next/static/chunks/2-j1b74l3lxxu.css +1 -0
- wizardflow/_ui/_next/static/chunks/27jktro2p5rq9.js +4 -0
- wizardflow/_ui/_next/static/chunks/2gj5bmeov-r8f.js +2 -0
- wizardflow/_ui/_next/static/chunks/310vm2bl3xxpt.js +31 -0
- wizardflow/_ui/_next/static/chunks/3n7dm2ojtyzwn.js +1 -0
- wizardflow/_ui/_next/static/chunks/turbopack-2fblmukzx7kws.js +1 -0
- wizardflow/_ui/_next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- wizardflow/_ui/_next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- wizardflow/_ui/_next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- wizardflow/_ui/_next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- wizardflow/_ui/_next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- wizardflow/_ui/_next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- wizardflow/_ui/_next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- wizardflow/_ui/_next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- wizardflow/_ui/_next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- wizardflow/_ui/_next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- wizardflow/_ui/_next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- wizardflow/_ui/_next/static/media/icon.3okpzkln1vq00.svg +19 -0
- wizardflow/_ui/_next/static/oQsmH12Xmzb6Zw4-R3ghe/_buildManifest.js +11 -0
- wizardflow/_ui/_next/static/oQsmH12Xmzb6Zw4-R3ghe/_clientMiddlewareManifest.js +1 -0
- wizardflow/_ui/_next/static/oQsmH12Xmzb6Zw4-R3ghe/_ssgManifest.js +1 -0
- wizardflow/_ui/_not-found/__next._full.txt +17 -0
- wizardflow/_ui/_not-found/__next._head.txt +6 -0
- wizardflow/_ui/_not-found/__next._index.txt +6 -0
- wizardflow/_ui/_not-found/__next._not-found/__PAGE__.txt +5 -0
- wizardflow/_ui/_not-found/__next._not-found.txt +5 -0
- wizardflow/_ui/_not-found/__next._tree.txt +2 -0
- wizardflow/_ui/_not-found.html +25 -0
- wizardflow/_ui/_not-found.txt +17 -0
- wizardflow/_ui/icon.svg +19 -0
- wizardflow/_ui/index.html +25 -0
- wizardflow/_ui/index.txt +22 -0
- wizardflow/_ui/opengraph-image +0 -0
- wizardflow/_ui/robots.txt +5 -0
- wizardflow/_ui/sitemap.xml +9 -0
- wizardflow/cli.py +316 -0
- wizardflow/client.py +470 -0
- wizardflow/constants.py +44 -0
- wizardflow/html.py +152 -0
- wizardflow/markdown.py +122 -0
- wizardflow/py.typed +0 -0
- wizardflow-0.1.0.dist-info/METADATA +340 -0
- wizardflow-0.1.0.dist-info/RECORD +64 -0
- wizardflow-0.1.0.dist-info/WHEEL +4 -0
- wizardflow-0.1.0.dist-info/entry_points.txt +2 -0
- wizardflow-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55838,(e,t,n)=>{"use strict";var r=e.r(71645),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,i=r.useEffect,l=r.useLayoutEffect,s=r.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return l(function(){o.value=n,o.getSnapshot=t,u(o)&&c({inst:o})},[e,n,t]),i(function(){return u(o)&&c({inst:o}),e(function(){u(o)&&c({inst:o})})},[e]),s(n),n};n.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},2239,(e,t,n)=>{"use strict";t.exports=e.r(55838)},52822,(e,t,n)=>{"use strict";var r=e.r(71645),o=e.r(2239),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=o.useSyncExternalStore,l=r.useRef,s=r.useEffect,u=r.useMemo,c=r.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=l(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;var h=i(e,(d=u(function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==o&&p.hasValue){var t=p.value;if(o(t,e))return l=t}return l=e}if(t=l,a(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(i=e,t):(i=e,l=n)}var i,l,s=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,r,o]))[0],d[1]);return s(function(){p.hasValue=!0,p.value=h},[h]),c(h),h}},30224,(e,t,n)=>{"use strict";t.exports=e.r(52822)},49813,e=>{e.v({active:"TraceNode-module__ZIDUya__active",dot:"TraceNode-module__ZIDUya__dot",handle:"TraceNode-module__ZIDUya__handle",normal:"TraceNode-module__ZIDUya__normal",recent:"TraceNode-module__ZIDUya__recent",surface:"TraceNode-module__ZIDUya__surface","trace-spin":"TraceNode-module__ZIDUya__trace-spin",wrapper:"TraceNode-module__ZIDUya__wrapper"})},52683,e=>{"use strict";let t;var n,r,o,a,i,l,s,u,c,d,p,h,f,m,g,y,v,b=e.i(43476),x=e.i(932),w=e.i(71645);e.i(47167);var _=e.i(7670),S=e.i(18407),k=e.i(80335),C=e.i(17532);let I=e=>e,M=(t=I,{configure(e){t=e},generate:e=>t(e),reset(){t=I}});var E=e.i(83328),T=e.i(6792);let j={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function R(e,t,n="Mui"){let r=j[t];return r?`${n}-${r}`:`${M.generate(e)}-${t}`}function N(e,t,n="Mui"){let r={};return t.forEach(t=>{r[t]=R(e,t,n)}),r}let A=N("MuiBox",["root"]),z=(0,E.createTheme)(),P=function(e={}){let{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:o}=e,a=(0,S.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(k.default);return w.forwardRef(function(e,i){let l=(0,C.default)(n),{className:s,component:u="div",...c}=e;return(0,b.jsx)(a,{as:u,ref:i,className:(0,_.default)(s,o?o(r):r),theme:t&&l[t]||l,...c})})}({themeId:T.default,defaultTheme:z,defaultClassName:A.root,generateClassName:M.generate});function O(e,t,n){let r={};for(let o in e){let a=e[o],i="",l=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(i+=(!0===l?"":" ")+t(r),l=!1,n&&n[r]&&(i+=" "+n[r]))}r[o]=i}return r}var D=e.i(87357),$=e.i(28731),L=e.i(1396);function B(e){let{variants:t,...n}=e,r={variants:t,style:(0,S.internal_serializeStyles)(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=(0,S.internal_serializeStyles)(e.style))}),r}e.i(56578);let W=(0,e.i(49455).default)();function F(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function H(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Z(e,t,n){let r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Z(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?H(r.style,n):r.style;else{let{variants:e,...o}=r;t=n?H((0,S.internal_serializeStyles)(o),n):o}return V(e,r.variants,[t],n)}return r?.isProcessed?n?H((0,S.internal_serializeStyles)(r.style),n):r.style:n?H((0,S.internal_serializeStyles)(r),n):r}function V(e,t,n=[],r){let o;e:for(let a=0;a<t.length;a+=1){let i=t[a];if("function"==typeof i.props){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(o))continue}else for(let t in i.props)if(e[t]!==i.props[t]&&e.ownerState?.[t]!==i.props[t])continue e;"function"==typeof i.style?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?H((0,S.internal_serializeStyles)(i.style(o)),r):i.style(o))):n.push(r?H((0,S.internal_serializeStyles)(i.style),r):i.style)}return n}var q=e.i(37831);let U=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e},Y=e=>U(e)&&"classes"!==e,X=function(e={}){let{themeId:t,defaultTheme:n=W,rootShouldForwardProp:r=F,slotShouldForwardProp:o=F}=e;function a(e){e.theme=(0,D.default)(e.theme)?n:e.theme[t]||e.theme}return(e,t={})=>{var n,i,l;(0,S.internal_mutateStyles)(e,e=>e.filter(e=>e!==k.default));let{name:s,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:p=!(n=(i=u)?i.charAt(0).toLowerCase()+i.slice(1):i)?null:(e,t)=>t[n],...h}=t,f=s&&s.startsWith("Mui")||u?"components":"custom",m=void 0!==c?c:u&&"Root"!==u&&"root"!==u||!1,g=d||!1,y=F;"Root"===u||"root"===u?y=r:u?y=o:"string"==typeof(l=e)&&l.charCodeAt(0)>96&&(y=void 0);let v=(0,S.default)(e,{shouldForwardProp:y,label:void 0,...h}),b=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return Z(t,e,t.theme.modularCssLayers?f:void 0)};if((0,$.isPlainObject)(e)){let t=B(e);return function(e){return t.variants?Z(e,t,e.theme.modularCssLayers?f:void 0):e.theme.modularCssLayers?H(t.style,f):t.style}}return e},x=(...t)=>{let n=[],r=t.map(b),o=[];if(n.push(a),s&&p&&o.push(function(e){let t=e.theme,n=t.components?.[s]?.styleOverrides;if(!n)return null;let r={};for(let t in n)r[t]=Z(e,n[t],e.theme.modularCssLayers?"theme":void 0);return p(e,r)}),s&&!m&&o.push(function(e){let t=e.theme,n=t?.components?.[s]?.variants;return n?V(e,n,[],e.theme.modularCssLayers?"theme":void 0):null}),g||o.push(k.default),Array.isArray(r[0])){let e,t=r.shift(),a=Array(n.length).fill(""),i=Array(o.length).fill("");(e=[...a,...t,...i]).raw=[...a,...t.raw,...i],n.unshift(e)}let i=v(...n,...r,...o);return e.muiName&&(i.muiName=e.muiName),i};return v.withConfig&&(x.withConfig=v.withConfig),x}}({themeId:T.default,defaultTheme:q.default,rootShouldForwardProp:Y});var K=e.i(78564);function G(...e){let t=w.useRef(void 0),n=w.useCallback(t=>{let n=e.map(e=>{if(null==e)return null;if("function"==typeof e){let n=e(t);return"function"==typeof n?n:()=>{e(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return w.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)}let J=function(e){return"string"==typeof e},Q=function(e,t,n){return void 0===e||J(e)?t:{...t,ownerState:{...t.ownerState,...n}}},ee=function(e,t,n){return"function"==typeof e?e(t,n):e};function et(e,t){let n=e.charCodeAt(2);return"o"===e[0]&&"n"===e[1]&&n>=65&&n<=90&&"function"==typeof t}let en=function(e){if(void 0===e)return{};let t={};for(let n of Object.keys(e))et(n,e[n])&&(t[n]=e[n]);return t},er=function(e){if(void 0===e)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t},eo=function(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:a}=e;if(!t){let e=(0,_.default)(n?.className,a,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},i={...n,...o,...r};return e.length>0&&(i.className=e),Object.keys(t).length>0&&(i.style=t),{props:i,internalRef:void 0}}let i=en({...o,...r}),l=er(r),s=er(o),u=t(i),c=(0,_.default)(u?.className,n?.className,a,o?.className,r?.className),d={...u?.style,...n?.style,...o?.style,...r?.style},p={...u,...n,...s,...l};return c.length>0&&(p.className=c),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:u.ref}};function ea(e,t){let{className:n,elementType:r,ownerState:o,externalForwardedProps:a,internalForwardedProps:i,shouldForwardComponentProp:l=!1,...s}=t,{component:u,slots:c={[e]:void 0},slotProps:d={[e]:void 0},...p}=a,h=c[e]||r,f=ee(d[e],o),{props:{component:m,...g},internalRef:y}=eo({className:n,...s,externalForwardedProps:"root"===e?p:void 0,externalSlotProps:f}),v=G(y,f?.ref,t.ref),b="root"===e?m||u:m,x=Q(h,{..."root"===e&&!u&&!c[e]&&i,..."root"!==e&&!c[e]&&i,...g,...b&&!l&&{as:b},...b&&l&&{component:b},ref:v},o);return[h,x]}function ei(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function el(e,t){return(el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function es(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,el(e,t)}var eu=e.i(74080);let ec=w.default.createContext(null);var ed="unmounted",ep="exited",eh="entering",ef="entered",em="exiting",eg=function(e){function t(t,n){var r,o=e.call(this,t,n)||this,a=n&&!n.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?a?(r=ep,o.appearStatus=eh):r=ef:r=t.unmountOnExit||t.mountOnEnter?ed:ep,o.state={status:r},o.nextCallback=null,o}es(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===ed?{status:ep}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==eh&&n!==ef&&(t=eh):(n===eh||n===ef)&&(t=em)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===eh){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:eu.default.findDOMNode(this);n&&n.scrollTop}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ep&&this.setState({status:ed})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[eu.default.findDOMNode(this),r],a=o[0],i=o[1],l=this.getTimeouts(),s=r?l.appear:l.enter;(e||n)&&1?(this.props.onEnter(a,i),this.safeSetState({status:eh},function(){t.props.onEntering(a,i),t.onTransitionEnd(s,function(){t.safeSetState({status:ef},function(){t.props.onEntered(a,i)})})})):this.safeSetState({status:ef},function(){t.props.onEntered(a)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:eu.default.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:em},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:ep},function(){e.props.onExited(r)})})})):this.safeSetState({status:ep},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:eu.default.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r)return void setTimeout(this.nextCallback,0);if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=o[0],i=o[1];this.props.addEndListener(a,i)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===ed)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,ei(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return w.default.createElement(ec.Provider,{value:null},"function"==typeof n?n(e,r):w.default.cloneElement(w.default.Children.only(n),r))},t}(w.default.Component);function ey(){}function ev(e){return parseInt(w.version,10)>=19?e?.props?.ref||null:e?.ref||null}eg.contextType=ec,eg.propTypes={},eg.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ey,onEntering:ey,onEntered:ey,onExit:ey,onExiting:ey,onExited:ey},eg.UNMOUNTED=ed,eg.EXITED=ep,eg.ENTERING=eh,eg.ENTERED=ef,eg.EXITING=em;var eb=e.i(18145),eb=eb;function ex(e,t){return n=>{if(t){let r=e.current;void 0===n?t(r):t(r,n)}}}function ew(e,t,n,r,o,a){let i="exited"!==e||t?n[e]||n.exited:r;return o||a?{...i,...o,...a}:i}function e_(e,t){let{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:o.transitionTimingFunction??("object"==typeof r?r[t.mode]:r),delay:o.transitionDelay}}let eS={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},ek={opacity:0,visibility:"hidden"},eC=w.forwardRef(function(e,t){let n=(0,eb.default)(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:i,easing:l,in:s,onEnter:u,onEntered:c,onEntering:d,onExit:p,onExited:h,onExiting:f,style:m,timeout:g=r,...y}=e,v=w.useRef(null),x=G(v,ev(i),t),_=ex(v,d),S=ex(v,(e,t)=>{e.scrollTop;let r=e_({style:m,timeout:g,easing:l},{mode:"enter"});e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)}),k=ex(v,c),C=ex(v,f),I=ex(v,e=>{let t=e_({style:m,timeout:g,easing:l},{mode:"exit"});e.style.transition=n.transitions.create("opacity",t),p&&p(e)}),M=ex(v,e=>{e.style.transition="",h&&h(e)});return(0,b.jsx)(eg,{appear:a,in:s,nodeRef:v,onEnter:S,onEntered:k,onEntering:_,onExit:I,onExited:M,onExiting:C,addEndListener:e=>{o&&o(v.current,e)},timeout:g,...y,children:(e,{ownerState:t,...n})=>{let r=ew(e,s,eS,ek,m,i.props.style);return w.cloneElement(i,{style:r,ref:x,...n})}})});function eI(e){return R("MuiBackdrop",e)}N("MuiBackdrop",["root","invisible"]);let eM=X("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),eE=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiBackdrop"}),{children:r,className:o,component:a="div",invisible:i=!1,open:l,slotProps:s={},slots:u={},transitionDuration:c,...d}=n,p={...n,component:a,invisible:i},h=(e=>{let{classes:t,invisible:n}=e;return O({root:["root",n&&"invisible"]},eI,t)})(p),f={component:a,slots:u,slotProps:s},[m,g]=ea("root",{elementType:eM,externalForwardedProps:f,className:(0,_.default)(h.root,o),ownerState:p}),[y,v]=ea("transition",{elementType:eC,externalForwardedProps:f,ownerState:p});return(0,b.jsx)(y,{in:l,timeout:c,...d,...v,children:(0,b.jsx)(m,{...g,ref:t,children:r})})});var eT=e.i(1087),ej=e.i(14266);let eR=ej.default,eN={theme:void 0},eA=function(e){let t,n;return function(r){let o=t;return(void 0===o||r.theme!==n)&&(eN.theme=r.theme,t=o=B(e(eN)),n=r.theme),o}};function ez(e){try{return e.matches(":focus-visible")}catch(e){}return!1}var eP=e.i(95154);let eO=function(e){let t=w.useRef(e);return(0,eP.default)(()=>{t.current=e}),w.useRef((...e)=>(0,t.current)(...e)).current},eD={},e$={};function eL(e,t){let n=w.useRef(e$);return n.current===e$&&(n.current=e(t)),n}class eB{static create(){return new eB}static use(){let e=eL(eB.create).current,[t,n]=w.useState(!1);return e.shouldMount=t,e.setShouldMount=n,w.useEffect(e.mountEffect,[t]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){let e,t,n;return this.mounted||(this.mounted=((n=new Promise((n,r)=>{e=n,t=r})).resolve=e,n.reject=t,n),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}}var eW=e.i(31067);function eF(e,t){var n=Object.create(null);return e&&w.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=t&&(0,w.isValidElement)(e)?t(e):e}),n}function eH(e,t,n){return null!=n[t]?n[t]:e.props[t]}var eZ=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},eV=function(e){function t(t,n){var r=e.call(this,t,n)||this,o=r.handleExited.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}es(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,a=t.handleExited;return{children:t.firstRender?eF(e.children,function(t){return(0,w.cloneElement)(t,{onExited:a.bind(null,t),in:!0,appear:eH(t,"appear",e),enter:eH(t,"enter",e),exit:eH(t,"exit",e)})}):(Object.keys(r=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),a=[];for(var i in e)i in t?a.length&&(o[i]=a,a=[]):a.push(i);var l={};for(var s in t){if(o[s])for(r=0;r<o[s].length;r++){var u=o[s][r];l[o[s][r]]=n(u)}l[s]=n(s)}for(r=0;r<a.length;r++)l[a[r]]=n(a[r]);return l}(o,n=eF(e.children))).forEach(function(t){var i=r[t];if((0,w.isValidElement)(i)){var l=t in o,s=t in n,u=o[t],c=(0,w.isValidElement)(u)&&!u.props.in;s&&(!l||c)?r[t]=(0,w.cloneElement)(i,{onExited:a.bind(null,i),in:!0,exit:eH(i,"exit",e),enter:eH(i,"enter",e)}):s||!l||c?s&&l&&(0,w.isValidElement)(u)&&(r[t]=(0,w.cloneElement)(i,{onExited:a.bind(null,i),in:u.props.in,exit:eH(i,"exit",e),enter:eH(i,"enter",e)})):r[t]=(0,w.cloneElement)(i,{in:!1})}}),r),firstRender:!1}},n.handleExited=function(e,t){var n=eF(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,eW.default)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=ei(e,["component","childFactory"]),o=this.state.contextValue,a=eZ(this.state.children).map(n);return(delete r.appear,delete r.enter,delete r.exit,null===t)?w.default.createElement(ec.Provider,{value:o},a):w.default.createElement(ec.Provider,{value:o},w.default.createElement(t,r,a))},t}(w.default.Component);eV.propTypes={},eV.defaultProps={component:"div",childFactory:function(e){return e}};let eq=[];class eU{static create(){return new eU}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function eY(){var e;let t=eL(eU.create).current;return e=t.disposeEffect,w.useEffect(e,eq),t}var eX=e.i(84364);let eK=N("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),eG=eX.keyframes`
|
|
2
|
+
0% {
|
|
3
|
+
transform: scale(0);
|
|
4
|
+
opacity: 0.1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
100% {
|
|
8
|
+
transform: scale(1);
|
|
9
|
+
opacity: 0.3;
|
|
10
|
+
}
|
|
11
|
+
`,eJ=eX.keyframes`
|
|
12
|
+
0% {
|
|
13
|
+
opacity: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
100% {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
}
|
|
19
|
+
`,eQ=eX.keyframes`
|
|
20
|
+
0% {
|
|
21
|
+
transform: scale(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
50% {
|
|
25
|
+
transform: scale(0.92);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
100% {
|
|
29
|
+
transform: scale(1);
|
|
30
|
+
}
|
|
31
|
+
`,e0=X("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),e1=X(function(e){let{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:a,rippleSize:i,in:l,onExited:s,timeout:u}=e,[c,d]=w.useState(!1),p=(0,_.default)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),h=(0,_.default)(n.child,c&&n.childLeaving,r&&n.childPulsate);return l||c||d(!0),w.useEffect(()=>{if(!l&&null!=s){let e=setTimeout(s,u);return()=>{clearTimeout(e)}}},[s,l,u]),(0,b.jsx)("span",{className:p,style:{width:i,height:i,top:-(i/2)+a,left:-(i/2)+o},children:(0,b.jsx)("span",{className:h})})},{name:"MuiTouchRipple",slot:"Ripple"})`
|
|
32
|
+
opacity: 0;
|
|
33
|
+
position: absolute;
|
|
34
|
+
|
|
35
|
+
&.${eK.rippleVisible} {
|
|
36
|
+
opacity: 0.3;
|
|
37
|
+
transform: scale(1);
|
|
38
|
+
animation-name: ${eG};
|
|
39
|
+
animation-duration: ${550}ms;
|
|
40
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.${eK.ripplePulsate} {
|
|
44
|
+
animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& .${eK.child} {
|
|
48
|
+
opacity: 1;
|
|
49
|
+
display: block;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
border-radius: 50%;
|
|
53
|
+
background-color: currentColor;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
& .${eK.childLeaving} {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
animation-name: ${eJ};
|
|
59
|
+
animation-duration: ${550}ms;
|
|
60
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& .${eK.childPulsate} {
|
|
64
|
+
position: absolute;
|
|
65
|
+
/* @noflip */
|
|
66
|
+
left: 0px;
|
|
67
|
+
top: 0;
|
|
68
|
+
animation-name: ${eQ};
|
|
69
|
+
animation-duration: 2500ms;
|
|
70
|
+
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
|
|
71
|
+
animation-iteration-count: infinite;
|
|
72
|
+
animation-delay: 200ms;
|
|
73
|
+
}
|
|
74
|
+
`,e2=w.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:o,...a}=(0,K.useDefaultProps)({props:e,name:"MuiTouchRipple"}),[i,l]=w.useState([]),s=w.useRef(0),u=w.useRef(null);w.useEffect(()=>{u.current&&(u.current(),u.current=null)},[i]);let c=w.useRef(!1),d=eY(),p=w.useRef(null),h=w.useRef(null),f=w.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:o,rippleSize:a,cb:i}=e;l(e=>[...e,(0,b.jsx)(e1,{classes:{ripple:(0,_.default)(r.ripple,eK.ripple),rippleVisible:(0,_.default)(r.rippleVisible,eK.rippleVisible),ripplePulsate:(0,_.default)(r.ripplePulsate,eK.ripplePulsate),child:(0,_.default)(r.child,eK.child),childLeaving:(0,_.default)(r.childLeaving,eK.childLeaving),childPulsate:(0,_.default)(r.childPulsate,eK.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:o,rippleSize:a},s.current)]),s.current+=1,u.current=i},[r]),m=w.useCallback((e={},t={},r=()=>{})=>{let o,a,i,{pulsate:l=!1,center:s=n||t.pulsate,fakeElement:u=!1}=t;if(e?.type==="mousedown"&&c.current){c.current=!1;return}e?.type==="touchstart"&&(c.current=!0);let m=u?null:h.current,g=m?m.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(!s&&void 0!==e&&(0!==e.clientX||0!==e.clientY)&&(e.clientX||e.touches)){let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;o=Math.round(t-g.left),a=Math.round(n-g.top)}else o=Math.round(g.width/2),a=Math.round(g.height/2);s?(i=Math.sqrt((2*g.width**2+g.height**2)/3))%2==0&&(i+=1):i=Math.sqrt((2*Math.max(Math.abs((m?m.clientWidth:0)-o),o)+2)**2+(2*Math.max(Math.abs((m?m.clientHeight:0)-a),a)+2)**2),e?.touches?null===p.current&&(p.current=()=>{f({pulsate:l,rippleX:o,rippleY:a,rippleSize:i,cb:r})},d.start(80,()=>{p.current&&(p.current(),p.current=null)})):f({pulsate:l,rippleX:o,rippleY:a,rippleSize:i,cb:r})},[n,f,d]),g=w.useCallback(()=>{m({},{pulsate:!0})},[m]),y=w.useCallback((e,t)=>{if(d.clear(),e?.type==="touchend"&&p.current){p.current(),p.current=null,d.start(0,()=>{y(e,t)});return}p.current=null,l(e=>e.length>0?e.slice(1):e),u.current=t},[d]);return w.useImperativeHandle(t,()=>({pulsate:g,start:m,stop:y}),[g,m,y]),(0,b.jsx)(e0,{className:(0,_.default)(eK.root,r.root,o),ref:h,...a,children:(0,b.jsx)(eV,{component:null,exit:!0,children:i})})});function e5(e){return R("MuiButtonBase",e)}let e6=N("MuiButtonBase",["root","disabled","focusVisible"]),e4=X("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${e6.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),e3=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:a,className:i,component:l="button",disabled:s=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:d=!1,focusVisibleClassName:p,focusableWhenDisabled:h,suppressFocusVisible:f=!1,internalNativeButton:m,LinkComponent:g="a",nativeButton:y,onBlur:v,onClick:x,onContextMenu:S,onDragLeave:k,onFocus:C,onFocusVisible:I,onKeyDown:M,onKeyUp:E,onMouseDown:T,onMouseLeave:j,onMouseUp:R,onTouchEnd:N,onTouchMove:A,onTouchStart:z,tabIndex:P=0,TouchRippleProps:D,touchRippleRef:$,type:L,...B}=n,W=!!(B.href||B.to),F=!!B.formAction,H=l;"button"===H&&W&&(H=g);let Z="string"==typeof H?"button"===H:m??!1,V=y??Z,q=eB.use(),U=G(q.ref,$),[Y,X]=w.useState(!1);(s||f)&&Y&&X(!1);let{getButtonProps:J,rootRef:Q}=function(e){let{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:o=!1,disabled:a,type:i,hasFormAction:l=!1,tabIndex:s=0,focusableWhenDisabled:u,stopEventPropagation:c=!1,onBeforeKeyDown:d,onBeforeKeyUp:p}=e,h=w.useRef(null),f=!0===u,m=function(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:a}=e,i=r&&!1!==t,l=r&&!1===t;return w.useMemo(()=>{let e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=o,!a&&n&&(e.tabIndex=t?o:-1)),(a&&(t||i)||!a&&n)&&(e["aria-disabled"]=n),a&&(!t||l)&&(e.disabled=n),e},[r,n,t,i,l,a,o])}({focusableWhenDisabled:f,disabled:a,isNativeButton:t,tabIndex:s}),g=w.useCallback(()=>{let e=h.current;return null==e?t:"BUTTON"===e.tagName||!!("A"===e.tagName&&e.href)},[t]),y=w.useMemo(()=>{let e=f?{}:{tabIndex:a?-1:s};return(t?(e.type=void 0!==i||l?i:"button",f||(e.disabled=a)):(e.role="button",!f&&a&&(e["aria-disabled"]=a)),f)?{...e,...m}:e},[a,f,m,l,t,s,i]);return{getButtonProps:w.useCallback((e=eD)=>{let{onClick:t,onKeyDown:n,onKeyUp:r,...o}=e;return{...y,...o,onClick:e=>{(c&&e.stopPropagation(),a)?e.preventDefault():t?.(e)},onKeyDown:e=>{if((f&&m.onKeyDown(e),!a)&&(d?.(e),n?.(e),!(e.target!==e.currentTarget||g()))){if(" "===e.key)return void e.preventDefault();"Enter"===e.key&&(e.preventDefault(),e.currentTarget.click())}},onKeyUp:e=>{!a&&(p?.(e),r?.(e),e.target!==e.currentTarget||g()||" "!==e.key||e.defaultPrevented||e.currentTarget.click())}}},[y,a,f,m,g,d,p,c]),rootRef:h}}({nativeButton:V,nativeButtonProp:y,internalNativeButton:Z,allowInferredHostMismatch:W||"string"==typeof H,disabled:s,type:L,hasFormAction:F,tabIndex:P,onBeforeKeyDown:eO(e=>{d&&!e.repeat&&Y&&" "===e.key&&q.stop(e,()=>{q.start(e)})}),onBeforeKeyUp:eO(e=>{d&&" "===e.key&&Y&&!e.defaultPrevented&&q.stop(e,()=>{q.pulsate(e)})})}),{onClick:ee,onKeyDown:et,onKeyUp:en,...er}=J({onClick:x,onKeyDown:M,onKeyUp:E});w.useImperativeHandle(r,()=>({focusVisible:()=>{X(!0),Q.current.focus()}}),[Q]);let eo=q.shouldMount&&!u&&!s;w.useEffect(()=>{Y&&d&&!u&&q.pulsate()},[u,d,Y,q]);let ea=e9(q,"start",T,c),ei=e9(q,"stop",S,c),el=e9(q,"stop",k,c),es=e9(q,"stop",R,c),eu=e9(q,"stop",e=>{Y&&e.preventDefault(),j&&j(e)},c),ec=e9(q,"start",z,c),ed=e9(q,"stop",N,c),ep=e9(q,"stop",A,c),eh=e9(q,"stop",e=>{ez(e.target)||X(!1),v&&v(e)},!1),ef=eO(e=>{Q.current||(Q.current=e.currentTarget),!f&&ez(e.target)&&(X(!0),I&&I(e)),C&&C(e)}),em={};W&&(em.tabIndex=s?-1:P,s&&(em["aria-disabled"]=s),em.type=L);let eg=G(t,Q),ey={...n,centerRipple:o,component:l,disabled:s,disableRipple:u,disableTouchRipple:c,focusRipple:d,suppressFocusVisible:f,tabIndex:P,focusVisible:Y},ev=(e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:o,classes:a}=e,i=O({root:["root",t&&"disabled",n&&!o&&"focusVisible"]},e5,a);return n&&!o&&r&&(i.root+=` ${r}`),i})(ey);return(0,b.jsxs)(e4,{as:H,className:(0,_.default)(ev.root,i),ownerState:ey,onBlur:eh,onClick:ee,onContextMenu:ei,onFocus:ef,onKeyDown:et,onKeyUp:en,onMouseDown:ea,onMouseLeave:eu,onMouseUp:es,onDragLeave:el,onTouchEnd:ed,onTouchMove:ep,onTouchStart:ec,ref:eg,...W?em:er,...B,children:[a,eo?(0,b.jsx)(e2,{ref:U,center:o,...D}):null]})});function e9(e,t,n,r=!1){return eO(o=>(n&&n(o),r||e[t](o),!0))}let e8=L.default;function e7(e=[]){return([,t])=>t&&function(e,t=[]){if("string"!=typeof e.main)return!1;for(let n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}function te(e){return R("MuiCircularProgress",e)}N("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDisableShrink"]);let tt=eX.keyframes`
|
|
75
|
+
0% {
|
|
76
|
+
transform: rotate(0deg);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
100% {
|
|
80
|
+
transform: rotate(360deg);
|
|
81
|
+
}
|
|
82
|
+
`,tn=eX.keyframes`
|
|
83
|
+
0% {
|
|
84
|
+
stroke-dasharray: 1px, 200px;
|
|
85
|
+
stroke-dashoffset: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
50% {
|
|
89
|
+
stroke-dasharray: 100px, 200px;
|
|
90
|
+
stroke-dashoffset: -15px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
100% {
|
|
94
|
+
stroke-dasharray: 1px, 200px;
|
|
95
|
+
stroke-dashoffset: -126px;
|
|
96
|
+
}
|
|
97
|
+
`,tr="string"!=typeof tt?eX.css`
|
|
98
|
+
animation: ${tt} 1.4s linear infinite;
|
|
99
|
+
`:null,to="string"!=typeof tn?eX.css`
|
|
100
|
+
animation: ${tn} 1.4s ease-in-out infinite;
|
|
101
|
+
`:null,ta=X("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${e8(n.color)}`]]}})(eA(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:tr||{animation:`${tt} 1.4s linear infinite`}},...Object.entries(e.palette).filter(e7()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),ti=X("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),tl=X("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(eA(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:to||{animation:`${tn} 1.4s ease-in-out infinite`}}]}))),ts=X("circle",{name:"MuiCircularProgress",slot:"Track"})(eA(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),tu=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiCircularProgress"}),{className:r,color:o="primary",disableShrink:a=!1,enableTrackSlot:i=!1,min:l,max:s,size:u=40,style:c,thickness:d=3.6,value:p=n.min??0,variant:h="indeterminate",...f}=n,m=l??0,g=s??100,y={...n,color:o,disableShrink:a,size:u,thickness:d,value:p,variant:h,enableTrackSlot:i},v=(e=>{let{classes:t,variant:n,color:r,disableShrink:o}=e;return O({root:["root",n,`color${e8(r)}`],svg:["svg"],track:["track"],circle:["circle",o&&"circleDisableShrink"]},te,t)})(y),x={},w={},S={};if("determinate"===h){let e=2*Math.PI*((44-d)/2),t=g-m;x.strokeDasharray=e.toFixed(3),x.strokeDashoffset=t>0?`${((g-p)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,w.transform="rotate(-90deg)",S["aria-valuenow"]=p,S["aria-valuemin"]=m,S["aria-valuemax"]=g}return(0,b.jsx)(ta,{className:(0,_.default)(v.root,r),style:{width:u,height:u,...w,...c},ownerState:y,ref:t,role:"progressbar",...S,...f,children:(0,b.jsxs)(ti,{className:v.svg,ownerState:y,viewBox:"22 22 44 44",children:[i?(0,b.jsx)(ts,{className:v.track,ownerState:y,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d,"aria-hidden":"true"}):null,(0,b.jsx)(tl,{className:v.circle,style:x,ownerState:y,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})]})})});function tc(e){return R("MuiButton",e)}let td=N("MuiButton",["root","text","outlined","contained","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),tp=w.createContext({}),th=w.createContext(void 0),tf=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],tm=X(e3,{shouldForwardProp:e=>Y(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${e8(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(eA(({theme:e})=>{let t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${td.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&"start"===e.loadingPosition,style:{"&::before":{content:'"\\200b"',width:0,overflow:"hidden"}}},{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${td.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${td.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${td.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(e7()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${td.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${td.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${td.loading}`]:{color:"transparent"}}}]}})),tg=X("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...tf]})),ty=X("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...tf]})),tv=X("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),tb=X("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),tx=w.forwardRef(function(e,t){let n=w.useContext(tp),r=w.useContext(th),o=(0,eT.default)(n,e),a=(0,K.useDefaultProps)({props:o,name:"MuiButton"}),{children:i,color:l="primary",component:s="button",className:u,disabled:c=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:h,focusVisibleClassName:f,fullWidth:m=!1,id:g,loading:y=null,loadingIndicator:v,loadingPosition:x="center",size:S="medium",startIcon:k,type:C,variant:I="text",...M}=a,E=eR(g),T=v??(0,b.jsx)(tu,{"aria-labelledby":E,color:"inherit",size:16}),j={...a,color:l,component:s,disabled:c,disableElevation:d,disableFocusRipple:p,fullWidth:m,loading:y,loadingIndicator:T,loadingPosition:x,size:S,type:C,variant:I},R=(e=>{let{color:t,disableElevation:n,fullWidth:r,size:o,variant:a,loading:i,loadingPosition:l,classes:s}=e,u=O({root:["root",i&&"loading",a,`size${e8(o)}`,`color${e8(t)}`,n&&"disableElevation",r&&"fullWidth",i&&`loadingPosition${e8(l)}`],startIcon:["icon","startIcon"],endIcon:["icon","endIcon"],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},tc,s);return{...s,...u}})(j),N=(k||y&&"start"===x)&&(0,b.jsx)(tg,{className:R.startIcon,ownerState:j,children:k||(0,b.jsx)(tb,{className:R.loadingIconPlaceholder,ownerState:j})}),A=(h||y&&"end"===x)&&(0,b.jsx)(ty,{className:R.endIcon,ownerState:j,children:h||(0,b.jsx)(tb,{className:R.loadingIconPlaceholder,ownerState:j})}),z="boolean"==typeof y?(0,b.jsx)("span",{className:R.loadingWrapper,style:{display:"contents"},children:y&&(0,b.jsx)(tv,{className:R.loadingIndicator,ownerState:j,children:T})}):null,{root:P,...D}=R;return(0,b.jsxs)(tm,{ownerState:j,className:(0,_.default)(n.className,R.root,u,r||""),component:s,disabled:c||y,focusRipple:!p,focusVisibleClassName:(0,_.default)(R.focusVisible,f),ref:t,internalNativeButton:!0,type:C,id:y?E:g,...M,classes:D,children:[N,"end"!==x&&z,i,"end"===x&&z,A]})});var eb=eb,tw=e.i(16828);function t_(e){return R("MuiCollapse",e)}N("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);let tS=X("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],"entered"===n.state&&t.entered,"exited"===n.state&&!n.in&&"0px"===n.collapsedSize&&t.hidden]}})(eA(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:e})=>"exited"===e.state&&!e.in&&"0px"===e.collapsedSize,style:{visibility:"hidden"}}]}))),tk=X("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),tC=X("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),tI=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiCollapse"}),{addEndListener:r,children:o,className:a,collapsedSize:i="0px",component:l,easing:s,in:u,onEnter:c,onEntered:d,onEntering:p,onExit:h,onExited:f,onExiting:m,orientation:g="vertical",slots:y={},slotProps:v={},style:x,timeout:S=tw.duration.standard,TransitionComponent:k=eg,...C}=n,I={...n,orientation:g,collapsedSize:i},M=(e=>{let{orientation:t,classes:n}=e;return O({root:["root",t],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",t],wrapperInner:["wrapperInner",t]},t_,n)})(I),E=(0,eb.default)(),T=eY(),j=w.useRef(null),R=w.useRef(),N="number"==typeof i?`${i}px`:i,A="horizontal"===g,z=A?"width":"height",P=w.useRef(null),D=G(t,P),$=()=>j.current?j.current[A?"clientWidth":"clientHeight"]:0,L=ex(P,(e,t)=>{j.current&&A&&(j.current.style.position="absolute"),e.style[z]=N,c&&c(e,t)}),B=ex(P,(e,t)=>{let n=$();j.current&&A&&(j.current.style.position="");let{duration:r,easing:o}=e_({style:x,timeout:S,easing:s},{mode:"enter"});if("auto"===S){let t=E.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,R.current=t}else e.style.transitionDuration="string"==typeof r?r:`${r}ms`;e.style[z]=`${n}px`,e.style.transitionTimingFunction=o,p&&p(e,t)}),W=ex(P,(e,t)=>{e.style[z]="auto",d&&d(e,t)}),F=ex(P,e=>{e.style[z]=`${$()}px`,h&&h(e)}),H=ex(P,f),Z=ex(P,e=>{let t=$(),{duration:n,easing:r}=e_({style:x,timeout:S,easing:s},{mode:"exit"});if("auto"===S){let n=E.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,R.current=n}else e.style.transitionDuration="string"==typeof n?n:`${n}ms`;e.style[z]=N,e.style.transitionTimingFunction=r,m&&m(e)}),V={slots:y,slotProps:v,component:l},[q,U]=ea("root",{ref:D,className:(0,_.default)(M.root,a),elementType:tS,externalForwardedProps:V,ownerState:I,additionalProps:{style:{[A?"minWidth":"minHeight"]:N,...x}}}),[Y,X]=ea("wrapper",{ref:j,className:M.wrapper,elementType:tk,externalForwardedProps:V,ownerState:I}),[J,Q]=ea("wrapperInner",{className:M.wrapperInner,elementType:tC,externalForwardedProps:V,ownerState:I});return(0,b.jsx)(k,{in:u,onEnter:L,onEntered:W,onEntering:B,onExit:F,onExited:H,onExiting:Z,addEndListener:e=>{"auto"===S&&T.start(R.current||0,e),r&&r(P.current,e)},nodeRef:P,timeout:"auto"===S?null:S,...C,children:(e,{ownerState:t,...n})=>{let r={...I,state:e};return(0,b.jsx)(q,{...U,className:(0,_.default)(U.className,{entered:M.entered,exited:!u&&"0px"===N&&M.hidden}[e]),ownerState:r,...n,children:(0,b.jsx)(Y,{...X,ownerState:r,children:(0,b.jsx)(J,{...Q,ownerState:r,children:o})})})}})});function tM(e){return e&&e.ownerDocument||document}tI&&(tI.muiSupportAuto=!0);let tE=function(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1};function tT(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}let tj="data-mui-focusable";function tR(e){let t=[],n=[];return Array.from(e.querySelectorAll('input,select,textarea,a[href],button,[tabindex],audio[controls],video[controls],[contenteditable]:not([contenteditable="false"])')).forEach((e,r)=>{let o,a=Number.isNaN(o=parseInt(e.getAttribute("tabindex")||"",10))?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:o;-1===a||e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e)||(0===a?t.push(e):n.push({documentOrder:r,tabIndex:a,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function tN(){return!0}let tA=function(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:a=tR,isEnabled:i=tN,open:l}=e,s=w.useRef(!1),u=w.useRef(null),c=w.useRef(null),d=w.useRef(null),p=w.useRef(null),h=w.useRef(!1),f=w.useRef(null),m=G(ev(t),f),g=w.useRef(null);w.useEffect(()=>{l&&f.current&&(h.current=!n)},[n,l]),w.useEffect(()=>{var e;if(s.current=!1,!l||!f.current)return;let t=tT(tM(f.current)),n=((e=f.current)?e.hasAttribute(tj)?e:e.querySelector(`[${tj}]`):null)??f.current;return!tE(f.current,t)&&(n.hasAttribute("tabIndex")||n.setAttribute("tabIndex","-1"),h.current&&n.focus()),()=>{!o&&d.current&&(s.current=!0,d.current.focus(),d.current=null)}},[l]),w.useEffect(()=>{if(!l||!f.current)return;let e=tM(f.current),t=t=>{g.current=t,r||!i()||"Tab"!==t.key||tT(e)===f.current&&t.shiftKey&&(s.current=!0,c.current&&c.current.focus())},n=()=>{let t=f.current;if(null===t)return;let n=tT(e);if(!e.hasFocus()||!i()||s.current){s.current=!1;return}if(tE(t,n)||r&&n!==u.current&&n!==c.current)return;if(n!==p.current)p.current=null;else if(null!==p.current)return;if(!h.current)return;let o=[];if((n===u.current||n===c.current)&&(o=a(f.current)),o.length>0){let e=!!(g.current?.shiftKey&&g.current?.key==="Tab"),t=o[0],n=o[o.length-1];"string"!=typeof t&&"string"!=typeof n&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);let o=setInterval(()=>{let t=tT(e);t&&"BODY"===t.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,o,i,l,a]);let y=e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0};return(0,b.jsxs)(w.Fragment,{children:[(0,b.jsx)("div",{tabIndex:l?0:-1,onFocus:y,ref:u,"data-testid":"sentinelStart"}),w.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),h.current=!0,p.current=e.target;let n=t.props.onFocus;n&&n(e)}}),(0,b.jsx)("div",{tabIndex:l?0:-1,onFocus:y,ref:c,"data-testid":"sentinelEnd"})]})};function tz(e,t){"function"==typeof e?e(t):e&&(e.current=t)}let tP=w.forwardRef(function(e,t){let{children:n,container:r,disablePortal:o=!1}=e,[a,i]=w.useState(null),l=G(w.isValidElement(n)?ev(n):null,t);return((0,eP.default)(()=>{o||i(("function"==typeof r?r():r)||document.body)},[r,o]),(0,eP.default)(()=>{if(a&&!o)return tz(t,a),()=>{tz(t,null)}},[t,a,o]),o)?w.isValidElement(n)?w.cloneElement(n,{ref:l}):n:a?eu.createPortal(n,a):a});function tO(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function tD(e){return tM(e).defaultView||window}function t$(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function tL(e){return parseFloat(tD(e).getComputedStyle(e).paddingRight)||0}function tB(e,t,n,r,o){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t,n,r=!a.includes(e),i=(t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type"),!t&&!n);r&&i&&t$(e,o)})}function tW(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}let tF=()=>{},tH=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n,r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&t$(e.modalRef,!1);let o=(n=[],[].forEach.call(t.children,e=>{"true"===e.getAttribute("aria-hidden")&&n.push(e)}),n);tB(t,e.mount,e.modalRef,o,!0);let a=tW(this.containers,e=>e.container===t);return -1!==a?this.containers[a].modals.push(e):this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:o}),r}mount(e,t){let n=tW(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||(r.restore=function(e,t){let n=[],r=e.container;if(!t.disableScrollLock){let e,t;if((t=tM(r)).body===r?tD(r).innerWidth>t.documentElement.clientWidth:r.scrollHeight>r.clientHeight){let e=function(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}(tD(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${tL(r)+e}px`;let t=tM(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${tL(t)+e}px`})}if(r.parentNode instanceof DocumentFragment)e=tM(r).body;else{let t=r.parentElement,n=tD(r);e=t?.nodeName==="HTML"&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}(r,t))}remove(e,t=!0){let n=this.modals.indexOf(e);if(-1===n)return n;let r=tW(this.containers,t=>t.modals.includes(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&t$(e.modalRef,t),tB(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=o.modals[o.modals.length-1];e.modalRef&&t$(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},tZ=function(e){let{container:t,disableScrollLock:n=!1,closeAfterTransition:r=!1,onTransitionEnter:o,onTransitionExited:a,children:i,onClose:l,open:s,rootRef:u}=e,c=w.useRef({}),d=w.useRef(null),p=w.useRef(null),h=G(p,u),[f,m]=w.useState(!s),g=!!i&&i.props.hasOwnProperty("in"),y=!0;("false"===e["aria-hidden"]||!1===e["aria-hidden"])&&(y=!1);let v=()=>(c.current.modalRef=p.current,c.current.mount=d.current,c.current),b=()=>{tH.mount(v(),{disableScrollLock:n}),p.current&&(p.current.scrollTop=0)},x=eO(()=>{let e=("function"==typeof t?t():t)||tM(d.current).body;tH.add(v(),e),p.current&&b()}),_=()=>tH.isTopModal(v()),S=eO(e=>{d.current=e,e&&(s&&_()?b():p.current&&t$(p.current,y))}),k=w.useCallback(()=>{tH.remove(v(),y)},[y]);return w.useEffect(()=>()=>{k()},[k]),w.useEffect(()=>{s?x():g&&r||k()},[s,k,g,r,x]),{getRootProps:(t={})=>{let n=en(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:"presentation",...r,onKeyDown:e=>{r.onKeyDown?.(e),"Escape"===e.key&&229!==e.which&&_()&&(e.stopPropagation(),l&&l(e,"escapeKeyDown"))},ref:h}},getBackdropProps:(e={})=>({"aria-hidden":!0,...e,onClick:t=>{e.onClick?.(t),t.target===t.currentTarget&&l&&l(t,"backdropClick")},open:s}),getTransitionProps:()=>({onEnter:tO(()=>{m(!1),o&&o()},i?.props.onEnter??tF),onExited:tO(()=>{m(!0),a&&a(),r&&k()},i?.props.onExited??tF)}),rootRef:h,portalRef:S,isTopModal:_,exited:f,hasTransition:g}};function tV(e){return R("MuiModal",e)}N("MuiModal",["root","hidden","backdrop"]);let tq=X("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(eA(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),tU=X(eE,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),tY=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({name:"MuiModal",props:e}),{classes:r,className:o,closeAfterTransition:a=!1,children:i,container:l,component:s,disableAutoFocus:u=!1,disableEnforceFocus:c=!1,disablePortal:d=!1,disableRestoreFocus:p=!1,disableScrollLock:h=!1,hideBackdrop:f=!1,keepMounted:m=!1,onClose:g,onTransitionEnter:y,onTransitionExited:v,open:x,slotProps:S={},slots:k={},theme:C,...I}=n,M={...n,closeAfterTransition:a,disableAutoFocus:u,disableEnforceFocus:c,disablePortal:d,disableRestoreFocus:p,disableScrollLock:h,hideBackdrop:f,keepMounted:m},{getRootProps:E,getBackdropProps:T,getTransitionProps:j,portalRef:R,isTopModal:N,exited:A,hasTransition:z}=tZ({...M,rootRef:t}),P={...M,exited:A},D=(e=>{let{open:t,exited:n,classes:r}=e;return O({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},tV,r)})(P),$={};if(void 0===i.props.tabIndex&&($.tabIndex="-1"),z){let{onEnter:e,onExited:t}=j();$.onEnter=e,$.onExited=t}let L={slots:k,slotProps:S},[B,W]=ea("root",{ref:t,elementType:tq,externalForwardedProps:{...L,...I,component:s},getSlotProps:E,ownerState:P,className:(0,_.default)(o,D?.root,!P.open&&P.exited&&D?.hidden)}),[F,H]=ea("backdrop",{elementType:tU,externalForwardedProps:L,shouldForwardComponentProp:!0,getSlotProps:e=>T({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:D?.backdrop,ownerState:P});return m||x||z&&!A?(0,b.jsx)(tP,{ref:R,container:l,disablePortal:d,children:(0,b.jsxs)(B,{...W,children:[f?null:(0,b.jsx)(F,{...H}),(0,b.jsx)(tA,{disableEnforceFocus:c,disableAutoFocus:u,disableRestoreFocus:p,isEnabled:N,open:x,children:w.cloneElement(i,$)})]})}):null});var tX=e.i(32451),eb=eb,tK=e.i(43471);function tG(e){return R("MuiPaper",e)}N("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);let tJ=X("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(eA(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),tQ=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiPaper"}),r=(0,eb.default)(),{className:o,component:a="div",elevation:i=1,square:l=!1,variant:s="elevation",...u}=n,c={...n,component:a,elevation:i,square:l,variant:s},d=(e=>{let{square:t,elevation:n,variant:r,classes:o}=e;return O({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},tG,o)})(c);return(0,b.jsx)(tJ,{as:a,ownerState:c,className:(0,_.default)(d.root,o),ref:t,...u,style:{..."elevation"===s&&{"--Paper-shadow":(r.vars||r).shadows[i],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[i]},...!r.vars&&"dark"===r.palette.mode&&{"--Paper-overlay":`linear-gradient(${(0,tX.alpha)("#fff",(0,tK.default)(i))}, ${(0,tX.alpha)("#fff",(0,tK.default)(i))})`}},...u.style}})});function t0(e){return R("MuiDialog",e)}N("MuiDialog",["root","backdrop","scrollPaper","scrollBody","container","paper","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);let t1=w.createContext({});var eb=eb;let t2=X(eE,{name:"MuiDialog",slot:"Backdrop"})({zIndex:-1}),t5=X(tY,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),t6=X("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${e8(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),t4=X(tQ,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperWidth${e8(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(eA(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`}},{props:{maxWidth:"xs",scroll:"body"},style:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`}})),...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t,scroll:"body"},style:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0}},{props:({ownerState:e})=>e.fullScreen&&"body"===e.scroll,style:{margin:0,maxWidth:"100%"}}]}))),t3=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiDialog"}),r=(0,eb.default)(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":i,"aria-modal":l=!0,children:s,className:u,fullScreen:c=!1,fullWidth:d=!1,maxWidth:p="sm",onClick:h,onClose:f,open:m,PaperComponent:g=tQ,role:y="dialog",scroll:v="paper",slots:x={},slotProps:S={},transitionDuration:k=o,...C}=n,I={...n,fullScreen:c,fullWidth:d,maxWidth:p,scroll:v},M=(e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:a}=e;return O({root:["root"],backdrop:["backdrop"],container:["container",`scroll${e8(n)}`],paper:["paper",`paperWidth${e8(String(r))}`,o&&"paperFullWidth",a&&"paperFullScreen"]},t0,t)})(I),E=w.useRef(),T=(0,ej.default)(i),j=w.useMemo(()=>({titleId:T}),[T]),R={slots:x,slotProps:S},[N,A]=ea("root",{elementType:t5,shouldForwardComponentProp:!0,externalForwardedProps:R,ownerState:I,className:(0,_.default)(M.root,u),ref:t}),[z,P]=ea("backdrop",{elementType:t2,shouldForwardComponentProp:!0,externalForwardedProps:R,ownerState:I,className:M.backdrop}),[D,$]=ea("paper",{elementType:t4,shouldForwardComponentProp:!0,externalForwardedProps:R,ownerState:I,className:M.paper,additionalProps:{elevation:24,role:y,"aria-describedby":a,"aria-labelledby":T,"aria-modal":l,tabIndex:-1,[tj]:""}}),[L,B]=ea("container",{elementType:t6,externalForwardedProps:R,ownerState:I,className:M.container}),[W,F]=ea("transition",{elementType:eC,externalForwardedProps:R,ownerState:I,additionalProps:{appear:!0,in:m,timeout:k,role:"presentation"}});return(0,b.jsx)(N,{closeAfterTransition:!0,slots:{backdrop:z},slotProps:{backdrop:{transitionDuration:k,...P}},onClose:f,open:m,onClick:e=>{h&&h(e),E.current&&(E.current=null,f&&f(e,"backdropClick"))},...A,...C,children:(0,b.jsx)(W,{...F,children:(0,b.jsx)(L,{onMouseDown:e=>{E.current=e.target===e.currentTarget},...B,children:(0,b.jsx)(D,{as:g,...$,children:(0,b.jsx)(t1.Provider,{value:j,children:s})})})})})});function t9(e){return R("MuiDialogActions",e)}N("MuiDialogActions",["root","spacing"]);let t8=X("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),t7=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:o=!1,...a}=n,i={...n,disableSpacing:o},l=(e=>{let{classes:t,disableSpacing:n}=e;return O({root:["root",!n&&"spacing"]},t9,t)})(i);return(0,b.jsx)(t8,{className:(0,_.default)(l.root,r),ownerState:i,ref:t,...a})});function ne(e){return R("MuiDialogContent",e)}function nt(e){return R("MuiDialogTitle",e)}N("MuiDialogContent",["root","dividers"]);let nn=N("MuiDialogTitle",["root"]),nr=X("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(eA(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${nn.root} + &`]:{paddingTop:0}}}]}))),no=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiDialogContent"}),{className:r,dividers:o=!1,...a}=n,i={...n,dividers:o},l=(e=>{let{classes:t,dividers:n}=e;return O({root:["root",n&&"dividers"]},ne,t)})(i);return(0,b.jsx)(nr,{className:(0,_.default)(l.root,r),ownerState:i,ref:t,...a})});function na(e){return R("MuiTypography",e)}N("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom"]);let ni=X("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${e8(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(eA(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([e,t])=>"inherit"!==e&&t&&"object"==typeof t).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(e7()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>"string"==typeof e).map(([t])=>({props:{color:`text${e8(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}}]}))),nl={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ns=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiTypography"}),{color:r,align:o="inherit",className:a,component:i,gutterBottom:l=!1,noWrap:s=!1,variant:u="body1",variantMapping:c=nl,...d}=n,p={...n,align:o,color:r,className:a,component:i,gutterBottom:l,noWrap:s,variant:u,variantMapping:c},h=i||c[u]||nl[u]||"span",f=(e=>{let{align:t,gutterBottom:n,noWrap:r,variant:o,classes:a}=e;return O({root:["root",o,"inherit"!==e.align&&`align${e8(t)}`,n&&"gutterBottom",r&&"noWrap"]},na,a)})(p);return(0,b.jsx)(ni,{as:h,ref:t,className:(0,_.default)(f.root,a),...d,ownerState:p,style:{..."inherit"!==o&&{"--Typography-textAlign":o},...d.style}})}),nu=X(ns,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),nc=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiDialogTitle"}),{className:r,id:o,...a}=n,i=(e=>{let{classes:t}=e;return O({root:["root"]},nt,t)})(n),{titleId:l=o}=w.useContext(t1);return(0,b.jsx)(nu,{component:"h2",className:(0,_.default)(i.root,r),ownerState:n,ref:t,variant:"h6",id:o??l,...a})});function nd(e){return R("MuiIconButton",e)}let np=N("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),nh=X(e3,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${e8(n.color)}`],n.edge&&t[`edge${e8(n.edge)}`],t[`size${e8(n.size)}`]]}})(eA(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),eA(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(e7()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${np.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${np.loading}`]:{color:"transparent"}}))),nf=X("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),nm=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:a,color:i="default",disabled:l=!1,disableFocusRipple:s=!1,size:u="medium",id:c,loading:d=null,loadingIndicator:p,...h}=n,f=eR(c),m=p??(0,b.jsx)(tu,{"aria-labelledby":f,color:"inherit",size:16}),g={...n,edge:r,color:i,disabled:l,disableFocusRipple:s,loading:d,loadingIndicator:m,size:u},y=(e=>{let{classes:t,disabled:n,color:r,edge:o,size:a,loading:i}=e;return O({root:["root",i&&"loading",n&&"disabled","default"!==r&&`color${e8(r)}`,o&&`edge${e8(o)}`,`size${e8(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},nd,t)})(g);return(0,b.jsxs)(nh,{id:d?f:c,className:(0,_.default)(y.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!s,disabled:l||d,ref:t,...h,ownerState:g,children:["boolean"==typeof d&&(0,b.jsx)("span",{className:y.loadingWrapper,style:{display:"contents"},children:(0,b.jsx)(nf,{className:y.loadingIndicator,ownerState:g,children:d&&m})}),o]})});var eb=eb,eb=eb;function ng(e){return`scale(${e}, ${e**2})`}let ny={entering:{opacity:1,transform:ng(1)},entered:{opacity:1,transform:"none"},exiting:{opacity:0,transform:ng(.75)},exited:{opacity:0,transform:ng(.75)}},nv={opacity:0,transform:ng(.75),visibility:"hidden"},nb=w.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:o,easing:a,in:i,onEnter:l,onEntered:s,onEntering:u,onExit:c,onExited:d,onExiting:p,style:h,timeout:f="auto",...m}=e,g=eY(),y=w.useRef(),v=(0,eb.default)(),x=w.useRef(null),_=G(x,ev(o),t),S=ex(x,u),k=ex(x,(e,t)=>{let n;e.scrollTop;let{duration:r,delay:o,easing:i}=e_({style:h,timeout:f,easing:a},{mode:"enter"});"auto"===f?y.current=n=v.transitions.getAutoHeightDuration(e.clientHeight):n=r,e.style.transition=[v.transitions.create("opacity",{duration:n,delay:o}),v.transitions.create("transform",{duration:.666*n,delay:o,easing:i})].join(","),l&&l(e,t)}),C=ex(x,s),I=ex(x,p),M=ex(x,e=>{let t,{duration:n,delay:r,easing:o}=e_({style:h,timeout:f,easing:a},{mode:"exit"});"auto"===f?y.current=t=v.transitions.getAutoHeightDuration(e.clientHeight):t=n,e.style.transition=[v.transitions.create("opacity",{duration:t,delay:r}),v.transitions.create("transform",{duration:.666*t,delay:r||.333*t,easing:o})].join(","),e.style.opacity=0,e.style.transform=ng(.75),c&&c(e)}),E=ex(x,e=>{e.style.transition="",d&&d(e)});return(0,b.jsx)(eg,{appear:r,in:i,nodeRef:x,onEnter:k,onEntered:C,onEntering:S,onExit:M,onExited:E,onExiting:I,addEndListener:e=>{"auto"===f&&g.start(y.current||0,e),n&&n(x.current,e)},timeout:"auto"===f?null:f,...m,children:(e,{ownerState:t,...n})=>{let r=ew(e,i,ny,nv,h,o.props.style);return w.cloneElement(o,{style:r,ref:_,...n})}})});nb&&(nb.muiSupportAuto=!0);var nx=e.i(9303);function nw(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n_(e){var t=nw(e).Element;return e instanceof t||e instanceof Element}function nS(e){var t=nw(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function nk(e){if("u"<typeof ShadowRoot)return!1;var t=nw(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var nC=Math.max,nI=Math.min,nM=Math.round;function nE(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function nT(){return!/^((?!chrome|android).)*safari/i.test(nE())}function nj(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&nS(e)&&(o=e.offsetWidth>0&&nM(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&nM(r.height)/e.offsetHeight||1);var i=(n_(e)?nw(e):window).visualViewport,l=!nT()&&n,s=(r.left+(l&&i?i.offsetLeft:0))/o,u=(r.top+(l&&i?i.offsetTop:0))/a,c=r.width/o,d=r.height/a;return{width:c,height:d,top:u,right:s+c,bottom:u+d,left:s,x:s,y:u}}function nR(e){var t=nw(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nN(e){return e?(e.nodeName||"").toLowerCase():null}function nA(e){return((n_(e)?e.ownerDocument:e.document)||window.document).documentElement}function nz(e){return nj(nA(e)).left+nR(e).scrollLeft}function nP(e){return nw(e).getComputedStyle(e)}function nO(e){var t=nP(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function nD(e){var t=nj(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function n$(e){return"html"===nN(e)?e:e.assignedSlot||e.parentNode||(nk(e)?e.host:null)||nA(e)}function nL(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(nN(t))>=0?t.ownerDocument.body:nS(t)&&nO(t)?t:e(n$(t))}(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=nw(r),i=o?[a].concat(a.visualViewport||[],nO(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(nL(n$(i)))}function nB(e){return nS(e)&&"fixed"!==nP(e).position?e.offsetParent:null}function nW(e){for(var t=nw(e),n=nB(e);n&&["table","td","th"].indexOf(nN(n))>=0&&"static"===nP(n).position;)n=nB(n);return n&&("html"===nN(n)||"body"===nN(n)&&"static"===nP(n).position)?t:n||function(e){var t=/firefox/i.test(nE());if(/Trident/i.test(nE())&&nS(e)&&"fixed"===nP(e).position)return null;var n=n$(e);for(nk(n)&&(n=n.host);nS(n)&&0>["html","body"].indexOf(nN(n));){var r=nP(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var nF="bottom",nH="right",nZ="left",nV="auto",nq=["top",nF,nH,nZ],nU="start",nY="viewport",nX="popper",nK=nq.reduce(function(e,t){return e.concat([t+"-"+nU,t+"-end"])},[]),nG=[].concat(nq,[nV]).reduce(function(e,t){return e.concat([t,t+"-"+nU,t+"-end"])},[]),nJ=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function nQ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&nk(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function n0(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function n1(e,t,n){var r,o,a,i,l,s,u,c,d,p;return t===nY?n0(function(e,t){var n=nw(e),r=nA(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;var u=nT();(u||!u&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l+nz(e),y:s}}(e,n)):n_(t)?((r=nj(t,!1,"fixed"===n)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):n0((o=nA(e),i=nA(o),l=nR(o),s=null==(a=o.ownerDocument)?void 0:a.body,u=nC(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),c=nC(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),d=-l.scrollLeft+nz(o),p=-l.scrollTop,"rtl"===nP(s||i).direction&&(d+=nC(i.clientWidth,s?s.clientWidth:0)-u),{width:u,height:c,x:d,y:p}))}function n2(e){return e.split("-")[0]}function n5(e){return e.split("-")[1]}function n6(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function n4(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?n2(o):null,i=o?n5(o):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(a){case"top":t={x:l,y:n.y-r.height};break;case nF:t={x:l,y:n.y+n.height};break;case nH:t={x:n.x+n.width,y:s};break;case nZ:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var u=a?n6(a):null;if(null!=u){var c="y"===u?"height":"width";switch(i){case nU:t[u]=t[u]-(n[c]/2-r[c]/2);break;case"end":t[u]=t[u]+(n[c]/2-r[c]/2)}}return t}function n3(){return{top:0,right:0,bottom:0,left:0}}function n9(e){return Object.assign({},n3(),e)}function n8(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function n7(e,t){void 0===t&&(t={});var n,r,o,a,i,l,s,u,c=t,d=c.placement,p=void 0===d?e.placement:d,h=c.strategy,f=void 0===h?e.strategy:h,m=c.boundary,g=c.rootBoundary,y=c.elementContext,v=void 0===y?nX:y,b=c.altBoundary,x=c.padding,w=void 0===x?0:x,_=n9("number"!=typeof w?w:n8(w,nq)),S=e.rects.popper,k=e.elements[void 0!==b&&b?v===nX?"reference":nX:v],C=(n=n_(k)?k:k.contextElement||nA(e.elements.popper),r=void 0===m?"clippingParents":m,o=void 0===g?nY:g,s=(l=[].concat("clippingParents"===r?(a=nL(n$(n)),!n_(i=["absolute","fixed"].indexOf(nP(n).position)>=0&&nS(n)?nW(n):n)?[]:a.filter(function(e){return n_(e)&&nQ(e,i)&&"body"!==nN(e)})):[].concat(r),[o]))[0],(u=l.reduce(function(e,t){var r=n1(n,t,f);return e.top=nC(r.top,e.top),e.right=nI(r.right,e.right),e.bottom=nI(r.bottom,e.bottom),e.left=nC(r.left,e.left),e},n1(n,s,f))).width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u),I=nj(e.elements.reference),M=n4({reference:I,element:S,strategy:"absolute",placement:p}),E=n0(Object.assign({},S,M)),T=v===nX?E:I,j={top:C.top-T.top+_.top,bottom:T.bottom-C.bottom+_.bottom,left:C.left-T.left+_.left,right:T.right-C.right+_.right},R=e.modifiersData.offset;if(v===nX&&R){var N=R[p];Object.keys(j).forEach(function(e){var t=[nH,nF].indexOf(e)>=0?1:-1,n=["top",nF].indexOf(e)>=0?"y":"x";j[e]+=N[n]*t})}return j}var re={placement:"bottom",modifiers:[],strategy:"absolute"};function rt(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var rn={passive:!0},rr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ro(e){var t,n,r,o,a,i,l,s=e.popper,u=e.popperRect,c=e.placement,d=e.variation,p=e.offsets,h=e.position,f=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,y=e.isFixed,v=p.x,b=void 0===v?0:v,x=p.y,w=void 0===x?0:x,_="function"==typeof g?g({x:b,y:w}):{x:b,y:w};b=_.x,w=_.y;var S=p.hasOwnProperty("x"),k=p.hasOwnProperty("y"),C=nZ,I="top",M=window;if(m){var E=nW(s),T="clientHeight",j="clientWidth";E===nw(s)&&"static"!==nP(E=nA(s)).position&&"absolute"===h&&(T="scrollHeight",j="scrollWidth"),("top"===c||(c===nZ||c===nH)&&"end"===d)&&(I=nF,w-=(y&&E===M&&M.visualViewport?M.visualViewport.height:E[T])-u.height,w*=f?1:-1),(c===nZ||("top"===c||c===nF)&&"end"===d)&&(C=nH,b-=(y&&E===M&&M.visualViewport?M.visualViewport.width:E[j])-u.width,b*=f?1:-1)}var R=Object.assign({position:h},m&&rr),N=!0===g?(t={x:b,y:w},n=nw(s),r=t.x,o=t.y,{x:nM(r*(a=n.devicePixelRatio||1))/a||0,y:nM(o*a)/a||0}):{x:b,y:w};return(b=N.x,w=N.y,f)?Object.assign({},R,((l={})[I]=k?"0":"",l[C]=S?"0":"",l.transform=1>=(M.devicePixelRatio||1)?"translate("+b+"px, "+w+"px)":"translate3d("+b+"px, "+w+"px, 0)",l)):Object.assign({},R,((i={})[I]=k?w+"px":"",i[C]=S?b+"px":"",i.transform="",i))}var ra={left:"right",right:"left",bottom:"top",top:"bottom"};function ri(e){return e.replace(/left|right|bottom|top/g,function(e){return ra[e]})}var rl={start:"end",end:"start"};function rs(e){return e.replace(/start|end/g,function(e){return rl[e]})}function ru(e,t,n){return nC(e,nI(t,n))}function rc(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function rd(e){return["top",nH,nF,nZ].some(function(t){return e[t]>=0})}var rp=(oH=void 0===(oF=(oW={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=void 0===o||o,i=r.resize,l=void 0===i||i,s=nw(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(e){e.addEventListener("scroll",n.update,rn)}),l&&s.addEventListener("resize",n.update,rn),function(){a&&u.forEach(function(e){e.removeEventListener("scroll",n.update,rn)}),l&&s.removeEventListener("resize",n.update,rn)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=n4({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=n.adaptive,a=n.roundOffsets,i=void 0===a||a,l={placement:n2(t.placement),variation:n5(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ro(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===o||o,roundOffsets:i})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ro(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];nS(o)&&nN(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});nS(r)&&nN(r)&&(Object.assign(r.style,a),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=void 0===o?[0,0]:o,i=nG.reduce(function(e,n){var r,o,i,l,s,u;return e[n]=(r=t.rects,i=[nZ,"top"].indexOf(o=n2(n))>=0?-1:1,s=(l="function"==typeof a?a(Object.assign({},r,{placement:n})):a)[0],u=l[1],s=s||0,u=(u||0)*i,[nZ,nH].indexOf(o)>=0?{x:u,y:s}:{x:s,y:u}),e},{}),l=i[t.placement],s=l.x,u=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,i=n.altAxis,l=void 0===i||i,s=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,p=n.altBoundary,h=n.flipVariations,f=void 0===h||h,m=n.allowedAutoPlacements,g=t.options.placement,y=n2(g)===g,v=s||(y||!f?[ri(g)]:function(e){if(n2(e)===nV)return[];var t=ri(e);return[rs(e),t,rs(t)]}(g)),b=[g].concat(v).reduce(function(e,n){var r,o,a,i,l,s,p,h,g,y,v,b;return e.concat(n2(n)===nV?(o=(r={placement:n,boundary:c,rootBoundary:d,padding:u,flipVariations:f,allowedAutoPlacements:m}).placement,a=r.boundary,i=r.rootBoundary,l=r.padding,s=r.flipVariations,h=void 0===(p=r.allowedAutoPlacements)?nG:p,0===(v=(y=(g=n5(o))?s?nK:nK.filter(function(e){return n5(e)===g}):nq).filter(function(e){return h.indexOf(e)>=0})).length&&(v=y),Object.keys(b=v.reduce(function(e,n){return e[n]=n7(t,{placement:n,boundary:a,rootBoundary:i,padding:l})[n2(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),x=t.rects.reference,w=t.rects.popper,_=new Map,S=!0,k=b[0],C=0;C<b.length;C++){var I=b[C],M=n2(I),E=n5(I)===nU,T=["top",nF].indexOf(M)>=0,j=T?"width":"height",R=n7(t,{placement:I,boundary:c,rootBoundary:d,altBoundary:p,padding:u}),N=T?E?nH:nZ:E?nF:"top";x[j]>w[j]&&(N=ri(N));var A=ri(N),z=[];if(a&&z.push(R[M]<=0),l&&z.push(R[N]<=0,R[A]<=0),z.every(function(e){return e})){k=I,S=!1;break}_.set(I,z)}if(S)for(var P=f?3:1,O=function(e){var t=b.find(function(t){var n=_.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return k=t,"break"},D=P;D>0&&"break"!==O(D);D--);t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=n.altAxis,i=n.boundary,l=n.rootBoundary,s=n.altBoundary,u=n.padding,c=n.tether,d=void 0===c||c,p=n.tetherOffset,h=void 0===p?0:p,f=n7(t,{boundary:i,rootBoundary:l,padding:u,altBoundary:s}),m=n2(t.placement),g=n5(t.placement),y=!g,v=n6(m),b="x"===v?"y":"x",x=t.modifiersData.popperOffsets,w=t.rects.reference,_=t.rects.popper,S="function"==typeof h?h(Object.assign({},t.rects,{placement:t.placement})):h,k="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(x){if(void 0===o||o){var M,E="y"===v?"top":nZ,T="y"===v?nF:nH,j="y"===v?"height":"width",R=x[v],N=R+f[E],A=R-f[T],z=d?-_[j]/2:0,P=g===nU?w[j]:_[j],O=g===nU?-_[j]:-w[j],D=t.elements.arrow,$=d&&D?nD(D):{width:0,height:0},L=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:n3(),B=L[E],W=L[T],F=ru(0,w[j],$[j]),H=y?w[j]/2-z-F-B-k.mainAxis:P-F-B-k.mainAxis,Z=y?-w[j]/2+z+F+W+k.mainAxis:O+F+W+k.mainAxis,V=t.elements.arrow&&nW(t.elements.arrow),q=V?"y"===v?V.clientTop||0:V.clientLeft||0:0,U=null!=(M=null==C?void 0:C[v])?M:0,Y=ru(d?nI(N,R+H-U-q):N,R,d?nC(A,R+Z-U):A);x[v]=Y,I[v]=Y-R}if(void 0!==a&&a){var X,K,G="x"===v?"top":nZ,J="x"===v?nF:nH,Q=x[b],ee="y"===b?"height":"width",et=Q+f[G],en=Q-f[J],er=-1!==["top",nZ].indexOf(m),eo=null!=(K=null==C?void 0:C[b])?K:0,ea=er?et:Q-w[ee]-_[ee]-eo+k.altAxis,ei=er?Q+w[ee]+_[ee]-eo-k.altAxis:en,el=d&&er?(X=ru(ea,Q,ei))>ei?ei:X:ru(d?ea:et,Q,d?ei:en);x[b]=el,I[b]=el-Q}t.modifiersData[r]=I}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,l=n2(n.placement),s=n6(l),u=[nZ,nH].indexOf(l)>=0?"height":"width";if(a&&i){var c,d=(c=o.padding,n9("number"!=typeof(c="function"==typeof c?c(Object.assign({},n.rects,{placement:n.placement})):c)?c:n8(c,nq))),p=nD(a),h="y"===s?"top":nZ,f="y"===s?nF:nH,m=n.rects.reference[u]+n.rects.reference[s]-i[s]-n.rects.popper[u],g=i[s]-n.rects.reference[s],y=nW(a),v=y?"y"===s?y.clientHeight||0:y.clientWidth||0:0,b=d[h],x=v-p[u]-d[f],w=v/2-p[u]/2+(m/2-g/2),_=ru(b,w,x);n.modifiersData[r]=((t={})[s]=_,t.centerOffset=_-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&nQ(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=n7(t,{elementContext:"reference"}),l=n7(t,{altBoundary:!0}),s=rc(i,r),u=rc(l,o,a),c=rd(s),d=rd(u);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}}]}).defaultModifiers)?[]:oF,oV=void 0===(oZ=oW.defaultOptions)?re:oZ,function(e,t,n){void 0===n&&(n=oV);var r,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},re,oV),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},i=[],l=!1,s={state:a,setOptions:function(n){var r,o,l,c,d,p,h="function"==typeof n?n(a.options):n;u(),a.options=Object.assign({},oV,a.options,h),a.scrollParents={reference:n_(e)?nL(e):e.contextElement?nL(e.contextElement):[],popper:nL(t)};var f=(o=Object.keys(r=[].concat(oH,a.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return r[e]}),l=new Map,c=new Set,d=[],o.forEach(function(e){l.set(e.name,e)}),o.forEach(function(e){c.has(e.name)||function e(t){c.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!c.has(t)){var n=l.get(t);n&&e(n)}}),d.push(t)}(e)}),p=d,nJ.reduce(function(e,t){return e.concat(p.filter(function(e){return e.phase===t}))},[]));return a.orderedModifiers=f.filter(function(e){return e.enabled}),a.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var o=r({state:a,name:t,instance:s,options:void 0===n?{}:n});i.push(o||function(){})}}),s.update()},forceUpdate:function(){if(!l){var e=a.elements,t=e.reference,n=e.popper;if(rt(t,n)){a.rects={reference:(r=nW(n),o="fixed"===a.options.strategy,i=nS(r),p=nS(r)&&(c=nM((u=r.getBoundingClientRect()).width)/r.offsetWidth||1,d=nM(u.height)/r.offsetHeight||1,1!==c||1!==d),h=nA(r),f=nj(t,p,o),m={scrollLeft:0,scrollTop:0},g={x:0,y:0},(i||!i&&!o)&&(("body"!==nN(r)||nO(h))&&(m=function(e){return e!==nw(e)&&nS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:nR(e)}(r)),nS(r)?(g=nj(r,!0),g.x+=r.clientLeft,g.y+=r.clientTop):h&&(g.x=nz(h))),{x:f.left+m.scrollLeft-g.x,y:f.top+m.scrollTop-g.y,width:f.width,height:f.height}),popper:nD(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(e){return a.modifiersData[e.name]=Object.assign({},e.data)});for(var r,o,i,u,c,d,p,h,f,m,g,y=0;y<a.orderedModifiers.length;y++){if(!0===a.reset){a.reset=!1,y=-1;continue}var v=a.orderedModifiers[y],b=v.fn,x=v.options,w=void 0===x?{}:x,_=v.name;"function"==typeof b&&(a=b({state:a,options:w,name:_,instance:s})||a)}}}},update:(r=function(){return new Promise(function(e){s.forceUpdate(),e(a)})},function(){return o||(o=new Promise(function(e){Promise.resolve().then(function(){o=void 0,e(r())})})),o}),destroy:function(){u(),l=!0}};if(!rt(e,t))return s;function u(){i.forEach(function(e){return e()}),i=[]}return s.setOptions(n).then(function(e){!l&&n.onFirstUpdate&&n.onFirstUpdate(e)}),s});let rh=function(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...a}=e,i=o?{}:ee(n,r),{props:l,internalRef:s}=eo({...a,externalSlotProps:i}),u=G(s,i?.ref,e.additionalProps?.ref);return Q(t,{...l,ref:u},r)};function rf(e){return R("MuiPopper",e)}function rm(e){return"function"==typeof e?e():e}N("MuiPopper",["root"]);let rg={},ry=w.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:o,disablePortal:a,modifiers:i,open:l,placement:s,popperOptions:u,popperRef:c,slotProps:d={},slots:p={},TransitionProps:h,ownerState:f,...m}=e,g=w.useRef(null),y=G(g,t),v=w.useRef(null),x=G(v,c),_=w.useRef(x);(0,eP.default)(()=>{_.current=x},[x]),w.useImperativeHandle(c,()=>v.current,[]);let S=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(s,o),[k,C]=w.useState(S),[I,M]=w.useState(rm(n));w.useEffect(()=>{v.current&&v.current.forceUpdate()}),w.useEffect(()=>{n&&M(rm(n))},[n]),(0,eP.default)(()=>{if(!I||!l)return;let e=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{C(e.placement)}}];null!=i&&(e=e.concat(i)),u&&null!=u.modifiers&&(e=e.concat(u.modifiers));let t=rp(I,g.current,{placement:S,...u,modifiers:e});_.current(t);let n=g.current;return()=>{if(n){let{style:e}=n,r=e.position,o=e.top,a=e.left,i=e.transform;t.destroy(),e.position=r,e.top=o,e.left=a,e.transform=i}else t.destroy();_.current(null)}},[I,a,i,l,u,S]);let E={placement:k};null!==h&&(E.TransitionProps=h);let T=(e=>{let{classes:t}=e;return O({root:["root"]},rf,t)})(e),j=p.root??"div",R=rh({elementType:j,externalSlotProps:d.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:y},ownerState:e,className:T.root});return(0,b.jsx)(j,{...R,children:"function"==typeof r?r(E):r})}),rv=X(w.forwardRef(function(e,t){let n,{anchorEl:r,children:o,container:a,direction:i="ltr",disablePortal:l=!1,keepMounted:s=!1,modifiers:u,open:c,placement:d="bottom",popperOptions:p=rg,popperRef:h,style:f,transition:m=!1,slotProps:g={},slots:y={},...v}=e,[x,_]=w.useState(!0);if(!s&&!c&&(!m||x))return null;if(a)n=a;else if(r){let e=rm(r);n=e&&void 0!==e.nodeType?tM(e).body:tM(null).body}let S=!c&&s&&(!m||x)?"none":void 0,k=m?{in:c,onEnter:()=>{_(!1)},onExited:()=>{_(!0)}}:void 0;return(0,b.jsx)(tP,{disablePortal:l,container:n,children:(0,b.jsx)(ry,{anchorEl:r,direction:i,disablePortal:l,modifiers:u,ref:t,open:m?!x:c,placement:d,popperOptions:p,popperRef:h,slotProps:g,slots:y,...v,style:{position:"fixed",top:0,left:0,display:S,...f},TransitionProps:k,children:o})})}),{name:"MuiPopper",slot:"Root"})({}),rb=w.forwardRef(function(e,t){let n=(0,nx.useRtl)(),{anchorEl:r,component:o,container:a,disablePortal:i,keepMounted:l,modifiers:s,open:u,placement:c,popperOptions:d,popperRef:p,transition:h,slots:f,slotProps:m,...g}=(0,K.useDefaultProps)({props:e,name:"MuiPopper"}),y={anchorEl:r,container:a,disablePortal:i,keepMounted:l,modifiers:s,open:u,placement:c,popperOptions:d,popperRef:p,transition:h,...g};return(0,b.jsx)(rv,{as:o,direction:n?"rtl":"ltr",slots:f,slotProps:m,...y,ref:t})});function rx(e){let{controlled:t,default:n,name:r,state:o="value"}=e,{current:a}=w.useRef(void 0!==t),[i,l]=w.useState(n),s=w.useCallback(e=>{a||l(e)},[]);return[a?t:i,s]}function rw(e){return R("MuiTooltip",e)}let r_=N("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),rS=X(rb,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(eA(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e,open:t})=>t&&!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${r_.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${r_.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${r_.arrow}`]:{height:"1em",width:"0.71em",insetInlineStart:0,marginInlineStart:"-0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${r_.arrow}`]:{height:"1em",width:"0.71em",insetInlineEnd:0,marginInlineEnd:"-0.71em","&::before":{transformOrigin:"0 0"}}}}]}))),rk=X("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${e8(n.placement.split("-")[0])}`]]}})(eA(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${r_.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center",marginInlineEnd:"14px"},[`.${r_.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center",marginInlineStart:"14px"},[`.${r_.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${r_.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",marginBlock:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Math.round(16/14*1e5)/1e5}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${r_.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:"24px"},[`.${r_.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:"24px"},[`.${r_.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"},[`.${r_.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),rC=X("span",{name:"MuiTooltip",slot:"Arrow"})(eA(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))),rI=!1,rM=new eU,rE={x:0,y:0};function rT(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}let rj=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiTooltip"}),{arrow:r=!1,children:o,classes:a,describeChild:i=!1,disableFocusListener:l=!1,disableHoverListener:s=!1,disableInteractive:u=!1,disableTouchListener:c=!1,enterDelay:d=100,enterNextDelay:p=0,enterTouchDelay:h=700,followCursor:f=!1,id:m,leaveDelay:g=0,leaveTouchDelay:y=1500,onClose:v,onOpen:x,open:S,placement:k="bottom",slotProps:C={},slots:I={},title:M,...E}=n,T=w.isValidElement(o)?o:(0,b.jsx)("span",{children:o}),j=(0,eb.default)(),[R,N]=w.useState(),[A,z]=w.useState(null),P=w.useRef(!1),D=u||f,$=eY(),L=eY(),B=eY(),W=eY(),[F,H]=rx({controlled:S,default:!1,name:"Tooltip",state:"open"}),Z=F,V=eR(m),q=w.useRef(),U=eO(()=>{void 0!==q.current&&(document.body.style.WebkitUserSelect=q.current,q.current=void 0),W.clear()});w.useEffect(()=>U,[U]);let Y=e=>{rM.clear(),rI=!0,H(!0),x&&!Z&&x(e)},X=eO(e=>{rM.start(800+g,()=>{rI=!1}),H(!1),v&&Z&&v(e),$.start(j.transitions.duration.shortest,()=>{P.current=!1})}),J=e=>{P.current&&"touchstart"!==e.type||(R&&R.removeAttribute("title"),L.clear(),B.clear(),d||rI&&p?L.start(rI?p:d,()=>{Y(e)}):Y(e))},Q=e=>{L.clear(),B.start(g,()=>{X(e)})},[,ee]=w.useState(!1),et=e=>{let t=e?.target??R;if(!t||t.disabled||!ez(t)){ee(!1);let n=e??new Event("blur");!e&&t&&(Object.defineProperty(n,"target",{value:t}),Object.defineProperty(n,"currentTarget",{value:t})),Q(n)}},en=e=>{if(R||N(e.currentTarget),ez(e.target)){let t=e=>{e.target.disabled&&et(e),e.target.removeEventListener("blur",t)};e.target.addEventListener("blur",t),ee(!0),J(e)}},er=e=>{P.current=!0;let t=T.props;t.onTouchStart&&t.onTouchStart(e)};w.useEffect(()=>{if(Z)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&X(e)}},[X,Z]);let eo=G(ev(T),N,t);M||0===M||(Z=!1);let ei=w.useRef(),el={},es="string"==typeof M;i?(el.title=Z||!es||s?null:M,el["aria-describedby"]=Z?V:null):(el["aria-label"]=es?M:null,el["aria-labelledby"]=Z&&!es?V:null);let eu={...el,...E,...T.props,className:(0,_.default)(E.className,T.props.className),onTouchStart:er,ref:eo,...f?{onMouseMove:e=>{let t=T.props;t.onMouseMove&&t.onMouseMove(e),rE={x:e.clientX,y:e.clientY},ei.current&&ei.current.update()}}:{}},ec={};c||(eu.onTouchStart=e=>{er(e),B.clear(),$.clear(),U(),q.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",W.start(h,()=>{document.body.style.WebkitUserSelect=q.current,J(e)})},eu.onTouchEnd=e=>{T.props.onTouchEnd&&T.props.onTouchEnd(e),U(),B.start(y,()=>{X(e)})}),!s&&(eu.onMouseOver=rT(J,eu.onMouseOver),eu.onMouseLeave=rT(Q,eu.onMouseLeave),D||(ec.onMouseOver=J,ec.onMouseLeave=Q)),!l&&(eu.onFocus=rT(en,eu.onFocus),eu.onBlur=rT(et,eu.onBlur),D||(ec.onFocus=en,ec.onBlur=et));let ed={...n,arrow:r,disableInteractive:D,placement:k,touch:P.current},ep="function"==typeof C.popper?C.popper(ed):C.popper,eh=w.useMemo(()=>{let e=[{name:"arrow",enabled:!!A,options:{element:A,padding:4}}];return ep?.popperOptions?.modifiers&&(e=e.concat(ep.popperOptions.modifiers)),{...ep?.popperOptions,modifiers:e}},[A,ep?.popperOptions]),ef=(e=>{let{classes:t,disableInteractive:n,arrow:r,touch:o,placement:a}=e;return O({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${e8(a.split("-")[0])}`],arrow:["arrow"]},rw,t)})(ed),em={slots:I,slotProps:{arrow:C.arrow,popper:ep,tooltip:C.tooltip,transition:C.transition}},[eg,ey]=ea("popper",{elementType:rS,externalForwardedProps:em,ownerState:ed,className:ef.popper}),[ex,ew]=ea("transition",{elementType:nb,externalForwardedProps:em,ownerState:ed}),[e_,eS]=ea("tooltip",{elementType:rk,className:ef.tooltip,externalForwardedProps:em,ownerState:ed}),[ek,eC]=ea("arrow",{elementType:rC,className:ef.arrow,externalForwardedProps:em,ownerState:ed,ref:z});return(0,b.jsxs)(w.Fragment,{children:[w.cloneElement(T,eu),(0,b.jsx)(eg,{as:rb,placement:k,anchorEl:f?{getBoundingClientRect:()=>({top:rE.y,left:rE.x,right:rE.x,bottom:rE.y,width:0,height:0})}:R,popperRef:ei,open:!!R&&Z,id:V,transition:!0,...ec,...ey,popperOptions:eh,children:({TransitionProps:e})=>(0,b.jsx)(ex,{timeout:j.transitions.duration.shorter,...e,...ew,children:(0,b.jsxs)(e_,{...eS,children:[M,r?(0,b.jsx)(ek,{...eC}):null]})})})]})});function rR(e){return R("MuiSvgIcon",e)}N("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);let rN=X("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${e8(n.color)}`],t[`fontSize${e8(n.fontSize)}`]]}})(eA(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),rA=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:a="inherit",component:i="svg",fontSize:l="medium",htmlColor:s,inheritViewBox:u=!1,titleAccess:c,viewBox:d="0 0 24 24",...p}=n,h=w.isValidElement(r)&&"svg"===r.type,f={...n,color:a,component:i,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:d,hasSvgAsChild:h},m={};u||(m.viewBox=d);let g=(e=>{let{color:t,fontSize:n,classes:r}=e;return O({root:["root","inherit"!==t&&`color${e8(t)}`,`fontSize${e8(n)}`]},rR,r)})(f);return(0,b.jsxs)(rN,{as:i,className:(0,_.default)(g.root,o),focusable:"false",color:s,"aria-hidden":!c||void 0,role:c?"img":void 0,ref:t,...m,...p,...h&&r.props,ownerState:f,children:[h?r.props.children:r,c?(0,b.jsx)("title",{children:c}):null]})});function rz(e,t){function n(t,n){return(0,b.jsx)(rA,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=rA.muiName,w.memo(w.forwardRef(n))}rA.muiName="SvgIcon";let rP=rz((0,b.jsx)("path",{d:"M2 4v16h20V4zm18 4.67h-2.5V6H20zm-2.5 2H20v2.67h-2.5zM4 6h11.5v12H4zm13.5 12v-2.67H20V18z"}),"ViewSidebarOutlined"),rO=rz((0,b.jsx)("path",{d:"M3 3v8h8V3zm6 6H5V5h4zm-6 4v8h8v-8zm6 6H5v-4h4zm4-16v8h8V3zm6 6h-4V5h4zm-6 4v8h8v-8zm6 6h-4v-4h4z"}),"GridViewOutlined"),rD=rz((0,b.jsx)("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightModeOutlined"),r$=rz((0,b.jsx)("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkModeOutlined"),rL=rz((0,b.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),rB=rz((0,b.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");var rW=e.i(1236);function rF(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)""!==(r=rF(e[n]))&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var rH={value:()=>{}};function rZ(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw Error("illegal type: "+e);r[e]=[]}return new rV(r)}function rV(e){this._=e}function rq(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=rH,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}function rU(){}function rY(e){return null==e?rU:function(){return this.querySelector(e)}}function rX(){return[]}function rK(e){return null==e?rX:function(){return this.querySelectorAll(e)}}function rG(e){return function(){return this.matches(e)}}function rJ(e){return function(t){return t.matches(e)}}rV.prototype=rZ.prototype={constructor:rV,on:function(e,t){var n,r=this._,o=(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw Error("unknown type: "+e);return{type:e,name:t}}),a=-1,i=o.length;if(arguments.length<2){for(;++a<i;)if((n=(e=o[a]).type)&&(n=function(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}(r[n],e.name)))return n;return}if(null!=t&&"function"!=typeof t)throw Error("invalid callback: "+t);for(;++a<i;)if(n=(e=o[a]).type)r[n]=rq(r[n],e.name,t);else if(null==t)for(n in r)r[n]=rq(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new rV(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=Array(n),a=0;a<n;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(r=this._[e],a=0,n=r.length;a<n;++a)r[a].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};var rQ=Array.prototype.find;function r0(){return this.firstElementChild}var r1=Array.prototype.filter;function r2(){return Array.from(this.children)}function r5(e){return Array(e.length)}function r6(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function r4(e,t,n,r,o,a){for(var i,l=0,s=t.length,u=a.length;l<u;++l)(i=t[l])?(i.__data__=a[l],r[l]=i):n[l]=new r6(e,a[l]);for(;l<s;++l)(i=t[l])&&(o[l]=i)}function r3(e,t,n,r,o,a,i){var l,s,u,c=new Map,d=t.length,p=a.length,h=Array(d);for(l=0;l<d;++l)(s=t[l])&&(h[l]=u=i.call(s,s.__data__,l,t)+"",c.has(u)?o[l]=s:c.set(u,s));for(l=0;l<p;++l)u=i.call(e,a[l],l,a)+"",(s=c.get(u))?(r[l]=s,s.__data__=a[l],c.delete(u)):n[l]=new r6(e,a[l]);for(l=0;l<d;++l)(s=t[l])&&c.get(h[l])===s&&(o[l]=s)}function r9(e){return e.__data__}function r8(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}r6.prototype={constructor:r6,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)}};var r7="http://www.w3.org/1999/xhtml";let oe={svg:"http://www.w3.org/2000/svg",xhtml:r7,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ot(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),oe.hasOwnProperty(t)?{space:oe[t],local:e}:e}function on(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function or(e,t){return e.style.getPropertyValue(t)||on(e).getComputedStyle(e,null).getPropertyValue(t)}function oo(e){return e.trim().split(/^|\s+/)}function oa(e){return e.classList||new oi(e)}function oi(e){this._node=e,this._names=oo(e.getAttribute("class")||"")}function ol(e,t){for(var n=oa(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function os(e,t){for(var n=oa(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function ou(){this.textContent=""}function oc(){this.innerHTML=""}function od(){this.nextSibling&&this.parentNode.appendChild(this)}function op(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function oh(e){var t=ot(e);return(t.local?function(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}:function(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===r7&&t.documentElement.namespaceURI===r7?t.createElement(e):t.createElementNS(n,e)}})(t)}function of(){return null}function om(){var e=this.parentNode;e&&e.removeChild(this)}function og(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function oy(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ov(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,a=t.length;r<a;++r)(n=t[r],e.type&&n.type!==e.type||n.name!==e.name)?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function ob(e,t,n){return function(){var r,o=this.__on,a=function(e){t.call(this,e,this.__data__)};if(o){for(var i=0,l=o.length;i<l;++i)if((r=o[i]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),r.value=t;return}}this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function ox(e,t,n){var r=on(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}oi.prototype={add:function(e){0>this._names.indexOf(e)&&(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}};var ow=[null];function o_(e,t){this._groups=e,this._parents=t}function oS(){return new o_([[document.documentElement]],ow)}function ok(e){return"string"==typeof e?new o_([[document.querySelector(e)]],[document.documentElement]):new o_([[e]],ow)}function oC(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(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())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}o_.prototype=oS.prototype={constructor:o_,select:function(e){"function"!=typeof e&&(e=rY(e));for(var t=this._groups,n=t.length,r=Array(n),o=0;o<n;++o)for(var a,i,l=t[o],s=l.length,u=r[o]=Array(s),c=0;c<s;++c)(a=l[c])&&(i=e.call(a,a.__data__,c,l))&&("__data__"in a&&(i.__data__=a.__data__),u[c]=i);return new o_(r,this._parents)},selectAll:function(e){if("function"==typeof e){var t;t=e,e=function(){var e;return e=t.apply(this,arguments),null==e?[]:Array.isArray(e)?e:Array.from(e)}}else e=rK(e);for(var n=this._groups,r=n.length,o=[],a=[],i=0;i<r;++i)for(var l,s=n[i],u=s.length,c=0;c<u;++c)(l=s[c])&&(o.push(e.call(l,l.__data__,c,s)),a.push(l));return new o_(o,a)},selectChild:function(e){var t;return this.select(null==e?r0:(t="function"==typeof e?e:rJ(e),function(){return rQ.call(this.children,t)}))},selectChildren:function(e){var t;return this.selectAll(null==e?r2:(t="function"==typeof e?e:rJ(e),function(){return r1.call(this.children,t)}))},filter:function(e){"function"!=typeof e&&(e=rG(e));for(var t=this._groups,n=t.length,r=Array(n),o=0;o<n;++o)for(var a,i=t[o],l=i.length,s=r[o]=[],u=0;u<l;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&s.push(a);return new o_(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,r9);var n=t?r3:r4,r=this._parents,o=this._groups;"function"!=typeof e&&(v=e,e=function(){return v});for(var a=o.length,i=Array(a),l=Array(a),s=Array(a),u=0;u<a;++u){var c=r[u],d=o[u],p=d.length,h="object"==typeof(y=e.call(c,c&&c.__data__,u,r))&&"length"in y?y:Array.from(y),f=h.length,m=l[u]=Array(f),g=i[u]=Array(f);n(c,d,m,g,s[u]=Array(p),h,t);for(var y,v,b,x,w=0,_=0;w<f;++w)if(b=m[w]){for(w>=_&&(_=w+1);!(x=g[_])&&++_<f;);b._next=x||null}}return(i=new o_(i,r))._enter=l,i._exit=s,i},enter:function(){return new o_(this._enter||this._groups.map(r5),this._parents)},exit:function(){return new o_(this._exit||this._groups.map(r5),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,a=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?a.remove():n(a),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,a=r.length,i=Math.min(o,a),l=Array(o),s=0;s<i;++s)for(var u,c=n[s],d=r[s],p=c.length,h=l[s]=Array(p),f=0;f<p;++f)(u=c[f]||d[f])&&(h[f]=u);for(;s<o;++s)l[s]=n[s];return new o_(l,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],a=o.length-1,i=o[a];--a>=0;)(r=o[a])&&(i&&4^r.compareDocumentPosition(i)&&i.parentNode.insertBefore(r,i),i=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=r8);for(var n=this._groups,r=n.length,o=Array(r),a=0;a<r;++a){for(var i,l=n[a],s=l.length,u=o[a]=Array(s),c=0;c<s;++c)(i=l[c])&&(u[c]=i);u.sort(t)}return new o_(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null},size:function(){let e=0;for(let t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,a=t[n],i=0,l=a.length;i<l;++i)(o=a[i])&&e.call(o,o.__data__,i,a);return this},attr:function(e,t){var n=ot(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}}:"function"==typeof t?n.local?function(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}:function(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}:n.local?function(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}:function(e,t){return function(){this.setAttribute(e,t)}})(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?function(e){return function(){this.style.removeProperty(e)}}:"function"==typeof t?function(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}:function(e,t,n){return function(){this.style.setProperty(e,t,n)}})(e,t,null==n?"":n)):or(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?function(e){return function(){delete this[e]}}:"function"==typeof t?function(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}:function(e,t){return function(){this[e]=t}})(e,t)):this.node()[e]},classed:function(e,t){var n=oo(e+"");if(arguments.length<2){for(var r=oa(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?function(e,t){return function(){(t.apply(this,arguments)?ol:os)(this,e)}}:t?function(e){return function(){ol(this,e)}}:function(e){return function(){os(this,e)}})(n,t))},text:function(e){return arguments.length?this.each(null==e?ou:("function"==typeof e?function(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}:function(e){return function(){this.textContent=e}})(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?oc:("function"==typeof e?function(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}:function(e){return function(){this.innerHTML=e}})(e)):this.node().innerHTML},raise:function(){return this.each(od)},lower:function(){return this.each(op)},append:function(e){var t="function"==typeof e?e:oh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:oh(e),r=null==t?of:"function"==typeof t?t:rY(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(om)},clone:function(e){return this.select(e?oy:og)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,a=(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}}),i=a.length;if(arguments.length<2){var l=this.node().__on;if(l){for(var s,u=0,c=l.length;u<c;++u)for(r=0,s=l[u];r<i;++r)if((o=a[r]).type===s.type&&o.name===s.name)return s.value}return}for(r=0,l=t?ob:ov;r<i;++r)this.each(l(a[r],t,n));return this},dispatch:function(e,t){return this.each(("function"==typeof t?function(e,t){return function(){return ox(this,e,t.apply(this,arguments))}}:function(e,t){return function(){return ox(this,e,t)}})(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],a=0,i=o.length;a<i;++a)(r=o[a])&&(yield r)}};let oI={passive:!1},oM={capture:!0,passive:!1};function oE(e){e.stopImmediatePropagation()}function oT(e){e.preventDefault(),e.stopImmediatePropagation()}function oj(e){var t=e.document.documentElement,n=ok(e).on("dragstart.drag",oT,oM);"onselectstart"in t?n.on("selectstart.drag",oT,oM):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function oR(e,t){var n=e.document.documentElement,r=ok(e).on("dragstart.drag",null);t&&(r.on("click.drag",oT,oM),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}let oN=e=>()=>e;function oA(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:a,x:i,y:l,dx:s,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}function oz(e){return!e.ctrlKey&&!e.button}function oP(){return this.parentNode}function oO(e,t){return null==t?{x:e.x,y:e.y}:t}function oD(){return navigator.maxTouchPoints||"ontouchstart"in this}function o$(){var e,t,n,r,o=oz,a=oP,i=oO,l=oD,s={},u=rZ("start","drag","end"),c=0,d=0;function p(e){e.on("mousedown.drag",h).filter(l).on("touchstart.drag",g).on("touchmove.drag",y,oI).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(i,l){if(!r&&o.call(this,i,l)){var s=b(this,a.call(this,i,l),i,l,"mouse");s&&(ok(i.view).on("mousemove.drag",f,oM).on("mouseup.drag",m,oM),oj(i.view),oE(i),n=!1,e=i.clientX,t=i.clientY,s("start",i))}}function f(r){if(oT(r),!n){var o=r.clientX-e,a=r.clientY-t;n=o*o+a*a>d}s.mouse("drag",r)}function m(e){ok(e.view).on("mousemove.drag mouseup.drag",null),oR(e.view,n),oT(e),s.mouse("end",e)}function g(e,t){if(o.call(this,e,t)){var n,r,i=e.changedTouches,l=a.call(this,e,t),s=i.length;for(n=0;n<s;++n)(r=b(this,l,e,t,i[n].identifier,i[n]))&&(oE(e),r("start",e,i[n]))}}function y(e){var t,n,r=e.changedTouches,o=r.length;for(t=0;t<o;++t)(n=s[r[t].identifier])&&(oT(e),n("drag",e,r[t]))}function v(e){var t,n,o=e.changedTouches,a=o.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),t=0;t<a;++t)(n=s[o[t].identifier])&&(oE(e),n("end",e,o[t]))}function b(e,t,n,r,o,a){var l,d,h,f=u.copy(),m=oC(a||n,t);if(null!=(h=i.call(e,new oA("beforestart",{sourceEvent:n,target:p,identifier:o,active:c,x:m[0],y:m[1],dx:0,dy:0,dispatch:f}),r)))return l=h.x-m[0]||0,d=h.y-m[1]||0,function n(a,i,u){var g,y=m;switch(a){case"start":s[o]=n,g=c++;break;case"end":delete s[o],--c;case"drag":m=oC(u||i,t),g=c}f.call(a,e,new oA(a,{sourceEvent:i,subject:h,target:p,identifier:o,active:g,x:m[0]+l,y:m[1]+d,dx:m[0]-y[0],dy:m[1]-y[1],dispatch:f}),r)}}return p.filter=function(e){return arguments.length?(o="function"==typeof e?e:oN(!!e),p):o},p.container=function(e){return arguments.length?(a="function"==typeof e?e:oN(e),p):a},p.subject=function(e){return arguments.length?(i="function"==typeof e?e:oN(e),p):i},p.touchable=function(e){return arguments.length?(l="function"==typeof e?e:oN(!!e),p):l},p.on=function(){var e=u.on.apply(u,arguments);return e===u?p:e},p.clickDistance=function(e){return arguments.length?(d=(e*=1)*e,p):Math.sqrt(d)},p}function oL(e){return((e=Math.exp(e))+1/e)/2}oA.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};let oB=function e(t,n,r){function o(e,o){var a,i,l=e[0],s=e[1],u=e[2],c=o[0],d=o[1],p=o[2],h=c-l,f=d-s,m=h*h+f*f;if(m<1e-12)i=Math.log(p/u)/t,a=function(e){return[l+e*h,s+e*f,u*Math.exp(t*e*i)]};else{var g=Math.sqrt(m),y=(p*p-u*u+r*m)/(2*u*n*g),v=(p*p-u*u-r*m)/(2*p*n*g),b=Math.log(Math.sqrt(y*y+1)-y);i=(Math.log(Math.sqrt(v*v+1)-v)-b)/t,a=function(e){var r,o,a=e*i,c=oL(b),d=u/(n*g)*(c*(((r=Math.exp(2*(r=t*a+b)))-1)/(r+1))-((o=Math.exp(o=b))-1/o)/2);return[l+d*h,s+d*f,u*c/oL(t*a+b)]}}return a.duration=1e3*i*t/Math.SQRT2,a}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4);var oW,oF,oH,oZ,oV,oq,oU,oY=0,oX=0,oK=0,oG=0,oJ=0,oQ=0,o0="object"==typeof performance&&performance.now?performance:Date,o1="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function o2(){return oJ||(o1(o5),oJ=o0.now()+oQ)}function o5(){oJ=0}function o6(){this._call=this._time=this._next=null}function o4(e,t,n){var r=new o6;return r.restart(e,t,n),r}function o3(){oJ=(oG=o0.now())+oQ,oY=oX=0;try{o2(),++oY;for(var e,t=oq;t;)(e=oJ-t._time)>=0&&t._call.call(void 0,e),t=t._next;--oY}finally{oY=0,function(){for(var e,t,n=oq,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:oq=t);oU=e,o8(r)}(),oJ=0}}function o9(){var e=o0.now(),t=e-oG;t>1e3&&(oQ-=t,oG=e)}function o8(e){!oY&&(oX&&(oX=clearTimeout(oX)),e-oJ>24?(e<1/0&&(oX=setTimeout(o3,e-o0.now()-oQ)),oK&&(oK=clearInterval(oK))):(oK||(oG=o0.now(),oK=setInterval(o9,1e3)),oY=1,o1(o3)))}function o7(e,t,n){var r=new o6;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}o6.prototype=o4.prototype={constructor:o6,restart:function(e,t,n){if("function"!=typeof e)throw TypeError("callback is not a function");n=(null==n?o2():+n)+(null==t?0:+t),this._next||oU===this||(oU?oU._next=this:oq=this,oU=this),this._call=e,this._time=n,o8()},stop:function(){this._call&&(this._call=null,this._time=1/0,o8())}};var ae=rZ("start","end","cancel","interrupt"),at=[];function an(e,t,n,r,o,a){var i=e.__transition;if(i){if(n in i)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function a(s){var u,c,d,p;if(1!==n.state)return l();for(u in o)if((p=o[u]).name===n.name){if(3===p.state)return o7(a);4===p.state?(p.state=6,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete o[u]):+u<t&&(p.state=6,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete o[u])}if(o7(function(){3===n.state&&(n.state=4,n.timer.restart(i,n.delay,n.time),i(s))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(u=0,n.state=3,r=Array(d=n.tween.length),c=-1;u<d;++u)(p=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(r[++c]=p);r.length=c+1}}function i(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,i=r.length;++a<i;)r[a].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=o4(function(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)},0,n.time)}(e,n,{name:t,index:r,group:o,on:ae,tween:at,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ar(e,t){var n=aa(e,t);if(n.state>0)throw Error("too late; already scheduled");return n}function ao(e,t){var n=aa(e,t);if(n.state>3)throw Error("too late; already running");return n}function aa(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error("transition not found");return n}function ai(e,t){var n,r,o,a=e.__transition,i=!0;if(a){for(o in t=null==t?null:t+"",a){if((n=a[o]).name!==t){i=!1;continue}r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[o]}i&&delete e.__transition}}function al(e,t){return e*=1,t*=1,function(n){return e*(1-n)+t*n}}var as=180/Math.PI,au={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ac(e,t,n,r,o,a){var i,l,s;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(s=e*n+t*r)&&(n-=e*s,r-=t*s),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,s/=l),e*r<t*n&&(e=-e,t=-t,s=-s,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*as,skewX:Math.atan(s)*as,scaleX:i,scaleY:l}}function ad(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(a,i){var l,s,u,c,d=[],p=[];return a=e(a),i=e(i),!function(e,r,o,a,i,l){if(e!==o||r!==a){var s=i.push("translate(",null,t,null,n);l.push({i:s-4,x:al(e,o)},{i:s-2,x:al(r,a)})}else(o||a)&&i.push("translate("+o+t+a+n)}(a.translateX,a.translateY,i.translateX,i.translateY,d,p),l=a.rotate,s=i.rotate,l!==s?(l-s>180?s+=360:s-l>180&&(l+=360),p.push({i:d.push(o(d)+"rotate(",null,r)-2,x:al(l,s)})):s&&d.push(o(d)+"rotate("+s+r),u=a.skewX,c=i.skewX,u!==c?p.push({i:d.push(o(d)+"skewX(",null,r)-2,x:al(u,c)}):c&&d.push(o(d)+"skewX("+c+r),!function(e,t,n,r,a,i){if(e!==n||t!==r){var l=a.push(o(a)+"scale(",null,",",null,")");i.push({i:l-4,x:al(e,n)},{i:l-2,x:al(t,r)})}else(1!==n||1!==r)&&a.push(o(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,i.scaleX,i.scaleY,d,p),a=i=null,function(e){for(var t,n=-1,r=p.length;++n<r;)d[(t=p[n]).i]=t.x(e);return d.join("")}}}var ap=ad(function(e){let t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?au:ac(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),ah=ad(function(e){return null==e?au:(c||(c=document.createElementNS("http://www.w3.org/2000/svg","g")),c.setAttribute("transform",e),e=c.transform.baseVal.consolidate())?ac((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):au},", ",")",")");function af(e,t,n){var r=e._id;return e.each(function(){var e=ao(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return aa(e,r).value[t]}}function am(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ag(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ay(){}var av="\\s*([+-]?\\d+)\\s*",ab="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ax="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",aw=/^#([0-9a-f]{3,8})$/,a_=RegExp(`^rgb\\(${av},${av},${av}\\)$`),aS=RegExp(`^rgb\\(${ax},${ax},${ax}\\)$`),ak=RegExp(`^rgba\\(${av},${av},${av},${ab}\\)$`),aC=RegExp(`^rgba\\(${ax},${ax},${ax},${ab}\\)$`),aI=RegExp(`^hsl\\(${ab},${ax},${ax}\\)$`),aM=RegExp(`^hsla\\(${ab},${ax},${ax},${ab}\\)$`),aE={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function aT(){return this.rgb().formatHex()}function aj(){return this.rgb().formatRgb()}function aR(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=aw.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?aN(t):3===n?new aP(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?aA(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?aA(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=a_.exec(e))?new aP(t[1],t[2],t[3],1):(t=aS.exec(e))?new aP(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ak.exec(e))?aA(t[1],t[2],t[3],t[4]):(t=aC.exec(e))?aA(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=aI.exec(e))?aW(t[1],t[2]/100,t[3]/100,1):(t=aM.exec(e))?aW(t[1],t[2]/100,t[3]/100,t[4]):aE.hasOwnProperty(e)?aN(aE[e]):"transparent"===e?new aP(NaN,NaN,NaN,0):null}function aN(e){return new aP(e>>16&255,e>>8&255,255&e,1)}function aA(e,t,n,r){return r<=0&&(e=t=n=NaN),new aP(e,t,n,r)}function az(e,t,n,r){var o;return 1==arguments.length?((o=e)instanceof ay||(o=aR(o)),o)?new aP((o=o.rgb()).r,o.g,o.b,o.opacity):new aP:new aP(e,t,n,null==r?1:r)}function aP(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function aO(){return`#${aB(this.r)}${aB(this.g)}${aB(this.b)}`}function aD(){let e=a$(this.opacity);return`${1===e?"rgb(":"rgba("}${aL(this.r)}, ${aL(this.g)}, ${aL(this.b)}${1===e?")":`, ${e})`}`}function a$(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function aL(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function aB(e){return((e=aL(e))<16?"0":"")+e.toString(16)}function aW(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new aH(e,t,n,r)}function aF(e){if(e instanceof aH)return new aH(e.h,e.s,e.l,e.opacity);if(e instanceof ay||(e=aR(e)),!e)return new aH;if(e instanceof aH)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,l=a-o,s=(a+o)/2;return l?(i=t===a?(n-r)/l+(n<r)*6:n===a?(r-t)/l+2:(t-n)/l+4,l/=s<.5?a+o:2-a-o,i*=60):l=s>0&&s<1?0:i,new aH(i,l,s,e.opacity)}function aH(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function aZ(e){return(e=(e||0)%360)<0?e+360:e}function aV(e){return Math.max(0,Math.min(1,e||0))}function aq(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function aU(e,t,n,r,o){var a=e*e,i=a*e;return((1-3*e+3*a-i)*t+(4-6*a+3*i)*n+(1+3*e+3*a-3*i)*r+i*o)/6}am(ay,aR,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:aT,formatHex:aT,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return aF(this).formatHsl()},formatRgb:aj,toString:aj}),am(aP,az,ag(ay,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new aP(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new aP(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new aP(aL(this.r),aL(this.g),aL(this.b),a$(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:aO,formatHex:aO,formatHex8:function(){return`#${aB(this.r)}${aB(this.g)}${aB(this.b)}${aB((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:aD,toString:aD})),am(aH,function(e,t,n,r){return 1==arguments.length?aF(e):new aH(e,t,n,null==r?1:r)},ag(ay,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new aH(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new aH(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new aP(aq(e>=240?e-240:e+120,o,r),aq(e,o,r),aq(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new aH(aZ(this.h),aV(this.s),aV(this.l),a$(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=a$(this.opacity);return`${1===e?"hsl(":"hsla("}${aZ(this.h)}, ${100*aV(this.s)}%, ${100*aV(this.l)}%${1===e?")":`, ${e})`}`}}));let aY=e=>()=>e;function aX(e,t){var n=t-e;return n?function(t){return e+t*n}:aY(isNaN(e)?t:e)}let aK=function e(t){var n,r=1==(n=+t)?aX:function(e,t){var r,o,a;return t-e?(r=e,o=t,r=Math.pow(r,a=n),o=Math.pow(o,a)-r,a=1/a,function(e){return Math.pow(r+e*o,a)}):aY(isNaN(e)?t:e)};function o(e,t){var n=r((e=az(e)).r,(t=az(t)).r),o=r(e.g,t.g),a=r(e.b,t.b),i=aX(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return o.gamma=e,o}(1);function aG(e){return function(t){var n,r,o=t.length,a=Array(o),i=Array(o),l=Array(o);for(n=0;n<o;++n)r=az(t[n]),a[n]=r.r||0,i[n]=r.g||0,l[n]=r.b||0;return a=e(a),i=e(i),l=e(l),r.opacity=1,function(e){return r.r=a(e),r.g=i(e),r.b=l(e),r+""}}}aG(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],a=e[r+1],i=r>0?e[r-1]:2*o-a,l=r<t-1?e[r+2]:2*a-o;return aU((n-r/t)*t,i,o,a,l)}}),aG(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],a=e[r%t],i=e[(r+1)%t],l=e[(r+2)%t];return aU((n-r/t)*t,o,a,i,l)}});var aJ=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,aQ=RegExp(aJ.source,"g");function a0(e,t){var n,r,o,a,i,l=aJ.lastIndex=aQ.lastIndex=0,s=-1,u=[],c=[];for(e+="",t+="";(o=aJ.exec(e))&&(a=aQ.exec(t));)(i=a.index)>l&&(i=t.slice(l,i),u[s]?u[s]+=i:u[++s]=i),(o=o[0])===(a=a[0])?u[s]?u[s]+=a:u[++s]=a:(u[++s]=null,c.push({i:s,x:al(o,a)})),l=aQ.lastIndex;return l<t.length&&(i=t.slice(l),u[s]?u[s]+=i:u[++s]=i),u.length<2?c[0]?(n=c[0].x,function(e){return n(e)+""}):(r=t,function(){return r}):(t=c.length,function(e){for(var n,r=0;r<t;++r)u[(n=c[r]).i]=n.x(e);return u.join("")})}function a1(e,t){var n;return("number"==typeof t?al:t instanceof aR?aK:(n=aR(t))?(t=n,aK):a0)(e,t)}var a2=oS.prototype.constructor;function a5(e){return function(){this.style.removeProperty(e)}}var a6=0;function a4(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}var a3=oS.prototype;a4.prototype=(function(e){return oS().transition(e)}).prototype={constructor:a4,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=rY(e));for(var r=this._groups,o=r.length,a=Array(o),i=0;i<o;++i)for(var l,s,u=r[i],c=u.length,d=a[i]=Array(c),p=0;p<c;++p)(l=u[p])&&(s=e.call(l,l.__data__,p,u))&&("__data__"in l&&(s.__data__=l.__data__),d[p]=s,an(d[p],t,n,p,d,aa(l,n)));return new a4(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=rK(e));for(var r=this._groups,o=r.length,a=[],i=[],l=0;l<o;++l)for(var s,u=r[l],c=u.length,d=0;d<c;++d)if(s=u[d]){for(var p,h=e.call(s,s.__data__,d,u),f=aa(s,n),m=0,g=h.length;m<g;++m)(p=h[m])&&an(p,t,n,m,h,f);a.push(h),i.push(s)}return new a4(a,i,t,n)},selectChild:a3.selectChild,selectChildren:a3.selectChildren,filter:function(e){"function"!=typeof e&&(e=rG(e));for(var t=this._groups,n=t.length,r=Array(n),o=0;o<n;++o)for(var a,i=t[o],l=i.length,s=r[o]=[],u=0;u<l;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&s.push(a);return new a4(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,o=n.length,a=Math.min(r,o),i=Array(r),l=0;l<a;++l)for(var s,u=t[l],c=n[l],d=u.length,p=i[l]=Array(d),h=0;h<d;++h)(s=u[h]||c[h])&&(p[h]=s);for(;l<r;++l)i[l]=t[l];return new a4(i,this._parents,this._name,this._id)},selection:function(){return new a2(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=++a6,r=this._groups,o=r.length,a=0;a<o;++a)for(var i,l=r[a],s=l.length,u=0;u<s;++u)if(i=l[u]){var c=aa(i,t);an(i,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new a4(r,this._parents,e,n)},call:a3.call,nodes:a3.nodes,node:a3.node,size:a3.size,empty:a3.empty,each:a3.each,on:function(e,t){var n,r,o,a,i,l,s=this._id;return arguments.length<2?aa(this.node(),s).on.on(e):this.each((n=s,r=e,o=t,l=(r+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})?ar:ao,function(){var e=l(this,n),t=e.on;t!==a&&(i=(a=t).copy()).on(r,o),e.on=i}))},attr:function(e,t){var n=ot(e),r="transform"===n?ah:a1;return this.attrTween(e,"function"==typeof t?(n.local?function(e,t,n){var r,o,a;return function(){var i,l,s=n(this);return null==s?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local))===(l=s+"")?null:i===r&&l===o?a:(o=l,a=t(r=i,s))}}:function(e,t,n){var r,o,a;return function(){var i,l,s=n(this);return null==s?void this.removeAttribute(e):(i=this.getAttribute(e))===(l=s+"")?null:i===r&&l===o?a:(o=l,a=t(r=i,s))}})(n,r,af(this,"attr."+e,t)):null==t?(n.local?function(e){return function(){this.removeAttributeNS(e.space,e.local)}}:function(e){return function(){this.removeAttribute(e)}})(n):(n.local?function(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttributeNS(e.space,e.local);return i===a?null:i===r?o:o=t(r=i,n)}}:function(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttribute(e);return i===a?null:i===r?o:o=t(r=i,n)}})(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw Error();var r=ot(e);return this.tween(n,(r.local?function(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(t){this.setAttributeNS(e.space,e.local,o.call(this,t))}),n}return o._value=t,o}:function(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(t){this.setAttribute(e,o.call(this,t))}),n}return o._value=t,o})(r,t))},style:function(e,t,n){var r,o,a,i,l,s,u,c,d,p,h,f,m,g,y,v,b,x,w,_,S,k="transform"==(e+="")?ap:a1;return null==t?this.styleTween(e,(r=e,function(){var e=or(this,r),t=(this.style.removeProperty(r),or(this,r));return e===t?null:e===o&&t===a?i:i=k(o=e,a=t)})).on("end.style."+e,a5(e)):"function"==typeof t?this.styleTween(e,(l=e,s=af(this,"style."+e,t),function(){var e=or(this,l),t=s(this),n=t+"";return null==t&&(this.style.removeProperty(l),n=t=or(this,l)),e===n?null:e===u&&n===c?d:(c=n,d=k(u=e,t))})).each((p=this._id,b="end."+(v="style."+(h=e)),function(){var e=ao(this,p),t=e.on,n=null==e.value[v]?y||(y=a5(h)):void 0;(t!==f||g!==n)&&(m=(f=t).copy()).on(b,g=n),e.on=m})):this.styleTween(e,(x=e,S=t+"",function(){var e=or(this,x);return e===S?null:e===w?_:_=k(w=e,t)}),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw Error();return this.tween(r,function(e,t,n){var r,o;function a(){var a=t.apply(this,arguments);return a!==o&&(r=(o=a)&&function(t){this.style.setProperty(e,a.call(this,t),n)}),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){var t,n;return this.tween("text","function"==typeof e?(t=af(this,"text",e),function(){var e=t(this);this.textContent=null==e?"":e}):(n=null==e?"":e+"",function(){this.textContent=n}))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw Error();return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){this.textContent=r.call(this,e)}),t}return r._value=e,r}(e))},remove:function(){var e;return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=aa(this.node(),n).tween,a=0,i=o.length;a<i;++a)if((r=o[a]).name===e)return r.value;return null}return this.each((null==t?function(e,t){var n,r;return function(){var o=ao(this,e),a=o.tween;if(a!==n){r=n=a;for(var i=0,l=r.length;i<l;++i)if(r[i].name===t){(r=r.slice()).splice(i,1);break}}o.tween=r}}:function(e,t,n){var r,o;if("function"!=typeof n)throw Error();return function(){var a=ao(this,e),i=a.tween;if(i!==r){o=(r=i).slice();for(var l={name:t,value:n},s=0,u=o.length;s<u;++s)if(o[s].name===t){o[s]=l;break}s===u&&o.push(l)}a.tween=o}})(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?function(e,t){return function(){ar(this,e).delay=+t.apply(this,arguments)}}:function(e,t){return t*=1,function(){ar(this,e).delay=t}})(t,e)):aa(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?function(e,t){return function(){ao(this,e).duration=+t.apply(this,arguments)}}:function(e,t){return t*=1,function(){ao(this,e).duration=t}})(t,e)):aa(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw Error();return function(){ao(this,e).ease=t}}(t,e)):aa(this.node(),t).ease},easeVarying:function(e){var t;if("function"!=typeof e)throw Error();return this.each((t=this._id,function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw Error();ao(this,t).ease=n}))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(a,i){var l={value:i},s={value:function(){0==--o&&a()}};n.each(function(){var n=ao(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(l),t._.interrupt.push(l),t._.end.push(s)),n.on=t}),0===o&&a()})},[Symbol.iterator]:a3[Symbol.iterator]};var a9={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};oS.prototype.interrupt=function(e){return this.each(function(){ai(this,e)})},oS.prototype.transition=function(e){var t,n;e instanceof a4?(t=e._id,e=e._name):(t=++a6,(n=a9).time=o2(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i,l=r[a],s=l.length,u=0;u<s;++u)(i=l[u])&&an(i,e,t,u,l,n||function(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}(i,t));return new a4(r,this._parents,e,t)};let a8=e=>()=>e;function a7(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function ie(e,t,n){this.k=e,this.x=t,this.y=n}ie.prototype={constructor:ie,scale:function(e){return 1===e?this:new ie(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new ie(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 it=new ie(1,0,0);function ir(e){for(;!e.__zoom;)if(!(e=e.parentNode))return it;return e.__zoom}function io(e){e.stopImmediatePropagation()}function ia(e){e.preventDefault(),e.stopImmediatePropagation()}function ii(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function il(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).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 is(){return this.__zoom||it}function iu(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ic(){return navigator.maxTouchPoints||"ontouchstart"in this}function id(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function ip(){var e,t,n,r=ii,o=il,a=id,i=iu,l=ic,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,d=oB,p=rZ("start","zoom","end"),h=0,f=10;function m(e){e.property("__zoom",is).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",k).filter(l).on("touchstart.zoom",C).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",M).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(s[0],Math.min(s[1],t)))===e.k?e:new ie(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new ie(e.k,r,o)}function v(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(e,t,n,r){e.on("start.zoom",function(){x(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(r).end()}).tween("zoom",function(){var e=arguments,a=x(this,e).event(r),i=o.apply(this,e),l=null==n?v(i):"function"==typeof n?n.apply(this,e):n,s=Math.max(i[1][0]-i[0][0],i[1][1]-i[0][1]),u=this.__zoom,c="function"==typeof t?t.apply(this,e):t,p=d(u.invert(l).concat(s/u.k),c.invert(l).concat(s/c.k));return function(e){if(1===e)e=c;else{var t=p(e),n=s/t[2];e=new ie(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}})}function x(e,t,n){return!n&&e.__zooming||new w(e,t)}function w(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function _(e,...t){if(r.apply(this,arguments)){var n=x(this,t).event(e),o=this.__zoom,l=Math.max(s[0],Math.min(s[1],o.k*Math.pow(2,i.apply(this,arguments)))),c=oC(e);if(n.wheel)(n.mouse[0][0]!==c[0]||n.mouse[0][1]!==c[1])&&(n.mouse[1]=o.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(o.k===l)return;n.mouse=[c,o.invert(c)],ai(this),n.start()}ia(e),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",a(y(g(o,l),n.mouse[0],n.mouse[1]),n.extent,u))}}function S(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,i=x(this,t,!0).event(e),l=ok(e.view).on("mousemove.zoom",function(e){if(ia(e),!i.moved){var t=e.clientX-c,n=e.clientY-d;i.moved=t*t+n*n>h}i.event(e).zoom("mouse",a(y(i.that.__zoom,i.mouse[0]=oC(e,o),i.mouse[1]),i.extent,u))},!0).on("mouseup.zoom",function(e){l.on("mousemove.zoom mouseup.zoom",null),oR(e.view,i.moved),ia(e),i.event(e).end()},!0),s=oC(e,o),c=e.clientX,d=e.clientY;oj(e.view),io(e),i.mouse=[s,this.__zoom.invert(s)],ai(this),i.start()}}function k(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,i=oC(e.changedTouches?e.changedTouches[0]:e,this),l=n.invert(i),s=n.k*(e.shiftKey?.5:2),d=a(y(g(n,s),i,l),o.apply(this,t),u);ia(e),c>0?ok(this).transition().duration(c).call(b,d,i,e):ok(this).call(m.transform,d,i,e)}}function C(n,...o){if(r.apply(this,arguments)){var a,i,l,s,u=n.touches,c=u.length,d=x(this,o,n.changedTouches.length===c).event(n);for(io(n),i=0;i<c;++i)s=[s=oC(l=u[i],this),this.__zoom.invert(s),l.identifier],d.touch0?d.touch1||d.touch0[2]===s[2]||(d.touch1=s,d.taps=0):(d.touch0=s,a=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),a&&(d.taps<2&&(t=s[0],e=setTimeout(function(){e=null},500)),ai(this),d.start())}}function I(e,...t){if(this.__zooming){var n,r,o,i,l=x(this,t).event(e),s=e.changedTouches,c=s.length;for(ia(e),n=0;n<c;++n)o=oC(r=s[n],this),l.touch0&&l.touch0[2]===r.identifier?l.touch0[0]=o:l.touch1&&l.touch1[2]===r.identifier&&(l.touch1[0]=o);if(r=l.that.__zoom,l.touch1){var d=l.touch0[0],p=l.touch0[1],h=l.touch1[0],f=l.touch1[1],m=(m=h[0]-d[0])*m+(m=h[1]-d[1])*m,v=(v=f[0]-p[0])*v+(v=f[1]-p[1])*v;r=g(r,Math.sqrt(m/v)),o=[(d[0]+h[0])/2,(d[1]+h[1])/2],i=[(p[0]+f[0])/2,(p[1]+f[1])/2]}else{if(!l.touch0)return;o=l.touch0[0],i=l.touch0[1]}l.zoom("touch",a(y(r,o,i),l.extent,u))}}function M(e,...r){if(this.__zooming){var o,a,i=x(this,r).event(e),l=e.changedTouches,s=l.length;for(io(e),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),o=0;o<s;++o)a=l[o],i.touch0&&i.touch0[2]===a.identifier?delete i.touch0:i.touch1&&i.touch1[2]===a.identifier&&delete i.touch1;if(i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0)i.touch0[1]=this.__zoom.invert(i.touch0[0]);else if(i.end(),2===i.taps&&(a=oC(a,this),Math.hypot(t[0]-a[0],t[1]-a[1])<f)){var u=ok(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return m.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",is),e!==o?b(e,t,n,r):o.interrupt().each(function(){x(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()})},m.scaleBy=function(e,t,n,r){m.scaleTo(e,function(){var e=this.__zoom.k,n="function"==typeof t?t.apply(this,arguments):t;return e*n},n,r)},m.scaleTo=function(e,t,n,r){m.transform(e,function(){var e=o.apply(this,arguments),r=this.__zoom,i=null==n?v(e):"function"==typeof n?n.apply(this,arguments):n,l=r.invert(i),s="function"==typeof t?t.apply(this,arguments):t;return a(y(g(r,s),i,l),e,u)},n,r)},m.translateBy=function(e,t,n,r){m.transform(e,function(){return a(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),u)},null,r)},m.translateTo=function(e,t,n,r,i){m.transform(e,function(){var e=o.apply(this,arguments),i=this.__zoom,l=null==r?v(e):"function"==typeof r?r.apply(this,arguments):r;return a(it.translate(l[0],l[1]).scale(i.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,u)},r,i)},w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=ok(this.that).datum();p.call(e,this.that,new a7(e,{sourceEvent:this.sourceEvent,target:m,type:e,transform:this.that.__zoom,dispatch:p}),t)}},m.wheelDelta=function(e){return arguments.length?(i="function"==typeof e?e:a8(+e),m):i},m.filter=function(e){return arguments.length?(r="function"==typeof e?e:a8(!!e),m):r},m.touchable=function(e){return arguments.length?(l="function"==typeof e?e:a8(!!e),m):l},m.extent=function(e){return arguments.length?(o="function"==typeof e?e:a8([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):o},m.scaleExtent=function(e){return arguments.length?(s[0]=+e[0],s[1]=+e[1],m):[s[0],s[1]]},m.translateExtent=function(e){return arguments.length?(u[0][0]=+e[0][0],u[1][0]=+e[1][0],u[0][1]=+e[0][1],u[1][1]=+e[1][1],m):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},m.constrain=function(e){return arguments.length?(a=e,m):a},m.duration=function(e){return arguments.length?(c=+e,m):c},m.interpolate=function(e){return arguments.length?(d=e,m):d},m.on=function(){var e=p.on.apply(p,arguments);return e===p?m:e},m.clickDistance=function(e){return arguments.length?(h=(e*=1)*e,m):Math.sqrt(h)},m.tapDistance=function(e){return arguments.length?(f=+e,m):f},m}function ih(e,t){var n,r,o=typeof t;return null==t||"boolean"===o?aY(t):("number"===o?al:"string"===o?(r=aR(t))?(t=r,aK):a0:t instanceof aR?aK:t instanceof Date?function(e,t){var n=new Date;return e*=1,t*=1,function(r){return n.setTime(e*(1-r)+t*r),n}}:!ArrayBuffer.isView(n=t)||n instanceof DataView?Array.isArray(t)?function(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,a=Array(o),i=Array(r);for(n=0;n<o;++n)a[n]=ih(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<o;++n)i[n]=a[n](e);return i}}:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?function(e,t){var n,r={},o={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=ih(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}:al:function(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(a){for(n=0;n<r;++n)o[n]=e[n]*(1-a)+t[n]*a;return o}})(e,t)}ir.prototype=ie.prototype;let im=[[-1/0,-1/0],[1/0,1/0]],ig=["Enter"," ","Escape"],iy={"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"};(n=d||(d={})).Strict="strict",n.Loose="loose",(r=p||(p={})).Free="free",r.Vertical="vertical",r.Horizontal="horizontal",(o=h||(h={})).Partial="partial",o.Full="full";let iv={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};(a=f||(f={})).Bezier="default",a.Straight="straight",a.Step="step",a.SmoothStep="smoothstep",a.SimpleBezier="simplebezier",(i=m||(m={})).Arrow="arrow",i.ArrowClosed="arrowclosed",(l=g||(g={})).Left="left",l.Top="top",l.Right="right",l.Bottom="bottom";let ib={[g.Left]:g.Right,[g.Right]:g.Left,[g.Top]:g.Bottom,[g.Bottom]:g.Top};function ix(e){return null===e?null:e?"valid":"invalid"}let iw=e=>"id"in e&&"source"in e&&"target"in e,i_=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),iS=(e,t=[0,0])=>{let{width:n,height:r}=iG(e),o=e.origin??t,a=n*o[0],i=r*o[1];return{x:e.position.x-a,y:e.position.y-i}},ik=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(void 0===t.filter||t.filter(e))&&(n=iz(n,i$(e)),r=!0)}),r?iO(n):{x:0,y:0,width:0,height:0}},iC=(e,t,[n,r,o]=[0,0,1],a=!1,i=!1)=>{let l={...iV(t,[n,r,o]),width:t.width/o,height:t.height/o},s=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(i&&!n||r)continue;let o=e.width??t.width??t.initialWidth??null,u=e.height??t.height??t.initialHeight??null,c=iB(l,iD(t)),d=(o??0)*(u??0),p=a&&c>0;(!t.internals.handleBounds||p||c>=d||t.dragging)&&s.push(t)}return s};async function iI({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:a},i){let l,s;if(0===e.size)return!0;let u=iY(ik((l=new Map,s=i?.nodes?new Set(i.nodes.map(e=>e.id)):null,e.forEach(e=>{e.measured.width&&e.measured.height&&(i?.includeHiddenNodes||!e.hidden)&&(!s||s.has(e.id))&&l.set(e.id,e)}),l)),t,n,i?.minZoom??o,i?.maxZoom??a,i?.padding??.1);return await r.setViewport(u,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),!0}function iM({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:a}){let i=n.get(e),l=i.parentId?n.get(i.parentId):void 0,{x:s,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},c=i.origin??r,d=i.extent||o;if("parent"!==i.extent||i.expandParent)l&&iK(i.extent)&&(d=[[i.extent[0][0]+s,i.extent[0][1]+u],[i.extent[1][0]+s,i.extent[1][1]+u]]);else if(l){let e=l.measured.width,t=l.measured.height;e&&t&&(d=[[s,u],[s+e,u+t]])}else a?.("005","Only child nodes can use a parent extent.");let p=iK(d)?ij(t,d,i.measured):t;return(void 0===i.measured.width||void 0===i.measured.height)&&a?.("015","It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."),{position:{x:p.x-s+(i.measured.width??0)*c[0],y:p.y-u+(i.measured.height??0)*c[1]},positionAbsolute:p}}async function iE({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){let a,i=new Set(e.map(e=>e.id)),l=[];for(let e of n){if(!1===e.deletable)continue;let t=i.has(e.id),n=!t&&e.parentId&&l.find(t=>t.id===e.parentId);(t||n)&&l.push(e)}let s=new Set(t.map(e=>e.id)),u=r.filter(e=>!1!==e.deletable),c=(a=new Set,l.forEach(e=>{a.add(e.id)}),u.filter(e=>a.has(e.source)||a.has(e.target)));for(let e of u)s.has(e.id)&&!c.find(t=>t.id===e.id)&&c.push(e);if(!o)return{edges:c,nodes:l};let d=await o({nodes:l,edges:c});return"boolean"==typeof d?d?{edges:c,nodes:l}:{edges:[],nodes:[]}:d}let iT=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ij=(e={x:0,y:0},t,n)=>({x:iT(e.x,t[0][0],t[1][0]-(n?.width??0)),y:iT(e.y,t[0][1],t[1][1]-(n?.height??0))});function iR(e,t,n){let{width:r,height:o}=iG(n),{x:a,y:i}=n.internals.positionAbsolute;return ij(e,[[a,i],[a+r,i+o]],t)}let iN=(e,t,n)=>e<t?iT(Math.abs(e-t),1,t)/t:e>n?-iT(Math.abs(e-n),1,t)/t:0,iA=(e,t,n=15,r=40)=>[iN(e.x,r,t.width-r)*n,iN(e.y,r,t.height-r)*n],iz=(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)}),iP=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),iO=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),iD=(e,t=[0,0])=>{let{x:n,y:r}=i_(e)?e.internals.positionAbsolute:iS(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}},i$=(e,t=[0,0])=>{let{x:n,y:r}=i_(e)?e.internals.positionAbsolute:iS(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)}},iL=(e,t)=>iO(iz(iP(e),iP(t))),iB=(e,t)=>Math.ceil(Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x))*Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y))),iW=e=>iF(e.width)&&iF(e.height)&&iF(e.x)&&iF(e.y),iF=e=>!isNaN(e)&&isFinite(e),iH=(e,t)=>(e,t)=>{},iZ=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),iV=({x:e,y:t},[n,r,o],a=!1,i=[1,1])=>{let l={x:(e-n)/o,y:(t-r)/o};return a?iZ(l,i):l},iq=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function iU(e,t){if("number"==typeof e)return Math.floor((t-t/(1+e))*.5);if("string"==typeof e&&e.endsWith("px")){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if("string"==typeof e&&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}let iY=(e,t,n,r,o,a)=>{let i=function(e,t,n){if("string"==typeof e||"number"==typeof e){let r=iU(e,n),o=iU(e,t);return{top:r,right:o,bottom:r,left:o,x:2*o,y:2*r}}if("object"==typeof e){let r=iU(e.top??e.y??0,n),o=iU(e.bottom??e.y??0,n),a=iU(e.left??e.x??0,t),i=iU(e.right??e.x??0,t);return{top:r,right:i,bottom:o,left:a,x:a+i,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(a,t,n),l=iT(Math.min((t-i.x)/e.width,(n-i.y)/e.height),r,o),s=e.x+e.width/2,u=e.y+e.height/2,c=t/2-s*l,d=n/2-u*l,p=function(e,t,n,r,o,a){let{x:i,y:l}=iq(e,[t,n,r]),{x:s,y:u}=iq({x:e.x+e.width,y:e.y+e.height},[t,n,r]);return{left:Math.floor(i),top:Math.floor(l),right:Math.floor(o-s),bottom:Math.floor(a-u)}}(e,c,d,l,t,n),h={left:Math.min(p.left-i.left,0),top:Math.min(p.top-i.top,0),right:Math.min(p.right-i.right,0),bottom:Math.min(p.bottom-i.bottom,0)};return{x:c-h.left+h.right,y:d-h.top+h.bottom,zoom:l}},iX=()=>"u">typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function iK(e){return null!=e&&"parent"!==e}function iG(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function iJ(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function iQ(e,t={width:0,height:0},n,r,o){let a={...e},i=r.get(n);if(i){let e=i.origin||o;a.x+=i.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=i.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function i0(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function i1(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){let{x:a,y:i}=i3(e),l=iV({x:a-(o?.left??0),y:i-(o?.top??0)},r),{x:s,y:u}=n?iZ(l,t):l;return{xSnapped:s,ySnapped:u,...l}}let i2=e=>({width:e.offsetWidth,height:e.offsetHeight}),i5=e=>e?.getRootNode?.()||window?.document,i6=["INPUT","SELECT","TEXTAREA"];function i4(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1&&(i6.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey"))}let i3=(e,t)=>{let n="clientX"in e,r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},i9=(e,t,n,r,o)=>{let a=t.querySelectorAll(`.${e}`);return a&&a.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),type:e,nodeId:o,position:t.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...i2(t)}}):null};function i8({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:a,targetControlX:i,targetControlY:l}){let s=.125*e+.375*o+.375*i+.125*n,u=.125*t+.375*a+.375*l+.125*r,c=Math.abs(s-e),d=Math.abs(u-t);return[s,u,c,d]}function i7(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function le({pos:e,x1:t,y1:n,x2:r,y2:o,c:a}){switch(e){case g.Left:return[t-i7(t-r,a),n];case g.Right:return[t+i7(r-t,a),n];case g.Top:return[t,n-i7(n-o,a)];case g.Bottom:return[t,n+i7(o-n,a)]}}function lt({sourceX:e,sourceY:t,sourcePosition:n=g.Bottom,targetX:r,targetY:o,targetPosition:a=g.Top,curvature:i=.25}){let[l,s]=le({pos:n,x1:e,y1:t,x2:r,y2:o,c:i}),[u,c]=le({pos:a,x1:r,y1:o,x2:e,y2:t,c:i}),[d,p,h,f]=i8({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:s,targetControlX:u,targetControlY:c});return[`M${e},${t} C${l},${s} ${u},${c} ${r},${o}`,d,p,h,f]}function ln({sourceX:e,sourceY:t,targetX:n,targetY:r}){let o=Math.abs(n-e)/2,a=Math.abs(r-t)/2;return[n<e?n+o:n-o,r<t?r+a:r-a,o,a]}let lr=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`;function lo({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[o,a,i,l]=ln({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,a,i,l]}let la={[g.Left]:{x:-1,y:0},[g.Right]:{x:1,y:0},[g.Top]:{x:0,y:-1},[g.Bottom]:{x:0,y:1}},li=({source:e,sourcePosition:t=g.Bottom,target:n})=>t===g.Left||t===g.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},ll=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function ls({sourceX:e,sourceY:t,sourcePosition:n=g.Bottom,targetX:r,targetY:o,targetPosition:a=g.Top,borderRadius:i=5,centerX:l,centerY:s,offset:u=20,stepPosition:c=.5}){let[d,p,h,f,m]=function({source:e,sourcePosition:t=g.Bottom,target:n,targetPosition:r=g.Top,center:o,offset:a,stepPosition:i}){let l,s,u=la[t],c=la[r],d={x:e.x+u.x*a,y:e.y+u.y*a},p={x:n.x+c.x*a,y:n.y+c.y*a},h=li({source:d,sourcePosition:t,target:p}),f=0!==h.x?"x":"y",m=h[f],y=[],v={x:0,y:0},b={x:0,y:0},[,,x,w]=ln({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(u[f]*c[f]==-1){"x"===f?(l=o.x??d.x+(p.x-d.x)*i,s=o.y??(d.y+p.y)/2):(l=o.x??(d.x+p.x)/2,s=o.y??d.y+(p.y-d.y)*i);let e=[{x:l,y:d.y},{x:l,y:p.y}],t=[{x:d.x,y:s},{x:p.x,y:s}];y=u[f]===m?"x"===f?e:t:"x"===f?t:e}else{let o=[{x:d.x,y:p.y}],i=[{x:p.x,y:d.y}];if(y="x"===f?u.x===m?i:o:u.y===m?o:i,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);u[f]===m?v[f]=(d[f]>e[f]?-1:1)*r:b[f]=(p[f]>n[f]?-1:1)*r}}if(t!==r){let e="x"===f?"y":"x",t=u[f]===c[e],n=d[e]>p[e],r=d[e]<p[e];(1===u[f]&&(!t&&n||t&&r)||1!==u[f]&&(!t&&r||t&&n))&&(y="x"===f?o:i)}let h={x:d.x+v.x,y:d.y+v.y},g={x:p.x+b.x,y:p.y+b.y};Math.max(Math.abs(h.x-y[0].x),Math.abs(g.x-y[0].x))>=Math.max(Math.abs(h.y-y[0].y),Math.abs(g.y-y[0].y))?(l=(h.x+g.x)/2,s=y[0].y):(l=y[0].x,s=(h.y+g.y)/2)}let _={x:d.x+v.x,y:d.y+v.y},S={x:p.x+b.x,y:p.y+b.y};return[[e,..._.x!==y[0].x||_.y!==y[0].y?[_]:[],...y,...S.x!==y[y.length-1].x||S.y!==y[y.length-1].y?[S]:[],n],l,s,x,w]}({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:a,center:{x:l,y:s},offset:u,stepPosition:c}),y=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)y+=function(e,t,n,r){let o=Math.min(ll(e,t)/2,ll(t,n)/2,r),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+o*t},${i}Q ${a},${i} ${a},${i+o*r}`}let l=e.x<n.x?1:-1,s=e.y<n.y?-1:1;return`L ${a},${i+o*s}Q ${a},${i} ${a+o*l},${i}`}(d[e-1],d[e],d[e+1],i);return[y+=`L${d[d.length-1].x} ${d[d.length-1].y}`,p,h,f,m]}function lu(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function lc(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,"source"===r.type?t.push(r):"target"===r.type&&n.push(r);return{source:t,target:n}}function ld(e,t,n=g.Left,r=!1){let o=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:i,height:l}=t??iG(e);if(r)return{x:o+i/2,y:a+l/2};switch(t?.position??n){case g.Top:return{x:o+i/2,y:a};case g.Right:return{x:o+i,y:a+l/2};case g.Bottom:return{x:o+i/2,y:a+l};case g.Left:return{x:o,y:a+l/2}}}function lp(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function lh(e,t){if(!e)return"";if("string"==typeof e)return e;let n=t?`${t}__`:"";return`${n}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`}let lf={nodeOrigin:[0,0],nodeExtent:im,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},lm={...lf,checkEquality:!0};function lg(e,t){let n={...e};for(let e in t)void 0!==t[e]&&(n[e]=t[e]);return n}function ly(e){return"manual"===e}function lv(e,t,n,r={}){let o=lg(lm,r),a={i:0},i=new Map(t),l=o?.elevateNodesOnSelect&&!ly(o.zIndexMode)?1e3:0,s=e.length>0,u=!1;for(let c of(t.clear(),n.clear(),e)){let e=i.get(c.id);if(o.checkEquality&&c===e?.internals.userNode)t.set(c.id,e);else{let n=ij(iS(c,o.nodeOrigin),iK(c.extent)?c.extent:o.nodeExtent,iG(c));e={...o.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:n,handleBounds:function(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let o={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};"source"===t.type?n.push(o):"target"===t.type&&r.push(o)}return{source:n,target:r}}(c,e),z:lx(c,l,o.zIndexMode),userNode:c}},t.set(c.id,e)}void 0!==e.measured&&void 0!==e.measured.width&&void 0!==e.measured.height||e.hidden||(s=!1),c.parentId&&lb(e,t,n,r,a),u||=c.selected??!1}return{nodesInitialized:s,hasSelectedNodes:u}}function lb(e,t,n,r,o){let{elevateNodesOnSelect:a,nodeOrigin:i,nodeExtent:l,zIndexMode:s}=lg(lf,r),u=e.parentId,c=t.get(u);if(!c)return void console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);!function(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]]))}(e,n),o&&!c.parentId&&void 0===c.internals.rootParentIndex&&"auto"===s&&(c.internals.rootParentIndex=++o.i,c.internals.z=c.internals.z+10*o.i),o&&void 0!==c.internals.rootParentIndex&&(o.i=c.internals.rootParentIndex);let{x:d,y:p,z:h}=function(e,t,n,r,o,a){let{x:i,y:l}=t.internals.positionAbsolute,s=iG(e),u=iS(e,n),c=iK(e.extent)?ij(u,e.extent,s):u,d=ij({x:i+c.x,y:l+c.y},r,s);"parent"===e.extent&&(d=iR(d,s,t));let p=lx(e,o,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=p?h+1:p}}(e,c,i,l,a&&!ly(s)?1e3:0,s),{positionAbsolute:f}=e.internals,m=d!==f.x||p!==f.y;(m||h!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:m?{x:d,y:p}:f,z:h}})}function lx(e,t,n){let r=iF(e.zIndex)?e.zIndex:0;return ly(n)?r:r+(e.selected?t:0)}function lw(e,t,n,r=[0,0]){let o=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=iL(a.get(n.parentId)?.expandedRect??iD(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},i)=>{let l=a.internals.positionAbsolute,s=iG(a),u=a.origin??r,c=t.x<l.x?Math.round(Math.abs(l.x-t.x)):0,d=t.y<l.y?Math.round(Math.abs(l.y-t.y)):0,p=Math.max(s.width,Math.round(t.width)),h=Math.max(s.height,Math.round(t.height)),f=(p-s.width)*u[0],m=(h-s.height)*u[1];(c>0||d>0||f||m)&&(o.push({id:i,type:"position",position:{x:a.position.x-c+f,y:a.position.y-d+m}}),n.get(i)?.forEach(t=>{e.some(e=>e.id===t.id)||o.push({id:t.id,type:"position",position:{x:t.position.x+c,y:t.position.y+d}})})),(s.width<t.width||s.height<t.height||c||d)&&o.push({id:i,type:"dimensions",setAttributes:!0,dimensions:{width:p+(c?u[0]*c-f:0),height:h+(d?u[1]*d-m:0)}})}),o}async function l_({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:a}){if(!t||!e.x&&!e.y)return!1;let i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,a]],r);return!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2])}function lS(e,t,n,r,o,a){let i=o,l=r.get(i)||new Map;r.set(i,l.set(n,t)),i=`${o}-${e}`;let s=r.get(i)||new Map;if(r.set(i,s.set(n,t)),a){i=`${o}-${e}-${a}`;let l=r.get(i)||new Map;r.set(i,l.set(n,t))}}function lk(e,t,n){for(let r of(e.clear(),t.clear(),n)){let{source:n,target:o,sourceHandle:a=null,targetHandle:i=null}=r,l={edgeId:r.id,source:n,target:o,sourceHandle:a,targetHandle:i},s=`${n}-${a}--${o}-${i}`;lS("source",l,`${o}-${i}--${n}-${a}`,e,n,a),lS("target",l,s,e,o,i),t.set(r.id,r)}}function lC(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)break;r=r?.parentElement}while(r)return!1}function lI({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let o=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&o.push({...t,position:a.position,dragging:r})}if(!e)return[o[0],o];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:o[0],o]}function lM(e,t,n,r,o,a=!1){let i=r.get(e);if(!i)return null;let l="strict"===o?i.internals.handleBounds?.[t]:[...i.internals.handleBounds?.source??[],...i.internals.handleBounds?.target??[]],s=(n?l?.find(e=>e.id===n):l?.[0])??null;return s&&a?{...s,...ld(i,s,s.position,!0)}:s}function lE(e,t){return e?e:t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null}let lT=()=>!0;function lj(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:a,doc:i,lib:l,flowId:s,isValidConnection:u=lT,nodeLookup:c}){let p="target"===a,h=t?i.querySelector(`.${l}-flow__handle[data-id="${s}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:f,y:m}=i3(e),g=i.elementFromPoint(f,m),y=g?.classList.contains(`${l}-flow__handle`)?g:h,v={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){let e=lE(void 0,y),t=y.getAttribute("data-nodeid"),a=y.getAttribute("data-handleid"),i=y.classList.contains("connectable"),l=y.classList.contains("connectableend");if(!t||!e)return v;let s={source:p?t:r,sourceHandle:p?a:o,target:p?r:t,targetHandle:p?o:a};v.connection=s,v.isValid=i&&l&&(n===d.Strict?p&&"source"===e||!p&&"target"===e:t!==r||a!==o)&&u(s),v.toHandle=lM(t,e,a,c,n,!0)}return v}let lR=function(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:a,isTarget:i,domNode:l,nodeLookup:s,lib:u,autoPanOnConnect:c,flowId:d,panBy:p,cancelConnection:h,onConnectStart:f,onConnect:m,onConnectEnd:y,isValidConnection:v=lT,onReconnectEnd:b,updateConnection:x,getTransform:w,getFromHandle:_,autoPanSpeed:S,dragThreshold:k=1,handleDomNode:C}){let I,M=i5(e.target),E=0,{x:T,y:j}=i3(e),R=lE(a,C),N=l?.getBoundingClientRect(),A=!1;if(!N||!R)return;let z=lM(o,R,r,s,t);if(!z)return;let P=i3(e,N),O=!1,D=null,$=!1,L=null,B={...z,nodeId:o,type:R,position:z.position},W=s.get(o),F={inProgress:!0,isValid:null,from:ld(W,B,g.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:W,to:P,toHandle:null,toPosition:ib[B.position],toNode:null,pointer:P};function H(){A=!0,x(F),f?.(e,{nodeId:o,handleId:r,handleType:R})}function Z(e){var a,l;let h;if(!A){let{x:t,y:n}=i3(e),r=t-T,o=n-j;if(!(r*r+o*o>k*k))return;H()}if(!_()||!B)return void V(e);let f=w();I=function(e,t,n,r){let o=[],a=1/0;for(let i of function(e,t,n){let r=[],o={x:e.x-n,y:e.y-n,width:2*n,height:2*n};for(let e of t.values())iB(o,iD(e))>0&&r.push(e);return r}(e,n,t+250))for(let n of[...i.internals.handleBounds?.source??[],...i.internals.handleBounds?.target??[]]){if(r.nodeId===n.nodeId&&r.type===n.type&&r.id===n.id)continue;let{x:l,y:s}=ld(i,n,n.position,!0),u=Math.sqrt(Math.pow(l-e.x,2)+Math.pow(s-e.y,2));u>t||(u<a?(o=[{...n,x:l,y:s}],a=u):u===a&&o.push({...n,x:l,y:s}))}if(!o.length)return null;if(o.length>1){let e="source"===r.type?"target":"source";return o.find(t=>t.type===e)??o[0]}return o[0]}(iV(P=i3(e,N),f,!1,[1,1]),n,s,B),O||(!function e(){if(!c||!N)return;let[t,n]=iA(P,N,S);p({x:t,y:n}),E=requestAnimationFrame(e)}(),O=!0);let m=lj(e,{handle:I,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:i?"target":"source",isValidConnection:v,doc:M,lib:u,flowId:d,nodeLookup:s});L=m.handleDomNode,D=m.connection,a=!!I,l=m.isValid,h=null,l?h=!0:a&&!l&&(h=!1),$=h;let y=s.get(o),b=y?ld(y,B,g.Left,!0):F.from,C={...F,from:b,isValid:$,to:m.toHandle&&$?iq({x:m.toHandle.x,y:m.toHandle.y},f):P,toHandle:m.toHandle,toPosition:$&&m.toHandle?m.toHandle.position:ib[B.position],toNode:m.toHandle?s.get(m.toHandle.nodeId):null,pointer:P};x(C),F=C}function V(e){if(!("touches"in e)||!(e.touches.length>0)){if(A){(I||L)&&D&&$&&m?.(D);let{inProgress:t,...n}=F,r={...n,toPosition:F.toHandle?F.toPosition:null};y?.(e,r),a&&b?.(e,r)}h(),cancelAnimationFrame(E),O=!1,$=!1,D=null,L=null,M.removeEventListener("mousemove",Z),M.removeEventListener("mouseup",V),M.removeEventListener("touchmove",Z),M.removeEventListener("touchend",V)}}0===k&&H(),M.addEventListener("mousemove",Z),M.addEventListener("mouseup",V),M.addEventListener("touchmove",Z),M.addEventListener("touchend",V)},lN=e=>({x:e.x,y:e.y,zoom:e.k}),lA=({x:e,y:t,zoom:n})=>it.translate(e,t).scale(n),lz=(e,t)=>e.target.closest(`.${t}`),lP=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),lO=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,lD=(e,t=0,n=lO,r=()=>{})=>{let o="number"==typeof t&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},l$=e=>{let t=e.ctrlKey&&iX()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t};function lL(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:e.includes("left"),affectsY:e.includes("top")}}function lB(e,t){return Math.max(0,t-e)}function lW(e,t){return Math.max(0,e-t)}function lF(e,t,n){return Math.max(0,t-e,e-n)}(s=y||(y={})).Line="line",s.Handle="handle";let lH={width:0,height:0,x:0,y:0},lZ={...lH,pointerX:0,pointerY:0,aspectRatio:1};var lV=e.i(30224);let lq={get url(){return`file://${e.P("node_modules/zustand/esm/vanilla.mjs")}`}},lU=e=>{let t,n=new Set,r=(e,r)=>{let o="function"==typeof e?e(t):e;if(!Object.is(o,t)){let e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{(lq.env?lq.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},i=t=e(r,o,a);return a},{useDebugValue:lY}=w.default,{useSyncExternalStoreWithSelector:lX}=lV.default,lK=e=>e;function lG(e,t=lK,n){let r=lX(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return lY(r),r}let lJ=(e,t)=>{let n=e?lU(e):lU,r=(e,r=t)=>lG(n,e,r);return Object.assign(r,n),r};function lQ(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===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}let l0=(0,w.createContext)(null),l1=l0.Provider,l2=((e="react")=>`Seems like you have not used zustand provider as an ancestor. Help: https://${e}flow.dev/error#001`)("react");function l5(e,t){let n=(0,w.useContext)(l0);if(null===n)throw Error(l2);return lG(n,e,t)}function l6(){let e=(0,w.useContext)(l0);if(null===e)throw Error(l2);return(0,w.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}let l4={display:"none"},l3={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},l9="react-flow__node-desc",l8="react-flow__edge-desc",l7=e=>e.ariaLiveMessage,se=e=>e.ariaLabelConfig;function st({rfId:e}){let t=l5(l7);return(0,b.jsx)("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:l3,children:t})}function sn({rfId:e,disableKeyboardA11y:t}){let n=l5(se);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{id:`${l9}-${e}`,style:l4,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,b.jsx)("div",{id:`${l8}-${e}`,style:l4,children:n["edge.a11yDescription.default"]}),!t&&(0,b.jsx)(st,{rfId:e})]})}let sr=(0,w.forwardRef)(({position:e="top-left",children:t,className:n,style:r,...o},a)=>{let i=`${e}`.split("-");return(0,b.jsx)("div",{className:rF(["react-flow__panel",n,...i]),style:r,ref:a,...o,children:t})});function so({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,b.jsx)(sr,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,b.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}sr.displayName="Panel";let sa=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}},si=e=>e.id;function sl(e,t){return lQ(e.selectedNodes.map(si),t.selectedNodes.map(si))&&lQ(e.selectedEdges.map(si),t.selectedEdges.map(si))}function ss({onSelectionChange:e}){let t=l6(),{selectedNodes:n,selectedEdges:r}=l5(sa,sl);return(0,w.useEffect)(()=>{let o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChangeHandlers.forEach(e=>e(o))},[n,r,e]),null}let su=e=>!!e.onSelectionChangeHandlers;function sc({onSelectionChange:e}){let t=l5(su);return e||t?(0,b.jsx)(ss,{onSelectionChange:e}):null}let sd=[0,0],sp={x:0,y:0,zoom:1},sh=["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","rfId"],sf=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}),sm={translateExtent:im,nodeOrigin:sd,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function sg(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:a,setNodeExtent:i,reset:l,setDefaultNodesAndEdges:s}=l5(sf,lQ),u=l6();(0,w.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=sm,l()}),[]);let c=(0,w.useRef)(sm);return(0,w.useEffect)(()=>{for(let l of sh){let s=e[l];if(s!==c.current[l]&&void 0!==e[l])if("nodes"===l)t(s);else if("edges"===l)n(s);else if("minZoom"===l)r(s);else if("maxZoom"===l)o(s);else if("translateExtent"===l)a(s);else if("nodeExtent"===l)i(s);else if("ariaLabelConfig"===l)u.setState({ariaLabelConfig:{...iy,...s||{}}});else"fitView"===l?u.setState({fitViewQueued:s}):"fitViewOptions"===l?u.setState({fitViewOptions:s}):u.setState({[l]:s})}c.current=e},sh.map(t=>e[t])),null}function sy(){return"u"<typeof window||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}let sv="u">typeof document?document:null;function sb(e=null,t={target:sv,actInsideInputWithModifier:!0}){let[n,r]=(0,w.useState)(!1),o=(0,w.useRef)(!1),a=(0,w.useRef)(new Set([])),[i,l]=(0,w.useMemo)(()=>{if(null!==e){let t=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e).map(e=>e.replace("+","\n").replace("\n\n","\n+").split("\n")),n=t.reduce((e,t)=>e.concat(...t),[]);return[t,n]}return[[],[]]},[e]);return(0,w.useEffect)(()=>{let n=t?.target??sv,s=t?.actInsideInputWithModifier??!0;if(null!==e){let e=e=>{if(o.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!o.current||o.current&&!s)&&i4(e))return!1;let n=sw(e.code,l);if(a.current.add(e[n]),sx(i,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName==="BUTTON"||n?.nodeName==="A";!1!==t.preventDefault&&(o.current||!a)&&e.preventDefault(),r(!0)}},u=e=>{let t=sw(e.code,l);sx(i,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),"Meta"===e.key&&a.current.clear(),o.current=!1},c=()=>{a.current.clear(),r(!1)};return n?.addEventListener("keydown",e),n?.addEventListener("keyup",u),window.addEventListener("blur",c),window.addEventListener("contextmenu",c),()=>{n?.removeEventListener("keydown",e),n?.removeEventListener("keyup",u),window.removeEventListener("blur",c),window.removeEventListener("contextmenu",c)}}},[e,r]),n}function sx(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function sw(e,t){return t.includes(e)?"code":"key"}function s_(e,t){let n=[],r=new Map,o=[];for(let t of e)if("add"===t.type){o.push(t);continue}else if("remove"===t.type||"replace"===t.type)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("remove"===t[0].type)continue;if("replace"===t[0].type){n.push({...t[0].item});continue}let o={...e};for(let e of t){var a=e,i=o;switch(a.type){case"select":i.selected=a.selected;break;case"position":void 0!==a.position&&(i.position=a.position),void 0!==a.dragging&&(i.dragging=a.dragging);break;case"dimensions":void 0!==a.dimensions&&(i.measured={...a.dimensions},a.setAttributes&&((!0===a.setAttributes||"width"===a.setAttributes)&&(i.width=a.dimensions.width),(!0===a.setAttributes||"height"===a.setAttributes)&&(i.height=a.dimensions.height))),"boolean"==typeof a.resizing&&(i.resizing=a.resizing)}}n.push(o)}return o.length&&o.forEach(e=>{void 0!==e.index?n.splice(e.index,0,{...e.item}):n.push({...e.item})}),n}function sS(e,t){return{id:e,type:"select",selected:t}}function sk(e,t=new Set,n=!1){let r=[];for(let[o,a]of e){let e=t.has(o);(void 0!==a.selected||e)&&a.selected!==e&&(n&&(a.selected=e),r.push(sS(a.id,e)))}return r}function sC({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,o]of e.entries()){let e=t.get(o.id),a=e?.internals?.userNode??e;void 0!==a&&a!==o&&n.push({id:o.id,item:o,type:"replace"}),void 0===a&&n.push({item:o,type:"add",index:r})}for(let[e]of t)void 0===r.get(e)&&n.push({id:e,type:"remove"});return n}function sI(e){return{id:e.id,type:"remove"}}let sM=iH("React Flow","https://reactflow.dev/"),sE=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e);function sT(e){return(0,w.forwardRef)(e)}let sj="u">typeof window?w.useLayoutEffect:w.useEffect;function sR(e){let[t,n]=(0,w.useState)(BigInt(0)),[r]=(0,w.useState)(()=>{var e;let t;return e=()=>n(e=>e+BigInt(1)),t=[],{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}});return sj(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}let sN=(0,w.createContext)(null);function sA({children:e}){let t=l6(),n=sR((0,w.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:o,onNodesChange:a,nodeLookup:i,fitViewQueued:l,onNodesChangeMiddlewareMap:s}=t.getState(),u=n;for(let t of e)u="function"==typeof t?t(u):t;let c=sC({items:u,lookup:i});for(let e of s.values())c=e(c);o&&r(u),c.length>0?a?.(c):l&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=sR((0,w.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:o,onEdgesChange:a,edgeLookup:i}=t.getState(),l=n;for(let t of e)l="function"==typeof t?t(l):t;o?r(l):a&&a(sC({items:l,lookup:i}))},[])),o=(0,w.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,b.jsx)(sN.Provider,{value:o,children:e})}let sz=e=>!!e.panZoom;function sP(){let e,t=(e=l6(),(0,w.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return!!n&&n.scaleBy(1.2,t)},zoomOut:async t=>{let{panZoom:n}=e.getState();return!!n&&n.scaleBy(1/1.2,t)},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return!!r&&r.scaleTo(t,n)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,o,a],panZoom:i}=e.getState();return!!i&&(await i.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??a},n),!0)},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:o,minZoom:a,maxZoom:i,panZoom:l}=e.getState(),s=iY(t,r,o,a,i,n?.padding??.1);return!!l&&(await l.setViewport(s,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0)},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:o,snapToGrid:a,domNode:i}=e.getState();if(!i)return t;let{x:l,y:s}=i.getBoundingClientRect(),u={x:t.x-l,y:t.y-s},c=n.snapGrid??o;return iV(u,r,n.snapToGrid??a,c)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:o,y:a}=r.getBoundingClientRect(),i=iq(t,n);return{x:i.x+o,y:i.y+a}}}),[])),n=l6(),r=function(){let e=(0,w.useContext)(sN);if(!e)throw Error("useBatchContext must be used within a BatchProvider");return e}(),o=l5(sz),a=(0,w.useMemo)(()=>{let e=e=>n.getState().nodeLookup.get(e),t=e=>{r.nodeQueue.push(e)},o=e=>{r.edgeQueue.push(e)},a=e=>{let{nodeLookup:t,nodeOrigin:r}=n.getState(),o=sE(e)?e:t.get(e.id),a=o.parentId?iQ(o.position,o.measured,o.parentId,t,r):o.position;return iD({...o,position:a,width:o.measured?.width??o.width,height:o.measured?.height??o.height})},i=(e,n,r={replace:!1})=>{t(t=>t.map(t=>{if(t.id===e){let e="function"==typeof n?n(t):n;return r.replace&&sE(e)?e:{...t,...e}}return t}))},l=(e,t,n={replace:!1})=>{o(r=>r.map(r=>{if(r.id===e){let e="function"==typeof t?t(r):t;return n.replace&&iw(e)?e:{...r,...e}}return r}))};return{getNodes:()=>n.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=n.getState();return e.map(e=>({...e}))},getEdge:e=>n.getState().edgeLookup.get(e),setNodes:t,setEdges:o,addNodes:e=>{let t=Array.isArray(e)?e:[e];r.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];r.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:t=[],transform:r}=n.getState(),[o,a,i]=r;return{nodes:e.map(e=>({...e})),edges:t.map(e=>({...e})),viewport:{x:o,y:a,zoom:i}}},deleteElements:async({nodes:e=[],edges:t=[]})=>{let{nodes:r,edges:o,onNodesDelete:a,onEdgesDelete:i,triggerNodeChanges:l,triggerEdgeChanges:s,onDelete:u,onBeforeDelete:c}=n.getState(),{nodes:d,edges:p}=await iE({nodesToRemove:e,edgesToRemove:t,nodes:r,edges:o,onBeforeDelete:c}),h=p.length>0,f=d.length>0;if(h){let e=p.map(sI);i?.(p),s(e)}if(f){let e=d.map(sI);a?.(d),l(e)}return(f||h)&&u?.({nodes:d,edges:p}),{deletedNodes:d,deletedEdges:p}},getIntersectingNodes:(e,t=!0,r)=>{let o=iW(e),i=o?e:a(e),l=void 0!==r;return i?(r||n.getState().nodes).filter(r=>{let a=n.getState().nodeLookup.get(r.id);if(a&&!o&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let s=iD(l?r:a),u=iB(s,i);return t&&u>0||u>=s.width*s.height||u>=i.width*i.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=iW(e)?e:a(e);if(!r)return!1;let o=iB(r,t);return n&&o>0||o>=t.width*t.height||o>=r.width*r.height},updateNode:i,updateNodeData:(e,t,n={replace:!1})=>{i(e,e=>{let r="function"==typeof t?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:l,updateEdgeData:(e,t,n={replace:!1})=>{l(e,e=>{let r="function"==typeof t?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:t,nodeOrigin:r}=n.getState();return((e,t={nodeOrigin:[0,0]})=>0===e.length?{x:0,y:0,width:0,height:0}:iO(e.reduce((e,n)=>{let r="string"==typeof n,o=t.nodeLookup||r?void 0:n;return t.nodeLookup&&(o=r?t.nodeLookup.get(n):i_(n)?n:t.nodeLookup.get(n.id)),iz(e,o?i$(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})))(e,{nodeLookup:t,nodeOrigin:r})},getHandleConnections:({type:e,id:t,nodeId:r})=>Array.from(n.getState().connectionLookup.get(`${r}-${e}${t?`-${t}`:""}`)?.values()??[]),getNodeConnections:({type:e,handleId:t,nodeId:r})=>Array.from(n.getState().connectionLookup.get(`${r}${e?t?`-${e}-${t}`:`-${e}`:""}`)?.values()??[]),fitView:async e=>{let t,o,a=n.getState().fitViewResolver??{promise:new Promise((e,n)=>{t=e,o=n}),resolve:t,reject:o};return n.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:a}),r.nodeQueue.push(e=>[...e]),a.promise}}},[]);return(0,w.useMemo)(()=>({...a,...t,viewportInitialized:o}),[o])}let sO=e=>e.selected,sD="u">typeof window?window:void 0,s$={position:"absolute",width:"100%",height:"100%",top:0,left:0},sL=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function sB({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:a=p.Free,zoomOnDoubleClick:i=!0,panOnDrag:l=!0,defaultViewport:s,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:h,preventScrolling:f=!0,children:m,noWheelClassName:g,noPanClassName:y,onViewportChange:v,isControlledViewport:x,paneClickDistance:_,selectionOnDrag:S}){let k,C=l6(),I=(0,w.useRef)(null),{userSelectionActive:M,lib:E,connectionInProgress:T}=l5(sL,lQ),j=sb(h),R=(0,w.useRef)();k=l6(),(0,w.useEffect)(()=>{let e=()=>{if(!I.current||!(I.current.checkVisibility?.()??!0))return!1;let e=i2(I.current);(0===e.height||0===e.width)&&k.getState().onError?.("004","The parent container needs a width and a height to render the graph."),k.setState({width:e.width||500,height:e.height||500})};if(I.current){e(),window.addEventListener("resize",e);let t=new ResizeObserver(()=>e());return t.observe(I.current),()=>{window.removeEventListener("resize",e),t&&I.current&&t.unobserve(I.current)}}},[]);let N=(0,w.useCallback)(e=>{v?.({x:e[0],y:e[1],zoom:e[2]}),x||C.setState({transform:e})},[v,x]);return(0,w.useEffect)(()=>{if(I.current){R.current=function({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:a,onPanZoomStart:i,onPanZoomEnd:l,onDraggingChange:s}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=ip().scaleExtent([t,n]).translateExtent(r),h=ok(e).call(d);v({x:o.x,y:o.y,zoom:iT(o.zoom,t,n)},[[0,0],[c.width,c.height]],r);let f=h.on("wheel.zoom"),m=h.on("dblclick.zoom");async function g(e,t){return!!h&&new Promise(n=>{d?.interpolate(t?.interpolate==="linear"?ih:oB).transform(lD(h,t?.duration,t?.ease,()=>n(!0)),e)})}function y(){d.on("zoom",null)}async function v(e,t,n){let r=lA(e),o=d?.constrain()(r,t,n);return o&&await g(o),o}return d.wheelDelta(l$),{update:function({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:o,panOnDrag:c,panOnScrollMode:g,panOnScrollSpeed:v,preventScrolling:b,zoomOnPinch:x,zoomOnScroll:w,zoomOnDoubleClick:_,zoomActivationKeyPressed:S,lib:k,onTransformChange:C,connectionInProgress:I,paneClickDistance:M,selectionOnDrag:E}){r&&!u.isZoomingOrPanning&&y();let T=o&&!S&&!r;d.clickDistance(E?1/0:!iF(M)||M<0?0:M);let j=T?function({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:a,zoomOnPinch:i,onPanZoomStart:l,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(lz(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&i){let e=oC(c),t=d*Math.pow(2,l$(c));r.scaleTo(n,t,e,c);return}let h=1===c.deltaMode?20:1,f=o===p.Vertical?0:c.deltaX*h,m=o===p.Horizontal?0:c.deltaY*h;!iX()&&c.shiftKey&&o!==p.Vertical&&(f=c.deltaY*h,m=0),r.translateBy(n,-(f/d)*a,-(m/d)*a,{internal:!0});let g=lN(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(s?.(c,g),e.panScrollTimeout=setTimeout(()=>{u?.(c,g),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l?.(c,g))}}({zoomPanValues:u,noWheelClassName:e,d3Selection:h,d3Zoom:d,panOnScrollMode:g,panOnScrollSpeed:v,zoomOnPinch:x,onPanZoomStart:i,onPanZoom:a,onPanZoomEnd:l}):function({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){let a="wheel"===r.type,i=!t&&a&&!r.ctrlKey,l=lz(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),i||l)return null;r.preventDefault(),n.call(this,r,o)}}({noWheelClassName:e,preventScrolling:b,d3ZoomHandler:f});h.on("wheel.zoom",j,{passive:!1});let R=function({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let o=lN(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=o,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,o)}}({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:i});d.on("start",R);let N=function({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return a=>{e.usedRightMouseButton=!!(n&&lP(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),o&&!a.sourceEvent?.internal&&o?.(a.sourceEvent,lN(a.transform))}}({zoomPanValues:u,panOnDrag:c,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:C});d.on("zoom",N);let A=function({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:a}){return i=>{if(!i.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&lP(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&a(i.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){let t=lN(i.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(i.sourceEvent,t)},150*!!n)}}}({zoomPanValues:u,panOnDrag:c,panOnScroll:o,onPaneContextMenu:n,onPanZoomEnd:l,onDraggingChange:s});d.on("end",A);let z=function({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:a,userSelectionActive:i,noWheelClassName:l,noPanClassName:s,lib:u,connectionInProgress:c}){return d=>{let p=e||t,h=n&&d.ctrlKey,f="wheel"===d.type;if(1===d.button&&"mousedown"===d.type&&(lz(d,`${u}-flow__node`)||lz(d,`${u}-flow__edge`)))return!0;if(!r&&!p&&!o&&!a&&!n||i||c&&!f||lz(d,l)&&f||lz(d,s)&&(!f||o&&f&&!e)||!n&&d.ctrlKey&&f)return!1;if(!n&&"touchstart"===d.type&&d.touches?.length>1)return d.preventDefault(),!1;if(!p&&!o&&!h&&f||!r&&("mousedown"===d.type||"touchstart"===d.type)||Array.isArray(r)&&!r.includes(d.button)&&"mousedown"===d.type)return!1;let m=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||f)&&m}}({zoomActivationKeyPressed:S,panOnDrag:c,zoomOnScroll:w,panOnScroll:o,zoomOnDoubleClick:_,zoomOnPinch:x,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:k,connectionInProgress:I});d.filter(z),_?h.on("dblclick.zoom",m):h.on("dblclick.zoom",null)},destroy:y,setViewport:async function e(e,t){let n=lA(e);return await g(n,t),n},setViewportConstrained:v,getViewport:function(){let e=h?ir(h.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}},scaleTo:async function e(e,t){return!!h&&new Promise(n=>{d?.interpolate(t?.interpolate==="linear"?ih:oB).scaleTo(lD(h,t?.duration,t?.ease,()=>n(!0)),e)})},scaleBy:async function e(e,t){return!!h&&new Promise(n=>{d?.interpolate(t?.interpolate==="linear"?ih:oB).scaleBy(lD(h,t?.duration,t?.ease,()=>n(!0)),e)})},setScaleExtent:function(e){d?.scaleExtent(e)},setTranslateExtent:function(e){d?.translateExtent(e)},syncViewport:function(e){if(h){let t=lA(e),n=h.property("__zoom");(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&d?.transform(h,t,null,{sync:!0})}},setClickDistance:function(e){let t=!iF(e)||e<0?0:e;d?.clickDistance(t)}}}({domNode:I.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:e=>C.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=C.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=C.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=C.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=R.current.getViewport();return C.setState({panZoom:R.current,transform:[e,t,n],domNode:I.current.closest(".react-flow")}),()=>{R.current?.destroy()}}},[]),(0,w.useEffect)(()=>{R.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:a,zoomOnDoubleClick:i,panOnDrag:l,zoomActivationKeyPressed:j,preventScrolling:f,noPanClassName:y,userSelectionActive:M,noWheelClassName:g,lib:E,onTransformChange:N,connectionInProgress:T,selectionOnDrag:S,paneClickDistance:_})},[e,t,n,r,o,a,i,l,j,f,y,M,g,E,N,T,S,_]),(0,b.jsx)("div",{className:"react-flow__renderer",ref:I,style:s$,children:m})}let sW=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function sF(){let{userSelectionActive:e,userSelectionRect:t}=l5(sW,lQ);return e&&t?(0,b.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}let sH=(e,t)=>n=>{n.target===t.current&&e?.(n)},sZ=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function sV({isSelecting:e,selectionKeyPressed:t,selectionMode:n=h.Full,panOnDrag:r,autoPanOnSelection:o,paneClickDistance:a,selectionOnDrag:i,onSelectionStart:l,onSelectionEnd:s,onPaneClick:u,onPaneContextMenu:c,onPaneScroll:d,onPaneMouseEnter:p,onPaneMouseMove:f,onPaneMouseLeave:m,children:g}){let y=(0,w.useRef)(0),v=l6(),{userSelectionActive:x,elementsSelectable:_,dragging:S,connectionInProgress:k,panBy:C,autoPanSpeed:I}=l5(sZ,lQ),M=_&&(e||x),E=(0,w.useRef)(null),T=(0,w.useRef)(),j=(0,w.useRef)(new Set),R=(0,w.useRef)(new Set),N=(0,w.useRef)(!1),A=(0,w.useRef)({x:0,y:0}),z=(0,w.useRef)(!1),P=e=>{if(N.current||k){N.current=!1;return}u?.(e),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})};function O(e,t){let{userSelectionRect:r}=v.getState();if(!r)return;let{transform:o,nodeLookup:a,edgeLookup:i,connectionLookup:l,triggerNodeChanges:s,triggerEdgeChanges:u,defaultEdgeOptions:c}=v.getState(),d={x:r.startX,y:r.startY},{x:p,y:f}=iq(d,o),m={startX:d.x,startY:d.y,x:e<p?e:p,y:t<f?t:f,width:Math.abs(e-p),height:Math.abs(t-f)},g=j.current,y=R.current;j.current=new Set(iC(a,m,o,n===h.Partial,!0).map(e=>e.id)),R.current=new Set;let b=c?.selectable??!0;for(let e of j.current){let t=l.get(e);if(t)for(let{edgeId:e}of t.values()){let t=i.get(e);t&&(t.selectable??b)&&R.current.add(e)}}i0(g,j.current)||s(sk(a,j.current,!0)),i0(y,R.current)||u(sk(i,R.current)),v.setState({userSelectionRect:m,userSelectionActive:!0,nodesSelectionActive:!1})}let D=()=>{cancelAnimationFrame(y.current),y.current=0,z.current=!1};(0,w.useEffect)(()=>()=>D(),[]);let $=!0===r||Array.isArray(r)&&r.includes(0);return(0,b.jsxs)("div",{className:rF(["react-flow__pane",{draggable:$,dragging:S,selection:e}]),onClick:M?void 0:sH(P,E),onContextMenu:sH(e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():c?.(e)},E),onWheel:sH(d?e=>d(e):void 0,E),onPointerEnter:M?void 0:p,onPointerMove:M?e=>{let{userSelectionRect:n,transform:r,resetSelectedElements:i}=v.getState();if(!T.current||!n)return;let{x:s,y:u}=i3(e.nativeEvent,T.current);A.current={x:s,y:u};let c=iq({x:n.startX,y:n.startY},r);if(!N.current){if(Math.hypot(s-c.x,u-c.y)<=(t?0:a))return;i(),l?.(e)}N.current=!0,z.current||(!function e(){if(!o||!T.current)return;let[t,n]=iA(A.current,T.current,I);C({x:t,y:n}).then(t=>{if(!N.current||!t){y.current=requestAnimationFrame(e);return}let{x:n,y:r}=A.current;O(n,r),y.current=requestAnimationFrame(e)})}(),z.current=!0),O(s,u)}:f,onPointerUp:M?e=>{0===e.button&&(e.target?.releasePointerCapture?.(e.pointerId),!x&&e.target===E.current&&v.getState().userSelectionRect&&P?.(e),v.setState({userSelectionActive:!1,userSelectionRect:null}),N.current&&(s?.(e),v.setState({nodesSelectionActive:j.current.size>0})),D())}:void 0,onPointerCancel:M?e=>{e.target?.releasePointerCapture?.(e.pointerId),D()}:void 0,onPointerDownCapture:M?n=>{let{domNode:r,transform:o}=v.getState();if(T.current=r?.getBoundingClientRect(),!T.current)return;let a=n.target===E.current;if(!a&&n.target.closest(".nokey")||!e||!(i&&a||t)||0!==n.button||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),N.current=!1;let{x:l,y:s}=i3(n.nativeEvent,T.current),u=iV({x:l,y:s},o);v.setState({userSelectionRect:{width:0,height:0,startX:u.x,startY:u.y,x:l,y:s}}),a||(n.stopPropagation(),n.preventDefault())}:void 0,onClickCapture:M?e=>{N.current&&(e.stopPropagation(),N.current=!1)}:void 0,onPointerLeave:m,ref:E,style:s$,children:[g,(0,b.jsx)(sF,{})]})}function sq({id:e,store:t,unselect:n=!1,nodeRef:r}){let o,{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:l,nodeLookup:s,onError:u}=t.getState(),c=s.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&l)&&(i({nodes:[c],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):a([e])):u?.("012",(o=e,`Node with id "${o}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`))}function sU({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:a,nodeClickDistance:i}){let l=l6(),[s,u]=(0,w.useState)(!1),c=(0,w.useRef)();return(0,w.useEffect)(()=>{c.current=function({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let a={x:null,y:null},i=0,l=new Map,s=!1,u={x:0,y:0},c=null,d=!1,p=null,h=!1,f=!1,m=null;return{update:function({noDragClassName:g,handleSelector:y,domNode:v,isSelectable:b,nodeId:x,nodeClickDistance:w=0}){function _({x:e,y:n}){let{nodeLookup:o,nodeExtent:i,snapGrid:s,snapToGrid:u,nodeOrigin:c,onNodeDrag:d,onSelectionDrag:p,onError:h,updateNodePositions:g}=t();a={x:e,y:n};let y=!1,v=l.size>1,b=v&&i?iP(ik(l)):null,w=v&&u?function({dragItems:e,snapGrid:t,x:n,y:r}){let o=e.values().next().value;if(!o)return null;let a={x:n-o.distance.x,y:r-o.distance.y},i=iZ(a,t);return{x:i.x-a.x,y:i.y-a.y}}({dragItems:l,snapGrid:s,x:e,y:n}):null;for(let[t,r]of l){if(!o.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};u&&(a=w?{x:Math.round(a.x+w.x),y:Math.round(a.y+w.y)}:iZ(a,s));let l=null;if(v&&i&&!r.extent&&b){let{positionAbsolute:e}=r.internals,t=e.x-b.x+i[0][0],n=e.x+r.measured.width-b.x2+i[1][0];l=[[t,e.y-b.y+i[0][1]],[n,e.y+r.measured.height-b.y2+i[1][1]]]}let{position:d,positionAbsolute:p}=iM({nodeId:t,nextPosition:a,nodeLookup:o,nodeExtent:l||i,nodeOrigin:c,onError:h});y=y||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=p}if(f=f||y,y&&(g(l,!0),m&&(r||d||!x&&p))){let[e,t]=lI({nodeId:x,dragItems:l,nodeLookup:o});r?.(m,l,e,t),d?.(m,e,t),x||p?.(m,t)}}async function S(){if(!c)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:o}=t();if(!o){s=!1,cancelAnimationFrame(i);return}let[l,d]=iA(u,c,r);(0!==l||0!==d)&&(a.x=(a.x??0)-l/e[2],a.y=(a.y??0)-d/e[2],await n({x:l,y:d})&&_(a)),i=requestAnimationFrame(S)}function k(r){let{nodeLookup:o,multiSelectionActive:i,nodesDraggable:s,transform:u,snapGrid:p,snapToGrid:h,selectNodesOnDrag:f,onNodeDragStart:m,onSelectionDragStart:g,unselectNodesAndEdges:y}=t();d=!0,f&&b||i||!x||o.get(x)?.selected||y(),b&&f&&x&&e?.(x);let v=i1(r.sourceEvent,{transform:u,snapGrid:p,snapToGrid:h,containerBounds:c});if(a=v,(l=function(e,t,n,r){let o=new Map;for(let[a,i]of e)if((i.selected||i.id===r)&&(!i.parentId||!function e(t,n){if(!t.parentId)return!1;let r=n.get(t.parentId);return!!r&&(!!r.selected||e(r,n))}(i,e))&&(i.draggable||t&&void 0===i.draggable)){let t=e.get(a);t&&o.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 o}(o,s,v,x)).size>0&&(n||m||!x&&g)){let[e,t]=lI({nodeId:x,dragItems:l,nodeLookup:o});n?.(r.sourceEvent,l,e,t),m?.(r.sourceEvent,e,t),x||g?.(r.sourceEvent,t)}}p=ok(v);let C=o$().clickDistance(w).on("start",e=>{let{domNode:n,nodeDragThreshold:r,transform:o,snapGrid:i,snapToGrid:l}=t();c=n?.getBoundingClientRect()||null,h=!1,f=!1,m=e.sourceEvent,0===r&&k(e),a=i1(e.sourceEvent,{transform:o,snapGrid:i,snapToGrid:l,containerBounds:c}),u=i3(e.sourceEvent,c)}).on("drag",e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:o,snapToGrid:i,nodeDragThreshold:p,nodeLookup:f}=t(),g=i1(e.sourceEvent,{transform:r,snapGrid:o,snapToGrid:i,containerBounds:c});if(m=e.sourceEvent,("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||x&&!f.has(x))&&(h=!0),!h){if(!s&&n&&d&&(s=!0,S()),!d){let t=i3(e.sourceEvent,c),n=t.x-u.x,r=t.y-u.y;Math.sqrt(n*n+r*r)>p&&k(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&l&&d&&(u=i3(e.sourceEvent,c),_(g))}}).on("end",e=>{if(!d||h){h&&l.size>0&&t().updateNodePositions(l,!1);return}if(s=!1,d=!1,cancelAnimationFrame(i),l.size>0){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:i}=t();if(f&&(r(l,!1),f=!1),o||a||!x&&i){let[t,r]=lI({nodeId:x,dragItems:l,nodeLookup:n,dragging:!1});o?.(e.sourceEvent,l,t,r),a?.(e.sourceEvent,t,r),x||i?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!lC(t,`.${g}`,v))&&(!y||lC(t,y,v))});p.call(C)},destroy:function(){p?.on(".drag",null)}}}({getStoreItems:()=>l.getState(),onNodeMouseDown:t=>{sq({id:t,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,w.useEffect)(()=>{if(!t&&e.current&&c.current)return c.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:o,nodeClickDistance:i}),()=>{c.current?.destroy()}},[n,r,t,a,e,o,i]),s}function sY(){let e=l6();return(0,w.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:o,nodesDraggable:a,onError:i,updateNodePositions:l,nodeLookup:s,nodeOrigin:u}=e.getState(),c=new Map,d=e=>e.selected&&(e.draggable||a&&void 0===e.draggable),p=r?o[0]:5,h=r?o[1]:5,f=t.direction.x*p*t.factor,m=t.direction.y*h*t.factor;for(let[,e]of s){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+f,y:e.internals.positionAbsolute.y+m};r&&(t=iZ(t,o));let{position:a,positionAbsolute:l}=iM({nodeId:e.id,nextPosition:t,nodeLookup:s,nodeExtent:n,nodeOrigin:u,onError:i});e.position=a,e.internals.positionAbsolute=l,c.set(e.id,e)}l(c)},[])}let sX=(0,w.createContext)(null),sK=sX.Provider;sX.Consumer;let sG=()=>(0,w.useContext)(sX),sJ=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),sQ=(0,w.memo)(sT(function({type:e="source",position:t=g.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:a=!0,id:i,onConnect:l,children:s,className:u,onMouseDown:c,onTouchStart:p,...h},f){let m=i||null,y="target"===e,v=l6(),x=sG(),{connectOnClick:w,noPanClassName:_,rfId:S}=l5(sJ,lQ),{connectingFrom:k,connectingTo:C,clickConnecting:I,isPossibleEndHandle:M,connectionInProcess:E,clickConnectionInProcess:T,valid:j}=l5(t=>{let{connectionClickStartHandle:n,connectionMode:r,connection:o}=t,{fromHandle:a,toHandle:i,isValid:l}=o,s=i?.nodeId===x&&i?.id===m&&i?.type===e;return{connectingFrom:a?.nodeId===x&&a?.id===m&&a?.type===e,connectingTo:s,clickConnecting:n?.nodeId===x&&n?.id===m&&n?.type===e,isPossibleEndHandle:r===d.Strict?a?.type!==e:x!==a?.nodeId||m!==a?.id,connectionInProcess:!!a,clickConnectionInProcess:!!n,valid:s&&l}},lQ);x||v.getState().onError?.("010","Handle: No node id found. Make sure to only use a Handle inside a custom Node.");let R=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=v.getState(),o={...t,...e};if(r){let{edges:e,setEdges:t,onError:n}=v.getState();t(function(e,t,n={}){return((e,t,n={})=>{let r,o;if(!e.source||!e.target)return n.onError?.("006","Can't create edge. An edge needs a source and a target."),t;let a=n.getEdgeId||lr;return(o=r=iw(e)?{...e}:{...e,id:a(e)},t.some(e=>e.source===o.source&&e.target===o.target&&(e.sourceHandle===o.sourceHandle||!e.sourceHandle&&!o.sourceHandle)&&(e.targetHandle===o.targetHandle||!e.targetHandle&&!o.targetHandle)))?t:(null===r.sourceHandle&&delete r.sourceHandle,null===r.targetHandle&&delete r.targetHandle,t.concat(r))})(e,t,{...n,onError:n.onError??sM})}(o,e,{onError:n}))}n?.(o),l?.(o)},N=e=>{if(!x)return;let t="clientX"in e.nativeEvent;if(o&&(t&&0===e.button||!t)){let t=v.getState();lR(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:y,handleId:m,nodeId:x,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>v.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:R,isValidConnection:n||((...e)=>v.getState().isValidConnection?.(...e)??!0),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?c?.(e):p?.(e)};return(0,b.jsx)("div",{"data-handleid":m,"data-nodeid":x,"data-handlepos":t,"data-id":`${S}-${x}-${m}-${e}`,className:rF(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",_,u,{source:!y,target:y,connectable:r,connectablestart:o,connectableend:a,clickconnecting:I,connectingfrom:k,connectingto:C,valid:j,connectionindicator:r&&(!E||M)&&(E||T?a:o)}]),onMouseDown:N,onTouchStart:N,onClick:w?t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:i,connectionMode:l,isValidConnection:s,lib:u,rfId:c,nodeLookup:d,connection:p}=v.getState();if(!x||!i&&!o)return;if(!i){r?.(t.nativeEvent,{nodeId:x,handleId:m,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:x,type:e,id:m}});return}let h=i5(t.target),f=n||s,{connection:g,isValid:y}=lj(t.nativeEvent,{handle:{nodeId:x,id:m,type:e},connectionMode:l,fromNodeId:i.nodeId,fromHandleId:i.id||null,fromType:i.type,isValidConnection:f,flowId:c,doc:h,lib:u,nodeLookup:d});y&&g&&R(g);let b=structuredClone(p);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),v.setState({connectionClickStartHandle:null})}:void 0,ref:f,...h,children:s})})),s0={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},s1={input:function({data:e,isConnectable:t,sourcePosition:n=g.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[e?.label,(0,b.jsx)(sQ,{type:"source",position:n,isConnectable:t})]})},default:function({data:e,isConnectable:t,targetPosition:n=g.Top,sourcePosition:r=g.Bottom}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(sQ,{type:"target",position:n,isConnectable:t}),e?.label,(0,b.jsx)(sQ,{type:"source",position:r,isConnectable:t})]})},output:function({data:e,isConnectable:t,targetPosition:n=g.Top}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(sQ,{type:"target",position:n,isConnectable:t}),e?.label]})},group:function(){return null}},s2=e=>{let{width:t,height:n,x:r,y:o}=ik(e.nodeLookup,{filter:e=>!!e.selected});return{width:iF(t)?t:null,height:iF(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function s5({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=l6(),{width:o,height:a,transformString:i,userSelectionActive:l}=l5(s2,lQ),s=sY(),u=(0,w.useRef)(null);(0,w.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!l&&null!==o&&null!==a;if(sU({nodeRef:u,disabled:!c}),!c)return null;let d=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,b.jsx)("div",{className:rF(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:(0,b.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(s0,e.key)&&(e.preventDefault(),s({direction:s0[e.key],factor:e.shiftKey?4:1}))},style:{width:o,height:a}})})}let s6="u">typeof window?window:void 0,s4=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function s3({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:i,paneClickDistance:l,deleteKeyCode:s,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:p,onSelectionEnd:h,multiSelectionKeyCode:f,panActivationKeyCode:m,zoomActivationKeyCode:g,elementsSelectable:y,zoomOnScroll:v,zoomOnPinch:x,panOnScroll:_,panOnScrollSpeed:S,panOnScrollMode:k,zoomOnDoubleClick:C,panOnDrag:I,autoPanOnSelection:M,defaultViewport:E,translateExtent:T,minZoom:j,maxZoom:R,preventScrolling:N,onSelectionContextMenu:A,noWheelClassName:z,noPanClassName:P,disableKeyboardA11y:O,onViewportChange:D,isControlledViewport:$}){let{nodesSelectionActive:L,userSelectionActive:B}=l5(s4,lQ),W=sb(u,{target:s6}),F=sb(m,{target:s6}),H=F||I,Z=F||_,V=c&&!0!==H,q=W||B||V;return!function({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=l6(),{deleteElements:r}=sP(),o=sb(e,{actInsideInputWithModifier:!1}),a=sb(t,{target:sD});(0,w.useEffect)(()=>{if(o){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(sO),edges:e.filter(sO)}),n.setState({nodesSelectionActive:!1})}},[o]),(0,w.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}({deleteKeyCode:s,multiSelectionKeyCode:f}),(0,b.jsx)(sB,{onPaneContextMenu:a,elementsSelectable:y,zoomOnScroll:v,zoomOnPinch:x,panOnScroll:Z,panOnScrollSpeed:S,panOnScrollMode:k,zoomOnDoubleClick:C,panOnDrag:!W&&H,defaultViewport:E,translateExtent:T,minZoom:j,maxZoom:R,zoomActivationKeyCode:g,preventScrolling:N,noWheelClassName:z,noPanClassName:P,onViewportChange:D,isControlledViewport:$,paneClickDistance:l,selectionOnDrag:V,children:(0,b.jsxs)(sV,{onSelectionStart:p,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:i,panOnDrag:H,autoPanOnSelection:M,isSelecting:!!q,selectionMode:d,selectionKeyPressed:W,paneClickDistance:l,selectionOnDrag:V,children:[e,L&&(0,b.jsx)(s5,{onSelectionContextMenu:A,noPanClassName:P,disableKeyboardA11y:O})]})})}s3.displayName="FlowRenderer";let s9=(0,w.memo)(s3),s8=e=>e.updateNodeInternals;var s7=(0,w.memo)(function({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:a,onDoubleClick:i,nodesDraggable:l,elementsSelectable:s,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:p,noPanClassName:h,disableKeyboardA11y:f,rfId:m,nodeTypes:g,nodeClickDistance:y,onError:v}){let x,{node:_,internals:S,isParent:k}=l5(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},lQ),C=_.type||"default",I=g?.[C]||s1[C];void 0===I&&(v?.("003",(x=C,`Node type "${x}" not found. Using fallback type "default".`)),C="default",I=g?.default||s1.default);let M=!!(_.draggable||l&&void 0===_.draggable),E=!!(_.selectable||s&&void 0===_.selectable),T=!!(_.connectable||u&&void 0===_.connectable),j=!!(_.focusable||c&&void 0===_.focusable),R=l6(),N=iJ(_),A=function({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let o=l6(),a=(0,w.useRef)(null),i=(0,w.useRef)(null),l=(0,w.useRef)(e.sourcePosition),s=(0,w.useRef)(e.targetPosition),u=(0,w.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,w.useEffect)(()=>{!a.current||e.hidden||c&&i.current===a.current||(i.current&&r?.unobserve(i.current),r?.observe(a.current),i.current=a.current)},[c,e.hidden]),(0,w.useEffect)(()=>()=>{i.current&&(r?.unobserve(i.current),i.current=null)},[]),(0,w.useEffect)(()=>{if(a.current){let n=u.current!==t,r=l.current!==e.sourcePosition,i=s.current!==e.targetPosition;(n||r||i)&&(u.current=t,l.current=e.sourcePosition,s.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}({node:_,nodeType:C,hasDimensions:N,resizeObserver:d}),z=sU({nodeRef:A,disabled:_.hidden||!M,noDragClassName:p,handleSelector:_.dragHandle,nodeId:e,isSelectable:E,nodeClickDistance:y}),P=sY();if(_.hidden)return null;let O=iG(_),D=void 0===_.internals.handleBounds?{width:_.width??_.initialWidth??_.style?.width,height:_.height??_.initialHeight??_.style?.height}:{width:_.width??_.style?.width,height:_.height??_.style?.height},$=E||M||t||n||r||o,L=n?e=>n(e,{...S.userNode}):void 0,B=r?e=>r(e,{...S.userNode}):void 0,W=o?e=>o(e,{...S.userNode}):void 0,F=a?e=>a(e,{...S.userNode}):void 0,H=i?e=>i(e,{...S.userNode}):void 0;return(0,b.jsx)("div",{className:rF(["react-flow__node",`react-flow__node-${C}`,{[h]:M},_.className,{selected:_.selected,selectable:E,parent:k,draggable:M,dragging:z}]),ref:A,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:N?"visible":"hidden",..._.style,...D},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:B,onMouseLeave:W,onContextMenu:F,onClick:n=>{let{selectNodesOnDrag:r,nodeDragThreshold:o}=R.getState();E&&(!r||!M||o>0)&&sq({id:e,store:R,nodeRef:A}),t&&t(n,{...S.userNode})},onDoubleClick:H,onKeyDown:j?t=>{if(!i4(t.nativeEvent)&&!f){if(ig.includes(t.key)&&E)sq({id:e,store:R,unselect:"Escape"===t.key,nodeRef:A});else if(M&&_.selected&&Object.prototype.hasOwnProperty.call(s0,t.key)){t.preventDefault();let{ariaLabelConfig:e}=R.getState();R.setState({ariaLiveMessage:e["node.a11yDescription.ariaLiveMessage"]({direction:t.key.replace("Arrow","").toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),P({direction:s0[t.key],factor:t.shiftKey?4:1})}}}:void 0,tabIndex:j?0:void 0,onFocus:j?()=>{if(f||!A.current?.matches(":focus-visible"))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:o,setCenter:a}=R.getState();!o||iC(new Map([[e,_]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(_.position.x+O.width/2,_.position.y+O.height/2,{zoom:t[2]})}:void 0,role:_.ariaRole??(j?"group":void 0),"aria-roledescription":"node","aria-describedby":f?void 0:`${l9}-${m}`,"aria-label":_.ariaLabel,..._.domAttributes,children:(0,b.jsx)(sK,{value:e,children:(0,b.jsx)(I,{id:e,data:_.data,type:C,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:_.selected??!1,selectable:E,draggable:M,deletable:_.deletable??!0,isConnectable:T,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:z,dragHandle:_.dragHandle,zIndex:S.z,parentId:_.parentId,...O})})})});let ue=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function ut(e){var t;let{nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:a,onError:i}=l5(ue,lQ),l=(t=e.onlyRenderVisibleElements,l5((0,w.useCallback)(e=>t?iC(e.nodeLookup,{x:0,y:0,width:e.width,height:e.height},e.transform,!0).map(e=>e.id):Array.from(e.nodeLookup.keys()),[t]),lQ)),s=function(){let e=l5(s8),[t]=(0,w.useState)(()=>"u"<typeof ResizeObserver?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,w.useEffect)(()=>()=>{t?.disconnect()},[t]),t}();return(0,b.jsx)("div",{className:"react-flow__nodes",style:s$,children:l.map(t=>(0,b.jsx)(s7,{id:t,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:s,nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:i},t))})}ut.displayName="NodeRenderer";let un=(0,w.memo)(ut),ur={[m.Arrow]:({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,b.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},[m.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,b.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})}},uo=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:a="strokeWidth",strokeWidth:i,orient:l="auto-start-reverse"})=>{let s,u=(s=l6(),(0,w.useMemo)(()=>{let e;return Object.prototype.hasOwnProperty.call(ur,t)?ur[t]:(s.getState().onError?.("009",(e=t,`Marker type "${e}" doesn't exist.`)),null)},[t]));return u?(0,b.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:(0,b.jsx)(u,{color:n,strokeWidth:i})}):null},ua=({defaultColor:e,rfId:t})=>{let n=l5(e=>e.edges),r=l5(e=>e.defaultEdgeOptions),o=(0,w.useMemo)(()=>(function(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){let a=new Set;return e.reduce((e,i)=>([i.markerStart||r,i.markerEnd||o].forEach(r=>{if(r&&"object"==typeof r){let o=lh(r,t);a.has(o)||(e.push({id:o,color:r.color||n,...r}),a.add(o))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))})(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return o.length?(0,b.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,b.jsx)("defs",{children:o.map(e=>(0,b.jsx)(uo,{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};ua.displayName="MarkerDefinitions";var ui=(0,w.memo)(ua);function ul({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:a,labelBgPadding:i=[2,4],labelBgBorderRadius:l=2,children:s,className:u,...c}){let[d,p]=(0,w.useState)({x:1,y:0,width:0,height:0}),h=rF(["react-flow__edge-textwrapper",u]),f=(0,w.useRef)(null);return((0,w.useEffect)(()=>{if(f.current){let e=f.current.getBBox();p({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n)?(0,b.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[o&&(0,b.jsx)("rect",{width:d.width+2*i[0],x:-i[0],y:-i[1],height:d.height+2*i[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),(0,b.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:f,style:r,children:n}),s]}):null}ul.displayName="EdgeText";let us=(0,w.memo)(ul);function uu({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:a,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:s,interactionWidth:u=20,...c}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("path",{...c,d:e,fill:"none",className:rF(["react-flow__edge-path",c.className])}),u?(0,b.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&iF(t)&&iF(n)?(0,b.jsx)(us,{x:t,y:n,label:r,labelStyle:o,labelShowBg:a,labelBgStyle:i,labelBgPadding:l,labelBgBorderRadius:s}):null]})}function uc({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===g.Left||e===g.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function ud({sourceX:e,sourceY:t,sourcePosition:n=g.Bottom,targetX:r,targetY:o,targetPosition:a=g.Top}){let[i,l]=uc({pos:n,x1:e,y1:t,x2:r,y2:o}),[s,u]=uc({pos:a,x1:r,y1:o,x2:e,y2:t}),[c,d,p,h]=i8({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:i,sourceControlY:l,targetControlX:s,targetControlY:u});return[`M${e},${t} C${i},${l} ${s},${u} ${r},${o}`,c,d,p,h]}function up(e){return(0,w.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,sourcePosition:i,targetPosition:l,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:h,style:f,markerEnd:m,markerStart:g,interactionWidth:y})=>{let[v,x,w]=ud({sourceX:n,sourceY:r,sourcePosition:i,targetX:o,targetY:a,targetPosition:l}),_=e.isInternal?void 0:t;return(0,b.jsx)(uu,{id:_,path:v,labelX:x,labelY:w,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:h,style:f,markerEnd:m,markerStart:g,interactionWidth:y})})}let uh=up({isInternal:!1}),uf=up({isInternal:!0});function um(e){return(0,w.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,label:i,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:p,sourcePosition:h=g.Bottom,targetPosition:f=g.Top,markerEnd:m,markerStart:y,pathOptions:v,interactionWidth:x})=>{let[w,_,S]=ls({sourceX:n,sourceY:r,sourcePosition:h,targetX:o,targetY:a,targetPosition:f,borderRadius:v?.borderRadius,offset:v?.offset,stepPosition:v?.stepPosition}),k=e.isInternal?void 0:t;return(0,b.jsx)(uu,{id:k,path:w,labelX:_,labelY:S,label:i,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:p,markerEnd:m,markerStart:y,interactionWidth:x})})}uh.displayName="SimpleBezierEdge",uf.displayName="SimpleBezierEdgeInternal";let ug=um({isInternal:!1}),uy=um({isInternal:!0});function uv(e){return(0,w.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,b.jsx)(ug,{...n,id:r,pathOptions:(0,w.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}ug.displayName="SmoothStepEdge",uy.displayName="SmoothStepEdgeInternal";let ub=uv({isInternal:!1}),ux=uv({isInternal:!0});function uw(e){return(0,w.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,label:i,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:p,markerEnd:h,markerStart:f,interactionWidth:m})=>{let[g,y,v]=lo({sourceX:n,sourceY:r,targetX:o,targetY:a}),x=e.isInternal?void 0:t;return(0,b.jsx)(uu,{id:x,path:g,labelX:y,labelY:v,label:i,labelStyle:l,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:p,markerEnd:h,markerStart:f,interactionWidth:m})})}ub.displayName="StepEdge",ux.displayName="StepEdgeInternal";let u_=uw({isInternal:!1}),uS=uw({isInternal:!0});function uk(e){return(0,w.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,sourcePosition:i=g.Bottom,targetPosition:l=g.Top,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:h,style:f,markerEnd:m,markerStart:y,pathOptions:v,interactionWidth:x})=>{let[w,_,S]=lt({sourceX:n,sourceY:r,sourcePosition:i,targetX:o,targetY:a,targetPosition:l,curvature:v?.curvature}),k=e.isInternal?void 0:t;return(0,b.jsx)(uu,{id:k,path:w,labelX:_,labelY:S,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:h,style:f,markerEnd:m,markerStart:y,interactionWidth:x})})}u_.displayName="StraightEdge",uS.displayName="StraightEdgeInternal";let uC=uk({isInternal:!1}),uI=uk({isInternal:!0});uC.displayName="BezierEdge",uI.displayName="BezierEdgeInternal";let uM={default:uI,straight:uS,step:ux,smoothstep:uy,simplebezier:uf},uE={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},uT="react-flow__edgeupdater";function uj({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:a,onMouseOut:i,type:l}){return(0,b.jsx)("circle",{onMouseDown:o,onMouseEnter:a,onMouseOut:i,className:rF([uT,`${uT}-${l}`]),cx:e===g.Left?t-r:e===g.Right?t+r:t,cy:e===g.Top?n-r:e===g.Bottom?n+r:n,r:r,stroke:"transparent",fill:"transparent"})}function uR({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:a,targetY:i,sourcePosition:l,targetPosition:s,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:p,setUpdateHover:h}){let f=l6(),m=(e,t)=>{if(0!==e.button)return;let{autoPanOnConnect:r,domNode:o,connectionMode:a,connectionRadius:i,lib:l,onConnectStart:s,cancelConnection:h,nodeLookup:m,rfId:g,panBy:y,updateConnection:v}=f.getState(),b="target"===t.type;lR(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:i,domNode:o,handleId:t.id,nodeId:t.nodeId,nodeLookup:m,isTarget:b,edgeUpdaterType:t.type,lib:l,flowId:g,cancelConnection:h,panBy:y,isValidConnection:(...e)=>f.getState().isValidConnection?.(...e)??!0,onConnect:e=>u?.(n,e),onConnectStart:(r,o)=>{p(!0),c?.(e,n,t.type),s?.(r,o)},onConnectEnd:(...e)=>f.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{p(!1),d?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>f.getState().transform,getFromHandle:()=>f.getState().connection.fromHandle,dragThreshold:f.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=()=>h(!0),y=()=>h(!1);return(0,b.jsxs)(b.Fragment,{children:[(!0===e||"source"===e)&&(0,b.jsx)(uj,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:e=>m(e,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),onMouseEnter:g,onMouseOut:y,type:"source"}),(!0===e||"target"===e)&&(0,b.jsx)(uj,{position:s,centerX:a,centerY:i,radius:t,onMouseDown:e=>m(e,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),onMouseEnter:g,onMouseOut:y,type:"target"})]})}var uN=(0,w.memo)(function({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:a,onContextMenu:i,onMouseEnter:l,onMouseMove:s,onMouseLeave:u,reconnectRadius:c,onReconnect:p,onReconnectStart:h,onReconnectEnd:f,rfId:m,edgeTypes:y,noPanClassName:v,onError:x,disableKeyboardA11y:_}){let S,k=l5(t=>t.edgeLookup.get(e)),C=l5(e=>e.defaultEdgeOptions),I=(k=C?{...C,...k}:k).type||"default",M=y?.[I]||uM[I];void 0===M&&(x?.("011",(S=I,`Edge type "${S}" not found. Using fallback type "default".`)),I="default",M=y?.default||uM.default);let E=!!(k.focusable||t&&void 0===k.focusable),T=void 0!==p&&(k.reconnectable||n&&void 0===k.reconnectable),j=!!(k.selectable||r&&void 0===k.selectable),R=(0,w.useRef)(null),[N,A]=(0,w.useState)(!1),[z,P]=(0,w.useState)(!1),O=l6(),{zIndex:D,sourceX:$,sourceY:L,targetX:B,targetY:W,sourcePosition:F,targetPosition:H}=l5((0,w.useCallback)(t=>{let n=t.nodeLookup.get(k.source),r=t.nodeLookup.get(k.target);if(!n||!r)return{zIndex:k.zIndex,...uE};let o=function(e){let{sourceNode:t,targetNode:n}=e;if(!lu(t)||!lu(n))return null;let r=t.internals.handleBounds||lc(t.handles),o=n.internals.handleBounds||lc(n.handles),a=lp(r?.source??[],e.sourceHandle),i=lp(e.connectionMode===d.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),e.targetHandle);if(!a||!i)return e.onError?.("008",((e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${"source"===e?n:r}", edge id: ${t}.`)(!a?"source":"target",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let l=a?.position||g.Bottom,s=i?.position||g.Top,u=ld(t,a,l),c=ld(n,i,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:l,targetPosition:s}}({id:e,sourceNode:n,targetNode:r,sourceHandle:k.sourceHandle||null,targetHandle:k.targetHandle||null,connectionMode:t.connectionMode,onError:x});return{zIndex:function({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:a="basic"}){if("manual"===a)return r;let i=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return(o&&n?r+1e3:r)+i}({selected:k.selected,zIndex:k.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode}),...o||uE}},[k.source,k.target,k.sourceHandle,k.targetHandle,k.selected,k.zIndex]),lQ),Z=(0,w.useMemo)(()=>k.markerStart?`url('#${lh(k.markerStart,m)}')`:void 0,[k.markerStart,m]),V=(0,w.useMemo)(()=>k.markerEnd?`url('#${lh(k.markerEnd,m)}')`:void 0,[k.markerEnd,m]);if(k.hidden||null===$||null===L||null===B||null===W)return null;let q=a?e=>{a(e,{...k})}:void 0,U=i?e=>{i(e,{...k})}:void 0,Y=l?e=>{l(e,{...k})}:void 0,X=s?e=>{s(e,{...k})}:void 0,K=u?e=>{u(e,{...k})}:void 0;return(0,b.jsx)("svg",{style:{zIndex:D},children:(0,b.jsxs)("g",{className:rF(["react-flow__edge",`react-flow__edge-${I}`,k.className,v,{selected:k.selected,animated:k.animated,inactive:!j&&!o,updating:N,selectable:j}]),onClick:t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=O.getState();j&&(O.setState({nodesSelectionActive:!1}),k.selected&&a?(r({nodes:[],edges:[k]}),R.current?.blur()):n([e])),o&&o(t,k)},onDoubleClick:q,onContextMenu:U,onMouseEnter:Y,onMouseMove:X,onMouseLeave:K,onKeyDown:E?t=>{if(!_&&ig.includes(t.key)&&j){let{unselectNodesAndEdges:n,addSelectedEdges:r}=O.getState();"Escape"===t.key?(R.current?.blur(),n({edges:[k]})):r([e])}}:void 0,tabIndex:E?0:void 0,role:k.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":null===k.ariaLabel?void 0:k.ariaLabel||`Edge from ${k.source} to ${k.target}`,"aria-describedby":E?`${l8}-${m}`:void 0,ref:R,...k.domAttributes,children:[!z&&(0,b.jsx)(M,{id:e,source:k.source,target:k.target,type:k.type,selected:k.selected,animated:k.animated,selectable:j,deletable:k.deletable??!0,label:k.label,labelStyle:k.labelStyle,labelShowBg:k.labelShowBg,labelBgStyle:k.labelBgStyle,labelBgPadding:k.labelBgPadding,labelBgBorderRadius:k.labelBgBorderRadius,sourceX:$,sourceY:L,targetX:B,targetY:W,sourcePosition:F,targetPosition:H,data:k.data,style:k.style,sourceHandleId:k.sourceHandle,targetHandleId:k.targetHandle,markerStart:Z,markerEnd:V,pathOptions:"pathOptions"in k?k.pathOptions:void 0,interactionWidth:k.interactionWidth}),T&&(0,b.jsx)(uR,{edge:k,isReconnectable:T,reconnectRadius:c,onReconnect:p,onReconnectStart:h,onReconnectEnd:f,sourceX:$,sourceY:L,targetX:B,targetY:W,sourcePosition:F,targetPosition:H,setUpdateHover:A,setReconnecting:P})]})})});let uA=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function uz({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:a,onEdgeContextMenu:i,onEdgeMouseEnter:l,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:p,onReconnectStart:h,onReconnectEnd:f,disableKeyboardA11y:m}){let{edgesFocusable:g,edgesReconnectable:y,elementsSelectable:v,onError:x}=l5(uA,lQ),_=l5((0,w.useCallback)(e=>{if(!t)return e.edges.map(e=>e.id);let n=[];if(e.width&&e.height)for(let t of e.edges){let r=e.nodeLookup.get(t.source),o=e.nodeLookup.get(t.target);r&&o&&function({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){let a=iz(i$(e),i$(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),iB({x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]},iO(a))>0}({sourceNode:r,targetNode:o,width:e.width,height:e.height,transform:e.transform})&&n.push(t.id)}return n},[t]),lQ);return(0,b.jsxs)("div",{className:"react-flow__edges",children:[(0,b.jsx)(ui,{defaultColor:e,rfId:n}),_.map(e=>(0,b.jsx)(uN,{id:e,edgesFocusable:g,edgesReconnectable:y,elementsSelectable:v,noPanClassName:o,onReconnect:a,onContextMenu:i,onMouseEnter:l,onMouseMove:s,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:p,onReconnectStart:h,onReconnectEnd:f,rfId:n,onError:x,edgeTypes:r,disableKeyboardA11y:m},e))]})}uz.displayName="EdgeRenderer";let uP=(0,w.memo)(uz),uO=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function uD({children:e}){let t=l5(uO);return(0,b.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}let u$=e=>e.panZoom?.syncViewport;function uL(e){return e.connection.inProgress?{...e.connection,to:iV(e.connection.to,e.transform)}:{...e.connection}}let uB=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function uW({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:o,width:a,height:i,isValid:l,inProgress:s}=l5(uB,lQ);return a&&o&&s?(0,b.jsx)("svg",{style:e,width:a,height:i,className:"react-flow__connectionline react-flow__container",children:(0,b.jsx)("g",{className:rF(["react-flow__connection",ix(l)]),children:(0,b.jsx)(uF,{style:t,type:n,CustomComponent:r,isValid:l})})}):null}let uF=({style:e,type:t=f.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:o,from:a,fromNode:i,fromHandle:l,fromPosition:s,to:u,toNode:c,toHandle:d,toPosition:p,pointer:h}=l5(uL,lQ);if(!o)return;if(n)return(0,b.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:l,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:s,toPosition:p,connectionStatus:ix(r),toNode:c,toHandle:d,pointer:h});let m="",g={sourceX:a.x,sourceY:a.y,sourcePosition:s,targetX:u.x,targetY:u.y,targetPosition:p};switch(t){case f.Bezier:[m]=lt(g);break;case f.SimpleBezier:[m]=ud(g);break;case f.Step:[m]=ls({...g,borderRadius:0});break;case f.SmoothStep:[m]=ls(g);break;default:[m]=lo(g)}return(0,b.jsx)("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};uF.displayName="ConnectionLine";let uH={};function uZ(e=uH){(0,w.useRef)(e),l6(),(0,w.useEffect)(()=>{},[e])}function uV({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:a,onEdgeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:p,onSelectionEnd:h,connectionLineType:f,connectionLineStyle:m,connectionLineComponent:g,connectionLineContainerStyle:y,selectionKeyCode:v,selectionOnDrag:x,selectionMode:_,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:C,deleteKeyCode:I,onlyRenderVisibleElements:M,elementsSelectable:E,defaultViewport:T,translateExtent:j,minZoom:R,maxZoom:N,preventScrolling:A,defaultMarkerColor:z,zoomOnScroll:P,zoomOnPinch:O,panOnScroll:D,panOnScrollSpeed:$,panOnScrollMode:L,zoomOnDoubleClick:B,panOnDrag:W,autoPanOnSelection:F,onPaneClick:H,onPaneMouseEnter:Z,onPaneMouseMove:V,onPaneMouseLeave:q,onPaneScroll:U,onPaneContextMenu:Y,paneClickDistance:X,nodeClickDistance:K,onEdgeContextMenu:G,onEdgeMouseEnter:J,onEdgeMouseMove:Q,onEdgeMouseLeave:ee,reconnectRadius:et,onReconnect:en,onReconnectStart:er,onReconnectEnd:eo,noDragClassName:ea,noWheelClassName:ei,noPanClassName:el,disableKeyboardA11y:es,nodeExtent:eu,rfId:ec,viewport:ed,onViewportChange:ep}){let eh,ef,em,eg;return uZ(e),uZ(t),l6(),(0,w.useRef)(!1),(0,w.useEffect)(()=>{},[]),eh=sP(),ef=(0,w.useRef)(!1),(0,w.useEffect)(()=>{!ef.current&&eh.viewportInitialized&&n&&(setTimeout(()=>n(eh),1),ef.current=!0)},[n,eh.viewportInitialized]),em=l5(u$),eg=l6(),(0,w.useEffect)(()=>{ed&&(em?.(ed),eg.setState({transform:[ed.x,ed.y,ed.zoom]}))},[ed,em]),(0,b.jsx)(s9,{onPaneClick:H,onPaneMouseEnter:Z,onPaneMouseMove:V,onPaneMouseLeave:q,onPaneContextMenu:Y,onPaneScroll:U,paneClickDistance:X,deleteKeyCode:I,selectionKeyCode:v,selectionOnDrag:x,selectionMode:_,onSelectionStart:p,onSelectionEnd:h,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:C,elementsSelectable:E,zoomOnScroll:P,zoomOnPinch:O,zoomOnDoubleClick:B,panOnScroll:D,panOnScrollSpeed:$,panOnScrollMode:L,panOnDrag:W,autoPanOnSelection:F,defaultViewport:T,translateExtent:j,minZoom:R,maxZoom:N,onSelectionContextMenu:d,preventScrolling:A,noDragClassName:ea,noWheelClassName:ei,noPanClassName:el,disableKeyboardA11y:es,onViewportChange:ep,isControlledViewport:!!ed,children:(0,b.jsxs)(uD,{children:[(0,b.jsx)(uP,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:i,onReconnect:en,onReconnectStart:er,onReconnectEnd:eo,onlyRenderVisibleElements:M,onEdgeContextMenu:G,onEdgeMouseEnter:J,onEdgeMouseMove:Q,onEdgeMouseLeave:ee,reconnectRadius:et,defaultMarkerColor:z,noPanClassName:el,disableKeyboardA11y:es,rfId:ec}),(0,b.jsx)(uW,{style:m,type:f,component:g,containerStyle:y}),(0,b.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,b.jsx)(un,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:K,onlyRenderVisibleElements:M,noPanClassName:el,noDragClassName:ea,disableKeyboardA11y:es,nodeExtent:eu,rfId:ec}),(0,b.jsx)("div",{className:"react-flow__viewport-portal"})]})})}uV.displayName="GraphView";let uq=(0,w.memo)(uV),uU=iH("React Flow","https://reactflow.dev/"),uY=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:a,fitView:i,fitViewOptions:l,minZoom:s=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:p,zIndexMode:h="basic"}={})=>{let f=new Map,m=new Map,g=new Map,y=new Map,v=r??t??[],b=n??e??[],x=c??[0,0],w=p??im;lk(g,y,v);let{nodesInitialized:_}=lv(b,f,m,{nodeOrigin:x,nodeExtent:w,zIndexMode:h}),S=[0,0,1];if(i&&o&&a){let{x:e,y:t,zoom:n}=iY(ik(f,{filter:e=>!!((e.width||e.initialWidth)&&(e.height||e.initialHeight))}),o,a,s,u,l?.padding??.1);S=[e,t,n]}return{rfId:"1",width:o??0,height:a??0,transform:S,nodes:b,nodesInitialized:_,nodeLookup:f,parentLookup:m,edges:v,edgeLookup:y,connectionLookup:g,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==n,hasDefaultEdges:void 0!==r,panZoom:null,minZoom:s,maxZoom:u,translateExtent:im,nodeExtent:w,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:d.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,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:i??!1,fitViewOptions:l,fitViewResolver:null,connection:{...iv},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:uU,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:iy,zIndexMode:h,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}};function uX({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:a,initialMinZoom:i,initialMaxZoom:l,initialFitViewOptions:s,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:p,children:h}){let[f]=(0,w.useState)(()=>(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:a,fitView:i,fitViewOptions:l,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:p})=>{let h,f;return h=(h,f)=>{async function m(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:o,height:a,minZoom:i,maxZoom:l}=f();t&&(await iI({nodes:e,width:o,height:a,panZoom:t,minZoom:i,maxZoom:l},n),r?.resolve(!0),h({fitViewResolver:null}))}return{...uY({nodes:e,edges:t,width:o,height:a,fitView:i,fitViewOptions:l,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:p}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,elevateNodesOnSelect:o,fitViewQueued:a,zIndexMode:i,nodesSelectionActive:l}=f(),{nodesInitialized:s,hasSelectedNodes:u}=lv(e,t,n,{nodeOrigin:r,nodeExtent:d,elevateNodesOnSelect:o,checkEquality:!0,zIndexMode:i}),c=l&&u;a&&s?(m(),h({nodes:e,nodesInitialized:s,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:c})):h({nodes:e,nodesInitialized:s,nodesSelectionActive:c})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=f();lk(t,n,e),h({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=f();t(e),h({hasDefaultNodes:!0})}if(t){let{setEdges:e}=f();e(t),h({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:o,nodeOrigin:a,nodeExtent:i,debug:l,fitViewQueued:s,zIndexMode:u}=f(),{changes:c,updatedInternals:d}=function(e,t,n,r,o,a,i){let l=r?.querySelector(".xyflow__viewport"),s=!1;if(!l)return{changes:[],updatedInternals:s};let u=[],c=window.getComputedStyle(l),{m22:d}=new window.DOMMatrixReadOnly(c.transform),p=[];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}}),s=!0;continue}let l=i2(r.nodeElement),c=e.measured.width!==l.width||e.measured.height!==l.height;if(l.width&&l.height&&(c||!e.internals.handleBounds||r.force)){let h=r.nodeElement.getBoundingClientRect(),f=iK(e.extent)?e.extent:a,{positionAbsolute:m}=e.internals;e.parentId&&"parent"===e.extent?m=iR(m,l,t.get(e.parentId)):f&&(m=ij(m,f,l));let g={...e,measured:l,internals:{...e.internals,positionAbsolute:m,handleBounds:{source:i9("source",r.nodeElement,h,d,e.id),target:i9("target",r.nodeElement,h,d,e.id)}}};t.set(e.id,g),e.parentId&&lb(g,t,n,{nodeOrigin:o,zIndexMode:i}),s=!0,c&&(u.push({id:e.id,type:"dimensions",dimensions:l}),e.expandParent&&e.parentId&&p.push({id:e.id,parentId:e.parentId,rect:iD(g,o)}))}}if(p.length>0){let e=lw(p,t,n,o);u.push(...e)}return{changes:u,updatedInternals:s}}(e,n,r,o,a,i,u);d&&(!function(e,t,n){let r=lg(lf,n);for(let n of e.values())if(n.parentId)lb(n,e,t,r);else{let e=ij(iS(n,r.nodeOrigin),iK(n.extent)?n.extent:r.nodeExtent,iG(n));n.internals.positionAbsolute=e}}(n,r,{nodeOrigin:a,nodeExtent:i,zIndexMode:u}),s?(m(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),c?.length>0&&(l&&console.log("React Flow: trigger node changes",c),t?.(c)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:o,triggerNodeChanges:a,connection:i,updateConnection:l,onNodesChangeMiddlewareMap:s}=f();for(let[a,s]of e){let e=o.get(a),u=!!(e?.expandParent&&e?.parentId&&s?.position),c={id:a,type:"position",position:u?{x:Math.max(0,s.position.x),y:Math.max(0,s.position.y)}:s.position,dragging:t};if(e&&i.inProgress&&i.fromNode.id===e.id){let t=ld(e,i.fromHandle,g.Left,!0);l({...i,from:t})}u&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...s.internals.positionAbsolute,width:s.measured.width??0,height:s.measured.height??0}}),r.push(c)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=f(),a=lw(n,o,e,t);r.push(...a)}for(let e of s.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:o,debug:a}=f();e?.length&&(o&&n(s_(e,r)),a&&console.log("React Flow: trigger node changes",e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:o,debug:a}=f();e?.length&&(o&&n(s_(e,r)),a&&console.log("React Flow: trigger edge changes",e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:o,triggerEdgeChanges:a}=f();t?o(e.map(e=>sS(e,!0))):(o(sk(r,new Set([...e]),!0)),a(sk(n)))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:o,triggerEdgeChanges:a}=f();t?a(e.map(e=>sS(e,!0))):(a(sk(n,new Set([...e]))),o(sk(r,new Set,!0)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:o,triggerNodeChanges:a,triggerEdgeChanges:i}=f(),l=[];for(let t of e||r){if(!t.selected)continue;let e=o.get(t.id);e&&(e.selected=!1),l.push(sS(t.id,!1))}let s=[];for(let e of t||n)e.selected&&s.push(sS(e.id,!1));a(l),i(s)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=f();t?.setScaleExtent([e,n]),h({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=f();t?.setScaleExtent([n,e]),h({maxZoom:e})},setTranslateExtent:e=>{f().panZoom?.setTranslateExtent(e),h({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:o}=f();if(!o)return;let a=t.reduce((e,t)=>t.selected?[...e,sS(t.id,!1)]:e,[]),i=e.reduce((e,t)=>t.selected?[...e,sS(t.id,!1)]:e,[]);n(a),r(i)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:o,elevateNodesOnSelect:a,nodeExtent:i,zIndexMode:l}=f();(e[0][0]!==i[0][0]||e[0][1]!==i[0][1]||e[1][0]!==i[1][0]||e[1][1]!==i[1][1])&&(lv(t,n,r,{nodeOrigin:o,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:l}),h({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:o,translateExtent:a}=f();return l_({delta:e,panZoom:o,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:o,maxZoom:a,panZoom:i}=f();if(!i)return!1;let l=void 0!==n?.zoom?n.zoom:a;return await i.setViewport({x:r/2-e*l,y:o/2-t*l,zoom:l},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0},cancelConnection:()=>{h({connection:{...iv}})},updateConnection:e=>{h({connection:e})},reset:()=>h({...uY()})}},f=Object.is,h?lJ(h,f):lJ})({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:a,fitView:u,minZoom:i,maxZoom:l,fitViewOptions:s,nodeOrigin:c,nodeExtent:d,zIndexMode:p}));return(0,b.jsx)(l1,{value:f,children:(0,b.jsx)(sA,{children:h})})}function uK({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:a,height:i,fitView:l,fitViewOptions:s,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:p,zIndexMode:h}){return(0,w.useContext)(l0)?(0,b.jsx)(b.Fragment,{children:e}):(0,b.jsx)(uX,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:a,initialHeight:i,fitView:l,initialFitViewOptions:s,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:p,zIndexMode:h,children:e})}let uG={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var uJ=sT(function({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:a,edgeTypes:i,onNodeClick:l,onEdgeClick:s,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:m,onConnect:g,onConnectStart:y,onConnectEnd:v,onClickConnectStart:x,onClickConnectEnd:_,onNodeMouseEnter:S,onNodeMouseMove:k,onNodeMouseLeave:C,onNodeContextMenu:I,onNodeDoubleClick:M,onNodeDragStart:E,onNodeDrag:T,onNodeDragStop:j,onNodesDelete:R,onEdgesDelete:N,onDelete:A,onSelectionChange:z,onSelectionDragStart:P,onSelectionDrag:O,onSelectionDragStop:D,onSelectionContextMenu:$,onSelectionStart:L,onSelectionEnd:B,onBeforeDelete:W,connectionMode:F,connectionLineType:H=f.Bezier,connectionLineStyle:Z,connectionLineComponent:V,connectionLineContainerStyle:q,deleteKeyCode:U="Backspace",selectionKeyCode:Y="Shift",selectionOnDrag:X=!1,selectionMode:K=h.Full,panActivationKeyCode:G="Space",multiSelectionKeyCode:J=iX()?"Meta":"Control",zoomActivationKeyCode:Q=iX()?"Meta":"Control",snapToGrid:ee,snapGrid:et,onlyRenderVisibleElements:en=!1,selectNodesOnDrag:er,nodesDraggable:eo,autoPanOnNodeFocus:ea,nodesConnectable:ei,nodesFocusable:el,nodeOrigin:es=sd,edgesFocusable:eu,edgesReconnectable:ec,elementsSelectable:ed=!0,defaultViewport:ep=sp,minZoom:eh=.5,maxZoom:ef=2,translateExtent:em=im,preventScrolling:eg=!0,nodeExtent:ey,defaultMarkerColor:ev="#b1b1b7",zoomOnScroll:eb=!0,zoomOnPinch:ex=!0,panOnScroll:ew=!1,panOnScrollSpeed:e_=.5,panOnScrollMode:eS=p.Free,zoomOnDoubleClick:ek=!0,panOnDrag:eC=!0,onPaneClick:eI,onPaneMouseEnter:eM,onPaneMouseMove:eE,onPaneMouseLeave:eT,onPaneScroll:ej,onPaneContextMenu:eR,paneClickDistance:eN=1,nodeClickDistance:eA=0,children:ez,onReconnect:eP,onReconnectStart:eO,onReconnectEnd:eD,onEdgeContextMenu:e$,onEdgeDoubleClick:eL,onEdgeMouseEnter:eB,onEdgeMouseMove:eW,onEdgeMouseLeave:eF,reconnectRadius:eH=10,onNodesChange:eZ,onEdgesChange:eV,noDragClassName:eq="nodrag",noWheelClassName:eU="nowheel",noPanClassName:eY="nopan",fitView:eX,fitViewOptions:eK,connectOnClick:eG,attributionPosition:eJ,proOptions:eQ,defaultEdgeOptions:e0,elevateNodesOnSelect:e1=!0,elevateEdgesOnSelect:e2=!1,disableKeyboardA11y:e5=!1,autoPanOnConnect:e6,autoPanOnNodeDrag:e4,autoPanOnSelection:e3=!0,autoPanSpeed:e9,connectionRadius:e8,isValidConnection:e7,onError:te,style:tt,id:tn,nodeDragThreshold:tr,connectionDragThreshold:to,viewport:ta,onViewportChange:ti,width:tl,height:ts,colorMode:tu="light",debug:tc,onScroll:td,ariaLabelConfig:tp,zIndexMode:th="basic",...tf},tm){let tg=tn||"1",ty=function(e){let[t,n]=(0,w.useState)("system"===e?null:e);return(0,w.useEffect)(()=>{if("system"!==e)return void n(e);let t=sy(),r=()=>n(t?.matches?"dark":"light");return r(),t?.addEventListener("change",r),()=>{t?.removeEventListener("change",r)}},[e]),null!==t?t:sy()?.matches?"dark":"light"}(tu),tv=(0,w.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),td?.(e)},[td]);return(0,b.jsx)("div",{"data-testid":"rf__wrapper",...tf,onScroll:tv,style:{...tt,...uG},ref:tm,className:rF(["react-flow",o,ty]),id:tn,role:"application",children:(0,b.jsxs)(uK,{nodes:e,edges:t,width:tl,height:ts,fitView:eX,fitViewOptions:eK,minZoom:eh,maxZoom:ef,nodeOrigin:es,nodeExtent:ey,zIndexMode:th,children:[(0,b.jsx)(sg,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:y,onConnectEnd:v,onClickConnectStart:x,onClickConnectEnd:_,nodesDraggable:eo,autoPanOnNodeFocus:ea,nodesConnectable:ei,nodesFocusable:el,edgesFocusable:eu,edgesReconnectable:ec,elementsSelectable:ed,elevateNodesOnSelect:e1,elevateEdgesOnSelect:e2,minZoom:eh,maxZoom:ef,nodeExtent:ey,onNodesChange:eZ,onEdgesChange:eV,snapToGrid:ee,snapGrid:et,connectionMode:F,translateExtent:em,connectOnClick:eG,defaultEdgeOptions:e0,fitView:eX,fitViewOptions:eK,onNodesDelete:R,onEdgesDelete:N,onDelete:A,onNodeDragStart:E,onNodeDrag:T,onNodeDragStop:j,onSelectionDrag:O,onSelectionDragStart:P,onSelectionDragStop:D,onMove:c,onMoveStart:d,onMoveEnd:m,noPanClassName:eY,nodeOrigin:es,rfId:tg,autoPanOnConnect:e6,autoPanOnNodeDrag:e4,autoPanSpeed:e9,onError:te,connectionRadius:e8,isValidConnection:e7,selectNodesOnDrag:er,nodeDragThreshold:tr,connectionDragThreshold:to,onBeforeDelete:W,debug:tc,ariaLabelConfig:tp,zIndexMode:th}),(0,b.jsx)(uq,{onInit:u,onNodeClick:l,onEdgeClick:s,onNodeMouseEnter:S,onNodeMouseMove:k,onNodeMouseLeave:C,onNodeContextMenu:I,onNodeDoubleClick:M,nodeTypes:a,edgeTypes:i,connectionLineType:H,connectionLineStyle:Z,connectionLineComponent:V,connectionLineContainerStyle:q,selectionKeyCode:Y,selectionOnDrag:X,selectionMode:K,deleteKeyCode:U,multiSelectionKeyCode:J,panActivationKeyCode:G,zoomActivationKeyCode:Q,onlyRenderVisibleElements:en,defaultViewport:ep,translateExtent:em,minZoom:eh,maxZoom:ef,preventScrolling:eg,zoomOnScroll:eb,zoomOnPinch:ex,zoomOnDoubleClick:ek,panOnScroll:ew,panOnScrollSpeed:e_,panOnScrollMode:eS,panOnDrag:eC,autoPanOnSelection:e3,onPaneClick:eI,onPaneMouseEnter:eM,onPaneMouseMove:eE,onPaneMouseLeave:eT,onPaneScroll:ej,onPaneContextMenu:eR,paneClickDistance:eN,nodeClickDistance:eA,onSelectionContextMenu:$,onSelectionStart:L,onSelectionEnd:B,onReconnect:eP,onReconnectStart:eO,onReconnectEnd:eD,onEdgeContextMenu:e$,onEdgeDoubleClick:eL,onEdgeMouseEnter:eB,onEdgeMouseMove:eW,onEdgeMouseLeave:eF,reconnectRadius:eH,defaultMarkerColor:ev,noDragClassName:eq,noWheelClassName:eU,noPanClassName:eY,rfId:tg,disableKeyboardA11y:e5,nodeExtent:ey,viewport:ta,onViewportChange:ti}),(0,b.jsx)(sc,{onSelectionChange:z}),ez,(0,b.jsx)(so,{proOptions:eQ,position:eJ}),(0,b.jsx)(sn,{rfId:tg,disableKeyboardA11y:e5})]})})});function uQ({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,b.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:rF(["react-flow__background-pattern",n,r])})}function u0({radius:e,className:t}){return(0,b.jsx)("circle",{cx:e,cy:e,r:e,className:rF(["react-flow__background-pattern","dots",t])})}(u=v||(v={})).Lines="lines",u.Dots="dots",u.Cross="cross";let u1={[v.Dots]:1,[v.Lines]:1,[v.Cross]:6},u2=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function u5({id:e,variant:t=v.Dots,gap:n=20,size:r,lineWidth:o=1,offset:a=0,color:i,bgColor:l,style:s,className:u,patternClassName:c}){let d=(0,w.useRef)(null),{transform:p,patternId:h}=l5(u2,lQ),f=r||u1[t],m=t===v.Dots,g=t===v.Cross,y=Array.isArray(n)?n:[n,n],x=[y[0]*p[2]||1,y[1]*p[2]||1],_=f*p[2],S=Array.isArray(a)?a:[a,a],k=g?[_,_]:x,C=[S[0]*p[2]||1+k[0]/2,S[1]*p[2]||1+k[1]/2],I=`${h}${e||""}`;return(0,b.jsxs)("svg",{className:rF(["react-flow__background",u]),style:{...s,...s$,"--xy-background-color-props":l,"--xy-background-pattern-color-props":i},ref:d,"data-testid":"rf__background",children:[(0,b.jsx)("pattern",{id:I,x:p[0]%x[0],y:p[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${C[0]},-${C[1]})`,children:m?(0,b.jsx)(u0,{radius:_/2,className:c}):(0,b.jsx)(uQ,{dimensions:k,lineWidth:o,variant:t,className:c})}),(0,b.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${I})`})]})}u5.displayName="Background";let u6=(0,w.memo)(u5);function u4(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,b.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function u3(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,b.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function u9(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,b.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 u8(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,b.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 u7(){return(0,b.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,b.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 ce({children:e,className:t,...n}){return(0,b.jsx)("button",{type:"button",className:rF(["react-flow__controls-button",t]),...n,children:e})}let ct=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function cn({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:a,onZoomOut:i,onFitView:l,onInteractiveChange:s,className:u,children:c,position:d="bottom-left",orientation:p="vertical","aria-label":h}){let f=l6(),{isInteractive:m,minZoomReached:g,maxZoomReached:y,ariaLabelConfig:v}=l5(ct,lQ),{zoomIn:x,zoomOut:w,fitView:_}=sP();return(0,b.jsxs)(sr,{className:rF(["react-flow__controls","horizontal"===p?"horizontal":"vertical",u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??v["controls.ariaLabel"],children:[t&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ce,{onClick:()=>{x(),a?.()},className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:y,children:(0,b.jsx)(u4,{})}),(0,b.jsx)(ce,{onClick:()=>{w(),i?.()},className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:g,children:(0,b.jsx)(u3,{})})]}),n&&(0,b.jsx)(ce,{className:"react-flow__controls-fitview",onClick:()=>{_(o),l?.()},title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:(0,b.jsx)(u9,{})}),r&&(0,b.jsx)(ce,{className:"react-flow__controls-interactive",onClick:()=>{f.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),s?.(!m)},title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:m?(0,b.jsx)(u7,{}):(0,b.jsx)(u8,{})}),c]})}cn.displayName="Controls";let cr=(0,w.memo)(cn),co=(0,w.memo)(function({id:e,x:t,y:n,width:r,height:o,style:a,color:i,strokeColor:l,strokeWidth:s,className:u,borderRadius:c,shapeRendering:d,selected:p,onClick:h}){let{background:f,backgroundColor:m}=a||{};return(0,b.jsx)("rect",{className:rF(["react-flow__minimap-node",{selected:p},u]),x:t,y:n,rx:c,ry:c,width:r,height:o,style:{fill:i||f||m,stroke:l,strokeWidth:s},shapeRendering:d,onClick:h?t=>h(t,e):void 0})}),ca=e=>e.nodes.map(e=>e.id),ci=e=>e instanceof Function?e:()=>e,cl=(0,w.memo)(function({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:a,shapeRendering:i,NodeComponent:l,onClick:s}){let{node:u,x:c,y:d,width:p,height:h}=l5(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:o,y:a}=n.internals.positionAbsolute,{width:i,height:l}=iG(r);return{node:r,x:o,y:a,width:i,height:l}},lQ);return u&&!u.hidden&&iJ(u)?(0,b.jsx)(l,{x:c,y:d,width:p,height:h,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:o,strokeColor:n(u),strokeWidth:a,shapeRendering:i,onClick:s,id:u.id}):null});var cs=(0,w.memo)(function({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:a=co,onClick:i}){let l=l5(ca,lQ),s=ci(t),u=ci(e),c=ci(n),d="u"<typeof window||window.chrome?"crispEdges":"geometricPrecision";return(0,b.jsx)(b.Fragment,{children:l.map(e=>(0,b.jsx)(cl,{id:e,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:a,onClick:i,shapeRendering:d},e))})});let cu=e=>!e.hidden,cc=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]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?iL(ik(e.nodeLookup,{filter:cu}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}};function cd({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:a=5,nodeStrokeWidth:i,nodeComponent:l,bgColor:s,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:p="bottom-right",onClick:h,onNodeClick:f,pannable:m=!1,zoomable:g=!1,ariaLabel:y,inversePan:v,zoomStep:x=1,offsetScale:_=5}){let S=l6(),k=(0,w.useRef)(null),{boundingRect:C,viewBB:I,rfId:M,panZoom:E,translateExtent:T,flowWidth:j,flowHeight:R,ariaLabelConfig:N}=l5(cc,lQ),A=e?.width??200,z=e?.height??150,P=Math.max(C.width/A,C.height/z),O=P*A,D=P*z,$=_*P,L=C.x-(O-C.width)/2-$,B=C.y-(D-C.height)/2-$,W=O+2*$,F=D+2*$,H=`react-flow__minimap-desc-${M}`,Z=(0,w.useRef)(0),V=(0,w.useRef)();Z.current=P,(0,w.useEffect)(()=>{if(k.current&&E)return V.current=function({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let o=ok(e);return{update:function({translateExtent:e,width:a,height:i,zoomStep:l=1,pannable:s=!0,zoomable:u=!0,inversePan:c=!1}){let d=[0,0],p=ip().on("start",e=>{("mousedown"===e.sourceEvent.type||"touchstart"===e.sourceEvent.type)&&(d=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on("zoom",s?o=>{let l=n();if("mousemove"!==o.sourceEvent.type&&"touchmove"!==o.sourceEvent.type||!t)return;let s=[o.sourceEvent.clientX??o.sourceEvent.touches[0].clientX,o.sourceEvent.clientY??o.sourceEvent.touches[0].clientY],u=[s[0]-d[0],s[1]-d[1]];d=s;let p=r()*Math.max(l[2],Math.log(l[2]))*(c?-1:1),h={x:l[0]-u[0]*p,y:l[1]-u[1]*p};t.setViewportConstrained({x:h.x,y:h.y,zoom:l[2]},[[0,0],[a,i]],e)}:null).on("zoom.wheel",u?e=>{if("wheel"!==e.sourceEvent.type||!t)return;let r=n(),o=e.sourceEvent.ctrlKey&&iX()?10:1,a=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*l,i=r[2]*Math.pow(2,a*o);t.scaleTo(i)}:null);o.call(p,{})},destroy:function(){o.on("zoom",null)},pointer:oC}}({domNode:k.current,panZoom:E,getTransform:()=>S.getState().transform,getViewScale:()=>Z.current}),()=>{V.current?.destroy()}},[E]),(0,w.useEffect)(()=>{V.current?.update({translateExtent:T,width:j,height:R,inversePan:v,pannable:m,zoomStep:x,zoomable:g})},[m,g,v,x,T,j,R]);let q=h?e=>{let[t,n]=V.current?.pointer(e)||[0,0];h(e,{x:t,y:n})}:void 0,U=f?(0,w.useCallback)((e,t)=>{f(e,S.getState().nodeLookup.get(t).internals.userNode)},[]):void 0,Y=y??N["minimap.ariaLabel"];return(0,b.jsx)(sr,{position:p,style:{...e,"--xy-minimap-background-color-props":"string"==typeof s?s:void 0,"--xy-minimap-mask-background-color-props":"string"==typeof u?u:void 0,"--xy-minimap-mask-stroke-color-props":"string"==typeof c?c:void 0,"--xy-minimap-mask-stroke-width-props":"number"==typeof d?d*P:void 0,"--xy-minimap-node-background-color-props":"string"==typeof r?r:void 0,"--xy-minimap-node-stroke-color-props":"string"==typeof n?n:void 0,"--xy-minimap-node-stroke-width-props":"number"==typeof i?i:void 0},className:rF(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,b.jsxs)("svg",{width:A,height:z,viewBox:`${L} ${B} ${W} ${F}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":H,ref:k,onClick:q,children:[Y&&(0,b.jsx)("title",{id:H,children:Y}),(0,b.jsx)(cs,{onClick:U,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:o,nodeStrokeWidth:i,nodeComponent:l}),(0,b.jsx)("path",{className:"react-flow__minimap-mask",d:`M${L-$},${B-$}h${W+2*$}v${F+2*$}h${-W-2*$}z
|
|
102
|
+
M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}cd.displayName="MiniMap",(0,w.memo)(cd);let cp={[y.Line]:"right",[y.Handle]:"bottom-right"};(0,w.memo)(function({nodeId:e,position:t,variant:n=y.Handle,className:r,style:o,children:a,color:i,minWidth:l=10,minHeight:s=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:p,autoScale:h=!0,shouldResize:f,onResizeStart:m,onResize:g,onResizeEnd:v}){let x,_=sG(),S="string"==typeof e?e:_,k=l6(),C=(0,w.useRef)(null),I=n===y.Handle,M=l5((0,w.useCallback)((x=I&&h,e=>x?`${Math.max(1/e.transform[2],1)}`:void 0),[I,h]),lQ),E=(0,w.useRef)(null),T=t??cp[n];(0,w.useEffect)(()=>{if(C.current&&S)return E.current||(E.current=function({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){let a=ok(e),i={controlDirection:lL("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};return{update:function({controlPosition:e,boundaries:l,keepAspectRatio:s,resizeDirection:u,onResizeStart:c,onResize:d,onResizeEnd:p,shouldResize:h}){let f,m,g,y,v={...lH},b={...lZ};i={boundaries:l,resizeDirection:u,keepAspectRatio:s,controlDirection:lL(e)};let x=null,w=[],_=!1,S=o$().on("start",e=>{let{nodeLookup:r,transform:o,snapGrid:a,snapToGrid:i,nodeOrigin:l,paneDomNode:s}=n();if(!(f=r.get(t)))return;x=s?.getBoundingClientRect()??null;let{xSnapped:u,ySnapped:d}=i1(e.sourceEvent,{transform:o,snapGrid:a,snapToGrid:i,containerBounds:x});for(let[e,n]of(b={...v={width:f.measured.width??0,height:f.measured.height??0,x:f.position.x??0,y:f.position.y??0},pointerX:u,pointerY:d,aspectRatio:v.width/v.height},m=void 0,g=iK(f.extent)?f.extent:void 0,f.parentId&&("parent"===f.extent||f.expandParent)&&(m=r.get(f.parentId)),m&&"parent"===f.extent&&(g=[[0,0],[m.measured.width,m.measured.height]]),w=[],y=void 0,r))if(n.parentId===t&&(w.push({id:e,position:{...n.position},extent:n.extent}),"parent"===n.extent||n.expandParent)){let e=function(e,t,n){let r=t.position.x+e.position.x,o=t.position.y+e.position.y,a=e.measured.width??0,i=e.measured.height??0,l=n[0]*a,s=n[1]*i;return[[r-l,o-s],[r+a-l,o+i-s]]}(n,f,n.origin??l);y=y?[[Math.min(e[0][0],y[0][0]),Math.min(e[0][1],y[0][1])],[Math.max(e[1][0],y[1][0]),Math.max(e[1][1],y[1][1])]]:e}c?.(e,{...v})}).on("drag",e=>{let{transform:t,snapGrid:o,snapToGrid:a,nodeOrigin:l}=n(),s=i1(e.sourceEvent,{transform:t,snapGrid:o,snapToGrid:a,containerBounds:x}),u=[];if(!f)return;let{x:c,y:p,width:S,height:k}=v,C={},I=f.origin??l,{width:M,height:E,x:T,y:j}=function(e,t,n,r,o,a,i,l){var s,u,c,d;let{affectsX:p,affectsY:h}=t,{isHorizontal:f,isVertical:m}=t,g=f&&m,{xSnapped:y,ySnapped:v}=n,{minWidth:b,maxWidth:x,minHeight:w,maxHeight:_}=r,{x:S,y:k,width:C,height:I,aspectRatio:M}=e,E=Math.floor(f?y-e.pointerX:0),T=Math.floor(m?v-e.pointerY:0),j=C+(p?-E:E),R=I+(h?-T:T),N=-a[0]*C,A=-a[1]*I,z=lF(j,b,x),P=lF(R,w,_);if(i){let e=0,t=0;p&&E<0?e=lB(S+E+N,i[0][0]):!p&&E>0&&(e=lW(S+j+N,i[1][0])),h&&T<0?t=lB(k+T+A,i[0][1]):!h&&T>0&&(t=lW(k+R+A,i[1][1])),z=Math.max(z,e),P=Math.max(P,t)}if(l){let e=0,t=0;p&&E>0?e=lW(S+E,l[0][0]):!p&&E<0&&(e=lB(S+j,l[1][0])),h&&T>0?t=lW(k+T,l[0][1]):!h&&T<0&&(t=lB(k+R,l[1][1])),z=Math.max(z,e),P=Math.max(P,t)}if(o){if(f){(z=Math.max(z,lF(j/M,w,_)*M),i)&&(z=Math.max(z,(p||h)&&(!p||h||!g)?lB(k+A+(p?E:-E)/M,i[0][1])*M:lW(k+A+j/M,i[1][1])*M));l&&(z=Math.max(z,(p||h)&&(!p||h||!g)?lW(k+(p?E:-E)/M,l[0][1])*M:lB(k+j/M,l[1][1])*M))}if(m){(P=Math.max(P,lF(R*M,b,x)/M),i)&&(P=Math.max(P,(p||h)&&(!h||p||!g)?lB(S+(h?T:-T)*M+N,i[0][0])/M:lW(S+R*M+N,i[1][0])/M));l&&(P=Math.max(P,(p||h)&&(!h||p||!g)?lW(S+(h?T:-T)*M,l[0][0])/M:lB(S+R*M,l[1][0])/M))}}T+=T<0?P:-P,E+=E<0?z:-z,o&&(g?j>R*M?T=((s=p,u=h,s?!u:u)?-E:E)/M:E=((c=p,d=h,c?!d:d)?-T:T)*M:f?(T=E/M,h=p):(E=T*M,p=h));let O=p?S+E:S,D=h?k+T:k;return{width:C+(p?-E:E),height:I+(h?-T:T),x:a[0]*E*(p?-1:1)+O,y:a[1]*T*(h?-1:1)+D}}(b,i.controlDirection,s,i.boundaries,i.keepAspectRatio,I,g,y),R=M!==S,N=E!==k,A=T!==c&&R,z=j!==p&&N;if(!A&&!z&&!R&&!N)return;if((A||z||1===I[0]||1===I[1])&&(C.x=A?T:v.x,C.y=z?j:v.y,v.x=C.x,v.y=C.y,w.length>0)){let e=T-c,t=j-p;for(let n of w)n.position={x:n.position.x-e+I[0]*(M-S),y:n.position.y-t+I[1]*(E-k)},u.push(n)}if((R||N)&&(C.width=R&&(!i.resizeDirection||"horizontal"===i.resizeDirection)?M:v.width,C.height=N&&(!i.resizeDirection||"vertical"===i.resizeDirection)?E:v.height,v.width=C.width,v.height=C.height),m&&f.expandParent){let e=I[0]*(C.width??0);C.x&&C.x<e&&(v.x=e,b.x=b.x-(C.x-e));let t=I[1]*(C.height??0);C.y&&C.y<t&&(v.y=t,b.y=b.y-(C.y-t))}let P=function({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:a}){let i=e-t,l=n-r,s=[i>0?1:i<0?-1:0,l>0?1:l<0?-1:0];return i&&o&&(s[0]=-1*s[0]),l&&a&&(s[1]=-1*s[1]),s}({width:v.width,prevWidth:S,height:v.height,prevHeight:k,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),O={...v,direction:P};!1!==h?.(e,O)&&(_=!0,d?.(e,O),r(C,u))}).on("end",e=>{_&&(p?.(e,{...v}),o?.({...v}),_=!1)});a.call(S)},destroy:function(){a.on(".drag",null)}}}({domNode:C.current,nodeId:S,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:o,domNode:a}=k.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:o,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:o,nodeOrigin:a}=k.getState(),i=[],l={x:e.x,y:e.y},s=r.get(S);if(s&&s.expandParent&&s.parentId){let t=s.origin??a,n=e.width??s.measured.width??0,u=e.height??s.measured.height??0,c=lw([{id:s.id,parentId:s.parentId,rect:{width:n,height:u,...iQ({x:e.x??s.position.x,y:e.y??s.position.y},{width:n,height:u},s.parentId,r,t)}}],r,o,a);i.push(...c),l.x=e.x?Math.max(t[0]*n,e.x):void 0,l.y=e.y?Math.max(t[1]*u,e.y):void 0}if(void 0!==l.x&&void 0!==l.y){let e={id:S,type:"position",position:{...l}};i.push(e)}if(void 0!==e.width&&void 0!==e.height){let t={id:S,type:"dimensions",resizing:!0,setAttributes:!p||("horizontal"===p?"width":"height"),dimensions:{width:e.width,height:e.height}};i.push(t)}for(let e of t){let t={...e,type:"position"};i.push(t)}n(i)},onEnd:({width:e,height:t})=>{k.getState().triggerNodeChanges([{id:S,type:"dimensions",resizing:!1,dimensions:{width:e,height:t}}])}})),E.current.update({controlPosition:T,boundaries:{minWidth:l,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:p,onResizeStart:m,onResize:g,onResizeEnd:v,shouldResize:f}),()=>{E.current?.destroy()}},[T,l,s,u,c,d,m,g,v,f]);let j=T.split("-");return(0,b.jsx)("div",{className:rF(["react-flow__resize-control","nodrag",...j,n,r]),ref:C,style:{...o,scale:M,...i&&{[I?"backgroundColor":"borderColor"]:i}},children:a})});let ch=rz((0,b.jsx)("path",{d:"M10 9h4V6h3l-5-5-5 5h3zm-1 1H6V7l-5 5 5 5v-3h3zm14 2-5-5v3h-3v4h3v3zm-9 3h-4v3H7l5 5 5-5h-3z"}),"OpenWith"),cf=rz((0,b.jsx)("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8m-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91"}),"RestartAlt");var cm=e.i(85035),cg=e.i(49813);let cy=[{id:"left",position:g.Left},{id:"right",position:g.Right},{id:"top",position:g.Top},{id:"bottom",position:g.Bottom}];function cv(e,t){let n=/^#([0-9a-f]{6})$/i.exec(e);if(!n)return e;let r=parseInt(n[1],16);return`rgba(${r>>16&255}, ${r>>8&255}, ${255&r}, ${t})`}function cb(e){let{id:t,position:n}=e;return(0,b.jsxs)(w.Fragment,{children:[(0,b.jsx)(sQ,{id:`target-${t}`,type:"target",position:n,className:cg.default.handle}),(0,b.jsx)(sQ,{id:`source-${t}`,type:"source",position:n,className:cg.default.handle})]},t)}function cx(e,t,n,r){let o=n-e,a=r-t,i=Math.hypot(o,a)||1,l=0*i,s=o/i,u=a/i;return{sourceX:e+s*l,sourceY:t+u*l,targetX:n-s*l,targetY:r-u*l}}let cw={trace:(0,w.memo)(function(e){let t,n,r,o,a,i,l,s=(0,x.c)(25),{data:u}=e,{label:c,accent:d,state:p,recencyRank:h,selected:f}=u,m=cg.default[p];s[0]!==m?(t=[cg.default.wrapper,m].filter(Boolean),s[0]=m,s[1]=t):t=s[1];let g=t.join(" ");if(s[2]!==d||s[3]!==h||s[4]!==f||s[5]!==p){if(n=[],f&&n.push("0 0 0 2px var(--mui-palette-text-primary)"),"active"===p){let e;s[7]!==d?(e=cv(d,.55),s[7]=d,s[8]=e):e=s[8],n.push(`0 0 18px ${e}`)}else if("recent"===p){let e;if(s[9]!==d||s[10]!==h){let t;t=Math.max(.06,.34-.09*h),e=`0 0 14px ${cv(d,t)}`,s[9]=d,s[10]=h,s[11]=e}else e=s[11];n.push(e)}s[2]=d,s[3]=h,s[4]=f,s[5]=p,s[6]=n}else n=s[6];let y=n.length>0?n.join(", "):"none";s[12]!==d||s[13]!==y?(r={"--accent":d,boxShadow:y},s[12]=d,s[13]=y,s[14]=r):r=s[14];let v=r;return s[15]===Symbol.for("react.memo_cache_sentinel")?(o=cy.map(cb),s[15]=o):o=s[15],s[16]!==d?(a=(0,b.jsx)("span",{className:cg.default.dot,style:{background:d}}),s[16]=d,s[17]=a):a=s[17],s[18]!==c||s[19]!==a?(i=(0,b.jsxs)("div",{className:cg.default.surface,children:[a,c]}),s[18]=c,s[19]=a,s[20]=i):i=s[20],s[21]!==v||s[22]!==i||s[23]!==g?(l=(0,b.jsxs)("div",{className:g,style:v,children:[o,i]}),s[21]=v,s[22]=i,s[23]=g,s[24]=l):l=s[24],l})},c_={trimmed:function(e){let t,n,r=(0,x.c)(10),{id:o,sourceX:a,sourceY:i,targetX:l,targetY:s,style:u,markerEnd:c}=e;r[0]!==a||r[1]!==i||r[2]!==l||r[3]!==s?(t=cx(a,i,l,s),r[0]=a,r[1]=i,r[2]=l,r[3]=s,r[4]=t):t=r[4];let d=t,p=`M ${d.sourceX},${d.sourceY} L ${d.targetX},${d.targetY}`;return r[5]!==o||r[6]!==c||r[7]!==p||r[8]!==u?(n=(0,b.jsx)(uu,{id:o,path:p,style:u,markerEnd:c}),r[5]=o,r[6]=c,r[7]=p,r[8]=u,r[9]=n):n=r[9],n},bidirectional:function(e){let t,n,r,o=(0,x.c)(13),{id:a,sourceX:i,sourceY:l,targetX:s,targetY:u,style:c,markerEnd:d}=e;o[0]!==i||o[1]!==l||o[2]!==s||o[3]!==u?(t=cx(i,l,s,u),o[0]=i,o[1]=l,o[2]=s,o[3]=u,o[4]=t):t=o[4];let p=t,h=p.targetX-p.sourceX,f=p.targetY-p.sourceY;o[5]!==h||o[6]!==f?(n=Math.hypot(h,f)||1,o[5]=h,o[6]=f,o[7]=n):n=o[7];let m=n,g=Math.min(84,Math.max(16,.18*m)),y=-f/m,v=h/m,w=(p.sourceX+p.targetX)/2+y*g,_=(p.sourceY+p.targetY)/2+v*g,S=`M ${p.sourceX},${p.sourceY} Q ${w},${_} ${p.targetX},${p.targetY}`;return o[8]!==a||o[9]!==d||o[10]!==S||o[11]!==c?(r=(0,b.jsx)(uu,{id:a,path:S,style:c,markerEnd:d}),o[8]=a,o[9]=d,o[10]=S,o[11]=c,o[12]=r):r=o[12],r}},cS={width:34,height:34,padding:5},ck={fontSize:22,maxWidth:22,maxHeight:22};function cC({nodes:e,positions:t,activeNodeId:n,selectedNodeId:r,recencyRank:o,draggable:a,livePositions:i}){return e.map((e,l)=>{let s=e.color??(0,cm.nodeColorAt)(l),u=e.id===n?"active":o.has(e.id)?"recent":"normal",c=i.get(e.id)??t.get(e.id)??{x:0,y:0};return{id:e.id,type:"trace",position:c,data:{label:e.label??e.id,accent:s,state:u,recencyRank:o.get(e.id)??0,selected:e.id===r},draggable:a,connectable:!1}})}function cI({nodes:e,edges:t,activeNodeId:n,selectedNodeId:r,recentNodeIds:o,onSelectNode:a,isPlaying:i,arrangeMode:l,onArrangeModeChange:s}){let{mode:u,systemMode:c}=(0,rW.useColorScheme)(),d=("system"===u?c:u)!=="light",p=(0,w.useMemo)(()=>(function(e,t){let n=e.map(e=>e.id),r=new Set(n),o=new Map,a=new Map;for(let e of n)o.set(e,[]),a.set(e,0);for(let e of t)r.has(e.source)&&r.has(e.target)&&(o.get(e.source).push(e.target),a.set(e.target,(a.get(e.target)??0)+1));let i=function(e,t,n){let r;if(e.length<=6)return null;let o=0;for(let a of e){let e=n.get(a)??0,i=t.get(a)??[];if(e>1||i.length>1)return null;if(0===e){if(r)return null;r=a}0===i.length&&o++}if(!r||1!==o)return null;let a=[],i=new Set,l=r;for(;l;){if(i.has(l))return null;i.add(l),a.push(l),l=t.get(l)?.[0]}return a.length===e.length?a:null}(n,o,a);if(i){let e;return e=new Map,i.forEach((t,n)=>{let r=Math.floor(n/6),o=n%6;e.set(t,{x:(r%2==0?o:5-o)*172,y:76*r})}),e}let l=new Map;for(let e of n)l.set(e,0);let s=n.filter(e=>(a.get(e)??0)===0),u=new Map(a),c=0;for(;s.length>0;){let e=s.shift();for(let t of(c++,o.get(e)))l.set(t,Math.max(l.get(t),l.get(e)+1)),u.set(t,u.get(t)-1),0===u.get(t)&&s.push(t)}if(c<n.length){for(let e of n)l.set(e,0);let e=n.filter(e=>(a.get(e)??0)===0),t=e.length>0?[...e]:n.slice(0,1),r=new Set(t);for(;t.length>0;){let e=t.shift();for(let n of o.get(e))r.has(n)||(r.add(n),l.set(n,l.get(e)+1),t.push(n))}}let d=new Map;for(let e of n){let t=l.get(e);d.has(t)||d.set(t,[]),d.get(t).push(e)}let p=76*Math.max(...[...d.values()].map(e=>e.length)),h=new Map;for(let[e,t]of d){let n=(p-76*t.length)/2;t.forEach((t,r)=>{h.set(t,{x:172*e,y:n+76*r})})}return h})(e,t),[e,t]),h=(0,w.useMemo)(()=>e.map(e=>e.id).join("|"),[e]),f=(0,w.useMemo)(()=>{let e=new Map;return o.forEach((t,n)=>e.set(t,n)),e},[o]),m=l&&!i;(0,w.useEffect)(()=>{i&&l&&s(!1)},[i,l,s]);let[g,y,x]=function(e){let[t,n]=(0,w.useState)(e),r=(0,w.useCallback)(e=>n(t=>s_(e,t)),[]);return[t,n,r]}((0,w.useMemo)(()=>cC({nodes:e,positions:p,activeNodeId:n,selectedNodeId:r,recencyRank:f,draggable:!1,livePositions:new Map}),[])),_=(0,w.useRef)(h);(0,w.useEffect)(()=>{y(t=>{let o=_.current===h;return _.current=h,cC({nodes:e,positions:p,activeNodeId:n,selectedNodeId:r,recencyRank:f,draggable:m,livePositions:o?new Map(t.map(e=>[e.id,e.position])):new Map})})},[h,e,p,n,r,f,m,y]);let S=(0,w.useCallback)(()=>{y(e=>e.map(e=>({...e,position:p.get(e.id)??e.position})))},[p,y]),k=(0,w.useMemo)(()=>{let e=new Set(o);n&&e.add(n);let r=d?"#C2C9D4":"#4A5260",a=d?"#586273":"#B4BBC6",i=new Map(g.map(e=>[e.id,e.position])),l=new Set(t.map(e=>`${e.source}->${e.target}`));return t.map(t=>{let n=e.has(t.source)&&e.has(t.target),o=l.has(`${t.target}->${t.source}`),s=function(e,t){let n,r;if(!e||!t)return{};let o=t.x-e.x,a=t.y-e.y;return Math.abs(o)>=Math.abs(a)?(n=o>=0?"right":"left",r=o>=0?"left":"right"):(n=a>=0?"bottom":"top",r=a>=0?"top":"bottom"),{sourceHandle:`source-${n}`,targetHandle:`target-${r}`}}(i.get(t.source)??p.get(t.source),i.get(t.target)??p.get(t.target));return{id:`${t.source}->${t.target}`,source:t.source,target:t.target,...s,type:o?"bidirectional":"trimmed",style:{stroke:n?r:a,strokeWidth:n?2.25:1.6,...t.conditional?{strokeDasharray:"6 4"}:null}}})},[t,o,n,d,g,p]),C=i?"Arrange unavailable during playback":m?"Done arranging":"Arrange nodes";return(0,b.jsx)("div",{style:{width:"100%",height:"100%",minHeight:0},children:(0,b.jsxs)(uJ,{nodes:g,edges:k,nodeTypes:cw,edgeTypes:c_,onNodesChange:x,onNodeClick:(e,t)=>a(t.id),fitView:!0,fitViewOptions:{padding:.1},proOptions:{hideAttribution:!1},nodesDraggable:m,nodesConnectable:!1,elementsSelectable:!0,minZoom:.3,maxZoom:1.75,colorMode:d?"dark":"light",children:[(0,b.jsx)(u6,{variant:v.Dots,gap:20,size:1,color:d?"#23272e":"#d8dce2"}),(0,b.jsx)(cr,{showInteractive:!1}),(0,b.jsxs)(sr,{position:"top-right",className:"react-flow__controls","aria-label":"Graph layout controls",children:[(0,b.jsx)(ce,{onClick:()=>s(!l),disabled:i,title:C,"aria-label":C,"aria-pressed":m,style:{...cS,...m?{color:"var(--mui-palette-primary-main)"}:{}},children:(0,b.jsx)(ch,{style:ck})}),m&&(0,b.jsx)(ce,{onClick:S,title:"Reset layout","aria-label":"Reset layout",style:cS,children:(0,b.jsx)(cf,{style:ck})})]})]},h)})}var eb=eb;let cM=function(e,t=166){let n;function r(...o){let a=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(a,t)}return r.clear=()=>{clearTimeout(n)},r};function cE(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}let cT=eP.default,cj={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll",pointerEvents:"none"},cR=rz((0,b.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),cN=rz((0,b.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function cA(e){return R("MuiTabScrollButton",e)}let cz=N("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),cP=X(e3,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${cz.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),cO=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiTabScrollButton"}),{className:r,slots:o={},slotProps:a={},direction:i,orientation:l,disabled:s,...u}=n,{nativeButton:c,...d}=u,p=(0,nx.useRtl)(),h={isRtl:p,...n},f=(e=>{let{classes:t,orientation:n,disabled:r}=e;return O({root:["root",n,r&&"disabled"]},cA,t)})(h),m=o.StartScrollButtonIcon??cR,g=o.EndScrollButtonIcon??cN,y=rh({elementType:m,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h}),v=rh({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:h});return(0,b.jsx)(cP,{component:"div",className:(0,_.default)(f.root,r),ref:t,role:null,ownerState:h,tabIndex:null,...d,style:{...d.style,..."vertical"===l&&{"--TabScrollButton-svgRotate":`rotate(${p?-90:90}deg)`}},children:"left"===i?(0,b.jsx)(m,{...y}):(0,b.jsx)(g,{...v})})});function cD(e){return R("MuiTabs",e)}let c$=N("MuiTabs",["root","vertical","list","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),cL=w.createContext(void 0);function cB(){let e=w.useContext(cL);if(void 0===e)throw Error("MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.");return e}let cW=Object.is,cF=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"];function cH(e,t,n,r){var o,a,i;let l;return null!=e?(o=e,a=t,i=n,-1===(l=cY(a,o))?cq(a,i):i(a[l])?a[l].id:cV(a,l,"next",!1,i)?.id??null):function(e,t,n){let r=n?.(e);if(null!=r){let n=cU(e,r);if(n&&t(n))return n.id}return cq(e,t)}(t,n,r)}function cZ(e,t,n){if(t){let n=cX(e,t);if(-1!==n)return n}return cY(e,n)}function cV(e,t,n,r,o){let a=e.length-1;if(-1===a)return null;let i=!1,l=cJ(t,a,n,r),s=l;for(;-1!==l;){if(l===s){if(i)return null;i=!0}let t=e[l];if(t&&o(t))return t;l=cJ(l,a,n,r)}return null}function cq(e,t){return e.find(e=>t(e))?.id??null}function cU(e,t){return null==t?null:e.find(e=>e.id===t)??null}function cY(e,t){return null==t?-1:e.findIndex(e=>e.id===t)}function cX(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function cK(e){let t=Array.from(e.values());return t.every(e=>null==e.element)?t:[...t.filter(c0).sort((e,t)=>(function(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0})(e.element,t.element)),...t.filter(e=>!c0(e))]}function cG(e){return cK(e).filter(c0)}function cJ(e,t,n,r=!0){return"next"===n?e===t?r?0:-1:e+1:0===e?r?t:-1:e-1}function cQ(e){return!!e.element&&(!!e.focusableWhenDisabled||!e.disabled&&!e.element.hasAttribute("disabled")&&"true"!==e.element.getAttribute("aria-disabled")&&e.element.hasAttribute("tabindex"))}function c0(e){return null!=e.element&&e.element.isConnected}let c1=X("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${c$.scrollButtons}`]:t.scrollButtons},{[`& .${c$.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(eA(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${c$.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),c2=X("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),c5=X("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),c6=X("span",{name:"MuiTabs",slot:"Indicator"})(eA(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),c4=X(function(e){let{onChange:t,...n}=e,r=w.useRef(),o=w.useRef(null),a=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return cT(()=>{let e=cM(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=tD(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),w.useEffect(()=>{a(),t(r.current)},[t]),(0,b.jsx)("div",{style:cj,...n,ref:o})})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),c3={},c9=w.forwardRef(function(e,t){let n,r,o=(0,K.useDefaultProps)({props:e,name:"MuiTabs"}),a=(0,eb.default)(),i=(0,nx.useRtl)(),{"aria-label":l,"aria-labelledby":s,action:u,centered:c=!1,children:d,className:p,component:h="div",allowScrollButtonsMobile:f=!1,indicatorColor:m="primary",onChange:g,orientation:y="horizontal",scrollButtons:v="auto",selectionFollowsFocus:x,slots:S={},slotProps:k={},textColor:C="primary",value:I,variant:M="standard",visibleScrollbar:E=!1,...T}=o,j="scrollable"===M,R="vertical"===y,N=R?"scrollTop":"scrollLeft",A=R?"top":"left",z=R?"bottom":"right",P=R?"clientHeight":"clientWidth",D=R?"height":"width",$={...o,component:h,allowScrollButtonsMobile:f,indicatorColor:m,orientation:y,vertical:R,scrollButtons:v,textColor:C,variant:M,visibleScrollbar:E,fixed:!j,hideScrollbar:j&&!E,scrollableX:j&&!R,scrollableY:j&&R,centered:c&&!j,scrollButtonsHideMobile:!f},L=(e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:a,centered:i,scrollButtonsHideMobile:l,classes:s}=e;return O({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",a&&"scrollableY"],list:["list",t&&"vertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},cD,s)})($),B=rh({elementType:S.startScrollButtonIcon,externalSlotProps:k.startScrollButtonIcon,ownerState:$}),W=rh({elementType:S.endScrollButtonIcon,externalSlotProps:k.endScrollButtonIcon,ownerState:$}),[F,H]=w.useState(!1),[Z,V]=w.useState(c3),[q,U]=w.useState(!1),[Y,X]=w.useState(!1),[J,Q]=w.useState(!1),[ee,et]=w.useState(!1),[en,er]=w.useState({overflow:"hidden",scrollbarWidth:0}),eo=new Map,ei=w.useRef(null),el=w.useRef(null),es={slots:S,slotProps:k},eu=()=>{let e,t,n=ei.current;if(n){let t=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollWidth:n.scrollWidth,top:t.top,bottom:t.bottom,left:t.left,right:t.right}}if(n&&!1!==I){let e=el.current.children;if(e.length>0){let n=e[eo.get(I)];t=n?n.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},ec=eO(()=>{let e,{tabsMeta:t,tabMeta:n}=eu(),r=0;R?(e="top",n&&t&&(r=n.top-t.top+t.scrollTop)):(e=i?"right":"left",n&&t&&(r=(i?-1:1)*(n[e]-t[e]+t.scrollLeft)));let o={[e]:r,[D]:n?n[D]:0};if("number"!=typeof Z[e]||"number"!=typeof Z[D])V(o);else{let t=Math.abs(Z[e]-o[e]),n=Math.abs(Z[D]-o[D]);(t>=1||n>=1)&&V(o)}}),ed=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},o=()=>{}){let{ease:a=cE,duration:i=300}=r,l=null,s=t[e],u=!1,c=r=>{if(u)return void o(Error("Animation cancelled"));null===l&&(l=r);let d=Math.min(1,(r-l)/i);(t[e]=a(d)*(n-s)+s,d>=1)?requestAnimationFrame(()=>{o(null)}):requestAnimationFrame(c)};s===n?o(Error("Element already at target position")):requestAnimationFrame(c)}(N,ei.current,e,{duration:a.transitions.duration.standard}):ei.current[N]=e},ep=e=>{let t=ei.current[N];R?t+=e:t+=e*(i?-1:1),ed(t)},eh=()=>{let e=ei.current[P],t=0,n=Array.from(el.current.children);for(let r=0;r<n.length;r+=1){let o=n[r];if(t+o[P]>e){0===r&&(t=e);break}t+=o[P]}return t},[ef,{onChange:em,...eg}]=ea("scrollbar",{className:(0,_.default)(L.scrollableX,L.hideScrollbar),elementType:c4,shouldForwardComponentProp:!0,externalForwardedProps:es,ownerState:$}),ey=w.useCallback(e=>{em?.(e),er({overflow:null,scrollbarWidth:e})},[em]),[ev,ex]=ea("scrollButtons",{className:L.scrollButtons,elementType:cO,externalForwardedProps:es,ownerState:$,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:S.startScrollButtonIcon,EndScrollButtonIcon:S.endScrollButtonIcon},slotProps:{startScrollButtonIcon:B,endScrollButtonIcon:W}}}),ew=eO(e=>{let{tabsMeta:t,tabMeta:n}=eu();n&&t&&(n[A]<t[A]?ed(t[N]+(n[A]-t[A]),{animation:e}):n[z]>t[z]&&ed(t[N]+(n[z]-t[z]),{animation:e}))}),e_=eO(()=>{j&&!1!==v&&Q(!J)});w.useEffect(()=>{let e,t,n=cM(()=>{ei.current&&ec()}),r=tD(ei.current);return r.addEventListener("resize",n),"u">typeof ResizeObserver&&(e=new ResizeObserver(n),Array.from(el.current.children).forEach(t=>{e.observe(t)})),"u">typeof MutationObserver&&(t=new MutationObserver(t=>{t.forEach(t=>{t.removedNodes.forEach(t=>{e?.unobserve(t)}),t.addedNodes.forEach(t=>{e?.observe(t)})}),n(),e_()})).observe(el.current,{childList:!0}),()=>{n.clear(),r.removeEventListener("resize",n),t?.disconnect(),e?.disconnect()}},[ec,e_]),w.useEffect(()=>{let e=Array.from(el.current.children),t=e.length;if("u">typeof IntersectionObserver&&t>0&&j&&!1!==v){let n=e[0],r=e[t-1],o={root:ei.current,threshold:.99},a=new IntersectionObserver(e=>{U(!e[0].isIntersecting)},o);a.observe(n);let i=new IntersectionObserver(e=>{X(!e[0].isIntersecting)},o);return i.observe(r),()=>{a.disconnect(),i.disconnect()}}},[j,v,J,d?.length]),w.useEffect(()=>{H(!0)},[]),w.useEffect(()=>{ec()}),w.useEffect(()=>{ew(c3!==Z)},[ew,Z]),w.useImperativeHandle(u,()=>({updateIndicator:ec,updateScrollButtons:e_}),[ec,e_]);let[eS,ek]=ea("indicator",{className:L.indicator,elementType:c6,externalForwardedProps:es,ownerState:$,additionalProps:{style:Z}}),eC=(0,b.jsx)(eS,{...ek}),eI=function(e){let{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:o=!1,isItemFocusable:a=cQ,wrap:i=!0}=e,[l,s]=w.useState(t),u=w.useRef(t),c=l;t!==u.current&&(u.current=t,void 0!==t&&t!==l&&(c=t,s(t)));let d=w.useRef(null),p=w.useRef(new Map),[h,f]=w.useState(0),m=cH(c,w.useMemo(()=>cK(p.current),[h]),a,n),g=w.useRef(m);g.current=m;let y=w.useCallback(()=>{let e=cK(p.current),t=cH(g.current,e,a,n);return cU(e,t)},[n,a]),v=w.useCallback(()=>p.current,[]),b=eO(e=>{!function(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!cW(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}(p.current.get(e.id)??null,e)&&(p.current.set(e.id,e),f(e=>e+1))}),x=eO(e=>{p.current.delete(e)&&f(e=>e+1)}),_=eO(e=>{s(e)}),S=w.useCallback(e=>g.current===e,[]),k=w.useCallback((e,t,n,r)=>{let o=cV(cG(p.current),e,t,n,r??a);return o?(o.element?.focus(),s(o.id),o):null},[a]),C=w.useCallback(e=>({onFocus:e=>{let t=cG(p.current),n=cX(t,e.target);-1!==n&&s(t[n].id)},onKeyDown:e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||!cF.includes(e.key))return;let t="horizontal"===r?"ArrowLeft":"ArrowUp",n="horizontal"===r?"ArrowRight":"ArrowDown";"horizontal"===r&&o&&(t="ArrowRight",n="ArrowLeft");let a=cG(p.current),l=tT(tM(d.current)),s=l===d.current,u=cZ(a,l,g.current),c="next";switch(e.key){case t:c="previous",e.preventDefault(),s&&(u=a.length);break;case n:e.preventDefault(),s&&(u=-1);break;case"Home":e.preventDefault(),u=-1;break;case"End":e.preventDefault(),c="previous",u=a.length;break;default:return}k(u,c,i)},ref:function(...e){return t=>{e.forEach(e=>{tz(e??null,t)})}}(e,e=>{d.current=e})}),[k,o,r,i]),I=w.useCallback(e=>{let t=cG(p.current),n=tT(tM(d.current)),r=n===d.current?-1:cZ(t,n,g.current);return k(r,"next",!0,e)?.id??null},[k]);return w.useMemo(()=>({activeItemId:m,focusNext:I,getActiveItem:y,getContainerProps:C,getItemMap:v,isItemActive:S,registerItem:b,setActiveItemId:_,unregisterItem:x}),[m,I,y,C,v,S,b,_,x])}({activeItemId:ee?void 0:!1===I?null:I,orientation:y,isRtl:i}),eM=eI.getContainerProps(),eE=w.Children.toArray(d).filter(w.isValidElement).map((e,t)=>{let n=void 0===e.props.value?t:e.props.value;return eo.set(n,t),{child:e,index:t,childValue:n}}).map(({child:e,childValue:t})=>{let n=t===I;return w.cloneElement(e,{fullWidth:"fullWidth"===M,indicator:n&&!F&&eC,selected:n,selectionFollowsFocus:x,onChange:g,textColor:C,value:t})}),eT=((n={}).scrollbarSizeListener=j?(0,b.jsx)(ef,{...eg,onChange:ey}):null,n.scrollButtonStart=(r=j&&("auto"===v&&(q||Y)||!0===v))?(0,b.jsx)(ev,{direction:i?"right":"left",onClick:()=>{ep(-1*eh())},disabled:!q,...ex}):null,n.scrollButtonEnd=r?(0,b.jsx)(ev,{direction:i?"left":"right",onClick:()=>{ep(eh())},disabled:!Y,...ex}):null,n),[ej,eR]=ea("root",{ref:t,className:(0,_.default)(L.root,p),elementType:c1,externalForwardedProps:{...es,...T,component:h},ownerState:$}),[eN,eA]=ea("scroller",{ref:ei,className:L.scroller,elementType:c2,externalForwardedProps:es,ownerState:$,additionalProps:{style:{overflow:en.overflow,[R?`margin${i?"Left":"Right"}`:"marginBottom"]:E?void 0:-en.scrollbarWidth}}}),[ez,eP]=ea("list",{ref:G(eM.ref,el),className:L.list,elementType:c5,externalForwardedProps:es,ownerState:$,getSlotProps:e=>({...e,onBlur:t=>{tE(t.currentTarget,t.relatedTarget)||et(!1),e.onBlur?.(t)},onKeyDown:t=>{let n;n=tT(tM(el.current)),"tab"===n?.getAttribute("role")&&eM.onKeyDown(t),e.onKeyDown?.(t)},onFocus:t=>{et(!0),eM.onFocus(t),e.onFocus?.(t)}})});return(0,b.jsxs)(ej,{...eR,children:[eT.scrollButtonStart,eT.scrollbarSizeListener,(0,b.jsxs)(eN,{...eA,children:[(0,b.jsx)(ez,{"aria-label":l,"aria-labelledby":s,"aria-orientation":"vertical"===y?"vertical":null,role:"tablist",...eP,children:(0,b.jsx)(cL.Provider,{value:eI,children:eE})}),F&&eC]}),eT.scrollButtonEnd]})});function c8(e){return R("MuiTab",e)}let c7=N("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","icon"]),de=X(e3,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${e8(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${c7.icon}`]:t.icon}]}})(eA(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${c7.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${c7.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${c7.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${c7.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${c7.selected}`]:{opacity:1},[`&.${c7.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${c7.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${c7.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${c7.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${c7.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),dt=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiTab"}),{className:r,disabled:o=!1,disableFocusRipple:a=!1,fullWidth:i,icon:l,iconPosition:s="top",indicator:u,label:c,onChange:d,onClick:p,onFocus:h,selected:f,selectionFollowsFocus:m,textColor:g="inherit",value:y,wrapped:v=!1,...x}=n,S=cB(),k=function(e){let{activeItemId:t,registerItem:n,unregisterItem:r}=cB(),o=w.useRef(null),a=w.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),i=w.useRef(a);i.current=a;let l=w.useCallback(t=>{(o.current=t,null==t)?queueMicrotask(()=>{null==o.current&&r(e.id)}):n({...i.current,element:t})},[e.id,n,r]),s=G(e.ref,l);return(0,eP.default)(()=>{o.current&&n({...a,element:o.current})},[a,n]),(0,eP.default)(()=>{let t=e.id;return()=>{r(t)}},[e.id,r]),{ref:s,tabIndex:t===e.id?0:-1}}({id:y,ref:t,disabled:o,selected:f}),C=0===S.getItemMap().size&&f?0:k.tabIndex,I={...n,disabled:o,disableFocusRipple:a,selected:f,icon:!!l,iconPosition:s,label:!!c,fullWidth:i,textColor:g,wrapped:v},M=(e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:a,label:i,selected:l,disabled:s}=e;return O({root:["root",a&&i&&"labelIcon",`textColor${e8(n)}`,r&&"fullWidth",o&&"wrapped",l&&"selected",s&&"disabled"],icon:["icon"]},c8,t)})(I),E=l&&c&&w.isValidElement(l)?w.cloneElement(l,{className:(0,_.default)(M.icon,l.props.className)}):l;return(0,b.jsxs)(de,{internalNativeButton:!0,focusRipple:!a,className:(0,_.default)(M.root,r),ref:k.ref,role:"tab","aria-selected":f,disabled:o,onClick:e=>{!f&&d&&d(e,y),p&&p(e)},onFocus:e=>{m&&!f&&d&&d(e,y),h&&h(e)},tabIndex:C,ownerState:I,...x,children:["top"===s||"start"===s?(0,b.jsxs)(w.Fragment,{children:[E,c]}):(0,b.jsxs)(w.Fragment,{children:[c,E]}),u]})}),dn=rz([(0,b.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,b.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function dr(e){if(e<1e3)return`+${Math.round(e)}ms`;let t=e/1e3;if(t<60)return`+${t.toFixed(t<10?2:1)}s`;let n=Math.round(t);return`+${Math.floor(n/60)}m${n%60}s`}function da(e){let t,n,r,o,a,i,l,s,u,c,d,p,h,f,m,g,y,v,_,S,k,C,I,M,E,T=(0,x.c)(47),{selectedNodeId:j,selectedNodeLabel:R,payloads:N}=e,[A,z]=(0,w.useState)(0),O=`${j}:${N.length}`,[D,$]=(0,w.useState)(O);if(O!==D&&($(O),z(0)),!j){let e;return T[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,b.jsx)(dl,{children:"Select a node to inspect its payloads."}),T[0]=e):e=T[0],e}if(0===N.length){let e;return T[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,b.jsx)(dl,{children:"No payloads logged for this node."}),T[1]=e):e=T[1],e}let L=N[Math.min(A,N.length-1)];T[2]===Symbol.for("react.memo_cache_sentinel")?(t={height:"100%",display:"flex",flexDirection:"column"},T[2]=t):t=T[2],T[3]===Symbol.for("react.memo_cache_sentinel")?(n={px:2,pt:1.5},T[3]=n):n=T[3],T[4]===Symbol.for("react.memo_cache_sentinel")?(r={display:"block",overflowWrap:"anywhere",lineHeight:1.4},T[4]=r):r=T[4];let B=R??j;T[5]!==B?(o=(0,b.jsx)(P,{sx:n,children:(0,b.jsx)(ns,{variant:"overline",color:"text.secondary",sx:r,children:B})}),T[5]=B,T[6]=o):o=T[6];let W=Math.min(A,N.length-1);if(T[7]===Symbol.for("react.memo_cache_sentinel")?(a=(e,t)=>z(t),T[7]=a):a=T[7],T[8]===Symbol.for("react.memo_cache_sentinel")?(i={minHeight:40,borderBottom:1,borderColor:"divider"},T[8]=i):i=T[8],T[9]!==N?(l=N.map(di),T[9]=N,T[10]=l):l=T[10],T[11]!==W||T[12]!==l?(s=(0,b.jsx)(c9,{value:W,onChange:a,variant:"scrollable",scrollButtons:"auto",sx:i,children:l}),T[11]=W,T[12]=l,T[13]=s):s=T[13],T[14]===Symbol.for("react.memo_cache_sentinel")?(u={flex:1,minHeight:0,display:"flex",flexDirection:"column"},T[14]=u):u=T[14],T[15]===Symbol.for("react.memo_cache_sentinel")?(c={flexShrink:0,display:"flex",alignItems:"center",gap:.75,px:2,py:.75,borderBottom:1,borderColor:"divider",color:"text.secondary"},T[15]=c):c=T[15],T[16]===Symbol.for("react.memo_cache_sentinel")?(d=(0,b.jsx)(dn,{sx:{fontSize:14,opacity:.7}}),T[16]=d):d=T[16],T[17]===Symbol.for("react.memo_cache_sentinel")?(p={display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25,fontVariantNumeric:"tabular-nums",letterSpacing:.2},T[17]=p):p=T[17],T[18]!==L.timestamp?(h=function(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"—";let n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0"),a=String(t.getMilliseconds()).padStart(3,"0");return`${n}:${r}:${o}.${a}`}(L.timestamp),T[18]=L.timestamp,T[19]=h):h=T[19],T[20]!==h?(f=(0,b.jsx)("span",{children:h}),T[20]=h,T[21]=f):f=T[21],T[22]!==L.deltaMs?(m=void 0!==L.deltaMs?dr(L.deltaMs):"—",T[22]=L.deltaMs,T[23]=m):m=T[23],T[24]!==m?(g=(0,b.jsxs)(P,{component:"span",title:"Time since previous step",children:["Δ ",m]}),T[24]=m,T[25]=g):g=T[25],T[26]===Symbol.for("react.memo_cache_sentinel")?(y={color:"primary.main"},T[26]=y):y=T[26],T[27]!==L.elapsedMs?(v=void 0!==L.elapsedMs?dr(L.elapsedMs):"—",T[27]=L.elapsedMs,T[28]=v):v=T[28],T[29]!==v?(_=(0,b.jsxs)(P,{component:"span",title:"Elapsed since message start",sx:y,children:["Σ ",v]}),T[29]=v,T[30]=_):_=T[30],T[31]!==f||T[32]!==g||T[33]!==_?(S=(0,b.jsxs)(P,{sx:c,children:[d,(0,b.jsxs)(ns,{variant:"caption",component:"div",sx:p,children:[f,g,_]})]}),T[31]=f,T[32]=g,T[33]=_,T[34]=S):S=T[34],T[35]===Symbol.for("react.memo_cache_sentinel")?(k={m:0,p:2,flex:1,overflow:"auto",fontFamily:"var(--font-geist-mono), monospace",fontSize:12.5,lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word",color:"text.primary"},T[35]=k):k=T[35],T[36]!==L.value){var F;C="string"==typeof(F=L.value)?F:JSON.stringify(F,null,2),T[36]=L.value,T[37]=C}else C=T[37];return T[38]!==C?(I=(0,b.jsx)(P,{component:"pre",sx:k,children:C}),T[38]=C,T[39]=I):I=T[39],T[40]!==S||T[41]!==I?(M=(0,b.jsxs)(P,{sx:u,children:[S,I]}),T[40]=S,T[41]=I,T[42]=M):M=T[42],T[43]!==s||T[44]!==M||T[45]!==o?(E=(0,b.jsxs)(P,{sx:t,children:[o,s,M]}),T[43]=s,T[44]=M,T[45]=o,T[46]=E):E=T[46],E}function di(e){return(0,b.jsx)(dt,{label:e.displayLabel,sx:{minHeight:40,textTransform:"none"}},e.displayLabel)}function dl(e){let t,n,r=(0,x.c)(3),{children:o}=e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={height:"100%",display:"flex",alignItems:"center",justifyContent:"center",p:3,textAlign:"center"},r[0]=t):t=r[0],r[1]!==o?(n=(0,b.jsx)(P,{sx:t,children:(0,b.jsx)(ns,{variant:"body2",color:"text.secondary",children:o})}),r[1]=o,r[2]=n):n=r[2],n}let ds=rz((0,b.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function du(e){return R("MuiChip",e)}let dc=N("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","deletable","outlined","filled","avatar","icon","label","deleteIcon","focusVisible"]),dd=X("div",{name:"MuiChip",slot:"Root",shouldForwardProp:e=>Y(e)&&"focusableWhenDisabled"!==e&&"skipFocusWhenDisabled"!==e,overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,clickable:o,onDelete:a,size:i,variant:l}=n;return[{[`& .${dc.avatar}`]:t.avatar},{[`& .${dc.icon}`]:t.icon},{[`& .${dc.deleteIcon}`]:t.deleteIcon},t.root,t[`size${e8(i)}`],t[`color${e8(r)}`],o&&t.clickable,a&&t.deletable,t[l]]}})(eA(({theme:e})=>{let t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${dc.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${dc.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${dc.icon}`]:{marginLeft:5,marginRight:-6},[`& .${dc.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{color:"primary"},style:{[`& .${dc.avatar}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark}}},{props:{color:"secondary"},style:{[`& .${dc.avatar}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark}}},{props:{size:"small"},style:{height:24,[`& .${dc.avatar}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${dc.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${dc.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(e7(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${dc.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${dc.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${dc.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${dc.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(e7(["dark"])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${dc.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${dc.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(e7(["dark"])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${dc.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${dc.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${dc.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${dc.avatar}`]:{marginLeft:4},[`& .${dc.icon}`]:{marginLeft:4},[`& .${dc.deleteIcon}`]:{marginRight:5}}},{props:{size:"small",variant:"outlined"},style:{[`& .${dc.avatar}`]:{marginLeft:2},[`& .${dc.icon}`]:{marginLeft:2},[`& .${dc.deleteIcon}`]:{marginRight:3}}},...Object.entries(e.palette).filter(e7()).map(([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.7)}`,[`&.${dc.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${dc.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.focusOpacity)},[`& .${dc.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),dp=X("span",{name:"MuiChip",slot:"Label"})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function dh(e){return"Backspace"===e.key||"Delete"===e.key}let df=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiChip"}),{avatar:r,className:o,clickable:a,color:i="default",component:l,deleteIcon:s,disabled:u=!1,icon:c,label:d,onClick:p,onDelete:h,onKeyDown:f,onKeyUp:m,size:g="medium",variant:y="filled",tabIndex:v,skipFocusWhenDisabled:x=!1,slots:S={},slotProps:k={},...C}=n,{nativeButton:I,...M}=C,E=G(w.useRef(null),t),T=e=>{e.stopPropagation(),h(e)},j=!1!==a&&!!p||a,R=j||h?e3:l||"div",N={...n,component:R,disabled:u,size:g,color:i,iconColor:w.isValidElement(c)&&c.props.color||i,onDelete:!!h,clickable:j,variant:y},A=(e=>{let{classes:t,disabled:n,size:r,color:o,onDelete:a,clickable:i,variant:l}=e;return O({root:["root",l,n&&"disabled",`size${e8(r)}`,`color${e8(o)}`,i&&"clickable",a&&"deletable"],label:["label"],avatar:["avatar"],icon:["icon"],deleteIcon:["deleteIcon"]},du,t)})(N),z=R===e3?{component:l||"div",internalNativeButton:!1,focusVisibleClassName:A.focusVisible,...h&&{disableRipple:!0},...void 0!==I&&{nativeButton:I}}:{},P=null;h&&(P=s&&w.isValidElement(s)?w.cloneElement(s,{className:(0,_.default)(s.props.className,A.deleteIcon),onClick:T}):(0,b.jsx)(ds,{className:A.deleteIcon,onClick:T}));let D=null;r&&w.isValidElement(r)&&(D=w.cloneElement(r,{className:(0,_.default)(A.avatar,r.props.className)}));let $=null;c&&w.isValidElement(c)&&($=w.cloneElement(c,{className:(0,_.default)(A.icon,c.props.className)}));let L={slots:S,slotProps:k},[B,W]=ea("root",{elementType:dd,externalForwardedProps:{...L,...M},ownerState:N,shouldForwardComponentProp:!0,ref:E,className:(0,_.default)(A.root,o),additionalProps:{disabled:!!j&&!!u||void 0,tabIndex:x&&u?-1:v,...z},getSlotProps:e=>({...e,onClick:t=>{e.onClick?.(t),p?.(t)},onKeyDown:t=>{e.onKeyDown?.(t),t.currentTarget===t.target&&dh(t)&&t.preventDefault(),f&&f(t)},onKeyUp:t=>{e.onKeyUp?.(t),t.currentTarget===t.target&&h&&dh(t)&&h(t),m&&m(t)}})}),[F,H]=ea("label",{elementType:dp,externalForwardedProps:L,ownerState:N,className:A.label});return(0,b.jsxs)(B,{as:R,...W,children:[D||$,(0,b.jsx)(F,{...H,children:d}),P]})});function dm(e){return e?e.steps.map((e,t)=>{let n;return{step:e,index:t,key:Number.isNaN(n=Date.parse(e.timestamp))?1/0:n}}).sort((e,t)=>e.key-t.key||e.index-t.index).map(e=>e.step):[]}let dg=["input","msg","message","query","question"];function dy(e,t){if(t<=0||t>=e.length)return;let n=Date.parse(e[t-1].timestamp),r=Date.parse(e[t].timestamp);if(!(Number.isNaN(n)||Number.isNaN(r)))return r-n}function dv(e,t){if(0===e.length||t<0||t>=e.length)return;let n=Date.parse(e[0].timestamp),r=Date.parse(e[t].timestamp);if(!(Number.isNaN(n)||Number.isNaN(r)))return r-n}function db(e,t){return e.length>t?`${e.slice(0,t)}…`:e}function dx(e){let t,n,r,o=(0,x.c)(10),{messages:a,selectedMessageId:i,onSelectMessage:l}=e;if(o[0]===Symbol.for("react.memo_cache_sentinel")?(t={display:"flex",gap:{xs:.75,sm:1},px:{xs:1,sm:2},py:{xs:.5,sm:1},overflowX:"auto",WebkitOverflowScrolling:"touch",borderBottom:1,borderColor:"divider"},o[0]=t):t=o[0],o[1]!==a||o[2]!==l||o[3]!==i){let e;o[5]!==l||o[6]!==i?(e=(e,t)=>{let n,r,o=e.id===i,a=e.label?.trim();if(a)r=a,n=db(a,24);else{let o=db(r=function(e){let t,n=dm(e)[0];if(!n||0===n.payloads.length)return"";for(let e of dg)if(t=n.payloads.find(t=>t.label.trim().toLowerCase()===e))break;return t||(t=n.payloads[0]),("string"==typeof t.value?t.value:JSON.stringify(t.value)).replace(/\s+/g," ").trim()}(e),24);n=(0,b.jsxs)(b.Fragment,{children:[`Message ${t+1}`,o&&(0,b.jsxs)(P,{component:"span",sx:{opacity:.65,ml:.5},children:[": ",o]})]})}let s=(0,b.jsx)(df,{label:n,onClick:()=>l(e.id),variant:o?"filled":"outlined",color:o?"primary":"default",size:"small",sx:{maxWidth:{xs:240,sm:320}}});return(0,b.jsx)(rj,{title:r.length>24?r:"",placement:"top",disableInteractive:!0,children:(0,b.jsx)(P,{component:"span",sx:{display:"inline-flex",flexShrink:0},children:s})},e.id)},o[5]=l,o[6]=i,o[7]=e):e=o[7],n=a.map(e),o[1]=a,o[2]=l,o[3]=i,o[4]=n}else n=o[4];return o[8]!==n?(r=(0,b.jsx)(P,{sx:t,children:n}),o[8]=n,o[9]=r):r=o[9],r}let dw={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var d_=e.i(18168);let dS=[],dk={};function dC(e,t,n,r,o){return 1===n?Math.min(e+t,o):Math.max(e-t,r)}function dI(e,t){return e-t}function dM(e,t,n=-1){let{index:r}=e.reduce((e,n,r)=>{let o=Math.abs(t-n);return null==e||o<=e.distance?{distance:o,index:r}:e},null)??dk;return null==r?r:n>=0&&e[n]===e[r]?n:r}function dE(e,t){if(null!=t.current&&e.changedTouches){for(let n=0;n<e.changedTouches.length;n+=1){let r=e.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function dT(e,t,n){let r=e.slice();return r[n]=t,r.sort(dI)}function dj(e,t,n,r){let o=tT(tM(e.current));if(!tE(e.current,o)||Number(o?.getAttribute("data-index"))!==t){let n=e.current?.querySelector(`[type="range"][data-index="${t}"]`);null!=n&&(null==r?n.focus({preventScroll:!0}):n.focus({preventScroll:!0,focusVisible:r}))}n&&n(t)}function dR(e,t){return"number"==typeof e&&"number"==typeof t?e===t:"object"==typeof e&&"object"==typeof t&&function(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}(e,t)}let dN={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},dA=e=>e;function dz(e){return R("MuiSlider",e)}let dP=N("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","track","trackInverted","trackFalse","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);function dO(e){return e}let dD=X("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${e8(n.color)}`],"medium"!==n.size&&t[`size${e8(n.size)}`],n.marked&&t.marked,"vertical"===n.orientation&&t.vertical,"inverted"===n.track&&t.trackInverted,!1===n.track&&t.trackFalse]}})(eA(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${dP.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${dP.dragging}`]:{[`& .${dP.thumb}, & .${dP.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(e7()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),d$=X("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,"@media (forced-colors: active)":{border:"1px solid transparent",boxSizing:"border-box"},variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),dL=X("span",{name:"MuiSlider",slot:"Track"})(eA(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{"@media (forced-colors: none)":{border:"none"}}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(e7()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),dB=X("span",{name:"MuiSlider",slot:"Thumb"})(eA(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{border:"1px solid ButtonBorder"},"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${dP.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(e7()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${dP.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${dP.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),dW=X(function(e){let{children:t,className:n,value:r}=e,o=(e=>{let{open:t}=e;return{offset:(0,_.default)(t&&dP.valueLabelOpen),circle:dP.valueLabelCircle,label:dP.valueLabelLabel}})(e);return t?w.cloneElement(t,{className:t.props.className},(0,b.jsxs)(w.Fragment,{children:[t.props.children,(0,b.jsx)("span",{className:(0,_.default)(o.offset,n),"aria-hidden":!0,children:(0,b.jsx)("span",{className:o.circle,children:(0,b.jsx)("span",{className:o.label,children:r})})})]})):null},{name:"MuiSlider",slot:"ValueLabel"})(eA(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${dP.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${dP.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),dF=X("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>U(e)&&"markActive"!==e,overridesResolver:(e,t)=>{let{markActive:n}=e;return[t.mark,n&&t.markActive]}})(eA(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),dH=X("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>U(e)&&"markLabelActive"!==e})(eA(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),dZ=({children:e})=>e,dV=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiSlider"}),r=(0,nx.useRtl)(),{"aria-label":o,"aria-valuetext":a,"aria-labelledby":i,color:l="primary",classes:s,className:u,disableSwap:c=!1,disabled:d=!1,getAriaLabel:p,getAriaValueText:h,marks:f=!1,max:m=100,min:g=0,name:y,onChange:v,onChangeCommitted:x,orientation:S="horizontal",shiftStep:k=10,size:C="medium",step:I=1,scale:M=dO,slotProps:E={},slots:T={},tabIndex:j,track:R="normal",value:N,valueLabelDisplay:A="off",valueLabelFormat:z=dO,...P}=n,D={...n,isRtl:r,max:m,min:g,classes:s,disabled:d,disableSwap:c,orientation:S,marks:f,color:l,size:C,step:I,shiftStep:k,scale:M,track:R,valueLabelDisplay:A,valueLabelFormat:z},{axisProps:$,getRootProps:L,getHiddenInputProps:B,getThumbProps:W,open:F,active:H,axis:Z,focusedThumbIndex:V,range:q,dragging:U,marks:Y,values:X,trackOffset:Q,trackLeap:ee,getThumbStyle:et}=function(e){let t,{"aria-labelledby":n,defaultValue:r,disabled:o=!1,disableSwap:a=!1,isRtl:i=!1,marks:l=!1,max:s=100,min:u=0,name:c,onChange:d,onChangeCommitted:p,orientation:h="horizontal",rootRef:f,scale:m=dA,step:g=1,shiftStep:y=10,tabIndex:v,value:b}=e,x=w.useRef(void 0),_=w.useRef(null),[S,k]=w.useState(-1),[C,I]=w.useState(-1),[M,E]=w.useState(!1),T=w.useRef(0),j=w.useRef(-1),R=w.useRef(!1),N=w.useRef(-1),A=eO(()=>{null!=_.current&&(cancelAnimationFrame(_.current),_.current=null)}),z=w.useRef(null),[P,O]=rx({controlled:b,default:r??u,name:"Slider"}),D=eO((e,t,n)=>{let r="nativeEvent"in e?e.nativeEvent:e,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:t,name:c}}),z.current=t,d?.(o,t,n)}),$=Array.isArray(P),L=w.useMemo(()=>{if("number"==typeof P)return[(0,d_.default)(P,u,s)];if(null==P)return[u];let e=P.slice().sort(dI);for(let t=0;t<e.length;t+=1){let n=e[t];e[t]=null==n?u:(0,d_.default)(n,u,s)}return e},[P,u,s]),B=w.useMemo(()=>{if(!0===l&&null!=g){let e=Array(Math.floor((s-u)/g)+1);for(let t=0;t<e.length;t+=1)e[t]={value:u+g*t};return e}return Array.isArray(l)?l:dS},[l,g,u,s]),W=w.useMemo(()=>{let e=Array(B.length);for(let t=0;t<B.length;t+=1)e[t]=B[t].value;return e},[B]),[F,H]=w.useState(-1),Z=w.useRef(null),V=G(f,Z),q=(e,t)=>{let n=Number(e.currentTarget.getAttribute("data-index")),r=L[n],o=W.indexOf(r),i=t;if(B&&null==g){let e=W[W.length-1];i=i>=e?e:i<=W[0]?W[0]:i<r?W[o-1]:W[o+1]}if(i=(0,d_.default)(i,u,s),$){a&&(i=(0,d_.default)(i,L[n-1]||-1/0,L[n+1]||1/0));let e=i;i=dT(L,i,n);let t=n;a||(t=i.indexOf(e)),dj(Z,t)}O(i),H(n),d&&!dR(i,P)&&D(e,i,n),p&&p(e,z.current??i)};(0,eP.default)(()=>{let e=tT(tM(Z.current));o&&tE(Z.current,e)&&null!=e&&"blur"in e&&e.blur()},[o]),o&&-1!==S&&k(-1),o&&-1!==F&&H(-1);let U=w.useRef(void 0),Y=h;i&&"horizontal"===h&&(Y+="-reverse");let X=e=>{let t,n,{current:r}=Z;if(!r)return null;let{width:o,height:i,bottom:l,left:c}=r.getBoundingClientRect();if(t=Y.startsWith("vertical")?(l-e.y)/i:(e.x-c)/o,Y.includes("-reverse")&&(t=1-t),n=(s-u)*t+u,g)n=Number((Math.round((n-u)/g)*g+u).toFixed(function(e){if(1>Math.abs(e)){let t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}(g)));else{let e=dM(W,n);n=W[e]}n=(0,d_.default)(n,u,s);let d=0;if($){let e=-1!==U.current;d=e?U.current:dM(L,n,j.current),a&&(n=(0,d_.default)(n,L[d-1]||-1/0,L[d+1]||1/0));let t=n;n=dT(L,n,d),a&&e||(U.current=d=n.indexOf(t))}return{newValue:n,activeIndex:d}},K=eO(e=>{if("pointerId"in e&&e.pointerId!==N.current)return;let t=dE(e,x);if(!t)return;if(T.current+=1,"pointermove"===e.type&&0===e.buttons)return void J(e);let n=X(t);n&&(dj(Z,n.activeIndex,k,!1),j.current=n.activeIndex,O(n.newValue),!M&&T.current>2&&E(!0),d&&!dR(n.newValue,P)&&D(e,n.newValue,n.activeIndex))}),J=eO(e=>{if("pointerId"in e&&e.pointerId!==N.current)return;let t=dE(e,x);if(E(!1),!t)return;let n=X(t);k(-1),"touchend"===e.type&&I(-1),n&&p&&p(e,z.current??n.newValue),"pointerType"in e&&Z.current?.hasPointerCapture(e.pointerId)&&Z.current.releasePointerCapture(e.pointerId),x.current=void 0,N.current=-1,ee()}),Q=eO(e=>{if(o)return;if(R.current){R.current=!1;let t=e.changedTouches[0];null!=t&&(x.current=t.identifier);return}let t=e.changedTouches[0];null!=t&&(x.current=t.identifier);let n=dE(e,x);if(!1!==n){U.current=-1;let t=X(n);t&&(dj(Z,t.activeIndex,k,!1),j.current=t.activeIndex,O(t.newValue),d&&!dR(t.newValue,P)&&D(e,t.newValue,t.activeIndex))}T.current=0;let r=tM(Z.current);r.addEventListener("touchmove",K,{passive:!0}),r.addEventListener("touchend",J,{passive:!0})}),ee=w.useCallback(()=>{let e=tM(Z.current);e.removeEventListener("pointermove",K),e.removeEventListener("pointerup",J),e.removeEventListener("touchmove",K),e.removeEventListener("touchend",J)},[J,K]);w.useEffect(()=>{let e=Z.current;if(e)return e.addEventListener("touchstart",Q,{passive:!0}),()=>{e.removeEventListener("touchstart",Q),A(),ee()}},[ee,Q,A]),w.useEffect(()=>{o&&(ee(),A())},[o,ee,A]);let et=(($?L[0]:u)-u)*100/(s-u),er=(L[L.length-1]-u)*100/(s-u)-et;return"vertical"===h&&(t=i?"vertical-rl":"vertical-lr"),{active:S,axis:Y,axisProps:dN,dragging:M,focusedThumbIndex:F,getHiddenInputProps:(r=dk)=>{let a=en(r),l={...a,onChange:e=>{a.onChange?.(e),q(e,e.currentTarget.valueAsNumber)},onFocus:e=>{let t=Number(e.currentTarget.getAttribute("data-index"));ez(e.target)&&H(t),I(t),a?.onFocus?.(e)},onBlur:e=>{ez(e.target)||H(-1),I(-1),a?.onBlur?.(e)},onKeyDown:e=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(e.key)){e.preventDefault();let t=L[Number(e.currentTarget.getAttribute("data-index"))],n=null;if(null!=g){let r=e.shiftKey?y:g;switch(e.key){case"ArrowUp":n=dC(t,r,1,u,s);break;case"ArrowRight":n=dC(t,r,i?-1:1,u,s);break;case"ArrowDown":n=dC(t,r,-1,u,s);break;case"ArrowLeft":n=dC(t,r,i?1:-1,u,s);break;case"PageUp":n=dC(t,y,1,u,s);break;case"PageDown":n=dC(t,y,-1,u,s);break;case"Home":n=u;break;case"End":n=s}}else if(B){let r=W[W.length-1],o=W.indexOf(t);[i?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"].includes(e.key)?n=0===o?W[0]:W[o-1]:[i?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"].includes(e.key)&&(n=o===W.length-1?r:W[o+1])}null!=n&&q(e,n)}a?.onKeyDown?.(e)}};return{tabIndex:v,"aria-labelledby":n,"aria-orientation":h,"aria-valuemax":m(s),"aria-valuemin":m(u),name:c,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":e.step??void 0,disabled:o,...r,...l,style:{...dw,direction:i?"rtl":"ltr",width:"100%",height:"100%",writingMode:t}}},getRootProps:(e=dk)=>{let t=en(e),n={...t,onPointerDown:e=>{if(t.onPointerDown?.(e),"touch"===e.pointerType&&(R.current=!0),o||e.defaultPrevented||0!==e.button)return;let n=dE(e,x);if(!1!==n){U.current=-1;let t=X(n);if(t){let n=Z.current?.querySelector(`input[type="range"][data-index="${t.activeIndex}"]`),r=tM(Z.current),o=null!=n&&n===tT(r);k(t.activeIndex),j.current=t.activeIndex,o?e.preventDefault():(A(),_.current=requestAnimationFrame(()=>{_.current=null,dj(Z,t.activeIndex,void 0,!1)})),O(t.newValue),d&&!dR(t.newValue,P)&&D(e,t.newValue,t.activeIndex)}}T.current=0,N.current=e.pointerId;let r=tM(Z.current);try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}r.addEventListener("pointermove",K,{passive:!0}),r.addEventListener("pointerup",J)}};return{...e,ref:V,...n}},getThumbProps:(e=dk)=>{let t=en(e);return{...e,...t,onMouseOver:e=>{t.onMouseOver?.(e),I(Number(e.currentTarget.getAttribute("data-index")))},onMouseLeave:e=>{t.onMouseLeave?.(e),I(-1)}}},marks:B,open:C,range:$,rootRef:V,trackLeap:er,trackOffset:et,values:L,getThumbStyle:e=>{let t;return $?S===e?t=2:j.current===e&&(t=1):S===e&&(t=1),{pointerEvents:-1!==S&&S!==e?"none":void 0,zIndex:t}}}}({...D,rootRef:t});D.marked=Y.length>0&&Y.some(e=>e.label),D.dragging=U,D.focusedThumbIndex=V;let er=(e=>{let{disabled:t,dragging:n,marked:r,orientation:o,track:a,classes:i,color:l,size:s}=e;return O({root:["root",t&&"disabled",n&&"dragging",r&&"marked","vertical"===o&&"vertical","inverted"===a&&"trackInverted",!1===a&&"trackFalse",l&&`color${e8(l)}`,s&&`size${e8(s)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled"],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]},dz,i)})(D),eo={slots:T,slotProps:E},[ei,el]=ea("root",{elementType:dD,getSlotProps:L,externalForwardedProps:{...eo,...P},ownerState:D,className:[er.root,u]}),[es,eu]=ea("rail",{elementType:d$,externalForwardedProps:eo,ownerState:D,className:er.rail}),[ec,ed]=ea("track",{elementType:dL,externalForwardedProps:eo,additionalProps:{style:{...$[Z].offset(Q),...$[Z].leap(ee)}},ownerState:D,className:er.track}),[ep,eh]=ea("thumb",{elementType:dB,getSlotProps:W,externalForwardedProps:eo,ownerState:D,className:er.thumb}),[ef,em]=ea("valueLabel",{elementType:dW,externalForwardedProps:eo,ownerState:D,className:er.valueLabel}),[eg,ey]=ea("mark",{elementType:dF,externalForwardedProps:eo,ownerState:D,className:er.mark}),[ev,eb]=ea("markLabel",{elementType:dH,externalForwardedProps:eo,ownerState:D,className:er.markLabel}),[ex,ew]=ea("input",{elementType:"input",getSlotProps:B,externalForwardedProps:eo,ownerState:D});return(0,b.jsxs)(ei,{...el,children:[(0,b.jsx)(es,{...eu}),(0,b.jsx)(ec,{...ed}),Y.filter(e=>e.value>=g&&e.value<=m).map((e,t)=>{let n,r=(e.value-g)*100/(m-g),o=$[Z].offset(r);return n=!1===R?X.includes(e.value):"normal"===R&&(q?e.value>=X[0]&&e.value<=X[X.length-1]:e.value<=X[0])||"inverted"===R&&(q?e.value<=X[0]||e.value>=X[X.length-1]:e.value>=X[0]),(0,b.jsxs)(w.Fragment,{children:[(0,b.jsx)(eg,{"data-index":t,...ey,...!J(eg)&&{markActive:n},style:{...o,...ey.style},className:(0,_.default)(ey.className,n&&er.markActive)}),null!=e.label?(0,b.jsx)(ev,{"aria-hidden":!0,"data-index":t,...eb,...!J(ev)&&{markLabelActive:n},style:{...o,...eb.style},className:(0,_.default)(er.markLabel,eb.className,n&&er.markLabelActive),children:e.label}):null]},t)}),X.map((e,t)=>{let n=(e-g)*100/(m-g),r=$[Z].offset(n),l="off"===A?dZ:ef;return(0,b.jsx)(l,{...!J(l)&&{valueLabelFormat:z,valueLabelDisplay:A,value:"function"==typeof z?z(M(e),t):z,index:t,open:F===t||H===t||"on"===A,disabled:d},...em,children:(0,b.jsx)(ep,{"data-index":t,...eh,className:(0,_.default)(er.thumb,eh.className,H===t&&er.active,V===t&&er.focusVisible),style:{...r,...et(t),...eh.style},children:(0,b.jsx)(ex,{"data-index":t,"aria-label":p?p(t):o,"aria-valuenow":M(e),"aria-labelledby":i,"aria-valuetext":h?h(M(e),t):a,value:X[t],...ew})})},t)})]})}),dq=rz((0,b.jsx)("path",{d:"M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),dU=rz((0,b.jsx)("path",{d:"M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),dY=rz((0,b.jsx)("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"}),"SkipPrevious"),dX=rz((0,b.jsx)("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"}),"SkipNext"),dK=rz((0,b.jsx)("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),dG=rz((0,b.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),dJ=rz((0,b.jsx)("path",{d:"M7 7h10v3l4-4-4-4v3H5v6h2zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2z"}),"Repeat"),dQ=rz((0,b.jsx)("path",{d:"M7 7h10v3l4-4-4-4v3H5v6h2zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2zm-4-2V9h-1l-2 1v1h1.5v4z"}),"RepeatOne");function d0(e){let t,n,r,o=(0,x.c)(11),{stepIndex:a,stepCount:i,onSeek:l,mobile:s}=e,u=i>0?a:0,c=Math.max(i-1,0),d=i>1,p=i<=1;return o[0]!==l?(t=(e,t)=>l(t),o[0]=l,o[1]=t):t=o[1],o[2]!==s?(n=s?{display:{xs:"block",sm:"none"},mx:.5,my:-.25,width:"auto"}:{display:{xs:"none",sm:"block"},mx:1,width:"auto"},o[2]=s,o[3]=n):n=o[3],o[4]!==u||o[5]!==c||o[6]!==d||o[7]!==p||o[8]!==t||o[9]!==n?(r=(0,b.jsx)(dV,{value:u,min:0,max:c,step:1,marks:d,disabled:p,onChange:t,size:"small","aria-label":"Scrub steps",sx:n}),o[4]=u,o[5]=c,o[6]=d,o[7]=p,o[8]=t,o[9]=n,o[10]=r):r=o[10],r}function d1(e){let t,n,r,o,a,i=(0,x.c)(15),{playbackMode:l,playbackModeLabel:s,playbackModeToggleLabel:u,stepCount:c,compact:d,onTogglePlaybackMode:p}=e;i[0]!==l?(t="repeat-message"===l?(0,b.jsx)(dQ,{fontSize:"small"}):(0,b.jsx)(dJ,{fontSize:"small"}),i[0]=l,i[1]=t):t=i[1];let h=t,f=`${s}. ${u}.`;i[2]===Symbol.for("react.memo_cache_sentinel")?(n={display:"inline-flex"},i[2]=n):n=i[2];let m=0===c,g="stop-at-message-end"===l?"default":"primary";return i[3]!==d?(r=d?{width:30,height:30}:void 0,i[3]=d,i[4]=r):r=i[4],i[5]!==h||i[6]!==f||i[7]!==p||i[8]!==m||i[9]!==g||i[10]!==r?(o=(0,b.jsx)("span",{style:n,children:(0,b.jsx)(nm,{size:"small",onClick:p,disabled:m,color:g,"aria-label":f,sx:r,children:h})}),i[5]=h,i[6]=f,i[7]=p,i[8]=m,i[9]=g,i[10]=r,i[11]=o):o=i[11],i[12]!==f||i[13]!==o?(a=(0,b.jsx)(rj,{title:f,placement:"top",children:o}),i[12]=f,i[13]=o,i[14]=a):a=i[14],a}function d2(e){let t,n,r,o,a,i=(0,x.c)(16),{playbackSpeedLabel:l,nextPlaybackSpeedLabel:s,stepCount:u,compact:c,onCyclePlaybackSpeed:d}=e,p=`Playback speed: ${l}. Switch to ${s}.`;i[0]===Symbol.for("react.memo_cache_sentinel")?(t={display:"inline-flex"},i[0]=t):t=i[0];let h=0===u,f=c?38:48,m=c?38:48;return i[1]!==c?(n=c?{fontSize:12}:null,i[1]=c,i[2]=n):n=i[2],i[3]!==f||i[4]!==m||i[5]!==n?(r={minWidth:f,width:m,px:.75,...n,fontVariantNumeric:"tabular-nums",fontWeight:600,textTransform:"none",whiteSpace:"nowrap"},i[3]=f,i[4]=m,i[5]=n,i[6]=r):r=i[6],i[7]!==p||i[8]!==d||i[9]!==l||i[10]!==h||i[11]!==r?(o=(0,b.jsx)("span",{style:t,children:(0,b.jsx)(tx,{size:"small",variant:"text",onClick:d,disabled:h,"aria-label":p,sx:r,children:l})}),i[7]=p,i[8]=d,i[9]=l,i[10]=h,i[11]=r,i[12]=o):o=i[12],i[13]!==p||i[14]!==o?(a=(0,b.jsx)(rj,{title:p,placement:"top",children:o}),i[13]=p,i[14]=o,i[15]=a):a=i[15],a}function d5(e){let t,n,r=(0,x.c)(6),{stepIndex:o,stepCount:a,compact:i}=e;r[0]!==i?(t=i?{flexShrink:0,fontSize:12,textAlign:"center",fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap"}:{ml:1,minWidth:72,flexBasis:"auto",textAlign:"center",fontVariantNumeric:"tabular-nums"},r[0]=i,r[1]=t):t=r[1];let l=0===a?0:o+1;return r[2]!==a||r[3]!==t||r[4]!==l?(n=(0,b.jsxs)(ns,{variant:"body2",color:"text.secondary",sx:t,children:["Step ",l," / ",a]}),r[2]=a,r[3]=t,r[4]=l,r[5]=n):n=r[5],n}function d6(e){let t,n,r,o,a,i,l,s,u=(0,x.c)(20),{deltaMs:c,elapsedMs:d,compact:p}=e;u[0]!==p?(t=p?{color:"text.secondary",display:"inline-flex",justifyContent:"flex-end",whiteSpace:"nowrap"}:{color:"text.secondary",display:"inline-flex",justifyContent:"flex-end",whiteSpace:"nowrap",width:"11ch"},u[0]=p,u[1]=t):t=u[1];let h=t;return u[2]!==p?(n=p?{display:"flex",justifyContent:"center",gap:.75,minWidth:0,fontVariantNumeric:"tabular-nums",fontFamily:"var(--font-geist-mono), monospace",fontSize:11.5,whiteSpace:"nowrap"}:{display:"flex",justifyContent:"center",flexBasis:"auto",gap:1.5,fontVariantNumeric:"tabular-nums",fontFamily:"var(--font-geist-mono), monospace",fontSize:12},u[2]=p,u[3]=n):n=u[3],u[4]!==c?(r=void 0!==c?dr(c):"—",u[4]=c,u[5]=r):r=u[5],u[6]!==h||u[7]!==r?(o=(0,b.jsx)(rj,{title:"Time since previous step",placement:"top",children:(0,b.jsxs)(P,{component:"span",sx:h,children:["Δ ",r]})}),u[6]=h,u[7]=r,u[8]=o):o=u[8],u[9]!==h?(a={...h,color:"primary.main"},u[9]=h,u[10]=a):a=u[10],u[11]!==d?(i=void 0!==d?dr(d):"—",u[11]=d,u[12]=i):i=u[12],u[13]!==a||u[14]!==i?(l=(0,b.jsx)(rj,{title:"Elapsed since message start",placement:"top",children:(0,b.jsxs)(P,{component:"span",sx:a,children:["Σ ",i]})}),u[13]=a,u[14]=i,u[15]=l):l=u[15],u[16]!==n||u[17]!==o||u[18]!==l?(s=(0,b.jsxs)(P,{sx:n,children:[o,l]}),u[16]=n,u[17]=o,u[18]=l,u[19]=s):s=u[19],s}function d4(e){var t;let n,r,o,a,i,l,s,u,c,d,p,h,f,m,g,y,v,w,_,S,k,C,I,M,E,T,j,R,N,A,z,O,D,$,L,B,W,F,H,Z,V,q,U,Y,X,K,G,J,Q,ee=(0,x.c)(129),{stepIndex:et,stepCount:en,isPlaying:er,playbackMode:eo,playbackSpeed:ea,deltaMs:ei,elapsedMs:el,onPrev:es,onNext:eu,onTogglePlay:ec,onTogglePlaybackMode:ed,onCyclePlaybackSpeed:ep,onSeek:eh}=e,ef=et<=0,em=et>=en-1,eg="stop-at-message-end"===eo?"Stop at message end":"repeat-message"===eo?"Repeat current message":"Play next message",ey="stop-at-message-end"===eo?"Switch to play next message":"play-next-message"===eo?"Switch to repeat current message":"Switch to stop at message end";ee[0]!==ea?(n=`${ea}x`,ee[0]=ea,ee[1]=n):n=ee[1];let ev=n;ee[2]!==ea?(t=.5===ea?1:1===ea?1.5:1.5===ea?2:.5,r=`${t}x`,ee[2]=ea,ee[3]=r):r=ee[3];let eb=r;ee[4]!==ed||ee[5]!==eo||ee[6]!==eg||ee[7]!==ey||ee[8]!==en?(o=e=>(0,b.jsx)(d1,{playbackMode:eo,playbackModeLabel:eg,playbackModeToggleLabel:ey,stepCount:en,compact:void 0!==e&&e,onTogglePlaybackMode:ed}),ee[4]=ed,ee[5]=eo,ee[6]=eg,ee[7]=ey,ee[8]=en,ee[9]=o):o=ee[9];let ex=o;ee[10]!==eb||ee[11]!==ep||ee[12]!==ev||ee[13]!==en?(a=e=>(0,b.jsx)(d2,{playbackSpeedLabel:ev,nextPlaybackSpeedLabel:eb,stepCount:en,compact:void 0!==e&&e,onCyclePlaybackSpeed:ep}),ee[10]=eb,ee[11]=ep,ee[12]=ev,ee[13]=en,ee[14]=a):a=ee[14];let ew=a,e_=0===en;ee[15]===Symbol.for("react.memo_cache_sentinel")?(i={justifySelf:{xs:"center",sm:"auto"}},ee[15]=i):i=ee[15],ee[16]!==er?(l=er?(0,b.jsx)(dG,{}):(0,b.jsx)(dK,{}),ee[16]=er,ee[17]=l):l=ee[17],ee[18]!==ec||ee[19]!==e_||ee[20]!==l?(s=(0,b.jsx)(nm,{size:"small",onClick:ec,disabled:e_,color:"primary",sx:i,children:l}),ee[18]=ec,ee[19]=e_,ee[20]=l,ee[21]=s):s=ee[21];let eS=s;return ee[22]===Symbol.for("react.memo_cache_sentinel")?(u={display:"flex",flexDirection:"column",px:{xs:1,sm:2},py:{xs:.5,sm:1},gap:{xs:.25,sm:.5}},ee[22]=u):u=ee[22],ee[23]!==eh||ee[24]!==en||ee[25]!==et?(c=(0,b.jsx)(d0,{stepIndex:et,stepCount:en,onSeek:eh}),ee[23]=eh,ee[24]=en,ee[25]=et,ee[26]=c):c=ee[26],ee[27]===Symbol.for("react.memo_cache_sentinel")?(d={display:{xs:"grid",sm:"none"},gridTemplateColumns:"1fr auto 1fr",alignItems:"center",columnGap:.5},ee[27]=d):d=ee[27],ee[28]===Symbol.for("react.memo_cache_sentinel")?(p={display:"flex",justifyContent:"flex-end",gap:.5},ee[28]=p):p=ee[28],ee[29]!==eh?(h=()=>eh(0),ee[29]=eh,ee[30]=h):h=ee[30],ee[31]===Symbol.for("react.memo_cache_sentinel")?(f=(0,b.jsx)(dq,{fontSize:"small"}),ee[31]=f):f=ee[31],ee[32]!==ef||ee[33]!==h?(m=(0,b.jsx)(nm,{size:"small",onClick:h,disabled:ef,"aria-label":"Jump to start",children:f}),ee[32]=ef,ee[33]=h,ee[34]=m):m=ee[34],ee[35]===Symbol.for("react.memo_cache_sentinel")?(g=(0,b.jsx)(dY,{fontSize:"small"}),ee[35]=g):g=ee[35],ee[36]!==ef||ee[37]!==es?(y=(0,b.jsx)(nm,{size:"small",onClick:es,disabled:ef,children:g}),ee[36]=ef,ee[37]=es,ee[38]=y):y=ee[38],ee[39]!==m||ee[40]!==y?(v=(0,b.jsxs)(P,{sx:p,children:[m,y]}),ee[39]=m,ee[40]=y,ee[41]=v):v=ee[41],ee[42]===Symbol.for("react.memo_cache_sentinel")?(w={display:"flex",justifyContent:"flex-start",gap:.5},ee[42]=w):w=ee[42],ee[43]===Symbol.for("react.memo_cache_sentinel")?(_=(0,b.jsx)(dX,{fontSize:"small"}),ee[43]=_):_=ee[43],ee[44]!==em||ee[45]!==eu?(S=(0,b.jsx)(nm,{size:"small",onClick:eu,disabled:em,children:_}),ee[44]=em,ee[45]=eu,ee[46]=S):S=ee[46],ee[47]!==eh||ee[48]!==en?(k=()=>eh(Math.max(en-1,0)),ee[47]=eh,ee[48]=en,ee[49]=k):k=ee[49],ee[50]===Symbol.for("react.memo_cache_sentinel")?(C=(0,b.jsx)(dU,{fontSize:"small"}),ee[50]=C):C=ee[50],ee[51]!==em||ee[52]!==k?(I=(0,b.jsx)(nm,{size:"small",onClick:k,disabled:em,"aria-label":"Jump to end",children:C}),ee[51]=em,ee[52]=k,ee[53]=I):I=ee[53],ee[54]!==S||ee[55]!==I?(M=(0,b.jsxs)(P,{sx:w,children:[S,I]}),ee[54]=S,ee[55]=I,ee[56]=M):M=ee[56],ee[57]!==eS||ee[58]!==v||ee[59]!==M?(E=(0,b.jsxs)(P,{sx:d,children:[v,eS,M]}),ee[57]=eS,ee[58]=v,ee[59]=M,ee[60]=E):E=ee[60],ee[61]!==eh||ee[62]!==en||ee[63]!==et?(T=(0,b.jsx)(d0,{stepIndex:et,stepCount:en,onSeek:eh,mobile:!0}),ee[61]=eh,ee[62]=en,ee[63]=et,ee[64]=T):T=ee[64],ee[65]===Symbol.for("react.memo_cache_sentinel")?(j={display:{xs:"flex",sm:"none"},alignItems:"center",justifyContent:"center",flexWrap:"nowrap",gap:.75,minWidth:0,overflow:"hidden"},ee[65]=j):j=ee[65],ee[66]!==ex?(R=ex(!0),ee[66]=ex,ee[67]=R):R=ee[67],ee[68]!==ew?(N=ew(!0),ee[68]=ew,ee[69]=N):N=ee[69],ee[70]!==en||ee[71]!==et?(A=(0,b.jsx)(d5,{stepIndex:et,stepCount:en,compact:!0}),ee[70]=en,ee[71]=et,ee[72]=A):A=ee[72],ee[73]!==ei||ee[74]!==el?(z=(0,b.jsx)(d6,{deltaMs:ei,elapsedMs:el,compact:!0}),ee[73]=ei,ee[74]=el,ee[75]=z):z=ee[75],ee[76]!==R||ee[77]!==N||ee[78]!==A||ee[79]!==z?(O=(0,b.jsxs)(P,{sx:j,children:[R,N,A,z]}),ee[76]=R,ee[77]=N,ee[78]=A,ee[79]=z,ee[80]=O):O=ee[80],ee[81]===Symbol.for("react.memo_cache_sentinel")?(D={display:{xs:"none",sm:"flex"},alignItems:"center",justifyContent:"center",gap:1},ee[81]=D):D=ee[81],ee[82]!==eh?($=()=>eh(0),ee[82]=eh,ee[83]=$):$=ee[83],ee[84]===Symbol.for("react.memo_cache_sentinel")?(L=(0,b.jsx)(dq,{fontSize:"small"}),ee[84]=L):L=ee[84],ee[85]!==ef||ee[86]!==$?(B=(0,b.jsx)(nm,{size:"small",onClick:$,disabled:ef,"aria-label":"Jump to start",children:L}),ee[85]=ef,ee[86]=$,ee[87]=B):B=ee[87],ee[88]===Symbol.for("react.memo_cache_sentinel")?(W=(0,b.jsx)(dY,{fontSize:"small"}),ee[88]=W):W=ee[88],ee[89]!==ef||ee[90]!==es?(F=(0,b.jsx)(nm,{size:"small",onClick:es,disabled:ef,children:W}),ee[89]=ef,ee[90]=es,ee[91]=F):F=ee[91],ee[92]===Symbol.for("react.memo_cache_sentinel")?(H=(0,b.jsx)(dX,{fontSize:"small"}),ee[92]=H):H=ee[92],ee[93]!==em||ee[94]!==eu?(Z=(0,b.jsx)(nm,{size:"small",onClick:eu,disabled:em,children:H}),ee[93]=em,ee[94]=eu,ee[95]=Z):Z=ee[95],ee[96]!==eh||ee[97]!==en?(V=()=>eh(Math.max(en-1,0)),ee[96]=eh,ee[97]=en,ee[98]=V):V=ee[98],ee[99]===Symbol.for("react.memo_cache_sentinel")?(q=(0,b.jsx)(dU,{fontSize:"small"}),ee[99]=q):q=ee[99],ee[100]!==em||ee[101]!==V?(U=(0,b.jsx)(nm,{size:"small",onClick:V,disabled:em,"aria-label":"Jump to end",children:q}),ee[100]=em,ee[101]=V,ee[102]=U):U=ee[102],ee[103]!==ex?(Y=ex(),ee[103]=ex,ee[104]=Y):Y=ee[104],ee[105]!==ew?(X=ew(),ee[105]=ew,ee[106]=X):X=ee[106],ee[107]!==en||ee[108]!==et?(K=(0,b.jsx)(d5,{stepIndex:et,stepCount:en}),ee[107]=en,ee[108]=et,ee[109]=K):K=ee[109],ee[110]!==ei||ee[111]!==el?(G=(0,b.jsx)(d6,{deltaMs:ei,elapsedMs:el}),ee[110]=ei,ee[111]=el,ee[112]=G):G=ee[112],ee[113]!==eS||ee[114]!==B||ee[115]!==F||ee[116]!==Z||ee[117]!==U||ee[118]!==Y||ee[119]!==X||ee[120]!==K||ee[121]!==G?(J=(0,b.jsxs)(P,{sx:D,children:[B,F,eS,Z,U,Y,X,K,G]}),ee[113]=eS,ee[114]=B,ee[115]=F,ee[116]=Z,ee[117]=U,ee[118]=Y,ee[119]=X,ee[120]=K,ee[121]=G,ee[122]=J):J=ee[122],ee[123]!==c||ee[124]!==E||ee[125]!==T||ee[126]!==O||ee[127]!==J?(Q=(0,b.jsxs)(P,{sx:u,children:[c,E,T,O,J]}),ee[123]=c,ee[124]=E,ee[125]=T,ee[126]=O,ee[127]=J,ee[128]=Q):Q=ee[128],Q}let d3=rz((0,b.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"}),"UploadFile");function d9(e){return"object"==typeof e&&null!==e&&!!e.graph&&Array.isArray(e.graph.nodes)&&Array.isArray(e.graph.edges)&&Array.isArray(e.messages)}function d8(e){let t,n,r,o,a,i,l=(0,x.c)(14),{onLoad:s,label:u,size:c,variant:d,sx:p}=e,h=void 0===u?"Upload JSON":u,f=void 0===c?"small":c,m=void 0===d?"outlined":d,g=(0,w.useRef)(null);l[0]!==s?(t=async function(e){try{let t=JSON.parse(await e.text());if(!d9(t))return void alert("That file doesn't look like a WizardFlow JSON file.");s({...t,name:e.name})}catch{alert("Could not parse that file as JSON.")}},l[0]=s,l[1]=t):t=l[1];let y=t;return l[2]!==y?(n=(0,b.jsx)("input",{ref:g,type:"file",accept:"application/json,.json",hidden:!0,onChange:e=>{let t=e.target.files?.[0];t&&y(t),e.target.value=""}}),l[2]=y,l[3]=n):n=l[3],l[4]===Symbol.for("react.memo_cache_sentinel")?(r=(0,b.jsx)(d3,{}),o=()=>g.current?.click(),l[4]=r,l[5]=o):(r=l[4],o=l[5]),l[6]!==h||l[7]!==f||l[8]!==p||l[9]!==m?(a=(0,b.jsx)(tx,{size:f,variant:m,startIcon:r,onClick:o,sx:p,children:h}),l[6]=h,l[7]=f,l[8]=p,l[9]=m,l[10]=a):a=l[10],l[11]!==n||l[12]!==a?(i=(0,b.jsxs)(b.Fragment,{children:[n,a]}),l[11]=n,l[12]=a,l[13]=i):i=l[13],i}function d7(e){return R("MuiPopover",e)}function pe(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function pt(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function pn(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function pr(e){return"function"==typeof e?e():e}N("MuiPopover",["root","paper"]);let po=X(tY,{name:"MuiPopover",slot:"Root"})({}),pa=X(tQ,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),pi=w.forwardRef(function(e,t){let n=(0,K.useDefaultProps)({props:e,name:"MuiPopover"}),{action:r,anchorEl:o,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:i,anchorReference:l="anchorEl",children:s,className:u,container:c,disableAutoFocus:d=!1,elevation:p=8,marginThreshold:h=16,open:f,slots:m={},slotProps:g={},transformOrigin:y={vertical:"top",horizontal:"left"},transitionDuration:v="auto",disableScrollLock:x=!1,...S}=n,k=w.useRef(),C={...n,anchorOrigin:a,anchorReference:l,elevation:p,marginThreshold:h,transformOrigin:y,transitionDuration:v},I=(e=>{let{classes:t}=e;return O({root:["root"],paper:["paper"]},d7,t)})(C),M=w.useCallback(()=>{if("anchorPosition"===l)return i;let e=pr(o),t=(e&&1===e.nodeType?e:tM(k.current).body).getBoundingClientRect();return{top:t.top+pe(t,a.vertical),left:t.left+pt(t,a.horizontal)}},[o,a.horizontal,a.vertical,i,l]),E=w.useCallback(e=>({vertical:pe(e,y.vertical),horizontal:pt(e,y.horizontal)}),[y.horizontal,y.vertical]),T=w.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=E(t);if("none"===l)return{top:null,left:null,transformOrigin:pn(n)};let r=M(),a=r.top-n.vertical,i=r.left-n.horizontal,s=a+t.height,u=i+t.width,c=tD(pr(o)),d=c.innerHeight-h,p=c.innerWidth-h;if(null!=h&&a<h){let e=a-h;a-=e,n.vertical+=e}else if(null!=h&&s>d){let e=s-d;a-=e,n.vertical+=e}if(null!=h&&i<h){let e=i-h;i-=e,n.horizontal+=e}else if(u>p){let e=u-p;i-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(i)}px`,transformOrigin:pn(n)}},[o,l,M,E,h]),[j,R]=w.useState(f),N=w.useCallback(()=>{let e=k.current;if(!e)return;let t=T(e);null!=t.top&&e.style.setProperty("top",t.top),null!=t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,R(!0)},[T]);w.useEffect(()=>(x&&window.addEventListener("scroll",N),()=>window.removeEventListener("scroll",N)),[o,x,N]),w.useEffect(()=>{f&&N()}),w.useImperativeHandle(r,()=>f?{updatePosition:()=>{N()}}:null,[f,N]),w.useEffect(()=>{if(!f)return;let e=cM(()=>{N()}),t=tD(pr(o));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[o,f,N]);let A=v,z={slots:m,slotProps:g},[P,D]=ea("transition",{elementType:nb,externalForwardedProps:z,ownerState:C,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),N()},onExited:t=>{e.onExited?.(t),R(!1)}}),additionalProps:{appear:!0,in:f}});"auto"!==v||P.muiSupportAuto||(A=void 0);let $=c||(o?tM(pr(o)).body:void 0),[L,{slots:B,slotProps:W,...F}]=ea("root",{ref:t,elementType:po,externalForwardedProps:{...z,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:m.backdrop},slotProps:{backdrop:function(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{et(r,t[r])&&"function"==typeof e[r]&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if("function"==typeof e||"function"==typeof t)return r=>{let o="function"==typeof t?t(r):t,a="function"==typeof e?e({...r,...o}):e,i=(0,_.default)(r?.className,o?.className,a?.className),l=n(a,o);return{...o,...a,...l,...!!i&&{className:i},...o?.style&&a?.style&&{style:{...o.style,...a.style}},...o?.sx&&a?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=n(e,t),o=(0,_.default)(t?.className,e?.className);return{...t,...e,...r,...!!o&&{className:o},...t?.style&&e?.style&&{style:{...t.style,...e.style}},...t?.sx&&e?.sx&&{sx:[...Array.isArray(t.sx)?t.sx:[t.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}("function"==typeof g.backdrop?g.backdrop(C):g.backdrop,{invisible:!0})},container:$,open:f},ownerState:C,className:(0,_.default)(I.root,u)}),[H,Z]=ea("paper",{ref:k,className:I.paper,elementType:pa,externalForwardedProps:z,shouldForwardComponentProp:!0,additionalProps:{elevation:p,style:j?void 0:{opacity:0}},ownerState:C});return(0,b.jsx)(L,{...F,...!J(L)&&{slots:B,slotProps:W,disableAutoFocus:d,disableScrollLock:x},children:(0,b.jsx)(P,{...D,timeout:A,children:(0,b.jsx)(H,{...Z,children:s})})})}),pl=rz((0,b.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined");function ps(e){let t,n,r,o,a,i,l,s,u,c,d,p=(0,x.c)(20),{trace:h}=e,[f,m]=(0,w.useState)(null),g=!!f,y=h.messages.length,v=h.graph.nodes.length,_=h.graph.edges.length;p[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>m(e.currentTarget),p[0]=t):t=p[0],p[1]===Symbol.for("react.memo_cache_sentinel")?(n={color:"text.secondary"},p[1]=n):n=p[1],p[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,b.jsx)(rj,{title:"Agent flow details",placement:"bottom",children:(0,b.jsx)(nm,{size:"small",onClick:t,"aria-label":"Agent flow details",sx:n,children:(0,b.jsx)(pl,{sx:{fontSize:16}})})}),p[2]=r):r=p[2],p[3]===Symbol.for("react.memo_cache_sentinel")?(o=()=>m(null),a={vertical:"bottom",horizontal:"left"},p[3]=o,p[4]=a):(o=p[3],a=p[4]),p[5]===Symbol.for("react.memo_cache_sentinel")?(i={p:1.5,maxWidth:360,maxHeight:"60vh",overflow:"auto"},p[5]=i):i=p[5];let S=`v${h.version}`;p[6]!==S?(l=(0,b.jsx)(pc,{label:"Schema",value:S}),p[6]=S,p[7]=l):l=p[7];let k=`${y} messages \xb7 ${v} nodes \xb7 ${_} edges`;return p[8]!==k?(s=(0,b.jsx)(pc,{label:"Graph",value:k}),p[8]=k,p[9]=s):s=p[9],p[10]!==h.meta?(u=h.meta&&Object.entries(h.meta).map(pu),p[10]=h.meta,p[11]=u):u=p[11],p[12]!==s||p[13]!==u||p[14]!==l?(c=(0,b.jsxs)(P,{sx:i,children:[l,s,u]}),p[12]=s,p[13]=u,p[14]=l,p[15]=c):c=p[15],p[16]!==f||p[17]!==g||p[18]!==c?(d=(0,b.jsxs)(b.Fragment,{children:[r,(0,b.jsx)(pi,{open:g,anchorEl:f,onClose:o,anchorOrigin:a,children:c})]}),p[16]=f,p[17]=g,p[18]=c,p[19]=d):d=p[19],d}function pu(e){let[t,n]=e;return(0,b.jsx)(pc,{label:t,value:String(n)},t)}function pc(e){let t,n,r,o,a,i,l=(0,x.c)(10),{label:s,value:u}=e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(t={display:"flex",gap:1.5,py:.25},l[0]=t):t=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(n={flexShrink:0,minWidth:64},l[1]=n):n=l[1],l[2]!==s?(r=(0,b.jsx)(ns,{variant:"caption",color:"text.secondary",sx:n,children:s}),l[2]=s,l[3]=r):r=l[3],l[4]===Symbol.for("react.memo_cache_sentinel")?(o={whiteSpace:"pre-wrap",wordBreak:"break-word"},l[4]=o):o=l[4],l[5]!==u?(a=(0,b.jsx)(ns,{variant:"caption",sx:o,children:u}),l[5]=u,l[6]=a):a=l[6],l[7]!==r||l[8]!==a?(i=(0,b.jsxs)(P,{sx:t,children:[r,a]}),l[7]=r,l[8]=a,l[9]=i):i=l[9],i}let pd='System:\nYou are the safety classifier for a general assistant. Decide whether the\nrequest is safe to answer.\nRoutes:\n - "allow": benign requests, including defensive or everyday safety advice\n - "refuse": requests that facilitate theft, credential theft, phishing,\n unauthorized access, violence, or other real-world harm\nReturn compact JSON with exactly: route, category, reason.\nBe conservative when the user asks for actionable instructions that enable\nwrongdoing.',pp=[{id:"router",title:"Router agent",summary:"Routes each request to a planner or retriever branch.",pattern:"branching",trace:{version:"0.1",name:"router_agent.json",meta:{source:"langgraph",createdAt:"2026-06-02T10:00:00Z",description:"A small router-based agent shown across two runs: a weather lookup that goes through the planner and a tool call, and a research-paper summary that goes through the retriever. Use it to explore playback, the inspector, and the timeline without uploading your own. (Intentionally long to show the info popover wrapping and scrolling rather than overflowing a tooltip.)"},graph:{nodes:[{id:"user_input",label:"User Input"},{id:"router",label:"Router"},{id:"planner",label:"Planner"},{id:"retriever",label:"Retriever"},{id:"tool_node",label:"Tool"},{id:"generator",label:"Generator"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"router"},{source:"router",target:"planner",conditional:!0},{source:"router",target:"retriever",conditional:!0},{source:"planner",target:"tool_node"},{source:"retriever",target:"generator"},{source:"tool_node",target:"generator"},{source:"generator",target:"final_response"}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-06-02T10:00:00.000Z",payloads:[{label:"Input",value:"What's the weather in Berlin?"}]},{id:"m1-s2",nodeId:"router",timestamp:"2026-06-02T10:00:00.290Z",payloads:[{label:"llm_input",value:'System:\nYou are a routing agent. Pick the next node for the request.\nOptions:\n - planner: the request needs tools or external actions\n - retriever: the request needs document lookup\nRespond as JSON: {"route": ..., "confidence": ...}\n\nUser:\nWhat\'s the weather in Berlin?'},{label:"llm_output",value:'{"route": "planner", "confidence": 0.92}'}]},{id:"m1-s3",nodeId:"planner",timestamp:"2026-06-02T10:00:02.460Z",payloads:[{label:"llm_input",value:"System:\nYou are a planning agent. Decompose the request into an ordered\nlist of tool calls. Use only the available tools.\nAvailable tools:\n - weather_api(city: string)\n - news_api(topic: string)\n\nUser:\nWhat's the weather in Berlin?"},{label:"llm_output",value:'{"plan": ["weather_api(city=\'Berlin\')"]}'}]},{id:"m1-s4",nodeId:"tool_node",timestamp:"2026-06-02T10:00:06.010Z",payloads:[]},{id:"m1-s5",nodeId:"generator",timestamp:"2026-06-02T10:00:09.840Z",payloads:[{label:"llm_input",value:'System:\nYou are a helpful assistant. Answer concisely and in a friendly\ntone, using the tool result. Do not invent data.\n\nUser:\nWhat\'s the weather in Berlin?\n\nTool result:\n{"temp_c": 19, "conditions": "partly cloudy"}'},{label:"llm_output",value:"It's 19°C and partly cloudy in Berlin."}]},{id:"m1-s6",nodeId:"final_response",timestamp:"2026-06-02T10:00:10.210Z",payloads:[{label:"Output",value:"It's 19°C and partly cloudy in Berlin."}]}]},{id:"msg-2",steps:[{id:"m2-s1",nodeId:"user_input",timestamp:"2026-06-02T10:05:00.000Z",payloads:[{label:"Input",value:"Summarize the attached research paper."}]},{id:"m2-s2",nodeId:"router",timestamp:"2026-06-02T10:05:00.340Z",payloads:[{label:"llm_input",value:'System:\nYou are a routing agent. Pick the next node for the request.\nOptions:\n - planner: the request needs tools or external actions\n - retriever: the request needs document lookup\nRespond as JSON: {"route": ..., "confidence": ...}\n\nUser:\nSummarize the attached research paper.'},{label:"llm_output",value:'{"route": "retriever", "confidence": 0.88}'}]},{id:"m2-s3",nodeId:"retriever",timestamp:"2026-06-02T10:05:03.880Z",payloads:[{label:"Input",value:"Summarize the attached research paper."},{label:"Input",value:{topK:4,namespace:"papers"}},{label:"Retrieved docs",value:[{id:"doc-7",score:.81},{id:"doc-2",score:.77}]}]},{id:"m2-s4",nodeId:"generator",timestamp:"2026-06-02T10:05:11.220Z",payloads:[{label:"llm_input",value:"System:\nYou are a research assistant. Summarize the retrieved documents\ninto 3-4 sentences for a technical reader. Cite nothing the\ndocuments don't support.\n\nUser:\nSummarize the attached research paper.\n\nDocuments:\n[doc-7, doc-2]"},{label:"llm_output",value:"The paper proposes a sparse attention variant that scales to long contexts with near-linear cost, trading a small accuracy drop for large memory savings."}]},{id:"m2-s5",nodeId:"final_response",timestamp:"2026-06-02T10:05:11.690Z",payloads:[{label:"Output",value:"The paper proposes a sparse attention variant that scales to long contexts with near-linear cost, trading a small accuracy drop for large memory savings."}]}]},{id:"msg-3",steps:[{id:"m3-s1",nodeId:"user_input",timestamp:"2026-06-02T10:10:00.000Z",payloads:[{label:"Input",value:"Any recent news about the Mars rover?"}]},{id:"m3-s2",nodeId:"router",timestamp:"2026-06-02T10:10:00.320Z",payloads:[{label:"llm_input",value:'System:\nYou are a routing agent. Pick the next node for the request.\nOptions:\n - planner: the request needs tools or external actions\n - retriever: the request needs document lookup\nRespond as JSON: {"route": ..., "confidence": ...}\n\nUser:\nAny recent news about the Mars rover?'},{label:"llm_output",value:'{"route": "planner", "confidence": 0.9}'}]},{id:"m3-s3",nodeId:"planner",timestamp:"2026-06-02T10:10:02.180Z",payloads:[{label:"llm_input",value:"System:\nYou are a planning agent. Decompose the request into an ordered\nlist of tool calls. Use only the available tools.\nAvailable tools:\n - weather_api(city: string)\n - news_api(topic: string)\n\nUser:\nAny recent news about the Mars rover?"},{label:"llm_output",value:'{"plan": ["news_api(topic=\'Mars rover\')"]}'}]},{id:"m3-s4",nodeId:"tool_node",timestamp:"2026-06-02T10:10:05.640Z",payloads:[{label:"tool",value:"news_api(topic='Mars rover')"},{label:"tool_result",value:[{title:"Rover finds new mineral veins in crater",age_h:6},{title:"Mission extended through 2027",age_h:20}]}]},{id:"m3-s5",nodeId:"generator",timestamp:"2026-06-02T10:10:08.900Z",payloads:[{label:"llm_input",value:"System:\nYou are a helpful assistant. Summarize the tool result briefly.\n\nUser:\nAny recent news about the Mars rover?\n\nTool result:\n[mineral veins in crater (6h), mission extended to 2027 (20h)]"},{label:"llm_output",value:"Two recent items: the rover found new mineral veins in the crater, and the mission was just extended through 2027."}]},{id:"m3-s6",nodeId:"final_response",timestamp:"2026-06-02T10:10:09.270Z",payloads:[{label:"Output",value:"Two recent items: the rover found new mineral veins in the crater, and the mission was just extended through 2027."}]}]}]}},{id:"rag",title:"RAG pipeline",summary:"Embeds a medical question, retrieves docs, and answers from them.",pattern:"linear",trace:{version:"0.1",name:"rag_pipeline.json",meta:{source:"llamaindex",createdAt:"2026-05-28T14:12:00Z",description:"A retrieval-augmented generation pipeline answering a medical question. The query is embedded, matched against a drug-information knowledge base, the top hits are reranked, and a single LLM call writes the grounded answer. A clean linear flow with structured retrieval payloads."},graph:{nodes:[{id:"user_input",label:"User Input"},{id:"embedder",label:"Embedder"},{id:"vector_search",label:"Vector Search"},{id:"reranker",label:"Reranker"},{id:"generator",label:"Generator"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"embedder"},{source:"embedder",target:"vector_search"},{source:"vector_search",target:"reranker"},{source:"reranker",target:"generator"},{source:"generator",target:"final_response"}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-05-28T14:12:00.000Z",payloads:[{label:"Input",value:"What are the common side effects of ibuprofen?"}]},{id:"m1-s2",nodeId:"embedder",timestamp:"2026-05-28T14:12:00.140Z",payloads:[{label:"query",value:"What are the common side effects of ibuprofen?"},{label:"embedding",value:{model:"text-embedding-3-small",dims:1536,vector:[.0182,-.0461,.0093,.0517,-.0228,"…"]}}]},{id:"m1-s3",nodeId:"vector_search",timestamp:"2026-05-28T14:12:00.380Z",payloads:[{label:"params",value:{topK:4,namespace:"drug-info"}},{label:"matches",value:[{id:"ibuprofen#adverse",score:.89,source:"DrugBank"},{id:"nsaid#gi-effects",score:.84,source:"DrugBank"},{id:"ibuprofen#dosage",score:.71,source:"DrugBank"},{id:"nsaid#renal",score:.66,source:"DrugBank"}]}]},{id:"m1-s4",nodeId:"reranker",timestamp:"2026-05-28T14:12:00.910Z",payloads:[{label:"model",value:"rerank-3"},{label:"reranked",value:[{id:"ibuprofen#adverse",score:.97},{id:"nsaid#gi-effects",score:.93},{id:"nsaid#renal",score:.55}]}]},{id:"m1-s5",nodeId:"generator",timestamp:"2026-05-28T14:12:03.420Z",payloads:[{label:"llm_input",value:"System:\nYou are a careful medical-information assistant. Answer only from\nthe provided context. Keep it brief and add a safety note.\n\nContext:\n[ibuprofen#adverse] Common adverse effects: nausea, dyspepsia,\n abdominal pain, headache, dizziness.\n[nsaid#gi-effects] NSAIDs may cause GI bleeding with prolonged use.\n\nUser:\nWhat are the common side effects of ibuprofen?"},{label:"llm_output",value:"Common side effects of ibuprofen include nausea, indigestion, stomach pain, headache, and dizziness. Prolonged use can raise the risk of gastrointestinal bleeding. This isn't medical advice — check with a pharmacist or doctor for your situation."}]},{id:"m1-s6",nodeId:"final_response",timestamp:"2026-05-28T14:12:03.880Z",payloads:[{label:"Output",value:"Common side effects of ibuprofen include nausea, indigestion, stomach pain, headache, and dizziness. Prolonged use can raise the risk of gastrointestinal bleeding. This isn't medical advice — check with a pharmacist or doctor for your situation."}]}]},{id:"msg-2",steps:[{id:"m2-s1",nodeId:"user_input",timestamp:"2026-05-28T14:18:00.000Z",payloads:[{label:"Input",value:"Can I take ibuprofen with my blood pressure medication?"}]},{id:"m2-s2",nodeId:"embedder",timestamp:"2026-05-28T14:18:00.150Z",payloads:[{label:"query",value:"Can I take ibuprofen with my blood pressure medication?"},{label:"embedding",value:{model:"text-embedding-3-small",dims:1536,vector:[.0291,.0117,-.0382,.0044,.0265,"…"]}}]},{id:"m2-s3",nodeId:"vector_search",timestamp:"2026-05-28T14:18:00.410Z",payloads:[{label:"params",value:{topK:4,namespace:"drug-info"}},{label:"matches",value:[{id:"nsaid#interactions",score:.9,source:"DrugBank"},{id:"ibuprofen#bp-meds",score:.86,source:"DrugBank"},{id:"ibuprofen#adverse",score:.6,source:"DrugBank"}]}]},{id:"m2-s4",nodeId:"reranker",timestamp:"2026-05-28T14:18:00.930Z",payloads:[{label:"model",value:"rerank-3"},{label:"reranked",value:[{id:"ibuprofen#bp-meds",score:.96},{id:"nsaid#interactions",score:.94}]}]},{id:"m2-s5",nodeId:"generator",timestamp:"2026-05-28T14:18:03.270Z",payloads:[{label:"llm_input",value:"System:\nYou are a careful medical-information assistant. Answer only from\nthe provided context. Keep it brief and add a safety note.\n\nContext:\n[ibuprofen#bp-meds] NSAIDs can reduce the effect of ACE inhibitors\n and diuretics and may raise blood pressure.\n[nsaid#interactions] Caution combining NSAIDs with antihypertensives.\n\nUser:\nCan I take ibuprofen with my blood pressure medication?"},{label:"llm_output",value:"Ibuprofen can blunt the effect of some blood-pressure medicines (like ACE inhibitors and diuretics) and may raise blood pressure, so it's best used sparingly. Check with your doctor or pharmacist before combining them — this isn't medical advice."}]},{id:"m2-s6",nodeId:"final_response",timestamp:"2026-05-28T14:18:03.690Z",payloads:[{label:"Output",value:"Ibuprofen can blunt the effect of some blood-pressure medicines (like ACE inhibitors and diuretics) and may raise blood pressure, so it's best used sparingly. Check with your doctor or pharmacist before combining them — this isn't medical advice."}]}]},{id:"msg-3",steps:[{id:"m3-s1",nodeId:"user_input",timestamp:"2026-05-28T14:25:00.000Z",payloads:[{label:"Input",value:"What's the maximum safe daily dose of acetaminophen?"}]},{id:"m3-s2",nodeId:"embedder",timestamp:"2026-05-28T14:25:00.140Z",payloads:[{label:"query",value:"What's the maximum safe daily dose of acetaminophen?"},{label:"embedding",value:{model:"text-embedding-3-small",dims:1536,vector:[-.0123,.0408,.0091,-.0277,.0162,"…"]}}]},{id:"m3-s3",nodeId:"vector_search",timestamp:"2026-05-28T14:25:00.390Z",payloads:[{label:"params",value:{topK:4,namespace:"drug-info"}},{label:"matches",value:[{id:"acetaminophen#dosage",score:.93,source:"DrugBank"},{id:"acetaminophen#liver",score:.79,source:"DrugBank"}]}]},{id:"m3-s4",nodeId:"reranker",timestamp:"2026-05-28T14:25:00.880Z",payloads:[{label:"model",value:"rerank-3"},{label:"reranked",value:[{id:"acetaminophen#dosage",score:.98},{id:"acetaminophen#liver",score:.81}]}]},{id:"m3-s5",nodeId:"generator",timestamp:"2026-05-28T14:25:02.940Z",payloads:[{label:"llm_input",value:"System:\nYou are a careful medical-information assistant. Answer only from\nthe provided context. Keep it brief and add a safety note.\n\nContext:\n[acetaminophen#dosage] Adults: max 4,000 mg/day; many guidelines\n advise staying at or below 3,000 mg to protect the liver.\n[acetaminophen#liver] Overdose risk is hepatotoxicity.\n\nUser:\nWhat's the maximum safe daily dose of acetaminophen?"},{label:"llm_output",value:"For most adults the maximum is 4,000 mg of acetaminophen per day, though many guidelines suggest staying at or under 3,000 mg to be easier on the liver. Don't combine it with other products that also contain acetaminophen. This isn't medical advice."}]},{id:"m3-s6",nodeId:"final_response",timestamp:"2026-05-28T14:25:03.350Z",payloads:[{label:"Output",value:"For most adults the maximum is 4,000 mg of acetaminophen per day, though many guidelines suggest staying at or under 3,000 mg to be easier on the liver. Don't combine it with other products that also contain acetaminophen. This isn't medical advice."}]}]},{id:"msg-4",steps:[{id:"m4-s1",nodeId:"user_input",timestamp:"2026-05-28T14:31:00.000Z",payloads:[{label:"Input",value:"How long does amoxicillin take to start working?"}]},{id:"m4-s2",nodeId:"embedder",timestamp:"2026-05-28T14:31:00.150Z",payloads:[{label:"query",value:"How long does amoxicillin take to start working?"},{label:"embedding",value:{model:"text-embedding-3-small",dims:1536,vector:[.0205,-.0312,.0177,.0049,-.0231,"…"]}}]},{id:"m4-s3",nodeId:"vector_search",timestamp:"2026-05-28T14:31:00.400Z",payloads:[{label:"params",value:{topK:4,namespace:"drug-info"}},{label:"matches",value:[{id:"amoxicillin#onset",score:.88,source:"DrugBank"},{id:"antibiotics#course",score:.74,source:"DrugBank"}]}]},{id:"m4-s4",nodeId:"reranker",timestamp:"2026-05-28T14:31:00.910Z",payloads:[{label:"model",value:"rerank-3"},{label:"reranked",value:[{id:"amoxicillin#onset",score:.95},{id:"antibiotics#course",score:.83}]}]},{id:"m4-s5",nodeId:"generator",timestamp:"2026-05-28T14:31:03.020Z",payloads:[{label:"llm_input",value:"System:\nYou are a careful medical-information assistant. Answer only from\nthe provided context. Keep it brief and add a safety note.\n\nContext:\n[amoxicillin#onset] Begins working within hours; noticeable\n improvement usually in 48–72 hours.\n[antibiotics#course] Finish the full prescribed course.\n\nUser:\nHow long does amoxicillin take to start working?"},{label:"llm_output",value:"Amoxicillin starts acting within a few hours, but you'll usually feel noticeably better after about 48–72 hours. Finish the whole course even if you improve sooner. If you're not better in 3 days, contact your doctor. This isn't medical advice."}]},{id:"m4-s6",nodeId:"final_response",timestamp:"2026-05-28T14:31:03.440Z",payloads:[{label:"Output",value:"Amoxicillin starts acting within a few hours, but you'll usually feel noticeably better after about 48–72 hours. Finish the whole course even if you improve sooner. If you're not better in 3 days, contact your doctor. This isn't medical advice."}]}]},{id:"msg-5",steps:[{id:"m5-s1",nodeId:"user_input",timestamp:"2026-05-28T14:39:00.000Z",payloads:[{label:"Input",value:"Is it safe to take aspirin during pregnancy?"}]},{id:"m5-s2",nodeId:"embedder",timestamp:"2026-05-28T14:39:00.160Z",payloads:[{label:"query",value:"Is it safe to take aspirin during pregnancy?"},{label:"embedding",value:{model:"text-embedding-3-small",dims:1536,vector:[-.0098,.0231,.0405,-.0152,.0079,"…"]}}]},{id:"m5-s3",nodeId:"vector_search",timestamp:"2026-05-28T14:39:00.420Z",payloads:[{label:"params",value:{topK:4,namespace:"drug-info"}},{label:"matches",value:[{id:"aspirin#pregnancy",score:.92,source:"DrugBank"},{id:"nsaid#pregnancy",score:.85,source:"DrugBank"}]}]},{id:"m5-s4",nodeId:"reranker",timestamp:"2026-05-28T14:39:00.940Z",payloads:[{label:"model",value:"rerank-3"},{label:"reranked",value:[{id:"aspirin#pregnancy",score:.97},{id:"nsaid#pregnancy",score:.88}]}]},{id:"m5-s5",nodeId:"generator",timestamp:"2026-05-28T14:39:03.110Z",payloads:[{label:"llm_input",value:"System:\nYou are a careful medical-information assistant. Answer only from\nthe provided context. Keep it brief and add a safety note.\n\nContext:\n[aspirin#pregnancy] Regular-dose aspirin is generally avoided,\n especially in the third trimester; low-dose may be prescribed.\n[nsaid#pregnancy] NSAIDs are not recommended late in pregnancy.\n\nUser:\nIs it safe to take aspirin during pregnancy?"},{label:"llm_output",value:"Regular-dose aspirin is generally avoided in pregnancy, especially in the third trimester. Low-dose aspirin is sometimes prescribed for specific reasons, but only under medical supervision. Please talk to your doctor before taking it — this isn't medical advice."}]},{id:"m5-s6",nodeId:"final_response",timestamp:"2026-05-28T14:39:03.530Z",payloads:[{label:"Output",value:"Regular-dose aspirin is generally avoided in pregnancy, especially in the third trimester. Low-dose aspirin is sometimes prescribed for specific reasons, but only under medical supervision. Please talk to your doctor before taking it — this isn't medical advice."}]}]}]}},{id:"crew",title:"Multi-agent crew",summary:"An orchestrator delegates a coding task to three specialists.",pattern:"fan-out",trace:{version:"0.1",name:"multi_agent_crew.json",meta:{source:"crewai",createdAt:"2026-05-30T09:45:00Z",description:"A crew of specialist agents collaborating on a coding task. The orchestrator assigns subtasks to a researcher, a coder, and a critic that run independently, then a synthesizer combines their outputs into the final answer. Demonstrates a wide fan-out / fan-in graph."},graph:{nodes:[{id:"user_input",label:"User Input"},{id:"orchestrator",label:"Orchestrator"},{id:"researcher",label:"Researcher"},{id:"coder",label:"Coder"},{id:"critic",label:"Critic"},{id:"synthesizer",label:"Synthesizer"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"orchestrator"},{source:"orchestrator",target:"researcher"},{source:"orchestrator",target:"coder"},{source:"orchestrator",target:"critic"},{source:"researcher",target:"synthesizer"},{source:"coder",target:"synthesizer"},{source:"critic",target:"synthesizer"},{source:"synthesizer",target:"final_response"}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-05-30T09:45:00.000Z",payloads:[{label:"Input",value:"Write a Python function to detect palindromes and explain it."}]},{id:"m1-s2",nodeId:"orchestrator",timestamp:"2026-05-30T09:45:00.520Z",payloads:[{label:"llm_input",value:"System:\nYou are the orchestrator. Break the task into subtasks for the\nresearcher, coder, and critic. Respond as JSON.\n\nUser:\nWrite a Python function to detect palindromes and explain it."},{label:"llm_output",value:'{"researcher": "define palindrome + edge cases", "coder": "implement is_palindrome(s)", "critic": "review correctness + style"}'}]},{id:"m1-s3",nodeId:"researcher",timestamp:"2026-05-30T09:45:02.110Z",payloads:[{label:"llm_input",value:"System: You are the researcher. Define the problem precisely.\n\nTask: define palindrome + edge cases"},{label:"llm_output",value:"A palindrome reads the same forwards and backwards. Edge cases: case-insensitivity, ignoring spaces/punctuation, and treating the empty string as a palindrome."}]},{id:"m1-s4",nodeId:"coder",timestamp:"2026-05-30T09:45:03.470Z",payloads:[{label:"llm_input",value:"System: You are the coder. Implement the function in Python.\n\nTask: implement is_palindrome(s)"},{label:"llm_output",value:"def is_palindrome(s: str) -> bool:\n cleaned = [c.lower() for c in s if c.isalnum()]\n return cleaned == cleaned[::-1]"}]},{id:"m1-s5",nodeId:"critic",timestamp:"2026-05-30T09:45:04.880Z",payloads:[{label:"llm_input",value:"System: You are the critic. Review the implementation.\n\nTask: review correctness + style"},{label:"llm_output",value:"Correct and handles the edge cases. Clean and idiomatic. Optional: a two-pointer scan avoids building a reversed copy."}]},{id:"m1-s6",nodeId:"synthesizer",timestamp:"2026-05-30T09:45:06.300Z",payloads:[{label:"llm_input",value:"System: You are the synthesizer. Combine the researcher's notes,\nthe coder's function, and the critic's review into one answer.\n\nResearcher: <definition + edge cases>\nCoder: <is_palindrome implementation>\nCritic: <approved, suggested two-pointer>"},{label:"llm_output",value:"Here's a palindrome checker that ignores case and non-alphanumeric characters:\n\ndef is_palindrome(s: str) -> bool:\n cleaned = [c.lower() for c in s if c.isalnum()]\n return cleaned == cleaned[::-1]\n\nIt normalizes the string, then checks it against its reverse."}]},{id:"m1-s7",nodeId:"final_response",timestamp:"2026-05-30T09:45:06.720Z",payloads:[{label:"Output",value:"Here's a palindrome checker that ignores case and non-alphanumeric characters:\n\ndef is_palindrome(s: str) -> bool:\n cleaned = [c.lower() for c in s if c.isalnum()]\n return cleaned == cleaned[::-1]\n\nIt normalizes the string, then checks it against its reverse."}]}]},{id:"msg-2",steps:[{id:"m2-s1",nodeId:"user_input",timestamp:"2026-05-30T09:50:00.000Z",payloads:[{label:"Input",value:"Write a Python function to check if a number is prime."}]},{id:"m2-s2",nodeId:"orchestrator",timestamp:"2026-05-30T09:50:00.480Z",payloads:[{label:"llm_input",value:"System:\nYou are the orchestrator. Break the task into subtasks for the\nresearcher, coder, and critic. Respond as JSON.\n\nUser:\nWrite a Python function to check if a number is prime."},{label:"llm_output",value:'{"researcher": "define primality + edge cases", "coder": "implement is_prime(n)", "critic": "review correctness + efficiency"}'}]},{id:"m2-s3",nodeId:"researcher",timestamp:"2026-05-30T09:50:01.960Z",payloads:[{label:"llm_input",value:"System: You are the researcher. Define the problem precisely.\n\nTask: define primality + edge cases"},{label:"llm_output",value:"A prime is an integer > 1 divisible only by 1 and itself. Edge cases: numbers ≤ 1 are not prime; 2 is the only even prime. You only need to test divisors up to √n."}]},{id:"m2-s4",nodeId:"coder",timestamp:"2026-05-30T09:50:03.310Z",payloads:[{label:"llm_input",value:"System: You are the coder. Implement the function in Python.\n\nTask: implement is_prime(n)"},{label:"llm_output",value:"def is_prime(n: int) -> bool:\n if n < 2:\n return False\n i = 2\n while i * i <= n:\n if n % i == 0:\n return False\n i += 1\n return True"}]},{id:"m2-s5",nodeId:"critic",timestamp:"2026-05-30T09:50:04.690Z",payloads:[{label:"llm_input",value:"System: You are the critic. Review the implementation.\n\nTask: review correctness + efficiency"},{label:"llm_output",value:"Correct, and the √n bound keeps it efficient. Handles n < 2. Optional micro-optimization: special-case 2, then step odds only."}]},{id:"m2-s6",nodeId:"synthesizer",timestamp:"2026-05-30T09:50:06.020Z",payloads:[{label:"llm_input",value:"System: You are the synthesizer. Combine the researcher's notes,\nthe coder's function, and the critic's review into one answer.\n\nResearcher: <primality + edge cases>\nCoder: <is_prime implementation>\nCritic: <approved, √n bound is efficient>"},{label:"llm_output",value:"Here's an efficient primality check:\n\ndef is_prime(n: int) -> bool:\n if n < 2:\n return False\n i = 2\n while i * i <= n:\n if n % i == 0:\n return False\n i += 1\n return True\n\nIt rejects numbers below 2 and only tests divisors up to √n."}]},{id:"m2-s7",nodeId:"final_response",timestamp:"2026-05-30T09:50:06.450Z",payloads:[{label:"Output",value:"Here's an efficient primality check:\n\ndef is_prime(n: int) -> bool:\n if n < 2:\n return False\n i = 2\n while i * i <= n:\n if n % i == 0:\n return False\n i += 1\n return True\n\nIt rejects numbers below 2 and only tests divisors up to √n."}]}]}]}},{id:"plan-execute",title:"Plan & execute",summary:"Plans a trip, runs each step with tools, and replans in a loop.",pattern:"loop",trace:{version:"0.1",name:"plan_and_execute.json",meta:{source:"langgraph",createdAt:"2026-06-01T16:20:00Z",description:"A plan-and-execute agent planning a weekend trip. The planner produces a JSON plan, the executor runs each step with a tool, and the replanner loops back until the plan is complete. Shows a structured plan payload and a back-edge (replan loop) in the graph."},graph:{nodes:[{id:"user_input",label:"User Input"},{id:"planner",label:"Planner"},{id:"executor",label:"Executor"},{id:"replanner",label:"Replanner"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"planner"},{source:"planner",target:"executor"},{source:"executor",target:"replanner"},{source:"replanner",target:"executor",conditional:!0},{source:"replanner",target:"final_response",conditional:!0}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-06-01T16:20:00.000Z",payloads:[{label:"Input",value:"Plan a weekend trip to Rome for two."}]},{id:"m1-s2",nodeId:"planner",timestamp:"2026-06-01T16:20:01.040Z",payloads:[{label:"llm_input",value:"System:\nYou are a planning agent. Produce an ordered JSON plan of tool\nsteps. Tools: search_flights(origin, dest), search_hotels(city).\n\nUser:\nPlan a weekend trip to Rome for two."},{label:"llm_output",value:"{\"plan\": [\"search_flights(origin='BER', dest='FCO')\", \"search_hotels(city='Rome')\"]}"}]},{id:"m1-s3",nodeId:"executor",timestamp:"2026-06-01T16:20:02.560Z",payloads:[{label:"step",value:"search_flights(origin='BER', dest='FCO')"},{label:"tool_result",value:{outbound:"BER→FCO Sat 08:10",return:"FCO→BER Sun 19:40",price_eur:184}}]},{id:"m1-s4",nodeId:"replanner",timestamp:"2026-06-01T16:20:03.910Z",payloads:[{label:"llm_input",value:"System: Given the plan and completed steps, decide the next\naction: continue with the next step or finish.\n\nCompleted: [search_flights] ✓\nRemaining: [search_hotels]"},{label:"llm_output",value:'{"decision": "continue", "next": "search_hotels(city=\'Rome\')"}'}]},{id:"m1-s5",nodeId:"executor",timestamp:"2026-06-01T16:20:05.230Z",payloads:[{label:"step",value:"search_hotels(city='Rome')"},{label:"tool_result",value:{hotel:"Trastevere Boutique",nights:2,price_eur:312,rating:4.6}}]},{id:"m1-s6",nodeId:"replanner",timestamp:"2026-06-01T16:20:06.480Z",payloads:[{label:"llm_input",value:"System: Given the plan and completed steps, decide the next\naction: continue with the next step or finish.\n\nCompleted: [search_flights, search_hotels] ✓\nRemaining: []"},{label:"llm_output",value:'{"decision": "finish"}'}]},{id:"m1-s7",nodeId:"final_response",timestamp:"2026-06-01T16:20:07.010Z",payloads:[{label:"Output",value:"Your Rome weekend: fly BER→FCO Sat 08:10, return Sun 19:40 (€184), and stay 2 nights at the Trastevere Boutique (4.6★, €312). Total ≈ €496 for two."}]}]},{id:"msg-2",steps:[{id:"m2-s1",nodeId:"user_input",timestamp:"2026-06-01T16:30:00.000Z",payloads:[{label:"Input",value:"Plan a day hike near Munich for Saturday."}]},{id:"m2-s2",nodeId:"planner",timestamp:"2026-06-01T16:30:01.120Z",payloads:[{label:"llm_input",value:"System:\nYou are a planning agent. Produce an ordered JSON plan of tool\nsteps. Tools: search_trails(near, max_km), check_weather(place, day).\n\nUser:\nPlan a day hike near Munich for Saturday."},{label:"llm_output",value:"{\"plan\": [\"search_trails(near='Munich', max_km=60)\", \"check_weather(place='Tegernsee', day='Sat')\"]}"}]},{id:"m2-s3",nodeId:"executor",timestamp:"2026-06-01T16:30:02.580Z",payloads:[{label:"step",value:"search_trails(near='Munich', max_km=60)"},{label:"tool_result",value:{trail:"Tegernsee – Wallberg loop",distance_km:11,ascent_m:850,drive_min:55}}]},{id:"m2-s4",nodeId:"replanner",timestamp:"2026-06-01T16:30:03.840Z",payloads:[{label:"llm_input",value:"System: Given the plan and completed steps, decide the next\naction: continue with the next step or finish.\n\nCompleted: [search_trails] ✓\nRemaining: [check_weather]"},{label:"llm_output",value:'{"decision": "continue", "next": "check_weather(place=\'Tegernsee\', day=\'Sat\')"}'}]},{id:"m2-s5",nodeId:"executor",timestamp:"2026-06-01T16:30:05.210Z",payloads:[{label:"step",value:"check_weather(place='Tegernsee', day='Sat')"},{label:"tool_result",value:{conditions:"sunny",high_c:21,rain_chance:.1}}]},{id:"m2-s6",nodeId:"replanner",timestamp:"2026-06-01T16:30:06.470Z",payloads:[{label:"llm_input",value:"System: Given the plan and completed steps, decide the next\naction: continue with the next step or finish.\n\nCompleted: [search_trails, check_weather] ✓\nRemaining: []"},{label:"llm_output",value:'{"decision": "finish"}'}]},{id:"m2-s7",nodeId:"final_response",timestamp:"2026-06-01T16:30:06.990Z",payloads:[{label:"Output",value:"For Saturday: the Tegernsee–Wallberg loop (11 km, 850 m ascent, ~55 min drive from Munich). Weather looks great — sunny, 21°C, 10% chance of rain. Pack water and sun protection."}]}]}]}},{id:"self-correcting-code",title:"Self-correcting code",summary:"Writes code, runs tests, and patches itself until they pass.",pattern:"test loop",trace:{version:"0.1",name:"self_correcting_code.json",meta:{source:"custom",createdAt:"2026-06-03T11:30:00Z",description:"A code agent that writes a function, runs the tests, and fixes itself when they fail. The first attempt fails one test; the agent patches the bug and the second run passes. Shows a fail→fix→pass loop with real test-runner output."},graph:{nodes:[{id:"user_input",label:"User Input"},{id:"coder",label:"Coder"},{id:"test_runner",label:"Test Runner"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"coder"},{source:"coder",target:"test_runner"},{source:"test_runner",target:"coder",conditional:!0},{source:"test_runner",target:"final_response",conditional:!0}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-06-03T11:30:00.000Z",payloads:[{label:"Input",value:"Implement median(nums) so all tests pass. Tests cover odd- and even-length lists."}]},{id:"m1-s2",nodeId:"coder",timestamp:"2026-06-03T11:30:01.220Z",payloads:[{label:"llm_input",value:"System: Write median(nums) in Python. Return only code.\n\nUser: Implement median(nums) so all tests pass."},{label:"llm_output",value:"def median(nums):\n s = sorted(nums)\n return s[len(s) // 2]"}]},{id:"m1-s3",nodeId:"test_runner",timestamp:"2026-06-03T11:30:02.640Z",payloads:[{label:"command",value:"pytest -q test_median.py"},{label:"result",value:{passed:1,failed:1,report:"test_odd PASSED\ntest_even FAILED\n assert median([1, 2, 3, 4]) == 2.5\n got 3"}}]},{id:"m1-s4",nodeId:"coder",timestamp:"2026-06-03T11:30:04.180Z",payloads:[{label:"llm_input",value:"System: A test failed. Fix the function.\n\nFailure: median([1,2,3,4]) returned 3, expected 2.5\nCurrent code:\ndef median(nums):\n s = sorted(nums)\n return s[len(s) // 2]"},{label:"llm_output",value:"def median(nums):\n s = sorted(nums)\n n = len(s)\n mid = n // 2\n if n % 2:\n return s[mid]\n return (s[mid - 1] + s[mid]) / 2"}]},{id:"m1-s5",nodeId:"test_runner",timestamp:"2026-06-03T11:30:05.910Z",payloads:[{label:"command",value:"pytest -q test_median.py"},{label:"result",value:{passed:2,failed:0,report:"test_odd PASSED\ntest_even PASSED\n2 passed in 0.04s"}}]},{id:"m1-s6",nodeId:"final_response",timestamp:"2026-06-03T11:30:06.300Z",payloads:[{label:"Output",value:"Fixed median(nums) to average the two middle values on even-length lists. All tests pass:\n\ndef median(nums):\n s = sorted(nums)\n n = len(s)\n mid = n // 2\n if n % 2:\n return s[mid]\n return (s[mid - 1] + s[mid]) / 2"}]}]},{id:"msg-2",steps:[{id:"m2-s1",nodeId:"user_input",timestamp:"2026-06-03T11:40:00.000Z",payloads:[{label:"Input",value:"Implement is_leap_year(y) so all tests pass. Tests cover 2000, 1900, and 2024."}]},{id:"m2-s2",nodeId:"coder",timestamp:"2026-06-03T11:40:01.260Z",payloads:[{label:"llm_input",value:"System: Write is_leap_year(y) in Python. Return only code.\n\nUser: Implement is_leap_year(y) so all tests pass."},{label:"llm_output",value:"def is_leap_year(y):\n return y % 4 == 0"}]},{id:"m2-s3",nodeId:"test_runner",timestamp:"2026-06-03T11:40:02.700Z",payloads:[{label:"command",value:"pytest -q test_leap.py"},{label:"result",value:{passed:2,failed:1,report:"test_2024 PASSED\ntest_2000 PASSED\ntest_1900 FAILED\n assert is_leap_year(1900) == False\n got True"}}]},{id:"m2-s4",nodeId:"coder",timestamp:"2026-06-03T11:40:04.220Z",payloads:[{label:"llm_input",value:"System: A test failed. Fix the function.\n\nFailure: is_leap_year(1900) returned True, expected False\nCurrent code:\ndef is_leap_year(y):\n return y % 4 == 0"},{label:"llm_output",value:"def is_leap_year(y):\n return y % 4 == 0 and (y % 100 != 0 or y % 400 == 0)"}]},{id:"m2-s5",nodeId:"test_runner",timestamp:"2026-06-03T11:40:05.960Z",payloads:[{label:"command",value:"pytest -q test_leap.py"},{label:"result",value:{passed:3,failed:0,report:"test_2024 PASSED\ntest_2000 PASSED\ntest_1900 PASSED\n3 passed in 0.03s"}}]},{id:"m2-s6",nodeId:"final_response",timestamp:"2026-06-03T11:40:06.380Z",payloads:[{label:"Output",value:"Added the century rule (divisible by 100 isn't a leap year unless also divisible by 400). All tests pass:\n\ndef is_leap_year(y):\n return y % 4 == 0 and (y % 100 != 0 or y % 400 == 0)"}]}]}]}},{id:"university-consultant",title:"University consultant",summary:"Routes questions across navigation, advising, and courses — with a prereq escalation and a clarify loop.",pattern:"branch + loop",trace:{version:"0.1",name:"university_consultant.json",meta:{source:"langgraph",createdAt:"2026-06-06T09:00:00Z",description:"A university advising assistant. An intent classifier routes each student question to a campus-navigation, advising, or course branch. The course branch checks prerequisites and escalates to a human advisor when they aren't met; an unclear question loops through a clarifier and back to the classifier. Four runs exercise the fan-out, the nested eligibility branch, the escalation exit, and the clarify loop."},graph:{nodes:[{id:"user_input",label:"Student"},{id:"classifier",label:"Intent Classifier"},{id:"clarifier",label:"Clarify"},{id:"campus_guide",label:"Campus Guide"},{id:"advising_desk",label:"Advising Desk"},{id:"course_catalog",label:"Course Catalog"},{id:"eligibility_check",label:"Eligibility Check"},{id:"advisor_escalation",label:"Advisor Escalation"},{id:"responder",label:"Responder"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"classifier"},{source:"classifier",target:"clarifier",conditional:!0},{source:"classifier",target:"campus_guide",conditional:!0},{source:"classifier",target:"advising_desk",conditional:!0},{source:"classifier",target:"course_catalog",conditional:!0},{source:"clarifier",target:"classifier"},{source:"campus_guide",target:"responder"},{source:"advising_desk",target:"responder"},{source:"course_catalog",target:"eligibility_check"},{source:"eligibility_check",target:"responder",conditional:!0},{source:"eligibility_check",target:"advisor_escalation",conditional:!0},{source:"advisor_escalation",target:"final_response"},{source:"responder",target:"final_response"}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-06-06T09:00:00.000Z",payloads:[{label:"Input",value:"How do I get from the main library to the CS building?"}]},{id:"m1-s2",nodeId:"classifier",timestamp:"2026-06-06T09:00:00.300Z",payloads:[{label:"llm_input",value:'System:\nClassify the student\'s question. Respond as JSON with an intent\nof "navigation", "advising", or "courses", and a confidence.\n\nUser:\nHow do I get from the main library to the CS building?'},{label:"llm_output",value:'{"intent": "navigation", "confidence": 0.95}'}]},{id:"m1-s3",nodeId:"campus_guide",timestamp:"2026-06-06T09:00:01.620Z",payloads:[{label:"llm_input",value:"System:\nYou are the campus navigation guide. Give clear walking\ndirections using the campus map facts.\n\nMap facts:\n - Main Library is on University Square (central).\n - CS Building (Bld. 7) is north-east, ~6 min walk.\n - Path: exit library north, cross the quad, CS is past the café.\n\nUser:\nHow do I get from the main library to the CS building?"},{label:"llm_output",value:"Exit the Main Library through the north doors onto the quad, walk straight across it (past the café on your right), and the CS Building (Building 7) is the glass entrance just beyond. About a 6-minute walk."}]},{id:"m1-s4",nodeId:"responder",timestamp:"2026-06-06T09:00:02.480Z",payloads:[{label:"llm_input",value:"System: Format the branch result as a friendly final reply.\n\nBranch output:\n<walking directions from library to CS building>"},{label:"llm_output",value:"From the Main Library, head out the north doors, cross the quad past the café, and you'll reach the CS Building (Building 7) — about a 6-minute walk. 🚶"}]},{id:"m1-s5",nodeId:"final_response",timestamp:"2026-06-06T09:00:02.840Z",payloads:[{label:"Output",value:"From the Main Library, head out the north doors, cross the quad past the café, and you'll reach the CS Building (Building 7) — about a 6-minute walk. 🚶"}]}]},{id:"msg-2",steps:[{id:"m2-s1",nodeId:"user_input",timestamp:"2026-06-06T09:04:00.000Z",payloads:[{label:"Input",value:"Can I register for Algorithms II next term?"}]},{id:"m2-s2",nodeId:"classifier",timestamp:"2026-06-06T09:04:00.280Z",payloads:[{label:"llm_input",value:'System:\nClassify the student\'s question. Respond as JSON with an intent\nof "navigation", "advising", or "courses", and a confidence.\n\nUser:\nCan I register for Algorithms II next term?'},{label:"llm_output",value:'{"intent": "courses", "confidence": 0.96}'}]},{id:"m2-s3",nodeId:"course_catalog",timestamp:"2026-06-06T09:04:00.910Z",payloads:[{label:"query",value:{course:"Algorithms II",term:"Fall 2026"}},{label:"record",value:{code:"CS-302",title:"Algorithms II",credits:6,prerequisites:["CS-201 Algorithms I","CS-110 Discrete Math"],schedule:"Tue/Thu 10:15–11:45, Bld. 7 Room 204"}}]},{id:"m2-s4",nodeId:"eligibility_check",timestamp:"2026-06-06T09:04:01.340Z",payloads:[{label:"student_record",value:{id:"stu-4471",completed:["CS-201 Algorithms I","CS-110 Discrete Math","MA-140 Calculus"]}},{label:"decision",value:{eligible:!0,missing:[]}}]},{id:"m2-s5",nodeId:"responder",timestamp:"2026-06-06T09:04:02.560Z",payloads:[{label:"llm_input",value:"System: Format the branch result as a friendly final reply.\n\nBranch output:\nCS-302 Algorithms II — eligible (both prereqs met); 6 credits;\nTue/Thu 10:15, Bld. 7 Room 204."},{label:"llm_output",value:"You're all set to register for Algorithms II (CS-302) — you've completed both prerequisites (CS-201 and CS-110). It's 6 credits, Tuesdays and Thursdays 10:15–11:45 in Building 7, Room 204."}]},{id:"m2-s6",nodeId:"final_response",timestamp:"2026-06-06T09:04:02.930Z",payloads:[{label:"Output",value:"You're all set to register for Algorithms II (CS-302) — you've completed both prerequisites (CS-201 and CS-110). It's 6 credits, Tuesdays and Thursdays 10:15–11:45 in Building 7, Room 204."}]}]},{id:"msg-3",steps:[{id:"m3-s1",nodeId:"user_input",timestamp:"2026-06-06T09:09:00.000Z",payloads:[{label:"Input",value:"I'd like to enroll in Algorithms II."}]},{id:"m3-s2",nodeId:"classifier",timestamp:"2026-06-06T09:09:00.290Z",payloads:[{label:"llm_input",value:'System:\nClassify the student\'s question. Respond as JSON with an intent\nof "navigation", "advising", or "courses", and a confidence.\n\nUser:\nI\'d like to enroll in Algorithms II.'},{label:"llm_output",value:'{"intent": "courses", "confidence": 0.94}'}]},{id:"m3-s3",nodeId:"course_catalog",timestamp:"2026-06-06T09:09:00.880Z",payloads:[{label:"query",value:{course:"Algorithms II",term:"Fall 2026"}},{label:"record",value:{code:"CS-302",title:"Algorithms II",credits:6,prerequisites:["CS-201 Algorithms I","CS-110 Discrete Math"],schedule:"Tue/Thu 10:15–11:45, Bld. 7 Room 204"}}]},{id:"m3-s4",nodeId:"eligibility_check",timestamp:"2026-06-06T09:09:01.300Z",payloads:[{label:"student_record",value:{id:"stu-5288",completed:["CS-110 Discrete Math","MA-140 Calculus"]}},{label:"decision",value:{eligible:!1,missing:["CS-201 Algorithms I"]}}]},{id:"m3-s5",nodeId:"advisor_escalation",timestamp:"2026-06-06T09:09:01.720Z",payloads:[{label:"ticket",value:{queue:"academic-advising",student:"stu-5288",course:"CS-302",reason:"prerequisite CS-201 Algorithms I not completed"}},{label:"message",value:"Enrollment in Algorithms II needs Algorithms I (CS-201) first, which isn't on your record yet. I've referred you to academic advising — they can discuss an override or the right path."}]},{id:"m3-s6",nodeId:"final_response",timestamp:"2026-06-06T09:09:02.060Z",payloads:[{label:"Output",value:"Enrollment in Algorithms II needs Algorithms I (CS-201) first, which isn't on your record yet. I've referred you to academic advising (ticket opened) — they can discuss an override or the right path to get there."}]}]},{id:"msg-4",steps:[{id:"m4-s1",nodeId:"user_input",timestamp:"2026-06-06T09:14:00.000Z",payloads:[{label:"Input",value:"I need help with my schedule."}]},{id:"m4-s2",nodeId:"classifier",timestamp:"2026-06-06T09:14:00.300Z",payloads:[{label:"llm_input",value:'System:\nClassify the student\'s question. Respond as JSON with an intent\nof "navigation", "advising", or "courses", and a confidence.\n\nUser:\nI need help with my schedule.'},{label:"llm_output",value:'{"intent": "advising", "confidence": 0.41}'}]},{id:"m4-s3",nodeId:"clarifier",timestamp:"2026-06-06T09:14:01.180Z",payloads:[{label:"llm_input",value:"System:\nThe intent is unclear (confidence 0.41). Ask one short follow-up\nto disambiguate between navigation, courses, and advising.\n\nUser:\nI need help with my schedule."},{label:"llm_output",value:"Happy to help! Do you mean finding a room on campus, a specific course, or registering/advising for your timetable?"},{label:"student_reply",value:"Registering — I want to sort out my timetable for next term."}]},{id:"m4-s4",nodeId:"classifier",timestamp:"2026-06-06T09:14:08.640Z",payloads:[{label:"llm_input",value:'System:\nClassify the student\'s question. Respond as JSON with an intent\nof "navigation", "advising", or "courses", and a confidence.\n\nUser:\nI need help with my schedule.\nClarification: Registering — sort out my timetable for next term.'},{label:"llm_output",value:'{"intent": "advising", "confidence": 0.93}'}]},{id:"m4-s5",nodeId:"advising_desk",timestamp:"2026-06-06T09:14:09.910Z",payloads:[{label:"llm_input",value:"System:\nYou are the registration & advising desk. Answer using the\nadvising facts.\n\nAdvising facts:\n - Fall 2026 registration opens Mon 14 Jul, 09:00.\n - Your enrollment window: 14–25 Jul; holds must be cleared first.\n - Drop/add runs through the first two weeks of term.\n\nUser:\nRegistering — sort out my timetable for next term."},{label:"llm_output",value:"Fall 2026 registration opens Monday 14 July at 09:00, and your enrollment window runs 14–25 July. Clear any account holds before then, and remember you can still drop/add during the first two weeks of term."}]},{id:"m4-s6",nodeId:"responder",timestamp:"2026-06-06T09:14:10.870Z",payloads:[{label:"llm_input",value:"System: Format the branch result as a friendly final reply.\n\nBranch output:\nRegistration opens 14 Jul 09:00; window 14–25 Jul; clear holds;\ndrop/add first two weeks."},{label:"llm_output",value:"To sort your timetable: registration opens Monday 14 July at 9 am and your window is 14–25 July. Clear any holds on your account first, and you can still adjust things during drop/add in the first two weeks of term. 📅"}]},{id:"m4-s7",nodeId:"final_response",timestamp:"2026-06-06T09:14:11.250Z",payloads:[{label:"Output",value:"To sort your timetable: registration opens Monday 14 July at 9 am and your window is 14–25 July. Clear any holds on your account first, and you can still adjust things during drop/add in the first two weeks of term. 📅"}]}]}]}},{id:"text-to-sql",title:"Text to SQL",summary:"Generates SQL, repairs it from the DB error when it fails, then explains the result.",pattern:"repair loop",trace:{version:"0.1",name:"text_to_sql.json",meta:{source:"custom",createdAt:"2026-06-05T10:15:00Z",description:"A text-to-SQL agent answering an analytics question. It inspects the schema, generates a SQL query, and runs it. When the database rejects the query, the agent reads the error, repairs the SQL, and retries before writing a plain-language answer. Shows a generate→run→repair→retry loop with a generated-SQL payload and a tabular result set."},graph:{nodes:[{id:"user_input",label:"User Input"},{id:"schema_lookup",label:"Schema Lookup"},{id:"sql_generator",label:"SQL Generator"},{id:"db_executor",label:"DB Executor"},{id:"sql_repair",label:"SQL Repair"},{id:"answer_writer",label:"Answer Writer"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"schema_lookup"},{source:"schema_lookup",target:"sql_generator"},{source:"sql_generator",target:"db_executor"},{source:"db_executor",target:"sql_repair",conditional:!0},{source:"db_executor",target:"answer_writer",conditional:!0},{source:"sql_repair",target:"db_executor"},{source:"answer_writer",target:"final_response"}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-06-05T10:15:00.000Z",payloads:[{label:"Input",value:"Which 3 products sold the most units last quarter?"}]},{id:"m1-s2",nodeId:"schema_lookup",timestamp:"2026-06-05T10:15:00.260Z",payloads:[{label:"tables",value:{order_items:["order_id","product_id","quantity"],orders:["id","created_at"],products:["id","name"]}}]},{id:"m1-s3",nodeId:"sql_generator",timestamp:"2026-06-05T10:15:01.840Z",payloads:[{label:"llm_input",value:"System: Write a single SQL query for the question using the\ngiven schema. 'Last quarter' = 2026-Q1.\n\nSchema:\n order_items(order_id, product_id, quantity)\n orders(id, created_at)\n products(id, name)\n\nUser: Which 3 products sold the most units last quarter?"},{label:"llm_output",value:"SELECT p.name, SUM(oi.quantity) AS units\nFROM order_items oi\nJOIN orders o ON o.id = oi.order_id\nJOIN products p ON p.id = oi.product_id\nWHERE o.created_at >= '2026-01-01' AND o.created_at < '2026-04-01'\nGROUP BY p.name\nORDER BY units DESC\nLIMIT 3;"}]},{id:"m1-s4",nodeId:"db_executor",timestamp:"2026-06-05T10:15:02.190Z",payloads:[{label:"status",value:"ok"},{label:"rows_returned",value:3},{label:"result",value:[{name:"Aero Water Bottle",units:4120},{name:"Trail Runner Socks",units:3987},{name:"Cloud Pillow",units:3540}]}]},{id:"m1-s5",nodeId:"answer_writer",timestamp:"2026-06-05T10:15:03.470Z",payloads:[{label:"llm_input",value:"System: Answer the user's question in one sentence from the rows.\n\nRows:\n Aero Water Bottle — 4120\n Trail Runner Socks — 3987\n Cloud Pillow — 3540"},{label:"llm_output",value:"Last quarter's top sellers were the Aero Water Bottle (4,120 units), Trail Runner Socks (3,987), and Cloud Pillow (3,540)."}]},{id:"m1-s6",nodeId:"final_response",timestamp:"2026-06-05T10:15:03.880Z",payloads:[{label:"Output",value:"Last quarter's top sellers were the Aero Water Bottle (4,120 units), Trail Runner Socks (3,987), and Cloud Pillow (3,540)."}]}]},{id:"msg-2",steps:[{id:"m2-s1",nodeId:"user_input",timestamp:"2026-06-05T10:22:00.000Z",payloads:[{label:"Input",value:"What was our total revenue for each quarter in 2025?"}]},{id:"m2-s2",nodeId:"schema_lookup",timestamp:"2026-06-05T10:22:00.240Z",payloads:[{label:"tables",value:{orders:["id","created_at","total_cents","status"]}}]},{id:"m2-s3",nodeId:"sql_generator",timestamp:"2026-06-05T10:22:01.770Z",payloads:[{label:"llm_input",value:"System: Write a single SQL query for the question using the\ngiven schema. Only count paid orders (status = 'paid').\n\nSchema:\n orders(id, created_at, total_cents, status)\n\nUser: What was our total revenue for each quarter in 2025?"},{label:"llm_output",value:"SELECT EXTRACT(QUARTER FROM created_at) AS quarter,\n SUM(total_amount) / 100.0 AS revenue\nFROM orders\nWHERE status = 'paid'\n AND created_at >= '2025-01-01' AND created_at < '2026-01-01'\nGROUP BY quarter\nORDER BY quarter;"}]},{id:"m2-s4",nodeId:"db_executor",timestamp:"2026-06-05T10:22:02.130Z",payloads:[{label:"status",value:"error"},{label:"error",value:{code:"42703",message:'column "total_amount" does not exist',hint:"Perhaps you meant to reference the column orders.total_cents."}}]},{id:"m2-s5",nodeId:"sql_repair",timestamp:"2026-06-05T10:22:03.520Z",payloads:[{label:"llm_input",value:'System: The query failed. Fix it using the schema and the error.\nReturn only the corrected SQL.\n\nSchema:\n orders(id, created_at, total_cents, status)\n\nError: column "total_amount" does not exist\n (hint: did you mean orders.total_cents?)\n\nFailed SQL:\n SUM(total_amount) / 100.0 AS revenue'},{label:"llm_output",value:"SELECT EXTRACT(QUARTER FROM created_at) AS quarter,\n SUM(total_cents) / 100.0 AS revenue\nFROM orders\nWHERE status = 'paid'\n AND created_at >= '2025-01-01' AND created_at < '2026-01-01'\nGROUP BY quarter\nORDER BY quarter;"}]},{id:"m2-s6",nodeId:"db_executor",timestamp:"2026-06-05T10:22:03.910Z",payloads:[{label:"status",value:"ok"},{label:"rows_returned",value:4},{label:"result",value:[{quarter:1,revenue:184320.5},{quarter:2,revenue:201475},{quarter:3,revenue:198640.25},{quarter:4,revenue:256910.75}]}]},{id:"m2-s7",nodeId:"answer_writer",timestamp:"2026-06-05T10:22:05.210Z",payloads:[{label:"llm_input",value:"System: Answer the user's question in one sentence from the rows.\n\nRows:\n Q1 184320.50\n Q2 201475.00\n Q3 198640.25\n Q4 256910.75"},{label:"llm_output",value:"2025 revenue by quarter: Q1 $184,320.50, Q2 $201,475.00, Q3 $198,640.25, and Q4 $256,910.75 — the strongest quarter."}]},{id:"m2-s8",nodeId:"final_response",timestamp:"2026-06-05T10:22:05.620Z",payloads:[{label:"Output",value:"2025 revenue by quarter: Q1 $184,320.50, Q2 $201,475.00, Q3 $198,640.25, and Q4 $256,910.75 — the strongest quarter."}]}]}]}},{id:"guardrails",title:"Guardrails",summary:"Screens requests, refusing unsafe ones and answering benign ones.",pattern:"branching",trace:{version:"0.1",name:"guardrails.json",meta:{source:"custom",createdAt:"2026-06-06T18:40:00Z",description:"A safety-gated assistant. A classifier screens each request and routes it to a polite refusal or to the normal generator. The first run is blocked; the second, a benign rephrasing, is answered. Shows the unhappy/blocked path alongside the allowed one."},graph:{nodes:[{id:"user_input",label:"User Input"},{id:"safety_classifier",label:"Safety Classifier"},{id:"refusal",label:"Refusal"},{id:"generator",label:"Generator"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"safety_classifier"},{source:"safety_classifier",target:"refusal",conditional:!0},{source:"safety_classifier",target:"generator",conditional:!0},{source:"refusal",target:"final_response"},{source:"generator",target:"final_response"}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-06-06T18:40:00.000Z",payloads:[{label:"Input",value:"How do I pick the lock on someone else's car?"}]},{id:"m1-s2",nodeId:"safety_classifier",timestamp:"2026-06-06T18:40:00.310Z",payloads:[{label:"llm_input",value:pd+"\n\nUser: How do I pick the lock on someone else's car?"},{label:"llm_output",value:'{"route": "refuse", "category": "physical-harm/theft", "reason": "facilitates unauthorized entry"}'}]},{id:"m1-s3",nodeId:"refusal",timestamp:"2026-06-06T18:40:01.020Z",payloads:[{label:"llm_input",value:"System: The request was blocked (theft). Write a brief, polite\nrefusal and offer a safe alternative.\n\nBlocked request: picking someone else's car lock"},{label:"llm_output",value:"I can't help with getting into a vehicle that isn't yours. If you're locked out of your own car, contact a licensed locksmith or roadside assistance and have proof of ownership ready."}]},{id:"m1-s4",nodeId:"final_response",timestamp:"2026-06-06T18:40:01.380Z",payloads:[{label:"Output",value:"I can't help with getting into a vehicle that isn't yours. If you're locked out of your own car, contact a licensed locksmith or roadside assistance and have proof of ownership ready."}]}]},{id:"msg-2",steps:[{id:"m2-s1",nodeId:"user_input",timestamp:"2026-06-06T18:42:10.000Z",payloads:[{label:"Input",value:"How do I choose a good padlock for my shed?"}]},{id:"m2-s2",nodeId:"safety_classifier",timestamp:"2026-06-06T18:42:10.290Z",payloads:[{label:"llm_input",value:pd+"\n\nUser: How do I choose a good padlock for my shed?"},{label:"llm_output",value:'{"route": "allow", "category": "benign/home-security", "reason": "general safety advice"}'}]},{id:"m2-s3",nodeId:"generator",timestamp:"2026-06-06T18:42:11.640Z",payloads:[{label:"llm_input",value:"System: You are a helpful assistant. Answer concisely.\n\nUser: How do I choose a good padlock for my shed?"},{label:"llm_output",value:"Look for a weatherproof padlock with a hardened-steel shackle, a boron or laminated body, and a high security rating (e.g. CEN 4+). A shrouded shackle resists bolt cutters better for outdoor use."}]},{id:"m2-s4",nodeId:"final_response",timestamp:"2026-06-06T18:42:12.010Z",payloads:[{label:"Output",value:"Look for a weatherproof padlock with a hardened-steel shackle, a boron or laminated body, and a high security rating (e.g. CEN 4+). A shrouded shackle resists bolt cutters better for outdoor use."}]}]},{id:"msg-3",steps:[{id:"m3-s1",nodeId:"user_input",timestamp:"2026-06-06T18:45:30.000Z",payloads:[{label:"Input",value:"Write a phishing email to get someone's online banking password."}]},{id:"m3-s2",nodeId:"safety_classifier",timestamp:"2026-06-06T18:45:30.320Z",payloads:[{label:"llm_input",value:pd+"\n\nUser: Write a phishing email to get someone's online banking password."},{label:"llm_output",value:'{"route": "refuse", "category": "fraud/credential-theft", "reason": "facilitates phishing"}'}]},{id:"m3-s3",nodeId:"refusal",timestamp:"2026-06-06T18:45:31.040Z",payloads:[{label:"llm_input",value:"System: The request was blocked (phishing). Write a brief, polite\nrefusal and offer a safe alternative.\n\nBlocked request: phishing email for banking credentials"},{label:"llm_output",value:"I can't help create phishing or any content meant to steal someone's credentials. If you're trying to test your own team's awareness, use a sanctioned security-training platform with clear consent."}]},{id:"m3-s4",nodeId:"final_response",timestamp:"2026-06-06T18:45:31.400Z",payloads:[{label:"Output",value:"I can't help create phishing or any content meant to steal someone's credentials. If you're trying to test your own team's awareness, use a sanctioned security-training platform with clear consent."}]}]}]}},{id:"deep-research",title:"Deep research agent",summary:"Searches, loops back to gather more, then revises through a writer/critic loop.",pattern:"loops",trace:{version:"0.1",name:"deep_research.json",meta:{source:"langgraph",createdAt:"2026-06-06T20:00:00Z",description:"An autonomous research agent. It plans a search, gathers sources, synthesizes the findings, and checks for gaps — looping back to research more when coverage is thin. Once satisfied it drafts a briefing and revises it through a writer/critic loop. Two loops of different sizes (a wide research cycle and a tight revision cycle) make the graph."},graph:{nodes:[{id:"user_input",label:"User Input"},{id:"planner",label:"Planner"},{id:"searcher",label:"Searcher"},{id:"synthesizer",label:"Synthesizer"},{id:"gap_analyzer",label:"Gap Analyzer"},{id:"writer",label:"Writer"},{id:"critic",label:"Critic"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"planner"},{source:"planner",target:"searcher"},{source:"searcher",target:"synthesizer"},{source:"synthesizer",target:"gap_analyzer"},{source:"gap_analyzer",target:"planner",conditional:!0},{source:"gap_analyzer",target:"writer",conditional:!0},{source:"writer",target:"critic"},{source:"critic",target:"writer",conditional:!0},{source:"critic",target:"final_response",conditional:!0}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-06-06T20:00:00.000Z",payloads:[{label:"Input",value:"Write a short briefing on the current state of solid-state batteries."}]},{id:"m1-s2",nodeId:"planner",timestamp:"2026-06-06T20:00:00.420Z",payloads:[{label:"llm_input",value:"System:\nYou are a research planner. Turn the topic into a search query.\nRespond as JSON.\n\nUser:\nWrite a short briefing on the current state of solid-state batteries."},{label:"llm_output",value:'{"round": 1, "query": "solid-state battery breakthroughs and challenges 2026"}'}]},{id:"m1-s3",nodeId:"searcher",timestamp:"2026-06-06T20:00:02.100Z",payloads:[{label:"query",value:"solid-state battery breakthroughs and challenges 2026"},{label:"results",value:[{title:"Solid-state cells hit 500 Wh/kg in lab tests",source:"web"},{title:"Interfacial resistance in sulfide electrolytes",source:"academic"},{title:"Automaker targets pilot SSB line by 2027",source:"news"}]}]},{id:"m1-s4",nodeId:"synthesizer",timestamp:"2026-06-06T20:00:04.600Z",payloads:[{label:"llm_input",value:"System: Merge the search results into concise research notes.\n\nResults: 500 Wh/kg lab cells; interfacial resistance challenge;\nautomaker pilot line targeted for 2027."},{label:"llm_output",value:"Notes: Lab cells reach ~500 Wh/kg; sulfide electrolytes promising but limited by interfacial resistance and dendrites; first pilot production lines targeted ~2027. Missing: cost and scale-up data."}]},{id:"m1-s5",nodeId:"gap_analyzer",timestamp:"2026-06-06T20:00:05.840Z",payloads:[{label:"llm_input",value:'System: Judge whether the notes cover the topic well enough to\nwrite the briefing. Respond as JSON: {"decision": "research_more"\n| "sufficient", ...}.\n\nNotes: <energy density, electrolyte challenges, 2027 pilots>'},{label:"llm_output",value:'{"decision": "research_more", "coverage": 0.6, "missing": "manufacturing cost and scale-up figures"}'}]},{id:"m1-s6",nodeId:"planner",timestamp:"2026-06-06T20:00:06.500Z",payloads:[{label:"llm_input",value:"System: Coverage was thin on cost/scale-up. Plan a focused\nsecond search. Respond as JSON.\n\nMissing: manufacturing cost and scale-up figures"},{label:"llm_output",value:'{"round": 2, "query": "solid-state battery cost per kWh and manufacturing scale-up"}'}]},{id:"m1-s7",nodeId:"searcher",timestamp:"2026-06-06T20:00:08.250Z",payloads:[{label:"query",value:"solid-state battery cost per kWh and manufacturing scale-up"},{label:"results",value:[{title:"SSB packs still ~3× Li-ion cost, falling fast",source:"web"},{title:"Roll-to-roll processing of thin solid electrolytes",source:"academic"}]}]},{id:"m1-s8",nodeId:"synthesizer",timestamp:"2026-06-06T20:00:10.700Z",payloads:[{label:"llm_input",value:"System: Update the notes with the second-round results.\n\nResults: SSB packs ~3× Li-ion cost, declining; roll-to-roll\nprocessing aids scale-up."},{label:"llm_output",value:"Updated notes: add cost (~3× Li-ion today, falling) and a scale-up path (roll-to-roll electrolyte processing). Coverage now spans performance, challenges, cost, and manufacturing."}]},{id:"m1-s9",nodeId:"gap_analyzer",timestamp:"2026-06-06T20:00:11.820Z",payloads:[{label:"llm_input",value:"System: Judge whether the notes are now sufficient.\n\nNotes: performance + challenges + cost + manufacturing"},{label:"llm_output",value:'{"decision": "sufficient", "coverage": 0.9}'}]},{id:"m1-s10",nodeId:"writer",timestamp:"2026-06-06T20:00:15.300Z",payloads:[{label:"llm_input",value:"System: Write a short briefing (3–4 sentences) from the notes.\n\nNotes: ~500 Wh/kg lab cells; interfacial resistance & dendrites;\n~3× Li-ion cost falling; roll-to-roll scale-up; pilots ~2027."},{label:"llm_output",value:"Solid-state batteries have reached ~500 Wh/kg in the lab, well above today's lithium-ion. Key hurdles remain interfacial resistance and dendrite growth, and packs still cost roughly three times as much. Pilot production lines are targeted around 2027."}]},{id:"m1-s11",nodeId:"critic",timestamp:"2026-06-06T20:00:17.600Z",payloads:[{label:"llm_input",value:'System: Review the draft for accuracy and completeness. Respond\nas JSON: {"decision": "revise" | "approved", "feedback": ...}.\n\nDraft: <solid-state briefing v1>'},{label:"llm_output",value:'{"decision": "revise", "feedback": "Good, but add a one-line outlook on timeline/risk so a reader knows what to watch."}'}]},{id:"m1-s12",nodeId:"writer",timestamp:"2026-06-06T20:00:20.100Z",payloads:[{label:"llm_input",value:"System: Revise per the critic's feedback (add an outlook line).\n\nFeedback: add a one-line timeline/risk outlook."},{label:"llm_output",value:"Solid-state batteries have reached ~500 Wh/kg in the lab, well above today's lithium-ion. Key hurdles remain interfacial resistance and dendrite growth, and packs still cost roughly three times as much. Pilot lines are targeted around 2027. Outlook: watch cost curves and yield from the first scale-up lines — those will decide whether mass-market adoption arrives late this decade."}]},{id:"m1-s13",nodeId:"critic",timestamp:"2026-06-06T20:00:21.900Z",payloads:[{label:"llm_input",value:"System: Review the revised draft.\n\nDraft: <solid-state briefing v2 with outlook>"},{label:"llm_output",value:'{"decision": "approved", "score": 0.92}'}]},{id:"m1-s14",nodeId:"final_response",timestamp:"2026-06-06T20:00:22.360Z",payloads:[{label:"Output",value:"Solid-state batteries have reached ~500 Wh/kg in the lab, well above today's lithium-ion. Key hurdles remain interfacial resistance and dendrite growth, and packs still cost roughly three times as much. Pilot lines are targeted around 2027. Outlook: watch cost curves and yield from the first scale-up lines — those will decide whether mass-market adoption arrives late this decade."}]}]}]}},{id:"it-helpdesk-router",title:"IT helpdesk router",summary:"Routes employee tickets through account, network, hardware, software, email, and security branches.",pattern:"multi-branch",trace:{version:"0.1",name:"it_helpdesk_router.json",meta:{source:"custom",createdAt:"2026-06-09T12:00:00Z",description:"An internal IT helpdesk routing agent. Each employee ticket is classified into a specialist branch such as password/MFA, network, laptop hardware, software access, email/calendar, or security incident. The branches then merge into urgency review, a resolution plan, and the final reply."},graph:{nodes:[{id:"user_input",label:"User Input"},{id:"ticket_intake",label:"Ticket Intake"},{id:"ticket_classifier",label:"Ticket Classifier"},{id:"password_mfa_path",label:"Password/MFA"},{id:"identity_check",label:"Identity Check"},{id:"account_recovery",label:"Account Recovery"},{id:"network_path",label:"Network"},{id:"site_status_check",label:"Site Status"},{id:"network_diagnostics",label:"Diagnostics"},{id:"hardware_path",label:"Laptop Hardware"},{id:"device_lookup",label:"Device Lookup"},{id:"replacement_triage",label:"Replacement Triage"},{id:"software_path",label:"Software Access"},{id:"license_check",label:"License Check"},{id:"install_request",label:"Install Request"},{id:"email_path",label:"Email/Calendar"},{id:"mailbox_check",label:"Mailbox Check"},{id:"calendar_rules_audit",label:"Rules Audit"},{id:"security_path",label:"Security Incident"},{id:"phishing_triage",label:"Phishing Triage"},{id:"containment_steps",label:"Containment"},{id:"urgency_check",label:"Urgency Check"},{id:"resolution_plan",label:"Resolution Plan"},{id:"final_response",label:"Final Response"}],edges:[{source:"user_input",target:"ticket_intake"},{source:"ticket_intake",target:"ticket_classifier"},{source:"ticket_classifier",target:"password_mfa_path",conditional:!0},{source:"ticket_classifier",target:"network_path",conditional:!0},{source:"ticket_classifier",target:"hardware_path",conditional:!0},{source:"ticket_classifier",target:"software_path",conditional:!0},{source:"ticket_classifier",target:"email_path",conditional:!0},{source:"ticket_classifier",target:"security_path",conditional:!0},{source:"password_mfa_path",target:"identity_check"},{source:"identity_check",target:"account_recovery"},{source:"account_recovery",target:"urgency_check"},{source:"network_path",target:"site_status_check"},{source:"site_status_check",target:"network_diagnostics"},{source:"network_diagnostics",target:"urgency_check"},{source:"hardware_path",target:"device_lookup"},{source:"device_lookup",target:"replacement_triage"},{source:"replacement_triage",target:"urgency_check"},{source:"software_path",target:"license_check"},{source:"license_check",target:"install_request"},{source:"install_request",target:"urgency_check"},{source:"email_path",target:"mailbox_check"},{source:"mailbox_check",target:"calendar_rules_audit"},{source:"calendar_rules_audit",target:"urgency_check"},{source:"security_path",target:"phishing_triage"},{source:"phishing_triage",target:"containment_steps"},{source:"containment_steps",target:"urgency_check"},{source:"urgency_check",target:"resolution_plan"},{source:"resolution_plan",target:"final_response"}]},messages:[{id:"msg-1",steps:[{id:"m1-s1",nodeId:"user_input",timestamp:"2026-06-09T12:00:00.000Z",payloads:[{label:"Input",value:"I forgot my password and my MFA phone was replaced yesterday. I cannot log in."}]},{id:"m1-s2",nodeId:"ticket_intake",timestamp:"2026-06-09T12:00:00.180Z",payloads:[{label:"ticket",value:{requester:"Mia Chen",department:"Finance",channel:"self-service portal",asset:"Okta account"}}]},{id:"m1-s3",nodeId:"ticket_classifier",timestamp:"2026-06-09T12:00:00.420Z",payloads:[{label:"classification",value:{route:"password_mfa_path",confidence:.96,reason:"Password reset and MFA device replacement are account recovery tasks."}}]},{id:"m1-s4",nodeId:"password_mfa_path",timestamp:"2026-06-09T12:00:00.710Z",payloads:[{label:"branch_notes",value:"Recover access without bypassing identity verification."}]},{id:"m1-s5",nodeId:"identity_check",timestamp:"2026-06-09T12:00:01.120Z",payloads:[{label:"required_checks",value:["manager approval","HR profile match","backup email verification"]}]},{id:"m1-s6",nodeId:"account_recovery",timestamp:"2026-06-09T12:00:01.680Z",payloads:[{label:"actions",value:{password_reset:"temporary reset link",mfa:"re-enroll new phone after identity check",audit_note:"MFA device changed"}}]},{id:"m1-s7",nodeId:"urgency_check",timestamp:"2026-06-09T12:00:02.120Z",payloads:[{label:"priority",value:{level:"high",reason:"Finance user blocked from work systems"}}]},{id:"m1-s8",nodeId:"resolution_plan",timestamp:"2026-06-09T12:00:02.620Z",payloads:[{label:"plan",value:["Verify identity through manager and HR profile","Send password reset link","Trigger MFA re-enrollment for the new phone"]}]},{id:"m1-s9",nodeId:"final_response",timestamp:"2026-06-09T12:00:03.020Z",payloads:[{label:"Output",value:"We will verify your identity, send a password reset, and re-enroll MFA on your new phone."}]}]},{id:"msg-2",steps:[{id:"m2-s1",nodeId:"user_input",timestamp:"2026-06-09T12:05:00.000Z",payloads:[{label:"Input",value:"The Wi-Fi keeps dropping in conference room B, but only during video calls."}]},{id:"m2-s2",nodeId:"ticket_intake",timestamp:"2026-06-09T12:05:00.190Z",payloads:[{label:"ticket",value:{location:"Conference room B",service:"Wi-Fi",impact:"video calls disconnect"}}]},{id:"m2-s3",nodeId:"ticket_classifier",timestamp:"2026-06-09T12:05:00.450Z",payloads:[{label:"classification",value:{route:"network_path",confidence:.91,reason:"Location-specific Wi-Fi drops indicate network diagnostics."}}]},{id:"m2-s4",nodeId:"network_path",timestamp:"2026-06-09T12:05:00.760Z",payloads:[{label:"branch_notes",value:"Check room access point and call bandwidth."}]},{id:"m2-s5",nodeId:"site_status_check",timestamp:"2026-06-09T12:05:01.230Z",payloads:[{label:"status",value:{building_outage:!1,affected_room:"B",access_point:"AP-2F-B"}}]},{id:"m2-s6",nodeId:"network_diagnostics",timestamp:"2026-06-09T12:05:01.860Z",payloads:[{label:"diagnostics",value:{packet_loss_percent:8.4,signal_dbm:-72,channel_utilization_percent:89}}]},{id:"m2-s7",nodeId:"urgency_check",timestamp:"2026-06-09T12:05:02.310Z",payloads:[{label:"priority",value:{level:"medium",reason:"One room affected; workaround available"}}]},{id:"m2-s8",nodeId:"resolution_plan",timestamp:"2026-06-09T12:05:02.830Z",payloads:[{label:"plan",value:["Move video calls to a lower-utilization channel","Rebalance AP-2F-B radio settings","Schedule a room test after the next firmware window"]}]},{id:"m2-s9",nodeId:"final_response",timestamp:"2026-06-09T12:05:03.240Z",payloads:[{label:"Output",value:"Conference room B has weak signal and high channel utilization. Network support will rebalance the access point and retest video calls."}]}]},{id:"msg-3",steps:[{id:"m3-s1",nodeId:"user_input",timestamp:"2026-06-09T12:10:00.000Z",payloads:[{label:"Input",value:"I need Figma installed today for a client design review, but I do not have permission."}]},{id:"m3-s2",nodeId:"ticket_intake",timestamp:"2026-06-09T12:10:00.210Z",payloads:[{label:"ticket",value:{requester:"Alex Morgan",app:"Figma",deadline:"today",business_reason:"client design review"}}]},{id:"m3-s3",nodeId:"ticket_classifier",timestamp:"2026-06-09T12:10:00.480Z",payloads:[{label:"classification",value:{route:"software_path",confidence:.94,reason:"The request is for software entitlement and installation."}}]},{id:"m3-s4",nodeId:"software_path",timestamp:"2026-06-09T12:10:00.790Z",payloads:[{label:"branch_notes",value:"Confirm license availability before install."}]},{id:"m3-s5",nodeId:"license_check",timestamp:"2026-06-09T12:10:01.320Z",payloads:[{label:"license",value:{app:"Figma",available_seats:3,approval_required:"manager"}}]},{id:"m3-s6",nodeId:"install_request",timestamp:"2026-06-09T12:10:01.910Z",payloads:[{label:"install",value:{delivery:"managed software center",target_device:"MacBook Pro",estimated_minutes:15}}]},{id:"m3-s7",nodeId:"urgency_check",timestamp:"2026-06-09T12:10:02.360Z",payloads:[{label:"priority",value:{level:"high",reason:"Client meeting today"}}]},{id:"m3-s8",nodeId:"resolution_plan",timestamp:"2026-06-09T12:10:02.870Z",payloads:[{label:"plan",value:["Request manager approval","Assign available Figma seat","Publish install through managed software center"]}]},{id:"m3-s9",nodeId:"final_response",timestamp:"2026-06-09T12:10:03.260Z",payloads:[{label:"Output",value:"There are Figma seats available. We need manager approval, then the install will appear in Software Center."}]}]},{id:"msg-4",steps:[{id:"m4-s1",nodeId:"user_input",timestamp:"2026-06-09T12:15:00.000Z",payloads:[{label:"Input",value:"I clicked a suspicious invoice link and entered my Microsoft 365 password."}]},{id:"m4-s2",nodeId:"ticket_intake",timestamp:"2026-06-09T12:15:00.170Z",payloads:[{label:"ticket",value:{service:"Microsoft 365",incident:"credential entered on suspicious page",user_reported:!0}}]},{id:"m4-s3",nodeId:"ticket_classifier",timestamp:"2026-06-09T12:15:00.430Z",payloads:[{label:"classification",value:{route:"security_path",confidence:.99,reason:"Possible credential compromise after phishing link."}}]},{id:"m4-s4",nodeId:"security_path",timestamp:"2026-06-09T12:15:00.740Z",payloads:[{label:"branch_notes",value:"Treat as security incident, not routine password reset."}]},{id:"m4-s5",nodeId:"phishing_triage",timestamp:"2026-06-09T12:15:01.260Z",payloads:[{label:"triage",value:{credential_exposed:!0,attachment_opened:!1,suspicious_url_collected:!0}}]},{id:"m4-s6",nodeId:"containment_steps",timestamp:"2026-06-09T12:15:01.920Z",payloads:[{label:"containment",value:["Revoke active sessions","Force password reset","Require MFA re-confirmation","Submit URL to security team"]}]},{id:"m4-s7",nodeId:"urgency_check",timestamp:"2026-06-09T12:15:02.360Z",payloads:[{label:"priority",value:{level:"critical",reason:"Credential compromise reported"}}]},{id:"m4-s8",nodeId:"resolution_plan",timestamp:"2026-06-09T12:15:02.890Z",payloads:[{label:"plan",value:["Lock account until sessions are revoked","Reset password and verify MFA","Escalate URL and mailbox artifacts to security operations"]}]},{id:"m4-s9",nodeId:"final_response",timestamp:"2026-06-09T12:15:03.280Z",payloads:[{label:"Output",value:"This is a security incident. We will revoke sessions, reset your password, verify MFA, and send the link to security operations."}]}]}]}}],ph={version:"0.1",graph:{nodes:[],edges:[]},messages:[]};function pf(e){let t,n,r,o,a,i,l,s,u=(0,x.c)(17),{open:c,onClose:d,onSelect:p,currentName:h}=e;return u[0]===Symbol.for("react.memo_cache_sentinel")?(t={display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,pb:1},u[0]=t):t=u[0],u[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,b.jsx)(rL,{fontSize:"small"}),u[1]=n):n=u[1],u[2]!==d?(r=(0,b.jsxs)(nc,{id:"example-gallery-title",sx:t,children:["Example flows",(0,b.jsx)(nm,{size:"small",onClick:d,"aria-label":"Close",children:n})]}),u[2]=d,u[3]=r):r=u[3],u[4]===Symbol.for("react.memo_cache_sentinel")?(o={pb:3},u[4]=o):o=u[4],u[5]===Symbol.for("react.memo_cache_sentinel")?(a={display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"},gap:1.5},u[5]=a):a=u[5],u[6]!==h||u[7]!==d||u[8]!==p?(i=pp.map(e=>{let t=!!h&&e.trace.name===h,n=e.trace.graph.nodes.length,r=e.trace.messages.length;return(0,b.jsxs)(e3,{onClick:()=>{p(e.trace),d()},"aria-current":t||void 0,sx:{display:"block",textAlign:"left",borderRadius:2,p:1.5,height:"100%",border:1,borderColor:t?"primary.main":"divider",bgcolor:t?"action.selected":"background.paper",transition:"border-color 150ms, background-color 150ms","&:hover":{borderColor:t?"primary.main":"text.disabled",bgcolor:"action.hover"}},children:[(0,b.jsxs)(ns,{variant:"subtitle2",sx:{fontWeight:600,mb:.25},children:[e.title,t&&(0,b.jsx)(ns,{component:"span",variant:"caption",color:"primary",sx:{ml:.75,fontWeight:600},children:"• current"})]}),(0,b.jsx)(ns,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.45,mb:1},children:e.summary}),(0,b.jsxs)(ns,{variant:"caption",color:"text.disabled",sx:{fontVariantNumeric:"tabular-nums"},children:[e.pattern," · ",r," msg · ",n," nodes"]})]},e.id)}),u[6]=h,u[7]=d,u[8]=p,u[9]=i):i=u[9],u[10]!==i?(l=(0,b.jsx)(no,{sx:o,children:(0,b.jsx)(P,{sx:a,children:i})}),u[10]=i,u[11]=l):l=u[11],u[12]!==d||u[13]!==c||u[14]!==r||u[15]!==l?(s=(0,b.jsxs)(t3,{open:c,onClose:d,"aria-labelledby":"example-gallery-title",maxWidth:"sm",fullWidth:!0,children:[r,l]}),u[12]=d,u[13]=c,u[14]=r,u[15]=l,u[16]=s):s=u[16],s}let pm=`import wizardflow
|
|
103
|
+
|
|
104
|
+
app = workflow.compile() # your compiled LangGraph app
|
|
105
|
+
|
|
106
|
+
wizardflow.init_from_langgraph(app, path="run.json")
|
|
107
|
+
# No LangGraph instance? Use wizardflow.init(..., nodes=[...], edges=[...]).
|
|
108
|
+
|
|
109
|
+
# Log with the node ids from your graph.
|
|
110
|
+
wizardflow.log("msg-1", "router", "Input", "What's the weather?")
|
|
111
|
+
wizardflow.log("msg-1", "router", "route", "weather")
|
|
112
|
+
wizardflow.log("msg-1", "tool_node")
|
|
113
|
+
wizardflow.log("msg-1", "final_response", "Output", "19C and cloudy.")
|
|
114
|
+
wizardflow.end_message("msg-1") # writes run.json`;function pg(){let e,t,n,r,o,a=(0,x.c)(5);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e={display:"grid",gap:1.5,textAlign:"left"},a[0]=e):e=a[0],a[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,b.jsx)(ns,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.7},children:"WizardFlow runs as a static browser app. Imported JSON is parsed in this tab and stored only in this tab's sessionStorage; there is no upload step or server-side processing."}),a[1]=t):t=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(n={lineHeight:1.7},a[2]=n):n=a[2],a[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,b.jsx)(P,{component:"strong",sx:{fontWeight:600},children:"Network"}),a[3]=r):r=a[3],a[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,b.jsxs)(P,{sx:e,children:[t,(0,b.jsxs)(ns,{variant:"body2",color:"text.secondary",sx:n,children:["For extra assurance, you can cut the tab's connection after opening WizardFlow and it keeps working. In Chrome: open DevTools (Ctrl + Shift + I), go to the"," ",r," ","tab, and set the throttling dropdown to"," ",(0,b.jsx)(P,{component:"strong",sx:{fontWeight:600},children:"Offline"}),". While DevTools stays open the tab is offline, yet importing and replaying still work."]})]}),a[4]=o):o=a[4],o}function py(e){let t,n,r,o,a,i,l,s,u,c,d,p,h=(0,x.c)(16),{open:f,onClose:m}=e;return h[0]===Symbol.for("react.memo_cache_sentinel")?(t={display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,pb:1},h[0]=t):t=h[0],h[1]===Symbol.for("react.memo_cache_sentinel")?(n=(0,b.jsx)(rL,{fontSize:"small"}),h[1]=n):n=h[1],h[2]!==m?(r=(0,b.jsxs)(nc,{id:"tutorial-dialog-title",sx:t,children:["Tutorial",(0,b.jsx)(nm,{size:"small",onClick:m,"aria-label":"Close",children:n})]}),h[2]=m,h[3]=r):r=h[3],h[4]===Symbol.for("react.memo_cache_sentinel")?(o={pb:3},h[4]=o):o=h[4],h[5]===Symbol.for("react.memo_cache_sentinel")?(a={display:"grid",gap:2.25},h[5]=a):a=h[5],h[6]===Symbol.for("react.memo_cache_sentinel")?(i={display:"grid",gap:.75},h[6]=i):i=h[6],h[7]===Symbol.for("react.memo_cache_sentinel")?(l=(0,b.jsx)(ns,{variant:"subtitle2",sx:{fontWeight:700},children:"Start"}),h[7]=l):l=h[7],h[8]===Symbol.for("react.memo_cache_sentinel")?(s=(0,b.jsx)(ns,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.7},children:"Upload a WizardFlow JSON file, browse a bundled example, or create a trace with the Python SDK and open it in the viewer."}),h[8]=s):s=h[8],h[9]===Symbol.for("react.memo_cache_sentinel")?(u=(0,b.jsxs)(P,{sx:i,children:[l,s,(0,b.jsx)(P,{component:"pre",sx:{m:0,p:1.25,overflowX:"auto",border:1,borderColor:"divider",borderRadius:1,bgcolor:"action.hover",color:"text.secondary",fontFamily:"var(--font-geist-mono), monospace",fontSize:12,lineHeight:1.55,whiteSpace:"pre"},children:(0,b.jsx)(P,{component:"code",children:pm})})]}),h[9]=u):u=h[9],h[10]===Symbol.for("react.memo_cache_sentinel")?(c={display:"grid",gap:.75},h[10]=c):c=h[10],h[11]===Symbol.for("react.memo_cache_sentinel")?(d=(0,b.jsx)(no,{sx:o,children:(0,b.jsxs)(P,{sx:a,children:[u,(0,b.jsxs)(P,{sx:c,children:[(0,b.jsx)(ns,{variant:"subtitle2",sx:{fontWeight:700},children:"Local data"}),(0,b.jsx)(pg,{})]})]})}),h[11]=d):d=h[11],h[12]!==m||h[13]!==f||h[14]!==r?(p=(0,b.jsxs)(t3,{open:f,onClose:m,"aria-labelledby":"tutorial-dialog-title",maxWidth:"sm",fullWidth:!0,children:[r,d]}),h[12]=m,h[13]=f,h[14]=r,h[15]=p):p=h[15],p}let pv="wizardflow:flow",pb=null,px=!1,pw=new Set;function p_(e){return pw.add(e),()=>pw.delete(e)}function pS(){return px||(px=!0,pb=function(){try{let e=window.sessionStorage.getItem(pv);return e?JSON.parse(e):null}catch{return null}}()),pb}function pk(){return null}function pC(e){px=!0,pb=e;try{e?window.sessionStorage.setItem(pv,JSON.stringify(e)):window.sessionStorage.removeItem(pv)}catch{}pw.forEach(e=>e())}let pI="wizardflow:welcome-dismissed",pM=!1,pE=!1,pT=new Set;function pj(e){return pT.add(e),()=>pT.delete(e)}function pR(){if(!pE){pE=!0;try{pM="1"===window.sessionStorage.getItem(pI)}catch{pM=!1}}return pM}function pN(){return!0}function pA(){if(pE=!0,!pM){pM=!0;try{window.sessionStorage.setItem(pI,"1")}catch{}pT.forEach(e=>e())}}let pz=[{href:"https://github.com/lkleonk/wizardflow",label:"GitHub",external:!0}];function pP(){let e,t,n,r,o,a,i,l=(0,x.c)(7);return l[0]===Symbol.for("react.memo_cache_sentinel")?(e={display:"block",width:72,height:72,"@keyframes wizardGlowPulse":{"0%, 100%":{opacity:.3,transform:"scale(0.88)"},"50%":{opacity:.85,transform:"scale(1.12)"}},"@keyframes wizardGlowOrbit":{"0%":{transform:"translate(-3px, -2px)"},"25%":{transform:"translate(3px, -3px)"},"50%":{transform:"translate(4px, 2px)"},"75%":{transform:"translate(-3px, 3px)"},"100%":{transform:"translate(-3px, -2px)"}},"& .wizard-glow-orbit":{transformBox:"fill-box",transformOrigin:"center",animation:"wizardGlowOrbit 5s ease-in-out infinite"},"& .wizard-glow":{transformBox:"fill-box",transformOrigin:"center",animation:"wizardGlowPulse 2.4s ease-in-out infinite"},"@media (prefers-reduced-motion: reduce)":{"& .wizard-glow-orbit, & .wizard-glow":{animation:"none"},"& .wizard-glow":{opacity:.55}}},l[0]=e):e=l[0],l[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,b.jsxs)("radialGradient",{id:"wizardGlow",cx:"50%",cy:"50%",r:"50%",children:[(0,b.jsx)("stop",{offset:"0%",stopColor:"#A78BFA",stopOpacity:"0.75"}),(0,b.jsx)("stop",{offset:"55%",stopColor:"#60A5FA",stopOpacity:"0.3"}),(0,b.jsx)("stop",{offset:"100%",stopColor:"#22D3EE",stopOpacity:"0"})]}),l[1]=t):t=l[1],l[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,b.jsxs)("linearGradient",{id:"wizardCone",x1:"0",y1:"0",x2:"1",y2:"1",children:[(0,b.jsx)("stop",{offset:"0%",stopColor:"#C4B5FD"}),(0,b.jsx)("stop",{offset:"100%",stopColor:"#6D28D9"})]}),l[2]=n):n=l[2],l[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,b.jsxs)("linearGradient",{id:"wizardBrim",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,b.jsx)("stop",{offset:"0%",stopColor:"#67E8F9"}),(0,b.jsx)("stop",{offset:"100%",stopColor:"#0E7490"})]}),l[3]=r):r=l[3],l[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,b.jsxs)("defs",{children:[t,n,r,(0,b.jsx)("clipPath",{id:"wizardClip",children:(0,b.jsx)("rect",{width:"72",height:"72",rx:"18"})})]}),a=(0,b.jsx)("rect",{width:"72",height:"72",rx:"18",fill:"var(--mui-palette-background-paper)"}),l[4]=o,l[5]=a):(o=l[4],a=l[5]),l[6]===Symbol.for("react.memo_cache_sentinel")?(i=(0,b.jsxs)(P,{"aria-hidden":!0,component:"svg",viewBox:"0 0 72 72",sx:e,children:[o,a,(0,b.jsx)("g",{clipPath:"url(#wizardClip)",children:(0,b.jsx)("g",{className:"wizard-glow-orbit",children:(0,b.jsx)("circle",{className:"wizard-glow",cx:"36",cy:"33",r:"27",fill:"url(#wizardGlow)"})})}),(0,b.jsx)("ellipse",{cx:"36",cy:"50",rx:"22",ry:"6",fill:"url(#wizardBrim)",stroke:"#155E75",strokeWidth:"1.5"}),(0,b.jsx)("path",{d:"M27 49 C 29 37, 32 23, 40 13 C 43 22, 45 37, 45 50 C 39 53, 33 53, 27 49 Z",fill:"url(#wizardCone)",stroke:"#5B21B6",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M27.5 48 C 33 51, 39 51, 44.5 48 L 45 50.5 C 39 53, 33 53, 27 50.5 Z",fill:"#FBBF24",stroke:"#B45309",strokeWidth:"0.75",strokeLinejoin:"round"}),(0,b.jsx)("path",{d:"M50 14L52 18.5L56.5 20.5L52 22.5L50 27L48 22.5L43.5 20.5L48 18.5L50 14Z",fill:"#F0ABFC"}),(0,b.jsx)("circle",{cx:"34",cy:"34",r:"2.4",fill:"#FFFFFF",fillOpacity:"0.9"}),(0,b.jsx)("circle",{cx:"39",cy:"42",r:"2",fill:"#FFFFFF",fillOpacity:"0.85"})]}),l[6]=i):i=l[6],i}e.s(["default",0,function(){let e=(0,w.useSyncExternalStore)(p_,pS,pk),t=e??ph,n=t.graph.nodes.length>0,[r,o]=(0,w.useState)(t.messages[0]?.id),[a,i]=(0,w.useState)(0),[l,s]=(0,w.useState)(dm(t.messages[0])[0]?.nodeId),[u,c]=(0,w.useState)(!1),[d,p]=(0,w.useState)("stop-at-message-end"),[h,f]=(0,w.useState)(1),[m,g]=(0,w.useState)(!0),[y,v]=(0,w.useState)(360),[x,_]=(0,w.useState)(!1),[S,k]=(0,w.useState)(!1),C=(0,w.useRef)(null),I=(0,w.useCallback)(()=>{_(!1)},[]),M=!(0,w.useSyncExternalStore)(pj,pR,pN)&&!e&&!S,[E,T]=(0,w.useState)(!1),[j,R]=(0,w.useState)(!1),[N,A]=(0,w.useState)(!1),[z,O]=(0,w.useState)(t);t!==z&&(O(t),o(t.messages[0]?.id),i(0),s(dm(t.messages[0])[0]?.nodeId),c(!1),_(!1));let{mode:D,systemMode:$,setMode:L}=(0,rW.useColorScheme)(),B=("system"===D?$:D)!=="light",W=(0,w.useMemo)(()=>t.messages.findIndex(e=>e.id===r),[t.messages,r]),F=W>=0?t.messages[W]:void 0,H=(0,w.useMemo)(()=>dm(F),[F]),Z=H.length,V=H[a]?.nodeId,q=dy(H,a),U=dv(H,a),Y=1200/h,X=(0,w.useMemo)(()=>{let e=new Set,t=[];for(let n=a-1;n>=0;n--){let r=H[n]?.nodeId;!r||r===V||e.has(r)||(e.add(r),t.push(r))}return t},[H,a,V]),K=(0,w.useCallback)(e=>{if(0===H.length)return;let t=Math.max(0,Math.min(e,H.length-1));i(t),s(H[t]?.nodeId)},[H]),G=(0,w.useCallback)(e=>{let n=t.messages[e];return!!n&&(o(n.id),i(0),s(dm(n)[0]?.nodeId),!0)},[t.messages]),J=(0,w.useCallback)(e=>{I(),c(!1),G(t.messages.findIndex(t=>t.id===e))},[I,G,t.messages]),Q=(0,w.useCallback)(e=>{let n=W+e;n<0||n>=t.messages.length||(I(),c(!1),G(n))},[W,I,G,t.messages.length]),ee=(0,w.useCallback)(e=>{I(),pA(),pC(e)},[I]),et=(0,w.useCallback)(()=>{I(),pC(null),T(!0)},[I]);(0,w.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get("trace");if(!t)return;let n=new URL(t,window.location.href);if(n.origin!==window.location.origin)return void alert("Trace URLs must be served from the same origin as WizardFlow.");let r=n.href;if(C.current===r)return;C.current=r;let o=!1;return async function(){k(!0);try{let t=await fetch(r,{cache:"no-store",credentials:"same-origin"});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=await t.json();if(!d9(n))throw Error("invalid trace shape");if(o)return;let a=e.get("traceName");ee(a?{...n,name:a}:n)}catch{o||(alert("Could not load the WizardFlow trace JSON from the URL."),C.current=null)}finally{o||k(!1)}}(),()=>{o=!0,C.current===r&&(C.current=null)}},[ee]);let en=(0,w.useCallback)(()=>{if(I(),u)return void c(!1);if(0!==Z){if(a>=Z-1){let e=W>=0&&W<t.messages.length-1;"play-next-message"===d&&e?G(W+1):K(0)}c(!0)}},[u,Z,a,W,I,t.messages.length,d,G,K]),er=(0,w.useCallback)(()=>{I(),p(e=>"stop-at-message-end"===e?"play-next-message":"play-next-message"===e?"repeat-message":"stop-at-message-end")},[I]),eo=(0,w.useCallback)(()=>{I(),f(e=>.5===e?1:1===e?1.5:1.5===e?2:.5)},[I]);(0,w.useEffect)(()=>{if(!u)return;if(a>=Z-1){let e=setTimeout(()=>{if("repeat-message"===d)return void K(0);let e=W>=0&&W<t.messages.length-1;"play-next-message"===d&&e?G(W+1):c(!1)},Y);return()=>clearTimeout(e)}let e=setTimeout(()=>K(a+1),Y);return()=>clearTimeout(e)},[u,Z,a,Y,d,W,t.messages.length,G,K]),(0,w.useEffect)(()=>{let e=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return;let t=e.target;if(!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&"BUTTON"!==t.tagName&&!t.isContentEditable)switch(e.key){case" ":e.preventDefault(),en();break;case"ArrowLeft":e.preventDefault(),I(),K(a-1);break;case"ArrowRight":e.preventDefault(),I(),K(a+1);break;case"ArrowUp":e.preventDefault(),Q(-1);break;case"ArrowDown":e.preventDefault(),Q(1);break;case"Home":e.preventDefault(),I(),c(!1),K(0);break;case"End":e.preventDefault(),I(),c(!1),K(Z-1)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[en,I,K,Q,a,Z]);let ea=(0,w.useMemo)(()=>{var e;let t;return e=function(e,t){if(!e||!t)return[];let n=dm(e),r=[];return n.forEach((e,o)=>{if(e.nodeId!==t)return;let a=dy(n,o),i=dv(n,o);for(let t of e.payloads)r.push({...t,timestamp:e.timestamp,deltaMs:a,elapsedMs:i})}),r}(F,l),t=new Map,e.map(e=>{let n=t.get(e.label)??0;t.set(e.label,n+1);let r=0===n?e.label:`${e.label}_${n+1}`;return{...e,displayLabel:r}})},[F,l]),ei=t.graph.nodes.find(e=>e.id===l)?.label,el=(0,w.useCallback)(e=>{e.preventDefault(),I();let t=e.clientX,n=e=>{v(Math.max(280,Math.min(720,y+(t-e.clientX))))},r=()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",r),document.body.style.userSelect=""};document.body.style.userSelect="none",window.addEventListener("mousemove",n),window.addEventListener("mouseup",r)},[I,y]);return(0,b.jsxs)(P,{sx:{minHeight:"100dvh",height:{xs:"auto",md:"100%"},width:"100%",maxWidth:"100vw",overflowX:"hidden",display:"flex",flexDirection:"column",pb:{xs:"calc(168px + env(safe-area-inset-bottom))",sm:0}},children:[(0,b.jsx)(eE,{open:S,sx:{zIndex:e=>e.zIndex.modal+1,color:"primary.contrastText"},children:(0,b.jsx)(tu,{"aria-label":"Loading trace",color:"inherit"})}),(0,b.jsxs)(t3,{open:M,onClose:()=>pA(),"aria-labelledby":"welcome-dialog-title",maxWidth:"sm",fullWidth:!0,children:[(0,b.jsx)(nc,{id:"welcome-dialog-title",sx:{pb:1},children:(0,b.jsxs)(P,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:1.5,pt:1,textAlign:"center"},children:[(0,b.jsx)(pP,{}),(0,b.jsx)(ns,{component:"span",variant:"h5",sx:{fontWeight:700},children:"WizardFlow"})]})}),(0,b.jsxs)(no,{sx:{textAlign:"center"},children:[(0,b.jsx)(ns,{color:"text.secondary",sx:{lineHeight:1.7},children:"Replay JSON agent flows as messages moving through a graph, with node payloads and timing shown step by step."}),(0,b.jsx)(ns,{color:"text.secondary",sx:{lineHeight:1.7,mt:2},children:"Your flow stays in your browser. Imported JSON is processed locally and never uploaded — and is kept only for this tab."}),(0,b.jsx)(tx,{variant:"text",size:"small",onClick:()=>A(e=>!e),"aria-expanded":N,endIcon:(0,b.jsx)(rB,{sx:{transition:"transform 0.2s",transform:N?"rotate(180deg)":"none"}}),sx:{mt:1,textTransform:"none",color:"text.secondary"},children:"How to ensure data stays local"}),(0,b.jsx)(tI,{in:N,children:(0,b.jsx)(P,{sx:{mt:1},children:(0,b.jsx)(pg,{})})})]}),(0,b.jsxs)(t7,{disableSpacing:!0,sx:{justifyContent:"center",flexDirection:"column",gap:1,px:3,pb:3,pt:1},children:[(0,b.jsxs)(P,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},justifyContent:"center",gap:1,width:{xs:"100%",sm:"auto"}},children:[(0,b.jsx)(d8,{onLoad:ee,label:"Upload JSON",size:"medium",variant:"contained",sx:{minWidth:150,width:{xs:"100%",sm:"auto"}}}),(0,b.jsx)(tx,{size:"medium",variant:"outlined",onClick:()=>{pA(),T(!0)},sx:{minWidth:150,width:{xs:"100%",sm:"auto"}},children:"Browse examples"})]}),(0,b.jsx)(ns,{component:"a",href:"https://github.com/lkleonk/wizardflow/tree/main/sdk/python#quickstart",target:"_blank",rel:"noreferrer",variant:"body2",sx:{color:"text.secondary",textDecoration:"none","&:hover":{color:"primary.main",textDecoration:"underline"}},children:"Need a flow file? Use the Python SDK"})]})]}),(0,b.jsx)(pf,{open:E,onClose:()=>T(!1),onSelect:ee,currentName:t.name}),(0,b.jsx)(py,{open:j,onClose:()=>R(!1)}),(0,b.jsxs)(P,{onClickCapture:I,sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},alignItems:{xs:"stretch",sm:"center"},justifyContent:"space-between",gap:1,px:{xs:1,sm:2},py:{xs:1,sm:1.25},borderBottom:1,borderColor:"divider"},children:[(0,b.jsxs)(P,{sx:{display:"flex",alignItems:"center",justifyContent:{xs:"space-between",sm:"flex-start"},gap:1,minWidth:0,width:{xs:"100%",sm:"auto"}},children:[(0,b.jsxs)(P,{sx:{display:"flex",alignItems:"baseline",gap:1,minWidth:0,overflow:"hidden"},children:[(0,b.jsx)(ns,{variant:"h6",sx:{flexShrink:0,fontWeight:600,letterSpacing:-.2},children:"WizardFlow"}),t.name&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ns,{component:"span",color:"text.secondary",children:"/"}),(0,b.jsx)(ns,{component:"span",color:"text.secondary",noWrap:!0,title:t.name,sx:{minWidth:0,fontFamily:"var(--font-geist-mono), monospace",fontSize:13},children:t.name})]})]}),(0,b.jsxs)(P,{sx:{display:"flex",alignItems:"center",flexShrink:0},children:[(0,b.jsx)(ps,{trace:t}),e&&(0,b.jsx)(rj,{title:"Clear flow",children:(0,b.jsx)(nm,{size:"small",onClick:et,"aria-label":"Clear flow",sx:{color:"text.secondary"},children:(0,b.jsx)(rL,{sx:{fontSize:16}})})})]})]}),(0,b.jsxs)(P,{sx:{display:"flex",alignItems:"center",justifyContent:{xs:"flex-end",sm:"flex-start"},gap:1,flexWrap:"wrap",width:{xs:"100%",sm:"auto"}},children:[(0,b.jsx)(tx,{size:"small",variant:"outlined",startIcon:(0,b.jsx)(rO,{}),onClick:()=>T(!0),children:"Examples"}),(0,b.jsx)(d8,{onLoad:ee}),(0,b.jsx)(rj,{title:B?"Switch to light mode":"Switch to dark mode",children:(0,b.jsx)(nm,{size:"small",onClick:()=>L(B?"light":"dark"),"aria-label":"Toggle color mode",children:B?(0,b.jsx)(rD,{fontSize:"small"}):(0,b.jsx)(r$,{fontSize:"small"})})}),(0,b.jsx)(rj,{title:m?"Hide inspector":"Show inspector",children:(0,b.jsx)(nm,{size:"small",onClick:()=>g(e=>!e),color:m?"primary":"default","aria-label":"Toggle inspector panel",children:(0,b.jsx)(rP,{fontSize:"small"})})})]})]}),(0,b.jsxs)(P,{sx:{flex:{xs:"0 0 auto",md:1},display:"flex",flexDirection:{xs:"column",md:"row"},minHeight:0,p:{xs:1,sm:1.5},gap:{xs:1,md:0}},children:[(0,b.jsx)(tQ,{sx:{flex:{xs:"0 0 auto",md:1},minWidth:0,minHeight:{xs:320,md:0},height:{xs:m?"clamp(320px, 52dvh, 520px)":"clamp(320px, calc(100dvh - 274px - env(safe-area-inset-bottom)), 720px)",md:"auto"},overflow:"hidden"},children:n?(0,b.jsx)(cI,{nodes:t.graph.nodes,edges:t.graph.edges,activeNodeId:V,selectedNodeId:l,recentNodeIds:X,onSelectNode:s,isPlaying:u,arrangeMode:x,onArrangeModeChange:_}):(0,b.jsxs)(P,{sx:{height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:1.5,p:3,textAlign:"center"},children:[(0,b.jsx)(rO,{sx:{fontSize:40,color:"text.disabled"}}),(0,b.jsx)(ns,{variant:"h6",sx:{fontWeight:600},children:"No flow loaded"}),(0,b.jsx)(ns,{color:"text.secondary",sx:{maxWidth:360},children:"Pick a bundled example or upload your own agent-trace JSON to start replaying it."}),(0,b.jsxs)(P,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:1,mt:.5,width:{xs:"100%",sm:"auto"},maxWidth:360},children:[(0,b.jsx)(tx,{variant:"contained",startIcon:(0,b.jsx)(rO,{}),onClick:()=>T(!0),sx:{width:{xs:"100%",sm:"auto"}},children:"Browse examples"}),(0,b.jsx)(d8,{onLoad:ee,sx:{width:{xs:"100%",sm:"auto"}}})]})]})}),m&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(P,{onMouseDown:el,sx:{display:{xs:"none",md:"block"},width:6,flexShrink:0,alignSelf:"stretch",cursor:"col-resize",borderRadius:1,bgcolor:"transparent",transition:"background-color 120ms","&:hover":{bgcolor:"primary.main"}}}),(0,b.jsx)(tQ,{onClickCapture:I,sx:{width:{xs:"100%",md:y},height:{xs:320,md:"auto"},flexShrink:0,overflow:"hidden"},children:(0,b.jsx)(da,{selectedNodeId:l,selectedNodeLabel:ei,payloads:ea})})]})]}),(0,b.jsxs)(tQ,{square:!0,onClickCapture:I,sx:{borderTop:1,borderColor:"divider",position:{xs:"fixed",sm:"static"},right:{xs:0,sm:"auto"},bottom:{xs:0,sm:"auto"},left:{xs:0,sm:"auto"},width:{xs:"100vw",sm:"auto"},maxWidth:"100vw",overflowX:"hidden",zIndex:e=>e.zIndex.appBar,pb:{xs:"env(safe-area-inset-bottom)",sm:0}},children:[(0,b.jsx)(dx,{messages:t.messages,selectedMessageId:r,onSelectMessage:J}),(0,b.jsx)(d4,{stepIndex:a,stepCount:Z,isPlaying:u,playbackMode:d,playbackSpeed:h,deltaMs:q,elapsedMs:U,onPrev:()=>{I(),K(a-1)},onNext:()=>{I(),K(a+1)},onTogglePlay:en,onTogglePlaybackMode:er,onCyclePlaybackSpeed:eo,onSeek:e=>{I(),c(!1),K(e)}}),(0,b.jsxs)(P,{component:"nav","aria-label":"Project links",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:{xs:.75,sm:1.5},px:{xs:1,sm:2},pb:{xs:.5,sm:.75},color:"text.secondary",fontSize:{xs:11,sm:12},lineHeight:1.4},children:[(0,b.jsx)(P,{component:"button",type:"button",onClick:()=>R(!0),sx:{p:0,border:0,bgcolor:"transparent",color:"inherit",font:"inherit",lineHeight:"inherit",cursor:"pointer",textDecoration:"none","&:hover":{color:"primary.main",textDecoration:"underline"},"&:focus-visible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2,borderRadius:.5}},children:"Tutorial"}),pz.map(e=>(0,b.jsxs)(w.Fragment,{children:[(0,b.jsx)(P,{component:"span","aria-hidden":!0,sx:{opacity:.55},children:"/"}),(0,b.jsx)(P,{component:"a",href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noreferrer":void 0,sx:{color:"inherit",textDecoration:"none","&:hover":{color:"primary.main",textDecoration:"underline"}},children:e.label})]},e.href))]})]})]})}],52683)}]);
|