nx
Version:
2 lines • 695 kB
JavaScript
/*! For license information please see main.esm.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[179],{87554:(e,t,n)=>{"use strict";var r=n(12139),i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},o=n(60382),a=n(60035),s=n(77847),u=n.n(s);function l(e){return"function"==typeof e?e():e}function c(e){try{return JSON.stringify(e)}catch(Ne){return u()(e)}}var d=n(61818),f=n(64223);var h=new Map;var p={url:"https://statecharts.io/inspect",iframe:function(){return document.querySelector("iframe[data-xstate]")},devTools:function(){var e,t,n=(e=new Set,t=new Set,{services:e,register:function(n){e.add(n),h.set(n.sessionId,n),t.forEach((function(e){return e(n)})),n.onStop((function(){e.delete(n),h.delete(n.sessionId)}))},unregister:function(t){e.delete(t),h.delete(t.sessionId)},onRegister:function(n){return t.add(n),e.forEach((function(e){return n(e)})),{unsubscribe:function(){t.delete(n)}}}});return globalThis.__xstate__=n,n}};const v=r.forwardRef((function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm.707-10.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L9.414 11H13a1 1 0 100-2H9.414l1.293-1.293z",clipRule:"evenodd"}))}));const g=r.forwardRef((function(e,t){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),r.createElement("path",{fillRule:"evenodd",d:"M3 17a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm3.293-7.707a1 1 0 011.414 0L9 10.586V3a1 1 0 112 0v7.586l1.293-1.293a1 1 0 111.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"}))}));var y=n(27295),m=n(51414),b="tippy-content",x="tippy-backdrop",w="tippy-arrow",_="tippy-svg-arrow",E={passive:!0,capture:!0},k=function(){return document.body};function S(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function P(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function C(e,t){return"function"==typeof e?e.apply(void 0,t):e}function T(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function j(e){return[].concat(e)}function D(e,t){-1===e.indexOf(t)&&e.push(t)}function N(e){return e.split("-")[0]}function O(e){return[].slice.call(e)}function M(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function A(){return document.createElement("div")}function I(e){return["Element","Fragment"].some((function(t){return P(e,t)}))}function R(e){return P(e,"MouseEvent")}function B(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function L(e){return I(e)?[e]:function(e){return P(e,"NodeList")}(e)?O(e):Array.isArray(e)?e:O(document.querySelectorAll(e))}function z(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function F(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function V(e){var t,n=j(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function G(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function H(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Z={isTouch:!1},q=0;function Y(){Z.isTouch||(Z.isTouch=!0,window.performance&&document.addEventListener("mousemove",X))}function X(){var e=performance.now();e-q<20&&(Z.isTouch=!1,document.removeEventListener("mousemove",X)),q=e}function W(){var e=document.activeElement;if(B(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var U=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var $={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},K=Object.assign({appendTo:k,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},$,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Q=Object.keys(K);function J(e){var t=(e.plugins||[]).reduce((function(t,n){var r,i=n.name,o=n.defaultValue;i&&(t[i]=void 0!==e[i]?e[i]:null!=(r=K[i])?r:o);return t}),{});return Object.assign({},e,t)}function ee(e,t){var n=Object.assign({},t,{content:C(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(J(Object.assign({},K,{plugins:t}))):Q).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(Ne){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},K.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function te(e,t){e.innerHTML=t}function ne(e){var t=A();return!0===e?t.className=w:(t.className=_,I(e)?t.appendChild(e):te(t,e)),t}function re(e,t){I(t.content)?(te(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?te(e,t.content):e.textContent=t.content)}function ie(e){var t=e.firstElementChild,n=O(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(b)})),arrow:n.find((function(e){return e.classList.contains(w)||e.classList.contains(_)})),backdrop:n.find((function(e){return e.classList.contains(x)}))}}function oe(e){var t=A(),n=A();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=A();function i(n,r){var i=ie(t),o=i.box,a=i.content,s=i.arrow;r.theme?o.setAttribute("data-theme",r.theme):o.removeAttribute("data-theme"),"string"==typeof r.animation?o.setAttribute("data-animation",r.animation):o.removeAttribute("data-animation"),r.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?o.setAttribute("role",r.role):o.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||re(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(ne(r.arrow))):o.appendChild(ne(r.arrow)):s&&o.removeChild(s)}return r.className=b,r.setAttribute("data-state","hidden"),re(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props),{popper:t,onUpdate:i}}oe.$$tippy=!0;var ae=1,se=[],ue=[];function le(e,t){var n,r,i,o,a,s,u,l,c=ee(e,Object.assign({},K,J(M(t)))),d=!1,f=!1,h=!1,p=!1,v=[],g=T(xe,c.interactiveDebounce),m=ae++,b=(l=c.plugins).filter((function(e,t){return l.indexOf(e)===t})),x={id:m,reference:e,popper:A(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(i)},setProps:function(t){0;if(x.state.isDestroyed)return;ne("onBeforeUpdate",[x,t]),me();var n=x.props,r=ee(e,Object.assign({},n,M(t),{ignoreAttributes:!0}));x.props=r,ye(),n.interactiveDebounce!==r.interactiveDebounce&&(le(),g=T(xe,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?j(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");oe(),te(),P&&P(n,r);x.popperInstance&&(ke(),Pe().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));ne("onAfterUpdate",[x,t])},setContent:function(e){x.setProps({content:e})},show:function(){0;var e=x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=Z.isTouch&&!x.props.touch,i=S(x.props.duration,0,K.duration);if(e||t||n||r)return;if(X().hasAttribute("disabled"))return;if(ne("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,Y()&&(_.style.visibility="visible");te(),he(),x.state.isMounted||(_.style.transition="none");if(Y()){var o=$(),a=o.box,u=o.content;z([a,u],0)}s=function(){var e;if(x.state.isVisible&&!p){if(p=!0,_.offsetHeight,_.style.transition=x.props.moveTransition,Y()&&x.props.animation){var t=$(),n=t.box,r=t.content;z([n,r],i),F([n,r],"visible")}re(),oe(),D(ue,x),null==(e=x.popperInstance)||e.forceUpdate(),ne("onMount",[x]),x.props.animation&&Y()&&function(e,t){ve(e,t)}(i,(function(){x.state.isShown=!0,ne("onShown",[x])}))}},function(){var e,t=x.props.appendTo,n=X();e=x.props.interactive&&t===k||"parent"===t?n.parentNode:C(t,[n]);e.contains(_)||e.appendChild(_);x.state.isMounted=!0,ke(),!1}()},hide:function(){0;var e=!x.state.isVisible,t=x.state.isDestroyed,n=!x.state.isEnabled,r=S(x.props.duration,1,K.duration);if(e||t||n)return;if(ne("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,p=!1,d=!1,Y()&&(_.style.visibility="hidden");if(le(),pe(),te(!0),Y()){var i=$(),o=i.box,a=i.content;x.props.animation&&(z([o,a],r),F([o,a],"hidden"))}re(),oe(),x.props.animation?Y()&&function(e,t){ve(e,(function(){!x.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()}))}(r,x.unmount):x.unmount()},hideWithInteractivity:function(e){0;W().addEventListener("mousemove",g),D(se,g),g(e)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){0;x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Se(),Pe().forEach((function(e){e._tippy.unmount()})),_.parentNode&&_.parentNode.removeChild(_);ue=ue.filter((function(e){return e!==x})),x.state.isMounted=!1,ne("onHidden",[x])},destroy:function(){0;if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),me(),delete e._tippy,x.state.isDestroyed=!0,ne("onDestroy",[x])}};if(!c.render)return x;var w=c.render(x),_=w.popper,P=w.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+x.id,x.popper=_,e._tippy=x,_._tippy=x;var I=b.map((function(e){return e.fn(x)})),B=e.hasAttribute("aria-expanded");return ye(),oe(),te(),ne("onCreate",[x]),c.showOnCreate&&Ce(),_.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),_.addEventListener("mouseleave",(function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&W().addEventListener("mousemove",g)})),x;function L(){var e=x.props.touch;return Array.isArray(e)?e:[e,0]}function q(){return"hold"===L()[0]}function Y(){var e;return!(null==(e=x.props.render)||!e.$$tippy)}function X(){return u||e}function W(){var e=X().parentNode;return e?V(e):document}function $(){return ie(_)}function Q(e){return x.state.isMounted&&!x.state.isVisible||Z.isTouch||o&&"focus"===o.type?0:S(x.props.delay,e?0:1,K.delay)}function te(e){void 0===e&&(e=!1),_.style.pointerEvents=x.props.interactive&&!e?"":"none",_.style.zIndex=""+x.props.zIndex}function ne(e,t,n){var r;(void 0===n&&(n=!0),I.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=x.props)[e].apply(r,t)}function re(){var t=x.props.aria;if(t.content){var n="aria-"+t.content,r=_.id;j(x.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(x.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var i=t&&t.replace(r,"").trim();i?e.setAttribute(n,i):e.removeAttribute(n)}}))}}function oe(){!B&&x.props.aria.expanded&&j(x.props.triggerTarget||e).forEach((function(e){x.props.interactive?e.setAttribute("aria-expanded",x.state.isVisible&&e===X()?"true":"false"):e.removeAttribute("aria-expanded")}))}function le(){W().removeEventListener("mousemove",g),se=se.filter((function(e){return e!==g}))}function ce(t){if(!Z.isTouch||!h&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!x.props.interactive||!H(_,n)){if(j(x.props.triggerTarget||e).some((function(e){return H(e,n)}))){if(Z.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else ne("onClickOutside",[x,t]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),f=!0,setTimeout((function(){f=!1})),x.state.isMounted||pe())}}}function de(){h=!0}function fe(){h=!1}function he(){var e=W();e.addEventListener("mousedown",ce,!0),e.addEventListener("touchend",ce,E),e.addEventListener("touchstart",fe,E),e.addEventListener("touchmove",de,E)}function pe(){var e=W();e.removeEventListener("mousedown",ce,!0),e.removeEventListener("touchend",ce,E),e.removeEventListener("touchstart",fe,E),e.removeEventListener("touchmove",de,E)}function ve(e,t){var n=$().box;function r(e){e.target===n&&(G(n,"remove",r),t())}if(0===e)return t();G(n,"remove",a),G(n,"add",r),a=r}function ge(t,n,r){void 0===r&&(r=!1),j(x.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),v.push({node:e,eventType:t,handler:n,options:r})}))}function ye(){var e;q()&&(ge("touchstart",be,{passive:!0}),ge("touchend",we,{passive:!0})),(e=x.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(ge(e,be),e){case"mouseenter":ge("mouseleave",we);break;case"focus":ge(U?"focusout":"blur",_e);break;case"focusin":ge("focusout",_e)}}))}function me(){v.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,i=e.options;t.removeEventListener(n,r,i)})),v=[]}function be(e){var t,n=!1;if(x.state.isEnabled&&!Ee(e)&&!f){var r="focus"===(null==(t=o)?void 0:t.type);o=e,u=e.currentTarget,oe(),!x.state.isVisible&&R(e)&&se.forEach((function(t){return t(e)})),"click"===e.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?n=!0:Ce(e),"click"===e.type&&(d=!n),n&&!r&&Te(e)}}function xe(e){var t=e.target,n=X().contains(t)||_.contains(t);if("mousemove"!==e.type||!n){var r=Pe().concat(_).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:c}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,i=e.popperState,o=e.props.interactiveBorder,a=N(i.placement),s=i.modifiersData.offset;if(!s)return!0;var u="bottom"===a?s.top.y:0,l="top"===a?s.bottom.y:0,c="right"===a?s.left.x:0,d="left"===a?s.right.x:0,f=t.top-r+u>o,h=r-t.bottom-l>o,p=t.left-n+c>o,v=n-t.right-d>o;return f||h||p||v}))})(r,e)&&(le(),Te(e))}}function we(e){Ee(e)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(e):Te(e))}function _e(e){x.props.trigger.indexOf("focusin")<0&&e.target!==X()||x.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||Te(e)}function Ee(e){return!!Z.isTouch&&q()!==e.type.indexOf("touch")>=0}function ke(){Se();var t=x.props,n=t.popperOptions,r=t.placement,i=t.offset,o=t.getReferenceClientRect,a=t.moveTransition,u=Y()?ie(_).arrow:null,l=o?{getBoundingClientRect:o,contextElement:o.contextElement||X()}:e,c={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(Y()){var n=$().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},d=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},c];Y()&&u&&d.push({name:"arrow",options:{element:u,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),x.popperInstance=(0,y.fi)(l,_,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:d}))}function Se(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function Pe(){return O(_.querySelectorAll("[data-tippy-root]"))}function Ce(e){x.clearDelayTimeouts(),e&&ne("onTrigger",[x,e]),he();var t=Q(!0),r=L(),i=r[0],o=r[1];Z.isTouch&&"hold"===i&&o&&(t=o),t?n=setTimeout((function(){x.show()}),t):x.show()}function Te(e){if(x.clearDelayTimeouts(),ne("onUntrigger",[x,e]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=Q(!1);t?r=setTimeout((function(){x.state.isVisible&&x.hide()}),t):i=requestAnimationFrame((function(){x.hide()}))}}else pe()}}function ce(e,t){void 0===t&&(t={});var n=K.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Y,E),window.addEventListener("blur",W);var r=Object.assign({},t,{plugins:n}),i=L(e).reduce((function(e,t){var n=t&&le(t,r);return n&&e.push(n),e}),[]);return I(e)?i[0]:i}ce.defaultProps=K,ce.setDefaultProps=function(e){Object.keys(e).forEach((function(t){K[t]=e[t]}))},ce.currentInput=Z;Object.assign({},m.Z,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}});ce.setDefaultProps({render:oe});const de=ce;function fe(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var he="undefined"!=typeof window&&"undefined"!=typeof document;function pe(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function ve(){return he&&document.createElement("div")}function ge(e,t){if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!t.hasOwnProperty(n))return!1;if(!ge(e[n],t[n]))return!1}return!0}return!1}function ye(e){var t=[];return e.forEach((function(e){t.find((function(t){return ge(e,t)}))||t.push(e)})),t}function me(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:ye([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var be=he?r.useLayoutEffect:r.useEffect;function xe(e){var t=(0,r.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function we(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var _e={name:"className",defaultValue:"",fn:function(e){var t=e.popper.firstElementChild,n=function(){var t;return!!(null==(t=e.props.render)?void 0:t.$$tippy)};function r(){e.props.className&&!n()||we(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&we(t,"remove",e.props.className)},onAfterUpdate:r}}};function Ee(e){return function(t){var n=t.children,i=t.content,o=t.visible,a=t.singleton,s=t.render,u=t.reference,l=t.disabled,c=void 0!==l&&l,d=t.ignoreAttributes,f=void 0===d||d,h=(t.__source,t.__self,fe(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),p=void 0!==o,v=void 0!==a,g=(0,r.useState)(!1),y=g[0],m=g[1],b=(0,r.useState)({}),x=b[0],w=b[1],_=(0,r.useState)(),E=_[0],k=_[1],S=xe((function(){return{container:ve(),renders:1}})),P=Object.assign({ignoreAttributes:f},h,{content:S.container});p&&(P.trigger="manual",P.hideOnClick=!1),v&&(c=!0);var C=P,T=P.plugins||[];s&&(C=Object.assign({},P,{plugins:v&&null!=a.data?[].concat(T,[{fn:function(){return{onTrigger:function(e,t){var n=a.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,k(n.content)}}}}]):T,render:function(){return{popper:S.container}}}));var j=[u].concat(n?[n.type]:[]);return be((function(){var t=u;u&&u.hasOwnProperty("current")&&(t=u.current);var n=e(t||S.ref||ve(),Object.assign({},C,{plugins:[_e].concat(P.plugins||[])}));return S.instance=n,c&&n.disable(),o&&n.show(),v&&a.hook({instance:n,content:i,props:C,setSingletonContent:k}),m(!0),function(){n.destroy(),null==a||a.cleanup(n)}}),j),be((function(){var e;if(1!==S.renders){var t=S.instance;t.setProps(me(t.props,C)),null==(e=t.popperInstance)||e.forceUpdate(),c?t.disable():t.enable(),p&&(o?t.show():t.hide()),v&&a.hook({instance:t,content:i,props:C,setSingletonContent:k})}else S.renders++})),be((function(){var e;if(s){var t=S.instance;t.setProps({popperOptions:Object.assign({},t.props.popperOptions,{modifiers:[].concat(((null==(e=t.props.popperOptions)?void 0:e.modifiers)||[]).filter((function(e){return"$$tippyReact"!==e.name})),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t,n=e.state,r=null==(t=n.modifiersData)?void 0:t.hide;x.placement===n.placement&&x.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&x.escaped===(null==r?void 0:r.hasPopperEscaped)||w({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[x.placement,x.referenceHidden,x.escaped].concat(j)),r.default.createElement(r.default.Fragment,null,n?(0,r.cloneElement)(n,{ref:function(e){S.ref=e,pe(n.ref,e)}}):null,y&&(0,r.createPortal)(s?s(function(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}(x),E,S.instance):i,S.container))}}var ke=function(e,t){return(0,r.forwardRef)((function(n,i){var o=n.children,a=fe(n,["children"]);return r.default.createElement(e,Object.assign({},t,a),o?(0,r.cloneElement)(o,{ref:function(e){pe(i,e),pe(o.ref,e)}}):null)}))};const Se=ke(Ee(de));var Pe=n(72779),Ce=n.n(Pe),Te=n(43100),je=n(33847),De=0;function Ne(e,t,n,r,i){var o,a,s={};for(a in t)"ref"==a?o=t[a]:s[a]=t[a];var u={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--De,__source:r,__self:i};if("function"==typeof e&&(o=e.defaultProps))for(a in o)void 0===s[a]&&(s[a]=o[a]);return je.YM.vnode&&je.YM.vnode(u),u}const Oe=(0,r.memo)((function({projectGraphs:e,selectedProjectGraph:t,projectGraphChange:n,lastPerfReport:r}){return Ne("div",{"data-cy":"debugger-panel",className:"flex-column flex w-auto items-center items-center justify-items-center justify-items-center gap-4 border-b border-slate-900/10 bg-slate-50 p-4 transition-all dark:border-slate-300/10 dark:bg-transparent",children:[Ne("h4",{className:"dark:text-sidebar-title-dark mr-4 text-lg font-normal",children:"Debugger"}),Ne("select",{className:"flex w-auto items-center rounded-md rounded-md border border-slate-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 shadow-sm hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 hover:dark:bg-slate-700","data-cy":"project-select",onChange:e=>n(e.target.value),value:t,children:e.map((e=>Ne("option",{value:e.id,children:e.label},e.id)))}),Ne("p",{className:"text-sm",children:["Last render took ",r.renderTime,"ms:"," ",Ne("b",{className:"text-medium font-mono",children:[r.numNodes," nodes"]})," ","|"," ",Ne("b",{className:"text-medium font-mono",children:[r.numEdges," edges"]}),"."]})]})}));var Me=n(36021);const Ae={entry:n(60081).choose([{cond:"selectActionCannotBePersistedToRoute",actions:["notifyRouteClearSelect"]}]),on:{updateGraph:{target:"customSelected",actions:[(0,Me.f0)(((e,t)=>{const n=e.projects.map((e=>e.name)),r=t.projects.map((e=>e.name)).filter((e=>!n.includes(e)));e.selectedProjects=[...e.selectedProjects,...r]})),"setGraph",(0,f.send)(((e,t)=>({type:"notifyGraphUpdateGraph",projects:e.projects,dependencies:e.dependencies,affectedProjects:e.affectedProjects,workspaceLayout:e.workspaceLayout,groupByFolder:e.groupByFolder,selectedProjects:e.selectedProjects})),{to:e=>e.graphActor})]}}},Ie={entry:[(0,Me.f0)(((e,t)=>{"focusProject"===t.type&&(e.focusedProject=t.projectName)})),(0,f.send)(((e,t)=>{if("focusProject"===t.type)return{type:"notifyRouteFocusProject",focusedProject:t.projectName}}),{to:e=>e.routeSetterActor}),"notifyGraphFocusProject"],exit:[(0,Me.f0)((e=>{e.focusedProject=null})),"notifyRouteUnfocusProject"],on:{incrementSearchDepth:{actions:["incrementSearchDepth","notifyGraphFocusProject","notifyRouteSearchDepth"]},decrementSearchDepth:{actions:["decrementSearchDepth","notifyGraphFocusProject","notifyRouteSearchDepth"]},setSearchDepthEnabled:{actions:["setSearchDepthEnabled","notifyGraphFocusProject","notifyRouteSearchDepth"]},setSearchDepth:{actions:["setSearchDepth","notifyGraphFocusProject","notifyRouteSearchDepth"]},unfocusProject:{target:"unselected",actions:["notifyRouteUnfocusProject"]},updateGraph:{actions:["setGraph",(0,f.send)(((e,t)=>({type:"notifyGraphUpdateGraph",projects:e.projects,dependencies:e.dependencies,affectedProjects:e.affectedProjects,workspaceLayout:e.workspaceLayout,groupByFolder:e.groupByFolder,selectedProjects:e.selectedProjects})),{to:e=>e.graphActor}),"notifyGraphFocusProject"]}}};class Re{constructor(){this.subscribers=new Set,this.currentTooltip=void 0}openProjectNodeToolTip(e,t){this.currentTooltip={type:"node",ref:e,props:t},this.broadcastChange()}openEdgeToolTip(e,t){this.currentTooltip={type:"edge",ref:e,props:t},this.broadcastChange()}broadcastChange(){this.subscribers.forEach((e=>e(this.currentTooltip)))}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}hideAll(){this.currentTooltip=null,this.broadcastChange()}}let Be;function Le(){return Be||(Be=new Re),Be}var ze=n(93218),Fe=n.n(ze),Ve=n(81368),Ge=n.n(Ve),He=n(10404),Ze=n.n(He);const qe=document.documentElement,Ye="nx-dep-graph-theme";let Xe,We;function Ue(e){const t=e.matches?"dark":"light";qe.className=t,Xe=t}function $e(e){if(!("matchMedia"in window))return;const t=window.matchMedia("(prefers-color-scheme: dark)");if("system"!==e)t.removeEventListener("change",Ue),qe.className=e,Xe=e;else{const e=t.matches?"dark":"light";t.addEventListener("change",Ue),qe.className=e,Xe=e}localStorage.setItem(Ye,e),ct().evaluateStyles()}function Ke(e,t){return()=>Qe(e,t)}function Qe(e,t){return"dark"===Xe?e:t}!function(e){e.blue="hsla(214, 62%, 21%, 1)",e.green="hsla(162, 47%, 50%, 1)",e.lightBlue="hsla(192, 75%, 59%, 1)",e.gray="hsla(0, 0%, 92%, 1)",e.darkGray="hsla(0, 0%, 72%, 1)",e.black="hsla(220, 9%, 46%, 1)",e.red="hsla(347, 92%, 65%, 1)",e.white="#fff",e.stone="#1c1917"}(We||(We={}));const Je=[{selector:"edge",style:{width:Ke("2px","1px"),"line-color":Ke(We.gray,We.black),"text-outline-color":We.black,"text-outline-width":Ke("1px","0px"),color:Ke(We.white,We.black),"curve-style":"unbundled-bezier","target-arrow-shape":"triangle","target-arrow-fill":"filled","target-arrow-color":Ke(We.gray,We.black)}},{selector:"edge.affected",style:{"line-color":We.red,"target-arrow-color":We.red,"curve-style":"unbundled-bezier"}},{selector:"edge.implicit",style:{label:"implicit","font-size":"16px","curve-style":"unbundled-bezier","text-rotation":"autorotate"}},{selector:"edge.dynamic",style:{"line-dash-pattern":[5,5],"line-style":"dashed","curve-style":"unbundled-bezier"}},{selector:"edge.transparent",style:{opacity:.2}}];const et=new class{constructor(){this.cache=new Map,this.ctx=void 0}calculateWidth(e){if(!this.ctx){this.ctx=document.createElement("canvas").getContext("2d");const t=e.style("font-style"),n=e.style("font-size"),r=e.style("font-family"),i=e.style("font-weight");this.ctx.font=t+" "+i+" "+n+" "+r}const t=e.data("id");if(this.cache.has(t))return this.cache.get(t);{const n=this.ctx.measureText(e.data("id")).width;return this.cache.set(t,n),n}}},tt=[{selector:"node",style:{"font-size":"32px","font-family":'system-ui, "Helvetica Neue", sans-serif',"border-style":"solid","border-color":Ke(We.gray,We.darkGray),"border-width":Ke("2px","1px"),"text-halign":"center","text-valign":"center","padding-left":"16px",color:Ke(We.white,We.black),label:"data(id)",width:e=>et.calculateWidth(e),backgroundColor:Ke(We.black,We.white),"transition-property":"background-color, border-color, line-color, target-arrow-color","transition-duration":250,"transition-timing-function":"ease-out",shape:"round-rectangle"}},{selector:"node.focused",style:{color:We.white,"border-color":We.gray,backgroundColor:We.green}},{selector:"node.affected",style:{color:We.white,"border-color":We.gray,backgroundColor:We.red}},{selector:":parent",style:{"background-opacity":.5,"background-color":We.gray,"border-color":We.darkGray,label:"data(label)","text-halign":"center","text-valign":"top","font-weight":"bold","font-size":"48px"}},{selector:"node.highlight",style:{color:We.white,"border-color":We.gray,backgroundColor:We.blue}},{selector:"node.transparent:childless",style:{opacity:.5}},{selector:"node.transparent:parent",style:{"text-opacity":.5,"background-opacity":.25,"border-opacity":.5}}];function nt(e,t){const n=e.replace(t,"").split("/").filter((e=>""!==e));return n.pop(),n}class rt{constructor(e,t){this.project=e,this.workspaceRoot=t,this.affected=!1,this.focused=!1}getCytoscapeNodeDef(e){return{group:"nodes",data:this.getData(e),classes:this.getClasses(),selectable:!1,grabbable:!1,pannable:!0}}getData(e){return{id:this.project.name,type:this.project.type,tags:this.project.data.tags,parent:e&&this.project.data.hasOwnProperty("root")?this.getParentId():null,files:this.project.data.files,root:this.project.data.root}}getClasses(){var e;let t=null!=(e=this.project.type)?e:"";return this.affected&&(t+=" affected"),t}getParentId(){const e=this.getAncestors();return e.length>0?e[e.length-1].id:null}getAncestors(){if(!this.project.data.root)return[];return nt(this.project.data.root,this.workspaceRoot).map(((e,t,n)=>{const r=[...n].slice(0,t+1).join("/");return{label:r,id:`dir-${r}`,parentId:t>0?`dir-${[...n].slice(0,t).join("/")}`:null}}))}}class it{constructor(e){this.dep=e,this.affected=!1}getCytosacpeNodeDef(){var e;let t;return t={group:"edges",data:{id:`${this.dep.source}|${this.dep.target}`,source:this.dep.source,target:this.dep.target,type:this.dep.type}},t.classes=null!=(e=this.dep.type)?e:"",this.affected&&(t.classes+=" affected"),t}}class ot{constructor(e){this.config=e}getCytoscapeNodeDef(){return{group:"nodes",data:{id:this.config.id,parent:this.config.parentId,label:this.config.label,type:"dir"},selectable:!1,grabbable:!1,pannable:!0}}}function at(){return(0,r.useRef)(st()).current}function st(){return{exclude:window.exclude,watch:window.watch,localMode:window.localMode,projectGraphResponse:window.projectGraphResponse,environment:window.environment,appConfig:window.appConfig,useXstateInspect:window.useXstateInspect}}class ut{constructor(e,t){this.tooltipService=e,this.containerId=t,this.traversalGraph=void 0,this.renderGraph=void 0,this.collapseEdges=!1,Fe().use(Ge()),Fe().use(Ze())}handleEvent(e){const t=Date.now();switch(this.renderGraph&&"notifyGraphUpdateGraph"!==e.type&&this.renderGraph.nodes(".focused").removeClass("focused"),this.tooltipService.hideAll(),e.type){case"notifyGraphInitGraph":this.initGraph(e.projects,e.groupByFolder,e.workspaceLayout,e.dependencies,e.affectedProjects,e.collapseEdges);break;case"notifyGraphUpdateGraph":this.initGraph(e.projects,e.groupByFolder,e.workspaceLayout,e.dependencies,e.affectedProjects,e.collapseEdges),this.setShownProjects(e.selectedProjects.length>0?e.selectedProjects:this.renderGraph.nodes(":childless").map((e=>e.id())));break;case"notifyGraphFocusProject":this.focusProject(e.projectName,e.searchDepth);break;case"notifyGraphFilterProjectsByText":this.filterProjectsByText(e.search,e.includeProjectsByPath,e.searchDepth);break;case"notifyGraphShowProject":this.showProjects([e.projectName]);break;case"notifyGraphHideProject":this.hideProject(e.projectName);break;case"notifyGraphShowAllProjects":this.showAllProjects();break;case"notifyGraphHideAllProjects":this.hideAllProjects();break;case"notifyGraphShowAffectedProjects":this.showAffectedProjects();break;case"notifyGraphTracing":e.start&&e.end&&("shortest"===e.algorithm?this.traceProjects(e.start,e.end):this.traceAllProjects(e.start,e.end))}let n=[],r={numEdges:0,numNodes:0,renderTime:0};if(this.renderGraph){const e=this.renderGraph.elements().sort(((e,t)=>e.id().localeCompare(t.id())));e.layout({name:"dagre",nodeDimensionsIncludeLabels:!0,rankSep:75,rankDir:"TB",edgeSep:50,ranker:"network-simplex"}).run(),this.collapseEdges&&(this.renderGraph.remove(this.renderGraph.edges()),e.edges().forEach((e=>{const t=e.source(),n=e.target();if(t.parent().first().id()===n.parent().first().id())this.renderGraph.add(e);else{let r,i;const o=e.connectedNodes().commonAncestors();let a,s;if(o.length>0?(r=t.ancestors().filter((e=>!o.contains(e))),i=n.ancestors().filter((e=>!o.contains(e)))):(r=t.ancestors(),i=n.ancestors()),r.length>0&&0===i.length?(a=r.last().id(),s=n.id()):i.length>0&&0===r.length?(a=t.id(),s=i.last().id()):(a=r.last().id(),s=i.last().id()),void 0!==a&&void 0!==s){const e=`${a}|${s}`;if(0===this.renderGraph.$id(e).length){const t={group:"edges",data:{id:e,source:a,target:s}};this.renderGraph.add(t)}}else console.log(`Couldn't figure out how to draw edge ${e.id()}`),console.log("source ancestors",r.map((e=>e.id()))),console.log("target ancestors",i.map((e=>e.id())))}})));"nx-console"===st().environment?this.renderGraph.fit(this.renderGraph.elements(),175).center().resize().panBy({x:150,y:0}):this.renderGraph.fit(this.renderGraph.elements(),25).center().resize(),n=this.renderGraph.nodes('[type!="dir"]').map((e=>e.id()));r={renderTime:Date.now()-t,numNodes:this.renderGraph.nodes().length,numEdges:this.renderGraph.edges().length}}return{selectedProjectNames:n,perfReport:r}}setShownProjects(e){let t=this.traversalGraph.collection();e.forEach((e=>{t=t.union(this.traversalGraph.$id(e))}));const n=t.ancestors(),r=t.union(n),i=r.edgesTo(r);this.transferToRenderGraph(r.union(i))}showProjects(e){var t,n;const r=null!=(t=null==(n=this.renderGraph)?void 0:n.nodes())?t:this.traversalGraph.collection();let i=this.traversalGraph.collection();e.forEach((e=>{i=i.union(this.traversalGraph.$id(e))}));const o=i.ancestors(),a=r.union(i).union(o),s=a.edgesTo(a);this.transferToRenderGraph(a.union(s))}hideProject(e){var t,n;const r=null!=(t=null==(n=this.renderGraph)?void 0:n.nodes())?t:this.traversalGraph.collection(),i=this.renderGraph.$id(e),o=r.difference(i).difference(i.ancestors()),a=o.ancestors();let s=o.union(a);const u=s.edgesTo(s);this.transferToRenderGraph(s.union(u))}showAffectedProjects(){const e=this.traversalGraph.nodes(".affected"),t=e.ancestors(),n=e.union(t),r=n.edgesTo(n);this.transferToRenderGraph(n.union(r))}focusProject(e,t=1){const n=this.traversalGraph.$id(e),r=this.includeProjectsByDepth(n,t),i=n.union(r),o=i.ancestors(),a=i.union(o),s=a.edgesTo(a);this.transferToRenderGraph(a.union(s)),this.renderGraph.$id(e).addClass("focused")}showAllProjects(){this.transferToRenderGraph(this.traversalGraph.elements())}hideAllProjects(){this.transferToRenderGraph(this.traversalGraph.collection())}filterProjectsByText(e,t,n=-1){if(""===e)this.transferToRenderGraph(this.traversalGraph.collection());else{const r=e.split(",");let i=this.traversalGraph.nodes().filter((e=>r.findIndex((t=>e.id().includes(t)))>-1));t&&(i=i.union(this.includeProjectsByDepth(i,n))),i=i.union(i.ancestors());const o=i.edgesTo(i);this.transferToRenderGraph(i.union(o))}}traceProjects(e,t){const n=this.traversalGraph.elements().dijkstra({root:`[id = "${e}"]`,directed:!0}).pathTo(this.traversalGraph.$(`[id = "${t}"]`));this.transferToRenderGraph(n.union(n.ancestors()))}traceAllProjects(e,t){const n=[[this.traversalGraph.$id(e).nodes().first()]],r=[];let i=0;for(;n.length>0&&i<=1e3;){const e=n.pop(),o=e[e.length-1].outgoers("node");o.length>0&&o.forEach((i=>{const o=[...e,i];i.id()===t?r.push(o):n.push(o)})),i++}i>=1e3&&console.log("failsafe triggered!");let o=this.traversalGraph.collection();r.forEach((e=>{for(let t=0;t<e.length;t++){o=o.union(e[t]);const n=t+1;n<e.length&&(o=o.union(e[t].edgesTo(e[n])))}})),o.union(o.ancestors()),this.transferToRenderGraph(o.union(o.ancestors()))}transferToRenderGraph(e){let t;this.renderGraph&&(t=this.renderGraph.nodes(".focused").first().id(),this.renderGraph.destroy(),delete this.renderGraph);const n=document.getElementById(this.containerId);this.renderGraph=Fe()({container:n,headless:!n,boxSelectionEnabled:!1,style:[...tt,...Je]}),this.renderGraph.add(e),t&&this.renderGraph.$id(t).addClass("focused"),this.renderGraph.on("zoom",(()=>{this.tooltipService.hideAll()})),this.listenForProjectNodeClicks(),this.listenForEdgeNodeClicks(),this.listenForProjectNodeHovers()}includeProjectsByDepth(e,t=-1){let n=this.traversalGraph.collection();if(-1===t)n=e.predecessors();else{n=e.incomers();for(let e=1;e<t;e++)n=n.union(n.incomers())}let r=this.traversalGraph.collection();if(-1===t)r=e.successors();else{r=e.outgoers();for(let e=1;e<t;e++)r=r.union(r.outgoers())}return e.union(n).union(r)}initGraph(e,t,n,r,i,o){this.collapseEdges=o,this.tooltipService.hideAll(),this.generateCytoscapeLayout(e,t,n,r,i)}generateCytoscapeLayout(e,t,n,r,i){const o=this.createElements(e,t,n,r,i);this.traversalGraph=Fe()({headless:!0,elements:[...o],boxSelectionEnabled:!1,style:[...tt,...Je]})}createElements(e,t,n,r,i){let o=[];const a=e.map((e=>e.name)),s=[],u=[],l={};e.forEach((e=>{const o="app"===e.type||"e2e"===e.type?n.appsDir:n.libsDir,c=new rt(e,o);if(c.affected=i.includes(e.name),s.push(c),r[e.name].forEach((e=>{if(a.includes(e.target)){const t=new it(e);u.push(t)}})),t){c.getAncestors().forEach((e=>l[e.id]=e))}}));const c=s.map((e=>e.getCytoscapeNodeDef(t))),d=u.map((e=>e.getCytosacpeNodeDef()));if(o=c.concat(d),t){o=Object.keys(l).map((e=>new ot(l[e]).getCytoscapeNodeDef())).concat(o)}return o}listenForProjectNodeClicks(){this.renderGraph.$("node:childless").on("click",(e=>{const t=e.target;let n=t.popperRef();this.tooltipService.openProjectNodeToolTip(n,{id:t.id(),type:t.data("type"),tags:t.data("tags")})}))}listenForEdgeNodeClicks(){this.renderGraph.$("edge").on("click",(e=>{const t=e.target;let n=t.popperRef();this.tooltipService.openEdgeToolTip(n,{type:t.data("type"),source:t.source().id(),target:t.target().id(),fileDependencies:t.source().data("files").filter((e=>e.deps&&e.deps.includes(t.target().id()))).map((e=>({fileName:e.file.replace(`${t.source().data("root")}/`,""),target:t.target().id()})))})}))}listenForProjectNodeHovers(){this.renderGraph.on("mouseover",(e=>{const t=e.target;t.isNode&&t.isNode()&&!t.isParent()&&(this.renderGraph.elements().difference(t.outgoers().union(t.incomers())).not(t).addClass("transparent"),t.addClass("highlight").outgoers().union(t.incomers()).addClass("highlight"))})),this.renderGraph.on("mouseout",(e=>{const t=e.target;t.isNode&&t.isNode()&&!t.isParent()&&(this.renderGraph.elements().removeClass("transparent"),t.removeClass("highlight").outgoers().union(t.incomers()).removeClass("highlight"))}))}getImage(){const e=Qe("#0F172A","#FFFFFF");return this.renderGraph.png({bg:e,full:!0})}evaluateStyles(){if(this.renderGraph){const e=this.renderGraph.container();this.renderGraph.unmount(),this.renderGraph.mount(e)}}}let lt;function ct(){return lt||(lt=new ut(Le(),"cytoscape-graph")),lt}const dt=(e,t)=>{const n=ct();t((t=>{const{selectedProjectNames:r,perfReport:i}=n.handleEvent(t);e({type:"setSelectedProjectsFromGraph",selectedProjectNames:r,perfReport:i})}))};function ft(){return ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ft.apply(this,arguments)}var ht;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(ht||(ht={}));var pt=function(e){return e};var vt="beforeunload",gt="popstate";function yt(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function i(){var e=n.location,t=e.pathname,i=e.search,o=e.hash,a=r.state||{};return[a.idx,pt({pathname:t,search:i,hash:o,state:a.usr||null,key:a.key||"default"})]}var o=null;n.addEventListener(gt,(function(){if(o)d.call(o),o=null;else{var e=ht.Pop,t=i(),n=t[0],r=t[1];if(d.length){if(null!=n){var a=u-n;a&&(o={action:e,location:r,retry:function(){y(-1*a)}},y(a))}}else g(e)}}));var a=ht.Pop,s=i(),u=s[0],l=s[1],c=bt(),d=bt();function f(e){return"string"==typeof e?e:wt(e)}function h(e,t){return void 0===t&&(t=null),pt(ft({pathname:l.pathname,hash:"",search:""},"string"==typeof e?_t(e):e,{state:t,key:xt()}))}function p(e,t){return[{usr:e.state,key:e.key,idx:t},f(e)]}function v(e,t,n){return!d.length||(d.call({action:e,location:t,retry:n}),!1)}function g(e){a=e;var t=i();u=t[0],l=t[1],c.call({action:a,location:l})}function y(e){r.go(e)}null==u&&(u=0,r.replaceState(ft({},r.state,{idx:u}),""));var m={get action(){return a},get location(){return l},createHref:f,push:function e(t,i){var o=ht.Push,a=h(t,i);if(v(o,a,(function(){e(t,i)}))){var s=p(a,u+1),l=s[0],c=s[1];try{r.pushState(l,"",c)}catch(d){n.location.assign(c)}g(o)}},replace:function e(t,n){var i=ht.Replace,o=h(t,n);if(v(i,o,(function(){e(t,n)}))){var a=p(o,u),s=a[0],l=a[1];r.replaceState(s,"",l),g(i)}},go:y,back:function(){y(-1)},forward:function(){y(1)},listen:function(e){return c.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&n.addEventListener(vt,mt),function(){t(),d.length||n.removeEventListener(vt,mt)}}};return m}function mt(e){e.preventDefault(),e.returnValue=""}function bt(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function xt(){return Math.random().toString(36).substr(2,8)}function wt(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,o=e.hash,a=void 0===o?"":o;return i&&"?"!==i&&(n+="?"===i.charAt(0)?i:"?"+i),a&&"#"!==a&&(n+="#"===a.charAt(0)?a:"#"+a),n}function _t(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Et(e){const t=Object.entries(e).reduce(((e,[t,n])=>(null!==n&&(e[t]=n),e)),{});return new URLSearchParams(t).toString()}const kt={entry:[(0,Me.f0)(((e,t)=>{"filterByText"===t.type&&(e.textFilter=t.search)})),"notifyGraphFilterProjectsByText"],on:{clearTextFilter:{target:"unselected",actions:(0,Me.f0)((e=>{e.includePath=!1,e.textFilter=""}))},setIncludeProjectsByPath:{actions:["setIncludeProjectsByPath","notifyGraphFilterProjectsByText"]},incrementSearchDepth:{actions:["incrementSearchDepth","notifyGraphFilterProjectsByText"]},decrementSearchDepth:{actions:["decrementSearchDepth","notifyGraphFilterProjectsByText"]},setSearchDepthEnabled:{actions:["setSearchDepthEnabled","notifyGraphFilterProjectsByText"]},updateGraph:{actions:["setGraph",(0,f.send)(((e,t)=>({type:"notifyGraphUpdateGraph",projects:e.projects,dependencies:e.dependencies,affectedProjects:e.affectedProjects,workspaceLayout:e.workspaceLayout,groupByFolder:e.groupByFolder,selectedProjects:e.selectedProjects})),{to:e=>e.graphActor}),"notifyGraphFilterProjectsByText"]}}},St={entry:[(0,Me.f0)(((e,t)=>{"setTracingStart"===t.type?e.tracing.start=t.projectName:"setTracingEnd"===t.type&&(e.tracing.end=t.projectName)})),"notifyRouteTracing","notifyGraphTracing"],exit:[(0,Me.f0)(((e,t)=>{"setTracingStart"!==t.type&&"setTracingEnd"!==t.type&&(e.tracing.start=null,e.tracing.end=null)})),"notifyRouteTracing"],on:{clearTraceStart:{actions:[(0,Me.f0)((e=>{e.tracing.start=null})),"notifyRouteTracing","notifyGraphTracing"]},clearTraceEnd:{actions:[(0,Me.f0)((e=>{e.tracing.end=null})),"notifyRouteTracing","notifyGraphTracing"]}}};const Pt=e=>{(function(e){const t=[];return new URLSearchParams(e).forEach(((e,n)=>{switch(n){case"select":"all"===e?t.push({type:"selectAll"}):"affected"===e&&t.push({type:"selectAffected"});break;case"focus":t.push({type:"focusProject",projectName:e});break;case"groupByFolder":t.push({type:"setGroupByFolder",groupByFolder:!0});break;case"collapseEdges":t.push({type:"setCollapseEdges",collapseEdges:!0});break;case"searchDepth":const n=parseInt(e,10);0===n?t.push({type:"setSearchDepthEnabled",searchDepthEnabled:!1}):n>1&&t.push({type:"setSearchDepth",searchDepth:parseInt(e)});break;case"traceAlgorithm":"shortest"!==e&&"all"!==e||t.unshift({type:"setTracingAlgorithm",algorithm:e});break;case"traceStart":t.push({type:"setTracingStart",projectName:e});break;case"traceEnd":t.push({type:"setTracingEnd",projectName:e})}})),t})(yt().location.search).forEach((t=>e(t)))},Ct={entry:["notifyGraphHideAllProjects",(0,Me.f0)(((e,t)=>{null===e.routeListenerActor&&(e.routeListenerActor=(0,o.Cs)(Pt,"routeListener"))})),"notifyRouteClearSelect"],on:{updateGraph:{target:"customSelected",actions:[(0,Me.f0)(((e,t)=>{const n=e.projects.map((e=>e.name)),r=t.projects.map((e=>e.name)).filter((e=>!n.includes(e)));e.selectedProjects=[...e.selectedProjects,...r]})),"setGraph",(0,f.send)(((e,t)=>({type:"notifyGraphUpdateGraph",projects:e.projects,dependencies:e.dependencies,affectedProjects:e.affectedProjects,workspaceLayout:e.workspaceLayout,groupByFolder:e.groupByFolder,selectedProjects:e.selectedProjects})),{to:e=>e.graphActor})]}}},Tt=(0,d.J)({id:"DepGraph",initial:"idle",context:{projects:[],dependencies:{},affectedProjects:[],selectedProjects:[],focusedProject:null,textFilter:"",includePath:!1,searchDepth:1,searchDepthEnabled:!0,groupByFolder:!1,collapseEdges:!1,workspaceLayout:{libsDir:"",appsDir:""},graphActor:null,routeSetterActor:null,routeListenerActor:null,lastPerfReport:{numEdges:0,numNodes:0,renderTime:0},tracing:{start:null,end:null,algorithm:"shortest"}},states:{idle:{},unselected:Ct,customSelected:Ae,focused:Ie,textFiltered:kt,tracing:St},on:{initGraph:{target:"unselected",actions:["setGraph",(0,f.send)(((e,t)=>({type:"notifyGraphInitGraph",projects:e.projects,dependencies:e.dependencies,affectedProjects:e.affectedProjects,workspaceLayout:e.workspaceLayout,groupByFolder:e.groupByFolder,collapseEdges:e.collapseEdges})),{to:e=>e.graphActor})]},setSelectedProjectsFromGraph:{actions:[(0,Me.f0)(((e,t)=>{e.selectedProjects=t.selectedProjectNames,e.lastPerfReport=t.perfReport}))]},selectProject:{target:"customSelected",actions:["notifyGraphShowProject"]},selectAll:{target:"customSelected",actions:["notifyGraphShowAllProjects","notifyRouteSelectAll"]},selectAffected:{target:"customSelected",actions:["notifyGraphShowAffectedProjects","notifyRouteSelectAffected"]},deselectProject:[{target:"unselected",cond:"deselectLastProject"},{target:"customSelected",actions:["notifyGraphHideProject"]}],deselectAll:{target:"unselected"},focusProject:{target:"focused"},setTracingStart:{target:"tracing"},setTracingEnd:{target:"tracing"},setCollapseEdges:{actions:["setCollapseEdges",(0,f.send)(((e,t)=>({type:"notifyGraphUpdateGraph",projects:e.projects,dependencies:e.dependencies,affectedProjects:e.affectedProjects,workspaceLayout:e.workspaceLayout,groupByFolder:e.groupByFolder,collapseEdges:e.collapseEdges,selectedProjects:e.selectedProjects})),{to:e=>e.graphActor}),(0,f.send)(((e,t)=>{if("setCollapseEdges"===t.type)return{type:"notifyRouteCollapseEdges",collapseEdges:t.collapseEdges}}),{to:e=>e.routeSetterActor})]},setGroupByFolder:{actions:["setGroupByFolder",(0,f.send)(((e,t)=>({type:"notifyGraphUpdateGraph",projects:e.projects,dependencies:e.dependencies,affectedProjects:e.affectedProjects,workspaceLayout:e.workspaceLayout,groupByFolder:e.groupByFolder,collapseEdges:e.collapseEdges,selectedProjects:e.selectedProjects})),{to:e=>e.graphActor}),(0,f.send)(((e,t)=>{if("setGroupByFolder"===t.type)return{type:"notifyRouteGroupByFolder",groupByFolder:t.groupByFolder}}),{to:e=>e.routeSetterActor})]},setIncludeProjectsByPath:{actions:[(0,Me.f0)(((e,t)=>{e.includePath=t.includeProjectsByPath}))]},incrementSearchDepth:{actions:["incrementSearchDepth","notifyRouteSearchDepth"]},decrementSearchDepth:{actions:["decrementSearchDepth","notifyRouteSearchDepth"]},setSearchDepthEnabled:{actions:["setSearchDepthEnabled","notifyRouteSearchDepth"]},setSearchDepth:{actions:["setSearchDepth","notifyRouteSearchDepth"]},setTracingAlgorithm:{actions:[(0,Me.f0)(((e,t)=>{e.tracing.algorithm=t.algorithm})),"notifyRouteTracing","notifyGraphTracing"]},filterByText:{target:"textFiltered"}}},{guards:{deselectLastProject:e=>e.selectedProjects.length<=1,selectActionCannotBePersistedToRoute:(e,t)=>"selectAffected"!==t.type&&"selectAll"!==t.type},actions:{setGroupByFolder:(0,Me.f0)(((e,t)=>{"setGroupByFolder"===t.type&&(e.groupByFolder=t.groupByFolder)})),setCollapseEdges:(0,Me.f0)(((e,t)=>{"setCollapseEdges"===t.type&&(e.collapseEdges=t.collapseEdges)})),incrementSearchDepth:(0,Me.f0)((e=>{e.searchDepthEnabled=!0,e.searchDepth=e.searchDepth+1})),decrementSearchDepth:(0,Me.f0)((e=>{e.searchDepthEnabled=!0,e.searchDepth=e.searchDepth>1?e.searchDepth-1:1})),setSearchDepth:(0,Me.f0)(((e,t)=>{"setSearchDepth"===t.type&&(e.searchDepthEnabled=!0,e.searchDepth=t.searchDepth>1?t.searchDepth:1)})),setSearchDepthEnabled:(0,Me.f0)(((e,t)=>{"setSearchDepthEnabled"===t.type&&(e.searchDepthEnabled=t.searchDepthEnabled)})),setIncludeProjectsByPath:(0,Me.f0)(((e,t)=>{"setIncludeProjectsByPath"===t.type&&(e.includePath=t.includeProjectsByPath)})),setGraph:(0,Me.f0)(((e,t)=>{"initGraph"!==t.type&&"updateGraph"!==t.type||(e.projects=t.projects,e.dependencies=t.dependencies,e.graphActor=(0,o.Cs)(dt,"graphActor"),e.routeSetterActor=(0,o.Cs)((()=>{const e=yt(),t=new URLSearchParams(e.location.search),n={focus:t.get("focus"),groupByFolder:t.get("groupByFolder"),collapseEdges:t.get("collapseEdges"),searchDepth:t.get("searchDepth"),select:t.get("select"),traceStart:t.get("traceStart"),traceEnd:t.get("traceEnd"),traceAlgorithm:t.get("traceAlgorithm")},r={currentParamString:Et(n),params:n};return(0,d.J)({id:"route",context:{currentParamString:"",params:{focus:null,groupByFolder:null,searchDepth:null,select:null,collapseEdges:null,traceStart:null,traceEnd:null,trac