nx 13.10.3 → 14.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/executors.json +9 -0
- package/migrations.json +3 -0
- package/package.json +32 -3
- package/presets/core.json +21 -0
- package/presets/npm.json +20 -0
- package/src/command-line/connect-to-nx-cloud.d.ts +1 -1
- package/src/command-line/connect-to-nx-cloud.js +4 -4
- package/src/command-line/connect-to-nx-cloud.js.map +1 -1
- package/src/command-line/examples.js +5 -1
- package/src/command-line/examples.js.map +1 -1
- package/src/command-line/generate.d.ts +1 -1
- package/src/command-line/generate.js +6 -5
- package/src/command-line/generate.js.map +1 -1
- package/src/command-line/migrate.d.ts +18 -38
- package/src/command-line/migrate.js +385 -276
- package/src/command-line/migrate.js.map +1 -1
- package/src/command-line/nx-commands.js +20 -1
- package/src/command-line/nx-commands.js.map +1 -1
- package/src/command-line/run.js +1 -1
- package/src/command-line/run.js.map +1 -1
- package/src/config/misc-interfaces.d.ts +58 -0
- package/src/config/workspaces.d.ts +1 -0
- package/src/config/workspaces.js +6 -1
- package/src/config/workspaces.js.map +1 -1
- package/src/core/dep-graph/3rdpartylicenses.txt +25 -0
- package/src/core/dep-graph/index.html +1 -2
- package/src/core/dep-graph/main.esm.js +1 -1
- package/src/core/dep-graph/main.esm.js.LICENSE.txt +6 -0
- package/src/core/dep-graph/styles.css +1 -1
- package/src/executors/run-script/run-script.impl.d.ts +7 -0
- package/src/executors/run-script/run-script.impl.js +29 -0
- package/src/executors/run-script/run-script.impl.js.map +1 -0
- package/src/executors/run-script/schema.json +16 -0
- package/src/utils/fileutils.d.ts +1 -1
- package/src/utils/fileutils.js +1 -1
- package/src/utils/fileutils.js.map +1 -1
- package/src/utils/package-json.d.ts +11 -1
- package/src/utils/package-json.js +1 -1
- package/src/utils/package-json.js.map +1 -1
- package/src/utils/package-manager.d.ts +15 -2
- package/src/utils/package-manager.js +98 -43
- package/src/utils/package-manager.js.map +1 -1
- package/src/utils/params.d.ts +4 -0
- package/src/utils/params.js.map +1 -1
- package/src/utils/print-help.d.ts +1 -0
- package/src/utils/print-help.js +205 -34
- package/src/utils/print-help.js.map +1 -1
- package/src/utils/versions.js +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see main.esm.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk=self.webpackChunk||[]).push([[179],{45329:(e,t,n)=>{"use strict";var r=n(12139),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},a.apply(this,arguments)},i=n(78376),o=n(60035),s=n(77847),l=n.n(s);function u(e){return"function"==typeof e?e():e}function c(e){try{return JSON.stringify(e)}catch(Se){return l()(e)}}var d=new Map;var f={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),d.set(n.sessionId,n),t.forEach((function(e){return e(n)})),n.onStop((function(){e.delete(n),d.delete(n.sessionId)}))},unregister:function(t){e.delete(t),d.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}};var h=n(88068),p="tippy-content",v="tippy-backdrop",g="tippy-arrow",m="tippy-svg-arrow",y={passive:!0,capture:!0},w=function(){return document.body};function b(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function x(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function _(e,t){return"function"==typeof e?e.apply(void 0,t):e}function E(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function k(e){return[].concat(e)}function C(e,t){-1===e.indexOf(t)&&e.push(t)}function S(e){return e.split("-")[0]}function j(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 R(){return document.createElement("div")}function P(e){return["Element","Fragment"].some((function(t){return x(e,t)}))}function O(e){return x(e,"MouseEvent")}function z(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function A(e){return P(e)?[e]:function(e){return x(e,"NodeList")}(e)?j(e):Array.isArray(e)?e:j(document.querySelectorAll(e))}function T(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function B(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function D(e){var t,n=k(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function N(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function L(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 V={isTouch:!1},I=0;function H(){V.isTouch||(V.isTouch=!0,window.performance&&document.addEventListener("mousemove",F))}function F(){var e=performance.now();e-I<20&&(V.isTouch=!1,document.removeEventListener("mousemove",F)),I=e}function G(){var e=document.activeElement;if(z(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Y=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var q={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},W=Object.assign({appendTo:w,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},q,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),U=Object.keys(W);function X(e){var t=(e.plugins||[]).reduce((function(t,n){var r,a=n.name,i=n.defaultValue;a&&(t[a]=void 0!==e[a]?e[a]:null!=(r=W[a])?r:i);return t}),{});return Object.assign({},e,t)}function $(e,t){var n=Object.assign({},t,{content:_(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(X(Object.assign({},W,{plugins:t}))):U).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(Se){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},W.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 K(e,t){e.innerHTML=t}function Z(e){var t=R();return!0===e?t.className=g:(t.className=m,P(e)?t.appendChild(e):K(t,e)),t}function Q(e,t){P(t.content)?(K(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?K(e,t.content):e.textContent=t.content)}function J(e){var t=e.firstElementChild,n=j(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(p)})),arrow:n.find((function(e){return e.classList.contains(g)||e.classList.contains(m)})),backdrop:n.find((function(e){return e.classList.contains(v)}))}}function ee(e){var t=R(),n=R();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=R();function a(n,r){var a=J(t),i=a.box,o=a.content,s=a.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Q(o,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(Z(r.arrow))):i.appendChild(Z(r.arrow)):s&&i.removeChild(s)}return r.className=p,r.setAttribute("data-state","hidden"),Q(r,e.props),t.appendChild(n),n.appendChild(r),a(e.props,e.props),{popper:t,onUpdate:a}}ee.$$tippy=!0;var te=1,ne=[],re=[];function ae(e,t){var n,r,a,i,o,s,l,u,c=$(e,Object.assign({},W,X(M(t)))),d=!1,f=!1,p=!1,v=!1,g=[],m=E(be,c.interactiveDebounce),x=te++,P=(u=c.plugins).filter((function(e,t){return u.indexOf(e)===t})),z={id:x,reference:e,popper:R(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:P,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(a)},setProps:function(t){0;if(z.state.isDestroyed)return;oe("onBeforeUpdate",[z,t]),ye();var n=z.props,r=$(e,Object.assign({},n,M(t),{ignoreAttributes:!0}));z.props=r,me(),n.interactiveDebounce!==r.interactiveDebounce&&(ue(),m=E(be,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?k(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");le(),ie(),H&&H(n,r);z.popperInstance&&(ke(),Se().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));oe("onAfterUpdate",[z,t])},setContent:function(e){z.setProps({content:e})},show:function(){0;var e=z.state.isVisible,t=z.state.isDestroyed,n=!z.state.isEnabled,r=V.isTouch&&!z.props.touch,a=b(z.props.duration,0,W.duration);if(e||t||n||r)return;if(Z().hasAttribute("disabled"))return;if(oe("onShow",[z],!1),!1===z.props.onShow(z))return;z.state.isVisible=!0,K()&&(I.style.visibility="visible");ie(),he(),z.state.isMounted||(I.style.transition="none");if(K()){var i=ee(),o=i.box,l=i.content;T([o,l],0)}s=function(){var e;if(z.state.isVisible&&!v){if(v=!0,I.offsetHeight,I.style.transition=z.props.moveTransition,K()&&z.props.animation){var t=ee(),n=t.box,r=t.content;T([n,r],a),B([n,r],"visible")}se(),le(),C(re,z),null==(e=z.popperInstance)||e.forceUpdate(),oe("onMount",[z]),z.props.animation&&K()&&function(e,t){ve(e,t)}(a,(function(){z.state.isShown=!0,oe("onShown",[z])}))}},function(){var e,t=z.props.appendTo,n=Z();e=z.props.interactive&&t===w||"parent"===t?n.parentNode:_(t,[n]);e.contains(I)||e.appendChild(I);z.state.isMounted=!0,ke(),!1}()},hide:function(){0;var e=!z.state.isVisible,t=z.state.isDestroyed,n=!z.state.isEnabled,r=b(z.props.duration,1,W.duration);if(e||t||n)return;if(oe("onHide",[z],!1),!1===z.props.onHide(z))return;z.state.isVisible=!1,z.state.isShown=!1,v=!1,d=!1,K()&&(I.style.visibility="hidden");if(ue(),pe(),ie(!0),K()){var a=ee(),i=a.box,o=a.content;z.props.animation&&(T([i,o],r),B([i,o],"hidden"))}se(),le(),z.props.animation?K()&&function(e,t){ve(e,(function(){!z.state.isVisible&&I.parentNode&&I.parentNode.contains(I)&&t()}))}(r,z.unmount):z.unmount()},hideWithInteractivity:function(e){0;Q().addEventListener("mousemove",m),C(ne,m),m(e)},enable:function(){z.state.isEnabled=!0},disable:function(){z.hide(),z.state.isEnabled=!1},unmount:function(){0;z.state.isVisible&&z.hide();if(!z.state.isMounted)return;Ce(),Se().forEach((function(e){e._tippy.unmount()})),I.parentNode&&I.parentNode.removeChild(I);re=re.filter((function(e){return e!==z})),z.state.isMounted=!1,oe("onHidden",[z])},destroy:function(){0;if(z.state.isDestroyed)return;z.clearDelayTimeouts(),z.unmount(),ye(),delete e._tippy,z.state.isDestroyed=!0,oe("onDestroy",[z])}};if(!c.render)return z;var A=c.render(z),I=A.popper,H=A.onUpdate;I.setAttribute("data-tippy-root",""),I.id="tippy-"+z.id,z.popper=I,e._tippy=z,I._tippy=z;var F=P.map((function(e){return e.fn(z)})),G=e.hasAttribute("aria-expanded");return me(),le(),ie(),oe("onCreate",[z]),c.showOnCreate&&je(),I.addEventListener("mouseenter",(function(){z.props.interactive&&z.state.isVisible&&z.clearDelayTimeouts()})),I.addEventListener("mouseleave",(function(){z.props.interactive&&z.props.trigger.indexOf("mouseenter")>=0&&Q().addEventListener("mousemove",m)})),z;function q(){var e=z.props.touch;return Array.isArray(e)?e:[e,0]}function U(){return"hold"===q()[0]}function K(){var e;return!(null==(e=z.props.render)||!e.$$tippy)}function Z(){return l||e}function Q(){var e=Z().parentNode;return e?D(e):document}function ee(){return J(I)}function ae(e){return z.state.isMounted&&!z.state.isVisible||V.isTouch||i&&"focus"===i.type?0:b(z.props.delay,e?0:1,W.delay)}function ie(e){void 0===e&&(e=!1),I.style.pointerEvents=z.props.interactive&&!e?"":"none",I.style.zIndex=""+z.props.zIndex}function oe(e,t,n){var r;(void 0===n&&(n=!0),F.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=z.props)[e].apply(r,t)}function se(){var t=z.props.aria;if(t.content){var n="aria-"+t.content,r=I.id;k(z.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(z.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var a=t&&t.replace(r,"").trim();a?e.setAttribute(n,a):e.removeAttribute(n)}}))}}function le(){!G&&z.props.aria.expanded&&k(z.props.triggerTarget||e).forEach((function(e){z.props.interactive?e.setAttribute("aria-expanded",z.state.isVisible&&e===Z()?"true":"false"):e.removeAttribute("aria-expanded")}))}function ue(){Q().removeEventListener("mousemove",m),ne=ne.filter((function(e){return e!==m}))}function ce(t){if(!V.isTouch||!p&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!z.props.interactive||!L(I,n)){if(k(z.props.triggerTarget||e).some((function(e){return L(e,n)}))){if(V.isTouch)return;if(z.state.isVisible&&z.props.trigger.indexOf("click")>=0)return}else oe("onClickOutside",[z,t]);!0===z.props.hideOnClick&&(z.clearDelayTimeouts(),z.hide(),f=!0,setTimeout((function(){f=!1})),z.state.isMounted||pe())}}}function de(){p=!0}function fe(){p=!1}function he(){var e=Q();e.addEventListener("mousedown",ce,!0),e.addEventListener("touchend",ce,y),e.addEventListener("touchstart",fe,y),e.addEventListener("touchmove",de,y)}function pe(){var e=Q();e.removeEventListener("mousedown",ce,!0),e.removeEventListener("touchend",ce,y),e.removeEventListener("touchstart",fe,y),e.removeEventListener("touchmove",de,y)}function ve(e,t){var n=ee().box;function r(e){e.target===n&&(N(n,"remove",r),t())}if(0===e)return t();N(n,"remove",o),N(n,"add",r),o=r}function ge(t,n,r){void 0===r&&(r=!1),k(z.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),g.push({node:e,eventType:t,handler:n,options:r})}))}function me(){var e;U()&&(ge("touchstart",we,{passive:!0}),ge("touchend",xe,{passive:!0})),(e=z.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(ge(e,we),e){case"mouseenter":ge("mouseleave",xe);break;case"focus":ge(Y?"focusout":"blur",_e);break;case"focusin":ge("focusout",_e)}}))}function ye(){g.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,a=e.options;t.removeEventListener(n,r,a)})),g=[]}function we(e){var t,n=!1;if(z.state.isEnabled&&!Ee(e)&&!f){var r="focus"===(null==(t=i)?void 0:t.type);i=e,l=e.currentTarget,le(),!z.state.isVisible&&O(e)&&ne.forEach((function(t){return t(e)})),"click"===e.type&&(z.props.trigger.indexOf("mouseenter")<0||d)&&!1!==z.props.hideOnClick&&z.state.isVisible?n=!0:je(e),"click"===e.type&&(d=!n),n&&!r&&Me(e)}}function be(e){var t=e.target,n=Z().contains(t)||I.contains(t);if("mousemove"!==e.type||!n){var r=Se().concat(I).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,a=e.popperState,i=e.props.interactiveBorder,o=S(a.placement),s=a.modifiersData.offset;if(!s)return!0;var l="bottom"===o?s.top.y:0,u="top"===o?s.bottom.y:0,c="right"===o?s.left.x:0,d="left"===o?s.right.x:0,f=t.top-r+l>i,h=r-t.bottom-u>i,p=t.left-n+c>i,v=n-t.right-d>i;return f||h||p||v}))})(r,e)&&(ue(),Me(e))}}function xe(e){Ee(e)||z.props.trigger.indexOf("click")>=0&&d||(z.props.interactive?z.hideWithInteractivity(e):Me(e))}function _e(e){z.props.trigger.indexOf("focusin")<0&&e.target!==Z()||z.props.interactive&&e.relatedTarget&&I.contains(e.relatedTarget)||Me(e)}function Ee(e){return!!V.isTouch&&U()!==e.type.indexOf("touch")>=0}function ke(){Ce();var t=z.props,n=t.popperOptions,r=t.placement,a=t.offset,i=t.getReferenceClientRect,o=t.moveTransition,l=K()?J(I).arrow:null,u=i?{getBoundingClientRect:i,contextElement:i.contextElement||Z()}:e,c={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(K()){var n=ee().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:a}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!o}},c];K()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),z.popperInstance=(0,h.createPopper)(u,I,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:d}))}function Ce(){z.popperInstance&&(z.popperInstance.destroy(),z.popperInstance=null)}function Se(){return j(I.querySelectorAll("[data-tippy-root]"))}function je(e){z.clearDelayTimeouts(),e&&oe("onTrigger",[z,e]),he();var t=ae(!0),r=q(),a=r[0],i=r[1];V.isTouch&&"hold"===a&&i&&(t=i),t?n=setTimeout((function(){z.show()}),t):z.show()}function Me(e){if(z.clearDelayTimeouts(),oe("onUntrigger",[z,e]),z.state.isVisible){if(!(z.props.trigger.indexOf("mouseenter")>=0&&z.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=ae(!1);t?r=setTimeout((function(){z.state.isVisible&&z.hide()}),t):a=requestAnimationFrame((function(){z.hide()}))}}else pe()}}function ie(e,t){void 0===t&&(t={});var n=W.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",H,y),window.addEventListener("blur",G);var r=Object.assign({},t,{plugins:n}),a=A(e).reduce((function(e,t){var n=t&&ae(t,r);return n&&e.push(n),e}),[]);return P(e)?a[0]:a}ie.defaultProps=W,ie.setDefaultProps=function(e){Object.keys(e).forEach((function(t){W[t]=e[t]}))},ie.currentInput=V;Object.assign({},h.applyStyles,{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)}});ie.setDefaultProps({render:ee});const oe=ie;function se(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var le="undefined"!=typeof window&&"undefined"!=typeof document;function ue(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function ce(){return le&&document.createElement("div")}function de(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(!de(e[n],t[n]))return!1}return!0}return!1}function fe(e){var t=[];return e.forEach((function(e){t.find((function(t){return de(e,t)}))||t.push(e)})),t}function he(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:fe([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var pe=le?r.useLayoutEffect:r.useEffect;function ve(e){var t=(0,r.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function ge(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var me={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()||ge(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&ge(t,"remove",e.props.className)},onAfterUpdate:r}}};function ye(e){return function(t){var n=t.children,a=t.content,i=t.visible,o=t.singleton,s=t.render,l=t.reference,u=t.disabled,c=void 0!==u&&u,d=t.ignoreAttributes,f=void 0===d||d,h=(t.__source,t.__self,se(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),p=void 0!==i,v=void 0!==o,g=(0,r.useState)(!1),m=g[0],y=g[1],w=(0,r.useState)({}),b=w[0],x=w[1],_=(0,r.useState)(),E=_[0],k=_[1],C=ve((function(){return{container:ce(),renders:1}})),S=Object.assign({ignoreAttributes:f},h,{content:C.container});p&&(S.trigger="manual",S.hideOnClick=!1),v&&(c=!0);var j=S,M=S.plugins||[];s&&(j=Object.assign({},S,{plugins:v&&null!=o.data?[].concat(M,[{fn:function(){return{onTrigger:function(e,t){var n=o.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,k(n.content)}}}}]):M,render:function(){return{popper:C.container}}}));var R=[l].concat(n?[n.type]:[]);return pe((function(){var t=l;l&&l.hasOwnProperty("current")&&(t=l.current);var n=e(t||C.ref||ce(),Object.assign({},j,{plugins:[me].concat(S.plugins||[])}));return C.instance=n,c&&n.disable(),i&&n.show(),v&&o.hook({instance:n,content:a,props:j,setSingletonContent:k}),y(!0),function(){n.destroy(),null==o||o.cleanup(n)}}),R),pe((function(){var e;if(1!==C.renders){var t=C.instance;t.setProps(he(t.props,j)),null==(e=t.popperInstance)||e.forceUpdate(),c?t.disable():t.enable(),p&&(i?t.show():t.hide()),v&&o.hook({instance:t,content:a,props:j,setSingletonContent:k})}else C.renders++})),pe((function(){var e;if(s){var t=C.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;b.placement===n.placement&&b.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&b.escaped===(null==r?void 0:r.hasPopperEscaped)||x({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[b.placement,b.referenceHidden,b.escaped].concat(R)),r.default.createElement(r.default.Fragment,null,n?(0,r.cloneElement)(n,{ref:function(e){C.ref=e,ue(n.ref,e)}}):null,m&&(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}(b),E,C.instance):a,C.container))}}var we=function(e,t){return(0,r.forwardRef)((function(n,a){var i=n.children,o=se(n,["children"]);return r.default.createElement(e,Object.assign({},t,o),i?(0,r.cloneElement)(i,{ref:function(e){ue(a,e),ue(i.ref,e)}}):null)}))};const be=we(ye(oe)),xe="dark:bg-sidebar-btn-dark dark:border-sidebar-border-dark hover:dark:bg-opacity-40 dark:text-sidebar-text-dark",_e="dark:bg-sidebar-btn-dark hover:dark:bg-red-900/[.05]",Ee="dark:text-sidebar-text-dark dark:bg-sidebar-btn-dark/[0.5] dark:border-sidebar-border-dark";var ke=n(33847),Ce=0;function Se(e,t,n,r,a){var i,o,s={};for(o in t)"ref"==o?i=t[o]:s[o]=t[o];var l={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Ce,__source:r,__self:a};if("function"==typeof e&&(i=e.defaultProps))for(o in i)void 0===s[o]&&(s[o]=i[o]);return ke.YM.vnode&&ke.YM.vnode(l),l}const je=(0,r.memo)((function({projectGraphs:e,selectedProjectGraph:t,projectGraphChange:n,lastPerfReport:r}){return Se("div",{"data-cy":"debugger-panel",className:" flex-column flex-column dark:bg-sidebar-dark dark:border-sidebar-border-dark flex flex w-auto items-center items-center justify-items-center justify-items-center gap-4 gap-4 border-b border-gray-200 bg-gray-50 p-4 transition-all ",children:[Se("h4",{className:"dark:text-sidebar-title-dark mr-4 text-lg font-bold",children:"Debugger"}),Se("select",{className:`flex w-auto items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 ${xe}`,"data-cy":"project-select",onChange:e=>n(e.target.value),value:t,children:e.map((e=>Se("option",{value:e.id,children:e.label},e.id)))}),Se("p",{className:"dark:text-sidebar-subtitle-dark text-sm",children:["Last render took ",r.renderTime,"ms:"," ",Se("b",{className:"text-medium font-mono",children:[r.numNodes," nodes"]})," ","|"," ",Se("b",{className:"text-medium font-mono",children:[r.numEdges," edges"]}),"."]})]})}));var Me=n(36021);const Re={entry:i.actions.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,i.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})]}}},Pe={entry:[(0,Me.f0)(((e,t)=>{"focusProject"===t.type&&(e.focusedProject=t.projectName)})),(0,i.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,i.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"]}}};var Oe=n(93218),ze=n.n(Oe),Ae=n(81368),Te=n.n(Ae),Be=n(10404),De=n.n(Be);const Ne=function({type:e,source:t,target:n,fileDependencies:r}){return Se("div",{children:[Se("h4",{className:"implicit"!==e?"mb-3":"",children:[Se("span",{className:"tag",children:null!=e?e:"unknown"}),t," \u2192 ",n]}),"implicit"!==e?Se("div",{className:"rounded-md border border-gray-200",children:[Se("div",{className:"rounded-t-md bg-gray-50 px-4 py-2 text-xs font-medium uppercase text-gray-500",children:Se("span",{children:"Files"})}),Se("ul",{className:"max-h-[300px] divide-y divide-gray-200 overflow-auto",children:r.map((e=>Se("li",{className:"dark:text-sidebar-text-dark whitespace-nowrap px-4 py-2 text-sm font-medium text-gray-900",children:Se("span",{className:"block truncate font-normal",children:e.fileName})})))})]}):null]})};function Le(){return(0,r.useRef)(Ve()).current}function Ve(){return{exclude:window.exclude,watch:window.watch,localMode:window.localMode,projectGraphResponse:window.projectGraphResponse,environment:window.environment,appConfig:window.appConfig,useXstateInspect:window.useXstateInspect}}const Ie=function(e){return Le().appConfig.showExperimentalFeatures?e.children:null};const He=function({type:e,id:t,tags:n}){const r=jt();return Se("div",{children:[Se("h4",{children:[Se("span",{className:"tag",children:e}),t]}),n.length>0?Se("p",{children:[Se("strong",{children:"tags"}),Se("br",{}),n.join(", ")]}):null,Se("div",{className:"flex",children:[Se("button",{onClick:function(){r.send({type:"focusProject",projectName:t})},children:"Focus"}),Se("button",{onClick:function(){r.send({type:"deselectProject",projectName:t})},children:"Exclude"}),Se(Ie,{children:[Se("button",{className:"flex flex-row items-center",onClick:function(){r.send({type:"setTracingStart",projectName:t})},children:[Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mr-2 h-5 w-5 text-gray-500",viewBox:"0 0 20 20",fill:"currentColor",children:Se("path",{fillRule:"evenodd",d:"M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z",clipRule:"evenodd"})}),"Start"]}),Se("button",{className:"flex flex-row items-center",onClick:function(){r.send({type:"setTracingEnd",projectName:t})},children:[Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mr-2 h-5 w-5 text-gray-500",viewBox:"0 0 20 20",fill:"currentColor",children:Se("path",{fillRule:"evenodd",d:"M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z",clipRule:"evenodd"})}),"End"]})]})]})]})},Fe=window.matchMedia("(prefers-color-scheme: dark)"),Ge=document.documentElement,Ye="nx-dep-graph-theme";let qe,We;function Ue(e){if(!Ve().appConfig.showExperimentalFeatures)return qe="light",void(Ge.className="light");const t=e.matches?"dark":"light";Ge.className=t,qe=t}function Xe(e){if(!Ve().appConfig.showExperimentalFeatures)return Ge.className="light",void(qe="light");if("system"!==e)Fe.removeEventListener("change",Ue),Ge.className=e,qe=e;else{const e=Fe.matches?"dark":"light";Fe.addEventListener("change",Ue),Ge.className=e,qe=e}localStorage.setItem(Ye,e),st().evaluateStyles()}function $e(e,t){return()=>Ke(e,t)}function Ke(e,t){return"dark"===qe?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 Ze=[{selector:"edge",style:{width:$e("2px","1px"),"line-color":$e(We.gray,We.black),"text-outline-color":We.black,"text-outline-width":$e("1px","0px"),color:$e(We.white,We.black),"curve-style":"unbundled-bezier","target-arrow-shape":"triangle","target-arrow-fill":"filled","target-arrow-color":$e(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}}],Qe=[{selector:"node",style:{"font-size":"32px","font-family":'system-ui, "Helvetica Neue", sans-serif',"border-style":"solid","border-color":$e(We.gray,We.darkGray),"border-width":$e("2px","1px"),"text-halign":"center","text-valign":"center","padding-left":"16px",color:$e(We.white,We.black),label:"data(id)",width:e=>16*e.data("id").length,backgroundColor:$e(We.black,We.white),"transition-property":"background-color, border-color, line-color, target-arrow-color","transition-duration":250,"transition-timing-function":"ease-out"}},{selector:'node[type="app"]',style:{shape:"round-rectangle"}},{selector:'node[type="lib"]',style:{shape:"round-rectangle"}},{selector:'node[type="e2e"]',style:{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}}];class Je{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 et{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 tt(e){return e.replace(/\/$/,"")}function nt(e,t){const n=tt(e).split("/");return n[0]===tt(t)&&n.shift(),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 at{constructor(e,t){this.tooltipService=e,this.containerId=t,this.traversalGraph=void 0,this.renderGraph=void 0,this.openTooltip=null,this.collapseEdges=!1,ze().use(Te()),ze().use(De())}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&&this.traceProjects(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,a;const i=e.connectedNodes().commonAncestors();let o,s;if(i.length>0?(r=t.ancestors().filter((e=>!i.contains(e))),a=n.ancestors().filter((e=>!i.contains(e)))):(r=t.ancestors(),a=n.ancestors()),r.length>0&&0===a.length?(o=r.last().id(),s=n.id()):a.length>0&&0===r.length?(o=t.id(),s=a.last().id()):(o=r.last().id(),s=a.last().id()),void 0!==o&&void 0!==s){const e=`${o}|${s}`;if(0===this.renderGraph.$id(e).length){const t={group:"edges",data:{id:e,source:o,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",a.map((e=>e.id())))}}))),this.renderGraph.fit().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),a=r.edgesTo(r);this.transferToRenderGraph(r.union(a))}showProjects(e){var t,n;const r=null!=(t=null==(n=this.renderGraph)?void 0:n.nodes())?t:this.traversalGraph.collection();let a=this.traversalGraph.collection();e.forEach((e=>{a=a.union(this.traversalGraph.$id(e))}));const i=a.ancestors(),o=r.union(a).union(i),s=o.edgesTo(o);this.transferToRenderGraph(o.union(s))}hideProject(e){var t,n;const r=null!=(t=null==(n=this.renderGraph)?void 0:n.nodes())?t:this.traversalGraph.collection(),a=this.renderGraph.$id(e),i=r.difference(a).difference(a.ancestors()),o=i.ancestors();let s=i.union(o);const l=s.edgesTo(s);this.transferToRenderGraph(s.union(l))}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),a=n.union(r),i=a.ancestors(),o=a.union(i),s=o.edgesTo(o);this.transferToRenderGraph(o.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 a=this.traversalGraph.nodes().filter((e=>r.findIndex((t=>e.id().includes(t)))>-1));t&&(a=a.union(this.includeProjectsByDepth(a,n))),a=a.union(a.ancestors());const i=a.edgesTo(a);this.transferToRenderGraph(a.union(i))}}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 a=0;for(;n.length>0&&a<=1e3;){const e=n.pop(),i=e[e.length-1].outgoers("node");i.length>0&&i.forEach((a=>{const i=[...e,a];a.id()===t?r.push(i):n.push(i)})),a++}a>=1e3&&console.log("failsafe triggered!"),r.forEach((e=>{console.log(e.map((e=>e.map((e=>e.id())))).join(" => "))}));let i=this.traversalGraph.collection();r.forEach((e=>{for(let t=0;t<e.length;t++){i=i.union(e[t]);const n=t+1;n<e.length&&(i=i.union(e[t].edgesTo(e[n])))}})),console.log(i.length),i.union(i.ancestors()),console.log(i.map((e=>e.id()))),this.transferToRenderGraph(i)}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=ze()({container:n,headless:!n,boxSelectionEnabled:!1,style:[...Qe,...Ze]}),this.renderGraph.add(e),t&&this.renderGraph.$id(t).addClass("focused"),this.renderGraph.on("zoom",(()=>{this.openTooltip&&(this.openTooltip.hide(),this.openTooltip=null)})),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,a,i){this.collapseEdges=i,this.tooltipService.hideAll(),this.generateCytoscapeLayout(e,t,n,r,a)}generateCytoscapeLayout(e,t,n,r,a){const i=this.createElements(e,t,n,r,a);this.traversalGraph=ze()({headless:!0,elements:[...i],boxSelectionEnabled:!1,style:[...Qe,...Ze]})}createElements(e,t,n,r,a){let i=[];const o=e.map((e=>e.name)),s=[],l=[],u={};e.forEach((e=>{const i="app"===e.type||"e2e"===e.type?n.appsDir:n.libsDir,c=new rt(e,i);if(c.affected=a.includes(e.name),s.push(c),r[e.name].forEach((e=>{if(o.includes(e.target)){const t=new Je(e);l.push(t)}})),t){c.getAncestors().forEach((e=>u[e.id]=e))}}));const c=s.map((e=>e.getCytoscapeNodeDef(t))),d=l.map((e=>e.getCytosacpeNodeDef()));if(i=c.concat(d),t){i=Object.keys(u).map((e=>new et(u[e]).getCytoscapeNodeDef())).concat(i)}return i}listenForProjectNodeClicks(){this.renderGraph.$("node:childless").on("click",(e=>{const t=e.target;let n=t.popperRef();const r=He({id:t.id(),type:t.data("type"),tags:t.data("tags")});this.openTooltip=this.tooltipService.open(n,r)}))}listenForEdgeNodeClicks(){this.renderGraph.$("edge").on("click",(e=>{const t=e.target;let n=t.popperRef();const r=Ne({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()})))});this.openTooltip=this.tooltipService.open(n,r)}))}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=Ke("#262626","#fff");return this.renderGraph.png({bg:e,full:!0})}evaluateStyles(){if(this.renderGraph){const e=this.renderGraph.container();this.renderGraph.unmount(),this.renderGraph.mount(e)}}}class it{open(e,t){const n=document.createElement("div");r.render(t,n);let a=oe(document.createElement("div"),{trigger:"manual",theme:Ke("dark-nx","nx"),interactive:!0,appendTo:document.body,content:n,getReferenceClientRect:e.getBoundingClientRect,maxWidth:"none"});return a.show(),a}hideAll(){var e,t,n,r;n=(t=void 0===e?{}:e).exclude,r=t.duration,re.forEach((function(e){var t=!1;if(n&&(t=z(n)?e.reference===n:e.popper===n.popper),!t){var a=e.props.duration;e.setProps({duration:r}),e.hide(),e.state.isDestroyed||e.setProps({duration:a})}}))}}let ot;function st(){return ot||(ot=new at(new it,"cytoscape-graph")),ot}const lt=(e,t)=>{const n=st();t((t=>{const{selectedProjectNames:r,perfReport:a}=n.handleEvent(t);e({type:"setSelectedProjectsFromGraph",selectedProjectNames:r,perfReport:a})}))};function ut(){return ut=Object.assign||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},ut.apply(this,arguments)}var ct;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(ct||(ct={}));var dt=function(e){return e};var ft="beforeunload",ht="popstate";function pt(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function a(){var e=n.location,t=e.pathname,a=e.search,i=e.hash,o=r.state||{};return[o.idx,dt({pathname:t,search:a,hash:i,state:o.usr||null,key:o.key||"default"})]}var i=null;n.addEventListener(ht,(function(){if(i)d.call(i),i=null;else{var e=ct.Pop,t=a(),n=t[0],r=t[1];if(d.length){if(null!=n){var o=l-n;o&&(i={action:e,location:r,retry:function(){m(-1*o)}},m(o))}}else g(e)}}));var o=ct.Pop,s=a(),l=s[0],u=s[1],c=gt(),d=gt();function f(e){return"string"==typeof e?e:yt(e)}function h(e,t){return void 0===t&&(t=null),dt(ut({pathname:u.pathname,hash:"",search:""},"string"==typeof e?wt(e):e,{state:t,key:mt()}))}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){o=e;var t=a();l=t[0],u=t[1],c.call({action:o,location:u})}function m(e){r.go(e)}null==l&&(l=0,r.replaceState(ut({},r.state,{idx:l}),""));var y={get action(){return o},get location(){return u},createHref:f,push:function e(t,a){var i=ct.Push,o=h(t,a);if(v(i,o,(function(){e(t,a)}))){var s=p(o,l+1),u=s[0],c=s[1];try{r.pushState(u,"",c)}catch(d){n.location.assign(c)}g(i)}},replace:function e(t,n){var a=ct.Replace,i=h(t,n);if(v(a,i,(function(){e(t,n)}))){var o=p(i,l),s=o[0],u=o[1];r.replaceState(s,"",u),g(a)}},go:m,back:function(){m(-1)},forward:function(){m(1)},listen:function(e){return c.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&n.addEventListener(ft,vt),function(){t(),d.length||n.removeEventListener(ft,vt)}}};return y}function vt(e){e.preventDefault(),e.returnValue=""}function gt(){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 mt(){return Math.random().toString(36).substr(2,8)}function yt(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,a=void 0===r?"":r,i=e.hash,o=void 0===i?"":i;return a&&"?"!==a&&(n+="?"===a.charAt(0)?a:"?"+a),o&&"#"!==o&&(n+="#"===o.charAt(0)?o:"#"+o),n}function wt(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 bt(e){const t=Object.entries(e).reduce(((e,[t,n])=>(null!==n&&(e[t]=n),e)),{});return new URLSearchParams(t).toString()}const xt={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,i.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"]}}},_t={entry:[(0,Me.f0)(((e,t)=>{"setTracingStart"===t.type?e.tracing.start=t.projectName:"setTracingEnd"===t.type&&(e.tracing.end=t.projectName)})),"notifyRouteTracing","notifyGraphTracing"],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 Et=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":t.push({type:"setSearchDepth",searchDepth:parseInt(e)});break;case"traceStart":t.push({type:"setTracingStart",projectName:e});break;case"traceEnd":t.push({type:"setTracingEnd",projectName:e})}})),t})(pt().location.search).forEach((t=>e(t)))},kt={entry:["notifyGraphHideAllProjects",(0,Me.f0)(((e,t)=>{null===e.routeListenerActor&&(e.routeListenerActor=(0,i.spawn)(Et,"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,i.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})]}}},Ct=(0,i.Machine)({id:"DepGraph",initial:"idle",context:{projects:[],dependencies:{},affectedProjects:[],selectedProjects:[],focusedProject:null,textFilter:"",includePath:!1,searchDepth:1,searchDepthEnabled:!1,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}},states:{idle:{},unselected:kt,customSelected:Re,focused:Pe,textFiltered:xt,tracing:_t},on:{initGraph:{target:"unselected",actions:["setGraph",(0,i.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,i.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,i.send)(((e,t)=>{if("setCollapseEdges"===t.type)return{type:"notifyRouteCollapseEdges",collapseEdges:t.collapseEdges}}),{to:e=>e.routeSetterActor})]},setGroupByFolder:{actions:["setGroupByFolder",(0,i.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,i.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"]},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,i.spawn)(lt,"graphActor"),e.routeSetterActor=(0,i.spawn)((()=>{const e=pt(),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")},r={currentParamString:bt(n),params:n};return(0,i.Machine)({id:"route",context:{currentParamString:"",params:{focus:null,groupByFolder:null,searchDepth:null,select:null,collapseEdges:null,traceStart:null,traceEnd:null}},always:{actions:(0,Me.f0)((e=>{const t=pt(),n=bt(e.params);t.push({search:n}),e.currentParamString=n})),cond:"didParamsChange"},on:{notifyRouteSelectAll:{actions:(0,Me.f0)((e=>{e.params.select="all",e.params.focus=null}))},notifyRouteSelectAffected:{actions:(0,Me.f0)((e=>{e.params.select="affected",e.params.focus=null}))},notifyRouteClearSelect:{actions:(0,Me.f0)((e=>{e.params.select=null}))},notifyRouteFocusProject:{actions:(0,Me.f0)(((e,t)=>{e.params.focus=t.focusedProject,e.params.select=null}))},notifyRouteUnfocusProject:{actions:(0,Me.f0)(((e,t)=>{e.params.focus=null}))},notifyRouteGroupByFolder:{actions:(0,Me.f0)(((e,t)=>{e.params.groupByFolder=t.groupByFolder?"true":null}))},notifyRouteCollapseEdges:{actions:(0,Me.f0)(((e,t)=>{e.params.collapseEdges=t.collapseEdges?"true":null}))},notifyRouteSearchDepth:{actions:(0,Me.f0)(((e,t)=>{e.params.searchDepth=t.searchDepthEnabled?t.searchDepth.toString():null}))},notifyRouteTracing:{actions:(0,Me.f0)(((e,t)=>{null!==t.start&&null!==t.end?(e.params.traceStart=t.start,e.params.traceEnd=t.end,e.params.focus=null,e.params.select=null):(e.params.traceStart=null,e.params.traceEnd=null)}))}}},{guards:{didParamsChange:e=>e.currentParamString!==bt(e.params)}}).withContext(r)})(),{name:"route"}),"initGraph"===t.type&&(e.workspaceLayout=t.workspaceLayout,e.affectedProjects=t.affectedProjects))})),notifyGraphTracing:(0,i.send)(((e,t)=>({type:"notifyGraphTracing",start:e.tracing.start,end:e.tracing.end})),{to:e=>e.graphActor}),notifyGraphShowProject:(0,i.send)(((e,t)=>{if("selectProject"===t.type)return{type:"notifyGraphShowProject",projectName:t.projectName}}),{to:e=>e.graphActor}),notifyGraphHideProject:(0,i.send)(((e,t)=>{if("deselectProject"===t.type)return{type:"notifyGraphHideProject",projectName:t.projectName}}),{to:e=>e.graphActor}),notifyGraphShowAllProjects:(0,i.send)(((e,t)=>({type:"notifyGraphShowAllProjects"})),{to:e=>e.graphActor}),notifyGraphHideAllProjects:(0,i.send)(((e,t)=>({type:"notifyGraphHideAllProjects"})),{to:e=>e.graphActor}),notifyGraphShowAffectedProjects:(0,i.send)({type:"notifyGraphShowAffectedProjects"},{to:e=>e.graphActor}),notifyGraphFocusProject:(0,i.send)(((e,t)=>({type:"notifyGraphFocusProject",projectName:e.focusedProject,searchDepth:e.searchDepthEnabled?e.searchDepth:-1})),{to:e=>e.graphActor}),notifyRouteUnfocusProject:(0,i.send)((()=>({type:"notifyRouteUnfocusProject"})),{to:e=>e.routeSetterActor}),notifyRouteSelectAll:(0,i.send)((()=>({type:"notifyRouteSelectAll"})),{to:e=>e.routeSetterActor}),notifyRouteSelectAffected:(0,i.send)((()=>({type:"notifyRouteSelectAffected"})),{to:e=>e.routeSetterActor}),notifyRouteClearSelect:(0,i.send)((()=>({type:"notifyRouteClearSelect"})),{to:e=>e.routeSetterActor}),notifyRouteTracing:(0,i.send)((e=>({type:"notifyRouteTracing",start:e.tracing.start,end:e.tracing.end})),{to:e=>e.routeSetterActor}),notifyRouteSearchDepth:(0,i.send)(((e,t)=>({type:"notifyRouteSearchDepth",searchDepth:e.searchDepth,searchDepthEnabled:e.searchDepthEnabled})),{to:e=>e.routeSetterActor}),notifyGraphFilterProjectsByText:(0,i.send)(((e,t)=>({type:"notifyGraphFilterProjectsByText",search:e.textFilter,includeProjectsByPath:e.includePath,searchDepth:e.searchDepthEnabled?e.searchDepth:-1})),{to:e=>e.graphActor})}});let St;function jt(){return St||(St=(0,i.interpret)(Ct,{devTools:!!window.useXstateInspect}),St.start()),St}const Mt=(0,r.createContext)({}),Rt=e=>{const t=jt();return Se(Mt.Provider,{value:t,children:e.children})};function Pt(){return(0,r.useContext)(Mt)}var Ot;!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(Ot||(Ot={}));const zt=r.useLayoutEffect;function At(e){return"state"in e}var Tt=n(36718);var Bt=function(e,t){return e===t},Dt=function(e){return"state"in(n=e)&&"machine"in n?0!==("status"in(t=e)?t.status:t._status)?t.state:t.machine.initialState:At(e)?e.state:void 0;var t,n};n(26067);function Nt(e){return function(e,t,n,a){void 0===n&&(n=Bt),void 0===a&&(a=Dt);var i=(0,r.useRef)(t),o=(0,r.useMemo)((function(){var r,o=a(e),s=t(o);return{getSnapshot:function(){return o},getCurrentValue:function(){return s},setCurrentValue:function(e){s=e,null==r||r()},subscribe:function(t){r=t;var a=e.subscribe((function(e){o=e;var r=i.current(e);n(s,r)||(s=r,t())}));return function(){a.unsubscribe()}}}}),[e]),s=(0,Tt.useSubscription)(o),l=!1;if(i.current!==t){var u=t(o.getSnapshot());n(s,u)||(l=!0,s=u)}return zt((function(){i.current=t,l&&o.setCurrentValue(s)})),s}(Pt(),e)}class Lt{async getHash(){const e=new Request("currentHash",{mode:"no-cors"});return(await fetch(e)).json()}async getProjectGraph(e){const t=new Request(e,{mode:"no-cors"});return(await fetch(t)).json()}}class Vt{async getHash(){return new Promise((e=>e("some-hash")))}async getProjectGraph(e){return new Promise((e=>e(window.projectGraphResponse)))}}class It{constructor(e=5e3){this.response={hash:"79054025255fb1a26e4bc422aef54eb4",layout:{appsDir:"apps",libsDir:"libs"},projects:[{name:"existing-app-1",type:"app",data:{root:"apps/app1",tags:[],files:[{file:"some/file.ts",hash:"ecccd8481d2e5eae0e59928be1bc4c2d071729d7",deps:["existing-lib-1"]}]}},{name:"existing-lib-1",type:"lib",data:{root:"libs/lib1",tags:[],files:[]}}],dependencies:{"existing-app-1":[{source:"existing-app-1",target:"existing-lib-1",type:"static"}],"existing-lib-1":[]},affected:[],focus:null,exclude:[],groupByFolder:!1},setInterval((()=>this.updateResponse()),e)}async getHash(){return new Promise((e=>e(this.response.hash)))}getProjectGraph(e){return new Promise((e=>e(this.response)))}createNewProject(){const e=Math.random()>.25?"lib":"app",t=`${e}-${this.response.projects.length+1}`;return{name:t,type:e,data:{root:"app"===e?`apps/${t}`:`libs/${t}`,tags:[],files:[]}}}updateResponse(){const e=this.createNewProject(),t=this.response.projects.filter((e=>"lib"===e.type)),n=t[Math.floor(Math.random()*t.length)],r=[{source:e.name,target:n.name,type:"static"}];this.response=Object.assign({},this.response,{projects:[...this.response.projects,e],dependencies:Object.assign({},this.response.dependencies,{[e.name]:r})})}}let Ht;function Ft(){return void 0===Ht&&("dev"===window.environment?Ht=new Lt:"watch"===window.environment?Ht=new It:"release"===window.environment&&(Ht="build"===window.localMode?new Vt:new Lt)),Ht}const Gt=e=>e.context.projects,Yt=e=>e.context.workspaceLayout,qt=e=>e.context.selectedProjects,Wt=e=>e.context.selectedProjects.length>0,Ut=e=>e.context.lastPerfReport,Xt=e=>e.context.focusedProject,$t=e=>({searchDepth:e.context.searchDepth,searchDepthEnabled:e.context.searchDepthEnabled}),Kt=e=>e.context.includePath,Zt=e=>e.context.groupByFolder,Qt=e=>e.context.collapseEdges,Jt=e=>e.context.textFilter,en=e=>e.context.affectedProjects.length>0,tn=e=>e.context.tracing,nn=(0,r.memo)((({collapseEdges:e,collapseEdgesChanged:t})=>Se("div",{className:"px-4",children:Se("div",{className:"flex items-start",children:[Se("div",{className:"flex h-5 items-center",children:Se("input",{id:"collapseEdges",name:"collapseEdges",value:"collapseEdges",type:"checkbox",className:"h-4 w-4 rounded border-gray-300",onChange:e=>t(e.target.checked),checked:e})}),Se("div",{className:"ml-3 text-sm",children:[Se("label",{htmlFor:"collapseEdges",className:"cursor-pointer font-medium text-gray-700",children:"Collapse edges"}),Se("p",{className:"text-gray-500",children:"Display edges between groups rather than libraries"})]})]})}))),rn=(0,r.memo)((({focusedProject:e,resetFocus:t})=>Se("div",{className:"mt-10 px-4",children:Se("div",{className:"bg-green-nx-base group relative flex cursor-pointer items-center overflow-hidden rounded-md border border-gray-200 p-2 text-gray-50 shadow-sm","data-cy":"unfocusButton",onClick:()=>t(),children:[Se("p",{className:"truncate transition duration-200 ease-in-out group-hover:opacity-60",children:[Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"-mt-1 mr-1 inline h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 9l3 3m0 0l-3 3m3-3H8m13 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),Se("span",{id:"focused-project-name",children:["Focused on ",e]})]}),Se("div",{className:`absolute right-2 flex translate-x-32 items-center rounded-md bg-white pl-2 text-sm font-medium text-gray-700 shadow-sm ring-1 ring-gray-500 transition-all duration-200 ease-in-out group-hover:translate-x-0 ${xe}`,children:["Reset",Se("span",{className:"rounded-md p-1",children:Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})})})]})]})}))),an=(0,r.memo)((({groupByFolder:e,groupByFolderChanged:t})=>Se("div",{className:"mt-8 px-4",children:Se("div",{className:"flex items-start",children:[Se("div",{className:"flex h-5 items-center",children:Se("input",{id:"displayOptions",name:"displayOptions",value:"groupByFolder",type:"checkbox",className:"h-4 w-4 rounded border-gray-300",onChange:e=>t(e.target.checked),checked:e})}),Se("div",{className:"ml-3 text-sm",children:[Se("label",{htmlFor:"displayOptions",className:"dark:text-sidebar-subtitle-dark cursor-pointer font-medium text-gray-700",children:"Group by folder"}),Se("p",{className:"dark:text-sidebar-text-dark text-gray-500",children:"Visually arrange libraries by folders with different colors."})]})]})})));function on(e,t){return t.filter((t=>t.type===e)).sort(((e,t)=>e.name.localeCompare(t.name)))}function sn(e,t,n){let r={};return e.forEach((e=>{const a="app"===e.type||"e2e"===e.type?n.appsDir:n.libsDir,i=nt(e.data.root,a).join("/");r.hasOwnProperty(i)||(r[i]=[]),r[i].push({projectGraphNode:e,isSelected:t.includes(e.name)})})),r}function ln({project:e,toggleProject:t,focusProject:n}){return Se("li",{className:"dark:text-sidebar-subtitle-dark relative block cursor-default select-none py-1 pl-3 pr-9 text-xs text-gray-600 ",children:[Se("div",{className:"flex items-center",children:[Se("button",{type:"button",className:"flex rounded-md",title:"Focus on this library",onClick:()=>n(e.projectGraphNode.name),children:Se("span",{className:"dark:bg-sidebar-btn-dark flex items-center rounded-md bg-white p-1 font-medium shadow-sm ring-1 ring-gray-200 transition hover:bg-gray-50 dark:ring-stone-700",children:Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[Se("path",{d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2h-1.528A6 6 0 004 9.528V4z"}),Se("path",{fillRule:"evenodd",d:"M8 10a4 4 0 00-3.446 6.032l-1.261 1.26a1 1 0 101.414 1.415l1.261-1.261A4 4 0 108 10zm-2 4a2 2 0 114 0 2 2 0 01-4 0z",clipRule:"evenodd"})]})})}),Se("label",{className:"hover:dark:bg-sidebar-btn-dark/[0.5] dark:text-sidebar-text-dark ml-3 block w-full cursor-pointer truncate rounded-md p-2 font-mono font-normal transition hover:bg-gray-50 ","data-project":e.projectGraphNode.name,"data-active":e.isSelected.toString(),onClick:()=>t(e.projectGraphNode.name,e.isSelected),children:e.projectGraphNode.name})]}),e.isSelected?Se("span",{title:"This library is visible",className:"text-green-nx-base absolute inset-y-0 right-0 flex cursor-pointer items-center",onClick:()=>t(e.projectGraphNode.name,e.isSelected),children:Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})}):null]})}function un({headerText:e,projects:t,selectProject:n,deselectProject:r,focusProject:a}){let i=[...t];function o(e,t){t?r(e):n(e)}return i.sort(((e,t)=>e.projectGraphNode.name.localeCompare(t.projectGraphNode.name))),Se(ke.HY,{children:[Se("h3",{className:"dark:text-sidebar-subtitle-dark mt-4 cursor-text py-2 text-sm font-semibold uppercase tracking-wide text-gray-900 lg:text-xs",children:e}),Se("ul",{className:"mt-2 -ml-3",children:i.map((e=>Se(ln,{project:e,toggleProject:o,focusProject:a},e.projectGraphNode.name)))})]})}const cn=function(){const e=Pt();function t(t){e.send({type:"deselectProject",projectName:t})}function n(t){e.send({type:"selectProject",projectName:t})}function r(t){e.send({type:"focusProject",projectName:t})}const a=Nt(Gt),i=Nt(Yt),o=Nt(qt),s=on("app",a),l=on("lib",a),u=on("e2e",a),c=sn(s,o,i),d=sn(l,o,i),f=sn(u,o,i),h=Object.keys(c).sort(),p=Object.keys(d).sort(),v=Object.keys(f).sort();return Se("div",{id:"project-lists",className:"mt-8 border-t border-gray-200 px-4",children:[Se("h2",{className:"dark:text-sidebar-title-dark mt-8 border-b border-solid border-gray-50 text-lg font-bold",children:"app projects"}),h.map((e=>Se(un,{headerText:e,projects:c[e],deselectProject:t,selectProject:n,focusProject:r},"app-"+e))),Se("h2",{className:"dark:text-sidebar-title-dark mt-8 border-b border-solid border-gray-50 text-lg font-bold",children:"e2e projects"}),v.map((e=>Se(un,{headerText:e,projects:f[e],deselectProject:t,selectProject:n,focusProject:r},"e2e-"+e))),Se("h2",{className:"dark:text-sidebar-title-dark mt-8 border-b border-solid border-gray-50 text-lg font-bold",children:"lib projects"}),p.map((e=>Se(un,{headerText:e,projects:d[e],deselectProject:t,selectProject:n,focusProject:r},"lib-"+e)))]})},dn=(0,r.memo)((({searchDepth:e,searchDepthEnabled:t,searchDepthFilterEnabledChange:n,decrementDepthFilter:r,incrementDepthFilter:a})=>Se("div",{className:"mt-4 px-4",children:[Se("div",{className:"mt-4 flex items-start",children:[Se("div",{className:"flex h-5 items-center",children:Se("input",{id:"depthFilter",name:"depthFilter",value:"depthFilterActivated",type:"checkbox",className:"h-4 w-4 rounded border-gray-300",checked:t,onChange:e=>n(e.target.checked)})}),Se("div",{className:"ml-3 text-sm",children:[Se("label",{htmlFor:"depthFilter",className:"dark:text-sidebar-subtitle-dark cursor-pointer font-medium text-gray-700",children:"Activate proximity"}),Se("p",{className:"dark:text-sidebar-text-dark text-gray-500",children:"Explore connected libraries step by step."})]})]}),Se("div",{className:"mt-3 px-10",children:Se("div",{className:"flex rounded-md text-gray-500 shadow-sm",children:[Se("button",{title:"Remove ancestor level",className:`inline-flex items-center rounded-l-md border border-gray-300 bg-gray-50 py-2 px-4 text-gray-500 hover:bg-gray-100 ${xe}`,onClick:r,children:Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 12H4"})})}),Se("span",{id:"depthFilterValue",className:`block w-full flex-1 rounded-none border-t border-b border-gray-300 bg-white p-1.5 text-center font-mono ${Ee}`,children:e}),Se("button",{title:"Add ancestor level",className:`inline-flex items-center rounded-r-md border border-gray-300 bg-gray-50 py-2 px-4 text-gray-500 hover:bg-gray-100 ${xe}`,onClick:a,children:Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]})})]}))),fn=(0,r.memo)((({showAllProjects:e,hideAllProjects:t,showAffectedProjects:n,hasAffectedProjects:r})=>Se("div",{className:"mt-8 px-4",children:[Se("button",{onClick:e,type:"button",className:`flex w-full items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 ${xe}`,"data-cy":"selectAllButton",children:[Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"-ml-1 mr-2 h-5 w-5 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),"Show all projects"]}),r?Se("button",{onClick:n,type:"button",className:`mt-3 flex w-full items-center rounded-md border border-red-300 bg-white px-4 py-2 text-sm font-medium text-red-500 shadow-sm hover:bg-red-50 ${_e}`,"data-cy":"affectedButton",children:[Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"-ml-1 mr-2 h-5 w-5 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})}),"Show affected projects"]}):null,Se("button",{onClick:t,type:"button",className:`mt-3 flex w-full items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 ${xe}`,"data-cy":"deselectAllButton",children:[Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"-ml-1 mr-2 h-5 w-5 text-gray-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}),"Hide all projects"]})]})));const hn=function({textFilter:e,resetTextFilter:t,updateTextFilter:n,toggleIncludeLibsInPathChange:a,includePath:i}){const[o,s]=(0,r.useState)(""),l=function(e,t){const[n,a]=(0,r.useState)(e);return(0,r.useEffect)((()=>{const n=setTimeout((()=>{a(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n}(o,500);return(0,r.useEffect)((()=>{""!==l&&n(l)}),[l,n]),Se("div",{children:[Se("div",{className:"mt-10 px-4",children:Se("form",{className:"relative flex rounded-md shadow-sm",onSubmit:e=>e.preventDefault(),children:[Se("span",{className:`inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-50 p-2 text-gray-500 ${xe}`,children:Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})})}),Se("input",{type:"text",className:`block w-full flex-1 rounded-none rounded-r-md border border-gray-300 bg-white p-1.5 text-gray-600 ${Ee}`,placeholder:"lib name, other lib name","data-cy":"textFilterInput",name:"filter",value:o,onKeyUp:function(e){"Enter"===e.key&&n(e.currentTarget.value)},onChange:e=>{var n;""===(n=e.currentTarget.value)?(s(""),t()):s(n)}}),o.length>0?Se("button",{"data-cy":"textFilterReset",type:"reset",onClick:function(){s(""),t()},className:"absolute top-1 right-1 inline-block rounded-md bg-white p-1 text-gray-500",children:Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2M3 12l6.414 6.414a2 2 0 001.414.586H19a2 2 0 002-2V7a2 2 0 00-2-2h-8.172a2 2 0 00-1.414.586L3 12z"})})}):null]})}),Se("div",{className:"mt-4 px-4",children:Se("div",{className:"flex items-start",children:[Se("div",{className:"flex h-5 items-center",children:Se("input",{disabled:0===e.length,id:"includeInPath",name:"textFilterCheckbox",type:"checkbox",value:"includeInPath",className:"h-4 w-4 rounded border-gray-300",checked:i,onChange:a})}),Se("div",{className:"ml-3 text-sm",children:[Se("label",{htmlFor:"includeInPath",className:"dark:text-sidebar-subtitle-dark cursor-pointer font-medium text-gray-700",children:"Include related libraries"}),Se("p",{className:"dark:text-sidebar-text-dark text-gray-500",children:"Show libraries that are related to your search."})]})]})})]})};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",{d:"M10.394 2.08a1 1 0 00-.788 0l-7 3a1 1 0 000 1.84L5.25 8.051a.999.999 0 01.356-.257l4-1.714a1 1 0 11.788 1.838L7.667 9.088l1.94.831a1 1 0 00.787 0l7-3a1 1 0 000-1.838l-7-3zM3.31 9.397L5 10.12v4.102a8.969 8.969 0 00-1.05-.174 1 1 0 01-.89-.89 11.115 11.115 0 01.25-3.762zM9.3 16.573A9.026 9.026 0 007 14.935v-3.957l1.818.78a3 3 0 002.364 0l5.508-2.361a11.026 11.026 0 01.25 3.762 1 1 0 01-.89.89 8.968 8.968 0 00-5.35 2.524 1 1 0 01-1.4 0zM6 18a1 1 0 001-1v-2.065a8.935 8.935 0 00-2-.712V17a1 1 0 001 1z"}))}));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",{d:"M5 4a1 1 0 00-2 0v7.268a2 2 0 000 3.464V16a1 1 0 102 0v-1.268a2 2 0 000-3.464V4zM11 4a1 1 0 10-2 0v1.268a2 2 0 000 3.464V16a1 1 0 102 0V8.732a2 2 0 000-3.464V4zM16 3a1 1 0 011 1v7.268a2 2 0 010 3.464V16a1 1 0 11-2 0v-1.268a2 2 0 010-3.464V4a1 1 0 011-1z"}))}));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:"M18 13V5a2 2 0 00-2-2H4a2 2 0 00-2 2v8a2 2 0 002 2h3l3 3 3-3h3a2 2 0 002-2zM5 7a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1zm1 3a1 1 0 100 2h3a1 1 0 100-2H6z",clipRule:"evenodd"}))}));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",{d:"M4 3a2 2 0 100 4h12a2 2 0 100-4H4z"}),r.createElement("path",{fillRule:"evenodd",d:"M3 8h14v7a2 2 0 01-2 2H5a2 2 0 01-2-2V8zm5 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 16zm1-11a1 1 0 10-2 0v3.586L7.707 9.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 10.586V7z",clipRule:"evenodd"}))}));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"}))}));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 16zm3.707-8.707l-3-3a1 1 0 00-1.414 1.414L10.586 9H7a1 1 0 100 2h3.586l-1.293 1.293a1 1 0 101.414 1.414l3-3a1 1 0 000-1.414z",clipRule:"evenodd"}))}));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 16zm3.707-8.707l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L9 9.414V13a1 1 0 102 0V9.414l1.293 1.293a1 1 0 001.414-1.414z",clipRule:"evenodd"}))}));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:"M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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:"M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M9.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L7.414 9H15a1 1 0 110 2H7.414l2.293 2.293a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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 4a1 1 0 011-1h4a1 1 0 010 2H6.414l2.293 2.293a1 1 0 01-1.414 1.414L5 6.414V8a1 1 0 01-2 0V4zm9 1a1 1 0 110-2h4a1 1 0 011 1v4a1 1 0 11-2 0V6.414l-2.293 2.293a1 1 0 11-1.414-1.414L13.586 5H12zm-9 7a1 1 0 112 0v1.586l2.293-2.293a1 1 0 011.414 1.414L6.414 15H8a1 1 0 110 2H4a1 1 0 01-1-1v-4zm13-1a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 110-2h1.586l-2.293-2.293a1 1 0 011.414-1.414L15 13.586V12a1 1 0 011-1z",clipRule:"evenodd"}))}));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:"M14.243 5.757a6 6 0 10-.986 9.284 1 1 0 111.087 1.678A8 8 0 1118 10a3 3 0 01-4.8 2.401A4 4 0 1114 10a1 1 0 102 0c0-1.537-.586-3.07-1.757-4.243zM12 10a2 2 0 10-4 0 2 2 0 004 0z",clipRule:"evenodd"}))}));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:"M6.707 4.879A3 3 0 018.828 4H15a3 3 0 013 3v6a3 3 0 01-3 3H8.828a3 3 0 01-2.12-.879l-4.415-4.414a1 1 0 010-1.414l4.414-4.414zm4 2.414a1 1 0 00-1.414 1.414L10.586 10l-1.293 1.293a1 1 0 101.414 1.414L12 11.414l1.293 1.293a1 1 0 001.414-1.414L13.414 10l1.293-1.293a1 1 0 00-1.414-1.414L12 8.586l-1.293-1.293z",clipRule:"evenodd"}))}));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:"M6.267 3.455a3.066 3.066 0 001.745-.723 3.066 3.066 0 013.976 0 3.066 3.066 0 001.745.723 3.066 3.066 0 012.812 2.812c.051.643.304 1.254.723 1.745a3.066 3.066 0 010 3.976 3.066 3.066 0 00-.723 1.745 3.066 3.066 0 01-2.812 2.812 3.066 3.066 0 00-1.745.723 3.066 3.066 0 01-3.976 0 3.066 3.066 0 00-1.745-.723 3.066 3.066 0 01-2.812-2.812 3.066 3.066 0 00-.723-1.745 3.066 3.066 0 010-3.976 3.066 3.066 0 00.723-1.745 3.066 3.066 0 012.812-2.812zm7.44 5.252a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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:"M13.477 14.89A6 6 0 015.11 6.524l8.367 8.368zm1.414-1.414L6.524 5.11a6 6 0 018.367 8.367zM18 10a8 8 0 11-16 0 8 8 0 0116 0z",clipRule:"evenodd"}))}));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:"M7 2a1 1 0 00-.707 1.707L7 4.414v3.758a1 1 0 01-.293.707l-4 4C.817 14.769 2.156 18 4.828 18h10.343c2.673 0 4.012-3.231 2.122-5.121l-4-4A1 1 0 0113 8.172V4.414l.707-.707A1 1 0 0013 2H7zm2 6.172V4h2v4.172a3 3 0 00.879 2.12l1.027 1.028a4 4 0 00-2.171.102l-.47.156a4 4 0 01-2.53 0l-.563-.187a1.993 1.993 0 00-.114-.035l1.063-1.063A3 3 0 009 8.172z",clipRule:"evenodd"}))}));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",{d:"M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"}))}));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",{d:"M9 4.804A7.968 7.968 0 005.5 4c-1.255 0-2.443.29-3.5.804v10A7.969 7.969 0 015.5 14c1.669 0 3.218.51 4.5 1.385A7.962 7.962 0 0114.5 14c1.255 0 2.443.29 3.5.804v-10A7.968 7.968 0 0014.5 4c-1.255 0-2.443.29-3.5.804V12a1 1 0 11-2 0V4.804z"}))}));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 5a2 2 0 012-2h10a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2V5zm11 1H6v8l4-2 4 2V6z",clipRule:"evenodd"}))}));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",{d:"M5 4a2 2 0 012-2h6a2 2 0 012 2v14l-5-2.5L5 18V4z"}))}));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:"M6 6V5a3 3 0 013-3h2a3 3 0 013 3v1h2a2 2 0 012 2v3.57A22.952 22.952 0 0110 13a22.95 22.95 0 01-8-1.43V8a2 2 0 012-2h2zm2-1a1 1 0 011-1h2a1 1 0 011 1v1H8V5zm1 5a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1z",clipRule:"evenodd"}),r.createElement("path",{d:"M2 13.692V16a2 2 0 002 2h12a2 2 0 002-2v-2.308A24.974 24.974 0 0110 15c-2.796 0-5.487-.46-8-1.308z"}))}));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:"M6 3a1 1 0 011-1h.01a1 1 0 010 2H7a1 1 0 01-1-1zm2 3a1 1 0 00-2 0v1a2 2 0 00-2 2v1a2 2 0 00-2 2v.683a3.7 3.7 0 011.055.485 1.704 1.704 0 001.89 0 3.704 3.704 0 014.11 0 1.704 1.704 0 001.89 0 3.704 3.704 0 014.11 0 1.704 1.704 0 001.89 0A3.7 3.7 0 0118 12.683V12a2 2 0 00-2-2V9a2 2 0 00-2-2V6a1 1 0 10-2 0v1h-1V6a1 1 0 10-2 0v1H8V6zm10 8.868a3.704 3.704 0 01-4.055-.036 1.704 1.704 0 00-1.89 0 3.704 3.704 0 01-4.11 0 1.704 1.704 0 00-1.89 0A3.704 3.704 0 012 14.868V17a1 1 0 001 1h14a1 1 0 001-1v-2.132zM9 3a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1zm3 0a1 1 0 011-1h.01a1 1 0 110 2H13a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V4a2 2 0 00-2-2H6zm1 2a1 1 0 000 2h6a1 1 0 100-2H7zm6 7a1 1 0 011 1v3a1 1 0 11-2 0v-3a1 1 0 011-1zm-3 3a1 1 0 100 2h.01a1 1 0 100-2H10zm-4 1a1 1 0 011-1h.01a1 1 0 110 2H7a1 1 0 01-1-1zm1-4a1 1 0 100 2h.01a1 1 0 100-2H7zm2 1a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1zm4-4a1 1 0 100 2h.01a1 1 0 100-2H13zM9 9a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1zM7 8a1 1 0 000 2h.01a1 1 0 000-2H7z",clipRule:"evenodd"}))}));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:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"}))}));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:"M4 5a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V7a2 2 0 00-2-2h-1.586a1 1 0 01-.707-.293l-1.121-1.121A2 2 0 0011.172 3H8.828a2 2 0 00-1.414.586L6.293 4.707A1 1 0 015.586 5H4zm6 9a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}));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:"M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z",clipRule:"evenodd"}))}));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",{d:"M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z"}))}));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",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),r.createElement("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"}))}));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:"M5 3a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V5a2 2 0 00-2-2H5zm9 4a1 1 0 10-2 0v6a1 1 0 102 0V7zm-3 2a1 1 0 10-2 0v4a1 1 0 102 0V9zm-3 3a1 1 0 10-2 0v1a1 1 0 102 0v-1z",clipRule:"evenodd"}))}));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",{d:"M2 5a2 2 0 012-2h7a2 2 0 012 2v4a2 2 0 01-2 2H9l-3 3v-3H4a2 2 0 01-2-2V5z"}),r.createElement("path",{d:"M15 7v2a4 4 0 01-4 4H9.828l-1.766 1.767c.28.149.599.233.938.233h2l3 3v-3h2a2 2 0 002-2V9a2 2 0 00-2-2h-1z"}))}));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:"M18 5v8a2 2 0 01-2 2h-5l-5 4v-4H4a2 2 0 01-2-2V5a2 2 0 012-2h12a2 2 0 012 2zM7 8H5v2h2V8zm2 0h2v2H9V8zm6 0h-2v2h2V8z",clipRule:"evenodd"}))}));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:"M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z",clipRule:"evenodd"}))}));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 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M15.707 4.293a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-5-5a1 1 0 011.414-1.414L10 8.586l4.293-4.293a1 1 0 011.414 0zm0 6a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-5-5a1 1 0 111.414-1.414L10 14.586l4.293-4.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M15.707 15.707a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 010 1.414zm-6 0a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 011.414 1.414L5.414 10l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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.293 15.707a1 1 0 010-1.414L14.586 10l-4.293-4.293a1 1 0 111.414-1.414l5 5a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0z",clipRule:"evenodd"}),r.createElement("path",{fillRule:"evenodd",d:"M4.293 15.707a1 1 0 010-1.414L8.586 10 4.293 5.707a1 1 0 011.414-1.414l5 5a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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:"M4.293 15.707a1 1 0 010-1.414l5-5a1 1 0 011.414 0l5 5a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414 0zm0-6a1 1 0 010-1.414l5-5a1 1 0 011.414 0l5 5a1 1 0 01-1.414 1.414L10 5.414 5.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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",{d:"M13 7H7v6h6V7z"}),r.createElement("path",{fillRule:"evenodd",d:"M7 2a1 1 0 012 0v1h2V2a1 1 0 112 0v1h2a2 2 0 012 2v2h1a1 1 0 110 2h-1v2h1a1 1 0 110 2h-1v2a2 2 0 01-2 2h-2v1a1 1 0 11-2 0v-1H9v1a1 1 0 11-2 0v-1H5a2 2 0 01-2-2v-2H2a1 1 0 110-2h1V9H2a1 1 0 010-2h1V5a2 2 0 012-2h2V2zM5 5h10v10H5V5z",clipRule:"evenodd"}))}));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",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),r.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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",{d:"M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"}),r.createElement("path",{d:"M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5zM15 11h2a1 1 0 110 2h-2v-2z"}))}));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",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),r.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm3 4a1 1 0 000 2h.01a1 1 0 100-2H7zm3 0a1 1 0 000 2h3a1 1 0 100-2h-3zm-3 4a1 1 0 100 2h.01a1 1 0 100-2H7zm3 0a1 1 0 100 2h3a1 1 0 100-2h-3z",clipRule:"evenodd"}))}));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",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),r.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))}));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 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z",clipRule:"evenodd"}))}));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:"M2 9.5A3.5 3.5 0 005.5 13H9v2.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 15.586V13h2.5a4.5 4.5 0 10-.616-8.958 4.002 4.002 0 10-7.753 1.977A3.5 3.5 0 002 9.5zm9 3.5H9V8a1 1 0 012 0v5z",clipRule:"evenodd"}))}));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",{d:"M5.5 13a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 13H11V9.413l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L9 9.414V13H5.5z"}),r.createElement("path",{d:"M9 13h2v5a1 1 0 11-2 0v-5z"}))}));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",{d:"M5.5 16a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 16h-8z"}))}));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:"M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}));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",{d:"M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z"}))}));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:"M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4zm1 14a1 1 0 100-2 1 1 0 000 2zm5-1.757l4.9-4.9a2 2 0 000-2.828L13.485 5.1a2 2 0 00-2.828 0L10 5.757v8.486zM16 18H9.071l6-6H16a2 2 0 012 2v2a2 2 0 01-2 2z",clipRule:"evenodd"}))}));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",{d:"M4 4a2 2 0 00-2 2v1h16V6a2 2 0 00-2-2H4z"}),r.createElement("path",{fillRule:"evenodd",d:"M18 9H2v5a2 2 0 002 2h12a2 2 0 002-2V9zM4 13a1 1 0 011-1h1a1 1 0 110 2H5a1 1 0 01-1-1zm5-1a1 1 0 100 2h1a1 1 0 100-2H9z",clipRule:"evenodd"}))}));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:"M9.504 1.132a1 1 0 01.992 0l1.75 1a1 1 0 11-.992 1.736L10 3.152l-1.254.716a1 1 0 11-.992-1.736l1.75-1zM5.618 4.504a1 1 0 01-.372 1.364L5.016 6l.23.132a1 1 0 11-.992 1.736L4 7.723V8a1 1 0 01-2 0V6a.996.996 0 01.52-.878l1.734-.99a1 1 0 011.364.372zm8.764 0a1 1 0 011.364-.372l1.733.99A1.002 1.002 0 0118 6v2a1 1 0 11-2 0v-.277l-.254.145a1 1 0 11-.992-1.736l.23-.132-.23-.132a1 1 0 01-.372-1.364zm-7 4a1 1 0 011.364-.372L10 8.848l1.254-.716a1 1 0 11.992 1.736L11 10.58V12a1 1 0 11-2 0v-1.42l-1.246-.712a1 1 0 01-.372-1.364zM3 11a1 1 0 011 1v1.42l1.246.712a1 1 0 11-.992 1.736l-1.75-1A1 1 0 012 14v-2a1 1 0 011-1zm14 0a1 1 0 011 1v2a1 1 0 01-.504.868l-1.75 1a1 1 0 11-.992-1.736L16 13.42V12a1 1 0 011-1zm-9.618 5.504a1 1 0 011.364-.372l.254.145V16a1 1 0 112 0v.277l.254-.145a1 1 0 11.992 1.736l-1.735.992a.995.995 0 01-1.022 0l-1.735-.992a1 1 0 01-.372-1.364z",clipRule:"evenodd"}))}));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",{d:"M11 17a1 1 0 001.447.894l4-2A1 1 0 0017 15V9.236a1 1 0 00-1.447-.894l-4 2a1 1 0 00-.553.894V17zM15.211 6.276a1 1 0 000-1.788l-4.764-2.382a1 1 0 00-.894 0L4.789 4.488a1 1 0 000 1.788l4.764 2.382a1 1 0 00.894 0l4.764-2.382zM4.447 8.342A1 1 0 003 9.236V15a1 1 0 00.553.894l4 2A1 1 0 009 17v-5.764a1 1 0 00-.553-.894l-4-2z"}))}));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 16zM7 4a1 1 0 000 2 1 1 0 011 1v1H7a1 1 0 000 2h1v3a3 3 0 106 0v-1a1 1 0 10-2 0v1a1 1 0 11-2 0v-3h3a1 1 0 100-2h-3V7a3 3 0 00-3-3z",clipRule:"evenodd"}))}));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",{d:"M8.433 7.418c.155-.103.346-.196.567-.267v1.698a2.305 2.305 0 01-.567-.267C8.07 8.34 8 8.114 8 8c0-.114.07-.34.433-.582zM11 12.849v-1.698c.22.071.412.164.567.267.364.243.433.468.433.582 0 .114-.07.34-.433.582a2.305 2.305 0 01-.567.267z"}),r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a1 1 0 10-2 0v.092a4.535 4.535 0 00-1.676.662C6.602 6.234 6 7.009 6 8c0 .99.602 1.765 1.324 2.246.48.32 1.054.545 1.676.662v1.941c-.391-.127-.68-.317-.843-.504a1 1 0 10-1.51 1.31c.562.649 1.413 1.076 2.353 1.253V15a1 1 0 102 0v-.092a4.535 4.535 0 001.676-.662C13.398 13.766 14 12.991 14 12c0-.99-.602-1.765-1.324-2.246A4.535 4.535 0 0011 9.092V7.151c.391.127.68.317.843.504a1 1 0 101.511-1.31c-.563-.649-1.413-1.076-2.354-1.253V5z",clipRule:"evenodd"}))}));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 16zM8.736 6.979C9.208 6.193 9.696 6 10 6c.304 0 .792.193 1.264.979a1 1 0 001.715-1.029C12.279 4.784 11.232 4 10 4s-2.279.784-2.979 1.95c-.285.475-.507 1-.67 1.55H6a1 1 0 000 2h.013a9.358 9.358 0 000 1H6a1 1 0 100 2h.351c.163.55.385 1.075.67 1.55C7.721 15.216 8.768 16 10 16s2.279-.784 2.979-1.95a1 1 0 10-1.715-1.029c-.472.786-.96.979-1.264.979-.304 0-.792-.193-1.264-.979a4.265 4.265 0 01-.264-.521H10a1 1 0 100-2H8.017a7.36 7.36 0 010-1H10a1 1 0 100-2H8.472c.08-.185.167-.36.264-.521z",clipRule:"evenodd"}))}));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 16zm1-14a3 3 0 00-3 3v2H7a1 1 0 000 2h1v1a1 1 0 01-1 1 1 1 0 100 2h6a1 1 0 100-2H9.83c.11-.313.17-.65.17-1v-1h1a1 1 0 100-2h-1V7a1 1 0 112 0 1 1 0 102 0 3 3 0 00-3-3z",clipRule:"evenodd"}))}));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 16zM7 5a1 1 0 100 2h1a2 2 0 011.732 1H7a1 1 0 100 2h2.732A2 2 0 018 11H7a1 1 0 00-.707 1.707l3 3a1 1 0 001.414-1.414l-1.483-1.484A4.008 4.008 0 0011.874 10H13a1 1 0 100-2h-1.126a3.976 3.976 0 00-.41-1H13a1 1 0 100-2H7z",clipRule:"evenodd"}))}));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 16zM7.858 5.485a1 1 0 00-1.715 1.03L7.633 9H7a1 1 0 100 2h1.834l.166.277V12H7a1 1 0 100 2h2v1a1 1 0 102 0v-1h2a1 1 0 100-2h-2v-.723l.166-.277H13a1 1 0 100-2h-.634l1.492-2.486a1 1 0 10-1.716-1.029L10.034 9h-.068L7.858 5.485z",clipRule:"evenodd"}))}));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:"M6.672 1.911a1 1 0 10-1.932.518l.259.966a1 1 0 001.932-.518l-.26-.966zM2.429 4.74a1 1 0 10-.517 1.932l.966.259a1 1 0 00.517-1.932l-.966-.26zm8.814-.569a1 1 0 00-1.415-1.414l-.707.707a1 1 0 101.415 1.415l.707-.708zm-7.071 7.072l.707-.707A1 1 0 003.465 9.12l-.708.707a1 1 0 001.415 1.415zm3.2-5.171a1 1 0 00-1.3 1.3l4 10a1 1 0 001.823.075l1.38-2.759 3.018 3.02a1 1 0 001.414-1.415l-3.019-3.02 2.76-1.379a1 1 0 00-.076-1.822l-10-4z",clipRule:"evenodd"}))}));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",{d:"M3 12v3c0 1.657 3.134 3 7 3s7-1.343 7-3v-3c0 1.657-3.134 3-7 3s-7-1.343-7-3z"}),r.createElement("path",{d:"M3 7v3c0 1.657 3.134 3 7 3s7-1.343 7-3V7c0 1.657-3.134 3-7 3S3 8.657 3 7z"}),r.createElement("path",{d:"M17 5c0 1.657-3.134 3-7 3S3 6.657 3 5s3.134-3 7-3 7 1.343 7 3z"}))}));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 5a2 2 0 012-2h10a2 2 0 012 2v8a2 2 0 01-2 2h-2.22l.123.489.804.804A1 1 0 0113 18H7a1 1 0 01-.707-1.707l.804-.804L7.22 15H5a2 2 0 01-2-2V5zm5.771 7H5V5h10v7H8.771z",clipRule:"evenodd"}))}));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:"M7 2a2 2 0 00-2 2v12a2 2 0 002 2h6a2 2 0 002-2V4a2 2 0 00-2-2H7zm3 14a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V4a2 2 0 00-2-2H6zm4 14a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm5 6a1 1 0 10-2 0v2H7a1 1 0 100 2h2v2a1 1 0 102 0v-2h2a1 1 0 100-2h-2V8z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm5 6a1 1 0 10-2 0v3.586l-1.293-1.293a1 1 0 10-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 11.586V8z",clipRule:"evenodd"}))}));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",{d:"M9 2a2 2 0 00-2 2v8a2 2 0 002 2h6a2 2 0 002-2V6.414A2 2 0 0016.414 5L14 2.586A2 2 0 0012.586 2H9z"}),r.createElement("path",{d:"M3 8a2 2 0 012-2v10h8a2 2 0 01-2 2H5a2 2 0 01-2-2V8z"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm1 8a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm2 10a1 1 0 10-2 0v3a1 1 0 102 0v-3zm2-3a1 1 0 011 1v5a1 1 0 11-2 0v-5a1 1 0 011-1zm4-1a1 1 0 10-2 0v7a1 1 0 102 0V8z",clipRule:"evenodd"}))}));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",{d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2h-1.528A6 6 0 004 9.528V4z"}),r.createElement("path",{fillRule:"evenodd",d:"M8 10a4 4 0 00-3.446 6.032l-1.261 1.26a1 1 0 101.414 1.415l1.261-1.261A4 4 0 108 10zm-2 4a2 2 0 114 0 2 2 0 01-4 0z",clipRule:"evenodd"}))}));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:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"}))}));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:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4z",clipRule:"evenodd"}))}));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 16zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z",clipRule:"evenodd"}))}));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",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"}))}));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",{d:"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"}))}));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"}))}));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",{d:"M7 9a2 2 0 012-2h6a2 2 0 012 2v6a2 2 0 01-2 2H9a2 2 0 01-2-2V9z"}),r.createElement("path",{d:"M5 3a2 2 0 00-2 2v6a2 2 0 002 2V5h8a2 2 0 00-2-2H5z"}))}));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 16zM7 9a1 1 0 100-2 1 1 0 000 2zm7-1a1 1 0 11-2 0 1 1 0 012 0zm-.464 5.535a1 1 0 10-1.415-1.414 3 3 0 01-4.242 0 1 1 0 00-1.415 1.414 5 5 0 007.072 0z",clipRule:"evenodd"}))}));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 16zM7 9a1 1 0 100-2 1 1 0 000 2zm7-1a1 1 0 11-2 0 1 1 0 012 0zm-7.536 5.879a1 1 0 001.415 0 3 3 0 014.242 0 1 1 0 001.415-1.415 5 5 0 00-7.072 0 1 1 0 000 1.415z",clipRule:"evenodd"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),r.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))}));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.707 2.293a1 1 0 00-1.414 1.414l14 14a1 1 0 001.414-1.414l-1.473-1.473A10.014 10.014 0 0019.542 10C18.268 5.943 14.478 3 10 3a9.958 9.958 0 00-4.512 1.074l-1.78-1.781zm4.261 4.26l1.514 1.515a2.003 2.003 0 012.45 2.45l1.514 1.514a4 4 0 00-5.478-5.478z",clipRule:"evenodd"}),r.createElement("path",{d:"M12.454 16.697L9.75 13.992a4 4 0 01-3.742-3.741L2.335 6.578A9.98 9.98 0 00.458 10c1.274 4.057 5.065 7 9.542 7 .847 0 1.669-.105 2.454-.303z"}))}));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",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),r.createElement("path",{fillRule:"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"}))}));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",{d:"M4.555 5.168A1 1 0 003 6v8a1 1 0 001.555.832L10 11.202V14a1 1 0 001.555.832l6-4a1 1 0 000-1.664l-6-4A1 1 0 0010 6v2.798l-5.445-3.63z"}))}));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:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm3 2h6v4H7V5zm8 8v2h1v-2h-1zm-2-2H7v4h6v-4zm2 0h1V9h-1v2zm1-4V5h-1v2h1zM5 5v2H4V5h1zm0 4H4v2h1V9zm-1 4h1v2H4v-2z",clipRule:"evenodd"}))}));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 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z",clipRule:"evenodd"}))}));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:"M6.625 2.655A9 9 0 0119 11a1 1 0 11-2 0 7 7 0 00-9.625-6.492 1 1 0 11-.75-1.853zM4.662 4.959A1 1 0 014.75 6.37 6.97 6.97 0 003 11a1 1 0 11-2 0 8.97 8.97 0 012.25-5.953 1 1 0 011.412-.088z",clipRule:"evenodd"}),r.createElement("path",{fillRule:"evenodd",d:"M5 11a5 5 0 1110 0 1 1 0 11-2 0 3 3 0 10-6 0c0 1.677-.345 3.276-.968 4.729a1 1 0 11-1.838-.789A9.964 9.964 0 005 11zm8.921 2.012a1 1 0 01.831 1.145 19.86 19.86 0 01-.545 2.436 1 1 0 11-1.92-.558c.207-.713.371-1.445.49-2.192a1 1 0 011.144-.83z",clipRule:"evenodd"}),r.createElement("path",{fillRule:"evenodd",d:"M10 10a1 1 0 011 1c0 2.236-.46 4.368-1.29 6.304a1 1 0 01-1.838-.789A13.952 13.952 0 009 11a1 1 0 011-1z",clipRule:"evenodd"}))}));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:"M12.395 2.553a1 1 0 00-1.45-.385c-.345.23-.614.558-.822.88-.214.33-.403.713-.57 1.116-.334.804-.614 1.768-.84 2.734a31.365 31.365 0 00-.613 3.58 2.64 2.64 0 01-.945-1.067c-.328-.68-.398-1.534-.398-2.654A1 1 0 005.05 6.05 6.981 6.981 0 003 11a7 7 0 1011.95-4.95c-.592-.591-.98-.985-1.348-1.467-.363-.476-.724-1.063-1.207-2.03zM12.12 15.12A3 3 0 017 13s.879.5 2.5.5c0-1 .5-4 1.25-4.5.5 1 .786 1.293 1.371 1.879A2.99 2.99 0 0113 13a2.99 2.99 0 01-.879 2.121z",clipRule:"evenodd"}))}));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 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z",clipRule:"evenodd"}))}));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:"M4 4a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V8a2 2 0 00-2-2h-5L9 4H4zm7 5a1 1 0 10-2 0v1H8a1 1 0 100 2h1v1a1 1 0 102 0v-1h1a1 1 0 100-2h-1V9z"}))}));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:"M4 4a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V8a2 2 0 00-2-2h-5L9 4H4zm7 5a1 1 0 10-2 0v1.586l-.293-.293a1 1 0 10-1.414 1.414l2 2 .002.002a.997.997 0 001.41 0l.002-.002 2-2a1 1 0 00-1.414-1.414l-.293.293V9z"}))}));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:"M2 6a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1H8a3 3 0 00-3 3v1.5a1.5 1.5 0 01-3 0V6z",clipRule:"evenodd"}),r.createElement("path",{d:"M6 12a2 2 0 012-2h8a2 2 0 012 2v2a2 2 0 01-2 2H2h2a2 2 0 002-2v-2z"}))}));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:"M4 4a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V8a2 2 0 00-2-2h-5L9 4H4zm4 6a1 1 0 100 2h4a1 1 0 100-2H8z"}))}));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",{d:"M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z"}))}));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:"M5 5a3 3 0 015-2.236A3 3 0 0114.83 6H16a2 2 0 110 4h-5V9a1 1 0 10-2 0v1H4a2 2 0 110-4h1.17C5.06 5.687 5 5.35 5 5zm4 1V5a1 1 0 10-1 1h1zm3 0a1 1 0 10-1-1v1h1z",clipRule:"evenodd"}),r.createElement("path",{d:"M9 11H3v5a2 2 0 002 2h4v-7zM11 18h4a2 2 0 002-2v-5h-6v7z"}))}));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:"M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z",clipRule:"evenodd"}))}));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 16zM4.332 8.027a6.012 6.012 0 011.912-2.706C6.512 5.73 6.974 6 7.5 6A1.5 1.5 0 019 7.5V8a2 2 0 004 0 2 2 0 011.523-1.943A5.977 5.977 0 0116 10c0 .34-.028.675-.083 1H15a2 2 0 00-2 2v2.197A5.973 5.973 0 0110 16v-2a2 2 0 00-2-2 2 2 0 01-2-2 2 2 0 00-1.668-1.973z",clipRule:"evenodd"}))}));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:"M9 3a1 1 0 012 0v5.5a.5.5 0 001 0V4a1 1 0 112 0v4.5a.5.5 0 001 0V6a1 1 0 112 0v5a7 7 0 11-14 0V9a1 1 0 012 0v2.5a.5.5 0 001 0V4a1 1 0 012 0v4.5a.5.5 0 001 0V3z",clipRule:"evenodd"}))}));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:"M9.243 3.03a1 1 0 01.727 1.213L9.53 6h2.94l.56-2.243a1 1 0 111.94.486L14.53 6H17a1 1 0 110 2h-2.97l-1 4H15a1 1 0 110 2h-2.47l-.56 2.242a1 1 0 11-1.94-.485L10.47 14H7.53l-.56 2.242a1 1 0 11-1.94-.485L5.47 14H3a1 1 0 110-2h2.97l1-4H5a1 1 0 110-2h2.47l.56-2.243a1 1 0 011.213-.727zM9.03 8l-1 4h2.938l1-4H9.031z",clipRule:"evenodd"}))}));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.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z",clipRule:"evenodd"}))}));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",{d:"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"}))}));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 2a1 1 0 00-1 1v1a1 1 0 002 0V3a1 1 0 00-1-1zM4 4h3a3 3 0 006 0h3a2 2 0 012 2v9a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zm2.5 7a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm2.45 4a2.5 2.5 0 10-4.9 0h4.9zM12 9a1 1 0 100 2h3a1 1 0 100-2h-3zm-1 4a1 1 0 011-1h2a1 1 0 110 2h-2a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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",{d:"M8.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l2-2a1 1 0 00-1.414-1.414L11 7.586V3a1 1 0 10-2 0v4.586l-.293-.293z"}),r.createElement("path",{d:"M3 5a2 2 0 012-2h1a1 1 0 010 2H5v7h2l1 2h4l1-2h2V5h-1a1 1 0 110-2h1a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2V5z"}))}));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:"M5 3a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V5a2 2 0 00-2-2H5zm0 2h10v7h-2l-1 2H8l-1-2H5V5z",clipRule:"evenodd"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"}))}));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:"M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z",clipRule:"evenodd"}))}));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.496 2.132a1 1 0 00-.992 0l-7 4A1 1 0 003 8v7a1 1 0 100 2h14a1 1 0 100-2V8a1 1 0 00.496-1.868l-7-4zM6 9a1 1 0 00-1 1v3a1 1 0 102 0v-3a1 1 0 00-1-1zm3 1a1 1 0 012 0v3a1 1 0 11-2 0v-3zm5-1a1 1 0 00-1 1v3a1 1 0 102 0v-3a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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",{d:"M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.002z"}))}));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:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"}))}));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:"M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z",clipRule:"evenodd"}))}));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:"M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z",clipRule:"evenodd"}))}));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:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"}))}));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",{d:"M10 2a5 5 0 00-5 5v2a2 2 0 00-2 2v5a2 2 0 002 2h10a2 2 0 002-2v-5a2 2 0 00-2-2H7V7a3 3 0 015.905-.75 1 1 0 001.937-.5A5.002 5.002 0 0010 2z"}))}));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 3a1 1 0 011 1v12a1 1 0 11-2 0V4a1 1 0 011-1zm7.707 3.293a1 1 0 010 1.414L9.414 9H17a1 1 0 110 2H9.414l1.293 1.293a1 1 0 01-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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 3a1 1 0 00-1 1v12a1 1 0 102 0V4a1 1 0 00-1-1zm10.293 9.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L14.586 9H7a1 1 0 100 2h7.586l-1.293 1.293z",clipRule:"evenodd"}))}));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:"M2.94 6.412A2 2 0 002 8.108V16a2 2 0 002 2h12a2 2 0 002-2V8.108a2 2 0 00-.94-1.696l-6-3.75a2 2 0 00-2.12 0l-6 3.75zm2.615 2.423a1 1 0 10-1.11 1.664l5 3.333a1 1 0 001.11 0l5-3.333a1 1 0 00-1.11-1.664L10 11.798 5.555 8.835z",clipRule:"evenodd"}))}));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",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z"}),r.createElement("path",{d:"M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"}))}));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:"M12 1.586l-4 4v12.828l4-4V1.586zM3.707 3.293A1 1 0 002 4v10a1 1 0 00.293.707L6 18.414V5.586L3.707 3.293zM17.707 5.293L14 1.586v12.828l2.293 2.293A1 1 0 0018 16V6a1 1 0 00-.293-.707z",clipRule:"evenodd"}))}));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 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 7a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 13a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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:"M7 4a3 3 0 016 0v4a3 3 0 11-6 0V4zm4 10.93A7.001 7.001 0 0017 8a1 1 0 10-2 0A5 5 0 015 8a1 1 0 00-2 0 7.001 7.001 0 006 6.93V17H6a1 1 0 100 2h8a1 1 0 100-2h-3v-2.07z",clipRule:"evenodd"}))}));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 16zM7 9a1 1 0 000 2h6a1 1 0 100-2H7z",clipRule:"evenodd"}))}));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:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"}))}));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",{d:"M18 3a1 1 0 00-1.196-.98l-10 2A1 1 0 006 5v9.114A4.369 4.369 0 005 14c-1.657 0-3 .895-3 2s1.343 2 3 2 3-.895 3-2V7.82l8-1.6v5.894A4.37 4.37 0 0015 12c-1.657 0-3 .895-3 2s1.343 2 3 2 3-.895 3-2V3z"}))}));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:"M2 5a2 2 0 012-2h8a2 2 0 012 2v10a2 2 0 002 2H4a2 2 0 01-2-2V5zm3 1h6v4H5V6zm6 6H5v2h6v-2z",clipRule:"evenodd"}),r.createElement("path",{d:"M15 7h1a2 2 0 012 2v5.5a1.5 1.5 0 01-3 0V7z"}))}));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:"M4 4a2 2 0 012-2h8a2 2 0 012 2v12a1 1 0 110 2h-3a1 1 0 01-1-1v-2a1 1 0 00-1-1H9a1 1 0 00-1 1v2a1 1 0 01-1 1H4a1 1 0 110-2V4zm3 1h2v2H7V5zm2 4H7v2h2V9zm2-4h2v2h-2V5zm2 4h-2v2h2V9z",clipRule:"evenodd"}))}));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",{d:"M10.894 2.553a1 1 0 00-1.788 0l-7 14a1 1 0 001.169 1.409l5-1.429A1 1 0 009 15.571V11a1 1 0 112 0v4.571a1 1 0 00.725.962l5 1.428a1 1 0 001.17-1.408l-7-14z"}))}));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:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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",{d:"M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z"}),r.createElement("path",{fillRule:"evenodd",d:"M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z",clipRule:"evenodd"}))}));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",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"}))}));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",{d:"M14.414 7l3.293-3.293a1 1 0 00-1.414-1.414L13 5.586V4a1 1 0 10-2 0v4.003a.996.996 0 00.617.921A.997.997 0 0012 9h4a1 1 0 100-2h-1.586z"}),r.createElement("path",{d:"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"}))}));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",{d:"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"}),r.createElement("path",{d:"M16.707 3.293a1 1 0 010 1.414L15.414 6l1.293 1.293a1 1 0 01-1.414 1.414L14 7.414l-1.293 1.293a1 1 0 11-1.414-1.414L12.586 6l-1.293-1.293a1 1 0 011.414-1.414L14 4.586l1.293-1.293a1 1 0 011.414 0z"}))}));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",{d:"M17.924 2.617a.997.997 0 00-.215-.322l-.004-.004A.997.997 0 0017 2h-4a1 1 0 100 2h1.586l-3.293 3.293a1 1 0 001.414 1.414L16 5.414V7a1 1 0 102 0V3a.997.997 0 00-.076-.383z"}),r.createElement("path",{d:"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"}))}));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",{d:"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"}))}));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:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z",clipRule:"evenodd"}))}));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 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z",clipRule:"evenodd"}))}));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 16zm1-11a1 1 0 10-2 0v2H7a1 1 0 100 2h2v2a1 1 0 102 0v-2h2a1 1 0 100-2h-2V7z",clipRule:"evenodd"}))}));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 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z",clipRule:"evenodd"}))}));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 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"}))}));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 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11 4a1 1 0 10-2 0v4a1 1 0 102 0V7zm-3 1a1 1 0 10-2 0v3a1 1 0 102 0V8zM8 9a1 1 0 00-2 0v2a1 1 0 102 0V9z",clipRule:"evenodd"}))}));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 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 0l-2 2a1 1 0 101.414 1.414L8 10.414l1.293 1.293a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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:"M5 4v3H4a2 2 0 00-2 2v3a2 2 0 002 2h1v2a2 2 0 002 2h6a2 2 0 002-2v-2h1a2 2 0 002-2V9a2 2 0 00-2-2h-1V4a2 2 0 00-2-2H7a2 2 0 00-2 2zm8 0H7v3h6V4zm0 8H7v4h6v-4z",clipRule:"evenodd"}))}));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",{d:"M10 3.5a1.5 1.5 0 013 0V4a1 1 0 001 1h3a1 1 0 011 1v3a1 1 0 01-1 1h-.5a1.5 1.5 0 000 3h.5a1 1 0 011 1v3a1 1 0 01-1 1h-3a1 1 0 01-1-1v-.5a1.5 1.5 0 00-3 0v.5a1 1 0 01-1 1H6a1 1 0 01-1-1v-3a1 1 0 00-1-1h-.5a1.5 1.5 0 010-3H4a1 1 0 001-1V6a1 1 0 011-1h3a1 1 0 001-1v-.5z"}))}));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 4a1 1 0 011-1h3a1 1 0 011 1v3a1 1 0 01-1 1H4a1 1 0 01-1-1V4zm2 2V5h1v1H5zM3 13a1 1 0 011-1h3a1 1 0 011 1v3a1 1 0 01-1 1H4a1 1 0 01-1-1v-3zm2 2v-1h1v1H5zM13 3a1 1 0 00-1 1v3a1 1 0 001 1h3a1 1 0 001-1V4a1 1 0 00-1-1h-3zm1 2v1h1V5h-1z",clipRule:"evenodd"}),r.createElement("path",{d:"M11 4a1 1 0 10-2 0v1a1 1 0 002 0V4zM10 7a1 1 0 011 1v1h2a1 1 0 110 2h-3a1 1 0 01-1-1V8a1 1 0 011-1zM16 9a1 1 0 100 2 1 1 0 000-2zM9 13a1 1 0 011-1h1a1 1 0 110 2v2a1 1 0 11-2 0v-3zM7 11a1 1 0 100-2H4a1 1 0 100 2h3zM17 13a1 1 0 01-1 1h-2a1 1 0 110-2h2a1 1 0 011 1zM16 17a1 1 0 100-2h-3a1 1 0 100 2h3z"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))}));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:"M5 2a2 2 0 00-2 2v14l3.5-2 3.5 2 3.5-2 3.5 2V4a2 2 0 00-2-2H5zm4.707 3.707a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L8.414 9H10a3 3 0 013 3v1a1 1 0 102 0v-1a5 5 0 00-5-5H8.414l1.293-1.293z",clipRule:"evenodd"}))}));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:"M5 2a2 2 0 00-2 2v14l3.5-2 3.5 2 3.5-2 3.5 2V4a2 2 0 00-2-2H5zm2.5 3a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm6.207.293a1 1 0 00-1.414 0l-6 6a1 1 0 101.414 1.414l6-6a1 1 0 000-1.414zM12.5 10a1.5 1.5 0 100 3 1.5 1.5 0 000-3z",clipRule:"evenodd"}))}));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:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"}))}));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:"M7.707 3.293a1 1 0 010 1.414L5.414 7H11a7 7 0 017 7v2a1 1 0 11-2 0v-2a5 5 0 00-5-5H5.414l2.293 2.293a1 1 0 11-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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",{d:"M8.445 14.832A1 1 0 0010 14v-2.798l5.445 3.63A1 1 0 0017 14V6a1 1 0 00-1.555-.832L10 8.798V6a1 1 0 00-1.555-.832l-6 4a1 1 0 000 1.664l6 4z"}))}));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",{d:"M5 3a1 1 0 000 2c5.523 0 10 4.477 10 10a1 1 0 102 0C17 8.373 11.627 3 5 3z"}),r.createElement("path",{d:"M4 9a1 1 0 011-1 7 7 0 017 7 1 1 0 11-2 0 5 5 0 00-5-5 1 1 0 01-1-1zM3 15a2 2 0 114 0 2 2 0 01-4 0z"}))}));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",{d:"M9.707 7.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L13 8.586V5h3a2 2 0 012 2v5a2 2 0 01-2 2H8a2 2 0 01-2-2V7a2 2 0 012-2h3v3.586L9.707 7.293zM11 3a1 1 0 112 0v2h-2V3z"}),r.createElement("path",{d:"M4 9a2 2 0 00-2 2v5a2 2 0 002 2h8a2 2 0 002-2H4V9z"}))}));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",{d:"M7.707 10.293a1 1 0 10-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 11.586V6h5a2 2 0 012 2v7a2 2 0 01-2 2H4a2 2 0 01-2-2V8a2 2 0 012-2h5v5.586l-1.293-1.293zM9 4a1 1 0 012 0v2H9V4z"}))}));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 2a1 1 0 011 1v1.323l3.954 1.582 1.599-.8a1 1 0 01.894 1.79l-1.233.616 1.738 5.42a1 1 0 01-.285 1.05A3.989 3.989 0 0115 15a3.989 3.989 0 01-2.667-1.019 1 1 0 01-.285-1.05l1.715-5.349L11 6.477V16h2a1 1 0 110 2H7a1 1 0 110-2h2V6.477L6.237 7.582l1.715 5.349a1 1 0 01-.285 1.05A3.989 3.989 0 015 15a3.989 3.989 0 01-2.667-1.019 1 1 0 01-.285-1.05l1.738-5.42-1.233-.617a1 1 0 01.894-1.788l1.599.799L9 4.323V3a1 1 0 011-1zm-5 8.274l-.818 2.552c.25.112.526.174.818.174.292 0 .569-.062.818-.174L5 10.274zm10 0l-.818 2.552c.25.112.526.174.818.174.292 0 .569-.062.818-.174L15 10.274z",clipRule:"evenodd"}))}));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:"M5.5 2a3.5 3.5 0 101.665 6.58L8.585 10l-1.42 1.42a3.5 3.5 0 101.414 1.414l8.128-8.127a1 1 0 00-1.414-1.414L10 8.586l-1.42-1.42A3.5 3.5 0 005.5 2zM4 5.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 9a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z",clipRule:"evenodd"}),r.createElement("path",{d:"M12.828 11.414a1 1 0 00-1.414 1.414l3.879 3.88a1 1 0 001.414-1.415l-3.879-3.879z"}))}));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",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"}))}));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:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}));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 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"}))}));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",{d:"M15 8a3 3 0 10-2.977-2.63l-4.94 2.47a3 3 0 100 4.319l4.94 2.47a3 3 0 10.895-1.789l-4.94-2.47a3.027 3.027 0 000-.74l4.94-2.47C13.456 7.68 14.19 8 15 8z"}))}));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:"M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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 1.944A11.954 11.954 0 012.166 5C2.056 5.649 2 6.319 2 7c0 5.225 3.34 9.67 8 11.317C14.66 16.67 18 12.225 18 7c0-.682-.057-1.35-.166-2.001A11.954 11.954 0 0110 1.944zM11 14a1 1 0 11-2 0 1 1 0 012 0zm0-7a1 1 0 10-2 0v3a1 1 0 102 0V7z",clipRule:"evenodd"}))}));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 2a4 4 0 00-4 4v1H5a1 1 0 00-.994.89l-1 9A1 1 0 004 18h12a1 1 0 00.994-1.11l-1-9A1 1 0 0015 7h-1V6a4 4 0 00-4-4zm2 5V6a2 2 0 10-4 0v1h4zm-6 3a1 1 0 112 0 1 1 0 01-2 0zm7-1a1 1 0 100 2 1 1 0 000-2z",clipRule:"evenodd"}))}));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",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"}))}));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",{d:"M3 3a1 1 0 000 2h11a1 1 0 100-2H3zM3 7a1 1 0 000 2h5a1 1 0 000-2H3zM3 11a1 1 0 100 2h4a1 1 0 100-2H3zM13 16a1 1 0 102 0v-5.586l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 101.414 1.414L13 10.414V16z"}))}));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",{d:"M3 3a1 1 0 000 2h11a1 1 0 100-2H3zM3 7a1 1 0 000 2h7a1 1 0 100-2H3zM3 11a1 1 0 100 2h4a1 1 0 100-2H3zM15 8a1 1 0 10-2 0v5.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L15 13.586V8z"}))}));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:"M5 2a1 1 0 011 1v1h1a1 1 0 010 2H6v1a1 1 0 01-2 0V6H3a1 1 0 010-2h1V3a1 1 0 011-1zm0 10a1 1 0 011 1v1h1a1 1 0 110 2H6v1a1 1 0 11-2 0v-1H3a1 1 0 110-2h1v-1a1 1 0 011-1zM12 2a1 1 0 01.967.744L14.146 7.2 17.5 9.134a1 1 0 010 1.732l-3.354 1.935-1.18 4.455a1 1 0 01-1.933 0L9.854 12.8 6.5 10.866a1 1 0 010-1.732l3.354-1.935 1.18-4.455A1 1 0 0112 2z",clipRule:"evenodd"}))}));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:"M18 3a1 1 0 00-1.447-.894L8.763 6H5a3 3 0 000 6h.28l1.771 5.316A1 1 0 008 18h1a1 1 0 001-1v-4.382l6.553 3.276A1 1 0 0018 15V3z",clipRule:"evenodd"}))}));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",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}))}));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",{d:"M3.707 2.293a1 1 0 00-1.414 1.414l6.921 6.922c.05.062.105.118.168.167l6.91 6.911a1 1 0 001.415-1.414l-.675-.675a9.001 9.001 0 00-.668-11.982A1 1 0 1014.95 5.05a7.002 7.002 0 01.657 9.143l-1.435-1.435a5.002 5.002 0 00-.636-6.294A1 1 0 0012.12 7.88c.924.923 1.12 2.3.587 3.415l-1.992-1.992a.922.922 0 00-.018-.018l-6.99-6.991zM3.238 8.187a1 1 0 00-1.933-.516c-.8 3-.025 6.336 2.331 8.693a1 1 0 001.414-1.415 6.997 6.997 0 01-1.812-6.762zM7.4 11.5a1 1 0 10-1.73 1c.214.371.48.72.795 1.035a1 1 0 001.414-1.414c-.191-.191-.35-.4-.478-.622z"}))}));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:"M5.05 3.636a1 1 0 010 1.414 7 7 0 000 9.9 1 1 0 11-1.414 1.414 9 9 0 010-12.728 1 1 0 011.414 0zm9.9 0a1 1 0 011.414 0 9 9 0 010 12.728 1 1 0 11-1.414-1.414 7 7 0 000-9.9 1 1 0 010-1.414zM7.879 6.464a1 1 0 010 1.414 3 3 0 000 4.243 1 1 0 11-1.415 1.414 5 5 0 010-7.07 1 1 0 011.415 0zm4.242 0a1 1 0 011.415 0 5 5 0 010 7.072 1 1 0 01-1.415-1.415 3 3 0 000-4.242 1 1 0 010-1.415zM10 9a1 1 0 011 1v.01a1 1 0 11-2 0V10a1 1 0 011-1z",clipRule:"evenodd"}))}));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 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z",clipRule:"evenodd"}))}));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 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z",clipRule:"evenodd"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-2 0c0 .993-.241 1.929-.668 2.754l-1.524-1.525a3.997 3.997 0 00.078-2.183l1.562-1.562C15.802 8.249 16 9.1 16 10zm-5.165 3.913l1.58 1.58A5.98 5.98 0 0110 16a5.976 5.976 0 01-2.516-.552l1.562-1.562a4.006 4.006 0 001.789.027zm-4.677-2.796a4.002 4.002 0 01-.041-2.08l-.08.08-1.53-1.533A5.98 5.98 0 004 10c0 .954.223 1.856.619 2.657l1.54-1.54zm1.088-6.45A5.974 5.974 0 0110 4c.954 0 1.856.223 2.657.619l-1.54 1.54a4.002 4.002 0 00-2.346.033L7.246 4.668zM12 10a2 2 0 11-4 0 2 2 0 014 0z",clipRule:"evenodd"}))}));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",{d:"M8 5a1 1 0 100 2h5.586l-1.293 1.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L13.586 5H8zM12 15a1 1 0 100-2H6.414l1.293-1.293a1 1 0 10-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L6.414 15H12z"}))}));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",{d:"M5 12a1 1 0 102 0V6.414l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L5 6.414V12zM15 8a1 1 0 10-2 0v5.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L15 13.586V8z"}))}));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:"M5 4a3 3 0 00-3 3v6a3 3 0 003 3h10a3 3 0 003-3V7a3 3 0 00-3-3H5zm-1 9v-1h5v2H5a1 1 0 01-1-1zm7 1h4a1 1 0 001-1v-1h-5v2zm0-4h5V8h-5v2zM9 8H4v2h5V8z",clipRule:"evenodd"}))}));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:"M17.707 9.293a1 1 0 010 1.414l-7 7a1 1 0 01-1.414 0l-7-7A.997.997 0 012 10V5a3 3 0 013-3h5c.256 0 .512.098.707.293l7 7zM5 6a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))}));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",{d:"M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z"}))}));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:"M2 5a2 2 0 012-2h12a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm3.293 1.293a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 01-1.414-1.414L7.586 10 5.293 7.707a1 1 0 010-1.414zM11 12a1 1 0 100 2h3a1 1 0 100-2h-3z",clipRule:"evenodd"}))}));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",{d:"M18 9.5a1.5 1.5 0 11-3 0v-6a1.5 1.5 0 013 0v6zM14 9.667v-5.43a2 2 0 00-1.105-1.79l-.05-.025A4 4 0 0011.055 2H5.64a2 2 0 00-1.962 1.608l-1.2 6A2 2 0 004.44 12H8v4a2 2 0 002 2 1 1 0 001-1v-.667a4 4 0 01.8-2.4l1.4-1.866a4 4 0 00.8-2.4z"}))}));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",{d:"M2 10.5a1.5 1.5 0 113 0v6a1.5 1.5 0 01-3 0v-6zM6 10.333v5.43a2 2 0 001.106 1.79l.05.025A4 4 0 008.943 18h5.416a2 2 0 001.962-1.608l1.2-6A2 2 0 0015.56 8H12V4a2 2 0 00-2-2 1 1 0 00-1 1v.667a4 4 0 01-.8 2.4L6.8 7.933a4 4 0 00-.8 2.4z"}))}));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",{d:"M2 6a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 100 4v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2a2 2 0 100-4V6z"}))}));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:"M7 2a1 1 0 011 1v1h3a1 1 0 110 2H9.578a18.87 18.87 0 01-1.724 4.78c.29.354.596.696.914 1.026a1 1 0 11-1.44 1.389c-.188-.196-.373-.396-.554-.6a19.098 19.098 0 01-3.107 3.567 1 1 0 01-1.334-1.49 17.087 17.087 0 003.13-3.733 18.992 18.992 0 01-1.487-2.494 1 1 0 111.79-.89c.234.47.489.928.764 1.372.417-.934.752-1.913.997-2.927H3a1 1 0 110-2h3V3a1 1 0 011-1zm6 6a1 1 0 01.894.553l2.991 5.982a.869.869 0 01.02.037l.99 1.98a1 1 0 11-1.79.895L15.383 16h-4.764l-.724 1.447a1 1 0 11-1.788-.894l.99-1.98.019-.038 2.99-5.982A1 1 0 0113 8zm-1.382 6h2.764L13 11.236 11.618 14z",clipRule:"evenodd"}))}));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:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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:"M12 13a1 1 0 100 2h5a1 1 0 001-1V9a1 1 0 10-2 0v2.586l-4.293-4.293a1 1 0 00-1.414 0L8 9.586 3.707 5.293a1 1 0 00-1.414 1.414l5 5a1 1 0 001.414 0L11 9.414 14.586 13H12z",clipRule:"evenodd"}))}));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:"M12 7a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0V8.414l-4.293 4.293a1 1 0 01-1.414 0L8 10.414l-4.293 4.293a1 1 0 01-1.414-1.414l5-5a1 1 0 011.414 0L11 10.586 14.586 7H12z",clipRule:"evenodd"}))}));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",{d:"M8 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM15 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z"}),r.createElement("path",{d:"M3 4a1 1 0 00-1 1v10a1 1 0 001 1h1.05a2.5 2.5 0 014.9 0H10a1 1 0 001-1V5a1 1 0 00-1-1H3zM14 7a1 1 0 00-1 1v6.05A2.5 2.5 0 0115.95 16H17a1 1 0 001-1v-5a1 1 0 00-.293-.707l-2-2A1 1 0 0015 7h-1z"}))}));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-1zM6.293 6.707a1 1 0 010-1.414l3-3a1 1 0 011.414 0l3 3a1 1 0 01-1.414 1.414L11 5.414V13a1 1 0 11-2 0V5.414L7.707 6.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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",{d:"M8 9a3 3 0 100-6 3 3 0 000 6zM8 11a6 6 0 016 6H2a6 6 0 016-6zM16 7a1 1 0 10-2 0v1h-1a1 1 0 100 2h1v1a1 1 0 102 0v-1h1a1 1 0 100-2h-1V7z"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z",clipRule:"evenodd"}))}));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",{d:"M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"}))}));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",{d:"M11 6a3 3 0 11-6 0 3 3 0 016 0zM14 17a6 6 0 00-12 0h12zM13 8a1 1 0 100 2h4a1 1 0 100-2h-4z"}))}));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 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"}))}));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",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"}))}));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:"M4.649 3.084A1 1 0 015.163 4.4 13.95 13.95 0 004 10c0 1.993.416 3.886 1.164 5.6a1 1 0 01-1.832.8A15.95 15.95 0 012 10c0-2.274.475-4.44 1.332-6.4a1 1 0 011.317-.516zM12.96 7a3 3 0 00-2.342 1.126l-.328.41-.111-.279A2 2 0 008.323 7H8a1 1 0 000 2h.323l.532 1.33-1.035 1.295a1 1 0 01-.781.375H7a1 1 0 100 2h.039a3 3 0 002.342-1.126l.328-.41.111.279A2 2 0 0011.677 14H12a1 1 0 100-2h-.323l-.532-1.33 1.035-1.295A1 1 0 0112.961 9H13a1 1 0 100-2h-.039zm1.874-2.6a1 1 0 011.833-.8A15.95 15.95 0 0118 10c0 2.274-.475 4.44-1.332 6.4a1 1 0 11-1.832-.8A13.949 13.949 0 0016 10c0-1.993-.416-3.886-1.165-5.6z",clipRule:"evenodd"}))}));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",{d:"M2 6a2 2 0 012-2h6a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V6zM14.553 7.106A1 1 0 0014 8v4a1 1 0 00.553.894l2 1A1 1 0 0018 13V7a1 1 0 00-1.447-.894l-2 1z"}))}));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",{d:"M2 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1H3a1 1 0 01-1-1V4zM8 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1H9a1 1 0 01-1-1V4zM15 3a1 1 0 00-1 1v12a1 1 0 001 1h2a1 1 0 001-1V4a1 1 0 00-1-1h-2z"}))}));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",{d:"M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM14 11a1 1 0 011 1v1h1a1 1 0 110 2h-1v1a1 1 0 11-2 0v-1h-1a1 1 0 110-2h1v-1a1 1 0 011-1z"}))}));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",{d:"M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM11 13a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"}))}));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 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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:"M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM12.293 7.293a1 1 0 011.414 0L15 8.586l1.293-1.293a1 1 0 111.414 1.414L16.414 10l1.293 1.293a1 1 0 01-1.414 1.414L15 11.414l-1.293 1.293a1 1 0 01-1.414-1.414L13.586 10l-1.293-1.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM14.657 2.929a1 1 0 011.414 0A9.972 9.972 0 0119 10a9.972 9.972 0 01-2.929 7.071 1 1 0 01-1.414-1.414A7.971 7.971 0 0017 10c0-2.21-.894-4.208-2.343-5.657a1 1 0 010-1.414zm-2.829 2.828a1 1 0 011.415 0A5.983 5.983 0 0115 10a5.984 5.984 0 01-1.757 4.243 1 1 0 01-1.415-1.415A3.984 3.984 0 0013 10a3.983 3.983 0 00-1.172-2.828 1 1 0 010-1.415z",clipRule:"evenodd"}))}));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:"M17.778 8.222c-4.296-4.296-11.26-4.296-15.556 0A1 1 0 01.808 6.808c5.076-5.077 13.308-5.077 18.384 0a1 1 0 01-1.414 1.414zM14.95 11.05a7 7 0 00-9.9 0 1 1 0 01-1.414-1.414 9 9 0 0112.728 0 1 1 0 01-1.414 1.414zM12.12 13.88a3 3 0 00-4.242 0 1 1 0 01-1.415-1.415 5 5 0 017.072 0 1 1 0 01-1.415 1.415zM9 16a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1z",clipRule:"evenodd"}))}));const pn=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 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))}));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:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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",{d:"M5 8a1 1 0 011-1h1V6a1 1 0 012 0v1h1a1 1 0 110 2H9v1a1 1 0 11-2 0V9H6a1 1 0 01-1-1z"}),r.createElement("path",{fillRule:"evenodd",d:"M2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8zm6-4a4 4 0 100 8 4 4 0 000-8z",clipRule:"evenodd"}))}));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:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}),r.createElement("path",{fillRule:"evenodd",d:"M5 8a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z",clipRule:"evenodd"}))}));const vn=function(e){return Se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},e,{children:Se("path",{fillRule:"evenodd",d:"M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z",clipRule:"evenodd"})}))};const gn=function(e){return Se("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},e,{children:Se("path",{d:"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"})}))},mn=(0,r.memo)((({start:e,end:t,resetStart:n,resetEnd:r})=>Se("div",{className:"mt-10 px-4",children:Se("div",{className:"transition duration-200 ease-in-out group-hover:opacity-60",children:[Se("h3",{className:"cursor-text pb-2 text-sm font-semibold uppercase tracking-wide text-gray-900 lg:text-xs ",children:"Tracing Path"}),Se("div",{className:"flex flex-row items-center truncate ",children:[Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mr-2 h-5 w-5 text-gray-500",viewBox:"0 0 20 20",fill:"currentColor",children:Se("path",{fillRule:"evenodd",d:"M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z",clipRule:"evenodd"})}),e?Se("div",{className:" group relative flex-1 cursor-pointer flex-col items-center overflow-hidden ","data-cy":"resetTraceButton",onClick:n,children:[Se("div",{className:"bg-green-nx-base flex-1 truncate rounded-md border border-gray-200 p-2 text-gray-50 shadow-sm transition duration-200 ease-in-out group-hover:opacity-60",children:Se("span",{children:e})}),Se("div",{className:"absolute top-2 right-2 flex translate-x-32 items-center rounded-md bg-white pl-2 text-sm font-medium text-gray-700 shadow-sm ring-1 ring-gray-500 transition-all transition duration-200 ease-in-out group-hover:translate-x-0",children:["Reset",Se("span",{className:"rounded-md p-1",children:Se(pn,{className:"h-5 w-5"})})]})]}):Se("p",{className:"text-sm text-gray-500",children:"Select start project"})]}),Se("div",{children:Se(gn,{className:"h-5 w-5 text-gray-500"})}),Se("div",{className:"flex flex-row items-center truncate ",children:[Se(vn,{className:"mr-2 h-5 w-5 text-gray-500"}),t?Se("div",{className:" group relative flex-1 cursor-pointer flex-col items-center overflow-hidden ","data-cy":"resetTraceButton",onClick:r,children:[Se("div",{className:"bg-green-nx-base flex-1 truncate rounded-md border border-gray-200 p-2 text-gray-50 shadow-sm transition duration-200 ease-in-out group-hover:opacity-60",children:Se("span",{children:t})}),Se("div",{className:"absolute top-2 right-2 flex translate-x-32 items-center rounded-md bg-white pl-2 text-sm font-medium text-gray-700 shadow-sm ring-1 ring-gray-500 transition-all transition duration-200 ease-in-out group-hover:translate-x-0",children:["Reset",Se("span",{className:"rounded-md p-1",children:Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})})})]})]}):Se("p",{className:"text-sm text-gray-500",children:"Select end project"})]})]})})));function yn({className:e}){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z"})})}function wn({className:e}){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z"})})}function bn({className:e}){return Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})}function xn({toggle:e,setDefaultTheme:t}){function n(n){t(n),e(!1)}const r="p-2 hover:bg-slate-600 hover:bg-opacity-30";return Se("div",{className:"bg-blue-nx-dark absolute top-[60px] right-4 flex overflow-hidden rounded-lg text-stone-200 shadow-xl ",children:[Se("button",{"data-cy":"dark-theme-button",className:r,onClick:()=>n("dark"),children:Se(yn,{className:"h-5 w-5"})}),Se("button",{"data-cy":"light-theme-button",className:r,onClick:()=>n("light"),children:Se(wn,{className:"h-5 w-5"})}),Se("button",{"data-cy":"system-theme-button",className:r,onClick:()=>n("system"),children:Se(bn,{className:"h-5 w-5"})})]})}function _n(){const[e,t]=(0,r.useState)(!1),[n,a]=(0,r.useState)(localStorage.getItem(Ye)||"system");return(0,r.useEffect)((()=>{Xe(n)}),[n]),Se("div",{className:"flex",children:[Se("span",{"data-cy":"theme-open-modal-button",className:`hover:bg-blue-nx-dark group relative cursor-pointer rounded-lg border-white\n p-2 ${e?"bg-blue-nx-dark":""}\n `,onClick:()=>t(!e),children:"system"===n?bn({className:"h-5 w-5"}):"dark"===n?yn({className:"h-5 w-5"}):"light"===n?wn({className:"h-5 w-5"}):void 0}),e&&Se(xn,{toggle:t,setDefaultTheme:a})]})}const En=function(){const e=Pt(),t=Nt(Xt),n=Nt($t),a=Nt(Kt),i=Nt(Jt),o=Nt(en),s=Nt(Zt),l=Nt(Qt),u=Le(),{showExperimentalFeatures:c}=u.appConfig,d=Nt(tn),f=(0,r.useCallback)((t=>{e.send({type:"filterByText",search:t})}),[e]);return Se("div",{className:" dark:bg-sidebar-dark relative relative flex h-full w-72 flex-col overflow-y-scroll pb-10 shadow-lg ring-1 ring-gray-400 ring-opacity-10 transition-all ",id:"sidebar",children:[Se("div",{className:"bg-blue-nx-base",children:Se("div",{className:"mx-4 my-5 flex items-center text-white "+(c?"justify-between":"justify-start"),children:[Se("svg",{className:"h-10 w-auto",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[Se("title",{children:"Nx"}),Se("path",{d:"M11.987 14.138l-3.132 4.923-5.193-8.427-.012 8.822H0V4.544h3.691l5.247 8.833.005-3.998 3.044 4.759zm.601-5.761c.024-.048 0-3.784.008-3.833h-3.65c.002.059-.005 3.776-.003 3.833h3.645zm5.634 4.134a2.061 2.061 0 0 0-1.969 1.336 1.963 1.963 0 0 1 2.343-.739c.396.161.917.422 1.33.283a2.1 2.1 0 0 0-1.704-.88zm3.39 1.061c-.375-.13-.8-.277-1.109-.681-.06-.08-.116-.17-.176-.265a2.143 2.143 0 0 0-.533-.642c-.294-.216-.68-.322-1.18-.322a2.482 2.482 0 0 0-2.294 1.536 2.325 2.325 0 0 1 4.002.388.75.75 0 0 0 .836.334c.493-.105.46.36 1.203.518v-.133c-.003-.446-.246-.55-.75-.733zm2.024 1.266a.723.723 0 0 0 .347-.638c-.01-2.957-2.41-5.487-5.37-5.487a5.364 5.364 0 0 0-4.487 2.418c-.01-.026-1.522-2.39-1.538-2.418H8.943l3.463 5.423-3.379 5.32h3.54l1.54-2.366 1.568 2.366h3.541l-3.21-5.052a.7.7 0 0 1-.084-.32 2.69 2.69 0 0 1 2.69-2.691h.001c1.488 0 1.736.89 2.057 1.308.634.826 1.9.464 1.9 1.541a.707.707 0 0 0 1.066.596zm.35.133c-.173.372-.56.338-.755.639-.176.271.114.412.114.412s.337.156.538-.311c.104-.231.14-.488.103-.74z"})]}),Se("span",{className:"ml-4 text-xl font-medium",children:" Project Graph "}),Se(Ie,{children:Se(_n,{})})]})}),Se("a",{id:"help",className:" dark:text-sidebar-text-dark mt-3 flex cursor-pointer items-center px-4 text-xs text-gray-500 hover:underline ",href:"https://nx.dev/structure/dependency-graph",rel:"nofollow noreferrer",target:"_blank",children:[Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Analyse and visualize your workspace."]}),t?Se(rn,{focusedProject:t,resetFocus:function(){e.send({type:"unfocusProject"})}}):null,Se(Ie,{children:Se(mn,{start:d.start,end:d.end,resetStart:function(){e.send({type:"clearTraceStart"})},resetEnd:function(){e.send({type:"clearTraceEnd"})}})}),Se(hn,{includePath:a,resetTextFilter:function(){e.send({type:"clearTextFilter"})},textFilter:i,toggleIncludeLibsInPathChange:function(){e.send({type:"setIncludeProjectsByPath",includeProjectsByPath:!a})},updateTextFilter:f}),Se("div",{children:[Se(fn,{hideAllProjects:function(){e.send({type:"deselectAll"})},showAllProjects:function(){e.send({type:"selectAll"})},showAffectedProjects:function(){e.send({type:"selectAffected"})},hasAffectedProjects:o}),Se(an,{groupByFolder:s,groupByFolderChanged:function(t){e.send({type:"setGroupByFolder",groupByFolder:t})}}),Se(dn,{searchDepth:n.searchDepth,searchDepthEnabled:n.searchDepthEnabled,searchDepthFilterEnabledChange:function(t){e.send({type:"setSearchDepthEnabled",searchDepthEnabled:t})},incrementDepthFilter:function(){e.send({type:"incrementSearchDepth"})},decrementDepthFilter:function(){e.send({type:"decrementSearchDepth"})}}),Se(Ie,{children:Se("div",{"data-cy":"experimental-features",className:"bg-purple-200 pb-2",children:[Se("h3",{className:"mt-4 cursor-text px-4 py-2 text-sm font-semibold uppercase tracking-wide text-gray-900 lg:text-xs ",children:"Experimental Features"}),Se(nn,{collapseEdges:l,collapseEdgesChanged:function(t){e.send({type:"setCollapseEdges",collapseEdges:t})}})]})})]}),Se(cn,{})]})};function kn(){const e=Pt(),t=Ft(),n=Le(),a=Nt(Ut),i=Nt(Wt),[o,s]=(0,r.useState)(n.appConfig.defaultProjectGraph);return(0,r.useEffect)((()=>{const{appConfig:r}=n,a=r.projectGraphs.find((e=>e.id===o));(async()=>{const n=await t.getProjectGraph(a.url),r=null==n?void 0:n.layout;e.send({type:"initGraph",projects:n.projects,dependencies:n.dependencies,affectedProjects:n.affected,workspaceLayout:r})})()}),[o,n,e,t]),((e,t,n)=>{const a=(0,r.useRef)((()=>{}));(0,r.useEffect)((()=>{n&&(a.current=e)}),[e,n]),(0,r.useEffect)((()=>{if(n){const e=()=>{a.current()};if(null!==t){let n=setInterval(e,t);return()=>clearInterval(n)}}}),[t,n])})((()=>{const r=n.appConfig.projectGraphs.find((e=>e.id===o));(async()=>{const n=await t.getProjectGraph(r.url);e.send({type:"updateGraph",projects:n.projects,dependencies:n.dependencies})})()}),5e3,n.watch),Se(ke.HY,{children:[Se(En,{}),Se("div",{id:"main-content",className:"dark:bg-graph-dark flex-grow overflow-hidden transition-all",children:[n.appConfig.showDebugger?Se(je,{projectGraphs:n.appConfig.projectGraphs,selectedProjectGraph:o,lastPerfReport:a,projectGraphChange:function(e){s(e)}}):null,i?null:Se("div",{id:"no-projects-chosen",className:"dark:text-graph-text-dark flex text-gray-700",children:[Se("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mr-4 h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11 15l-3-3m0 0l3-3m-3 3h8M3 12a9 9 0 1118 0 9 9 0 01-18 0z"})}),Se("h4",{children:"Please select projects in the sidebar."})]}),Se("div",{id:"graph-container",children:[Se("div",{id:"cytoscape-graph"}),Se(be,{content:"Download Graph as PNG",placement:"right",theme:Ke("dark-nx","nx"),children:Se("button",{type:"button",className:`\n bg-green-nx-base\n fixed\n bottom-4\n right-4\n z-50\n block\n h-16\n w-16\n transform\n rounded-full\n text-white\n shadow-sm\n transition\n duration-300\n ${i?"":"opacity-0"}\n `,"data-cy":"downloadImageButton",onClick:function(){const e=st().getImage();let t=document.createElement("a");t.href=e,t.download="graph.png",t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))},children:Se("svg",{height:"24",width:"24",className:"absolute top-1/2 left-1/2 -mt-3 -ml-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:Se("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})})]})]})]})}var Cn;Xe(null!=(Cn=localStorage.getItem(Ye))?Cn:"system");const Sn=function(){return Se(Rt,{children:Se(kn,{})})};!0===window.useXstateInspect&&function(e){var t=function(e){var t=a(a({},f),e);return a(a({},t),{url:new URL(t.url),iframe:u(t.iframe),devTools:u(t.devTools)})}(e),n=t.iframe,r=t.url,s=t.devTools;if(null!==n){var l,d,h=function(e){void 0===e&&(e=globalThis.__xstate__);var t=new Map,n=e.onRegister((function(e){t.set(e.sessionId,e)}));return(0,i.createMachine)({initial:"pendingConnection",context:{client:void 0},states:{pendingConnection:{},connected:{on:{"service.state":{actions:function(e,t){return e.client.send(t)}},"service.event":{actions:function(e,t){return e.client.send(t)}},"service.register":{actions:function(e,t){return e.client.send(t)}},"service.stop":{actions:function(e,t){return e.client.send(t)}},"xstate.event":{actions:function(e,n){var r=n.event,a=JSON.parse(r),i=t.get(a.origin);null==i||i.send(a)}},unload:{actions:function(e){e.client.send({type:"xstate.disconnect"})}},disconnect:"disconnected"}},disconnected:{entry:function(){n.unsubscribe()},type:"final"}},on:{"xstate.inspecting":{target:".connected",actions:[(0,i.assign)({client:function(e,t){return t.client}}),function(t){e.services.forEach((function(e){var n;null===(n=t.client)||void 0===n||n.send({type:"service.register",machine:c(e.machine),state:c(e.state||e.initialState),sessionId:e.sessionId})}))}]}}})}(s),p=(0,i.interpret)(h).start(),v=new Set,g=p.subscribe((function(e){v.forEach((function(t){return t.next(e)}))})),m=function(e){if("object"==typeof e.data&&null!==e.data&&"type"in e.data){n&&!l&&(l=n.contentWindow),d||(d={send:function(e){l.postMessage(e,r.origin)}});var t=a(a({},e.data),{client:d});p.send(t)}};return window.addEventListener("message",m),window.addEventListener("unload",(function(){p.send({type:"unload"})})),s.onRegister((function(e){var t;p.send({type:"service.register",machine:c(e.machine),state:c(e.state||e.initialState),sessionId:e.sessionId,id:e.id,parent:null===(t=e.parent)||void 0===t?void 0:t.sessionId}),p.send({type:"service.event",event:c((e.state||e.initialState)._event),sessionId:e.sessionId});var n=e.send.bind(e);e.send=function(t,r){return p.send({type:"service.event",event:c((0,o.toSCXMLEvent)((0,o.toEventObject)(t,r))),sessionId:e.sessionId}),n(t,r)},e.subscribe((function(t){void 0!==t&&p.send({type:"service.state",state:c(t),sessionId:e.sessionId})})),e.onStop((function(){p.send({type:"service.stop",sessionId:e.sessionId})}))})),n?(n.addEventListener("load",(function(){l=n.contentWindow})),n.setAttribute("src",String(r))):l=window.open(String(r),"xstateinspector"),{send:function(e){p.send(e)},subscribe:function(e,t,n){var r=(0,o.toObserver)(e,t,n);return v.add(r),r.next(p.state),{unsubscribe:function(){v.delete(r)}}},disconnect:function(){p.send("disconnect"),window.removeEventListener("message",m),g.unsubscribe()}}}console.warn("No suitable <iframe> found to embed the inspector. Please pass an <iframe> element to `inspect(iframe)` or create an <iframe data-xstate></iframe> element.")}({url:"https://stately.ai/viz?inspect",iframe:!1}),r.render(Se(r.StrictMode,{children:Se(Sn,{})}),document.getElementById("app"))},88068:(e,t,n)=>{"use strict";n.r(t),n.d(t,{afterMain:()=>_,afterRead:()=>w,afterWrite:()=>C,applyStyles:()=>z,arrow:()=>K,auto:()=>s,basePlacements:()=>l,beforeMain:()=>b,beforeRead:()=>m,beforeWrite:()=>E,bottom:()=>a,clippingParents:()=>d,computeStyles:()=>ee,createPopper:()=>Oe,createPopperBase:()=>Re,createPopperLite:()=>Pe,detectOverflow:()=>ge,end:()=>c,eventListeners:()=>ne,flip:()=>me,hide:()=>be,left:()=>o,main:()=>x,modifierPhases:()=>S,offset:()=>xe,placements:()=>g,popper:()=>h,popperGenerator:()=>Me,popperOffsets:()=>_e,preventOverflow:()=>Ee,read:()=>y,reference:()=>p,right:()=>i,start:()=>u,top:()=>r,variationPlacements:()=>v,viewport:()=>f,write:()=>k});var r="top",a="bottom",i="right",o="left",s="auto",l=[r,a,i,o],u="start",c="end",d="clippingParents",f="viewport",h="popper",p="reference",v=l.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+c])}),[]),g=[].concat(l,[s]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+c])}),[]),m="beforeRead",y="read",w="afterRead",b="beforeMain",x="main",_="afterMain",E="beforeWrite",k="write",C="afterWrite",S=[m,y,w,b,x,_,E,k,C];function j(e){return e?(e.nodeName||"").toLowerCase():null}function M(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function R(e){return e instanceof M(e).Element||e instanceof Element}function P(e){return e instanceof M(e).HTMLElement||e instanceof HTMLElement}function O(e){return"undefined"!=typeof ShadowRoot&&(e instanceof M(e).ShadowRoot||e instanceof ShadowRoot)}const z={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]||{},a=t.elements[e];P(a)&&j(a)&&(Object.assign(a.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?a.removeAttribute(e):a.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],a=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});P(r)&&j(r)&&(Object.assign(r.style,i),Object.keys(a).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function A(e){return e.split("-")[0]}var T=Math.max,B=Math.min,D=Math.round;function N(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,a=1;if(P(e)&&t){var i=e.offsetHeight,o=e.offsetWidth;o>0&&(r=D(n.width)/o||1),i>0&&(a=D(n.height)/i||1)}return{width:n.width/r,height:n.height/a,top:n.top/a,right:n.right/r,bottom:n.bottom/a,left:n.left/r,x:n.left/r,y:n.top/a}}function L(e){var t=N(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function V(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&O(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function I(e){return M(e).getComputedStyle(e)}function H(e){return["table","td","th"].indexOf(j(e))>=0}function F(e){return((R(e)?e.ownerDocument:e.document)||window.document).documentElement}function G(e){return"html"===j(e)?e:e.assignedSlot||e.parentNode||(O(e)?e.host:null)||F(e)}function Y(e){return P(e)&&"fixed"!==I(e).position?e.offsetParent:null}function q(e){for(var t=M(e),n=Y(e);n&&H(n)&&"static"===I(n).position;)n=Y(n);return n&&("html"===j(n)||"body"===j(n)&&"static"===I(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&P(e)&&"fixed"===I(e).position)return null;var n=G(e);for(O(n)&&(n=n.host);P(n)&&["html","body"].indexOf(j(n))<0;){var r=I(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}function W(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function U(e,t,n){return T(e,B(t,n))}function X(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function $(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const K={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,s=e.name,u=e.options,c=n.elements.arrow,d=n.modifiersData.popperOffsets,f=A(n.placement),h=W(f),p=[o,i].indexOf(f)>=0?"height":"width";if(c&&d){var v=function(e,t){return X("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:$(e,l))}(u.padding,n),g=L(c),m="y"===h?r:o,y="y"===h?a:i,w=n.rects.reference[p]+n.rects.reference[h]-d[h]-n.rects.popper[p],b=d[h]-n.rects.reference[h],x=q(c),_=x?"y"===h?x.clientHeight||0:x.clientWidth||0:0,E=w/2-b/2,k=v[m],C=_-g[p]-v[y],S=_/2-g[p]/2+E,j=U(k,S,C),M=h;n.modifiersData[s]=((t={})[M]=j,t.centerOffset=j-S,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)))&&V(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(e){return e.split("-")[1]}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var t,n=e.popper,s=e.popperRect,l=e.placement,u=e.variation,d=e.offsets,f=e.position,h=e.gpuAcceleration,p=e.adaptive,v=e.roundOffsets,g=e.isFixed,m=d.x,y=void 0===m?0:m,w=d.y,b=void 0===w?0:w,x="function"==typeof v?v({x:y,y:b}):{x:y,y:b};y=x.x,b=x.y;var _=d.hasOwnProperty("x"),E=d.hasOwnProperty("y"),k=o,C=r,S=window;if(p){var j=q(n),R="clientHeight",P="clientWidth";if(j===M(n)&&"static"!==I(j=F(n)).position&&"absolute"===f&&(R="scrollHeight",P="scrollWidth"),j=j,l===r||(l===o||l===i)&&u===c)C=a,b-=(g&&j===S&&S.visualViewport?S.visualViewport.height:j[R])-s.height,b*=h?1:-1;if(l===o||(l===r||l===a)&&u===c)k=i,y-=(g&&j===S&&S.visualViewport?S.visualViewport.width:j[P])-s.width,y*=h?1:-1}var O,z=Object.assign({position:f},p&&Q),A=!0===v?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:D(t*r)/r||0,y:D(n*r)/r||0}}({x:y,y:b}):{x:y,y:b};return y=A.x,b=A.y,h?Object.assign({},z,((O={})[C]=E?"0":"",O[k]=_?"0":"",O.transform=(S.devicePixelRatio||1)<=1?"translate("+y+"px, "+b+"px)":"translate3d("+y+"px, "+b+"px, 0)",O)):Object.assign({},z,((t={})[C]=E?b+"px":"",t[k]=_?y+"px":"",t.transform="",t))}const ee={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=void 0===r||r,i=n.adaptive,o=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:A(t.placement),variation:Z(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,J(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var te={passive:!0};const ne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,i=void 0===a||a,o=r.resize,s=void 0===o||o,l=M(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach((function(e){e.addEventListener("scroll",n.update,te)})),s&&l.addEventListener("resize",n.update,te),function(){i&&u.forEach((function(e){e.removeEventListener("scroll",n.update,te)})),s&&l.removeEventListener("resize",n.update,te)}},data:{}};var re={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return re[e]}))}var ie={start:"end",end:"start"};function oe(e){return e.replace(/start|end/g,(function(e){return ie[e]}))}function se(e){var t=M(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return N(F(e)).left+se(e).scrollLeft}function ue(e){var t=I(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function ce(e){return["html","body","#document"].indexOf(j(e))>=0?e.ownerDocument.body:P(e)&&ue(e)?e:ce(G(e))}function de(e,t){var n;void 0===t&&(t=[]);var r=ce(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),i=M(r),o=a?[i].concat(i.visualViewport||[],ue(r)?r:[]):r,s=t.concat(o);return a?s:s.concat(de(G(o)))}function fe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function he(e,t){return t===f?fe(function(e){var t=M(e),n=F(e),r=t.visualViewport,a=n.clientWidth,i=n.clientHeight,o=0,s=0;return r&&(a=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=r.offsetLeft,s=r.offsetTop)),{width:a,height:i,x:o+le(e),y:s}}(e)):R(t)?function(e){var t=N(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):fe(function(e){var t,n=F(e),r=se(e),a=null==(t=e.ownerDocument)?void 0:t.body,i=T(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=T(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-r.scrollLeft+le(e),l=-r.scrollTop;return"rtl"===I(a||n).direction&&(s+=T(n.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}(F(e)))}function pe(e,t,n){var r="clippingParents"===t?function(e){var t=de(G(e)),n=["absolute","fixed"].indexOf(I(e).position)>=0&&P(e)?q(e):e;return R(n)?t.filter((function(e){return R(e)&&V(e,n)&&"body"!==j(e)})):[]}(e):[].concat(t),a=[].concat(r,[n]),i=a[0],o=a.reduce((function(t,n){var r=he(e,n);return t.top=T(r.top,t.top),t.right=B(r.right,t.right),t.bottom=B(r.bottom,t.bottom),t.left=T(r.left,t.left),t}),he(e,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function ve(e){var t,n=e.reference,s=e.element,l=e.placement,d=l?A(l):null,f=l?Z(l):null,h=n.x+n.width/2-s.width/2,p=n.y+n.height/2-s.height/2;switch(d){case r:t={x:h,y:n.y-s.height};break;case a:t={x:h,y:n.y+n.height};break;case i:t={x:n.x+n.width,y:p};break;case o:t={x:n.x-s.width,y:p};break;default:t={x:n.x,y:n.y}}var v=d?W(d):null;if(null!=v){var g="y"===v?"height":"width";switch(f){case u:t[v]=t[v]-(n[g]/2-s[g]/2);break;case c:t[v]=t[v]+(n[g]/2-s[g]/2)}}return t}function ge(e,t){void 0===t&&(t={});var n=t,o=n.placement,s=void 0===o?e.placement:o,u=n.boundary,c=void 0===u?d:u,v=n.rootBoundary,g=void 0===v?f:v,m=n.elementContext,y=void 0===m?h:m,w=n.altBoundary,b=void 0!==w&&w,x=n.padding,_=void 0===x?0:x,E=X("number"!=typeof _?_:$(_,l)),k=y===h?p:h,C=e.rects.popper,S=e.elements[b?k:y],j=pe(R(S)?S:S.contextElement||F(e.elements.popper),c,g),M=N(e.elements.reference),P=ve({reference:M,element:C,strategy:"absolute",placement:s}),O=fe(Object.assign({},C,P)),z=y===h?O:M,A={top:j.top-z.top+E.top,bottom:z.bottom-j.bottom+E.bottom,left:j.left-z.left+E.left,right:z.right-j.right+E.right},T=e.modifiersData.offset;if(y===h&&T){var B=T[s];Object.keys(A).forEach((function(e){var t=[i,a].indexOf(e)>=0?1:-1,n=[r,a].indexOf(e)>=0?"y":"x";A[e]+=B[n]*t}))}return A}const me={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,c=e.name;if(!t.modifiersData[c]._skip){for(var d=n.mainAxis,f=void 0===d||d,h=n.altAxis,p=void 0===h||h,m=n.fallbackPlacements,y=n.padding,w=n.boundary,b=n.rootBoundary,x=n.altBoundary,_=n.flipVariations,E=void 0===_||_,k=n.allowedAutoPlacements,C=t.options.placement,S=A(C),j=m||(S===C||!E?[ae(C)]:function(e){if(A(e)===s)return[];var t=ae(e);return[oe(e),t,oe(t)]}(C)),M=[C].concat(j).reduce((function(e,n){return e.concat(A(n)===s?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=n.boundary,i=n.rootBoundary,o=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?g:u,d=Z(r),f=d?s?v:v.filter((function(e){return Z(e)===d})):l,h=f.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=f);var p=h.reduce((function(t,n){return t[n]=ge(e,{placement:n,boundary:a,rootBoundary:i,padding:o})[A(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:w,rootBoundary:b,padding:y,flipVariations:E,allowedAutoPlacements:k}):n)}),[]),R=t.rects.reference,P=t.rects.popper,O=new Map,z=!0,T=M[0],B=0;B<M.length;B++){var D=M[B],N=A(D),L=Z(D)===u,V=[r,a].indexOf(N)>=0,I=V?"width":"height",H=ge(t,{placement:D,boundary:w,rootBoundary:b,altBoundary:x,padding:y}),F=V?L?i:o:L?a:r;R[I]>P[I]&&(F=ae(F));var G=ae(F),Y=[];if(f&&Y.push(H[N]<=0),p&&Y.push(H[F]<=0,H[G]<=0),Y.every((function(e){return e}))){T=D,z=!1;break}O.set(D,Y)}if(z)for(var q=function(e){var t=M.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return T=t,"break"},W=E?3:1;W>0;W--){if("break"===q(W))break}t.placement!==T&&(t.modifiersData[c]._skip=!0,t.placement=T,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ye(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 we(e){return[r,i,a,o].some((function(t){return e[t]>=0}))}const be={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=ge(t,{elementContext:"reference"}),s=ge(t,{altBoundary:!0}),l=ye(o,r),u=ye(s,a,i),c=we(l),d=we(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};const xe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,a=e.name,s=n.offset,l=void 0===s?[0,0]:s,u=g.reduce((function(e,n){return e[n]=function(e,t,n){var a=A(e),s=[o,r].indexOf(a)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=l[0],c=l[1];return u=u||0,c=(c||0)*s,[o,i].indexOf(a)>=0?{x:c,y:u}:{x:u,y:c}}(n,t.rects,l),e}),{}),c=u[t.placement],d=c.x,f=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=f),t.modifiersData[a]=u}};const _e={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ve({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const Ee={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,s=e.name,l=n.mainAxis,c=void 0===l||l,d=n.altAxis,f=void 0!==d&&d,h=n.boundary,p=n.rootBoundary,v=n.altBoundary,g=n.padding,m=n.tether,y=void 0===m||m,w=n.tetherOffset,b=void 0===w?0:w,x=ge(t,{boundary:h,rootBoundary:p,padding:g,altBoundary:v}),_=A(t.placement),E=Z(t.placement),k=!E,C=W(_),S="x"===C?"y":"x",j=t.modifiersData.popperOffsets,M=t.rects.reference,R=t.rects.popper,P="function"==typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,O="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),z=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(j){if(c){var N,V="y"===C?r:o,I="y"===C?a:i,H="y"===C?"height":"width",F=j[C],G=F+x[V],Y=F-x[I],X=y?-R[H]/2:0,$=E===u?M[H]:R[H],K=E===u?-R[H]:-M[H],Q=t.elements.arrow,J=y&&Q?L(Q):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[V],ne=ee[I],re=U(0,M[H],J[H]),ae=k?M[H]/2-X-re-te-O.mainAxis:$-re-te-O.mainAxis,ie=k?-M[H]/2+X+re+ne+O.mainAxis:K+re+ne+O.mainAxis,oe=t.elements.arrow&&q(t.elements.arrow),se=oe?"y"===C?oe.clientTop||0:oe.clientLeft||0:0,le=null!=(N=null==z?void 0:z[C])?N:0,ue=F+ie-le,ce=U(y?B(G,F+ae-le-se):G,F,y?T(Y,ue):Y);j[C]=ce,D[C]=ce-F}if(f){var de,fe="x"===C?r:o,he="x"===C?a:i,pe=j[S],ve="y"===S?"height":"width",me=pe+x[fe],ye=pe-x[he],we=-1!==[r,o].indexOf(_),be=null!=(de=null==z?void 0:z[S])?de:0,xe=we?me:pe-M[ve]-R[ve]-be+O.altAxis,_e=we?pe+M[ve]+R[ve]-be-O.altAxis:ye,Ee=y&&we?function(e,t,n){var r=U(e,t,n);return r>n?n:r}(xe,pe,_e):U(y?xe:me,pe,y?_e:ye);j[S]=Ee,D[S]=Ee-pe}t.modifiersData[s]=D}},requiresIfExists:["offset"]};function ke(e,t,n){void 0===n&&(n=!1);var r,a,i=P(t),o=P(t)&&function(e){var t=e.getBoundingClientRect(),n=D(t.width)/e.offsetWidth||1,r=D(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=F(t),l=N(e,o),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(i||!i&&!n)&&(("body"!==j(t)||ue(s))&&(u=(r=t)!==M(r)&&P(r)?{scrollLeft:(a=r).scrollLeft,scrollTop:a.scrollTop}:se(r)),P(t)?((c=N(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=le(s))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function Ce(e){var t=new Map,n=new Set,r=[];function a(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&a(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||a(e)})),r}var Se={placement:"bottom",modifiers:[],strategy:"absolute"};function je(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Me(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,a=t.defaultOptions,i=void 0===a?Se:a;return function(e,t,n){void 0===n&&(n=i);var a,o,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Se,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:s,setOptions:function(n){var a="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},i,s.options,a),s.scrollParents={reference:R(e)?de(e):e.contextElement?de(e.contextElement):[],popper:de(t)};var o=function(e){var t=Ce(e);return S.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.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}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=o.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,a=e.effect;if("function"==typeof a){var i=a({state:s,name:t,instance:c,options:r}),o=function(){};l.push(i||o)}})),c.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(je(t,n)){s.rects={reference:ke(t,q(n),"fixed"===s.options.strategy),popper:L(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var a=s.orderedModifiers[r],i=a.fn,o=a.options,l=void 0===o?{}:o,d=a.name;"function"==typeof i&&(s=i({state:s,options:l,name:d,instance:c})||s)}else s.reset=!1,r=-1}}},update:(a=function(){return new Promise((function(e){c.forceUpdate(),e(s)}))},function(){return o||(o=new Promise((function(e){Promise.resolve().then((function(){o=void 0,e(a())}))}))),o}),destroy:function(){d(),u=!0}};if(!je(e,t))return c;function d(){l.forEach((function(e){return e()})),l=[]}return c.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var Re=Me(),Pe=Me({defaultModifiers:[ne,_e,ee,z]}),Oe=Me({defaultModifiers:[ne,_e,ee,z,xe,me,Ee,K,be]})},36021:(e,t,n)=>{"use strict";t.f0=void 0;var r=n(78376),a=n(15729);function i(e){return r.assign((function(t,n,r){return a.produce(t,(function(t){e(t,n,r)}))}))}t.f0=i},81368:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,(function(t){return e[t]}).bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){var r=n(1),a=function(e){e&&e("layout","dagre",r)};"undefined"!=typeof cytoscape&&a(cytoscape),e.exports=a},function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var a=n(2),i=n(3),o=n(4);function s(e){this.options=i({},a,e)}s.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,a=function(e,t){return"function"==typeof t?t.apply(e,[e]):t},i=e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()};void 0===i.x2&&(i.x2=i.x1+i.w),void 0===i.w&&(i.w=i.x2-i.x1),void 0===i.y2&&(i.y2=i.y1+i.h),void 0===i.h&&(i.h=i.y2-i.y1);var s=new o.graphlib.Graph({multigraph:!0,compound:!0}),l={},u=function(e,t){null!=t&&(l[e]=t)};u("nodesep",e.nodeSep),u("edgesep",e.edgeSep),u("ranksep",e.rankSep),u("rankdir",e.rankDir),u("align",e.align),u("ranker",e.ranker),u("acyclicer",e.acyclicer),s.setGraph(l),s.setDefaultEdgeLabel((function(){return{}})),s.setDefaultNodeLabel((function(){return{}}));for(var c=n.nodes(),d=0;d<c.length;d++){var f=c[d],h=f.layoutDimensions(e);s.setNode(f.id(),{width:h.w,height:h.h,name:f.id()})}for(var p=0;p<c.length;p++){var v=c[p];v.isChild()&&s.setParent(v.id(),v.parent().id())}for(var g=n.edges().stdFilter((function(e){return!e.source().isParent()&&!e.target().isParent()})),m=0;m<g.length;m++){var y=g[m];s.setEdge(y.source().id(),y.target().id(),{minlen:a(y,e.minLen),weight:a(y,e.edgeWeight),name:y.id()},y.id())}o.layout(s);for(var w,b=s.nodes(),x=0;x<b.length;x++){var _=b[x],E=s.node(_);t.getElementById(_).scratch().dagre=E}return e.boundingBox?(w={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},c.forEach((function(e){var t=e.scratch().dagre;w.x1=Math.min(w.x1,t.x),w.x2=Math.max(w.x2,t.x),w.y1=Math.min(w.y1,t.y),w.y2=Math.max(w.y2,t.y)})),w.w=w.x2-w.x1,w.h=w.y2-w.y1):w=i,c.layoutPositions(this,e,(function(t){var n=(t="object"===r(t)?t:this).scratch().dagre;return function(t){if(e.boundingBox){var n=0===w.w?0:(t.x-w.x1)/w.w,r=0===w.h?0:(t.y-w.y1)/w.h;return{x:i.x1+n*i.w,y:i.y1+r*i.h}}return t}({x:n.x,y:n.y})})),this},e.exports=s},function(e,t){var n={nodeSep:void 0,edgeSep:void 0,rankSep:void 0,rankDir:void 0,align:void 0,ranker:void 0,minLen:function(e){return 1},edgeWeight:function(e){return 1},fit:!0,padding:30,spacingFactor:void 0,nodeDimensionsIncludeLabels:!1,animate:!1,animateFilter:function(e,t){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(e,t){return t},ready:function(){},stop:function(){}};e.exports=n},function(e,t){e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){Object.keys(t).forEach((function(n){return e[n]=t[n]}))})),e}},function(t,n){t.exports=e}])},e.exports=r(n(46506))},10404:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){null!=t&&Object.keys(t).forEach((function(n){return e[n]=t[n]}))})),e}},function(e,t,n){"use strict";var r=n(5).getBoundingBox;e.exports={getRef:function(e,t){return{getBoundingClientRect:function(){return r(e,t)}}}}},function(e,t,n){"use strict";var r=n(0),a=n(1).getRef,i=n(6).getContent,o={},s=n(8).createPopper;e.exports={getPopper:function(e,t){var n=a(e,t),l=i(e,t.content),u=r({},o,t.popper);return s(n,l,u)}}},function(e,t,n){"use strict";var r=n(0),a=n(2).getPopper,i=n(1).getRef;function o(e,t){var n=function(e){return e.isNode()?{w:e.renderedWidth(),h:e.renderedHeight()}:{w:3,h:3}},a=e.cy(),i={renderedDimensions:n,renderedPosition:function(e){return e.isNode()?function(e,t){var n=e.renderedPosition(),r=t(e),a=r.w/2,i=r.h/2;return{x:n.x-a,y:n.y-i}}(e,n):function(e){var t=e.midpoint(),n=e.cy().pan(),r=e.cy().zoom();return{x:t.x*r+n.x,y:t.y*r+n.y}}(e)},popper:{},cy:a};return r({},i,t)}function s(e){e.length>1&&(console.warn("Popper.js Extension should only be used on one element."),console.warn("Ignoring all subsequent elements"))}e.exports={popper:function(e){return s(this),a(this[0],o(this[0],e))},popperRef:function(e){return s(this),i(this[0],o(this[0],e))}}},function(e,t,n){"use strict";var r=n(0),a=n(2).getPopper,i=n(1).getRef;function o(e,t){return r({},{boundingBox:{top:0,left:0,right:0,bottom:0,w:3,h:3},renderedDimensions:function(){return{w:3,h:3}},renderedPosition:function(){return{x:0,y:0}},popper:{},cy:e},t)}e.exports={popper:function(e){return a(this,o(this,e))},popperRef:function(e){return i(this,o(this,e))}}},function(e,t,n){"use strict";e.exports={getBoundingBox:function(e,t){var n=t.renderedPosition,r=t.cy,a=t.renderedDimensions,i=r.container().getBoundingClientRect(),o=a(e),s=n(e);return{top:s.y+i.top,left:s.x+i.left,right:s.x+o.w+i.left,bottom:s.y+o.h+i.top,width:o.w,height:o.h}}}},function(e,t,n){"use strict";e.exports={getContent:function(e,t){var n=null;if("function"!=typeof t){if(t instanceof HTMLElement)return t;throw new Error("Can not create popper from 'target' with unknown type")}if(null===(n=t(e)))throw new Error("No 'target' specified to create popper");return n}}},function(e,t,n){"use strict";var r=n(4),a=n(3),i=function(e){e&&(e("core","popper",r.popper),e("collection","popper",a.popper),e("core","popperRef",r.popperRef),e("collection","popperRef",a.popperRef))};"undefined"!=typeof cytoscape&&i(cytoscape),e.exports=i},function(t,n){t.exports=e}])},e.exports=r(n(88068))},93218:(e,t,n)=>{"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var a=r(n(80594)),i=r(n(71254)),o=r(n(77485)),s=r(n(880)),l=r(n(85884));function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(l){a=!0,i=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var v="undefined"==typeof window?null:window,g=v?v.navigator:null,m=(v&&v.document,u("")),y=u({}),w=u((function(){})),b="undefined"==typeof HTMLElement?"undefined":u(HTMLElement),x=function(e){return e&&e.instanceString&&E(e.instanceString)?e.instanceString():null},_=function(e){return null!=e&&u(e)==m},E=function(e){return null!=e&&u(e)===w},k=function(e){return!M(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},C=function(e){return null!=e&&u(e)===y&&!k(e)&&e.constructor===Object},S=function(e){return null!=e&&u(e)===u(1)&&!isNaN(e)},j=function(e){return"undefined"===b?void 0:null!=e&&e instanceof HTMLElement},M=function(e){return R(e)||P(e)},R=function(e){return"collection"===x(e)&&e._private.single},P=function(e){return"collection"===x(e)&&!e._private.single},O=function(e){return"core"===x(e)},z=function(e){return"stylesheet"===x(e)},A=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},T=function(e){return function(e){return null!=e&&u(e)===y}(e)&&E(e.then)},B=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")});var n=function n(){var r,a=this,i=arguments,o=t.apply(a,i),s=n.cache;return(r=s[o])||(r=s[o]=e.apply(a,i)),r};return n.cache={},n},D=B((function(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))})),N=B((function(e){return e.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}))})),L=B((function(e,t){return e+t[0].toUpperCase()+t.substring(1)}),(function(e,t){return e+"$"+t})),V=function(e){return A(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},I="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",H=function(e,t){return e<t?-1:e>t?1:0},F=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(null!=r)for(var a=Object.keys(r),i=0;i<a.length;i++){var o=a[i];e[o]=r[o]}}return e},G=function(e){return(k(e)?e:null)||function(e){return Y[e.toLowerCase()]}(e)||function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t,n,r,a=16;return 4===e.length?(t=parseInt(e[1]+e[1],a),n=parseInt(e[2]+e[2],a),r=parseInt(e[3]+e[3],a)):(t=parseInt(e[1]+e[2],a),n=parseInt(e[3]+e[4],a),r=parseInt(e[5]+e[6],a)),[t,n,r]}}(e)||function(e){var t,n=new RegExp("^rgb[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(n){t=[];for(var r=[],a=1;a<=3;a++){var i=n[a];if("%"===i[i.length-1]&&(r[a]=!0),i=parseFloat(i),r[a]&&(i=i/100*255),i<0||i>255)return;t.push(Math.floor(i))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(e)||function(e){var t,n,r,a,i,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(a=parseFloat(c[3]))<0||a>100)return;if(a/=100,void 0!==(i=c[4])&&((i=parseFloat(i))<0||i>1))return;if(0===r)o=s=l=Math.round(255*a);else{var d=a<.5?a*(1+r):a+r-a*r,f=2*a-d;o=Math.round(255*u(f,d,n+1/3)),s=Math.round(255*u(f,d,n)),l=Math.round(255*u(f,d,n-1/3))}t=[o,s,l,i]}return t}(e)},Y={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},q=function(e){for(var t=e.map,n=e.keys,r=n.length,a=0;a<r;a++){var i=n[a];if(C(i))throw Error("Tried to set map with object key");a<n.length-1?(null==t[i]&&(t[i]={}),t=t[i]):t[i]=e.value}},W=function(e){for(var t=e.map,n=e.keys,r=n.length,a=0;a<r;a++){var i=n[a];if(C(i))throw Error("Tried to get map with object key");if(null==(t=t[i]))return t}return t},U=v?v.performance:null,X=U&&U.now?function(){return U.now()}:function(){return Date.now()},$=function(){if(v){if(v.requestAnimationFrame)return function(e){v.requestAnimationFrame(e)};if(v.mozRequestAnimationFrame)return function(e){v.mozRequestAnimationFrame(e)};if(v.webkitRequestAnimationFrame)return function(e){v.webkitRequestAnimationFrame(e)};if(v.msRequestAnimationFrame)return function(e){v.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(X())}),1e3/60)}}(),K=function(e){return $(e)},Z=X,Q=9261,J=65599,ee=5381,te=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q,r=n;!(t=e.next()).done;)r=r*J+t.value|0;return r},ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q;return t*J+e|0},re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;return(t<<5)+t+e|0},ae=function(e){return 2097152*e[0]+e[1]},ie=function(e,t){return[ne(e[0],t[0]),re(e[1],t[1])]},oe=function(e,t){var n={value:0,done:!1},r=0,a=e.length;return te({next:function(){return r<a?n.value=e.charCodeAt(r++):n.done=!0,n}},t)},se=function(){return le(arguments)},le=function(e){for(var t,n=0;n<e.length;n++){var r=e[n];t=0===n?oe(r):oe(r,t)}return t},ue=!0,ce=null!=console.warn,de=null!=console.trace,fe=Number.MAX_SAFE_INTEGER||9007199254740991,he=function(){return!0},pe=function(){return!1},ve=function(){return 0},ge=function(){},me=function(e){throw new Error(e)},ye=function(e){if(void 0===e)return ue;ue=!!e},we=function(e){ye()&&(ce?console.warn(e):(console.log(e),de&&console.trace()))},be=function(e){return null==e?e:k(e)?e.slice():C(e)?function(e){return F({},e)}(e):e},xe=function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t},_e={},Ee=function(){return _e},ke=function(e){var t=Object.keys(e);return function(n){for(var r={},a=0;a<t.length;a++){var i=t[a],o=null==n?void 0:n[i];r[i]=void 0===o?e[i]:o}return r}},Ce=function(e,t,n){for(var r=e.length-1;r>=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},Se=function(e){e.splice(0,e.length)},je=function(e,t,n){return n&&(t=L(n,t)),e[t]},Me=function(e,t,n,r){n&&(t=L(n,t)),e[t]=r},Re="undefined"!=typeof Map?Map:function(){function e(){c(this,e),this._obj={}}return f(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),Pe=function(){function e(t){if(c(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r<n.length;r++)this.add(n[r])}}return f(e,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(e){var t=this._obj;1!==t[e]&&(t[e]=1,this.size++)}},{key:"delete",value:function(e){var t=this._obj;1===t[e]&&(t[e]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(e){return 1===this._obj[e]}},{key:"toArray",value:function(){var e=this;return Object.keys(this._obj).filter((function(t){return e.has(t)}))}},{key:"forEach",value:function(e,t){return this.toArray().forEach(e,t)}}]),e}(),Oe="undefined"!==("undefined"==typeof Set?"undefined":u(Set))?Set:Pe,ze=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&O(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new Oe,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition){var i=t.renderedPosition,o=e.pan(),s=e.zoom();a.position={x:(i.x-o.x)/s,y:(i.y-o.y)/s}}var l=[];k(t.classes)?l=t.classes:_(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;u<c;u++){var d=l[u];d&&""!==d&&a.classes.add(d)}this.createEmitter();var f=t.style||t.css;f&&(we("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(f)),(void 0===n||n)&&this.restore()}else me("An element must be of type `nodes` or `edges`; you specified `"+r+"`")}else me("An element must have a core reference and parameters set")},Ae=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(t,n,r){var a;C(t)&&!M(t)&&(t=(a=t).roots||a.root,n=a.visit,r=a.directed),r=2!==arguments.length||E(n)?r:n,n=E(n)?n:function(){};for(var i,o=this._private.cy,s=t=_(t)?this.filter(t):t,l=[],u=[],c={},d={},f={},h=0,p=this.byGroup(),v=p.nodes,g=p.edges,m=0;m<s.length;m++){var y=s[m],w=y.id();y.isNode()&&(l.unshift(y),e.bfs&&(f[w]=!0,u.push(y)),d[w]=0)}var b=function(){var t=e.bfs?l.shift():l.pop(),a=t.id();if(e.dfs){if(f[a])return"continue";f[a]=!0,u.push(t)}var o,s=d[a],p=c[a],m=null!=p?p.source():null,y=null!=p?p.target():null,w=null==p?void 0:t.same(m)?y[0]:m[0];if(!0===(o=n(t,p,w,h++,s)))return i=t,"break";if(!1===o)return"break";for(var b=t.connectedEdges().filter((function(e){return(!r||e.source().same(t))&&g.has(e)})),x=0;x<b.length;x++){var _=b[x],E=_.connectedNodes().filter((function(e){return!e.same(t)&&v.has(e)})),k=E.id();0===E.length||f[k]||(E=E[0],l.push(E),e.bfs&&(f[k]=!0,u.push(E)),c[k]=_,d[k]=d[a]+1)}};e:for(;0!==l.length;){var x=b();switch(x){case"continue":continue;case"break":break e}}for(var k=o.collection(),S=0;S<u.length;S++){var j=u[S],R=c[j.id()];null!=R&&k.push(R),k.push(j)}return{path:o.collection(k),found:o.collection(i)}}},Te={breadthFirstSearch:Ae({bfs:!0}),depthFirstSearch:Ae({dfs:!0})};Te.bfs=Te.breadthFirstSearch,Te.dfs=Te.depthFirstSearch;var Be=ke({root:null,weight:function(e){return 1},directed:!1}),De={dijkstra:function(e){if(!C(e)){var t=arguments;e={root:t[0],weight:t[1],directed:t[2]}}var n=Be(e),r=n.root,a=n.weight,o=n.directed,s=this,l=a,u=_(r)?this.filter(r)[0]:r[0],c={},d={},f={},h=this.byGroup(),p=h.nodes,v=h.edges;v.unmergeBy((function(e){return e.isLoop()}));for(var g=function(e){return c[e.id()]},m=function(e,t){c[e.id()]=t,y.updateItem(e)},y=new i((function(e,t){return g(e)-g(t)})),w=0;w<p.length;w++){var b=p[w];c[b.id()]=b.same(u)?0:1/0,y.push(b)}for(var x=function(e,t){for(var n,r=(o?e.edgesTo(t):e.edgesWith(t)).intersect(v),a=1/0,i=0;i<r.length;i++){var s=r[i],u=l(s);(u<a||!n)&&(a=u,n=s)}return{edge:n,dist:a}};y.size()>0;){var E=y.pop(),k=g(E),S=E.id();if(f[S]=k,k!==1/0)for(var j=E.neighborhood().intersect(p),M=0;M<j.length;M++){var R=j[M],P=R.id(),O=x(E,R),z=k+O.dist;z<g(R)&&(m(R,z),d[P]={node:E,edge:O.edge})}}return{distanceTo:function(e){var t=_(e)?p.filter(e)[0]:e[0];return f[t.id()]},pathTo:function(e){var t=_(e)?p.filter(e)[0]:e[0],n=[],r=t,a=r.id();if(t.length>0)for(n.unshift(t);d[a];){var i=d[a];n.unshift(i.edge),n.unshift(i.node),a=(r=i.node).id()}return s.spawn(n)}}}},Ne={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,a=n.length,i=new Array(a),o=n,s=function(e){for(var t=0;t<i.length;t++){if(i[t].has(e))return t}},l=0;l<a;l++)i[l]=this.spawn(n[l]);for(var u=r.sort((function(t,n){return e(t)-e(n)})),c=0;c<u.length;c++){var d=u[c],f=d.source()[0],h=d.target()[0],p=s(f),v=s(h),g=i[p],m=i[v];p!==v&&(o.merge(d),g.merge(m),i.splice(v,1))}return o}},Le=ke({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),Ve={aStar:function(e){var t=this.cy(),n=Le(e),r=n.root,a=n.goal,o=n.heuristic,s=n.directed,l=n.weight;r=t.collection(r)[0],a=t.collection(a)[0];var u,c,d=r.id(),f=a.id(),h={},p={},v={},g=new i((function(e,t){return p[e.id()]-p[t.id()]})),m=new Oe,y={},w={},b=function(e,t){g.push(e),m.add(t)};b(r,d),h[d]=0,p[d]=o(r);for(var x,_=0;g.size()>0;){if(u=g.pop(),c=u.id(),m.delete(c),_++,c===f){for(var E=[],k=a,C=f,S=w[C];E.unshift(k),null!=S&&E.unshift(S),null!=(k=y[C]);)S=w[C=k.id()];return{found:!0,distance:h[c],path:this.spawn(E),steps:_}}v[c]=!0;for(var j=u._private.edges,M=0;M<j.length;M++){var R=j[M];if(this.hasElementWithId(R.id())&&(!s||R.data("source")===c)){var P=R.source(),O=R.target(),z=P.id()!==c?P:O,A=z.id();if(this.hasElementWithId(A)&&!v[A]){var T=h[c]+l(R);x=A,m.has(x)?T<h[A]&&(h[A]=T,p[A]=T+o(z),y[A]=u,w[A]=R):(h[A]=T,p[A]=T+o(z),b(z,A),y[A]=u,w[A]=R)}}}}return{found:!1,distance:void 0,path:void 0,steps:_}}},Ie=ke({weight:function(e){return 1},directed:!1}),He={floydWarshall:function(e){for(var t=this.cy(),n=Ie(e),r=n.weight,a=n.directed,i=r,o=this.byGroup(),s=o.nodes,l=o.edges,u=s.length,c=u*u,d=function(e){return s.indexOf(e)},f=function(e){return s[e]},h=new Array(c),p=0;p<c;p++){var v=p%u,g=(p-v)/u;h[p]=g===v?0:1/0}for(var m=new Array(c),y=new Array(c),w=0;w<l.length;w++){var b=l[w],x=b.source()[0],E=b.target()[0];if(x!==E){var k=d(x),C=d(E),S=k*u+C,j=i(b);if(h[S]>j&&(h[S]=j,m[S]=C,y[S]=b),!a){var M=C*u+k;!a&&h[M]>j&&(h[M]=j,m[M]=k,y[M]=b)}}}for(var R=0;R<u;R++)for(var P=0;P<u;P++)for(var O=P*u+R,z=0;z<u;z++){var A=P*u+z,T=R*u+z;h[O]+h[T]<h[A]&&(h[A]=h[O]+h[T],m[A]=m[O])}var B=function(e){return d(function(e){return(_(e)?t.filter(e):e)[0]}(e))},D={distance:function(e,t){var n=B(e),r=B(t);return h[n*u+r]},path:function(e,n){var r=B(e),a=B(n),i=f(r);if(r===a)return i.collection();if(null==m[r*u+a])return t.collection();var o,s=t.collection(),l=r;for(s.merge(i);r!==a;)l=r,r=m[r*u+a],o=y[l*u+r],s.merge(o),s.merge(f(r));return s}};return D}},Fe=ke({weight:function(e){return 1},directed:!1,root:null}),Ge={bellmanFord:function(e){var t=this,n=Fe(e),r=n.weight,a=n.directed,i=n.root,o=r,s=this,l=this.cy(),u=this.byGroup(),c=u.edges,d=u.nodes,f=d.length,h=new Re,p=!1,v=[];i=l.collection(i)[0],c.unmergeBy((function(e){return e.isLoop()}));for(var g=c.length,m=function(e){var t=h.get(e.id());return t||(t={},h.set(e.id(),t)),t},y=function(e){return(_(e)?l.$(e):e)[0]},w=0;w<f;w++){var b=d[w],x=m(b);b.same(i)?x.dist=0:x.dist=1/0,x.pred=null,x.edge=null}for(var E=!1,k=function(e,t,n,r,a,i){var o=r.dist+i;o<a.dist&&!n.same(r.edge)&&(a.dist=o,a.pred=e,a.edge=n,E=!0)},C=1;C<f;C++){E=!1;for(var S=0;S<g;S++){var j=c[S],M=j.source(),R=j.target(),P=o(j),O=m(M),z=m(R);k(M,0,j,O,z,P),a||k(R,0,j,z,O,P)}if(!E)break}if(E)for(var A=[],T=0;T<g;T++){var B=c[T],D=B.source(),N=B.target(),L=o(B),V=m(D).dist,I=m(N).dist;if(V+L<I||!a&&I+L<V){if(p||(we("Graph contains a negative weight cycle for Bellman-Ford"),p=!0),!1===e.findNegativeWeightCycles)break;var H=[];V+L<I&&H.push(D),!a&&I+L<V&&H.push(N);for(var F=H.length,G=0;G<F;G++){var Y=H[G],q=[Y];q.push(m(Y).edge);for(var W=m(Y).pred;-1===q.indexOf(W);)q.push(W),q.push(m(W).edge),W=m(W).pred;for(var U=(q=q.slice(q.indexOf(W)))[0].id(),X=0,$=2;$<q.length;$+=2)q[$].id()<U&&(U=q[$].id(),X=$);(q=q.slice(X).concat(q.slice(0,X))).push(q[0]);var K=q.map((function(e){return e.id()})).join(",");-1===A.indexOf(K)&&(v.push(s.spawn(q)),A.push(K))}}}return{distanceTo:function(e){return m(y(e)).dist},pathTo:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,r=y(e),a=[],o=r;;){if(null==o)return t.spawn();var l=m(o),u=l.edge,c=l.pred;if(a.unshift(o[0]),o.same(n)&&a.length>0)break;null!=u&&a.unshift(u),o=c}return s.spawn(a)},hasNegativeWeightCycle:p,negativeWeightCycles:v}}},Ye=Math.sqrt(2),qe=function(e,t,n){0===n.length&&me("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],a=r[1],i=r[2],o=t[a],s=t[i],l=n,u=l.length-1;u>=0;u--){var c=l[u],d=c[1],f=c[2];(t[d]===o&&t[f]===s||t[d]===s&&t[f]===o)&&l.splice(u,1)}for(var h=0;h<l.length;h++){var p=l[h];p[1]===s?(l[h]=p.slice(),l[h][1]=o):p[2]===s&&(l[h]=p.slice(),l[h][2]=o)}for(var v=0;v<t.length;v++)t[v]===s&&(t[v]=o);return l},We=function(e,t,n,r){for(;n>r;){var a=Math.floor(Math.random()*t.length);t=qe(a,e,t),n--}return t},Ue={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var a=n.length,i=r.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),s=Math.floor(a/Ye);if(!(a<2)){for(var l=[],u=0;u<i;u++){var c=r[u];l.push([u,n.indexOf(c.source()),n.indexOf(c.target())])}for(var d=1/0,f=[],h=new Array(a),p=new Array(a),v=new Array(a),g=function(e,t){for(var n=0;n<a;n++)t[n]=e[n]},m=0;m<=o;m++){for(var y=0;y<a;y++)p[y]=y;var w=We(p,l.slice(),a,s),b=w.slice();g(p,v);var x=We(p,w,s,2),_=We(v,b,s,2);x.length<=_.length&&x.length<d?(d=x.length,f=x,g(p,h)):_.length<=x.length&&_.length<d&&(d=_.length,f=_,g(v,h))}for(var E=this.spawn(f.map((function(e){return r[e[0]]}))),k=this.spawn(),C=this.spawn(),S=h[0],j=0;j<h.length;j++){var M=h[j],R=n[j];M===S?k.merge(R):C.merge(R)}var P=function(t){var n=e.spawn();return t.forEach((function(t){n.merge(t),t.connectedEdges().forEach((function(t){e.contains(t)&&!E.contains(t)&&n.merge(t)}))})),n},O=[P(k),P(C)];return{cut:E,components:O,partition1:k,partition2:C}}me("At least 2 nodes are required for Karger-Stein algorithm")}},Xe=function(e,t,n){return{x:e.x*t+n.x,y:e.y*t+n.y}},$e=function(e,t,n){return{x:(e.x-n.x)/t,y:(e.y-n.y)/t}},Ke=function(e){return{x:e[0],y:e[1]}},Ze=function(e,t){return Math.atan2(t,e)-Math.PI/2},Qe=Math.log2||function(e){return Math.log(e)/Math.log(2)},Je=function(e){return e>0?1:e<0?-1:0},et=function(e,t){return Math.sqrt(tt(e,t))},tt=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},nt=function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r];for(var a=0;a<t;a++)e[a]=e[a]/n;return e},rt=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},at=function(e,t,n,r){return{x:rt(e.x,t.x,n.x,r),y:rt(e.y,t.y,n.y,r)}},it=function(e,t,n){return Math.max(e,Math.min(n,t))},ot=function(e){if(null==e)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=e.x1&&null!=e.y1){if(null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},st=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ut=function(e){var t,n,r,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===i.length)t=n=r=a=i[0];else if(2===i.length)t=r=i[0],a=n=i[1];else if(4===i.length){var o=p(i,4);t=o[0],n=o[1],r=o[2],a=o[3]}return e.x1-=a,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ct=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},dt=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2<t.x1)&&(!(t.x2<e.x1)&&(!(e.y2<t.y1)&&(!(t.y2<e.y1)&&(!(e.y1>t.y2)&&!(t.y1>e.y2)))))))},ft=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},ht=function(e,t){return ft(e,t.x1,t.y1)&&ft(e,t.x2,t.y2)},pt=function(e,t,n,r,a,i,o){var s,l=zt(a,i),u=a/2,c=i/2,d=r-c-o;if((s=St(e,t,n,r,n-u+l-o,d,n+u-l+o,d,!1)).length>0)return s;var f=n+u+o;if((s=St(e,t,n,r,f,r-c+l-o,f,r+c-l+o,!1)).length>0)return s;var h=r+c+o;if((s=St(e,t,n,r,n-u+l-o,h,n+u-l+o,h,!1)).length>0)return s;var p,v=n-u-o;if((s=St(e,t,n,r,v,r-c+l-o,v,r+c-l+o,!1)).length>0)return s;var g=n-u+l,m=r-c+l;if((p=kt(e,t,n,r,g,m,l+o)).length>0&&p[0]<=g&&p[1]<=m)return[p[0],p[1]];var y=n+u-l,w=r-c+l;if((p=kt(e,t,n,r,y,w,l+o)).length>0&&p[0]>=y&&p[1]<=w)return[p[0],p[1]];var b=n+u-l,x=r+c-l;if((p=kt(e,t,n,r,b,x,l+o)).length>0&&p[0]>=b&&p[1]>=x)return[p[0],p[1]];var _=n-u+l,E=r+c-l;return(p=kt(e,t,n,r,_,E,l+o)).length>0&&p[0]<=_&&p[1]>=E?[p[0],p[1]]:[]},vt=function(e,t,n,r,a,i,o){var s=o,l=Math.min(n,a),u=Math.max(n,a),c=Math.min(r,i),d=Math.max(r,i);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},gt=function(e,t,n,r,a,i,o,s,l){var u=Math.min(n,o,a)-l,c=Math.max(n,o,a)+l,d=Math.min(r,s,i)-l,f=Math.max(r,s,i)+l;return!(e<u||e>c||t<d||t>f)},mt=function(e,t,n,r,a,i,o,s){var l=[];!function(e,t,n,r,a){var i,o,s,l,u,c,d,f;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),i=(o=(3*n-t*t)/9)*o*o+(s/=54)*s,a[1]=0,d=t/3,i>0?(u=(u=s+Math.sqrt(i))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(i))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),a[0]=-d+u+c,d+=(u+c)/2,a[4]=a[2]=-d,d=Math.sqrt(3)*(-c+u)/2,a[3]=d,a[5]=-d):(a[5]=a[3]=0,0===i?(f=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),a[0]=2*f-d,a[4]=a[2]=-(f+d)):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),f=2*Math.sqrt(o),a[0]=-d+f*Math.cos(l/3),a[2]=-d+f*Math.cos((l+2*Math.PI)/3),a[4]=-d+f*Math.cos((l+4*Math.PI)/3)))}(1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s,9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*r*i-3*r*r-3*r*s-6*i*i+3*i*s,3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t,1*n*a-n*n+n*e-a*e+r*i-r*r+r*t-i*t,l);for(var u=[],c=0;c<6;c+=2)Math.abs(l[c+1])<1e-7&&l[c]>=0&&l[c]<=1&&u.push(l[c]);u.push(1),u.push(0);for(var d,f,h,p=-1,v=0;v<u.length;v++)d=Math.pow(1-u[v],2)*n+2*(1-u[v])*u[v]*a+u[v]*u[v]*o,f=Math.pow(1-u[v],2)*r+2*(1-u[v])*u[v]*i+u[v]*u[v]*s,h=Math.pow(d-e,2)+Math.pow(f-t,2),p>=0?h<p&&(p=h):p=h;return p},yt=function(e,t,n,r,a,i){var o=[e-n,t-r],s=[a-n,i-r],l=s[0]*s[0]+s[1]*s[1],u=o[0]*o[0]+o[1]*o[1],c=o[0]*s[0]+o[1]*s[1],d=c*c/l;return c<0?u:d>l?(e-a)*(e-a)+(t-i)*(t-i):u-d},wt=function(e,t,n){for(var r,a,i,o,s=0,l=0;l<n.length/2;l++)if(r=n[2*l],a=n[2*l+1],l+1<n.length/2?(i=n[2*(l+1)],o=n[2*(l+1)+1]):(i=n[2*(l+1-n.length/2)],o=n[2*(l+1-n.length/2)+1]),r==e&&i==e);else{if(!(r>=e&&e>=i||r<=e&&e<=i))continue;(e-r)/(i-r)*(o-a)+a>t&&s++}return s%2!=0},bt=function(e,t,n,r,a,i,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var d,f=Math.cos(-u),h=Math.sin(-u),p=0;p<c.length/2;p++)c[2*p]=i/2*(n[2*p]*f-n[2*p+1]*h),c[2*p+1]=o/2*(n[2*p+1]*f+n[2*p]*h),c[2*p]+=r,c[2*p+1]+=a;if(l>0){var v=_t(c,-l);d=xt(v)}else d=c;return wt(e,t,d)},xt=function(e){for(var t,n,r,a,i,o,s,l,u=new Array(e.length/2),c=0;c<e.length/4;c++){t=e[4*c],n=e[4*c+1],r=e[4*c+2],a=e[4*c+3],c<e.length/4-1?(i=e[4*(c+1)],o=e[4*(c+1)+1],s=e[4*(c+1)+2],l=e[4*(c+1)+3]):(i=e[0],o=e[1],s=e[2],l=e[3]);var d=St(t,n,r,a,i,o,s,l,!0);u[2*c]=d[0],u[2*c+1]=d[1]}return u},_t=function(e,t){for(var n,r,a,i,o=new Array(2*e.length),s=0;s<e.length/2;s++){n=e[2*s],r=e[2*s+1],s<e.length/2-1?(a=e[2*(s+1)],i=e[2*(s+1)+1]):(a=e[0],i=e[1]);var l=i-r,u=-(a-n),c=Math.sqrt(l*l+u*u),d=l/c,f=u/c;o[4*s]=n+d*t,o[4*s+1]=r+f*t,o[4*s+2]=a+d*t,o[4*s+3]=i+f*t}return o},Et=function(e,t,n,r,a,i,o){return e-=a,t-=i,(e/=n/2+o)*e+(t/=r/2+o)*t<=1},kt=function(e,t,n,r,a,i,o){var s=[n-e,r-t],l=[e-a,t-i],u=s[0]*s[0]+s[1]*s[1],c=2*(l[0]*s[0]+l[1]*s[1]),d=c*c-4*u*(l[0]*l[0]+l[1]*l[1]-o*o);if(d<0)return[];var f=(-c+Math.sqrt(d))/(2*u),h=(-c-Math.sqrt(d))/(2*u),p=Math.min(f,h),v=Math.max(f,h),g=[];if(p>=0&&p<=1&&g.push(p),v>=0&&v<=1&&g.push(v),0===g.length)return[];var m=g[0]*s[0]+e,y=g[0]*s[1]+t;return g.length>1?g[0]==g[1]?[m,y]:[m,y,g[1]*s[0]+e,g[1]*s[1]+t]:[m,y]},Ct=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},St=function(e,t,n,r,a,i,o,s,l){var u=e-a,c=n-e,d=o-a,f=t-i,h=r-t,p=s-i,v=d*f-p*u,g=c*f-h*u,m=p*c-d*h;if(0!==m){var y=v/m,w=g/m,b=-.001;return b<=y&&y<=1.001&&b<=w&&w<=1.001||l?[e+y*c,t+y*h]:[]}return 0===v||0===g?Ct(e,n,o)===o?[o,s]:Ct(e,n,a)===a?[a,i]:Ct(a,o,n)===n?[n,r]:[]:[]},jt=function(e,t,n,r,a,i,o,s){var l,u,c,d,f,h,p=[],v=new Array(n.length),g=!0;if(null==i&&(g=!1),g){for(var m=0;m<v.length/2;m++)v[2*m]=n[2*m]*i+r,v[2*m+1]=n[2*m+1]*o+a;if(s>0){var y=_t(v,-s);u=xt(y)}else u=v}else u=n;for(var w=0;w<u.length/2;w++)c=u[2*w],d=u[2*w+1],w<u.length/2-1?(f=u[2*(w+1)],h=u[2*(w+1)+1]):(f=u[0],h=u[1]),0!==(l=St(e,t,r,a,c,d,f,h)).length&&p.push(l[0],l[1]);return p},Mt=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],a=Math.sqrt(r[0]*r[0]+r[1]*r[1]),i=(a-n)/a;return i<0&&(i=1e-5),[t[0]+i*r[0],t[1]+i*r[1]]},Rt=function(e,t){var n=Ot(e,t);return n=Pt(n)},Pt=function(e){for(var t,n,r=e.length/2,a=1/0,i=1/0,o=-1/0,s=-1/0,l=0;l<r;l++)t=e[2*l],n=e[2*l+1],a=Math.min(a,t),o=Math.max(o,t),i=Math.min(i,n),s=Math.max(s,n);for(var u=2/(o-a),c=2/(s-i),d=0;d<r;d++)t=e[2*d]=e[2*d]*u,n=e[2*d+1]=e[2*d+1]*c,a=Math.min(a,t),o=Math.max(o,t),i=Math.min(i,n),s=Math.max(s,n);if(i<-1)for(var f=0;f<r;f++)n=e[2*f+1]=e[2*f+1]+(-1-i);return e},Ot=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var a,i=new Array(2*e),o=0;o<e;o++)a=o*n+r,i[2*o]=Math.cos(a),i[2*o+1]=Math.sin(-a);return i},zt=function(e,t){return Math.min(e/4,t/4,8)},At=function(e,t){return Math.min(e/10,t/10,8)},Tt=function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},Bt=ke({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),Dt={pageRank:function(e){for(var t=Bt(e),n=t.dampingFactor,r=t.precision,a=t.iterations,i=t.weight,o=this._private.cy,s=this.byGroup(),l=s.nodes,u=s.edges,c=l.length,d=c*c,f=u.length,h=new Array(d),p=new Array(c),v=(1-n)/c,g=0;g<c;g++){for(var m=0;m<c;m++){h[g*c+m]=0}p[g]=0}for(var y=0;y<f;y++){var w=u[y],b=w.data("source"),x=w.data("target");if(b!==x){var _=l.indexOfId(b),E=l.indexOfId(x),k=i(w);h[E*c+_]+=k,p[_]+=k}}for(var C=1/c+v,S=0;S<c;S++)if(0===p[S])for(var j=0;j<c;j++){h[j*c+S]=C}else for(var M=0;M<c;M++){var R=M*c+S;h[R]=h[R]/p[S]+v}for(var P,O=new Array(c),z=new Array(c),A=0;A<c;A++)O[A]=1;for(var T=0;T<a;T++){for(var B=0;B<c;B++)z[B]=0;for(var D=0;D<c;D++)for(var N=0;N<c;N++){var L=D*c+N;z[D]+=h[L]*O[N]}nt(z),P=O,O=z,z=P;for(var V=0,I=0;I<c;I++){var H=P[I]-O[I];V+=H*H}if(V<r)break}return{rank:function(e){return e=o.collection(e)[0],O[l.indexOf(e)]}}}},Nt=ke({root:null,weight:function(e){return 1},directed:!1,alpha:0}),Lt={degreeCentralityNormalized:function(e){e=Nt(e);var t=this.cy(),n=this.nodes(),r=n.length;if(e.directed){for(var a={},i={},o=0,s=0,l=0;l<r;l++){var u=n[l],c=u.id();e.root=u;var d=this.degreeCentrality(e);o<d.indegree&&(o=d.indegree),s<d.outdegree&&(s=d.outdegree),a[c]=d.indegree,i[c]=d.outdegree}return{indegree:function(e){return 0==o?0:(_(e)&&(e=t.filter(e)),a[e.id()]/o)},outdegree:function(e){return 0===s?0:(_(e)&&(e=t.filter(e)),i[e.id()]/s)}}}for(var f={},h=0,p=0;p<r;p++){var v=n[p];e.root=v;var g=this.degreeCentrality(e);h<g.degree&&(h=g.degree),f[v.id()]=g.degree}return{degree:function(e){return 0===h?0:(_(e)&&(e=t.filter(e)),f[e.id()]/h)}}},degreeCentrality:function(e){e=Nt(e);var t=this.cy(),n=this,r=e,a=r.root,i=r.weight,o=r.directed,s=r.alpha;if(a=t.collection(a)[0],o){for(var l=a.connectedEdges(),u=l.filter((function(e){return e.target().same(a)&&n.has(e)})),c=l.filter((function(e){return e.source().same(a)&&n.has(e)})),d=u.length,f=c.length,h=0,p=0,v=0;v<u.length;v++)h+=i(u[v]);for(var g=0;g<c.length;g++)p+=i(c[g]);return{indegree:Math.pow(d,1-s)*Math.pow(h,s),outdegree:Math.pow(f,1-s)*Math.pow(p,s)}}for(var m=a.connectedEdges().intersection(n),y=m.length,w=0,b=0;b<m.length;b++)w+=i(m[b]);return{degree:Math.pow(y,1-s)*Math.pow(w,s)}}};Lt.dc=Lt.degreeCentrality,Lt.dcn=Lt.degreeCentralityNormalised=Lt.degreeCentralityNormalized;var Vt=ke({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),It={closenessCentralityNormalized:function(e){for(var t=Vt(e),n=t.harmonic,r=t.weight,a=t.directed,i=this.cy(),o={},s=0,l=this.nodes(),u=this.floydWarshall({weight:r,directed:a}),c=0;c<l.length;c++){for(var d=0,f=l[c],h=0;h<l.length;h++)if(c!==h){var p=u.distance(f,l[h]);d+=n?1/p:p}n||(d=1/d),s<d&&(s=d),o[f.id()]=d}return{closeness:function(e){return 0==s?0:(e=_(e)?i.filter(e)[0].id():e.id(),o[e]/s)}}},closenessCentrality:function(e){var t=Vt(e),n=t.root,r=t.weight,a=t.directed,i=t.harmonic;n=this.filter(n)[0];for(var o=this.dijkstra({root:n,weight:r,directed:a}),s=0,l=this.nodes(),u=0;u<l.length;u++){var c=l[u];if(!c.same(n)){var d=o.distanceTo(c);s+=i?1/d:d}}return i?s:1/s}};It.cc=It.closenessCentrality,It.ccn=It.closenessCentralityNormalised=It.closenessCentralityNormalized;var Ht=ke({weight:null,directed:!1}),Ft={betweennessCentrality:function(e){for(var t=Ht(e),n=t.directed,r=t.weight,a=null!=r,o=this.cy(),s=this.nodes(),l={},u={},c=0,d=function(e,t){u[e]=t,t>c&&(c=t)},f=function(e){return u[e]},h=0;h<s.length;h++){var p=s[h],v=p.id();l[v]=n?p.outgoers().nodes():p.openNeighborhood().nodes(),d(v,0)}for(var g=function(e){for(var t=s[e].id(),n=[],u={},c={},h={},p=new i((function(e,t){return h[e]-h[t]})),v=0;v<s.length;v++){var g=s[v].id();u[g]=[],c[g]=0,h[g]=1/0}for(c[t]=1,h[t]=0,p.push(t);!p.empty();){var m=p.pop();if(n.push(m),a)for(var y=0;y<l[m].length;y++){var w=l[m][y],b=o.getElementById(m),x=void 0;x=b.edgesTo(w).length>0?b.edgesTo(w)[0]:w.edgesTo(b)[0];var _=r(x);w=w.id(),h[w]>h[m]+_&&(h[w]=h[m]+_,p.nodes.indexOf(w)<0?p.push(w):p.updateItem(w),c[w]=0,u[w]=[]),h[w]==h[m]+_&&(c[w]=c[w]+c[m],u[w].push(m))}else for(var E=0;E<l[m].length;E++){var k=l[m][E].id();h[k]==1/0&&(p.push(k),h[k]=h[m]+1),h[k]==h[m]+1&&(c[k]=c[k]+c[m],u[k].push(m))}}for(var C={},S=0;S<s.length;S++)C[s[S].id()]=0;for(;n.length>0;){for(var j=n.pop(),M=0;M<u[j].length;M++){var R=u[j][M];C[R]=C[R]+c[R]/c[j]*(1+C[j])}j!=s[e].id()&&d(j,f(j)+C[j])}},m=0;m<s.length;m++)g(m);var y={betweenness:function(e){var t=o.collection(e).id();return f(t)},betweennessNormalized:function(e){if(0==c)return 0;var t=o.collection(e).id();return f(t)/c}};return y.betweennessNormalised=y.betweennessNormalized,y}};Ft.bc=Ft.betweennessCentrality;var Gt=ke({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),Yt=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r](e);return n},qt=function(e,t){for(var n,r=0;r<t;r++){n=0;for(var a=0;a<t;a++)n+=e[a*t+r];for(var i=0;i<t;i++)e[i*t+r]=e[i*t+r]/n}},Wt=function(e,t,n){for(var r=new Array(n*n),a=0;a<n;a++){for(var i=0;i<n;i++)r[a*n+i]=0;for(var o=0;o<n;o++)for(var s=0;s<n;s++)r[a*n+s]+=e[a*n+o]*t[o*n+s]}return r},Ut=function(e,t,n){for(var r=e.slice(0),a=1;a<n;a++)e=Wt(e,r,t);return e},Xt=function(e,t,n){for(var r=new Array(t*t),a=0;a<t*t;a++)r[a]=Math.pow(e[a],n);return qt(r,t),r},$t=function(e,t,n,r){for(var a=0;a<n;a++){if(Math.round(e[a]*Math.pow(10,r))/Math.pow(10,r)!==Math.round(t[a]*Math.pow(10,r))/Math.pow(10,r))return!1}return!0},Kt=function(e,t){for(var n=0;n<e.length;n++)if(!t[n]||e[n].id()!==t[n].id())return!1;return!0},Zt=function(e){for(var t=this.nodes(),n=this.edges(),r=this.cy(),a=function(e){return Gt(e)}(e),i={},o=0;o<t.length;o++)i[t[o].id()]=o;for(var s,l=t.length,u=l*l,c=new Array(u),d=0;d<u;d++)c[d]=0;for(var f=0;f<n.length;f++){var h=n[f],p=i[h.source().id()],v=i[h.target().id()],g=Yt(h,a.attributes);c[p*l+v]+=g,c[v*l+p]+=g}!function(e,t,n){for(var r=0;r<t;r++)e[r*t+r]=n}(c,l,a.multFactor),qt(c,l);for(var m=!0,y=0;m&&y<a.maxIterations;)m=!1,s=Ut(c,l,a.expandFactor),c=Xt(s,l,a.inflateFactor),$t(c,s,u,4)||(m=!0),y++;var w=function(e,t,n,r){for(var a=[],i=0;i<t;i++){for(var o=[],s=0;s<t;s++)Math.round(1e3*e[i*t+s])/1e3>0&&o.push(n[s]);0!==o.length&&a.push(r.collection(o))}return a}(c,l,t,r);return w=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e.length;n++)t!=n&&Kt(e[t],e[n])&&e.splice(n,1);return e}(w),w},Qt={markovClustering:Zt,mcl:Zt},Jt=function(e){return e},en=function(e,t){return Math.abs(t-e)},tn=function(e,t,n){return e+en(t,n)},nn=function(e,t,n){return e+Math.pow(n-t,2)},rn=function(e){return Math.sqrt(e)},an=function(e,t,n){return Math.max(e,en(t,n))},on=function(e,t,n,r,a){for(var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Jt,o=r,s=0;s<e;s++)o=a(o,t(s),n(s));return i(o)},sn={euclidean:function(e,t,n){return e>=2?on(e,t,n,0,nn,rn):on(e,t,n,0,tn)},squaredEuclidean:function(e,t,n){return on(e,t,n,0,nn)},manhattan:function(e,t,n){return on(e,t,n,0,tn)},max:function(e,t,n){return on(e,t,n,-1/0,an)}};function ln(e,t,n,r,a,i){var o;return o=E(e)?e:sn[e]||sn.euclidean,0===t&&E(e)?o(a,i):o(t,n,r,a,i)}sn["squared-euclidean"]=sn.squaredEuclidean,sn.squaredeuclidean=sn.squaredEuclidean;var un=ke({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),cn=function(e){return un(e)},dn=function(e,t,n,r,a){var i="kMedoids"!==a?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return ln(e,r.length,i,(function(e){return r[e](t)}),o,s)},fn=function(e,t,n){for(var r=n.length,a=new Array(r),i=new Array(r),o=new Array(t),s=null,l=0;l<r;l++)a[l]=e.min(n[l]).value,i[l]=e.max(n[l]).value;for(var u=0;u<t;u++){s=[];for(var c=0;c<r;c++)s[c]=Math.random()*(i[c]-a[c])+a[c];o[u]=s}return o},hn=function(e,t,n,r,a){for(var i=1/0,o=0,s=0;s<t.length;s++){var l=dn(n,e,t[s],r,a);l<i&&(i=l,o=s)}return o},pn=function(e,t,n){for(var r=[],a=null,i=0;i<t.length;i++)n[(a=t[i]).id()]===e&&r.push(a);return r},vn=function(e,t,n){for(var r=0;r<e.length;r++)for(var a=0;a<e[r].length;a++){if(Math.abs(e[r][a]-t[r][a])>n)return!1}return!0},gn=function(e,t,n){for(var r=0;r<n;r++)if(e===t[r])return!0;return!1},mn=function(e,t){var n=new Array(t);if(e.length<50)for(var r=0;r<t;r++){for(var a=e[Math.floor(Math.random()*e.length)];gn(a,n,r);)a=e[Math.floor(Math.random()*e.length)];n[r]=a}else for(var i=0;i<t;i++)n[i]=e[Math.floor(Math.random()*e.length)];return n},yn=function(e,t,n){for(var r=0,a=0;a<t.length;a++)r+=dn("manhattan",t[a],e,n,"kMedoids");return r},wn=function(e,t,n,r,a){for(var i,o,s=0;s<t.length;s++)for(var l=0;l<e.length;l++)r[s][l]=Math.pow(n[s][l],a.m);for(var u=0;u<e.length;u++)for(var c=0;c<a.attributes.length;c++){i=0,o=0;for(var d=0;d<t.length;d++)i+=r[d][u]*a.attributes[c](t[d]),o+=r[d][u];e[u][c]=i/o}},bn=function(e,t,n,r,a){for(var i=0;i<e.length;i++)t[i]=e[i].slice();for(var o,s,l,u=2/(a.m-1),c=0;c<n.length;c++)for(var d=0;d<r.length;d++){o=0;for(var f=0;f<n.length;f++)s=dn(a.distance,r[d],n[c],a.attributes,"cmeans"),l=dn(a.distance,r[d],n[f],a.attributes,"cmeans"),o+=Math.pow(s/l,u);e[d][c]=1/o}},xn=function(e){var t,n,r,a,i,o=this.cy(),s=this.nodes(),l=cn(e);a=new Array(s.length);for(var u=0;u<s.length;u++)a[u]=new Array(l.k);r=new Array(s.length);for(var c=0;c<s.length;c++)r[c]=new Array(l.k);for(var d=0;d<s.length;d++){for(var f=0,h=0;h<l.k;h++)r[d][h]=Math.random(),f+=r[d][h];for(var p=0;p<l.k;p++)r[d][p]=r[d][p]/f}n=new Array(l.k);for(var v=0;v<l.k;v++)n[v]=new Array(l.attributes.length);i=new Array(s.length);for(var g=0;g<s.length;g++)i[g]=new Array(l.k);for(var m=!0,y=0;m&&y<l.maxIterations;)m=!1,wn(n,s,r,i,l),bn(r,a,n,s,l),vn(r,a,l.sensitivityThreshold)||(m=!0),y++;return t=function(e,t,n,r){for(var a,i,o=new Array(n.k),s=0;s<o.length;s++)o[s]=[];for(var l=0;l<t.length;l++){a=-1/0,i=-1;for(var u=0;u<t[0].length;u++)t[l][u]>a&&(a=t[l][u],i=u);o[i].push(e[l])}for(var c=0;c<o.length;c++)o[c]=r.collection(o[c]);return o}(s,r,l,o),{clusters:t,degreeOfMembership:r}},_n={kMeans:function(e){var t,n=this.cy(),r=this.nodes(),a=null,i=cn(e),o=new Array(i.k),s={};t=i.testMode?"number"==typeof i.testCentroids?fn(r,i.k,i.attributes):"object"===u(i.testCentroids)?i.testCentroids:fn(r,i.k,i.attributes):fn(r,i.k,i.attributes);for(var l,c,d,f=!0,h=0;f&&h<i.maxIterations;){for(var p=0;p<r.length;p++)s[(a=r[p]).id()]=hn(a,t,i.distance,i.attributes,"kMeans");f=!1;for(var v=0;v<i.k;v++){var g=pn(v,r,s);if(0!==g.length){for(var m=i.attributes.length,y=t[v],w=new Array(m),b=new Array(m),x=0;x<m;x++){b[x]=0;for(var _=0;_<g.length;_++)a=g[_],b[x]+=i.attributes[x](a);w[x]=b[x]/g.length,l=w[x],c=y[x],d=i.sensitivityThreshold,Math.abs(c-l)<=d||(f=!0)}t[v]=w,o[v]=n.collection(g)}}h++}return o},kMedoids:function(e){var t,n,r=this.cy(),a=this.nodes(),i=null,o=cn(e),s=new Array(o.k),l={},c=new Array(o.k);o.testMode?"number"==typeof o.testCentroids||(t="object"===u(o.testCentroids)?o.testCentroids:mn(a,o.k)):t=mn(a,o.k);for(var d=!0,f=0;d&&f<o.maxIterations;){for(var h=0;h<a.length;h++)l[(i=a[h]).id()]=hn(i,t,o.distance,o.attributes,"kMedoids");d=!1;for(var p=0;p<t.length;p++){var v=pn(p,a,l);if(0!==v.length){c[p]=yn(t[p],v,o.attributes);for(var g=0;g<v.length;g++)(n=yn(v[g],v,o.attributes))<c[p]&&(c[p]=n,t[p]=v[g],d=!0);s[p]=r.collection(v)}}f++}return s},fuzzyCMeans:xn,fcm:xn},En=ke({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),kn={single:"min",complete:"max"},Cn=function(e,t,n,r,a){for(var i,o=0,s=1/0,l=a.attributes,u=function(e,t){return ln(a.distance,l.length,(function(t){return l[t](e)}),(function(e){return l[e](t)}),e,t)},c=0;c<e.length;c++){var d=e[c].key,f=n[d][r[d]];f<s&&(o=d,s=f)}if("threshold"===a.mode&&s>=a.threshold||"dendrogram"===a.mode&&1===e.length)return!1;var h,p=t[o],v=t[r[o]];h="dendrogram"===a.mode?{left:p,right:v,key:p.key}:{value:p.value.concat(v.value),key:p.key},e[p.index]=h,e.splice(v.index,1),t[p.key]=h;for(var g=0;g<e.length;g++){var m=e[g];p.key===m.key?i=1/0:"min"===a.linkage?(i=n[p.key][m.key],n[p.key][m.key]>n[v.key][m.key]&&(i=n[v.key][m.key])):"max"===a.linkage?(i=n[p.key][m.key],n[p.key][m.key]<n[v.key][m.key]&&(i=n[v.key][m.key])):i="mean"===a.linkage?(n[p.key][m.key]*p.size+n[v.key][m.key]*v.size)/(p.size+v.size):"dendrogram"===a.mode?u(m.value,p.value):u(m.value[0],p.value[0]),n[p.key][m.key]=n[m.key][p.key]=i}for(var y=0;y<e.length;y++){var w=e[y].key;if(r[w]===p.key||r[w]===v.key){for(var b=w,x=0;x<e.length;x++){var _=e[x].key;n[w][_]<n[w][b]&&(b=_)}r[w]=b}e[y].index=y}return p.key=v.key=p.index=v.index=null,!0},Sn=function e(t,n,r){t&&(t.value?n.push(t.value):(t.left&&e(t.left,n),t.right&&e(t.right,n)))},jn=function e(t,n){if(!t)return"";if(t.left&&t.right){var r=e(t.left,n),a=e(t.right,n),i=n.add({group:"nodes",data:{id:r+","+a}});return n.add({group:"edges",data:{source:r,target:i.id()}}),n.add({group:"edges",data:{source:a,target:i.id()}}),i.id()}return t.value?t.value.id():void 0},Mn=function e(t,n,r){if(!t)return[];var a=[],i=[],o=[];return 0===n?(t.left&&Sn(t.left,a),t.right&&Sn(t.right,i),o=a.concat(i),[r.collection(o)]):1===n?t.value?[r.collection(t.value)]:(t.left&&Sn(t.left,a),t.right&&Sn(t.right,i),[r.collection(a),r.collection(i)]):t.value?[r.collection(t.value)]:(t.left&&(a=e(t.left,n-1,r)),t.right&&(i=e(t.right,n-1,r)),a.concat(i))},Rn=function(e){for(var t=this.cy(),n=this.nodes(),r=function(e){var t=En(e),n=kn[t.linkage];return null!=n&&(t.linkage=n),t}(e),a=r.attributes,i=function(e,t){return ln(r.distance,a.length,(function(t){return a[t](e)}),(function(e){return a[e](t)}),e,t)},o=[],s=[],l=[],u=[],c=0;c<n.length;c++){var d={value:"dendrogram"===r.mode?n[c]:[n[c]],key:c,index:c};o[c]=d,u[c]=d,s[c]=[],l[c]=0}for(var f=0;f<o.length;f++)for(var h=0;h<=f;h++){var p=void 0;p="dendrogram"===r.mode?f===h?1/0:i(o[f].value,o[h].value):f===h?1/0:i(o[f].value[0],o[h].value[0]),s[f][h]=p,s[h][f]=p,p<s[f][l[f]]&&(l[f]=h)}for(var v,g=Cn(o,u,s,l,r);g;)g=Cn(o,u,s,l,r);return"dendrogram"===r.mode?(v=Mn(o[0],r.dendrogramDepth,t),r.addDendrogram&&jn(o[0],t)):(v=new Array(o.length),o.forEach((function(e,n){e.key=e.index=null,v[n]=t.collection(e.value)}))),v},Pn={hierarchicalClustering:Rn,hca:Rn},On=ke({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),zn=function(e,t,n,r){var a=function(e,t){return r[t](e)};return-ln(e,r.length,(function(e){return a(t,e)}),(function(e){return a(n,e)}),t,n)},An=function(e,t){var n=null;return n="median"===t?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n<e.length&&e.splice(n,e.length-n),t>0&&e.splice(0,t)):e=e.slice(t,n);for(var i=0,o=e.length-1;o>=0;o--){var s=e[o];a?isFinite(s)||(e[o]=-1/0,i++):e.splice(o,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+i]:(e[u-1+i]+e[u+i])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,a=0,i=t;i<n;i++){var o=e[i];isFinite(o)&&(r+=o,a++)}return r/a}(e):"min"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,a=t;a<n;a++){var i=e[a];isFinite(i)&&(r=Math.min(i,r))}return r}(e):"max"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,a=t;a<n;a++){var i=e[a];isFinite(i)&&(r=Math.max(i,r))}return r}(e):t,n},Tn=function(e,t,n){for(var r=[],a=0;a<e;a++){for(var i=-1,o=-1/0,s=0;s<n.length;s++){var l=n[s];t[a*e+l]>o&&(i=l,o=t[a*e+l])}i>0&&r.push(i)}for(var u=0;u<n.length;u++)r[n[u]]=n[u];return r},Bn=function(e){for(var t,n,r,a,i,o,s=this.cy(),l=this.nodes(),u=function(e){var t=e.damping,n=e.preference;.5<=t&&t<1||me("Damping must range on [0.5, 1). Got: ".concat(t));var r=["median","mean","min","max"];return r.some((function(e){return e===n}))||S(n)||me("Preference must be one of [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"] or a number. Got: ").concat(n)),On(e)}(e),c={},d=0;d<l.length;d++)c[l[d].id()]=d;n=(t=l.length)*t,r=new Array(n);for(var f=0;f<n;f++)r[f]=-1/0;for(var h=0;h<t;h++)for(var p=0;p<t;p++)h!==p&&(r[h*t+p]=zn(u.distance,l[h],l[p],u.attributes));a=An(r,u.preference);for(var v=0;v<t;v++)r[v*t+v]=a;i=new Array(n);for(var g=0;g<n;g++)i[g]=0;o=new Array(n);for(var m=0;m<n;m++)o[m]=0;for(var y=new Array(t),w=new Array(t),b=new Array(t),x=0;x<t;x++)y[x]=0,w[x]=0,b[x]=0;for(var _,E=new Array(t*u.minIterations),k=0;k<E.length;k++)E[k]=0;for(_=0;_<u.maxIterations;_++){for(var C=0;C<t;C++){for(var j=-1/0,M=-1/0,R=-1,P=0,O=0;O<t;O++)y[O]=i[C*t+O],(P=o[C*t+O]+r[C*t+O])>=j?(M=j,j=P,R=O):P>M&&(M=P);for(var z=0;z<t;z++)i[C*t+z]=(1-u.damping)*(r[C*t+z]-j)+u.damping*y[z];i[C*t+R]=(1-u.damping)*(r[C*t+R]-M)+u.damping*y[R]}for(var A=0;A<t;A++){for(var T=0,B=0;B<t;B++)y[B]=o[B*t+A],w[B]=Math.max(0,i[B*t+A]),T+=w[B];T-=w[A],w[A]=i[A*t+A],T+=w[A];for(var D=0;D<t;D++)o[D*t+A]=(1-u.damping)*Math.min(0,T-w[D])+u.damping*y[D];o[A*t+A]=(1-u.damping)*(T-w[A])+u.damping*y[A]}for(var N=0,L=0;L<t;L++){var V=o[L*t+L]+i[L*t+L]>0?1:0;E[_%u.minIterations*t+L]=V,N+=V}if(N>0&&(_>=u.minIterations-1||_==u.maxIterations-1)){for(var I=0,H=0;H<t;H++){b[H]=0;for(var F=0;F<u.minIterations;F++)b[H]+=E[F*t+H];0!==b[H]&&b[H]!==u.minIterations||I++}if(I===t)break}}for(var G=function(e,t,n){for(var r=[],a=0;a<e;a++)t[a*e+a]+n[a*e+a]>0&&r.push(a);return r}(t,i,o),Y=function(e,t,n){for(var r=Tn(e,t,n),a=0;a<n.length;a++){for(var i=[],o=0;o<r.length;o++)r[o]===n[a]&&i.push(o);for(var s=-1,l=-1/0,u=0;u<i.length;u++){for(var c=0,d=0;d<i.length;d++)c+=t[i[d]*e+i[u]];c>l&&(s=u,l=c)}n[a]=i[s]}return Tn(e,t,n)}(t,r,G),q={},W=0;W<G.length;W++)q[G[W]]=[];for(var U=0;U<l.length;U++){var X=Y[c[l[U].id()]];null!=X&&q[X].push(l[U])}for(var $=new Array(G.length),K=0;K<G.length;K++)$[K]=s.collection(q[G[K]]);return $},Dn={affinityPropagation:Bn,ap:Bn},Nn=ke({root:void 0,directed:!1}),Ln=function(){var e=this,t={},n=0,r=0,a=[],i=[],o={},s=function s(l,u,c){l===c&&(r+=1),t[u]={id:n,low:n++,cutVertex:!1};var d,f,h,p,v=e.getElementById(u).connectedEdges().intersection(e);0===v.size()?a.push(e.spawn(e.getElementById(u))):v.forEach((function(n){d=n.source().id(),f=n.target().id(),(h=d===u?f:d)!==c&&(p=n.id(),o[p]||(o[p]=!0,i.push({x:u,y:h,edge:n})),h in t?t[u].low=Math.min(t[u].low,t[h].id):(s(l,h,u),t[u].low=Math.min(t[u].low,t[h].low),t[u].id<=t[h].low&&(t[u].cutVertex=!0,function(n,r){for(var o=i.length-1,s=[],l=e.spawn();i[o].x!=n||i[o].y!=r;)s.push(i.pop().edge),o--;s.push(i.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach((function(n){var r=n.id(),a=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(a.filter((function(e){return e.isLoop()}))):l.merge(a)}))})),a.push(l)}(u,h))))}))};e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}}));var l=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(l),components:a}},Vn=function(){var e=this,t={},n=0,r=[],a=[],i=e.spawn(e),o=function o(s){if(a.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=a.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),d=l.merge(c);r.push(d),i=i.difference(d)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||o(n)}})),{cut:i,components:r}},In={};[Te,De,Ne,Ve,He,Ge,Ue,Dt,Lt,It,Ft,Qt,_n,Pn,Dn,{hierholzer:function(e){if(!C(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,a,i=Nn(e),o=i.root,s=i.directed,l=this,u=!1;o&&(a=_(o)?this.filter(o)[0].id():o[0].id());var c={},d={};s?l.forEach((function(e){var t=e.id();if(e.isNode()){var a=e.indegree(!0),i=e.outdegree(!0),o=a-i,s=i-a;1==o?n?u=!0:n=t:1==s?r?u=!0:r=t:(s>1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else d[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):d[t]=[e.source().id(),e.target().id()]}));var f={found:!1,trail:void 0};if(u)return f;if(r&&n)if(s){if(a&&r!=a)return f;a=r}else{if(a&&r!=a&&n!=a)return f;a||(a=r)}else a||(a=l[0].id());var h=function(e){for(var t,n,r,a=e,i=[e];c[a].length;)t=c[a].shift(),n=d[t][0],a!=(r=d[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),a=r):s||a==n||(c[n]=c[n].filter((function(e){return e!=t})),a=n),i.unshift(t),i.unshift(a);return i},p=[],v=[];for(v=h(a);1!=v.length;)0==c[v[0]].length?(p.unshift(l.getElementById(v.shift())),p.unshift(l.getElementById(v.shift()))):v=h(v.shift()).concat(v);for(var g in p.unshift(l.getElementById(v.shift())),c)if(c[g].length)return f;return f.found=!0,f.trail=this.spawn(p,!0),f}},{hopcroftTarjanBiconnected:Ln,htbc:Ln,htb:Ln,hopcroftTarjanBiconnectedComponents:Ln},{tarjanStronglyConnected:Vn,tsc:Vn,tscc:Vn,tarjanStronglyConnectedComponents:Vn}].forEach((function(e){F(In,e)}));var Hn=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};Hn.prototype={fulfill:function(e){return Fn(this,1,"fulfillValue",e)},reject:function(e){return Fn(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new Hn;return n.onFulfilled.push(qn(e,r,"fulfill")),n.onRejected.push(qn(t,r,"reject")),Gn(n),r.proxy}};var Fn=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Gn(e)),e},Gn=function(e){1===e.state?Yn(e,"onFulfilled",e.fulfillValue):2===e.state&&Yn(e,"onRejected",e.rejectReason)},Yn=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var a=function(){for(var e=0;e<r.length;e++)r[e](n)};"function"==typeof setImmediate?setImmediate(a):setTimeout(a,0)}},qn=function(e,t,n){return function(r){if("function"!=typeof e)t[n].call(t,r);else{var a;try{a=e(r)}catch(i){return void t.reject(i)}Wn(t,a)}}},Wn=function e(t,n){if(t!==n&&t.proxy!==n){var r;if("object"===u(n)&&null!==n||"function"==typeof n)try{r=n.then}catch(i){return void t.reject(i)}if("function"!=typeof r)t.fulfill(n);else{var a=!1;try{r.call(n,(function(r){a||(a=!0,r===n?t.reject(new TypeError("circular thenable chain")):e(t,r))}),(function(e){a||(a=!0,t.reject(e))}))}catch(i){a||t.reject(i)}}}else t.reject(new TypeError("cannot resolve promise with itself"))};Hn.all=function(e){return new Hn((function(t,n){for(var r=new Array(e.length),a=0,i=function(n,i){r[n]=i,++a===e.length&&t(r)},o=0;o<e.length;o++)!function(t){var r=e[t];null!=r&&null!=r.then?r.then((function(e){i(t,e)}),(function(e){n(e)})):i(t,r)}(o)}))},Hn.resolve=function(e){return new Hn((function(t,n){t(e)}))},Hn.reject=function(e){return new Hn((function(t,n){n(e)}))};var Un="undefined"!=typeof Promise?Promise:Hn,Xn=function(e,t,n){var r=O(e),a=!r,i=this._private=F({duration:1e3},t,n);if(i.target=e,i.style=i.style||i.css,i.started=!1,i.playing=!1,i.hooked=!1,i.applying=!1,i.progress=0,i.completes=[],i.frames=[],i.complete&&E(i.complete)&&i.completes.push(i.complete),a){var o=e.position();i.startPosition=i.startPosition||{x:o.x,y:o.y},i.startStyle=i.startStyle||e.cy().style().getAnimationStartStyle(e,i.style)}if(r){var s=e.pan();i.startPan={x:s.x,y:s.y},i.startZoom=e.zoom()}this.length=1,this[0]=this},$n=Xn.prototype;F($n,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t=e.target._private.animation;(e.queue?t.queue:t.current).push(this),M(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,n=t.playing;return void 0===e?t.progress:(n&&this.pause(),t.progress=e,t.started=!1,n&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(t,n){var r=e[t];null!=r&&(e[t]=e[n],e[n]=r)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var r=0;r<e.style.length;r++){var a=e.style[r],i=a.name,o=e.startStyle[i];e.startStyle[i]=a,e.style[r]=o}return t&&this.play(),this},promise:function(e){var t,n=this._private;if("frame"===e)t=n.frames;else t=n.completes;return new Un((function(e,n){t.push((function(){e()}))}))}}),$n.complete=$n.completed,$n.run=$n.play,$n.running=$n.playing;var Kn={animated:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return!1;var n=t[0];return n?n._private.animation.current.length>0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n<t.length;n++){t[n]._private.animation.queue=[]}return this}},delay:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this}},delayAnimation:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this}},animation:function(){return function(e,t){var n=this,r=void 0!==n.length,a=r?n:[n],i=this._private.cy||this,o=!r,s=!o;if(!i.styleEnabled())return this;var l=i.style();if(e=F({},e,t),0===Object.keys(e).length)return new Xn(a[0],e);switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}if(s&&(e.style=l.getPropsList(e.style||e.css),e.css=void 0),s&&null!=e.renderedPosition){var u=e.renderedPosition,c=i.pan(),d=i.zoom();e.position=$e(u,d,c)}if(o&&null!=e.panBy){var f=e.panBy,h=i.pan();e.pan={x:h.x+f.x,y:h.y+f.y}}var p=e.center||e.centre;if(o&&null!=p){var v=i.getCenterPan(p.eles,e.zoom);null!=v&&(e.pan=v)}if(o&&null!=e.fit){var g=e.fit,m=i.getFitViewport(g.eles||g.boundingBox,g.padding);null!=m&&(e.pan=m.pan,e.zoom=m.zoom)}if(o&&C(e.zoom)){var y=i.getZoomedViewport(e.zoom);null!=y?(y.zoomed&&(e.zoom=y.zoom),y.panned&&(e.pan=y.pan)):e.zoom=null}return new Xn(a[0],e)}},animate:function(){return function(e,t){var n=this,r=void 0!==n.length?n:[n];if(!(this._private.cy||this).styleEnabled())return this;t&&(e=F({},e,t));for(var a=0;a<r.length;a++){var i=r[a],o=i.animated()&&(void 0===e.queue||e.queue);i.animation(e,o?{queue:!0}:void 0).play()}return this}},stop:function(){return function(e,t){var n=this,r=void 0!==n.length?n:[n],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var i=0;i<r.length;i++){for(var o=r[i]._private,s=o.animation.current,l=0;l<s.length;l++){var u=s[l]._private;t&&(u.duration=0)}e&&(o.animation.queue=[]),t||(o.animation.current=[])}return a.notify("draw"),this}}},Zn={data:function(e){return e=F({},{field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(e){},beforeSet:function(e,t){},onSet:function(e){},canSet:function(e){return!0}},e),function(t,n){var r=e,a=this,i=void 0!==a.length,u=i?a:[a],c=i?a[0]:a;if(_(t)){var d,f=-1!==t.indexOf(".")&&l(t);if(r.allowGetting&&void 0===n)return c&&(r.beforeGet(c),d=f&&void 0===c._private[r.field][t]?o(c._private[r.field],f):c._private[r.field][t]),d;if(r.allowSetting&&void 0!==n&&!r.immutableKeys[t]){var p=h({},t,n);r.beforeSet(a,p);for(var v=0,g=u.length;v<g;v++){var m=u[v];r.canSet(m)&&(f&&void 0===c._private[r.field][t]?s(m._private[r.field],f,n):m._private[r.field][t]=n)}r.updateStyle&&a.updateStyle(),r.onSet(a),r.settingTriggersEvent&&a[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&C(t)){var y,w,b=t,x=Object.keys(b);r.beforeSet(a,b);for(var k=0;k<x.length;k++){if(w=b[y=x[k]],!r.immutableKeys[y])for(var S=0;S<u.length;S++){var j=u[S];r.canSet(j)&&(j._private[r.field][y]=w)}}r.updateStyle&&a.updateStyle(),r.onSet(a),r.settingTriggersEvent&&a[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&E(t)){var M=t;a.on(r.bindingEvent,M)}else if(r.allowGetting&&void 0===t){var R;return c&&(r.beforeGet(c),R=c._private[r.field]),R}return a}},removeData:function(e){return e=F({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},e),function(t){var n=e,r=this,a=void 0!==r.length?r:[r];if(_(t)){for(var i=t.split(/\s+/),o=i.length,s=0;s<o;s++){var l=i[s];if(!A(l))if(!n.immutableKeys[l])for(var u=0,c=a.length;u<c;u++)a[u]._private[n.field][l]=void 0}n.triggerEvent&&r[n.triggerFnName](n.event)}else if(void 0===t){for(var d=0,f=a.length;d<f;d++)for(var h=a[d]._private[n.field],p=Object.keys(h),v=0;v<p.length;v++){var g=p[v];!n.immutableKeys[g]&&(h[g]=void 0)}n.triggerEvent&&r[n.triggerFnName](n.event)}return r}}},Qn={eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.unlisten=t.unbind=t.off=t.removeListener,t.trigger=t.emit,t.pon=t.promiseOn=function(e,t){var n=this,r=Array.prototype.slice.call(arguments,0);return new Un((function(e,t){var a=r.concat([function(t){n.off.apply(n,i),e(t)}]),i=a.concat([]);n.on.apply(n,a)}))}}},Jn={};[Kn,Zn,Qn].forEach((function(e){F(Jn,e)}));var er={animate:Jn.animate(),animation:Jn.animation(),animated:Jn.animated(),clearQueue:Jn.clearQueue(),delay:Jn.delay(),delayAnimation:Jn.delayAnimation(),stop:Jn.stop()},tr={classes:function(e){var t=this;if(void 0===e){var n=[];return t[0]._private.classes.forEach((function(e){return n.push(e)})),n}k(e)||(e=(e||"").match(/\S+/g)||[]);for(var r=[],a=new Oe(e),i=0;i<t.length;i++){for(var o=t[i],s=o._private,l=s.classes,u=!1,c=0;c<e.length;c++){var d=e[c];if(!l.has(d)){u=!0;break}}u||(u=l.size!==e.length),u&&(s.classes=a,r.push(o))}return r.length>0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){k(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,a=[],i=0,o=n.length;i<o;i++)for(var s=n[i],l=s._private.classes,u=!1,c=0;c<e.length;c++){var d=e[c],f=l.has(d),h=!1;t||r&&!f?(l.add(d),h=!0):(!t||r&&f)&&(l.delete(d),h=!0),!u&&h&&(a.push(s),u=!0)}return a.length>0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};tr.className=tr.classNames=tr.classes;var nr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:I,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};nr.variable="(?:[\\w-.]|(?:\\\\"+nr.metaChar+"))+",nr.value=nr.string+"|"+nr.number,nr.className=nr.variable,nr.id=nr.variable,function(){var e,t,n;for(e=nr.comparatorOp.split("|"),n=0;n<e.length;n++)t=e[n],nr.comparatorOp+="|@"+t;for(e=nr.comparatorOp.split("|"),n=0;n<e.length;n++)(t=e[n]).indexOf("!")>=0||"="!==t&&(nr.comparatorOp+="|\\!"+t)}();var rr=0,ar=1,ir=2,or=3,sr=4,lr=5,ur=6,cr=7,dr=8,fr=9,hr=10,pr=11,vr=12,gr=13,mr=14,yr=15,wr=16,br=17,xr=18,_r=19,Er=20,kr=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*H(e,t)}(e.selector,t.selector)})),Cr=function(){for(var e,t={},n=0;n<kr.length;n++)t[(e=kr[n]).selector]=e.matches;return t}(),Sr="("+kr.map((function(e){return e.selector})).join("|")+")",jr=function(e){return e.replace(new RegExp("\\\\("+nr.metaChar+")","g"),(function(e,t){return t}))},Mr=function(e,t,n){e[e.length-1]=n},Rr=[{name:"group",query:!0,regex:"("+nr.group+")",populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:rr,value:"*"===r?r:r+"s"})}},{name:"state",query:!0,regex:Sr,populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:cr,value:r})}},{name:"id",query:!0,regex:"\\#("+nr.id+")",populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:dr,value:jr(r)})}},{name:"className",query:!0,regex:"\\.("+nr.className+")",populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:fr,value:jr(r)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+nr.variable+")\\s*\\]",populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:sr,field:jr(r)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+nr.variable+")\\s*("+nr.comparatorOp+")\\s*("+nr.value+")\\s*\\]",populate:function(e,t,n){var r=p(n,3),a=r[0],i=r[1],o=r[2];o=null!=new RegExp("^"+nr.string+"$").exec(o)?o.substring(1,o.length-1):parseFloat(o),t.checks.push({type:or,field:jr(a),operator:i,value:o})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+nr.boolOp+")\\s*("+nr.variable+")\\s*\\]",populate:function(e,t,n){var r=p(n,2),a=r[0],i=r[1];t.checks.push({type:lr,field:jr(i),operator:a})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+nr.meta+")\\s*("+nr.comparatorOp+")\\s*("+nr.number+")\\s*\\]\\]",populate:function(e,t,n){var r=p(n,3),a=r[0],i=r[1],o=r[2];t.checks.push({type:ur,field:jr(a),operator:i,value:parseFloat(o)})}},{name:"nextQuery",separator:!0,regex:nr.separator,populate:function(e,t){var n=e.currentSubject,r=e.edgeCount,a=e.compoundCount,i=e[e.length-1];return null!=n&&(i.subject=n,e.currentSubject=null),i.edgeCount=r,i.compoundCount=a,e.edgeCount=0,e.compoundCount=0,e[e.length++]={checks:[]}}},{name:"directedEdge",separator:!0,regex:nr.directedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,a={checks:[]};return n.checks.push({type:pr,source:r,target:a}),Mr(e,0,n),e.edgeCount++,a}var i={checks:[]},o=t,s={checks:[]};return i.checks.push({type:vr,source:o,target:s}),Mr(e,0,i),e.edgeCount++,s}},{name:"undirectedEdge",separator:!0,regex:nr.undirectedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,a={checks:[]};return n.checks.push({type:hr,nodes:[r,a]}),Mr(e,0,n),e.edgeCount++,a}var i={checks:[]},o=t,s={checks:[]};return i.checks.push({type:mr,node:o,neighbor:s}),Mr(e,0,i),s}},{name:"child",separator:!0,regex:nr.child,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},a=e[e.length-1];return n.checks.push({type:yr,parent:a,child:r}),Mr(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var i={checks:[]},o=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return i.checks.push({type:_r,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:Er}],c.checks.push({type:Er}),s.checks.push({type:br,parent:c,child:u}),Mr(e,0,i),e.currentSubject=l,e.compoundCount++,u}var d={checks:[]},f={checks:[]},h=[{type:br,parent:d,child:f}];return d.checks=t.checks,t.checks=h,e.compoundCount++,f}},{name:"descendant",separator:!0,regex:nr.descendant,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},a=e[e.length-1];return n.checks.push({type:wr,ancestor:a,descendant:r}),Mr(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var i={checks:[]},o=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return i.checks.push({type:_r,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:Er}],c.checks.push({type:Er}),s.checks.push({type:xr,ancestor:c,descendant:u}),Mr(e,0,i),e.currentSubject=l,e.compoundCount++,u}var d={checks:[]},f={checks:[]},h=[{type:xr,ancestor:d,descendant:f}];return d.checks=t.checks,t.checks=h,e.compoundCount++,f}},{name:"subject",modifier:!0,regex:nr.subject,populate:function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return we("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t;var n=e[e.length-1].checks[0],r=null==n?null:n.type;r===pr?n.type=gr:r===hr&&(n.type=mr,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}];Rr.forEach((function(e){return e.regexObj=new RegExp("^"+e.regex)}));var Pr=function(e){for(var t,n,r,a=0;a<Rr.length;a++){var i=Rr[a],o=i.name,s=e.match(i.regexObj);if(null!=s){n=s,t=i,r=o;var l=s[0];e=e.substring(l.length);break}}return{expr:t,match:n,name:r,remaining:e}},Or={parse:function(e){var t=this,n=t.inputText=e,r=t[0]={checks:[]};for(t.length=1,n=function(e){var t=e.match(/^\s+/);if(t){var n=t[0];e=e.substring(n.length)}return e}(n);;){var a=Pr(n);if(null==a.expr)return we("The selector `"+e+"`is invalid"),!1;var i=a.match.slice(1),o=a.expr.populate(t,r,i);if(!1===o)return!1;if(null!=o&&(r=o),(n=a.remaining).match(/^\s*$/))break}var s=t[t.length-1];null!=t.currentSubject&&(s.subject=t.currentSubject),s.edgeCount=t.edgeCount,s.compoundCount=t.compoundCount;for(var l=0;l<t.length;l++){var u=t[l];if(u.compoundCount>0&&u.edgeCount>0)return we("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return we("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&we("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return _(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,i){var o=r.type,s=r.value;switch(o){case rr:var l=e(s);return l.substring(0,l.length-1);case or:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case lr:var d=r.operator,f=r.field;return"["+e(d)+f+"]";case sr:return"["+r.field+"]";case ur:var h=r.operator;return"[["+r.field+n(e(h))+t(s)+"]]";case cr:return s;case dr:return"#"+s;case fr:return"."+s;case br:case yr:return a(r.parent,i)+n(">")+a(r.child,i);case xr:case wr:return a(r.ancestor,i)+" "+a(r.descendant,i);case _r:var p=a(r.left,i),v=a(r.subject,i),g=a(r.right,i);return p+(p.length>0?" ":"")+v+g;case Er:return""}},a=function(e,t){return e.checks.reduce((function(n,a,i){return n+(t===e&&0===i?"$":"")+r(a,t)}),"")},i="",o=0;o<this.length;o++){var s=this[o];i+=a(s,s.subject),this.length>1&&o<this.length-1&&(i+=", ")}return this.toStringCache=i,i}},zr=function(e,t,n){var r,a,i,o=_(e),s=S(e),l=_(n),u=!1,c=!1,d=!1;switch(t.indexOf("!")>=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(a=o||s?""+e:"",i=""+n),u&&(e=a=a.toLowerCase(),n=i=i.toLowerCase()),t){case"*=":r=a.indexOf(i)>=0;break;case"$=":r=a.indexOf(i,a.length-i.length)>=0;break;case"^=":r=0===a.indexOf(i);break;case"=":r=e===n;break;case">":d=!0,r=e>n;break;case">=":d=!0,r=e>=n;break;case"<":d=!0,r=e<n;break;case"<=":d=!0,r=e<=n;break;default:r=!1}return!c||null==e&&d||(r=!r),r},Ar=function(e,t){return e.data(t)},Tr=[],Br=function(e,t){return e.checks.every((function(e){return Tr[e.type](e,t)}))};Tr[rr]=function(e,t){var n=e.value;return"*"===n||n===t.group()},Tr[cr]=function(e,t){return function(e,t){return Cr[e](t)}(e.value,t)},Tr[dr]=function(e,t){var n=e.value;return t.id()===n},Tr[fr]=function(e,t){var n=e.value;return t.hasClass(n)},Tr[ur]=function(e,t){var n=e.field,r=e.operator,a=e.value;return zr(function(e,t){return e[t]()}(t,n),r,a)},Tr[or]=function(e,t){var n=e.field,r=e.operator,a=e.value;return zr(Ar(t,n),r,a)},Tr[lr]=function(e,t){var n=e.field,r=e.operator;return function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}}(Ar(t,n),r)},Tr[sr]=function(e,t){var n=e.field;e.operator;return void 0!==Ar(t,n)},Tr[hr]=function(e,t){var n=e.nodes[0],r=e.nodes[1],a=t.source(),i=t.target();return Br(n,a)&&Br(r,i)||Br(r,a)&&Br(n,i)},Tr[mr]=function(e,t){return Br(e.node,t)&&t.neighborhood().some((function(t){return t.isNode()&&Br(e.neighbor,t)}))},Tr[pr]=function(e,t){return Br(e.source,t.source())&&Br(e.target,t.target())},Tr[vr]=function(e,t){return Br(e.source,t)&&t.outgoers().some((function(t){return t.isNode()&&Br(e.target,t)}))},Tr[gr]=function(e,t){return Br(e.target,t)&&t.incomers().some((function(t){return t.isNode()&&Br(e.source,t)}))},Tr[yr]=function(e,t){return Br(e.child,t)&&Br(e.parent,t.parent())},Tr[br]=function(e,t){return Br(e.parent,t)&&t.children().some((function(t){return Br(e.child,t)}))},Tr[wr]=function(e,t){return Br(e.descendant,t)&&t.ancestors().some((function(t){return Br(e.ancestor,t)}))},Tr[xr]=function(e,t){return Br(e.ancestor,t)&&t.descendants().some((function(t){return Br(e.descendant,t)}))},Tr[_r]=function(e,t){return Br(e.subject,t)&&Br(e.left,t)&&Br(e.right,t)},Tr[Er]=function(){return!0},Tr[ar]=function(e,t){return e.value.has(t)},Tr[ir]=function(e,t){return(0,e.value)(t)};var Dr={matches:function(e){for(var t=0;t<this.length;t++){var n=this[t];if(Br(n,e))return!0}return!1},filter:function(e){var t=this;if(1===t.length&&1===t[0].checks.length&&t[0].checks[0].type===dr)return e.getElementById(t[0].checks[0].value).collection();var n=function(e){for(var n=0;n<t.length;n++){var r=t[n];if(Br(r,e))return!0}return!1};return null==t.text()&&(n=function(){return!0}),e.filter(n)}},Nr=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==e||_(e)&&e.match(/^\s*$/)||(M(e)?this.addQuery({checks:[{type:ar,value:e.collection()}]}):E(e)?this.addQuery({checks:[{type:ir,value:e}]}):_(e)?this.parse(e)||(this.invalid=!0):me("A selector must be created from a string; found "))},Lr=Nr.prototype;[Or,Dr].forEach((function(e){return F(Lr,e)})),Lr.text=function(){return this.inputText},Lr.size=function(){return this.length},Lr.eq=function(e){return this[e]},Lr.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},Lr.addQuery=function(e){this[this.length++]=e},Lr.selector=Lr.toString;var Vr={allAre:function(e){var t=new Nr(e);return this.every((function(e){return t.matches(e)}))},is:function(e){var t=new Nr(e);return this.some((function(e){return t.matches(e)}))},some:function(e,t){for(var n=0;n<this.length;n++){if(t?e.apply(t,[this[n],n,this]):e(this[n],n,this))return!0}return!1},every:function(e,t){for(var n=0;n<this.length;n++){if(!(t?e.apply(t,[this[n],n,this]):e(this[n],n,this)))return!1}return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var t=this.length;return t===e.length&&(1===t?this[0]===e[0]:this.every((function(t){return e.hasElementWithId(t.id())})))},anySame:function(e){return e=this.cy().collection(e),this.some((function(t){return e.hasElementWithId(t.id())}))},allAreNeighbors:function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every((function(e){return t.hasElementWithId(e.id())}))},contains:function(e){e=this.cy().collection(e);var t=this;return e.every((function(e){return t.hasElementWithId(e.id())}))}};Vr.allAreNeighbours=Vr.allAreNeighbors,Vr.has=Vr.contains,Vr.equal=Vr.equals=Vr.same;var Ir,Hr,Fr=function(e,t){return function(n,r,a,i){var o,s=n,l=this;if(null==s?o="":M(s)&&1===s.length&&(o=s.id()),1===l.length&&o){var u=l[0]._private,c=u.traversalCache=u.traversalCache||{},d=c[t]=c[t]||[],f=oe(o),h=d[f];return h||(d[f]=e.call(l,n,r,a,i))}return e.call(l,n,r,a,i)}},Gr={parent:function(e){var t=[];if(1===this.length){var n=this[0]._private.parent;if(n)return n}for(var r=0;r<this.length;r++){var a=this[r]._private.parent;a&&t.push(a)}return this.spawn(t,!0).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var a=n[r];t.push(a)}n=n.parent()}return this.spawn(t,!0).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var r=this[n].parents();t=(t=t||r).intersect(r)}return t.filter(e)},orphans:function(e){return this.stdFilter((function(e){return e.isOrphan()})).filter(e)},nonorphans:function(e){return this.stdFilter((function(e){return e.isChild()})).filter(e)},children:Fr((function(e){for(var t=[],n=0;n<this.length;n++)for(var r=this[n]._private.children,a=0;a<r.length;a++)t.push(r[a]);return this.spawn(t,!0).filter(e)}),"children"),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},isChildless:function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},isChild:function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},descendants:function(e){var t=[];return function e(n){for(var r=0;r<n.length;r++){var a=n[r];t.push(a),a.children().nonempty()&&e(a.children())}}(this.children()),this.spawn(t,!0).filter(e)}};function Yr(e,t,n,r){for(var a=[],i=new Oe,o=e.cy().hasCompoundNodes(),s=0;s<e.length;s++){var l=e[s];n?a.push(l):o&&r(a,i,l)}for(;a.length>0;){var u=a.shift();t(u),i.add(u.id()),o&&r(a,i,u)}return e}function qr(e,t,n){if(n.isParent())for(var r=n._private.children,a=0;a<r.length;a++){var i=r[a];t.has(i.id())||e.push(i)}}function Wr(e,t,n){if(n.isChild()){var r=n._private.parent;t.has(r.id())||e.push(r)}}function Ur(e,t,n){Wr(e,t,n),qr(e,t,n)}Gr.forEachDown=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Yr(this,e,t,qr)},Gr.forEachUp=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Yr(this,e,t,Wr)},Gr.forEachUpAndDown=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Yr(this,e,t,Ur)},Gr.ancestors=Gr.parents,(Ir=Hr={data:Jn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Jn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Jn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Jn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Jn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Jn.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Ir.data,Ir.removeAttr=Ir.removeData;var Xr,$r,Kr=Hr,Zr={};function Qr(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,a=n[0],i=a._private.edges,o=0;o<i.length;o++){var s=i[o];!t&&s.isLoop()||(r+=e(a,s))}return r}}}function Jr(e,t){return function(n){for(var r,a=this.nodes(),i=0;i<a.length;i++){var o=a[i][e](n);void 0===o||void 0!==r&&!t(o,r)||(r=o)}return r}}F(Zr,{degree:Qr((function(e,t){return t.source().same(t.target())?2:1})),indegree:Qr((function(e,t){return t.target().same(e)?1:0})),outdegree:Qr((function(e,t){return t.source().same(e)?1:0}))}),F(Zr,{minDegree:Jr("degree",(function(e,t){return e<t})),maxDegree:Jr("degree",(function(e,t){return e>t})),minIndegree:Jr("indegree",(function(e,t){return e<t})),maxIndegree:Jr("indegree",(function(e,t){return e>t})),minOutdegree:Jr("outdegree",(function(e,t){return e<t})),maxOutdegree:Jr("outdegree",(function(e,t){return e>t}))}),F(Zr,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r<n.length;r++)t+=n[r].degree(e);return t}});var ea=function(e,t,n){for(var r=0;r<e.length;r++){var a=e[r];if(!a.locked()){var i=a._private.position,o={x:null!=t.x?t.x-i.x:0,y:null!=t.y?t.y-i.y:0};!a.isParent()||0===o.x&&0===o.y||a.children().shift(o,n),a.dirtyBoundingBoxCache()}}},ta={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,t){ea(e,t,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};Xr=$r={position:Jn.data(ta),silentPosition:Jn.data(F({},ta,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,t){ea(e,t,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,t){if(C(e))t?this.silentPosition(e):this.position(e);else if(E(e)){var n=e,r=this.cy();r.startBatch();for(var a=0;a<this.length;a++){var i,o=this[a];(i=n(o,a))&&(t?o.silentPosition(i):o.position(i))}r.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,t,n){var r;if(C(e)?(r={x:S(e.x)?e.x:0,y:S(e.y)?e.y:0},n=t):_(e)&&S(t)&&((r={x:0,y:0})[e]=t),null!=r){var a=this.cy();a.startBatch();for(var i=0;i<this.length;i++){var o=this[i];if(!(a.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this))){var s=o.position(),l={x:s.x+r.x,y:s.y+r.y};n?o.silentPosition(l):o.position(l)}}a.endBatch()}return this},silentShift:function(e,t){return C(e)?this.shift(e,!0):_(e)&&S(t)&&this.shift(e,t,!0),this},renderedPosition:function(e,t){var n=this[0],r=this.cy(),a=r.zoom(),i=r.pan(),o=C(e)?e:void 0,s=void 0!==o||void 0!==t&&_(e);if(n&&n.isNode()){if(!s){var l=n.position();return o=Xe(l,a,i),void 0===e?o:o[e]}for(var u=0;u<this.length;u++){var c=this[u];void 0!==t?c.position(e,(t-i[e])/a):void 0!==o&&c.position($e(o,a,i))}}else if(!s)return;return this},relativePosition:function(e,t){var n=this[0],r=this.cy(),a=C(e)?e:void 0,i=void 0!==a||void 0!==t&&_(e),o=r.hasCompoundNodes();if(n&&n.isNode()){if(!i){var s=n.position(),l=o?n.parent():null,u=l&&l.length>0,c=u;u&&(l=l[0]);var d=c?l.position():{x:0,y:0};return a={x:s.x-d.x,y:s.y-d.y},void 0===e?a:a[e]}for(var f=0;f<this.length;f++){var h=this[f],p=o?h.parent():null,v=p&&p.length>0,g=v;v&&(p=p[0]);var m=g?p.position():{x:0,y:0};void 0!==t?h.position(e,t+m[e]):void 0!==a&&h.position({x:a.x+m.x,y:a.y+m.y})}}else if(!i)return;return this}},Xr.modelPosition=Xr.point=Xr.position,Xr.modelPositions=Xr.points=Xr.positions,Xr.renderedPoint=Xr.renderedPosition,Xr.relativePoint=Xr.relativePosition;var na,ra,aa=$r;na=ra={},ra.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),a=n.pan(),i=t.x1*r+a.x,o=t.x2*r+a.x,s=t.y1*r+a.y,l=t.y2*r+a.y;return{x1:i,x2:o,y1:s,y2:l,w:o-i,h:l-s}},ra.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},ra.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,a={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-i.w/2,i.x2=o.x+i.w/2,i.y1=o.y-i.h/2,i.y2=o.y+i.h/2);var s=a.width.left.value;"px"===a.width.left.units&&a.width.val>0&&(s=100*s/a.width.val);var l=a.width.right.value;"px"===a.width.right.units&&a.width.val>0&&(l=100*l/a.width.val);var u=a.height.top.value;"px"===a.height.top.units&&a.height.val>0&&(u=100*u/a.height.val);var c=a.height.bottom.value;"px"===a.height.bottom.units&&a.height.val>0&&(c=100*c/a.height.val);var d=m(a.width.val-i.w,s,l),f=d.biasDiff,h=d.biasComplementDiff,p=m(a.height.val-i.h,u,c),v=p.biasDiff,g=p.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,a.width.val),o.x=(-f+i.x1+i.x2+h)/2,t.autoHeight=Math.max(i.h,a.height.val),o.y=(-v+i.y1+i.y2+g)/2}function m(e,t,n){var r=0,a=0,i=t+n;return e>0&&i>0&&(r=t/i*e,a=n/i*e),{biasDiff:r,biasComplementDiff:a}}}for(var r=0;r<this.length;r++){var a=this[r],i=a._private;i.compoundBoundsClean&&!e||(n(a),t.batching()||(i.compoundBoundsClean=!0))}return this};var ia=function(e){return e===1/0||e===-1/0?0:e},oa=function(e,t,n,r,a){r-t!=0&&a-n!=0&&null!=t&&null!=n&&null!=r&&null!=a&&(e.x1=t<e.x1?t:e.x1,e.x2=r>e.x2?r:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=a>e.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},sa=function(e,t){return null==t?e:oa(e,t.x1,t.y1,t.x2,t.y2)},la=function(e,t,n){return je(e,t,n)},ua=function(e,t,n){if(!t.cy().headless()){var r,a,i=t._private,o=i.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,a=o.srcY):"target"===n?(r=o.tgtX,a=o.tgtY):(r=o.midX,a=o.midY);var l=i.arrowBounds=i.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=a-s,u.x2=r+s,u.y2=a+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,lt(u,1),oa(e,u.x1,u.y1,u.x2,u.y2)}}},ca=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var a=t._private,i=a.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),d=t.pstyle("text-valign"),f=la(i,"labelWidth",n),h=la(i,"labelHeight",n),p=la(i,"labelX",n),v=la(i,"labelY",n),g=t.pstyle(r+"text-margin-x").pfValue,m=t.pstyle(r+"text-margin-y").pfValue,y=t.isEdge(),w=t.pstyle(r+"text-rotation"),b=t.pstyle("text-outline-width").pfValue,x=t.pstyle("text-border-width").pfValue/2,_=t.pstyle("text-background-padding").pfValue,E=h,k=f,C=k/2,S=E/2;if(y)o=p-C,s=p+C,l=v-S,u=v+S;else{switch(c.value){case"left":o=p-k,s=p;break;case"center":o=p-C,s=p+C;break;case"right":o=p,s=p+k}switch(d.value){case"top":l=v-E,u=v;break;case"center":l=v-S,u=v+S;break;case"bottom":l=v,u=v+E}}o+=g-Math.max(b,x)-_-2,s+=g+Math.max(b,x)+_+2,l+=m-Math.max(b,x)-_-2,u+=m+Math.max(b,x)+_+2;var j=n||"main",M=a.labelBounds,R=M[j]=M[j]||{};R.x1=o,R.y1=l,R.x2=s,R.y2=u,R.w=s-o,R.h=u-l;var P=y&&"autorotate"===w.strValue,O=null!=w.pfValue&&0!==w.pfValue;if(P||O){var z=P?la(a.rstyle,"labelAngle",n):w.pfValue,A=Math.cos(z),T=Math.sin(z),B=(o+s)/2,D=(l+u)/2;if(!y){switch(c.value){case"left":B=s;break;case"right":B=o}switch(d.value){case"top":D=u;break;case"bottom":D=l}}var N=function(e,t){return{x:(e-=B)*A-(t-=D)*T+B,y:e*T+t*A+D}},L=N(o,l),V=N(o,u),I=N(s,l),H=N(s,u);o=Math.min(L.x,V.x,I.x,H.x),s=Math.max(L.x,V.x,I.x,H.x),l=Math.min(L.y,V.y,I.y,H.y),u=Math.max(L.y,V.y,I.y,H.y)}var F=j+"Rot",G=M[F]=M[F]||{};G.x1=o,G.y1=l,G.x2=s,G.y2=u,G.w=s-o,G.h=u-l,oa(e,o,l,s,u),oa(a.labelBounds.all,o,l,s,u)}return e}},da=function(e){var t=0,n=function(e){return(e?1:0)<<t++},r=0;return r+=n(e.incudeNodes),r+=n(e.includeEdges),r+=n(e.includeLabels),r+=n(e.includeMainLabels),r+=n(e.includeSourceLabels),r+=n(e.includeTargetLabels),r+=n(e.includeOverlays)},fa=function(e){if(e.isEdge()){var t=e.source().position(),n=e.target().position(),r=function(e){return Math.round(e)};return function(e,t){var n={value:0,done:!1},r=0,a=e.length;return te({next:function(){return r<a?n.value=e[r++]:n.done=!0,n}},t)}([r(t.x),r(t.y),r(n.x),r(n.y)])}return 0},ha=function(e,t){var n,r=e._private,a=e.isEdge(),i=(null==t?va:da(t))===va,o=fa(e),s=r.bbCachePosKey===o,l=t.useCache&&s,u=function(e){return null==e._private.bbCache||e._private.styleDirty};if(!l||u(e)||a&&u(e.source())||u(e.target())?(s||e.recalculateRenderedStyle(l),n=function(e,t){var n,r,a,i,o,s,l,u=e._private.cy,c=u.styleEnabled(),d=u.headless(),f=ot(),h=e._private,p=e.isNode(),v=e.isEdge(),g=h.rstyle,m=p&&c?e.pstyle("bounds-expansion").pfValue:[0],y=function(e){return"none"!==e.pstyle("display").value},w=!c||y(e)&&(!v||y(e.source())&&y(e.target()));if(w){var b=0;c&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(b=e.pstyle("overlay-padding").value);var x=0;if(c&&(x=e.pstyle("width").pfValue/2),p&&t.includeNodes){var _=e.position();o=_.x,s=_.y;var E=e.outerWidth()/2,k=e.outerHeight()/2;oa(f,n=o-E,a=s-k,r=o+E,i=s+k)}else if(v&&t.includeEdges)if(c&&!d){var C=e.pstyle("curve-style").strValue;if(n=Math.min(g.srcX,g.midX,g.tgtX),r=Math.max(g.srcX,g.midX,g.tgtX),a=Math.min(g.srcY,g.midY,g.tgtY),i=Math.max(g.srcY,g.midY,g.tgtY),oa(f,n-=x,a-=x,r+=x,i+=x),"haystack"===C){var S=g.haystackPts;if(S&&2===S.length){if(n=S[0].x,a=S[0].y,n>(r=S[1].x)){var j=n;n=r,r=j}if(a>(i=S[1].y)){var M=a;a=i,i=M}oa(f,n-x,a-x,r+x,i+x)}}else if("bezier"===C||"unbundled-bezier"===C||"segments"===C||"taxi"===C){var R;switch(C){case"bezier":case"unbundled-bezier":R=g.bezierPts;break;case"segments":case"taxi":R=g.linePts}if(null!=R)for(var P=0;P<R.length;P++){var O=R[P];n=O.x-x,r=O.x+x,a=O.y-x,i=O.y+x,oa(f,n,a,r,i)}}}else{var z=e.source().position(),A=e.target().position();if((n=z.x)>(r=A.x)){var T=n;n=r,r=T}if((a=z.y)>(i=A.y)){var B=a;a=i,i=B}oa(f,n-=x,a-=x,r+=x,i+=x)}if(c&&t.includeEdges&&v&&(ua(f,e,"mid-source"),ua(f,e,"mid-target"),ua(f,e,"source"),ua(f,e,"target")),c&&"yes"===e.pstyle("ghost").value){var D=e.pstyle("ghost-offset-x").pfValue,N=e.pstyle("ghost-offset-y").pfValue;oa(f,f.x1+D,f.y1+N,f.x2+D,f.y2+N)}var L=h.bodyBounds=h.bodyBounds||{};ct(L,f),ut(L,m),lt(L,1),c&&(n=f.x1,r=f.x2,a=f.y1,i=f.y2,oa(f,n-b,a-b,r+b,i+b));var V=h.overlayBounds=h.overlayBounds||{};ct(V,f),ut(V,m),lt(V,1);var I=h.labelBounds=h.labelBounds||{};null!=I.all?((l=I.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):I.all=ot(),c&&t.includeLabels&&(t.includeMainLabels&&ca(f,e,null),v&&(t.includeSourceLabels&&ca(f,e,"source"),t.includeTargetLabels&&ca(f,e,"target")))}return f.x1=ia(f.x1),f.y1=ia(f.y1),f.x2=ia(f.x2),f.y2=ia(f.y2),f.w=ia(f.x2-f.x1),f.h=ia(f.y2-f.y1),f.w>0&&f.h>0&&w&&(ut(f,m),lt(f,1)),f}(e,pa),r.bbCache=n,r.bbCachePosKey=o):n=r.bbCache,!i){var c=e.isNode();n=ot(),(t.includeNodes&&c||t.includeEdges&&!c)&&(t.includeOverlays?sa(n,r.overlayBounds):sa(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!a||t.includeSourceLabels&&t.includeTargetLabels)?sa(n,r.labelBounds.all):(t.includeMainLabels&&sa(n,r.labelBounds.mainRot),t.includeSourceLabels&&sa(n,r.labelBounds.sourceRot),t.includeTargetLabels&&sa(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},pa={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,useCache:!0},va=da(pa),ga=ke(pa);ra.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=ot();var n=ga(e=e||pa),r=this;if(r.cy().styleEnabled())for(var a=0;a<r.length;a++){var i=r[a],o=i._private,s=fa(i),l=o.bbCachePosKey===s,u=n.useCache&&l&&!o.styleDirty;i.recalculateRenderedStyle(u)}this.updateCompoundBounds(!e.useCache);for(var c=0;c<r.length;c++){var d=r[c];sa(t,ha(d,n))}}else e=void 0===e?pa:ga(e),t=ha(this[0],e);return t.x1=ia(t.x1),t.y1=ia(t.y1),t.x2=ia(t.x2),t.y2=ia(t.y2),t.w=ia(t.x2-t.x1),t.h=ia(t.y2-t.y1),t},ra.dirtyBoundingBoxCache=function(){for(var e=0;e<this.length;e++){var t=this[e]._private;t.bbCache=null,t.bbCachePosKey=null,t.bodyBounds=null,t.overlayBounds=null,t.labelBounds.all=null,t.labelBounds.source=null,t.labelBounds.target=null,t.labelBounds.main=null,t.labelBounds.sourceRot=null,t.labelBounds.targetRot=null,t.labelBounds.mainRot=null,t.arrowBounds.source=null,t.arrowBounds.target=null,t.arrowBounds["mid-source"]=null,t.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},ra.boundingBoxAt=function(e){var t=this.nodes(),n=this.cy(),r=n.hasCompoundNodes(),a=n.collection();if(r&&(a=t.filter((function(e){return e.isParent()})),t=t.not(a)),C(e)){var i=e;e=function(){return i}}n.startBatch(),t.forEach((function(t,n){return t._private.bbAtOldPos=e(t,n)})).silentPositions(e),r&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0));var o=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}}(this.boundingBox({useCache:!1}));return t.silentPositions((function(e){return e._private.bbAtOldPos})),r&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),n.endBatch(),o},na.boundingbox=na.bb=na.boundingBox,na.renderedBoundingbox=na.renderedBoundingBox;var ma,ya,wa=ra;ma=ya={};var ba=function(e){e.uppercaseName=V(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=V(e.outerName),ma[e.name]=function(){var t=this[0],n=t._private,r=n.cy._private.styleEnabled;if(t){if(r){if(t.isParent())return t.updateCompoundBounds(),n[e.autoName]||0;var a=t.pstyle(e.name);return"label"===a.strValue?(t.recalculateRenderedStyle(),n.rstyle[e.labelName]||0):a.pfValue}return 1}},ma["outer"+e.uppercaseName]=function(){var t=this[0],n=t._private.cy._private.styleEnabled;if(t)return n?t[e.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},ma["rendered"+e.uppercaseName]=function(){var t=this[0];if(t)return t[e.name]()*this.cy().zoom()},ma["rendered"+e.uppercaseOuterName]=function(){var t=this[0];if(t)return t[e.outerName]()*this.cy().zoom()}};ba({name:"width"}),ba({name:"height"}),ya.padding=function(){var e=this[0],t=e._private;return e.isParent()?(e.updateCompoundBounds(),void 0!==t.autoPadding?t.autoPadding:e.pstyle("padding").pfValue):e.pstyle("padding").pfValue},ya.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},ya.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()};var xa=ya,_a={controlPoints:{get:function(e){return e.renderer().getControlPoints(e)},mult:!0},segmentPoints:{get:function(e){return e.renderer().getSegmentPoints(e)},mult:!0},sourceEndpoint:{get:function(e){return e.renderer().getSourceEndpoint(e)}},targetEndpoint:{get:function(e){return e.renderer().getTargetEndpoint(e)}},midpoint:{get:function(e){return e.renderer().getEdgeMidpoint(e)}}},Ea=Object.keys(_a).reduce((function(e,t){var n=_a[t],r=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)}(t);return e[t]=function(){return function(e,t){if(e.isEdge())return t(e)}(this,n.get)},n.mult?e[r]=function(){return function(e,t){if(e.isEdge()){var n=e.cy(),r=n.pan(),a=n.zoom();return t(e).map((function(e){return Xe(e,a,r)}))}}(this,n.get)}:e[r]=function(){return function(e,t){if(e.isEdge()){var n=e.cy();return Xe(t(e),n.zoom(),n.pan())}}(this,n.get)},e}),{}),ka=F({},aa,wa,xa,Ea),Ca=function(e,t){this.recycle(e,t)};function Sa(){return!1}function ja(){return!0}Ca.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=Sa,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?ja:Sa):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=null!=t.type?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var n=this.position,r=this.cy.zoom(),a=this.cy.pan();this.renderedPosition={x:n.x*r+a.x,y:n.y*r+a.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=ja;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=ja;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ja,this.stopPropagation()},isDefaultPrevented:Sa,isPropagationStopped:Sa,isImmediatePropagationStopped:Sa};var Ma=/^([^.]+)(\.(?:[^.]+))?$/,Ra={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},Pa=Object.keys(Ra),Oa={};function za(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oa,t=arguments.length>1?arguments[1]:void 0,n=0;n<Pa.length;n++){var r=Pa[n];this[r]=e[r]||Ra[r]}this.context=t||this.context,this.listeners=[],this.emitting=0}var Aa=za.prototype,Ta=function(e,t,n,r,a,i,o){E(r)&&(a=r,r=null),o&&(i=null==i?o:F({},i,o));for(var s=k(n)?n:n.split(/\s+/),l=0;l<s.length;l++){var u=s[l];if(!A(u)){var c=u.match(Ma);if(c)if(!1===t(e,u,c[1],c[2]?c[2]:null,r,a,i))break}}},Ba=function(e,t){return e.addEventFields(e.context,t),new Ca(t.type,t)},Da=function(e,t,n){if("event"!==x(n))if(C(n))t(e,Ba(e,n));else for(var r=k(n)?n:n.split(/\s+/),a=0;a<r.length;a++){var i=r[a];if(!A(i)){var o=i.match(Ma);if(o){var s=o[1],l=o[2]?o[2]:null;t(e,Ba(e,{type:s,namespace:l,target:e.context}))}}}else t(e,n)};Aa.on=Aa.addListener=function(e,t,n,r,a){return Ta(this,(function(e,t,n,r,a,i,o){E(i)&&e.listeners.push({event:t,callback:i,type:n,namespace:r,qualifier:a,conf:o})}),e,t,n,r,a),this},Aa.one=function(e,t,n,r){return this.on(e,t,n,r,{one:!0})},Aa.removeListener=Aa.off=function(e,t,n,r){var a=this;0!==this.emitting&&(this.listeners=this.listeners.slice());for(var i=this.listeners,o=function(o){var s=i[o];Ta(a,(function(t,n,r,a,l,u){if((s.type===r||"*"===e)&&(!a&&".*"!==s.namespace||s.namespace===a)&&(!l||t.qualifierCompare(s.qualifier,l))&&(!u||s.callback===u))return i.splice(o,1),!1}),e,t,n,r)},s=i.length-1;s>=0;s--)o(s);return this},Aa.removeAllListeners=function(){return this.removeListener("*")},Aa.emit=Aa.trigger=function(e,t,n){var r=this.listeners,a=r.length;return this.emitting++,k(t)||(t=[t]),Da(this,(function(e,i){null!=n&&(r=[{event:i.event,type:i.type,namespace:i.namespace,callback:n}],a=r.length);for(var o=function(n){var a=r[n];if(a.type===i.type&&(!a.namespace||a.namespace===i.namespace||".*"===a.namespace)&&e.eventMatches(e.context,a,i)){var o=[i];null!=t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.push(r)}}(o,t),e.beforeEmit(e.context,a,i),a.conf&&a.conf.one&&(e.listeners=e.listeners.filter((function(e){return e!==a})));var s=e.callbackContext(e.context,a,i),l=a.callback.apply(s,o);e.afterEmit(e.context,a,i),!1===l&&(i.stopPropagation(),i.preventDefault())}},s=0;s<a;s++)o(s);e.bubble(e.context)&&!i.isPropagationStopped()&&e.parent(e.context).emit(i,t)}),e),this.emitting--,this};var Na={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&R(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e.cy(),t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e},beforeEmit:function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},La=function(e){return _(e)?new Nr(e):e},Va={createEmitter:function(){for(var e=0;e<this.length;e++){var t=this[e],n=t._private;n.emitter||(n.emitter=new za(Na,t))}return this},emitter:function(){return this._private.emitter},on:function(e,t,n){for(var r=La(t),a=0;a<this.length;a++){this[a].emitter().on(e,r,n)}return this},removeListener:function(e,t,n){for(var r=La(t),a=0;a<this.length;a++){this[a].emitter().removeListener(e,r,n)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){this[e].emitter().removeAllListeners()}return this},one:function(e,t,n){for(var r=La(t),a=0;a<this.length;a++){this[a].emitter().one(e,r,n)}return this},once:function(e,t,n){for(var r=La(t),a=0;a<this.length;a++){this[a].emitter().on(e,r,n,{once:!0,onceCollection:this})}},emit:function(e,t){for(var n=0;n<this.length;n++){this[n].emitter().emit(e,t)}return this},emitAndNotify:function(e,t){if(0!==this.length)return this.cy().notify(e,this),this.emit(e,t),this}};Jn.eventAliasesOn(Va);var Ia={nodes:function(e){return this.filter((function(e){return e.isNode()})).filter(e)},edges:function(e){return this.filter((function(e){return e.isEdge()})).filter(e)},byGroup:function(){for(var e=this.spawn(),t=this.spawn(),n=0;n<this.length;n++){var r=this[n];r.isNode()?e.push(r):t.push(r)}return{nodes:e,edges:t}},filter:function(e,t){if(void 0===e)return this;if(_(e)||M(e))return new Nr(e).filter(this);if(E(e)){for(var n=this.spawn(),r=this,a=0;a<r.length;a++){var i=r[a];(t?e.apply(t,[i,a,r]):e(i,a,r))&&n.push(i)}return n}return this.spawn()},not:function(e){if(e){_(e)&&(e=this.filter(e));for(var t=this.spawn(),n=0;n<this.length;n++){var r=this[n];e.has(r)||t.push(r)}return t}return this},absoluteComplement:function(){return this.cy().mutableElements().not(this)},intersect:function(e){if(_(e)){var t=e;return this.filter(t)}for(var n=this.spawn(),r=e,a=this.length<e.length,i=a?this:r,o=a?r:this,s=0;s<i.length;s++){var l=i[s];o.has(l)&&n.push(l)}return n},xor:function(e){var t=this._private.cy;_(e)&&(e=t.$(e));var n=this.spawn(),r=e,a=function(e,t){for(var r=0;r<e.length;r++){var a=e[r],i=a._private.data.id;t.hasElementWithId(i)||n.push(a)}};return a(this,r),a(r,this),n},diff:function(e){var t=this._private.cy;_(e)&&(e=t.$(e));var n=this.spawn(),r=this.spawn(),a=this.spawn(),i=e,o=function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r],o=i._private.data.id;t.hasElementWithId(o)?a.merge(i):n.push(i)}};return o(this,i,n),o(i,this,r),{left:n,right:r,both:a}},add:function(e){var t=this._private.cy;if(!e)return this;if(_(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=this.spawnSelf(),a=0;a<e.length;a++){var i=e[a],o=!this.has(i);o&&r.push(i)}return r},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&_(e)){var r=e;e=n.mutableElements().filter(r)}for(var a=t.map,i=0;i<e.length;i++){var o=e[i],s=o._private.data.id;if(!a.has(s)){var l=this.length++;this[l]=o,a.set(s,{ele:o,index:l})}}return this},unmergeAt:function(e){var t=this[e].id(),n=this._private.map;this[e]=void 0,n.delete(t);var r=e===this.length-1;if(this.length>1&&!r){var a=this.length-1,i=this[a],o=i._private.data.id;this[a]=void 0,this[e]=i,n.set(o,{ele:i,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var a=r.index;return this.unmergeAt(a),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&_(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r<e.length;r++)this.unmergeOne(e[r]);return this},unmergeBy:function(e){for(var t=this.length-1;t>=0;t--){e(this[t])&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,a=0;a<r.length;a++){var i=r[a],o=t?e.apply(t,[i,a,r]):e(i,a,r);n.push(o)}return n},reduce:function(e,t){for(var n=t,r=this,a=0;a<r.length;a++)n=e(n,r[a],a,r);return n},max:function(e,t){for(var n,r=-1/0,a=this,i=0;i<a.length;i++){var o=a[i],s=t?e.apply(t,[o,i,a]):e(o,i,a);s>r&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,a=this,i=0;i<a.length;i++){var o=a[i],s=t?e.apply(t,[o,i,a]):e(o,i,a);s<r&&(r=s,n=o)}return{value:r,ele:n}}},Ha=Ia;Ha.u=Ha["|"]=Ha["+"]=Ha.union=Ha.or=Ha.add,Ha["\\"]=Ha["!"]=Ha["-"]=Ha.difference=Ha.relativeComplement=Ha.subtract=Ha.not,Ha.n=Ha["&"]=Ha["."]=Ha.and=Ha.intersection=Ha.intersect,Ha["^"]=Ha["(+)"]=Ha["(-)"]=Ha.symmetricDifference=Ha.symdiff=Ha.xor,Ha.fnFilter=Ha.filterFn=Ha.stdFilter=Ha.filter,Ha.complement=Ha.abscomp=Ha.absoluteComplement;var Fa=function(e,t){var n=e.cy().hasCompoundNodes();function r(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?n?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?fe:0}var a=r(e)-r(t);if(0!==a)return a;function i(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var o=i(e)-i(t);if(0!==o)return o;var s=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==s?s:e.poolIndex()-t.poolIndex()},Ga={forEach:function(e,t){if(E(e))for(var n=this.length,r=0;r<n;r++){var a=this[r];if(!1===(t?e.apply(t,[a,r,this]):e(a,r,this)))break}return this},toArray:function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},slice:function(e,t){var n=[],r=this.length;null==t&&(t=r),null==e&&(e=0),e<0&&(e=r+e),t<0&&(t=r+t);for(var a=e;a>=0&&a<t&&a<r;a++)n.push(this[a]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(e){if(!E(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(Fa)},zDepth:function(){var e=this[0];if(e){var t=e._private;if("nodes"===t.group){var n=t.data.parent?e.parents().size():0;return e.isParent()?n:fe-1}var r=t.source,a=t.target,i=r.zDepth(),o=a.zDepth();return Math.max(i,o,0)}}};Ga.each=Ga.forEach;var Ya;Ya="undefined",("undefined"==typeof Symbol?"undefined":u(Symbol))!=Ya&&u(Symbol.iterator)!=Ya&&(Ga[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},n=0,r=this.length;return h({next:function(){return n<r?t.value=e[n++]:(t.value=void 0,t.done=!0),t}},Symbol.iterator,(function(){return this}))});var qa=ke({nodeDimensionsIncludeLabels:!1}),Wa={layoutDimensions:function(e){var t;if(e=qa(e),this.takesUpSpace())if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();t={w:n.w,h:n.h}}else t={w:this.outerWidth(),h:this.outerHeight()};else t={w:0,h:0};return 0!==t.w&&0!==t.h||(t.w=t.h=1),t},layoutPositions:function(e,t,n){var r=this.nodes().filter((function(e){return!e.isParent()})),a=this.cy(),i=t.eles,o=function(e){return e.id()},s=B(n,o);e.emit({type:"layoutstart",layout:e}),e.animations=[];var l=t.spacingFactor&&1!==t.spacingFactor,u=function(){if(!l)return null;for(var e=ot(),t=0;t<r.length;t++){var n=r[t],a=s(n,t);st(e,a.x,a.y)}return e}(),c=B((function(e,n){var r=s(e,n);l&&(r=function(e,t,n){var r=t.x1+t.w/2,a=t.y1+t.h/2;return{x:r+(n.x-r)*e,y:a+(n.y-a)*e}}(Math.abs(t.spacingFactor),u,r));return null!=t.transform&&(r=t.transform(e,r)),r}),o);if(t.animate){for(var d=0;d<r.length;d++){var f=r[d],h=c(f,d);if(null==t.animateFilter||t.animateFilter(f,d)){var p=f.animation({position:h,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(p)}else f.position(h)}if(t.fit){var v=a.animation({fit:{boundingBox:i.boundingBoxAt(c),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(v)}else if(void 0!==t.zoom&&void 0!==t.pan){var g=a.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(g)}e.animations.forEach((function(e){return e.play()})),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),Un.all(e.animations.map((function(e){return e.promise()}))).then((function(){e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e})}))}else r.positions(c),t.fit&&a.fit(t.eles,t.padding),null!=t.zoom&&a.zoom(t.zoom),t.pan&&a.pan(t.pan),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e});return this},layout:function(e){return this.cy().makeLayout(F({},e,{eles:this}))}};function Ua(e,t,n){var r,a=n._private,i=a.styleCache=a.styleCache||[];return null!=(r=i[e])?r:r=i[e]=t(n)}function Xa(e,t){return e=oe(e),function(n){return Ua(e,t,n)}}function $a(e,t){e=oe(e);var n=function(e){return t.call(e)};return function(){var t=this[0];if(t)return Ua(e,n,t)}}Wa.createLayout=Wa.makeLayout=Wa.layout;var Ka={recalculateRenderedStyle:function(e){var t=this.cy(),n=t.renderer(),r=t.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var e,t=this.cy(),n=function(e){return e._private.styleCache=null};t.hasCompoundNodes()?((e=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(e.connectedEdges()),e.forEach(n)):this.forEach((function(e){n(e),e.connectedEdges().forEach(n)}));return this},updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t.batching())return t._private.batchStyleEles.merge(this),this;var n=this;e=!(!e&&void 0!==e),t.hasCompoundNodes()&&(n=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var r=n;return e?r.emitAndNotify("style"):r.emit("style"),n.forEach((function(e){return e._private.styleDirty=!0})),this},cleanStyle:function(){var e=this.cy();if(e.styleEnabled())for(var t=0;t<this.length;t++){var n=this[t];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},parsedStyle:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var a=n._private.style[e];return null!=a?a:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=n.style();if(C(e)){var a=e;r.applyBypass(this,a,false),this.emitAndNotify("style")}else if(_(e)){if(void 0===t){var i=this[0];return i?r.getStylePropertyValue(i,e):void 0}r.applyBypass(this,e,t,false),this.emitAndNotify("style")}else if(void 0===e){var o=this[0];return o?r.getRawStyle(o):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=t.style(),r=this;if(void 0===e)for(var a=0;a<r.length;a++){var i=r[a];n.removeAllBypasses(i,false)}else{e=e.split(/\s+/);for(var o=0;o<r.length;o++){var s=r[o];n.removeBypasses(s,e,false)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var t=e.hasCompoundNodes(),n=this[0];if(n){var r=n._private,a=n.pstyle("opacity").value;if(!t)return a;var i=r.data.parent?n.parents():null;if(i)for(var o=0;o<i.length;o++){a*=i[o].pstyle("opacity").value}return a}},transparent:function(){if(!this.cy().styleEnabled())return!1;var e=this[0],t=e.cy().hasCompoundNodes();return e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}};function Za(e,t){var n=e._private.data.parent?e.parents():null;if(n)for(var r=0;r<n.length;r++){if(!t(n[r]))return!1}return!0}function Qa(e){var t=e.ok,n=e.edgeOkViaNode||e.ok,r=e.parentOk||e.ok;return function(){var e=this.cy();if(!e.styleEnabled())return!0;var a=this[0],i=e.hasCompoundNodes();if(a){var o=a._private;if(!t(a))return!1;if(a.isNode())return!i||Za(a,r);var s=o.source,l=o.target;return n(s)&&(!i||Za(s,n))&&(s===l||n(l)&&(!i||Za(l,n)))}}}var Ja=Xa("eleTakesUpSpace",(function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())}));Ka.takesUpSpace=$a("takesUpSpace",Qa({ok:Ja}));var ei=Xa("eleInteractive",(function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&Ja(e)})),ti=Xa("parentInteractive",(function(e){return"visible"===e.pstyle("visibility").value&&Ja(e)}));Ka.interactive=$a("interactive",Qa({ok:ei,parentOk:ti,edgeOkViaNode:Ja})),Ka.noninteractive=function(){var e=this[0];if(e)return!e.interactive()};var ni=Xa("eleVisible",(function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&Ja(e)})),ri=Ja;Ka.visible=$a("visible",Qa({ok:ni,edgeOkViaNode:ri})),Ka.hidden=function(){var e=this[0];if(e)return!e.visible()},Ka.isBundledBezier=$a("isBundledBezier",(function(){return!!this.cy().styleEnabled()&&(!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace())})),Ka.bypass=Ka.css=Ka.style,Ka.renderedCss=Ka.renderedStyle,Ka.removeBypass=Ka.removeCss=Ka.removeStyle,Ka.pstyle=Ka.parsedStyle;var ai={};function ii(e){return function(){var t=arguments,n=[];if(2===t.length){var r=t[0],a=t[1];this.on(e.event,r,a)}else if(1===t.length&&E(t[0])){var i=t[0];this.on(e.event,i)}else if(0===t.length||1===t.length&&k(t[0])){for(var o=1===t.length?t[0]:null,s=0;s<this.length;s++){var l=this[s],u=!e.ableField||l._private[e.ableField],c=l._private[e.field]!=e.value;if(e.overrideAble){var d=e.overrideAble(l);if(void 0!==d&&(u=d,!d))return this}u&&(l._private[e.field]=e.value,c&&n.push(l))}var f=this.spawn(n);f.updateStyle(),f.emit(e.event),o&&f.emit(o)}return this}}function oi(e){ai[e.field]=function(){var t=this[0];if(t){if(e.overrideField){var n=e.overrideField(t);if(void 0!==n)return n}return t._private[e.field]}},ai[e.on]=ii({event:e.on,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!0}),ai[e.off]=ii({event:e.off,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!1})}oi({field:"locked",overrideField:function(e){return!!e.cy().autolock()||void 0},on:"lock",off:"unlock"}),oi({field:"grabbable",overrideField:function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},on:"grabify",off:"ungrabify"}),oi({field:"selected",ableField:"selectable",overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),oi({field:"selectable",overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),ai.deselect=ai.unselect,ai.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},oi({field:"active",on:"activate",off:"unactivate"}),oi({field:"pannable",on:"panify",off:"unpanify"}),ai.inactive=function(){var e=this[0];if(e)return!e._private.active};var si={},li=function(e){return function(t){for(var n=[],r=0;r<this.length;r++){var a=this[r];if(a.isNode()){for(var i=!1,o=a.connectedEdges(),s=0;s<o.length;s++){var l=o[s],u=l.source(),c=l.target();if(e.noIncomingEdges&&c===a&&u!==a||e.noOutgoingEdges&&u===a&&c!==a){i=!0;break}}i||n.push(a)}}return this.spawn(n,!0).filter(t)}},ui=function(e){return function(t){for(var n=[],r=0;r<this.length;r++){var a=this[r];if(a.isNode())for(var i=a.connectedEdges(),o=0;o<i.length;o++){var s=i[o],l=s.source(),u=s.target();e.outgoing&&l===a?(n.push(s),n.push(u)):e.incoming&&u===a&&(n.push(s),n.push(l))}}return this.spawn(n,!0).filter(t)}},ci=function(e){return function(t){for(var n=this,r=[],a={};;){var i=e.outgoing?n.outgoers():n.incomers();if(0===i.length)break;for(var o=!1,s=0;s<i.length;s++){var l=i[s],u=l.id();a[u]||(a[u]=!0,r.push(l),o=!0)}if(!o)break;n=i}return this.spawn(r,!0).filter(t)}};function di(e){return function(t){for(var n=[],r=0;r<this.length;r++){var a=this[r]._private[e.attr];a&&n.push(a)}return this.spawn(n,!0).filter(t)}}function fi(e){return function(t){var n=[],r=this._private.cy,a=e||{};_(t)&&(t=r.$(t));for(var i=0;i<t.length;i++)for(var o=t[i]._private.edges,s=0;s<o.length;s++){var l=o[s],u=l._private.data,c=this.hasElementWithId(u.source)&&t.hasElementWithId(u.target),d=t.hasElementWithId(u.source)&&this.hasElementWithId(u.target);if(c||d){if(a.thisIsSrc||a.thisIsTgt){if(a.thisIsSrc&&!c)continue;if(a.thisIsTgt&&!d)continue}n.push(l)}}return this.spawn(n,!0)}}function hi(e){return e=F({},{codirected:!1},e),function(t){for(var n=[],r=this.edges(),a=e,i=0;i<r.length;i++)for(var o=r[i]._private,s=o.source,l=s._private.data.id,u=o.data.target,c=s._private.edges,d=0;d<c.length;d++){var f=c[d],h=f._private.data,p=h.target,v=h.source,g=p===u&&v===l,m=l===p&&u===v;(a.codirected&&g||!a.codirected&&(g||m))&&n.push(f)}return this.spawn(n,!0).filter(t)}}si.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},F(si,{roots:li({noIncomingEdges:!0}),leaves:li({noOutgoingEdges:!0}),outgoers:Fr(ui({outgoing:!0}),"outgoers"),successors:ci({outgoing:!0}),incomers:Fr(ui({incoming:!0}),"incomers"),predecessors:ci({incoming:!0})}),F(si,{neighborhood:Fr((function(e){for(var t=[],n=this.nodes(),r=0;r<n.length;r++)for(var a=n[r],i=a.connectedEdges(),o=0;o<i.length;o++){var s=i[o],l=s.source(),u=s.target(),c=a===l?u:l;c.length>0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),si.neighbourhood=si.neighborhood,si.closedNeighbourhood=si.closedNeighborhood,si.openNeighbourhood=si.openNeighborhood,F(si,{source:Fr((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Fr((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:di({attr:"source"}),targets:di({attr:"target"})}),F(si,{edgesWith:Fr(fi(),"edgesWith"),edgesTo:Fr(fi({thisIsSrc:!0}),"edgesTo")}),F(si,{connectedEdges:Fr((function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];if(r.isNode())for(var a=r._private.edges,i=0;i<a.length;i++){var o=a[i];t.push(o)}}return this.spawn(t,!0).filter(e)}),"connectedEdges"),connectedNodes:Fr((function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];r.isEdge()&&(t.push(r.source()[0]),t.push(r.target()[0]))}return this.spawn(t,!0).filter(e)}),"connectedNodes"),parallelEdges:Fr(hi(),"parallelEdges"),codirectedEdges:Fr(hi({codirected:!0}),"codirectedEdges")}),F(si,{components:function(e){var t=this,n=t.cy(),r=n.collection(),a=null==e?t.nodes():e.nodes(),i=[];null!=e&&a.empty()&&(a=e.sources());var o=function(e,t){r.merge(e),a.unmerge(e),t.merge(e)};if(a.empty())return t.spawn();var s=function(){var e=n.collection();i.push(e);var r=a[0];o(r,e),t.bfs({directed:!1,roots:r,visit:function(t){return o(t,e)}}),e.forEach((function(n){n.connectedEdges().forEach((function(n){t.has(n)&&e.has(n.source())&&e.has(n.target())&&e.merge(n)}))}))};do{s()}while(a.length>0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),si.componentsOf=si.components;var pi=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0!==e){var r=new Re,a=!1;if(t){if(t.length>0&&C(t[0])&&!R(t[0])){a=!0;for(var i=[],o=new Oe,s=0,l=t.length;s<l;s++){var u=t[s];null==u.data&&(u.data={});var c=u.data;if(null==c.id)c.id=xe();else if(e.hasElementWithId(c.id)||o.has(c.id))continue;var d=new ze(e,u,!1);i.push(d),o.add(c.id)}t=i}}else t=[];this.length=0;for(var f=0,h=t.length;f<h;f++){var p=t[f][0];if(null!=p){var v=p._private.data.id;n&&r.has(v)||(n&&r.set(v,{index:this.length,ele:p}),this[this.length]=p,this.length++)}}this._private={eles:this,cy:e,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(e){this.lazyMap=e},rebuildMap:function(){for(var e=this.lazyMap=new Re,t=this.eles,n=0;n<t.length;n++){var r=t[n];e.set(r.id(),{index:n,ele:r})}}},n&&(this._private.map=r),a&&this.restore()}else me("A collection must have a reference to the core")},vi=ze.prototype=pi.prototype=Object.create(Array.prototype);vi.instanceString=function(){return"collection"},vi.spawn=function(e,t){return new pi(this.cy(),e,t)},vi.spawnSelf=function(){return this.spawn(this)},vi.cy=function(){return this._private.cy},vi.renderer=function(){return this._private.cy.renderer()},vi.element=function(){return this[0]},vi.collection=function(){return P(this)?this:new pi(this._private.cy,[this])},vi.unique=function(){return new pi(this._private.cy,this,!0)},vi.hasElementWithId=function(e){return e=""+e,this._private.map.has(e)},vi.getElementById=function(e){e=""+e;var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new pi(t)},vi.$id=vi.getElementById,vi.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},vi.indexOf=function(e){var t=e[0]._private.data.id;return this._private.map.get(t).index},vi.indexOfId=function(e){return e=""+e,this._private.map.get(e).index},vi.json=function(e){var t=this.element(),n=this.cy();if(null==t&&e)return this;if(null!=t){var r=t._private;if(C(e)){if(n.startBatch(),e.data){t.data(e.data);var a=r.data;if(t.isEdge()){var i=!1,o={},s=e.data.source,l=e.data.target;null!=s&&s!=a.source&&(o.source=""+s,i=!0),null!=l&&l!=a.target&&(o.target=""+l,i=!0),i&&(t=t.move(o))}else{var u="parent"in e.data,c=e.data.parent;!u||null==c&&null==a.parent||c==a.parent||(void 0===c&&(c=null),null!=c&&(c=""+c),t=t.move({parent:c}))}}e.position&&t.position(e.position);var d=function(n,a,i){var o=e[n];null!=o&&o!==r[n]&&(o?t[a]():t[i]())};return d("removed","remove","restore"),d("selected","select","unselect"),d("selectable","selectify","unselectify"),d("locked","lock","unlock"),d("grabbable","grabify","ungrabify"),d("pannable","panify","unpanify"),null!=e.classes&&t.classes(e.classes),n.endBatch(),this}if(void 0===e){var f={data:be(r.data),position:be(r.position),group:r.group,removed:r.removed,selected:r.selected,selectable:r.selectable,locked:r.locked,grabbable:r.grabbable,pannable:r.pannable,classes:(null,"")},h=0;return r.classes.forEach((function(e){return f.classes+=0==h++?e:" "+e})),f}}},vi.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t].json();e.push(n)}return e},vi.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=this[n].json(),a=new ze(e,r,!1);t.push(a)}return new pi(e,t)},vi.copy=vi.clone,vi.restore=function(){for(var e,t,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=this,i=a.cy(),o=i._private,s=[],l=[],u=0,c=a.length;u<c;u++){var d=a[u];r&&!d.removed()||(d.isNode()?s.push(d):l.push(d))}e=s.concat(l);var f=function(){e.splice(t,1),t--};for(t=0;t<e.length;t++){var h=e[t],p=h._private,v=p.data;if(h.clearTraversalCache(),r||p.removed)if(void 0===v.id)v.id=xe();else if(S(v.id))v.id=""+v.id;else{if(A(v.id)||!_(v.id)){me("Can not create element with invalid string ID `"+v.id+"`"),f();continue}if(i.hasElementWithId(v.id)){me("Can not create second element with ID `"+v.id+"`"),f();continue}}else;var g=v.id;if(h.isNode()){var m=p.position;null==m.x&&(m.x=0),null==m.y&&(m.y=0)}if(h.isEdge()){for(var y=h,w=["source","target"],b=w.length,x=!1,E=0;E<b;E++){var k=w[E],C=v[k];S(C)&&(C=v[k]=""+v[k]),null==C||""===C?(me("Can not create edge `"+g+"` with unspecified "+k),x=!0):i.hasElementWithId(C)||(me("Can not create edge `"+g+"` with nonexistant "+k+" `"+C+"`"),x=!0)}if(x){f();continue}var j=i.getElementById(v.source),M=i.getElementById(v.target);j.same(M)?j._private.edges.push(y):(j._private.edges.push(y),M._private.edges.push(y)),y._private.source=j,y._private.target=M}p.map=new Re,p.map.set(g,{ele:h,index:0}),p.removed=!1,r&&i.addToPool(h)}for(var R=0;R<s.length;R++){var P=s[R],O=P._private.data;S(O.parent)&&(O.parent=""+O.parent);var z=O.parent,T=null!=z;if(T){var B=i.getElementById(z);if(B.empty())O.parent=void 0;else{for(var D=!1,N=B;!N.empty();){if(P.same(N)){D=!0,O.parent=void 0;break}N=N.parent()}D||(B[0]._private.children.push(P),P._private.parent=B[0],o.hasCompoundNodes=!0)}}}if(e.length>0){for(var L=e.length===a.length?a:new pi(i,e),V=0;V<L.length;V++){var I=L[V];I.isNode()||(I.parallelEdges().clearTraversalCache(),I.source().clearTraversalCache(),I.target().clearTraversalCache())}(o.hasCompoundNodes?i.collection().merge(L).merge(L.connectedNodes()).merge(L.parent()):L).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(n),n?L.emitAndNotify("add"):r&&L.emit("add")}return a},vi.removed=function(){var e=this[0];return e&&e._private.removed},vi.inside=function(){var e=this[0];return e&&!e._private.removed},vi.remove=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],a={},i=n._private.cy;function o(e){for(var t=e._private.edges,n=0;n<t.length;n++)l(t[n])}function s(e){for(var t=e._private.children,n=0;n<t.length;n++)l(t[n])}function l(e){var n=a[e.id()];t&&e.removed()||n||(a[e.id()]=!0,e.isNode()?(r.push(e),o(e),s(e)):r.unshift(e))}for(var u=0,c=n.length;u<c;u++){var d=n[u];l(d)}function f(e,t){var n=e._private.edges;Ce(n,t),e.clearTraversalCache()}function h(e){e.clearTraversalCache()}var p=[];function v(e,t){t=t[0];var n=(e=e[0])._private.children,r=e.id();Ce(n,t),t._private.parent=null,p.ids[r]||(p.ids[r]=!0,p.push(e))}p.ids={},n.dirtyCompoundBoundsCache(),t&&i.removeFromPool(r);for(var g=0;g<r.length;g++){var m=r[g];if(m.isEdge()){var y=m.source()[0],w=m.target()[0];f(y,m),f(w,m);for(var b=m.parallelEdges(),x=0;x<b.length;x++){var _=b[x];h(_),_.isBundledBezier()&&_.dirtyBoundingBoxCache()}}else{var E=m.parent();0!==E.length&&v(E,m)}t&&(m._private.removed=!0)}var k=i._private.elements;i._private.hasCompoundNodes=!1;for(var C=0;C<k.length;C++){var S=k[C];if(S.isParent()){i._private.hasCompoundNodes=!0;break}}var j=new pi(this.cy(),r);j.size()>0&&(e?j.emitAndNotify("remove"):t&&j.emit("remove"));for(var M=0;M<p.length;M++){var R=p[M];t&&R.removed()||R.updateStyle()}return j},vi.move=function(e){var t=this._private.cy,n=this,r=!1,a=!1,i=function(e){return null==e?e:""+e};if(void 0!==e.source||void 0!==e.target){var o=i(e.source),s=i(e.target),l=null!=o&&t.hasElementWithId(o),u=null!=s&&t.hasElementWithId(s);(l||u)&&(t.batch((function(){n.remove(r,a),n.emitAndNotify("moveout");for(var e=0;e<n.length;e++){var t=n[e],i=t._private.data;t.isEdge()&&(l&&(i.source=o),u&&(i.target=s))}n.restore(r,a)})),n.emitAndNotify("move"))}else if(void 0!==e.parent){var c=i(e.parent);if(null===c||t.hasElementWithId(c)){var d=null===c?void 0:c;t.batch((function(){var e=n.remove(r,a);e.emitAndNotify("moveout");for(var t=0;t<n.length;t++){var i=n[t],o=i._private.data;i.isNode()&&(o.parent=d)}e.restore(r,a)})),n.emitAndNotify("move")}}return this},[In,er,tr,Vr,Gr,Kr,Zr,ka,Va,Ia,{isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},Ga,Wa,Ka,ai,si].forEach((function(e){F(vi,e)}));var gi={add:function(e){var t,n=this;if(M(e)){var r=e;if(r._private.cy===n)t=r.restore();else{for(var a=[],i=0;i<r.length;i++){var o=r[i];a.push(o.json())}t=new pi(n,a)}}else if(k(e)){t=new pi(n,e)}else if(C(e)&&(k(e.nodes)||k(e.edges))){for(var s=e,l=[],u=["nodes","edges"],c=0,d=u.length;c<d;c++){var f=u[c],h=s[f];if(k(h))for(var p=0,v=h.length;p<v;p++){var g=F({group:f},h[p]);l.push(g)}}t=new pi(n,l)}else{t=new ze(n,e).collection()}return t},remove:function(e){if(M(e));else if(_(e)){var t=e;e=this.$(t)}return e.remove()}};var mi=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var a={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:a.v,dv:e(a)}}function n(n,r){var a={dx:n.v,dv:e(n)},i=t(n,.5*r,a),o=t(n,.5*r,i),s=t(n,r,o),l=1/6*(a.dx+2*(i.dx+o.dx)+s.dx),u=1/6*(a.dv+2*(i.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,a){var i,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,a=a||null,l.tension=t,l.friction=r,o=(i=null!==a)?(c=e(t,r))/a*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return i?function(e){return u[e*(u.length-1)|0]}:c}}(),yi=function(e,t,n,r){var a=function(e,t,n,r){var a=4,i=.001,o=1e-7,s=10,l=11,u=1/(l-1),c="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var d=0;d<4;++d)if("number"!=typeof arguments[d]||isNaN(arguments[d])||!isFinite(arguments[d]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var f=c?new Float32Array(l):new Array(l);function h(e,t){return 1-3*t+3*e}function p(e,t){return 3*t-6*e}function v(e){return 3*e}function g(e,t,n){return((h(t,n)*e+p(t,n))*e+v(t))*e}function m(e,t,n){return 3*h(t,n)*e*e+2*p(t,n)*e+v(t)}function y(t,r){for(var i=0;i<a;++i){var o=m(r,e,n);if(0===o)return r;r-=(g(r,e,n)-t)/o}return r}function w(){for(var t=0;t<l;++t)f[t]=g(t*u,e,n)}function b(t,r,a){var i,l,u=0;do{(i=g(l=r+(a-r)/2,e,n)-t)>0?a=l:r=l}while(Math.abs(i)>o&&++u<s);return l}function x(t){for(var r=0,a=1,o=l-1;a!==o&&f[a]<=t;++a)r+=u;--a;var s=r+(t-f[a])/(f[a+1]-f[a])*u,c=m(s,e,n);return c>=i?y(t,s):0===c?s:b(t,r,r+u)}var _=!1;function E(){_=!0,e===t&&n===r||w()}var k=function(a){return _||E(),e===t&&n===r?a:0===a?0:1===a?1:g(x(a),t,r)};k.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var C="generateBezier("+[e,t,n,r]+")";return k.toString=function(){return C},k}(e,t,n,r);return function(e,t,n){return e+(t-e)*a(n)}},wi={linear:function(e,t,n){return e+(t-e)*n},ease:yi(.25,.1,.25,1),"ease-in":yi(.42,0,1,1),"ease-out":yi(0,0,.58,1),"ease-in-out":yi(.42,0,.58,1),"ease-in-sine":yi(.47,0,.745,.715),"ease-out-sine":yi(.39,.575,.565,1),"ease-in-out-sine":yi(.445,.05,.55,.95),"ease-in-quad":yi(.55,.085,.68,.53),"ease-out-quad":yi(.25,.46,.45,.94),"ease-in-out-quad":yi(.455,.03,.515,.955),"ease-in-cubic":yi(.55,.055,.675,.19),"ease-out-cubic":yi(.215,.61,.355,1),"ease-in-out-cubic":yi(.645,.045,.355,1),"ease-in-quart":yi(.895,.03,.685,.22),"ease-out-quart":yi(.165,.84,.44,1),"ease-in-out-quart":yi(.77,0,.175,1),"ease-in-quint":yi(.755,.05,.855,.06),"ease-out-quint":yi(.23,1,.32,1),"ease-in-out-quint":yi(.86,0,.07,1),"ease-in-expo":yi(.95,.05,.795,.035),"ease-out-expo":yi(.19,1,.22,1),"ease-in-out-expo":yi(1,0,0,1),"ease-in-circ":yi(.6,.04,.98,.335),"ease-out-circ":yi(.075,.82,.165,1),"ease-in-out-circ":yi(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return wi.linear;var r=mi(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":yi};function bi(e,t,n,r,a){if(1===r)return n;if(t===n)return n;var i=a(t,n,r);return null==e||((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max&&(i=Math.min(i,e.max))),i}function xi(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function _i(e,t,n,r,a){var i=null!=a?a.type:null;n<0?n=0:n>1&&(n=1);var o=xi(e,a),s=xi(t,a);if(S(o)&&S(s))return bi(i,o,s,n,r);if(k(o)&&k(s)){for(var l=[],u=0;u<s.length;u++){var c=o[u],d=s[u];if(null!=c&&null!=d){var f=bi(i,c,d,n,r);l.push(f)}else l.push(d)}return l}}function Ei(e,t,n,r){var a=!r,i=e._private,o=t._private,s=o.easing,l=o.startTime,u=(r?e:e.cy()).style();if(!o.easingImpl)if(null==s)o.easingImpl=wi.linear;else{var c,d,f;if(_(s))c=u.parse("transition-timing-function",s).value;else c=s;_(c)?(d=c,f=[]):(d=c[1],f=c.slice(2).map((function(e){return+e}))),f.length>0?("spring"===d&&f.push(o.duration),o.easingImpl=wi[d].apply(null,f)):o.easingImpl=wi[d]}var h,p=o.easingImpl;if(h=0===o.duration?1:(n-l)/o.duration,o.applying&&(h=o.progress),h<0?h=0:h>1&&(h=1),null==o.delay){var v=o.startPosition,g=o.position;if(g&&a&&!e.locked()){var m={};ki(v.x,g.x)&&(m.x=_i(v.x,g.x,h,p)),ki(v.y,g.y)&&(m.y=_i(v.y,g.y,h,p)),e.position(m)}var y=o.startPan,w=o.pan,b=i.pan,x=null!=w&&r;x&&(ki(y.x,w.x)&&(b.x=_i(y.x,w.x,h,p)),ki(y.y,w.y)&&(b.y=_i(y.y,w.y,h,p)),e.emit("pan"));var E=o.startZoom,k=o.zoom,C=null!=k&&r;C&&(ki(E,k)&&(i.zoom=it(i.minZoom,_i(E,k,h,p),i.maxZoom)),e.emit("zoom")),(x||C)&&e.emit("viewport");var S=o.style;if(S&&S.length>0&&a){for(var j=0;j<S.length;j++){var M=S[j],R=M.name,P=M,O=o.startStyle[R],z=_i(O,P,h,p,u.properties[O.name]);u.overrideBypass(e,R,z)}e.emit("style")}}return o.progress=h,h}function ki(e,t){return null!=e&&null!=t&&(!(!S(e)||!S(t))||!(!e||!t))}function Ci(e,t,n,r){var a=t._private;a.started=!0,a.startTime=n-a.progress*a.duration}function Si(e,t){var n=t._private.aniEles,r=[];function a(t,n){var a=t._private,i=a.animation.current,o=a.animation.queue,s=!1;if(0===i.length){var l=o.shift();l&&i.push(l)}for(var u=function(e){for(var t=e.length-1;t>=0;t--){(0,e[t])()}e.splice(0,e.length)},c=i.length-1;c>=0;c--){var d=i[c],f=d._private;f.stopped?(i.splice(c,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.frames)):(f.playing||f.applying)&&(f.playing&&f.applying&&(f.applying=!1),f.started||Ci(0,d,e),Ei(t,d,e,n),f.applying&&(f.applying=!1),u(f.frames),null!=f.step&&f.step(e),d.completed()&&(i.splice(c,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.completes)),s=!0)}return n||0!==i.length||0!==o.length||r.push(t),s}for(var i=!1,o=0;o<n.length;o++){var s=a(n[o]);i=i||s}var l=a(t,!0);(i||l)&&(n.length>0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var ji={animate:Jn.animate(),animation:Jn.animation(),animated:Jn.animated(),clearQueue:Jn.clearQueue(),delay:Jn.delay(),delayAnimation:Jn.delayAnimation(),stop:Jn.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){Si(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&K((function(n){Si(n,e),t()}))}()}}},Mi={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&R(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Ri=function(e){return _(e)?new Nr(e):e},Pi={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new za(Mi,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Ri(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Ri(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Ri(t),n),this},once:function(e,t,n){return this.emitter().one(e,Ri(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Jn.eventAliasesOn(Pi);var Oi={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Oi.jpeg=Oi.jpg;var zi={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var a;a=_(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var i=new r(F({},e,{cy:t,eles:a}));return i}me("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else me("A `name` must be specified to make a layout");else me("Layout options must be specified to make a layout")}};zi.createLayout=zi.makeLayout=zi.layout;var Ai={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var a=this.renderer();!this.destroyed()&&a&&a.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r<n.length;r++){var a=n[r],i=e[a];t.getElementById(a).data(i)}}))}},Ti=ke({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),Bi={renderTo:function(e,t,n,r){return this._private.renderer.renderTo(e,t,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(e){var t=this,n=t.extension("renderer",e.name);if(null!=n){void 0!==e.wheelSensitivity&&we("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var r=Ti(e);r.cy=t,t._private.renderer=new n(r),this.notify("init")}else me("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"))},destroyRenderer:function(){var e=this;e.notify("destroy");var t=e.container();if(t)for(t._cyreg=null;t.childNodes.length>0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Bi.invalidateDimensions=Bi.resize;var Di={collection:function(e,t){return _(e)?this.$(e):M(e)?e.collection():k(e)?new pi(this,e,t):new pi(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Di.elements=Di.filter=Di.$;var Ni={},Li="t";Ni.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r<e.length;r++){var a=e[r],i=t.getContextMeta(a);if(!i.empty){var o=t.getContextStyle(i),s=t.applyContextStyle(i,o,a);a._private.appliedInitStyle?t.updateTransitions(a,s.diffProps):a._private.appliedInitStyle=!0,t.updateStyleHints(a)&&n.push(a)}}return n},Ni.getPropertiesDiff=function(e,t){var n=this,r=n._private.propDiffs=n._private.propDiffs||{},a=e+"-"+t,i=r[a];if(i)return i;for(var o=[],s={},l=0;l<n.length;l++){var u=n[l],c=e[l]===Li,d=t[l]===Li,f=c!==d,h=u.mappedProperties.length>0;if(f||d&&h){var p=void 0;f&&h||f?p=u.properties:h&&(p=u.mappedProperties);for(var v=0;v<p.length;v++){for(var g=p[v],m=g.name,y=!1,w=l+1;w<n.length;w++){var b=n[w];if(t[w]===Li&&(y=null!=b.properties[g.name]))break}s[m]||y||(s[m]=!0,o.push(m))}}}return r[a]=o,o},Ni.getContextMeta=function(e){for(var t,n=this,r="",a=e._private.styleCxtKey||"",i=0;i<n.length;i++){var o=n[i];r+=o.selector&&o.selector.matches(e)?Li:"f"}return t=n.getPropertiesDiff(a,r),e._private.styleCxtKey=r,{key:r,diffPropNames:t,empty:0===t.length}},Ni.getContextStyle=function(e){var t=e.key,n=this._private.contextStyles=this._private.contextStyles||{};if(n[t])return n[t];for(var r={_private:{key:t}},a=0;a<this.length;a++){var i=this[a];if(t[a]===Li)for(var o=0;o<i.properties.length;o++){var s=i.properties[o];r[s.name]=s}}return n[t]=r,r},Ni.applyContextStyle=function(e,t,n){for(var r=e.diffPropNames,a={},i=this.types,o=0;o<r.length;o++){var s=r[o],l=t[s],u=n.pstyle(s);if(!l){if(!u)continue;l=u.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(u!==l){if(l.mapped===i.fn&&null!=u&&null!=u.mapping&&u.mapping.value===l.value){var c=u.mapping;if((c.fnValue=l.value(n))===c.prevFnValue)continue}var d=a[s]={prev:u};this.applyParsedProperty(n,l),d.next=n.pstyle(s),d.next&&d.next.bypass&&(d.next=d.next.bypassed)}}return{diffProps:a}},Ni.updateStyleHints=function(e){var t=e._private,n=this,r=n.propertyGroupNames,a=n.propertyGroupKeys,i=function(e,t,r){return n.getPropertiesHash(e,t,r)},o=t.styleKey;if(e.removed())return!1;var s="nodes"===t.group,l=e._private.style;r=Object.keys(l);for(var u=0;u<a.length;u++){var c=a[u];t.styleKeys[c]=[Q,ee]}for(var d,f=function(e,n){return t.styleKeys[n][0]=ne(e,t.styleKeys[n][0])},h=function(e,n){return t.styleKeys[n][1]=re(e,t.styleKeys[n][1])},p=function(e,t){f(e,t),h(e,t)},v=function(e,t){for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);f(r,t),h(r,t)}},g=0;g<r.length;g++){var m=r[g],y=l[m];if(null!=y){var w=this.properties[m],b=w.type,x=w.groupKey,_=void 0;null!=w.hashOverride?_=w.hashOverride(e,y):null!=y.pfValue&&(_=y.pfValue);var E=null==w.enums?y.value:null,k=null!=_,C=k||null!=E,S=y.units;if(b.number&&C&&!b.multiple)p(-128<(d=k?_:E)&&d<128&&Math.floor(d)!==d?2e9-(1024*d|0):d,x),k||null==S||v(S,x);else v(y.strValue,x)}}for(var j,M,R=[Q,ee],P=0;P<a.length;P++){var O=a[P],z=t.styleKeys[O];R[0]=ne(z[0],R[0]),R[1]=re(z[1],R[1])}t.styleKey=(j=R[0],M=R[1],2097152*j+M);var A=t.styleKeys;t.labelDimsKey=ae(A.labelDimensions);var T=i(e,["label"],A.labelDimensions);if(t.labelKey=ae(T),t.labelStyleKey=ae(ie(A.commonLabel,T)),!s){var B=i(e,["source-label"],A.labelDimensions);t.sourceLabelKey=ae(B),t.sourceLabelStyleKey=ae(ie(A.commonLabel,B));var D=i(e,["target-label"],A.labelDimensions);t.targetLabelKey=ae(D),t.targetLabelStyleKey=ae(ie(A.commonLabel,D))}if(s){var N=t.styleKeys,L=N.nodeBody,V=N.nodeBorder,I=N.backgroundImage,H=N.compound,F=N.pie,G=[L,V,I,H,F].filter((function(e){return null!=e})).reduce(ie,[Q,ee]);t.nodeKey=ae(G),t.hasPie=null!=F&&F[0]!==Q&&F[1]!==ee}return o!==t.styleKey},Ni.clearStyleHints=function(e){var t=e._private;t.styleCxtKey="",t.styleKeys={},t.styleKey=null,t.labelKey=null,t.labelStyleKey=null,t.sourceLabelKey=null,t.sourceLabelStyleKey=null,t.targetLabelKey=null,t.targetLabelStyleKey=null,t.nodeKey=null,t.hasPie=null},Ni.applyParsedProperty=function(e,t){var n,r=this,a=t,i=e._private.style,o=r.types,s=r.properties[a.name].type,l=a.bypass,u=i[a.name],c=u&&u.bypass,d=e._private,f="mapping",h=function(e){return null==e?null:null!=e.pfValue?e.pfValue:e.value},p=function(){var t=h(u),n=h(a);r.checkTriggers(e,a.name,t,n)};if(a&&"pie"===a.name.substr(0,3)&&we("The pie style properties are deprecated. Create charts using background images instead."),"curve-style"===t.name&&e.isEdge()&&("bezier"!==t.value&&e.isLoop()||"haystack"===t.value&&(e.source().isParent()||e.target().isParent()))&&(a=t=this.parse(t.name,"bezier",l)),a.delete)return i[a.name]=void 0,p(),!0;if(a.deleteBypassed)return u?!!u.bypass&&(u.bypassed=void 0,p(),!0):(p(),!0);if(a.deleteBypass)return u?!!u.bypass&&(i[a.name]=u.bypassed,p(),!0):(p(),!0);var v=function(){we("Do not assign mappings to elements without corresponding data (i.e. ele `"+e.id()+"` has no mapping for property `"+a.name+"` with data field `"+a.field+"`); try a `["+a.field+"]` selector to limit scope to elements with `"+a.field+"` defined")};switch(a.mapped){case o.mapData:for(var g,m=a.field.split("."),y=d.data,w=0;w<m.length&&y;w++){y=y[m[w]]}if(null==y)return v(),!1;if(!S(y))return we("Do not use continuous mappers without specifying numeric data (i.e. `"+a.field+": "+y+"` for `"+e.id()+"` is non-numeric)"),!1;var b=a.fieldMax-a.fieldMin;if((g=0===b?0:(y-a.fieldMin)/b)<0?g=0:g>1&&(g=1),s.color){var x=a.valueMin[0],_=a.valueMax[0],E=a.valueMin[1],k=a.valueMax[1],C=a.valueMin[2],j=a.valueMax[2],M=null==a.valueMin[3]?1:a.valueMin[3],R=null==a.valueMax[3]?1:a.valueMax[3],P=[Math.round(x+(_-x)*g),Math.round(E+(k-E)*g),Math.round(C+(j-C)*g),Math.round(M+(R-M)*g)];n={bypass:a.bypass,name:a.name,value:P,strValue:"rgb("+P[0]+", "+P[1]+", "+P[2]+")"}}else{if(!s.number)return!1;var O=a.valueMin+(a.valueMax-a.valueMin)*g;n=this.parse(a.name,O,a.bypass,f)}if(!n)return v(),!1;n.mapping=a,a=n;break;case o.data:for(var z=a.field.split("."),A=d.data,T=0;T<z.length&&A;T++){A=A[z[T]]}if(null!=A&&(n=this.parse(a.name,A,a.bypass,f)),!n)return v(),!1;n.mapping=a,a=n;break;case o.fn:var B=a.value,D=null!=a.fnValue?a.fnValue:B(e);if(a.prevFnValue=D,null==D)return we("Custom function mappers may not return null (i.e. `"+a.name+"` for ele `"+e.id()+"` is null)"),!1;if(!(n=this.parse(a.name,D,a.bypass,f)))return we("Custom function mappers may not return invalid values for the property type (i.e. `"+a.name+"` for ele `"+e.id()+"` is invalid)"),!1;n.mapping=be(a),a=n;break;case void 0:break;default:return!1}return l?(a.bypassed=c?u.bypassed:u,i[a.name]=a):c?u.bypassed=a:i[a.name]=a,p(),!0},Ni.cleanElements=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(this.clearStyleHints(r),r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache(),t)for(var a=r._private.style,i=Object.keys(a),o=0;o<i.length;o++){var s=i[o],l=a[s];null!=l&&(l.bypass?l.bypassed=null:a[s]=null)}else r._private.style={}}},Ni.update=function(){this._private.cy.mutableElements().updateStyle()},Ni.updateTransitions=function(e,t){var n=this,r=e._private,a=e.pstyle("transition-property").value,i=e.pstyle("transition-duration").pfValue,o=e.pstyle("transition-delay").pfValue;if(a.length>0&&i>0){for(var s={},l=!1,u=0;u<a.length;u++){var c=a[u],d=e.pstyle(c),f=t[c];if(f){var h=f.prev,p=null!=f.next?f.next:d,v=!1,g=void 0,m=1e-6;h&&(S(h.pfValue)&&S(p.pfValue)?(v=p.pfValue-h.pfValue,g=h.pfValue+m*v):S(h.value)&&S(p.value)?(v=p.value-h.value,g=h.value+m*v):k(h.value)&&k(p.value)&&(v=h.value[0]!==p.value[0]||h.value[1]!==p.value[1]||h.value[2]!==p.value[2],g=h.strValue),v&&(s[c]=p.strValue,this.applyBypass(e,c,g),l=!0))}}if(!l)return;r.transitioning=!0,new Un((function(t){o>0?e.delayAnimation(o).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:i,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1)},Ni.checkTrigger=function(e,t,n,r,a,i){var o=this.properties[t],s=a(o);null!=s&&s(n,r)&&i(o)},Ni.checkZOrderTrigger=function(e,t,n,r){var a=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){a._private.cy.notify("zorder",e)}))},Ni.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(a){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),"curve-style"!==t||"bezier"!==n&&"bezier"!==r||!a.triggersBoundsOfParallelBeziers||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()}))}))},Ni.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Vi={applyBypass:function(e,t,n,r){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var i=0;i<this.properties.length;i++){var o=this.properties[i].name,s=this.parse(o,n,!0);s&&a.push(s)}}else if(_(t)){var l=this.parse(t,n,!0);l&&a.push(l)}else{if(!C(t))return!1;var u=t;r=n;for(var c=Object.keys(u),d=0;d<c.length;d++){var f=c[d],h=u[f];if(void 0===h&&(h=u[N(f)]),void 0!==h){var p=this.parse(f,h,!0);p&&a.push(p)}}}if(0===a.length)return!1;for(var v=!1,g=0;g<e.length;g++){for(var m=e[g],y={},w=void 0,b=0;b<a.length;b++){var x=a[b];if(r){var E=m.pstyle(x.name);w=y[x.name]={prev:E}}v=this.applyParsedProperty(m,be(x))||v,r&&(w.next=m.pstyle(x.name))}v&&this.updateStyleHints(m),r&&this.updateTransitions(m,y,true)}return v},overrideBypass:function(e,t,n){t=D(t);for(var r=0;r<e.length;r++){var a=e[r],i=a._private.style[t],o=this.properties[t].type,s=o.color,l=o.mutiple,u=i?null!=i.pfValue?i.pfValue:i.value:null;i&&i.bypass?(i.value=n,null!=i.pfValue&&(i.pfValue=n),i.strValue=s?"rgb("+n.join(",")+")":l?n.join(" "):""+n,this.updateStyleHints(a)):this.applyBypass(a,t,n),this.checkTriggers(a,t,u,n)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,n){for(var r=0;r<e.length;r++){for(var a=e[r],i={},o=0;o<t.length;o++){var s=t[o],l=this.properties[s],u=a.pstyle(l.name);if(u&&u.bypass){var c=this.parse(s,"",!0),d=i[l.name]={prev:u};this.applyParsedProperty(a,c),d.next=a.pstyle(l.name)}}this.updateStyleHints(a),n&&this.updateTransitions(a,i,true)}}},Ii={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy.container();if(v&&t&&v.getComputedStyle)return v.getComputedStyle(t).getPropertyValue(e)}},Hi={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){var n=this;if(e=e[0]){for(var r={},a=0;a<n.properties.length;a++){var i=n.properties[a],o=n.getStylePropertyValue(e,i.name,t);null!=o&&(r[i.name]=o,r[N(i.name)]=o)}return r}},getIndexedStyle:function(e,t,n,r){var a=e.pstyle(t)[n][r];return null!=a?a:e.cy().style().getDefaultProperty(t)[n][0]},getStylePropertyValue:function(e,t,n){if(e=e[0]){var r=this.properties[t];r.alias&&(r=r.pointsTo);var a=r.type,i=e.pstyle(r.name);if(i){var o=i.value,s=i.units,l=i.strValue;if(n&&a.number&&null!=o&&S(o)){var u=e.cy().zoom(),c=function(e){return e*u},d=function(e,t){return c(e)+t},f=k(o);return(f?s.every((function(e){return null!=e})):null!=s)?f?o.map((function(e,t){return d(e,s[t])})).join(" "):d(o,s):f?o.map((function(e){return _(e)?e:""+c(e)})).join(" "):""+c(o)}if(null!=l)return l}return null}},getAnimationStartStyle:function(e,t){for(var n={},r=0;r<t.length;r++){var a=t[r].name,i=e.pstyle(a);void 0!==i&&(i=C(i)?this.parse(a,i.strValue):this.parse(a,i)),i&&(n[a]=i)}return n},getPropsList:function(e){var t=[],n=e,r=this.properties;if(n)for(var a=Object.keys(n),i=0;i<a.length;i++){var o=a[i],s=n[o],l=r[o]||r[D(o)],u=this.parse(l.name,s);u&&t.push(u)}return t},getNonDefaultPropertiesHash:function(e,t,n){var r,a,i,o,s,l,u=n.slice();for(s=0;s<t.length;s++)if(r=t[s],null!=(a=e.pstyle(r,!1)))if(null!=a.pfValue)u[0]=ne(o,u[0]),u[1]=re(o,u[1]);else for(i=a.strValue,l=0;l<i.length;l++)o=i.charCodeAt(l),u[0]=ne(o,u[0]),u[1]=re(o,u[1]);return u}};Hi.getPropertiesHash=Hi.getNonDefaultPropertiesHash;var Fi={appendFromJson:function(e){for(var t=this,n=0;n<e.length;n++){var r=e[n],a=r.selector,i=r.style||r.css,o=Object.keys(i);t.selector(a);for(var s=0;s<o.length;s++){var l=o[s],u=i[l];t.css(l,u)}}return t},fromJson:function(e){var t=this;return t.resetToDefault(),t.appendFromJson(e),t},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var n=this[t],r=n.selector,a=n.properties,i={},o=0;o<a.length;o++){var s=a[o];i[s.name]=s.strValue}e.push({selector:r?r.toString():"core",style:i})}return e}},Gi={appendFromString:function(e){var t,n,r,a=this,i=""+e;function o(){i=i.length>t.length?i.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(i.match(/^\s*$/))break;var l=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){we("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=l[0];var u=l[1];if("core"!==u)if(new Nr(u).invalid){we("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();continue}var c=l[2],d=!1;n=c;for(var f=[];;){if(n.match(/^\s*$/))break;var h=n.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!h){we("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),d=!0;break}r=h[0];var p=h[1],v=h[2];if(this.properties[p])a.parse(p,v)?(f.push({name:p,val:v}),s()):(we("Skipping property: Invalid property definition in: "+r),s());else we("Skipping property: Invalid property name in: "+r),s()}if(d){o();break}a.selector(u);for(var g=0;g<f.length;g++){var m=f[g];a.css(m.name,m.val)}o()}return a},fromString:function(e){var t=this;return t.resetToDefault(),t.appendFromString(e),t}},Yi={};!function(){var e=I,t=function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},n=function(t){var n=e+"|\\w+|rgb[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|hsl[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+t+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+e+")\\s*\\,\\s*("+e+")\\s*,\\s*("+n+")\\s*\\,\\s*("+n+")\\)$"},r=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];Yi.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:t("data")},layoutData:{mapping:!0,regex:t("layoutData")},scratch:{mapping:!0,regex:t("scratch")},mapData:{mapping:!0,regex:n("mapData")},mapLayoutData:{mapping:!0,regex:n("mapLayoutData")},mapScratch:{mapping:!0,regex:n("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:r,singleRegexMatchValue:!0},urls:{regexes:r,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return _(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(e){var t=e.length;return 1===t||2===t||4===t}}};var a={zeroNonZero:function(e,t){return(null==e||null==t)&&e!==t||(0==e&&0!=t||0!=e&&0==t)},any:function(e,t){return e!=t},emptyNonEmpty:function(e,t){var n=A(e),r=A(t);return n&&!r||!n&&r}},i=Yi.types,o=[{name:"label",type:i.text,triggersBounds:a.any,triggersZOrder:a.emptyNonEmpty},{name:"text-rotation",type:i.textRotation,triggersBounds:a.any},{name:"text-margin-x",type:i.bidirectionalSize,triggersBounds:a.any},{name:"text-margin-y",type:i.bidirectionalSize,triggersBounds:a.any}],s=[{name:"source-label",type:i.text,triggersBounds:a.any},{name:"source-text-rotation",type:i.textRotation,triggersBounds:a.any},{name:"source-text-margin-x",type:i.bidirectionalSize,triggersBounds:a.any},{name:"source-text-margin-y",type:i.bidirectionalSize,triggersBounds:a.any},{name:"source-text-offset",type:i.size,triggersBounds:a.any}],l=[{name:"target-label",type:i.text,triggersBounds:a.any},{name:"target-text-rotation",type:i.textRotation,triggersBounds:a.any},{name:"target-text-margin-x",type:i.bidirectionalSize,triggersBounds:a.any},{name:"target-text-margin-y",type:i.bidirectionalSize,triggersBounds:a.any},{name:"target-text-offset",type:i.size,triggersBounds:a.any}],u=[{name:"font-family",type:i.fontFamily,triggersBounds:a.any},{name:"font-style",type:i.fontStyle,triggersBounds:a.any},{name:"font-weight",type:i.fontWeight,triggersBounds:a.any},{name:"font-size",type:i.size,triggersBounds:a.any},{name:"text-transform",type:i.textTransform,triggersBounds:a.any},{name:"text-wrap",type:i.textWrap,triggersBounds:a.any},{name:"text-overflow-wrap",type:i.textOverflowWrap,triggersBounds:a.any},{name:"text-max-width",type:i.size,triggersBounds:a.any},{name:"text-outline-width",type:i.size,triggersBounds:a.any},{name:"line-height",type:i.positiveNumber,triggersBounds:a.any}],c=[{name:"text-valign",type:i.valign,triggersBounds:a.any},{name:"text-halign",type:i.halign,triggersBounds:a.any},{name:"color",type:i.color},{name:"text-outline-color",type:i.color},{name:"text-outline-opacity",type:i.zeroOneNumber},{name:"text-background-color",type:i.color},{name:"text-background-opacity",type:i.zeroOneNumber},{name:"text-background-padding",type:i.size,triggersBounds:a.any},{name:"text-border-opacity",type:i.zeroOneNumber},{name:"text-border-color",type:i.color},{name:"text-border-width",type:i.size,triggersBounds:a.any},{name:"text-border-style",type:i.borderStyle,triggersBounds:a.any},{name:"text-background-shape",type:i.textBackgroundShape,triggersBounds:a.any},{name:"text-justification",type:i.justification}],d=[{name:"events",type:i.bool},{name:"text-events",type:i.bool}],f=[{name:"display",type:i.display,triggersZOrder:a.any,triggersBounds:a.any,triggersBoundsOfParallelBeziers:!0},{name:"visibility",type:i.visibility,triggersZOrder:a.any},{name:"opacity",type:i.zeroOneNumber,triggersZOrder:a.zeroNonZero},{name:"text-opacity",type:i.zeroOneNumber},{name:"min-zoomed-font-size",type:i.size},{name:"z-compound-depth",type:i.zCompoundDepth,triggersZOrder:a.any},{name:"z-index-compare",type:i.zIndexCompare,triggersZOrder:a.any},{name:"z-index",type:i.nonNegativeInt,triggersZOrder:a.any}],h=[{name:"overlay-padding",type:i.size,triggersBounds:a.any},{name:"overlay-color",type:i.color},{name:"overlay-opacity",type:i.zeroOneNumber,triggersBounds:a.zeroNonZero},{name:"overlay-shape",type:i.overlayShape,triggersBounds:a.any}],p=[{name:"underlay-padding",type:i.size,triggersBounds:a.any},{name:"underlay-color",type:i.color},{name:"underlay-opacity",type:i.zeroOneNumber,triggersBounds:a.zeroNonZero},{name:"underlay-shape",type:i.overlayShape,triggersBounds:a.any}],v=[{name:"transition-property",type:i.propList},{name:"transition-duration",type:i.time},{name:"transition-delay",type:i.time},{name:"transition-timing-function",type:i.easing}],g=function(e,t){return"label"===t.value?-e.poolIndex():t.pfValue},m=[{name:"height",type:i.nodeSize,triggersBounds:a.any,hashOverride:g},{name:"width",type:i.nodeSize,triggersBounds:a.any,hashOverride:g},{name:"shape",type:i.nodeShape,triggersBounds:a.any},{name:"shape-polygon-points",type:i.polygonPointList,triggersBounds:a.any},{name:"background-color",type:i.color},{name:"background-fill",type:i.fill},{name:"background-opacity",type:i.zeroOneNumber},{name:"background-blacken",type:i.nOneOneNumber},{name:"background-gradient-stop-colors",type:i.colors},{name:"background-gradient-stop-positions",type:i.percentages},{name:"background-gradient-direction",type:i.gradientDirection},{name:"padding",type:i.sizeMaybePercent,triggersBounds:a.any},{name:"padding-relative-to",type:i.paddingRelativeTo,triggersBounds:a.any},{name:"bounds-expansion",type:i.boundsExpansion,triggersBounds:a.any}],y=[{name:"border-color",type:i.color},{name:"border-opacity",type:i.zeroOneNumber},{name:"border-width",type:i.size,triggersBounds:a.any},{name:"border-style",type:i.borderStyle}],w=[{name:"background-image",type:i.urls},{name:"background-image-crossorigin",type:i.bgCrossOrigin},{name:"background-image-opacity",type:i.zeroOneNumbers},{name:"background-image-containment",type:i.bgContainment},{name:"background-image-smoothing",type:i.bools},{name:"background-position-x",type:i.bgPos},{name:"background-position-y",type:i.bgPos},{name:"background-width-relative-to",type:i.bgRelativeTo},{name:"background-height-relative-to",type:i.bgRelativeTo},{name:"background-repeat",type:i.bgRepeat},{name:"background-fit",type:i.bgFit},{name:"background-clip",type:i.bgClip},{name:"background-width",type:i.bgWH},{name:"background-height",type:i.bgWH},{name:"background-offset-x",type:i.bgPos},{name:"background-offset-y",type:i.bgPos}],b=[{name:"position",type:i.position,triggersBounds:a.any},{name:"compound-sizing-wrt-labels",type:i.compoundIncludeLabels,triggersBounds:a.any},{name:"min-width",type:i.size,triggersBounds:a.any},{name:"min-width-bias-left",type:i.sizeMaybePercent,triggersBounds:a.any},{name:"min-width-bias-right",type:i.sizeMaybePercent,triggersBounds:a.any},{name:"min-height",type:i.size,triggersBounds:a.any},{name:"min-height-bias-top",type:i.sizeMaybePercent,triggersBounds:a.any},{name:"min-height-bias-bottom",type:i.sizeMaybePercent,triggersBounds:a.any}],x=[{name:"line-style",type:i.lineStyle},{name:"line-color",type:i.color},{name:"line-fill",type:i.fill},{name:"line-cap",type:i.lineCap},{name:"line-opacity",type:i.zeroOneNumber},{name:"line-dash-pattern",type:i.numbers},{name:"line-dash-offset",type:i.number},{name:"line-gradient-stop-colors",type:i.colors},{name:"line-gradient-stop-positions",type:i.percentages},{name:"curve-style",type:i.curveStyle,triggersBounds:a.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:i.zeroOneNumber,triggersBounds:a.any},{name:"source-endpoint",type:i.edgeEndpoint,triggersBounds:a.any},{name:"target-endpoint",type:i.edgeEndpoint,triggersBounds:a.any},{name:"control-point-step-size",type:i.size,triggersBounds:a.any},{name:"control-point-distances",type:i.bidirectionalSizes,triggersBounds:a.any},{name:"control-point-weights",type:i.numbers,triggersBounds:a.any},{name:"segment-distances",type:i.bidirectionalSizes,triggersBounds:a.any},{name:"segment-weights",type:i.numbers,triggersBounds:a.any},{name:"taxi-turn",type:i.bidirectionalSizeMaybePercent,triggersBounds:a.any},{name:"taxi-turn-min-distance",type:i.size,triggersBounds:a.any},{name:"taxi-direction",type:i.axisDirection,triggersBounds:a.any},{name:"edge-distances",type:i.edgeDistances,triggersBounds:a.any},{name:"arrow-scale",type:i.positiveNumber,triggersBounds:a.any},{name:"loop-direction",type:i.angle,triggersBounds:a.any},{name:"loop-sweep",type:i.angle,triggersBounds:a.any},{name:"source-distance-from-node",type:i.size,triggersBounds:a.any},{name:"target-distance-from-node",type:i.size,triggersBounds:a.any}],E=[{name:"ghost",type:i.bool,triggersBounds:a.any},{name:"ghost-offset-x",type:i.bidirectionalSize,triggersBounds:a.any},{name:"ghost-offset-y",type:i.bidirectionalSize,triggersBounds:a.any},{name:"ghost-opacity",type:i.zeroOneNumber}],k=[{name:"selection-box-color",type:i.color},{name:"selection-box-opacity",type:i.zeroOneNumber},{name:"selection-box-border-color",type:i.color},{name:"selection-box-border-width",type:i.size},{name:"active-bg-color",type:i.color},{name:"active-bg-opacity",type:i.zeroOneNumber},{name:"active-bg-size",type:i.size},{name:"outside-texture-bg-color",type:i.color},{name:"outside-texture-bg-opacity",type:i.zeroOneNumber}],C=[];Yi.pieBackgroundN=16,C.push({name:"pie-size",type:i.sizeMaybePercent});for(var S=1;S<=Yi.pieBackgroundN;S++)C.push({name:"pie-"+S+"-background-color",type:i.color}),C.push({name:"pie-"+S+"-background-size",type:i.percent}),C.push({name:"pie-"+S+"-background-opacity",type:i.zeroOneNumber});var j=[],M=Yi.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:i.arrowShape,triggersBounds:a.any},{name:"arrow-color",type:i.color},{name:"arrow-fill",type:i.arrowFill}].forEach((function(e){M.forEach((function(t){var n=t+"-"+e.name,r=e.type,a=e.triggersBounds;j.push({name:n,type:r,triggersBounds:a})}))}),{});var R=Yi.properties=[].concat(d,v,f,h,p,E,c,u,o,s,l,m,y,w,C,b,x,j,k),P=Yi.propertyGroups={behavior:d,transition:v,visibility:f,overlay:h,underlay:p,ghost:E,commonLabel:c,labelDimensions:u,mainLabel:o,sourceLabel:s,targetLabel:l,nodeBody:m,nodeBorder:y,backgroundImage:w,pie:C,compound:b,edgeLine:x,edgeArrow:j,core:k},O=Yi.propertyGroupNames={};(Yi.propertyGroupKeys=Object.keys(P)).forEach((function(e){O[e]=P[e].map((function(e){return e.name})),P[e].forEach((function(t){return t.groupKey=e}))}));var z=Yi.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];Yi.propertyNames=R.map((function(e){return e.name}));for(var T=0;T<R.length;T++){var B=R[T];R[B.name]=B}for(var D=0;D<z.length;D++){var N=z[D],L=R[N.pointsTo],V={name:N.name,alias:!0,pointsTo:L};R.push(V),R[N.name]=V}}(),Yi.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},Yi.getDefaultProperties=function(){var e=this._private;if(null!=e.defaultProperties)return e.defaultProperties;for(var t=F({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce((function(e,t){for(var n=1;n<=Yi.pieBackgroundN;n++){var r=t.name.replace("{{i}}",n),a=t.value;e[r]=a}return e}),{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"taxi-turn":"50%","taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"}].reduce((function(e,t){return Yi.arrowPrefixes.forEach((function(n){var r=n+"-"+t.name,a=t.value;e[r]=a})),e}),{})),n={},r=0;r<this.properties.length;r++){var a=this.properties[r];if(!a.pointsTo){var i=a.name,o=t[i],s=this.parse(i,o);n[i]=s}}return e.defaultProperties=n,e.defaultProperties},Yi.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var qi={parse:function(e,t,n,r){var a=this;if(E(t))return a.parseImplWarn(e,t,n,r);var i,o=se(e,""+t,n?"t":"f","mapping"===r||!0===r||!1===r||null==r?"dontcare":r),s=a.propCache=a.propCache||[];return(i=s[o])||(i=s[o]=a.parseImplWarn(e,t,n,r)),(n||"mapping"===r)&&(i=be(i))&&(i.value=be(i.value)),i},parseImplWarn:function(e,t,n,r){var a=this.parseImpl(e,t,n,r);return a||null==t||we("The style property `".concat(e,": ").concat(t,"` is invalid")),!a||"width"!==a.name&&"height"!==a.name||"label"!==t||we("The style value of `label` is deprecated for `"+a.name+"`"),a}};qi.parseImpl=function(e,t,n,r){var a=this;e=D(e);var i=a.properties[e],o=t,s=a.types;if(!i)return null;if(void 0===t)return null;i.alias&&(i=i.pointsTo,e=i.name);var l=_(t);l&&(t=t.trim());var u,c,d=i.type;if(!d)return null;if(n&&(""===t||null===t))return{name:e,value:t,bypass:!0,deleteBypass:!0};if(E(t))return{name:e,value:t,strValue:"fn",mapped:s.fn,bypass:n};if(!l||r||t.length<7||"a"!==t[1]);else{if(t.length>=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var f=s.data;return{name:e,value:u,strValue:""+t,mapped:f,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(d.multiple)return!1;var h=s.mapData;if(!d.color&&!d.number)return!1;var p=this.parse(e,c[4]);if(!p||p.mapped)return!1;var v=this.parse(e,c[5]);if(!v||v.mapped)return!1;if(p.pfValue===v.pfValue||p.strValue===v.strValue)return we("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+p.strValue+"`"),this.parse(e,p.strValue);if(d.color){var g=p.value,m=v.value;if(!(g[0]!==m[0]||g[1]!==m[1]||g[2]!==m[2]||g[3]!==m[3]&&(null!=g[3]&&1!==g[3]||null!=m[3]&&1!==m[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:h,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:p.value,valueMax:v.value,bypass:n}}}if(d.multiple&&"multiple"!==r){var y;if(y=l?t.split(/\s+/):k(t)?t:[t],d.evenMultiple&&y.length%2!=0)return null;for(var w=[],b=[],x=[],C="",j=!1,M=0;M<y.length;M++){var R=a.parse(e,y[M],n,"multiple");j=j||_(R.value),w.push(R.value),x.push(null!=R.pfValue?R.pfValue:R.value),b.push(R.units),C+=(M>0?" ":"")+R.strValue}return d.validate&&!d.validate(w,b)?null:d.singleEnum&&j?1===w.length&&_(w[0])?{name:e,value:w[0],strValue:w[0],bypass:n}:null:{name:e,value:w,pfValue:x,strValue:C,bypass:n,units:b}}var P,O,z=function(){for(var r=0;r<d.enums.length;r++){if(d.enums[r]===t)return{name:e,value:t,strValue:""+t,bypass:n}}return null};if(d.number){var A,T="px";if(d.units&&(A=d.units),d.implicitUnits&&(T=d.implicitUnits),!d.unitless)if(l){var B="px|em"+(d.allowPercent?"|\\%":"");A&&(B=A);var N=t.match("^("+I+")("+B+")?$");N&&(t=N[1],A=N[2]||T)}else A&&!d.implicitUnits||(A=T);if(t=parseFloat(t),isNaN(t)&&void 0===d.enums)return null;if(isNaN(t)&&void 0!==d.enums)return t=o,z();if(d.integer&&(!S(O=t)||Math.floor(O)!==O))return null;if(void 0!==d.min&&(t<d.min||d.strictMin&&t===d.min)||void 0!==d.max&&(t>d.max||d.strictMax&&t===d.max))return null;var L={name:e,value:t,strValue:""+t+(A||""),units:A,bypass:n};return d.unitless||"px"!==A&&"em"!==A?L.pfValue=t:L.pfValue="px"!==A&&A?this.getEmSizeInPixels()*t:t,"ms"!==A&&"s"!==A||(L.pfValue="ms"===A?t:1e3*t),"deg"!==A&&"rad"!==A||(L.pfValue="rad"===A?t:(P=t,Math.PI*P/180)),"%"===A&&(L.pfValue=t/100),L}if(d.propList){var V=[],H=""+t;if("none"===H);else{for(var F=H.split(/\s*,\s*|\s+/),Y=0;Y<F.length;Y++){var q=F[Y].trim();a.properties[q]?V.push(q):we("`"+q+"` is not a valid property name")}if(0===V.length)return null}return{name:e,value:V,strValue:0===V.length?"none":V.join(" "),bypass:n}}if(d.color){var W=G(t);return W?{name:e,value:W,pfValue:W,strValue:"rgb("+W[0]+","+W[1]+","+W[2]+")",bypass:n}:null}if(d.regex||d.regexes){if(d.enums){var U=z();if(U)return U}for(var X=d.regexes?d.regexes:[d.regex],$=0;$<X.length;$++){var K=new RegExp(X[$]).exec(t);if(K)return{name:e,value:d.singleRegexMatchValue?K[1]:K,strValue:""+t,bypass:n}}return null}return d.string?{name:e,value:""+t,strValue:""+t,bypass:n}:d.enums?z():null};var Wi=function e(t){if(!(this instanceof e))return new e(t);O(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):me("A style must have a core reference")},Ui=Wi.prototype;Ui.instanceString=function(){return"style"},Ui.clear=function(){for(var e=this._private,t=e.cy.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,e.contextStyles={},e.propDiffs={},this.cleanElements(t,!0),t.forEach((function(e){var t=e[0]._private;t.styleDirty=!0,t.appliedInitStyle=!1})),this},Ui.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Ui.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},Ui.selector=function(e){var t="core"===e?null:new Nr(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},Ui.css=function(){var e=this,t=arguments;if(1===t.length)for(var n=t[0],r=0;r<e.properties.length;r++){var a=e.properties[r],i=n[a.name];void 0===i&&(i=n[N(a.name)]),void 0!==i&&this.cssRule(a.name,i)}else 2===t.length&&this.cssRule(t[0],t[1]);return this},Ui.style=Ui.css,Ui.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.mapped&&this[r].mappedProperties.push(n),!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},Ui.append=function(e){return z(e)?e.appendToStyle(this):k(e)?this.appendFromJson(e):_(e)&&this.appendFromString(e),this},Wi.fromJson=function(e,t){var n=new Wi(e);return n.fromJson(t),n},Wi.fromString=function(e,t){return new Wi(e).fromString(t)},[Ni,Vi,Ii,Hi,Fi,Gi,Yi,qi].forEach((function(e){F(Ui,e)})),Wi.types=Ui.types,Wi.properties=Ui.properties,Wi.propertyGroups=Ui.propertyGroups,Wi.propertyGroupNames=Ui.propertyGroupNames,Wi.propertyGroupKeys=Ui.propertyGroupKeys;var Xi={style:function(e){e&&this.setStyle(e).update();return this._private.style},setStyle:function(e){var t=this._private;return z(e)?t.style=e.generateStyle(this):k(e)?t.style=Wi.fromJson(this,e):_(e)?t.style=Wi.fromString(this,e):t.style=Wi(this),t.style},updateStyle:function(){this.mutableElements().updateStyle()}},$i={autolock:function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},autoungrabify:function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},autounselectify:function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},selectionType:function(e){var t=this._private;return null==t.selectionType&&(t.selectionType="single"),void 0===e?t.selectionType:("additive"!==e&&"single"!==e||(t.selectionType=e),this)},panningEnabled:function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},userPanningEnabled:function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},zoomingEnabled:function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},userZoomingEnabled:function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},boxSelectionEnabled:function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},pan:function(){var e,t,n,r,a,i=arguments,o=this._private.pan;switch(i.length){case 0:return o;case 1:if(_(i[0]))return o[e=i[0]];if(C(i[0])){if(!this._private.panningEnabled)return this;r=(n=i[0]).x,a=n.y,S(r)&&(o.x=r),S(a)&&(o.y=a),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=i[0],t=i[1],"x"!==e&&"y"!==e||!S(t)||(o[e]=t),this.emit("pan viewport")}return this.notify("viewport"),this},panBy:function(e,t){var n,r,a,i,o,s=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:C(e)&&(i=(a=s[0]).x,o=a.y,S(i)&&(l.x+=i),S(o)&&(l.y+=o),this.emit("pan viewport"));break;case 2:r=t,"x"!==(n=e)&&"y"!==n||!S(r)||(l[n]+=r),this.emit("pan viewport")}return this.notify("viewport"),this},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(e,t){if(S(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var n,r;if(_(e)){var a=e;e=this.$(a)}else if(C(r=e)&&S(r.x1)&&S(r.x2)&&S(r.y1)&&S(r.y2)){var i=e;(n={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1}else M(e)||(e=this.mutableElements());if(!M(e)||!e.empty()){n=n||e.boundingBox();var o,s=this.width(),l=this.height();if(t=S(t)?t:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)<this._private.minZoom?this._private.minZoom:o,pan:{x:(s-o*(n.x1+n.x2))/2,y:(l-o*(n.y1+n.y2))/2}}}}},zoomRange:function(e,t){var n=this._private;if(null==t){var r=e;e=r.min,t=r.max}return S(e)&&S(t)&&e<=t?(n.minZoom=e,n.maxZoom=t):S(e)&&void 0===t&&e<=n.maxZoom?n.minZoom=e:S(t)&&void 0===e&&t>=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,a=r.pan,i=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),S(e)?n=e:C(e)&&(n=e.level,null!=e.position?t=Xe(e.position,i,a):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)<r.minZoom?r.minZoom:n,o||!S(n)||n===i||null!=t&&(!S(t.x)||!S(t.y)))return null;if(null!=t){var s=a,l=i,u=n;return{zoomed:!0,panned:!0,zoom:u,pan:{x:-u/l*(t.x-s.x)+t.x,y:-u/l*(t.y-s.y)+t.y}}}return{zoomed:!0,panned:!1,zoom:n,pan:a}},zoom:function(e){if(void 0===e)return this._private.zoom;var t=this.getZoomedViewport(e),n=this._private;return null!=t&&t.zoomed?(n.zoom=t.zoom,t.panned&&(n.pan.x=t.pan.x,n.pan.y=t.pan.y),this.emit("zoom"+(t.panned?" pan":"")+" viewport"),this.notify("viewport"),this):this},viewport:function(e){var t=this._private,n=!0,r=!0,a=[],i=!1,o=!1;if(!e)return this;if(S(e.zoom)||(n=!1),C(e.pan)||(r=!1),!n&&!r)return this;if(n){var s=e.zoom;s<t.minZoom||s>t.maxZoom||!t.zoomingEnabled?i=!0:(t.zoom=s,a.push("zoom"))}if(r&&(!i||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;S(l.x)&&(t.pan.x=l.x,o=!1),S(l.y)&&(t.pan.y=l.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(_(e)){var n=e;e=this.mutableElements().filter(n)}else M(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),a=this.width(),i=this.height();return{x:(a-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=v.getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};$i.centre=$i.center,$i.autolockNodes=$i.autolock,$i.autoungrabifyNodes=$i.autoungrabify;var Ki={data:Jn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Jn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Jn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Jn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Ki.attr=Ki.data,Ki.removeAttr=Ki.removeData;var Zi=function(e){var t=this,n=(e=F({},e)).container;n&&!j(n)&&j(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var a=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var i=void 0!==v&&void 0!==n&&!e.headless,o=e;o.layout=F({name:i?"grid":"null"},o.layout),o.renderer=F({name:i?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new pi(this),listeners:[],aniEles:new pi(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?i:o.styleEnabled,zoom:S(o.zoom)?o.zoom:1,pan:{x:C(o.pan)&&S(o.pan.x)?o.pan.x:0,y:C(o.pan)&&S(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});l.styleEnabled&&t.setStyle([]);var u=F({},o,o.renderer);t.initRenderer(u);!function(e,t){if(e.some(T))return Un.all(e).then(t);t(e)}([o.style,o.elements],(function(e){var n=e[0],i=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var a=t.mutableElements();a.length>0&&a.remove(),null!=e&&(C(e)||k(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var i=F({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,(function(){t.startAnimationLoop(),l.ready=!0,E(o.ready)&&t.on("ready",o.ready);for(var e=0;e<a.length;e++){var n=a[e];t.on("ready",n)}r&&(r.readies=[]),t.emit("ready")}),o.done)}))},Qi=Zi.prototype;F(Qi,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},mount:function(e){if(null!=e){var t=this,n=t._private,r=n.options;return!j(e)&&j(e[0])&&(e=e[0]),t.stopAnimationLoop(),t.destroyRenderer(),n.container=e,n.styleEnabled=!0,t.invalidateSize(),t.initRenderer(F({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),t.startAnimationLoop(),t.style(r.style),t.emit("mount"),t}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},options:function(){return be(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements();if(C(e)){if(t.startBatch(),e.elements){var a={},i=function(e,n){for(var r=[],i=[],o=0;o<e.length;o++){var s=e[o];if(s.data.id){var l=""+s.data.id,u=t.getElementById(l);a[l]=!0,0!==u.length?i.push({ele:u,json:s}):n?(s.group=n,r.push(s)):r.push(s)}else we("cy.json() cannot handle elements without an ID attribute")}t.add(r);for(var c=0;c<i.length;c++){var d=i[c],f=d.ele,h=d.json;f.json(h)}};if(k(e.elements))i(e.elements);else for(var o=["nodes","edges"],s=0;s<o.length;s++){var l=o[s],u=e.elements[l];k(u)&&i(u,l)}var c=t.collection();r.filter((function(e){return!a[e.id()]})).forEach((function(e){e.isParent()?c.merge(e):e.remove()})),c.forEach((function(e){return e.children().move({parent:null})})),c.forEach((function(e){return function(e){return t.getElementById(e.id())}(e).remove()}))}e.style&&t.style(e.style),null!=e.zoom&&e.zoom!==n.zoom&&t.zoom(e.zoom),e.pan&&(e.pan.x===n.pan.x&&e.pan.y===n.pan.y||t.pan(e.pan)),e.data&&t.data(e.data);for(var d=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],f=0;f<d.length;f++){var h=d[f];null!=e[h]&&t[h](e[h])}return t.endBatch(),this}var p={};!!e?p.elements=this.elements().map((function(e){return e.json()})):(p.elements={},r.forEach((function(e){var t=e.group();p.elements[t]||(p.elements[t]=[]),p.elements[t].push(e.json())}))),this._private.styleEnabled&&(p.style=t.style().json()),p.data=be(t.data());var v=n.options;return p.zoomingEnabled=n.zoomingEnabled,p.userZoomingEnabled=n.userZoomingEnabled,p.zoom=n.zoom,p.minZoom=n.minZoom,p.maxZoom=n.maxZoom,p.panningEnabled=n.panningEnabled,p.userPanningEnabled=n.userPanningEnabled,p.pan=be(n.pan),p.boxSelectionEnabled=n.boxSelectionEnabled,p.renderer=be(v.renderer),p.hideEdgesOnViewport=v.hideEdgesOnViewport,p.textureOnViewport=v.textureOnViewport,p.wheelSensitivity=v.wheelSensitivity,p.motionBlur=v.motionBlur,p.multiClickDebounceTime=v.multiClickDebounceTime,p}}),Qi.$id=Qi.getElementById,[gi,ji,Pi,Oi,zi,Ai,Bi,Di,Xi,$i,Ki].forEach((function(e){F(Qi,e)}));var Ji={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,maximal:!1,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},eo=function(e){return e.scratch("breadthfirst")},to=function(e,t){return e.scratch("breadthfirst",t)};function no(e){this.options=F({},Ji,e)}no.prototype.run=function(){var e,t=this.options,n=t,r=t.cy,a=n.eles,i=a.nodes().filter((function(e){return!e.isParent()})),o=a,s=n.directed,l=n.maximal||n.maximalAdjustments>0,u=ot(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(M(n.roots))e=n.roots;else if(k(n.roots)){for(var c=[],d=0;d<n.roots.length;d++){var f=n.roots[d],h=r.getElementById(f);c.push(h)}e=r.collection(c)}else if(_(n.roots))e=r.$(n.roots);else if(s)e=i.roots();else{var p=a.components();e=r.collection();for(var v=function(t){var n=p[t],r=n.maxDegree(!1),a=n.filter((function(e){return e.degree(!1)===r}));e=e.add(a)},g=0;g<p.length;g++)v(g)}var m=[],y={},w=function(e,t){null==m[t]&&(m[t]=[]);var n=m[t].length;m[t].push(e),to(e,{index:n,depth:t})};o.bfs({roots:e,directed:n.directed,visit:function(e,t,n,r,a){var i=e[0],o=i.id();w(i,a),y[o]=!0}});for(var b=[],x=0;x<i.length;x++){var E=i[x];y[E.id()]||b.push(E)}var C=function(e){for(var t=m[e],n=0;n<t.length;n++){var r=t[n];null!=r?to(r,{depth:e,index:n}):(t.splice(n,1),n--)}},S=function(){for(var e=0;e<m.length;e++)C(e)},j=function(e,t){for(var n=eo(e),r=e.incomers().filter((function(e){return e.isNode()&&a.has(e)})),i=-1,o=e.id(),s=0;s<r.length;s++){var l=r[s],u=eo(l);i=Math.max(i,u.depth)}return n.depth<=i&&(t[o]?null:(function(e,t){var n=eo(e),r=n.depth,a=n.index;m[r][a]=null,w(e,t)}(e,i+1),t[o]=!0,!0))};if(s&&l){var R=[],P={},O=function(e){return R.push(e)};for(i.forEach((function(e){return R.push(e)}));R.length>0;){var z=R.shift(),A=j(z,P);if(A)z.outgoers().filter((function(e){return e.isNode()&&a.has(e)})).forEach(O);else if(null===A){we("Detected double maximal shift for node `"+z.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}S();var T=0;if(n.avoidOverlap)for(var B=0;B<i.length;B++){var D=i[B].layoutDimensions(n),N=D.w,L=D.h;T=Math.max(T,N,L)}var V={},I=function(e){if(V[e.id()])return V[e.id()];for(var t=eo(e).depth,n=e.neighborhood(),r=0,a=0,o=0;o<n.length;o++){var s=n[o];if(!s.isEdge()&&!s.isParent()&&i.has(s)){var l=eo(s);if(null!=l){var u=l.index,c=l.depth;if(null!=u&&null!=c){var d=m[c].length;c<t&&(r+=u/d,a++)}}}}return r/=a=Math.max(1,a),0===a&&(r=0),V[e.id()]=r,r},F=function(e,t){var n=I(e)-I(t);return 0===n?H(e.id(),t.id()):n};void 0!==n.depthSort&&(F=n.depthSort);for(var G=0;G<m.length;G++)m[G].sort(F),C(G);for(var Y=[],q=0;q<b.length;q++)Y.push(b[q]);m.unshift(Y),S();for(var W=0,U=0;U<m.length;U++)W=Math.max(m[U].length,W);var X=u.x1+u.w/2,$=u.x1+u.h/2,K=m.reduce((function(e,t){return Math.max(e,t.length)}),0);return a.nodes().layoutPositions(this,n,(function(e){var t=eo(e),r=t.depth,a=t.index,i=m[r].length,o=Math.max(u.w/((n.grid?K:i)+1),T),s=Math.max(u.h/(m.length+1),T),l=Math.min(u.w/2/m.length,u.h/2/m.length);if(l=Math.max(l,T),n.circle){var c=l*r+l-(m.length>0&&m[0].length<=3?l/2:0),d=2*Math.PI/m[r].length*a;return 0===r&&1===m[0].length&&(c=1),{x:X+c*Math.cos(d),y:$+c*Math.sin(d)}}return{x:X+(a+1-(i+1)/2)*o,y:(r+1)*s}})),this};var ro={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function ao(e){this.options=F({},ro,e)}ao.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));for(var o,s=ot(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/i.length:t.sweep)/Math.max(1,i.length-1),d=0,f=0;f<i.length;f++){var h=i[f].layoutDimensions(t),p=h.w,v=h.h;d=Math.max(d,p,v)}if(o=S(t.radius)?t.radius:i.length<=1?0:Math.min(s.h,s.w)/2-d,i.length>1&&t.avoidOverlap){d*=1.75;var g=Math.cos(c)-Math.cos(0),m=Math.sin(c)-Math.sin(0),y=Math.sqrt(d*d/(g*g+m*m));o=Math.max(y,o)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*c*(a?1:-1),i=o*Math.cos(r),s=o*Math.sin(r);return{x:l+i,y:u+s}})),this};var io,oo={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function so(e){this.options=F({},oo,e)}so.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,a=t.eles,i=a.nodes().not(":parent"),o=ot(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,d=0;d<i.length;d++){var f,h=i[d];f=t.concentric(h),u.push({value:f,node:h}),h._private.scratch.concentric=f}i.updateStyle();for(var p=0;p<i.length;p++){var v=i[p].layoutDimensions(t);c=Math.max(c,v.w,v.h)}u.sort((function(e,t){return t.value-e.value}));for(var g=t.levelWidth(i),m=[[]],y=m[0],w=0;w<u.length;w++){var b=u[w];if(y.length>0)Math.abs(y[0].value-b.value)>=g&&(y=[],m.push(y));y.push(b)}var x=c+t.minNodeSpacing;if(!t.avoidOverlap){var _=m.length>0&&m[0].length>1,E=(Math.min(o.w,o.h)/2-x)/(m.length+_?1:0);x=Math.min(x,E)}for(var k=0,C=0;C<m.length;C++){var S=m[C],j=void 0===t.sweep?2*Math.PI-2*Math.PI/S.length:t.sweep,M=S.dTheta=j/Math.max(1,S.length-1);if(S.length>1&&t.avoidOverlap){var R=Math.cos(M)-Math.cos(0),P=Math.sin(M)-Math.sin(0),O=Math.sqrt(x*x/(R*R+P*P));k=Math.max(O,k)}S.r=k,k+=x}if(t.equidistant){for(var z=0,A=0,T=0;T<m.length;T++){var B=m[T].r-A;z=Math.max(z,B)}A=0;for(var D=0;D<m.length;D++){var N=m[D];0===D&&(A=N.r),N.r=A,A+=z}}for(var L={},V=0;V<m.length;V++)for(var I=m[V],H=I.dTheta,F=I.r,G=0;G<I.length;G++){var Y=I[G],q=t.startAngle+(n?1:-1)*H*G,W={x:s+F*Math.cos(q),y:l+F*Math.sin(q)};L[Y.node.id()]=W}return a.nodes().layoutPositions(this,t,(function(e){var t=e.id();return L[t]})),this};var lo={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,t){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function uo(e){this.options=F({},lo,e),this.options.layout=this}uo.prototype.run=function(){var e=this.options,t=e.cy,n=this;n.stopped=!1,!0!==e.animate&&!1!==e.animate||n.emit({type:"layoutstart",layout:n}),io=!0===e.debug;var r=co(t,n,e);io&&undefined(r),e.randomize&&po(r);var a=Z(),i=function(){go(r,t,e),!0===e.fit&&t.fit(e.padding)},o=function(t){return!(n.stopped||t>=e.numIter)&&(mo(r,e),r.temperature=r.temperature*e.coolingFactor,!(r.temperature<e.minTemp))},s=function(){if(!0===e.animate||!1===e.animate)i(),n.one("layoutstop",e.stop),n.emit({type:"layoutstop",layout:n});else{var t=e.eles.nodes(),a=vo(r,e,t);t.layoutPositions(n,e,a)}},l=0,u=!0;if(!0===e.animate){!function t(){for(var n=0;u&&n<e.refresh;)u=o(l),l++,n++;u?(Z()-a>=e.animationThreshold&&i(),K(t)):(Ro(r,e),s())}()}else{for(;u;)u=o(l),l++;Ro(r,e),s()}return this},uo.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},uo.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var co=function(e,t,n){for(var r=n.eles.edges(),a=n.eles.nodes(),i={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:ot(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},o=n.eles.components(),s={},l=0;l<o.length;l++)for(var u=o[l],c=0;c<u.length;c++){s[u[c].id()]=l}for(l=0;l<i.nodeSize;l++){var d=(g=a[l]).layoutDimensions(n);(A={}).isLocked=g.locked(),A.id=g.data("id"),A.parentId=g.data("parent"),A.cmptId=s[g.id()],A.children=[],A.positionX=g.position("x"),A.positionY=g.position("y"),A.offsetX=0,A.offsetY=0,A.height=d.w,A.width=d.h,A.maxX=A.positionX+A.width/2,A.minX=A.positionX-A.width/2,A.maxY=A.positionY+A.height/2,A.minY=A.positionY-A.height/2,A.padLeft=parseFloat(g.style("padding")),A.padRight=parseFloat(g.style("padding")),A.padTop=parseFloat(g.style("padding")),A.padBottom=parseFloat(g.style("padding")),A.nodeRepulsion=E(n.nodeRepulsion)?n.nodeRepulsion(g):n.nodeRepulsion,i.layoutNodes.push(A),i.idToIndex[A.id]=l}var f=[],h=0,p=-1,v=[];for(l=0;l<i.nodeSize;l++){var g,m=(g=i.layoutNodes[l]).parentId;null!=m?i.layoutNodes[i.idToIndex[m]].children.push(g.id):(f[++p]=g.id,v.push(g.id))}for(i.graphSet.push(v);h<=p;){var y=f[h++],w=i.idToIndex[y],b=i.layoutNodes[w].children;if(b.length>0){i.graphSet.push(b);for(l=0;l<b.length;l++)f[++p]=b[l]}}for(l=0;l<i.graphSet.length;l++){var x=i.graphSet[l];for(c=0;c<x.length;c++){var _=i.idToIndex[x[c]];i.indexToGraph[_]=l}}for(l=0;l<i.edgeSize;l++){var k=r[l],C={};C.id=k.data("id"),C.sourceId=k.data("source"),C.targetId=k.data("target");var S=E(n.idealEdgeLength)?n.idealEdgeLength(k):n.idealEdgeLength,j=E(n.edgeElasticity)?n.edgeElasticity(k):n.edgeElasticity,M=i.idToIndex[C.sourceId],R=i.idToIndex[C.targetId];if(i.indexToGraph[M]!=i.indexToGraph[R]){for(var P=fo(C.sourceId,C.targetId,i),O=i.graphSet[P],z=0,A=i.layoutNodes[M];-1===O.indexOf(A.id);)A=i.layoutNodes[i.idToIndex[A.parentId]],z++;for(A=i.layoutNodes[R];-1===O.indexOf(A.id);)A=i.layoutNodes[i.idToIndex[A.parentId]],z++;S*=z*n.nestingFactor}C.idealLength=S,C.elasticity=j,i.layoutEdges.push(C)}return i},fo=function(e,t,n){var r=ho(e,t,0,n);return 2>r.count?0:r.graph},ho=function e(t,n,r,a){var i=a.graphSet[r];if(-1<i.indexOf(t)&&-1<i.indexOf(n))return{count:2,graph:r};for(var o=0,s=0;s<i.length;s++){var l=i[s],u=a.idToIndex[l],c=a.layoutNodes[u].children;if(0!==c.length){var d=e(t,n,a.indexToGraph[a.idToIndex[c[0]]],a);if(0!==d.count){if(1!==d.count)return d;if(2===++o)break}}}return{count:o,graph:r}},po=function(e,t){for(var n=e.clientWidth,r=e.clientHeight,a=0;a<e.nodeSize;a++){var i=e.layoutNodes[a];0!==i.children.length||i.isLocked||(i.positionX=Math.random()*n,i.positionY=Math.random()*r)}},vo=function(e,t,n){var r=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return t.boundingBox&&(n.forEach((function(t){var n=e.layoutNodes[e.idToIndex[t.data("id")]];a.x1=Math.min(a.x1,n.positionX),a.x2=Math.max(a.x2,n.positionX),a.y1=Math.min(a.y1,n.positionY),a.y2=Math.max(a.y2,n.positionY)})),a.w=a.x2-a.x1,a.h=a.y2-a.y1),function(n,i){var o=e.layoutNodes[e.idToIndex[n.data("id")]];if(t.boundingBox){var s=(o.positionX-a.x1)/a.w,l=(o.positionY-a.y1)/a.h;return{x:r.x1+s*r.w,y:r.y1+l*r.h}}return{x:o.positionX,y:o.positionY}}},go=function(e,t,n){var r=n.layout,a=n.eles.nodes(),i=vo(e,n,a);a.positions(i),!0!==e.ready&&(e.ready=!0,r.one("layoutready",n.ready),r.emit({type:"layoutready",layout:this}))},mo=function(e,t,n){yo(e,t),Eo(e),ko(e,t),Co(e),So(e)},yo=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var r=e.graphSet[n],a=r.length,i=0;i<a;i++)for(var o=e.layoutNodes[e.idToIndex[r[i]]],s=i+1;s<a;s++){var l=e.layoutNodes[e.idToIndex[r[s]]];bo(o,l,e,t)}},wo=function(e){return-e+2*e*Math.random()},bo=function(e,t,n,r){if(e.cmptId===t.cmptId||n.isCompound){var a=t.positionX-e.positionX,i=t.positionY-e.positionY;0===a&&0===i&&(a=wo(1),i=wo(1));var o=xo(e,t,a,i);if(o>0)var s=(u=r.nodeOverlap*o)*a/(v=Math.sqrt(a*a+i*i)),l=u*i/v;else{var u,c=_o(e,a,i),d=_o(t,-1*a,-1*i),f=d.x-c.x,h=d.y-c.y,p=f*f+h*h,v=Math.sqrt(p);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/p)*f/v,l=u*h/v}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},xo=function(e,t,n,r){if(n>0)var a=e.maxX-t.minX;else a=t.maxX-e.minX;if(r>0)var i=e.maxY-t.minY;else i=t.maxY-e.minY;return a>=0&&i>=0?Math.sqrt(a*a+i*i):0},_o=function(e,t,n){var r=e.positionX,a=e.positionY,i=e.height||1,o=e.width||1,s=n/t,l=i/o,u={};return 0===t&&0<n||0===t&&0>n?(u.x=r,u.y=a+i/2,u):0<t&&-1*l<=s&&s<=l?(u.x=r+o/2,u.y=a+o*n/2/t,u):0>t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=a-o*n/2/t,u):0<n&&(s<=-1*l||s>=l)?(u.x=r+i*t/2/n,u.y=a+i/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-i*t/2/n,u.y=a-i/2,u):u},Eo=function(e,t){for(var n=0;n<e.edgeSize;n++){var r=e.layoutEdges[n],a=e.idToIndex[r.sourceId],i=e.layoutNodes[a],o=e.idToIndex[r.targetId],s=e.layoutNodes[o],l=s.positionX-i.positionX,u=s.positionY-i.positionY;if(0!==l||0!==u){var c=_o(i,l,u),d=_o(s,-1*l,-1*u),f=d.x-c.x,h=d.y-c.y,p=Math.sqrt(f*f+h*h),v=Math.pow(r.idealLength-p,2)/r.elasticity;if(0!==p)var g=v*f/p,m=v*h/p;else g=0,m=0;i.isLocked||(i.offsetX+=g,i.offsetY+=m),s.isLocked||(s.offsetX-=g,s.offsetY-=m)}}},ko=function(e,t){if(0!==t.gravity)for(var n=0;n<e.graphSet.length;n++){var r=e.graphSet[n],a=r.length;if(0===n)var i=e.clientHeight/2,o=e.clientWidth/2;else{var s=e.layoutNodes[e.idToIndex[r[0]]],l=e.layoutNodes[e.idToIndex[s.parentId]];i=l.positionX,o=l.positionY}for(var u=0;u<a;u++){var c=e.layoutNodes[e.idToIndex[r[u]]];if(!c.isLocked){var d=i-c.positionX,f=o-c.positionY,h=Math.sqrt(d*d+f*f);if(h>1){var p=t.gravity*d/h,v=t.gravity*f/h;c.offsetX+=p,c.offsetY+=v}}}}},Co=function(e,t){var n=[],r=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;r<=a;){var i=n[r++],o=e.idToIndex[i],s=e.layoutNodes[o],l=s.children;if(0<l.length&&!s.isLocked){for(var u=s.offsetX,c=s.offsetY,d=0;d<l.length;d++){var f=e.layoutNodes[e.idToIndex[l[d]]];f.offsetX+=u,f.offsetY+=c,n[++a]=l[d]}s.offsetX=0,s.offsetY=0}}},So=function(e,t){for(var n=0;n<e.nodeSize;n++){0<(a=e.layoutNodes[n]).children.length&&(a.maxX=void 0,a.minX=void 0,a.maxY=void 0,a.minY=void 0)}for(n=0;n<e.nodeSize;n++){if(!(0<(a=e.layoutNodes[n]).children.length||a.isLocked)){var r=jo(a.offsetX,a.offsetY,e.temperature);a.positionX+=r.x,a.positionY+=r.y,a.offsetX=0,a.offsetY=0,a.minX=a.positionX-a.width,a.maxX=a.positionX+a.width,a.minY=a.positionY-a.height,a.maxY=a.positionY+a.height,Mo(a,e)}}for(n=0;n<e.nodeSize;n++){var a;0<(a=e.layoutNodes[n]).children.length&&!a.isLocked&&(a.positionX=(a.maxX+a.minX)/2,a.positionY=(a.maxY+a.minY)/2,a.width=a.maxX-a.minX,a.height=a.maxY-a.minY)}},jo=function(e,t,n){var r=Math.sqrt(e*e+t*t);if(r>n)var a={x:n*e/r,y:n*t/r};else a={x:e,y:t};return a},Mo=function e(t,n){var r=t.parentId;if(null!=r){var a=n.layoutNodes[n.idToIndex[r]],i=!1;return(null==a.maxX||t.maxX+a.padRight>a.maxX)&&(a.maxX=t.maxX+a.padRight,i=!0),(null==a.minX||t.minX-a.padLeft<a.minX)&&(a.minX=t.minX-a.padLeft,i=!0),(null==a.maxY||t.maxY+a.padBottom>a.maxY)&&(a.maxY=t.maxY+a.padBottom,i=!0),(null==a.minY||t.minY-a.padTop<a.minY)&&(a.minY=t.minY-a.padTop,i=!0),i?e(a,n):void 0}},Ro=function(e,t){for(var n=e.layoutNodes,r=[],a=0;a<n.length;a++){var i=n[a],o=i.cmptId;(r[o]=r[o]||[]).push(i)}var s=0;for(a=0;a<r.length;a++){if(v=r[a]){v.x1=1/0,v.x2=-1/0,v.y1=1/0,v.y2=-1/0;for(var l=0;l<v.length;l++){var u=v[l];v.x1=Math.min(v.x1,u.positionX-u.width/2),v.x2=Math.max(v.x2,u.positionX+u.width/2),v.y1=Math.min(v.y1,u.positionY-u.height/2),v.y2=Math.max(v.y2,u.positionY+u.height/2)}v.w=v.x2-v.x1,v.h=v.y2-v.y1,s+=v.w*v.h}}r.sort((function(e,t){return t.w*t.h-e.w*e.h}));var c=0,d=0,f=0,h=0,p=Math.sqrt(s)*e.clientWidth/e.clientHeight;for(a=0;a<r.length;a++){var v;if(v=r[a]){for(l=0;l<v.length;l++){(u=v[l]).isLocked||(u.positionX+=c-v.x1,u.positionY+=d-v.y1)}c+=v.w+t.componentSpacing,f+=v.w+t.componentSpacing,h=Math.max(h,v.h),f>p&&(d+=h+t.componentSpacing,c=0,f=0,h=0)}}},Po={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Oo(e){this.options=F({},Po,e)}Oo.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));var i=ot(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.nodes().layoutPositions(this,t,(function(e){return{x:i.x1,y:i.y1}}));else{var o=a.size(),s=Math.sqrt(o*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},f=t.rows,h=null!=t.cols?t.cols:t.columns;if(null!=f&&null!=h)l=f,u=h;else if(null!=f&&null==h)l=f,u=Math.ceil(o/l);else if(null==f&&null!=h)u=h,l=Math.ceil(o/u);else if(u*l>o){var p=c(),v=d();(p-1)*v>=o?c(p-1):(v-1)*p>=o&&d(v-1)}else for(;u*l<o;){var g=c(),m=d();(m+1)*g>=o?d(m+1):c(g+1)}var y=i.w/u,w=i.h/l;if(t.condense&&(y=0,w=0),t.avoidOverlap)for(var b=0;b<a.length;b++){var x=a[b],_=x._private.position;null!=_.x&&null!=_.y||(_.x=0,_.y=0);var E=x.layoutDimensions(t),k=t.avoidOverlapPadding,C=E.w+k,S=E.h+k;y=Math.max(y,C),w=Math.max(w,S)}for(var j={},M=function(e,t){return!!j["c-"+e+"-"+t]},R=function(e,t){j["c-"+e+"-"+t]=!0},P=0,O=0,z=function(){++O>=u&&(O=0,P++)},A={},T=0;T<a.length;T++){var B=a[T],D=t.position(B);if(D&&(void 0!==D.row||void 0!==D.col)){var N={row:D.row,col:D.col};if(void 0===N.col)for(N.col=0;M(N.row,N.col);)N.col++;else if(void 0===N.row)for(N.row=0;M(N.row,N.col);)N.row++;A[B.id()]=N,R(N.row,N.col)}}a.layoutPositions(this,t,(function(e,t){var n,r;if(e.locked()||e.isParent())return!1;var a=A[e.id()];if(a)n=a.col*y+y/2+i.x1,r=a.row*w+w/2+i.y1;else{for(;M(P,O);)z();n=O*y+y/2+i.x1,r=P*w+w/2+i.y1,R(P,O),z()}return{x:n,y:r}}))}return this};var zo={ready:function(){},stop:function(){}};function Ao(e){this.options=F({},zo,e)}Ao.prototype.run=function(){var e=this.options,t=e.eles,n=this;e.cy;return n.emit("layoutstart"),t.nodes().positions((function(){return{x:0,y:0}})),n.one("layoutready",e.ready),n.emit("layoutready"),n.one("layoutstop",e.stop),n.emit("layoutstop"),this},Ao.prototype.stop=function(){return this};var To={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Bo(e){this.options=F({},To,e)}Bo.prototype.run=function(){var e=this.options,t=e.eles.nodes(),n=E(e.positions);return t.layoutPositions(this,e,(function(t,r){var a=function(t){if(null==e.positions)return function(e){return{x:e.x,y:e.y}}(t.position());if(n)return e.positions(t);var r=e.positions[t._private.data.id];return null==r?null:r}(t);return!t.locked()&&null!=a&&a})),this};var Do={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function No(e){this.options=F({},Do,e)}No.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,r=ot(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});return n.nodes().layoutPositions(this,e,(function(e,t){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}})),this};var Lo=[{name:"breadthfirst",impl:no},{name:"circle",impl:ao},{name:"concentric",impl:so},{name:"cose",impl:uo},{name:"grid",impl:Oo},{name:"null",impl:Ao},{name:"preset",impl:Bo},{name:"random",impl:No}];function Vo(e){this.options=e,this.notifications=0}var Io=function(){},Ho=function(){throw new Error("A headless instance can not render images")};Vo.prototype={recalculateRenderedStyle:Io,notify:function(){this.notifications++},init:Io,isHeadless:function(){return!0},png:Ho,jpg:Ho};var Fo={arrowShapeWidth:.3,registerArrowShapes:function(){var e=this.arrowShapes={},t=this,n=function(e,t,n,r,a,i,o){var s=a.x-n/2-o,l=a.x+n/2+o,u=a.y-n/2-o,c=a.y+n/2+o;return s<=e&&e<=l&&u<=t&&t<=c},r=function(e,t,n,r,a){var i=e*Math.cos(r)-t*Math.sin(r),o=(e*Math.sin(r)+t*Math.cos(r))*n;return{x:i*n+a.x,y:o+a.y}},a=function(e,t,n,a){for(var i=[],o=0;o<e.length;o+=2){var s=e[o],l=e[o+1];i.push(r(s,l,t,n,a))}return i},i=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r.x,r.y)}return t},o=function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},s=function(r,s){_(s)&&(s=e[s]),e[r]=F({name:r,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(e,t,n,r,o,s){var l=i(a(this.points,n+2*s,r,o));return wt(e,t,l)},roughCollide:n,draw:function(e,n,r,i){var o=a(this.points,n,r,i);t.arrowShapeImpl("polygon")(e,o)},spacing:function(e){return 0},gap:o},s)};s("none",{collide:pe,roughCollide:pe,draw:ge,spacing:ve,gap:ve}),s("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),s("arrow","triangle"),s("triangle-backcurve",{points:e.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(e,n,i,o,s){var l=a(this.points,n,i,o),u=this.controlPoint,c=r(u[0],u[1],n,i,o);t.arrowShapeImpl(this.name)(e,l,c)},gap:function(e){return.8*o(e)}}),s("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(e,t,n,r,o,s,l){var u=i(a(this.points,n+2*l,r,o)),c=i(a(this.pointsTee,n+2*l,r,o));return wt(e,t,u)||wt(e,t,c)},draw:function(e,n,r,i,o){var s=a(this.points,n,r,i),l=a(this.pointsTee,n,r,i);t.arrowShapeImpl(this.name)(e,s,l)}}),s("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(e,t,n,r,o,s,l){var u=o,c=Math.pow(u.x-e,2)+Math.pow(u.y-t,2)<=Math.pow((n+2*l)*this.radius,2),d=i(a(this.points,n+2*l,r,o));return wt(e,t,d)||c},draw:function(e,n,r,i,o){var s=a(this.pointsTr,n,r,i);t.arrowShapeImpl(this.name)(e,s,i.x,i.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),s("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(e,t){var n=this.baseCrossLinePts.slice(),r=t/e;return n[3]=n[3]-r,n[5]=n[5]-r,n},collide:function(e,t,n,r,o,s,l){var u=i(a(this.points,n+2*l,r,o)),c=i(a(this.crossLinePts(n,s),n+2*l,r,o));return wt(e,t,u)||wt(e,t,c)},draw:function(e,n,r,i,o){var s=a(this.points,n,r,i),l=a(this.crossLinePts(n,o),n,r,i);t.arrowShapeImpl(this.name)(e,s,l)}}),s("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(e){return.525*o(e)}}),s("circle",{radius:.15,collide:function(e,t,n,r,a,i,o){var s=a;return Math.pow(s.x-e,2)+Math.pow(s.y-t,2)<=Math.pow((n+2*o)*this.radius,2)},draw:function(e,n,r,a,i){t.arrowShapeImpl(this.name)(e,a.x,a.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),s("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(e){return 1},gap:function(e){return 1}}),s("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),s("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}}),s("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(e){return.95*e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}})}},Go={projectIntoViewport:function(e,t){var n=this.cy,r=this.findContainerClientCoords(),a=r[0],i=r[1],o=r[4],s=n.pan(),l=n.zoom();return[((e-a)/o-s.x)/l,((t-i)/o-s.y)/l]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var e=this.container,t=e.getBoundingClientRect(),n=v.getComputedStyle(e),r=function(e){return parseFloat(n.getPropertyValue(e))},a=r("padding-left"),i=r("padding-right"),o=r("padding-top"),s=r("padding-bottom"),l=r("border-left-width"),u=r("border-right-width"),c=r("border-top-width"),d=(r("border-bottom-width"),e.clientWidth),f=e.clientHeight,h=a+i,p=o+s,g=l+u,m=t.width/(d+g),y=d-h,w=f-p,b=t.left+a+l,x=t.top+o+c;return this.containerBB=[b,x,y,w,m]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,n,r){return this.findNearestElements(e,t,n,r)[0]},findNearestElements:function(e,t,n,r){var a,i,o=this,s=this,l=s.getCachedZSortedEles(),u=[],c=s.cy.zoom(),d=s.cy.hasCompoundNodes(),f=(r?24:8)/c,h=(r?8:2)/c,p=(r?8:2)/c,v=1/0;function g(e,t){if(e.isNode()){if(i)return;i=e,u.push(e)}if(e.isEdge()&&(null==t||t<v))if(a){if(a.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value&&a.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value)for(var n=0;n<u.length;n++)if(u[n].isEdge()){u[n]=e,a=e,v=null!=t?t:v;break}}else u.push(e),a=e,v=null!=t?t:v}function m(n){var r=n.outerWidth()+2*h,a=n.outerHeight()+2*h,i=r/2,l=a/2,u=n.position();if(u.x-i<=e&&e<=u.x+i&&u.y-l<=t&&t<=u.y+l&&s.nodeShapes[o.getNodeShape(n)].checkPoint(e,t,0,r,a,u.x,u.y))return g(n,0),!0}function y(n){var r,a=n._private,i=a.rscratch,l=n.pstyle("width").pfValue,c=n.pstyle("arrow-scale").value,h=l/2+f,p=h*h,v=2*h,y=a.source,w=a.target;if("segments"===i.edgeType||"straight"===i.edgeType||"haystack"===i.edgeType){for(var b=i.allpts,x=0;x+3<b.length;x+=2)if(vt(e,t,b[x],b[x+1],b[x+2],b[x+3],v)&&p>(r=yt(e,t,b[x],b[x+1],b[x+2],b[x+3])))return g(n,r),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(b=i.allpts,x=0;x+5<i.allpts.length;x+=4)if(gt(e,t,b[x],b[x+1],b[x+2],b[x+3],b[x+4],b[x+5],v)&&p>(r=mt(e,t,b[x],b[x+1],b[x+2],b[x+3],b[x+4],b[x+5])))return g(n,r),!0;y=y||a.source,w=w||a.target;var _=o.getArrowWidth(l,c),E=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}];for(x=0;x<E.length;x++){var k=E[x],C=s.arrowShapes[n.pstyle(k.name+"-arrow-shape").value],S=n.pstyle("width").pfValue;if(C.roughCollide(e,t,_,k.angle,{x:k.x,y:k.y},S,f)&&C.collide(e,t,_,k.angle,{x:k.x,y:k.y},S,f))return g(n),!0}d&&u.length>0&&(m(y),m(w))}function w(e,t,n){return je(e,t,n)}function b(n,r){var a,i=n._private,o=p;a=r?r+"-":"",n.boundingBox();var s=i.labelBounds[r||"main"],l=n.pstyle(a+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=w(i.rscratch,"labelX",r),c=w(i.rscratch,"labelY",r),d=w(i.rscratch,"labelAngle",r),f=n.pstyle(a+"text-margin-x").pfValue,h=n.pstyle(a+"text-margin-y").pfValue,v=s.x1-o-f,m=s.x2+o-f,y=s.y1-o-h,b=s.y2+o-h;if(d){var x=Math.cos(d),_=Math.sin(d),E=function(e,t){return{x:(e-=u)*x-(t-=c)*_+u,y:e*_+t*x+c}},k=E(v,y),C=E(v,b),S=E(m,y),j=E(m,b),M=[k.x+f,k.y+h,S.x+f,S.y+h,j.x+f,j.y+h,C.x+f,C.y+h];if(wt(e,t,M))return g(n),!0}else if(ft(s,e,t))return g(n),!0}}n&&(l=l.interactive);for(var x=l.length-1;x>=0;x--){var _=l[x];_.isNode()?m(_)||b(_):y(_)||b(_)||b(_,"source")||b(_,"target")}return u},getAllInBox:function(e,t,n,r){for(var a,i,o=this.getCachedZSortedEles().interactive,s=[],l=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),d=Math.max(t,r),f=ot({x1:e=l,y1:t=c,x2:n=u,y2:r=d}),h=0;h<o.length;h++){var p=o[h];if(p.isNode()){var v=p,g=v.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});dt(f,g)&&!ht(g,f)&&s.push(v)}else{var m=p,y=m._private,w=y.rscratch;if(null!=w.startX&&null!=w.startY&&!ft(f,w.startX,w.startY))continue;if(null!=w.endX&&null!=w.endY&&!ft(f,w.endX,w.endY))continue;if("bezier"===w.edgeType||"multibezier"===w.edgeType||"self"===w.edgeType||"compound"===w.edgeType||"segments"===w.edgeType||"haystack"===w.edgeType){for(var b=y.rstyle.bezierPts||y.rstyle.linePts||y.rstyle.haystackPts,x=!0,_=0;_<b.length;_++)if(a=f,i=b[_],!ft(a,i.x,i.y)){x=!1;break}x&&s.push(m)}else"haystack"!==w.edgeType&&"straight"!==w.edgeType||s.push(m)}}return s}},Yo={calculateArrowAngles:function(e){var t,n,r,a,i,o,s=e._private.rscratch,l="haystack"===s.edgeType,u="bezier"===s.edgeType,c="multibezier"===s.edgeType,d="segments"===s.edgeType,f="compound"===s.edgeType,h="self"===s.edgeType;if(l?(r=s.haystackPts[0],a=s.haystackPts[1],i=s.haystackPts[2],o=s.haystackPts[3]):(r=s.arrowStartX,a=s.arrowStartY,i=s.arrowEndX,o=s.arrowEndY),v=s.midX,g=s.midY,d)t=r-s.segpts[0],n=a-s.segpts[1];else if(c||f||h||u){var p=s.allpts;t=r-rt(p[0],p[2],p[4],.1),n=a-rt(p[1],p[3],p[5],.1)}else t=r-v,n=a-g;s.srcArrowAngle=Ze(t,n);var v=s.midX,g=s.midY;if(l&&(v=(r+i)/2,g=(a+o)/2),t=i-r,n=o-a,d)if((p=s.allpts).length/2%2==0){var m=(y=p.length/2)-2;t=p[y]-p[m],n=p[y+1]-p[m+1]}else{m=(y=p.length/2-1)-2;var y,w=y+2;t=p[y]-p[m],n=p[y+1]-p[m+1]}else if(c||f||h){var b,x,_,E,p=s.allpts;if(s.ctrlpts.length/2%2==0){var k=(C=(S=p.length/2-1)+2)+2;b=rt(p[S],p[C],p[k],0),x=rt(p[S+1],p[C+1],p[k+1],0),_=rt(p[S],p[C],p[k],1e-4),E=rt(p[S+1],p[C+1],p[k+1],1e-4)}else{var C,S;k=(C=p.length/2-1)+2;b=rt(p[S=C-2],p[C],p[k],.4999),x=rt(p[S+1],p[C+1],p[k+1],.4999),_=rt(p[S],p[C],p[k],.5),E=rt(p[S+1],p[C+1],p[k+1],.5)}t=_-b,n=E-x}(s.midtgtArrowAngle=Ze(t,n),s.midDispX=t,s.midDispY=n,t*=-1,n*=-1,d)&&((p=s.allpts).length/2%2==0||(t=-(p[w=(y=p.length/2-1)+2]-p[y]),n=-(p[w+1]-p[y+1])));if(s.midsrcArrowAngle=Ze(t,n),d)t=i-s.segpts[s.segpts.length-2],n=o-s.segpts[s.segpts.length-1];else if(c||f||h||u){var j=(p=s.allpts).length;t=i-rt(p[j-6],p[j-4],p[j-2],.9),n=o-rt(p[j-5],p[j-3],p[j-1],.9)}else t=i-v,n=o-g;s.tgtArrowAngle=Ze(t,n)}};Yo.getArrowWidth=Yo.getArrowHeight=function(e,t){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[e+", "+t];return r||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r,r)};var qo={};function Wo(e){var t=[];if(null!=e){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];t.push({x:r,y:a})}return t}}qo.findHaystackPoints=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n._private,a=r.rscratch;if(!a.haystack){var i=2*Math.random()*Math.PI;a.source={x:Math.cos(i),y:Math.sin(i)},i=2*Math.random()*Math.PI,a.target={x:Math.cos(i),y:Math.sin(i)}}var o=r.source,s=r.target,l=o.position(),u=s.position(),c=o.width(),d=s.width(),f=o.height(),h=s.height(),p=n.pstyle("haystack-radius").value/2;a.haystackPts=a.allpts=[a.source.x*c*p+l.x,a.source.y*f*p+l.y,a.target.x*d*p+u.x,a.target.y*h*p+u.y],a.midX=(a.allpts[0]+a.allpts[2])/2,a.midY=(a.allpts[1]+a.allpts[3])/2,a.edgeType="haystack",a.haystack=!0,this.storeEdgeProjections(n),this.calculateArrowAngles(n),this.recalculateEdgeLabelProjections(n),this.calculateLabelAngles(n)}},qo.findSegmentsPoints=function(e,t){var n=e._private.rscratch,r=t.posPts,a=t.intersectionPts,i=t.vectorNormInverse,o=e.pstyle("edge-distances").value,s=e.pstyle("segment-weights"),l=e.pstyle("segment-distances"),u=Math.min(s.pfValue.length,l.pfValue.length);n.edgeType="segments",n.segpts=[];for(var c=0;c<u;c++){var d=s.pfValue[c],f=l.pfValue[c],h=1-d,p=d,v="node-position"===o?r:a,g={x:v.x1*h+v.x2*p,y:v.y1*h+v.y2*p};n.segpts.push(g.x+i.x*f,g.y+i.y*f)}},qo.findLoopPoints=function(e,t,n,r){var a=e._private.rscratch,i=t.dirCounts,o=t.srcPos,s=e.pstyle("control-point-distances"),l=s?s.pfValue[0]:void 0,u=e.pstyle("loop-direction").pfValue,c=e.pstyle("loop-sweep").pfValue,d=e.pstyle("control-point-step-size").pfValue;a.edgeType="self";var f=n,h=d;r&&(f=0,h=l);var p=u-Math.PI/2,v=p-c/2,g=p+c/2,m=String(u+"_"+c);f=void 0===i[m]?i[m]=0:++i[m],a.ctrlpts=[o.x+1.4*Math.cos(v)*h*(f/3+1),o.y+1.4*Math.sin(v)*h*(f/3+1),o.x+1.4*Math.cos(g)*h*(f/3+1),o.y+1.4*Math.sin(g)*h*(f/3+1)]},qo.findCompoundLoopPoints=function(e,t,n,r){var a=e._private.rscratch;a.edgeType="compound";var i=t.srcPos,o=t.tgtPos,s=t.srcW,l=t.srcH,u=t.tgtW,c=t.tgtH,d=e.pstyle("control-point-step-size").pfValue,f=e.pstyle("control-point-distances"),h=f?f.pfValue[0]:void 0,p=n,v=d;r&&(p=0,v=h);var g={x:i.x-s/2,y:i.y-l/2},m={x:o.x-u/2,y:o.y-c/2},y={x:Math.min(g.x,m.x),y:Math.min(g.y,m.y)},w=Math.max(.5,Math.log(.01*s)),b=Math.max(.5,Math.log(.01*u));a.ctrlpts=[y.x,y.y-(1+Math.pow(50,1.12)/100)*v*(p/3+1)*w,y.x-(1+Math.pow(50,1.12)/100)*v*(p/3+1)*b,y.y]},qo.findStraightEdgePoints=function(e){e._private.rscratch.edgeType="straight"},qo.findBezierPoints=function(e,t,n,r,a){var i=e._private.rscratch,o=t.vectorNormInverse,s=t.posPts,l=t.intersectionPts,u=e.pstyle("edge-distances").value,c=e.pstyle("control-point-step-size").pfValue,d=e.pstyle("control-point-distances"),f=e.pstyle("control-point-weights"),h=d&&f?Math.min(d.value.length,f.value.length):1,p=d?d.pfValue[0]:void 0,v=f.value[0],g=r;i.edgeType=g?"multibezier":"bezier",i.ctrlpts=[];for(var m=0;m<h;m++){var y=(.5-t.eles.length/2+n)*c*(a?-1:1),w=void 0,b=Je(y);g&&(p=d?d.pfValue[m]:c,v=f.value[m]);var x=void 0!==(w=r?p:void 0!==p?b*p:void 0)?w:y,_=1-v,E=v,k="node-position"===u?s:l,C={x:k.x1*_+k.x2*E,y:k.y1*_+k.y2*E};i.ctrlpts.push(C.x+o.x*x,C.y+o.y*x)}},qo.findTaxiPoints=function(e,t){var n=e._private.rscratch;n.edgeType="segments";var r="vertical",a="horizontal",i="leftward",o="rightward",s="downward",l="upward",u=t.posPts,c=t.srcW,d=t.srcH,f=t.tgtW,h=t.tgtH,p="node-position"!==e.pstyle("edge-distances").value,v=e.pstyle("taxi-direction").value,g=v,m=e.pstyle("taxi-turn"),y="%"===m.units,w=m.pfValue,b=w<0,x=e.pstyle("taxi-turn-min-distance").pfValue,_=p?(c+f)/2:0,E=p?(d+h)/2:0,k=u.x2-u.x1,C=u.y2-u.y1,S=function(e,t){return e>0?Math.max(e-t,0):Math.min(e+t,0)},j=S(k,_),M=S(C,E),R=!1;"auto"===g?v=Math.abs(j)>Math.abs(M)?a:r:g===l||g===s?(v=r,R=!0):g!==i&&g!==o||(v=a,R=!0);var P,O=v===r,z=O?M:j,A=O?C:k,T=Je(A),B=!1;(R&&(y||b)||!(g===s&&A<0||g===l&&A>0||g===i&&A>0||g===o&&A<0)||(z=(T*=-1)*Math.abs(z),B=!0),y)?P=(w<0?1+w:w)*z:P=(w<0?z:0)+w*T;var D=function(e){return Math.abs(e)<x||Math.abs(e)>=Math.abs(z)},N=D(P),L=D(Math.abs(z)-Math.abs(P));if((N||L)&&!B)if(O){var V=Math.abs(A)<=d/2,I=Math.abs(k)<=f/2;if(V){var H=(u.x1+u.x2)/2,F=u.y1,G=u.y2;n.segpts=[H,F,H,G]}else if(I){var Y=(u.y1+u.y2)/2,q=u.x1,W=u.x2;n.segpts=[q,Y,W,Y]}else n.segpts=[u.x1,u.y2]}else{var U=Math.abs(A)<=c/2,X=Math.abs(C)<=h/2;if(U){var $=(u.y1+u.y2)/2,K=u.x1,Z=u.x2;n.segpts=[K,$,Z,$]}else if(X){var Q=(u.x1+u.x2)/2,J=u.y1,ee=u.y2;n.segpts=[Q,J,Q,ee]}else n.segpts=[u.x2,u.y1]}else if(O){var te=u.y1+P+(p?d/2*T:0),ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else{var ae=u.x1+P+(p?c/2*T:0),ie=u.y1,oe=u.y2;n.segpts=[ae,ie,ae,oe]}},qo.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,a=t.tgtPos,i=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,d=!S(n.startX)||!S(n.startY),f=!S(n.arrowStartX)||!S(n.arrowStartY),h=!S(n.endX)||!S(n.endY),p=!S(n.arrowEndX)||!S(n.arrowEndY),v=3*(this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth),g=et({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),m=g<v,y=et({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.endX,y:n.endY}),w=y<v,b=!1;if(d||f||m){b=!0;var x={x:n.ctrlpts[0]-r.x,y:n.ctrlpts[1]-r.y},_=Math.sqrt(x.x*x.x+x.y*x.y),E={x:x.x/_,y:x.y/_},k=Math.max(i,o),C={x:n.ctrlpts[0]+2*E.x*k,y:n.ctrlpts[1]+2*E.y*k},j=u.intersectLine(r.x,r.y,i,o,C.x,C.y,0);m?(n.ctrlpts[0]=n.ctrlpts[0]+E.x*(v-g),n.ctrlpts[1]=n.ctrlpts[1]+E.y*(v-g)):(n.ctrlpts[0]=j[0]+E.x*v,n.ctrlpts[1]=j[1]+E.y*v)}if(h||p||w){b=!0;var M={x:n.ctrlpts[0]-a.x,y:n.ctrlpts[1]-a.y},R=Math.sqrt(M.x*M.x+M.y*M.y),P={x:M.x/R,y:M.y/R},O=Math.max(i,o),z={x:n.ctrlpts[0]+2*P.x*O,y:n.ctrlpts[1]+2*P.y*O},A=c.intersectLine(a.x,a.y,s,l,z.x,z.y,0);w?(n.ctrlpts[0]=n.ctrlpts[0]+P.x*(v-y),n.ctrlpts[1]=n.ctrlpts[1]+P.y*(v-y)):(n.ctrlpts[0]=A[0]+P.x*v,n.ctrlpts[1]=A[1]+P.y*v)}b&&this.findEndpoints(e)}},qo.storeAllpts=function(e){var t=e._private.rscratch;if("multibezier"===t.edgeType||"bezier"===t.edgeType||"self"===t.edgeType||"compound"===t.edgeType){t.allpts=[],t.allpts.push(t.startX,t.startY);for(var n=0;n+1<t.ctrlpts.length;n+=2)t.allpts.push(t.ctrlpts[n],t.ctrlpts[n+1]),n+3<t.ctrlpts.length&&t.allpts.push((t.ctrlpts[n]+t.ctrlpts[n+2])/2,(t.ctrlpts[n+1]+t.ctrlpts[n+3])/2);var r;t.allpts.push(t.endX,t.endY),t.ctrlpts.length/2%2==0?(r=t.allpts.length/2-1,t.midX=t.allpts[r],t.midY=t.allpts[r+1]):(r=t.allpts.length/2-3,.5,t.midX=rt(t.allpts[r],t.allpts[r+2],t.allpts[r+4],.5),t.midY=rt(t.allpts[r+1],t.allpts[r+3],t.allpts[r+5],.5))}else if("straight"===t.edgeType)t.allpts=[t.startX,t.startY,t.endX,t.endY],t.midX=(t.startX+t.endX+t.arrowStartX+t.arrowEndX)/4,t.midY=(t.startY+t.endY+t.arrowStartY+t.arrowEndY)/4;else if("segments"===t.edgeType)if(t.allpts=[],t.allpts.push(t.startX,t.startY),t.allpts.push.apply(t.allpts,t.segpts),t.allpts.push(t.endX,t.endY),t.segpts.length%4==0){var a=t.segpts.length/2,i=a-2;t.midX=(t.segpts[i]+t.segpts[a])/2,t.midY=(t.segpts[i+1]+t.segpts[a+1])/2}else{var o=t.segpts.length/2-1;t.midX=t.segpts[o],t.midY=t.segpts[o+1]}},qo.checkForInvalidEdgeWarning=function(e){var t=e[0]._private.rscratch;t.nodesOverlap||S(t.startX)&&S(t.startY)&&S(t.endX)&&S(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,we("Edge `"+e.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},qo.findEdgeControlPoints=function(e){var t=this;if(e&&0!==e.length){for(var n=this,r=n.cy.hasCompoundNodes(),a={map:new Re,get:function(e){var t=this.map.get(e[0]);return null!=t?t.get(e[1]):null},set:function(e,t){var n=this.map.get(e[0]);null==n&&(n=new Re,this.map.set(e[0],n)),n.set(e[1],t)}},i=[],o=[],s=0;s<e.length;s++){var l=e[s],u=l._private,c=l.pstyle("curve-style").value;if(!l.removed()&&l.takesUpSpace())if("haystack"!==c){var d="unbundled-bezier"===c||"segments"===c||"straight"===c||"straight-triangle"===c||"taxi"===c,f="unbundled-bezier"===c||"bezier"===c,h=u.source,p=u.target,v=[h.poolIndex(),p.poolIndex()].sort(),g=a.get(v);null==g&&(g={eles:[]},a.set(v,g),i.push(v)),g.eles.push(l),d&&(g.hasUnbundled=!0),f&&(g.hasBezier=!0)}else o.push(l)}for(var m=function(e){var o=i[e],s=a.get(o),l=void 0;if(!s.hasUnbundled){var u=s.eles[0].parallelEdges().filter((function(e){return e.isBundledBezier()}));Se(s.eles),u.forEach((function(e){return s.eles.push(e)})),s.eles.sort((function(e,t){return e.poolIndex()-t.poolIndex()}))}var c=s.eles[0],d=c.source(),f=c.target();if(d.poolIndex()>f.poolIndex()){var h=d;d=f,f=h}var p=s.srcPos=d.position(),v=s.tgtPos=f.position(),g=s.srcW=d.outerWidth(),m=s.srcH=d.outerHeight(),y=s.tgtW=f.outerWidth(),w=s.tgtH=f.outerHeight(),b=s.srcShape=n.nodeShapes[t.getNodeShape(d)],x=s.tgtShape=n.nodeShapes[t.getNodeShape(f)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var _=0;_<s.eles.length;_++){var E=s.eles[_],k=E[0]._private.rscratch,C=E.pstyle("curve-style").value,j="unbundled-bezier"===C||"segments"===C||"taxi"===C,M=!d.same(E.source());if(!s.calculatedIntersection&&d!==f&&(s.hasBezier||s.hasUnbundled)){s.calculatedIntersection=!0;var R=b.intersectLine(p.x,p.y,g,m,v.x,v.y,0),P=s.srcIntn=R,O=x.intersectLine(v.x,v.y,y,w,p.x,p.y,0),z=s.tgtIntn=O,A=s.intersectionPts={x1:R[0],x2:O[0],y1:R[1],y2:O[1]},T=s.posPts={x1:p.x,x2:v.x,y1:p.y,y2:v.y},B=O[1]-R[1],D=O[0]-R[0],N=Math.sqrt(D*D+B*B),L=s.vector={x:D,y:B},V=s.vectorNorm={x:L.x/N,y:L.y/N},I={x:-V.y,y:V.x};s.nodesOverlap=!S(N)||x.checkPoint(R[0],R[1],0,y,w,v.x,v.y)||b.checkPoint(O[0],O[1],0,g,m,p.x,p.y),s.vectorNormInverse=I,l={nodesOverlap:s.nodesOverlap,dirCounts:s.dirCounts,calculatedIntersection:!0,hasBezier:s.hasBezier,hasUnbundled:s.hasUnbundled,eles:s.eles,srcPos:v,tgtPos:p,srcW:y,srcH:w,tgtW:g,tgtH:m,srcIntn:z,tgtIntn:P,srcShape:x,tgtShape:b,posPts:{x1:T.x2,y1:T.y2,x2:T.x1,y2:T.y1},intersectionPts:{x1:A.x2,y1:A.y2,x2:A.x1,y2:A.y1},vector:{x:-L.x,y:-L.y},vectorNorm:{x:-V.x,y:-V.y},vectorNormInverse:{x:-I.x,y:-I.y}}}var H=M?l:s;k.nodesOverlap=H.nodesOverlap,k.srcIntn=H.srcIntn,k.tgtIntn=H.tgtIntn,r&&(d.isParent()||d.isChild()||f.isParent()||f.isChild())&&(d.parents().anySame(f)||f.parents().anySame(d)||d.same(f)&&d.isParent())?t.findCompoundLoopPoints(E,H,_,j):d===f?t.findLoopPoints(E,H,_,j):"segments"===C?t.findSegmentsPoints(E,H):"taxi"===C?t.findTaxiPoints(E,H):"straight"===C||!j&&s.eles.length%2==1&&_===Math.floor(s.eles.length/2)?t.findStraightEdgePoints(E):t.findBezierPoints(E,H,_,j,M),t.findEndpoints(E),t.tryToCorrectInvalidPoints(E,H),t.checkForInvalidEdgeWarning(E),t.storeAllpts(E),t.storeEdgeProjections(E),t.calculateArrowAngles(E),t.recalculateEdgeLabelProjections(E),t.calculateLabelAngles(E)}},y=0;y<i.length;y++)m(y);this.findHaystackPoints(o)}},qo.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if("segments"===t.edgeType)return this.recalculateRenderedStyle(e),Wo(t.segpts)},qo.getControlPoints=function(e){var t=e[0]._private.rscratch,n=t.edgeType;if("bezier"===n||"multibezier"===n||"self"===n||"compound"===n)return this.recalculateRenderedStyle(e),Wo(t.ctrlpts)},qo.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}};var Uo={manualEndptToPx:function(e,t){var n=e.position(),r=e.outerWidth(),a=e.outerHeight();if(2===t.value.length){var i=[t.pfValue[0],t.pfValue[1]];return"%"===t.units[0]&&(i[0]=i[0]*r),"%"===t.units[1]&&(i[1]=i[1]*a),i[0]+=n.x,i[1]+=n.y,i}var o=t.pfValue[0];o=-Math.PI/2+o;var s=2*Math.max(r,a),l=[n.x+Math.cos(o)*s,n.y+Math.sin(o)*s];return this.nodeShapes[this.getNodeShape(e)].intersectLine(n.x,n.y,r,a,l[0],l[1],0)},findEndpoints:function(e){var t,n,r,a,i,o=this,s=e.source()[0],l=e.target()[0],u=s.position(),c=l.position(),d=e.pstyle("target-arrow-shape").value,f=e.pstyle("source-arrow-shape").value,h=e.pstyle("target-distance-from-node").pfValue,p=e.pstyle("source-distance-from-node").pfValue,v=e.pstyle("curve-style").value,g=e._private.rscratch,m=g.edgeType,y="self"===m||"compound"===m,w="bezier"===m||"multibezier"===m||y,b="bezier"!==m,x="straight"===m||"segments"===m,_="segments"===m,E=w||b||x,k=y||"taxi"===v,C=e.pstyle("source-endpoint"),j=k?"outside-to-node":C.value,M=e.pstyle("target-endpoint"),R=k?"outside-to-node":M.value;if(g.srcManEndpt=C,g.tgtManEndpt=M,w){var P=[g.ctrlpts[0],g.ctrlpts[1]];n=b?[g.ctrlpts[g.ctrlpts.length-2],g.ctrlpts[g.ctrlpts.length-1]]:P,r=P}else if(x){var O=_?g.segpts.slice(0,2):[c.x,c.y];n=_?g.segpts.slice(g.segpts.length-2):[u.x,u.y],r=O}if("inside-to-node"===R)t=[c.x,c.y];else if(M.units)t=this.manualEndptToPx(l,M);else if("outside-to-line"===R)t=g.tgtIntn;else if("outside-to-node"===R||"outside-to-node-or-label"===R?a=n:"outside-to-line"!==R&&"outside-to-line-or-label"!==R||(a=[u.x,u.y]),t=o.nodeShapes[this.getNodeShape(l)].intersectLine(c.x,c.y,l.outerWidth(),l.outerHeight(),a[0],a[1],0),"outside-to-node-or-label"===R||"outside-to-line-or-label"===R){var z=l._private.rscratch,A=z.labelWidth,T=z.labelHeight,B=z.labelX,D=z.labelY,N=A/2,L=T/2,V=l.pstyle("text-valign").value;"top"===V?D-=L:"bottom"===V&&(D+=L);var I=l.pstyle("text-halign").value;"left"===I?B-=N:"right"===I&&(B+=N);var H=jt(a[0],a[1],[B-N,D-L,B+N,D-L,B+N,D+L,B-N,D+L],c.x,c.y);if(H.length>0){var F=u,G=tt(F,Ke(t)),Y=tt(F,Ke(H)),q=G;if(Y<G&&(t=H,q=Y),H.length>2)tt(F,{x:H[2],y:H[3]})<q&&(t=[H[2],H[3]])}}var W=Mt(t,n,o.arrowShapes[d].spacing(e)+h),U=Mt(t,n,o.arrowShapes[d].gap(e)+h);if(g.endX=U[0],g.endY=U[1],g.arrowEndX=W[0],g.arrowEndY=W[1],"inside-to-node"===j)t=[u.x,u.y];else if(C.units)t=this.manualEndptToPx(s,C);else if("outside-to-line"===j)t=g.srcIntn;else if("outside-to-node"===j||"outside-to-node-or-label"===j?i=r:"outside-to-line"!==j&&"outside-to-line-or-label"!==j||(i=[c.x,c.y]),t=o.nodeShapes[this.getNodeShape(s)].intersectLine(u.x,u.y,s.outerWidth(),s.outerHeight(),i[0],i[1],0),"outside-to-node-or-label"===j||"outside-to-line-or-label"===j){var X=s._private.rscratch,$=X.labelWidth,K=X.labelHeight,Z=X.labelX,Q=X.labelY,J=$/2,ee=K/2,te=s.pstyle("text-valign").value;"top"===te?Q-=ee:"bottom"===te&&(Q+=ee);var ne=s.pstyle("text-halign").value;"left"===ne?Z-=J:"right"===ne&&(Z+=J);var re=jt(i[0],i[1],[Z-J,Q-ee,Z+J,Q-ee,Z+J,Q+ee,Z-J,Q+ee],u.x,u.y);if(re.length>0){var ae=c,ie=tt(ae,Ke(t)),oe=tt(ae,Ke(re)),se=ie;if(oe<ie&&(t=[re[0],re[1]],se=oe),re.length>2)tt(ae,{x:re[2],y:re[3]})<se&&(t=[re[2],re[3]])}}var le=Mt(t,r,o.arrowShapes[f].spacing(e)+p),ue=Mt(t,r,o.arrowShapes[f].gap(e)+p);g.startX=ue[0],g.startY=ue[1],g.arrowStartX=le[0],g.arrowStartY=le[1],E&&(S(g.startX)&&S(g.startY)&&S(g.endX)&&S(g.endY)?g.badLine=!1:g.badLine=!0)},getSourceEndpoint:function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),"haystack"===t.edgeType?{x:t.haystackPts[0],y:t.haystackPts[1]}:{x:t.arrowStartX,y:t.arrowStartY}},getTargetEndpoint:function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),"haystack"===t.edgeType?{x:t.haystackPts[2],y:t.haystackPts[3]}:{x:t.arrowEndX,y:t.arrowEndY}}},Xo={};function $o(e,t,n){for(var r=function(e,t,n,r){return rt(e,t,n,r)},a=t._private.rstyle.bezierPts,i=0;i<e.bezierProjPcts.length;i++){var o=e.bezierProjPcts[i];a.push({x:r(n[0],n[2],n[4],o),y:r(n[1],n[3],n[5],o)})}}Xo.storeEdgeProjections=function(e){var t=e._private,n=t.rscratch,r=n.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===r||"bezier"===r||"self"===r||"compound"===r){t.rstyle.bezierPts=[];for(var a=0;a+5<n.allpts.length;a+=4)$o(this,e,n.allpts.slice(a,a+6))}else if("segments"===r){var i=t.rstyle.linePts=[];for(a=0;a+1<n.allpts.length;a+=2)i.push({x:n.allpts[a],y:n.allpts[a+1]})}else if("haystack"===r){var o=n.haystackPts;t.rstyle.haystackPts=[{x:o[0],y:o[1]},{x:o[2],y:o[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},Xo.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)};var Ko={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!A(t)){var n,r,a=e._private,i=e.width(),o=e.height(),s=e.padding(),l=e.position(),u=e.pstyle("text-halign").strValue,c=e.pstyle("text-valign").strValue,d=a.rscratch,f=a.rstyle;switch(u){case"left":n=l.x-i/2-s;break;case"right":n=l.x+i/2+s;break;default:n=l.x}switch(c){case"top":r=l.y-o/2-s;break;case"bottom":r=l.y+o/2+s;break;default:r=l.y}d.labelX=n,d.labelY=r,f.labelX=n,f.labelY=r,this.calculateLabelAngles(e),this.applyLabelDimensions(e)}}},Zo=function(e,t){var n=Math.atan(t/e);return 0===e&&n<0&&(n*=-1),n},Qo=function(e,t){var n=t.x-e.x,r=t.y-e.y;return Zo(n,r)};Ko.recalculateEdgeLabelProjections=function(e){var t,n=e._private,r=n.rscratch,a=this,i={mid:e.pstyle("label").strValue,source:e.pstyle("source-label").strValue,target:e.pstyle("target-label").strValue};if(i.mid||i.source||i.target){t={x:r.midX,y:r.midY};var o=function(e,t,r){Me(n.rscratch,e,t,r),Me(n.rstyle,e,t,r)};o("labelX",null,t.x),o("labelY",null,t.y);var s=Zo(r.midDispX,r.midDispY);o("labelAutoAngle",null,s);var l=function e(){if(e.cache)return e.cache;for(var t=[],i=0;i+5<r.allpts.length;i+=4){var o={x:r.allpts[i],y:r.allpts[i+1]},s={x:r.allpts[i+2],y:r.allpts[i+3]},l={x:r.allpts[i+4],y:r.allpts[i+5]};t.push({p0:o,p1:s,p2:l,startDist:0,length:0,segments:[]})}var u=n.rstyle.bezierPts,c=a.bezierProjPcts.length;function d(e,t,n,r,a){var i=et(t,n),o=e.segments[e.segments.length-1],s={p0:t,p1:n,t0:r,t1:a,startDist:o?o.startDist+o.length:0,length:i};e.segments.push(s),e.length+=i}for(var f=0;f<t.length;f++){var h=t[f],p=t[f-1];p&&(h.startDist=p.startDist+p.length),d(h,h.p0,u[f*c],0,a.bezierProjPcts[0]);for(var v=0;v<c-1;v++)d(h,u[f*c+v],u[f*c+v+1],a.bezierProjPcts[v],a.bezierProjPcts[v+1]);d(h,u[f*c+c-1],h.p2,a.bezierProjPcts[c-1],1)}return e.cache=t},u=function(n){var a,s="source"===n;if(i[n]){var u=e.pstyle(n+"-text-offset").pfValue;switch(r.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var c,d=l(),f=0,h=0,p=0;p<d.length;p++){for(var v=d[s?p:d.length-1-p],g=0;g<v.segments.length;g++){var m=v.segments[s?g:v.segments.length-1-g],y=p===d.length-1&&g===v.segments.length-1;if(f=h,(h+=m.length)>=u||y){c={cp:v,segment:m};break}}if(c)break}var w=c.cp,b=c.segment,x=(u-f)/b.length,_=b.t1-b.t0,E=s?b.t0+_*x:b.t1-_*x;E=it(0,E,1),t=at(w.p0,w.p1,w.p2,E),a=function(e,t,n,r){var a=it(0,r-.001,1),i=it(0,r+.001,1),o=at(e,t,n,a),s=at(e,t,n,i);return Qo(o,s)}(w.p0,w.p1,w.p2,E);break;case"straight":case"segments":case"haystack":for(var k,C,S,j,M=0,R=r.allpts.length,P=0;P+3<R&&(s?(S={x:r.allpts[P],y:r.allpts[P+1]},j={x:r.allpts[P+2],y:r.allpts[P+3]}):(S={x:r.allpts[R-2-P],y:r.allpts[R-1-P]},j={x:r.allpts[R-4-P],y:r.allpts[R-3-P]}),C=M,!((M+=k=et(S,j))>=u));P+=2);var O=(u-C)/k;O=it(0,O,1),t=function(e,t,n,r){var a=t.x-e.x,i=t.y-e.y,o=et(e,t),s=a/o,l=i/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(S,j,O),a=Qo(S,j)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,a)}};u("source"),u("target"),this.applyLabelDimensions(e)}},Ko.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Ko.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),a=this.calculateLabelDimensions(e,r),i=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,s=je(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==o?1:Math.max(s.length,1),u=a.height/l,c=u*i,d=a.width,f=a.height+(l-1)*(i-1)*u;Me(n.rstyle,"labelWidth",t,d),Me(n.rscratch,"labelWidth",t,d),Me(n.rstyle,"labelHeight",t,f),Me(n.rscratch,"labelHeight",t,f),Me(n.rscratch,"labelLineHeight",t,c)},Ko.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",a=e.pstyle(r+"label").strValue,i=e.pstyle("text-transform").value,o=function(e,r){return r?(Me(n.rscratch,e,t,r),r):je(n.rscratch,e,t)};if(!a)return"";"none"==i||("uppercase"==i?a=a.toUpperCase():"lowercase"==i&&(a=a.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=o("labelKey");if(null!=l&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u=a.split("\n"),c=e.pstyle("text-max-width").pfValue,d="anywhere"===e.pstyle("text-overflow-wrap").value,f=[],h=/[\s\u200b]+/,p=d?"":" ",v=0;v<u.length;v++){var g=u[v],m=this.calculateLabelDimensions(e,g).width;if(d){var y=g.split("").join("\u200b");g=y}if(m>c){for(var w=g.split(h),b="",x=0;x<w.length;x++){var _=w[x],E=0===b.length?_:b+p+_;this.calculateLabelDimensions(e,E).width<=c?b+=_+p:(b&&f.push(b),b=_+p)}b.match(/^[\s\u200b]+$/)||f.push(b)}else f.push(g)}o("labelWrapCachedLines",f),a=o("labelWrapCachedText",f.join("\n")),o("labelWrapKey",l)}else if("ellipsis"===s){var k=e.pstyle("text-max-width").pfValue,C="",S=!1;if(this.calculateLabelDimensions(e,a).width<k)return a;for(var j=0;j<a.length;j++){if(this.calculateLabelDimensions(e,C+a[j]+"\u2026").width>k)break;C+=a[j],j===a.length-1&&(S=!0)}return S||(C+="\u2026"),C}return a},Ko.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Ko.calculateLabelDimensions=function(e,t){var n=oe(t,e._private.labelDimsKey),r=this.labelDimCache||(this.labelDimCache=[]),a=r[n];if(null!=a)return a;var i=e.pstyle("font-style").strValue,o=e.pstyle("font-size").pfValue,s=e.pstyle("font-family").strValue,l=e.pstyle("font-weight").strValue,u=this.labelCalcCanvas,c=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=document.createElement("canvas"),c=this.labelCalcCanvasContext=u.getContext("2d");var d=u.style;d.position="absolute",d.left="-9999px",d.top="-9999px",d.zIndex="-1",d.visibility="hidden",d.pointerEvents="none"}c.font="".concat(i," ").concat(l," ").concat(o,"px ").concat(s);for(var f=0,h=0,p=t.split("\n"),v=0;v<p.length;v++){var g=p[v],m=c.measureText(g),y=Math.ceil(m.width),w=o;f=Math.max(y,f),h+=w}return f+=0,h+=0,r[n]={width:f,height:h}},Ko.calculateLabelAngle=function(e,t){var n=e._private.rscratch,r=e.isEdge(),a=t?t+"-":"",i=e.pstyle(a+"text-rotation"),o=i.strValue;return"none"===o?0:r&&"autorotate"===o?n.labelAutoAngle:"autorotate"===o?0:i.pfValue},Ko.calculateLabelAngles=function(e){var t=this,n=e.isEdge(),r=e._private.rscratch;r.labelAngle=t.calculateLabelAngle(e),n&&(r.sourceLabelAngle=t.calculateLabelAngle(e,"source"),r.targetLabelAngle=t.calculateLabelAngle(e,"target"))};var Jo={},es=!1;Jo.getNodeShape=function(e){var t=e.pstyle("shape").value;if("cutrectangle"===t&&(e.width()<28||e.height()<28))return es||(we("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),es=!0),"rectangle";if(e.isParent())return"rectangle"===t||"roundrectangle"===t||"round-rectangle"===t||"cutrectangle"===t||"cut-rectangle"===t||"barrel"===t?t:"rectangle";if("polygon"===t){var n=e.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(n).name}return t};var ts={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r<e.length;r++){var a=e[r],i=a._private,o=i.rstyle;o.clean=!1,o.cleanConnected=!1}};n.binder(e).on("bounds.* dirty.*",(function(e){var t=e.target;r(t)})).on("style.* background.*",(function(e){var t=e.target;r(t,!1)}));var a=function(a){if(a){var i=n.onUpdateEleCalcsFns;t.cleanStyle();for(var o=0;o<t.length;o++){var s=t[o],l=s._private.rstyle;s.isNode()&&!l.cleanConnected&&(r(s.connectedEdges()),l.cleanConnected=!0)}if(i)for(var u=0;u<i.length;u++){(0,i[u])(a,t)}n.recalculateRenderedStyle(t),t=e.collection()}};n.flushRenderedStyleQueue=function(){a(!0)},n.beforeRender(a,n.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var n=function(e){return e._private.rstyle.cleanConnected},r=[],a=[];if(!this.destroyed){void 0===t&&(t=!0);for(var i=0;i<e.length;i++){var o=e[i],s=o._private,l=s.rstyle;!o.isEdge()||n(o.source())&&n(o.target())||(l.clean=!1),t&&l.clean||o.removed()||"none"!==o.pstyle("display").value&&("nodes"===s.group?a.push(o):r.push(o),l.clean=!0)}for(var u=0;u<a.length;u++){var c=a[u],d=c._private.rstyle,f=c.position();this.recalculateNodeLabelProjection(c),d.nodeX=f.x,d.nodeY=f.y,d.nodeW=c.pstyle("width").pfValue,d.nodeH=c.pstyle("height").pfValue}this.recalculateEdgeProjections(r);for(var h=0;h<r.length;h++){var p=r[h]._private,v=p.rstyle,g=p.rscratch;v.srcX=g.arrowStartX,v.srcY=g.arrowStartY,v.tgtX=g.arrowEndX,v.tgtY=g.arrowEndY,v.midX=g.midX,v.midY=g.midY,v.labelAngle=g.labelAngle,v.sourceLabelAngle=g.sourceLabelAngle,v.targetLabelAngle=g.targetLabelAngle}}}},ns={updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],n=0;n<e.length;n++){var r=(a=e[n])._private.rscratch;a.grabbed()&&!a.isParent()?t.push(a):r.inDragLayer?e.drag.push(a):e.nondrag.push(a)}for(n=0;n<t.length;n++){var a=t[n];e.drag.push(a)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){if(e||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(Fa),t.interactive=t.filter((function(e){return e.interactive()})),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t}},rs={};[Go,Yo,qo,Uo,Xo,Ko,Jo,ts,ns].forEach((function(e){F(rs,e)}));var as={getCachedImage:function(e,t,n){var r=this.imageCache=this.imageCache||{},a=r[e];if(a)return a.image.complete||a.image.addEventListener("load",n),a.image;var i=(a=r[e]=r[e]||{}).image=new Image;i.addEventListener("load",n),i.addEventListener("error",(function(){i.error=!0}));var o="data:";return e.substring(0,o.length).toLowerCase()===o||(i.crossOrigin=t),i.src=e,i}},is={registerBinding:function(e,t,n,r){var a=Array.prototype.slice.apply(arguments,[1]),i=this.binder(e);return i.on.apply(i,a)}};is.binder=function(e){var t,n=this,r=e===window||e===document||e===document.body||(t=e,"undefined"!=typeof HTMLElement&&t instanceof HTMLElement);if(null==n.supportsPassiveEvents){var a=!1;try{var i=Object.defineProperty({},"passive",{get:function(){return a=!0,!0}});window.addEventListener("test",null,i)}catch(s){}n.supportsPassiveEvents=a}var o=function(t,a,i){var o=Array.prototype.slice.call(arguments);return r&&n.supportsPassiveEvents&&(o[2]={capture:null!=i&&i,passive:!1,once:!1}),n.bindings.push({target:e,args:o}),(e.addEventListener||e.on).apply(e,o),this};return{on:o,addEventListener:o,addListener:o,bind:o}},is.nodeIsDraggable=function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},is.nodeIsGrabbable=function(e){return this.nodeIsDraggable(e)&&e.interactive()},is.load=function(){var e=this,t=function(e){return e.selected()},n=function(t,n,r,a){null==t&&(t=e.cy);for(var i=0;i<n.length;i++){var o=n[i];t.emit({originalEvent:r,type:o,position:a})}},r=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},i=function(t,n){var r=!0;if(e.cy.hasCompoundNodes()&&t&&t.pannable())for(var a=0;n&&a<n.length;a++){if((t=n[a]).isNode()&&t.isParent()&&!t.pannable()){r=!1;break}}else r=!0;return r},o=function(e){e[0]._private.rscratch.inDragLayer=!0},s=function(e){e[0]._private.rscratch.isGrabTarget=!0},l=function(e,t){var n=t.addToList;n.has(e)||!e.grabbable()||e.locked()||(n.merge(e),function(e){e[0]._private.grabbed=!0}(e))},u=function(t,n){n=n||{};var r=t.cy().hasCompoundNodes();n.inDragLayer&&(t.forEach(o),t.neighborhood().stdFilter((function(e){return!r||e.isEdge()})).forEach(o)),n.addToList&&t.forEach((function(e){l(e,n)})),function(e,t){if(e.cy().hasCompoundNodes()&&(null!=t.inDragLayer||null!=t.addToList)){var n=e.descendants();t.inDragLayer&&(n.forEach(o),n.connectedEdges().forEach(o)),t.addToList&&l(n,t)}}(t,n),f(t,{inDragLayer:n.inDragLayer}),e.updateCachedGrabbedEles()},c=u,d=function(t){t&&(e.getCachedZSortedEles().forEach((function(e){!function(e){e[0]._private.grabbed=!1}(e),function(e){e[0]._private.rscratch.inDragLayer=!1}(e),function(e){e[0]._private.rscratch.isGrabTarget=!1}(e)})),e.updateCachedGrabbedEles())},f=function(e,t){if((null!=t.inDragLayer||null!=t.addToList)&&e.cy().hasCompoundNodes()){var n=e.ancestors().orphans();if(!n.same(e)){var r=n.descendants().spawnSelf().merge(n).unmerge(e).unmerge(e.descendants()),a=r.connectedEdges();t.inDragLayer&&(a.forEach(o),r.forEach(o)),t.addToList&&r.forEach((function(e){l(e,t)}))}}},h=function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},p="undefined"!=typeof MutationObserver,v="undefined"!=typeof ResizeObserver;p?(e.removeObserver=new MutationObserver((function(t){for(var n=0;n<t.length;n++){var r=t[n].removedNodes;if(r)for(var a=0;a<r.length;a++){if(r[a]===e.container){e.destroy();break}}}})),e.container.parentNode&&e.removeObserver.observe(e.container.parentNode,{childList:!0})):e.registerBinding(e.container,"DOMNodeRemoved",(function(t){e.destroy()}));var g=a((function(){e.cy.resize()}),100);p&&(e.styleObserver=new MutationObserver(g),e.styleObserver.observe(e.container,{attributes:!0})),e.registerBinding(window,"resize",g),v&&(e.resizeObserver=new ResizeObserver(g),e.resizeObserver.observe(e.container));var m=function(){e.invalidateContainerClientCoordsCache()};!function(e,t){for(;null!=e;)t(e),e=e.parentNode}(e.container,(function(t){e.registerBinding(t,"transitionend",m),e.registerBinding(t,"animationend",m),e.registerBinding(t,"scroll",m)})),e.registerBinding(e.container,"contextmenu",(function(e){e.preventDefault()}));var y,w,b,x=function(t){for(var n=e.findContainerClientCoords(),r=n[0],a=n[1],i=n[2],o=n[3],s=t.touches?t.touches:[t],l=!1,u=0;u<s.length;u++){var c=s[u];if(r<=c.clientX&&c.clientX<=r+i&&a<=c.clientY&&c.clientY<=a+o){l=!0;break}}if(!l)return!1;for(var d=e.container,f=t.target.parentNode,h=!1;f;){if(f===d){h=!0;break}f=f.parentNode}return!!h};e.registerBinding(e.container,"mousedown",(function(t){if(x(t)){t.preventDefault(),h(),e.hoverData.capture=!0,e.hoverData.which=t.which;var r=e.cy,a=[t.clientX,t.clientY],i=e.projectIntoViewport(a[0],a[1]),o=e.selection,l=e.findNearestElements(i[0],i[1],!0,!1),d=l[0],f=e.dragData.possibleDragElements;e.hoverData.mdownPos=i,e.hoverData.mdownGPos=a;if(3==t.which){e.hoverData.cxtStarted=!0;var p={originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}};d?(d.activate(),d.emit(p),e.hoverData.down=d):r.emit(p),e.hoverData.downTime=(new Date).getTime(),e.hoverData.cxtDragged=!1}else if(1==t.which){if(d&&d.activate(),null!=d&&e.nodeIsGrabbable(d)){var v=function(e){return{originalEvent:t,type:e,position:{x:i[0],y:i[1]}}};if(s(d),d.selected()){f=e.dragData.possibleDragElements=r.collection();var g=r.$((function(t){return t.isNode()&&t.selected()&&e.nodeIsGrabbable(t)}));u(g,{addToList:f}),d.emit(v("grabon")),g.forEach((function(e){e.emit(v("grab"))}))}else f=e.dragData.possibleDragElements=r.collection(),c(d,{addToList:f}),d.emit(v("grabon")).emit(v("grab"));e.redrawHint("eles",!0),e.redrawHint("drag",!0)}e.hoverData.down=d,e.hoverData.downs=l,e.hoverData.downTime=(new Date).getTime(),n(d,["mousedown","tapstart","vmousedown"],t,{x:i[0],y:i[1]}),null==d?(o[4]=1,e.data.bgActivePosistion={x:i[0],y:i[1]},e.redrawHint("select",!0),e.redraw()):d.pannable()&&(o[4]=1),e.hoverData.tapholdCancelled=!1,clearTimeout(e.hoverData.tapholdTimeout),e.hoverData.tapholdTimeout=setTimeout((function(){if(!e.hoverData.tapholdCancelled){var n=e.hoverData.down;n?n.emit({originalEvent:t,type:"taphold",position:{x:i[0],y:i[1]}}):r.emit({originalEvent:t,type:"taphold",position:{x:i[0],y:i[1]}})}}),e.tapholdDuration)}o[0]=o[2]=i[0],o[1]=o[3]=i[1]}}),!1),e.registerBinding(window,"mousemove",(function(t){if(e.hoverData.capture||x(t)){var a=!1,o=e.cy,s=o.zoom(),l=[t.clientX,t.clientY],c=e.projectIntoViewport(l[0],l[1]),f=e.hoverData.mdownPos,h=e.hoverData.mdownGPos,p=e.selection,v=null;e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.selecting||(v=e.findNearestElement(c[0],c[1],!0,!1));var g,m=e.hoverData.last,y=e.hoverData.down,w=[c[0]-p[2],c[1]-p[3]],b=e.dragData.possibleDragElements;if(h){var _=l[0]-h[0],E=_*_,k=l[1]-h[1],C=E+k*k;e.hoverData.isOverThresholdDrag=g=C>=e.desktopTapThreshold2}var j=r(t);g&&(e.hoverData.tapholdCancelled=!0);a=!0,n(v,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var M=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(g){var R={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};y?y.emit(R):o.emit(R),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=v,v&&v.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}else if(e.hoverData.dragging){if(a=!0,o.panningEnabled()&&o.userPanningEnabled()){var P;if(e.hoverData.justStartedPan){var O=e.hoverData.mdownPos;P={x:(c[0]-O[0])*s,y:(c[1]-O[1])*s},e.hoverData.justStartedPan=!1}else P={x:w[0]*s,y:w[1]*s};o.panBy(P),o.emit("dragpan"),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=p[4]||null!=y&&!y.pannable()){if(y&&y.pannable()&&y.active()&&y.unactivate(),y&&y.grabbed()||v==m||(m&&n(m,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),v&&n(v,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=v),y)if(g){if(o.boxSelectionEnabled()&&j)y&&y.grabbed()&&(d(b),y.emit("freeon"),b.emit("free"),e.dragData.didDrag&&(y.emit("dragfreeon"),b.emit("dragfree"))),M();else if(y&&y.grabbed()&&e.nodeIsDraggable(y)){var z=!e.dragData.didDrag;z&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(b,{inDragLayer:!0});var A={x:0,y:0};if(S(w[0])&&S(w[1])&&(A.x+=w[0],A.y+=w[1],z)){var T=e.hoverData.dragDelta;T&&S(T[0])&&S(T[1])&&(A.x+=T[0],A.y+=T[1])}e.hoverData.draggingEles=!0,b.silentShift(A).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(w[0]),t.push(w[1])):(t[0]+=w[0],t[1]+=w[1])}();a=!0}else if(g){if(e.hoverData.dragging||!o.boxSelectionEnabled()||!j&&o.panningEnabled()&&o.userPanningEnabled()){if(!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()){i(y,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=Ke(f),e.redrawHint("select",!0),e.redraw())}}else M();y&&y.pannable()&&y.active()&&y.unactivate()}return p[2]=c[0],p[3]=c[1],a?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(window,"mouseup",(function(a){if(e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(a.clientX,a.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,f=r(a);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var h={originalEvent:a,type:"cxttapend",position:{x:o[0],y:o[1]}};if(c?c.emit(h):i.emit(h),!e.hoverData.cxtDragged){var p={originalEvent:a,type:"cxttap",position:{x:o[0],y:o[1]}};c?c.emit(p):i.emit(p)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(n(l,["mouseup","tapend","vmouseup"],a,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(n(c,["click","tap","vclick"],a,{x:o[0],y:o[1]}),w=!1,a.timeStamp-b<=i.multiClickDebounceTime()?(y&&clearTimeout(y),w=!0,b=null,n(c,["dblclick","dbltap","vdblclick"],a,{x:o[0],y:o[1]})):(y=setTimeout((function(){w||n(c,["oneclick","onetap","voneclick"],a,{x:o[0],y:o[1]})}),i.multiClickDebounceTime()),b=a.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||r(a)||(i.$(t).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=i.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||f?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):f||(i.$(t).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var v=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),v.length>0&&e.redrawHint("eles",!0),i.emit({type:"boxend",originalEvent:a,position:{x:o[0],y:o[1]}});var g=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()||f||i.$(t).unmerge(v).unselect(),v.emit("box").stdFilter(g).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var m=c&&c.grabbed();d(u),m&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var _,E,k,C,j,M,R,P,O,z,A,T,B,D=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),a=n.pan(),i=e.projectIntoViewport(t.clientX,t.clientY),o=[i[0]*r+a.x,i[1]*r+a.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",D,!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||D(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var N,L,V,I,H,F,G,Y=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},q=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",N=function(t){if(e.hasTouchStarted=!0,x(t)){h(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,a=e.touchData.now,i=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);a[0]=o[0],a[1]=o[1]}if(t.touches[1]){o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);a[2]=o[0],a[3]=o[1]}if(t.touches[2]){o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);a[4]=o[0],a[5]=o[1]}if(t.touches[1]){e.touchData.singleTouchMoved=!0,d(e.dragData.touchDragEles);var l=e.findContainerClientCoords();O=l[0],z=l[1],A=l[2],T=l[3],_=t.touches[0].clientX-O,E=t.touches[0].clientY-z,k=t.touches[1].clientX-O,C=t.touches[1].clientY-z,B=0<=_&&_<=A&&0<=k&&k<=A&&0<=E&&E<=T&&0<=C&&C<=T;var f=r.pan(),p=r.zoom();j=Y(_,E,k,C),M=q(_,E,k,C),P=[((R=[(_+k)/2,(E+C)/2])[0]-f.x)/p,(R[1]-f.y)/p];if(M<4e4&&!t.touches[2]){var v=e.findNearestElement(a[0],a[1],!0,!0),g=e.findNearestElement(a[2],a[3],!0,!0);return v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=v):g&&g.isNode()?(g.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=g):r.emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])r.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var m=e.findNearestElements(a[0],a[1],!0,!0),y=m[0];if(null!=y&&(y.activate(),e.touchData.start=y,e.touchData.starts=m,e.nodeIsGrabbable(y))){var w=e.dragData.touchDragEles=r.collection(),b=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),y.selected()?(b=r.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),u(b,{addToList:w})):c(y,{addToList:w}),s(y);var S=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};y.emit(S("grabon")),b?b.forEach((function(e){e.emit(S("grab"))})):y.emit(S("grab"))}n(y,["touchstart","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==y&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||n(e.touchData.start,["taphold"],t,{x:a[0],y:a[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var D=e.touchData.startPosition=[],N=0;N<a.length;N++)D[N]=i[N]=a[N];var L=t.touches[0];e.touchData.startGPosition=[L.clientX,L.clientY]}}},!1),e.registerBinding(window,"touchmove",L=function(t){var r=e.touchData.capture;if(r||x(t)){var a=e.selection,o=e.cy,s=e.touchData.now,l=e.touchData.earlier,c=o.zoom();if(t.touches[0]){var f=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=f[0],s[1]=f[1]}if(t.touches[1]){f=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=f[0],s[3]=f[1]}if(t.touches[2]){f=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=f[0],s[5]=f[1]}var h,p=e.touchData.startGPosition;if(r&&t.touches[0]&&p){for(var v=[],g=0;g<s.length;g++)v[g]=s[g]-l[g];var m=t.touches[0].clientX-p[0],y=m*m,w=t.touches[0].clientY-p[1];h=y+w*w>=e.touchTapThreshold2}if(r&&e.touchData.cxt){t.preventDefault();var b=t.touches[0].clientX-O,R=t.touches[0].clientY-z,A=t.touches[1].clientX-O,T=t.touches[1].clientY-z,D=q(b,R,A,T);if(D/M>=2.25||D>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var N={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(N),e.touchData.start=null):o.emit(N)}}if(r&&e.touchData.cxt){N={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}};e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(N):o.emit(N),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var L=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&L===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=L,L&&L.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(r&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(r&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V<ee.length;V++){var I=ee[V]._private;I.grabbed=!1,I.rscratch.inDragLayer=!1}}var H=e.touchData.start,F=(b=t.touches[0].clientX-O,R=t.touches[0].clientY-z,A=t.touches[1].clientX-O,T=t.touches[1].clientY-z,Y(b,R,A,T)),G=F/j;if(B){var W=(b-_+(A-k))/2,U=(R-E+(T-C))/2,X=o.zoom(),$=X*G,K=o.pan(),Z=P[0]*X+K.x,Q=P[1]*X+K.y,J={x:-$/X*(Z-K.x-W)+Z,y:-$/X*(Q-K.y-U)+Q};if(H&&H.active()){var ee=e.dragData.touchDragEles;d(ee),e.redrawHint("drag",!0),e.redrawHint("eles",!0),H.unactivate().emit("freeon"),ee.emit("free"),e.dragData.didDrag&&(H.emit("dragfreeon"),ee.emit("dragfree"))}o.viewport({zoom:$,pan:J,cancelOnFailedZoom:!0}),o.emit("pinchzoom"),j=F,_=b,E=R,k=A,C=T,e.pinching=!0}if(t.touches[0]){f=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=f[0],s[1]=f[1]}if(t.touches[1]){f=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=f[0],s[3]=f[1]}if(t.touches[2]){f=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=f[0],s[5]=f[1]}}else if(t.touches[0]&&!e.touchData.didSelect){var te=e.touchData.start,ne=e.touchData.last;if(e.hoverData.draggingEles||e.swipePanning||(L=e.findNearestElement(s[0],s[1],!0,!0)),r&&null!=te&&t.preventDefault(),r&&null!=te&&e.nodeIsDraggable(te))if(h){ee=e.dragData.touchDragEles;var re=!e.dragData.didDrag;re&&u(ee,{inDragLayer:!0}),e.dragData.didDrag=!0;var ae={x:0,y:0};if(S(v[0])&&S(v[1]))if(ae.x+=v[0],ae.y+=v[1],re)e.redrawHint("eles",!0),(ie=e.touchData.dragDelta)&&S(ie[0])&&S(ie[1])&&(ae.x+=ie[0],ae.y+=ie[1]);e.hoverData.draggingEles=!0,ee.silentShift(ae).emit("position drag"),e.redrawHint("drag",!0),e.touchData.startPosition[0]==l[0]&&e.touchData.startPosition[1]==l[1]&&e.redrawHint("eles",!0),e.redraw()}else{var ie;0===(ie=e.touchData.dragDelta=e.touchData.dragDelta||[]).length?(ie.push(v[0]),ie.push(v[1])):(ie[0]+=v[0],ie[1]+=v[1])}if(n(te||L,["touchmove","tapdrag","vmousemove"],t,{x:s[0],y:s[1]}),te&&te.grabbed()||L==ne||(ne&&ne.emit({originalEvent:t,type:"tapdragout",position:{x:s[0],y:s[1]}}),L&&L.emit({originalEvent:t,type:"tapdragover",position:{x:s[0],y:s[1]}})),e.touchData.last=L,r)for(V=0;V<s.length;V++)s[V]&&e.touchData.startPosition[V]&&h&&(e.touchData.singleTouchMoved=!0);if(r&&(null==te||te.pannable())&&o.panningEnabled()&&o.userPanningEnabled()){i(te,e.touchData.starts)&&(t.preventDefault(),e.data.bgActivePosistion||(e.data.bgActivePosistion=Ke(e.touchData.startPosition)),e.swipePanning?(o.panBy({x:v[0]*c,y:v[1]*c}),o.emit("dragpan")):h&&(e.swipePanning=!0,o.panBy({x:m*c,y:w*c}),o.emit("dragpan"),te&&(te.unactivate(),e.redrawHint("select",!0),e.touchData.start=null)));f=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=f[0],s[1]=f[1]}}for(g=0;g<s.length;g++)l[g]=s[g];r&&t.touches.length>0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(window,"touchcancel",V=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",I=function(r){var a=e.touchData.start;if(e.touchData.capture){0===r.touches.length&&(e.touchData.capture=!1),r.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(r.touches[0]){var f=e.projectIntoViewport(r.touches[0].clientX,r.touches[0].clientY);u[0]=f[0],u[1]=f[1]}if(r.touches[1]){f=e.projectIntoViewport(r.touches[1].clientX,r.touches[1].clientY);u[2]=f[0],u[3]=f[1]}if(r.touches[2]){f=e.projectIntoViewport(r.touches[2].clientX,r.touches[2].clientY);u[4]=f[0],u[5]=f[1]}if(a&&a.unactivate(),e.touchData.cxt){if(o={originalEvent:r,type:"cxttapend",position:{x:u[0],y:u[1]}},a?a.emit(o):s.emit(o),!e.touchData.cxtDragged){var h={originalEvent:r,type:"cxttap",position:{x:u[0],y:u[1]}};a?a.emit(h):s.emit(h)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!r.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var p=s.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:r,position:{x:u[0],y:u[1]}});p.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),p.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=a&&a.unactivate(),r.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(r.touches[1]);else if(r.touches[0]);else if(!r.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var v=e.dragData.touchDragEles;if(null!=a){var g=a._private.grabbed;d(v),e.redrawHint("drag",!0),e.redrawHint("eles",!0),g&&(a.emit("freeon"),v.emit("free"),e.dragData.didDrag&&(a.emit("dragfreeon"),v.emit("dragfree"))),n(a,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]}),a.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(u[0],u[1],!0,!0);n(m,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]})}var y=e.touchData.startPosition[0]-u[0],w=y*y,b=e.touchData.startPosition[1]-u[1],x=(w+b*b)*l*l;e.touchData.singleTouchMoved||(a||s.$(":selected").unselect(["tapunselect"]),n(a,["tap","vclick"],r,{x:u[0],y:u[1]}),H=!1,r.timeStamp-G<=s.multiClickDebounceTime()?(F&&clearTimeout(F),H=!0,G=null,n(a,["dbltap","vdblclick"],r,{x:u[0],y:u[1]})):(F=setTimeout((function(){H||n(a,["onetap","voneclick"],r,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),G=r.timeStamp)),null!=a&&!e.dragData.didDrag&&a._private.selectable&&x<e.touchTapThreshold2&&!e.pinching&&("single"===s.selectionType()?(s.$(t).unmerge(a).unselect(["tapunselect"]),a.select(["tapselect"])):a.selected()?a.unselect(["tapunselect"]):a.select(["tapselect"]),e.redrawHint("eles",!0)),e.touchData.singleTouchMoved=!0}for(var _=0;_<u.length;_++)c[_]=u[_];e.dragData.didDrag=!1,0===r.touches.length&&(e.touchData.dragDelta=[],e.touchData.startPosition=null,e.touchData.startGPosition=null,e.touchData.didSelect=!1),r.touches.length<2&&(1===r.touches.length&&(e.touchData.startGPosition=[r.touches[0].clientX,r.touches[0].clientY]),e.pinching=!1,e.redrawHint("eles",!0),e.redraw())}},!1),"undefined"==typeof TouchEvent){var W=[],U=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},X=function(e){W.push(function(e){return{event:e,touch:U(e)}}(e))},$=function(e){for(var t=0;t<W.length;t++){if(W[t].event.pointerId===e.pointerId)return void W.splice(t,1)}},K=function(e){e.touches=W.map((function(e){return e.touch}))},Z=function(e){return"mouse"===e.pointerType||4===e.pointerType};e.registerBinding(e.container,"pointerdown",(function(e){Z(e)||(e.preventDefault(),X(e),K(e),N(e))})),e.registerBinding(e.container,"pointerup",(function(e){Z(e)||($(e),K(e),I(e))})),e.registerBinding(e.container,"pointercancel",(function(e){Z(e)||($(e),K(e),V())})),e.registerBinding(e.container,"pointermove",(function(e){Z(e)||(e.preventDefault(),function(e){var t=W.filter((function(t){return t.event.pointerId===e.pointerId}))[0];t.event=e,t.touch=U(e)}(e),K(e),L(e))}))}};var os={generatePolygon:function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl("polygon",e,t,n,r,a,this.points)},intersectLine:function(e,t,n,r,a,i,o){return jt(a,i,this.points,e,t,n/2,r/2,o)},checkPoint:function(e,t,n,r,a,i,o){return bt(e,t,this.points,i,o,r,a,[0,-1],n)}}}};os.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},intersectLine:function(e,t,n,r,a,i,o){return function(e,t,n,r,a,i){var o=n-e,s=r-t;o/=a,s/=i;var l=Math.sqrt(o*o+s*s),u=l-1;if(u<0)return[];var c=u/l;return[(n-e)*c+e,(r-t)*c+t]}(a,i,e,t,n/2+o,r/2+o)},checkPoint:function(e,t,n,r,a,i,o){return Et(e,t,r,a,i,o,n)}}},os.generateRoundPolygon=function(e,t){for(var n=new Array(2*t.length),r=0;r<t.length/2;r++){var a=2*r,i=void 0;i=r<t.length/2-1?2*(r+1):0,n[4*r]=t[a],n[4*r+1]=t[a+1];var o=t[i]-t[a],s=t[i+1]-t[a+1],l=Math.sqrt(o*o+s*s);n[4*r+2]=o/l,n[4*r+3]=s/l}return this.nodeShapes[e]={renderer:this,name:e,points:n,draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl("round-polygon",e,t,n,r,a,this.points)},intersectLine:function(e,t,n,r,a,i,o){return function(e,t,n,r,a,i,o,s){for(var l,u=[],c=new Array(n.length),d=i/2,f=o/2,h=At(i,o),p=0;p<n.length/4;p++){var v,g=void 0;g=0===p?n.length-2:4*p-2,v=4*p+2;var m=r+d*n[4*p],y=a+f*n[4*p+1],w=-n[g]*n[v]-n[g+1]*n[v+1],b=h/Math.tan(Math.acos(w)/2),x=m-b*n[g],_=y-b*n[g+1],E=m+b*n[v],k=y+b*n[v+1];0===p?(c[n.length-2]=x,c[n.length-1]=_):(c[4*p-2]=x,c[4*p-1]=_),c[4*p]=E,c[4*p+1]=k;var C=n[g+1],S=-n[g];C*n[v]+S*n[v+1]<0&&(C*=-1,S*=-1),0!==(l=kt(e,t,r,a,x+C*h,_+S*h,h)).length&&u.push(l[0],l[1])}for(var j=0;j<c.length/4;j++)0!==(l=St(e,t,r,a,c[4*j],c[4*j+1],c[4*j+2],c[4*j+3],!1)).length&&u.push(l[0],l[1]);if(u.length>2){for(var M=[u[0],u[1]],R=Math.pow(M[0]-e,2)+Math.pow(M[1]-t,2),P=1;P<u.length/2;P++){var O=Math.pow(u[2*P]-e,2)+Math.pow(u[2*P+1]-t,2);O<=R&&(M[0]=u[2*P],M[1]=u[2*P+1],R=O)}return M}return u}(a,i,this.points,e,t,n,r)},checkPoint:function(e,t,n,r,a,i,o){return function(e,t,n,r,a,i,o){for(var s=new Array(n.length),l=i/2,u=o/2,c=At(i,o),d=c*c,f=0;f<n.length/4;f++){var h,p=void 0;p=0===f?n.length-2:4*f-2,h=4*f+2;var v=r+l*n[4*f],g=a+u*n[4*f+1],m=-n[p]*n[h]-n[p+1]*n[h+1],y=c/Math.tan(Math.acos(m)/2),w=v-y*n[p],b=g-y*n[p+1],x=v+y*n[h],_=g+y*n[h+1];s[4*f]=w,s[4*f+1]=b,s[4*f+2]=x,s[4*f+3]=_;var E=n[p+1],k=-n[p];E*n[h]+k*n[h+1]<0&&(E*=-1,k*=-1);var C=w+E*c,S=b+k*c;if(Math.pow(C-e,2)+Math.pow(S-t,2)<=d)return!0}return wt(e,t,s)}(e,t,this.points,i,o,r,a)}}},os.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Rt(4,0),draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},intersectLine:function(e,t,n,r,a,i,o){return pt(a,i,e,t,n,r,o)},checkPoint:function(e,t,n,r,a,i,o){var s=zt(r,a),l=2*s;return!!bt(e,t,this.points,i,o,r,a-l,[0,-1],n)||(!!bt(e,t,this.points,i,o,r-l,a,[0,-1],n)||(!!Et(e,t,l,l,i-r/2+s,o-a/2+s,n)||(!!Et(e,t,l,l,i+r/2-s,o-a/2+s,n)||(!!Et(e,t,l,l,i+r/2-s,o+a/2-s,n)||!!Et(e,t,l,l,i-r/2+s,o+a/2-s,n)))))}}},os.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:8,points:Rt(4,0),draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},generateCutTrianglePts:function(e,t,n,r){var a=this.cornerLength,i=t/2,o=e/2,s=n-o,l=n+o,u=r-i,c=r+i;return{topLeft:[s,u+a,s+a,u,s+a,u+a],topRight:[l-a,u,l,u+a,l-a,u+a],bottomRight:[l,c-a,l-a,c,l-a,c-a],bottomLeft:[s+a,c,s,c-a,s+a,c-a]}},intersectLine:function(e,t,n,r,a,i,o){var s=this.generateCutTrianglePts(n+2*o,r+2*o,e,t),l=[].concat.apply([],[s.topLeft.splice(0,4),s.topRight.splice(0,4),s.bottomRight.splice(0,4),s.bottomLeft.splice(0,4)]);return jt(a,i,l,e,t)},checkPoint:function(e,t,n,r,a,i,o){if(bt(e,t,this.points,i,o,r,a-2*this.cornerLength,[0,-1],n))return!0;if(bt(e,t,this.points,i,o,r-2*this.cornerLength,a,[0,-1],n))return!0;var s=this.generateCutTrianglePts(r,a,i,o);return wt(e,t,s.topLeft)||wt(e,t,s.topRight)||wt(e,t,s.bottomRight)||wt(e,t,s.bottomLeft)}}},os.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Rt(4,0),draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},intersectLine:function(e,t,n,r,a,i,o){var s=this.generateBarrelBezierPts(n+2*o,r+2*o,e,t),l=function(e){var t=at({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),n=at({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),r=at({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.85);return[e[0],e[1],t.x,t.y,n.x,n.y,r.x,r.y,e[4],e[5]]},u=[].concat(l(s.topLeft),l(s.topRight),l(s.bottomRight),l(s.bottomLeft));return jt(a,i,u,e,t)},generateBarrelBezierPts:function(e,t,n,r){var a=t/2,i=e/2,o=n-i,s=n+i,l=r-a,u=r+a,c=Tt(e,t),d=c.heightOffset,f=c.widthOffset,h=c.ctrlPtOffsetPct*e,p={topLeft:[o,l+d,o+h,l,o+f,l],topRight:[s-f,l,s-h,l,s,l+d],bottomRight:[s,u-d,s-h,u,s-f,u],bottomLeft:[o+f,u,o+h,u,o,u-d]};return p.topLeft.isTop=!0,p.topRight.isTop=!0,p.bottomLeft.isBottom=!0,p.bottomRight.isBottom=!0,p},checkPoint:function(e,t,n,r,a,i,o){var s=Tt(r,a),l=s.heightOffset,u=s.widthOffset;if(bt(e,t,this.points,i,o,r,a-2*l,[0,-1],n))return!0;if(bt(e,t,this.points,i,o,r-2*u,a,[0,-1],n))return!0;for(var c=this.generateBarrelBezierPts(r,a,i,o),d=function(e,t,n){var r,a,i=n[4],o=n[2],s=n[0],l=n[5],u=n[1],c=Math.min(i,s),d=Math.max(i,s),f=Math.min(l,u),h=Math.max(l,u);if(c<=e&&e<=d&&f<=t&&t<=h){var p=[(r=i)-2*(a=o)+s,2*(a-r),r],v=function(e,t,n,r){var a=t*t-4*e*(n-=r);if(a<0)return[];var i=Math.sqrt(a),o=2*e;return[(-t+i)/o,(-t-i)/o]}(p[0],p[1],p[2],e).filter((function(e){return 0<=e&&e<=1}));if(v.length>0)return v[0]}return null},f=Object.keys(c),h=0;h<f.length;h++){var p=c[f[h]],v=d(e,t,p);if(null!=v){var g=p[5],m=p[3],y=p[1],w=rt(g,m,y,v);if(p.isTop&&w<=t)return!0;if(p.isBottom&&t<=w)return!0}}return!1}}},os.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Rt(4,0),draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},intersectLine:function(e,t,n,r,a,i,o){var s=t-(r/2+o),l=St(a,i,e,t,e-(n/2+o),s,e+(n/2+o),s,!1);return l.length>0?l:pt(a,i,e,t,n,r,o)},checkPoint:function(e,t,n,r,a,i,o){var s=zt(r,a),l=2*s;if(bt(e,t,this.points,i,o,r,a-l,[0,-1],n))return!0;if(bt(e,t,this.points,i,o,r-l,a,[0,-1],n))return!0;var u=r/2+2*n,c=a/2+2*n;return!!wt(e,t,[i-u,o-c,i-u,o,i+u,o,i+u,o-c])||(!!Et(e,t,l,l,i+r/2-s,o+a/2-s,n)||!!Et(e,t,l,l,i-r/2+s,o+a/2-s,n))}}},os.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",Rt(3,0)),this.generateRoundPolygon("round-triangle",Rt(3,0)),this.generatePolygon("rectangle",Rt(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",Rt(5,0)),this.generateRoundPolygon("round-pentagon",Rt(5,0)),this.generatePolygon("hexagon",Rt(6,0)),this.generateRoundPolygon("round-hexagon",Rt(6,0)),this.generatePolygon("heptagon",Rt(7,0)),this.generateRoundPolygon("round-heptagon",Rt(7,0)),this.generatePolygon("octagon",Rt(8,0)),this.generateRoundPolygon("round-octagon",Rt(8,0));var r=new Array(20),a=Ot(5,0),i=Ot(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s<i.length/2;s++)i[2*s]*=o,i[2*s+1]*=o;for(s=0;s<5;s++)r[4*s]=a[2*s],r[4*s+1]=a[2*s+1],r[4*s+2]=i[2*s],r[4*s+3]=i[2*s+1];r=Pt(r),this.generatePolygon("star",r),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);var l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",l),this.generateRoundPolygon("round-tag",l),e.makePolygon=function(e){var n,r="polygon-"+e.join("$");return(n=this[r])?n:t.generatePolygon(r,e)}};var ss={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||Ee();var t=this;void 0===t.averageRedrawTime&&(t.averageRedrawTime=0),void 0===t.lastRedrawTime&&(t.lastRedrawTime=0),void 0===t.lastDrawTime&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=e},beforeRender:function(e,t){if(!this.destroyed){null==t&&me("Priority is not optional for beforeRender");var n=this.beforeRenderCallbacks;n.push({fn:e,priority:t}),n.sort((function(e,t){return t.priority-e.priority}))}}},ls=function(e,t,n){for(var r=e.beforeRenderCallbacks,a=0;a<r.length;a++)r[a].fn(t,n)};ss.startRenderLoop=function(){var e=this,t=e.cy;if(!e.renderLoopStarted){e.renderLoopStarted=!0;K((function n(r){if(!e.destroyed){if(t.batching());else if(e.requestedFrame&&!e.skipFrame){ls(e,!0,r);var a=Z();e.render(e.renderOptions);var i=e.lastDrawTime=Z();void 0===e.averageRedrawTime&&(e.averageRedrawTime=i-a),void 0===e.redrawCount&&(e.redrawCount=0),e.redrawCount++,void 0===e.redrawTotalTime&&(e.redrawTotalTime=0);var o=i-a;e.redrawTotalTime+=o,e.lastRedrawTime=o,e.averageRedrawTime=e.averageRedrawTime/2+o/2,e.requestedFrame=!1}else ls(e,!1,r);e.skipFrame=!1,K(n)}}))}};var us=function(e){this.init(e)},cs=us.prototype;cs.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],cs.init=function(e){var t=this;t.options=e,t.cy=e.cy;var n=t.container=e.cy.container();if(v){var r=v.document,a=r.head,i="__________cytoscape_stylesheet",o="__________cytoscape_container",s=null!=r.getElementById(i);if(n.className.indexOf(o)<0&&(n.className=(n.className||"")+" "+o),!s){var l=r.createElement("style");l.id=i,l.innerHTML="."+o+" { position: relative; }",a.insertBefore(l,a.children[0])}"static"===v.getComputedStyle(n).getPropertyValue("position")&&we("A Cytoscape container has style position:static and so can not use UI extensions properly")}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},t.redraws=0,t.showFps=e.showFps,t.debug=e.debug,t.hideEdgesOnViewport=e.hideEdgesOnViewport,t.textureOnViewport=e.textureOnViewport,t.wheelSensitivity=e.wheelSensitivity,t.motionBlurEnabled=e.motionBlur,t.forcedPixelRatio=S(e.pixelRatio)?e.pixelRatio:null,t.motionBlur=e.motionBlur,t.motionBlurOpacity=e.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=e.desktopTapThreshold,t.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,t.touchTapThreshold=e.touchTapThreshold,t.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners()},cs.notify=function(e,t){var n=this,r=n.cy;this.destroyed||("init"!==e?"destroy"!==e?(("add"===e||"remove"===e||"move"===e&&r.hasCompoundNodes()||"load"===e||"zorder"===e||"mount"===e)&&n.invalidateCachedZSortedEles(),"viewport"===e&&n.redrawHint("select",!0),"load"!==e&&"resize"!==e&&"mount"!==e||(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint("eles",!0),n.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()):n.destroy():n.load())},cs.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var n=e.bindings[t],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.resizeObserver&&e.resizeObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch(a){}},cs.isHeadless=function(){return!1},[Fo,rs,as,is,os,ss].forEach((function(e){F(cs,e)}));var ds=1e3/60,fs=function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var r=a((function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()}),e.deqRedrawThreshold),i=e.priority||ge;n.beforeRender((function(a,i){var o=Z(),s=n.averageRedrawTime,l=n.lastRedrawTime,u=[],c=n.cy.extent(),d=n.getPixelRatio();for(a||n.flushRenderedStyleQueue();;){var f=Z(),h=f-o,p=f-i;if(l<ds){var v=ds-(a?s:0);if(p>=e.deqFastCost*v)break}else if(a){if(h>=e.deqCost*l||h>=e.deqAvgCost*s)break}else if(p>=e.deqNoDrawCost*ds)break;var g=e.deq(t,d,c);if(!(g.length>0))break;for(var m=0;m<g.length;m++)u.push(g[m])}u.length>0&&(e.onDeqd(t,u),!a&&e.shouldRedraw(t,u,d,c)&&r())}),i(t))}}},hs=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pe;c(this,e),this.idsByKey=new Re,this.keyForId=new Re,this.cachesByLvl=new Re,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return f(e,[{key:"getIdsFor",value:function(e){null==e&&me("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new Oe,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new Re,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),ps={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},vs=ke({getKey:null,doesEleInvalidateKey:pe,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:he,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),gs=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=vs(t);F(n,r),n.lookup=new hs(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},ms=gs.prototype;ms.reasons=ps,ms.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},ms.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},ms.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new i((function(e,t){return t.reqs-e.reqs}))},ms.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},ms.getElement=function(e,t,n,r,a){var i=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!i.allowEdgeTxrCaching&&e.isEdge()||!i.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Qe(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,d=t.w*u,f=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,f))return null;var h,p=l.get(e,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(h=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||d>1024)return null;var v=i.getTextureQueue(h),g=v[v.length-2],m=function(){return i.recycleTexture(h,d)||i.addTexture(h,d)};g||(g=v[v.length-1]),g||(g=m()),g.width-g.usedWidth<d&&(g=m());for(var y,w=function(e){return e&&e.scaledLabelShown===f},b=a&&a===ps.dequeue,x=a&&a===ps.highQuality,_=a&&a===ps.downscale,E=r+1;E<=3;E++){var k=l.get(e,E);if(k){y=k;break}}var C=y&&y.level===r+1?y:null,S=function(){g.context.drawImage(C.texture.canvas,C.x,0,C.width,C.height,g.usedWidth,0,d,c)};if(g.context.setTransform(1,0,0,1,0,0),g.context.clearRect(g.usedWidth,0,d,h),w(C))S();else if(w(y)){if(!x)return i.queueElement(e,y.level-1),y;for(var j=y.level;j>r;j--)C=i.getElement(e,t,n,j,ps.downscale);S()}else{var M;if(!b&&!x&&!_)for(var R=r-1;R>=-4;R--){var P=l.get(e,R);if(P){M=P;break}}if(w(M))return i.queueElement(e,r),M;g.context.translate(g.usedWidth,0),g.context.scale(u,u),this.drawElement(g.context,e,t,f,!1),g.context.scale(1/u,1/u),g.context.translate(-g.usedWidth,0)}return p={x:g.usedWidth,texture:g,level:r,scale:u,width:d,height:c,scaledLabelShown:f},g.usedWidth+=Math.ceil(d+8),g.eleCaches.push(p),l.set(e,r,p),i.checkTextureFullness(g),p},ms.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},ms.invalidateElement=function(e){var t=this,n=t.lookup,r=[];if(n.isInvalid(e)){for(var a=-4;a<=3;a++){var i=n.getForCachedKey(e,a);i&&r.push(i)}if(n.invalidate(e))for(var o=0;o<r.length;o++){var s=r[o],l=s.texture;l.invalidatedWidth+=s.width,s.invalidated=!0,t.checkTextureUtility(l)}t.removeFromQueue(e)}},ms.checkTextureUtility=function(e){e.invalidatedWidth>=.2*e.width&&this.retireTexture(e)},ms.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?Ce(t,e):e.fullnessChecks++},ms.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;Ce(n,e),e.retired=!0;for(var a=e.eleCaches,i=0;i<a.length;i++){var o=a[i];r.deleteCache(o.key,o.level)}Se(a),this.getRetiredTextureQueue(t).push(e)},ms.addTexture=function(e,t){var n={};return this.getTextureQueue(e).push(n),n.eleCaches=[],n.height=e,n.width=Math.max(1024,t),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=this.renderer.makeOffscreenCanvas(n.width,n.height),n.context=n.canvas.getContext("2d"),n},ms.recycleTexture=function(e,t){for(var n=this.getTextureQueue(e),r=this.getRetiredTextureQueue(e),a=0;a<r.length;a++){var i=r[a];if(i.width>=t)return i.retired=!1,i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,Se(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),Ce(r,i),n.push(i),i}},ms.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),a=this.getKey(e),i=r[a];if(i)i.level=Math.max(i.level,t),i.eles.merge(e),i.reqs++,n.updateItem(i);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(o),r[a]=o}},ms.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),a=[],i=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=i.hasCache(u,s.level);if(r[l]=null,!c){a.push(s);var d=t.getBoundingBox(u);t.getElement(u,d,e,s.level,ps.dequeue)}}return a},ms.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),a=n[r];null!=a&&(1===a.eles.length?(a.reqs=fe,t.updateItem(a),t.pop(),n[r]=null):a.eles.unmerge(e))},ms.onDequeue=function(e){this.onDequeues.push(e)},ms.offDequeue=function(e){Ce(this.onDequeues,e)},ms.setupDequeueing=fs({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n<e.onDequeues.length;n++){(0,e.onDequeues[n])(t)}},shouldRedraw:function(e,t,n,r){for(var a=0;a<t.length;a++)for(var i=t[a].eles,o=0;o<i.length;o++){var s=i[o].boundingBox();if(dt(s,r))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});var ys=function(e){var t=this,n=t.renderer=e,r=n.cy;t.layersByLevel={},t.firstGet=!0,t.lastInvalidationTime=Z()-500,t.skipping=!1,t.eleTxrDeqs=r.collection(),t.scheduleElementRefinement=a((function(){t.refineElementTextures(t.eleTxrDeqs),t.eleTxrDeqs.unmerge(t.eleTxrDeqs)}),50),n.beforeRender((function(e,n){n-t.lastInvalidationTime<=250?t.skipping=!0:t.skipping=!1}),n.beforeRenderPriorities.lyrTxrSkip);t.layersQueue=new i((function(e,t){return t.reqs-e.reqs})),t.setupDequeueing()},ws=ys.prototype,bs=0,xs=Math.pow(2,53)-1;ws.makeLayer=function(e,t){var n=Math.pow(2,t),r=Math.ceil(e.w*n),a=Math.ceil(e.h*n),i=this.renderer.makeOffscreenCanvas(r,a),o={id:bs=++bs%xs,bb:e,level:t,width:r,height:a,canvas:i,context:i.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=o.context,l=-o.bb.x1,u=-o.bb.y1;return s.scale(n,n),s.translate(l,u),o},ws.getLayers=function(e,t,n){var r=this,a=r.renderer.cy.zoom(),i=r.firstGet;if(r.firstGet=!1,null==n)if((n=Math.ceil(Qe(a*t)))<-4)n=-4;else if(a>=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},a=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};a(1),a(-1);for(var i=c.length-1;i>=0;i--){var o=c[i];o.invalid&&Ce(c,o)}}();var d=function(t){var a=(t=t||{}).after;if(function(){if(!o){o=ot();for(var t=0;t<e.length;t++)n=o,r=e[t].boundingBox(),n.x1=Math.min(n.x1,r.x1),n.x2=Math.max(n.x2,r.x2),n.w=n.x2-n.x1,n.y1=Math.min(n.y1,r.y1),n.y2=Math.max(n.y2,r.y2),n.h=n.y2-n.y1}var n,r}(),o.w*u*(o.h*u)>16e6)return null;var i=r.makeLayer(o,n);if(null!=a){var s=c.indexOf(a)+1;c.splice(s,0,i)}else(void 0===t.insert||t.insert)&&c.unshift(i);return i};if(r.skipping&&!i)return null;for(var f=null,h=e.length/1,p=!i,v=0;v<e.length;v++){var g=e[v],m=g._private.rscratch,y=m.imgLayerCaches=m.imgLayerCaches||{},w=y[n];if(w)f=w;else{if((!f||f.eles.length>=h||!ht(f.bb,g.boundingBox()))&&!(f=d({insert:!0,after:f})))return null;s||p?r.queueLayer(f,g):r.drawEleInLayer(f,g,n,t),f.eles.push(g),y[n]=f}}return s||(p?null:c)},ws.getEleLevelForLayerLevel=function(e,t){return e},ws.drawEleInLayer=function(e,t,n,r){var a=this.renderer,i=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(i,!1),a.drawCachedElement(i,t,null,null,n,true),a.setImgSmoothing(i,!0))},ws.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,a=0;a<n.length;a++){var i=n[a];if(i.reqs>0)return!1;if(i.invalid)return!1;r+=i.eles.length}return r===t.length},ws.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r<n.length;r++){for(var a=n[r],i=-1,o=0;o<t.length;o++)if(a.eles[0]===t[o]){i=o;break}if(i<0)this.invalidateLayer(a);else{var s=i;for(o=0;o<a.eles.length;o++)if(a.eles[o]!==t[s+o]){this.invalidateLayer(a);break}}}},ws.updateElementsInLayers=function(e,t){for(var n=R(e[0]),r=0;r<e.length;r++)for(var a=n?null:e[r],i=n?e[r]:e[r].ele,o=i._private.rscratch,s=o.imgLayerCaches=o.imgLayerCaches||{},l=-4;l<=2;l++){var u=s[l];u&&(a&&this.getEleLevelForLayerLevel(u.level)!==a.level||t(u,i,a))}},ws.haveLayers=function(){for(var e=!1,t=-4;t<=2;t++){var n=this.layersByLevel[t];if(n&&n.length>0){e=!0;break}}return e},ws.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=Z(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},ws.invalidateLayer=function(e){if(this.lastInvalidationTime=Z(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];Ce(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var a=0;a<n.length;a++){var i=n[a]._private.rscratch.imgLayerCaches;i&&(i[t]=null)}}},ws.refineElementTextures=function(e){var t=this;t.updateElementsInLayers(e,(function(e,n,r){var a=e.replacement;if(a||((a=e.replacement=t.makeLayer(e.bb,e.level)).replaces=e,a.eles=e.eles),!a.reqs)for(var i=0;i<a.eles.length;i++)t.queueLayer(a,a.eles[i])}))},ws.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},ws.queueLayer=function(e,t){var n=this.layersQueue,r=e.elesQueue,a=r.hasId=r.hasId||{};if(!e.replacement){if(t){if(a[t.id()])return;r.push(t),a[t.id()]=!0}e.reqs?(e.reqs++,n.updateItem(e)):(e.reqs=1,n.push(e))}},ws.dequeue=function(e){for(var t=this,n=t.layersQueue,r=[],a=0;a<1&&0!==n.size();){var i=n.peek();if(i.replacement)n.pop();else if(i.replaces&&i!==i.replaces.replacement)n.pop();else if(i.invalid)n.pop();else{var o=i.elesQueue.shift();o&&(t.drawEleInLayer(i,o,i.level,e),a++),0===r.length&&r.push(!0),0===i.elesQueue.length&&(n.pop(),i.reqs=0,i.replaces&&t.applyLayerReplacement(i),t.requestRedraw())}}return r},ws.applyLayerReplacement=function(e){var t=this.layersByLevel[e.level],n=e.replaces,r=t.indexOf(n);if(!(r<0||n.invalid)){t[r]=e;for(var a=0;a<e.eles.length;a++){var i=e.eles[a]._private,o=i.imgLayerCaches=i.imgLayerCaches||{};o&&(o[e.level]=e)}this.requestRedraw()}},ws.requestRedraw=a((function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()}),100),ws.setupDequeueing=fs({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t){return e.dequeue(t)},onDeqd:ge,shouldRedraw:he,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});var _s,Es={};function ks(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}}function Cs(e,t,n){for(var r,a=0;a<t.length;a++){var i=t[a];0===a&&(r=i),e.lineTo(i.x,i.y)}e.quadraticCurveTo(n.x,n.y,r.x,r.y)}function Ss(e,t,n){e.beginPath&&e.beginPath();for(var r=t,a=0;a<r.length;a++){var i=r[a];e.lineTo(i.x,i.y)}var o=n,s=n[0];e.moveTo(s.x,s.y);for(a=1;a<o.length;a++){i=o[a];e.lineTo(i.x,i.y)}e.closePath&&e.closePath()}function js(e,t,n,r,a){e.beginPath&&e.beginPath(),e.arc(n,r,a,0,2*Math.PI,!1);var i=t,o=i[0];e.moveTo(o.x,o.y);for(var s=0;s<i.length;s++){var l=i[s];e.lineTo(l.x,l.y)}e.closePath&&e.closePath()}function Ms(e,t,n,r){e.arc(t,n,r,0,2*Math.PI,!1)}Es.arrowShapeImpl=function(e){return(_s||(_s={polygon:ks,"triangle-backcurve":Cs,"triangle-tee":Ss,"circle-triangle":js,"triangle-cross":Ss,circle:Ms}))[e]};var Rs={drawElement:function(e,t,n,r,a,i){t.isNode()?this.drawNode(e,t,n,r,a,i):this.drawEdge(e,t,n,r,a,i)},drawElementOverlay:function(e,t){t.isNode()?this.drawNodeOverlay(e,t):this.drawEdgeOverlay(e,t)},drawElementUnderlay:function(e,t){t.isNode()?this.drawNodeUnderlay(e,t):this.drawEdgeUnderlay(e,t)},drawCachedElementPortion:function(e,t,n,r,a,i,o,s){var l=this,u=n.getBoundingBox(t);if(0!==u.w&&0!==u.h){var c=n.getElement(t,u,r,a,i);if(null!=c){var d=s(l,t);if(0===d)return;var f,h,p,v,g,m,y=o(l,t),w=u.x1,b=u.y1,x=u.w,_=u.h;if(0!==y){var E=n.getRotationPoint(t);p=E.x,v=E.y,e.translate(p,v),e.rotate(y),(g=l.getImgSmoothing(e))||l.setImgSmoothing(e,!0);var k=n.getRotationOffset(t);f=k.x,h=k.y}else f=w,h=b;1!==d&&(m=e.globalAlpha,e.globalAlpha=m*d),e.drawImage(c.texture.canvas,c.x,0,c.width,c.height,f,h,x,_),1!==d&&(e.globalAlpha=m),0!==y&&(e.rotate(-y),e.translate(-p,-v),g||l.setImgSmoothing(e,!1))}else n.drawElement(e,t)}}},Ps=function(){return 0},Os=function(e,t){return e.getTextAngle(t,null)},zs=function(e,t){return e.getTextAngle(t,"source")},As=function(e,t){return e.getTextAngle(t,"target")},Ts=function(e,t){return t.effectiveOpacity()},Bs=function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()};Rs.drawCachedElement=function(e,t,n,r,a,i){var o=this,s=o.data,l=s.eleTxrCache,u=s.lblTxrCache,c=s.slbTxrCache,d=s.tlbTxrCache,f=t.boundingBox(),h=!0===i?l.reasons.highQuality:null;if(0!==f.w&&0!==f.h&&t.visible()&&(!r||dt(f,r))){var p=t.isEdge(),v=t.element()._private.rscratch.badLine;o.drawElementUnderlay(e,t),o.drawCachedElementPortion(e,t,l,n,a,h,Ps,Ts),p&&v||o.drawCachedElementPortion(e,t,u,n,a,h,Os,Bs),p&&!v&&(o.drawCachedElementPortion(e,t,c,n,a,h,zs,Bs),o.drawCachedElementPortion(e,t,d,n,a,h,As,Bs)),o.drawElementOverlay(e,t)}},Rs.drawElements=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];this.drawElement(e,r)}},Rs.drawCachedElements=function(e,t,n,r){for(var a=0;a<t.length;a++){var i=t[a];this.drawCachedElement(e,i,n,r)}},Rs.drawCachedNodes=function(e,t,n,r){for(var a=0;a<t.length;a++){var i=t[a];i.isNode()&&this.drawCachedElement(e,i,n,r)}},Rs.drawLayeredElements=function(e,t,n,r){var a=this.data.lyrTxrCache.getLayers(t,n);if(a)for(var i=0;i<a.length;i++){var o=a[i],s=o.bb;0!==s.w&&0!==s.h&&e.drawImage(o.canvas,s.x1,s.y1,s.w,s.h)}else this.drawCachedElements(e,t,n,r)};var Ds={drawEdge:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!i||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=i?t.pstyle("opacity").value:1,c=i?t.pstyle("line-opacity").value:1,d=t.pstyle("curve-style").value,f=t.pstyle("line-style").value,h=t.pstyle("width").pfValue,p=t.pstyle("line-cap").value,v=u*c,g=u*c,m=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;"straight-triangle"===d?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=h,e.lineCap=p,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,f),e.lineCap="butt")},y=function(){a&&o.drawEdgeOverlay(e,t)},w=function(){a&&o.drawEdgeUnderlay(e,t)},b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;o.drawArrowheads(e,t,n)},x=function(){o.drawElementText(e,t,null,r)};e.lineJoin="round";var _="yes"===t.pstyle("ghost").value;if(_){var E=t.pstyle("ghost-offset-x").pfValue,k=t.pstyle("ghost-offset-y").pfValue,C=t.pstyle("ghost-opacity").value,S=v*C;e.translate(E,k),m(S),b(S),e.translate(-E,-k)}w(),m(),b(),y(),x(),n&&e.translate(l.x1,l.y1)}}},Ns=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var a=this,i=a.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||i?t.lineCap="round":t.lineCap="butt",a.colorStrokeStyle(t,l[0],l[1],l[2],r),a.drawEdgePath(n,t,o.allpts,"solid")}}}};Ds.drawEdgeOverlay=Ns("overlay"),Ds.drawEdgeUnderlay=Ns("underlay"),Ds.drawEdgePath=function(e,t,n,r){var a,i=e._private.rscratch,o=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var d=n.join("$");i.pathCacheKey&&i.pathCacheKey===d?(a=t=i.pathCache,s=!0):(a=t=new Path2D,i.pathCacheKey=d,i.pathCache=a)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var f=2;f+3<n.length;f+=4)t.quadraticCurveTo(n[f],n[f+1],n[f+2],n[f+3]);break;case"straight":case"segments":case"haystack":for(var h=2;h+1<n.length;h+=2)t.lineTo(n[h],n[h+1])}t=o,l?t.stroke(a):t.stroke(),t.setLineDash&&t.setLineDash([])},Ds.drawEdgeTrianglePath=function(e,t,n){t.fillStyle=t.strokeStyle;for(var r=e.pstyle("width").pfValue,a=0;a+1<n.length;a+=2){var i=[n[a+2]-n[a],n[a+3]-n[a+1]],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]),s=[i[1]/o,-i[0]/o],l=[s[0]*r/2,s[1]*r/2];t.beginPath(),t.moveTo(n[a]-l[0],n[a+1]-l[1]),t.lineTo(n[a]+l[0],n[a+1]+l[1]),t.lineTo(n[a+2],n[a+3]),t.closePath(),t.fill()}},Ds.drawArrowheads=function(e,t,n){var r=t._private.rscratch,a="haystack"===r.edgeType;a||this.drawArrowhead(e,t,"source",r.arrowStartX,r.arrowStartY,r.srcArrowAngle,n),this.drawArrowhead(e,t,"mid-target",r.midX,r.midY,r.midtgtArrowAngle,n),this.drawArrowhead(e,t,"mid-source",r.midX,r.midY,r.midsrcArrowAngle,n),a||this.drawArrowhead(e,t,"target",r.arrowEndX,r.arrowEndY,r.tgtArrowAngle,n)},Ds.drawArrowhead=function(e,t,n,r,a,i,o){if(!(isNaN(r)||null==r||isNaN(a)||null==a||isNaN(i)||null==i)){var s=this,l=t.pstyle(n+"-arrow-shape").value;if("none"!==l){var u="hollow"===t.pstyle(n+"-arrow-fill").value?"both":"filled",c=t.pstyle(n+"-arrow-fill").value,d=t.pstyle("width").pfValue,f=t.pstyle("opacity").value;void 0===o&&(o=f);var h=e.globalCompositeOperation;1===o&&"hollow"!==c||(e.globalCompositeOperation="destination-out",s.colorFillStyle(e,255,255,255,1),s.colorStrokeStyle(e,255,255,255,1),s.drawArrowShape(t,e,u,d,l,r,a,i),e.globalCompositeOperation=h);var p=t.pstyle(n+"-arrow-color").value;s.colorFillStyle(e,p[0],p[1],p[2],o),s.colorStrokeStyle(e,p[0],p[1],p[2],o),s.drawArrowShape(t,e,c,d,l,r,a,i)}}},Ds.drawArrowShape=function(e,t,n,r,a,i,o,s){var l,u=this,c=this.usePaths()&&"triangle-cross"!==a,d=!1,f=t,h={x:i,y:o},p=e.pstyle("arrow-scale").value,v=this.getArrowWidth(r,p),g=u.arrowShapes[a];if(c){var m=u.arrowPathCache=u.arrowPathCache||[],y=oe(a),w=m[y];null!=w?(l=t=w,d=!0):(l=t=new Path2D,m[y]=l)}d||(t.beginPath&&t.beginPath(),c?g.draw(t,1,0,{x:0,y:0},1):g.draw(t,v,s,h,r),t.closePath&&t.closePath()),t=f,c&&(t.translate(i,o),t.rotate(s),t.scale(v,v)),"filled"!==n&&"both"!==n||(c?t.fill(l):t.fill()),"hollow"!==n&&"both"!==n||(t.lineWidth=(g.matchEdgeWidth?r:1)/(c?v:1),t.lineJoin="miter",c?t.stroke(l):t.stroke()),c&&(t.scale(1/v,1/v),t.rotate(-s),t.translate(-i,-o))};var Ls={safeDrawImage:function(e,t,n,r,a,i,o,s,l,u){a<=0||i<=0||l<=0||u<=0||e.drawImage(t,n,r,a,i,o,s,l,u)},drawInscribedImage:function(e,t,n,r,a){var i=this,o=n.position(),s=o.x,l=o.y,u=n.cy().style(),c=u.getIndexedStyle.bind(u),d=c(n,"background-fit","value",r),f=c(n,"background-repeat","value",r),h=n.width(),p=n.height(),v=2*n.padding(),g=h+("inner"===c(n,"background-width-relative-to","value",r)?0:v),m=p+("inner"===c(n,"background-height-relative-to","value",r)?0:v),y=n._private.rscratch,w="node"===c(n,"background-clip","value",r),b=c(n,"background-image-opacity","value",r)*a,x=c(n,"background-image-smoothing","value",r),_=t.width||t.cachedW,E=t.height||t.cachedH;null!=_&&null!=E||(document.body.appendChild(t),_=t.cachedW=t.width||t.offsetWidth,E=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var k=_,C=E;if("auto"!==c(n,"background-width","value",r)&&(k="%"===c(n,"background-width","units",r)?c(n,"background-width","pfValue",r)*g:c(n,"background-width","pfValue",r)),"auto"!==c(n,"background-height","value",r)&&(C="%"===c(n,"background-height","units",r)?c(n,"background-height","pfValue",r)*m:c(n,"background-height","pfValue",r)),0!==k&&0!==C){if("contain"===d)k*=S=Math.min(g/k,m/C),C*=S;else if("cover"===d){var S;k*=S=Math.max(g/k,m/C),C*=S}var j=s-g/2,M=c(n,"background-position-x","units",r),R=c(n,"background-position-x","pfValue",r);j+="%"===M?(g-k)*R:R;var P=c(n,"background-offset-x","units",r),O=c(n,"background-offset-x","pfValue",r);j+="%"===P?(g-k)*O:O;var z=l-m/2,A=c(n,"background-position-y","units",r),T=c(n,"background-position-y","pfValue",r);z+="%"===A?(m-C)*T:T;var B=c(n,"background-offset-y","units",r),D=c(n,"background-offset-y","pfValue",r);z+="%"===B?(m-C)*D:D,y.pathCache&&(j-=s,z-=l,s=0,l=0);var N=e.globalAlpha;e.globalAlpha=b;var L=i.getImgSmoothing(e),V=!1;if("no"===x&&L?(i.setImgSmoothing(e,!1),V=!0):"yes"!==x||L||(i.setImgSmoothing(e,!0),V=!0),"no-repeat"===f)w&&(e.save(),y.pathCache?e.clip(y.pathCache):(i.nodeShapes[i.getNodeShape(n)].draw(e,s,l,g,m),e.clip())),i.safeDrawImage(e,t,0,0,_,E,j,z,k,C),w&&e.restore();else{var I=e.createPattern(t,f);e.fillStyle=I,i.nodeShapes[i.getNodeShape(n)].draw(e,s,l,g,m),e.translate(j,z),e.fill(),e.translate(-j,-z)}e.globalAlpha=N,V&&i.setImgSmoothing(e,L)}}},Vs={};function Is(e,t,n,r,a){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:5;e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+a-i),e.quadraticCurveTo(t+r,n+a,t+r-i,n+a),e.lineTo(t+i,n+a),e.quadraticCurveTo(t,n+a,t,n+a-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),e.fill()}Vs.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),a=Math.ceil(Qe(n*r));t=Math.pow(2,a)}return!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},Vs.drawElementText=function(e,t,n,r,a){var i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(i&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),d=t.pstyle("source-label"),f=t.pstyle("target-label");if(u||(!c||!c.value)&&(!d||!d.value)&&(!f||!f.value))return;e.textAlign="center",e.textBaseline="bottom"}var h,p=!n;n&&(h=n,e.translate(-h.x1,-h.y1)),null==a?(o.drawText(e,t,null,p,i),t.isEdge()&&(o.drawText(e,t,"source",p,i),o.drawText(e,t,"target",p,i))):o.drawText(e,t,a,p,i),n&&e.translate(h.x1,h.y1)},Vs.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if((t=this.fontCaches[n]).context===e)return t;return t={context:e},this.fontCaches.push(t),t},Vs.setupTextStyle=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,a=t.pstyle("font-size").pfValue+"px",i=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+a+" "+i,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},Vs.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",a=e.pstyle(r+"text-rotation"),i=je(n,"labelAngle",t);return"autorotate"===a.strValue?e.isEdge()?i:0:"none"===a.strValue?0:a.pfValue},Vs.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=t._private,o=i.rscratch,s=a?t.effectiveOpacity():1;if(!a||0!==s&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var l,u,c=je(o,"labelX",n),d=je(o,"labelY",n),f=this.getLabelText(t,n);if(null!=f&&""!==f&&!isNaN(c)&&!isNaN(d)){this.setupTextStyle(e,t,a);var h,p=n?n+"-":"",v=je(o,"labelWidth",n),g=je(o,"labelHeight",n),m=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,w=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(w&&(b="center",x="center"),c+=m,d+=y,0!==(h=r?this.getTextAngle(t,n):0)&&(l=c,u=d,e.translate(l,u),e.rotate(h),c=0,d=0),x){case"top":break;case"center":d+=g/2;break;case"bottom":d+=g}var _=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,C=t.pstyle("text-background-padding").pfValue;if(_>0||k>0&&E>0){var S=c-C;switch(b){case"left":S-=v;break;case"center":S-=v/2}var j=d-g-C,M=v+2*C,R=g+2*C;if(_>0){var P=e.fillStyle,O=t.pstyle("text-background-color").value;e.fillStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+_*s+")";var z=t.pstyle("text-background-shape").strValue;0===z.indexOf("round")?Is(e,S,j,M,R,2):e.fillRect(S,j,M,R),e.fillStyle=P}if(k>0&&E>0){var A=e.strokeStyle,T=e.lineWidth,B=t.pstyle("text-border-color").value,D=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+B[0]+","+B[1]+","+B[2]+","+E*s+")",e.lineWidth=k,e.setLineDash)switch(D){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(S,j,M,R),"double"===D){var N=k/2;e.strokeRect(S+N,j+N,M-2*N,R-2*N)}e.setLineDash&&e.setLineDash([]),e.lineWidth=T,e.strokeStyle=A}}var L=2*t.pstyle("text-outline-width").pfValue;if(L>0&&(e.lineWidth=L),"wrap"===t.pstyle("text-wrap").value){var V=je(o,"labelWrapCachedLines",n),I=je(o,"labelLineHeight",n),H=v/2,F=this.getLabelJustification(t);switch("auto"===F||("left"===b?"left"===F?c+=-v:"center"===F&&(c+=-H):"center"===b?"left"===F?c+=-H:"right"===F&&(c+=H):"right"===b&&("center"===F?c+=H:"right"===F&&(c+=v))),x){case"top":case"center":case"bottom":d-=(V.length-1)*I}for(var G=0;G<V.length;G++)L>0&&e.strokeText(V[G],c,d),e.fillText(V[G],c,d),d+=I}else L>0&&e.strokeText(f,c,d),e.fillText(f,c,d);0!==h&&(e.rotate(-h),e.translate(-l,-u))}}};var Hs={drawNode:function(e,t,n){var r,a,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,d=t.position();if(S(d.x)&&S(d.y)&&(!s||t.visible())){var f,h,p=s?t.effectiveOpacity():1,v=l.usePaths(),g=!1,m=t.padding();r=t.width()+2*m,a=t.height()+2*m,n&&(h=n,e.translate(-h.x1,-h.y1));for(var y=t.pstyle("background-image"),w=y.value,b=new Array(w.length),x=new Array(w.length),_=0,E=0;E<w.length;E++){var k=w[E],C=b[E]=null!=k&&"none"!==k;if(C){var j=t.cy().style().getIndexedStyle(t,"background-image-crossorigin","value",E);_++,x[E]=l.getCachedImage(k,j,(function(){u.backgroundTimestamp=Date.now(),t.emitAndNotify("background")}))}}var M=t.pstyle("background-blacken").value,R=t.pstyle("border-width").pfValue,P=t.pstyle("background-opacity").value*p,O=t.pstyle("border-color").value,z=t.pstyle("border-style").value,A=t.pstyle("border-opacity").value*p;e.lineJoin="miter";var T=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;l.eleFillStyle(e,t,n)},B=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A;l.colorStrokeStyle(e,O[0],O[1],O[2],t)},D=t.pstyle("shape").strValue,N=t.pstyle("shape-polygon-points").pfValue;if(v){e.translate(d.x,d.y);var L=l.nodePathCache=l.nodePathCache||[],V=se("polygon"===D?D+","+N.join(","):D,""+a,""+r),I=L[V];null!=I?(f=I,g=!0,c.pathCache=f):(f=new Path2D,L[V]=c.pathCache=f)}var H=function(){if(!g){var n=d;v&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(f||e,n.x,n.y,r,a)}v?e.fill(f):e.fill()},F=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=u.backgrounding,i=0,o=0;o<x.length;o++){var s=t.cy().style().getIndexedStyle(t,"background-image-containment","value",o);r&&"over"===s||!r&&"inside"===s?i++:b[o]&&x[o].complete&&!x[o].error&&(i++,l.drawInscribedImage(e,x[o],t,o,n))}u.backgrounding=!(i===_),a!==u.backgrounding&&t.updateStyle(!1)},G=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;l.hasPie(t)&&(l.drawPie(e,t,i),n&&(v||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a)))},Y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,n=(M>0?M:-M)*t,r=M>0?0:255;0!==M&&(l.colorFillStyle(e,r,r,r,n),v?e.fill(f):e.fill())},q=function(){if(R>0){if(e.lineWidth=R,e.lineCap="butt",e.setLineDash)switch(z){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(v?e.stroke(f):e.stroke(),"double"===z){e.lineWidth=R/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",v?e.stroke(f):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}},W=function(){o&&l.drawNodeOverlay(e,t,d,r,a)},U=function(){o&&l.drawNodeUnderlay(e,t,d,r,a)},X=function(){l.drawElementText(e,t,null,i)},$="yes"===t.pstyle("ghost").value;if($){var K=t.pstyle("ghost-offset-x").pfValue,Z=t.pstyle("ghost-offset-y").pfValue,Q=t.pstyle("ghost-opacity").value,J=Q*p;e.translate(K,Z),T(Q*P),H(),F(J,!0),B(Q*A),q(),G(0!==M||0!==R),F(J,!1),Y(J),e.translate(-K,-Z)}v&&e.translate(-d.x,-d.y),U(),v&&e.translate(d.x,d.y),T(),H(),F(p,!0),B(),q(),G(0!==M||0!==R),F(p,!1),Y(),v&&e.translate(-d.x,-d.y),X(),W(),n&&e.translate(h.x1,h.y1)}}},Fs=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n,r,a,i){if(n.visible()){var o=n.pstyle("".concat(e,"-padding")).pfValue,s=n.pstyle("".concat(e,"-opacity")).value,l=n.pstyle("".concat(e,"-color")).value,u=n.pstyle("".concat(e,"-shape")).value;if(s>0){if(r=r||n.position(),null==a||null==i){var c=n.padding();a=n.width()+2*c,i=n.height()+2*c}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,a+2*o,i+2*o),t.fill()}}}};Hs.drawNodeOverlay=Fs("overlay"),Hs.drawNodeUnderlay=Fs("underlay"),Hs.hasPie=function(e){return(e=e[0])._private.hasPie},Hs.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var a=t.cy().style(),i=t.pstyle("pie-size"),o=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,d=0;this.usePaths()&&(o=0,s=0),"%"===i.units?c*=i.pfValue:void 0!==i.pfValue&&(c=i.pfValue/2);for(var f=1;f<=a.pieBackgroundN;f++){var h=t.pstyle("pie-"+f+"-background-size").value,p=t.pstyle("pie-"+f+"-background-color").value,v=t.pstyle("pie-"+f+"-background-opacity").value*n,g=h/100;g+d>1&&(g=1-d);var m=1.5*Math.PI+2*Math.PI*d,y=m+2*Math.PI*g;0===h||d>=1||d+g>1||(e.beginPath(),e.moveTo(o,s),e.arc(o,s,c,m,y),e.closePath(),this.colorFillStyle(e,p[0],p[1],p[2],v),e.fill(),d+=g)}};var Gs={};Gs.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},Gs.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,a=0;a<n.length;a++)if((t=n[a]).context===e){r=!1;break}return r&&(t={context:e},n.push(t)),t},Gs.createGradientStyleFor=function(e,t,n,r,a){var i,o=this.usePaths(),s=n.pstyle(t+"-gradient-stop-colors").value,l=n.pstyle(t+"-gradient-stop-positions").pfValue;if("radial-gradient"===r)if(n.isEdge()){var u=n.sourceEndpoint(),c=n.targetEndpoint(),d=n.midpoint(),f=et(u,d),h=et(c,d);i=e.createRadialGradient(d.x,d.y,0,d.x,d.y,Math.max(f,h))}else{var p=o?{x:0,y:0}:n.position(),v=n.paddedWidth(),g=n.paddedHeight();i=e.createRadialGradient(p.x,p.y,0,p.x,p.y,Math.max(v,g))}else if(n.isEdge()){var m=n.sourceEndpoint(),y=n.targetEndpoint();i=e.createLinearGradient(m.x,m.y,y.x,y.y)}else{var w=o?{x:0,y:0}:n.position(),b=n.paddedWidth()/2,x=n.paddedHeight()/2;switch(n.pstyle("background-gradient-direction").value){case"to-bottom":i=e.createLinearGradient(w.x,w.y-x,w.x,w.y+x);break;case"to-top":i=e.createLinearGradient(w.x,w.y+x,w.x,w.y-x);break;case"to-left":i=e.createLinearGradient(w.x+b,w.y,w.x-b,w.y);break;case"to-right":i=e.createLinearGradient(w.x-b,w.y,w.x+b,w.y);break;case"to-bottom-right":case"to-right-bottom":i=e.createLinearGradient(w.x-b,w.y-x,w.x+b,w.y+x);break;case"to-top-right":case"to-right-top":i=e.createLinearGradient(w.x-b,w.y+x,w.x+b,w.y-x);break;case"to-bottom-left":case"to-left-bottom":i=e.createLinearGradient(w.x+b,w.y-x,w.x-b,w.y+x);break;case"to-top-left":case"to-left-top":i=e.createLinearGradient(w.x+b,w.y+x,w.x-b,w.y-x)}}if(!i)return null;for(var _=l.length===s.length,E=s.length,k=0;k<E;k++)i.addColorStop(_?l[k]:k/(E-1),"rgba("+s[k][0]+","+s[k][1]+","+s[k][2]+","+a+")");return i},Gs.gradientFillStyle=function(e,t,n,r){var a=this.createGradientStyleFor(e,"background",t,n,r);if(!a)return null;e.fillStyle=a},Gs.colorFillStyle=function(e,t,n,r,a){e.fillStyle="rgba("+t+","+n+","+r+","+a+")"},Gs.eleFillStyle=function(e,t,n){var r=t.pstyle("background-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientFillStyle(e,t,r,n);else{var a=t.pstyle("background-color").value;this.colorFillStyle(e,a[0],a[1],a[2],n)}},Gs.gradientStrokeStyle=function(e,t,n,r){var a=this.createGradientStyleFor(e,"line",t,n,r);if(!a)return null;e.strokeStyle=a},Gs.colorStrokeStyle=function(e,t,n,r,a){e.strokeStyle="rgba("+t+","+n+","+r+","+a+")"},Gs.eleStrokeStyle=function(e,t,n){var r=t.pstyle("line-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientStrokeStyle(e,t,r,n);else{var a=t.pstyle("line-color").value;this.colorStrokeStyle(e,a[0],a[1],a[2],n)}},Gs.matchCanvasSize=function(e){var t=this,n=t.data,r=t.findContainerClientCoords(),a=r[2],i=r[3],o=t.getPixelRatio(),s=t.motionBlurPxRatio;e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]&&e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]||(o=s);var l,u=a*o,c=i*o;if(u!==t.canvasWidth||c!==t.canvasHeight){t.fontCaches=null;var d=n.canvasContainer;d.style.width=a+"px",d.style.height=i+"px";for(var f=0;f<t.CANVAS_LAYERS;f++)(l=n.canvases[f]).width=u,l.height=c,l.style.width=a+"px",l.style.height=i+"px";for(f=0;f<t.BUFFER_COUNT;f++)(l=n.bufferCanvases[f]).width=u,l.height=c,l.style.width=a+"px",l.style.height=i+"px";t.textureMult=1,o<=1&&(l=n.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,l.width=u*t.textureMult,l.height=c*t.textureMult),t.canvasWidth=u,t.canvasHeight=c}},Gs.renderTo=function(e,t,n,r){this.render({forcedContext:e,forcedZoom:t,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},Gs.render=function(e){var t=(e=e||Ee()).forcedContext,n=e.drawAllLayers,r=e.drawOnlyNodeLayer,a=e.forcedZoom,i=e.forcedPan,o=this,s=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,l=o.cy,u=o.data,c=u.canvasNeedsRedraw,d=o.textureOnViewport&&!t&&(o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming),f=void 0!==e.motionBlur?e.motionBlur:o.motionBlur,h=o.motionBlurPxRatio,p=l.hasCompoundNodes(),v=o.hoverData.draggingEles,g=!(!o.hoverData.selecting&&!o.touchData.selecting),m=f=f&&!t&&o.motionBlurEnabled&&!g;t||(o.prevPxRatio!==s&&(o.invalidateContainerClientCoordsCache(),o.matchCanvasSize(o.container),o.redrawHint("eles",!0),o.redrawHint("drag",!0)),o.prevPxRatio=s),!t&&o.motionBlurTimeout&&clearTimeout(o.motionBlurTimeout),f&&(null==o.mbFrames&&(o.mbFrames=0),o.mbFrames++,o.mbFrames<3&&(m=!1),o.mbFrames>o.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!d&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var y=l.style(),w=l.zoom(),b=void 0!==a?a:w,x=l.pan(),_={x:x.x,y:x.y},E={zoom:w,pan:{x:x.x,y:x.y}},k=o.prevViewport;void 0===k||E.zoom!==k.zoom||E.pan.x!==k.pan.x||E.pan.y!==k.pan.y||v&&!p||(o.motionBlurPxRatio=1),i&&(_=i),b*=s,_.x*=s,_.y*=s;var C=o.getCachedZSortedEles();function S(e,t,n,r,a){var i=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",o.colorFillStyle(e,255,255,255,o.motionBlurTransparency),e.fillRect(t,n,r,a),e.globalCompositeOperation=i}function j(e,r){var s,l,c,d;o.clearingMotionBlur||e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=_,l=b,c=o.canvasWidth,d=o.canvasHeight):(s={x:x.x*h,y:x.y*h},l=w*h,c=o.canvasWidth*h,d=o.canvasHeight*h),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?S(e,0,0,c,d):t||void 0!==r&&!r||e.clearRect(0,0,c,d),n||(e.translate(s.x,s.y),e.scale(l,l)),i&&e.translate(i.x,i.y),a&&e.scale(a,a)}if(d||(o.textureDrawLastFrame=!1),d){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var M=o.data.bufferContexts[o.TEXTURE_BUFFER];M.setTransform(1,0,0,1,0,0),M.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:M,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(E=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-E.pan.x)/E.zoom,y:(0-E.pan.y)/E.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var R=u.contexts[o.NODE],P=o.textureCache.texture;E=o.textureCache.viewport;R.setTransform(1,0,0,1,0,0),f?S(R,0,0,E.width,E.height):R.clearRect(0,0,E.width,E.height);var O=y.core("outside-texture-bg-color").value,z=y.core("outside-texture-bg-opacity").value;o.colorFillStyle(R,O[0],O[1],O[2],z),R.fillRect(0,0,E.width,E.height);w=l.zoom();j(R,!1),R.clearRect(E.mpan.x,E.mpan.y,E.width/E.zoom/s,E.height/E.zoom/s),R.drawImage(P,E.mpan.x,E.mpan.y,E.width/E.zoom/s,E.height/E.zoom/s)}else o.textureOnViewport&&!t&&(o.textureCache=null);var A=l.extent(),T=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),B=o.hideEdgesOnViewport&&T,D=[];if(D[o.NODE]=!c[o.NODE]&&f&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,D[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),D[o.DRAG]=!c[o.DRAG]&&f&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,D[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||n||r||D[o.NODE]){var N=f&&!D[o.NODE]&&1!==h;j(R=t||(N?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),f&&!N?"motionBlur":void 0),B?o.drawCachedNodes(R,C.nondrag,s,A):o.drawLayeredElements(R,C.nondrag,s,A),o.debug&&o.drawDebugPoints(R,C.nondrag),n||f||(c[o.NODE]=!1)}if(!r&&(c[o.DRAG]||n||D[o.DRAG])){N=f&&!D[o.DRAG]&&1!==h;j(R=t||(N?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),f&&!N?"motionBlur":void 0),B?o.drawCachedNodes(R,C.drag,s,A):o.drawCachedElements(R,C.drag,s,A),o.debug&&o.drawDebugPoints(R,C.drag),n||f||(c[o.DRAG]=!1)}if(o.showFps||!r&&c[o.SELECT_BOX]&&!n){if(j(R=t||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){w=o.cy.zoom();var L=y.core("selection-box-border-width").value/w;R.lineWidth=L,R.fillStyle="rgba("+y.core("selection-box-color").value[0]+","+y.core("selection-box-color").value[1]+","+y.core("selection-box-color").value[2]+","+y.core("selection-box-opacity").value+")",R.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),L>0&&(R.strokeStyle="rgba("+y.core("selection-box-border-color").value[0]+","+y.core("selection-box-border-color").value[1]+","+y.core("selection-box-border-color").value[2]+","+y.core("selection-box-opacity").value+")",R.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){w=o.cy.zoom();var V=u.bgActivePosistion;R.fillStyle="rgba("+y.core("active-bg-color").value[0]+","+y.core("active-bg-color").value[1]+","+y.core("active-bg-color").value[2]+","+y.core("active-bg-opacity").value+")",R.beginPath(),R.arc(V.x,V.y,y.core("active-bg-size").pfValue/w,0,2*Math.PI),R.fill()}var I=o.lastRedrawTime;if(o.showFps&&I){I=Math.round(I);var H=Math.round(1e3/I);R.setTransform(1,0,0,1,0,0),R.fillStyle="rgba(255, 0, 0, 0.75)",R.strokeStyle="rgba(255, 0, 0, 0.75)",R.lineWidth=1,R.fillText("1 frame = "+I+" ms = "+H+" fps",0,20);R.strokeRect(0,30,250,20),R.fillRect(0,30,250*Math.min(H/60,1),20)}n||(c[o.SELECT_BOX]=!1)}if(f&&1!==h){var F=u.contexts[o.NODE],G=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],Y=u.contexts[o.DRAG],q=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],W=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!m?e.clearRect(0,0,o.canvasWidth,o.canvasHeight):S(e,0,0,o.canvasWidth,o.canvasHeight);var r=h;e.drawImage(t,0,0,o.canvasWidth*r,o.canvasHeight*r,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||D[o.NODE])&&(W(F,G,D[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||D[o.DRAG])&&(W(Y,q,D[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=E,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),f&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!d,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),100)),t||l.emit("render")};for(var Ys={drawPolygonPath:function(e,t,n,r,a,i){var o=r/2,s=a/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*i[0],n+s*i[1]);for(var l=1;l<i.length/2;l++)e.lineTo(t+o*i[2*l],n+s*i[2*l+1]);e.closePath()},drawRoundPolygonPath:function(e,t,n,r,a,i){var o=r/2,s=a/2,l=At(r,a);e.beginPath&&e.beginPath();for(var u=0;u<i.length/4;u++){var c,d=void 0;d=0===u?i.length-2:4*u-2,c=4*u+2;var f=t+o*i[4*u],h=n+s*i[4*u+1],p=-i[d]*i[c]-i[d+1]*i[c+1],v=l/Math.tan(Math.acos(p)/2),g=f-v*i[d],m=h-v*i[d+1],y=f+v*i[c],w=h+v*i[c+1];0===u?e.moveTo(g,m):e.lineTo(g,m),e.arcTo(f,h,y,w,l)}e.closePath()},drawRoundRectanglePath:function(e,t,n,r,a){var i=r/2,o=a/2,s=zt(r,a);e.beginPath&&e.beginPath(),e.moveTo(t,n-o),e.arcTo(t+i,n-o,t+i,n,s),e.arcTo(t+i,n+o,t,n+o,s),e.arcTo(t-i,n+o,t-i,n,s),e.arcTo(t-i,n-o,t,n-o,s),e.lineTo(t,n-o),e.closePath()},drawBottomRoundRectanglePath:function(e,t,n,r,a){var i=r/2,o=a/2,s=zt(r,a);e.beginPath&&e.beginPath(),e.moveTo(t,n-o),e.lineTo(t+i,n-o),e.lineTo(t+i,n),e.arcTo(t+i,n+o,t,n+o,s),e.arcTo(t-i,n+o,t-i,n,s),e.lineTo(t-i,n-o),e.lineTo(t,n-o),e.closePath()},drawCutRectanglePath:function(e,t,n,r,a){var i=r/2,o=a/2;e.beginPath&&e.beginPath(),e.moveTo(t-i+8,n-o),e.lineTo(t+i-8,n-o),e.lineTo(t+i,n-o+8),e.lineTo(t+i,n+o-8),e.lineTo(t+i-8,n+o),e.lineTo(t-i+8,n+o),e.lineTo(t-i,n+o-8),e.lineTo(t-i,n-o+8),e.closePath()},drawBarrelPath:function(e,t,n,r,a){var i=r/2,o=a/2,s=t-i,l=t+i,u=n-o,c=n+o,d=Tt(r,a),f=d.widthOffset,h=d.heightOffset,p=d.ctrlPtOffsetPct*f;e.beginPath&&e.beginPath(),e.moveTo(s,u+h),e.lineTo(s,c-h),e.quadraticCurveTo(s+p,c,s+f,c),e.lineTo(l-f,c),e.quadraticCurveTo(l-p,c,l,c-h),e.lineTo(l,u+h),e.quadraticCurveTo(l-p,u,l-f,u),e.lineTo(s+f,u),e.quadraticCurveTo(s+p,u,s,u+h),e.closePath()}},qs=Math.sin(0),Ws=Math.cos(0),Us={},Xs={},$s=Math.PI/40,Ks=0*Math.PI;Ks<2*Math.PI;Ks+=$s)Us[Ks]=Math.sin(Ks),Xs[Ks]=Math.cos(Ks);Ys.drawEllipsePath=function(e,t,n,r,a){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,a/2,0,0,2*Math.PI);else for(var i,o,s=r/2,l=a/2,u=0*Math.PI;u<2*Math.PI;u+=$s)i=t-s*Us[u]*qs+s*Xs[u]*Ws,o=n+l*Xs[u]*qs+l*Us[u]*Ws,0===u?e.moveTo(i,o):e.lineTo(i,o);e.closePath()};var Zs={};function Qs(e){var t=e.indexOf(",");return e.substr(t+1)}function Js(e,t,n){var r=function(){return t.toDataURL(n,e.quality)};switch(e.output){case"blob-promise":return new Un((function(r,a){try{t.toBlob((function(e){null!=e?r(e):a(new Error("`canvas.toBlob()` sent a null value in its callback"))}),n,e.quality)}catch(i){a(i)}}));case"blob":return function(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),a=new Uint8Array(r),i=0;i<n.length;i++)a[i]=n.charCodeAt(i);return new Blob([r],{type:t})}(Qs(r()),n);case"base64":return Qs(r());default:return r()}}Zs.createBuffer=function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,[n,n.getContext("2d")]},Zs.bufferCanvasImage=function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),a=e.full?Math.ceil(n.w):r[2],i=e.full?Math.ceil(n.h):r[3],o=S(e.maxWidth)||S(e.maxHeight),s=this.getPixelRatio(),l=1;if(void 0!==e.scale)a*=e.scale,i*=e.scale,l=e.scale;else if(o){var u=1/0,c=1/0;S(e.maxWidth)&&(u=l*e.maxWidth/a),S(e.maxHeight)&&(c=l*e.maxHeight/i),a*=l=Math.min(u,c),i*=l}o||(a*=s,i*=s,l*=s);var d=document.createElement("canvas");d.width=a,d.height=i,d.style.width=a+"px",d.style.height=i+"px";var f=d.getContext("2d");if(a>0&&i>0){f.clearRect(0,0,a,i),f.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*l,-n.y1*l),f.scale(l,l),this.drawElements(f,h),f.scale(1/l,1/l),f.translate(n.x1*l,n.y1*l);else{var p=t.pan(),v={x:p.x*l,y:p.y*l};l*=t.zoom(),f.translate(v.x,v.y),f.scale(l,l),this.drawElements(f,h),f.scale(1/l,1/l),f.translate(-v.x,-v.y)}e.bg&&(f.globalCompositeOperation="destination-over",f.fillStyle=e.bg,f.rect(0,0,a,i),f.fill())}return d},Zs.png=function(e){return Js(e,this.bufferCanvasImage(e),"image/png")},Zs.jpg=function(e){return Js(e,this.bufferCanvasImage(e),"image/jpeg")};var el={nodeShapeImpl:function(e,t,n,r,a,i,o){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,a,i);case"polygon":return this.drawPolygonPath(t,n,r,a,i,o);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,a,i,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,a,i);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,a,i);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,a,i);case"barrel":return this.drawBarrelPath(t,n,r,a,i)}}},tl=rl,nl=rl.prototype;function rl(e){var t=this;t.data={canvases:new Array(nl.CANVAS_LAYERS),contexts:new Array(nl.CANVAS_LAYERS),canvasNeedsRedraw:new Array(nl.CANVAS_LAYERS),bufferCanvases:new Array(nl.BUFFER_COUNT),bufferContexts:new Array(nl.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",r="rgba(0,0,0,0)";t.data.canvasContainer=document.createElement("div");var a=t.data.canvasContainer.style;t.data.canvasContainer.style[n]=r,a.position="relative",a.zIndex="0",a.overflow="hidden";var i=e.cy.container();i.appendChild(t.data.canvasContainer),i.style[n]=r;var o={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};g&&g.userAgent.match(/msie|trident|edge/i)&&(o["-ms-touch-action"]="none",o["touch-action"]="none");for(var s=0;s<nl.CANVAS_LAYERS;s++){var l=t.data.canvases[s]=document.createElement("canvas");t.data.contexts[s]=l.getContext("2d"),Object.keys(o).forEach((function(e){l.style[e]=o[e]})),l.style.position="absolute",l.setAttribute("data-id","layer"+s),l.style.zIndex=String(nl.CANVAS_LAYERS-s),t.data.canvasContainer.appendChild(l),t.data.canvasNeedsRedraw[s]=!1}t.data.topCanvas=t.data.canvases[0],t.data.canvases[nl.NODE].setAttribute("data-id","layer"+nl.NODE+"-node"),t.data.canvases[nl.SELECT_BOX].setAttribute("data-id","layer"+nl.SELECT_BOX+"-selectbox"),t.data.canvases[nl.DRAG].setAttribute("data-id","layer"+nl.DRAG+"-drag");for(s=0;s<nl.BUFFER_COUNT;s++)t.data.bufferCanvases[s]=document.createElement("canvas"),t.data.bufferContexts[s]=t.data.bufferCanvases[s].getContext("2d"),t.data.bufferCanvases[s].style.position="absolute",t.data.bufferCanvases[s].setAttribute("data-id","buffer"+s),t.data.bufferCanvases[s].style.zIndex=String(-s-1),t.data.bufferCanvases[s].style.visibility="hidden";t.pathsEnabled=!0;var u=ot(),c=function(e){return{x:-e.w/2,y:-e.h/2}},d=function(e){return e.boundingBox(),e[0]._private.bodyBounds},f=function(e){return e.boundingBox(),e[0]._private.labelBounds.main||u},h=function(e){return e.boundingBox(),e[0]._private.labelBounds.source||u},p=function(e){return e.boundingBox(),e[0]._private.labelBounds.target||u},v=function(e,t){return t},m=function(e,t,n){var r=e?e+"-":"";return{x:t.x+n.pstyle(r+"text-margin-x").pfValue,y:t.y+n.pstyle(r+"text-margin-y").pfValue}},y=function(e,t,n){var r=e[0]._private.rscratch;return{x:r[t],y:r[n]}},w=t.data.eleTxrCache=new gs(t,{getKey:function(e){return e[0]._private.nodeKey},doesEleInvalidateKey:function(e){var t=e[0]._private;return!(t.oldBackgroundTimestamp===t.backgroundTimestamp)},drawElement:function(e,n,r,a,i){return t.drawElement(e,n,r,!1,!1,i)},getBoundingBox:d,getRotationPoint:function(e){return{x:((t=d(e)).x1+t.x2)/2,y:(t.y1+t.y2)/2};var t},getRotationOffset:function(e){return c(d(e))},allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),b=t.data.lblTxrCache=new gs(t,{getKey:function(e){return e[0]._private.labelStyleKey},drawElement:function(e,n,r,a,i){return t.drawElementText(e,n,r,a,"main",i)},getBoundingBox:f,getRotationPoint:function(e){return m("",y(e,"labelX","labelY"),e)},getRotationOffset:function(e){var t=f(e),n=c(f(e));if(e.isNode()){switch(e.pstyle("text-halign").value){case"left":n.x=-t.w;break;case"right":n.x=0}switch(e.pstyle("text-valign").value){case"top":n.y=-t.h;break;case"bottom":n.y=0}}return n},isVisible:v}),x=t.data.slbTxrCache=new gs(t,{getKey:function(e){return e[0]._private.sourceLabelStyleKey},drawElement:function(e,n,r,a,i){return t.drawElementText(e,n,r,a,"source",i)},getBoundingBox:h,getRotationPoint:function(e){return m("source",y(e,"sourceLabelX","sourceLabelY"),e)},getRotationOffset:function(e){return c(h(e))},isVisible:v}),_=t.data.tlbTxrCache=new gs(t,{getKey:function(e){return e[0]._private.targetLabelStyleKey},drawElement:function(e,n,r,a,i){return t.drawElementText(e,n,r,a,"target",i)},getBoundingBox:p,getRotationPoint:function(e){return m("target",y(e,"targetLabelX","targetLabelY"),e)},getRotationOffset:function(e){return c(p(e))},isVisible:v}),E=t.data.lyrTxrCache=new ys(t);t.onUpdateEleCalcs((function(e,t){w.invalidateElements(t),b.invalidateElements(t),x.invalidateElements(t),_.invalidateElements(t),E.invalidateElements(t);for(var n=0;n<t.length;n++){var r=t[n]._private;r.oldBackgroundTimestamp=r.backgroundTimestamp}}));var k=function(e){for(var t=0;t<e.length;t++)E.enqueueElementRefinement(e[t].ele)};w.onDequeue(k),b.onDequeue(k),x.onDequeue(k),_.onDequeue(k)}nl.CANVAS_LAYERS=3,nl.SELECT_BOX=0,nl.DRAG=1,nl.NODE=2,nl.BUFFER_COUNT=3,nl.TEXTURE_BUFFER=0,nl.MOTIONBLUR_BUFFER_NODE=1,nl.MOTIONBLUR_BUFFER_DRAG=2,nl.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[nl.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[nl.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[nl.SELECT_BOX]=t}};var al="undefined"!=typeof Path2D;nl.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},nl.usePaths=function(){return al&&this.pathsEnabled},nl.setImgSmoothing=function(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)},nl.getImgSmoothing=function(e){return null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled},nl.makeOffscreenCanvas=function(e,t){var n;return"undefined"!==("undefined"==typeof OffscreenCanvas?"undefined":u(OffscreenCanvas))?n=new OffscreenCanvas(e,t):((n=document.createElement("canvas")).width=e,n.height=t),n},[Es,Rs,Ds,Ls,Vs,Hs,Gs,Ys,Zs,el].forEach((function(e){F(nl,e)}));var il=[{type:"layout",extensions:Lo},{type:"renderer",extensions:[{name:"null",impl:Vo},{name:"base",impl:us},{name:"canvas",impl:tl}]}],ol={},sl={};function ll(e,t,n){var r=n,a=function(n){we("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(Zi.prototype[t])return a(t);Zi.prototype[t]=n}else if("collection"===e){if(pi.prototype[t])return a(t);pi.prototype[t]=n}else if("layout"===e){for(var i=function(e){this.options=e,n.call(this,e),C(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},o=i.prototype=Object.create(n.prototype),s=[],l=0;l<s.length;l++){var u=s[l];o[u]=o[u]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var c=n.prototype.stop;o.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return c?c.call(this):this.emit("layoutstop"),this},o.destroy||(o.destroy=function(){return this}),o.cy=function(){return this._private.cy};var d=function(e){return e._private.cy},f={addEventFields:function(e,t){t.layout=e,t.cy=d(e),t.target=e},bubble:function(){return!0},parent:function(e){return d(e)}};F(o,{createEmitter:function(){return this._private.emitter=new za(f,this),this},emitter:function(){return this._private.emitter},on:function(e,t){return this.emitter().on(e,t),this},one:function(e,t){return this.emitter().one(e,t),this},once:function(e,t){return this.emitter().one(e,t),this},removeListener:function(e,t){return this.emitter().removeListener(e,t),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(e,t){return this.emitter().emit(e,t),this}}),Jn.eventAliasesOn(o),r=i}else if("renderer"===e&&"null"!==t&&"base"!==t){var h=ul("renderer","base"),p=h.prototype,v=n,g=n.prototype,m=function(){h.apply(this,arguments),v.apply(this,arguments)},y=m.prototype;for(var w in p){var b=p[w];if(null!=g[w])return a(w);y[w]=b}for(var x in g)y[x]=g[x];p.clientFunctions.forEach((function(e){y[e]=y[e]||function(){me("Renderer does not implement `renderer."+e+"()` on its prototype")}})),r=m}else if("__proto__"===e||"constructor"===e||"prototype"===e)return me(e+" is an illegal type to be registered, possibly lead to prototype pollutions");return q({map:ol,keys:[e,t],value:r})}function ul(e,t){return W({map:ol,keys:[e,t]})}function cl(e,t,n,r,a){return q({map:sl,keys:[e,t,n,r],value:a})}function dl(e,t,n,r){return W({map:sl,keys:[e,t,n,r]})}var fl=function(){return 2===arguments.length?ul.apply(null,arguments):3===arguments.length?ll.apply(null,arguments):4===arguments.length?dl.apply(null,arguments):5===arguments.length?cl.apply(null,arguments):void me("Invalid extension access syntax")};Zi.prototype.extension=fl,il.forEach((function(e){e.extensions.forEach((function(t){ll(e.type,t.name,t.impl)}))}));var hl=function e(){if(!(this instanceof e))return new e;this.length=0},pl=hl.prototype;pl.instanceString=function(){return"stylesheet"},pl.selector=function(e){return this[this.length++]={selector:e,properties:[]},this},pl.css=function(e,t){var n=this.length-1;if(_(e))this[n].properties.push({name:e,value:t});else if(C(e))for(var r=e,a=Object.keys(r),i=0;i<a.length;i++){var o=a[i],s=r[o];if(null!=s){var l=Wi.properties[o]||Wi.properties[N(o)];if(null!=l){var u=l.name,c=s;this[n].properties.push({name:u,value:c})}}}return this},pl.style=pl.css,pl.generateStyle=function(e){var t=new Wi(e);return this.appendToStyle(t)},pl.appendToStyle=function(e){for(var t=0;t<this.length;t++){var n=this[t],r=n.selector,a=n.properties;e.selector(r);for(var i=0;i<a.length;i++){var o=a[i];e.css(o.name,o.value)}}return e};var vl=function(e){return void 0===e&&(e={}),C(e)?new Zi(e):_(e)?fl.apply(fl,arguments):void 0};vl.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(vl),e.apply(null,t),this},vl.warnings=function(e){return ye(e)},vl.version="3.21.0",vl.stylesheet=vl.Stylesheet=hl,e.exports=vl},46506:(e,t,n)=>{e.exports={graphlib:n(71310),layout:n(42529),debug:n(5512),util:{time:n(8783).time,notime:n(8783).notime},version:n(57589)}},85247:(e,t,n)=>{"use strict";var r=n(43294),a=n(38757);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?a(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},a={};function i(o){r.has(a,o)||(a[o]=!0,n[o]=!0,r.forEach(e.outEdges(o),(function(e){r.has(n,e.w)?t.push(e):i(e.w)})),delete n[o])}return r.forEach(e.nodes(),i),t}(e);r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))},undo:function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}}},49654:(e,t,n)=>{var r=n(43294),a=n(8783);function i(e,t,n,r,i,o){var s={width:0,height:0,rank:o,borderType:t},l=i[t][o-1],u=a.addDummyNode(e,"border",s,n);i[t][o]=u,e.setParent(u,r),l&&e.setEdge(l,u,{weight:1})}e.exports=function(e){r.forEach(e.children(),(function t(n){var a=e.children(n),o=e.node(n);if(a.length&&r.forEach(a,t),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,l=o.maxRank+1;s<l;++s)i(e,"borderLeft","_bl",n,o,s),i(e,"borderRight","_br",n,o,s)}}))}},25128:(e,t,n)=>{"use strict";var r=n(43294);function a(e){r.forEach(e.nodes(),(function(t){i(e.node(t))})),r.forEach(e.edges(),(function(t){i(e.edge(t))}))}function i(e){var t=e.width;e.width=e.height,e.height=t}function o(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||a(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),(function(t){o(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(e);"lr"!==t&&"rl"!==t||(!function(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(e),a(e))}}},65199:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},5512:(e,t,n)=>{var r=n(43294),a=n(8783),i=n(71310).Graph;e.exports={debugOrdering:function(e){var t=a.buildLayerMatrix(e),n=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var a="layer"+t;n.setNode(a,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}}},71310:(e,t,n)=>{var r;try{r=n(87377)}catch(a){}r||(r=window.graphlib),e.exports=r},38757:(e,t,n)=>{var r=n(43294),a=n(71310).Graph,i=n(65199);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new a,o=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,a=t(e),i=r+a;n.setEdge(e.v,e.w,i),s=Math.max(s,n.node(e.v).out+=a),o=Math.max(o,n.node(e.w).in+=a)}));var u=r.range(s+o+3).map((function(){return new i})),c=o+1;return r.forEach(n.nodes(),(function(e){l(u,c,n.node(e))})),{graph:n,buckets:u,zeroIdx:c}}(e,t||o),u=function(e,t,n){var r,a=[],i=t[t.length-1],o=t[0];for(;e.nodeCount();){for(;r=o.dequeue();)s(e,t,n,r);for(;r=i.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var l=t.length-2;l>0;--l)if(r=t[l].dequeue()){a=a.concat(s(e,t,n,r,!0));break}}return a}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(t){return e.outEdges(t.v,t.w)})),!0)};var o=r.constant(1);function s(e,t,n,a,i){var o=i?[]:void 0;return r.forEach(e.inEdges(a.v),(function(r){var a=e.edge(r),s=e.node(r.v);i&&o.push({v:r.v,w:r.w}),s.out-=a,l(t,n,s)})),r.forEach(e.outEdges(a.v),(function(r){var a=e.edge(r),i=r.w,o=e.node(i);o.in-=a,l(t,n,o)})),e.removeNode(a.v),o}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},42529:(e,t,n)=>{"use strict";var r=n(43294),a=n(85247),i=n(20450),o=n(64618),s=n(8783).normalizeRanks,l=n(77908),u=n(8783).removeEmptyRanks,c=n(96820),d=n(49654),f=n(25128),h=n(73641),p=n(65784),v=n(8783),g=n(71310).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=S(e.graph());return t.setGraph(r.merge({},y,C(n,m),r.pick(n,w))),r.forEach(e.nodes(),(function(n){var a=S(e.node(n));t.setNode(n,r.defaults(C(a,b),x)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var a=S(e.edge(n));t.setEdge(n,r.merge({},E,C(a,_),r.pick(a,k)))})),t}(e)}));n(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){a.run(e)})),t(" nestingGraph.run",(function(){c.run(e)})),t(" rank",(function(){o(v.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),a={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",a,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){u(e)})),t(" nestingGraph.cleanup",(function(){c.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;r.forEach(e.nodes(),(function(n){var a=e.node(n);a.borderTop&&(a.minRank=e.node(a.borderTop).rank,a.maxRank=e.node(a.borderBottom).rank,t=r.max(t,a.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){i.run(e)})),t(" parentDummyChains",(function(){l(e)})),t(" addBorderSegments",(function(){d(e)})),t(" order",(function(){h(e)})),t(" insertSelfEdges",(function(){!function(e){var t=v.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,a){var i=e.node(t);i.order=a+n,r.forEach(i.selfEdges,(function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:a+ ++n,e:t.e,label:t.label},"_se")})),delete i.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){f.adjust(e)})),t(" position",(function(){p(e)})),t(" positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),a=r.x+r.width/2,i=r.y,o=n.x-a,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:a+2*o/3,y:i-s},{x:a+5*o/6,y:i-s},{x:a+o,y:i},{x:a+5*o/6,y:i+s},{x:a+2*o/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),a=e.node(n.borderTop),i=e.node(n.borderBottom),o=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(i.y-a.y),n.x=o.x+n.width/2,n.y=a.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){i.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){f.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,a=Number.POSITIVE_INFINITY,i=0,o=e.graph(),s=o.marginx||0,l=o.marginy||0;function u(e){var r=e.x,o=e.y,s=e.width,l=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),a=Math.min(a,o-l/2),i=Math.max(i,o+l/2)}r.forEach(e.nodes(),(function(t){u(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&u(n)})),t-=s,a-=l,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=a})),r.forEach(e.edges(),(function(n){var i=e.edge(n);r.forEach(i.points,(function(e){e.x-=t,e.y-=a})),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=a)})),o.width=n-t+s,o.height=i-a+l}(e)})),t(" assignNodeIntersects",(function(){!function(e){r.forEach(e.edges(),(function(t){var n,r,a=e.edge(t),i=e.node(t.v),o=e.node(t.w);a.points?(n=a.points[0],r=a.points[a.points.length-1]):(a.points=[],n=o,r=i),a.points.unshift(v.intersectRect(i,n)),a.points.push(v.intersectRect(o,r))}))}(e)})),t(" reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){a.undo(e)}))}(t,n)})),n(" updateInputGraph",(function(){!function(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),a=t.node(n);r&&(r.x=a.x,r.y=a.y,t.children(n).length&&(r.width=a.width,r.height=a.height))})),r.forEach(e.edges(),(function(n){var a=e.edge(n),i=t.edge(n);a.points=i.points,r.has(i,"x")&&(a.x=i.x,a.y=i.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],b=["width","height"],x={width:0,height:0},_=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function C(e,t){return r.mapValues(r.pick(e,t),Number)}function S(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},43294:(e,t,n)=>{var r;try{r={cloneDeep:n(9850),constant:n(86874),defaults:n(84573),each:n(79421),filter:n(90882),find:n(55281),flatten:n(35676),forEach:n(59756),forIn:n(20792),has:n(93352),isUndefined:n(84336),last:n(56974),map:n(16760),mapValues:n(34519),max:n(71644),merge:n(98537),min:n(65680),minBy:n(10937),now:n(61100),pick:n(13888),range:n(2689),reduce:n(58215),sortBy:n(829),uniqueId:n(74930),values:n(98346),zipObject:n(46150)}}catch(a){}r||(r=window._),e.exports=r},96820:(e,t,n)=>{var r=n(43294),a=n(8783);function i(e,t,n,o,s,l,u){var c=e.children(u);if(c.length){var d=a.addBorderNode(e,"_bt"),f=a.addBorderNode(e,"_bb"),h=e.node(u);e.setParent(d,u),h.borderTop=d,e.setParent(f,u),h.borderBottom=f,r.forEach(c,(function(r){i(e,t,n,o,s,l,r);var a=e.node(r),c=a.borderTop?a.borderTop:r,h=a.borderBottom?a.borderBottom:r,p=a.borderTop?o:2*o,v=c!==h?1:s-l[u]+1;e.setEdge(d,c,{weight:p,minlen:v,nestingEdge:!0}),e.setEdge(h,f,{weight:p,minlen:v,nestingEdge:!0})})),e.parent(u)||e.setEdge(t,d,{weight:0,minlen:s+l[u]})}else u!==t&&e.setEdge(t,u,{weight:0,minlen:n})}e.exports={run:function(e){var t=a.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(a,i){var o=e.children(a);o&&o.length&&r.forEach(o,(function(e){n(e,i+1)})),t[a]=i}return r.forEach(e.children(),(function(e){n(e,1)})),t}(e),o=r.max(r.values(n))-1,s=2*o+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=s}));var l=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(r){i(e,t,s,l,o,n,r)})),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},20450:(e,t,n)=>{"use strict";var r=n(43294),a=n(8783);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,i,o=t.v,s=e.node(o).rank,l=t.w,u=e.node(l).rank,c=t.name,d=e.edge(t),f=d.labelRank;if(u===s+1)return;for(e.removeEdge(t),i=0,++s;s<u;++i,++s)d.points=[],r={width:0,height:0,edgeLabel:d,edgeObj:t,rank:s},n=a.addDummyNode(e,"edge",r,"_d"),s===f&&(r.width=d.width,r.height=d.height,r.dummy="edge-label",r.labelpos=d.labelpos),e.setEdge(o,n,{weight:d.weight},c),0===i&&e.graph().dummyChains.push(n),o=n;e.setEdge(o,l,{weight:d.weight},c)}(e,t)}))},undo:function(e){r.forEach(e.graph().dummyChains,(function(t){var n,r=e.node(t),a=r.edgeLabel;for(e.setEdge(r.edgeObj,a);r.dummy;)n=e.successors(t)[0],e.removeNode(t),a.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(a.x=r.x,a.y=r.y,a.width=r.width,a.height=r.height),t=n,r=e.node(t)}))}}},47897:(e,t,n)=>{var r=n(43294);e.exports=function(e,t,n){var a,i={};r.forEach(n,(function(n){for(var r,o,s=e.parent(n);s;){if((r=e.parent(s))?(o=i[r],i[r]=s):(o=a,a=s),o&&o!==s)return void t.setEdge(o,s);s=r}}))}},29533:(e,t,n)=>{var r=n(43294);e.exports=function(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var a=r.reduce(n,(function(t,n){var r=e.edge(n),a=e.node(n.v);return{sum:t.sum+r.weight*a.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:a.sum/a.weight,weight:a.weight}}return{v:t}}))}},64622:(e,t,n)=>{var r=n(43294),a=n(71310).Graph;e.exports=function(e,t,n){var i=function(e){var t;for(;e.hasNode(t=r.uniqueId("_root")););return t}(e),o=new a({compound:!0}).setGraph({root:i}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(a){var s=e.node(a),l=e.parent(a);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(o.setNode(a),o.setParent(a,l||i),r.forEach(e[n](a),(function(t){var n=t.v===a?t.w:t.v,i=o.edge(n,a),s=r.isUndefined(i)?0:i.weight;o.setEdge(n,a,{weight:e.edge(t).weight+s})})),r.has(s,"minRank")&&o.setNode(a,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))})),o}},6254:(e,t,n)=>{"use strict";var r=n(43294);function a(e,t,n){for(var a=r.zipObject(n,r.map(n,(function(e,t){return t}))),i=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:a[t.w],weight:e.edge(t).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var l=r.map(new Array(s),(function(){return 0})),u=0;return r.forEach(i.forEach((function(e){var t=e.pos+o;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;u+=e.weight*n}))),u}e.exports=function(e,t){for(var n=0,r=1;r<t.length;++r)n+=a(e,t[r-1],t[r]);return n}},73641:(e,t,n)=>{"use strict";var r=n(43294),a=n(65036),i=n(6254),o=n(83956),s=n(64622),l=n(47897),u=n(71310).Graph,c=n(8783);function d(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function f(e,t){var n=new u;r.forEach(e,(function(e){var a=e.graph().root,i=o(e,a,n,t);r.forEach(i.vs,(function(t,n){e.node(t).order=n})),l(e,n,i.vs)}))}function h(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}e.exports=function(e){var t=c.maxRank(e),n=d(e,r.range(1,t+1),"inEdges"),o=d(e,r.range(t-1,-1,-1),"outEdges"),s=a(e);h(e,s);for(var l,u=Number.POSITIVE_INFINITY,p=0,v=0;v<4;++p,++v){f(p%2?n:o,p%4>=2),s=c.buildLayerMatrix(e);var g=i(e,s);g<u&&(v=0,l=r.cloneDeep(s),u=g)}h(e,l)}},65036:(e,t,n)=>{"use strict";var r=n(43294);e.exports=function(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),a=r.max(r.map(n,(function(t){return e.node(t).rank}))),i=r.map(r.range(a+1),(function(){return[]}));var o=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(o,(function n(a){if(r.has(t,a))return;t[a]=!0;var o=e.node(a);i[o.rank].push(a),r.forEach(e.successors(a),n)})),i}},39953:(e,t,n)=>{"use strict";var r=n(43294);e.exports=function(e,t){var n={};return r.forEach(e,(function(e,t){var a=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(a.barycenter=e.barycenter,a.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],a=n[e.w];r.isUndefined(t)||r.isUndefined(a)||(a.indegree++,t.out.push(n[e.w]))})),function(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function a(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,a(i))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(e){return!e.indegree})))}},83956:(e,t,n)=>{var r=n(43294),a=n(29533),i=n(39953),o=n(11957);e.exports=function e(t,n,s,l){var u=t.children(n),c=t.node(n),d=c?c.borderLeft:void 0,f=c?c.borderRight:void 0,h={};d&&(u=r.filter(u,(function(e){return e!==d&&e!==f})));var p=a(t,u);r.forEach(p,(function(n){if(t.children(n.v).length){var a=e(t,n.v,s,l);h[n.v]=a,r.has(a,"barycenter")&&(i=n,o=a,r.isUndefined(i.barycenter)?(i.barycenter=o.barycenter,i.weight=o.weight):(i.barycenter=(i.barycenter*i.weight+o.barycenter*o.weight)/(i.weight+o.weight),i.weight+=o.weight))}var i,o}));var v=i(p,s);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(v,h);var g=o(v,l);if(d&&(g.vs=r.flatten([d,g.vs,f],!0),t.predecessors(d).length)){var m=t.node(t.predecessors(d)[0]),y=t.node(t.predecessors(f)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+m.order+y.order)/(g.weight+2),g.weight+=2}return g}},11957:(e,t,n)=>{var r=n(43294),a=n(8783);function i(e,t,n){for(var a;t.length&&(a=r.last(t)).i<=n;)t.pop(),e.push(a.vs),n++;return n}e.exports=function(e,t){var n=a.partition(e,(function(e){return r.has(e,"barycenter")})),o=n.lhs,s=r.sortBy(n.rhs,(function(e){return-e.i})),l=[],u=0,c=0,d=0;o.sort((f=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:f?t.i-e.i:e.i-t.i})),d=i(l,s,d),r.forEach(o,(function(e){d+=e.vs.length,l.push(e.vs),u+=e.barycenter*e.weight,c+=e.weight,d=i(l,s,d)}));var f;var h={vs:r.flatten(l,!0)};c&&(h.barycenter=u/c,h.weight=c);return h}},77908:(e,t,n)=>{var r=n(43294);e.exports=function(e){var t=function(e){var t={},n=0;function a(i){var o=n;r.forEach(e.children(i),a),t[i]={low:o,lim:n++}}return r.forEach(e.children(),a),t}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),a=r.edgeObj,i=function(e,t,n,r){var a,i,o=[],s=[],l=Math.min(t[n].low,t[r].low),u=Math.max(t[n].lim,t[r].lim);a=n;do{a=e.parent(a),o.push(a)}while(a&&(t[a].low>l||u>t[a].lim));i=a,a=r;for(;(a=e.parent(a))!==i;)s.push(a);return{path:o.concat(s.reverse()),lca:i}}(e,t,a.v,a.w),o=i.path,s=i.lca,l=0,u=o[l],c=!0;n!==a.w;){if(r=e.node(n),c){for(;(u=o[l])!==s&&e.node(u).maxRank<r.rank;)l++;u===s&&(c=!1)}if(!c){for(;l<o.length-1&&e.node(u=o[l+1]).minRank<=r.rank;)l++;u=o[l]}e.setParent(n,u),n=e.successors(n)[0]}}))}},91753:(e,t,n)=>{"use strict";var r=n(43294),a=n(71310).Graph,i=n(8783);function o(e,t){var n={};return r.reduce(t,(function(t,a){var i=0,o=0,s=t.length,u=r.last(a);return r.forEach(a,(function(t,c){var d=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),f=d?e.node(d).order:s;(d||t===u)&&(r.forEach(a.slice(o,c+1),(function(t){r.forEach(e.predecessors(t),(function(r){var a=e.node(r),o=a.order;!(o<i||f<o)||a.dummy&&e.node(t).dummy||l(n,r,t)}))})),o=c+1,i=f)})),a})),n}function s(e,t){var n={};function a(t,a,i,o,s){var u;r.forEach(r.range(a,i),(function(a){u=t[a],e.node(u).dummy&&r.forEach(e.predecessors(u),(function(t){var r=e.node(t);r.dummy&&(r.order<o||r.order>s)&&l(n,t,u)}))}))}return r.reduce(t,(function(t,n){var i,o=-1,s=0;return r.forEach(n,(function(r,l){if("border"===e.node(r).dummy){var u=e.predecessors(r);u.length&&(i=e.node(u[0]).order,a(n,s,l,o,i),s=l,o=i)}a(n,s,n.length,i,t.length)})),n})),n}function l(e,t,n){if(t>n){var r=t;t=n,n=r}var a=e[t];a||(e[t]=a={}),a[n]=!0}function u(e,t,n){if(t>n){var a=t;t=n,n=a}return r.has(e[t],n)}function c(e,t,n,a){var i={},o={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){i[e]=e,o[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var l=a(e);if(l.length){l=r.sortBy(l,(function(e){return s[e]}));for(var c=(l.length-1)/2,d=Math.floor(c),f=Math.ceil(c);d<=f;++d){var h=l[d];o[e]===e&&t<s[h]&&!u(n,e,h)&&(o[h]=e,o[e]=i[e]=i[h],t=s[h])}}}))})),{root:i,align:o}}function d(e,t,n,i,o){var s={},l=function(e,t,n,i){var o=new a,s=e.graph(),l=function(e,t,n){return function(a,i,o){var s,l=a.node(i),u=a.node(o),c=0;if(c+=l.width/2,r.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=-l.width/2;break;case"r":s=l.width/2}if(s&&(c+=n?s:-s),s=0,c+=(l.dummy?t:e)/2,c+=(u.dummy?t:e)/2,c+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(c+=n?s:-s),s=0,c}}(s.nodesep,s.edgesep,i);return r.forEach(t,(function(t){var a;r.forEach(t,(function(t){var r=n[t];if(o.setNode(r),a){var i=n[a],s=o.edge(i,r);o.setEdge(i,r,Math.max(l(e,t,a),s||0))}a=t}))})),o}(e,t,n,o),u=o?"borderLeft":"borderRight";function c(e,t){for(var n=l.nodes(),r=n.pop(),a={};r;)a[r]?e(r):(a[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return c((function(e){s[e]=l.inEdges(e).reduce((function(e,t){return Math.max(e,s[t.v]+l.edge(t))}),0)}),l.predecessors.bind(l)),c((function(t){var n=l.outEdges(t).reduce((function(e,t){return Math.min(e,s[t.w]-l.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[t]=Math.max(s[t],n))}),l.successors.bind(l)),r.forEach(i,(function(e){s[e]=s[n[e]]})),s}function f(e,t){return r.minBy(r.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return r.forIn(t,(function(t,r){var i=function(e,t){return e.node(t).width}(e,r)/2;n=Math.max(t+i,n),a=Math.min(t-i,a)})),n-a}))}function h(e,t){var n=r.values(t),a=r.min(n),i=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,l=n+o,u=e[l];if(u!==t){var c=r.values(u);(s="l"===o?a-r.min(c):i-r.max(c))&&(e[l]=r.mapValues(u,(function(e){return e+s})))}}))}))}function p(e,t){return r.mapValues(e.ul,(function(n,a){if(t)return e[t.toLowerCase()][a];var i=r.sortBy(r.map(e,a));return(i[1]+i[2])/2}))}e.exports={positionX:function(e){var t,n=i.buildLayerMatrix(e),a=r.merge(o(e,n),s(e,n)),l={};r.forEach(["u","d"],(function(i){t="u"===i?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(t=r.map(t,(function(e){return r.values(e).reverse()})));var o=("u"===i?e.predecessors:e.successors).bind(e),s=c(e,t,a,o),u=d(e,t,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,(function(e){return-e}))),l[i+n]=u}))}));var u=f(e,l);return h(l,u),p(l,e.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:l,hasConflict:u,verticalAlignment:c,horizontalCompaction:d,alignCoordinates:h,findSmallestWidthAlignment:f,balance:p}},65784:(e,t,n)=>{"use strict";var r=n(43294),a=n(8783),i=n(91753).positionX;e.exports=function(e){(function(e){var t=a.buildLayerMatrix(e),n=e.graph().ranksep,i=0;r.forEach(t,(function(t){var a=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=i+a/2})),i+=a+n}))})(e=a.asNonCompoundGraph(e)),r.forEach(i(e),(function(t,n){e.node(n).x=t}))}},49154:(e,t,n)=>{"use strict";var r=n(43294),a=n(71310).Graph,i=n(85986).slack;function o(e,t){return r.forEach(e.nodes(),(function n(a){r.forEach(t.nodeEdges(a),(function(r){var o=r.v,s=a===o?r.w:o;e.hasNode(s)||i(t,r)||(e.setNode(s,{}),e.setEdge(a,s,{}),n(s))}))})),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)}))}function l(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,r=new a({directed:!1}),u=e.nodes()[0],c=e.nodeCount();r.setNode(u,{});for(;o(r,e)<c;)t=s(r,e),n=r.hasNode(t.v)?i(e,t):-i(e,t),l(r,e,n);return r}},64618:(e,t,n)=>{"use strict";var r=n(85986).longestPath,a=n(49154),i=n(57310);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:s(e);break;case"tight-tree":!function(e){r(e),a(e)}(e);break;case"longest-path":o(e)}};var o=r;function s(e){i(e)}},57310:(e,t,n)=>{"use strict";var r=n(43294),a=n(49154),i=n(85986).slack,o=n(85986).longestPath,s=n(71310).alg.preorder,l=n(71310).alg.postorder,u=n(8783).simplify;function c(e){e=u(e),o(e);var t,n=a(e);for(h(n),d(n,e);t=v(n);)m(n,e,t,g(n,e,t))}function d(e,t){var n=l(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=f(e,t,n)}(e,t,n)}))}function f(e,t,n){var a=e.node(n).parent,i=!0,o=t.edge(n,a),s=0;return o||(i=!1,o=t.edge(a,n)),s=o.weight,r.forEach(t.nodeEdges(n),(function(r){var o,l,u=r.v===n,c=u?r.w:r.v;if(c!==a){var d=u===i,f=t.edge(r).weight;if(s+=d?f:-f,o=n,l=c,e.hasEdge(o,l)){var h=e.edge(n,c).cutvalue;s+=d?-h:h}}})),s}function h(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,a,i){var o=n,s=e.node(a);return t[a]=!0,r.forEach(e.neighbors(a),(function(i){r.has(t,i)||(n=p(e,t,n,i,a))})),s.low=o,s.lim=n++,i?s.parent=i:delete s.parent,n}function v(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function g(e,t,n){var a=n.v,o=n.w;t.hasEdge(a,o)||(a=n.w,o=n.v);var s=e.node(a),l=e.node(o),u=s,c=!1;s.lim>l.lim&&(u=l,c=!0);var d=r.filter(t.edges(),(function(t){return c===y(e,e.node(t.v),u)&&c!==y(e,e.node(t.w),u)}));return r.minBy(d,(function(e){return i(t,e)}))}function m(e,t,n,a){var i=n.v,o=n.w;e.removeEdge(i,o),e.setEdge(a.v,a.w,{}),h(e),d(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),a=s(e,n);a=a.slice(1),r.forEach(a,(function(n){var r=e.node(n).parent,a=t.edge(n,r),i=!1;a||(a=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?a.minlen:-a.minlen)}))}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=h,c.initCutValues=d,c.calcCutValue=f,c.leaveEdge=v,c.enterEdge=g,c.exchangeEdges=m},85986:(e,t,n)=>{"use strict";var r=n(43294);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(function n(a){var i=e.node(a);if(r.has(t,a))return i.rank;t[a]=!0;var o=r.min(r.map(e.outEdges(a),(function(t){return n(t.w)-e.edge(t).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),i.rank=o}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},8783:(e,t,n)=>{"use strict";var r=n(43294),a=n(71310).Graph;function i(e,t,n,a){var i;do{i=r.uniqueId(a)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function o(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:i,simplify:function(e){var t=(new a).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},a=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+a.weight,minlen:Math.max(r.minlen,a.minlen)})})),t},asNonCompoundGraph:function(e){var t=new a({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,a=e.x,i=e.y,o=t.x-a,s=t.y-i,l=e.width/2,u=e.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*l>Math.abs(o)*u?(s<0&&(u=-u),n=u*o/s,r=u):(o<0&&(l=-l),n=l,r=l*s/o);return{x:a+n,y:i+r}},buildLayerMatrix:function(e){var t=r.map(r.range(o(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var a=e.node(n),i=a.rank;r.isUndefined(i)||(t[i][a.order]=n)})),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var a=e.node(n);r.has(a,"rank")&&(a.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var a=e.node(r).rank-t;n[a]||(n[a]=[]),n[a].push(r)}));var a=0,i=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%i!=0?--a:a&&r.forEach(t,(function(t){e.node(t).rank+=a}))}))},addBorderNode:function(e,t,n,r){var a={width:0,height:0};arguments.length>=4&&(a.rank=n,a.order=r);return i(e,"border",a,t)},maxRank:o,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},57589:e=>{e.exports="0.8.5"},77847:e=>{e.exports=o,o.default=o,o.stable=c,o.stableStringify=c;var t="[...]",n="[Circular]",r=[],a=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function o(e,t,n,o){var s;void 0===o&&(o=i()),l(e,"",0,[],void 0,0,o);try{s=0===a.length?JSON.stringify(e,t,n):JSON.stringify(e,f(t),n)}catch(c){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var u=r.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function s(e,t,n,i){var o=Object.getOwnPropertyDescriptor(i,n);void 0!==o.get?o.configurable?(Object.defineProperty(i,n,{value:e}),r.push([i,n,t,o])):a.push([t,n,e]):(i[n]=e,r.push([i,n,t]))}function l(e,r,a,i,o,u,c){var d;if(u+=1,"object"==typeof e&&null!==e){for(d=0;d<i.length;d++)if(i[d]===e)return void s(n,e,r,o);if(void 0!==c.depthLimit&&u>c.depthLimit)return void s(t,e,r,o);if(void 0!==c.edgesLimit&&a+1>c.edgesLimit)return void s(t,e,r,o);if(i.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,i,e,u,c);else{var f=Object.keys(e);for(d=0;d<f.length;d++){var h=f[d];l(e[h],h,d,i,e,u,c)}}i.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function c(e,t,n,o){void 0===o&&(o=i());var s,l=d(e,"",0,[],void 0,0,o)||e;try{s=0===a.length?JSON.stringify(l,t,n):JSON.stringify(l,f(t),n)}catch(c){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var u=r.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function d(e,a,i,o,l,c,f){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;h<o.length;h++)if(o[h]===e)return void s(n,e,a,l);try{if("function"==typeof e.toJSON)return}catch(m){return}if(void 0!==f.depthLimit&&c>f.depthLimit)return void s(t,e,a,l);if(void 0!==f.edgesLimit&&i+1>f.edgesLimit)return void s(t,e,a,l);if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)d(e[h],h,h,o,e,c,f);else{var p={},v=Object.keys(e).sort(u);for(h=0;h<v.length;h++){var g=v[h];d(e[g],g,h,o,e,c,f),p[g]=e[g]}if(void 0===l)return p;r.push([l,a,e]),l[a]=p}o.pop()}}function f(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(a.length>0)for(var r=0;r<a.length;r++){var i=a[r];if(i[1]===t&&i[0]===n){n=i[2],a.splice(r,1);break}}return e.call(this,t,n)}}},87377:(e,t,n)=>{var r=n(89);e.exports={Graph:r.Graph,json:n(80109),alg:n(577),version:r.version}},95189:(e,t,n)=>{var r=n(60274);e.exports=function(e){var t,n={},a=[];function i(a){r.has(n,a)||(n[a]=!0,t.push(a),r.each(e.successors(a),i),r.each(e.predecessors(a),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&a.push(t)})),a}},70223:(e,t,n)=>{var r=n(60274);function a(e,t,n,i,o,s){r.has(i,t)||(i[t]=!0,n||s.push(t),r.each(o(t),(function(t){a(e,t,n,i,o,s)})),n&&s.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);a(e,t,"post"===n,s,i,o)})),o}},19487:(e,t,n)=>{var r=n(16493),a=n(60274);e.exports=function(e,t,n){return a.transform(e.nodes(),(function(a,i){a[i]=r(e,i,t,n)}),{})}},16493:(e,t,n)=>{var r=n(60274),a=n(70905);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,o,s={},l=new a,u=function(e){var t=e.v!==i?e.v:e.w,r=s[t],a=n(e),u=o.distance+a;if(a<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+a);u<r.distance&&(r.distance=u,r.predecessor=i,l.decrease(t,u))};e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},l.add(e,n)}));for(;l.size()>0&&(i=l.removeMin(),(o=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(u);return s}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},24395:(e,t,n)=>{var r=n(60274),a=n(99289);e.exports=function(e){return r.filter(a(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},92077:(e,t,n)=>{var r=n(60274);e.exports=function(e,t,n){return function(e,t,n){var r={},a=e.nodes();return a.forEach((function(e){r[e]={},r[e][e]={distance:0},a.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var a=n.v===e?n.w:n.v,i=t(n);r[e][a]={distance:i,predecessor:e}}))})),a.forEach((function(e){var t=r[e];a.forEach((function(n){var i=r[n];a.forEach((function(n){var r=i[e],a=t[n],o=i[n],s=r.distance+a.distance;s<o.distance&&(o.distance=s,o.predecessor=a.predecessor)}))}))})),r}(e,t||a,n||function(t){return e.outEdges(t)})};var a=r.constant(1)},577:(e,t,n)=>{e.exports={components:n(95189),dijkstra:n(16493),dijkstraAll:n(19487),findCycles:n(24395),floydWarshall:n(92077),isAcyclic:n(67141),postorder:n(34825),preorder:n(78852),prim:n(78492),tarjan:n(99289),topsort:n(69176)}},67141:(e,t,n)=>{var r=n(69176);e.exports=function(e){try{r(e)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},34825:(e,t,n)=>{var r=n(70223);e.exports=function(e,t){return r(e,t,"post")}},78852:(e,t,n)=>{var r=n(70223);e.exports=function(e,t){return r(e,t,"pre")}},78492:(e,t,n)=>{var r=n(60274),a=n(53099),i=n(70905);e.exports=function(e,t){var n,o=new a,s={},l=new i;function u(e){var r=e.v===n?e.w:e.v,a=l.priority(r);if(void 0!==a){var i=t(e);i<a&&(s[r]=n,l.decrease(r,i))}}if(0===e.nodeCount())return o;r.each(e.nodes(),(function(e){l.add(e,Number.POSITIVE_INFINITY),o.setNode(e)})),l.decrease(e.nodes()[0],0);var c=!1;for(;l.size()>0;){if(n=l.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(n).forEach(u)}return o}},99289:(e,t,n)=>{var r=n(60274);e.exports=function(e){var t=0,n=[],a={},i=[];function o(s){var l=a[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(a,e)?a[e].onStack&&(l.lowlink=Math.min(l.lowlink,a[e].index)):(o(e),l.lowlink=Math.min(l.lowlink,a[e].lowlink))})),l.lowlink===l.index){var u,c=[];do{u=n.pop(),a[u].onStack=!1,c.push(u)}while(s!==u);i.push(c)}}return e.nodes().forEach((function(e){r.has(a,e)||o(e)})),i}},69176:(e,t,n)=>{var r=n(60274);function a(e){var t={},n={},a=[];if(r.each(e.sinks(),(function o(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),o),delete n[s],a.push(s))})),r.size(t)!==e.nodeCount())throw new i;return a}function i(){}e.exports=a,a.CycleException=i,i.prototype=new Error},70905:(e,t,n)=>{var r=n(60274);function a(){this._arr=[],this._keyIndices={}}e.exports=a,a.prototype.size=function(){return this._arr.length},a.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},a.prototype.has=function(e){return r.has(this._keyIndices,e)},a.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},a.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var a=this._arr,i=a.length;return n[e]=i,a.push({key:e,priority:t}),this._decrease(i),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},a.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},a.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,a=e;n<t.length&&(a=t[n].priority<t[a].priority?n:a,r<t.length&&(a=t[r].priority<t[a].priority?r:a),a!==e&&(this._swap(e,a),this._heapify(a)))},a.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},a.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,a=n[e],i=n[t];n[e]=i,n[t]=a,r[i.key]=e,r[a.key]=t}},53099:(e,t,n)=>{"use strict";var r=n(60274);e.exports=i;var a="\0";function i(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function l(e,t,n,a){var i=""+t,o=""+n;if(!e&&i>o){var s=i;i=o,o=s}return i+"\x01"+o+"\x01"+(r.isUndefined(a)?"\0":a)}function u(e,t,n,r){var a=""+t,i=""+n;if(!e&&a>i){var o=a;a=i,i=o}var s={v:a,w:i};return r&&(s.name=r),s}function c(e,t){return l(e,t.v,t.w,t.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(e){return this._label=e,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},i.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},i.prototype.setNodes=function(e,t){var n=arguments,a=this;return r.each(e,(function(e){n.length>1?a.setNode(e,t):a.setNode(e)})),this},i.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},i.prototype.node=function(e){return this._nodes[e]},i.prototype.hasNode=function(e){return r.has(this._nodes,e)},i.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},i.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=a;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},i.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},i.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}},i.prototype.children=function(e){if(r.isUndefined(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}},i.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},i.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},i.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},i.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},i.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var a={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(a[e]=r,r):r in a?a[r]:i(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,i(e))})),t},i.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(e,t){var n=this,a=arguments;return r.reduce(e,(function(e,r){return a.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},i.prototype.setEdge=function(){var e,t,n,a,i=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(a=arguments[1],i=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var c=l(this._isDirected,e,t,n);if(r.has(this._edgeLabels,c))return i&&(this._edgeLabels[c]=a),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[c]=i?a:this._defaultEdgeLabelFn(e,t,n);var d=u(this._isDirected,e,t,n);return e=d.v,t=d.w,Object.freeze(d),this._edgeObjs[c]=d,o(this._preds[t],e),o(this._sucs[e],t),this._in[t][c]=d,this._out[e][c]=d,this._edgeCount++,this},i.prototype.edge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(e,t,n){var a=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return r.has(this._edgeLabels,a)},i.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),a=this._edgeObjs[r];return a&&(e=a.v,t=a.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},i.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var a=r.values(n);return t?r.filter(a,(function(e){return e.v===t})):a}},i.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var a=r.values(n);return t?r.filter(a,(function(e){return e.w===t})):a}},i.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},89:(e,t,n)=>{e.exports={Graph:n(53099),version:n(90702)}},80109:(e,t,n)=>{var r=n(60274),a=n(53099);function i(e){return r.map(e.nodes(),(function(t){var n=e.node(t),a=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(a)||(i.parent=a),i}))}function o(e){return r.map(e.edges(),(function(t){var n=e.edge(t),a={v:t.v,w:t.w};return r.isUndefined(t.name)||(a.name=t.name),r.isUndefined(n)||(a.value=n),a}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:o(e)};r.isUndefined(e.graph())||(t.value=r.clone(e.graph()));return t},read:function(e){var t=new a(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},60274:(e,t,n)=>{var r;try{r={clone:n(54004),constant:n(86874),each:n(79421),filter:n(90882),has:n(93352),isArray:n(86152),isEmpty:n(45455),isFunction:n(61049),isUndefined:n(84336),keys:n(90249),map:n(16760),reduce:n(58215),size:n(36402),transform:n(89466),union:n(26139),values:n(98346)}}catch(a){}r||(r=window._),e.exports=r},90702:e=>{e.exports="2.1.8"},71254:(e,t,n)=>{e.exports=n(38397)},38397:function(e,t){var n,r,a;(function(){var i,o,s,l,u,c,d,f,h,p,v,g,m,y,w;s=Math.floor,p=Math.min,o=function(e,t){return e<t?-1:e>t?1:0},h=function(e,t,n,r,a){var i;if(null==n&&(n=0),null==a&&(a=o),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);n<r;)a(t,e[i=s((n+r)/2)])<0?r=i:n=i+1;return[].splice.apply(e,[n,n-n].concat(t)),t},c=function(e,t,n){return null==n&&(n=o),e.push(t),y(e,0,e.length-1,n)},u=function(e,t){var n,r;return null==t&&(t=o),n=e.pop(),e.length?(r=e[0],e[0]=n,w(e,0,t)):r=n,r},f=function(e,t,n){var r;return null==n&&(n=o),r=e[0],e[0]=t,w(e,0,n),r},d=function(e,t,n){var r;return null==n&&(n=o),e.length&&n(e[0],t)<0&&(t=(r=[e[0],t])[0],e[0]=r[1],w(e,0,n)),t},l=function(e,t){var n,r,a,i,l,u;for(null==t&&(t=o),i=(function(){u=[];for(var t=0,n=s(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)u.push(t);return u}).apply(this).reverse(),l=[],r=0,a=i.length;r<a;r++)n=i[r],l.push(w(e,n,t));return l},m=function(e,t,n){var r;if(null==n&&(n=o),-1!==(r=e.indexOf(t)))return y(e,0,r,n),w(e,r,n)},v=function(e,t,n){var r,a,i,s,u;if(null==n&&(n=o),!(a=e.slice(0,t)).length)return a;for(l(a,n),i=0,s=(u=e.slice(t)).length;i<s;i++)r=u[i],d(a,r,n);return a.sort(n).reverse()},g=function(e,t,n){var r,a,i,s,c,d,f,v,g;if(null==n&&(n=o),10*t<=e.length){if(!(i=e.slice(0,t).sort(n)).length)return i;for(a=i[i.length-1],s=0,d=(f=e.slice(t)).length;s<d;s++)n(r=f[s],a)<0&&(h(i,r,0,null,n),i.pop(),a=i[i.length-1]);return i}for(l(e,n),g=[],c=0,v=p(t,e.length);0<=v?c<v:c>v;0<=v?++c:--c)g.push(u(e,n));return g},y=function(e,t,n,r){var a,i,s;for(null==r&&(r=o),a=e[n];n>t&&r(a,i=e[s=n-1>>1])<0;)e[n]=i,n=s;return e[n]=a},w=function(e,t,n){var r,a,i,s,l;for(null==n&&(n=o),a=e.length,l=t,i=e[t],r=2*t+1;r<a;)(s=r+1)<a&&!(n(e[r],e[s])<0)&&(r=s),e[t]=e[r],r=2*(t=r)+1;return e[t]=i,y(e,l,t,n)},i=function(){function e(e){this.cmp=null!=e?e:o,this.nodes=[]}return e.push=c,e.pop=u,e.replace=f,e.pushpop=d,e.heapify=l,e.updateItem=m,e.nlargest=v,e.nsmallest=g,e.prototype.push=function(e){return c(this.nodes,e,this.cmp)},e.prototype.pop=function(){return u(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return f(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return d(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return l(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return m(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),r=[],void 0===(a="function"==typeof(n=function(){return i})?n.apply(t,r):n)||(e.exports=a)}).call(this)},15729:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function a(e){return!!e&&!!e[J]}function i(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===te}(e)||Array.isArray(e)||!!e[Q]||!!e.constructor[Q]||h(e)||p(e))}function o(e){return a(e)||r(23,e),e[J].t}function s(e,t,n){void 0===n&&(n=!1),0===l(e)?(n?Object.keys:ne)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function l(e){var t=e[J];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:p(e)?3:0}function u(e,t){return 2===l(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===l(e)?e.get(t):e[t]}function d(e,t,n){var r=l(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return X&&e instanceof Map}function p(e){return $&&e instanceof Set}function v(e){return e.o||e.t}function g(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=re(e);delete t[J];for(var n=ne(t),r=0;r<n.length;r++){var a=n[r],i=t[a];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function m(e,t){return void 0===t&&(t=!1),w(e)||a(e)||!i(e)||(l(e)>1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&s(e,(function(e,t){return m(t,!0)}),!0)),e}function y(){r(2)}function w(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function b(e){var t=ae[e];return t||r(18,e),t}function x(e,t){ae[e]||(ae[e]=t)}function _(){return W}function E(e,t){t&&(b("Patches"),e.u=[],e.s=[],e.v=t)}function k(e){C(e),e.p.forEach(j),e.p=null}function C(e){e===W&&(W=e.l)}function S(e){return W={p:[],l:W,h:e,m:!0,_:0}}function j(e){var t=e[J];0===t.i||1===t.i?t.j():t.O=!0}function M(e,t){t._=t.p.length;var n=t.p[0],a=void 0!==e&&e!==n;return t.h.g||b("ES5").S(t,e,a),a?(n[J].P&&(k(t),r(4)),i(e)&&(e=R(t,e),t.l||O(t,e)),t.u&&b("Patches").M(n[J].t,e,t.u,t.s)):e=R(t,n,[]),k(t),t.u&&t.v(t.u,t.s),e!==Z?e:void 0}function R(e,t,n){if(w(t))return t;var r=t[J];if(!r)return s(t,(function(a,i){return P(e,r,t,a,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return O(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var a=4===r.i||5===r.i?r.o=g(r.k):r.o;s(3===r.i?new Set(a):a,(function(t,i){return P(e,r,a,t,i,n)})),O(e,a,!1),n&&e.u&&b("Patches").R(r,n,e.u,e.s)}return r.o}function P(e,t,n,r,o,s){if(a(o)){var l=R(e,o,s&&t&&3!==t.i&&!u(t.D,r)?s.concat(r):void 0);if(d(n,r,l),!a(l))return;e.m=!1}if(i(o)&&!w(o)){if(!e.h.F&&e._<1)return;R(e,o),t&&t.A.l||O(e,o)}}function O(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&m(t,n)}function z(e,t){var n=e[J];return(n?v(n):e)[t]}function A(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function T(e){e.P||(e.P=!0,e.l&&T(e.l))}function B(e){e.o||(e.o=g(e.t))}function D(e,t,n){var r=h(t)?b("MapSet").N(t,n):p(t)?b("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:_(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},a=r,i=ie;n&&(a=[r],i=oe);var o=Proxy.revocable(a,i),s=o.revoke,l=o.proxy;return r.k=l,r.j=s,l}(t,n):b("ES5").J(t,n);return(n?n.A:_()).p.push(r),r}function N(e){return a(e)||r(22,e),function e(t){if(!i(t))return t;var n,r=t[J],a=l(t);if(r){if(!r.P&&(r.i<4||!b("ES5").K(r)))return r.t;r.I=!0,n=L(t,a),r.I=!1}else n=L(t,a);return s(n,(function(t,a){r&&c(r.t,t)===a||d(n,t,e(a))})),3===a?new Set(n):n}(e)}function L(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return g(e)}function V(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[J];return ie.get(t,e)},set:function(t){var n=this[J];ie.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var a=e[t][J];if(!a.P)switch(a.i){case 5:r(a)&&T(a);break;case 4:n(a)&&T(a)}}}function n(e){for(var t=e.t,n=e.k,r=ne(n),a=r.length-1;a>=0;a--){var i=r[a];if(i!==J){var o=t[i];if(void 0===o&&!u(t,i))return!0;var s=n[i],l=s&&s[J];if(l?l.t!==o:!f(s,o))return!0}}var c=!!t[J];return r.length!==ne(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var i={};x("ES5",{J:function(t,n){var r=Array.isArray(t),a=function(t,n){if(t){for(var r=Array(n.length),a=0;a<n.length;a++)Object.defineProperty(r,""+a,e(a,!0));return r}var i=re(n);delete i[J];for(var o=ne(i),s=0;s<o.length;s++){var l=o[s];i[l]=e(l,t||!!i[l].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(r,t),i={i:r?5:4,A:n?n.A:_(),P:!1,I:!1,D:{},l:n,t,k:a,o:null,O:!1,C:!1};return Object.defineProperty(a,J,{value:i,writable:!0}),a},S:function(e,n,i){i?a(n)&&n[J].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[J];if(n){var a=n.t,i=n.k,o=n.D,l=n.i;if(4===l)s(i,(function(t){t!==J&&(void 0!==a[t]||u(a,t)?o[t]||e(i[t]):(o[t]=!0,T(n)))})),s(a,(function(e){void 0!==i[e]||u(i,e)||(o[e]=!1,T(n))}));else if(5===l){if(r(n)&&(T(n),o.length=!0),i.length<a.length)for(var c=i.length;c<a.length;c++)o[c]=!1;else for(var d=a.length;d<i.length;d++)o[d]=!0;for(var f=Math.min(i.length,a.length),h=0;h<f;h++)i.hasOwnProperty(h)||(o[h]=!0),void 0===o[h]&&e(i[h])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}function I(){function e(t){if(!i(t))return t;if(Array.isArray(t))return t.map(e);if(h(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(p(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return u(t,Q)&&(n[Q]=t[Q]),n}function t(t){return a(t)?e(t):t}var n="add";x("Patches",{$:function(t,a){return a.forEach((function(a){for(var i=a.path,o=a.op,s=t,u=0;u<i.length-1;u++){var d=l(s),f=""+i[u];0!==d&&1!==d||"__proto__"!==f&&"constructor"!==f||r(24),"function"==typeof s&&"prototype"===f&&r(24),"object"!=typeof(s=c(s,f))&&r(15,i.join("/"))}var h=l(s),p=e(a.value),v=i[i.length-1];switch(o){case"replace":switch(h){case 2:return s.set(v,p);case 3:r(16);default:return s[v]=p}case n:switch(h){case 1:return"-"===v?s.push(p):s.splice(v,0,p);case 2:return s.set(v,p);case 3:return s.add(p);default:return s[v]=p}case"remove":switch(h){case 1:return s.splice(v,1);case 2:return s.delete(v);case 3:return s.delete(a.value);default:return delete s[v]}default:r(17,o)}})),t},R:function(e,r,a,i){switch(e.i){case 0:case 4:case 2:return function(e,r,a,i){var o=e.t,l=e.o;s(e.D,(function(e,s){var d=c(o,e),f=c(l,e),h=s?u(o,e)?"replace":n:"remove";if(d!==f||"replace"!==h){var p=r.concat(e);a.push("remove"===h?{op:h,path:p}:{op:h,path:p,value:f}),i.push(h===n?{op:"remove",path:p}:"remove"===h?{op:n,path:p,value:t(d)}:{op:"replace",path:p,value:t(d)})}}))}(e,r,a,i);case 5:case 1:return function(e,r,a,i){var o=e.t,s=e.D,l=e.o;if(l.length<o.length){var u=[l,o];o=u[0],l=u[1];var c=[i,a];a=c[0],i=c[1]}for(var d=0;d<o.length;d++)if(s[d]&&l[d]!==o[d]){var f=r.concat([d]);a.push({op:"replace",path:f,value:t(l[d])}),i.push({op:"replace",path:f,value:t(o[d])})}for(var h=o.length;h<l.length;h++){var p=r.concat([h]);a.push({op:n,path:p,value:t(l[h])})}o.length<l.length&&i.push({op:"replace",path:r.concat(["length"]),value:o.length})}(e,r,a,i);case 3:return function(e,t,r,a){var i=e.t,o=e.o,s=0;i.forEach((function(e){if(!o.has(e)){var i=t.concat([s]);r.push({op:"remove",path:i,value:e}),a.unshift({op:n,path:i,value:e})}s++})),s=0,o.forEach((function(e){if(!i.has(e)){var o=t.concat([s]);r.push({op:n,path:o,value:e}),a.unshift({op:"remove",path:o,value:e})}s++}))}(e,r,a,i)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t===Z?void 0:t}),r.push({op:"replace",path:[],value:e})}})}function H(){function e(e,t){function n(){this.constructor=e}o(e,t),e.prototype=(n.prototype=t.prototype,new n)}function t(e){e.o||(e.D=new Map,e.o=new Map(e.t))}function n(e){e.o||(e.o=new Set,e.t.forEach((function(t){if(i(t)){var n=D(e.A.h,t,e);e.p.set(t,n),e.o.add(n)}else e.o.add(t)})))}function a(e){e.O&&r(3,JSON.stringify(v(e)))}var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},l=function(){function n(e,t){return this[J]={i:2,l:t,A:t?t.A:_(),P:!1,I:!1,o:void 0,D:void 0,t:e,k:this,C:!1,O:!1},this}e(n,Map);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return v(this[J]).size}}),r.has=function(e){return v(this[J]).has(e)},r.set=function(e,n){var r=this[J];return a(r),v(r).has(e)&&v(r).get(e)===n||(t(r),T(r),r.D.set(e,!0),r.o.set(e,n),r.D.set(e,!0)),this},r.delete=function(e){if(!this.has(e))return!1;var n=this[J];return a(n),t(n),T(n),n.t.has(e)?n.D.set(e,!1):n.D.delete(e),n.o.delete(e),!0},r.clear=function(){var e=this[J];a(e),v(e).size&&(t(e),T(e),e.D=new Map,s(e.t,(function(t){e.D.set(t,!1)})),e.o.clear())},r.forEach=function(e,t){var n=this;v(this[J]).forEach((function(r,a){e.call(t,n.get(a),a,n)}))},r.get=function(e){var n=this[J];a(n);var r=v(n).get(e);if(n.I||!i(r))return r;if(r!==n.t.get(e))return r;var o=D(n.A.h,r,n);return t(n),n.o.set(e,o),o},r.keys=function(){return v(this[J]).keys()},r.values=function(){var e,t=this,n=this.keys();return(e={})[ee]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},r.entries=function(){var e,t=this,n=this.keys();return(e={})[ee]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},r[ee]=function(){return this.entries()},n}(),u=function(){function t(e,t){return this[J]={i:3,l:t,A:t?t.A:_(),P:!1,I:!1,o:void 0,t:e,k:this,p:new Map,O:!1,C:!1},this}e(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return v(this[J]).size}}),r.has=function(e){var t=this[J];return a(t),t.o?!!t.o.has(e)||!(!t.p.has(e)||!t.o.has(t.p.get(e))):t.t.has(e)},r.add=function(e){var t=this[J];return a(t),this.has(e)||(n(t),T(t),t.o.add(e)),this},r.delete=function(e){if(!this.has(e))return!1;var t=this[J];return a(t),n(t),T(t),t.o.delete(e)||!!t.p.has(e)&&t.o.delete(t.p.get(e))},r.clear=function(){var e=this[J];a(e),v(e).size&&(n(e),T(e),e.o.clear())},r.values=function(){var e=this[J];return a(e),n(e),e.o.values()},r.entries=function(){var e=this[J];return a(e),n(e),e.o.entries()},r.keys=function(){return this.values()},r[ee]=function(){return this.values()},r.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},t}();x("MapSet",{N:function(e,t){return new l(e,t)},T:function(e,t){return new u(e,t)}})}function F(){V(),H(),I()}function G(e){return e}function Y(e){return e}n.r(t),n.d(t,{Immer:()=>se,applyPatches:()=>he,castDraft:()=>G,castImmutable:()=>Y,createDraft:()=>pe,current:()=>N,default:()=>ge,enableAllPlugins:()=>F,enableES5:()=>V,enableMapSet:()=>H,enablePatches:()=>I,finishDraft:()=>ve,freeze:()=>m,immerable:()=>Q,isDraft:()=>a,isDraftable:()=>i,nothing:()=>Z,original:()=>o,produce:()=>ue,produceWithPatches:()=>ce,setAutoFreeze:()=>de,setUseProxies:()=>fe});var q,W,U="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,$="undefined"!=typeof Set,K="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Z=U?Symbol.for("immer-nothing"):((q={})["immer-nothing"]=!0,q),Q=U?Symbol.for("immer-draftable"):"__$immer_draftable",J=U?Symbol.for("immer-state"):"__$immer_state",ee="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",te=""+Object.prototype.constructor,ne="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,re=Object.getOwnPropertyDescriptors||function(e){var t={};return ne(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},ae={},ie={get:function(e,t){if(t===J)return e;var n=v(e);if(!u(n,t))return function(e,t,n){var r,a=A(t,n);return a?"value"in a?a.value:null===(r=a.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!i(r)?r:r===z(e.t,t)?(B(e),e.o[t]=D(e.A.h,r,e)):r},has:function(e,t){return t in v(e)},ownKeys:function(e){return Reflect.ownKeys(v(e))},set:function(e,t,n){var r=A(v(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var a=z(v(e),t),i=null==a?void 0:a[J];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(f(n,a)&&(void 0!==n||u(e.t,t)))return!0;B(e),T(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==z(e.t,t)||t in e.t?(e.D[t]=!1,B(e),T(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=v(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},oe={};s(ie,(function(e,t){oe[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),oe.deleteProperty=function(e,t){return oe.set.call(this,e,t,void 0)},oe.set=function(e,t,n){return ie.set.call(this,e[0],t,n,e[0])};var se=function(){function e(e){var t=this;this.g=K,this.F=!0,this.produce=function(e,n,a){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var s=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,a=Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];return s.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))}))}}var l;if("function"!=typeof n&&r(6),void 0!==a&&"function"!=typeof a&&r(7),i(e)){var u=S(t),c=D(t,e,void 0),d=!0;try{l=n(c),d=!1}finally{d?k(u):C(u)}return"undefined"!=typeof Promise&&l instanceof Promise?l.then((function(e){return E(u,a),M(e,u)}),(function(e){throw k(u),e})):(E(u,a),M(l,u))}if(!e||"object"!=typeof e){if(void 0===(l=n(e))&&(l=e),l===Z&&(l=void 0),t.F&&m(l,!0),a){var f=[],h=[];b("Patches").M(e,l,f,h),a(f,h)}return l}r(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,a=Array(r>1?r-1:0),i=1;i<r;i++)a[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(a))}))};var r,a,i=t.produce(e,n,(function(e,t){r=e,a=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,r,a]})):[i,r,a]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){i(e)||r(8),a(e)&&(e=N(e));var t=S(this),n=D(this,e,void 0);return n[J].C=!0,C(t),n},t.finishDraft=function(e,t){var n=(e&&e[J]).A;return E(n,t),M(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!K&&r(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=b("Patches").$;return a(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),le=new se,ue=le.produce,ce=le.produceWithPatches.bind(le),de=le.setAutoFreeze.bind(le),fe=le.setUseProxies.bind(le),he=le.applyPatches.bind(le),pe=le.createDraft.bind(le),ve=le.finishDraft.bind(le);const ge=ue},80594:e=>{var t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,a=/^0o[0-7]+$/i,i=parseInt,o="object"==typeof global&&global&&global.Object===Object&&global,s="object"==typeof self&&self&&self.Object===Object&&self,l=o||s||Function("return this")(),u=Object.prototype.toString,c=Math.max,d=Math.min,f=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(h(e)){var o="function"==typeof e.valueOf?e.valueOf():e;e=h(o)?o+"":o}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var s=r.test(e);return s||a.test(e)?i(e.slice(2),s?2:8):n.test(e)?NaN:+e}e.exports=function(e,t,n){var r,a,i,o,s,l,u=0,v=!1,g=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=a;return r=a=void 0,u=t,o=e.apply(i,n)}function w(e){return u=e,s=setTimeout(x,t),v?y(e):o}function b(e){var n=e-l;return void 0===l||n>=t||n<0||g&&e-u>=i}function x(){var e=f();if(b(e))return _(e);s=setTimeout(x,function(e){var n=t-(e-l);return g?d(n,i-(e-u)):n}(e))}function _(e){return s=void 0,m&&r?y(e):(r=a=void 0,o)}function E(){var e=f(),n=b(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return w(l);if(g)return s=setTimeout(x,t),y(l)}return void 0===s&&(s=setTimeout(x,t)),o}return t=p(t)||0,h(n)&&(v=!!n.leading,i=(g="maxWait"in n)?c(p(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),E.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=a=s=void 0},E.flush=function(){return void 0===s?o:_(f())},E}},77485:e=>{var t="__lodash_hash_undefined__",n="[object Function]",r="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,o=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,c="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,f=c||d||Function("return this")();var h,p=Array.prototype,v=Function.prototype,g=Object.prototype,m=f["__core-js_shared__"],y=(h=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",w=v.toString,b=g.hasOwnProperty,x=g.toString,_=RegExp("^"+w.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=f.Symbol,k=p.splice,C=D(f,"Map"),S=D(Object,"create"),j=E?E.prototype:void 0,M=j?j.toString:void 0;function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function z(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function A(e,t){var n;t=function(e,t){if(I(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||F(e))return!0;return i.test(e)||!a.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:I(n=t)?n:N(n);for(var r=0,o=t.length;null!=e&&r<o;)e=e[L(t[r++])];return r&&r==o?e:void 0}function T(e){if(!H(e)||(t=e,y&&y in t))return!1;var t,a=function(e){var t=H(e)?x.call(e):"";return t==n||t==r}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?_:u;return a.test(function(e){if(null!=e){try{return w.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function B(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function D(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return T(n)?n:void 0}R.prototype.clear=function(){this.__data__=S?S(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var n=this.__data__;if(S){var r=n[e];return r===t?void 0:r}return b.call(n,e)?n[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return S?void 0!==t[e]:b.call(t,e)},R.prototype.set=function(e,n){return this.__data__[e]=S&&void 0===n?t:n,this},P.prototype.clear=function(){this.__data__=[]},P.prototype.delete=function(e){var t=this.__data__,n=z(t,e);return!(n<0)&&(n==t.length-1?t.pop():k.call(t,n,1),!0)},P.prototype.get=function(e){var t=this.__data__,n=z(t,e);return n<0?void 0:t[n][1]},P.prototype.has=function(e){return z(this.__data__,e)>-1},P.prototype.set=function(e,t){var n=this.__data__,r=z(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},O.prototype.clear=function(){this.__data__={hash:new R,map:new(C||P),string:new R}},O.prototype.delete=function(e){return B(this,e).delete(e)},O.prototype.get=function(e){return B(this,e).get(e)},O.prototype.has=function(e){return B(this,e).has(e)},O.prototype.set=function(e,t){return B(this,e).set(e,t),this};var N=V((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(F(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return o.test(e)&&n.push(""),e.replace(s,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function L(e){if("string"==typeof e||F(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function V(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o),o};return n.cache=new(V.Cache||O),n}V.Cache=O;var I=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function F(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==x.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:A(e,t);return void 0===r?n:r}},880:e=>{var t="__lodash_hash_undefined__",n="[object Function]",r="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/,o=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,d="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,h=d||f||Function("return this")();var p,v=Array.prototype,g=Function.prototype,m=Object.prototype,y=h["__core-js_shared__"],w=(p=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",b=g.toString,x=m.hasOwnProperty,_=m.toString,E=RegExp("^"+b.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=h.Symbol,C=v.splice,S=L(h,"Map"),j=L(Object,"create"),M=k?k.prototype:void 0,R=M?M.toString:void 0;function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function A(e,t,n){var r=e[t];x.call(e,t)&&G(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function T(e,t){for(var n=e.length;n--;)if(G(e[n][0],t))return n;return-1}function B(e){if(!q(e)||(t=e,w&&w in t))return!1;var t,a=function(e){var t=q(e)?_.call(e):"";return t==n||t==r}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?E:u;return a.test(function(e){if(null!=e){try{return b.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function D(e,t,n,r){if(!q(e))return e;t=function(e,t){if(Y(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||W(e))return!0;return i.test(e)||!a.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return Y(e)?e:I(e)}(t);for(var o=-1,s=t.length,l=s-1,u=e;null!=u&&++o<s;){var c=H(t[o]),d=n;if(o!=l){var f=u[c];void 0===(d=r?r(f,c,u):void 0)&&(d=q(f)?f:V(t[o+1])?[]:{})}A(u,c,d),u=u[c]}return e}function N(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function L(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return B(n)?n:void 0}function V(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}P.prototype.clear=function(){this.__data__=j?j(null):{}},P.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},P.prototype.get=function(e){var n=this.__data__;if(j){var r=n[e];return r===t?void 0:r}return x.call(n,e)?n[e]:void 0},P.prototype.has=function(e){var t=this.__data__;return j?void 0!==t[e]:x.call(t,e)},P.prototype.set=function(e,n){return this.__data__[e]=j&&void 0===n?t:n,this},O.prototype.clear=function(){this.__data__=[]},O.prototype.delete=function(e){var t=this.__data__,n=T(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),!0)},O.prototype.get=function(e){var t=this.__data__,n=T(t,e);return n<0?void 0:t[n][1]},O.prototype.has=function(e){return T(this.__data__,e)>-1},O.prototype.set=function(e,t){var n=this.__data__,r=T(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},z.prototype.clear=function(){this.__data__={hash:new P,map:new(S||O),string:new P}},z.prototype.delete=function(e){return N(this,e).delete(e)},z.prototype.get=function(e){return N(this,e).get(e)},z.prototype.has=function(e){return N(this,e).has(e)},z.prototype.set=function(e,t){return N(this,e).set(e,t),this};var I=F((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(W(e))return R?R.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return o.test(e)&&n.push(""),e.replace(s,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function H(e){if("string"==typeof e||W(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function F(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o),o};return n.cache=new(F.Cache||z),n}function G(e,t){return e===t||e!=e&&t!=t}F.Cache=z;var Y=Array.isArray;function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function W(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==_.call(e)}e.exports=function(e,t,n){return null==e?e:D(e,t,n)}},85884:e=>{var t="__lodash_hash_undefined__",n="[object Function]",r="[object GeneratorFunction]",a=/^\./,i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=/^\[object .+?Constructor\]$/,l="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")();var d,f=Array.prototype,h=Function.prototype,p=Object.prototype,v=c["__core-js_shared__"],g=(d=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",m=h.toString,y=p.hasOwnProperty,w=p.toString,b=RegExp("^"+m.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=c.Symbol,_=f.splice,E=A(c,"Map"),k=A(Object,"create"),C=x?x.prototype:void 0,S=C?C.toString:void 0;function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function P(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function O(e){if(!L(e)||(t=e,g&&g in t))return!1;var t,a=function(e){var t=L(e)?w.call(e):"";return t==n||t==r}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?b:s;return a.test(function(e){if(null!=e){try{return m.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function z(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function A(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return O(n)?n:void 0}j.prototype.clear=function(){this.__data__=k?k(null):{}},j.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},j.prototype.get=function(e){var n=this.__data__;if(k){var r=n[e];return r===t?void 0:r}return y.call(n,e)?n[e]:void 0},j.prototype.has=function(e){var t=this.__data__;return k?void 0!==t[e]:y.call(t,e)},j.prototype.set=function(e,n){return this.__data__[e]=k&&void 0===n?t:n,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=P(t,e);return!(n<0)&&(n==t.length-1?t.pop():_.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=P(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return P(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=P(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},R.prototype.clear=function(){this.__data__={hash:new j,map:new(E||M),string:new j}},R.prototype.delete=function(e){return z(this,e).delete(e)},R.prototype.get=function(e){return z(this,e).get(e)},R.prototype.has=function(e){return z(this,e).has(e)},R.prototype.set=function(e,t){return z(this,e).set(e,t),this};var T=D((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(V(e))return S?S.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return a.test(e)&&n.push(""),e.replace(i,(function(e,t,r,a){n.push(r?a.replace(o,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||V(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function D(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o),o};return n.cache=new(D.Cache||R),n}D.Cache=R;var N=Array.isArray;function L(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function V(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==w.call(e)}e.exports=function(e){return N(e)?function(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}(e,B):V(e)?[e]:function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(T(e))}},39515:(e,t,n)=>{var r=n(38761)(n(37772),"DataView");e.exports=r},89612:(e,t,n)=>{var r=n(52118),a=n(96909),i=n(98138),o=n(4174),s=n(7942);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=o,l.prototype.set=s,e.exports=l},80235:(e,t,n)=>{var r=n(3945),a=n(21846),i=n(88028),o=n(72344),s=n(94769);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=o,l.prototype.set=s,e.exports=l},10326:(e,t,n)=>{var r=n(38761)(n(37772),"Map");e.exports=r},96738:(e,t,n)=>{var r=n(92411),a=n(36417),i=n(86928),o=n(79493),s=n(24150);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=i,l.prototype.has=o,l.prototype.set=s,e.exports=l},52760:(e,t,n)=>{var r=n(38761)(n(37772),"Promise");e.exports=r},2143:(e,t,n)=>{var r=n(38761)(n(37772),"Set");e.exports=r},45386:(e,t,n)=>{var r=n(96738),a=n(52842),i=n(52482);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}o.prototype.add=o.prototype.push=a,o.prototype.has=i,e.exports=o},86571:(e,t,n)=>{var r=n(80235),a=n(15243),i=n(72858),o=n(4417),s=n(8605),l=n(71418);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=a,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=l,e.exports=u},50857:(e,t,n)=>{var r=n(37772).Symbol;e.exports=r},79162:(e,t,n)=>{var r=n(37772).Uint8Array;e.exports=r},93215:(e,t,n)=>{var r=n(38761)(n(37772),"WeakMap");e.exports=r},49432:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},72517:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},67552:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i}},38333:(e,t,n)=>{var r=n(77832);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},34893:e=>{e.exports=function(e,t,n){for(var r=-1,a=null==e?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}},1634:(e,t,n)=>{var r=n(36473),a=n(79631),i=n(86152),o=n(73226),s=n(39045),l=n(77598),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),c=!n&&a(e),d=!n&&!c&&o(e),f=!n&&!c&&!d&&l(e),h=n||c||d||f,p=h?r(e.length,String):[],v=p.length;for(var g in e)!t&&!u.call(e,g)||h&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||p.push(g);return p}},50343:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}},65067:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}},81207:e=>{e.exports=function(e,t,n,r){var a=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++a]);++a<i;)n=t(n,e[a],a,e);return n}},87064:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},8589:(e,t,n)=>{var r=n(20256)("length");e.exports=r},28582:(e,t,n)=>{var r=n(13940),a=n(41225);e.exports=function(e,t,n){(void 0!==n&&!a(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},60091:(e,t,n)=>{var r=n(13940),a=n(41225),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];i.call(e,t)&&a(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},22218:(e,t,n)=>{var r=n(41225);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},67993:(e,t,n)=>{var r=n(752),a=n(90249);e.exports=function(e,t){return e&&r(t,a(t),e)}},55906:(e,t,n)=>{var r=n(752),a=n(18582);e.exports=function(e,t){return e&&r(t,a(t),e)}},13940:(e,t,n)=>{var r=n(83043);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},18874:(e,t,n)=>{var r=n(86571),a=n(72517),i=n(60091),o=n(67993),s=n(55906),l=n(92175),u=n(51522),c=n(7680),d=n(19987),f=n(13483),h=n(76939),p=n(70940),v=n(99917),g=n(8222),m=n(78725),y=n(86152),w=n(73226),b=n(4714),x=n(29259),_=n(43679),E=n(90249),k=n(18582),C="[object Arguments]",S="[object Function]",j="[object Object]",M={};M[C]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[j]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[S]=M["[object WeakMap]"]=!1,e.exports=function e(t,n,R,P,O,z){var A,T=1&n,B=2&n,D=4&n;if(R&&(A=O?R(t,P,O,z):R(t)),void 0!==A)return A;if(!x(t))return t;var N=y(t);if(N){if(A=v(t),!T)return u(t,A)}else{var L=p(t),V=L==S||"[object GeneratorFunction]"==L;if(w(t))return l(t,T);if(L==j||L==C||V&&!O){if(A=B||V?{}:m(t),!T)return B?d(t,s(A,t)):c(t,o(A,t))}else{if(!M[L])return O?t:{};A=g(t,L,T)}}z||(z=new r);var I=z.get(t);if(I)return I;z.set(t,A),_(t)?t.forEach((function(r){A.add(e(r,n,R,r,t,z))})):b(t)&&t.forEach((function(r,a){A.set(a,e(r,n,R,a,t,z))}));var H=N?void 0:(D?B?h:f:B?k:E)(t);return a(H||t,(function(r,a){H&&(r=t[a=r]),i(A,a,e(r,n,R,a,t,z))})),A}},39413:(e,t,n)=>{var r=n(29259),a=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},24303:(e,t,n)=>{var r=n(26548),a=n(92019)(r);e.exports=a},2229:(e,t,n)=>{var r=n(4795);e.exports=function(e,t,n){for(var a=-1,i=e.length;++a<i;){var o=e[a],s=t(o);if(null!=s&&(void 0===l?s==s&&!r(s):n(s,l)))var l=s,u=o}return u}},98043:(e,t,n)=>{var r=n(24303);e.exports=function(e,t){var n=[];return r(e,(function(e,r,a){t(e,r,a)&&n.push(e)})),n}},21359:e=>{e.exports=function(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}},62034:(e,t,n)=>{var r=n(65067),a=n(95882);e.exports=function e(t,n,i,o,s){var l=-1,u=t.length;for(i||(i=a),s||(s=[]);++l<u;){var c=t[l];n>0&&i(c)?n>1?e(c,n-1,i,o,s):r(s,c):o||(s[s.length]=c)}return s}},15308:(e,t,n)=>{var r=n(55463)();e.exports=r},26548:(e,t,n)=>{var r=n(15308),a=n(90249);e.exports=function(e,t){return e&&r(e,t,a)}},13324:(e,t,n)=>{var r=n(17297),a=n(33812);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[a(t[n++])];return n&&n==i?e:void 0}},1897:(e,t,n)=>{var r=n(65067),a=n(86152);e.exports=function(e,t,n){var i=t(e);return a(e)?i:r(i,n(e))}},53366:(e,t,n)=>{var r=n(50857),a=n(62107),i=n(37157),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?a(e):i(e)}},84134:e=>{e.exports=function(e,t){return e>t}},32726:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},20187:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},77832:(e,t,n)=>{var r=n(21359),a=n(22195),i=n(66024);e.exports=function(e,t,n){return t==t?i(e,t,n):r(e,a,n)}},15183:(e,t,n)=>{var r=n(53366),a=n(15125);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},88746:(e,t,n)=>{var r=n(51952),a=n(15125);e.exports=function e(t,n,i,o,s){return t===n||(null==t||null==n||!a(t)&&!a(n)?t!=t&&n!=n:r(t,n,i,o,e,s))}},51952:(e,t,n)=>{var r=n(86571),a=n(74871),i=n(11491),o=n(17416),s=n(70940),l=n(86152),u=n(73226),c=n(77598),d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,g,m){var y=l(e),w=l(t),b=y?f:s(e),x=w?f:s(t),_=(b=b==d?h:b)==h,E=(x=x==d?h:x)==h,k=b==x;if(k&&u(e)){if(!u(t))return!1;y=!0,_=!1}if(k&&!_)return m||(m=new r),y||c(e)?a(e,t,n,v,g,m):i(e,t,b,n,v,g,m);if(!(1&n)){var C=_&&p.call(e,"__wrapped__"),S=E&&p.call(t,"__wrapped__");if(C||S){var j=C?e.value():e,M=S?t.value():t;return m||(m=new r),g(j,M,n,v,m)}}return!!k&&(m||(m=new r),o(e,t,n,v,g,m))}},74511:(e,t,n)=>{var r=n(70940),a=n(15125);e.exports=function(e){return a(e)&&"[object Map]"==r(e)}},37036:(e,t,n)=>{var r=n(86571),a=n(88746);e.exports=function(e,t,n,i){var o=n.length,s=o,l=!i;if(null==e)return!s;for(e=Object(e);o--;){var u=n[o];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=n[o])[0],d=e[c],f=u[1];if(l&&u[2]){if(void 0===d&&!(c in e))return!1}else{var h=new r;if(i)var p=i(d,f,c,e,t,h);if(!(void 0===p?a(f,d,3,i,h):p))return!1}}return!0}},22195:e=>{e.exports=function(e){return e!=e}},6840:(e,t,n)=>{var r=n(61049),a=n(47394),i=n(29259),o=n(87035),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,f=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||a(e))&&(r(e)?f:s).test(o(e))}},8109:(e,t,n)=>{var r=n(70940),a=n(15125);e.exports=function(e){return a(e)&&"[object Set]"==r(e)}},35522:(e,t,n)=>{var r=n(53366),a=n(61158),i=n(15125),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&a(e.length)&&!!o[r(e)]}},68286:(e,t,n)=>{var r=n(26423),a=n(74716),i=n(23059),o=n(86152),s=n(65798);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?o(e)?a(e[0],e[1]):r(e):s(e)}},86411:(e,t,n)=>{var r=n(16001),a=n(54248),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},18390:(e,t,n)=>{var r=n(29259),a=n(16001),i=n(62966),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=a(e),n=[];for(var s in e)("constructor"!=s||!t&&o.call(e,s))&&n.push(s);return n}},17606:e=>{e.exports=function(e,t){return e<t}},93401:(e,t,n)=>{var r=n(24303),a=n(67878);e.exports=function(e,t){var n=-1,i=a(e)?Array(e.length):[];return r(e,(function(e,r,a){i[++n]=t(e,r,a)})),i}},26423:(e,t,n)=>{var r=n(37036),a=n(49882),i=n(73477);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},74716:(e,t,n)=>{var r=n(88746),a=n(72579),i=n(95041),o=n(21401),s=n(28792),l=n(73477),u=n(33812);e.exports=function(e,t){return o(e)&&s(t)?l(u(e),t):function(n){var o=a(n,e);return void 0===o&&o===t?i(n,e):r(t,o,3)}}},84565:(e,t,n)=>{var r=n(86571),a=n(28582),i=n(15308),o=n(25561),s=n(29259),l=n(18582),u=n(52434);e.exports=function e(t,n,c,d,f){t!==n&&i(n,(function(i,l){if(f||(f=new r),s(i))o(t,n,l,c,e,d,f);else{var h=d?d(u(t,l),i,l+"",t,n,f):void 0;void 0===h&&(h=i),a(t,l,h)}}),l)}},25561:(e,t,n)=>{var r=n(28582),a=n(92175),i=n(6190),o=n(51522),s=n(78725),l=n(79631),u=n(86152),c=n(93746),d=n(73226),f=n(61049),h=n(29259),p=n(97030),v=n(77598),g=n(52434),m=n(63329);e.exports=function(e,t,n,y,w,b,x){var _=g(e,n),E=g(t,n),k=x.get(E);if(k)r(e,n,k);else{var C=b?b(_,E,n+"",e,t,x):void 0,S=void 0===C;if(S){var j=u(E),M=!j&&d(E),R=!j&&!M&&v(E);C=E,j||M||R?u(_)?C=_:c(_)?C=o(_):M?(S=!1,C=a(E,!0)):R?(S=!1,C=i(E,!0)):C=[]:p(E)||l(E)?(C=_,l(_)?C=m(_):h(_)&&!f(_)||(C=s(E))):S=!1}S&&(x.set(E,C),w(C,E,y,b,x),x.delete(E)),r(e,n,C)}}},23813:(e,t,n)=>{var r=n(50343),a=n(13324),i=n(68286),o=n(93401),s=n(27095),l=n(47826),u=n(18477),c=n(23059),d=n(86152);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return d(e)?function(t){return a(t,1===e.length?e[0]:e)}:e})):[c];var f=-1;t=r(t,l(i));var h=o(e,(function(e,n,a){return{criteria:r(t,(function(t){return t(e)})),index:++f,value:e}}));return s(h,(function(e,t){return u(e,t,n)}))}},92602:(e,t,n)=>{var r=n(93759),a=n(95041);e.exports=function(e,t){return r(e,t,(function(t,n){return a(e,n)}))}},93759:(e,t,n)=>{var r=n(13324),a=n(82857),i=n(17297);e.exports=function(e,t,n){for(var o=-1,s=t.length,l={};++o<s;){var u=t[o],c=r(e,u);n(c,u)&&a(l,i(u,e),c)}return l}},20256:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},82952:(e,t,n)=>{var r=n(13324);e.exports=function(e){return function(t){return r(t,e)}}},93228:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,a,i){for(var o=-1,s=n(t((r-e)/(a||1)),0),l=Array(s);s--;)l[i?s:++o]=e,e+=a;return l}},5877:e=>{e.exports=function(e,t,n,r,a){return a(e,(function(e,a,i){n=r?(r=!1,e):t(n,e,a,i)})),n}},36060:(e,t,n)=>{var r=n(23059),a=n(43114),i=n(75251);e.exports=function(e,t){return i(a(e,t,r),e+"")}},82857:(e,t,n)=>{var r=n(60091),a=n(17297),i=n(39045),o=n(29259),s=n(33812);e.exports=function(e,t,n,l){if(!o(e))return e;for(var u=-1,c=(t=a(t,e)).length,d=c-1,f=e;null!=f&&++u<c;){var h=s(t[u]),p=n;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(u!=d){var v=f[h];void 0===(p=l?l(v,h,f):void 0)&&(p=o(v)?v:i(t[u+1])?[]:{})}r(f,h,p),f=f[h]}return e}},86532:(e,t,n)=>{var r=n(86874),a=n(83043),i=n(23059),o=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=o},27095:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},36473:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},1054:(e,t,n)=>{var r=n(50857),a=n(50343),i=n(86152),o=n(4795),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return a(t,e)+"";if(o(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},51704:(e,t,n)=>{var r=n(52153),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},47826:e=>{e.exports=function(e){return function(t){return e(t)}}},67326:(e,t,n)=>{var r=n(45386),a=n(38333),i=n(34893),o=n(59950),s=n(78803),l=n(16909);e.exports=function(e,t,n){var u=-1,c=a,d=e.length,f=!0,h=[],p=h;if(n)f=!1,c=i;else if(d>=200){var v=t?null:s(e);if(v)return l(v);f=!1,c=o,p=new r}else p=t?[]:h;e:for(;++u<d;){var g=e[u],m=t?t(g):g;if(g=n||0!==g?g:0,f&&m==m){for(var y=p.length;y--;)if(p[y]===m)continue e;t&&p.push(m),h.push(g)}else c(p,m,n)||(p!==h&&p.push(m),h.push(g))}return h}},50753:(e,t,n)=>{var r=n(50343);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},40509:e=>{e.exports=function(e,t,n){for(var r=-1,a=e.length,i=t.length,o={};++r<a;){var s=r<i?t[r]:void 0;n(o,e[r],s)}return o}},59950:e=>{e.exports=function(e,t){return e.has(t)}},89419:(e,t,n)=>{var r=n(23059);e.exports=function(e){return"function"==typeof e?e:r}},17297:(e,t,n)=>{var r=n(86152),a=n(21401),i=n(54452),o=n(66188);e.exports=function(e,t){return r(e)?e:a(e,t)?[e]:i(o(e))}},79882:(e,t,n)=>{var r=n(79162);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},92175:(e,t,n)=>{e=n.nmd(e);var r=n(37772),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},34727:(e,t,n)=>{var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},96058:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},70169:(e,t,n)=>{var r=n(50857),a=r?r.prototype:void 0,i=a?a.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},6190:(e,t,n)=>{var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},27520:(e,t,n)=>{var r=n(4795);e.exports=function(e,t){if(e!==t){var n=void 0!==e,a=null===e,i=e==e,o=r(e),s=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!o&&e>t||o&&s&&u&&!l&&!c||a&&s&&u||!n&&u||!i)return 1;if(!a&&!o&&!c&&e<t||c&&n&&i&&!a&&!o||l&&n&&i||!s&&i||!u)return-1}return 0}},18477:(e,t,n)=>{var r=n(27520);e.exports=function(e,t,n){for(var a=-1,i=e.criteria,o=t.criteria,s=i.length,l=n.length;++a<s;){var u=r(i[a],o[a]);if(u)return a>=l?u:u*("desc"==n[a]?-1:1)}return e.index-t.index}},51522:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},752:(e,t,n)=>{var r=n(60091),a=n(13940);e.exports=function(e,t,n,i){var o=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var u=t[s],c=i?i(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),o?a(n,u,c):r(n,u,c)}return n}},7680:(e,t,n)=>{var r=n(752),a=n(80633);e.exports=function(e,t){return r(e,a(e),t)}},19987:(e,t,n)=>{var r=n(752),a=n(12680);e.exports=function(e,t){return r(e,a(e),t)}},24019:(e,t,n)=>{var r=n(37772)["__core-js_shared__"];e.exports=r},97263:(e,t,n)=>{var r=n(36060),a=n(82406);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&a(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var l=n[r];l&&e(t,l,r,o)}return t}))}},92019:(e,t,n)=>{var r=n(67878);e.exports=function(e,t){return function(n,a){if(null==n)return n;if(!r(n))return e(n,a);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o<i)&&!1!==a(s[o],o,s););return n}}},55463:e=>{e.exports=function(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++a];if(!1===n(i[l],l,i))break}return t}}},98776:(e,t,n)=>{var r=n(68286),a=n(67878),i=n(90249);e.exports=function(e){return function(t,n,o){var s=Object(t);if(!a(t)){var l=r(n,3);t=i(t),n=function(e){return l(s[e],e,s)}}var u=e(t,n,o);return u>-1?s[l?t[u]:u]:void 0}}},82941:(e,t,n)=>{var r=n(93228),a=n(82406),i=n(5707);e.exports=function(e){return function(t,n,o){return o&&"number"!=typeof o&&a(t,n,o)&&(n=o=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),o=void 0===o?t<n?1:-1:i(o),r(t,n,o,e)}}},78803:(e,t,n)=>{var r=n(2143),a=n(34291),i=n(16909),o=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:a;e.exports=o},83043:(e,t,n)=>{var r=n(38761),a=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=a},74871:(e,t,n)=>{var r=n(45386),a=n(87064),i=n(59950);e.exports=function(e,t,n,o,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,v=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p<c;){var m=e[p],y=t[p];if(o)var w=u?o(y,m,p,t,e,l):o(m,y,p,e,t,l);if(void 0!==w){if(w)continue;v=!1;break}if(g){if(!a(t,(function(e,t){if(!i(g,t)&&(m===e||s(m,e,n,o,l)))return g.push(t)}))){v=!1;break}}else if(m!==y&&!s(m,y,n,o,l)){v=!1;break}}return l.delete(e),l.delete(t),v}},11491:(e,t,n)=>{var r=n(50857),a=n(79162),i=n(41225),o=n(74871),s=n(75179),l=n(16909),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var p=1&r;if(h||(h=l),e.size!=t.size&&!p)return!1;var v=f.get(e);if(v)return v==t;r|=2,f.set(e,t);var g=o(h(e),h(t),r,u,d,f);return f.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},17416:(e,t,n)=>{var r=n(13483),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,o,s){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var d=c;d--;){var f=u[d];if(!(l?f in t:a.call(t,f)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=l;++d<c;){var m=e[f=u[d]],y=t[f];if(i)var w=l?i(y,m,f,t,e,s):i(m,y,f,e,t,s);if(!(void 0===w?m===y||o(m,y,n,i,s):w)){v=!1;break}g||(g="constructor"==f)}if(v&&!g){var b=e.constructor,x=t.constructor;b==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(v=!1)}return s.delete(e),s.delete(t),v}},29097:(e,t,n)=>{var r=n(35676),a=n(43114),i=n(75251);e.exports=function(e){return i(a(e,void 0,r),e+"")}},51242:e=>{var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},13483:(e,t,n)=>{var r=n(1897),a=n(80633),i=n(90249);e.exports=function(e){return r(e,i,a)}},76939:(e,t,n)=>{var r=n(1897),a=n(12680),i=n(18582);e.exports=function(e){return r(e,i,a)}},27937:(e,t,n)=>{var r=n(98304);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},49882:(e,t,n)=>{var r=n(28792),a=n(90249);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,r(o)]}return t}},38761:(e,t,n)=>{var r=n(6840),a=n(98109);e.exports=function(e,t){var n=a(e,t);return r(n)?n:void 0}},47353:(e,t,n)=>{var r=n(60241)(Object.getPrototypeOf,Object);e.exports=r},62107:(e,t,n)=>{var r=n(50857),a=Object.prototype,i=a.hasOwnProperty,o=a.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var a=o.call(e);return r&&(t?e[s]=n:delete e[s]),a}},80633:(e,t,n)=>{var r=n(67552),a=n(30981),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return i.call(e,t)})))}:a;e.exports=s},12680:(e,t,n)=>{var r=n(65067),a=n(47353),i=n(80633),o=n(30981),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=a(e);return t}:o;e.exports=s},70940:(e,t,n)=>{var r=n(39515),a=n(10326),i=n(52760),o=n(2143),s=n(93215),l=n(53366),u=n(87035),c="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",v=u(r),g=u(a),m=u(i),y=u(o),w=u(s),b=l;(r&&b(new r(new ArrayBuffer(1)))!=p||a&&b(new a)!=c||i&&b(i.resolve())!=d||o&&b(new o)!=f||s&&b(new s)!=h)&&(b=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case v:return p;case g:return c;case m:return d;case y:return f;case w:return h}return t}),e.exports=b},98109:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},1369:(e,t,n)=>{var r=n(17297),a=n(79631),i=n(86152),o=n(39045),s=n(61158),l=n(33812);e.exports=function(e,t,n){for(var u=-1,c=(t=r(t,e)).length,d=!1;++u<c;){var f=l(t[u]);if(!(d=null!=e&&n(e,f)))break;e=e[f]}return d||++u!=c?d:!!(c=null==e?0:e.length)&&s(c)&&o(f,c)&&(i(e)||a(e))}},33880:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},52118:(e,t,n)=>{var r=n(99191);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},96909:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},98138:(e,t,n)=>{var r=n(99191),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},4174:(e,t,n)=>{var r=n(99191),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},7942:(e,t,n)=>{var r=n(99191);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},99917:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},8222:(e,t,n)=>{var r=n(79882),a=n(34727),i=n(96058),o=n(70169),s=n(6190);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return a(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Symbol]":return o(e)}}},78725:(e,t,n)=>{var r=n(39413),a=n(47353),i=n(16001);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(a(e))}},95882:(e,t,n)=>{var r=n(50857),a=n(79631),i=n(86152),o=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||a(e)||!!(o&&e&&e[o])}},39045:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},82406:(e,t,n)=>{var r=n(41225),a=n(67878),i=n(39045),o=n(29259);e.exports=function(e,t,n){if(!o(n))return!1;var s=typeof t;return!!("number"==s?a(n)&&i(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},21401:(e,t,n)=>{var r=n(86152),a=n(4795),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||(o.test(e)||!i.test(e)||null!=t&&e in Object(t))}},98304:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},47394:(e,t,n)=>{var r,a=n(24019),i=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},16001:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},28792:(e,t,n)=>{var r=n(29259);e.exports=function(e){return e==e&&!r(e)}},3945:e=>{e.exports=function(){this.__data__=[],this.size=0}},21846:(e,t,n)=>{var r=n(22218),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)}},88028:(e,t,n)=>{var r=n(22218);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},72344:(e,t,n)=>{var r=n(22218);e.exports=function(e){return r(this.__data__,e)>-1}},94769:(e,t,n)=>{var r=n(22218);e.exports=function(e,t){var n=this.__data__,a=r(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},92411:(e,t,n)=>{var r=n(89612),a=n(80235),i=n(10326);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||a),string:new r}}},36417:(e,t,n)=>{var r=n(27937);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},86928:(e,t,n)=>{var r=n(27937);e.exports=function(e){return r(this,e).get(e)}},79493:(e,t,n)=>{var r=n(27937);e.exports=function(e){return r(this,e).has(e)}},24150:(e,t,n)=>{var r=n(27937);e.exports=function(e,t){var n=r(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},75179:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},73477:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},77777:(e,t,n)=>{var r=n(30733);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},99191:(e,t,n)=>{var r=n(38761)(Object,"create");e.exports=r},54248:(e,t,n)=>{var r=n(60241)(Object.keys,Object);e.exports=r},62966:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},4146:(e,t,n)=>{e=n.nmd(e);var r=n(51242),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}();e.exports=s},37157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},60241:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},43114:(e,t,n)=>{var r=n(49432),a=Math.max;e.exports=function(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=a(i.length-t,0),l=Array(s);++o<s;)l[o]=i[t+o];o=-1;for(var u=Array(t+1);++o<t;)u[o]=i[o];return u[t]=n(l),r(e,this,u)}}},37772:(e,t,n)=>{var r=n(51242),a="object"==typeof self&&self&&self.Object===Object&&self,i=r||a||Function("return this")();e.exports=i},52434:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},52842:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},52482:e=>{e.exports=function(e){return this.__data__.has(e)}},16909:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},75251:(e,t,n)=>{var r=n(86532),a=n(97787)(r);e.exports=a},97787:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var a=t(),i=16-(a-r);if(r=a,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},15243:(e,t,n)=>{var r=n(80235);e.exports=function(){this.__data__=new r,this.size=0}},72858:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},4417:e=>{e.exports=function(e){return this.__data__.get(e)}},8605:e=>{e.exports=function(e){return this.__data__.has(e)}},71418:(e,t,n)=>{var r=n(80235),a=n(10326),i=n(96738);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!a||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(o)}return n.set(e,t),this.size=n.size,this}},66024:e=>{e.exports=function(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}},82302:(e,t,n)=>{var r=n(8589),a=n(33880),i=n(35555);e.exports=function(e){return a(e)?i(e):r(e)}},54452:(e,t,n)=>{var r=n(77777),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,r,a){t.push(r?a.replace(i,"$1"):n||e)})),t}));e.exports=o},33812:(e,t,n)=>{var r=n(4795);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},87035:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},52153:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},35555:e=>{var t="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+n+"|"+r+")"+"?",l="[\\ufe0e\\ufe0f]?",u=l+s+("(?:\\u200d(?:"+[a,i,o].join("|")+")"+l+s+")*"),c="(?:"+[a+n+"?",n,i,o,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+u,"g");e.exports=function(e){for(var t=d.lastIndex=0;d.test(e);)++t;return t}},54004:(e,t,n)=>{var r=n(18874);e.exports=function(e){return r(e,4)}},9850:(e,t,n)=>{var r=n(18874);e.exports=function(e){return r(e,5)}},86874:e=>{e.exports=function(e){return function(){return e}}},84573:(e,t,n)=>{var r=n(36060),a=n(41225),i=n(82406),o=n(18582),s=Object.prototype,l=s.hasOwnProperty,u=r((function(e,t){e=Object(e);var n=-1,r=t.length,u=r>2?t[2]:void 0;for(u&&i(t[0],t[1],u)&&(r=1);++n<r;)for(var c=t[n],d=o(c),f=-1,h=d.length;++f<h;){var p=d[f],v=e[p];(void 0===v||a(v,s[p])&&!l.call(e,p))&&(e[p]=c[p])}return e}));e.exports=u},79421:(e,t,n)=>{e.exports=n(59756)},41225:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},90882:(e,t,n)=>{var r=n(67552),a=n(98043),i=n(68286),o=n(86152);e.exports=function(e,t){return(o(e)?r:a)(e,i(t,3))}},55281:(e,t,n)=>{var r=n(98776)(n(12982));e.exports=r},12982:(e,t,n)=>{var r=n(21359),a=n(68286),i=n(38101),o=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:i(n);return l<0&&(l=o(s+l,0)),r(e,a(t,3),l)}},35676:(e,t,n)=>{var r=n(62034);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},59756:(e,t,n)=>{var r=n(72517),a=n(24303),i=n(89419),o=n(86152);e.exports=function(e,t){return(o(e)?r:a)(e,i(t))}},20792:(e,t,n)=>{var r=n(15308),a=n(89419),i=n(18582);e.exports=function(e,t){return null==e?e:r(e,a(t),i)}},72579:(e,t,n)=>{var r=n(13324);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},93352:(e,t,n)=>{var r=n(32726),a=n(1369);e.exports=function(e,t){return null!=e&&a(e,t,r)}},95041:(e,t,n)=>{var r=n(20187),a=n(1369);e.exports=function(e,t){return null!=e&&a(e,t,r)}},23059:e=>{e.exports=function(e){return e}},79631:(e,t,n)=>{var r=n(15183),a=n(15125),i=Object.prototype,o=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return a(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},86152:e=>{var t=Array.isArray;e.exports=t},67878:(e,t,n)=>{var r=n(61049),a=n(61158);e.exports=function(e){return null!=e&&a(e.length)&&!r(e)}},93746:(e,t,n)=>{var r=n(67878),a=n(15125);e.exports=function(e){return a(e)&&r(e)}},73226:(e,t,n)=>{e=n.nmd(e);var r=n(37772),a=n(36330),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||a;e.exports=l},45455:(e,t,n)=>{var r=n(86411),a=n(70940),i=n(79631),o=n(86152),s=n(67878),l=n(73226),u=n(16001),c=n(77598),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(o(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||i(e)))return!e.length;var t=a(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},61049:(e,t,n)=>{var r=n(53366),a=n(29259);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},61158:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},4714:(e,t,n)=>{var r=n(74511),a=n(47826),i=n(4146),o=i&&i.isMap,s=o?a(o):r;e.exports=s},29259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},15125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},97030:(e,t,n)=>{var r=n(53366),a=n(47353),i=n(15125),o=Function.prototype,s=Object.prototype,l=o.toString,u=s.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=a(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},43679:(e,t,n)=>{var r=n(8109),a=n(47826),i=n(4146),o=i&&i.isSet,s=o?a(o):r;e.exports=s},85505:(e,t,n)=>{var r=n(53366),a=n(86152),i=n(15125);e.exports=function(e){return"string"==typeof e||!a(e)&&i(e)&&"[object String]"==r(e)}},4795:(e,t,n)=>{var r=n(53366),a=n(15125);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},77598:(e,t,n)=>{var r=n(35522),a=n(47826),i=n(4146),o=i&&i.isTypedArray,s=o?a(o):r;e.exports=s},84336:e=>{e.exports=function(e){return void 0===e}},90249:(e,t,n)=>{var r=n(1634),a=n(86411),i=n(67878);e.exports=function(e){return i(e)?r(e):a(e)}},18582:(e,t,n)=>{var r=n(1634),a=n(18390),i=n(67878);e.exports=function(e){return i(e)?r(e,!0):a(e)}},56974:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},16760:(e,t,n)=>{var r=n(50343),a=n(68286),i=n(93401),o=n(86152);e.exports=function(e,t){return(o(e)?r:i)(e,a(t,3))}},34519:(e,t,n)=>{var r=n(13940),a=n(26548),i=n(68286);e.exports=function(e,t){var n={};return t=i(t,3),a(e,(function(e,a,i){r(n,a,t(e,a,i))})),n}},71644:(e,t,n)=>{var r=n(2229),a=n(84134),i=n(23059);e.exports=function(e){return e&&e.length?r(e,i,a):void 0}},30733:(e,t,n)=>{var r=n(96738);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},98537:(e,t,n)=>{var r=n(84565),a=n(97263)((function(e,t,n){r(e,t,n)}));e.exports=a},65680:(e,t,n)=>{var r=n(2229),a=n(17606),i=n(23059);e.exports=function(e){return e&&e.length?r(e,i,a):void 0}},10937:(e,t,n)=>{var r=n(2229),a=n(68286),i=n(17606);e.exports=function(e,t){return e&&e.length?r(e,a(t,2),i):void 0}},34291:e=>{e.exports=function(){}},61100:(e,t,n)=>{var r=n(37772);e.exports=function(){return r.Date.now()}},13888:(e,t,n)=>{var r=n(92602),a=n(29097)((function(e,t){return null==e?{}:r(e,t)}));e.exports=a},65798:(e,t,n)=>{var r=n(20256),a=n(82952),i=n(21401),o=n(33812);e.exports=function(e){return i(e)?r(o(e)):a(e)}},2689:(e,t,n)=>{var r=n(82941)();e.exports=r},58215:(e,t,n)=>{var r=n(81207),a=n(24303),i=n(68286),o=n(5877),s=n(86152);e.exports=function(e,t,n){var l=s(e)?r:o,u=arguments.length<3;return l(e,i(t,4),n,u,a)}},36402:(e,t,n)=>{var r=n(86411),a=n(70940),i=n(67878),o=n(85505),s=n(82302);e.exports=function(e){if(null==e)return 0;if(i(e))return o(e)?s(e):e.length;var t=a(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},829:(e,t,n)=>{var r=n(62034),a=n(23813),i=n(36060),o=n(82406),s=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&o(e,t[0],t[1])?t=[]:n>2&&o(t[0],t[1],t[2])&&(t=[t[0]]),a(e,r(t,1),[])}));e.exports=s},30981:e=>{e.exports=function(){return[]}},36330:e=>{e.exports=function(){return!1}},5707:(e,t,n)=>{var r=n(7642),a=1/0;e.exports=function(e){return e?(e=r(e))===a||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},38101:(e,t,n)=>{var r=n(5707);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},7642:(e,t,n)=>{var r=n(51704),a=n(29259),i=n(4795),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):o.test(e)?NaN:+e}},63329:(e,t,n)=>{var r=n(752),a=n(18582);e.exports=function(e){return r(e,a(e))}},66188:(e,t,n)=>{var r=n(1054);e.exports=function(e){return null==e?"":r(e)}},89466:(e,t,n)=>{var r=n(72517),a=n(39413),i=n(26548),o=n(68286),s=n(47353),l=n(86152),u=n(73226),c=n(61049),d=n(29259),f=n(77598);e.exports=function(e,t,n){var h=l(e),p=h||u(e)||f(e);if(t=o(t,4),null==n){var v=e&&e.constructor;n=p?h?new v:[]:d(e)&&c(v)?a(s(e)):{}}return(p?r:i)(e,(function(e,r,a){return t(n,e,r,a)})),n}},26139:(e,t,n)=>{var r=n(62034),a=n(36060),i=n(67326),o=n(93746),s=a((function(e){return i(r(e,1,o,!0))}));e.exports=s},74930:(e,t,n)=>{var r=n(66188),a=0;e.exports=function(e){var t=++a;return r(e)+t}},98346:(e,t,n)=>{var r=n(50753),a=n(90249);e.exports=function(e){return null==e?[]:r(e,a(e))}},46150:(e,t,n)=>{var r=n(60091),a=n(40509);e.exports=function(e,t){return a(e||[],t||[],r)}},37320:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,i){for(var o,s,l=a(e),u=1;u<arguments.length;u++){for(var c in o=Object(arguments[u]))n.call(o,c)&&(l[c]=o[c]);if(t){s=t(o);for(var d=0;d<s.length;d++)r.call(o,s[d])&&(l[s[d]]=o[s[d]])}}return l}},12139:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Children:()=>I,Component:()=>o.wA,Fragment:()=>o.HY,PureComponent:()=>T,StrictMode:()=>be,Suspense:()=>G,SuspenseList:()=>W,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>de,cloneElement:()=>ve,createContext:()=>o.kr,createElement:()=>o.az,createFactory:()=>he,createPortal:()=>K,createRef:()=>o.Vf,default:()=>xe,findDOMNode:()=>me,flushSync:()=>we,forwardRef:()=>L,hydrate:()=>ne,isValidElement:()=>pe,lazy:()=>q,memo:()=>B,render:()=>te,unmountComponentAtNode:()=>ge,unstable_batchedUpdates:()=>ye,useCallback:()=>_,useContext:()=>E,useDebugValue:()=>k,useEffect:()=>m,useErrorBoundary:()=>C,useImperativeHandle:()=>b,useLayoutEffect:()=>y,useMemo:()=>x,useReducer:()=>g,useRef:()=>w,useState:()=>v,version:()=>fe});var r,a,i,o=n(33847),s=0,l=[],u=o.YM.__b,c=o.YM.__r,d=o.YM.diffed,f=o.YM.__c,h=o.YM.unmount;function p(e,t){o.YM.__h&&o.YM.__h(a,e,s||t),s=0;var n=a.__H||(a.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v(e){return s=1,g(O,e)}function g(e,t,n){var i=p(r++,2);return i.t=e,i.__c||(i.__=[n?n(t):O(void 0,t),function(e){var t=i.t(i.__[0],e);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=a),i.__}function m(e,t){var n=p(r++,3);!o.YM.__s&&P(n.__H,t)&&(n.__=e,n.__H=t,a.__H.__h.push(n))}function y(e,t){var n=p(r++,4);!o.YM.__s&&P(n.__H,t)&&(n.__=e,n.__H=t,a.__h.push(n))}function w(e){return s=5,x((function(){return{current:e}}),[])}function b(e,t,n){s=6,y((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function x(e,t){var n=p(r++,7);return P(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function _(e,t){return s=8,x((function(){return e}),t)}function E(e){var t=a.context[e.__c],n=p(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(a)),t.props.value):e.__}function k(e,t){o.YM.useDebugValue&&o.YM.useDebugValue(t?t(e):e)}function C(e){var t=p(r++,10),n=v();return t.__=e,a.componentDidCatch||(a.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function S(){var e;for(l.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=l.pop();)if(e.__P)try{e.__H.__h.forEach(M),e.__H.__h.forEach(R),e.__H.__h=[]}catch(a){e.__H.__h=[],o.YM.__e(a,e.__v)}}o.YM.__b=function(e){a=null,u&&u(e)},o.YM.__r=function(e){c&&c(e),r=0;var t=(a=e.__c).__H;t&&(t.__h.forEach(M),t.__h.forEach(R),t.__h=[])},o.YM.diffed=function(e){d&&d(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==l.push(t)&&i===o.YM.requestAnimationFrame||((i=o.YM.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),j&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);j&&(t=requestAnimationFrame(n))})(S)),a=null},o.YM.__c=function(e,t){t.some((function(e){try{e.__h.forEach(M),e.__h=e.__h.filter((function(e){return!e.__||R(e)}))}catch(i){t.some((function(e){e.__h&&(e.__h=[])})),t=[],o.YM.__e(i,e.__v)}})),f&&f(e,t)},o.YM.unmount=function(e){h&&h(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{M(e)}catch(e){t=e}})),t&&o.YM.__e(t,n.__v))};var j="function"==typeof requestAnimationFrame;function M(e){var t=a,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),a=t}function R(e){var t=a;e.__c=e.__(),a=t}function P(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function O(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in t)e[n]=t[n];return e}function A(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function T(e){this.props=e}function B(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:A(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,o.az)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(T.prototype=new o.wA).isPureReactComponent=!0,T.prototype.shouldComponentUpdate=function(e,t){return A(this.props,e)||A(this.state,t)};var D=o.YM.__b;o.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),D&&D(e)};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function L(e){function t(t,n){var r=z({},t);return delete r.ref,e(r,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=N,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var V=function(e,t){return null==e?null:(0,o.bR)((0,o.bR)(e).map(t))},I={map:V,forEach:V,count:function(e){return e?(0,o.bR)(e).length:0},only:function(e){var t=(0,o.bR)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:o.bR},H=o.YM.__e;o.YM.__e=function(e,t,n){if(e.then)for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);H(e,t,n)};var F=o.YM.unmount;function G(){this.__u=0,this.t=null,this.__b=null}function Y(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function q(e){var t,n,r;function a(a){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,o.az)(n,a)}return a.displayName="Lazy",a.__f=!0,a}function W(){this.u=null,this.o=null}o.YM.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),F&&F(e)},(G.prototype=new o.wA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var a=Y(r.__v),i=!1,o=function(){i||(i=!0,n.__R=null,a?a(s):s())};n.__R=o;var s=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(o,o)},G.prototype.componentWillUnmount=function(){this.t=[]},G.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=z({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__e&&(0,o.az)(o.HY,null,e.fallback);return a&&(a.__h=null),[(0,o.az)(o.HY,null,t.__e?null:e.children),a]};var U=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function X(e){return this.getChildContext=function(){return e.context},e.children}function $(e){var t=this,n=e.i;t.componentWillUnmount=function(){(0,o.sY)(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),(0,o.sY)((0,o.az)(X,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function K(e,t){return(0,o.az)($,{__v:e,i:t})}(W.prototype=new o.wA).__e=function(e){var t=this,n=Y(t.__v),r=t.o.get(e);return r[0]++,function(a){var i=function(){t.props.revealOrder?(r.push(a),U(t,e,r)):a()};n?n(i):i()}},W.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,o.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},W.prototype.componentDidUpdate=W.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){U(e,n,t)}))};var Z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Q=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J="undefined"!=typeof document,ee=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function te(e,t,n){return null==t.__k&&(t.textContent=""),(0,o.sY)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ne(e,t,n){return(0,o.ZB)(e,t),"function"==typeof n&&n(),e?e.__c:null}o.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(o.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var re=o.YM.event;function ae(){}function ie(){return this.cancelBubble}function oe(){return this.defaultPrevented}o.YM.event=function(e){return re&&(e=re(e)),e.persist=ae,e.isPropagationStopped=ie,e.isDefaultPrevented=oe,e.nativeEvent=e};var se,le={configurable:!0,get:function(){return this.class}},ue=o.YM.vnode;o.YM.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var a=-1===t.indexOf("-");for(var i in r={},n){var s=n[i];J&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in n&&null==s||("defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===s?s="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!ee(n.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():a&&Q.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[i]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,o.bR)(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=(0,o.bR)(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(le.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",le))}e.$$typeof=Z,ue&&ue(e)};var ce=o.YM.__r;o.YM.__r=function(e){ce&&ce(e),se=e.__c};var de={ReactCurrentDispatcher:{current:{readContext:function(e){return se.__n[e.__c].props.value}}}},fe="17.0.2";function he(e){return o.az.bind(null,e)}function pe(e){return!!e&&e.$$typeof===Z}function ve(e){return pe(e)?o.Tm.apply(null,arguments):e}function ge(e){return!!e.__k&&((0,o.sY)(null,e),!0)}function me(e){return e&&(e.base||1===e.nodeType&&e)||null}var ye=function(e,t){return e(t)},we=function(e,t){return e(t)},be=o.HY;const xe={useState:v,useReducer:g,useEffect:m,useLayoutEffect:y,useRef:w,useImperativeHandle:b,useMemo:x,useCallback:_,useContext:E,useDebugValue:k,version:"17.0.2",Children:I,render:te,hydrate:ne,unmountComponentAtNode:ge,createPortal:K,createElement:o.az,createContext:o.kr,createFactory:he,cloneElement:ve,createRef:o.Vf,Fragment:o.HY,isValidElement:pe,findDOMNode:me,Component:o.wA,PureComponent:T,memo:B,forwardRef:L,flushSync:we,unstable_batchedUpdates:ye,StrictMode:o.HY,Suspense:G,SuspenseList:W,lazy:q,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:de}},33847:(e,t,n)=>{"use strict";n.d(t,{HY:()=>y,Tm:()=>I,Vf:()=>m,YM:()=>a,ZB:()=>V,az:()=>v,bR:()=>S,kr:()=>H,sY:()=>L,wA:()=>w});var r,a,i,o,s,l,u,c={},d=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(e,t){for(var n in t)e[n]=t[n];return e}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var a,i,o,s={};for(o in t)"key"==o?a=t[o]:"ref"==o?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return g(e,s,a,i,null)}function g(e,t,n,r,o){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++i:o};return null==o&&null!=a.vnode&&a.vnode(s),s}function m(){return{current:null}}function y(e){return e.children}function w(e,t){this.props=e,this.context=t}function b(e,t){if(null==t)return e.__?b(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?b(e):null}function x(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return x(e)}}function _(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!E.__r++||l!==a.debounceRendering)&&((l=a.debounceRendering)||s)(E)}function E(){for(var e;E.__r=o.length;)e=o.sort((function(e,t){return e.__v.__b-t.__v.__b})),o=[],e.some((function(e){var t,n,r,a,i,o;e.__d&&(i=(a=(t=e).__v).__e,(o=t.__P)&&(n=[],(r=h({},a)).__v=a.__v+1,z(o,a,r,t.__n,void 0!==o.ownerSVGElement,null!=a.__h?[i]:null,n,null==i?b(a):i,a.__h),A(n,a),a.__e!=i&&x(a)))}))}function k(e,t,n,r,a,i,o,s,l,u){var f,h,p,v,m,w,x,_=r&&r.__k||d,E=_.length;for(n.__k=[],f=0;f<t.length;f++)if(null!=(v=n.__k[f]=null==(v=t[f])||"boolean"==typeof v?null:"string"==typeof v||"number"==typeof v||"bigint"==typeof v?g(null,v,null,null,v):Array.isArray(v)?g(y,{children:v},null,null,null):v.__b>0?g(v.type,v.props,v.key,null,v.__v):v)){if(v.__=n,v.__b=n.__b+1,null===(p=_[f])||p&&v.key==p.key&&v.type===p.type)_[f]=void 0;else for(h=0;h<E;h++){if((p=_[h])&&v.key==p.key&&v.type===p.type){_[h]=void 0;break}p=null}z(e,v,p=p||c,a,i,o,s,l,u),m=v.__e,(h=v.ref)&&p.ref!=h&&(x||(x=[]),p.ref&&x.push(p.ref,null,v),x.push(h,v.__c||m,v)),null!=m?(null==w&&(w=m),"function"==typeof v.type&&v.__k===p.__k?v.__d=l=C(v,l,e):l=j(e,v,p,_,m,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=b(p))}for(n.__e=w,f=E;f--;)null!=_[f]&&("function"==typeof n.type&&null!=_[f].__e&&_[f].__e==n.__d&&(n.__d=b(r,f+1)),D(_[f],_[f]));if(x)for(f=0;f<x.length;f++)B(x[f],x[++f],x[++f])}function C(e,t,n){for(var r,a=e.__k,i=0;a&&i<a.length;i++)(r=a[i])&&(r.__=e,t="function"==typeof r.type?C(r,t,n):j(n,r,r,a,r.__e,t));return t}function S(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){S(e,t)})):t.push(e)),t}function j(e,t,n,r,a,i){var o,s,l;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==n||a!=i||null==a.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(a),o=null;else{for(s=i,l=0;(s=s.nextSibling)&&l<r.length;l+=2)if(s==a)break e;e.insertBefore(a,i),o=i}return void 0!==o?o:a.nextSibling}function M(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||f.test(t)?n:n+"px"}function R(e,t,n,r,a){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||M(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||M(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?O:P,i):e.removeEventListener(t,i?O:P,i);else if("dangerouslySetInnerHTML"!==t){if(a)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function P(e){this.l[e.type+!1](a.event?a.event(e):e)}function O(e){this.l[e.type+!0](a.event?a.event(e):e)}function z(e,t,n,r,i,o,s,l,u){var c,d,f,p,v,g,m,b,x,_,E,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,l=t.__e=n.__e,t.__h=null,o=[l]),(c=a.__b)&&c(t);try{e:if("function"==typeof C){if(b=t.props,x=(c=C.contextType)&&r[c.__c],_=c?x?x.props.value:c.__:r,n.__c?m=(d=t.__c=n.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(b,_):(t.__c=d=new w(b,_),d.constructor=C,d.render=N),x&&x.sub(d),d.props=b,d.state||(d.state={}),d.context=_,d.__n=r,f=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=h({},d.__s)),h(d.__s,C.getDerivedStateFromProps(b,d.__s))),p=d.props,v=d.state,f)null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==C.getDerivedStateFromProps&&b!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(b,_),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(b,d.__s,_)||t.__v===n.__v){d.props=b,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(b,d.__s,_),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,v,g)}))}d.context=_,d.props=b,d.state=d.__s,(c=a.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(r=h(h({},r),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,v)),E=null!=c&&c.type===y&&null==c.key?c.props.children:c,k(e,Array.isArray(E)?E:[E],t,n,r,i,o,s,l,u),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),m&&(d.__E=d.__=null),d.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=T(n.__e,t,n,r,i,o,s,u);(c=a.diffed)&&c(t)}catch(e){t.__v=null,(u||null!=o)&&(t.__e=l,t.__h=!!u,o[o.indexOf(l)]=null),a.__e(e,t,n)}}function A(e,t){a.__c&&a.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){a.__e(e,t.__v)}}))}function T(e,t,n,a,i,o,s,l){var u,d,f,h=n.props,v=t.props,g=t.type,m=0;if("svg"===g&&(i=!0),null!=o)for(;m<o.length;m++)if((u=o[m])&&"setAttribute"in u==!!g&&(g?u.localName===g:3===u.nodeType)){e=u,o[m]=null;break}if(null==e){if(null===g)return document.createTextNode(v);e=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,v.is&&v),o=null,l=!1}if(null===g)h===v||l&&e.data===v||(e.data=v);else{if(o=o&&r.call(e.childNodes),d=(h=n.props||c).dangerouslySetInnerHTML,f=v.dangerouslySetInnerHTML,!l){if(null!=o)for(h={},m=0;m<e.attributes.length;m++)h[e.attributes[m].name]=e.attributes[m].value;(f||d)&&(f&&(d&&f.__html==d.__html||f.__html===e.innerHTML)||(e.innerHTML=f&&f.__html||""))}if(function(e,t,n,r,a){var i;for(i in n)"children"===i||"key"===i||i in t||R(e,i,null,n[i],r);for(i in t)a&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||R(e,i,t[i],n[i],r)}(e,v,h,i,l),f)t.__k=[];else if(m=t.props.children,k(e,Array.isArray(m)?m:[m],t,n,a,i&&"foreignObject"!==g,o,s,o?o[0]:n.__k&&b(n,0),l),null!=o)for(m=o.length;m--;)null!=o[m]&&p(o[m]);l||("value"in v&&void 0!==(m=v.value)&&(m!==h.value||m!==e.value||"progress"===g&&!m)&&R(e,"value",m,h.value,!1),"checked"in v&&void 0!==(m=v.checked)&&m!==e.checked&&R(e,"checked",m,h.checked,!1))}return e}function B(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){a.__e(e,n)}}function D(e,t,n){var r,i;if(a.unmount&&a.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||B(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){a.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&D(r[i],t,"function"!=typeof e.type);n||null==e.__e||p(e.__e),e.__e=e.__d=void 0}function N(e,t,n){return this.constructor(e,n)}function L(e,t,n){var i,o,s;a.__&&a.__(e,t),o=(i="function"==typeof n)?null:n&&n.__k||t.__k,s=[],z(t,e=(!i&&n||t).__k=v(y,null,[e]),o||c,c,void 0!==t.ownerSVGElement,!i&&n?[n]:o?null:t.firstChild?r.call(t.childNodes):null,s,!i&&n?n:o?o.__e:t.firstChild,i),A(s,e)}function V(e,t){L(e,t,V)}function I(e,t,n){var a,i,o,s=h({},e.props);for(o in t)"key"==o?a=t[o]:"ref"==o?i=t[o]:s[o]=t[o];return arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),g(e.type,s,a||e.key,i||e.ref,null)}function H(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(_)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=d.slice,a={__e:function(e,t){for(var n,r,a;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),a=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),a=n.__d),a)return n.__E=n}catch(t){e=t}throw e}},i=0,w.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},n),this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),_(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_(this))},w.prototype.render=y,o=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,E.__r=0,u=0},48186:(e,t,n)=>{"use strict";var r=n(37320),a=n(12139);t.useSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe,i=a.useState((function(){return{getCurrentValue:t,subscribe:n,value:t()}}));e=i[0];var o=i[1];return i=e.value,e.getCurrentValue===t&&e.subscribe===n||(i=t(),o({getCurrentValue:t,subscribe:n,value:i})),a.useDebugValue(i),a.useEffect((function(){function e(){if(!a){var e=t();o((function(a){return a.getCurrentValue!==t||a.subscribe!==n||a.value===e?a:r({},a,{value:e})}))}}var a=!1,i=n(e);return e(),function(){a=!0,i()}}),[t,n]),i}},36718:(e,t,n)=>{"use strict";e.exports=n(48186)},78376:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ActionTypes:()=>i,Interpreter:()=>wt,InterpreterStatus:()=>mt,Machine:()=>Rt,SpecialTargets:()=>o,State:()=>it,StateNode:()=>Mt,actions:()=>a,assign:()=>Bt,createMachine:()=>Pt,createSchema:()=>At,doneInvoke:()=>It,forwardTo:()=>Vt,interpret:()=>xt,mapState:()=>Ot,matchState:()=>zt,matchesState:()=>A,send:()=>Dt,sendParent:()=>Nt,sendUpdate:()=>Lt,spawn:()=>bt,spawnBehavior:()=>gt,t:()=>Tt,toActorRef:()=>We,toEventObject:()=>ae,toObserver:()=>ue,toSCXMLEvent:()=>ie});var r={};n.r(r),n.d(r,{after:()=>b,assign:()=>w,cancel:()=>m,choose:()=>R,doneState:()=>x,error:()=>j,errorExecution:()=>C,errorPlatform:()=>S,init:()=>E,invoke:()=>k,log:()=>_,nullEvent:()=>y,pure:()=>P,raise:()=>v,send:()=>g,start:()=>h,stop:()=>p,update:()=>M});var a={};n.r(a),n.d(a,{actionTypes:()=>r,after:()=>Ae,assign:()=>Oe,cancel:()=>je,choose:()=>Ie,done:()=>Te,doneInvoke:()=>Be,error:()=>De,escalate:()=>Ve,forwardTo:()=>Le,getActionFunction:()=>fe,initEvent:()=>de,isActionObject:()=>ze,log:()=>Ce,pure:()=>Ne,raise:()=>ge,resolveActions:()=>He,resolveLog:()=>Se,resolveRaise:()=>me,resolveSend:()=>we,resolveStop:()=>Pe,respond:()=>Ee,send:()=>ye,sendParent:()=>be,sendTo:()=>xe,sendUpdate:()=>_e,start:()=>Me,stop:()=>Re,toActionObject:()=>he,toActionObjects:()=>pe,toActivityDefinition:()=>ve});var i,o,s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},s.apply(this,arguments)};function l(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function u(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function d(e,t,n){if(n||2===arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(i||(i={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(o||(o={}));var f,h=i.Start,p=i.Stop,v=i.Raise,g=i.Send,m=i.Cancel,y=i.NullEvent,w=i.Assign,b=i.After,x=i.DoneState,_=i.Log,E=i.Init,k=i.Invoke,C=i.ErrorExecution,S=i.ErrorPlatform,j=i.ErrorCustom,M=i.Update,R=i.Choose,P=i.Pure,O={},z="xstate.guard";function A(e,t,n){void 0===n&&(n=".");var r=D(e,n),a=D(t,n);return J(a)?!!J(r)&&a===r:J(r)?r in a:Object.keys(r).every((function(e){return e in a&&A(r[e],a[e])}))}function T(e){try{return J(e)||"number"==typeof e?"".concat(e):e.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function B(e,t){try{return Z(e)?e:e.toString().split(t)}catch(n){throw new Error("'".concat(e,"' is not a valid state path."))}}function D(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:Z(e)?N(e):"string"!=typeof e?e:N(B(e,t));var n}function N(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function L(e,t){for(var n={},r=Object.keys(e),a=0;a<r.length;a++){var i=r[a];n[i]=t(e[i],i,e,a)}return n}function V(e,t,n){var r,a,i={};try{for(var o=u(Object.keys(e)),s=o.next();!s.done;s=o.next()){var l=s.value,c=e[l];n(c)&&(i[l]=t(c,l,e))}}catch(d){r={error:d}}finally{try{s&&!s.done&&(a=o.return)&&a.call(o)}finally{if(r)throw r.error}}return i}var I=function(e){return function(t){var n,r,a=t;try{for(var i=u(e),o=i.next();!o.done;o=i.next()){a=a[o.value]}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return a}};function H(e){return e?J(e)?[[e]]:F(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?H(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function F(e){var t;return(t=[]).concat.apply(t,d([],c(e),!1))}function G(e){return Z(e)?e:[e]}function Y(e){return void 0===e?[]:G(e)}function q(e,t,n){var r,a;if(Q(e))return e(t,n.data);var i={};try{for(var o=u(Object.keys(e)),s=o.next();!s.done;s=o.next()){var l=s.value,c=e[l];Q(c)?i[l]=c(t,n.data):i[l]=c}}catch(d){r={error:d}}finally{try{s&&!s.done&&(a=o.return)&&a.call(o)}finally{if(r)throw r.error}}return i}function W(e){return e instanceof Promise||!(null===e||!Q(e)&&"object"!=typeof e||!Q(e.then))}function U(e,t){var n,r,a=c([[],[]],2),i=a[0],o=a[1];try{for(var s=u(e),l=s.next();!l.done;l=s.next()){var d=l.value;t(d)?i.push(d):o.push(d)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[i,o]}function X(e,t){return L(e.states,(function(e,n){if(e){var r=(J(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:X(e,r)}}}))}function $(e,t,n,r){var a=e?n.reduce((function(e,n){var a,i,o=n.assignment,s={state:r,action:n,_event:t},l={};if(Q(o))l=o(e,t.data,s);else try{for(var c=u(Object.keys(o)),d=c.next();!d.done;d=c.next()){var f=d.value,h=o[f];l[f]=Q(h)?h(e,t.data,s):h}}catch(p){a={error:p}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(a)throw a.error}}return Object.assign({},e,l)}),e):e;return a}var K=function(){};function Z(e){return Array.isArray(e)}function Q(e){return"function"==typeof e}function J(e){return"string"==typeof e}function ee(e,t){if(e)return J(e)?{type:z,name:e,predicate:t?t[e]:void 0}:Q(e)?{type:z,name:e.name,predicate:e}:e}var te=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();(f={})[te]=function(){return this},f[Symbol.observable]=function(){return this};function ne(e){return!!e&&"__xstatenode"in e}var re=function(){var e=0;return function(){return(++e).toString(16)}}();function ae(e,t){return J(e)||"number"==typeof e?s({type:e},t):e}function ie(e,t){if(!J(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=ae(e);return s({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function oe(e,t){return G(t).map((function(t){return void 0===t||"string"==typeof t||ne(t)?{target:t,event:e}:s(s({},t),{event:e})}))}function se(e,t,n,r,a){var i=e.options.guards,o={state:a,cond:t,_event:r};if(t.type===z)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,o);var s=null==i?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,o)}function le(e){return"string"==typeof e?{type:e}:e}function ue(e,t,n){if("object"==typeof e)return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function ce(e,t){return"".concat(e,":invocation[").concat(t,"]")}var de=ie({type:E});function fe(e,t){return t&&t[e]||void 0}function he(e,t){var n;if(J(e)||"number"==typeof e)n=Q(r=fe(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(Q(e))n={type:e.name||e.toString(),exec:e};else{var r;if(Q(r=fe(e.type,t)))n=s(s({},e),{exec:r});else if(r){var a=r.type||e.type;n=s(s(s({},r),e),{type:a})}else n=e}return n}var pe=function(e,t){return e?(Z(e)?e:[e]).map((function(e){return he(e,t)})):[]};function ve(e){var t=he(e);return s(s({id:J(e)?e:t.id},t),{type:t.type})}function ge(e){return J(e)?{type:v,event:e}:ye(e,{to:o.Internal})}function me(e){return{type:v,_event:ie(e.event)}}function ye(e,t){return{to:t?t.to:void 0,type:g,event:Q(e)?e:ae(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:Q(e)?e.name:T(e)}}function we(e,t,n,r){var a,i={_event:n},o=ie(Q(e.event)?e.event(t,n.data,i):e.event);if(J(e.delay)){var l=r&&r[e.delay];a=Q(l)?l(t,n.data,i):l}else a=Q(e.delay)?e.delay(t,n.data,i):e.delay;var u=Q(e.to)?e.to(t,n.data,i):e.to;return s(s({},e),{to:u,_event:o,event:o.data,delay:a})}function be(e,t){return ye(e,s(s({},t),{to:o.Parent}))}function xe(e,t,n){return ye(t,s(s({},n),{to:e}))}function _e(){return be(M)}function Ee(e,t){return ye(e,s(s({},t),{to:function(e,t,n){return n._event.origin}}))}var ke=function(e,t){return{context:e,event:t}};function Ce(e,t){return void 0===e&&(e=ke),{type:_,label:t,expr:e}}var Se=function(e,t,n){return s(s({},e),{value:J(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},je=function(e){return{type:m,sendId:e}};function Me(e){var t=ve(e);return{type:i.Start,activity:t,exec:void 0}}function Re(e){var t=Q(e)?e:ve(e);return{type:i.Stop,activity:t,exec:void 0}}function Pe(e,t,n){var r=Q(e.activity)?e.activity(t,n.data):e.activity,a="string"==typeof r?{id:r}:r;return{type:i.Stop,activity:a}}var Oe=function(e){return{type:w,assignment:e}};function ze(e){return"object"==typeof e&&"type"in e}function Ae(e,t){var n=t?"#".concat(t):"";return"".concat(i.After,"(").concat(e,")").concat(n)}function Te(e,t){var n="".concat(i.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Be(e,t){var n="".concat(i.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function De(e,t){var n="".concat(i.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Ne(e){return{type:i.Pure,get:e}}function Le(e,t){return ye((function(e,t){return t}),s(s({},t),{to:e}))}function Ve(e,t){return be((function(t,n,r){return{type:j,data:Q(e)?e(t,n,r):e}}),s(s({},t),{to:o.Parent}))}function Ie(e){return{type:i.Choose,conds:e}}function He(e,t,n,r,a,i){void 0===i&&(i=!1);var o=c(i?[[],a]:U(a,(function(e){return e.type===w})),2),l=o[0],u=o[1],f=l.length?$(n,r,l,t):n,h=i?[n]:void 0,m=F(u.map((function(n){var a;switch(n.type){case v:return me(n);case g:var o=we(n,f,r,e.options.delays);return o;case _:return Se(n,f,r);case R:if(!(y=null===(a=n.conds.find((function(n){var a=ee(n.cond,e.options.guards);return!a||se(e,a,f,r,t)})))||void 0===a?void 0:a.actions))return[];var l=c(He(e,t,f,r,pe(Y(y),e.options.actions),i),2),u=l[0],m=l[1];return f=m,null==h||h.push(f),u;case P:var y;if(!(y=n.get(f,r.data)))return[];var b=c(He(e,t,f,r,pe(Y(y),e.options.actions),i),2),x=b[0],E=b[1];return f=E,null==h||h.push(f),x;case p:return Pe(n,f,r);case w:f=$(f,r,[n],t),null==h||h.push(f);break;default:var k=he(n,e.options.actions),C=k.exec;if(C&&h){var S=h.length-1;k=s(s({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];C.apply(void 0,d([h[S]],c(t),!1))}})}return k}})).filter((function(e){return!!e})));return[m,f]}var Fe=[],Ge=function(e,t){Fe.push(e);var n=t(e);return Fe.pop(),n};function Ye(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[te]=function(){return this},t}function qe(e,t,n){var r=Ye(t);if(r.deferred=!0,ne(e)){var a=r.state=Ge(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return a}}return r}function We(e){var t;return s(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[te]=function(){return this},t),e)}var Ue=function(e){return"atomic"===e.type||"final"===e.type};function Xe(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function $e(e){var t=[e];return Ue(e)?t:t.concat(F(Xe(e).map($e)))}function Ke(e,t){var n,r,a,i,o,s,l,c,d=Qe(new Set(e)),f=new Set(t);try{for(var h=u(f),p=h.next();!p.done;p=h.next())for(var v=(k=p.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}catch(C){n={error:C}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var g=Qe(f);try{for(var m=u(f),y=m.next();!y.done;y=m.next()){if("compound"!==(k=y.value).type||g.get(k)&&g.get(k).length){if("parallel"===k.type)try{for(var w=(o=void 0,u(Xe(k))),b=w.next();!b.done;b=w.next()){var x=b.value;"history"!==x.type&&(f.has(x)||(f.add(x),d.get(x)?d.get(x).forEach((function(e){return f.add(e)})):x.initialStateNodes.forEach((function(e){return f.add(e)}))))}}catch(S){o={error:S}}finally{try{b&&!b.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}}else d.get(k)?d.get(k).forEach((function(e){return f.add(e)})):k.initialStateNodes.forEach((function(e){return f.add(e)}))}}catch(j){a={error:j}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(a)throw a.error}}try{for(var _=u(f),E=_.next();!E.done;E=_.next()){var k;for(v=(k=E.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}}catch(M){l={error:M}}finally{try{E&&!E.done&&(c=_.return)&&c.call(_)}finally{if(l)throw l.error}}return f}function Ze(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(Ue(r))return r.key}var a={};return n.forEach((function(e){a[e.key]=Ze(e,t)})),a}function Qe(e){var t,n,r=new Map;try{for(var a=u(e),i=a.next();!i.done;i=a.next()){var o=i.value;r.has(o)||r.set(o,[]),o.parent&&(r.has(o.parent)||r.set(o.parent,[]),r.get(o.parent).push(o))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r}function Je(e,t){return Ze(e,Qe(Ke([e],t)))}function et(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function tt(e,t){return"compound"===t.type?Xe(t).some((function(t){return"final"===t.type&&et(e,t)})):"parallel"===t.type&&Xe(t).every((function(t){return tt(e,t)}))}function nt(e){return new Set(F(e.map((function(e){return e.tags}))))}function rt(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(J(e)||J(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return rt(e[n],t[n])}))}function at(e){return"object"==typeof e&&null!==e&&("value"in e&&"_event"in e)}var it=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=O,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||O,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return d([],c(new Set(F(d([],c(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:de,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=de;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),J(e))return[e];var r=Object.keys(e);return r.concat.apply(r,d([],c(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=l(e,["configuration","transitions","tags","machine"]);return s(s({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return A(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;K(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),ot={deferEvents:!1},st=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=s(s({},ot),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),lt=new Map,ut=0,ct=function(){return"x:".concat(ut++)},dt=function(e,t){return lt.set(e,t),e},ft=function(e){return lt.get(e)},ht=function(e){lt.delete(e)};function pt(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}function vt(e){if(pt()){var t=function(){var e=pt();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function gt(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,a=[],i=!1,o=We({id:t.id,send:function(t){a.push(t),function(){if(!i){for(i=!0;a.length>0;){var t=a.shift();n=e.transition(n,t,s),r.forEach((function(e){return e.next(n)}))}i=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,a){var i=ue(e,t,a);return r.add(i),i.next(n),{unsubscribe:function(){r.delete(i)}}}}),s={parent:t.parent,self:o,id:t.id||"anonymous",observers:r};return n=e.start?e.start(s):n,o}var mt,yt={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(mt||(mt={}));var wt=function(){function e(t,n){var r=this;void 0===n&&(n=e.defaultOptions),this.machine=t,this.scheduler=new st,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=mt.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(e,t){if(Z(e))return r.batch(e),r.state;var n=ie(ae(e,t));if(r.status===mt.Stopped)return r.state;if(r.status!==mt.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r.nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t){var n,a=r.parent&&(t===o.Parent||r.parent.id===t),i=a?r.parent:J(t)?r.children.get(t)||ft(t):(n=t)&&"function"==typeof n.send?t:void 0;if(i)"machine"in i?i.send(s(s({},e),{name:e.name===j?"".concat(De(r.id)):e.name,origin:r.sessionId})):i.send(e.data);else if(!a)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."))};var a=s(s({},e.defaultOptions),n),i=a.clock,l=a.logger,u=a.parent,c=a.id,d=void 0!==c?c:t.id;this.id=d,this.logger=l,this.clock=i,this.parent=u,this.options=a,this.scheduler=new st({deferEvents:this.options.deferEvents}),this.sessionId=ct()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Ge(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var a=u(e.actions),i=a.next();!i.done;i=a.next()){var o=i.value;this.exec(o,e,t)}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,a,i,o,s,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.options.execute&&this.execute(this.state),this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var f=u(this.eventListeners),h=f.next();!h.done;h=f.next()){(0,h.value)(e.event)}}catch(E){n={error:E}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}try{for(var p=u(this.listeners),v=p.next();!v.done;v=p.next()){(0,v.value)(e,e.event)}}catch(k){a={error:k}}finally{try{v&&!v.done&&(i=p.return)&&i.call(p)}finally{if(a)throw a.error}}try{for(var g=u(this.contextListeners),m=g.next();!m.done;m=g.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(C){o={error:C}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(o)throw o.error}}var y=tt(e.configuration||[],this.machine);if(this.state.configuration&&y){var w=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),b=w&&w.doneData?q(w.doneData,e.context,t):void 0;try{for(var x=u(this.doneListeners),_=x.next();!_.done;_=x.next()){(0,_.value)(Be(this.id,b))}}catch(S){l={error:S}}finally{try{_&&!_.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this.stop()}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===mt.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r,a=this;if(!e)return{unsubscribe:function(){}};var i=n;return"function"==typeof e?r=e:(r=e.next.bind(e),i=e.complete.bind(e)),this.listeners.add(r),this.status===mt.Running&&r(this.state),i&&this.onDone(i),{unsubscribe:function(){r&&a.listeners.delete(r),i&&a.doneListeners.delete(i)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===mt.Running)return this;this.machine._init(),dt(this.sessionId,this),this.initialized=!0,this.status=mt.Running;var n=void 0===e?this.initialState:Ge(this,(function(){return at(e)?t.machine.resolveState(e):t.machine.resolveState(it.from(e,t.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,de)})),this},e.prototype.stop=function(){var e,t,n,r,a,i,o,s,l,f,h=this;try{for(var p=u(this.listeners),v=p.next();!v.done;v=p.next()){var g=v.value;this.listeners.delete(g)}}catch(S){e={error:S}}finally{try{v&&!v.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}try{for(var m=u(this.stopListeners),y=m.next();!y.done;y=m.next()){(g=y.value)(),this.stopListeners.delete(g)}}catch(j){n={error:j}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}try{for(var w=u(this.contextListeners),b=w.next();!b.done;b=w.next()){g=b.value;this.contextListeners.delete(g)}}catch(M){a={error:M}}finally{try{b&&!b.done&&(i=w.return)&&i.call(w)}finally{if(a)throw a.error}}try{for(var x=u(this.doneListeners),_=x.next();!_.done;_=x.next()){g=_.value;this.doneListeners.delete(g)}}catch(R){o={error:R}}finally{try{_&&!_.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}if(!this.initialized)return this;d([],c(this.state.configuration),!1).sort((function(e,t){return t.order-e.order})).forEach((function(e){var t,n;try{for(var r=u(e.definition.exit),a=r.next();!a.done;a=r.next()){var i=a.value;h.exec(i,h.state)}}catch(o){t={error:o}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}})),this.children.forEach((function(e){Q(e.stop)&&e.stop()}));try{for(var E=u(Object.keys(this.delayedEventsMap)),k=E.next();!k.done;k=E.next()){var C=k.value;this.clock.clearTimeout(this.delayedEventsMap[C])}}catch(P){l={error:P}}finally{try{k&&!k.done&&(f=E.return)&&f.call(E)}finally{if(l)throw l.error}}return this.scheduler.clear(),this.initialized=!1,this.status=mt.Stopped,ht(this.sessionId),this},e.prototype.batch=function(e){var t=this;if(this.status===mt.NotStarted&&this.options.deferEvents)0;else if(this.status!==mt.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));this.scheduler.schedule((function(){var n,r,a=t.state,i=!1,o=[],l=function(e){var n=ie(e);t.forward(n),a=Ge(t,(function(){return t.machine.transition(a,n)})),o.push.apply(o,d([],c(a.actions.map((function(e){return n=a,r=(t=e).exec,s(s({},t),{exec:void 0!==r?function(){return r(n.context,n.event,{action:t,state:n,_event:n._event})}:void 0});var t,n,r}))),!1)),i=i||!!a.changed};try{for(var f=u(e),h=f.next();!h.done;h=f.next()){l(h.value)}}catch(p){n={error:p}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}a.changed=i,a.actions=o,t.update(a,ie(e[e.length-1]))}))},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype.nextState=function(e){var t=this,n=ie(e);if(0===n.name.indexOf(S)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(S)})))throw n.data.data;return Ge(this,(function(){return t.machine.transition(t.state,n)}))},e.prototype.forward=function(e){var t,n;try{for(var r=u(this.forwardTo),a=r.next();!a.done;a=r.next()){var i=a.value,o=this.children.get(i);if(!o)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(i,"'."));o.send(e)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this;this.delayedEventsMap[e.id]=this.clock.setTimeout((function(){e.to?t.sendTo(e._event,e.to):t.send(e._event)}),e.delay)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions);var r=t.context,a=t._event,o=e.exec||fe(e.type,n),s=Q(o)?o:o?o.exec:e.exec;if(s)try{return s(r,a.data,{action:e,state:this.state,_event:a})}catch(C){throw this.parent&&this.parent.send({type:"xstate.error",data:C}),C}switch(e.type){case g:var l=e;if("number"==typeof l.delay)return void this.defer(l);l.to?this.sendTo(l._event,l.to):this.send(l._event);break;case m:this.cancel(e.sendId);break;case h:if(this.status!==mt.Running)return;var u=e.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===i.Invoke){var c=le(u.src),d=this.machine.options.services?this.machine.options.services[c.type]:void 0,f=u.id,v=u.data;0;var y="autoForward"in u?u.autoForward:!!u.forward;if(!d)return void 0;var w=v?q(v,r,a):void 0;if("string"==typeof d)return;var b=Q(d)?d(r,a.data,{data:w,src:c,meta:u.meta}):d;if(!b)return;var x=void 0;ne(b)&&(b=w?b.withContext(w):b,x={autoForward:y}),this.spawn(b,f,x)}else this.spawnActivity(u);break;case p:this.stopChild(e.activity.id);break;case _:var E=e.label,k=e.value;E?this.logger(E,k):this.logger(k)}},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),Q(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(W(e))return this.spawnPromise(Promise.resolve(e),t);if(Q(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(t){return!1}}(a=e)&&"id"in a)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&Q(e.subscribe)}catch(t){return!1}}(e))return this.spawnObservable(e,t);if(ne(e))return this.spawnMachine(e,s(s({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,a},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var a=new e(t,s(s({},this.options),{parent:this,id:n.id||t.id})),i=s(s({},yt),n);i.sync&&a.onTransition((function(e){r.send(M,{state:e,id:a.id})}));var o=a;return this.children.set(a.id,o),i.autoForward&&this.forwardTo.add(a.id),a.onDone((function(e){r.removeChild(a.id),r.send(ie(e,{origin:a.id}))})).start(),o},e.prototype.spawnBehavior=function(e,t){var n=gt(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,a=this,i=!1;e.then((function(e){i||(r=e,a.removeChild(t),a.send(ie(Be(t,e),{origin:t})))}),(function(e){if(!i){a.removeChild(t);var n=De(t,e);try{a.send(ie(n,{origin:t}))}catch(r){a.devTools&&a.devTools.send(n,a.state),a.machine.strict&&a.stop()}}}));var o=((n={id:t,send:function(){},subscribe:function(t,n,r){var a=ue(t,n,r),i=!1;return e.then((function(e){i||(a.next(e),i||a.complete())}),(function(e){i||a.error(e)})),{unsubscribe:function(){return i=!0}}},stop:function(){i=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[te]=function(){return this},n);return this.children.set(t,o),o},e.prototype.spawnCallback=function(e,t){var n,r,a,i=this,o=!1,s=new Set,l=new Set;try{a=e((function(e){r=e,l.forEach((function(t){return t(e)})),o||i.send(ie(e,{origin:t}))}),(function(e){s.add(e)}))}catch(c){this.send(De(t,c))}if(W(a))return this.spawnPromise(a,t);var u=((n={id:t,send:function(e){return s.forEach((function(t){return t(e)}))},subscribe:function(e){var t=ue(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){o=!0,Q(a)&&a()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[te]=function(){return this},n);return this.children.set(t,u),u},e.prototype.spawnObservable=function(e,t){var n,r,a=this,i=e.subscribe((function(e){r=e,a.send(ie(e,{origin:t}))}),(function(e){a.removeChild(t),a.send(ie(De(t,e),{origin:t}))}),(function(){a.removeChild(t),a.send(ie(Be(t),{origin:t}))})),o=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return i.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[te]=function(){return this},n);return this.children.set(t,o),o},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[te]=function(){return this},n))},e.prototype.attachDev=function(){var e=pt();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(s(s({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:s({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}vt(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[te]=function(){return this},e.prototype.getSnapshot=function(){return this.status===mt.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=xt,e}();function bt(e,t){var n=function(e){return J(e)?s(s({},yt),{name:e}):s(s(s({},yt),{name:re()}),e)}(t);return function(t){return t?t.spawn(e,n.name,n):qe(e,n.name)}(Fe[Fe.length-1])}function xt(e,t){return new wt(e,t)}function _t(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function Et(e){return s(s({type:k},e),{toJSON:function(){e.onDone,e.onError;var t=l(e,["onDone","onError"]);return s(s({},t),{type:k,src:_t(e.src)})}})}var kt="",Ct="*",St={},jt=function(e){return"#"===e[0]},Mt=function(){function e(t,n,r,a){var i,o=this;void 0===r&&(r="context"in t?t.context:void 0),this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==a?void 0:a.parent,this.key=this.config.key||(null==a?void 0:a.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||d([this.machine.key],c(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?L(this.config.states,(function(t,n){var r,a=new e(t,{},void 0,{parent:o,key:n});return Object.assign(o.idMap,s(((r={})[a.id]=a,r),a.idMap)),a})):St;var l=0;!function e(t){var n,r;t.order=l++;try{for(var a=u(Xe(t)),i=a.next();!i.done;i=a.next()){e(i.value)}}catch(o){n={error:o}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===kt})):kt in this.config.on),this.strict=!!this.config.strict,this.onEntry=Y(this.config.entry||this.config.onEntry).map((function(e){return he(e)})),this.onExit=Y(this.config.exit||this.config.onExit).map((function(e){return he(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Y(this.config.invoke).map((function(e,t){var n,r;if(ne(e)){var a=ce(o.id,t);return o.machine.options.services=s(((n={})[a]=e,n),o.machine.options.services),Et({src:a,id:a})}if(J(e.src)){a=e.id||ce(o.id,t);return Et(s(s({},e),{id:a,src:e.src}))}if(ne(e.src)||Q(e.src)){a=e.id||ce(o.id,t);return o.machine.options.services=s(((r={})[a]=e.src,r),o.machine.options.services),Et(s(s({id:a},e),{src:a}))}var i=e.src;return Et(s(s({id:ce(o.id,t)},e),{src:i}))})),this.activities=Y(this.config.activities).concat(this.invoke).map((function(e){return ve(e)})),this.transition=this.transition.bind(this),this.tags=Y(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||$e(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,a=r.actions,i=r.activities,o=r.guards,l=r.services,u=r.delays;return new e(this.config,{actions:s(s({},a),t.actions),activities:s(s({},i),t.activities),guards:s(s({},o),t.guards),services:s(s({},l),t.services),delays:s(s({},u),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return Q(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:L(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===kt,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===Ct}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=Ae(Q(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(ye(r,{delay:t})),e.onExit.push(je(r)),r};return(Z(t)?t.map((function(e,t){var r=n(e.delay,t);return s(s({},e),{event:r})})):F(Object.keys(t).map((function(e,r){var a=t[e],i=J(a)?{target:a}:a,o=isNaN(+e)?e:+e,l=n(o,r);return Y(i).map((function(e){return s(s({},e),{event:l,delay:o})}))})))).map((function(t){var n=t.delay;return s(s({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof it?e.value:D(e,this.delimiter);if(J(r)){var a=this.getStateNode(r).initial;return void 0!==a?this.getStateNodes(((t={})[r]=a,t)):[this,this.states[r]]}var i=Object.keys(r),o=[this];return o.push.apply(o,d([],c(F(i.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),o},e.prototype.handles=function(e){var t=T(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof it?e:it.create(e),n=Array.from(Ke([],this.getStateNodes(t.value)));return new it(s(s({},t),{value:this.resolve(t.value),configuration:n,done:tt(n,this),tags:nt(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),a=this.getStateNode(r[0])._transition(e[r[0]],t,n);return a&&a.transitions.length?a:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,a,i={};try{for(var o=u(Object.keys(e)),s=o.next();!s.done;s=o.next()){var l=s.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(i[l]=d)}}}catch(g){r={error:g}}finally{try{s&&!s.done&&(a=o.return)&&a.call(o)}finally{if(r)throw r.error}}var f=Object.keys(i).map((function(e){return i[e]})),h=F(f.map((function(e){return e.transitions})));if(!f.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=F(f.map((function(e){return e.entrySet}))),v=F(Object.keys(i).map((function(e){return i[e].configuration})));return{transitions:h,entrySet:p,exitSet:F(f.map((function(e){return e.exitSet}))),configuration:v,source:t,actions:F(Object.keys(i).map((function(e){return i[e].actions})))}},e.prototype._transition=function(e,t,n){return J(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,ie(t))},e.prototype.next=function(e,t){var n,r,a,i=this,o=t.name,s=[],l=[];try{for(var f=u(this.getCandidates(o)),h=f.next();!h.done;h=f.next()){var p=h.value,v=p.cond,g=p.in,m=e.context,y=!g||(J(g)&&jt(g)?e.matches(D(this.getStateNodeById(g).path,this.delimiter)):A(D(g,this.delimiter),I(this.path.slice(0,-2))(e.value))),w=!1;try{w=!v||se(this.machine,v,m,t,e)}catch(_){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(o,"' in state node '").concat(this.id,"':\n").concat(_.message))}if(w&&y){void 0!==p.target&&(l=p.target),s.push.apply(s,d([],c(p.actions),!1)),a=p;break}}}catch(E){n={error:E}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}if(a){if(!l.length)return{transitions:[a],entrySet:[],exitSet:[],configuration:e.value?[this]:[],source:e,actions:s};var b=F(l.map((function(t){return i.getRelativeStateNodes(t,e.historyValue)}))),x=!!a.internal;return{transitions:[a],entrySet:x?[]:F(b.map((function(e){return i.nodesFromChild(e)}))),exitSet:x?[]:[this],configuration:b,source:e,actions:s}}},e.prototype.nodesFromChild=function(e){if(e.escapes(this))return[];for(var t=[],n=e;n&&n!==this;)t.push(n),n=n.parent;return t.push(this),t},e.prototype.escapes=function(e){if(this===e)return!1;for(var t=this.parent;t;){if(t===e)return!1;t=t.parent}return!0},e.prototype.getActions=function(e,t,n,r){var a,i,o,s,l=Ke([],r?this.getStateNodes(r.value):[this]),f=e.configuration.length?Ke(l,e.configuration):l;try{for(var h=u(f),p=h.next();!p.done;p=h.next()){et(l,m=p.value)||e.entrySet.push(m)}}catch(k){a={error:k}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(a)throw a.error}}try{for(var v=u(l),g=v.next();!g.done;g=v.next()){var m;et(f,m=g.value)&&!et(e.exitSet,m.parent)||e.exitSet.push(m)}}catch(C){o={error:C}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(o)throw o.error}}var y=F(e.entrySet.map((function(r){var a=[];if("final"!==r.type)return a;var i=r.parent;if(!i.parent)return a;a.push(Te(r.id,r.doneData),Te(i.id,r.doneData?q(r.doneData,t,n):void 0));var o=i.parent;return"parallel"===o.type&&Xe(o).every((function(t){return tt(e.configuration,t)}))&&a.push(Te(o.id)),a})));e.exitSet.sort((function(e,t){return t.order-e.order})),e.entrySet.sort((function(e,t){return e.order-t.order}));var w=new Set(e.entrySet),b=new Set(e.exitSet),x=c([F(Array.from(w).map((function(e){return d(d([],c(e.activities.map((function(e){return Me(e)}))),!1),c(e.onEntry),!1)}))).concat(y.map(ge)),F(Array.from(b).map((function(e){return d(d([],c(e.onExit),!1),c(e.activities.map((function(e){return Re(e)}))),!1)})))],2),_=x[0],E=x[1];return pe(E.concat(e.actions).concat(_),this.machine.options.actions)},e.prototype.transition=function(e,t,n){void 0===e&&(e=this.initialState);var r,a,i=ie(t);if(e instanceof it)r=void 0===n?e:this.resolveState(it.from(e,n));else{var o=J(e)?this.resolve(N(this.getResolvedPath(e))):this.resolve(e),s=null!=n?n:this.machine.context;r=this.resolveState(it.from(o,s))}if(this.strict&&!this.events.includes(i.name)&&(a=i.name,!/^(done|error)\./.test(a)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var l=this._transition(r.value,r,i)||{transitions:[],configuration:[],entrySet:[],exitSet:[],source:r,actions:[]},u=Ke([],this.getStateNodes(r.value)),f=l.configuration.length?Ke(u,l.configuration):u;return l.configuration=d([],c(f),!1),this.resolveTransition(l,r,r.context,i)},e.prototype.resolveRaisedTransition=function(e,t,n){var r,a=e.actions;return(e=this.transition(e,t))._event=n,e.event=n.data,(r=e.actions).unshift.apply(r,d([],c(a),!1)),e},e.prototype.resolveTransition=function(e,t,n,r){var a,i,l=this;void 0===r&&(r=de);var d=e.configuration,f=!t||e.transitions.length>0,m=f?Je(this.machine,d):void 0,w=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,b=this.getActions(e,n,r,t),x=t?s({},t.activities):{};try{for(var _=u(b),E=_.next();!E.done;E=_.next()){var C=E.value;C.type===h?x[C.activity.id||C.activity.type]=C:C.type===p&&(x[C.activity.id||C.activity.type]=!1)}}catch($){a={error:$}}finally{try{E&&!E.done&&(i=_.return)&&i.call(_)}finally{if(a)throw a.error}}var S,j,R=c(He(this,t,n,r,b,this.machine.config.preserveActionOrder),2),P=R[0],O=R[1],z=c(U(P,(function(e){return e.type===v||e.type===g&&e.to===o.Internal})),2),A=z[0],T=z[1],B=P.filter((function(e){var t;return e.type===h&&(null===(t=e.activity)||void 0===t?void 0:t.type)===k})),D=B.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var a,i=le(e.src),o=null===(a=null==t?void 0:t.options.services)||void 0===a?void 0:a[i.type],s=e.data?q(e.data,n,r):void 0,l=o?qe(o,e.id,s):Ye(e.id);return l.meta=e,l}(t.activity,l.machine,O,r),e}),t?s({},t.children):{}),N=f?e.configuration:t?t.configuration:[],L=tt(N,this),V=new it({value:m||t.value,context:O,_event:r,_sessionid:t?t._sessionid:null,historyValue:m?w?(S=w,j=m,{current:j,states:X(S,j)}):void 0:t?t.historyValue:void 0,history:!m||e.source?t:void 0,actions:m?T:[],activities:m?x:t?t.activities:{},events:[],configuration:N,transitions:e.transitions,children:D,done:L,tags:null==t?void 0:t.tags,machine:this}),I=n!==O;V.changed=r.name===M||I;var H=V.history;H&&delete H.history;var F=!L&&(this._transient||d.some((function(e){return e._transient})));if(!(f||F&&r.name!==kt))return V;var G=V;if(!L)for(F&&(G=this.resolveRaisedTransition(G,{type:y},r));A.length;){var Y=A.shift();G=this.resolveRaisedTransition(G,Y._event,r)}var W=G.changed||(H?!!G.actions.length||I||typeof H.value!=typeof G.value||!rt(G.value,H.value):void 0);return G.changed=W,G.history=H,G.tags=nt(G.configuration),G},e.prototype.getStateNode=function(e){if(jt(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=jt(e)?e.slice("#".length):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&jt(e))try{return this.getStateNodeById(e.slice(1))}catch(a){}for(var t=B(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||St;switch(this.type){case"parallel":return L(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):St}));case"compound":if(J(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?L(e,(function(e,t){return e?n.getStateNode(t).resolve(e):St})):this.initialStateValue||{};default:return e||St}},e.prototype.getResolvedPath=function(e){if(jt(e)){var t=this.machine.idMap[e.slice("#".length)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return B(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=V(this.states,(function(e){return e.initialStateValue||St}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=Ue(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,entrySet:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=J(t.target)&&jt(t.target)?N(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return Ue(this)?[this]:"compound"!==this.type||this.initial?F(H(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):[this]},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=c(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var a=this.getStateNode(n);if("history"===a.type)return a.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:V(this.states,(function(t,n){if(!e)return t.historyValue();var r=J(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?F(H(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var a,i,o=(a=n.path,i="states",function(e){var t,n,r=e;try{for(var o=u(a),s=o.next();!s.done;s=o.next()){var l=s.value;r=r[i][l]}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r})(e).current;return J(o)?[n.getStateNode(o)]:F(H(o).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=F(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var a=this.states,i=new Set(this.ownEvents);if(a)try{for(var o=u(Object.keys(a)),s=o.next();!s.done;s=o.next()){var l=a[s.value];if(l.states)try{for(var c=(n=void 0,u(l.events)),d=c.next();!d.done;d=c.next()){var f=d.value;i.add("".concat(f))}}catch(h){n={error:h}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(p){e={error:p}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!J(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(a){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(a.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return Y(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return J(e)&&e[0]===t.delimiter})),a=this.machine.options.guards,i=this.resolveTarget(n),o=s(s({},e),{actions:pe(Y(e.actions)),cond:ee(e.cond,a),target:i,source:this,internal:r,eventType:e.event,toJSON:function(){return s(s({},o),{target:o.target?o.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return o},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var a=this.config.on,i=Ct,o=a[i],s=void 0===o?[]:o,f=l(a,["*"]);n=F(Object.keys(f).map((function(e){var t=oe(e,f[e]);return t})).concat(oe(Ct,s)))}else n=[];var h=this.config.always?oe("",this.config.always):[],p=this.config.onDone?oe(String(Te(this.id)),this.config.onDone):[];var v=F(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,d([],c(oe(String(Be(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,d([],c(oe(String(De(e.id)),e.onError)),!1)),t}))),g=this.after,m=F(d(d(d(d([],c(p),!1),c(v),!1),c(n),!1),c(h),!1).map((function(e){return Y(e).map((function(e){return r.formatTransition(e)}))})));try{for(var y=u(g),w=y.next();!w.done;w=y.next()){var b=w.value;m.push(b)}}catch(x){e={error:x}}finally{try{w&&!w.done&&(t=y.return)&&t.call(y)}finally{if(e)throw e.error}}return m},e}();function Rt(e,t,n){return void 0===n&&(n=e.context),new Mt(e,t,n)}function Pt(e,t){return new Mt(e,t)}function Ot(e,t){var n,r,a;try{for(var i=u(Object.keys(e)),o=i.next();!o.done;o=i.next()){var s=o.value;A(s,t)&&(!a||t.length>a.length)&&(a=s)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e[a]}function zt(e,t,n){var r,a,i=it.from(e,e instanceof it?e.context:void 0);try{for(var o=u(t),s=o.next();!s.done;s=o.next()){var l=c(s.value,2),d=l[0],f=l[1];if(i.matches(d))return f(i)}}catch(h){r={error:h}}finally{try{s&&!s.done&&(a=o.return)&&a.call(o)}finally{if(r)throw r.error}}return n(i)}function At(e){return e}var Tt=At,Bt=Oe,Dt=ye,Nt=be,Lt=_e,Vt=Le,It=Be},10557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(57649),a=n(60035),i=n(84743);function o(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[a.symbolObservable]=function(){return this},t}function s(e,t,n){var r=o(t);if(r.deferred=!0,a.isMachine(e)){var s=r.state=i.provide(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return s}}return r}function l(e){try{return"function"==typeof e.send}catch(t){return!1}}t.createDeferredActor=s,t.createInvocableActor=function(e,t,n,r){var i,l=a.toInvokeSource(e.src),u=null===(i=null==t?void 0:t.options.services)||void 0===i?void 0:i[l.type],c=e.data?a.mapContext(e.data,n,r):void 0,d=u?s(u,e.id,c):o(e.id);return d.meta=e,d},t.createNullActor=o,t.isActor=l,t.isSpawnedActor=function(e){return l(e)&&"id"in e},t.toActorRef=function(e){var t;return r.__assign(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[a.symbolObservable]=function(){return this},t),e)}},57649:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__assign=function(){return t.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.__assign.apply(this,arguments)},t.__read=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o},t.__rest=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},t.__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))},t.__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}},83521:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(94309),a=r.ActionTypes.Start,i=r.ActionTypes.Stop,o=r.ActionTypes.Raise,s=r.ActionTypes.Send,l=r.ActionTypes.Cancel,u=r.ActionTypes.NullEvent,c=r.ActionTypes.Assign,d=r.ActionTypes.After,f=r.ActionTypes.DoneState,h=r.ActionTypes.Log,p=r.ActionTypes.Init,v=r.ActionTypes.Invoke,g=r.ActionTypes.ErrorExecution,m=r.ActionTypes.ErrorPlatform,y=r.ActionTypes.ErrorCustom,w=r.ActionTypes.Update,b=r.ActionTypes.Choose,x=r.ActionTypes.Pure;t.after=d,t.assign=c,t.cancel=l,t.choose=b,t.doneState=f,t.error=y,t.errorExecution=g,t.errorPlatform=m,t.init=p,t.invoke=v,t.log=h,t.nullEvent=u,t.pure=x,t.raise=o,t.send=s,t.start=a,t.stop=i,t.update=w},25612:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(57649),a=n(94309),i=n(83521),o=n(60035),s=n(78664),l=o.toSCXMLEvent({type:i.init});function u(e,t){return t&&t[e]||void 0}function c(e,t){var n;if(o.isString(e)||"number"==typeof e){var a=u(e,t);n=o.isFunction(a)?{type:e,exec:a}:a||{type:e,exec:void 0}}else if(o.isFunction(e))n={type:e.name||e.toString(),exec:e};else{a=u(e.type,t);if(o.isFunction(a))n=r.__assign(r.__assign({},e),{exec:a});else if(a){var i=a.type||e.type;n=r.__assign(r.__assign(r.__assign({},a),e),{type:i})}else n=e}return n}var d=function(e,t){return e?(o.isArray(e)?e:[e]).map((function(e){return c(e,t)})):[]};function f(e){var t=c(e);return r.__assign(r.__assign({id:o.isString(e)?e:t.id},t),{type:t.type})}function h(e){return{type:i.raise,_event:o.toSCXMLEvent(e.event)}}function p(e,t){return{to:t?t.to:void 0,type:i.send,event:o.isFunction(e)?e:o.toEventObject(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:o.isFunction(e)?e.name:o.getEventType(e)}}function v(e,t,n,a){var i,s={_event:n},l=o.toSCXMLEvent(o.isFunction(e.event)?e.event(t,n.data,s):e.event);if(o.isString(e.delay)){var u=a&&a[e.delay];i=o.isFunction(u)?u(t,n.data,s):u}else i=o.isFunction(e.delay)?e.delay(t,n.data,s):e.delay;var c=o.isFunction(e.to)?e.to(t,n.data,s):e.to;return r.__assign(r.__assign({},e),{to:c,_event:l,event:l.data,delay:i})}function g(e,t){return p(e,r.__assign(r.__assign({},t),{to:a.SpecialTargets.Parent}))}var m=function(e,t){return{context:e,event:t}};var y=function(e,t,n){return r.__assign(r.__assign({},e),{value:o.isString(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})};function w(e,t,n){var r=o.isFunction(e.activity)?e.activity(t,n.data):e.activity,i="string"==typeof r?{id:r}:r;return{type:a.ActionTypes.Stop,activity:i}}t.actionTypes=i,t.after=function(e,t){var n=t?"#".concat(t):"";return"".concat(a.ActionTypes.After,"(").concat(e,")").concat(n)},t.assign=function(e){return{type:i.assign,assignment:e}},t.cancel=function(e){return{type:i.cancel,sendId:e}},t.choose=function(e){return{type:a.ActionTypes.Choose,conds:e}},t.done=function(e,t){var n="".concat(a.ActionTypes.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r},t.doneInvoke=function(e,t){var n="".concat(a.ActionTypes.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r},t.error=function(e,t){var n="".concat(a.ActionTypes.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r},t.escalate=function(e,t){return g((function(t,n,r){return{type:i.error,data:o.isFunction(e)?e(t,n,r):e}}),r.__assign(r.__assign({},t),{to:a.SpecialTargets.Parent}))},t.forwardTo=function(e,t){return p((function(e,t){return t}),r.__assign(r.__assign({},t),{to:e}))},t.getActionFunction=u,t.initEvent=l,t.isActionObject=function(e){return"object"==typeof e&&"type"in e},t.log=function(e,t){return void 0===e&&(e=m),{type:i.log,label:t,expr:e}},t.pure=function(e){return{type:a.ActionTypes.Pure,get:e}},t.raise=function(e){return o.isString(e)?{type:i.raise,event:e}:p(e,{to:a.SpecialTargets.Internal})},t.resolveActions=function e(t,n,a,l,u,f){void 0===f&&(f=!1);var p=r.__read(f?[[],u]:o.partition(u,(function(e){return e.type===i.assign})),2),g=p[0],m=p[1],b=g.length?o.updateContext(a,l,g,n):a,x=f?[a]:void 0,_=o.flatten(m.map((function(a){var u;switch(a.type){case i.raise:return h(a);case i.send:var p=v(a,b,l,t.options.delays);return s.IS_PRODUCTION||o.warn(!o.isString(a.delay)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(a.delay,"' was found on machine '").concat(t.id,"'")),p;case i.log:return y(a,b,l);case i.choose:if(!(E=null===(u=a.conds.find((function(e){var r=o.toGuard(e.cond,t.options.guards);return!r||o.evaluateGuard(t,r,b,l,n)})))||void 0===u?void 0:u.actions))return[];var g=r.__read(e(t,n,b,l,d(o.toArray(E),t.options.actions),f),2),m=g[0],_=g[1];return b=_,null==x||x.push(b),m;case i.pure:var E;if(!(E=a.get(b,l.data)))return[];var k=r.__read(e(t,n,b,l,d(o.toArray(E),t.options.actions),f),2),C=k[0],S=k[1];return b=S,null==x||x.push(b),C;case i.stop:return w(a,b,l);case i.assign:b=o.updateContext(b,l,[a],n),null==x||x.push(b);break;default:var j=c(a,t.options.actions),M=j.exec;if(M&&x){var R=x.length-1;j=r.__assign(r.__assign({},j),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];M.apply(void 0,r.__spreadArray([x[R]],r.__read(t),!1))}})}return j}})).filter((function(e){return!!e})));return[_,b]},t.resolveLog=y,t.resolveRaise=h,t.resolveSend=v,t.resolveStop=w,t.respond=function(e,t){return p(e,r.__assign(r.__assign({},t),{to:function(e,t,n){return n._event.origin}}))},t.send=p,t.sendParent=g,t.sendTo=function(e,t,n){return p(t,r.__assign(r.__assign({},n),{to:e}))},t.sendUpdate=function(){return g(i.update)},t.start=function(e){var t=f(e);return{type:a.ActionTypes.Start,activity:t,exec:void 0}},t.stop=function(e){var t=o.isFunction(e)?e:f(e);return{type:a.ActionTypes.Stop,activity:t,exec:void 0}},t.toActionObject=c,t.toActionObjects=d,t.toActivityDefinition=f},26067:(e,t,n)=>{"use strict";var r=n(25612),a=n(10557),i=n(60035)},3442:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.DEFAULT_GUARD_TYPE="xstate.guard",t.EMPTY_ACTIVITY_MAP={},t.STATE_DELIMITER=".",t.TARGETLESS_KEY=""},78664:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IS_PRODUCTION=!0},84743:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=[];t.consume=function(e){return e(n[n.length-1])},t.provide=function(e,t){n.push(e);var r=t(e);return n.pop(),r}},94309:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=void 0,(n=t.ActionTypes||(t.ActionTypes={})).Start="xstate.start",n.Stop="xstate.stop",n.Raise="xstate.raise",n.Send="xstate.send",n.Cancel="xstate.cancel",n.NullEvent="",n.Assign="xstate.assign",n.After="xstate.after",n.DoneState="done.state",n.DoneInvoke="done.invoke",n.Log="xstate.log",n.Init="xstate.init",n.Invoke="xstate.invoke",n.ErrorExecution="error.execution",n.ErrorCommunication="error.communication",n.ErrorPlatform="error.platform",n.ErrorCustom="xstate.error",n.Update="xstate.update",n.Pure="xstate.pure",n.Choose="xstate.choose",t.SpecialTargets=void 0,(r=t.SpecialTargets||(t.SpecialTargets={})).Parent="#_parent",r.Internal="#_internal"},60035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(57649),i=n(3442),o=n(78664);function s(e,t){try{return g(e)?e:e.toString().split(t)}catch(n){throw new Error("'".concat(e,"' is not a valid state path."))}}function l(e){return"object"==typeof e&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function u(e,t){return l(e)?e.value:g(e)?c(e):"string"!=typeof e?e:c(s(e,t))}function c(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function d(e,t){for(var n={},r=Object.keys(e),a=0;a<r.length;a++){var i=r[a];n[i]=t(e[i],i,e,a)}return n}function f(e){var t;return(t=[]).concat.apply(t,a.__spreadArray([],a.__read(e),!1))}function h(e){return g(e)?e:[e]}function p(e){return void 0===e?[]:h(e)}function v(e,t){return d(e.states,(function(e,n){if(e){var r=(y(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:v(e,r)}}}))}function g(e){return Array.isArray(e)}function m(e){return"function"==typeof e}function y(e){return"string"==typeof e}t.warn=function(){},o.IS_PRODUCTION||(t.warn=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var w=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}(),b=((r={})[w]=function(){return this},r[Symbol.observable]=function(){return this},r);function x(e){return!!e&&"__xstatenode"in e}var _=function(){var e=0;return function(){return(++e).toString(16)}}();function E(e,t){return y(e)||"number"==typeof e?a.__assign({type:e},t):e}t.createInvokeId=function(e,t){return"".concat(e,":invocation[").concat(t,"]")},t.evaluateGuard=function(e,t,n,r,a){var o=e.options.guards,s={state:a,cond:t,_event:r};if(t.type===i.DEFAULT_GUARD_TYPE)return((null==o?void 0:o[t.name])||t.predicate)(n,r.data,s);var l=null==o?void 0:o[t.type];if(!l)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return l(n,r.data,s)},t.flatten=f,t.getActionType=function(e){try{return y(e)||"number"==typeof e?"".concat(e):m(e)?e.name:e.type}catch(t){throw new Error("Actions must be strings or objects with a string action.type property.")}},t.getEventType=function(e){try{return y(e)||"number"==typeof e?"".concat(e):e.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}},t.interopSymbols=b,t.isActor=function(e){return!!e&&"function"==typeof e.send},t.isArray=g,t.isBehavior=function(e){return null!==e&&"object"==typeof e&&"transition"in e&&"function"==typeof e.transition},t.isBuiltInEvent=function(e){return/^(done|error)\./.test(e)},t.isFunction=m,t.isMachine=x,t.isObservable=function(e){try{return"subscribe"in e&&m(e.subscribe)}catch(t){return!1}},t.isPromiseLike=function(e){return e instanceof Promise||!(null===e||!m(e)&&"object"!=typeof e||!m(e.then))},t.isStateLike=l,t.isString=y,t.keys=function(e){return Object.keys(e)},t.mapContext=function(e,t,n){var r,i;if(m(e))return e(t,n.data);var o={};try{for(var s=a.__values(Object.keys(e)),l=s.next();!l.done;l=s.next()){var u=l.value,c=e[u];m(c)?o[u]=c(t,n.data):o[u]=c}}catch(d){r={error:d}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},t.mapFilterValues=function(e,t,n){var r,i,o={};try{for(var s=a.__values(Object.keys(e)),l=s.next();!l.done;l=s.next()){var u=l.value,c=e[u];n(c)&&(o[u]=t(c,u,e))}}catch(d){r={error:d}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o},t.mapValues=d,t.matchesState=function e(t,n,r){void 0===r&&(r=i.STATE_DELIMITER);var a=u(t,r),o=u(n,r);return y(o)?!!y(a)&&o===a:y(a)?a in o:Object.keys(a).every((function(t){return t in o&&e(a[t],o[t])}))},t.nestedPath=function(e,t){return function(n){var r,i,o=n;try{for(var s=a.__values(e),l=s.next();!l.done;l=s.next()){var u=l.value;o=o[t][u]}}catch(c){r={error:c}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return o}},t.normalizeTarget=function(e){if(void 0!==e&&e!==i.TARGETLESS_KEY)return p(e)},t.partition=function(e,t){var n,r,i=a.__read([[],[]],2),o=i[0],s=i[1];try{for(var l=a.__values(e),u=l.next();!u.done;u=l.next()){var c=u.value;t(c)?o.push(c):s.push(c)}}catch(d){n={error:d}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[o,s]},t.path=function(e){return function(t){var n,r,i=t;try{for(var o=a.__values(e),s=o.next();!s.done;s=o.next()){i=i[s.value]}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},t.pathToStateValue=c,t.pathsToStateValue=function(e){var t,n,r={};if(e&&1===e.length&&1===e[0].length)return e[0][0];try{for(var i=a.__values(e),o=i.next();!o.done;o=i.next())for(var s=o.value,l=r,u=0;u<s.length;u++){var c=s[u];if(u===s.length-2){l[c]=s[u+1];break}l[c]=l[c]||{},l=l[c]}}catch(d){t={error:d}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},t.reportUnhandledExceptionOnInvocation=function(e,t,n){if(!o.IS_PRODUCTION){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var a=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(a))}}},t.symbolObservable=w,t.toArray=p,t.toArrayStrict=h,t.toEventObject=E,t.toGuard=function(e,t){if(e)return y(e)?{type:i.DEFAULT_GUARD_TYPE,name:e,predicate:t?t[e]:void 0}:m(e)?{type:i.DEFAULT_GUARD_TYPE,name:e.name,predicate:e}:e},t.toInvokeSource=function(e){return"string"==typeof e?{type:e}:e},t.toObserver=function(e,t,n){if("object"==typeof e)return e;var r=function(){};return{next:e,error:t||r,complete:n||r}},t.toSCXMLEvent=function(e,t){if(!y(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=E(e);return a.__assign({name:n.type,data:n,$$type:"scxml",type:"external"},t)},t.toStatePath=s,t.toStatePaths=function e(t){return t?y(t)?[[t]]:f(Object.keys(t).map((function(n){var r=t[n];return"string"==typeof r||r&&Object.keys(r).length?e(t[n]).map((function(e){return[n].concat(e)})):[[n]]}))):[[]]},t.toStateValue=u,t.toTransitionConfigArray=function(e,t){return h(t).map((function(t){return void 0===t||"string"==typeof t||x(t)?{target:t,event:e}:a.__assign(a.__assign({},t),{event:e})}))},t.uniqueId=_,t.updateContext=function(e,n,r,i){o.IS_PRODUCTION||t.warn(!!e,"Attempting to update undefined context");var s=e?r.reduce((function(e,t){var r,o,s=t.assignment,l={state:i,action:t,_event:n},u={};if(m(s))u=s(e,n.data,l);else try{for(var c=a.__values(Object.keys(s)),d=c.next();!d.done;d=c.next()){var f=d.value,h=s[f];u[f]=m(h)?h(e,n.data,l):h}}catch(p){r={error:p}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return Object.assign({},e,u)}),e):e;return s},t.updateHistoryStates=v,t.updateHistoryValue=function(e,t){return{current:t,states:v(e,t)}}}},e=>{var t;t=45329,e(e.s=t)}]);
|
|
2
|
+
(self.webpackChunk=self.webpackChunk||[]).push([[179],{71251:(e,t,n)=>{"use strict";var r=n(12139),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},a.apply(this,arguments)},o=n(78376),i=n(60035),s=n(77847),l=n.n(s);function u(e){return"function"==typeof e?e():e}function c(e){try{return JSON.stringify(e)}catch(Ne){return l()(e)}}var d=new Map;var f={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),d.set(n.sessionId,n),t.forEach((function(e){return e(n)})),n.onStop((function(){e.delete(n),d.delete(n.sessionId)}))},unregister:function(t){e.delete(t),d.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}};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",{d:"M10.394 2.08a1 1 0 00-.788 0l-7 3a1 1 0 000 1.84L5.25 8.051a.999.999 0 01.356-.257l4-1.714a1 1 0 11.788 1.838L7.667 9.088l1.94.831a1 1 0 00.787 0l7-3a1 1 0 000-1.838l-7-3zM3.31 9.397L5 10.12v4.102a8.969 8.969 0 00-1.05-.174 1 1 0 01-.89-.89 11.115 11.115 0 01.25-3.762zM9.3 16.573A9.026 9.026 0 007 14.935v-3.957l1.818.78a3 3 0 002.364 0l5.508-2.361a11.026 11.026 0 01.25 3.762 1 1 0 01-.89.89 8.968 8.968 0 00-5.35 2.524 1 1 0 01-1.4 0zM6 18a1 1 0 001-1v-2.065a8.935 8.935 0 00-2-.712V17a1 1 0 001 1z"}))}));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",{d:"M5 4a1 1 0 00-2 0v7.268a2 2 0 000 3.464V16a1 1 0 102 0v-1.268a2 2 0 000-3.464V4zM11 4a1 1 0 10-2 0v1.268a2 2 0 000 3.464V16a1 1 0 102 0V8.732a2 2 0 000-3.464V4zM16 3a1 1 0 011 1v7.268a2 2 0 010 3.464V16a1 1 0 11-2 0v-1.268a2 2 0 010-3.464V4a1 1 0 011-1z"}))}));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:"M18 13V5a2 2 0 00-2-2H4a2 2 0 00-2 2v8a2 2 0 002 2h3l3 3 3-3h3a2 2 0 002-2zM5 7a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1zm1 3a1 1 0 100 2h3a1 1 0 100-2H6z",clipRule:"evenodd"}))}));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",{d:"M4 3a2 2 0 100 4h12a2 2 0 100-4H4z"}),r.createElement("path",{fillRule:"evenodd",d:"M3 8h14v7a2 2 0 01-2 2H5a2 2 0 01-2-2V8zm5 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 16zm1-11a1 1 0 10-2 0v3.586L7.707 9.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 10.586V7z",clipRule:"evenodd"}))}));const h=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 p=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 16zm3.707-8.707l-3-3a1 1 0 00-1.414 1.414L10.586 9H7a1 1 0 100 2h3.586l-1.293 1.293a1 1 0 101.414 1.414l3-3a1 1 0 000-1.414z",clipRule:"evenodd"}))}));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 16zm3.707-8.707l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L9 9.414V13a1 1 0 102 0V9.414l1.293 1.293a1 1 0 001.414-1.414z",clipRule:"evenodd"}))}));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:"M16.707 10.293a1 1 0 010 1.414l-6 6a1 1 0 01-1.414 0l-6-6a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l4.293-4.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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:"M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M9.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L7.414 9H15a1 1 0 110 2H7.414l2.293 2.293a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L12.586 11H5a1 1 0 110-2h7.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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.293 9.707a1 1 0 010-1.414l6-6a1 1 0 011.414 0l6 6a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L4.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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 4a1 1 0 011-1h4a1 1 0 010 2H6.414l2.293 2.293a1 1 0 01-1.414 1.414L5 6.414V8a1 1 0 01-2 0V4zm9 1a1 1 0 110-2h4a1 1 0 011 1v4a1 1 0 11-2 0V6.414l-2.293 2.293a1 1 0 11-1.414-1.414L13.586 5H12zm-9 7a1 1 0 112 0v1.586l2.293-2.293a1 1 0 011.414 1.414L6.414 15H8a1 1 0 110 2H4a1 1 0 01-1-1v-4zm13-1a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 110-2h1.586l-2.293-2.293a1 1 0 011.414-1.414L15 13.586V12a1 1 0 011-1z",clipRule:"evenodd"}))}));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:"M14.243 5.757a6 6 0 10-.986 9.284 1 1 0 111.087 1.678A8 8 0 1118 10a3 3 0 01-4.8 2.401A4 4 0 1114 10a1 1 0 102 0c0-1.537-.586-3.07-1.757-4.243zM12 10a2 2 0 10-4 0 2 2 0 004 0z",clipRule:"evenodd"}))}));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:"M6.707 4.879A3 3 0 018.828 4H15a3 3 0 013 3v6a3 3 0 01-3 3H8.828a3 3 0 01-2.12-.879l-4.415-4.414a1 1 0 010-1.414l4.414-4.414zm4 2.414a1 1 0 00-1.414 1.414L10.586 10l-1.293 1.293a1 1 0 101.414 1.414L12 11.414l1.293 1.293a1 1 0 001.414-1.414L13.414 10l1.293-1.293a1 1 0 00-1.414-1.414L12 8.586l-1.293-1.293z",clipRule:"evenodd"}))}));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:"M6.267 3.455a3.066 3.066 0 001.745-.723 3.066 3.066 0 013.976 0 3.066 3.066 0 001.745.723 3.066 3.066 0 012.812 2.812c.051.643.304 1.254.723 1.745a3.066 3.066 0 010 3.976 3.066 3.066 0 00-.723 1.745 3.066 3.066 0 01-2.812 2.812 3.066 3.066 0 00-1.745.723 3.066 3.066 0 01-3.976 0 3.066 3.066 0 00-1.745-.723 3.066 3.066 0 01-2.812-2.812 3.066 3.066 0 00-.723-1.745 3.066 3.066 0 010-3.976 3.066 3.066 0 00.723-1.745 3.066 3.066 0 012.812-2.812zm7.44 5.252a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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:"M13.477 14.89A6 6 0 015.11 6.524l8.367 8.368zm1.414-1.414L6.524 5.11a6 6 0 018.367 8.367zM18 10a8 8 0 11-16 0 8 8 0 0116 0z",clipRule:"evenodd"}))}));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:"M7 2a1 1 0 00-.707 1.707L7 4.414v3.758a1 1 0 01-.293.707l-4 4C.817 14.769 2.156 18 4.828 18h10.343c2.673 0 4.012-3.231 2.122-5.121l-4-4A1 1 0 0113 8.172V4.414l.707-.707A1 1 0 0013 2H7zm2 6.172V4h2v4.172a3 3 0 00.879 2.12l1.027 1.028a4 4 0 00-2.171.102l-.47.156a4 4 0 01-2.53 0l-.563-.187a1.993 1.993 0 00-.114-.035l1.063-1.063A3 3 0 009 8.172z",clipRule:"evenodd"}))}));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",{d:"M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"}))}));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",{d:"M9 4.804A7.968 7.968 0 005.5 4c-1.255 0-2.443.29-3.5.804v10A7.969 7.969 0 015.5 14c1.669 0 3.218.51 4.5 1.385A7.962 7.962 0 0114.5 14c1.255 0 2.443.29 3.5.804v-10A7.968 7.968 0 0014.5 4c-1.255 0-2.443.29-3.5.804V12a1 1 0 11-2 0V4.804z"}))}));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 5a2 2 0 012-2h10a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2V5zm11 1H6v8l4-2 4 2V6z",clipRule:"evenodd"}))}));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",{d:"M5 4a2 2 0 012-2h6a2 2 0 012 2v14l-5-2.5L5 18V4z"}))}));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:"M6 6V5a3 3 0 013-3h2a3 3 0 013 3v1h2a2 2 0 012 2v3.57A22.952 22.952 0 0110 13a22.95 22.95 0 01-8-1.43V8a2 2 0 012-2h2zm2-1a1 1 0 011-1h2a1 1 0 011 1v1H8V5zm1 5a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1z",clipRule:"evenodd"}),r.createElement("path",{d:"M2 13.692V16a2 2 0 002 2h12a2 2 0 002-2v-2.308A24.974 24.974 0 0110 15c-2.796 0-5.487-.46-8-1.308z"}))}));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:"M6 3a1 1 0 011-1h.01a1 1 0 010 2H7a1 1 0 01-1-1zm2 3a1 1 0 00-2 0v1a2 2 0 00-2 2v1a2 2 0 00-2 2v.683a3.7 3.7 0 011.055.485 1.704 1.704 0 001.89 0 3.704 3.704 0 014.11 0 1.704 1.704 0 001.89 0 3.704 3.704 0 014.11 0 1.704 1.704 0 001.89 0A3.7 3.7 0 0118 12.683V12a2 2 0 00-2-2V9a2 2 0 00-2-2V6a1 1 0 10-2 0v1h-1V6a1 1 0 10-2 0v1H8V6zm10 8.868a3.704 3.704 0 01-4.055-.036 1.704 1.704 0 00-1.89 0 3.704 3.704 0 01-4.11 0 1.704 1.704 0 00-1.89 0A3.704 3.704 0 012 14.868V17a1 1 0 001 1h14a1 1 0 001-1v-2.132zM9 3a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1zm3 0a1 1 0 011-1h.01a1 1 0 110 2H13a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V4a2 2 0 00-2-2H6zm1 2a1 1 0 000 2h6a1 1 0 100-2H7zm6 7a1 1 0 011 1v3a1 1 0 11-2 0v-3a1 1 0 011-1zm-3 3a1 1 0 100 2h.01a1 1 0 100-2H10zm-4 1a1 1 0 011-1h.01a1 1 0 110 2H7a1 1 0 01-1-1zm1-4a1 1 0 100 2h.01a1 1 0 100-2H7zm2 1a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1zm4-4a1 1 0 100 2h.01a1 1 0 100-2H13zM9 9a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1zM7 8a1 1 0 000 2h.01a1 1 0 000-2H7z",clipRule:"evenodd"}))}));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:"M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",clipRule:"evenodd"}))}));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:"M4 5a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V7a2 2 0 00-2-2h-1.586a1 1 0 01-.707-.293l-1.121-1.121A2 2 0 0011.172 3H8.828a2 2 0 00-1.414.586L6.293 4.707A1 1 0 015.586 5H4zm6 9a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}));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:"M4 4a2 2 0 00-2 2v4a2 2 0 002 2V6h10a2 2 0 00-2-2H4zm2 6a2 2 0 012-2h8a2 2 0 012 2v4a2 2 0 01-2 2H8a2 2 0 01-2-2v-4zm6 4a2 2 0 100-4 2 2 0 000 4z",clipRule:"evenodd"}))}));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",{d:"M2 11a1 1 0 011-1h2a1 1 0 011 1v5a1 1 0 01-1 1H3a1 1 0 01-1-1v-5zM8 7a1 1 0 011-1h2a1 1 0 011 1v9a1 1 0 01-1 1H9a1 1 0 01-1-1V7zM14 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V4z"}))}));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",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),r.createElement("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"}))}));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:"M5 3a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V5a2 2 0 00-2-2H5zm9 4a1 1 0 10-2 0v6a1 1 0 102 0V7zm-3 2a1 1 0 10-2 0v4a1 1 0 102 0V9zm-3 3a1 1 0 10-2 0v1a1 1 0 102 0v-1z",clipRule:"evenodd"}))}));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",{d:"M2 5a2 2 0 012-2h7a2 2 0 012 2v4a2 2 0 01-2 2H9l-3 3v-3H4a2 2 0 01-2-2V5z"}),r.createElement("path",{d:"M15 7v2a4 4 0 01-4 4H9.828l-1.766 1.767c.28.149.599.233.938.233h2l3 3v-3h2a2 2 0 002-2V9a2 2 0 00-2-2h-1z"}))}));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:"M18 5v8a2 2 0 01-2 2h-5l-5 4v-4H4a2 2 0 01-2-2V5a2 2 0 012-2h12a2 2 0 012 2zM7 8H5v2h2V8zm2 0h2v2H9V8zm6 0h-2v2h2V8z",clipRule:"evenodd"}))}));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:"M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z",clipRule:"evenodd"}))}));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 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M15.707 4.293a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-5-5a1 1 0 011.414-1.414L10 8.586l4.293-4.293a1 1 0 011.414 0zm0 6a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-5-5a1 1 0 111.414-1.414L10 14.586l4.293-4.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M15.707 15.707a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 010 1.414zm-6 0a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 011.414 1.414L5.414 10l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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.293 15.707a1 1 0 010-1.414L14.586 10l-4.293-4.293a1 1 0 111.414-1.414l5 5a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0z",clipRule:"evenodd"}),r.createElement("path",{fillRule:"evenodd",d:"M4.293 15.707a1 1 0 010-1.414L8.586 10 4.293 5.707a1 1 0 011.414-1.414l5 5a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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:"M4.293 15.707a1 1 0 010-1.414l5-5a1 1 0 011.414 0l5 5a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414 0zm0-6a1 1 0 010-1.414l5-5a1 1 0 011.414 0l5 5a1 1 0 01-1.414 1.414L10 5.414 5.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))}));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",{d:"M13 7H7v6h6V7z"}),r.createElement("path",{fillRule:"evenodd",d:"M7 2a1 1 0 012 0v1h2V2a1 1 0 112 0v1h2a2 2 0 012 2v2h1a1 1 0 110 2h-1v2h1a1 1 0 110 2h-1v2a2 2 0 01-2 2h-2v1a1 1 0 11-2 0v-1H9v1a1 1 0 11-2 0v-1H5a2 2 0 01-2-2v-2H2a1 1 0 110-2h1V9H2a1 1 0 010-2h1V5a2 2 0 012-2h2V2zM5 5h10v10H5V5z",clipRule:"evenodd"}))}));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",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),r.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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",{d:"M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"}),r.createElement("path",{d:"M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5zM15 11h2a1 1 0 110 2h-2v-2z"}))}));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",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),r.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm3 4a1 1 0 000 2h.01a1 1 0 100-2H7zm3 0a1 1 0 000 2h3a1 1 0 100-2h-3zm-3 4a1 1 0 100 2h.01a1 1 0 100-2H7zm3 0a1 1 0 100 2h3a1 1 0 100-2h-3z",clipRule:"evenodd"}))}));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",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),r.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))}));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 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z",clipRule:"evenodd"}))}));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:"M2 9.5A3.5 3.5 0 005.5 13H9v2.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 15.586V13h2.5a4.5 4.5 0 10-.616-8.958 4.002 4.002 0 10-7.753 1.977A3.5 3.5 0 002 9.5zm9 3.5H9V8a1 1 0 012 0v5z",clipRule:"evenodd"}))}));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",{d:"M5.5 13a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 13H11V9.413l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L9 9.414V13H5.5z"}),r.createElement("path",{d:"M9 13h2v5a1 1 0 11-2 0v-5z"}))}));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",{d:"M5.5 16a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 16h-8z"}))}));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:"M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"}))}));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",{d:"M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z"}))}));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:"M4 2a2 2 0 00-2 2v11a3 3 0 106 0V4a2 2 0 00-2-2H4zm1 14a1 1 0 100-2 1 1 0 000 2zm5-1.757l4.9-4.9a2 2 0 000-2.828L13.485 5.1a2 2 0 00-2.828 0L10 5.757v8.486zM16 18H9.071l6-6H16a2 2 0 012 2v2a2 2 0 01-2 2z",clipRule:"evenodd"}))}));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",{d:"M4 4a2 2 0 00-2 2v1h16V6a2 2 0 00-2-2H4z"}),r.createElement("path",{fillRule:"evenodd",d:"M18 9H2v5a2 2 0 002 2h12a2 2 0 002-2V9zM4 13a1 1 0 011-1h1a1 1 0 110 2H5a1 1 0 01-1-1zm5-1a1 1 0 100 2h1a1 1 0 100-2H9z",clipRule:"evenodd"}))}));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:"M9.504 1.132a1 1 0 01.992 0l1.75 1a1 1 0 11-.992 1.736L10 3.152l-1.254.716a1 1 0 11-.992-1.736l1.75-1zM5.618 4.504a1 1 0 01-.372 1.364L5.016 6l.23.132a1 1 0 11-.992 1.736L4 7.723V8a1 1 0 01-2 0V6a.996.996 0 01.52-.878l1.734-.99a1 1 0 011.364.372zm8.764 0a1 1 0 011.364-.372l1.733.99A1.002 1.002 0 0118 6v2a1 1 0 11-2 0v-.277l-.254.145a1 1 0 11-.992-1.736l.23-.132-.23-.132a1 1 0 01-.372-1.364zm-7 4a1 1 0 011.364-.372L10 8.848l1.254-.716a1 1 0 11.992 1.736L11 10.58V12a1 1 0 11-2 0v-1.42l-1.246-.712a1 1 0 01-.372-1.364zM3 11a1 1 0 011 1v1.42l1.246.712a1 1 0 11-.992 1.736l-1.75-1A1 1 0 012 14v-2a1 1 0 011-1zm14 0a1 1 0 011 1v2a1 1 0 01-.504.868l-1.75 1a1 1 0 11-.992-1.736L16 13.42V12a1 1 0 011-1zm-9.618 5.504a1 1 0 011.364-.372l.254.145V16a1 1 0 112 0v.277l.254-.145a1 1 0 11.992 1.736l-1.735.992a.995.995 0 01-1.022 0l-1.735-.992a1 1 0 01-.372-1.364z",clipRule:"evenodd"}))}));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",{d:"M11 17a1 1 0 001.447.894l4-2A1 1 0 0017 15V9.236a1 1 0 00-1.447-.894l-4 2a1 1 0 00-.553.894V17zM15.211 6.276a1 1 0 000-1.788l-4.764-2.382a1 1 0 00-.894 0L4.789 4.488a1 1 0 000 1.788l4.764 2.382a1 1 0 00.894 0l4.764-2.382zM4.447 8.342A1 1 0 003 9.236V15a1 1 0 00.553.894l4 2A1 1 0 009 17v-5.764a1 1 0 00-.553-.894l-4-2z"}))}));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 16zM7 4a1 1 0 000 2 1 1 0 011 1v1H7a1 1 0 000 2h1v3a3 3 0 106 0v-1a1 1 0 10-2 0v1a1 1 0 11-2 0v-3h3a1 1 0 100-2h-3V7a3 3 0 00-3-3z",clipRule:"evenodd"}))}));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",{d:"M8.433 7.418c.155-.103.346-.196.567-.267v1.698a2.305 2.305 0 01-.567-.267C8.07 8.34 8 8.114 8 8c0-.114.07-.34.433-.582zM11 12.849v-1.698c.22.071.412.164.567.267.364.243.433.468.433.582 0 .114-.07.34-.433.582a2.305 2.305 0 01-.567.267z"}),r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a1 1 0 10-2 0v.092a4.535 4.535 0 00-1.676.662C6.602 6.234 6 7.009 6 8c0 .99.602 1.765 1.324 2.246.48.32 1.054.545 1.676.662v1.941c-.391-.127-.68-.317-.843-.504a1 1 0 10-1.51 1.31c.562.649 1.413 1.076 2.353 1.253V15a1 1 0 102 0v-.092a4.535 4.535 0 001.676-.662C13.398 13.766 14 12.991 14 12c0-.99-.602-1.765-1.324-2.246A4.535 4.535 0 0011 9.092V7.151c.391.127.68.317.843.504a1 1 0 101.511-1.31c-.563-.649-1.413-1.076-2.354-1.253V5z",clipRule:"evenodd"}))}));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 16zM8.736 6.979C9.208 6.193 9.696 6 10 6c.304 0 .792.193 1.264.979a1 1 0 001.715-1.029C12.279 4.784 11.232 4 10 4s-2.279.784-2.979 1.95c-.285.475-.507 1-.67 1.55H6a1 1 0 000 2h.013a9.358 9.358 0 000 1H6a1 1 0 100 2h.351c.163.55.385 1.075.67 1.55C7.721 15.216 8.768 16 10 16s2.279-.784 2.979-1.95a1 1 0 10-1.715-1.029c-.472.786-.96.979-1.264.979-.304 0-.792-.193-1.264-.979a4.265 4.265 0 01-.264-.521H10a1 1 0 100-2H8.017a7.36 7.36 0 010-1H10a1 1 0 100-2H8.472c.08-.185.167-.36.264-.521z",clipRule:"evenodd"}))}));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 16zm1-14a3 3 0 00-3 3v2H7a1 1 0 000 2h1v1a1 1 0 01-1 1 1 1 0 100 2h6a1 1 0 100-2H9.83c.11-.313.17-.65.17-1v-1h1a1 1 0 100-2h-1V7a1 1 0 112 0 1 1 0 102 0 3 3 0 00-3-3z",clipRule:"evenodd"}))}));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 16zM7 5a1 1 0 100 2h1a2 2 0 011.732 1H7a1 1 0 100 2h2.732A2 2 0 018 11H7a1 1 0 00-.707 1.707l3 3a1 1 0 001.414-1.414l-1.483-1.484A4.008 4.008 0 0011.874 10H13a1 1 0 100-2h-1.126a3.976 3.976 0 00-.41-1H13a1 1 0 100-2H7z",clipRule:"evenodd"}))}));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 16zM7.858 5.485a1 1 0 00-1.715 1.03L7.633 9H7a1 1 0 100 2h1.834l.166.277V12H7a1 1 0 100 2h2v1a1 1 0 102 0v-1h2a1 1 0 100-2h-2v-.723l.166-.277H13a1 1 0 100-2h-.634l1.492-2.486a1 1 0 10-1.716-1.029L10.034 9h-.068L7.858 5.485z",clipRule:"evenodd"}))}));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:"M6.672 1.911a1 1 0 10-1.932.518l.259.966a1 1 0 001.932-.518l-.26-.966zM2.429 4.74a1 1 0 10-.517 1.932l.966.259a1 1 0 00.517-1.932l-.966-.26zm8.814-.569a1 1 0 00-1.415-1.414l-.707.707a1 1 0 101.415 1.415l.707-.708zm-7.071 7.072l.707-.707A1 1 0 003.465 9.12l-.708.707a1 1 0 001.415 1.415zm3.2-5.171a1 1 0 00-1.3 1.3l4 10a1 1 0 001.823.075l1.38-2.759 3.018 3.02a1 1 0 001.414-1.415l-3.019-3.02 2.76-1.379a1 1 0 00-.076-1.822l-10-4z",clipRule:"evenodd"}))}));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",{d:"M3 12v3c0 1.657 3.134 3 7 3s7-1.343 7-3v-3c0 1.657-3.134 3-7 3s-7-1.343-7-3z"}),r.createElement("path",{d:"M3 7v3c0 1.657 3.134 3 7 3s7-1.343 7-3V7c0 1.657-3.134 3-7 3S3 8.657 3 7z"}),r.createElement("path",{d:"M17 5c0 1.657-3.134 3-7 3S3 6.657 3 5s3.134-3 7-3 7 1.343 7 3z"}))}));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:"M3 5a2 2 0 012-2h10a2 2 0 012 2v8a2 2 0 01-2 2h-2.22l.123.489.804.804A1 1 0 0113 18H7a1 1 0 01-.707-1.707l.804-.804L7.22 15H5a2 2 0 01-2-2V5zm5.771 7H5V5h10v7H8.771z",clipRule:"evenodd"}))}));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:"M7 2a2 2 0 00-2 2v12a2 2 0 002 2h6a2 2 0 002-2V4a2 2 0 00-2-2H7zm3 14a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V4a2 2 0 00-2-2H6zm4 14a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm5 6a1 1 0 10-2 0v2H7a1 1 0 100 2h2v2a1 1 0 102 0v-2h2a1 1 0 100-2h-2V8z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm5 6a1 1 0 10-2 0v3.586l-1.293-1.293a1 1 0 10-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 11.586V8z",clipRule:"evenodd"}))}));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",{d:"M9 2a2 2 0 00-2 2v8a2 2 0 002 2h6a2 2 0 002-2V6.414A2 2 0 0016.414 5L14 2.586A2 2 0 0012.586 2H9z"}),r.createElement("path",{d:"M3 8a2 2 0 012-2v10h8a2 2 0 01-2 2H5a2 2 0 01-2-2V8z"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm1 8a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"}))}));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:"M6 2a2 2 0 00-2 2v12a2 2 0 002 2h8a2 2 0 002-2V7.414A2 2 0 0015.414 6L12 2.586A2 2 0 0010.586 2H6zm2 10a1 1 0 10-2 0v3a1 1 0 102 0v-3zm2-3a1 1 0 011 1v5a1 1 0 11-2 0v-5a1 1 0 011-1zm4-1a1 1 0 10-2 0v7a1 1 0 102 0V8z",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",{d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2h-1.528A6 6 0 004 9.528V4z"}),r.createElement("path",{fillRule:"evenodd",d:"M8 10a4 4 0 00-3.446 6.032l-1.261 1.26a1 1 0 101.414 1.415l1.261-1.261A4 4 0 108 10zm-2 4a2 2 0 114 0 2 2 0 01-4 0z",clipRule:"evenodd"}))}));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:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"}))}));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:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4z",clipRule:"evenodd"}))}));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 16zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z",clipRule:"evenodd"}))}));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",{d:"M6 10a2 2 0 11-4 0 2 2 0 014 0zM12 10a2 2 0 11-4 0 2 2 0 014 0zM16 12a2 2 0 100-4 2 2 0 000 4z"}))}));const m=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",{d:"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"}))}));const y=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"}))}));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",{d:"M7 9a2 2 0 012-2h6a2 2 0 012 2v6a2 2 0 01-2 2H9a2 2 0 01-2-2V9z"}),r.createElement("path",{d:"M5 3a2 2 0 00-2 2v6a2 2 0 002 2V5h8a2 2 0 00-2-2H5z"}))}));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 16zM7 9a1 1 0 100-2 1 1 0 000 2zm7-1a1 1 0 11-2 0 1 1 0 012 0zm-.464 5.535a1 1 0 10-1.415-1.414 3 3 0 01-4.242 0 1 1 0 00-1.415 1.414 5 5 0 007.072 0z",clipRule:"evenodd"}))}));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 16zM7 9a1 1 0 100-2 1 1 0 000 2zm7-1a1 1 0 11-2 0 1 1 0 012 0zm-7.536 5.879a1 1 0 001.415 0 3 3 0 014.242 0 1 1 0 001.415-1.415 5 5 0 00-7.072 0 1 1 0 000 1.415z",clipRule:"evenodd"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),r.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))}));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.707 2.293a1 1 0 00-1.414 1.414l14 14a1 1 0 001.414-1.414l-1.473-1.473A10.014 10.014 0 0019.542 10C18.268 5.943 14.478 3 10 3a9.958 9.958 0 00-4.512 1.074l-1.78-1.781zm4.261 4.26l1.514 1.515a2.003 2.003 0 012.45 2.45l1.514 1.514a4 4 0 00-5.478-5.478z",clipRule:"evenodd"}),r.createElement("path",{d:"M12.454 16.697L9.75 13.992a4 4 0 01-3.742-3.741L2.335 6.578A9.98 9.98 0 00.458 10c1.274 4.057 5.065 7 9.542 7 .847 0 1.669-.105 2.454-.303z"}))}));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",{d:"M10 12a2 2 0 100-4 2 2 0 000 4z"}),r.createElement("path",{fillRule:"evenodd",d:"M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"}))}));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",{d:"M4.555 5.168A1 1 0 003 6v8a1 1 0 001.555.832L10 11.202V14a1 1 0 001.555.832l6-4a1 1 0 000-1.664l-6-4A1 1 0 0010 6v2.798l-5.445-3.63z"}))}));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:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm3 2h6v4H7V5zm8 8v2h1v-2h-1zm-2-2H7v4h6v-4zm2 0h1V9h-1v2zm1-4V5h-1v2h1zM5 5v2H4V5h1zm0 4H4v2h1V9zm-1 4h1v2H4v-2z",clipRule:"evenodd"}))}));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 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z",clipRule:"evenodd"}))}));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:"M6.625 2.655A9 9 0 0119 11a1 1 0 11-2 0 7 7 0 00-9.625-6.492 1 1 0 11-.75-1.853zM4.662 4.959A1 1 0 014.75 6.37 6.97 6.97 0 003 11a1 1 0 11-2 0 8.97 8.97 0 012.25-5.953 1 1 0 011.412-.088z",clipRule:"evenodd"}),r.createElement("path",{fillRule:"evenodd",d:"M5 11a5 5 0 1110 0 1 1 0 11-2 0 3 3 0 10-6 0c0 1.677-.345 3.276-.968 4.729a1 1 0 11-1.838-.789A9.964 9.964 0 005 11zm8.921 2.012a1 1 0 01.831 1.145 19.86 19.86 0 01-.545 2.436 1 1 0 11-1.92-.558c.207-.713.371-1.445.49-2.192a1 1 0 011.144-.83z",clipRule:"evenodd"}),r.createElement("path",{fillRule:"evenodd",d:"M10 10a1 1 0 011 1c0 2.236-.46 4.368-1.29 6.304a1 1 0 01-1.838-.789A13.952 13.952 0 009 11a1 1 0 011-1z",clipRule:"evenodd"}))}));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:"M12.395 2.553a1 1 0 00-1.45-.385c-.345.23-.614.558-.822.88-.214.33-.403.713-.57 1.116-.334.804-.614 1.768-.84 2.734a31.365 31.365 0 00-.613 3.58 2.64 2.64 0 01-.945-1.067c-.328-.68-.398-1.534-.398-2.654A1 1 0 005.05 6.05 6.981 6.981 0 003 11a7 7 0 1011.95-4.95c-.592-.591-.98-.985-1.348-1.467-.363-.476-.724-1.063-1.207-2.03zM12.12 15.12A3 3 0 017 13s.879.5 2.5.5c0-1 .5-4 1.25-4.5.5 1 .786 1.293 1.371 1.879A2.99 2.99 0 0113 13a2.99 2.99 0 01-.879 2.121z",clipRule:"evenodd"}))}));const b=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 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z",clipRule:"evenodd"}))}));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:"M4 4a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V8a2 2 0 00-2-2h-5L9 4H4zm7 5a1 1 0 10-2 0v1H8a1 1 0 100 2h1v1a1 1 0 102 0v-1h1a1 1 0 100-2h-1V9z"}))}));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:"M4 4a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V8a2 2 0 00-2-2h-5L9 4H4zm7 5a1 1 0 10-2 0v1.586l-.293-.293a1 1 0 10-1.414 1.414l2 2 .002.002a.997.997 0 001.41 0l.002-.002 2-2a1 1 0 00-1.414-1.414l-.293.293V9z"}))}));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:"M2 6a2 2 0 012-2h4l2 2h4a2 2 0 012 2v1H8a3 3 0 00-3 3v1.5a1.5 1.5 0 01-3 0V6z",clipRule:"evenodd"}),r.createElement("path",{d:"M6 12a2 2 0 012-2h8a2 2 0 012 2v2a2 2 0 01-2 2H2h2a2 2 0 002-2v-2z"}))}));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:"M4 4a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V8a2 2 0 00-2-2h-5L9 4H4zm4 6a1 1 0 100 2h4a1 1 0 100-2H8z"}))}));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",{d:"M2 6a2 2 0 012-2h5l2 2h5a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z"}))}));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:"M5 5a3 3 0 015-2.236A3 3 0 0114.83 6H16a2 2 0 110 4h-5V9a1 1 0 10-2 0v1H4a2 2 0 110-4h1.17C5.06 5.687 5 5.35 5 5zm4 1V5a1 1 0 10-1 1h1zm3 0a1 1 0 10-1-1v1h1z",clipRule:"evenodd"}),r.createElement("path",{d:"M9 11H3v5a2 2 0 002 2h4v-7zM11 18h4a2 2 0 002-2v-5h-6v7z"}))}));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:"M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z",clipRule:"evenodd"}))}));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 16zM4.332 8.027a6.012 6.012 0 011.912-2.706C6.512 5.73 6.974 6 7.5 6A1.5 1.5 0 019 7.5V8a2 2 0 004 0 2 2 0 011.523-1.943A5.977 5.977 0 0116 10c0 .34-.028.675-.083 1H15a2 2 0 00-2 2v2.197A5.973 5.973 0 0110 16v-2a2 2 0 00-2-2 2 2 0 01-2-2 2 2 0 00-1.668-1.973z",clipRule:"evenodd"}))}));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:"M9 3a1 1 0 012 0v5.5a.5.5 0 001 0V4a1 1 0 112 0v4.5a.5.5 0 001 0V6a1 1 0 112 0v5a7 7 0 11-14 0V9a1 1 0 012 0v2.5a.5.5 0 001 0V4a1 1 0 012 0v4.5a.5.5 0 001 0V3z",clipRule:"evenodd"}))}));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:"M9.243 3.03a1 1 0 01.727 1.213L9.53 6h2.94l.56-2.243a1 1 0 111.94.486L14.53 6H17a1 1 0 110 2h-2.97l-1 4H15a1 1 0 110 2h-2.47l-.56 2.242a1 1 0 11-1.94-.485L10.47 14H7.53l-.56 2.242a1 1 0 11-1.94-.485L5.47 14H3a1 1 0 110-2h2.97l1-4H5a1 1 0 110-2h2.47l.56-2.243a1 1 0 011.213-.727zM9.03 8l-1 4h2.938l1-4H9.031z",clipRule:"evenodd"}))}));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.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z",clipRule:"evenodd"}))}));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",{d:"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"}))}));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 2a1 1 0 00-1 1v1a1 1 0 002 0V3a1 1 0 00-1-1zM4 4h3a3 3 0 006 0h3a2 2 0 012 2v9a2 2 0 01-2 2H4a2 2 0 01-2-2V6a2 2 0 012-2zm2.5 7a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm2.45 4a2.5 2.5 0 10-4.9 0h4.9zM12 9a1 1 0 100 2h3a1 1 0 100-2h-3zm-1 4a1 1 0 011-1h2a1 1 0 110 2h-2a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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",{d:"M8.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l2-2a1 1 0 00-1.414-1.414L11 7.586V3a1 1 0 10-2 0v4.586l-.293-.293z"}),r.createElement("path",{d:"M3 5a2 2 0 012-2h1a1 1 0 010 2H5v7h2l1 2h4l1-2h2V5h-1a1 1 0 110-2h1a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2V5z"}))}));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:"M5 3a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V5a2 2 0 00-2-2H5zm0 2h10v7h-2l-1 2H8l-1-2H5V5z",clipRule:"evenodd"}))}));const w=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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"}))}));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:"M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z",clipRule:"evenodd"}))}));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.496 2.132a1 1 0 00-.992 0l-7 4A1 1 0 003 8v7a1 1 0 100 2h14a1 1 0 100-2V8a1 1 0 00.496-1.868l-7-4zM6 9a1 1 0 00-1 1v3a1 1 0 102 0v-3a1 1 0 00-1-1zm3 1a1 1 0 012 0v3a1 1 0 11-2 0v-3zm5-1a1 1 0 00-1 1v3a1 1 0 102 0v-3a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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",{d:"M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.002z"}))}));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:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"}))}));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:"M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z",clipRule:"evenodd"}))}));const x=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:"M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z",clipRule:"evenodd"}))}));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:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"}))}));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",{d:"M10 2a5 5 0 00-5 5v2a2 2 0 00-2 2v5a2 2 0 002 2h10a2 2 0 002-2v-5a2 2 0 00-2-2H7V7a3 3 0 015.905-.75 1 1 0 001.937-.5A5.002 5.002 0 0010 2z"}))}));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 3a1 1 0 011 1v12a1 1 0 11-2 0V4a1 1 0 011-1zm7.707 3.293a1 1 0 010 1.414L9.414 9H17a1 1 0 110 2H9.414l1.293 1.293a1 1 0 01-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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 3a1 1 0 00-1 1v12a1 1 0 102 0V4a1 1 0 00-1-1zm10.293 9.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L14.586 9H7a1 1 0 100 2h7.586l-1.293 1.293z",clipRule:"evenodd"}))}));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:"M2.94 6.412A2 2 0 002 8.108V16a2 2 0 002 2h12a2 2 0 002-2V8.108a2 2 0 00-.94-1.696l-6-3.75a2 2 0 00-2.12 0l-6 3.75zm2.615 2.423a1 1 0 10-1.11 1.664l5 3.333a1 1 0 001.11 0l5-3.333a1 1 0 00-1.11-1.664L10 11.798 5.555 8.835z",clipRule:"evenodd"}))}));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",{d:"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z"}),r.createElement("path",{d:"M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"}))}));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:"M12 1.586l-4 4v12.828l4-4V1.586zM3.707 3.293A1 1 0 002 4v10a1 1 0 00.293.707L6 18.414V5.586L3.707 3.293zM17.707 5.293L14 1.586v12.828l2.293 2.293A1 1 0 0018 16V6a1 1 0 00-.293-.707z",clipRule:"evenodd"}))}));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 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 7a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 13a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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:"M7 4a3 3 0 016 0v4a3 3 0 11-6 0V4zm4 10.93A7.001 7.001 0 0017 8a1 1 0 10-2 0A5 5 0 015 8a1 1 0 00-2 0 7.001 7.001 0 006 6.93V17H6a1 1 0 100 2h8a1 1 0 100-2h-3v-2.07z",clipRule:"evenodd"}))}));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 16zM7 9a1 1 0 000 2h6a1 1 0 100-2H7z",clipRule:"evenodd"}))}));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:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));const E=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",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"}))}));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",{d:"M18 3a1 1 0 00-1.196-.98l-10 2A1 1 0 006 5v9.114A4.369 4.369 0 005 14c-1.657 0-3 .895-3 2s1.343 2 3 2 3-.895 3-2V7.82l8-1.6v5.894A4.37 4.37 0 0015 12c-1.657 0-3 .895-3 2s1.343 2 3 2 3-.895 3-2V3z"}))}));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:"M2 5a2 2 0 012-2h8a2 2 0 012 2v10a2 2 0 002 2H4a2 2 0 01-2-2V5zm3 1h6v4H5V6zm6 6H5v2h6v-2z",clipRule:"evenodd"}),r.createElement("path",{d:"M15 7h1a2 2 0 012 2v5.5a1.5 1.5 0 01-3 0V7z"}))}));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:"M4 4a2 2 0 012-2h8a2 2 0 012 2v12a1 1 0 110 2h-3a1 1 0 01-1-1v-2a1 1 0 00-1-1H9a1 1 0 00-1 1v2a1 1 0 01-1 1H4a1 1 0 110-2V4zm3 1h2v2H7V5zm2 4H7v2h2V9zm2-4h2v2h-2V5zm2 4h-2v2h2V9z",clipRule:"evenodd"}))}));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",{d:"M10.894 2.553a1 1 0 00-1.788 0l-7 14a1 1 0 001.169 1.409l5-1.429A1 1 0 009 15.571V11a1 1 0 112 0v4.571a1 1 0 00.725.962l5 1.428a1 1 0 001.17-1.408l-7-14z"}))}));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:"M8 4a3 3 0 00-3 3v4a5 5 0 0010 0V7a1 1 0 112 0v4a7 7 0 11-14 0V7a5 5 0 0110 0v4a3 3 0 11-6 0V7a1 1 0 012 0v4a1 1 0 102 0V7a3 3 0 00-3-3z",clipRule:"evenodd"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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",{d:"M17.414 2.586a2 2 0 00-2.828 0L7 10.172V13h2.828l7.586-7.586a2 2 0 000-2.828z"}),r.createElement("path",{fillRule:"evenodd",d:"M2 6a2 2 0 012-2h4a1 1 0 010 2H4v10h10v-4a1 1 0 112 0v4a2 2 0 01-2 2H4a2 2 0 01-2-2V6z",clipRule:"evenodd"}))}));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",{d:"M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"}))}));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",{d:"M14.414 7l3.293-3.293a1 1 0 00-1.414-1.414L13 5.586V4a1 1 0 10-2 0v4.003a.996.996 0 00.617.921A.997.997 0 0012 9h4a1 1 0 100-2h-1.586z"}),r.createElement("path",{d:"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"}))}));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",{d:"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"}),r.createElement("path",{d:"M16.707 3.293a1 1 0 010 1.414L15.414 6l1.293 1.293a1 1 0 01-1.414 1.414L14 7.414l-1.293 1.293a1 1 0 11-1.414-1.414L12.586 6l-1.293-1.293a1 1 0 011.414-1.414L14 4.586l1.293-1.293a1 1 0 011.414 0z"}))}));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",{d:"M17.924 2.617a.997.997 0 00-.215-.322l-.004-.004A.997.997 0 0017 2h-4a1 1 0 100 2h1.586l-3.293 3.293a1 1 0 001.414 1.414L16 5.414V7a1 1 0 102 0V3a.997.997 0 00-.076-.383z"}),r.createElement("path",{d:"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"}))}));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",{d:"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z"}))}));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:"M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z",clipRule:"evenodd"}))}));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 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z",clipRule:"evenodd"}))}));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 16zm1-11a1 1 0 10-2 0v2H7a1 1 0 100 2h2v2a1 1 0 102 0v-2h2a1 1 0 100-2h-2V7z",clipRule:"evenodd"}))}));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 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z",clipRule:"evenodd"}))}));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 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"}))}));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 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11 4a1 1 0 10-2 0v4a1 1 0 102 0V7zm-3 1a1 1 0 10-2 0v3a1 1 0 102 0V8zM8 9a1 1 0 00-2 0v2a1 1 0 102 0V9z",clipRule:"evenodd"}))}));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 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 0l-2 2a1 1 0 101.414 1.414L8 10.414l1.293 1.293a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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:"M5 4v3H4a2 2 0 00-2 2v3a2 2 0 002 2h1v2a2 2 0 002 2h6a2 2 0 002-2v-2h1a2 2 0 002-2V9a2 2 0 00-2-2h-1V4a2 2 0 00-2-2H7a2 2 0 00-2 2zm8 0H7v3h6V4zm0 8H7v4h6v-4z",clipRule:"evenodd"}))}));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",{d:"M10 3.5a1.5 1.5 0 013 0V4a1 1 0 001 1h3a1 1 0 011 1v3a1 1 0 01-1 1h-.5a1.5 1.5 0 000 3h.5a1 1 0 011 1v3a1 1 0 01-1 1h-3a1 1 0 01-1-1v-.5a1.5 1.5 0 00-3 0v.5a1 1 0 01-1 1H6a1 1 0 01-1-1v-3a1 1 0 00-1-1h-.5a1.5 1.5 0 010-3H4a1 1 0 001-1V6a1 1 0 011-1h3a1 1 0 001-1v-.5z"}))}));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 4a1 1 0 011-1h3a1 1 0 011 1v3a1 1 0 01-1 1H4a1 1 0 01-1-1V4zm2 2V5h1v1H5zM3 13a1 1 0 011-1h3a1 1 0 011 1v3a1 1 0 01-1 1H4a1 1 0 01-1-1v-3zm2 2v-1h1v1H5zM13 3a1 1 0 00-1 1v3a1 1 0 001 1h3a1 1 0 001-1V4a1 1 0 00-1-1h-3zm1 2v1h1V5h-1z",clipRule:"evenodd"}),r.createElement("path",{d:"M11 4a1 1 0 10-2 0v1a1 1 0 002 0V4zM10 7a1 1 0 011 1v1h2a1 1 0 110 2h-3a1 1 0 01-1-1V8a1 1 0 011-1zM16 9a1 1 0 100 2 1 1 0 000-2zM9 13a1 1 0 011-1h1a1 1 0 110 2v2a1 1 0 11-2 0v-3zM7 11a1 1 0 100-2H4a1 1 0 100 2h3zM17 13a1 1 0 01-1 1h-2a1 1 0 110-2h2a1 1 0 011 1zM16 17a1 1 0 100-2h-3a1 1 0 100 2h3z"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))}));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:"M5 2a2 2 0 00-2 2v14l3.5-2 3.5 2 3.5-2 3.5 2V4a2 2 0 00-2-2H5zm4.707 3.707a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L8.414 9H10a3 3 0 013 3v1a1 1 0 102 0v-1a5 5 0 00-5-5H8.414l1.293-1.293z",clipRule:"evenodd"}))}));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:"M5 2a2 2 0 00-2 2v14l3.5-2 3.5 2 3.5-2 3.5 2V4a2 2 0 00-2-2H5zm2.5 3a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm6.207.293a1 1 0 00-1.414 0l-6 6a1 1 0 101.414 1.414l6-6a1 1 0 000-1.414zM12.5 10a1.5 1.5 0 100 3 1.5 1.5 0 000-3z",clipRule:"evenodd"}))}));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:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"}))}));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:"M7.707 3.293a1 1 0 010 1.414L5.414 7H11a7 7 0 017 7v2a1 1 0 11-2 0v-2a5 5 0 00-5-5H5.414l2.293 2.293a1 1 0 11-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"}))}));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",{d:"M8.445 14.832A1 1 0 0010 14v-2.798l5.445 3.63A1 1 0 0017 14V6a1 1 0 00-1.555-.832L10 8.798V6a1 1 0 00-1.555-.832l-6 4a1 1 0 000 1.664l6 4z"}))}));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",{d:"M5 3a1 1 0 000 2c5.523 0 10 4.477 10 10a1 1 0 102 0C17 8.373 11.627 3 5 3z"}),r.createElement("path",{d:"M4 9a1 1 0 011-1 7 7 0 017 7 1 1 0 11-2 0 5 5 0 00-5-5 1 1 0 01-1-1zM3 15a2 2 0 114 0 2 2 0 01-4 0z"}))}));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",{d:"M9.707 7.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L13 8.586V5h3a2 2 0 012 2v5a2 2 0 01-2 2H8a2 2 0 01-2-2V7a2 2 0 012-2h3v3.586L9.707 7.293zM11 3a1 1 0 112 0v2h-2V3z"}),r.createElement("path",{d:"M4 9a2 2 0 00-2 2v5a2 2 0 002 2h8a2 2 0 002-2H4V9z"}))}));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",{d:"M7.707 10.293a1 1 0 10-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 11.586V6h5a2 2 0 012 2v7a2 2 0 01-2 2H4a2 2 0 01-2-2V8a2 2 0 012-2h5v5.586l-1.293-1.293zM9 4a1 1 0 012 0v2H9V4z"}))}));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 2a1 1 0 011 1v1.323l3.954 1.582 1.599-.8a1 1 0 01.894 1.79l-1.233.616 1.738 5.42a1 1 0 01-.285 1.05A3.989 3.989 0 0115 15a3.989 3.989 0 01-2.667-1.019 1 1 0 01-.285-1.05l1.715-5.349L11 6.477V16h2a1 1 0 110 2H7a1 1 0 110-2h2V6.477L6.237 7.582l1.715 5.349a1 1 0 01-.285 1.05A3.989 3.989 0 015 15a3.989 3.989 0 01-2.667-1.019 1 1 0 01-.285-1.05l1.738-5.42-1.233-.617a1 1 0 01.894-1.788l1.599.799L9 4.323V3a1 1 0 011-1zm-5 8.274l-.818 2.552c.25.112.526.174.818.174.292 0 .569-.062.818-.174L5 10.274zm10 0l-.818 2.552c.25.112.526.174.818.174.292 0 .569-.062.818-.174L15 10.274z",clipRule:"evenodd"}))}));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:"M5.5 2a3.5 3.5 0 101.665 6.58L8.585 10l-1.42 1.42a3.5 3.5 0 101.414 1.414l8.128-8.127a1 1 0 00-1.414-1.414L10 8.586l-1.42-1.42A3.5 3.5 0 005.5 2zM4 5.5a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 9a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z",clipRule:"evenodd"}),r.createElement("path",{d:"M12.828 11.414a1 1 0 00-1.414 1.414l3.879 3.88a1 1 0 001.414-1.415l-3.879-3.879z"}))}));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",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"}))}));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:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}))}));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 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"}))}));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",{d:"M15 8a3 3 0 10-2.977-2.63l-4.94 2.47a3 3 0 100 4.319l4.94 2.47a3 3 0 10.895-1.789l-4.94-2.47a3.027 3.027 0 000-.74l4.94-2.47C13.456 7.68 14.19 8 15 8z"}))}));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:"M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}));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 1.944A11.954 11.954 0 012.166 5C2.056 5.649 2 6.319 2 7c0 5.225 3.34 9.67 8 11.317C14.66 16.67 18 12.225 18 7c0-.682-.057-1.35-.166-2.001A11.954 11.954 0 0110 1.944zM11 14a1 1 0 11-2 0 1 1 0 012 0zm0-7a1 1 0 10-2 0v3a1 1 0 102 0V7z",clipRule:"evenodd"}))}));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 2a4 4 0 00-4 4v1H5a1 1 0 00-.994.89l-1 9A1 1 0 004 18h12a1 1 0 00.994-1.11l-1-9A1 1 0 0015 7h-1V6a4 4 0 00-4-4zm2 5V6a2 2 0 10-4 0v1h4zm-6 3a1 1 0 112 0 1 1 0 01-2 0zm7-1a1 1 0 100 2 1 1 0 000-2z",clipRule:"evenodd"}))}));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",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"}))}));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",{d:"M3 3a1 1 0 000 2h11a1 1 0 100-2H3zM3 7a1 1 0 000 2h5a1 1 0 000-2H3zM3 11a1 1 0 100 2h4a1 1 0 100-2H3zM13 16a1 1 0 102 0v-5.586l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 101.414 1.414L13 10.414V16z"}))}));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",{d:"M3 3a1 1 0 000 2h11a1 1 0 100-2H3zM3 7a1 1 0 000 2h7a1 1 0 100-2H3zM3 11a1 1 0 100 2h4a1 1 0 100-2H3zM15 8a1 1 0 10-2 0v5.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L15 13.586V8z"}))}));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:"M5 2a1 1 0 011 1v1h1a1 1 0 010 2H6v1a1 1 0 01-2 0V6H3a1 1 0 010-2h1V3a1 1 0 011-1zm0 10a1 1 0 011 1v1h1a1 1 0 110 2H6v1a1 1 0 11-2 0v-1H3a1 1 0 110-2h1v-1a1 1 0 011-1zM12 2a1 1 0 01.967.744L14.146 7.2 17.5 9.134a1 1 0 010 1.732l-3.354 1.935-1.18 4.455a1 1 0 01-1.933 0L9.854 12.8 6.5 10.866a1 1 0 010-1.732l3.354-1.935 1.18-4.455A1 1 0 0112 2z",clipRule:"evenodd"}))}));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:"M18 3a1 1 0 00-1.447-.894L8.763 6H5a3 3 0 000 6h.28l1.771 5.316A1 1 0 008 18h1a1 1 0 001-1v-4.382l6.553 3.276A1 1 0 0018 15V3z",clipRule:"evenodd"}))}));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",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}))}));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",{d:"M3.707 2.293a1 1 0 00-1.414 1.414l6.921 6.922c.05.062.105.118.168.167l6.91 6.911a1 1 0 001.415-1.414l-.675-.675a9.001 9.001 0 00-.668-11.982A1 1 0 1014.95 5.05a7.002 7.002 0 01.657 9.143l-1.435-1.435a5.002 5.002 0 00-.636-6.294A1 1 0 0012.12 7.88c.924.923 1.12 2.3.587 3.415l-1.992-1.992a.922.922 0 00-.018-.018l-6.99-6.991zM3.238 8.187a1 1 0 00-1.933-.516c-.8 3-.025 6.336 2.331 8.693a1 1 0 001.414-1.415 6.997 6.997 0 01-1.812-6.762zM7.4 11.5a1 1 0 10-1.73 1c.214.371.48.72.795 1.035a1 1 0 001.414-1.414c-.191-.191-.35-.4-.478-.622z"}))}));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:"M5.05 3.636a1 1 0 010 1.414 7 7 0 000 9.9 1 1 0 11-1.414 1.414 9 9 0 010-12.728 1 1 0 011.414 0zm9.9 0a1 1 0 011.414 0 9 9 0 010 12.728 1 1 0 11-1.414-1.414 7 7 0 000-9.9 1 1 0 010-1.414zM7.879 6.464a1 1 0 010 1.414 3 3 0 000 4.243 1 1 0 11-1.415 1.414 5 5 0 010-7.07 1 1 0 011.415 0zm4.242 0a1 1 0 011.415 0 5 5 0 010 7.072 1 1 0 01-1.415-1.415 3 3 0 000-4.242 1 1 0 010-1.415zM10 9a1 1 0 011 1v.01a1 1 0 11-2 0V10a1 1 0 011-1z",clipRule:"evenodd"}))}));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 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z",clipRule:"evenodd"}))}));const _=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 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z",clipRule:"evenodd"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-2 0c0 .993-.241 1.929-.668 2.754l-1.524-1.525a3.997 3.997 0 00.078-2.183l1.562-1.562C15.802 8.249 16 9.1 16 10zm-5.165 3.913l1.58 1.58A5.98 5.98 0 0110 16a5.976 5.976 0 01-2.516-.552l1.562-1.562a4.006 4.006 0 001.789.027zm-4.677-2.796a4.002 4.002 0 01-.041-2.08l-.08.08-1.53-1.533A5.98 5.98 0 004 10c0 .954.223 1.856.619 2.657l1.54-1.54zm1.088-6.45A5.974 5.974 0 0110 4c.954 0 1.856.223 2.657.619l-1.54 1.54a4.002 4.002 0 00-2.346.033L7.246 4.668zM12 10a2 2 0 11-4 0 2 2 0 014 0z",clipRule:"evenodd"}))}));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",{d:"M8 5a1 1 0 100 2h5.586l-1.293 1.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L13.586 5H8zM12 15a1 1 0 100-2H6.414l1.293-1.293a1 1 0 10-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L6.414 15H12z"}))}));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",{d:"M5 12a1 1 0 102 0V6.414l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L5 6.414V12zM15 8a1 1 0 10-2 0v5.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L15 13.586V8z"}))}));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:"M5 4a3 3 0 00-3 3v6a3 3 0 003 3h10a3 3 0 003-3V7a3 3 0 00-3-3H5zm-1 9v-1h5v2H5a1 1 0 01-1-1zm7 1h4a1 1 0 001-1v-1h-5v2zm0-4h5V8h-5v2zM9 8H4v2h5V8z",clipRule:"evenodd"}))}));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:"M17.707 9.293a1 1 0 010 1.414l-7 7a1 1 0 01-1.414 0l-7-7A.997.997 0 012 10V5a3 3 0 013-3h5c.256 0 .512.098.707.293l7 7zM5 6a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}))}));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",{d:"M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z"}))}));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:"M2 5a2 2 0 012-2h12a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm3.293 1.293a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 01-1.414-1.414L7.586 10 5.293 7.707a1 1 0 010-1.414zM11 12a1 1 0 100 2h3a1 1 0 100-2h-3z",clipRule:"evenodd"}))}));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",{d:"M18 9.5a1.5 1.5 0 11-3 0v-6a1.5 1.5 0 013 0v6zM14 9.667v-5.43a2 2 0 00-1.105-1.79l-.05-.025A4 4 0 0011.055 2H5.64a2 2 0 00-1.962 1.608l-1.2 6A2 2 0 004.44 12H8v4a2 2 0 002 2 1 1 0 001-1v-.667a4 4 0 01.8-2.4l1.4-1.866a4 4 0 00.8-2.4z"}))}));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",{d:"M2 10.5a1.5 1.5 0 113 0v6a1.5 1.5 0 01-3 0v-6zM6 10.333v5.43a2 2 0 001.106 1.79l.05.025A4 4 0 008.943 18h5.416a2 2 0 001.962-1.608l1.2-6A2 2 0 0015.56 8H12V4a2 2 0 00-2-2 1 1 0 00-1 1v.667a4 4 0 01-.8 2.4L6.8 7.933a4 4 0 00-.8 2.4z"}))}));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",{d:"M2 6a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 100 4v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2a2 2 0 100-4V6z"}))}));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:"M7 2a1 1 0 011 1v1h3a1 1 0 110 2H9.578a18.87 18.87 0 01-1.724 4.78c.29.354.596.696.914 1.026a1 1 0 11-1.44 1.389c-.188-.196-.373-.396-.554-.6a19.098 19.098 0 01-3.107 3.567 1 1 0 01-1.334-1.49 17.087 17.087 0 003.13-3.733 18.992 18.992 0 01-1.487-2.494 1 1 0 111.79-.89c.234.47.489.928.764 1.372.417-.934.752-1.913.997-2.927H3a1 1 0 110-2h3V3a1 1 0 011-1zm6 6a1 1 0 01.894.553l2.991 5.982a.869.869 0 01.02.037l.99 1.98a1 1 0 11-1.79.895L15.383 16h-4.764l-.724 1.447a1 1 0 11-1.788-.894l.99-1.98.019-.038 2.99-5.982A1 1 0 0113 8zm-1.382 6h2.764L13 11.236 11.618 14z",clipRule:"evenodd"}))}));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:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"}))}));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:"M12 13a1 1 0 100 2h5a1 1 0 001-1V9a1 1 0 10-2 0v2.586l-4.293-4.293a1 1 0 00-1.414 0L8 9.586 3.707 5.293a1 1 0 00-1.414 1.414l5 5a1 1 0 001.414 0L11 9.414 14.586 13H12z",clipRule:"evenodd"}))}));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:"M12 7a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0V8.414l-4.293 4.293a1 1 0 01-1.414 0L8 10.414l-4.293 4.293a1 1 0 01-1.414-1.414l5-5a1 1 0 011.414 0L11 10.586 14.586 7H12z",clipRule:"evenodd"}))}));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",{d:"M8 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM15 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z"}),r.createElement("path",{d:"M3 4a1 1 0 00-1 1v10a1 1 0 001 1h1.05a2.5 2.5 0 014.9 0H10a1 1 0 001-1V5a1 1 0 00-1-1H3zM14 7a1 1 0 00-1 1v6.05A2.5 2.5 0 0115.95 16H17a1 1 0 001-1v-5a1 1 0 00-.293-.707l-2-2A1 1 0 0015 7h-1z"}))}));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-1zM6.293 6.707a1 1 0 010-1.414l3-3a1 1 0 011.414 0l3 3a1 1 0 01-1.414 1.414L11 5.414V13a1 1 0 11-2 0V5.414L7.707 6.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}));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",{d:"M8 9a3 3 0 100-6 3 3 0 000 6zM8 11a6 6 0 016 6H2a6 6 0 016-6zM16 7a1 1 0 10-2 0v1h-1a1 1 0 100 2h1v1a1 1 0 102 0v-1h1a1 1 0 100-2h-1V7z"}))}));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:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z",clipRule:"evenodd"}))}));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",{d:"M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"}))}));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",{d:"M11 6a3 3 0 11-6 0 3 3 0 016 0zM14 17a6 6 0 00-12 0h12zM13 8a1 1 0 100 2h4a1 1 0 100-2h-4z"}))}));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 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"}))}));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",{d:"M9 6a3 3 0 11-6 0 3 3 0 016 0zM17 6a3 3 0 11-6 0 3 3 0 016 0zM12.93 17c.046-.327.07-.66.07-1a6.97 6.97 0 00-1.5-4.33A5 5 0 0119 16v1h-6.07zM6 11a5 5 0 015 5v1H1v-1a5 5 0 015-5z"}))}));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:"M4.649 3.084A1 1 0 015.163 4.4 13.95 13.95 0 004 10c0 1.993.416 3.886 1.164 5.6a1 1 0 01-1.832.8A15.95 15.95 0 012 10c0-2.274.475-4.44 1.332-6.4a1 1 0 011.317-.516zM12.96 7a3 3 0 00-2.342 1.126l-.328.41-.111-.279A2 2 0 008.323 7H8a1 1 0 000 2h.323l.532 1.33-1.035 1.295a1 1 0 01-.781.375H7a1 1 0 100 2h.039a3 3 0 002.342-1.126l.328-.41.111.279A2 2 0 0011.677 14H12a1 1 0 100-2h-.323l-.532-1.33 1.035-1.295A1 1 0 0112.961 9H13a1 1 0 100-2h-.039zm1.874-2.6a1 1 0 011.833-.8A15.95 15.95 0 0118 10c0 2.274-.475 4.44-1.332 6.4a1 1 0 11-1.832-.8A13.949 13.949 0 0016 10c0-1.993-.416-3.886-1.165-5.6z",clipRule:"evenodd"}))}));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",{d:"M2 6a2 2 0 012-2h6a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V6zM14.553 7.106A1 1 0 0014 8v4a1 1 0 00.553.894l2 1A1 1 0 0018 13V7a1 1 0 00-1.447-.894l-2 1z"}))}));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",{d:"M2 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1H3a1 1 0 01-1-1V4zM8 4a1 1 0 011-1h2a1 1 0 011 1v12a1 1 0 01-1 1H9a1 1 0 01-1-1V4zM15 3a1 1 0 00-1 1v12a1 1 0 001 1h2a1 1 0 001-1V4a1 1 0 00-1-1h-2z"}))}));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",{d:"M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM14 11a1 1 0 011 1v1h1a1 1 0 110 2h-1v1a1 1 0 11-2 0v-1h-1a1 1 0 110-2h1v-1a1 1 0 011-1z"}))}));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",{d:"M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM11 13a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"}))}));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 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zm0 4a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"}))}));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:"M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM12.293 7.293a1 1 0 011.414 0L15 8.586l1.293-1.293a1 1 0 111.414 1.414L16.414 10l1.293 1.293a1 1 0 01-1.414 1.414L15 11.414l-1.293 1.293a1 1 0 01-1.414-1.414L13.586 10l-1.293-1.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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:"M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM14.657 2.929a1 1 0 011.414 0A9.972 9.972 0 0119 10a9.972 9.972 0 01-2.929 7.071 1 1 0 01-1.414-1.414A7.971 7.971 0 0017 10c0-2.21-.894-4.208-2.343-5.657a1 1 0 010-1.414zm-2.829 2.828a1 1 0 011.415 0A5.983 5.983 0 0115 10a5.984 5.984 0 01-1.757 4.243 1 1 0 01-1.415-1.415A3.984 3.984 0 0013 10a3.983 3.983 0 00-1.172-2.828 1 1 0 010-1.415z",clipRule:"evenodd"}))}));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:"M17.778 8.222c-4.296-4.296-11.26-4.296-15.556 0A1 1 0 01.808 6.808c5.076-5.077 13.308-5.077 18.384 0a1 1 0 01-1.414 1.414zM14.95 11.05a7 7 0 00-9.9 0 1 1 0 01-1.414-1.414 9 9 0 0112.728 0 1 1 0 01-1.414 1.414zM12.12 13.88a3 3 0 00-4.242 0 1 1 0 01-1.415-1.415 5 5 0 017.072 0 1 1 0 01-1.415 1.415zM9 16a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1z",clipRule:"evenodd"}))}));const k=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 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))}));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:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}));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",{d:"M5 8a1 1 0 011-1h1V6a1 1 0 012 0v1h1a1 1 0 110 2H9v1a1 1 0 11-2 0V9H6a1 1 0 01-1-1z"}),r.createElement("path",{fillRule:"evenodd",d:"M2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8zm6-4a4 4 0 100 8 4 4 0 000-8z",clipRule:"evenodd"}))}));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:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z",clipRule:"evenodd"}),r.createElement("path",{fillRule:"evenodd",d:"M5 8a1 1 0 011-1h4a1 1 0 110 2H6a1 1 0 01-1-1z",clipRule:"evenodd"}))}));var C=n(88068),S="tippy-content",R="tippy-backdrop",P="tippy-arrow",O="tippy-svg-arrow",M={passive:!0,capture:!0},j=function(){return document.body};function z(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function T(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function D(e,t){return"function"==typeof e?e.apply(void 0,t):e}function A(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function B(e){return[].concat(e)}function N(e,t){-1===e.indexOf(t)&&e.push(t)}function I(e){return e.split("-")[0]}function L(e){return[].slice.call(e)}function V(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function F(){return document.createElement("div")}function H(e){return["Element","Fragment"].some((function(t){return T(e,t)}))}function G(e){return T(e,"MouseEvent")}function q(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function Y(e){return H(e)?[e]:function(e){return T(e,"NodeList")}(e)?L(e):Array.isArray(e)?e:L(document.querySelectorAll(e))}function U(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function W(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function $(e){var t,n=B(e)[0];return null!=n&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document}function X(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function K(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 J(){Z.isTouch||(Z.isTouch=!0,window.performance&&document.addEventListener("mousemove",ee))}function ee(){var e=performance.now();e-Q<20&&(Z.isTouch=!1,document.removeEventListener("mousemove",ee)),Q=e}function te(){var e=document.activeElement;if(q(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var ne=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var re={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ae=Object.assign({appendTo:j,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},re,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),oe=Object.keys(ae);function ie(e){var t=(e.plugins||[]).reduce((function(t,n){var r,a=n.name,o=n.defaultValue;a&&(t[a]=void 0!==e[a]?e[a]:null!=(r=ae[a])?r:o);return t}),{});return Object.assign({},e,t)}function se(e,t){var n=Object.assign({},t,{content:D(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(ie(Object.assign({},ae,{plugins:t}))):oe).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({},ae.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 le(e,t){e.innerHTML=t}function ue(e){var t=F();return!0===e?t.className=P:(t.className=O,H(e)?t.appendChild(e):le(t,e)),t}function ce(e,t){H(t.content)?(le(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?le(e,t.content):e.textContent=t.content)}function de(e){var t=e.firstElementChild,n=L(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(S)})),arrow:n.find((function(e){return e.classList.contains(P)||e.classList.contains(O)})),backdrop:n.find((function(e){return e.classList.contains(R)}))}}function fe(e){var t=F(),n=F();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=F();function a(n,r){var a=de(t),o=a.box,i=a.content,s=a.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||ce(i,e.props),r.arrow?s?n.arrow!==r.arrow&&(o.removeChild(s),o.appendChild(ue(r.arrow))):o.appendChild(ue(r.arrow)):s&&o.removeChild(s)}return r.className=S,r.setAttribute("data-state","hidden"),ce(r,e.props),t.appendChild(n),n.appendChild(r),a(e.props,e.props),{popper:t,onUpdate:a}}fe.$$tippy=!0;var he=1,pe=[],ve=[];function ge(e,t){var n,r,a,o,i,s,l,u,c=se(e,Object.assign({},ae,ie(V(t)))),d=!1,f=!1,h=!1,p=!1,v=[],g=A(we,c.interactiveDebounce),m=he++,y=(u=c.plugins).filter((function(e,t){return u.indexOf(e)===t})),b={id:m,reference:e,popper:F(),popperInstance:null,props:c,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(a)},setProps:function(t){0;if(b.state.isDestroyed)return;Q("onBeforeUpdate",[b,t]),ye();var n=b.props,r=se(e,Object.assign({},n,V(t),{ignoreAttributes:!0}));b.props=r,me(),n.interactiveDebounce!==r.interactiveDebounce&&(te(),g=A(we,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?B(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");ee(),Y(),E&&E(n,r);b.popperInstance&&(ke(),Se().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));Q("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){0;var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Z.isTouch&&!b.props.touch,a=z(b.props.duration,0,ae.duration);if(e||t||n||r)return;if(O().hasAttribute("disabled"))return;if(Q("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,P()&&(x.style.visibility="visible");Y(),ue(),b.state.isMounted||(x.style.transition="none");if(P()){var o=H(),i=o.box,l=o.content;U([i,l],0)}s=function(){var e;if(b.state.isVisible&&!p){if(p=!0,x.offsetHeight,x.style.transition=b.props.moveTransition,P()&&b.props.animation){var t=H(),n=t.box,r=t.content;U([n,r],a),W([n,r],"visible")}J(),ee(),N(ve,b),null==(e=b.popperInstance)||e.forceUpdate(),Q("onMount",[b]),b.props.animation&&P()&&function(e,t){fe(e,t)}(a,(function(){b.state.isShown=!0,Q("onShown",[b])}))}},function(){var e,t=b.props.appendTo,n=O();e=b.props.interactive&&t===j||"parent"===t?n.parentNode:D(t,[n]);e.contains(x)||e.appendChild(x);b.state.isMounted=!0,ke(),!1}()},hide:function(){0;var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=z(b.props.duration,1,ae.duration);if(e||t||n)return;if(Q("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,p=!1,d=!1,P()&&(x.style.visibility="hidden");if(te(),ce(),Y(!0),P()){var a=H(),o=a.box,i=a.content;b.props.animation&&(U([o,i],r),W([o,i],"hidden"))}J(),ee(),b.props.animation?P()&&function(e,t){fe(e,(function(){!b.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()}))}(r,b.unmount):b.unmount()},hideWithInteractivity:function(e){0;T().addEventListener("mousemove",g),N(pe,g),g(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;Ce(),Se().forEach((function(e){e._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x);ve=ve.filter((function(e){return e!==b})),b.state.isMounted=!1,Q("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),ye(),delete e._tippy,b.state.isDestroyed=!0,Q("onDestroy",[b])}};if(!c.render)return b;var w=c.render(b),x=w.popper,E=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+b.id,b.popper=x,e._tippy=b,x._tippy=b;var _=y.map((function(e){return e.fn(b)})),k=e.hasAttribute("aria-expanded");return me(),ee(),Y(),Q("onCreate",[b]),c.showOnCreate&&Re(),x.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",g)})),b;function S(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function R(){return"hold"===S()[0]}function P(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function O(){return l||e}function T(){var e=O().parentNode;return e?$(e):document}function H(){return de(x)}function q(e){return b.state.isMounted&&!b.state.isVisible||Z.isTouch||o&&"focus"===o.type?0:z(b.props.delay,e?0:1,ae.delay)}function Y(e){void 0===e&&(e=!1),x.style.pointerEvents=b.props.interactive&&!e?"":"none",x.style.zIndex=""+b.props.zIndex}function Q(e,t,n){var r;(void 0===n&&(n=!0),_.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=b.props)[e].apply(r,t)}function J(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=x.id;B(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var a=t&&t.replace(r,"").trim();a?e.setAttribute(n,a):e.removeAttribute(n)}}))}}function ee(){!k&&b.props.aria.expanded&&B(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===O()?"true":"false"):e.removeAttribute("aria-expanded")}))}function te(){T().removeEventListener("mousemove",g),pe=pe.filter((function(e){return e!==g}))}function re(t){if(!Z.isTouch||!h&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!K(x,n)){if(B(b.props.triggerTarget||e).some((function(e){return K(e,n)}))){if(Z.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else Q("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),f=!0,setTimeout((function(){f=!1})),b.state.isMounted||ce())}}}function oe(){h=!0}function le(){h=!1}function ue(){var e=T();e.addEventListener("mousedown",re,!0),e.addEventListener("touchend",re,M),e.addEventListener("touchstart",le,M),e.addEventListener("touchmove",oe,M)}function ce(){var e=T();e.removeEventListener("mousedown",re,!0),e.removeEventListener("touchend",re,M),e.removeEventListener("touchstart",le,M),e.removeEventListener("touchmove",oe,M)}function fe(e,t){var n=H().box;function r(e){e.target===n&&(X(n,"remove",r),t())}if(0===e)return t();X(n,"remove",i),X(n,"add",r),i=r}function ge(t,n,r){void 0===r&&(r=!1),B(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),v.push({node:e,eventType:t,handler:n,options:r})}))}function me(){var e;R()&&(ge("touchstart",be,{passive:!0}),ge("touchend",xe,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(ge(e,be),e){case"mouseenter":ge("mouseleave",xe);break;case"focus":ge(ne?"focusout":"blur",Ee);break;case"focusin":ge("focusout",Ee)}}))}function ye(){v.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,a=e.options;t.removeEventListener(n,r,a)})),v=[]}function be(e){var t,n=!1;if(b.state.isEnabled&&!_e(e)&&!f){var r="focus"===(null==(t=o)?void 0:t.type);o=e,l=e.currentTarget,ee(),!b.state.isVisible&&G(e)&&pe.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||d)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:Re(e),"click"===e.type&&(d=!n),n&&!r&&Pe(e)}}function we(e){var t=e.target,n=O().contains(t)||x.contains(t);if("mousemove"!==e.type||!n){var r=Se().concat(x).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,a=e.popperState,o=e.props.interactiveBorder,i=I(a.placement),s=a.modifiersData.offset;if(!s)return!0;var l="bottom"===i?s.top.y:0,u="top"===i?s.bottom.y:0,c="right"===i?s.left.x:0,d="left"===i?s.right.x:0,f=t.top-r+l>o,h=r-t.bottom-u>o,p=t.left-n+c>o,v=n-t.right-d>o;return f||h||p||v}))})(r,e)&&(te(),Pe(e))}}function xe(e){_e(e)||b.props.trigger.indexOf("click")>=0&&d||(b.props.interactive?b.hideWithInteractivity(e):Pe(e))}function Ee(e){b.props.trigger.indexOf("focusin")<0&&e.target!==O()||b.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||Pe(e)}function _e(e){return!!Z.isTouch&&R()!==e.type.indexOf("touch")>=0}function ke(){Ce();var t=b.props,n=t.popperOptions,r=t.placement,a=t.offset,o=t.getReferenceClientRect,i=t.moveTransition,l=P()?de(x).arrow:null,u=o?{getBoundingClientRect:o,contextElement:o.contextElement||O()}:e,c={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(P()){var n=H().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:a}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},c];P()&&l&&d.push({name:"arrow",options:{element:l,padding:3}}),d.push.apply(d,(null==n?void 0:n.modifiers)||[]),b.popperInstance=(0,C.createPopper)(u,x,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:d}))}function Ce(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Se(){return L(x.querySelectorAll("[data-tippy-root]"))}function Re(e){b.clearDelayTimeouts(),e&&Q("onTrigger",[b,e]),ue();var t=q(!0),r=S(),a=r[0],o=r[1];Z.isTouch&&"hold"===a&&o&&(t=o),t?n=setTimeout((function(){b.show()}),t):b.show()}function Pe(e){if(b.clearDelayTimeouts(),Q("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=q(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):a=requestAnimationFrame((function(){b.hide()}))}}else ce()}}function me(e,t){void 0===t&&(t={});var n=ae.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",J,M),window.addEventListener("blur",te);var r=Object.assign({},t,{plugins:n}),a=Y(e).reduce((function(e,t){var n=t&&ge(t,r);return n&&e.push(n),e}),[]);return H(e)?a[0]:a}me.defaultProps=ae,me.setDefaultProps=function(e){Object.keys(e).forEach((function(t){ae[t]=e[t]}))},me.currentInput=Z;Object.assign({},C.applyStyles,{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)}});me.setDefaultProps({render:fe});const ye=me;function be(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}var we="undefined"!=typeof window&&"undefined"!=typeof document;function xe(e,t){e&&("function"==typeof e&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function Ee(){return we&&document.createElement("div")}function _e(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(!_e(e[n],t[n]))return!1}return!0}return!1}function ke(e){var t=[];return e.forEach((function(e){t.find((function(t){return _e(e,t)}))||t.push(e)})),t}function Ce(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:ke([].concat((null==(n=e.popperOptions)?void 0:n.modifiers)||[],(null==(r=t.popperOptions)?void 0:r.modifiers)||[]))})})}var Se=we?r.useLayoutEffect:r.useEffect;function Re(e){var t=(0,r.useRef)();return t.current||(t.current="function"==typeof e?e():e),t.current}function Pe(e,t,n){n.split(/\s+/).forEach((function(n){n&&e.classList[t](n)}))}var Oe={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()||Pe(t,"add",e.props.className)}return{onCreate:r,onBeforeUpdate:function(){n()&&Pe(t,"remove",e.props.className)},onAfterUpdate:r}}};function Me(e){return function(t){var n=t.children,a=t.content,o=t.visible,i=t.singleton,s=t.render,l=t.reference,u=t.disabled,c=void 0!==u&&u,d=t.ignoreAttributes,f=void 0===d||d,h=(t.__source,t.__self,be(t,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"])),p=void 0!==o,v=void 0!==i,g=(0,r.useState)(!1),m=g[0],y=g[1],b=(0,r.useState)({}),w=b[0],x=b[1],E=(0,r.useState)(),_=E[0],k=E[1],C=Re((function(){return{container:Ee(),renders:1}})),S=Object.assign({ignoreAttributes:f},h,{content:C.container});p&&(S.trigger="manual",S.hideOnClick=!1),v&&(c=!0);var R=S,P=S.plugins||[];s&&(R=Object.assign({},S,{plugins:v&&null!=i.data?[].concat(P,[{fn:function(){return{onTrigger:function(e,t){var n=i.data.children.find((function(e){return e.instance.reference===t.currentTarget}));e.state.$$activeSingletonInstance=n.instance,k(n.content)}}}}]):P,render:function(){return{popper:C.container}}}));var O=[l].concat(n?[n.type]:[]);return Se((function(){var t=l;l&&l.hasOwnProperty("current")&&(t=l.current);var n=e(t||C.ref||Ee(),Object.assign({},R,{plugins:[Oe].concat(S.plugins||[])}));return C.instance=n,c&&n.disable(),o&&n.show(),v&&i.hook({instance:n,content:a,props:R,setSingletonContent:k}),y(!0),function(){n.destroy(),null==i||i.cleanup(n)}}),O),Se((function(){var e;if(1!==C.renders){var t=C.instance;t.setProps(Ce(t.props,R)),null==(e=t.popperInstance)||e.forceUpdate(),c?t.disable():t.enable(),p&&(o?t.show():t.hide()),v&&i.hook({instance:t,content:a,props:R,setSingletonContent:k})}else C.renders++})),Se((function(){var e;if(s){var t=C.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;w.placement===n.placement&&w.referenceHidden===(null==r?void 0:r.isReferenceHidden)&&w.escaped===(null==r?void 0:r.hasPopperEscaped)||x({placement:n.placement,referenceHidden:null==r?void 0:r.isReferenceHidden,escaped:null==r?void 0:r.hasPopperEscaped}),n.attributes.popper={}}}])})})}}),[w.placement,w.referenceHidden,w.escaped].concat(O)),r.default.createElement(r.default.Fragment,null,n?(0,r.cloneElement)(n,{ref:function(e){C.ref=e,xe(n.ref,e)}}):null,m&&(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}(w),_,C.instance):a,C.container))}}var je=function(e,t){return(0,r.forwardRef)((function(n,a){var o=n.children,i=be(n,["children"]);return r.default.createElement(e,Object.assign({},t,i),o?(0,r.cloneElement)(o,{ref:function(e){xe(a,e),xe(o.ref,e)}}):null)}))};const ze=je(Me(ye));var Te=n(72779),De=n.n(Te),Ae=n(33847),Be=0;function Ne(e,t,n,r,a){var o,i,s={};for(i in t)"ref"==i?o=t[i]:s[i]=t[i];var l={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:--Be,__source:r,__self:a};if("function"==typeof e&&(o=e.defaultProps))for(i in o)void 0===s[i]&&(s[i]=o[i]);return Ae.YM.vnode&&Ae.YM.vnode(l),l}const Ie=(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 Le=n(36021);const Ve={entry:o.actions.choose([{cond:"selectActionCannotBePersistedToRoute",actions:["notifyRouteClearSelect"]}]),on:{updateGraph:{target:"customSelected",actions:[(0,Le.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,o.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})]}}},Fe={entry:[(0,Le.f0)(((e,t)=>{"focusProject"===t.type&&(e.focusedProject=t.projectName)})),(0,o.send)(((e,t)=>{if("focusProject"===t.type)return{type:"notifyRouteFocusProject",focusedProject:t.projectName}}),{to:e=>e.routeSetterActor}),"notifyGraphFocusProject"],exit:[(0,Le.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,o.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"]}}},He=document.documentElement,Ge="nx-dep-graph-theme";let qe;function Ye(e){const t=e.matches?"dark":"light";He.className=t,qe=t}function Ue(e){if(!("matchMedia"in window))return;const t=window.matchMedia("(prefers-color-scheme: dark)");if("system"!==e)t.removeEventListener("change",Ye),He.className=e,qe=e;else{const e=t.matches?"dark":"light";t.addEventListener("change",Ye),He.className=e,qe=e}localStorage.setItem(Ge,e),gt().evaluateStyles()}function We(e,t){return()=>$e(e,t)}function $e(e,t){return"dark"===qe?e:t}class Xe{open(e,t){const n=document.createElement("div");r.render(t,n);let a=ye(document.createElement("div"),{trigger:"manual",theme:$e("dark-nx","nx"),interactive:!0,appendTo:document.body,content:n,getReferenceClientRect:e.getBoundingClientRect,maxWidth:"none"});return a.show(),a}hideAll(){var e,t,n,r;n=(t=void 0===e?{}:e).exclude,r=t.duration,ve.forEach((function(e){var t=!1;if(n&&(t=q(n)?e.reference===n:e.popper===n.popper),!t){var a=e.props.duration;e.setProps({duration:r}),e.hide(),e.state.isDestroyed||e.setProps({duration:a})}}))}}var Ke=n(93218),Ze=n.n(Ke),Qe=n(81368),Je=n.n(Qe),et=n(10404),tt=n.n(et);const nt=function({type:e,source:t,target:n,fileDependencies:r}){return Ne("div",{children:[Ne("h4",{className:"implicit"!==e?"mb-3":"",children:[Ne("span",{className:"tag",children:null!=e?e:"unknown"}),t," \u2192 ",n]}),"implicit"!==e?Ne("div",{className:"overflow-hidden rounded-md border border-slate-200 dark:border-slate-800",children:[Ne("div",{className:"bg-slate-50 px-4 py-2 text-xs font-medium uppercase text-slate-500 dark:bg-slate-800 dark:text-slate-400",children:Ne("span",{children:"Files"})}),Ne("ul",{className:"max-h-[300px] divide-y divide-slate-200 overflow-auto dark:divide-slate-800",children:r.map((e=>Ne("li",{className:"whitespace-nowrap px-4 py-2 text-sm font-medium text-slate-800 dark:text-slate-300",children:Ne("span",{className:"block truncate font-normal",children:e.fileName})})))})]}):null]})};function rt(){return(0,r.useRef)({exclude:window.exclude,watch:window.watch,localMode:window.localMode,projectGraphResponse:window.projectGraphResponse,environment:window.environment,appConfig:window.appConfig,useXstateInspect:window.useXstateInspect}).current}const at=function(e){return rt().appConfig.showExperimentalFeatures?e.children:null};const ot=function({type:e,id:t,tags:n}){const r=Bt();return Ne("div",{children:[Ne("h4",{children:[Ne("span",{className:"tag",children:e}),t]}),n.length>0?Ne("p",{children:[Ne("strong",{children:"tags"}),Ne("br",{}),n.join(", ")]}):null,Ne("div",{className:"flex",children:[Ne("button",{onClick:function(){r.send({type:"focusProject",projectName:t})},children:"Focus"}),Ne("button",{onClick:function(){r.send({type:"deselectProject",projectName:t})},children:"Exclude"}),Ne(at,{children:[Ne("button",{className:"flex flex-row items-center",onClick:function(){r.send({type:"setTracingStart",projectName:t})},children:[Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mr-2 h-5 w-5 text-slate-500",viewBox:"0 0 20 20",fill:"currentColor",children:Ne("path",{fillRule:"evenodd",d:"M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z",clipRule:"evenodd"})}),"Start"]}),Ne("button",{className:"flex flex-row items-center",onClick:function(){r.send({type:"setTracingEnd",projectName:t})},children:[Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mr-2 h-5 w-5 text-slate-500",viewBox:"0 0 20 20",fill:"currentColor",children:Ne("path",{fillRule:"evenodd",d:"M3 6a3 3 0 013-3h10a1 1 0 01.8 1.6L14.25 8l2.55 3.4A1 1 0 0116 13H6a1 1 0 00-1 1v3a1 1 0 11-2 0V6z",clipRule:"evenodd"})}),"End"]})]})]})]})};let it;!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"}(it||(it={}));const st=[{selector:"edge",style:{width:We("2px","1px"),"line-color":We(it.gray,it.black),"text-outline-color":it.black,"text-outline-width":We("1px","0px"),color:We(it.white,it.black),"curve-style":"unbundled-bezier","target-arrow-shape":"triangle","target-arrow-fill":"filled","target-arrow-color":We(it.gray,it.black)}},{selector:"edge.affected",style:{"line-color":it.red,"target-arrow-color":it.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}}],lt=[{selector:"node",style:{"font-size":"32px","font-family":'system-ui, "Helvetica Neue", sans-serif',"border-style":"solid","border-color":We(it.gray,it.darkGray),"border-width":We("2px","1px"),"text-halign":"center","text-valign":"center","padding-left":"16px",color:We(it.white,it.black),label:"data(id)",width:e=>16*e.data("id").length,backgroundColor:We(it.black,it.white),"transition-property":"background-color, border-color, line-color, target-arrow-color","transition-duration":250,"transition-timing-function":"ease-out"}},{selector:'node[type="app"]',style:{shape:"round-rectangle"}},{selector:'node[type="lib"]',style:{shape:"round-rectangle"}},{selector:'node[type="e2e"]',style:{shape:"round-rectangle"}},{selector:"node.focused",style:{color:it.white,"border-color":it.gray,backgroundColor:it.green}},{selector:"node.affected",style:{color:it.white,"border-color":it.gray,backgroundColor:it.red}},{selector:":parent",style:{"background-opacity":.5,"background-color":it.gray,"border-color":it.darkGray,label:"data(label)","text-halign":"center","text-valign":"top","font-weight":"bold","font-size":"48px"}},{selector:"node.highlight",style:{color:it.white,"border-color":it.gray,backgroundColor:it.blue}},{selector:"node.transparent:childless",style:{opacity:.5}},{selector:"node.transparent:parent",style:{"text-opacity":.5,"background-opacity":.25,"border-opacity":.5}}];class ut{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 ct{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 dt(e){return e.replace(/\/$/,"")}function ft(e,t){const n=dt(e).split("/");return n[0]===dt(t)&&n.shift(),n.pop(),n}class ht{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 ft(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 pt{constructor(e,t){this.tooltipService=e,this.containerId=t,this.traversalGraph=void 0,this.renderGraph=void 0,this.openTooltip=null,this.collapseEdges=!1,Ze().use(Je()),Ze().use(tt())}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&&this.traceProjects(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,a;const o=e.connectedNodes().commonAncestors();let i,s;if(o.length>0?(r=t.ancestors().filter((e=>!o.contains(e))),a=n.ancestors().filter((e=>!o.contains(e)))):(r=t.ancestors(),a=n.ancestors()),r.length>0&&0===a.length?(i=r.last().id(),s=n.id()):a.length>0&&0===r.length?(i=t.id(),s=a.last().id()):(i=r.last().id(),s=a.last().id()),void 0!==i&&void 0!==s){const e=`${i}|${s}`;if(0===this.renderGraph.$id(e).length){const t={group:"edges",data:{id:e,source:i,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",a.map((e=>e.id())))}}))),this.renderGraph.fit().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),a=r.edgesTo(r);this.transferToRenderGraph(r.union(a))}showProjects(e){var t,n;const r=null!=(t=null==(n=this.renderGraph)?void 0:n.nodes())?t:this.traversalGraph.collection();let a=this.traversalGraph.collection();e.forEach((e=>{a=a.union(this.traversalGraph.$id(e))}));const o=a.ancestors(),i=r.union(a).union(o),s=i.edgesTo(i);this.transferToRenderGraph(i.union(s))}hideProject(e){var t,n;const r=null!=(t=null==(n=this.renderGraph)?void 0:n.nodes())?t:this.traversalGraph.collection(),a=this.renderGraph.$id(e),o=r.difference(a).difference(a.ancestors()),i=o.ancestors();let s=o.union(i);const l=s.edgesTo(s);this.transferToRenderGraph(s.union(l))}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),a=n.union(r),o=a.ancestors(),i=a.union(o),s=i.edgesTo(i);this.transferToRenderGraph(i.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 a=this.traversalGraph.nodes().filter((e=>r.findIndex((t=>e.id().includes(t)))>-1));t&&(a=a.union(this.includeProjectsByDepth(a,n))),a=a.union(a.ancestors());const o=a.edgesTo(a);this.transferToRenderGraph(a.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 a=0;for(;n.length>0&&a<=1e3;){const e=n.pop(),o=e[e.length-1].outgoers("node");o.length>0&&o.forEach((a=>{const o=[...e,a];a.id()===t?r.push(o):n.push(o)})),a++}a>=1e3&&console.log("failsafe triggered!"),r.forEach((e=>{console.log(e.map((e=>e.map((e=>e.id())))).join(" => "))}));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])))}})),console.log(o.length),o.union(o.ancestors()),console.log(o.map((e=>e.id()))),this.transferToRenderGraph(o)}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=Ze()({container:n,headless:!n,boxSelectionEnabled:!1,style:[...lt,...st]}),this.renderGraph.add(e),t&&this.renderGraph.$id(t).addClass("focused"),this.renderGraph.on("zoom",(()=>{this.openTooltip&&(this.openTooltip.hide(),this.openTooltip=null)})),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,a,o){this.collapseEdges=o,this.tooltipService.hideAll(),this.generateCytoscapeLayout(e,t,n,r,a)}generateCytoscapeLayout(e,t,n,r,a){const o=this.createElements(e,t,n,r,a);this.traversalGraph=Ze()({headless:!0,elements:[...o],boxSelectionEnabled:!1,style:[...lt,...st]})}createElements(e,t,n,r,a){let o=[];const i=e.map((e=>e.name)),s=[],l=[],u={};e.forEach((e=>{const o="app"===e.type||"e2e"===e.type?n.appsDir:n.libsDir,c=new ht(e,o);if(c.affected=a.includes(e.name),s.push(c),r[e.name].forEach((e=>{if(i.includes(e.target)){const t=new ut(e);l.push(t)}})),t){c.getAncestors().forEach((e=>u[e.id]=e))}}));const c=s.map((e=>e.getCytoscapeNodeDef(t))),d=l.map((e=>e.getCytosacpeNodeDef()));if(o=c.concat(d),t){o=Object.keys(u).map((e=>new ct(u[e]).getCytoscapeNodeDef())).concat(o)}return o}listenForProjectNodeClicks(){this.renderGraph.$("node:childless").on("click",(e=>{const t=e.target;let n=t.popperRef();const r=ot({id:t.id(),type:t.data("type"),tags:t.data("tags")});this.openTooltip=this.tooltipService.open(n,r)}))}listenForEdgeNodeClicks(){this.renderGraph.$("edge").on("click",(e=>{const t=e.target;let n=t.popperRef();const r=nt({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()})))});this.openTooltip=this.tooltipService.open(n,r)}))}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=$e("#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 vt;function gt(){return vt||(vt=new pt(new Xe,"cytoscape-graph")),vt}const mt=(e,t)=>{const n=gt();t((t=>{const{selectedProjectNames:r,perfReport:a}=n.handleEvent(t);e({type:"setSelectedProjectsFromGraph",selectedProjectNames:r,perfReport:a})}))};function yt(){return yt=Object.assign||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},yt.apply(this,arguments)}var bt;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(bt||(bt={}));var wt=function(e){return e};var xt="beforeunload",Et="popstate";function _t(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function a(){var e=n.location,t=e.pathname,a=e.search,o=e.hash,i=r.state||{};return[i.idx,wt({pathname:t,search:a,hash:o,state:i.usr||null,key:i.key||"default"})]}var o=null;n.addEventListener(Et,(function(){if(o)d.call(o),o=null;else{var e=bt.Pop,t=a(),n=t[0],r=t[1];if(d.length){if(null!=n){var i=l-n;i&&(o={action:e,location:r,retry:function(){m(-1*i)}},m(i))}}else g(e)}}));var i=bt.Pop,s=a(),l=s[0],u=s[1],c=Ct(),d=Ct();function f(e){return"string"==typeof e?e:Rt(e)}function h(e,t){return void 0===t&&(t=null),wt(yt({pathname:u.pathname,hash:"",search:""},"string"==typeof e?Pt(e):e,{state:t,key:St()}))}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){i=e;var t=a();l=t[0],u=t[1],c.call({action:i,location:u})}function m(e){r.go(e)}null==l&&(l=0,r.replaceState(yt({},r.state,{idx:l}),""));var y={get action(){return i},get location(){return u},createHref:f,push:function e(t,a){var o=bt.Push,i=h(t,a);if(v(o,i,(function(){e(t,a)}))){var s=p(i,l+1),u=s[0],c=s[1];try{r.pushState(u,"",c)}catch(d){n.location.assign(c)}g(o)}},replace:function e(t,n){var a=bt.Replace,o=h(t,n);if(v(a,o,(function(){e(t,n)}))){var i=p(o,l),s=i[0],u=i[1];r.replaceState(s,"",u),g(a)}},go:m,back:function(){m(-1)},forward:function(){m(1)},listen:function(e){return c.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&n.addEventListener(xt,kt),function(){t(),d.length||n.removeEventListener(xt,kt)}}};return y}function kt(e){e.preventDefault(),e.returnValue=""}function Ct(){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 St(){return Math.random().toString(36).substr(2,8)}function Rt(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,a=void 0===r?"":r,o=e.hash,i=void 0===o?"":o;return a&&"?"!==a&&(n+="?"===a.charAt(0)?a:"?"+a),i&&"#"!==i&&(n+="#"===i.charAt(0)?i:"#"+i),n}function Pt(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 Ot(e){const t=Object.entries(e).reduce(((e,[t,n])=>(null!==n&&(e[t]=n),e)),{});return new URLSearchParams(t).toString()}const Mt={entry:[(0,Le.f0)(((e,t)=>{"filterByText"===t.type&&(e.textFilter=t.search)})),"notifyGraphFilterProjectsByText"],on:{clearTextFilter:{target:"unselected",actions:(0,Le.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,o.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"]}}},jt={entry:[(0,Le.f0)(((e,t)=>{"setTracingStart"===t.type?e.tracing.start=t.projectName:"setTracingEnd"===t.type&&(e.tracing.end=t.projectName)})),"notifyRouteTracing","notifyGraphTracing"],on:{clearTraceStart:{actions:[(0,Le.f0)((e=>{e.tracing.start=null})),"notifyRouteTracing","notifyGraphTracing"]},clearTraceEnd:{actions:[(0,Le.f0)((e=>{e.tracing.end=null})),"notifyRouteTracing","notifyGraphTracing"]}}};const zt=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":t.push({type:"setSearchDepth",searchDepth:parseInt(e)});break;case"traceStart":t.push({type:"setTracingStart",projectName:e});break;case"traceEnd":t.push({type:"setTracingEnd",projectName:e})}})),t})(_t().location.search).forEach((t=>e(t)))},Tt={entry:["notifyGraphHideAllProjects",(0,Le.f0)(((e,t)=>{null===e.routeListenerActor&&(e.routeListenerActor=(0,o.spawn)(zt,"routeListener"))})),"notifyRouteClearSelect"],on:{updateGraph:{target:"customSelected",actions:[(0,Le.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,o.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})]}}},Dt=(0,o.Machine)({id:"DepGraph",initial:"idle",context:{projects:[],dependencies:{},affectedProjects:[],selectedProjects:[],focusedProject:null,textFilter:"",includePath:!1,searchDepth:1,searchDepthEnabled:!1,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}},states:{idle:{},unselected:Tt,customSelected:Ve,focused:Fe,textFiltered:Mt,tracing:jt},on:{initGraph:{target:"unselected",actions:["setGraph",(0,o.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,Le.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,o.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,o.send)(((e,t)=>{if("setCollapseEdges"===t.type)return{type:"notifyRouteCollapseEdges",collapseEdges:t.collapseEdges}}),{to:e=>e.routeSetterActor})]},setGroupByFolder:{actions:["setGroupByFolder",(0,o.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,o.send)(((e,t)=>{if("setGroupByFolder"===t.type)return{type:"notifyRouteGroupByFolder",groupByFolder:t.groupByFolder}}),{to:e=>e.routeSetterActor})]},setIncludeProjectsByPath:{actions:[(0,Le.f0)(((e,t)=>{e.includePath=t.includeProjectsByPath}))]},incrementSearchDepth:{actions:["incrementSearchDepth","notifyRouteSearchDepth"]},decrementSearchDepth:{actions:["decrementSearchDepth","notifyRouteSearchDepth"]},setSearchDepthEnabled:{actions:["setSearchDepthEnabled","notifyRouteSearchDepth"]},setSearchDepth:{actions:["setSearchDepth","notifyRouteSearchDepth"]},filterByText:{target:"textFiltered"}}},{guards:{deselectLastProject:e=>e.selectedProjects.length<=1,selectActionCannotBePersistedToRoute:(e,t)=>"selectAffected"!==t.type&&"selectAll"!==t.type},actions:{setGroupByFolder:(0,Le.f0)(((e,t)=>{"setGroupByFolder"===t.type&&(e.groupByFolder=t.groupByFolder)})),setCollapseEdges:(0,Le.f0)(((e,t)=>{"setCollapseEdges"===t.type&&(e.collapseEdges=t.collapseEdges)})),incrementSearchDepth:(0,Le.f0)((e=>{e.searchDepthEnabled=!0,e.searchDepth=e.searchDepth+1})),decrementSearchDepth:(0,Le.f0)((e=>{e.searchDepthEnabled=!0,e.searchDepth=e.searchDepth>1?e.searchDepth-1:1})),setSearchDepth:(0,Le.f0)(((e,t)=>{"setSearchDepth"===t.type&&(e.searchDepthEnabled=!0,e.searchDepth=t.searchDepth>1?t.searchDepth:1)})),setSearchDepthEnabled:(0,Le.f0)(((e,t)=>{"setSearchDepthEnabled"===t.type&&(e.searchDepthEnabled=t.searchDepthEnabled)})),setIncludeProjectsByPath:(0,Le.f0)(((e,t)=>{"setIncludeProjectsByPath"===t.type&&(e.includePath=t.includeProjectsByPath)})),setGraph:(0,Le.f0)(((e,t)=>{"initGraph"!==t.type&&"updateGraph"!==t.type||(e.projects=t.projects,e.dependencies=t.dependencies,e.graphActor=(0,o.spawn)(mt,"graphActor"),e.routeSetterActor=(0,o.spawn)((()=>{const e=_t(),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")},r={currentParamString:Ot(n),params:n};return(0,o.Machine)({id:"route",context:{currentParamString:"",params:{focus:null,groupByFolder:null,searchDepth:null,select:null,collapseEdges:null,traceStart:null,traceEnd:null}},always:{actions:(0,Le.f0)((e=>{const t=_t(),n=Ot(e.params);t.push({search:n}),e.currentParamString=n})),cond:"didParamsChange"},on:{notifyRouteSelectAll:{actions:(0,Le.f0)((e=>{e.params.select="all",e.params.focus=null}))},notifyRouteSelectAffected:{actions:(0,Le.f0)((e=>{e.params.select="affected",e.params.focus=null}))},notifyRouteClearSelect:{actions:(0,Le.f0)((e=>{e.params.select=null}))},notifyRouteFocusProject:{actions:(0,Le.f0)(((e,t)=>{e.params.focus=t.focusedProject,e.params.select=null}))},notifyRouteUnfocusProject:{actions:(0,Le.f0)(((e,t)=>{e.params.focus=null}))},notifyRouteGroupByFolder:{actions:(0,Le.f0)(((e,t)=>{e.params.groupByFolder=t.groupByFolder?"true":null}))},notifyRouteCollapseEdges:{actions:(0,Le.f0)(((e,t)=>{e.params.collapseEdges=t.collapseEdges?"true":null}))},notifyRouteSearchDepth:{actions:(0,Le.f0)(((e,t)=>{e.params.searchDepth=t.searchDepthEnabled?t.searchDepth.toString():null}))},notifyRouteTracing:{actions:(0,Le.f0)(((e,t)=>{null!==t.start&&null!==t.end?(e.params.traceStart=t.start,e.params.traceEnd=t.end,e.params.focus=null,e.params.select=null):(e.params.traceStart=null,e.params.traceEnd=null)}))}}},{guards:{didParamsChange:e=>e.currentParamString!==Ot(e.params)}}).withContext(r)})(),{name:"route"}),"initGraph"===t.type&&(e.workspaceLayout=t.workspaceLayout,e.affectedProjects=t.affectedProjects))})),notifyGraphTracing:(0,o.send)(((e,t)=>({type:"notifyGraphTracing",start:e.tracing.start,end:e.tracing.end})),{to:e=>e.graphActor}),notifyGraphShowProject:(0,o.send)(((e,t)=>{if("selectProject"===t.type)return{type:"notifyGraphShowProject",projectName:t.projectName}}),{to:e=>e.graphActor}),notifyGraphHideProject:(0,o.send)(((e,t)=>{if("deselectProject"===t.type)return{type:"notifyGraphHideProject",projectName:t.projectName}}),{to:e=>e.graphActor}),notifyGraphShowAllProjects:(0,o.send)(((e,t)=>({type:"notifyGraphShowAllProjects"})),{to:e=>e.graphActor}),notifyGraphHideAllProjects:(0,o.send)(((e,t)=>({type:"notifyGraphHideAllProjects"})),{to:e=>e.graphActor}),notifyGraphShowAffectedProjects:(0,o.send)({type:"notifyGraphShowAffectedProjects"},{to:e=>e.graphActor}),notifyGraphFocusProject:(0,o.send)(((e,t)=>({type:"notifyGraphFocusProject",projectName:e.focusedProject,searchDepth:e.searchDepthEnabled?e.searchDepth:-1})),{to:e=>e.graphActor}),notifyRouteUnfocusProject:(0,o.send)((()=>({type:"notifyRouteUnfocusProject"})),{to:e=>e.routeSetterActor}),notifyRouteSelectAll:(0,o.send)((()=>({type:"notifyRouteSelectAll"})),{to:e=>e.routeSetterActor}),notifyRouteSelectAffected:(0,o.send)((()=>({type:"notifyRouteSelectAffected"})),{to:e=>e.routeSetterActor}),notifyRouteClearSelect:(0,o.send)((()=>({type:"notifyRouteClearSelect"})),{to:e=>e.routeSetterActor}),notifyRouteTracing:(0,o.send)((e=>({type:"notifyRouteTracing",start:e.tracing.start,end:e.tracing.end})),{to:e=>e.routeSetterActor}),notifyRouteSearchDepth:(0,o.send)(((e,t)=>({type:"notifyRouteSearchDepth",searchDepth:e.searchDepth,searchDepthEnabled:e.searchDepthEnabled})),{to:e=>e.routeSetterActor}),notifyGraphFilterProjectsByText:(0,o.send)(((e,t)=>({type:"notifyGraphFilterProjectsByText",search:e.textFilter,includeProjectsByPath:e.includePath,searchDepth:e.searchDepthEnabled?e.searchDepth:-1})),{to:e=>e.graphActor})}});let At;function Bt(){return At||(At=(0,o.interpret)(Dt,{devTools:!!window.useXstateInspect}),At.start()),At}const Nt=(0,r.createContext)({}),It=e=>{const t=Bt();return Ne(Nt.Provider,{value:t,children:e.children})};function Lt(){return(0,r.useContext)(Nt)}var Vt;!function(e){e[e.Effect=1]="Effect",e[e.LayoutEffect=2]="LayoutEffect"}(Vt||(Vt={}));const Ft=r.useLayoutEffect;function Ht(e){return"state"in e}var Gt=n(36718);var qt=function(e,t){return e===t},Yt=function(e){return"state"in(n=e)&&"machine"in n?0!==("status"in(t=e)?t.status:t._status)?t.state:t.machine.initialState:Ht(e)?e.state:void 0;var t,n};n(26067);function Ut(e){return function(e,t,n,a){void 0===n&&(n=qt),void 0===a&&(a=Yt);var o=(0,r.useRef)(t),i=(0,r.useMemo)((function(){var r,i=a(e),s=t(i);return{getSnapshot:function(){return i},getCurrentValue:function(){return s},setCurrentValue:function(e){s=e,null==r||r()},subscribe:function(t){r=t;var a=e.subscribe((function(e){i=e;var r=o.current(e);n(s,r)||(s=r,t())}));return function(){a.unsubscribe()}}}}),[e]),s=(0,Gt.useSubscription)(i),l=!1;if(o.current!==t){var u=t(i.getSnapshot());n(s,u)||(l=!0,s=u)}return Ft((function(){o.current=t,l&&i.setCurrentValue(s)})),s}(Lt(),e)}class Wt{async getHash(){const e=new Request("currentHash",{mode:"no-cors"});return(await fetch(e)).json()}async getProjectGraph(e){const t=new Request(e,{mode:"no-cors"});return(await fetch(t)).json()}}class $t{async getHash(){return new Promise((e=>e("some-hash")))}async getProjectGraph(e){return new Promise((e=>e(window.projectGraphResponse)))}}class Xt{constructor(e=5e3){this.response={hash:"79054025255fb1a26e4bc422aef54eb4",layout:{appsDir:"apps",libsDir:"libs"},projects:[{name:"existing-app-1",type:"app",data:{root:"apps/app1",tags:[],files:[{file:"some/file.ts",hash:"ecccd8481d2e5eae0e59928be1bc4c2d071729d7",deps:["existing-lib-1"]}]}},{name:"existing-lib-1",type:"lib",data:{root:"libs/lib1",tags:[],files:[]}}],dependencies:{"existing-app-1":[{source:"existing-app-1",target:"existing-lib-1",type:"static"}],"existing-lib-1":[]},affected:[],focus:null,exclude:[],groupByFolder:!1},setInterval((()=>this.updateResponse()),e)}async getHash(){return new Promise((e=>e(this.response.hash)))}getProjectGraph(e){return new Promise((e=>e(this.response)))}createNewProject(){const e=Math.random()>.25?"lib":"app",t=`${e}-${this.response.projects.length+1}`;return{name:t,type:e,data:{root:"app"===e?`apps/${t}`:`libs/${t}`,tags:[],files:[]}}}updateResponse(){const e=this.createNewProject(),t=this.response.projects.filter((e=>"lib"===e.type)),n=t[Math.floor(Math.random()*t.length)],r=[{source:e.name,target:n.name,type:"static"}];this.response=Object.assign({},this.response,{projects:[...this.response.projects,e],dependencies:Object.assign({},this.response.dependencies,{[e.name]:r})})}}let Kt;function Zt(){return void 0===Kt&&("dev"===window.environment?Kt=new Wt:"watch"===window.environment?Kt=new Xt:"release"===window.environment&&(Kt="build"===window.localMode?new $t:new Wt)),Kt}const Qt=e=>e.context.projects,Jt=e=>e.context.workspaceLayout,en=e=>e.context.selectedProjects,tn=e=>e.context.selectedProjects.length>0,nn=e=>e.context.lastPerfReport,rn=e=>e.context.focusedProject,an=e=>({searchDepth:e.context.searchDepth,searchDepthEnabled:e.context.searchDepthEnabled}),on=e=>e.context.includePath,sn=e=>e.context.groupByFolder,ln=e=>e.context.collapseEdges,un=e=>e.context.textFilter,cn=e=>e.context.affectedProjects.length>0,dn=e=>e.context.tracing,fn=(0,r.memo)((({collapseEdges:e,collapseEdgesChanged:t})=>Ne("div",{className:"px-4",children:Ne("div",{className:"flex items-start",children:[Ne("div",{className:"flex h-5 items-center",children:Ne("input",{id:"collapseEdges",name:"collapseEdges",value:"collapseEdges",type:"checkbox",className:"h-4 w-4 rounded border-slate-400 dark:border-slate-300",onChange:e=>t(e.target.checked),checked:e})}),Ne("div",{className:"ml-3 text-sm",children:[Ne("label",{htmlFor:"collapseEdges",className:"cursor-pointer font-medium text-slate-600 dark:text-slate-400",children:"Collapse edges"}),Ne("p",{className:"text-slate-400 dark:text-slate-500",children:"Display edges between groups rather than libraries"})]})]})}))),hn=(0,r.memo)((({focusedProject:e,resetFocus:t})=>Ne("div",{className:"mt-10 px-4",children:Ne("div",{className:"bg-green-nx-base group relative flex cursor-pointer items-center overflow-hidden rounded-md border border-slate-200 p-2 text-slate-50 shadow-sm dark:border-slate-700","data-cy":"unfocusButton",onClick:()=>t(),children:[Ne("p",{className:"truncate transition duration-200 ease-in-out group-hover:opacity-60",children:[Ne(p,{className:"-mt-1 mr-1 inline h-6 w-6"}),Ne("span",{id:"focused-project-name",children:["Focused on ",e]})]}),Ne("div",{className:"absolute right-2 flex translate-x-32 items-center rounded-md bg-white pl-2 text-sm font-medium text-slate-700 shadow-sm ring-1 ring-slate-500 transition-all duration-200 ease-in-out group-hover:translate-x-0 dark:bg-slate-800 dark:text-slate-300",children:["Reset",Ne("span",{className:"rounded-md p-1",children:Ne(k,{className:"h-5 w-5"})})]})]})}))),pn=(0,r.memo)((({groupByFolder:e,groupByFolderChanged:t})=>Ne("div",{className:"mt-8 px-4",children:Ne("div",{className:"flex items-start",children:[Ne("div",{className:"flex h-5 items-center",children:Ne("input",{id:"displayOptions",name:"displayOptions",value:"groupByFolder",type:"checkbox",className:"h-4 w-4 rounded border-slate-300 dark:border-slate-700",onChange:e=>t(e.target.checked),checked:e})}),Ne("div",{className:"ml-3 text-sm",children:[Ne("label",{htmlFor:"displayOptions",className:"cursor-pointer font-medium text-slate-600 dark:text-slate-400",children:"Group by folder"}),Ne("p",{className:"text-slate-400 dark:text-slate-500",children:"Visually arrange libraries by folders with different colors."})]})]})})));function vn(e,t){return t.filter((t=>t.type===e)).sort(((e,t)=>e.name.localeCompare(t.name)))}function gn(e,t,n){let r={};return e.forEach((e=>{const a="app"===e.type||"e2e"===e.type?n.appsDir:n.libsDir,o=ft(e.data.root,a).join("/");r.hasOwnProperty(o)||(r[o]=[]),r[o].push({projectGraphNode:e,isSelected:t.includes(e.name)})})),r}function mn({project:e,toggleProject:t,focusProject:n}){return Ne("li",{className:"relative block cursor-default select-none py-1 pl-3 pr-9 text-xs text-slate-600 dark:text-slate-400",children:[Ne("div",{className:"flex items-center",children:[Ne("button",{type:"button",className:"flex rounded-md",title:"Focus on this library",onClick:()=>n(e.projectGraphNode.name),children:Ne("span",{className:"flex items-center rounded-md border-slate-300 bg-white p-1 font-medium text-slate-700 shadow-sm ring-1 ring-slate-200 transition hover:bg-slate-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-400 dark:ring-slate-600 hover:dark:bg-slate-700",children:Ne(g,{className:"h-5 w-5"})})}),Ne("label",{className:"ml-3 block w-full cursor-pointer truncate rounded-md p-2 font-mono font-normal transition hover:bg-slate-50 hover:dark:bg-slate-700","data-project":e.projectGraphNode.name,"data-active":e.isSelected.toString(),onClick:()=>t(e.projectGraphNode.name,e.isSelected),children:e.projectGraphNode.name})]}),e.isSelected?Ne("span",{title:"This library is visible",className:"text-green-nx-base absolute inset-y-0 right-0 flex cursor-pointer items-center",onClick:()=>t(e.projectGraphNode.name,e.isSelected),children:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})}):null]})}function yn({headerText:e,projects:t,selectProject:n,deselectProject:r,focusProject:a}){let o=[...t];function i(e,t){t?r(e):n(e)}return o.sort(((e,t)=>e.projectGraphNode.name.localeCompare(t.projectGraphNode.name))),Ne(Ae.HY,{children:[Ne("h3",{className:"mt-4 cursor-text py-2 text-sm font-semibold uppercase tracking-wide text-slate-800 dark:text-slate-200 lg:text-xs",children:e}),Ne("ul",{className:"mt-2 -ml-3",children:o.map((e=>Ne(mn,{project:e,toggleProject:i,focusProject:a},e.projectGraphNode.name)))})]})}const bn=function(){const e=Lt();function t(t){e.send({type:"deselectProject",projectName:t})}function n(t){e.send({type:"selectProject",projectName:t})}function r(t){e.send({type:"focusProject",projectName:t})}const a=Ut(Qt),o=Ut(Jt),i=Ut(en),s=vn("app",a),l=vn("lib",a),u=vn("e2e",a),c=gn(s,i,o),d=gn(l,i,o),f=gn(u,i,o),h=Object.keys(c).sort(),p=Object.keys(d).sort(),v=Object.keys(f).sort();return Ne("div",{id:"project-lists",className:"mt-8 border-t border-slate-400/10 px-4",children:[Ne("h2",{className:"mt-8 border-b border-solid border-slate-200/10 text-lg font-light text-slate-400 dark:text-slate-500",children:"app projects"}),h.map((e=>Ne(yn,{headerText:e,projects:c[e],deselectProject:t,selectProject:n,focusProject:r},"app-"+e))),Ne("h2",{className:"mt-8 border-b border-solid border-slate-200/10 text-lg font-light",children:"e2e projects"}),v.map((e=>Ne(yn,{headerText:e,projects:f[e],deselectProject:t,selectProject:n,focusProject:r},"e2e-"+e))),Ne("h2",{className:"mt-8 border-b border-solid border-slate-200/10 text-lg font-light",children:"lib projects"}),p.map((e=>Ne(yn,{headerText:e,projects:d[e],deselectProject:t,selectProject:n,focusProject:r},"lib-"+e)))]})},wn=(0,r.memo)((({searchDepth:e,searchDepthEnabled:t,searchDepthFilterEnabledChange:n,decrementDepthFilter:r,incrementDepthFilter:a})=>Ne("div",{className:"mt-4 px-4",children:[Ne("div",{className:"mt-4 flex items-start",children:[Ne("div",{className:"flex h-5 items-center",children:Ne("input",{id:"depthFilter",name:"depthFilter",value:"depthFilterActivated",type:"checkbox",className:"h-4 w-4 rounded border-slate-300 dark:text-slate-700",checked:t,onChange:e=>n(e.target.checked)})}),Ne("div",{className:"ml-3 text-sm",children:[Ne("label",{htmlFor:"depthFilter",className:"cursor-pointer font-medium text-slate-600 dark:text-slate-400",children:"Activate proximity"}),Ne("p",{className:"text-slate-400 dark:text-slate-500",children:"Explore connected libraries step by step."})]})]}),Ne("div",{className:"mt-3 px-10",children:Ne("div",{className:"flex rounded-md shadow-sm",children:[Ne("button",{title:"Remove ancestor level",className:"inline-flex items-center rounded-l-md border border-slate-300 bg-slate-50 py-2 px-4 text-slate-500 hover:bg-slate-100 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 hover:dark:bg-slate-700",onClick:r,children:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M20 12H4"})})}),Ne("span",{id:"depthFilterValue",className:"block w-full flex-1 rounded-none border-t border-b border-slate-300 bg-white p-1.5 text-center font-mono dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 hover:dark:bg-slate-700",children:e}),Ne("button",{title:"Add ancestor level",className:"inline-flex items-center rounded-r-md border border-slate-300 bg-slate-50 py-2 px-4 text-slate-500 hover:bg-slate-100 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-300 hover:dark:bg-slate-700",onClick:a,children:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]})})]}))),xn=(0,r.memo)((({showAllProjects:e,hideAllProjects:t,showAffectedProjects:n,hasAffectedProjects:r})=>Ne("div",{className:"mt-8 px-4",children:[Ne("button",{onClick:e,type:"button",className:"flex w-full items-center 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":"selectAllButton",children:[Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"-ml-1 mr-2 h-5 w-5 text-slate-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),"Show all projects"]}),r?Ne("button",{onClick:n,type:"button",className:"mt-3 flex w-full items-center rounded-md border border-red-300 bg-white px-4 py-2 text-sm font-medium text-red-500 shadow-sm hover:bg-red-50 dark:border-red-700 dark:bg-slate-800 hover:dark:bg-slate-700","data-cy":"affectedButton",children:[Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"-ml-1 mr-2 h-5 w-5 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})}),"Show affected projects"]}):null,Ne("button",{onClick:t,type:"button",className:"mt-3 flex w-full items-center 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":"deselectAllButton",children:[Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"-ml-1 mr-2 h-5 w-5 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}),"Hide all projects"]})]})));const En=function({textFilter:e,resetTextFilter:t,updateTextFilter:n,toggleIncludeLibsInPathChange:a,includePath:o}){const[i,s]=(0,r.useState)(""),l=function(e,t){const[n,a]=(0,r.useState)(e);return(0,r.useEffect)((()=>{const n=setTimeout((()=>{a(e)}),t);return()=>{clearTimeout(n)}}),[e,t]),n}(i,500);return(0,r.useEffect)((()=>{""!==l&&n(l)}),[l,n]),Ne("div",{children:[Ne("div",{className:"mt-10 px-4",children:Ne("form",{className:"group relative flex rounded-md shadow-sm",onSubmit:e=>e.preventDefault(),children:[Ne("span",{className:"inline-flex items-center rounded-l-md border border-r-0 border-slate-300 bg-slate-50 p-2 dark:border-slate-900 dark:bg-slate-800",children:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})})}),Ne("input",{type:"text",className:"block w-full flex-1 rounded-none rounded-r-md border border-slate-300 bg-white p-1.5 font-light text-slate-400 placeholder:font-light placeholder:text-slate-400 dark:border-slate-900 dark:bg-slate-800 dark:text-white dark:hover:bg-slate-700",placeholder:"lib name, other lib name","data-cy":"textFilterInput",name:"filter",value:i,onKeyUp:function(e){"Enter"===e.key&&n(e.currentTarget.value)},onChange:e=>{var n;""===(n=e.currentTarget.value)?(s(""),t()):s(n)}}),i.length>0?Ne("button",{"data-cy":"textFilterReset",type:"reset",onClick:function(){s(""),t()},className:"absolute top-1 right-1 inline-block rounded-md bg-slate-50 p-1 text-slate-400 dark:bg-slate-800",children:Ne("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ne("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2M3 12l6.414 6.414a2 2 0 001.414.586H19a2 2 0 002-2V7a2 2 0 00-2-2h-8.172a2 2 0 00-1.414.586L3 12z"})})}):null]})}),Ne("div",{className:"mt-4 px-4",children:Ne("div",{className:"flex items-start",children:[Ne("div",{className:"flex h-5 items-center",children:Ne("input",{disabled:0===e.length,id:"includeInPath",name:"textFilterCheckbox",type:"checkbox",value:"includeInPath",className:"h-4 w-4 rounded border-slate-300 dark:border-slate-700",checked:o,onChange:a})}),Ne("div",{className:"ml-3 text-sm",children:[Ne("label",{htmlFor:"includeInPath",className:"cursor-pointer font-medium text-slate-600 dark:text-slate-400",children:"Include related libraries"}),Ne("p",{className:"text-slate-400 dark:text-slate-500",children:"Show libraries that are related to your search."})]})]})})]})};function _n(){let e=[],t=[],n={enqueue(e){t.push(e)},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);n.add((()=>cancelAnimationFrame(t)))},nextFrame(...e){n.requestAnimationFrame((()=>{n.requestAnimationFrame(...e)}))},setTimeout(...e){let t=setTimeout(...e);n.add((()=>clearTimeout(t)))},add(t){e.push(t)},dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return n}function kn(){let[e]=(0,r.useState)(_n);return(0,r.useEffect)((()=>()=>e.dispose()),[e]),e}var Cn="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,Sn={serverHandoffComplete:!1};function Rn(){let[e,t]=(0,r.useState)(Sn.serverHandoffComplete);return(0,r.useEffect)((()=>{!0!==e&&t(!0)}),[e]),(0,r.useEffect)((()=>{!1===Sn.serverHandoffComplete&&(Sn.serverHandoffComplete=!0)}),[]),e}var Pn=0;function On(){return++Pn}function Mn(){let e=Rn(),[t,n]=(0,r.useState)(e?On:null);return Cn((()=>{null===t&&n(On())}),[t]),null!=t?""+t:void 0}function jn(e){let t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{t.current=e}),[e]),t}function zn(e,t){let[n,a]=(0,r.useState)(e),o=jn(e);return Cn((()=>a(o.current)),[o,a,...t]),n}function Tn(...e){let t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{t.current=e}),[e]),(0,r.useCallback)((e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)}),[t])}function Dn(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Dn),r}function An({props:e,slot:t,defaultTag:n,features:r,visible:a=!0,name:o}){if(a)return Bn(e,t,n,o);let i=null!=r?r:0;if(2&i){let{static:r=!1,...a}=e;if(r)return Bn(a,t,n,o)}if(1&i){let{unmount:r=!0,...a}=e;return Dn(r?0:1,{0:()=>null,1:()=>Bn({...a,hidden:!0,style:{display:"none"}},t,n,o)})}return Bn(e,t,n,o)}function Bn(e,t={},n,a){let{as:o=n,children:i,refName:s="ref",...l}=In(e,["unmount","static"]),u=void 0!==e.ref?{[s]:e.ref}:{},c="function"==typeof i?i(t):i;if(l.className&&"function"==typeof l.className&&(l.className=l.className(t)),o===r.Fragment&&Object.keys(l).length>0){if(!(0,r.isValidElement)(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${a} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));return(0,r.cloneElement)(c,Object.assign({},function(e,t,n){let r=Object.assign({},e);for(let a of n)void 0!==e[a]&&void 0!==t[a]&&Object.assign(r,{[a](n){n.defaultPrevented||e[a](n),n.defaultPrevented||t[a](n)}});return r}(function(e){let t=Object.assign({},e);for(let n in t)void 0===t[n]&&delete t[n];return t}(In(l,["ref"])),c.props,["onClick"]),u))}return(0,r.createElement)(o,Object.assign({},In(l,["ref"]),o!==r.Fragment&&u),c)}function Nn(e){var t;return Object.assign((0,r.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function In(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Ln(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),a=null!=r?r:-1,o=(()=>{switch(e.focus){case 0:return n.findIndex((e=>!t.resolveDisabled(e)));case 1:{let e=n.slice().reverse().findIndex(((e,n,r)=>!(-1!==a&&r.length-n-1>=a)&&!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 2:return n.findIndex(((e,n)=>!(n<=a)&&!t.resolveDisabled(e)));case 3:{let e=n.slice().reverse().findIndex((e=>!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 4:return n.findIndex((n=>t.resolveId(n)===e.id));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===o?r:o}function Vn(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}function Fn(e,t,n){let a=(0,r.useRef)(t);a.current=t,(0,r.useEffect)((()=>{function t(e){a.current.call(window,e)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)}),[e,n])}var Hn=(0,r.createContext)(null);function Gn(){return(0,r.useContext)(Hn)}function qn({value:e,children:t}){return r.default.createElement(Hn.Provider,{value:e},t)}function Yn(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function Un(e,t){let[n,a]=(0,r.useState)((()=>Yn(e)));return Cn((()=>{a(Yn(e))}),[e.type,e.as]),Cn((()=>{n||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&a("button")}),[n,t]),n}function Wn({container:e,accept:t,walk:n,enabled:a=!0}){let o=(0,r.useRef)(t),i=(0,r.useRef)(n);(0,r.useEffect)((()=>{o.current=t,i.current=n}),[t,n]),Cn((()=>{if(!e||!a)return;let t=o.current,n=i.current,r=Object.assign((e=>t(e)),{acceptNode:t}),s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,r,!1);for(;s.nextNode();)n(s.currentNode)}),[e,a,o,i])}Hn.displayName="OpenClosedContext";var $n={1:e=>e.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1},0:e=>e.disabled||0===e.comboboxState?e:{...e,comboboxState:0},2:(e,t)=>e.disabled===t.disabled?e:{...e,disabled:t.disabled},3(e,t){if(e.disabled||e.optionsRef.current&&!e.optionsPropsRef.current.static&&1===e.comboboxState)return e;let n=Ln(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return e.activeOptionIndex===n?e:{...e,activeOptionIndex:n}},4:(e,t)=>{var n;let r=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,a=Array.from(null==(n=e.optionsRef.current)?void 0:n.querySelectorAll('[id^="headlessui-combobox-option-"]')).reduce(((e,t,n)=>Object.assign(e,{[t.id]:n})),{}),o=[...e.options,{id:t.id,dataRef:t.dataRef}].sort(((e,t)=>a[e.id]-a[t.id]));return{...e,options:o,activeOptionIndex:null===r?null:o.indexOf(r)}},5:(e,t)=>{let n=e.options.slice(),r=null!==e.activeOptionIndex?n[e.activeOptionIndex]:null,a=n.findIndex((e=>e.id===t.id));return-1!==a&&n.splice(a,1),{...e,options:n,activeOptionIndex:a===e.activeOptionIndex||null===r?null:n.indexOf(r)}}},Xn=(0,r.createContext)(null);function Kn(e){let t=(0,r.useContext)(Xn);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Kn),t}return t}Xn.displayName="ComboboxContext";var Zn=(0,r.createContext)(null);function Qn(){let e=(0,r.useContext)(Zn);if(null===e){let e=new Error("ComboboxActions is missing a parent <Combobox /> component.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Qn),e}return e}function Jn(e,t){return Dn(t.type,$n,e,t)}Zn.displayName="ComboboxActions";var er=r.Fragment,tr=Nn((function(e,t){let{value:n,onChange:a,disabled:o=!1,...i}=e,s=(0,r.useRef)({value:n,onChange:a}),l=(0,r.useRef)({static:!1,hold:!1}),u=(0,r.useRef)({displayValue:void 0}),c=(0,r.useReducer)(Jn,{comboboxState:1,comboboxPropsRef:s,optionsPropsRef:l,inputPropsRef:u,labelRef:(0,r.createRef)(),inputRef:(0,r.createRef)(),buttonRef:(0,r.createRef)(),optionsRef:(0,r.createRef)(),disabled:o,options:[],activeOptionIndex:null}),[{comboboxState:d,options:f,activeOptionIndex:h,optionsRef:p,inputRef:v,buttonRef:g},m]=c;Cn((()=>{s.current.value=n}),[n,s]),Cn((()=>{s.current.onChange=a}),[a,s]),Cn((()=>m({type:2,disabled:o})),[o]),Fn("mousedown",(e=>{var t,n,r;let a=e.target;0===d&&((null==(t=g.current)?void 0:t.contains(a))||(null==(n=v.current)?void 0:n.contains(a))||(null==(r=p.current)?void 0:r.contains(a))||m({type:1}))}));let y=null===h?null:f[h].dataRef.current.value,b=(0,r.useMemo)((()=>({open:0===d,disabled:o,activeIndex:h,activeOption:y})),[d,o,f,h]),w=(0,r.useCallback)((()=>{if(!v.current||void 0===n)return;let e=u.current.displayValue;"function"==typeof e?v.current.value=e(n):"string"==typeof n&&(v.current.value=n)}),[n,v,u]),x=(0,r.useCallback)((e=>{let t=f.find((t=>t.id===e));if(!t)return;let{dataRef:n}=t;s.current.onChange(n.current.value),w()}),[f,s,v]),E=(0,r.useCallback)((()=>{if(null!==h){let{dataRef:e}=f[h];s.current.onChange(e.current.value),w()}}),[h,f,s,v]),_=(0,r.useMemo)((()=>({selectOption:x,selectActiveOption:E})),[x,E]);return Cn((()=>{1===d&&w()}),[w,d]),Cn(w,[w]),r.default.createElement(Zn.Provider,{value:_},r.default.createElement(Xn.Provider,{value:c},r.default.createElement(qn,{value:Dn(d,{0:0,1:1})},An({props:null===t?i:{...i,ref:t},slot:b,defaultTag:er,name:"Combobox"}))))})),nr=Nn((function(e,t){var n,a;let{value:o,onChange:i,displayValue:s,...l}=e,[u,c]=Kn("Combobox.Input"),d=Qn(),f=Tn(u.inputRef,t),h=u.inputPropsRef,p=`headlessui-combobox-input-${Mn()}`,v=kn(),g=jn(i);Cn((()=>{h.current.displayValue=s}),[s,h]);let m=(0,r.useCallback)((e=>{switch(e.key){case"Enter":e.preventDefault(),e.stopPropagation(),d.selectActiveOption(),c({type:1});break;case"ArrowDown":return e.preventDefault(),e.stopPropagation(),Dn(u.comboboxState,{0:()=>c({type:3,focus:2}),1:()=>{c({type:0}),v.nextFrame((()=>{u.comboboxPropsRef.current.value||c({type:3,focus:0})}))}});case"ArrowUp":return e.preventDefault(),e.stopPropagation(),Dn(u.comboboxState,{0:()=>c({type:3,focus:1}),1:()=>{c({type:0}),v.nextFrame((()=>{u.comboboxPropsRef.current.value||c({type:3,focus:3})}))}});case"Home":case"PageUp":return e.preventDefault(),e.stopPropagation(),c({type:3,focus:0});case"End":case"PageDown":return e.preventDefault(),e.stopPropagation(),c({type:3,focus:3});case"Escape":return e.preventDefault(),u.optionsRef.current&&!u.optionsPropsRef.current.static&&e.stopPropagation(),c({type:1});case"Tab":d.selectActiveOption(),c({type:1})}}),[v,c,u,d]),y=(0,r.useCallback)((e=>{var t;c({type:0}),null==(t=g.current)||t.call(g,e)}),[c,g]),b=zn((()=>{if(u.labelRef.current)return[u.labelRef.current.id].join(" ")}),[u.labelRef.current]),w=(0,r.useMemo)((()=>({open:0===u.comboboxState,disabled:u.disabled})),[u]);return An({props:{...l,...{ref:f,id:p,role:"combobox",type:"text","aria-controls":null==(n=u.optionsRef.current)?void 0:n.id,"aria-expanded":u.disabled?void 0:0===u.comboboxState,"aria-activedescendant":null===u.activeOptionIndex||null==(a=u.options[u.activeOptionIndex])?void 0:a.id,"aria-labelledby":b,disabled:u.disabled,onKeyDown:m,onChange:y}},slot:w,defaultTag:"input",name:"Combobox.Input"})})),rr=Nn((function(e,t){var n;let[a,o]=Kn("Combobox.Button"),i=Qn(),s=Tn(a.buttonRef,t),l=`headlessui-combobox-button-${Mn()}`,u=kn(),c=(0,r.useCallback)((e=>{switch(e.key){case"ArrowDown":return e.preventDefault(),e.stopPropagation(),1===a.comboboxState&&(o({type:0}),u.nextFrame((()=>{a.comboboxPropsRef.current.value||o({type:3,focus:0})}))),u.nextFrame((()=>{var e;return null==(e=a.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case"ArrowUp":return e.preventDefault(),e.stopPropagation(),1===a.comboboxState&&(o({type:0}),u.nextFrame((()=>{a.comboboxPropsRef.current.value||o({type:3,focus:3})}))),u.nextFrame((()=>{var e;return null==(e=a.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case"Escape":return e.preventDefault(),a.optionsRef.current&&!a.optionsPropsRef.current.static&&e.stopPropagation(),o({type:1}),u.nextFrame((()=>{var e;return null==(e=a.inputRef.current)?void 0:e.focus({preventScroll:!0})}))}}),[u,o,a,i]),d=(0,r.useCallback)((e=>{if(Vn(e.currentTarget))return e.preventDefault();0===a.comboboxState?o({type:1}):(e.preventDefault(),o({type:0})),u.nextFrame((()=>{var e;return null==(e=a.inputRef.current)?void 0:e.focus({preventScroll:!0})}))}),[o,u,a]),f=zn((()=>{if(a.labelRef.current)return[a.labelRef.current.id,l].join(" ")}),[a.labelRef.current,l]),h=(0,r.useMemo)((()=>({open:0===a.comboboxState,disabled:a.disabled})),[a]);return An({props:{...e,...{ref:s,id:l,type:Un(e,a.buttonRef),tabIndex:-1,"aria-haspopup":!0,"aria-controls":null==(n=a.optionsRef.current)?void 0:n.id,"aria-expanded":a.disabled?void 0:0===a.comboboxState,"aria-labelledby":f,disabled:a.disabled,onClick:d,onKeyDown:c}},slot:h,defaultTag:"button",name:"Combobox.Button"})}));var ar=Nn((function(e,t){var n;let{hold:a=!1,...o}=e,[i]=Kn("Combobox.Options"),{optionsPropsRef:s}=i,l=Tn(i.optionsRef,t),u=`headlessui-combobox-options-${Mn()}`,c=Gn(),d=null!==c?0===c:0===i.comboboxState;Cn((()=>{var t;s.current.static=null!=(t=e.static)&&t}),[s,e.static]),Cn((()=>{s.current.hold=a}),[a,s]),Wn({container:i.optionsRef.current,enabled:0===i.comboboxState,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let f=zn((()=>{var e,t,n;return null!=(n=null==(e=i.labelRef.current)?void 0:e.id)?n:null==(t=i.buttonRef.current)?void 0:t.id}),[i.labelRef.current,i.buttonRef.current]),h=(0,r.useMemo)((()=>({open:0===i.comboboxState})),[i]);return An({props:{...o,...{"aria-activedescendant":null===i.activeOptionIndex||null==(n=i.options[i.activeOptionIndex])?void 0:n.id,"aria-labelledby":f,role:"listbox",id:u,ref:l}},slot:h,defaultTag:"ul",features:3,visible:d,name:"Combobox.Options"})}));Object.assign(tr,{Input:nr,Button:rr,Label:function(e){let[t]=Kn("Combobox.Label"),n=`headlessui-combobox-label-${Mn()}`,a=(0,r.useCallback)((()=>{var e;return null==(e=t.inputRef.current)?void 0:e.focus({preventScroll:!0})}),[t.inputRef]),o=(0,r.useMemo)((()=>({open:0===t.comboboxState,disabled:t.disabled})),[t]);return An({props:{...e,...{ref:t.labelRef,id:n,onClick:a}},slot:o,defaultTag:"label",name:"Combobox.Label"})},Options:ar,Option:function(e){let{disabled:t=!1,value:n,...a}=e,[o,i]=Kn("Combobox.Option"),s=Qn(),l=`headlessui-combobox-option-${Mn()}`,u=null!==o.activeOptionIndex&&o.options[o.activeOptionIndex].id===l,c=o.comboboxPropsRef.current.value===n,d=(0,r.useRef)({disabled:t,value:n});Cn((()=>{d.current.disabled=t}),[d,t]),Cn((()=>{d.current.value=n}),[d,n]),Cn((()=>{var e,t;d.current.textValue=null==(t=null==(e=document.getElementById(l))?void 0:e.textContent)?void 0:t.toLowerCase()}),[d,l]);let f=(0,r.useCallback)((()=>s.selectOption(l)),[s,l]);Cn((()=>(i({type:4,id:l,dataRef:d}),()=>i({type:5,id:l}))),[d,l]),Cn((()=>{0===o.comboboxState&&(!c||i({type:3,focus:4,id:l}))}),[o.comboboxState,c,l]),Cn((()=>{if(0!==o.comboboxState||!u)return;let e=_n();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=document.getElementById(l))?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[l,u,o.comboboxState,o.activeOptionIndex]);let h=(0,r.useCallback)((e=>{if(t)return e.preventDefault();f(),i({type:1}),_n().nextFrame((()=>{var e;return null==(e=o.inputRef.current)?void 0:e.focus({preventScroll:!0})}))}),[i,o.inputRef,t,f]),p=(0,r.useCallback)((()=>{if(t)return i({type:3,focus:5});i({type:3,focus:4,id:l})}),[t,l,i]),v=(0,r.useCallback)((()=>{t||u||i({type:3,focus:4,id:l})}),[t,u,l,i]),g=(0,r.useCallback)((()=>{t||!u||o.optionsPropsRef.current.hold||i({type:3,focus:5})}),[t,u,i,o.comboboxState,o.comboboxPropsRef]),m=(0,r.useMemo)((()=>({active:u,selected:c,disabled:t})),[u,c,t]);return An({props:{...a,id:l,role:"option",tabIndex:!0===t?void 0:-1,"aria-disabled":!0===t||void 0,"aria-selected":!0===c||void 0,disabled:void 0,onClick:h,onFocus:p,onPointerMove:v,onMouseMove:v,onPointerLeave:g,onMouseLeave:g},slot:m,defaultTag:"li",name:"Combobox.Option"})}});var or=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");function ir(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(or))}function sr(e,t=0){return e!==document.body&&Dn(t,{0:()=>e.matches(or),1(){let t=e;for(;null!==t;){if(t.matches(or))return!0;t=t.parentElement}return!1}})}function lr(e){null==e||e.focus({preventScroll:!0})}function ur(e,t){let n,r=Array.isArray(e)?e.slice().sort(((e,t)=>{let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})):ir(e),a=document.activeElement,o=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,r.indexOf(a))-1;if(4&t)return Math.max(0,r.indexOf(a))+1;if(8&t)return r.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=32&t?{preventScroll:!0}:{},l=0,u=r.length;do{if(l>=u||l+u<=0)return 0;let e=i+l;if(16&t)e=(e+u)%u;else{if(e<0)return 3;if(e>=u)return 1}n=r[e],null==n||n.focus(s),l+=o}while(n!==document.activeElement);return n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),2}function cr(){let e=(0,r.useRef)(!1);return(0,r.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function dr(e,t=30,{initialFocus:n,containers:a}={}){let o=(0,r.useRef)("undefined"!=typeof window?document.activeElement:null),i=(0,r.useRef)(null),s=cr(),l=Boolean(16&t),u=Boolean(2&t);(0,r.useEffect)((()=>{!l||(o.current=document.activeElement)}),[l]),(0,r.useEffect)((()=>{if(l)return()=>{lr(o.current),o.current=null}}),[l]),(0,r.useEffect)((()=>{if(!u||!e.current)return;let t=document.activeElement;if(null==n?void 0:n.current){if((null==n?void 0:n.current)===t)return void(i.current=t)}else if(e.current.contains(t))return void(i.current=t);(null==n?void 0:n.current)?lr(n.current):0===ur(e.current,1)&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=document.activeElement}),[e,n,u]),Fn("keydown",(n=>{!(4&t)||!e.current||"Tab"===n.key&&(n.preventDefault(),2===ur(e.current,16|(n.shiftKey?2:4))&&(i.current=document.activeElement))})),Fn("focus",(n=>{if(!(8&t))return;let r=new Set(null==a?void 0:a.current);if(r.add(e),!r.size)return;let o=i.current;if(!o||!s.current)return;let l=n.target;l&&l instanceof HTMLElement?function(e,t){var n;for(let r of e)if(null==(n=r.current)?void 0:n.contains(t))return!0;return!1}(r,l)?(i.current=l,lr(l)):(n.preventDefault(),n.stopPropagation(),lr(o)):lr(i.current)}),!0)}var fr=new Set,hr=new Map;function pr(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function vr(e){let t=hr.get(e);!t||(null===t["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}var gr=(0,r.createContext)(!1);function mr(e){return r.default.createElement(gr.Provider,{value:e.force},e.children)}function yr(){let e=(0,r.useContext)(gr),t=(0,r.useContext)(Er),[n,a]=(0,r.useState)((()=>{if(!e&&null!==t||"undefined"==typeof window)return null;let n=document.getElementById("headlessui-portal-root");if(n)return n;let r=document.createElement("div");return r.setAttribute("id","headlessui-portal-root"),document.body.appendChild(r)}));return(0,r.useEffect)((()=>{null!==n&&(document.body.contains(n)||document.body.appendChild(n))}),[n]),(0,r.useEffect)((()=>{e||null!==t&&a(t.current)}),[t,a,e]),n}var br=r.Fragment;function wr(e){let t=e,n=yr(),[a]=(0,r.useState)((()=>"undefined"==typeof window?null:document.createElement("div"))),o=Rn();return Cn((()=>{if(n&&a)return n.appendChild(a),()=>{var e;!n||!a||(n.removeChild(a),n.childNodes.length<=0&&(null==(e=n.parentElement)||e.removeChild(n)))}}),[n,a]),o&&n&&a?(0,r.createPortal)(An({props:t,defaultTag:br,name:"Portal"}),a):null}var xr=r.Fragment,Er=(0,r.createContext)(null);wr.Group=function(e){let{target:t,...n}=e;return r.default.createElement(Er.Provider,{value:t},An({props:n,defaultTag:xr,name:"Popover.Group"}))};var _r=(0,r.createContext)(null);function kr(){let e=(0,r.useContext)(_r);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,kr),e}return e}function Cr(){let[e,t]=(0,r.useState)([]);return[e.length>0?e.join(" "):void 0,(0,r.useMemo)((()=>function(e){let n=(0,r.useCallback)((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n})))),[]),a=(0,r.useMemo)((()=>({register:n,slot:e.slot,name:e.name,props:e.props})),[n,e.slot,e.name,e.props]);return r.default.createElement(_r.Provider,{value:a},e.children)}),[t])]}function Sr(e){let t=kr(),n=`headlessui-description-${Mn()}`;return Cn((()=>t.register(n)),[n,t.register]),An({props:{...e,...{...t.props,id:n}},slot:t.slot||{},defaultTag:"p",name:t.name||"Description"})}var Rr=(0,r.createContext)((()=>{}));function Pr({children:e,onUpdate:t,type:n,element:a}){let o=(0,r.useContext)(Rr),i=(0,r.useCallback)(((...e)=>{null==t||t(...e),o(...e)}),[o,t]);return Cn((()=>(i(0,n,a),()=>i(1,n,a))),[i,n,a]),r.default.createElement(Rr.Provider,{value:i},e)}Rr.displayName="StackContext";var Or={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},Mr=(0,r.createContext)(null);function jr(e){let t=(0,r.useContext)(Mr);if(null===t){let t=new Error(`<${e} /> is missing a parent <${Ar.displayName} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,jr),t}return t}function zr(e,t){return Dn(t.type,Or,e,t)}Mr.displayName="DialogContext";var Tr=Nn((function(e,t){let{open:n,onClose:a,initialFocus:o,...i}=e,[s,l]=(0,r.useState)(0),u=Gn();void 0===n&&null!==u&&(n=Dn(u,{0:!0,1:!1}));let c=(0,r.useRef)(new Set),d=(0,r.useRef)(null),f=Tn(d,t),h=e.hasOwnProperty("open")||null!==u,p=e.hasOwnProperty("onClose");if(!h&&!p)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!h)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!p)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof n)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${n}`);if("function"!=typeof a)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${a}`);let v=n?0:1,g=null!==u?0===u:0===v,[m,y]=(0,r.useReducer)(zr,{titleId:null,descriptionId:null}),b=(0,r.useCallback)((()=>a(!1)),[a]),w=(0,r.useCallback)((e=>y({type:0,id:e})),[y]),x=Rn()&&0===v,E=s>1,_=null!==(0,r.useContext)(Mr);dr(d,x?Dn(E?"parent":"leaf",{parent:16,leaf:30}):1,{initialFocus:o,containers:c}),function(e,t=!0){Cn((()=>{if(!t||!e.current)return;let n=e.current;fr.add(n);for(let e of hr.keys())e.contains(n)&&(vr(e),hr.delete(e));return document.querySelectorAll("body > *").forEach((e=>{if(e instanceof HTMLElement){for(let t of fr)if(e.contains(t))return;1===fr.size&&(hr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),pr(e))}})),()=>{if(fr.delete(n),fr.size>0)document.querySelectorAll("body > *").forEach((e=>{if(e instanceof HTMLElement&&!hr.has(e)){for(let t of fr)if(e.contains(t))return;hr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),pr(e)}}));else for(let e of hr.keys())vr(e),hr.delete(e)}}),[t])}(d,!!E&&x),Fn("mousedown",(e=>{var t;let n=e.target;0===v&&(E||(null==(t=d.current)?void 0:t.contains(n))||b())})),Fn("keydown",(e=>{"Escape"===e.key&&0===v&&(E||(e.preventDefault(),e.stopPropagation(),b()))})),(0,r.useEffect)((()=>{if(0!==v||_)return;let e=document.documentElement.style.overflow,t=document.documentElement.style.paddingRight,n=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=`${n}px`,()=>{document.documentElement.style.overflow=e,document.documentElement.style.paddingRight=t}}),[v,_]),(0,r.useEffect)((()=>{if(0!==v||!d.current)return;let e=new IntersectionObserver((e=>{for(let t of e)0===t.boundingClientRect.x&&0===t.boundingClientRect.y&&0===t.boundingClientRect.width&&0===t.boundingClientRect.height&&b()}));return e.observe(d.current),()=>e.disconnect()}),[v,d,b]);let[k,C]=Cr(),S=`headlessui-dialog-${Mn()}`,R=(0,r.useMemo)((()=>[{dialogState:v,close:b,setTitleId:w},m]),[v,m,b,w]),P=(0,r.useMemo)((()=>({open:0===v})),[v]),O={ref:f,id:S,role:"dialog","aria-modal":0===v||void 0,"aria-labelledby":m.titleId,"aria-describedby":k,onClick(e){e.stopPropagation()}},M=i;return r.default.createElement(Pr,{type:"Dialog",element:d,onUpdate:(0,r.useCallback)(((e,t,n)=>{"Dialog"===t&&Dn(e,{0(){c.current.add(n),l((e=>e+1))},1(){c.current.add(n),l((e=>e-1))}})}),[])},r.default.createElement(mr,{force:!0},r.default.createElement(wr,null,r.default.createElement(Mr.Provider,{value:R},r.default.createElement(wr.Group,{target:d},r.default.createElement(mr,{force:!1},r.default.createElement(C,{slot:P,name:"Dialog.Description"},An({props:{...M,...O},slot:P,defaultTag:"div",features:3,visible:g,name:"Dialog"}))))))))})),Dr=Nn((function(e,t){let[{dialogState:n,close:a}]=jr("Dialog.Overlay");return An({props:{...e,ref:Tn(t),id:`headlessui-dialog-overlay-${Mn()}`,"aria-hidden":!0,onClick:(0,r.useCallback)((e=>{if(e.target===e.currentTarget){if(Vn(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),a()}}),[a])},slot:(0,r.useMemo)((()=>({open:0===n})),[n]),defaultTag:"div",name:"Dialog.Overlay"})}));var Ar=Object.assign(Tr,{Overlay:Dr,Title:function(e){let[{dialogState:t,setTitleId:n}]=jr("Dialog.Title"),a=`headlessui-dialog-title-${Mn()}`;(0,r.useEffect)((()=>(n(a),()=>n(null))),[a,n]);let o=(0,r.useMemo)((()=>({open:0===t})),[t]);return An({props:{...e,id:a},slot:o,defaultTag:"h2",name:"Dialog.Title"})},Description:Sr}),Br={0:e=>({...e,disclosureState:Dn(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},4:e=>!0===e.linkedPanel?e:{...e,linkedPanel:!0},5:e=>!1===e.linkedPanel?e:{...e,linkedPanel:!1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},Nr=(0,r.createContext)(null);function Ir(e){let t=(0,r.useContext)(Nr);if(null===t){let t=new Error(`<${e} /> is missing a parent <${qr.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ir),t}return t}Nr.displayName="DisclosureContext";var Lr=(0,r.createContext)(null);function Vr(e){let t=(0,r.useContext)(Lr);if(null===t){let t=new Error(`<${e} /> is missing a parent <${qr.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Vr),t}return t}Lr.displayName="DisclosureAPIContext";var Fr=(0,r.createContext)(null);function Hr(e,t){return Dn(t.type,Br,e,t)}Fr.displayName="DisclosurePanelContext";var Gr=r.Fragment;function qr(e){let{defaultOpen:t=!1,...n}=e,a=`headlessui-disclosure-button-${Mn()}`,o=`headlessui-disclosure-panel-${Mn()}`,i=(0,r.useReducer)(Hr,{disclosureState:t?0:1,linkedPanel:!1,buttonId:a,panelId:o}),[{disclosureState:s},l]=i;(0,r.useEffect)((()=>l({type:2,buttonId:a})),[a,l]),(0,r.useEffect)((()=>l({type:3,panelId:o})),[o,l]);let u=(0,r.useCallback)((e=>{l({type:1});let t=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:document.getElementById(a):document.getElementById(a);null==t||t.focus()}),[l,a]),c=(0,r.useMemo)((()=>({close:u})),[u]),d=(0,r.useMemo)((()=>({open:0===s,close:u})),[s,u]);return r.default.createElement(Nr.Provider,{value:i},r.default.createElement(Lr.Provider,{value:c},r.default.createElement(qn,{value:Dn(s,{0:0,1:1})},An({props:n,slot:d,defaultTag:Gr,name:"Disclosure"}))))}var Yr=Nn((function(e,t){let[n,a]=Ir("Disclosure.Button"),o=(0,r.useRef)(null),i=Tn(o,t),s=(0,r.useContext)(Fr),l=null!==s&&s===n.panelId,u=(0,r.useCallback)((e=>{var t;if(l){if(1===n.disclosureState)return;switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),a({type:0}),null==(t=document.getElementById(n.buttonId))||t.focus()}}else switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),a({type:0})}}),[a,l,n.disclosureState,n.buttonId]),c=(0,r.useCallback)((e=>{if(" "===e.key)e.preventDefault()}),[]),d=(0,r.useCallback)((t=>{var r;Vn(t.currentTarget)||e.disabled||(l?(a({type:0}),null==(r=document.getElementById(n.buttonId))||r.focus()):a({type:0}))}),[a,e.disabled,n.buttonId,l]),f=(0,r.useMemo)((()=>({open:0===n.disclosureState})),[n]),h=Un(e,o);return An({props:{...e,...l?{ref:i,type:h,onKeyDown:u,onClick:d}:{ref:i,id:n.buttonId,type:h,"aria-expanded":e.disabled?void 0:0===n.disclosureState,"aria-controls":n.linkedPanel?n.panelId:void 0,onKeyDown:u,onKeyUp:c,onClick:d}},slot:f,defaultTag:"button",name:"Disclosure.Button"})})),Ur=Nn((function(e,t){let[n,a]=Ir("Disclosure.Panel"),{close:o}=Vr("Disclosure.Panel"),i=Tn(t,(()=>{n.linkedPanel||a({type:4})})),s=Gn(),l=null!==s?0===s:0===n.disclosureState;(0,r.useEffect)((()=>()=>a({type:5})),[a]),(0,r.useEffect)((()=>{var t;1===n.disclosureState&&(null==(t=e.unmount)||t)&&a({type:5})}),[n.disclosureState,e.unmount,a]);let u=(0,r.useMemo)((()=>({open:0===n.disclosureState,close:o})),[n,o]),c={ref:i,id:n.panelId},d=e;return r.default.createElement(Fr.Provider,{value:n.panelId},An({props:{...d,...c},slot:u,defaultTag:"div",features:3,visible:l,name:"Disclosure.Panel"}))}));qr.Button=Yr,qr.Panel=Ur;var Wr={1:e=>e.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0:e=>e.disabled||0===e.listboxState?e:{...e,listboxState:0},2:(e,t)=>e.disabled===t.disabled?e:{...e,disabled:t.disabled},3:(e,t)=>e.orientation===t.orientation?e:{...e,orientation:t.orientation},4(e,t){if(e.disabled||1===e.listboxState)return e;let n=Ln(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return""===e.searchQuery&&e.activeOptionIndex===n?e:{...e,searchQuery:"",activeOptionIndex:n}},5:(e,t)=>{if(e.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),a=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=a?e.options.indexOf(a):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o}},6:e=>e.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},7:(e,t)=>{var n;let r=Array.from(null==(n=e.optionsRef.current)?void 0:n.querySelectorAll('[id^="headlessui-listbox-option-"]')).reduce(((e,t,n)=>Object.assign(e,{[t.id]:n})),{}),a=[...e.options,{id:t.id,dataRef:t.dataRef}].sort(((e,t)=>r[e.id]-r[t.id]));return{...e,options:a}},8:(e,t)=>{let n=e.options.slice(),r=null!==e.activeOptionIndex?n[e.activeOptionIndex]:null,a=n.findIndex((e=>e.id===t.id));return-1!==a&&n.splice(a,1),{...e,options:n,activeOptionIndex:a===e.activeOptionIndex||null===r?null:n.indexOf(r)}}},$r=(0,r.createContext)(null);function Xr(e){let t=(0,r.useContext)($r);if(null===t){let t=new Error(`<${e} /> is missing a parent <${Qr.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Xr),t}return t}function Kr(e,t){return Dn(t.type,Wr,e,t)}$r.displayName="ListboxContext";var Zr=r.Fragment;function Qr(e){let{value:t,onChange:n,disabled:a=!1,horizontal:o=!1,...i}=e,s=o?"horizontal":"vertical",l=(0,r.useReducer)(Kr,{listboxState:1,propsRef:{current:{value:t,onChange:n}},labelRef:(0,r.createRef)(),buttonRef:(0,r.createRef)(),optionsRef:(0,r.createRef)(),disabled:a,orientation:s,options:[],searchQuery:"",activeOptionIndex:null}),[{listboxState:u,propsRef:c,optionsRef:d,buttonRef:f},h]=l;Cn((()=>{c.current.value=t}),[t,c]),Cn((()=>{c.current.onChange=n}),[n,c]),Cn((()=>h({type:2,disabled:a})),[a]),Cn((()=>h({type:3,orientation:s})),[s]),Fn("mousedown",(e=>{var t,n,r;let a=e.target;0===u&&((null==(t=f.current)?void 0:t.contains(a))||(null==(n=d.current)?void 0:n.contains(a))||(h({type:1}),sr(a,1)||(e.preventDefault(),null==(r=f.current)||r.focus())))}));let p=(0,r.useMemo)((()=>({open:0===u,disabled:a})),[u,a]);return r.default.createElement($r.Provider,{value:l},r.default.createElement(qn,{value:Dn(u,{0:0,1:1})},An({props:i,slot:p,defaultTag:Zr,name:"Listbox"})))}var Jr=Nn((function(e,t){var n;let[a,o]=Xr("Listbox.Button"),i=Tn(a.buttonRef,t),s=`headlessui-listbox-button-${Mn()}`,l=kn(),u=(0,r.useCallback)((e=>{switch(e.key){case" ":case"Enter":case"ArrowDown":e.preventDefault(),o({type:0}),l.nextFrame((()=>{a.propsRef.current.value||o({type:4,focus:0})}));break;case"ArrowUp":e.preventDefault(),o({type:0}),l.nextFrame((()=>{a.propsRef.current.value||o({type:4,focus:3})}))}}),[o,a,l]),c=(0,r.useCallback)((e=>{if(" "===e.key)e.preventDefault()}),[]),d=(0,r.useCallback)((e=>{if(Vn(e.currentTarget))return e.preventDefault();0===a.listboxState?(o({type:1}),l.nextFrame((()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),o({type:0}))}),[o,l,a]),f=zn((()=>{if(a.labelRef.current)return[a.labelRef.current.id,s].join(" ")}),[a.labelRef.current,s]),h=(0,r.useMemo)((()=>({open:0===a.listboxState,disabled:a.disabled})),[a]);return An({props:{...e,...{ref:i,id:s,type:Un(e,a.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=a.optionsRef.current)?void 0:n.id,"aria-expanded":a.disabled?void 0:0===a.listboxState,"aria-labelledby":f,disabled:a.disabled,onKeyDown:u,onKeyUp:c,onClick:d}},slot:h,defaultTag:"button",name:"Listbox.Button"})}));var ea=Nn((function(e,t){var n;let[a,o]=Xr("Listbox.Options"),i=Tn(a.optionsRef,t),s=`headlessui-listbox-options-${Mn()}`,l=kn(),u=kn(),c=Gn(),d=null!==c?0===c:0===a.listboxState;Cn((()=>{let e=a.optionsRef.current;!e||0===a.listboxState&&e!==document.activeElement&&e.focus({preventScroll:!0})}),[a.listboxState,a.optionsRef]);let f=(0,r.useCallback)((e=>{switch(u.dispose(),e.key){case" ":if(""!==a.searchQuery)return e.preventDefault(),e.stopPropagation(),o({type:5,value:e.key});case"Enter":if(e.preventDefault(),e.stopPropagation(),o({type:1}),null!==a.activeOptionIndex){let{dataRef:e}=a.options[a.activeOptionIndex];a.propsRef.current.onChange(e.current.value)}_n().nextFrame((()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case Dn(a.orientation,{vertical:"ArrowDown",horizontal:"ArrowRight"}):return e.preventDefault(),e.stopPropagation(),o({type:4,focus:2});case Dn(a.orientation,{vertical:"ArrowUp",horizontal:"ArrowLeft"}):return e.preventDefault(),e.stopPropagation(),o({type:4,focus:1});case"Home":case"PageUp":return e.preventDefault(),e.stopPropagation(),o({type:4,focus:0});case"End":case"PageDown":return e.preventDefault(),e.stopPropagation(),o({type:4,focus:3});case"Escape":return e.preventDefault(),e.stopPropagation(),o({type:1}),l.nextFrame((()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));case"Tab":e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(o({type:5,value:e.key}),u.setTimeout((()=>o({type:6})),350))}}),[l,o,u,a]),h=zn((()=>{var e,t,n;return null!=(n=null==(e=a.labelRef.current)?void 0:e.id)?n:null==(t=a.buttonRef.current)?void 0:t.id}),[a.labelRef.current,a.buttonRef.current]),p=(0,r.useMemo)((()=>({open:0===a.listboxState})),[a]);return An({props:{...e,...{"aria-activedescendant":null===a.activeOptionIndex||null==(n=a.options[a.activeOptionIndex])?void 0:n.id,"aria-labelledby":h,"aria-orientation":a.orientation,id:s,onKeyDown:f,role:"listbox",tabIndex:0,ref:i}},slot:p,defaultTag:"ul",features:3,visible:d,name:"Listbox.Options"})}));Qr.Button=Jr,Qr.Label=function(e){let[t]=Xr("Listbox.Label"),n=`headlessui-listbox-label-${Mn()}`,a=(0,r.useCallback)((()=>{var e;return null==(e=t.buttonRef.current)?void 0:e.focus({preventScroll:!0})}),[t.buttonRef]),o=(0,r.useMemo)((()=>({open:0===t.listboxState,disabled:t.disabled})),[t]);return An({props:{...e,...{ref:t.labelRef,id:n,onClick:a}},slot:o,defaultTag:"label",name:"Listbox.Label"})},Qr.Options=ea,Qr.Option=function(e){let{disabled:t=!1,value:n,...a}=e,[o,i]=Xr("Listbox.Option"),s=`headlessui-listbox-option-${Mn()}`,l=null!==o.activeOptionIndex&&o.options[o.activeOptionIndex].id===s,u=o.propsRef.current.value===n,c=(0,r.useRef)({disabled:t,value:n});Cn((()=>{c.current.disabled=t}),[c,t]),Cn((()=>{c.current.value=n}),[c,n]),Cn((()=>{var e,t;c.current.textValue=null==(t=null==(e=document.getElementById(s))?void 0:e.textContent)?void 0:t.toLowerCase()}),[c,s]);let d=(0,r.useCallback)((()=>o.propsRef.current.onChange(n)),[o.propsRef,n]);Cn((()=>(i({type:7,id:s,dataRef:c}),()=>i({type:8,id:s}))),[c,s]),Cn((()=>{var e,t;0===o.listboxState&&(!u||(i({type:4,focus:4,id:s}),null==(t=null==(e=document.getElementById(s))?void 0:e.focus)||t.call(e)))}),[o.listboxState]),Cn((()=>{if(0!==o.listboxState||!l)return;let e=_n();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=document.getElementById(s))?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[s,l,o.listboxState,o.activeOptionIndex]);let f=(0,r.useCallback)((e=>{if(t)return e.preventDefault();d(),i({type:1}),_n().nextFrame((()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))}),[i,o.buttonRef,t,d]),h=(0,r.useCallback)((()=>{if(t)return i({type:4,focus:5});i({type:4,focus:4,id:s})}),[t,s,i]),p=(0,r.useCallback)((()=>{t||l||i({type:4,focus:4,id:s})}),[t,l,s,i]),v=(0,r.useCallback)((()=>{t||!l||i({type:4,focus:5})}),[t,l,i]),g=(0,r.useMemo)((()=>({active:l,selected:u,disabled:t})),[l,u,t]);return An({props:{...a,id:s,role:"option",tabIndex:!0===t?void 0:-1,"aria-disabled":!0===t||void 0,"aria-selected":!0===u||void 0,disabled:void 0,onClick:f,onFocus:h,onPointerMove:p,onMouseMove:p,onPointerLeave:v,onMouseLeave:v},slot:g,defaultTag:"li",name:"Listbox.Option"})};var ta={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,menuState:0},2:(e,t)=>{let n=Ln(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return""===e.searchQuery&&e.activeItemIndex===n?e:{...e,searchQuery:"",activeItemIndex:n}},3:(e,t)=>{let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),a=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled})),o=a?e.items.indexOf(a):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:o}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{var n;let r=Array.from(null==(n=e.itemsRef.current)?void 0:n.querySelectorAll('[id^="headlessui-menu-item-"]')).reduce(((e,t,n)=>Object.assign(e,{[t.id]:n})),{}),a=[...e.items,{id:t.id,dataRef:t.dataRef}].sort(((e,t)=>r[e.id]-r[t.id]));return{...e,items:a}},6:(e,t)=>{let n=e.items.slice(),r=null!==e.activeItemIndex?n[e.activeItemIndex]:null,a=n.findIndex((e=>e.id===t.id));return-1!==a&&n.splice(a,1),{...e,items:n,activeItemIndex:a===e.activeItemIndex||null===r?null:n.indexOf(r)}}},na=(0,r.createContext)(null);function ra(e){let t=(0,r.useContext)(na);if(null===t){let t=new Error(`<${e} /> is missing a parent <${ia.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,ra),t}return t}function aa(e,t){return Dn(t.type,ta,e,t)}na.displayName="MenuContext";var oa=r.Fragment;function ia(e){let t=(0,r.useReducer)(aa,{menuState:1,buttonRef:(0,r.createRef)(),itemsRef:(0,r.createRef)(),items:[],searchQuery:"",activeItemIndex:null}),[{menuState:n,itemsRef:a,buttonRef:o},i]=t;Fn("mousedown",(e=>{var t,r,s;let l=e.target;0===n&&((null==(t=o.current)?void 0:t.contains(l))||(null==(r=a.current)?void 0:r.contains(l))||(i({type:1}),sr(l,1)||(e.preventDefault(),null==(s=o.current)||s.focus())))}));let s=(0,r.useMemo)((()=>({open:0===n})),[n]);return r.default.createElement(na.Provider,{value:t},r.default.createElement(qn,{value:Dn(n,{0:0,1:1})},An({props:e,slot:s,defaultTag:oa,name:"Menu"})))}var sa=Nn((function(e,t){var n;let[a,o]=ra("Menu.Button"),i=Tn(a.buttonRef,t),s=`headlessui-menu-button-${Mn()}`,l=kn(),u=(0,r.useCallback)((e=>{switch(e.key){case" ":case"Enter":case"ArrowDown":e.preventDefault(),e.stopPropagation(),o({type:0}),l.nextFrame((()=>o({type:2,focus:0})));break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),o({type:0}),l.nextFrame((()=>o({type:2,focus:3})))}}),[o,l]),c=(0,r.useCallback)((e=>{if(" "===e.key)e.preventDefault()}),[]),d=(0,r.useCallback)((t=>{if(Vn(t.currentTarget))return t.preventDefault();e.disabled||(0===a.menuState?(o({type:1}),l.nextFrame((()=>{var e;return null==(e=a.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(t.preventDefault(),t.stopPropagation(),o({type:0})))}),[o,l,a,e.disabled]),f=(0,r.useMemo)((()=>({open:0===a.menuState})),[a]);return An({props:{...e,...{ref:i,id:s,type:Un(e,a.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=a.itemsRef.current)?void 0:n.id,"aria-expanded":e.disabled?void 0:0===a.menuState,onKeyDown:u,onKeyUp:c,onClick:d}},slot:f,defaultTag:"button",name:"Menu.Button"})})),la=Nn((function(e,t){var n,a;let[o,i]=ra("Menu.Items"),s=Tn(o.itemsRef,t),l=`headlessui-menu-items-${Mn()}`,u=kn(),c=Gn(),d=null!==c?0===c:0===o.menuState;(0,r.useEffect)((()=>{let e=o.itemsRef.current;!e||0===o.menuState&&e!==document.activeElement&&e.focus({preventScroll:!0})}),[o.menuState,o.itemsRef]),Wn({container:o.itemsRef.current,enabled:0===o.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let f=(0,r.useCallback)((e=>{var t;switch(u.dispose(),e.key){case" ":if(""!==o.searchQuery)return e.preventDefault(),e.stopPropagation(),i({type:3,value:e.key});case"Enter":if(e.preventDefault(),e.stopPropagation(),i({type:1}),null!==o.activeItemIndex){let{id:e}=o.items[o.activeItemIndex];null==(t=document.getElementById(e))||t.click()}_n().nextFrame((()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case"ArrowDown":return e.preventDefault(),e.stopPropagation(),i({type:2,focus:2});case"ArrowUp":return e.preventDefault(),e.stopPropagation(),i({type:2,focus:1});case"Home":case"PageUp":return e.preventDefault(),e.stopPropagation(),i({type:2,focus:0});case"End":case"PageDown":return e.preventDefault(),e.stopPropagation(),i({type:2,focus:3});case"Escape":e.preventDefault(),e.stopPropagation(),i({type:1}),_n().nextFrame((()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case"Tab":e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(i({type:3,value:e.key}),u.setTimeout((()=>i({type:4})),350))}}),[i,u,o]),h=(0,r.useCallback)((e=>{if(" "===e.key)e.preventDefault()}),[]),p=(0,r.useMemo)((()=>({open:0===o.menuState})),[o]);return An({props:{...e,...{"aria-activedescendant":null===o.activeItemIndex||null==(n=o.items[o.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(a=o.buttonRef.current)?void 0:a.id,id:l,onKeyDown:f,onKeyUp:h,role:"menu",tabIndex:0,ref:s}},slot:p,defaultTag:"div",features:3,visible:d,name:"Menu.Items"})})),ua=r.Fragment;ia.Button=sa,ia.Items=la,ia.Item=function(e){let{disabled:t=!1,onClick:n,...a}=e,[o,i]=ra("Menu.Item"),s=`headlessui-menu-item-${Mn()}`,l=null!==o.activeItemIndex&&o.items[o.activeItemIndex].id===s;Cn((()=>{if(0!==o.menuState||!l)return;let e=_n();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=document.getElementById(s))?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[s,l,o.menuState,o.activeItemIndex]);let u=(0,r.useRef)({disabled:t});Cn((()=>{u.current.disabled=t}),[u,t]),Cn((()=>{var e,t;u.current.textValue=null==(t=null==(e=document.getElementById(s))?void 0:e.textContent)?void 0:t.toLowerCase()}),[u,s]),Cn((()=>(i({type:5,id:s,dataRef:u}),()=>i({type:6,id:s}))),[u,s]);let c=(0,r.useCallback)((e=>t?e.preventDefault():(i({type:1}),_n().nextFrame((()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})),n?n(e):void 0)),[i,o.buttonRef,t,n]),d=(0,r.useCallback)((()=>{if(t)return i({type:2,focus:5});i({type:2,focus:4,id:s})}),[t,s,i]),f=(0,r.useCallback)((()=>{t||l||i({type:2,focus:4,id:s})}),[t,l,s,i]),h=(0,r.useCallback)((()=>{t||!l||i({type:2,focus:5})}),[t,l,i]),p=(0,r.useMemo)((()=>({active:l,disabled:t})),[l,t]);return An({props:{...a,id:s,role:"menuitem",tabIndex:!0===t?void 0:-1,"aria-disabled":!0===t||void 0,disabled:void 0,onClick:c,onFocus:d,onPointerMove:f,onMouseMove:f,onPointerLeave:h,onMouseLeave:h},slot:p,defaultTag:ua,name:"Menu.Item"})};var ca={0:e=>({...e,popoverState:Dn(e.popoverState,{0:1,1:0})}),1:e=>1===e.popoverState?e:{...e,popoverState:1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},da=(0,r.createContext)(null);function fa(e){let t=(0,r.useContext)(da);if(null===t){let t=new Error(`<${e} /> is missing a parent <${ba.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,fa),t}return t}da.displayName="PopoverContext";var ha=(0,r.createContext)(null);function pa(e){let t=(0,r.useContext)(ha);if(null===t){let t=new Error(`<${e} /> is missing a parent <${ba.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,pa),t}return t}ha.displayName="PopoverAPIContext";var va=(0,r.createContext)(null);function ga(){return(0,r.useContext)(va)}va.displayName="PopoverGroupContext";var ma=(0,r.createContext)(null);function ya(e,t){return Dn(t.type,ca,e,t)}ma.displayName="PopoverPanelContext";function ba(e){let t=`headlessui-popover-button-${Mn()}`,n=`headlessui-popover-panel-${Mn()}`,a=(0,r.useReducer)(ya,{popoverState:1,button:null,buttonId:t,panel:null,panelId:n}),[{popoverState:o,button:i,panel:s},l]=a;(0,r.useEffect)((()=>l({type:3,buttonId:t})),[t,l]),(0,r.useEffect)((()=>l({type:5,panelId:n})),[n,l]);let u=(0,r.useMemo)((()=>({buttonId:t,panelId:n,close:()=>l({type:1})})),[t,n,l]),c=ga(),d=null==c?void 0:c.registerPopover,f=(0,r.useCallback)((()=>{var e;return null!=(e=null==c?void 0:c.isFocusWithinPopoverGroup())?e:(null==i?void 0:i.contains(document.activeElement))||(null==s?void 0:s.contains(document.activeElement))}),[c,i,s]);(0,r.useEffect)((()=>null==d?void 0:d(u)),[d,u]),Fn("focus",(()=>{0===o&&(f()||!i||!s||l({type:1}))}),!0),Fn("mousedown",(e=>{let t=e.target;0===o&&((null==i?void 0:i.contains(t))||(null==s?void 0:s.contains(t))||(l({type:1}),sr(t,1)||(e.preventDefault(),null==i||i.focus())))}));let h=(0,r.useCallback)((e=>{l({type:1});let t=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:i:i;null==t||t.focus()}),[l,i]),p=(0,r.useMemo)((()=>({close:h})),[h]),v=(0,r.useMemo)((()=>({open:0===o,close:h})),[o,h]);return r.default.createElement(da.Provider,{value:a},r.default.createElement(ha.Provider,{value:p},r.default.createElement(qn,{value:Dn(o,{0:0,1:1})},An({props:e,slot:v,defaultTag:"div",name:"Popover"}))))}var wa=Nn((function(e,t){let[n,a]=fa("Popover.Button"),o=(0,r.useRef)(null),i=ga(),s=null==i?void 0:i.closeOthers,l=(0,r.useContext)(ma),u=null!==l&&l===n.panelId,c=Tn(o,t,u?null:e=>a({type:2,button:e})),d=Tn(o,t),f=(0,r.useRef)(null),h=(0,r.useRef)("undefined"==typeof window?null:document.activeElement);Fn("focus",(()=>{h.current=f.current,f.current=document.activeElement}),!0);let p=(0,r.useCallback)((e=>{var t,r;if(u){if(1===n.popoverState)return;switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),a({type:1}),null==(t=n.button)||t.focus()}}else switch(e.key){case" ":case"Enter":e.preventDefault(),e.stopPropagation(),1===n.popoverState&&(null==s||s(n.buttonId)),a({type:0});break;case"Escape":if(0!==n.popoverState)return null==s?void 0:s(n.buttonId);if(!o.current||!o.current.contains(document.activeElement))return;e.preventDefault(),e.stopPropagation(),a({type:1});break;case"Tab":if(0!==n.popoverState||!n.panel||!n.button)return;if(e.shiftKey){if(!h.current||(null==(r=n.button)?void 0:r.contains(h.current))||n.panel.contains(h.current))return;let t=ir(),a=t.indexOf(h.current);if(t.indexOf(n.button)>a)return;e.preventDefault(),e.stopPropagation(),ur(n.panel,8)}else e.preventDefault(),e.stopPropagation(),ur(n.panel,1)}}),[a,n.popoverState,n.buttonId,n.button,n.panel,o,s,u]),v=(0,r.useCallback)((e=>{var t;if(!u&&(" "===e.key&&e.preventDefault(),0===n.popoverState&&n.panel&&n.button)&&"Tab"===e.key){if(!h.current||(null==(t=n.button)?void 0:t.contains(h.current))||n.panel.contains(h.current))return;let r=ir(),a=r.indexOf(h.current);if(r.indexOf(n.button)>a)return;e.preventDefault(),e.stopPropagation(),ur(n.panel,8)}}),[n.popoverState,n.panel,n.button,u]),g=(0,r.useCallback)((t=>{var r,o;Vn(t.currentTarget)||e.disabled||(u?(a({type:1}),null==(r=n.button)||r.focus()):(1===n.popoverState&&(null==s||s(n.buttonId)),null==(o=n.button)||o.focus(),a({type:0})))}),[a,n.button,n.popoverState,n.buttonId,e.disabled,s,u]),m=(0,r.useMemo)((()=>({open:0===n.popoverState})),[n]),y=Un(e,o);return An({props:{...e,...u?{ref:d,type:y,onKeyDown:p,onClick:g}:{ref:c,id:n.buttonId,type:y,"aria-expanded":e.disabled?void 0:0===n.popoverState,"aria-controls":n.panel?n.panelId:void 0,onKeyDown:p,onKeyUp:v,onClick:g}},slot:m,defaultTag:"button",name:"Popover.Button"})})),xa=Nn((function(e,t){let[{popoverState:n},a]=fa("Popover.Overlay"),o=Tn(t),i=`headlessui-popover-overlay-${Mn()}`,s=Gn(),l=null!==s?0===s:0===n;return An({props:{...e,ref:o,id:i,"aria-hidden":!0,onClick:(0,r.useCallback)((e=>{if(Vn(e.currentTarget))return e.preventDefault();a({type:1})}),[a])},slot:(0,r.useMemo)((()=>({open:0===n})),[n]),defaultTag:"div",features:3,visible:l,name:"Popover.Overlay"})})),Ea=Nn((function(e,t){let{focus:n=!1,...a}=e,[o,i]=fa("Popover.Panel"),{close:s}=pa("Popover.Panel"),l=(0,r.useRef)(null),u=Tn(l,t,(e=>{i({type:4,panel:e})})),c=Gn(),d=null!==c?0===c:0===o.popoverState,f=(0,r.useCallback)((e=>{var t;if("Escape"===e.key){if(0!==o.popoverState||!l.current||!l.current.contains(document.activeElement))return;e.preventDefault(),e.stopPropagation(),i({type:1}),null==(t=o.button)||t.focus()}}),[o,l,i]);(0,r.useEffect)((()=>()=>i({type:4,panel:null})),[i]),(0,r.useEffect)((()=>{var t;e.static||1===o.popoverState&&(null==(t=e.unmount)||t)&&i({type:4,panel:null})}),[o.popoverState,e.unmount,e.static,i]),(0,r.useEffect)((()=>{if(!n||0!==o.popoverState||!l.current)return;let e=document.activeElement;l.current.contains(e)||ur(l.current,1)}),[n,l,o.popoverState]),Fn("keydown",(e=>{var t;if(!(0===o.popoverState&&l.current&&"Tab"===e.key&&document.activeElement&&l.current&&l.current.contains(document.activeElement)))return;e.preventDefault();let n=ur(l.current,e.shiftKey?2:4);if(3===n)return null==(t=o.button)?void 0:t.focus();if(1===n){if(!o.button)return;let e=ir(),t=e.indexOf(o.button);0===ur(e.splice(t+1).filter((e=>{var t;return!(null==(t=l.current)?void 0:t.contains(e))})),1)&&ur(document.body,1)}})),Fn("focus",(()=>{var e;!n||0===o.popoverState&&(!l.current||(null==(e=l.current)?void 0:e.contains(document.activeElement))||i({type:1}))}),!0);let h=(0,r.useMemo)((()=>({open:0===o.popoverState,close:s})),[o,s]),p={ref:u,id:o.panelId,onKeyDown:f};return r.default.createElement(ma.Provider,{value:o.panelId},An({props:{...a,...p},slot:h,defaultTag:"div",features:3,visible:d,name:"Popover.Panel"}))}));ba.Button=wa,ba.Overlay=xa,ba.Panel=Ea,ba.Group=function(e){let t=(0,r.useRef)(null),[n,a]=(0,r.useState)([]),o=(0,r.useCallback)((e=>{a((t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t}))}),[a]),i=(0,r.useCallback)((e=>(a((t=>[...t,e])),()=>o(e))),[a,o]),s=(0,r.useCallback)((()=>{var e;let r=document.activeElement;return!!(null==(e=t.current)?void 0:e.contains(r))||n.some((e=>{var t,n;return(null==(t=document.getElementById(e.buttonId))?void 0:t.contains(r))||(null==(n=document.getElementById(e.panelId))?void 0:n.contains(r))}))}),[t,n]),l=(0,r.useCallback)((e=>{for(let t of n)t.buttonId!==e&&t.close()}),[n]),u=(0,r.useMemo)((()=>({registerPopover:i,unregisterPopover:o,isFocusWithinPopoverGroup:s,closeOthers:l})),[i,o,s,l]),c=(0,r.useMemo)((()=>({})),[]),d={ref:t},f=e;return r.default.createElement(va.Provider,{value:u},An({props:{...f,...d},slot:c,defaultTag:"div",name:"Popover.Group"}))};var _a=(0,r.createContext)(null);function ka(){let e=(0,r.useContext)(_a);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,ka),e}return e}function Ca(){let[e,t]=(0,r.useState)([]);return[e.length>0?e.join(" "):void 0,(0,r.useMemo)((()=>function(e){let n=(0,r.useCallback)((e=>(t((t=>[...t,e])),()=>t((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n})))),[]),a=(0,r.useMemo)((()=>({register:n,slot:e.slot,name:e.name,props:e.props})),[n,e.slot,e.name,e.props]);return r.default.createElement(_a.Provider,{value:a},e.children)}),[t])]}function Sa(e){let{passive:t=!1,...n}=e,r=ka(),a=`headlessui-label-${Mn()}`;Cn((()=>r.register(a)),[a,r.register]);let o={...n,...{...r.props,id:a}};return t&&delete o.onClick,An({props:o,slot:r.slot||{},defaultTag:"label",name:r.name||"Label"})}var Ra={0:(e,t)=>({...e,options:[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}]}),1(e,t){let n=e.options.slice(),r=e.options.findIndex((e=>e.id===t.id));return-1===r?e:(n.splice(r,1),{...e,options:n})}},Pa=(0,r.createContext)(null);function Oa(e){let t=(0,r.useContext)(Pa);if(null===t){let t=new Error(`<${e} /> is missing a parent <${ja.name} /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Oa),t}return t}function Ma(e,t){return Dn(t.type,Ra,e,t)}Pa.displayName="RadioGroupContext";function ja(e){let{value:t,onChange:n,disabled:a=!1,...o}=e,[{options:i},s]=(0,r.useReducer)(Ma,{options:[]}),[l,u]=Ca(),[c,d]=Cr(),f=`headlessui-radiogroup-${Mn()}`,h=(0,r.useRef)(null),p=(0,r.useMemo)((()=>i.find((e=>!e.propsRef.current.disabled))),[i]),v=(0,r.useMemo)((()=>i.some((e=>e.propsRef.current.value===t))),[i,t]),g=(0,r.useCallback)((e=>{var r;if(a||e===t)return!1;let o=null==(r=i.find((t=>t.propsRef.current.value===e)))?void 0:r.propsRef.current;return!(null==o?void 0:o.disabled)&&(n(e),!0)}),[n,t,a,i]);Wn({container:h.current,accept:e=>"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let m=(0,r.useCallback)((e=>{if(!h.current)return;let t=i.filter((e=>!1===e.propsRef.current.disabled)).map((e=>e.element.current));switch(e.key){case"ArrowLeft":case"ArrowUp":if(e.preventDefault(),e.stopPropagation(),2===ur(t,18)){let e=i.find((e=>e.element.current===document.activeElement));e&&g(e.propsRef.current.value)}break;case"ArrowRight":case"ArrowDown":if(e.preventDefault(),e.stopPropagation(),2===ur(t,20)){let e=i.find((e=>e.element.current===document.activeElement));e&&g(e.propsRef.current.value)}break;case" ":{e.preventDefault(),e.stopPropagation();let t=i.find((e=>e.element.current===document.activeElement));t&&g(t.propsRef.current.value)}}}),[h,i,g]),y=(0,r.useCallback)((e=>(s({type:0,...e}),()=>s({type:1,id:e.id}))),[s]),b=(0,r.useMemo)((()=>({registerOption:y,firstOption:p,containsCheckedOption:v,change:g,disabled:a,value:t})),[y,p,v,g,a,t]),w={ref:h,id:f,role:"radiogroup","aria-labelledby":l,"aria-describedby":c,onKeyDown:m};return r.default.createElement(d,{name:"RadioGroup.Description"},r.default.createElement(u,{name:"RadioGroup.Label"},r.default.createElement(Pa.Provider,{value:b},An({props:{...o,...w},defaultTag:"div",name:"RadioGroup"}))))}ja.Option=function(e){let t=(0,r.useRef)(null),n=`headlessui-radiogroup-option-${Mn()}`,[a,o]=Ca(),[i,s]=Cr(),{addFlag:l,removeFlag:u,hasFlag:c}=function(e=0){let[t,n]=(0,r.useState)(e);return{addFlag:(0,r.useCallback)((e=>n((t=>t|e))),[n]),hasFlag:(0,r.useCallback)((e=>Boolean(t&e)),[t]),removeFlag:(0,r.useCallback)((e=>n((t=>t&~e))),[n]),toggleFlag:(0,r.useCallback)((e=>n((t=>t^e))),[n])}}(1),{value:d,disabled:f=!1,...h}=e,p=(0,r.useRef)({value:d,disabled:f});Cn((()=>{p.current.value=d}),[d,p]),Cn((()=>{p.current.disabled=f}),[f,p]);let{registerOption:v,disabled:g,change:m,firstOption:y,containsCheckedOption:b,value:w}=Oa("RadioGroup.Option");Cn((()=>v({id:n,element:t,propsRef:p})),[n,v,t,e]);let x=(0,r.useCallback)((()=>{var e;!m(d)||(l(2),null==(e=t.current)||e.focus())}),[l,m,d]),E=(0,r.useCallback)((()=>l(2)),[l]),_=(0,r.useCallback)((()=>u(2)),[u]),k=(null==y?void 0:y.id)===n,C=g||f,S=w===d,R={ref:t,id:n,role:"radio","aria-checked":S?"true":"false","aria-labelledby":a,"aria-describedby":i,"aria-disabled":!!C||void 0,tabIndex:C?-1:S||!b&&k?0:-1,onClick:C?void 0:x,onFocus:C?void 0:E,onBlur:C?void 0:_},P=(0,r.useMemo)((()=>({checked:S,disabled:C,active:c(2)})),[S,C,c]);return r.default.createElement(s,{name:"RadioGroup.Description"},r.default.createElement(o,{name:"RadioGroup.Label"},An({props:{...h,...R},slot:P,defaultTag:"div",name:"RadioGroup.Option"})))},ja.Label=Sa,ja.Description=Sr;var za=(0,r.createContext)(null);za.displayName="GroupContext";var Ta=r.Fragment;function Da(e){let{checked:t,onChange:n,...a}=e,o=`headlessui-switch-${Mn()}`,i=(0,r.useContext)(za),s=(0,r.useRef)(null),l=Tn(s,null===i?null:i.setSwitch),u=(0,r.useCallback)((()=>n(!t)),[n,t]),c=(0,r.useCallback)((e=>{if(Vn(e.currentTarget))return e.preventDefault();e.preventDefault(),u()}),[u]),d=(0,r.useCallback)((e=>{"Tab"!==e.key&&e.preventDefault()," "===e.key&&u()}),[u]),f=(0,r.useCallback)((e=>e.preventDefault()),[]),h=(0,r.useMemo)((()=>({checked:t})),[t]);return An({props:{...a,...{id:o,ref:l,role:"switch",type:Un(e,s),tabIndex:0,"aria-checked":t,"aria-labelledby":null==i?void 0:i.labelledby,"aria-describedby":null==i?void 0:i.describedby,onClick:c,onKeyUp:d,onKeyPress:f}},slot:h,defaultTag:"button",name:"Switch"})}Da.Group=function(e){let[t,n]=(0,r.useState)(null),[a,o]=Ca(),[i,s]=Cr(),l=(0,r.useMemo)((()=>({switch:t,setSwitch:n,labelledby:a,describedby:i})),[t,n,a,i]);return r.default.createElement(s,{name:"Switch.Description"},r.default.createElement(o,{name:"Switch.Label",props:{onClick(){!t||(t.click(),t.focus({preventScroll:!0}))}}},r.default.createElement(za.Provider,{value:l},An({props:e,defaultTag:Ta,name:"Switch.Group"}))))},Da.Label=Sa,Da.Description=Sr;var Aa={0:(e,t)=>e.selectedIndex===t.index?e:{...e,selectedIndex:t.index},1:(e,t)=>e.orientation===t.orientation?e:{...e,orientation:t.orientation},2:(e,t)=>e.activation===t.activation?e:{...e,activation:t.activation},3:(e,t)=>e.tabs.includes(t.tab)?e:{...e,tabs:[...e.tabs,t.tab]},4:(e,t)=>({...e,tabs:e.tabs.filter((e=>e!==t.tab))}),5:(e,t)=>e.panels.includes(t.panel)?e:{...e,panels:[...e.panels,t.panel]},6:(e,t)=>({...e,panels:e.panels.filter((e=>e!==t.panel))}),7:e=>({...e})},Ba=(0,r.createContext)(null);function Na(e){let t=(0,r.useContext)(Ba);if(null===t){let t=new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Na),t}return t}function Ia(e,t){return Dn(t.type,Aa,e,t)}Ba.displayName="TabsContext";var La=r.Fragment;function Va(e){var t,n;let a=`headlessui-tabs-tab-${Mn()}`,[{selectedIndex:o,tabs:i,panels:s,orientation:l,activation:u},{dispatch:c,change:d}]=Na(Va.name),f=(0,r.useRef)(null),h=Tn(f,(e=>{!e||c({type:7})}));Cn((()=>(c({type:3,tab:f}),()=>c({type:4,tab:f}))),[c,f]);let p=i.indexOf(f),v=p===o,g=(0,r.useCallback)((e=>{let t=i.map((e=>e.current)).filter(Boolean);if(" "===e.key||"Enter"===e.key)return e.preventDefault(),e.stopPropagation(),void d(p);switch(e.key){case"Home":case"PageUp":return e.preventDefault(),e.stopPropagation(),ur(t,1);case"End":case"PageDown":return e.preventDefault(),e.stopPropagation(),ur(t,8)}return Dn(l,{vertical:()=>"ArrowUp"===e.key?ur(t,18):"ArrowDown"===e.key?ur(t,20):void 0,horizontal:()=>"ArrowLeft"===e.key?ur(t,18):"ArrowRight"===e.key?ur(t,20):void 0})}),[i,l,p,d]),m=(0,r.useCallback)((()=>{var e;null==(e=f.current)||e.focus()}),[f]),y=(0,r.useCallback)((()=>{var e;null==(e=f.current)||e.focus(),d(p)}),[d,p,f]),b=(0,r.useMemo)((()=>({selected:v})),[v]),w={ref:h,onKeyDown:g,onFocus:"manual"===u?m:y,onClick:y,id:a,role:"tab",type:Un(e,f),"aria-controls":null==(n=null==(t=s[p])?void 0:t.current)?void 0:n.id,"aria-selected":v,tabIndex:v?0:-1};return An({props:{...e,...w},slot:b,defaultTag:"button",name:"Tabs.Tab"})}function Fa(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ha(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Ga(e,t,n,r,a,o){let i=_n(),s=void 0!==o?function(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}(o):()=>{};return Ha(e,...a),Fa(e,...t,...n),i.nextFrame((()=>{Ha(e,...n),Fa(e,...r),i.add(function(e,t){let n=_n();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:a}=getComputedStyle(e),[o,i]=[r,a].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t}));return 0!==o?n.setTimeout((()=>{t("finished")}),o+i):t("finished"),n.add((()=>t("cancelled"))),n.dispose}(e,(n=>(Ha(e,...r,...t),Fa(e,...a),s(n)))))})),i.add((()=>Ha(e,...t,...n,...r,...a))),i.add((()=>s("cancelled"))),i.dispose}function qa(e=""){return(0,r.useMemo)((()=>e.split(" ").filter((e=>e.trim().length>1))),[e])}Va.Group=function(e){let{defaultIndex:t=0,vertical:n=!1,manual:a=!1,onChange:o,selectedIndex:i=null,...s}=e,l=n?"vertical":"horizontal",u=a?"manual":"auto",[c,d]=(0,r.useReducer)(Ia,{selectedIndex:null,tabs:[],panels:[],orientation:l,activation:u}),f=(0,r.useMemo)((()=>({selectedIndex:c.selectedIndex})),[c.selectedIndex]),h=(0,r.useRef)((()=>{}));(0,r.useEffect)((()=>{d({type:1,orientation:l})}),[l]),(0,r.useEffect)((()=>{d({type:2,activation:u})}),[u]),(0,r.useEffect)((()=>{"function"==typeof o&&(h.current=o)}),[o]),(0,r.useEffect)((()=>{if(c.tabs.length<=0||null===i&&null!==c.selectedIndex)return;let e=c.tabs.map((e=>e.current)).filter(Boolean),n=e.filter((e=>!e.hasAttribute("disabled"))),r=null!=i?i:t;if(r<0)d({type:0,index:e.indexOf(n[0])});else if(r>c.tabs.length)d({type:0,index:e.indexOf(n[n.length-1])});else{let t=e.slice(0,r),a=[...e.slice(r),...t].find((e=>n.includes(e)));if(!a)return;d({type:0,index:e.indexOf(a)})}}),[t,i,c.tabs,c.selectedIndex]);let p=(0,r.useRef)(c.selectedIndex);(0,r.useEffect)((()=>{p.current=c.selectedIndex}),[c.selectedIndex]);let v=(0,r.useMemo)((()=>[c,{dispatch:d,change(e){p.current!==e&&h.current(e),p.current=e,d({type:0,index:e})}}]),[c,d]);return r.default.createElement(Ba.Provider,{value:v},An({props:{...s},slot:f,defaultTag:La,name:"Tabs"}))},Va.List=function(e){let[{selectedIndex:t,orientation:n}]=Na("Tab.List");return An({props:{...e,role:"tablist","aria-orientation":n},slot:{selectedIndex:t},defaultTag:"div",name:"Tabs.List"})},Va.Panels=function(e){let[{selectedIndex:t}]=Na("Tab.Panels");return An({props:e,slot:(0,r.useMemo)((()=>({selectedIndex:t})),[t]),defaultTag:"div",name:"Tabs.Panels"})},Va.Panel=function(e){var t,n;let[{selectedIndex:a,tabs:o,panels:i},{dispatch:s}]=Na("Tab.Panel"),l=`headlessui-tabs-panel-${Mn()}`,u=(0,r.useRef)(null),c=Tn(u,(e=>{!e||s({type:7})}));Cn((()=>(s({type:5,panel:u}),()=>s({type:6,panel:u}))),[s,u]);let d=i.indexOf(u),f=d===a,h=(0,r.useMemo)((()=>({selected:f})),[f]);return An({props:{...e,...{ref:c,id:l,role:"tabpanel","aria-labelledby":null==(n=null==(t=o[d])?void 0:t.current)?void 0:n.id,tabIndex:f?0:-1}},slot:h,defaultTag:"div",features:3,visible:f,name:"Tabs.Panel"})};var Ya=(0,r.createContext)(null);Ya.displayName="TransitionContext";var Ua=(0,r.createContext)(null);function Wa(e){return"children"in e?Wa(e.children):e.current.filter((({state:e})=>"visible"===e)).length>0}function $a(e){let t=(0,r.useRef)(e),n=(0,r.useRef)([]),a=cr();(0,r.useEffect)((()=>{t.current=e}),[e]);let o=(0,r.useCallback)(((e,r=1)=>{var o;let i=n.current.findIndex((({id:t})=>t===e));-1!==i&&(Dn(r,{0(){n.current.splice(i,1)},1(){n.current[i].state="hidden"}}),!Wa(n)&&a.current&&(null==(o=t.current)||o.call(t)))}),[t,a,n]),i=(0,r.useCallback)((e=>{let t=n.current.find((({id:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({id:e,state:"visible"}),()=>o(e,0)}),[n,o]);return(0,r.useMemo)((()=>({children:n,register:i,unregister:o})),[i,o,n])}function Xa(){}Ua.displayName="NestingContext";var Ka=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Za(e){var t;let n={};for(let r of Ka)n[r]=null!=(t=e[r])?t:Xa;return n}function Qa(e){let{beforeEnter:t,afterEnter:n,beforeLeave:a,afterLeave:o,enter:i,enterFrom:s,enterTo:l,entered:u,leave:c,leaveFrom:d,leaveTo:f,...h}=e,p=(0,r.useRef)(null),[v,g]=(0,r.useState)("visible"),m=h.unmount?0:1,{show:y,appear:b,initial:w}=function(){let e=(0,r.useContext)(Ya);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:x,unregister:E}=function(){let e=(0,r.useContext)(Ua);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),_=Mn(),k=(0,r.useRef)(!1),C=$a((()=>{k.current||(g("hidden"),E(_),T.current.afterLeave())}));Cn((()=>{if(_)return x(_)}),[x,_]),Cn((()=>{if(1===m&&_){if(y&&"visible"!==v)return void g("visible");Dn(v,{hidden:()=>E(_),visible:()=>x(_)})}}),[v,_,x,E,y,m]);let S=qa(i),R=qa(s),P=qa(l),O=qa(u),M=qa(c),j=qa(d),z=qa(f),T=function(e){let t=(0,r.useRef)(Za(e));return(0,r.useEffect)((()=>{t.current=Za(e)}),[e]),t}({beforeEnter:t,afterEnter:n,beforeLeave:a,afterLeave:o}),D=Rn();(0,r.useEffect)((()=>{if(D&&"visible"===v&&null===p.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[p,v,D]);let A=w&&!b;Cn((()=>{let e=p.current;if(e&&!A)return k.current=!0,y&&T.current.beforeEnter(),y||T.current.beforeLeave(),y?Ga(e,S,R,P,O,(e=>{k.current=!1,"finished"===e&&T.current.afterEnter()})):Ga(e,M,j,z,O,(e=>{k.current=!1,"finished"===e&&(Wa(C)||(g("hidden"),E(_),T.current.afterLeave()))}))}),[T,_,k,E,C,p,A,y,S,R,P,M,j,z]);let B={ref:p},N=h;return r.default.createElement(Ua.Provider,{value:C},r.default.createElement(qn,{value:Dn(v,{visible:0,hidden:1})},An({props:{...N,...B},defaultTag:"div",features:1,visible:"visible"===v,name:"Transition.Child"})))}function Ja(e){let{show:t,appear:n=!1,unmount:a,...o}=e,i=Gn();if(void 0===t&&null!==i&&(t=Dn(i,{0:!0,1:!1})),![!0,!1].includes(t))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[s,l]=(0,r.useState)(t?"visible":"hidden"),u=$a((()=>{l("hidden")})),c=function(){let e=(0,r.useRef)(!0);return(0,r.useEffect)((()=>{e.current=!1}),[]),e.current}(),d=(0,r.useMemo)((()=>({show:t,appear:n||!c,initial:c})),[t,n,c]);(0,r.useEffect)((()=>{t?l("visible"):Wa(u)||l("hidden")}),[t,u]);let f={unmount:a};return r.default.createElement(Ua.Provider,{value:u},r.default.createElement(Ya.Provider,{value:d},An({props:{...f,as:r.Fragment,children:r.default.createElement(Qa,{...f,...o})},defaultTag:r.Fragment,features:1,visible:"visible"===s,name:"Transition"})))}function eo(){const[e,t]=(0,r.useState)(localStorage.getItem(Ge)||"system");return(0,r.useEffect)((()=>{Ue(e)}),[e]),Ne(ia,{as:"div",className:"relative inline-block text-left",children:[Ne("div",{children:Ne(ia.Button,{className:"dark:text-green-nx-base inline-flex w-full justify-center rounded-md p-2 text-sm font-medium text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75","data-cy":"theme-open-modal-button",children:[Ne("span",{className:"sr-only",children:"Theme switcher"}),"system"===e&&Ne(v,{className:"h-5 w-5","aria-hidden":"true"}),"light"===e&&Ne(_,{className:"h-5 w-5","aria-hidden":"true"}),"dark"===e&&Ne(E,{className:"h-5 w-5","aria-hidden":"true"})]})}),Ne(Ja,{as:r.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:Ne(ia.Items,{className:"absolute right-0 z-50 mt-2 w-36 origin-top-right rounded-md bg-white text-slate-500 shadow-lg ring-1 ring-slate-900/10 ring-opacity-5 focus:outline-none dark:bg-slate-800 dark:text-slate-400 dark:ring-0",children:Ne("div",{className:"px-1 py-1",children:[Ne(ia.Item,{children:({active:n})=>Ne("button",{"data-cy":"system-theme-button",className:De()("system"===e?"text-green-nx-base":"",n?"bg-slate-50 dark:bg-slate-600/30":"","group flex w-full items-center rounded-md px-2 py-2 text-sm"),onClick:()=>t("system"),children:[Ne(v,{className:"mr-2 h-5 w-5","aria-hidden":"true"}),"System"]})}),Ne(ia.Item,{children:({active:n})=>Ne("button",{"data-cy":"light-theme-button",className:De()("light"===e?"text-green-nx-base":"",n?"bg-slate-50 dark:bg-slate-600/30":"","group flex w-full items-center rounded-md px-2 py-2 text-sm"),onClick:()=>t("light"),children:[Ne(_,{className:"mr-2 h-5 w-5","aria-hidden":"true"}),"Light"]})}),Ne(ia.Item,{children:({active:n})=>Ne("button",{"data-cy":"dark-theme-button",className:De()("dark"===e?"text-green-nx-base":"",n?"bg-slate-50 dark:bg-slate-600/30":"","group flex w-full items-center rounded-md px-2 py-2 text-sm"),onClick:()=>t("dark"),children:[Ne(E,{className:"mr-2 h-5 w-5","aria-hidden":"true"}),"Dark"]})})]})})})]})}Ja.Child=function(e){let t=null!==(0,r.useContext)(Ya),n=null!==Gn();return!t&&n?r.default.createElement(Ja,{...e}):r.default.createElement(Qa,{...e})},Ja.Root=Ja;const to=(0,r.memo)((({start:e,end:t,resetStart:n,resetEnd:r})=>Ne("div",{className:"mt-10 px-4",children:Ne("div",{className:"transition duration-200 ease-in-out group-hover:opacity-60",children:[Ne("h3",{className:"cursor-text pb-2 text-sm font-semibold uppercase tracking-wide text-slate-800 dark:text-slate-200 lg:text-xs",children:"Tracing Path"}),Ne("div",{className:"flex flex-row items-center truncate ",children:[Ne(x,{className:"mr-2 h-5 w-5 text-slate-500 dark:text-slate-400"}),e?Ne("div",{className:"group relative flex-1 cursor-pointer flex-col items-center overflow-hidden","data-cy":"resetTraceButton",onClick:n,children:[Ne("div",{className:"bg-green-nx-base flex-1 truncate rounded-md border border-slate-200 p-2 text-slate-50 shadow-sm transition duration-200 ease-in-out group-hover:opacity-60 dark:border-slate-700",children:Ne("span",{children:e})}),Ne("div",{className:"absolute top-2 right-2 flex translate-x-32 items-center rounded-md bg-white pl-2 text-sm font-medium text-slate-700 shadow-sm ring-1 ring-slate-500 transition-all transition duration-200 ease-in-out group-hover:translate-x-0 dark:bg-slate-800 dark:text-slate-300 dark:ring-slate-700",children:["Reset",Ne("span",{className:"rounded-md p-1",children:Ne(k,{className:"h-5 w-5"})})]})]}):Ne("p",{className:"text-sm text-slate-500",children:"Select start project"})]}),Ne("div",{children:Ne(m,{className:"h-5 w-5 text-slate-500 dark:text-slate-400"})}),Ne("div",{className:"flex flex-row items-center truncate ",children:[Ne(b,{className:"mr-2 h-5 w-5 text-slate-500 dark:text-slate-400"}),t?Ne("div",{className:" group relative flex-1 cursor-pointer flex-col items-center overflow-hidden ","data-cy":"resetTraceButton",onClick:r,children:[Ne("div",{className:"bg-green-nx-base flex-1 truncate rounded-md border border-slate-200 p-2 text-slate-50 shadow-sm transition duration-200 ease-in-out group-hover:opacity-60 dark:border-slate-700",children:Ne("span",{children:t})}),Ne("div",{className:"absolute top-2 right-2 flex translate-x-32 items-center rounded-md bg-white pl-2 text-sm font-medium text-slate-700 shadow-sm ring-1 ring-slate-500 transition-all transition duration-200 ease-in-out group-hover:translate-x-0 dark:bg-slate-800 dark:text-slate-300 dark:ring-slate-700",children:["Reset",Ne("span",{className:"rounded-md p-1",children:Ne(k,{className:"h-5 w-5"})})]})]}):Ne("p",{className:"text-sm text-slate-500",children:"Select end project"})]})]})})));const no=function(){const e=Lt(),t=Ut(rn),n=Ut(an),a=Ut(on),o=Ut(un),i=Ut(cn),s=Ut(sn),l=Ut(ln),u=rt(),{showExperimentalFeatures:c}=u.appConfig,d=Ut(dn),f=(0,r.useCallback)((t=>{e.send({type:"filterByText",search:t})}),[e]);return Ne("div",{className:"relative flex h-full w-72 flex-col overflow-y-scroll pb-10 shadow-lg ring-1 ring-slate-900/10 ring-opacity-10 transition-all dark:ring-slate-300/10",id:"sidebar",children:[Ne("div",{className:"bg-blue-nx-base border-b border-slate-900/10 dark:border-slate-300/10 dark:bg-transparent",children:Ne("div",{className:"mx-4 my-5 flex items-center justify-between",children:[Ne("svg",{className:"h-12 w-auto text-white",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[Ne("title",{children:"Nx"}),Ne("path",{d:"M11.987 14.138l-3.132 4.923-5.193-8.427-.012 8.822H0V4.544h3.691l5.247 8.833.005-3.998 3.044 4.759zm.601-5.761c.024-.048 0-3.784.008-3.833h-3.65c.002.059-.005 3.776-.003 3.833h3.645zm5.634 4.134a2.061 2.061 0 0 0-1.969 1.336 1.963 1.963 0 0 1 2.343-.739c.396.161.917.422 1.33.283a2.1 2.1 0 0 0-1.704-.88zm3.39 1.061c-.375-.13-.8-.277-1.109-.681-.06-.08-.116-.17-.176-.265a2.143 2.143 0 0 0-.533-.642c-.294-.216-.68-.322-1.18-.322a2.482 2.482 0 0 0-2.294 1.536 2.325 2.325 0 0 1 4.002.388.75.75 0 0 0 .836.334c.493-.105.46.36 1.203.518v-.133c-.003-.446-.246-.55-.75-.733zm2.024 1.266a.723.723 0 0 0 .347-.638c-.01-2.957-2.41-5.487-5.37-5.487a5.364 5.364 0 0 0-4.487 2.418c-.01-.026-1.522-2.39-1.538-2.418H8.943l3.463 5.423-3.379 5.32h3.54l1.54-2.366 1.568 2.366h3.541l-3.21-5.052a.7.7 0 0 1-.084-.32 2.69 2.69 0 0 1 2.69-2.691h.001c1.488 0 1.736.89 2.057 1.308.634.826 1.9.464 1.9 1.541a.707.707 0 0 0 1.066.596zm.35.133c-.173.372-.56.338-.755.639-.176.271.114.412.114.412s.337.156.538-.311c.104-.231.14-.488.103-.74z"})]}),Ne("span",{className:"ml-4 text-xl font-medium text-white",children:[" ","Project Graph"," "]}),Ne(eo,{})]})}),Ne("a",{id:"help",className:" mt-3 flex cursor-pointer items-center px-4 text-xs hover:underline ",href:"https://nx.dev/structure/dependency-graph",rel:"noreferrer",target:"_blank",children:[Ne(w,{className:"mr-2 h-4 w-4"}),"Analyse and visualize your workspace."]}),t?Ne(hn,{focusedProject:t,resetFocus:function(){e.send({type:"unfocusProject"})}}):null,Ne(at,{children:Ne(to,{start:d.start,end:d.end,resetStart:function(){e.send({type:"clearTraceStart"})},resetEnd:function(){e.send({type:"clearTraceEnd"})}})}),Ne(En,{includePath:a,resetTextFilter:function(){e.send({type:"clearTextFilter"})},textFilter:o,toggleIncludeLibsInPathChange:function(){e.send({type:"setIncludeProjectsByPath",includeProjectsByPath:!a})},updateTextFilter:f}),Ne("div",{children:[Ne(xn,{hideAllProjects:function(){e.send({type:"deselectAll"})},showAllProjects:function(){e.send({type:"selectAll"})},showAffectedProjects:function(){e.send({type:"selectAffected"})},hasAffectedProjects:i}),Ne(pn,{groupByFolder:s,groupByFolderChanged:function(t){e.send({type:"setGroupByFolder",groupByFolder:t})}}),Ne(wn,{searchDepth:n.searchDepth,searchDepthEnabled:n.searchDepthEnabled,searchDepthFilterEnabledChange:function(t){e.send({type:"setSearchDepthEnabled",searchDepthEnabled:t})},incrementDepthFilter:function(){e.send({type:"incrementSearchDepth"})},decrementDepthFilter:function(){e.send({type:"decrementSearchDepth"})}}),Ne(at,{children:Ne("div",{"data-cy":"experimental-features",className:"mx-4 mt-4 rounded-lg border-2 border-dashed border-purple-500 p-4 shadow-lg dark:border-purple-600 dark:bg-[#0B1221]",children:[Ne("h3",{className:"cursor-text px-4 py-2 text-sm font-semibold uppercase tracking-wide text-slate-800 dark:text-slate-200 lg:text-xs",children:"Experimental Features"}),Ne(fn,{collapseEdges:l,collapseEdgesChanged:function(t){e.send({type:"setCollapseEdges",collapseEdges:t})}})]})})]}),Ne(bn,{})]})};function ro(){const e=Lt(),t=Zt(),n=rt(),a=Ut(nn),o=Ut(tn),[i,s]=(0,r.useState)(n.appConfig.defaultProjectGraph);return(0,r.useEffect)((()=>{const{appConfig:r}=n,a=r.projectGraphs.find((e=>e.id===i));(async()=>{const n=await t.getProjectGraph(a.url),r=null==n?void 0:n.layout;e.send({type:"initGraph",projects:n.projects,dependencies:n.dependencies,affectedProjects:n.affected,workspaceLayout:r})})()}),[i,n,e,t]),((e,t,n)=>{const a=(0,r.useRef)((()=>{}));(0,r.useEffect)((()=>{n&&(a.current=e)}),[e,n]),(0,r.useEffect)((()=>{if(n){const e=()=>{a.current()};if(null!==t){let n=setInterval(e,t);return()=>clearInterval(n)}}}),[t,n])})((()=>{const r=n.appConfig.projectGraphs.find((e=>e.id===i));(async()=>{const n=await t.getProjectGraph(r.url);e.send({type:"updateGraph",projects:n.projects,dependencies:n.dependencies})})()}),5e3,n.watch),Ne(Ae.HY,{children:[Ne(no,{}),Ne("div",{id:"main-content",className:"flex-grow overflow-hidden transition-all",children:[n.appConfig.showDebugger?Ne(Ie,{projectGraphs:n.appConfig.projectGraphs,selectedProjectGraph:i,lastPerfReport:a,projectGraphChange:function(e){s(e)}}):null,o?null:Ne("div",{id:"no-projects-chosen",className:"flex text-slate-700 dark:text-slate-400",children:[Ne(h,{className:"mr-4 h-6 w-6"}),Ne("h4",{children:"Please select projects in the sidebar."})]}),Ne("div",{id:"graph-container",children:[Ne("div",{id:"cytoscape-graph"}),Ne(ze,{content:"Download Graph as PNG",placement:"right",theme:$e("dark-nx","nx"),children:Ne("button",{type:"button",className:De()(o?"":"opacity-0","bg-green-nx-base fixed bottom-4 right-4 z-50 block h-16 w-16 transform rounded-full text-white shadow-sm transition duration-300"),"data-cy":"downloadImageButton",onClick:function(){const e=gt().getImage();let t=document.createElement("a");t.href=e,t.download="graph.png",t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))},children:Ne(y,{className:"absolute top-1/2 left-1/2 -mt-3 -ml-3 h-6 w-6"})})})]})]})]})}var ao;Ue(null!=(ao=localStorage.getItem(Ge))?ao:"system");const oo=function(){return Ne(It,{children:Ne(ro,{})})};!0===window.useXstateInspect&&function(e){var t=function(e){var t=a(a({},f),e);return a(a({},t),{url:new URL(t.url),iframe:u(t.iframe),devTools:u(t.devTools)})}(e),n=t.iframe,r=t.url,s=t.devTools;if(null!==n){var l,d,h=function(e){void 0===e&&(e=globalThis.__xstate__);var t=new Map,n=e.onRegister((function(e){t.set(e.sessionId,e)}));return(0,o.createMachine)({initial:"pendingConnection",context:{client:void 0},states:{pendingConnection:{},connected:{on:{"service.state":{actions:function(e,t){return e.client.send(t)}},"service.event":{actions:function(e,t){return e.client.send(t)}},"service.register":{actions:function(e,t){return e.client.send(t)}},"service.stop":{actions:function(e,t){return e.client.send(t)}},"xstate.event":{actions:function(e,n){var r=n.event,a=JSON.parse(r),o=t.get(a.origin);null==o||o.send(a)}},unload:{actions:function(e){e.client.send({type:"xstate.disconnect"})}},disconnect:"disconnected"}},disconnected:{entry:function(){n.unsubscribe()},type:"final"}},on:{"xstate.inspecting":{target:".connected",actions:[(0,o.assign)({client:function(e,t){return t.client}}),function(t){e.services.forEach((function(e){var n;null===(n=t.client)||void 0===n||n.send({type:"service.register",machine:c(e.machine),state:c(e.state||e.initialState),sessionId:e.sessionId})}))}]}}})}(s),p=(0,o.interpret)(h).start(),v=new Set,g=p.subscribe((function(e){v.forEach((function(t){return t.next(e)}))})),m=function(e){if("object"==typeof e.data&&null!==e.data&&"type"in e.data){n&&!l&&(l=n.contentWindow),d||(d={send:function(e){l.postMessage(e,r.origin)}});var t=a(a({},e.data),{client:d});p.send(t)}};return window.addEventListener("message",m),window.addEventListener("unload",(function(){p.send({type:"unload"})})),s.onRegister((function(e){var t;p.send({type:"service.register",machine:c(e.machine),state:c(e.state||e.initialState),sessionId:e.sessionId,id:e.id,parent:null===(t=e.parent)||void 0===t?void 0:t.sessionId}),p.send({type:"service.event",event:c((e.state||e.initialState)._event),sessionId:e.sessionId});var n=e.send.bind(e);e.send=function(t,r){return p.send({type:"service.event",event:c((0,i.toSCXMLEvent)((0,i.toEventObject)(t,r))),sessionId:e.sessionId}),n(t,r)},e.subscribe((function(t){void 0!==t&&p.send({type:"service.state",state:c(t),sessionId:e.sessionId})})),e.onStop((function(){p.send({type:"service.stop",sessionId:e.sessionId})}))})),n?(n.addEventListener("load",(function(){l=n.contentWindow})),n.setAttribute("src",String(r))):l=window.open(String(r),"xstateinspector"),{send:function(e){p.send(e)},subscribe:function(e,t,n){var r=(0,i.toObserver)(e,t,n);return v.add(r),r.next(p.state),{unsubscribe:function(){v.delete(r)}}},disconnect:function(){p.send("disconnect"),window.removeEventListener("message",m),g.unsubscribe()}}}console.warn("No suitable <iframe> found to embed the inspector. Please pass an <iframe> element to `inspect(iframe)` or create an <iframe data-xstate></iframe> element.")}({url:"https://stately.ai/viz?inspect",iframe:!1}),r.render(Ne(r.StrictMode,{children:Ne(oo,{})}),document.getElementById("app"))},88068:(e,t,n)=>{"use strict";n.r(t),n.d(t,{afterMain:()=>E,afterRead:()=>b,afterWrite:()=>C,applyStyles:()=>z,arrow:()=>K,auto:()=>s,basePlacements:()=>l,beforeMain:()=>w,beforeRead:()=>m,beforeWrite:()=>_,bottom:()=>a,clippingParents:()=>d,computeStyles:()=>ee,createPopper:()=>je,createPopperBase:()=>Oe,createPopperLite:()=>Me,detectOverflow:()=>ge,end:()=>c,eventListeners:()=>ne,flip:()=>me,hide:()=>we,left:()=>i,main:()=>x,modifierPhases:()=>S,offset:()=>xe,placements:()=>g,popper:()=>h,popperGenerator:()=>Pe,popperOffsets:()=>Ee,preventOverflow:()=>_e,read:()=>y,reference:()=>p,right:()=>o,start:()=>u,top:()=>r,variationPlacements:()=>v,viewport:()=>f,write:()=>k});var r="top",a="bottom",o="right",i="left",s="auto",l=[r,a,o,i],u="start",c="end",d="clippingParents",f="viewport",h="popper",p="reference",v=l.reduce((function(e,t){return e.concat([t+"-"+u,t+"-"+c])}),[]),g=[].concat(l,[s]).reduce((function(e,t){return e.concat([t,t+"-"+u,t+"-"+c])}),[]),m="beforeRead",y="read",b="afterRead",w="beforeMain",x="main",E="afterMain",_="beforeWrite",k="write",C="afterWrite",S=[m,y,b,w,x,E,_,k,C];function R(e){return e?(e.nodeName||"").toLowerCase():null}function P(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function O(e){return e instanceof P(e).Element||e instanceof Element}function M(e){return e instanceof P(e).HTMLElement||e instanceof HTMLElement}function j(e){return"undefined"!=typeof ShadowRoot&&(e instanceof P(e).ShadowRoot||e instanceof ShadowRoot)}const z={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]||{},a=t.elements[e];M(a)&&R(a)&&(Object.assign(a.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?a.removeAttribute(e):a.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],a=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});M(r)&&R(r)&&(Object.assign(r.style,o),Object.keys(a).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function T(e){return e.split("-")[0]}var D=Math.max,A=Math.min,B=Math.round;function N(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,a=1;if(M(e)&&t){var o=e.offsetHeight,i=e.offsetWidth;i>0&&(r=B(n.width)/i||1),o>0&&(a=B(n.height)/o||1)}return{width:n.width/r,height:n.height/a,top:n.top/a,right:n.right/r,bottom:n.bottom/a,left:n.left/r,x:n.left/r,y:n.top/a}}function I(e){var t=N(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function L(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&j(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function V(e){return P(e).getComputedStyle(e)}function F(e){return["table","td","th"].indexOf(R(e))>=0}function H(e){return((O(e)?e.ownerDocument:e.document)||window.document).documentElement}function G(e){return"html"===R(e)?e:e.assignedSlot||e.parentNode||(j(e)?e.host:null)||H(e)}function q(e){return M(e)&&"fixed"!==V(e).position?e.offsetParent:null}function Y(e){for(var t=P(e),n=q(e);n&&F(n)&&"static"===V(n).position;)n=q(n);return n&&("html"===R(n)||"body"===R(n)&&"static"===V(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&M(e)&&"fixed"===V(e).position)return null;var n=G(e);for(j(n)&&(n=n.host);M(n)&&["html","body"].indexOf(R(n))<0;){var r=V(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}function U(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function W(e,t,n){return D(e,A(t,n))}function $(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function X(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const K={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,s=e.name,u=e.options,c=n.elements.arrow,d=n.modifiersData.popperOffsets,f=T(n.placement),h=U(f),p=[i,o].indexOf(f)>=0?"height":"width";if(c&&d){var v=function(e,t){return $("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:X(e,l))}(u.padding,n),g=I(c),m="y"===h?r:i,y="y"===h?a:o,b=n.rects.reference[p]+n.rects.reference[h]-d[h]-n.rects.popper[p],w=d[h]-n.rects.reference[h],x=Y(c),E=x?"y"===h?x.clientHeight||0:x.clientWidth||0:0,_=b/2-w/2,k=v[m],C=E-g[p]-v[y],S=E/2-g[p]/2+_,R=W(k,S,C),P=h;n.modifiersData[s]=((t={})[P]=R,t.centerOffset=R-S,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)))&&L(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Z(e){return e.split("-")[1]}var Q={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var t,n=e.popper,s=e.popperRect,l=e.placement,u=e.variation,d=e.offsets,f=e.position,h=e.gpuAcceleration,p=e.adaptive,v=e.roundOffsets,g=e.isFixed,m=d.x,y=void 0===m?0:m,b=d.y,w=void 0===b?0:b,x="function"==typeof v?v({x:y,y:w}):{x:y,y:w};y=x.x,w=x.y;var E=d.hasOwnProperty("x"),_=d.hasOwnProperty("y"),k=i,C=r,S=window;if(p){var R=Y(n),O="clientHeight",M="clientWidth";if(R===P(n)&&"static"!==V(R=H(n)).position&&"absolute"===f&&(O="scrollHeight",M="scrollWidth"),R=R,l===r||(l===i||l===o)&&u===c)C=a,w-=(g&&R===S&&S.visualViewport?S.visualViewport.height:R[O])-s.height,w*=h?1:-1;if(l===i||(l===r||l===a)&&u===c)k=o,y-=(g&&R===S&&S.visualViewport?S.visualViewport.width:R[M])-s.width,y*=h?1:-1}var j,z=Object.assign({position:f},p&&Q),T=!0===v?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:B(t*r)/r||0,y:B(n*r)/r||0}}({x:y,y:w}):{x:y,y:w};return y=T.x,w=T.y,h?Object.assign({},z,((j={})[C]=_?"0":"",j[k]=E?"0":"",j.transform=(S.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",j)):Object.assign({},z,((t={})[C]=_?w+"px":"",t[k]=E?y+"px":"",t.transform="",t))}const ee={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=void 0===r||r,o=n.adaptive,i=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,u={placement:T(t.placement),variation:Z(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,J(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,J(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var te={passive:!0};const ne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,o=void 0===a||a,i=r.resize,s=void 0===i||i,l=P(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach((function(e){e.addEventListener("scroll",n.update,te)})),s&&l.addEventListener("resize",n.update,te),function(){o&&u.forEach((function(e){e.removeEventListener("scroll",n.update,te)})),s&&l.removeEventListener("resize",n.update,te)}},data:{}};var re={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return re[e]}))}var oe={start:"end",end:"start"};function ie(e){return e.replace(/start|end/g,(function(e){return oe[e]}))}function se(e){var t=P(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function le(e){return N(H(e)).left+se(e).scrollLeft}function ue(e){var t=V(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function ce(e){return["html","body","#document"].indexOf(R(e))>=0?e.ownerDocument.body:M(e)&&ue(e)?e:ce(G(e))}function de(e,t){var n;void 0===t&&(t=[]);var r=ce(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),o=P(r),i=a?[o].concat(o.visualViewport||[],ue(r)?r:[]):r,s=t.concat(i);return a?s:s.concat(de(G(i)))}function fe(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function he(e,t){return t===f?fe(function(e){var t=P(e),n=H(e),r=t.visualViewport,a=n.clientWidth,o=n.clientHeight,i=0,s=0;return r&&(a=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(i=r.offsetLeft,s=r.offsetTop)),{width:a,height:o,x:i+le(e),y:s}}(e)):O(t)?function(e){var t=N(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):fe(function(e){var t,n=H(e),r=se(e),a=null==(t=e.ownerDocument)?void 0:t.body,o=D(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=D(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-r.scrollLeft+le(e),l=-r.scrollTop;return"rtl"===V(a||n).direction&&(s+=D(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:s,y:l}}(H(e)))}function pe(e,t,n){var r="clippingParents"===t?function(e){var t=de(G(e)),n=["absolute","fixed"].indexOf(V(e).position)>=0&&M(e)?Y(e):e;return O(n)?t.filter((function(e){return O(e)&&L(e,n)&&"body"!==R(e)})):[]}(e):[].concat(t),a=[].concat(r,[n]),o=a[0],i=a.reduce((function(t,n){var r=he(e,n);return t.top=D(r.top,t.top),t.right=A(r.right,t.right),t.bottom=A(r.bottom,t.bottom),t.left=D(r.left,t.left),t}),he(e,o));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}function ve(e){var t,n=e.reference,s=e.element,l=e.placement,d=l?T(l):null,f=l?Z(l):null,h=n.x+n.width/2-s.width/2,p=n.y+n.height/2-s.height/2;switch(d){case r:t={x:h,y:n.y-s.height};break;case a:t={x:h,y:n.y+n.height};break;case o:t={x:n.x+n.width,y:p};break;case i:t={x:n.x-s.width,y:p};break;default:t={x:n.x,y:n.y}}var v=d?U(d):null;if(null!=v){var g="y"===v?"height":"width";switch(f){case u:t[v]=t[v]-(n[g]/2-s[g]/2);break;case c:t[v]=t[v]+(n[g]/2-s[g]/2)}}return t}function ge(e,t){void 0===t&&(t={});var n=t,i=n.placement,s=void 0===i?e.placement:i,u=n.boundary,c=void 0===u?d:u,v=n.rootBoundary,g=void 0===v?f:v,m=n.elementContext,y=void 0===m?h:m,b=n.altBoundary,w=void 0!==b&&b,x=n.padding,E=void 0===x?0:x,_=$("number"!=typeof E?E:X(E,l)),k=y===h?p:h,C=e.rects.popper,S=e.elements[w?k:y],R=pe(O(S)?S:S.contextElement||H(e.elements.popper),c,g),P=N(e.elements.reference),M=ve({reference:P,element:C,strategy:"absolute",placement:s}),j=fe(Object.assign({},C,M)),z=y===h?j:P,T={top:R.top-z.top+_.top,bottom:z.bottom-R.bottom+_.bottom,left:R.left-z.left+_.left,right:z.right-R.right+_.right},D=e.modifiersData.offset;if(y===h&&D){var A=D[s];Object.keys(T).forEach((function(e){var t=[o,a].indexOf(e)>=0?1:-1,n=[r,a].indexOf(e)>=0?"y":"x";T[e]+=A[n]*t}))}return T}const me={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,c=e.name;if(!t.modifiersData[c]._skip){for(var d=n.mainAxis,f=void 0===d||d,h=n.altAxis,p=void 0===h||h,m=n.fallbackPlacements,y=n.padding,b=n.boundary,w=n.rootBoundary,x=n.altBoundary,E=n.flipVariations,_=void 0===E||E,k=n.allowedAutoPlacements,C=t.options.placement,S=T(C),R=m||(S===C||!_?[ae(C)]:function(e){if(T(e)===s)return[];var t=ae(e);return[ie(e),t,ie(t)]}(C)),P=[C].concat(R).reduce((function(e,n){return e.concat(T(n)===s?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,a=n.boundary,o=n.rootBoundary,i=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?g:u,d=Z(r),f=d?s?v:v.filter((function(e){return Z(e)===d})):l,h=f.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=f);var p=h.reduce((function(t,n){return t[n]=ge(e,{placement:n,boundary:a,rootBoundary:o,padding:i})[T(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:b,rootBoundary:w,padding:y,flipVariations:_,allowedAutoPlacements:k}):n)}),[]),O=t.rects.reference,M=t.rects.popper,j=new Map,z=!0,D=P[0],A=0;A<P.length;A++){var B=P[A],N=T(B),I=Z(B)===u,L=[r,a].indexOf(N)>=0,V=L?"width":"height",F=ge(t,{placement:B,boundary:b,rootBoundary:w,altBoundary:x,padding:y}),H=L?I?o:i:I?a:r;O[V]>M[V]&&(H=ae(H));var G=ae(H),q=[];if(f&&q.push(F[N]<=0),p&&q.push(F[H]<=0,F[G]<=0),q.every((function(e){return e}))){D=B,z=!1;break}j.set(B,q)}if(z)for(var Y=function(e){var t=P.find((function(t){var n=j.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return D=t,"break"},U=_?3:1;U>0;U--){if("break"===Y(U))break}t.placement!==D&&(t.modifiersData[c]._skip=!0,t.placement=D,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ye(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 be(e){return[r,o,a,i].some((function(t){return e[t]>=0}))}const we={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,i=ge(t,{elementContext:"reference"}),s=ge(t,{altBoundary:!0}),l=ye(i,r),u=ye(s,a,o),c=be(l),d=be(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}};const xe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,a=e.name,s=n.offset,l=void 0===s?[0,0]:s,u=g.reduce((function(e,n){return e[n]=function(e,t,n){var a=T(e),s=[i,r].indexOf(a)>=0?-1:1,l="function"==typeof n?n(Object.assign({},t,{placement:e})):n,u=l[0],c=l[1];return u=u||0,c=(c||0)*s,[i,o].indexOf(a)>=0?{x:c,y:u}:{x:u,y:c}}(n,t.rects,l),e}),{}),c=u[t.placement],d=c.x,f=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=d,t.modifiersData.popperOffsets.y+=f),t.modifiersData[a]=u}};const Ee={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ve({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};const _e={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,s=e.name,l=n.mainAxis,c=void 0===l||l,d=n.altAxis,f=void 0!==d&&d,h=n.boundary,p=n.rootBoundary,v=n.altBoundary,g=n.padding,m=n.tether,y=void 0===m||m,b=n.tetherOffset,w=void 0===b?0:b,x=ge(t,{boundary:h,rootBoundary:p,padding:g,altBoundary:v}),E=T(t.placement),_=Z(t.placement),k=!_,C=U(E),S="x"===C?"y":"x",R=t.modifiersData.popperOffsets,P=t.rects.reference,O=t.rects.popper,M="function"==typeof w?w(Object.assign({},t.rects,{placement:t.placement})):w,j="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),z=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(R){if(c){var N,L="y"===C?r:i,V="y"===C?a:o,F="y"===C?"height":"width",H=R[C],G=H+x[L],q=H-x[V],$=y?-O[F]/2:0,X=_===u?P[F]:O[F],K=_===u?-O[F]:-P[F],Q=t.elements.arrow,J=y&&Q?I(Q):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[L],ne=ee[V],re=W(0,P[F],J[F]),ae=k?P[F]/2-$-re-te-j.mainAxis:X-re-te-j.mainAxis,oe=k?-P[F]/2+$+re+ne+j.mainAxis:K+re+ne+j.mainAxis,ie=t.elements.arrow&&Y(t.elements.arrow),se=ie?"y"===C?ie.clientTop||0:ie.clientLeft||0:0,le=null!=(N=null==z?void 0:z[C])?N:0,ue=H+oe-le,ce=W(y?A(G,H+ae-le-se):G,H,y?D(q,ue):q);R[C]=ce,B[C]=ce-H}if(f){var de,fe="x"===C?r:i,he="x"===C?a:o,pe=R[S],ve="y"===S?"height":"width",me=pe+x[fe],ye=pe-x[he],be=-1!==[r,i].indexOf(E),we=null!=(de=null==z?void 0:z[S])?de:0,xe=be?me:pe-P[ve]-O[ve]-we+j.altAxis,Ee=be?pe+P[ve]+O[ve]-we-j.altAxis:ye,_e=y&&be?function(e,t,n){var r=W(e,t,n);return r>n?n:r}(xe,pe,Ee):W(y?xe:me,pe,y?Ee:ye);R[S]=_e,B[S]=_e-pe}t.modifiersData[s]=B}},requiresIfExists:["offset"]};function ke(e,t,n){void 0===n&&(n=!1);var r,a,o=M(t),i=M(t)&&function(e){var t=e.getBoundingClientRect(),n=B(t.width)/e.offsetWidth||1,r=B(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=H(t),l=N(e,i),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(o||!o&&!n)&&(("body"!==R(t)||ue(s))&&(u=(r=t)!==P(r)&&M(r)?{scrollLeft:(a=r).scrollLeft,scrollTop:a.scrollTop}:se(r)),M(t)?((c=N(t,!0)).x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=le(s))),{x:l.left+u.scrollLeft-c.x,y:l.top+u.scrollTop-c.y,width:l.width,height:l.height}}function Ce(e){var t=new Map,n=new Set,r=[];function a(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&a(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||a(e)})),r}var Se={placement:"bottom",modifiers:[],strategy:"absolute"};function Re(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Pe(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,a=t.defaultOptions,o=void 0===a?Se:a;return function(e,t,n){void 0===n&&(n=o);var a,i,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Se,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],u=!1,c={state:s,setOptions:function(n){var a="function"==typeof n?n(s.options):n;d(),s.options=Object.assign({},o,s.options,a),s.scrollParents={reference:O(e)?de(e):e.contextElement?de(e.contextElement):[],popper:de(t)};var i=function(e){var t=Ce(e);return S.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.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}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers)));return s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,a=e.effect;if("function"==typeof a){var o=a({state:s,name:t,instance:c,options:r}),i=function(){};l.push(o||i)}})),c.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference,n=e.popper;if(Re(t,n)){s.rects={reference:ke(t,Y(n),"fixed"===s.options.strategy),popper:I(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var a=s.orderedModifiers[r],o=a.fn,i=a.options,l=void 0===i?{}:i,d=a.name;"function"==typeof o&&(s=o({state:s,options:l,name:d,instance:c})||s)}else s.reset=!1,r=-1}}},update:(a=function(){return new Promise((function(e){c.forceUpdate(),e(s)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(a())}))}))),i}),destroy:function(){d(),u=!0}};if(!Re(e,t))return c;function d(){l.forEach((function(e){return e()})),l=[]}return c.setOptions(n).then((function(e){!u&&n.onFirstUpdate&&n.onFirstUpdate(e)})),c}}var Oe=Pe(),Me=Pe({defaultModifiers:[ne,Ee,ee,z]}),je=Pe({defaultModifiers:[ne,Ee,ee,z,xe,me,_e,K,we]})},36021:(e,t,n)=>{"use strict";t.f0=void 0;var r=n(78376),a=n(15729);function o(e){return r.assign((function(t,n,r){return a.produce(t,(function(t){e(t,n,r)}))}))}t.f0=o},72779:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=(function(){return a}).apply(t,[]))||(e.exports=n)}()},81368:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,(function(t){return e[t]}).bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){var r=n(1),a=function(e){e&&e("layout","dagre",r)};"undefined"!=typeof cytoscape&&a(cytoscape),e.exports=a},function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var a=n(2),o=n(3),i=n(4);function s(e){this.options=o({},a,e)}s.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,a=function(e,t){return"function"==typeof t?t.apply(e,[e]):t},o=e.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()};void 0===o.x2&&(o.x2=o.x1+o.w),void 0===o.w&&(o.w=o.x2-o.x1),void 0===o.y2&&(o.y2=o.y1+o.h),void 0===o.h&&(o.h=o.y2-o.y1);var s=new i.graphlib.Graph({multigraph:!0,compound:!0}),l={},u=function(e,t){null!=t&&(l[e]=t)};u("nodesep",e.nodeSep),u("edgesep",e.edgeSep),u("ranksep",e.rankSep),u("rankdir",e.rankDir),u("align",e.align),u("ranker",e.ranker),u("acyclicer",e.acyclicer),s.setGraph(l),s.setDefaultEdgeLabel((function(){return{}})),s.setDefaultNodeLabel((function(){return{}}));for(var c=n.nodes(),d=0;d<c.length;d++){var f=c[d],h=f.layoutDimensions(e);s.setNode(f.id(),{width:h.w,height:h.h,name:f.id()})}for(var p=0;p<c.length;p++){var v=c[p];v.isChild()&&s.setParent(v.id(),v.parent().id())}for(var g=n.edges().stdFilter((function(e){return!e.source().isParent()&&!e.target().isParent()})),m=0;m<g.length;m++){var y=g[m];s.setEdge(y.source().id(),y.target().id(),{minlen:a(y,e.minLen),weight:a(y,e.edgeWeight),name:y.id()},y.id())}i.layout(s);for(var b,w=s.nodes(),x=0;x<w.length;x++){var E=w[x],_=s.node(E);t.getElementById(E).scratch().dagre=_}return e.boundingBox?(b={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0},c.forEach((function(e){var t=e.scratch().dagre;b.x1=Math.min(b.x1,t.x),b.x2=Math.max(b.x2,t.x),b.y1=Math.min(b.y1,t.y),b.y2=Math.max(b.y2,t.y)})),b.w=b.x2-b.x1,b.h=b.y2-b.y1):b=o,c.layoutPositions(this,e,(function(t){var n=(t="object"===r(t)?t:this).scratch().dagre;return function(t){if(e.boundingBox){var n=0===b.w?0:(t.x-b.x1)/b.w,r=0===b.h?0:(t.y-b.y1)/b.h;return{x:o.x1+n*o.w,y:o.y1+r*o.h}}return t}({x:n.x,y:n.y})})),this},e.exports=s},function(e,t){var n={nodeSep:void 0,edgeSep:void 0,rankSep:void 0,rankDir:void 0,align:void 0,ranker:void 0,minLen:function(e){return 1},edgeWeight:function(e){return 1},fit:!0,padding:30,spacingFactor:void 0,nodeDimensionsIncludeLabels:!1,animate:!1,animateFilter:function(e,t){return!0},animationDuration:500,animationEasing:void 0,boundingBox:void 0,transform:function(e,t){return t},ready:function(){},stop:function(){}};e.exports=n},function(e,t){e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){Object.keys(t).forEach((function(n){return e[n]=t[n]}))})),e}},function(t,n){t.exports=e}])},e.exports=r(n(46506))},10404:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){null!=t&&Object.keys(t).forEach((function(n){return e[n]=t[n]}))})),e}},function(e,t,n){"use strict";var r=n(5).getBoundingBox;e.exports={getRef:function(e,t){return{getBoundingClientRect:function(){return r(e,t)}}}}},function(e,t,n){"use strict";var r=n(0),a=n(1).getRef,o=n(6).getContent,i={},s=n(8).createPopper;e.exports={getPopper:function(e,t){var n=a(e,t),l=o(e,t.content),u=r({},i,t.popper);return s(n,l,u)}}},function(e,t,n){"use strict";var r=n(0),a=n(2).getPopper,o=n(1).getRef;function i(e,t){var n=function(e){return e.isNode()?{w:e.renderedWidth(),h:e.renderedHeight()}:{w:3,h:3}},a=e.cy(),o={renderedDimensions:n,renderedPosition:function(e){return e.isNode()?function(e,t){var n=e.renderedPosition(),r=t(e),a=r.w/2,o=r.h/2;return{x:n.x-a,y:n.y-o}}(e,n):function(e){var t=e.midpoint(),n=e.cy().pan(),r=e.cy().zoom();return{x:t.x*r+n.x,y:t.y*r+n.y}}(e)},popper:{},cy:a};return r({},o,t)}function s(e){e.length>1&&(console.warn("Popper.js Extension should only be used on one element."),console.warn("Ignoring all subsequent elements"))}e.exports={popper:function(e){return s(this),a(this[0],i(this[0],e))},popperRef:function(e){return s(this),o(this[0],i(this[0],e))}}},function(e,t,n){"use strict";var r=n(0),a=n(2).getPopper,o=n(1).getRef;function i(e,t){return r({},{boundingBox:{top:0,left:0,right:0,bottom:0,w:3,h:3},renderedDimensions:function(){return{w:3,h:3}},renderedPosition:function(){return{x:0,y:0}},popper:{},cy:e},t)}e.exports={popper:function(e){return a(this,i(this,e))},popperRef:function(e){return o(this,i(this,e))}}},function(e,t,n){"use strict";e.exports={getBoundingBox:function(e,t){var n=t.renderedPosition,r=t.cy,a=t.renderedDimensions,o=r.container().getBoundingClientRect(),i=a(e),s=n(e);return{top:s.y+o.top,left:s.x+o.left,right:s.x+i.w+o.left,bottom:s.y+i.h+o.top,width:i.w,height:i.h}}}},function(e,t,n){"use strict";e.exports={getContent:function(e,t){var n=null;if("function"!=typeof t){if(t instanceof HTMLElement)return t;throw new Error("Can not create popper from 'target' with unknown type")}if(null===(n=t(e)))throw new Error("No 'target' specified to create popper");return n}}},function(e,t,n){"use strict";var r=n(4),a=n(3),o=function(e){e&&(e("core","popper",r.popper),e("collection","popper",a.popper),e("core","popperRef",r.popperRef),e("collection","popperRef",a.popperRef))};"undefined"!=typeof cytoscape&&o(cytoscape),e.exports=o},function(t,n){t.exports=e}])},e.exports=r(n(88068))},93218:(e,t,n)=>{"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var a=r(n(80594)),o=r(n(71254)),i=r(n(77485)),s=r(n(880)),l=r(n(85884));function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&d(e.prototype,t),n&&d(e,n),e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(l){a=!0,o=l}finally{try{r||null==s.return||s.return()}finally{if(a)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var v="undefined"==typeof window?null:window,g=v?v.navigator:null,m=(v&&v.document,u("")),y=u({}),b=u((function(){})),w="undefined"==typeof HTMLElement?"undefined":u(HTMLElement),x=function(e){return e&&e.instanceString&&_(e.instanceString)?e.instanceString():null},E=function(e){return null!=e&&u(e)==m},_=function(e){return null!=e&&u(e)===b},k=function(e){return!P(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},C=function(e){return null!=e&&u(e)===y&&!k(e)&&e.constructor===Object},S=function(e){return null!=e&&u(e)===u(1)&&!isNaN(e)},R=function(e){return"undefined"===w?void 0:null!=e&&e instanceof HTMLElement},P=function(e){return O(e)||M(e)},O=function(e){return"collection"===x(e)&&e._private.single},M=function(e){return"collection"===x(e)&&!e._private.single},j=function(e){return"core"===x(e)},z=function(e){return"stylesheet"===x(e)},T=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},D=function(e){return function(e){return null!=e&&u(e)===y}(e)&&_(e.then)},A=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join("$")});var n=function n(){var r,a=this,o=arguments,i=t.apply(a,o),s=n.cache;return(r=s[i])||(r=s[i]=e.apply(a,o)),r};return n.cache={},n},B=A((function(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))})),N=A((function(e){return e.replace(/(-\w)/g,(function(e){return e[1].toUpperCase()}))})),I=A((function(e,t){return e+t[0].toUpperCase()+t.substring(1)}),(function(e,t){return e+"$"+t})),L=function(e){return T(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},V="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",F=function(e,t){return e<t?-1:e>t?1:0},H=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(null!=r)for(var a=Object.keys(r),o=0;o<a.length;o++){var i=a[o];e[i]=r[i]}}return e},G=function(e){return(k(e)?e:null)||function(e){return q[e.toLowerCase()]}(e)||function(e){if((4===e.length||7===e.length)&&"#"===e[0]){var t,n,r,a=16;return 4===e.length?(t=parseInt(e[1]+e[1],a),n=parseInt(e[2]+e[2],a),r=parseInt(e[3]+e[3],a)):(t=parseInt(e[1]+e[2],a),n=parseInt(e[3]+e[4],a),r=parseInt(e[5]+e[6],a)),[t,n,r]}}(e)||function(e){var t,n=new RegExp("^rgb[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(n){t=[];for(var r=[],a=1;a<=3;a++){var o=n[a];if("%"===o[o.length-1]&&(r[a]=!0),o=parseFloat(o),r[a]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}var i=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(i&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(e)||function(e){var t,n,r,a,o,i,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^hsl[a]?\\(((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*((?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(a=parseFloat(c[3]))<0||a>100)return;if(a/=100,void 0!==(o=c[4])&&((o=parseFloat(o))<0||o>1))return;if(0===r)i=s=l=Math.round(255*a);else{var d=a<.5?a*(1+r):a+r-a*r,f=2*a-d;i=Math.round(255*u(f,d,n+1/3)),s=Math.round(255*u(f,d,n)),l=Math.round(255*u(f,d,n-1/3))}t=[i,s,l,o]}return t}(e)},q={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Y=function(e){for(var t=e.map,n=e.keys,r=n.length,a=0;a<r;a++){var o=n[a];if(C(o))throw Error("Tried to set map with object key");a<n.length-1?(null==t[o]&&(t[o]={}),t=t[o]):t[o]=e.value}},U=function(e){for(var t=e.map,n=e.keys,r=n.length,a=0;a<r;a++){var o=n[a];if(C(o))throw Error("Tried to get map with object key");if(null==(t=t[o]))return t}return t},W=v?v.performance:null,$=W&&W.now?function(){return W.now()}:function(){return Date.now()},X=function(){if(v){if(v.requestAnimationFrame)return function(e){v.requestAnimationFrame(e)};if(v.mozRequestAnimationFrame)return function(e){v.mozRequestAnimationFrame(e)};if(v.webkitRequestAnimationFrame)return function(e){v.webkitRequestAnimationFrame(e)};if(v.msRequestAnimationFrame)return function(e){v.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e($())}),1e3/60)}}(),K=function(e){return X(e)},Z=$,Q=9261,J=65599,ee=5381,te=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q,r=n;!(t=e.next()).done;)r=r*J+t.value|0;return r},ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q;return t*J+e|0},re=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee;return(t<<5)+t+e|0},ae=function(e){return 2097152*e[0]+e[1]},oe=function(e,t){return[ne(e[0],t[0]),re(e[1],t[1])]},ie=function(e,t){var n={value:0,done:!1},r=0,a=e.length;return te({next:function(){return r<a?n.value=e.charCodeAt(r++):n.done=!0,n}},t)},se=function(){return le(arguments)},le=function(e){for(var t,n=0;n<e.length;n++){var r=e[n];t=0===n?ie(r):ie(r,t)}return t},ue=!0,ce=null!=console.warn,de=null!=console.trace,fe=Number.MAX_SAFE_INTEGER||9007199254740991,he=function(){return!0},pe=function(){return!1},ve=function(){return 0},ge=function(){},me=function(e){throw new Error(e)},ye=function(e){if(void 0===e)return ue;ue=!!e},be=function(e){ye()&&(ce?console.warn(e):(console.log(e),de&&console.trace()))},we=function(e){return null==e?e:k(e)?e.slice():C(e)?function(e){return H({},e)}(e):e},xe=function(e,t){for(t=e="";e++<36;t+=51*e&52?(15^e?8^Math.random()*(20^e?16:4):4).toString(16):"-");return t},Ee={},_e=function(){return Ee},ke=function(e){var t=Object.keys(e);return function(n){for(var r={},a=0;a<t.length;a++){var o=t[a],i=null==n?void 0:n[o];r[o]=void 0===i?e[o]:i}return r}},Ce=function(e,t,n){for(var r=e.length-1;r>=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},Se=function(e){e.splice(0,e.length)},Re=function(e,t,n){return n&&(t=I(n,t)),e[t]},Pe=function(e,t,n,r){n&&(t=I(n,t)),e[t]=r},Oe="undefined"!=typeof Map?Map:function(){function e(){c(this,e),this._obj={}}return f(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),Me=function(){function e(t){if(c(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r<n.length;r++)this.add(n[r])}}return f(e,[{key:"instanceString",value:function(){return"set"}},{key:"add",value:function(e){var t=this._obj;1!==t[e]&&(t[e]=1,this.size++)}},{key:"delete",value:function(e){var t=this._obj;1===t[e]&&(t[e]=0,this.size--)}},{key:"clear",value:function(){this._obj=Object.create(null)}},{key:"has",value:function(e){return 1===this._obj[e]}},{key:"toArray",value:function(){var e=this;return Object.keys(this._obj).filter((function(t){return e.has(t)}))}},{key:"forEach",value:function(e,t){return this.toArray().forEach(e,t)}}]),e}(),je="undefined"!==("undefined"==typeof Set?"undefined":u(Set))?Set:Me,ze=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&j(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new je,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition){var o=t.renderedPosition,i=e.pan(),s=e.zoom();a.position={x:(o.x-i.x)/s,y:(o.y-i.y)/s}}var l=[];k(t.classes)?l=t.classes:E(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;u<c;u++){var d=l[u];d&&""!==d&&a.classes.add(d)}this.createEmitter();var f=t.style||t.css;f&&(be("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(f)),(void 0===n||n)&&this.restore()}else me("An element must be of type `nodes` or `edges`; you specified `"+r+"`")}else me("An element must have a core reference and parameters set")},Te=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(t,n,r){var a;C(t)&&!P(t)&&(t=(a=t).roots||a.root,n=a.visit,r=a.directed),r=2!==arguments.length||_(n)?r:n,n=_(n)?n:function(){};for(var o,i=this._private.cy,s=t=E(t)?this.filter(t):t,l=[],u=[],c={},d={},f={},h=0,p=this.byGroup(),v=p.nodes,g=p.edges,m=0;m<s.length;m++){var y=s[m],b=y.id();y.isNode()&&(l.unshift(y),e.bfs&&(f[b]=!0,u.push(y)),d[b]=0)}var w=function(){var t=e.bfs?l.shift():l.pop(),a=t.id();if(e.dfs){if(f[a])return"continue";f[a]=!0,u.push(t)}var i,s=d[a],p=c[a],m=null!=p?p.source():null,y=null!=p?p.target():null,b=null==p?void 0:t.same(m)?y[0]:m[0];if(!0===(i=n(t,p,b,h++,s)))return o=t,"break";if(!1===i)return"break";for(var w=t.connectedEdges().filter((function(e){return(!r||e.source().same(t))&&g.has(e)})),x=0;x<w.length;x++){var E=w[x],_=E.connectedNodes().filter((function(e){return!e.same(t)&&v.has(e)})),k=_.id();0===_.length||f[k]||(_=_[0],l.push(_),e.bfs&&(f[k]=!0,u.push(_)),c[k]=E,d[k]=d[a]+1)}};e:for(;0!==l.length;){var x=w();switch(x){case"continue":continue;case"break":break e}}for(var k=i.collection(),S=0;S<u.length;S++){var R=u[S],O=c[R.id()];null!=O&&k.push(O),k.push(R)}return{path:i.collection(k),found:i.collection(o)}}},De={breadthFirstSearch:Te({bfs:!0}),depthFirstSearch:Te({dfs:!0})};De.bfs=De.breadthFirstSearch,De.dfs=De.depthFirstSearch;var Ae=ke({root:null,weight:function(e){return 1},directed:!1}),Be={dijkstra:function(e){if(!C(e)){var t=arguments;e={root:t[0],weight:t[1],directed:t[2]}}var n=Ae(e),r=n.root,a=n.weight,i=n.directed,s=this,l=a,u=E(r)?this.filter(r)[0]:r[0],c={},d={},f={},h=this.byGroup(),p=h.nodes,v=h.edges;v.unmergeBy((function(e){return e.isLoop()}));for(var g=function(e){return c[e.id()]},m=function(e,t){c[e.id()]=t,y.updateItem(e)},y=new o((function(e,t){return g(e)-g(t)})),b=0;b<p.length;b++){var w=p[b];c[w.id()]=w.same(u)?0:1/0,y.push(w)}for(var x=function(e,t){for(var n,r=(i?e.edgesTo(t):e.edgesWith(t)).intersect(v),a=1/0,o=0;o<r.length;o++){var s=r[o],u=l(s);(u<a||!n)&&(a=u,n=s)}return{edge:n,dist:a}};y.size()>0;){var _=y.pop(),k=g(_),S=_.id();if(f[S]=k,k!==1/0)for(var R=_.neighborhood().intersect(p),P=0;P<R.length;P++){var O=R[P],M=O.id(),j=x(_,O),z=k+j.dist;z<g(O)&&(m(O,z),d[M]={node:_,edge:j.edge})}}return{distanceTo:function(e){var t=E(e)?p.filter(e)[0]:e[0];return f[t.id()]},pathTo:function(e){var t=E(e)?p.filter(e)[0]:e[0],n=[],r=t,a=r.id();if(t.length>0)for(n.unshift(t);d[a];){var o=d[a];n.unshift(o.edge),n.unshift(o.node),a=(r=o.node).id()}return s.spawn(n)}}}},Ne={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,a=n.length,o=new Array(a),i=n,s=function(e){for(var t=0;t<o.length;t++){if(o[t].has(e))return t}},l=0;l<a;l++)o[l]=this.spawn(n[l]);for(var u=r.sort((function(t,n){return e(t)-e(n)})),c=0;c<u.length;c++){var d=u[c],f=d.source()[0],h=d.target()[0],p=s(f),v=s(h),g=o[p],m=o[v];p!==v&&(i.merge(d),g.merge(m),o.splice(v,1))}return i}},Ie=ke({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),Le={aStar:function(e){var t=this.cy(),n=Ie(e),r=n.root,a=n.goal,i=n.heuristic,s=n.directed,l=n.weight;r=t.collection(r)[0],a=t.collection(a)[0];var u,c,d=r.id(),f=a.id(),h={},p={},v={},g=new o((function(e,t){return p[e.id()]-p[t.id()]})),m=new je,y={},b={},w=function(e,t){g.push(e),m.add(t)};w(r,d),h[d]=0,p[d]=i(r);for(var x,E=0;g.size()>0;){if(u=g.pop(),c=u.id(),m.delete(c),E++,c===f){for(var _=[],k=a,C=f,S=b[C];_.unshift(k),null!=S&&_.unshift(S),null!=(k=y[C]);)S=b[C=k.id()];return{found:!0,distance:h[c],path:this.spawn(_),steps:E}}v[c]=!0;for(var R=u._private.edges,P=0;P<R.length;P++){var O=R[P];if(this.hasElementWithId(O.id())&&(!s||O.data("source")===c)){var M=O.source(),j=O.target(),z=M.id()!==c?M:j,T=z.id();if(this.hasElementWithId(T)&&!v[T]){var D=h[c]+l(O);x=T,m.has(x)?D<h[T]&&(h[T]=D,p[T]=D+i(z),y[T]=u,b[T]=O):(h[T]=D,p[T]=D+i(z),w(z,T),y[T]=u,b[T]=O)}}}}return{found:!1,distance:void 0,path:void 0,steps:E}}},Ve=ke({weight:function(e){return 1},directed:!1}),Fe={floydWarshall:function(e){for(var t=this.cy(),n=Ve(e),r=n.weight,a=n.directed,o=r,i=this.byGroup(),s=i.nodes,l=i.edges,u=s.length,c=u*u,d=function(e){return s.indexOf(e)},f=function(e){return s[e]},h=new Array(c),p=0;p<c;p++){var v=p%u,g=(p-v)/u;h[p]=g===v?0:1/0}for(var m=new Array(c),y=new Array(c),b=0;b<l.length;b++){var w=l[b],x=w.source()[0],_=w.target()[0];if(x!==_){var k=d(x),C=d(_),S=k*u+C,R=o(w);if(h[S]>R&&(h[S]=R,m[S]=C,y[S]=w),!a){var P=C*u+k;!a&&h[P]>R&&(h[P]=R,m[P]=k,y[P]=w)}}}for(var O=0;O<u;O++)for(var M=0;M<u;M++)for(var j=M*u+O,z=0;z<u;z++){var T=M*u+z,D=O*u+z;h[j]+h[D]<h[T]&&(h[T]=h[j]+h[D],m[T]=m[j])}var A=function(e){return d(function(e){return(E(e)?t.filter(e):e)[0]}(e))},B={distance:function(e,t){var n=A(e),r=A(t);return h[n*u+r]},path:function(e,n){var r=A(e),a=A(n),o=f(r);if(r===a)return o.collection();if(null==m[r*u+a])return t.collection();var i,s=t.collection(),l=r;for(s.merge(o);r!==a;)l=r,r=m[r*u+a],i=y[l*u+r],s.merge(i),s.merge(f(r));return s}};return B}},He=ke({weight:function(e){return 1},directed:!1,root:null}),Ge={bellmanFord:function(e){var t=this,n=He(e),r=n.weight,a=n.directed,o=n.root,i=r,s=this,l=this.cy(),u=this.byGroup(),c=u.edges,d=u.nodes,f=d.length,h=new Oe,p=!1,v=[];o=l.collection(o)[0],c.unmergeBy((function(e){return e.isLoop()}));for(var g=c.length,m=function(e){var t=h.get(e.id());return t||(t={},h.set(e.id(),t)),t},y=function(e){return(E(e)?l.$(e):e)[0]},b=0;b<f;b++){var w=d[b],x=m(w);w.same(o)?x.dist=0:x.dist=1/0,x.pred=null,x.edge=null}for(var _=!1,k=function(e,t,n,r,a,o){var i=r.dist+o;i<a.dist&&!n.same(r.edge)&&(a.dist=i,a.pred=e,a.edge=n,_=!0)},C=1;C<f;C++){_=!1;for(var S=0;S<g;S++){var R=c[S],P=R.source(),O=R.target(),M=i(R),j=m(P),z=m(O);k(P,0,R,j,z,M),a||k(O,0,R,z,j,M)}if(!_)break}if(_)for(var T=[],D=0;D<g;D++){var A=c[D],B=A.source(),N=A.target(),I=i(A),L=m(B).dist,V=m(N).dist;if(L+I<V||!a&&V+I<L){if(p||(be("Graph contains a negative weight cycle for Bellman-Ford"),p=!0),!1===e.findNegativeWeightCycles)break;var F=[];L+I<V&&F.push(B),!a&&V+I<L&&F.push(N);for(var H=F.length,G=0;G<H;G++){var q=F[G],Y=[q];Y.push(m(q).edge);for(var U=m(q).pred;-1===Y.indexOf(U);)Y.push(U),Y.push(m(U).edge),U=m(U).pred;for(var W=(Y=Y.slice(Y.indexOf(U)))[0].id(),$=0,X=2;X<Y.length;X+=2)Y[X].id()<W&&(W=Y[X].id(),$=X);(Y=Y.slice($).concat(Y.slice(0,$))).push(Y[0]);var K=Y.map((function(e){return e.id()})).join(",");-1===T.indexOf(K)&&(v.push(s.spawn(Y)),T.push(K))}}}return{distanceTo:function(e){return m(y(e)).dist},pathTo:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,r=y(e),a=[],i=r;;){if(null==i)return t.spawn();var l=m(i),u=l.edge,c=l.pred;if(a.unshift(i[0]),i.same(n)&&a.length>0)break;null!=u&&a.unshift(u),i=c}return s.spawn(a)},hasNegativeWeightCycle:p,negativeWeightCycles:v}}},qe=Math.sqrt(2),Ye=function(e,t,n){0===n.length&&me("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],a=r[1],o=r[2],i=t[a],s=t[o],l=n,u=l.length-1;u>=0;u--){var c=l[u],d=c[1],f=c[2];(t[d]===i&&t[f]===s||t[d]===s&&t[f]===i)&&l.splice(u,1)}for(var h=0;h<l.length;h++){var p=l[h];p[1]===s?(l[h]=p.slice(),l[h][1]=i):p[2]===s&&(l[h]=p.slice(),l[h][2]=i)}for(var v=0;v<t.length;v++)t[v]===s&&(t[v]=i);return l},Ue=function(e,t,n,r){for(;n>r;){var a=Math.floor(Math.random()*t.length);t=Ye(a,e,t),n--}return t},We={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var a=n.length,o=r.length,i=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),s=Math.floor(a/qe);if(!(a<2)){for(var l=[],u=0;u<o;u++){var c=r[u];l.push([u,n.indexOf(c.source()),n.indexOf(c.target())])}for(var d=1/0,f=[],h=new Array(a),p=new Array(a),v=new Array(a),g=function(e,t){for(var n=0;n<a;n++)t[n]=e[n]},m=0;m<=i;m++){for(var y=0;y<a;y++)p[y]=y;var b=Ue(p,l.slice(),a,s),w=b.slice();g(p,v);var x=Ue(p,b,s,2),E=Ue(v,w,s,2);x.length<=E.length&&x.length<d?(d=x.length,f=x,g(p,h)):E.length<=x.length&&E.length<d&&(d=E.length,f=E,g(v,h))}for(var _=this.spawn(f.map((function(e){return r[e[0]]}))),k=this.spawn(),C=this.spawn(),S=h[0],R=0;R<h.length;R++){var P=h[R],O=n[R];P===S?k.merge(O):C.merge(O)}var M=function(t){var n=e.spawn();return t.forEach((function(t){n.merge(t),t.connectedEdges().forEach((function(t){e.contains(t)&&!_.contains(t)&&n.merge(t)}))})),n},j=[M(k),M(C)];return{cut:_,components:j,partition1:k,partition2:C}}me("At least 2 nodes are required for Karger-Stein algorithm")}},$e=function(e,t,n){return{x:e.x*t+n.x,y:e.y*t+n.y}},Xe=function(e,t,n){return{x:(e.x-n.x)/t,y:(e.y-n.y)/t}},Ke=function(e){return{x:e[0],y:e[1]}},Ze=function(e,t){return Math.atan2(t,e)-Math.PI/2},Qe=Math.log2||function(e){return Math.log(e)/Math.log(2)},Je=function(e){return e>0?1:e<0?-1:0},et=function(e,t){return Math.sqrt(tt(e,t))},tt=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},nt=function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r];for(var a=0;a<t;a++)e[a]=e[a]/n;return e},rt=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},at=function(e,t,n,r){return{x:rt(e.x,t.x,n.x,r),y:rt(e.y,t.y,n.y,r)}},ot=function(e,t,n){return Math.max(e,Math.min(n,t))},it=function(e){if(null==e)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(null!=e.x1&&null!=e.y1){if(null!=e.x2&&null!=e.y2&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},st=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ut=function(e){var t,n,r,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===o.length)t=n=r=a=o[0];else if(2===o.length)t=r=o[0],a=n=o[1];else if(4===o.length){var i=p(o,4);t=i[0],n=i[1],r=i[2],a=i[3]}return e.x1-=a,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ct=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},dt=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2<t.x1)&&(!(t.x2<e.x1)&&(!(e.y2<t.y1)&&(!(t.y2<e.y1)&&(!(e.y1>t.y2)&&!(t.y1>e.y2)))))))},ft=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},ht=function(e,t){return ft(e,t.x1,t.y1)&&ft(e,t.x2,t.y2)},pt=function(e,t,n,r,a,o,i){var s,l=zt(a,o),u=a/2,c=o/2,d=r-c-i;if((s=St(e,t,n,r,n-u+l-i,d,n+u-l+i,d,!1)).length>0)return s;var f=n+u+i;if((s=St(e,t,n,r,f,r-c+l-i,f,r+c-l+i,!1)).length>0)return s;var h=r+c+i;if((s=St(e,t,n,r,n-u+l-i,h,n+u-l+i,h,!1)).length>0)return s;var p,v=n-u-i;if((s=St(e,t,n,r,v,r-c+l-i,v,r+c-l+i,!1)).length>0)return s;var g=n-u+l,m=r-c+l;if((p=kt(e,t,n,r,g,m,l+i)).length>0&&p[0]<=g&&p[1]<=m)return[p[0],p[1]];var y=n+u-l,b=r-c+l;if((p=kt(e,t,n,r,y,b,l+i)).length>0&&p[0]>=y&&p[1]<=b)return[p[0],p[1]];var w=n+u-l,x=r+c-l;if((p=kt(e,t,n,r,w,x,l+i)).length>0&&p[0]>=w&&p[1]>=x)return[p[0],p[1]];var E=n-u+l,_=r+c-l;return(p=kt(e,t,n,r,E,_,l+i)).length>0&&p[0]<=E&&p[1]>=_?[p[0],p[1]]:[]},vt=function(e,t,n,r,a,o,i){var s=i,l=Math.min(n,a),u=Math.max(n,a),c=Math.min(r,o),d=Math.max(r,o);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},gt=function(e,t,n,r,a,o,i,s,l){var u=Math.min(n,i,a)-l,c=Math.max(n,i,a)+l,d=Math.min(r,s,o)-l,f=Math.max(r,s,o)+l;return!(e<u||e>c||t<d||t>f)},mt=function(e,t,n,r,a,o,i,s){var l=[];!function(e,t,n,r,a){var o,i,s,l,u,c,d,f;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),o=(i=(3*n-t*t)/9)*i*i+(s/=54)*s,a[1]=0,d=t/3,o>0?(u=(u=s+Math.sqrt(o))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(o))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),a[0]=-d+u+c,d+=(u+c)/2,a[4]=a[2]=-d,d=Math.sqrt(3)*(-c+u)/2,a[3]=d,a[5]=-d):(a[5]=a[3]=0,0===o?(f=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),a[0]=2*f-d,a[4]=a[2]=-(f+d)):(l=(i=-i)*i*i,l=Math.acos(s/Math.sqrt(l)),f=2*Math.sqrt(i),a[0]=-d+f*Math.cos(l/3),a[2]=-d+f*Math.cos((l+2*Math.PI)/3),a[4]=-d+f*Math.cos((l+4*Math.PI)/3)))}(1*n*n-4*n*a+2*n*i+4*a*a-4*a*i+i*i+r*r-4*r*o+2*r*s+4*o*o-4*o*s+s*s,9*n*a-3*n*n-3*n*i-6*a*a+3*a*i+9*r*o-3*r*r-3*r*s-6*o*o+3*o*s,3*n*n-6*n*a+n*i-n*e+2*a*a+2*a*e-i*e+3*r*r-6*r*o+r*s-r*t+2*o*o+2*o*t-s*t,1*n*a-n*n+n*e-a*e+r*o-r*r+r*t-o*t,l);for(var u=[],c=0;c<6;c+=2)Math.abs(l[c+1])<1e-7&&l[c]>=0&&l[c]<=1&&u.push(l[c]);u.push(1),u.push(0);for(var d,f,h,p=-1,v=0;v<u.length;v++)d=Math.pow(1-u[v],2)*n+2*(1-u[v])*u[v]*a+u[v]*u[v]*i,f=Math.pow(1-u[v],2)*r+2*(1-u[v])*u[v]*o+u[v]*u[v]*s,h=Math.pow(d-e,2)+Math.pow(f-t,2),p>=0?h<p&&(p=h):p=h;return p},yt=function(e,t,n,r,a,o){var i=[e-n,t-r],s=[a-n,o-r],l=s[0]*s[0]+s[1]*s[1],u=i[0]*i[0]+i[1]*i[1],c=i[0]*s[0]+i[1]*s[1],d=c*c/l;return c<0?u:d>l?(e-a)*(e-a)+(t-o)*(t-o):u-d},bt=function(e,t,n){for(var r,a,o,i,s=0,l=0;l<n.length/2;l++)if(r=n[2*l],a=n[2*l+1],l+1<n.length/2?(o=n[2*(l+1)],i=n[2*(l+1)+1]):(o=n[2*(l+1-n.length/2)],i=n[2*(l+1-n.length/2)+1]),r==e&&o==e);else{if(!(r>=e&&e>=o||r<=e&&e<=o))continue;(e-r)/(o-r)*(i-a)+a>t&&s++}return s%2!=0},wt=function(e,t,n,r,a,o,i,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var d,f=Math.cos(-u),h=Math.sin(-u),p=0;p<c.length/2;p++)c[2*p]=o/2*(n[2*p]*f-n[2*p+1]*h),c[2*p+1]=i/2*(n[2*p+1]*f+n[2*p]*h),c[2*p]+=r,c[2*p+1]+=a;if(l>0){var v=Et(c,-l);d=xt(v)}else d=c;return bt(e,t,d)},xt=function(e){for(var t,n,r,a,o,i,s,l,u=new Array(e.length/2),c=0;c<e.length/4;c++){t=e[4*c],n=e[4*c+1],r=e[4*c+2],a=e[4*c+3],c<e.length/4-1?(o=e[4*(c+1)],i=e[4*(c+1)+1],s=e[4*(c+1)+2],l=e[4*(c+1)+3]):(o=e[0],i=e[1],s=e[2],l=e[3]);var d=St(t,n,r,a,o,i,s,l,!0);u[2*c]=d[0],u[2*c+1]=d[1]}return u},Et=function(e,t){for(var n,r,a,o,i=new Array(2*e.length),s=0;s<e.length/2;s++){n=e[2*s],r=e[2*s+1],s<e.length/2-1?(a=e[2*(s+1)],o=e[2*(s+1)+1]):(a=e[0],o=e[1]);var l=o-r,u=-(a-n),c=Math.sqrt(l*l+u*u),d=l/c,f=u/c;i[4*s]=n+d*t,i[4*s+1]=r+f*t,i[4*s+2]=a+d*t,i[4*s+3]=o+f*t}return i},_t=function(e,t,n,r,a,o,i){return e-=a,t-=o,(e/=n/2+i)*e+(t/=r/2+i)*t<=1},kt=function(e,t,n,r,a,o,i){var s=[n-e,r-t],l=[e-a,t-o],u=s[0]*s[0]+s[1]*s[1],c=2*(l[0]*s[0]+l[1]*s[1]),d=c*c-4*u*(l[0]*l[0]+l[1]*l[1]-i*i);if(d<0)return[];var f=(-c+Math.sqrt(d))/(2*u),h=(-c-Math.sqrt(d))/(2*u),p=Math.min(f,h),v=Math.max(f,h),g=[];if(p>=0&&p<=1&&g.push(p),v>=0&&v<=1&&g.push(v),0===g.length)return[];var m=g[0]*s[0]+e,y=g[0]*s[1]+t;return g.length>1?g[0]==g[1]?[m,y]:[m,y,g[1]*s[0]+e,g[1]*s[1]+t]:[m,y]},Ct=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},St=function(e,t,n,r,a,o,i,s,l){var u=e-a,c=n-e,d=i-a,f=t-o,h=r-t,p=s-o,v=d*f-p*u,g=c*f-h*u,m=p*c-d*h;if(0!==m){var y=v/m,b=g/m,w=-.001;return w<=y&&y<=1.001&&w<=b&&b<=1.001||l?[e+y*c,t+y*h]:[]}return 0===v||0===g?Ct(e,n,i)===i?[i,s]:Ct(e,n,a)===a?[a,o]:Ct(a,i,n)===n?[n,r]:[]:[]},Rt=function(e,t,n,r,a,o,i,s){var l,u,c,d,f,h,p=[],v=new Array(n.length),g=!0;if(null==o&&(g=!1),g){for(var m=0;m<v.length/2;m++)v[2*m]=n[2*m]*o+r,v[2*m+1]=n[2*m+1]*i+a;if(s>0){var y=Et(v,-s);u=xt(y)}else u=v}else u=n;for(var b=0;b<u.length/2;b++)c=u[2*b],d=u[2*b+1],b<u.length/2-1?(f=u[2*(b+1)],h=u[2*(b+1)+1]):(f=u[0],h=u[1]),0!==(l=St(e,t,r,a,c,d,f,h)).length&&p.push(l[0],l[1]);return p},Pt=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],a=Math.sqrt(r[0]*r[0]+r[1]*r[1]),o=(a-n)/a;return o<0&&(o=1e-5),[t[0]+o*r[0],t[1]+o*r[1]]},Ot=function(e,t){var n=jt(e,t);return n=Mt(n)},Mt=function(e){for(var t,n,r=e.length/2,a=1/0,o=1/0,i=-1/0,s=-1/0,l=0;l<r;l++)t=e[2*l],n=e[2*l+1],a=Math.min(a,t),i=Math.max(i,t),o=Math.min(o,n),s=Math.max(s,n);for(var u=2/(i-a),c=2/(s-o),d=0;d<r;d++)t=e[2*d]=e[2*d]*u,n=e[2*d+1]=e[2*d+1]*c,a=Math.min(a,t),i=Math.max(i,t),o=Math.min(o,n),s=Math.max(s,n);if(o<-1)for(var f=0;f<r;f++)n=e[2*f+1]=e[2*f+1]+(-1-o);return e},jt=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var a,o=new Array(2*e),i=0;i<e;i++)a=i*n+r,o[2*i]=Math.cos(a),o[2*i+1]=Math.sin(-a);return o},zt=function(e,t){return Math.min(e/4,t/4,8)},Tt=function(e,t){return Math.min(e/10,t/10,8)},Dt=function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},At=ke({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),Bt={pageRank:function(e){for(var t=At(e),n=t.dampingFactor,r=t.precision,a=t.iterations,o=t.weight,i=this._private.cy,s=this.byGroup(),l=s.nodes,u=s.edges,c=l.length,d=c*c,f=u.length,h=new Array(d),p=new Array(c),v=(1-n)/c,g=0;g<c;g++){for(var m=0;m<c;m++){h[g*c+m]=0}p[g]=0}for(var y=0;y<f;y++){var b=u[y],w=b.data("source"),x=b.data("target");if(w!==x){var E=l.indexOfId(w),_=l.indexOfId(x),k=o(b);h[_*c+E]+=k,p[E]+=k}}for(var C=1/c+v,S=0;S<c;S++)if(0===p[S])for(var R=0;R<c;R++){h[R*c+S]=C}else for(var P=0;P<c;P++){var O=P*c+S;h[O]=h[O]/p[S]+v}for(var M,j=new Array(c),z=new Array(c),T=0;T<c;T++)j[T]=1;for(var D=0;D<a;D++){for(var A=0;A<c;A++)z[A]=0;for(var B=0;B<c;B++)for(var N=0;N<c;N++){var I=B*c+N;z[B]+=h[I]*j[N]}nt(z),M=j,j=z,z=M;for(var L=0,V=0;V<c;V++){var F=M[V]-j[V];L+=F*F}if(L<r)break}return{rank:function(e){return e=i.collection(e)[0],j[l.indexOf(e)]}}}},Nt=ke({root:null,weight:function(e){return 1},directed:!1,alpha:0}),It={degreeCentralityNormalized:function(e){e=Nt(e);var t=this.cy(),n=this.nodes(),r=n.length;if(e.directed){for(var a={},o={},i=0,s=0,l=0;l<r;l++){var u=n[l],c=u.id();e.root=u;var d=this.degreeCentrality(e);i<d.indegree&&(i=d.indegree),s<d.outdegree&&(s=d.outdegree),a[c]=d.indegree,o[c]=d.outdegree}return{indegree:function(e){return 0==i?0:(E(e)&&(e=t.filter(e)),a[e.id()]/i)},outdegree:function(e){return 0===s?0:(E(e)&&(e=t.filter(e)),o[e.id()]/s)}}}for(var f={},h=0,p=0;p<r;p++){var v=n[p];e.root=v;var g=this.degreeCentrality(e);h<g.degree&&(h=g.degree),f[v.id()]=g.degree}return{degree:function(e){return 0===h?0:(E(e)&&(e=t.filter(e)),f[e.id()]/h)}}},degreeCentrality:function(e){e=Nt(e);var t=this.cy(),n=this,r=e,a=r.root,o=r.weight,i=r.directed,s=r.alpha;if(a=t.collection(a)[0],i){for(var l=a.connectedEdges(),u=l.filter((function(e){return e.target().same(a)&&n.has(e)})),c=l.filter((function(e){return e.source().same(a)&&n.has(e)})),d=u.length,f=c.length,h=0,p=0,v=0;v<u.length;v++)h+=o(u[v]);for(var g=0;g<c.length;g++)p+=o(c[g]);return{indegree:Math.pow(d,1-s)*Math.pow(h,s),outdegree:Math.pow(f,1-s)*Math.pow(p,s)}}for(var m=a.connectedEdges().intersection(n),y=m.length,b=0,w=0;w<m.length;w++)b+=o(m[w]);return{degree:Math.pow(y,1-s)*Math.pow(b,s)}}};It.dc=It.degreeCentrality,It.dcn=It.degreeCentralityNormalised=It.degreeCentralityNormalized;var Lt=ke({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),Vt={closenessCentralityNormalized:function(e){for(var t=Lt(e),n=t.harmonic,r=t.weight,a=t.directed,o=this.cy(),i={},s=0,l=this.nodes(),u=this.floydWarshall({weight:r,directed:a}),c=0;c<l.length;c++){for(var d=0,f=l[c],h=0;h<l.length;h++)if(c!==h){var p=u.distance(f,l[h]);d+=n?1/p:p}n||(d=1/d),s<d&&(s=d),i[f.id()]=d}return{closeness:function(e){return 0==s?0:(e=E(e)?o.filter(e)[0].id():e.id(),i[e]/s)}}},closenessCentrality:function(e){var t=Lt(e),n=t.root,r=t.weight,a=t.directed,o=t.harmonic;n=this.filter(n)[0];for(var i=this.dijkstra({root:n,weight:r,directed:a}),s=0,l=this.nodes(),u=0;u<l.length;u++){var c=l[u];if(!c.same(n)){var d=i.distanceTo(c);s+=o?1/d:d}}return o?s:1/s}};Vt.cc=Vt.closenessCentrality,Vt.ccn=Vt.closenessCentralityNormalised=Vt.closenessCentralityNormalized;var Ft=ke({weight:null,directed:!1}),Ht={betweennessCentrality:function(e){for(var t=Ft(e),n=t.directed,r=t.weight,a=null!=r,i=this.cy(),s=this.nodes(),l={},u={},c=0,d=function(e,t){u[e]=t,t>c&&(c=t)},f=function(e){return u[e]},h=0;h<s.length;h++){var p=s[h],v=p.id();l[v]=n?p.outgoers().nodes():p.openNeighborhood().nodes(),d(v,0)}for(var g=function(e){for(var t=s[e].id(),n=[],u={},c={},h={},p=new o((function(e,t){return h[e]-h[t]})),v=0;v<s.length;v++){var g=s[v].id();u[g]=[],c[g]=0,h[g]=1/0}for(c[t]=1,h[t]=0,p.push(t);!p.empty();){var m=p.pop();if(n.push(m),a)for(var y=0;y<l[m].length;y++){var b=l[m][y],w=i.getElementById(m),x=void 0;x=w.edgesTo(b).length>0?w.edgesTo(b)[0]:b.edgesTo(w)[0];var E=r(x);b=b.id(),h[b]>h[m]+E&&(h[b]=h[m]+E,p.nodes.indexOf(b)<0?p.push(b):p.updateItem(b),c[b]=0,u[b]=[]),h[b]==h[m]+E&&(c[b]=c[b]+c[m],u[b].push(m))}else for(var _=0;_<l[m].length;_++){var k=l[m][_].id();h[k]==1/0&&(p.push(k),h[k]=h[m]+1),h[k]==h[m]+1&&(c[k]=c[k]+c[m],u[k].push(m))}}for(var C={},S=0;S<s.length;S++)C[s[S].id()]=0;for(;n.length>0;){for(var R=n.pop(),P=0;P<u[R].length;P++){var O=u[R][P];C[O]=C[O]+c[O]/c[R]*(1+C[R])}R!=s[e].id()&&d(R,f(R)+C[R])}},m=0;m<s.length;m++)g(m);var y={betweenness:function(e){var t=i.collection(e).id();return f(t)},betweennessNormalized:function(e){if(0==c)return 0;var t=i.collection(e).id();return f(t)/c}};return y.betweennessNormalised=y.betweennessNormalized,y}};Ht.bc=Ht.betweennessCentrality;var Gt=ke({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),qt=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r](e);return n},Yt=function(e,t){for(var n,r=0;r<t;r++){n=0;for(var a=0;a<t;a++)n+=e[a*t+r];for(var o=0;o<t;o++)e[o*t+r]=e[o*t+r]/n}},Ut=function(e,t,n){for(var r=new Array(n*n),a=0;a<n;a++){for(var o=0;o<n;o++)r[a*n+o]=0;for(var i=0;i<n;i++)for(var s=0;s<n;s++)r[a*n+s]+=e[a*n+i]*t[i*n+s]}return r},Wt=function(e,t,n){for(var r=e.slice(0),a=1;a<n;a++)e=Ut(e,r,t);return e},$t=function(e,t,n){for(var r=new Array(t*t),a=0;a<t*t;a++)r[a]=Math.pow(e[a],n);return Yt(r,t),r},Xt=function(e,t,n,r){for(var a=0;a<n;a++){if(Math.round(e[a]*Math.pow(10,r))/Math.pow(10,r)!==Math.round(t[a]*Math.pow(10,r))/Math.pow(10,r))return!1}return!0},Kt=function(e,t){for(var n=0;n<e.length;n++)if(!t[n]||e[n].id()!==t[n].id())return!1;return!0},Zt=function(e){for(var t=this.nodes(),n=this.edges(),r=this.cy(),a=function(e){return Gt(e)}(e),o={},i=0;i<t.length;i++)o[t[i].id()]=i;for(var s,l=t.length,u=l*l,c=new Array(u),d=0;d<u;d++)c[d]=0;for(var f=0;f<n.length;f++){var h=n[f],p=o[h.source().id()],v=o[h.target().id()],g=qt(h,a.attributes);c[p*l+v]+=g,c[v*l+p]+=g}!function(e,t,n){for(var r=0;r<t;r++)e[r*t+r]=n}(c,l,a.multFactor),Yt(c,l);for(var m=!0,y=0;m&&y<a.maxIterations;)m=!1,s=Wt(c,l,a.expandFactor),c=$t(s,l,a.inflateFactor),Xt(c,s,u,4)||(m=!0),y++;var b=function(e,t,n,r){for(var a=[],o=0;o<t;o++){for(var i=[],s=0;s<t;s++)Math.round(1e3*e[o*t+s])/1e3>0&&i.push(n[s]);0!==i.length&&a.push(r.collection(i))}return a}(c,l,t,r);return b=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e.length;n++)t!=n&&Kt(e[t],e[n])&&e.splice(n,1);return e}(b),b},Qt={markovClustering:Zt,mcl:Zt},Jt=function(e){return e},en=function(e,t){return Math.abs(t-e)},tn=function(e,t,n){return e+en(t,n)},nn=function(e,t,n){return e+Math.pow(n-t,2)},rn=function(e){return Math.sqrt(e)},an=function(e,t,n){return Math.max(e,en(t,n))},on=function(e,t,n,r,a){for(var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Jt,i=r,s=0;s<e;s++)i=a(i,t(s),n(s));return o(i)},sn={euclidean:function(e,t,n){return e>=2?on(e,t,n,0,nn,rn):on(e,t,n,0,tn)},squaredEuclidean:function(e,t,n){return on(e,t,n,0,nn)},manhattan:function(e,t,n){return on(e,t,n,0,tn)},max:function(e,t,n){return on(e,t,n,-1/0,an)}};function ln(e,t,n,r,a,o){var i;return i=_(e)?e:sn[e]||sn.euclidean,0===t&&_(e)?i(a,o):i(t,n,r,a,o)}sn["squared-euclidean"]=sn.squaredEuclidean,sn.squaredeuclidean=sn.squaredEuclidean;var un=ke({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),cn=function(e){return un(e)},dn=function(e,t,n,r,a){var o="kMedoids"!==a?function(e){return n[e]}:function(e){return r[e](n)},i=n,s=t;return ln(e,r.length,o,(function(e){return r[e](t)}),i,s)},fn=function(e,t,n){for(var r=n.length,a=new Array(r),o=new Array(r),i=new Array(t),s=null,l=0;l<r;l++)a[l]=e.min(n[l]).value,o[l]=e.max(n[l]).value;for(var u=0;u<t;u++){s=[];for(var c=0;c<r;c++)s[c]=Math.random()*(o[c]-a[c])+a[c];i[u]=s}return i},hn=function(e,t,n,r,a){for(var o=1/0,i=0,s=0;s<t.length;s++){var l=dn(n,e,t[s],r,a);l<o&&(o=l,i=s)}return i},pn=function(e,t,n){for(var r=[],a=null,o=0;o<t.length;o++)n[(a=t[o]).id()]===e&&r.push(a);return r},vn=function(e,t,n){for(var r=0;r<e.length;r++)for(var a=0;a<e[r].length;a++){if(Math.abs(e[r][a]-t[r][a])>n)return!1}return!0},gn=function(e,t,n){for(var r=0;r<n;r++)if(e===t[r])return!0;return!1},mn=function(e,t){var n=new Array(t);if(e.length<50)for(var r=0;r<t;r++){for(var a=e[Math.floor(Math.random()*e.length)];gn(a,n,r);)a=e[Math.floor(Math.random()*e.length)];n[r]=a}else for(var o=0;o<t;o++)n[o]=e[Math.floor(Math.random()*e.length)];return n},yn=function(e,t,n){for(var r=0,a=0;a<t.length;a++)r+=dn("manhattan",t[a],e,n,"kMedoids");return r},bn=function(e,t,n,r,a){for(var o,i,s=0;s<t.length;s++)for(var l=0;l<e.length;l++)r[s][l]=Math.pow(n[s][l],a.m);for(var u=0;u<e.length;u++)for(var c=0;c<a.attributes.length;c++){o=0,i=0;for(var d=0;d<t.length;d++)o+=r[d][u]*a.attributes[c](t[d]),i+=r[d][u];e[u][c]=o/i}},wn=function(e,t,n,r,a){for(var o=0;o<e.length;o++)t[o]=e[o].slice();for(var i,s,l,u=2/(a.m-1),c=0;c<n.length;c++)for(var d=0;d<r.length;d++){i=0;for(var f=0;f<n.length;f++)s=dn(a.distance,r[d],n[c],a.attributes,"cmeans"),l=dn(a.distance,r[d],n[f],a.attributes,"cmeans"),i+=Math.pow(s/l,u);e[d][c]=1/i}},xn=function(e){var t,n,r,a,o,i=this.cy(),s=this.nodes(),l=cn(e);a=new Array(s.length);for(var u=0;u<s.length;u++)a[u]=new Array(l.k);r=new Array(s.length);for(var c=0;c<s.length;c++)r[c]=new Array(l.k);for(var d=0;d<s.length;d++){for(var f=0,h=0;h<l.k;h++)r[d][h]=Math.random(),f+=r[d][h];for(var p=0;p<l.k;p++)r[d][p]=r[d][p]/f}n=new Array(l.k);for(var v=0;v<l.k;v++)n[v]=new Array(l.attributes.length);o=new Array(s.length);for(var g=0;g<s.length;g++)o[g]=new Array(l.k);for(var m=!0,y=0;m&&y<l.maxIterations;)m=!1,bn(n,s,r,o,l),wn(r,a,n,s,l),vn(r,a,l.sensitivityThreshold)||(m=!0),y++;return t=function(e,t,n,r){for(var a,o,i=new Array(n.k),s=0;s<i.length;s++)i[s]=[];for(var l=0;l<t.length;l++){a=-1/0,o=-1;for(var u=0;u<t[0].length;u++)t[l][u]>a&&(a=t[l][u],o=u);i[o].push(e[l])}for(var c=0;c<i.length;c++)i[c]=r.collection(i[c]);return i}(s,r,l,i),{clusters:t,degreeOfMembership:r}},En={kMeans:function(e){var t,n=this.cy(),r=this.nodes(),a=null,o=cn(e),i=new Array(o.k),s={};t=o.testMode?"number"==typeof o.testCentroids?fn(r,o.k,o.attributes):"object"===u(o.testCentroids)?o.testCentroids:fn(r,o.k,o.attributes):fn(r,o.k,o.attributes);for(var l,c,d,f=!0,h=0;f&&h<o.maxIterations;){for(var p=0;p<r.length;p++)s[(a=r[p]).id()]=hn(a,t,o.distance,o.attributes,"kMeans");f=!1;for(var v=0;v<o.k;v++){var g=pn(v,r,s);if(0!==g.length){for(var m=o.attributes.length,y=t[v],b=new Array(m),w=new Array(m),x=0;x<m;x++){w[x]=0;for(var E=0;E<g.length;E++)a=g[E],w[x]+=o.attributes[x](a);b[x]=w[x]/g.length,l=b[x],c=y[x],d=o.sensitivityThreshold,Math.abs(c-l)<=d||(f=!0)}t[v]=b,i[v]=n.collection(g)}}h++}return i},kMedoids:function(e){var t,n,r=this.cy(),a=this.nodes(),o=null,i=cn(e),s=new Array(i.k),l={},c=new Array(i.k);i.testMode?"number"==typeof i.testCentroids||(t="object"===u(i.testCentroids)?i.testCentroids:mn(a,i.k)):t=mn(a,i.k);for(var d=!0,f=0;d&&f<i.maxIterations;){for(var h=0;h<a.length;h++)l[(o=a[h]).id()]=hn(o,t,i.distance,i.attributes,"kMedoids");d=!1;for(var p=0;p<t.length;p++){var v=pn(p,a,l);if(0!==v.length){c[p]=yn(t[p],v,i.attributes);for(var g=0;g<v.length;g++)(n=yn(v[g],v,i.attributes))<c[p]&&(c[p]=n,t[p]=v[g],d=!0);s[p]=r.collection(v)}}f++}return s},fuzzyCMeans:xn,fcm:xn},_n=ke({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),kn={single:"min",complete:"max"},Cn=function(e,t,n,r,a){for(var o,i=0,s=1/0,l=a.attributes,u=function(e,t){return ln(a.distance,l.length,(function(t){return l[t](e)}),(function(e){return l[e](t)}),e,t)},c=0;c<e.length;c++){var d=e[c].key,f=n[d][r[d]];f<s&&(i=d,s=f)}if("threshold"===a.mode&&s>=a.threshold||"dendrogram"===a.mode&&1===e.length)return!1;var h,p=t[i],v=t[r[i]];h="dendrogram"===a.mode?{left:p,right:v,key:p.key}:{value:p.value.concat(v.value),key:p.key},e[p.index]=h,e.splice(v.index,1),t[p.key]=h;for(var g=0;g<e.length;g++){var m=e[g];p.key===m.key?o=1/0:"min"===a.linkage?(o=n[p.key][m.key],n[p.key][m.key]>n[v.key][m.key]&&(o=n[v.key][m.key])):"max"===a.linkage?(o=n[p.key][m.key],n[p.key][m.key]<n[v.key][m.key]&&(o=n[v.key][m.key])):o="mean"===a.linkage?(n[p.key][m.key]*p.size+n[v.key][m.key]*v.size)/(p.size+v.size):"dendrogram"===a.mode?u(m.value,p.value):u(m.value[0],p.value[0]),n[p.key][m.key]=n[m.key][p.key]=o}for(var y=0;y<e.length;y++){var b=e[y].key;if(r[b]===p.key||r[b]===v.key){for(var w=b,x=0;x<e.length;x++){var E=e[x].key;n[b][E]<n[b][w]&&(w=E)}r[b]=w}e[y].index=y}return p.key=v.key=p.index=v.index=null,!0},Sn=function e(t,n,r){t&&(t.value?n.push(t.value):(t.left&&e(t.left,n),t.right&&e(t.right,n)))},Rn=function e(t,n){if(!t)return"";if(t.left&&t.right){var r=e(t.left,n),a=e(t.right,n),o=n.add({group:"nodes",data:{id:r+","+a}});return n.add({group:"edges",data:{source:r,target:o.id()}}),n.add({group:"edges",data:{source:a,target:o.id()}}),o.id()}return t.value?t.value.id():void 0},Pn=function e(t,n,r){if(!t)return[];var a=[],o=[],i=[];return 0===n?(t.left&&Sn(t.left,a),t.right&&Sn(t.right,o),i=a.concat(o),[r.collection(i)]):1===n?t.value?[r.collection(t.value)]:(t.left&&Sn(t.left,a),t.right&&Sn(t.right,o),[r.collection(a),r.collection(o)]):t.value?[r.collection(t.value)]:(t.left&&(a=e(t.left,n-1,r)),t.right&&(o=e(t.right,n-1,r)),a.concat(o))},On=function(e){for(var t=this.cy(),n=this.nodes(),r=function(e){var t=_n(e),n=kn[t.linkage];return null!=n&&(t.linkage=n),t}(e),a=r.attributes,o=function(e,t){return ln(r.distance,a.length,(function(t){return a[t](e)}),(function(e){return a[e](t)}),e,t)},i=[],s=[],l=[],u=[],c=0;c<n.length;c++){var d={value:"dendrogram"===r.mode?n[c]:[n[c]],key:c,index:c};i[c]=d,u[c]=d,s[c]=[],l[c]=0}for(var f=0;f<i.length;f++)for(var h=0;h<=f;h++){var p=void 0;p="dendrogram"===r.mode?f===h?1/0:o(i[f].value,i[h].value):f===h?1/0:o(i[f].value[0],i[h].value[0]),s[f][h]=p,s[h][f]=p,p<s[f][l[f]]&&(l[f]=h)}for(var v,g=Cn(i,u,s,l,r);g;)g=Cn(i,u,s,l,r);return"dendrogram"===r.mode?(v=Pn(i[0],r.dendrogramDepth,t),r.addDendrogram&&Rn(i[0],t)):(v=new Array(i.length),i.forEach((function(e,n){e.key=e.index=null,v[n]=t.collection(e.value)}))),v},Mn={hierarchicalClustering:On,hca:On},jn=ke({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),zn=function(e,t,n,r){var a=function(e,t){return r[t](e)};return-ln(e,r.length,(function(e){return a(t,e)}),(function(e){return a(n,e)}),t,n)},Tn=function(e,t){var n=null;return n="median"===t?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n<e.length&&e.splice(n,e.length-n),t>0&&e.splice(0,t)):e=e.slice(t,n);for(var o=0,i=e.length-1;i>=0;i--){var s=e[i];a?isFinite(s)||(e[i]=-1/0,o++):e.splice(i,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+o]:(e[u-1+o]+e[u+o])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,a=0,o=t;o<n;o++){var i=e[o];isFinite(i)&&(r+=i,a++)}return r/a}(e):"min"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,a=t;a<n;a++){var o=e[a];isFinite(o)&&(r=Math.min(o,r))}return r}(e):"max"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,a=t;a<n;a++){var o=e[a];isFinite(o)&&(r=Math.max(o,r))}return r}(e):t,n},Dn=function(e,t,n){for(var r=[],a=0;a<e;a++){for(var o=-1,i=-1/0,s=0;s<n.length;s++){var l=n[s];t[a*e+l]>i&&(o=l,i=t[a*e+l])}o>0&&r.push(o)}for(var u=0;u<n.length;u++)r[n[u]]=n[u];return r},An=function(e){for(var t,n,r,a,o,i,s=this.cy(),l=this.nodes(),u=function(e){var t=e.damping,n=e.preference;.5<=t&&t<1||me("Damping must range on [0.5, 1). Got: ".concat(t));var r=["median","mean","min","max"];return r.some((function(e){return e===n}))||S(n)||me("Preference must be one of [".concat(r.map((function(e){return"'".concat(e,"'")})).join(", "),"] or a number. Got: ").concat(n)),jn(e)}(e),c={},d=0;d<l.length;d++)c[l[d].id()]=d;n=(t=l.length)*t,r=new Array(n);for(var f=0;f<n;f++)r[f]=-1/0;for(var h=0;h<t;h++)for(var p=0;p<t;p++)h!==p&&(r[h*t+p]=zn(u.distance,l[h],l[p],u.attributes));a=Tn(r,u.preference);for(var v=0;v<t;v++)r[v*t+v]=a;o=new Array(n);for(var g=0;g<n;g++)o[g]=0;i=new Array(n);for(var m=0;m<n;m++)i[m]=0;for(var y=new Array(t),b=new Array(t),w=new Array(t),x=0;x<t;x++)y[x]=0,b[x]=0,w[x]=0;for(var E,_=new Array(t*u.minIterations),k=0;k<_.length;k++)_[k]=0;for(E=0;E<u.maxIterations;E++){for(var C=0;C<t;C++){for(var R=-1/0,P=-1/0,O=-1,M=0,j=0;j<t;j++)y[j]=o[C*t+j],(M=i[C*t+j]+r[C*t+j])>=R?(P=R,R=M,O=j):M>P&&(P=M);for(var z=0;z<t;z++)o[C*t+z]=(1-u.damping)*(r[C*t+z]-R)+u.damping*y[z];o[C*t+O]=(1-u.damping)*(r[C*t+O]-P)+u.damping*y[O]}for(var T=0;T<t;T++){for(var D=0,A=0;A<t;A++)y[A]=i[A*t+T],b[A]=Math.max(0,o[A*t+T]),D+=b[A];D-=b[T],b[T]=o[T*t+T],D+=b[T];for(var B=0;B<t;B++)i[B*t+T]=(1-u.damping)*Math.min(0,D-b[B])+u.damping*y[B];i[T*t+T]=(1-u.damping)*(D-b[T])+u.damping*y[T]}for(var N=0,I=0;I<t;I++){var L=i[I*t+I]+o[I*t+I]>0?1:0;_[E%u.minIterations*t+I]=L,N+=L}if(N>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var V=0,F=0;F<t;F++){w[F]=0;for(var H=0;H<u.minIterations;H++)w[F]+=_[H*t+F];0!==w[F]&&w[F]!==u.minIterations||V++}if(V===t)break}}for(var G=function(e,t,n){for(var r=[],a=0;a<e;a++)t[a*e+a]+n[a*e+a]>0&&r.push(a);return r}(t,o,i),q=function(e,t,n){for(var r=Dn(e,t,n),a=0;a<n.length;a++){for(var o=[],i=0;i<r.length;i++)r[i]===n[a]&&o.push(i);for(var s=-1,l=-1/0,u=0;u<o.length;u++){for(var c=0,d=0;d<o.length;d++)c+=t[o[d]*e+o[u]];c>l&&(s=u,l=c)}n[a]=o[s]}return Dn(e,t,n)}(t,r,G),Y={},U=0;U<G.length;U++)Y[G[U]]=[];for(var W=0;W<l.length;W++){var $=q[c[l[W].id()]];null!=$&&Y[$].push(l[W])}for(var X=new Array(G.length),K=0;K<G.length;K++)X[K]=s.collection(Y[G[K]]);return X},Bn={affinityPropagation:An,ap:An},Nn=ke({root:void 0,directed:!1}),In=function(){var e=this,t={},n=0,r=0,a=[],o=[],i={},s=function s(l,u,c){l===c&&(r+=1),t[u]={id:n,low:n++,cutVertex:!1};var d,f,h,p,v=e.getElementById(u).connectedEdges().intersection(e);0===v.size()?a.push(e.spawn(e.getElementById(u))):v.forEach((function(n){d=n.source().id(),f=n.target().id(),(h=d===u?f:d)!==c&&(p=n.id(),i[p]||(i[p]=!0,o.push({x:u,y:h,edge:n})),h in t?t[u].low=Math.min(t[u].low,t[h].id):(s(l,h,u),t[u].low=Math.min(t[u].low,t[h].low),t[u].id<=t[h].low&&(t[u].cutVertex=!0,function(n,r){for(var i=o.length-1,s=[],l=e.spawn();o[i].x!=n||o[i].y!=r;)s.push(o.pop().edge),i--;s.push(o.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach((function(n){var r=n.id(),a=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(a.filter((function(e){return e.isLoop()}))):l.merge(a)}))})),a.push(l)}(u,h))))}))};e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}}));var l=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(l),components:a}},Ln=function(){var e=this,t={},n=0,r=[],a=[],o=e.spawn(e),i=function i(s){if(a.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||i(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=a.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),d=l.merge(c);r.push(d),o=o.difference(d)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||i(n)}})),{cut:o,components:r}},Vn={};[De,Be,Ne,Le,Fe,Ge,We,Bt,It,Vt,Ht,Qt,En,Mn,Bn,{hierholzer:function(e){if(!C(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,a,o=Nn(e),i=o.root,s=o.directed,l=this,u=!1;i&&(a=E(i)?this.filter(i)[0].id():i[0].id());var c={},d={};s?l.forEach((function(e){var t=e.id();if(e.isNode()){var a=e.indegree(!0),o=e.outdegree(!0),i=a-o,s=o-a;1==i?n?u=!0:n=t:1==s?r?u=!0:r=t:(s>1||i>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else d[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):d[t]=[e.source().id(),e.target().id()]}));var f={found:!1,trail:void 0};if(u)return f;if(r&&n)if(s){if(a&&r!=a)return f;a=r}else{if(a&&r!=a&&n!=a)return f;a||(a=r)}else a||(a=l[0].id());var h=function(e){for(var t,n,r,a=e,o=[e];c[a].length;)t=c[a].shift(),n=d[t][0],a!=(r=d[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),a=r):s||a==n||(c[n]=c[n].filter((function(e){return e!=t})),a=n),o.unshift(t),o.unshift(a);return o},p=[],v=[];for(v=h(a);1!=v.length;)0==c[v[0]].length?(p.unshift(l.getElementById(v.shift())),p.unshift(l.getElementById(v.shift()))):v=h(v.shift()).concat(v);for(var g in p.unshift(l.getElementById(v.shift())),c)if(c[g].length)return f;return f.found=!0,f.trail=this.spawn(p,!0),f}},{hopcroftTarjanBiconnected:In,htbc:In,htb:In,hopcroftTarjanBiconnectedComponents:In},{tarjanStronglyConnected:Ln,tsc:Ln,tscc:Ln,tarjanStronglyConnectedComponents:Ln}].forEach((function(e){H(Vn,e)}));var Fn=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};Fn.prototype={fulfill:function(e){return Hn(this,1,"fulfillValue",e)},reject:function(e){return Hn(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new Fn;return n.onFulfilled.push(Yn(e,r,"fulfill")),n.onRejected.push(Yn(t,r,"reject")),Gn(n),r.proxy}};var Hn=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Gn(e)),e},Gn=function(e){1===e.state?qn(e,"onFulfilled",e.fulfillValue):2===e.state&&qn(e,"onRejected",e.rejectReason)},qn=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var a=function(){for(var e=0;e<r.length;e++)r[e](n)};"function"==typeof setImmediate?setImmediate(a):setTimeout(a,0)}},Yn=function(e,t,n){return function(r){if("function"!=typeof e)t[n].call(t,r);else{var a;try{a=e(r)}catch(o){return void t.reject(o)}Un(t,a)}}},Un=function e(t,n){if(t!==n&&t.proxy!==n){var r;if("object"===u(n)&&null!==n||"function"==typeof n)try{r=n.then}catch(o){return void t.reject(o)}if("function"!=typeof r)t.fulfill(n);else{var a=!1;try{r.call(n,(function(r){a||(a=!0,r===n?t.reject(new TypeError("circular thenable chain")):e(t,r))}),(function(e){a||(a=!0,t.reject(e))}))}catch(o){a||t.reject(o)}}}else t.reject(new TypeError("cannot resolve promise with itself"))};Fn.all=function(e){return new Fn((function(t,n){for(var r=new Array(e.length),a=0,o=function(n,o){r[n]=o,++a===e.length&&t(r)},i=0;i<e.length;i++)!function(t){var r=e[t];null!=r&&null!=r.then?r.then((function(e){o(t,e)}),(function(e){n(e)})):o(t,r)}(i)}))},Fn.resolve=function(e){return new Fn((function(t,n){t(e)}))},Fn.reject=function(e){return new Fn((function(t,n){n(e)}))};var Wn="undefined"!=typeof Promise?Promise:Fn,$n=function(e,t,n){var r=j(e),a=!r,o=this._private=H({duration:1e3},t,n);if(o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&_(o.complete)&&o.completes.push(o.complete),a){var i=e.position();o.startPosition=o.startPosition||{x:i.x,y:i.y},o.startStyle=o.startStyle||e.cy().style().getAnimationStartStyle(e,o.style)}if(r){var s=e.pan();o.startPan={x:s.x,y:s.y},o.startZoom=e.zoom()}this.length=1,this[0]=this},Xn=$n.prototype;H(Xn,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var t=e.target._private.animation;(e.queue?t.queue:t.current).push(this),P(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,n=t.playing;return void 0===e?t.progress:(n&&this.pause(),t.progress=e,t.started=!1,n&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(t,n){var r=e[t];null!=r&&(e[t]=e[n],e[n]=r)};if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var r=0;r<e.style.length;r++){var a=e.style[r],o=a.name,i=e.startStyle[o];e.startStyle[o]=a,e.style[r]=i}return t&&this.play(),this},promise:function(e){var t,n=this._private;if("frame"===e)t=n.frames;else t=n.completes;return new Wn((function(e,n){t.push((function(){e()}))}))}}),Xn.complete=Xn.completed,Xn.run=Xn.play,Xn.running=Xn.playing;var Kn={animated:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return!1;var n=t[0];return n?n._private.animation.current.length>0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n<t.length;n++){t[n]._private.animation.queue=[]}return this}},delay:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this}},delayAnimation:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this}},animation:function(){return function(e,t){var n=this,r=void 0!==n.length,a=r?n:[n],o=this._private.cy||this,i=!r,s=!i;if(!o.styleEnabled())return this;var l=o.style();if(e=H({},e,t),0===Object.keys(e).length)return new $n(a[0],e);switch(void 0===e.duration&&(e.duration=400),e.duration){case"slow":e.duration=600;break;case"fast":e.duration=200}if(s&&(e.style=l.getPropsList(e.style||e.css),e.css=void 0),s&&null!=e.renderedPosition){var u=e.renderedPosition,c=o.pan(),d=o.zoom();e.position=Xe(u,d,c)}if(i&&null!=e.panBy){var f=e.panBy,h=o.pan();e.pan={x:h.x+f.x,y:h.y+f.y}}var p=e.center||e.centre;if(i&&null!=p){var v=o.getCenterPan(p.eles,e.zoom);null!=v&&(e.pan=v)}if(i&&null!=e.fit){var g=e.fit,m=o.getFitViewport(g.eles||g.boundingBox,g.padding);null!=m&&(e.pan=m.pan,e.zoom=m.zoom)}if(i&&C(e.zoom)){var y=o.getZoomedViewport(e.zoom);null!=y?(y.zoomed&&(e.zoom=y.zoom),y.panned&&(e.pan=y.pan)):e.zoom=null}return new $n(a[0],e)}},animate:function(){return function(e,t){var n=this,r=void 0!==n.length?n:[n];if(!(this._private.cy||this).styleEnabled())return this;t&&(e=H({},e,t));for(var a=0;a<r.length;a++){var o=r[a],i=o.animated()&&(void 0===e.queue||e.queue);o.animation(e,i?{queue:!0}:void 0).play()}return this}},stop:function(){return function(e,t){var n=this,r=void 0!==n.length?n:[n],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var o=0;o<r.length;o++){for(var i=r[o]._private,s=i.animation.current,l=0;l<s.length;l++){var u=s[l]._private;t&&(u.duration=0)}e&&(i.animation.queue=[]),t||(i.animation.current=[])}return a.notify("draw"),this}}},Zn={data:function(e){return e=H({},{field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:function(e){},beforeSet:function(e,t){},onSet:function(e){},canSet:function(e){return!0}},e),function(t,n){var r=e,a=this,o=void 0!==a.length,u=o?a:[a],c=o?a[0]:a;if(E(t)){var d,f=-1!==t.indexOf(".")&&l(t);if(r.allowGetting&&void 0===n)return c&&(r.beforeGet(c),d=f&&void 0===c._private[r.field][t]?i(c._private[r.field],f):c._private[r.field][t]),d;if(r.allowSetting&&void 0!==n&&!r.immutableKeys[t]){var p=h({},t,n);r.beforeSet(a,p);for(var v=0,g=u.length;v<g;v++){var m=u[v];r.canSet(m)&&(f&&void 0===c._private[r.field][t]?s(m._private[r.field],f,n):m._private[r.field][t]=n)}r.updateStyle&&a.updateStyle(),r.onSet(a),r.settingTriggersEvent&&a[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&C(t)){var y,b,w=t,x=Object.keys(w);r.beforeSet(a,w);for(var k=0;k<x.length;k++){if(b=w[y=x[k]],!r.immutableKeys[y])for(var S=0;S<u.length;S++){var R=u[S];r.canSet(R)&&(R._private[r.field][y]=b)}}r.updateStyle&&a.updateStyle(),r.onSet(a),r.settingTriggersEvent&&a[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&_(t)){var P=t;a.on(r.bindingEvent,P)}else if(r.allowGetting&&void 0===t){var O;return c&&(r.beforeGet(c),O=c._private[r.field]),O}return a}},removeData:function(e){return e=H({},{field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}},e),function(t){var n=e,r=this,a=void 0!==r.length?r:[r];if(E(t)){for(var o=t.split(/\s+/),i=o.length,s=0;s<i;s++){var l=o[s];if(!T(l))if(!n.immutableKeys[l])for(var u=0,c=a.length;u<c;u++)a[u]._private[n.field][l]=void 0}n.triggerEvent&&r[n.triggerFnName](n.event)}else if(void 0===t){for(var d=0,f=a.length;d<f;d++)for(var h=a[d]._private[n.field],p=Object.keys(h),v=0;v<p.length;v++){var g=p[v];!n.immutableKeys[g]&&(h[g]=void 0)}n.triggerEvent&&r[n.triggerFnName](n.event)}return r}}},Qn={eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.unlisten=t.unbind=t.off=t.removeListener,t.trigger=t.emit,t.pon=t.promiseOn=function(e,t){var n=this,r=Array.prototype.slice.call(arguments,0);return new Wn((function(e,t){var a=r.concat([function(t){n.off.apply(n,o),e(t)}]),o=a.concat([]);n.on.apply(n,a)}))}}},Jn={};[Kn,Zn,Qn].forEach((function(e){H(Jn,e)}));var er={animate:Jn.animate(),animation:Jn.animation(),animated:Jn.animated(),clearQueue:Jn.clearQueue(),delay:Jn.delay(),delayAnimation:Jn.delayAnimation(),stop:Jn.stop()},tr={classes:function(e){var t=this;if(void 0===e){var n=[];return t[0]._private.classes.forEach((function(e){return n.push(e)})),n}k(e)||(e=(e||"").match(/\S+/g)||[]);for(var r=[],a=new je(e),o=0;o<t.length;o++){for(var i=t[o],s=i._private,l=s.classes,u=!1,c=0;c<e.length;c++){var d=e[c];if(!l.has(d)){u=!0;break}}u||(u=l.size!==e.length),u&&(s.classes=a,r.push(i))}return r.length>0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){k(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,a=[],o=0,i=n.length;o<i;o++)for(var s=n[o],l=s._private.classes,u=!1,c=0;c<e.length;c++){var d=e[c],f=l.has(d),h=!1;t||r&&!f?(l.add(d),h=!0):(!t||r&&f)&&(l.delete(d),h=!0),!u&&h&&(a.push(s),u=!0)}return a.length>0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};tr.className=tr.classNames=tr.classes;var nr={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:V,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};nr.variable="(?:[\\w-.]|(?:\\\\"+nr.metaChar+"))+",nr.value=nr.string+"|"+nr.number,nr.className=nr.variable,nr.id=nr.variable,function(){var e,t,n;for(e=nr.comparatorOp.split("|"),n=0;n<e.length;n++)t=e[n],nr.comparatorOp+="|@"+t;for(e=nr.comparatorOp.split("|"),n=0;n<e.length;n++)(t=e[n]).indexOf("!")>=0||"="!==t&&(nr.comparatorOp+="|\\!"+t)}();var rr=0,ar=1,or=2,ir=3,sr=4,lr=5,ur=6,cr=7,dr=8,fr=9,hr=10,pr=11,vr=12,gr=13,mr=14,yr=15,br=16,wr=17,xr=18,Er=19,_r=20,kr=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*F(e,t)}(e.selector,t.selector)})),Cr=function(){for(var e,t={},n=0;n<kr.length;n++)t[(e=kr[n]).selector]=e.matches;return t}(),Sr="("+kr.map((function(e){return e.selector})).join("|")+")",Rr=function(e){return e.replace(new RegExp("\\\\("+nr.metaChar+")","g"),(function(e,t){return t}))},Pr=function(e,t,n){e[e.length-1]=n},Or=[{name:"group",query:!0,regex:"("+nr.group+")",populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:rr,value:"*"===r?r:r+"s"})}},{name:"state",query:!0,regex:Sr,populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:cr,value:r})}},{name:"id",query:!0,regex:"\\#("+nr.id+")",populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:dr,value:Rr(r)})}},{name:"className",query:!0,regex:"\\.("+nr.className+")",populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:fr,value:Rr(r)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+nr.variable+")\\s*\\]",populate:function(e,t,n){var r=p(n,1)[0];t.checks.push({type:sr,field:Rr(r)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+nr.variable+")\\s*("+nr.comparatorOp+")\\s*("+nr.value+")\\s*\\]",populate:function(e,t,n){var r=p(n,3),a=r[0],o=r[1],i=r[2];i=null!=new RegExp("^"+nr.string+"$").exec(i)?i.substring(1,i.length-1):parseFloat(i),t.checks.push({type:ir,field:Rr(a),operator:o,value:i})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+nr.boolOp+")\\s*("+nr.variable+")\\s*\\]",populate:function(e,t,n){var r=p(n,2),a=r[0],o=r[1];t.checks.push({type:lr,field:Rr(o),operator:a})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+nr.meta+")\\s*("+nr.comparatorOp+")\\s*("+nr.number+")\\s*\\]\\]",populate:function(e,t,n){var r=p(n,3),a=r[0],o=r[1],i=r[2];t.checks.push({type:ur,field:Rr(a),operator:o,value:parseFloat(i)})}},{name:"nextQuery",separator:!0,regex:nr.separator,populate:function(e,t){var n=e.currentSubject,r=e.edgeCount,a=e.compoundCount,o=e[e.length-1];return null!=n&&(o.subject=n,e.currentSubject=null),o.edgeCount=r,o.compoundCount=a,e.edgeCount=0,e.compoundCount=0,e[e.length++]={checks:[]}}},{name:"directedEdge",separator:!0,regex:nr.directedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,a={checks:[]};return n.checks.push({type:pr,source:r,target:a}),Pr(e,0,n),e.edgeCount++,a}var o={checks:[]},i=t,s={checks:[]};return o.checks.push({type:vr,source:i,target:s}),Pr(e,0,o),e.edgeCount++,s}},{name:"undirectedEdge",separator:!0,regex:nr.undirectedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,a={checks:[]};return n.checks.push({type:hr,nodes:[r,a]}),Pr(e,0,n),e.edgeCount++,a}var o={checks:[]},i=t,s={checks:[]};return o.checks.push({type:mr,node:i,neighbor:s}),Pr(e,0,o),s}},{name:"child",separator:!0,regex:nr.child,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},a=e[e.length-1];return n.checks.push({type:yr,parent:a,child:r}),Pr(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var o={checks:[]},i=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return o.checks.push({type:Er,left:i,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:_r}],c.checks.push({type:_r}),s.checks.push({type:wr,parent:c,child:u}),Pr(e,0,o),e.currentSubject=l,e.compoundCount++,u}var d={checks:[]},f={checks:[]},h=[{type:wr,parent:d,child:f}];return d.checks=t.checks,t.checks=h,e.compoundCount++,f}},{name:"descendant",separator:!0,regex:nr.descendant,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},a=e[e.length-1];return n.checks.push({type:br,ancestor:a,descendant:r}),Pr(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var o={checks:[]},i=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return o.checks.push({type:Er,left:i,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:_r}],c.checks.push({type:_r}),s.checks.push({type:xr,ancestor:c,descendant:u}),Pr(e,0,o),e.currentSubject=l,e.compoundCount++,u}var d={checks:[]},f={checks:[]},h=[{type:xr,ancestor:d,descendant:f}];return d.checks=t.checks,t.checks=h,e.compoundCount++,f}},{name:"subject",modifier:!0,regex:nr.subject,populate:function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return be("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t;var n=e[e.length-1].checks[0],r=null==n?null:n.type;r===pr?n.type=gr:r===hr&&(n.type=mr,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}];Or.forEach((function(e){return e.regexObj=new RegExp("^"+e.regex)}));var Mr=function(e){for(var t,n,r,a=0;a<Or.length;a++){var o=Or[a],i=o.name,s=e.match(o.regexObj);if(null!=s){n=s,t=o,r=i;var l=s[0];e=e.substring(l.length);break}}return{expr:t,match:n,name:r,remaining:e}},jr={parse:function(e){var t=this,n=t.inputText=e,r=t[0]={checks:[]};for(t.length=1,n=function(e){var t=e.match(/^\s+/);if(t){var n=t[0];e=e.substring(n.length)}return e}(n);;){var a=Mr(n);if(null==a.expr)return be("The selector `"+e+"`is invalid"),!1;var o=a.match.slice(1),i=a.expr.populate(t,r,o);if(!1===i)return!1;if(null!=i&&(r=i),(n=a.remaining).match(/^\s*$/))break}var s=t[t.length-1];null!=t.currentSubject&&(s.subject=t.currentSubject),s.edgeCount=t.edgeCount,s.compoundCount=t.compoundCount;for(var l=0;l<t.length;l++){var u=t[l];if(u.compoundCount>0&&u.edgeCount>0)return be("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return be("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&be("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return E(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,o){var i=r.type,s=r.value;switch(i){case rr:var l=e(s);return l.substring(0,l.length-1);case ir:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case lr:var d=r.operator,f=r.field;return"["+e(d)+f+"]";case sr:return"["+r.field+"]";case ur:var h=r.operator;return"[["+r.field+n(e(h))+t(s)+"]]";case cr:return s;case dr:return"#"+s;case fr:return"."+s;case wr:case yr:return a(r.parent,o)+n(">")+a(r.child,o);case xr:case br:return a(r.ancestor,o)+" "+a(r.descendant,o);case Er:var p=a(r.left,o),v=a(r.subject,o),g=a(r.right,o);return p+(p.length>0?" ":"")+v+g;case _r:return""}},a=function(e,t){return e.checks.reduce((function(n,a,o){return n+(t===e&&0===o?"$":"")+r(a,t)}),"")},o="",i=0;i<this.length;i++){var s=this[i];o+=a(s,s.subject),this.length>1&&i<this.length-1&&(o+=", ")}return this.toStringCache=o,o}},zr=function(e,t,n){var r,a,o,i=E(e),s=S(e),l=E(n),u=!1,c=!1,d=!1;switch(t.indexOf("!")>=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(i||l||u)&&(a=i||s?""+e:"",o=""+n),u&&(e=a=a.toLowerCase(),n=o=o.toLowerCase()),t){case"*=":r=a.indexOf(o)>=0;break;case"$=":r=a.indexOf(o,a.length-o.length)>=0;break;case"^=":r=0===a.indexOf(o);break;case"=":r=e===n;break;case">":d=!0,r=e>n;break;case">=":d=!0,r=e>=n;break;case"<":d=!0,r=e<n;break;case"<=":d=!0,r=e<=n;break;default:r=!1}return!c||null==e&&d||(r=!r),r},Tr=function(e,t){return e.data(t)},Dr=[],Ar=function(e,t){return e.checks.every((function(e){return Dr[e.type](e,t)}))};Dr[rr]=function(e,t){var n=e.value;return"*"===n||n===t.group()},Dr[cr]=function(e,t){return function(e,t){return Cr[e](t)}(e.value,t)},Dr[dr]=function(e,t){var n=e.value;return t.id()===n},Dr[fr]=function(e,t){var n=e.value;return t.hasClass(n)},Dr[ur]=function(e,t){var n=e.field,r=e.operator,a=e.value;return zr(function(e,t){return e[t]()}(t,n),r,a)},Dr[ir]=function(e,t){var n=e.field,r=e.operator,a=e.value;return zr(Tr(t,n),r,a)},Dr[lr]=function(e,t){var n=e.field,r=e.operator;return function(e,t){switch(t){case"?":return!!e;case"!":return!e;case"^":return void 0===e}}(Tr(t,n),r)},Dr[sr]=function(e,t){var n=e.field;e.operator;return void 0!==Tr(t,n)},Dr[hr]=function(e,t){var n=e.nodes[0],r=e.nodes[1],a=t.source(),o=t.target();return Ar(n,a)&&Ar(r,o)||Ar(r,a)&&Ar(n,o)},Dr[mr]=function(e,t){return Ar(e.node,t)&&t.neighborhood().some((function(t){return t.isNode()&&Ar(e.neighbor,t)}))},Dr[pr]=function(e,t){return Ar(e.source,t.source())&&Ar(e.target,t.target())},Dr[vr]=function(e,t){return Ar(e.source,t)&&t.outgoers().some((function(t){return t.isNode()&&Ar(e.target,t)}))},Dr[gr]=function(e,t){return Ar(e.target,t)&&t.incomers().some((function(t){return t.isNode()&&Ar(e.source,t)}))},Dr[yr]=function(e,t){return Ar(e.child,t)&&Ar(e.parent,t.parent())},Dr[wr]=function(e,t){return Ar(e.parent,t)&&t.children().some((function(t){return Ar(e.child,t)}))},Dr[br]=function(e,t){return Ar(e.descendant,t)&&t.ancestors().some((function(t){return Ar(e.ancestor,t)}))},Dr[xr]=function(e,t){return Ar(e.ancestor,t)&&t.descendants().some((function(t){return Ar(e.descendant,t)}))},Dr[Er]=function(e,t){return Ar(e.subject,t)&&Ar(e.left,t)&&Ar(e.right,t)},Dr[_r]=function(){return!0},Dr[ar]=function(e,t){return e.value.has(t)},Dr[or]=function(e,t){return(0,e.value)(t)};var Br={matches:function(e){for(var t=0;t<this.length;t++){var n=this[t];if(Ar(n,e))return!0}return!1},filter:function(e){var t=this;if(1===t.length&&1===t[0].checks.length&&t[0].checks[0].type===dr)return e.getElementById(t[0].checks[0].value).collection();var n=function(e){for(var n=0;n<t.length;n++){var r=t[n];if(Ar(r,e))return!0}return!1};return null==t.text()&&(n=function(){return!0}),e.filter(n)}},Nr=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,null==e||E(e)&&e.match(/^\s*$/)||(P(e)?this.addQuery({checks:[{type:ar,value:e.collection()}]}):_(e)?this.addQuery({checks:[{type:or,value:e}]}):E(e)?this.parse(e)||(this.invalid=!0):me("A selector must be created from a string; found "))},Ir=Nr.prototype;[jr,Br].forEach((function(e){return H(Ir,e)})),Ir.text=function(){return this.inputText},Ir.size=function(){return this.length},Ir.eq=function(e){return this[e]},Ir.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},Ir.addQuery=function(e){this[this.length++]=e},Ir.selector=Ir.toString;var Lr={allAre:function(e){var t=new Nr(e);return this.every((function(e){return t.matches(e)}))},is:function(e){var t=new Nr(e);return this.some((function(e){return t.matches(e)}))},some:function(e,t){for(var n=0;n<this.length;n++){if(t?e.apply(t,[this[n],n,this]):e(this[n],n,this))return!0}return!1},every:function(e,t){for(var n=0;n<this.length;n++){if(!(t?e.apply(t,[this[n],n,this]):e(this[n],n,this)))return!1}return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var t=this.length;return t===e.length&&(1===t?this[0]===e[0]:this.every((function(t){return e.hasElementWithId(t.id())})))},anySame:function(e){return e=this.cy().collection(e),this.some((function(t){return e.hasElementWithId(t.id())}))},allAreNeighbors:function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every((function(e){return t.hasElementWithId(e.id())}))},contains:function(e){e=this.cy().collection(e);var t=this;return e.every((function(e){return t.hasElementWithId(e.id())}))}};Lr.allAreNeighbours=Lr.allAreNeighbors,Lr.has=Lr.contains,Lr.equal=Lr.equals=Lr.same;var Vr,Fr,Hr=function(e,t){return function(n,r,a,o){var i,s=n,l=this;if(null==s?i="":P(s)&&1===s.length&&(i=s.id()),1===l.length&&i){var u=l[0]._private,c=u.traversalCache=u.traversalCache||{},d=c[t]=c[t]||[],f=ie(i),h=d[f];return h||(d[f]=e.call(l,n,r,a,o))}return e.call(l,n,r,a,o)}},Gr={parent:function(e){var t=[];if(1===this.length){var n=this[0]._private.parent;if(n)return n}for(var r=0;r<this.length;r++){var a=this[r]._private.parent;a&&t.push(a)}return this.spawn(t,!0).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var a=n[r];t.push(a)}n=n.parent()}return this.spawn(t,!0).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var r=this[n].parents();t=(t=t||r).intersect(r)}return t.filter(e)},orphans:function(e){return this.stdFilter((function(e){return e.isOrphan()})).filter(e)},nonorphans:function(e){return this.stdFilter((function(e){return e.isChild()})).filter(e)},children:Hr((function(e){for(var t=[],n=0;n<this.length;n++)for(var r=this[n]._private.children,a=0;a<r.length;a++)t.push(r[a]);return this.spawn(t,!0).filter(e)}),"children"),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&0!==e._private.children.length},isChildless:function(){var e=this[0];if(e)return e.isNode()&&0===e._private.children.length},isChild:function(){var e=this[0];if(e)return e.isNode()&&null!=e._private.parent},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&null==e._private.parent},descendants:function(e){var t=[];return function e(n){for(var r=0;r<n.length;r++){var a=n[r];t.push(a),a.children().nonempty()&&e(a.children())}}(this.children()),this.spawn(t,!0).filter(e)}};function qr(e,t,n,r){for(var a=[],o=new je,i=e.cy().hasCompoundNodes(),s=0;s<e.length;s++){var l=e[s];n?a.push(l):i&&r(a,o,l)}for(;a.length>0;){var u=a.shift();t(u),o.add(u.id()),i&&r(a,o,u)}return e}function Yr(e,t,n){if(n.isParent())for(var r=n._private.children,a=0;a<r.length;a++){var o=r[a];t.has(o.id())||e.push(o)}}function Ur(e,t,n){if(n.isChild()){var r=n._private.parent;t.has(r.id())||e.push(r)}}function Wr(e,t,n){Ur(e,t,n),Yr(e,t,n)}Gr.forEachDown=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return qr(this,e,t,Yr)},Gr.forEachUp=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return qr(this,e,t,Ur)},Gr.forEachUpAndDown=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return qr(this,e,t,Wr)},Gr.ancestors=Gr.parents,(Vr=Fr={data:Jn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Jn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Jn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Jn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Jn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Jn.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Vr.data,Vr.removeAttr=Vr.removeData;var $r,Xr,Kr=Fr,Zr={};function Qr(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,a=n[0],o=a._private.edges,i=0;i<o.length;i++){var s=o[i];!t&&s.isLoop()||(r+=e(a,s))}return r}}}function Jr(e,t){return function(n){for(var r,a=this.nodes(),o=0;o<a.length;o++){var i=a[o][e](n);void 0===i||void 0!==r&&!t(i,r)||(r=i)}return r}}H(Zr,{degree:Qr((function(e,t){return t.source().same(t.target())?2:1})),indegree:Qr((function(e,t){return t.target().same(e)?1:0})),outdegree:Qr((function(e,t){return t.source().same(e)?1:0}))}),H(Zr,{minDegree:Jr("degree",(function(e,t){return e<t})),maxDegree:Jr("degree",(function(e,t){return e>t})),minIndegree:Jr("indegree",(function(e,t){return e<t})),maxIndegree:Jr("indegree",(function(e,t){return e>t})),minOutdegree:Jr("outdegree",(function(e,t){return e<t})),maxOutdegree:Jr("outdegree",(function(e,t){return e>t}))}),H(Zr,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r<n.length;r++)t+=n[r].degree(e);return t}});var ea=function(e,t,n){for(var r=0;r<e.length;r++){var a=e[r];if(!a.locked()){var o=a._private.position,i={x:null!=t.x?t.x-o.x:0,y:null!=t.y?t.y-o.y:0};!a.isParent()||0===i.x&&0===i.y||a.children().shift(i,n),a.dirtyBoundingBoxCache()}}},ta={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,t){ea(e,t,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}};$r=Xr={position:Jn.data(ta),silentPosition:Jn.data(H({},ta,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,t){ea(e,t,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,t){if(C(e))t?this.silentPosition(e):this.position(e);else if(_(e)){var n=e,r=this.cy();r.startBatch();for(var a=0;a<this.length;a++){var o,i=this[a];(o=n(i,a))&&(t?i.silentPosition(o):i.position(o))}r.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,t,n){var r;if(C(e)?(r={x:S(e.x)?e.x:0,y:S(e.y)?e.y:0},n=t):E(e)&&S(t)&&((r={x:0,y:0})[e]=t),null!=r){var a=this.cy();a.startBatch();for(var o=0;o<this.length;o++){var i=this[o];if(!(a.hasCompoundNodes()&&i.isChild()&&i.ancestors().anySame(this))){var s=i.position(),l={x:s.x+r.x,y:s.y+r.y};n?i.silentPosition(l):i.position(l)}}a.endBatch()}return this},silentShift:function(e,t){return C(e)?this.shift(e,!0):E(e)&&S(t)&&this.shift(e,t,!0),this},renderedPosition:function(e,t){var n=this[0],r=this.cy(),a=r.zoom(),o=r.pan(),i=C(e)?e:void 0,s=void 0!==i||void 0!==t&&E(e);if(n&&n.isNode()){if(!s){var l=n.position();return i=$e(l,a,o),void 0===e?i:i[e]}for(var u=0;u<this.length;u++){var c=this[u];void 0!==t?c.position(e,(t-o[e])/a):void 0!==i&&c.position(Xe(i,a,o))}}else if(!s)return;return this},relativePosition:function(e,t){var n=this[0],r=this.cy(),a=C(e)?e:void 0,o=void 0!==a||void 0!==t&&E(e),i=r.hasCompoundNodes();if(n&&n.isNode()){if(!o){var s=n.position(),l=i?n.parent():null,u=l&&l.length>0,c=u;u&&(l=l[0]);var d=c?l.position():{x:0,y:0};return a={x:s.x-d.x,y:s.y-d.y},void 0===e?a:a[e]}for(var f=0;f<this.length;f++){var h=this[f],p=i?h.parent():null,v=p&&p.length>0,g=v;v&&(p=p[0]);var m=g?p.position():{x:0,y:0};void 0!==t?h.position(e,t+m[e]):void 0!==a&&h.position({x:a.x+m.x,y:a.y+m.y})}}else if(!o)return;return this}},$r.modelPosition=$r.point=$r.position,$r.modelPositions=$r.points=$r.positions,$r.renderedPoint=$r.renderedPosition,$r.relativePoint=$r.relativePosition;var na,ra,aa=Xr;na=ra={},ra.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),a=n.pan(),o=t.x1*r+a.x,i=t.x2*r+a.x,s=t.y1*r+a.y,l=t.y2*r+a.y;return{x1:o,x2:i,y1:s,y2:l,w:i-o,h:l-s}},ra.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},ra.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,a={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},o=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),i=t.position;0!==o.w&&0!==o.h||((o={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=i.x-o.w/2,o.x2=i.x+o.w/2,o.y1=i.y-o.h/2,o.y2=i.y+o.h/2);var s=a.width.left.value;"px"===a.width.left.units&&a.width.val>0&&(s=100*s/a.width.val);var l=a.width.right.value;"px"===a.width.right.units&&a.width.val>0&&(l=100*l/a.width.val);var u=a.height.top.value;"px"===a.height.top.units&&a.height.val>0&&(u=100*u/a.height.val);var c=a.height.bottom.value;"px"===a.height.bottom.units&&a.height.val>0&&(c=100*c/a.height.val);var d=m(a.width.val-o.w,s,l),f=d.biasDiff,h=d.biasComplementDiff,p=m(a.height.val-o.h,u,c),v=p.biasDiff,g=p.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(o.w,o.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(o.w,a.width.val),i.x=(-f+o.x1+o.x2+h)/2,t.autoHeight=Math.max(o.h,a.height.val),i.y=(-v+o.y1+o.y2+g)/2}function m(e,t,n){var r=0,a=0,o=t+n;return e>0&&o>0&&(r=t/o*e,a=n/o*e),{biasDiff:r,biasComplementDiff:a}}}for(var r=0;r<this.length;r++){var a=this[r],o=a._private;o.compoundBoundsClean&&!e||(n(a),t.batching()||(o.compoundBoundsClean=!0))}return this};var oa=function(e){return e===1/0||e===-1/0?0:e},ia=function(e,t,n,r,a){r-t!=0&&a-n!=0&&null!=t&&null!=n&&null!=r&&null!=a&&(e.x1=t<e.x1?t:e.x1,e.x2=r>e.x2?r:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=a>e.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},sa=function(e,t){return null==t?e:ia(e,t.x1,t.y1,t.x2,t.y2)},la=function(e,t,n){return Re(e,t,n)},ua=function(e,t,n){if(!t.cy().headless()){var r,a,o=t._private,i=o.rstyle,s=i.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=i.srcX,a=i.srcY):"target"===n?(r=i.tgtX,a=i.tgtY):(r=i.midX,a=i.midY);var l=o.arrowBounds=o.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=a-s,u.x2=r+s,u.y2=a+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,lt(u,1),ia(e,u.x1,u.y1,u.x2,u.y2)}}},ca=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var a=t._private,o=a.rstyle;if(t.pstyle(r+"label").strValue){var i,s,l,u,c=t.pstyle("text-halign"),d=t.pstyle("text-valign"),f=la(o,"labelWidth",n),h=la(o,"labelHeight",n),p=la(o,"labelX",n),v=la(o,"labelY",n),g=t.pstyle(r+"text-margin-x").pfValue,m=t.pstyle(r+"text-margin-y").pfValue,y=t.isEdge(),b=t.pstyle(r+"text-rotation"),w=t.pstyle("text-outline-width").pfValue,x=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,_=h,k=f,C=k/2,S=_/2;if(y)i=p-C,s=p+C,l=v-S,u=v+S;else{switch(c.value){case"left":i=p-k,s=p;break;case"center":i=p-C,s=p+C;break;case"right":i=p,s=p+k}switch(d.value){case"top":l=v-_,u=v;break;case"center":l=v-S,u=v+S;break;case"bottom":l=v,u=v+_}}i+=g-Math.max(w,x)-E-2,s+=g+Math.max(w,x)+E+2,l+=m-Math.max(w,x)-E-2,u+=m+Math.max(w,x)+E+2;var R=n||"main",P=a.labelBounds,O=P[R]=P[R]||{};O.x1=i,O.y1=l,O.x2=s,O.y2=u,O.w=s-i,O.h=u-l;var M=y&&"autorotate"===b.strValue,j=null!=b.pfValue&&0!==b.pfValue;if(M||j){var z=M?la(a.rstyle,"labelAngle",n):b.pfValue,T=Math.cos(z),D=Math.sin(z),A=(i+s)/2,B=(l+u)/2;if(!y){switch(c.value){case"left":A=s;break;case"right":A=i}switch(d.value){case"top":B=u;break;case"bottom":B=l}}var N=function(e,t){return{x:(e-=A)*T-(t-=B)*D+A,y:e*D+t*T+B}},I=N(i,l),L=N(i,u),V=N(s,l),F=N(s,u);i=Math.min(I.x,L.x,V.x,F.x),s=Math.max(I.x,L.x,V.x,F.x),l=Math.min(I.y,L.y,V.y,F.y),u=Math.max(I.y,L.y,V.y,F.y)}var H=R+"Rot",G=P[H]=P[H]||{};G.x1=i,G.y1=l,G.x2=s,G.y2=u,G.w=s-i,G.h=u-l,ia(e,i,l,s,u),ia(a.labelBounds.all,i,l,s,u)}return e}},da=function(e){var t=0,n=function(e){return(e?1:0)<<t++},r=0;return r+=n(e.incudeNodes),r+=n(e.includeEdges),r+=n(e.includeLabels),r+=n(e.includeMainLabels),r+=n(e.includeSourceLabels),r+=n(e.includeTargetLabels),r+=n(e.includeOverlays)},fa=function(e){if(e.isEdge()){var t=e.source().position(),n=e.target().position(),r=function(e){return Math.round(e)};return function(e,t){var n={value:0,done:!1},r=0,a=e.length;return te({next:function(){return r<a?n.value=e[r++]:n.done=!0,n}},t)}([r(t.x),r(t.y),r(n.x),r(n.y)])}return 0},ha=function(e,t){var n,r=e._private,a=e.isEdge(),o=(null==t?va:da(t))===va,i=fa(e),s=r.bbCachePosKey===i,l=t.useCache&&s,u=function(e){return null==e._private.bbCache||e._private.styleDirty};if(!l||u(e)||a&&u(e.source())||u(e.target())?(s||e.recalculateRenderedStyle(l),n=function(e,t){var n,r,a,o,i,s,l,u=e._private.cy,c=u.styleEnabled(),d=u.headless(),f=it(),h=e._private,p=e.isNode(),v=e.isEdge(),g=h.rstyle,m=p&&c?e.pstyle("bounds-expansion").pfValue:[0],y=function(e){return"none"!==e.pstyle("display").value},b=!c||y(e)&&(!v||y(e.source())&&y(e.target()));if(b){var w=0;c&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(w=e.pstyle("overlay-padding").value);var x=0;if(c&&(x=e.pstyle("width").pfValue/2),p&&t.includeNodes){var E=e.position();i=E.x,s=E.y;var _=e.outerWidth()/2,k=e.outerHeight()/2;ia(f,n=i-_,a=s-k,r=i+_,o=s+k)}else if(v&&t.includeEdges)if(c&&!d){var C=e.pstyle("curve-style").strValue;if(n=Math.min(g.srcX,g.midX,g.tgtX),r=Math.max(g.srcX,g.midX,g.tgtX),a=Math.min(g.srcY,g.midY,g.tgtY),o=Math.max(g.srcY,g.midY,g.tgtY),ia(f,n-=x,a-=x,r+=x,o+=x),"haystack"===C){var S=g.haystackPts;if(S&&2===S.length){if(n=S[0].x,a=S[0].y,n>(r=S[1].x)){var R=n;n=r,r=R}if(a>(o=S[1].y)){var P=a;a=o,o=P}ia(f,n-x,a-x,r+x,o+x)}}else if("bezier"===C||"unbundled-bezier"===C||"segments"===C||"taxi"===C){var O;switch(C){case"bezier":case"unbundled-bezier":O=g.bezierPts;break;case"segments":case"taxi":O=g.linePts}if(null!=O)for(var M=0;M<O.length;M++){var j=O[M];n=j.x-x,r=j.x+x,a=j.y-x,o=j.y+x,ia(f,n,a,r,o)}}}else{var z=e.source().position(),T=e.target().position();if((n=z.x)>(r=T.x)){var D=n;n=r,r=D}if((a=z.y)>(o=T.y)){var A=a;a=o,o=A}ia(f,n-=x,a-=x,r+=x,o+=x)}if(c&&t.includeEdges&&v&&(ua(f,e,"mid-source"),ua(f,e,"mid-target"),ua(f,e,"source"),ua(f,e,"target")),c&&"yes"===e.pstyle("ghost").value){var B=e.pstyle("ghost-offset-x").pfValue,N=e.pstyle("ghost-offset-y").pfValue;ia(f,f.x1+B,f.y1+N,f.x2+B,f.y2+N)}var I=h.bodyBounds=h.bodyBounds||{};ct(I,f),ut(I,m),lt(I,1),c&&(n=f.x1,r=f.x2,a=f.y1,o=f.y2,ia(f,n-w,a-w,r+w,o+w));var L=h.overlayBounds=h.overlayBounds||{};ct(L,f),ut(L,m),lt(L,1);var V=h.labelBounds=h.labelBounds||{};null!=V.all?((l=V.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):V.all=it(),c&&t.includeLabels&&(t.includeMainLabels&&ca(f,e,null),v&&(t.includeSourceLabels&&ca(f,e,"source"),t.includeTargetLabels&&ca(f,e,"target")))}return f.x1=oa(f.x1),f.y1=oa(f.y1),f.x2=oa(f.x2),f.y2=oa(f.y2),f.w=oa(f.x2-f.x1),f.h=oa(f.y2-f.y1),f.w>0&&f.h>0&&b&&(ut(f,m),lt(f,1)),f}(e,pa),r.bbCache=n,r.bbCachePosKey=i):n=r.bbCache,!o){var c=e.isNode();n=it(),(t.includeNodes&&c||t.includeEdges&&!c)&&(t.includeOverlays?sa(n,r.overlayBounds):sa(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!a||t.includeSourceLabels&&t.includeTargetLabels)?sa(n,r.labelBounds.all):(t.includeMainLabels&&sa(n,r.labelBounds.mainRot),t.includeSourceLabels&&sa(n,r.labelBounds.sourceRot),t.includeTargetLabels&&sa(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},pa={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,useCache:!0},va=da(pa),ga=ke(pa);ra.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=it();var n=ga(e=e||pa),r=this;if(r.cy().styleEnabled())for(var a=0;a<r.length;a++){var o=r[a],i=o._private,s=fa(o),l=i.bbCachePosKey===s,u=n.useCache&&l&&!i.styleDirty;o.recalculateRenderedStyle(u)}this.updateCompoundBounds(!e.useCache);for(var c=0;c<r.length;c++){var d=r[c];sa(t,ha(d,n))}}else e=void 0===e?pa:ga(e),t=ha(this[0],e);return t.x1=oa(t.x1),t.y1=oa(t.y1),t.x2=oa(t.x2),t.y2=oa(t.y2),t.w=oa(t.x2-t.x1),t.h=oa(t.y2-t.y1),t},ra.dirtyBoundingBoxCache=function(){for(var e=0;e<this.length;e++){var t=this[e]._private;t.bbCache=null,t.bbCachePosKey=null,t.bodyBounds=null,t.overlayBounds=null,t.labelBounds.all=null,t.labelBounds.source=null,t.labelBounds.target=null,t.labelBounds.main=null,t.labelBounds.sourceRot=null,t.labelBounds.targetRot=null,t.labelBounds.mainRot=null,t.arrowBounds.source=null,t.arrowBounds.target=null,t.arrowBounds["mid-source"]=null,t.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},ra.boundingBoxAt=function(e){var t=this.nodes(),n=this.cy(),r=n.hasCompoundNodes(),a=n.collection();if(r&&(a=t.filter((function(e){return e.isParent()})),t=t.not(a)),C(e)){var o=e;e=function(){return o}}n.startBatch(),t.forEach((function(t,n){return t._private.bbAtOldPos=e(t,n)})).silentPositions(e),r&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0));var i=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}}(this.boundingBox({useCache:!1}));return t.silentPositions((function(e){return e._private.bbAtOldPos})),r&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),n.endBatch(),i},na.boundingbox=na.bb=na.boundingBox,na.renderedBoundingbox=na.renderedBoundingBox;var ma,ya,ba=ra;ma=ya={};var wa=function(e){e.uppercaseName=L(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=L(e.outerName),ma[e.name]=function(){var t=this[0],n=t._private,r=n.cy._private.styleEnabled;if(t){if(r){if(t.isParent())return t.updateCompoundBounds(),n[e.autoName]||0;var a=t.pstyle(e.name);return"label"===a.strValue?(t.recalculateRenderedStyle(),n.rstyle[e.labelName]||0):a.pfValue}return 1}},ma["outer"+e.uppercaseName]=function(){var t=this[0],n=t._private.cy._private.styleEnabled;if(t)return n?t[e.name]()+t.pstyle("border-width").pfValue+2*t.padding():1},ma["rendered"+e.uppercaseName]=function(){var t=this[0];if(t)return t[e.name]()*this.cy().zoom()},ma["rendered"+e.uppercaseOuterName]=function(){var t=this[0];if(t)return t[e.outerName]()*this.cy().zoom()}};wa({name:"width"}),wa({name:"height"}),ya.padding=function(){var e=this[0],t=e._private;return e.isParent()?(e.updateCompoundBounds(),void 0!==t.autoPadding?t.autoPadding:e.pstyle("padding").pfValue):e.pstyle("padding").pfValue},ya.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},ya.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()};var xa=ya,Ea={controlPoints:{get:function(e){return e.renderer().getControlPoints(e)},mult:!0},segmentPoints:{get:function(e){return e.renderer().getSegmentPoints(e)},mult:!0},sourceEndpoint:{get:function(e){return e.renderer().getSourceEndpoint(e)}},targetEndpoint:{get:function(e){return e.renderer().getTargetEndpoint(e)}},midpoint:{get:function(e){return e.renderer().getEdgeMidpoint(e)}}},_a=Object.keys(Ea).reduce((function(e,t){var n=Ea[t],r=function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)}(t);return e[t]=function(){return function(e,t){if(e.isEdge())return t(e)}(this,n.get)},n.mult?e[r]=function(){return function(e,t){if(e.isEdge()){var n=e.cy(),r=n.pan(),a=n.zoom();return t(e).map((function(e){return $e(e,a,r)}))}}(this,n.get)}:e[r]=function(){return function(e,t){if(e.isEdge()){var n=e.cy();return $e(t(e),n.zoom(),n.pan())}}(this,n.get)},e}),{}),ka=H({},aa,ba,xa,_a),Ca=function(e,t){this.recycle(e,t)};function Sa(){return!1}function Ra(){return!0}Ca.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=Sa,null!=e&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Ra:Sa):null!=e&&e.type?t=e:this.type=e,null!=t&&(this.originalEvent=t.originalEvent,this.type=null!=t.type?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),null!=this.cy&&null!=this.position&&null==this.renderedPosition){var n=this.position,r=this.cy.zoom(),a=this.cy.pan();this.renderedPosition={x:n.x*r+a.x,y:n.y*r+a.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=Ra;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Ra;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Ra,this.stopPropagation()},isDefaultPrevented:Sa,isPropagationStopped:Sa,isImmediatePropagationStopped:Sa};var Pa=/^([^.]+)(\.(?:[^.]+))?$/,Oa={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},Ma=Object.keys(Oa),ja={};function za(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ja,t=arguments.length>1?arguments[1]:void 0,n=0;n<Ma.length;n++){var r=Ma[n];this[r]=e[r]||Oa[r]}this.context=t||this.context,this.listeners=[],this.emitting=0}var Ta=za.prototype,Da=function(e,t,n,r,a,o,i){_(r)&&(a=r,r=null),i&&(o=null==o?i:H({},o,i));for(var s=k(n)?n:n.split(/\s+/),l=0;l<s.length;l++){var u=s[l];if(!T(u)){var c=u.match(Pa);if(c)if(!1===t(e,u,c[1],c[2]?c[2]:null,r,a,o))break}}},Aa=function(e,t){return e.addEventFields(e.context,t),new Ca(t.type,t)},Ba=function(e,t,n){if("event"!==x(n))if(C(n))t(e,Aa(e,n));else for(var r=k(n)?n:n.split(/\s+/),a=0;a<r.length;a++){var o=r[a];if(!T(o)){var i=o.match(Pa);if(i){var s=i[1],l=i[2]?i[2]:null;t(e,Aa(e,{type:s,namespace:l,target:e.context}))}}}else t(e,n)};Ta.on=Ta.addListener=function(e,t,n,r,a){return Da(this,(function(e,t,n,r,a,o,i){_(o)&&e.listeners.push({event:t,callback:o,type:n,namespace:r,qualifier:a,conf:i})}),e,t,n,r,a),this},Ta.one=function(e,t,n,r){return this.on(e,t,n,r,{one:!0})},Ta.removeListener=Ta.off=function(e,t,n,r){var a=this;0!==this.emitting&&(this.listeners=this.listeners.slice());for(var o=this.listeners,i=function(i){var s=o[i];Da(a,(function(t,n,r,a,l,u){if((s.type===r||"*"===e)&&(!a&&".*"!==s.namespace||s.namespace===a)&&(!l||t.qualifierCompare(s.qualifier,l))&&(!u||s.callback===u))return o.splice(i,1),!1}),e,t,n,r)},s=o.length-1;s>=0;s--)i(s);return this},Ta.removeAllListeners=function(){return this.removeListener("*")},Ta.emit=Ta.trigger=function(e,t,n){var r=this.listeners,a=r.length;return this.emitting++,k(t)||(t=[t]),Ba(this,(function(e,o){null!=n&&(r=[{event:o.event,type:o.type,namespace:o.namespace,callback:n}],a=r.length);for(var i=function(n){var a=r[n];if(a.type===o.type&&(!a.namespace||a.namespace===o.namespace||".*"===a.namespace)&&e.eventMatches(e.context,a,o)){var i=[o];null!=t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.push(r)}}(i,t),e.beforeEmit(e.context,a,o),a.conf&&a.conf.one&&(e.listeners=e.listeners.filter((function(e){return e!==a})));var s=e.callbackContext(e.context,a,o),l=a.callback.apply(s,i);e.afterEmit(e.context,a,o),!1===l&&(o.stopPropagation(),o.preventDefault())}},s=0;s<a;s++)i(s);e.bubble(e.context)&&!o.isPropagationStopped()&&e.parent(e.context).emit(o,t)}),e),this.emitting--,this};var Na={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&O(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e.cy(),t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e},beforeEmit:function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},Ia=function(e){return E(e)?new Nr(e):e},La={createEmitter:function(){for(var e=0;e<this.length;e++){var t=this[e],n=t._private;n.emitter||(n.emitter=new za(Na,t))}return this},emitter:function(){return this._private.emitter},on:function(e,t,n){for(var r=Ia(t),a=0;a<this.length;a++){this[a].emitter().on(e,r,n)}return this},removeListener:function(e,t,n){for(var r=Ia(t),a=0;a<this.length;a++){this[a].emitter().removeListener(e,r,n)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){this[e].emitter().removeAllListeners()}return this},one:function(e,t,n){for(var r=Ia(t),a=0;a<this.length;a++){this[a].emitter().one(e,r,n)}return this},once:function(e,t,n){for(var r=Ia(t),a=0;a<this.length;a++){this[a].emitter().on(e,r,n,{once:!0,onceCollection:this})}},emit:function(e,t){for(var n=0;n<this.length;n++){this[n].emitter().emit(e,t)}return this},emitAndNotify:function(e,t){if(0!==this.length)return this.cy().notify(e,this),this.emit(e,t),this}};Jn.eventAliasesOn(La);var Va={nodes:function(e){return this.filter((function(e){return e.isNode()})).filter(e)},edges:function(e){return this.filter((function(e){return e.isEdge()})).filter(e)},byGroup:function(){for(var e=this.spawn(),t=this.spawn(),n=0;n<this.length;n++){var r=this[n];r.isNode()?e.push(r):t.push(r)}return{nodes:e,edges:t}},filter:function(e,t){if(void 0===e)return this;if(E(e)||P(e))return new Nr(e).filter(this);if(_(e)){for(var n=this.spawn(),r=this,a=0;a<r.length;a++){var o=r[a];(t?e.apply(t,[o,a,r]):e(o,a,r))&&n.push(o)}return n}return this.spawn()},not:function(e){if(e){E(e)&&(e=this.filter(e));for(var t=this.spawn(),n=0;n<this.length;n++){var r=this[n];e.has(r)||t.push(r)}return t}return this},absoluteComplement:function(){return this.cy().mutableElements().not(this)},intersect:function(e){if(E(e)){var t=e;return this.filter(t)}for(var n=this.spawn(),r=e,a=this.length<e.length,o=a?this:r,i=a?r:this,s=0;s<o.length;s++){var l=o[s];i.has(l)&&n.push(l)}return n},xor:function(e){var t=this._private.cy;E(e)&&(e=t.$(e));var n=this.spawn(),r=e,a=function(e,t){for(var r=0;r<e.length;r++){var a=e[r],o=a._private.data.id;t.hasElementWithId(o)||n.push(a)}};return a(this,r),a(r,this),n},diff:function(e){var t=this._private.cy;E(e)&&(e=t.$(e));var n=this.spawn(),r=this.spawn(),a=this.spawn(),o=e,i=function(e,t,n){for(var r=0;r<e.length;r++){var o=e[r],i=o._private.data.id;t.hasElementWithId(i)?a.merge(o):n.push(o)}};return i(this,o,n),i(o,this,r),{left:n,right:r,both:a}},add:function(e){var t=this._private.cy;if(!e)return this;if(E(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=this.spawnSelf(),a=0;a<e.length;a++){var o=e[a],i=!this.has(o);i&&r.push(o)}return r},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&E(e)){var r=e;e=n.mutableElements().filter(r)}for(var a=t.map,o=0;o<e.length;o++){var i=e[o],s=i._private.data.id;if(!a.has(s)){var l=this.length++;this[l]=i,a.set(s,{ele:i,index:l})}}return this},unmergeAt:function(e){var t=this[e].id(),n=this._private.map;this[e]=void 0,n.delete(t);var r=e===this.length-1;if(this.length>1&&!r){var a=this.length-1,o=this[a],i=o._private.data.id;this[a]=void 0,this[e]=o,n.set(i,{ele:o,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var a=r.index;return this.unmergeAt(a),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&E(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r<e.length;r++)this.unmergeOne(e[r]);return this},unmergeBy:function(e){for(var t=this.length-1;t>=0;t--){e(this[t])&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,a=0;a<r.length;a++){var o=r[a],i=t?e.apply(t,[o,a,r]):e(o,a,r);n.push(i)}return n},reduce:function(e,t){for(var n=t,r=this,a=0;a<r.length;a++)n=e(n,r[a],a,r);return n},max:function(e,t){for(var n,r=-1/0,a=this,o=0;o<a.length;o++){var i=a[o],s=t?e.apply(t,[i,o,a]):e(i,o,a);s>r&&(r=s,n=i)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,a=this,o=0;o<a.length;o++){var i=a[o],s=t?e.apply(t,[i,o,a]):e(i,o,a);s<r&&(r=s,n=i)}return{value:r,ele:n}}},Fa=Va;Fa.u=Fa["|"]=Fa["+"]=Fa.union=Fa.or=Fa.add,Fa["\\"]=Fa["!"]=Fa["-"]=Fa.difference=Fa.relativeComplement=Fa.subtract=Fa.not,Fa.n=Fa["&"]=Fa["."]=Fa.and=Fa.intersection=Fa.intersect,Fa["^"]=Fa["(+)"]=Fa["(-)"]=Fa.symmetricDifference=Fa.symdiff=Fa.xor,Fa.fnFilter=Fa.filterFn=Fa.stdFilter=Fa.filter,Fa.complement=Fa.abscomp=Fa.absoluteComplement;var Ha=function(e,t){var n=e.cy().hasCompoundNodes();function r(e){var t=e.pstyle("z-compound-depth");return"auto"===t.value?n?e.zDepth():0:"bottom"===t.value?-1:"top"===t.value?fe:0}var a=r(e)-r(t);if(0!==a)return a;function o(e){return"auto"===e.pstyle("z-index-compare").value&&e.isNode()?1:0}var i=o(e)-o(t);if(0!==i)return i;var s=e.pstyle("z-index").value-t.pstyle("z-index").value;return 0!==s?s:e.poolIndex()-t.poolIndex()},Ga={forEach:function(e,t){if(_(e))for(var n=this.length,r=0;r<n;r++){var a=this[r];if(!1===(t?e.apply(t,[a,r,this]):e(a,r,this)))break}return this},toArray:function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},slice:function(e,t){var n=[],r=this.length;null==t&&(t=r),null==e&&(e=0),e<0&&(e=r+e),t<0&&(t=r+t);for(var a=e;a>=0&&a<t&&a<r;a++)n.push(this[a]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return 0===this.length},nonempty:function(){return!this.empty()},sort:function(e){if(!_(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(Ha)},zDepth:function(){var e=this[0];if(e){var t=e._private;if("nodes"===t.group){var n=t.data.parent?e.parents().size():0;return e.isParent()?n:fe-1}var r=t.source,a=t.target,o=r.zDepth(),i=a.zDepth();return Math.max(o,i,0)}}};Ga.each=Ga.forEach;var qa;qa="undefined",("undefined"==typeof Symbol?"undefined":u(Symbol))!=qa&&u(Symbol.iterator)!=qa&&(Ga[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},n=0,r=this.length;return h({next:function(){return n<r?t.value=e[n++]:(t.value=void 0,t.done=!0),t}},Symbol.iterator,(function(){return this}))});var Ya=ke({nodeDimensionsIncludeLabels:!1}),Ua={layoutDimensions:function(e){var t;if(e=Ya(e),this.takesUpSpace())if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();t={w:n.w,h:n.h}}else t={w:this.outerWidth(),h:this.outerHeight()};else t={w:0,h:0};return 0!==t.w&&0!==t.h||(t.w=t.h=1),t},layoutPositions:function(e,t,n){var r=this.nodes().filter((function(e){return!e.isParent()})),a=this.cy(),o=t.eles,i=function(e){return e.id()},s=A(n,i);e.emit({type:"layoutstart",layout:e}),e.animations=[];var l=t.spacingFactor&&1!==t.spacingFactor,u=function(){if(!l)return null;for(var e=it(),t=0;t<r.length;t++){var n=r[t],a=s(n,t);st(e,a.x,a.y)}return e}(),c=A((function(e,n){var r=s(e,n);l&&(r=function(e,t,n){var r=t.x1+t.w/2,a=t.y1+t.h/2;return{x:r+(n.x-r)*e,y:a+(n.y-a)*e}}(Math.abs(t.spacingFactor),u,r));return null!=t.transform&&(r=t.transform(e,r)),r}),i);if(t.animate){for(var d=0;d<r.length;d++){var f=r[d],h=c(f,d);if(null==t.animateFilter||t.animateFilter(f,d)){var p=f.animation({position:h,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(p)}else f.position(h)}if(t.fit){var v=a.animation({fit:{boundingBox:o.boundingBoxAt(c),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(v)}else if(void 0!==t.zoom&&void 0!==t.pan){var g=a.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(g)}e.animations.forEach((function(e){return e.play()})),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),Wn.all(e.animations.map((function(e){return e.promise()}))).then((function(){e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e})}))}else r.positions(c),t.fit&&a.fit(t.eles,t.padding),null!=t.zoom&&a.zoom(t.zoom),t.pan&&a.pan(t.pan),e.one("layoutready",t.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",t.stop),e.emit({type:"layoutstop",layout:e});return this},layout:function(e){return this.cy().makeLayout(H({},e,{eles:this}))}};function Wa(e,t,n){var r,a=n._private,o=a.styleCache=a.styleCache||[];return null!=(r=o[e])?r:r=o[e]=t(n)}function $a(e,t){return e=ie(e),function(n){return Wa(e,t,n)}}function Xa(e,t){e=ie(e);var n=function(e){return t.call(e)};return function(){var t=this[0];if(t)return Wa(e,n,t)}}Ua.createLayout=Ua.makeLayout=Ua.layout;var Ka={recalculateRenderedStyle:function(e){var t=this.cy(),n=t.renderer(),r=t.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var e,t=this.cy(),n=function(e){return e._private.styleCache=null};t.hasCompoundNodes()?((e=this.spawnSelf().merge(this.descendants()).merge(this.parents())).merge(e.connectedEdges()),e.forEach(n)):this.forEach((function(e){n(e),e.connectedEdges().forEach(n)}));return this},updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t.batching())return t._private.batchStyleEles.merge(this),this;var n=this;e=!(!e&&void 0!==e),t.hasCompoundNodes()&&(n=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var r=n;return e?r.emitAndNotify("style"):r.emit("style"),n.forEach((function(e){return e._private.styleDirty=!0})),this},cleanStyle:function(){var e=this.cy();if(e.styleEnabled())for(var t=0;t<this.length;t++){var n=this[t];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},parsedStyle:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var a=n._private.style[e];return null!=a?a:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=n.style();if(C(e)){var a=e;r.applyBypass(this,a,false),this.emitAndNotify("style")}else if(E(e)){if(void 0===t){var o=this[0];return o?r.getStylePropertyValue(o,e):void 0}r.applyBypass(this,e,t,false),this.emitAndNotify("style")}else if(void 0===e){var i=this[0];return i?r.getRawStyle(i):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=t.style(),r=this;if(void 0===e)for(var a=0;a<r.length;a++){var o=r[a];n.removeAllBypasses(o,false)}else{e=e.split(/\s+/);for(var i=0;i<r.length;i++){var s=r[i];n.removeBypasses(s,e,false)}}return this.emitAndNotify("style"),this},show:function(){return this.css("display","element"),this},hide:function(){return this.css("display","none"),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var t=e.hasCompoundNodes(),n=this[0];if(n){var r=n._private,a=n.pstyle("opacity").value;if(!t)return a;var o=r.data.parent?n.parents():null;if(o)for(var i=0;i<o.length;i++){a*=o[i].pstyle("opacity").value}return a}},transparent:function(){if(!this.cy().styleEnabled())return!1;var e=this[0],t=e.cy().hasCompoundNodes();return e?t?0===e.effectiveOpacity():0===e.pstyle("opacity").value:void 0},backgrounding:function(){return!!this.cy().styleEnabled()&&!!this[0]._private.backgrounding}};function Za(e,t){var n=e._private.data.parent?e.parents():null;if(n)for(var r=0;r<n.length;r++){if(!t(n[r]))return!1}return!0}function Qa(e){var t=e.ok,n=e.edgeOkViaNode||e.ok,r=e.parentOk||e.ok;return function(){var e=this.cy();if(!e.styleEnabled())return!0;var a=this[0],o=e.hasCompoundNodes();if(a){var i=a._private;if(!t(a))return!1;if(a.isNode())return!o||Za(a,r);var s=i.source,l=i.target;return n(s)&&(!o||Za(s,n))&&(s===l||n(l)&&(!o||Za(l,n)))}}}var Ja=$a("eleTakesUpSpace",(function(e){return"element"===e.pstyle("display").value&&0!==e.width()&&(!e.isNode()||0!==e.height())}));Ka.takesUpSpace=Xa("takesUpSpace",Qa({ok:Ja}));var eo=$a("eleInteractive",(function(e){return"yes"===e.pstyle("events").value&&"visible"===e.pstyle("visibility").value&&Ja(e)})),to=$a("parentInteractive",(function(e){return"visible"===e.pstyle("visibility").value&&Ja(e)}));Ka.interactive=Xa("interactive",Qa({ok:eo,parentOk:to,edgeOkViaNode:Ja})),Ka.noninteractive=function(){var e=this[0];if(e)return!e.interactive()};var no=$a("eleVisible",(function(e){return"visible"===e.pstyle("visibility").value&&0!==e.pstyle("opacity").pfValue&&Ja(e)})),ro=Ja;Ka.visible=Xa("visible",Qa({ok:no,edgeOkViaNode:ro})),Ka.hidden=function(){var e=this[0];if(e)return!e.visible()},Ka.isBundledBezier=Xa("isBundledBezier",(function(){return!!this.cy().styleEnabled()&&(!this.removed()&&"bezier"===this.pstyle("curve-style").value&&this.takesUpSpace())})),Ka.bypass=Ka.css=Ka.style,Ka.renderedCss=Ka.renderedStyle,Ka.removeBypass=Ka.removeCss=Ka.removeStyle,Ka.pstyle=Ka.parsedStyle;var ao={};function oo(e){return function(){var t=arguments,n=[];if(2===t.length){var r=t[0],a=t[1];this.on(e.event,r,a)}else if(1===t.length&&_(t[0])){var o=t[0];this.on(e.event,o)}else if(0===t.length||1===t.length&&k(t[0])){for(var i=1===t.length?t[0]:null,s=0;s<this.length;s++){var l=this[s],u=!e.ableField||l._private[e.ableField],c=l._private[e.field]!=e.value;if(e.overrideAble){var d=e.overrideAble(l);if(void 0!==d&&(u=d,!d))return this}u&&(l._private[e.field]=e.value,c&&n.push(l))}var f=this.spawn(n);f.updateStyle(),f.emit(e.event),i&&f.emit(i)}return this}}function io(e){ao[e.field]=function(){var t=this[0];if(t){if(e.overrideField){var n=e.overrideField(t);if(void 0!==n)return n}return t._private[e.field]}},ao[e.on]=oo({event:e.on,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!0}),ao[e.off]=oo({event:e.off,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!1})}io({field:"locked",overrideField:function(e){return!!e.cy().autolock()||void 0},on:"lock",off:"unlock"}),io({field:"grabbable",overrideField:function(e){return!e.cy().autoungrabify()&&!e.pannable()&&void 0},on:"grabify",off:"ungrabify"}),io({field:"selected",ableField:"selectable",overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:"select",off:"unselect"}),io({field:"selectable",overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:"selectify",off:"unselectify"}),ao.deselect=ao.unselect,ao.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},io({field:"active",on:"activate",off:"unactivate"}),io({field:"pannable",on:"panify",off:"unpanify"}),ao.inactive=function(){var e=this[0];if(e)return!e._private.active};var so={},lo=function(e){return function(t){for(var n=[],r=0;r<this.length;r++){var a=this[r];if(a.isNode()){for(var o=!1,i=a.connectedEdges(),s=0;s<i.length;s++){var l=i[s],u=l.source(),c=l.target();if(e.noIncomingEdges&&c===a&&u!==a||e.noOutgoingEdges&&u===a&&c!==a){o=!0;break}}o||n.push(a)}}return this.spawn(n,!0).filter(t)}},uo=function(e){return function(t){for(var n=[],r=0;r<this.length;r++){var a=this[r];if(a.isNode())for(var o=a.connectedEdges(),i=0;i<o.length;i++){var s=o[i],l=s.source(),u=s.target();e.outgoing&&l===a?(n.push(s),n.push(u)):e.incoming&&u===a&&(n.push(s),n.push(l))}}return this.spawn(n,!0).filter(t)}},co=function(e){return function(t){for(var n=this,r=[],a={};;){var o=e.outgoing?n.outgoers():n.incomers();if(0===o.length)break;for(var i=!1,s=0;s<o.length;s++){var l=o[s],u=l.id();a[u]||(a[u]=!0,r.push(l),i=!0)}if(!i)break;n=o}return this.spawn(r,!0).filter(t)}};function fo(e){return function(t){for(var n=[],r=0;r<this.length;r++){var a=this[r]._private[e.attr];a&&n.push(a)}return this.spawn(n,!0).filter(t)}}function ho(e){return function(t){var n=[],r=this._private.cy,a=e||{};E(t)&&(t=r.$(t));for(var o=0;o<t.length;o++)for(var i=t[o]._private.edges,s=0;s<i.length;s++){var l=i[s],u=l._private.data,c=this.hasElementWithId(u.source)&&t.hasElementWithId(u.target),d=t.hasElementWithId(u.source)&&this.hasElementWithId(u.target);if(c||d){if(a.thisIsSrc||a.thisIsTgt){if(a.thisIsSrc&&!c)continue;if(a.thisIsTgt&&!d)continue}n.push(l)}}return this.spawn(n,!0)}}function po(e){return e=H({},{codirected:!1},e),function(t){for(var n=[],r=this.edges(),a=e,o=0;o<r.length;o++)for(var i=r[o]._private,s=i.source,l=s._private.data.id,u=i.data.target,c=s._private.edges,d=0;d<c.length;d++){var f=c[d],h=f._private.data,p=h.target,v=h.source,g=p===u&&v===l,m=l===p&&u===v;(a.codirected&&g||!a.codirected&&(g||m))&&n.push(f)}return this.spawn(n,!0).filter(t)}}so.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},H(so,{roots:lo({noIncomingEdges:!0}),leaves:lo({noOutgoingEdges:!0}),outgoers:Hr(uo({outgoing:!0}),"outgoers"),successors:co({outgoing:!0}),incomers:Hr(uo({incoming:!0}),"incomers"),predecessors:co({incoming:!0})}),H(so,{neighborhood:Hr((function(e){for(var t=[],n=this.nodes(),r=0;r<n.length;r++)for(var a=n[r],o=a.connectedEdges(),i=0;i<o.length;i++){var s=o[i],l=s.source(),u=s.target(),c=a===l?u:l;c.length>0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),so.neighbourhood=so.neighborhood,so.closedNeighbourhood=so.closedNeighborhood,so.openNeighbourhood=so.openNeighborhood,H(so,{source:Hr((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Hr((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:fo({attr:"source"}),targets:fo({attr:"target"})}),H(so,{edgesWith:Hr(ho(),"edgesWith"),edgesTo:Hr(ho({thisIsSrc:!0}),"edgesTo")}),H(so,{connectedEdges:Hr((function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];if(r.isNode())for(var a=r._private.edges,o=0;o<a.length;o++){var i=a[o];t.push(i)}}return this.spawn(t,!0).filter(e)}),"connectedEdges"),connectedNodes:Hr((function(e){for(var t=[],n=0;n<this.length;n++){var r=this[n];r.isEdge()&&(t.push(r.source()[0]),t.push(r.target()[0]))}return this.spawn(t,!0).filter(e)}),"connectedNodes"),parallelEdges:Hr(po(),"parallelEdges"),codirectedEdges:Hr(po({codirected:!0}),"codirectedEdges")}),H(so,{components:function(e){var t=this,n=t.cy(),r=n.collection(),a=null==e?t.nodes():e.nodes(),o=[];null!=e&&a.empty()&&(a=e.sources());var i=function(e,t){r.merge(e),a.unmerge(e),t.merge(e)};if(a.empty())return t.spawn();var s=function(){var e=n.collection();o.push(e);var r=a[0];i(r,e),t.bfs({directed:!1,roots:r,visit:function(t){return i(t,e)}}),e.forEach((function(n){n.connectedEdges().forEach((function(n){t.has(n)&&e.has(n.source())&&e.has(n.target())&&e.merge(n)}))}))};do{s()}while(a.length>0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),so.componentsOf=so.components;var vo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0!==e){var r=new Oe,a=!1;if(t){if(t.length>0&&C(t[0])&&!O(t[0])){a=!0;for(var o=[],i=new je,s=0,l=t.length;s<l;s++){var u=t[s];null==u.data&&(u.data={});var c=u.data;if(null==c.id)c.id=xe();else if(e.hasElementWithId(c.id)||i.has(c.id))continue;var d=new ze(e,u,!1);o.push(d),i.add(c.id)}t=o}}else t=[];this.length=0;for(var f=0,h=t.length;f<h;f++){var p=t[f][0];if(null!=p){var v=p._private.data.id;n&&r.has(v)||(n&&r.set(v,{index:this.length,ele:p}),this[this.length]=p,this.length++)}}this._private={eles:this,cy:e,get map(){return null==this.lazyMap&&this.rebuildMap(),this.lazyMap},set map(e){this.lazyMap=e},rebuildMap:function(){for(var e=this.lazyMap=new Oe,t=this.eles,n=0;n<t.length;n++){var r=t[n];e.set(r.id(),{index:n,ele:r})}}},n&&(this._private.map=r),a&&this.restore()}else me("A collection must have a reference to the core")},go=ze.prototype=vo.prototype=Object.create(Array.prototype);go.instanceString=function(){return"collection"},go.spawn=function(e,t){return new vo(this.cy(),e,t)},go.spawnSelf=function(){return this.spawn(this)},go.cy=function(){return this._private.cy},go.renderer=function(){return this._private.cy.renderer()},go.element=function(){return this[0]},go.collection=function(){return M(this)?this:new vo(this._private.cy,[this])},go.unique=function(){return new vo(this._private.cy,this,!0)},go.hasElementWithId=function(e){return e=""+e,this._private.map.has(e)},go.getElementById=function(e){e=""+e;var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new vo(t)},go.$id=go.getElementById,go.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},go.indexOf=function(e){var t=e[0]._private.data.id;return this._private.map.get(t).index},go.indexOfId=function(e){return e=""+e,this._private.map.get(e).index},go.json=function(e){var t=this.element(),n=this.cy();if(null==t&&e)return this;if(null!=t){var r=t._private;if(C(e)){if(n.startBatch(),e.data){t.data(e.data);var a=r.data;if(t.isEdge()){var o=!1,i={},s=e.data.source,l=e.data.target;null!=s&&s!=a.source&&(i.source=""+s,o=!0),null!=l&&l!=a.target&&(i.target=""+l,o=!0),o&&(t=t.move(i))}else{var u="parent"in e.data,c=e.data.parent;!u||null==c&&null==a.parent||c==a.parent||(void 0===c&&(c=null),null!=c&&(c=""+c),t=t.move({parent:c}))}}e.position&&t.position(e.position);var d=function(n,a,o){var i=e[n];null!=i&&i!==r[n]&&(i?t[a]():t[o]())};return d("removed","remove","restore"),d("selected","select","unselect"),d("selectable","selectify","unselectify"),d("locked","lock","unlock"),d("grabbable","grabify","ungrabify"),d("pannable","panify","unpanify"),null!=e.classes&&t.classes(e.classes),n.endBatch(),this}if(void 0===e){var f={data:we(r.data),position:we(r.position),group:r.group,removed:r.removed,selected:r.selected,selectable:r.selectable,locked:r.locked,grabbable:r.grabbable,pannable:r.pannable,classes:(null,"")},h=0;return r.classes.forEach((function(e){return f.classes+=0==h++?e:" "+e})),f}}},go.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t].json();e.push(n)}return e},go.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=this[n].json(),a=new ze(e,r,!1);t.push(a)}return new vo(e,t)},go.copy=go.clone,go.restore=function(){for(var e,t,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=this,o=a.cy(),i=o._private,s=[],l=[],u=0,c=a.length;u<c;u++){var d=a[u];r&&!d.removed()||(d.isNode()?s.push(d):l.push(d))}e=s.concat(l);var f=function(){e.splice(t,1),t--};for(t=0;t<e.length;t++){var h=e[t],p=h._private,v=p.data;if(h.clearTraversalCache(),r||p.removed)if(void 0===v.id)v.id=xe();else if(S(v.id))v.id=""+v.id;else{if(T(v.id)||!E(v.id)){me("Can not create element with invalid string ID `"+v.id+"`"),f();continue}if(o.hasElementWithId(v.id)){me("Can not create second element with ID `"+v.id+"`"),f();continue}}else;var g=v.id;if(h.isNode()){var m=p.position;null==m.x&&(m.x=0),null==m.y&&(m.y=0)}if(h.isEdge()){for(var y=h,b=["source","target"],w=b.length,x=!1,_=0;_<w;_++){var k=b[_],C=v[k];S(C)&&(C=v[k]=""+v[k]),null==C||""===C?(me("Can not create edge `"+g+"` with unspecified "+k),x=!0):o.hasElementWithId(C)||(me("Can not create edge `"+g+"` with nonexistant "+k+" `"+C+"`"),x=!0)}if(x){f();continue}var R=o.getElementById(v.source),P=o.getElementById(v.target);R.same(P)?R._private.edges.push(y):(R._private.edges.push(y),P._private.edges.push(y)),y._private.source=R,y._private.target=P}p.map=new Oe,p.map.set(g,{ele:h,index:0}),p.removed=!1,r&&o.addToPool(h)}for(var O=0;O<s.length;O++){var M=s[O],j=M._private.data;S(j.parent)&&(j.parent=""+j.parent);var z=j.parent,D=null!=z;if(D){var A=o.getElementById(z);if(A.empty())j.parent=void 0;else{for(var B=!1,N=A;!N.empty();){if(M.same(N)){B=!0,j.parent=void 0;break}N=N.parent()}B||(A[0]._private.children.push(M),M._private.parent=A[0],i.hasCompoundNodes=!0)}}}if(e.length>0){for(var I=e.length===a.length?a:new vo(o,e),L=0;L<I.length;L++){var V=I[L];V.isNode()||(V.parallelEdges().clearTraversalCache(),V.source().clearTraversalCache(),V.target().clearTraversalCache())}(i.hasCompoundNodes?o.collection().merge(I).merge(I.connectedNodes()).merge(I.parent()):I).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(n),n?I.emitAndNotify("add"):r&&I.emit("add")}return a},go.removed=function(){var e=this[0];return e&&e._private.removed},go.inside=function(){var e=this[0];return e&&!e._private.removed},go.remove=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],a={},o=n._private.cy;function i(e){for(var t=e._private.edges,n=0;n<t.length;n++)l(t[n])}function s(e){for(var t=e._private.children,n=0;n<t.length;n++)l(t[n])}function l(e){var n=a[e.id()];t&&e.removed()||n||(a[e.id()]=!0,e.isNode()?(r.push(e),i(e),s(e)):r.unshift(e))}for(var u=0,c=n.length;u<c;u++){var d=n[u];l(d)}function f(e,t){var n=e._private.edges;Ce(n,t),e.clearTraversalCache()}function h(e){e.clearTraversalCache()}var p=[];function v(e,t){t=t[0];var n=(e=e[0])._private.children,r=e.id();Ce(n,t),t._private.parent=null,p.ids[r]||(p.ids[r]=!0,p.push(e))}p.ids={},n.dirtyCompoundBoundsCache(),t&&o.removeFromPool(r);for(var g=0;g<r.length;g++){var m=r[g];if(m.isEdge()){var y=m.source()[0],b=m.target()[0];f(y,m),f(b,m);for(var w=m.parallelEdges(),x=0;x<w.length;x++){var E=w[x];h(E),E.isBundledBezier()&&E.dirtyBoundingBoxCache()}}else{var _=m.parent();0!==_.length&&v(_,m)}t&&(m._private.removed=!0)}var k=o._private.elements;o._private.hasCompoundNodes=!1;for(var C=0;C<k.length;C++){var S=k[C];if(S.isParent()){o._private.hasCompoundNodes=!0;break}}var R=new vo(this.cy(),r);R.size()>0&&(e?R.emitAndNotify("remove"):t&&R.emit("remove"));for(var P=0;P<p.length;P++){var O=p[P];t&&O.removed()||O.updateStyle()}return R},go.move=function(e){var t=this._private.cy,n=this,r=!1,a=!1,o=function(e){return null==e?e:""+e};if(void 0!==e.source||void 0!==e.target){var i=o(e.source),s=o(e.target),l=null!=i&&t.hasElementWithId(i),u=null!=s&&t.hasElementWithId(s);(l||u)&&(t.batch((function(){n.remove(r,a),n.emitAndNotify("moveout");for(var e=0;e<n.length;e++){var t=n[e],o=t._private.data;t.isEdge()&&(l&&(o.source=i),u&&(o.target=s))}n.restore(r,a)})),n.emitAndNotify("move"))}else if(void 0!==e.parent){var c=o(e.parent);if(null===c||t.hasElementWithId(c)){var d=null===c?void 0:c;t.batch((function(){var e=n.remove(r,a);e.emitAndNotify("moveout");for(var t=0;t<n.length;t++){var o=n[t],i=o._private.data;o.isNode()&&(i.parent=d)}e.restore(r,a)})),n.emitAndNotify("move")}}return this},[Vn,er,tr,Lr,Gr,Kr,Zr,ka,La,Va,{isNode:function(){return"nodes"===this.group()},isEdge:function(){return"edges"===this.group()},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},Ga,Ua,Ka,ao,so].forEach((function(e){H(go,e)}));var mo={add:function(e){var t,n=this;if(P(e)){var r=e;if(r._private.cy===n)t=r.restore();else{for(var a=[],o=0;o<r.length;o++){var i=r[o];a.push(i.json())}t=new vo(n,a)}}else if(k(e)){t=new vo(n,e)}else if(C(e)&&(k(e.nodes)||k(e.edges))){for(var s=e,l=[],u=["nodes","edges"],c=0,d=u.length;c<d;c++){var f=u[c],h=s[f];if(k(h))for(var p=0,v=h.length;p<v;p++){var g=H({group:f},h[p]);l.push(g)}}t=new vo(n,l)}else{t=new ze(n,e).collection()}return t},remove:function(e){if(P(e));else if(E(e)){var t=e;e=this.$(t)}return e.remove()}};var yo=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var a={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:a.v,dv:e(a)}}function n(n,r){var a={dx:n.v,dv:e(n)},o=t(n,.5*r,a),i=t(n,.5*r,o),s=t(n,r,i),l=1/6*(a.dx+2*(o.dx+i.dx)+s.dx),u=1/6*(a.dv+2*(o.dv+i.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,a){var o,i,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,a=a||null,l.tension=t,l.friction=r,i=(o=null!==a)?(c=e(t,r))/a*.016:.016;s=n(s||l,i),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return o?function(e){return u[e*(u.length-1)|0]}:c}}(),bo=function(e,t,n,r){var a=function(e,t,n,r){var a=4,o=.001,i=1e-7,s=10,l=11,u=1/(l-1),c="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var d=0;d<4;++d)if("number"!=typeof arguments[d]||isNaN(arguments[d])||!isFinite(arguments[d]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var f=c?new Float32Array(l):new Array(l);function h(e,t){return 1-3*t+3*e}function p(e,t){return 3*t-6*e}function v(e){return 3*e}function g(e,t,n){return((h(t,n)*e+p(t,n))*e+v(t))*e}function m(e,t,n){return 3*h(t,n)*e*e+2*p(t,n)*e+v(t)}function y(t,r){for(var o=0;o<a;++o){var i=m(r,e,n);if(0===i)return r;r-=(g(r,e,n)-t)/i}return r}function b(){for(var t=0;t<l;++t)f[t]=g(t*u,e,n)}function w(t,r,a){var o,l,u=0;do{(o=g(l=r+(a-r)/2,e,n)-t)>0?a=l:r=l}while(Math.abs(o)>i&&++u<s);return l}function x(t){for(var r=0,a=1,i=l-1;a!==i&&f[a]<=t;++a)r+=u;--a;var s=r+(t-f[a])/(f[a+1]-f[a])*u,c=m(s,e,n);return c>=o?y(t,s):0===c?s:w(t,r,r+u)}var E=!1;function _(){E=!0,e===t&&n===r||b()}var k=function(a){return E||_(),e===t&&n===r?a:0===a?0:1===a?1:g(x(a),t,r)};k.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var C="generateBezier("+[e,t,n,r]+")";return k.toString=function(){return C},k}(e,t,n,r);return function(e,t,n){return e+(t-e)*a(n)}},wo={linear:function(e,t,n){return e+(t-e)*n},ease:bo(.25,.1,.25,1),"ease-in":bo(.42,0,1,1),"ease-out":bo(0,0,.58,1),"ease-in-out":bo(.42,0,.58,1),"ease-in-sine":bo(.47,0,.745,.715),"ease-out-sine":bo(.39,.575,.565,1),"ease-in-out-sine":bo(.445,.05,.55,.95),"ease-in-quad":bo(.55,.085,.68,.53),"ease-out-quad":bo(.25,.46,.45,.94),"ease-in-out-quad":bo(.455,.03,.515,.955),"ease-in-cubic":bo(.55,.055,.675,.19),"ease-out-cubic":bo(.215,.61,.355,1),"ease-in-out-cubic":bo(.645,.045,.355,1),"ease-in-quart":bo(.895,.03,.685,.22),"ease-out-quart":bo(.165,.84,.44,1),"ease-in-out-quart":bo(.77,0,.175,1),"ease-in-quint":bo(.755,.05,.855,.06),"ease-out-quint":bo(.23,1,.32,1),"ease-in-out-quint":bo(.86,0,.07,1),"ease-in-expo":bo(.95,.05,.795,.035),"ease-out-expo":bo(.19,1,.22,1),"ease-in-out-expo":bo(1,0,0,1),"ease-in-circ":bo(.6,.04,.98,.335),"ease-out-circ":bo(.075,.82,.165,1),"ease-in-out-circ":bo(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return wo.linear;var r=yo(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":bo};function xo(e,t,n,r,a){if(1===r)return n;if(t===n)return n;var o=a(t,n,r);return null==e||((e.roundValue||e.color)&&(o=Math.round(o)),void 0!==e.min&&(o=Math.max(o,e.min)),void 0!==e.max&&(o=Math.min(o,e.max))),o}function Eo(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function _o(e,t,n,r,a){var o=null!=a?a.type:null;n<0?n=0:n>1&&(n=1);var i=Eo(e,a),s=Eo(t,a);if(S(i)&&S(s))return xo(o,i,s,n,r);if(k(i)&&k(s)){for(var l=[],u=0;u<s.length;u++){var c=i[u],d=s[u];if(null!=c&&null!=d){var f=xo(o,c,d,n,r);l.push(f)}else l.push(d)}return l}}function ko(e,t,n,r){var a=!r,o=e._private,i=t._private,s=i.easing,l=i.startTime,u=(r?e:e.cy()).style();if(!i.easingImpl)if(null==s)i.easingImpl=wo.linear;else{var c,d,f;if(E(s))c=u.parse("transition-timing-function",s).value;else c=s;E(c)?(d=c,f=[]):(d=c[1],f=c.slice(2).map((function(e){return+e}))),f.length>0?("spring"===d&&f.push(i.duration),i.easingImpl=wo[d].apply(null,f)):i.easingImpl=wo[d]}var h,p=i.easingImpl;if(h=0===i.duration?1:(n-l)/i.duration,i.applying&&(h=i.progress),h<0?h=0:h>1&&(h=1),null==i.delay){var v=i.startPosition,g=i.position;if(g&&a&&!e.locked()){var m={};Co(v.x,g.x)&&(m.x=_o(v.x,g.x,h,p)),Co(v.y,g.y)&&(m.y=_o(v.y,g.y,h,p)),e.position(m)}var y=i.startPan,b=i.pan,w=o.pan,x=null!=b&&r;x&&(Co(y.x,b.x)&&(w.x=_o(y.x,b.x,h,p)),Co(y.y,b.y)&&(w.y=_o(y.y,b.y,h,p)),e.emit("pan"));var _=i.startZoom,k=i.zoom,C=null!=k&&r;C&&(Co(_,k)&&(o.zoom=ot(o.minZoom,_o(_,k,h,p),o.maxZoom)),e.emit("zoom")),(x||C)&&e.emit("viewport");var S=i.style;if(S&&S.length>0&&a){for(var R=0;R<S.length;R++){var P=S[R],O=P.name,M=P,j=i.startStyle[O],z=_o(j,M,h,p,u.properties[j.name]);u.overrideBypass(e,O,z)}e.emit("style")}}return i.progress=h,h}function Co(e,t){return null!=e&&null!=t&&(!(!S(e)||!S(t))||!(!e||!t))}function So(e,t,n,r){var a=t._private;a.started=!0,a.startTime=n-a.progress*a.duration}function Ro(e,t){var n=t._private.aniEles,r=[];function a(t,n){var a=t._private,o=a.animation.current,i=a.animation.queue,s=!1;if(0===o.length){var l=i.shift();l&&o.push(l)}for(var u=function(e){for(var t=e.length-1;t>=0;t--){(0,e[t])()}e.splice(0,e.length)},c=o.length-1;c>=0;c--){var d=o[c],f=d._private;f.stopped?(o.splice(c,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.frames)):(f.playing||f.applying)&&(f.playing&&f.applying&&(f.applying=!1),f.started||So(0,d,e),ko(t,d,e,n),f.applying&&(f.applying=!1),u(f.frames),null!=f.step&&f.step(e),d.completed()&&(o.splice(c,1),f.hooked=!1,f.playing=!1,f.started=!1,u(f.completes)),s=!0)}return n||0!==o.length||0!==i.length||r.push(t),s}for(var o=!1,i=0;i<n.length;i++){var s=a(n[i]);o=o||s}var l=a(t,!0);(o||l)&&(n.length>0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var Po={animate:Jn.animate(),animation:Jn.animation(),animated:Jn.animated(),clearQueue:Jn.clearQueue(),delay:Jn.delay(),delayAnimation:Jn.delayAnimation(),stop:Jn.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){Ro(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&K((function(n){Ro(n,e),t()}))}()}}},Oo={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&O(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Mo=function(e){return E(e)?new Nr(e):e},jo={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new za(Oo,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Mo(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Mo(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Mo(t),n),this},once:function(e,t,n){return this.emitter().one(e,Mo(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Jn.eventAliasesOn(jo);var zo={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};zo.jpeg=zo.jpg;var To={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var a;a=E(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var o=new r(H({},e,{cy:t,eles:a}));return o}me("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else me("A `name` must be specified to make a layout");else me("Layout options must be specified to make a layout")}};To.createLayout=To.makeLayout=To.layout;var Do={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var a=this.renderer();!this.destroyed()&&a&&a.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r<n.length;r++){var a=n[r],o=e[a];t.getElementById(a).data(o)}}))}},Ao=ke({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1}),Bo={renderTo:function(e,t,n,r){return this._private.renderer.renderTo(e,t,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify("draw"),this},resize:function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},initRenderer:function(e){var t=this,n=t.extension("renderer",e.name);if(null!=n){void 0!==e.wheelSensitivity&&be("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var r=Ao(e);r.cy=t,t._private.renderer=new n(r),this.notify("init")}else me("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"))},destroyRenderer:function(){var e=this;e.notify("destroy");var t=e.container();if(t)for(t._cyreg=null;t.childNodes.length>0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Bo.invalidateDimensions=Bo.resize;var No={collection:function(e,t){return E(e)?this.$(e):P(e)?e.collection():k(e)?new vo(this,e,t):new vo(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};No.elements=No.filter=No.$;var Io={},Lo="t";Io.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r<e.length;r++){var a=e[r],o=t.getContextMeta(a);if(!o.empty){var i=t.getContextStyle(o),s=t.applyContextStyle(o,i,a);a._private.appliedInitStyle?t.updateTransitions(a,s.diffProps):a._private.appliedInitStyle=!0,t.updateStyleHints(a)&&n.push(a)}}return n},Io.getPropertiesDiff=function(e,t){var n=this,r=n._private.propDiffs=n._private.propDiffs||{},a=e+"-"+t,o=r[a];if(o)return o;for(var i=[],s={},l=0;l<n.length;l++){var u=n[l],c=e[l]===Lo,d=t[l]===Lo,f=c!==d,h=u.mappedProperties.length>0;if(f||d&&h){var p=void 0;f&&h||f?p=u.properties:h&&(p=u.mappedProperties);for(var v=0;v<p.length;v++){for(var g=p[v],m=g.name,y=!1,b=l+1;b<n.length;b++){var w=n[b];if(t[b]===Lo&&(y=null!=w.properties[g.name]))break}s[m]||y||(s[m]=!0,i.push(m))}}}return r[a]=i,i},Io.getContextMeta=function(e){for(var t,n=this,r="",a=e._private.styleCxtKey||"",o=0;o<n.length;o++){var i=n[o];r+=i.selector&&i.selector.matches(e)?Lo:"f"}return t=n.getPropertiesDiff(a,r),e._private.styleCxtKey=r,{key:r,diffPropNames:t,empty:0===t.length}},Io.getContextStyle=function(e){var t=e.key,n=this._private.contextStyles=this._private.contextStyles||{};if(n[t])return n[t];for(var r={_private:{key:t}},a=0;a<this.length;a++){var o=this[a];if(t[a]===Lo)for(var i=0;i<o.properties.length;i++){var s=o.properties[i];r[s.name]=s}}return n[t]=r,r},Io.applyContextStyle=function(e,t,n){for(var r=e.diffPropNames,a={},o=this.types,i=0;i<r.length;i++){var s=r[i],l=t[s],u=n.pstyle(s);if(!l){if(!u)continue;l=u.bypass?{name:s,deleteBypassed:!0}:{name:s,delete:!0}}if(u!==l){if(l.mapped===o.fn&&null!=u&&null!=u.mapping&&u.mapping.value===l.value){var c=u.mapping;if((c.fnValue=l.value(n))===c.prevFnValue)continue}var d=a[s]={prev:u};this.applyParsedProperty(n,l),d.next=n.pstyle(s),d.next&&d.next.bypass&&(d.next=d.next.bypassed)}}return{diffProps:a}},Io.updateStyleHints=function(e){var t=e._private,n=this,r=n.propertyGroupNames,a=n.propertyGroupKeys,o=function(e,t,r){return n.getPropertiesHash(e,t,r)},i=t.styleKey;if(e.removed())return!1;var s="nodes"===t.group,l=e._private.style;r=Object.keys(l);for(var u=0;u<a.length;u++){var c=a[u];t.styleKeys[c]=[Q,ee]}for(var d,f=function(e,n){return t.styleKeys[n][0]=ne(e,t.styleKeys[n][0])},h=function(e,n){return t.styleKeys[n][1]=re(e,t.styleKeys[n][1])},p=function(e,t){f(e,t),h(e,t)},v=function(e,t){for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);f(r,t),h(r,t)}},g=0;g<r.length;g++){var m=r[g],y=l[m];if(null!=y){var b=this.properties[m],w=b.type,x=b.groupKey,E=void 0;null!=b.hashOverride?E=b.hashOverride(e,y):null!=y.pfValue&&(E=y.pfValue);var _=null==b.enums?y.value:null,k=null!=E,C=k||null!=_,S=y.units;if(w.number&&C&&!w.multiple)p(-128<(d=k?E:_)&&d<128&&Math.floor(d)!==d?2e9-(1024*d|0):d,x),k||null==S||v(S,x);else v(y.strValue,x)}}for(var R,P,O=[Q,ee],M=0;M<a.length;M++){var j=a[M],z=t.styleKeys[j];O[0]=ne(z[0],O[0]),O[1]=re(z[1],O[1])}t.styleKey=(R=O[0],P=O[1],2097152*R+P);var T=t.styleKeys;t.labelDimsKey=ae(T.labelDimensions);var D=o(e,["label"],T.labelDimensions);if(t.labelKey=ae(D),t.labelStyleKey=ae(oe(T.commonLabel,D)),!s){var A=o(e,["source-label"],T.labelDimensions);t.sourceLabelKey=ae(A),t.sourceLabelStyleKey=ae(oe(T.commonLabel,A));var B=o(e,["target-label"],T.labelDimensions);t.targetLabelKey=ae(B),t.targetLabelStyleKey=ae(oe(T.commonLabel,B))}if(s){var N=t.styleKeys,I=N.nodeBody,L=N.nodeBorder,V=N.backgroundImage,F=N.compound,H=N.pie,G=[I,L,V,F,H].filter((function(e){return null!=e})).reduce(oe,[Q,ee]);t.nodeKey=ae(G),t.hasPie=null!=H&&H[0]!==Q&&H[1]!==ee}return i!==t.styleKey},Io.clearStyleHints=function(e){var t=e._private;t.styleCxtKey="",t.styleKeys={},t.styleKey=null,t.labelKey=null,t.labelStyleKey=null,t.sourceLabelKey=null,t.sourceLabelStyleKey=null,t.targetLabelKey=null,t.targetLabelStyleKey=null,t.nodeKey=null,t.hasPie=null},Io.applyParsedProperty=function(e,t){var n,r=this,a=t,o=e._private.style,i=r.types,s=r.properties[a.name].type,l=a.bypass,u=o[a.name],c=u&&u.bypass,d=e._private,f="mapping",h=function(e){return null==e?null:null!=e.pfValue?e.pfValue:e.value},p=function(){var t=h(u),n=h(a);r.checkTriggers(e,a.name,t,n)};if(a&&"pie"===a.name.substr(0,3)&&be("The pie style properties are deprecated. Create charts using background images instead."),"curve-style"===t.name&&e.isEdge()&&("bezier"!==t.value&&e.isLoop()||"haystack"===t.value&&(e.source().isParent()||e.target().isParent()))&&(a=t=this.parse(t.name,"bezier",l)),a.delete)return o[a.name]=void 0,p(),!0;if(a.deleteBypassed)return u?!!u.bypass&&(u.bypassed=void 0,p(),!0):(p(),!0);if(a.deleteBypass)return u?!!u.bypass&&(o[a.name]=u.bypassed,p(),!0):(p(),!0);var v=function(){be("Do not assign mappings to elements without corresponding data (i.e. ele `"+e.id()+"` has no mapping for property `"+a.name+"` with data field `"+a.field+"`); try a `["+a.field+"]` selector to limit scope to elements with `"+a.field+"` defined")};switch(a.mapped){case i.mapData:for(var g,m=a.field.split("."),y=d.data,b=0;b<m.length&&y;b++){y=y[m[b]]}if(null==y)return v(),!1;if(!S(y))return be("Do not use continuous mappers without specifying numeric data (i.e. `"+a.field+": "+y+"` for `"+e.id()+"` is non-numeric)"),!1;var w=a.fieldMax-a.fieldMin;if((g=0===w?0:(y-a.fieldMin)/w)<0?g=0:g>1&&(g=1),s.color){var x=a.valueMin[0],E=a.valueMax[0],_=a.valueMin[1],k=a.valueMax[1],C=a.valueMin[2],R=a.valueMax[2],P=null==a.valueMin[3]?1:a.valueMin[3],O=null==a.valueMax[3]?1:a.valueMax[3],M=[Math.round(x+(E-x)*g),Math.round(_+(k-_)*g),Math.round(C+(R-C)*g),Math.round(P+(O-P)*g)];n={bypass:a.bypass,name:a.name,value:M,strValue:"rgb("+M[0]+", "+M[1]+", "+M[2]+")"}}else{if(!s.number)return!1;var j=a.valueMin+(a.valueMax-a.valueMin)*g;n=this.parse(a.name,j,a.bypass,f)}if(!n)return v(),!1;n.mapping=a,a=n;break;case i.data:for(var z=a.field.split("."),T=d.data,D=0;D<z.length&&T;D++){T=T[z[D]]}if(null!=T&&(n=this.parse(a.name,T,a.bypass,f)),!n)return v(),!1;n.mapping=a,a=n;break;case i.fn:var A=a.value,B=null!=a.fnValue?a.fnValue:A(e);if(a.prevFnValue=B,null==B)return be("Custom function mappers may not return null (i.e. `"+a.name+"` for ele `"+e.id()+"` is null)"),!1;if(!(n=this.parse(a.name,B,a.bypass,f)))return be("Custom function mappers may not return invalid values for the property type (i.e. `"+a.name+"` for ele `"+e.id()+"` is invalid)"),!1;n.mapping=we(a),a=n;break;case void 0:break;default:return!1}return l?(a.bypassed=c?u.bypassed:u,o[a.name]=a):c?u.bypassed=a:o[a.name]=a,p(),!0},Io.cleanElements=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(this.clearStyleHints(r),r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache(),t)for(var a=r._private.style,o=Object.keys(a),i=0;i<o.length;i++){var s=o[i],l=a[s];null!=l&&(l.bypass?l.bypassed=null:a[s]=null)}else r._private.style={}}},Io.update=function(){this._private.cy.mutableElements().updateStyle()},Io.updateTransitions=function(e,t){var n=this,r=e._private,a=e.pstyle("transition-property").value,o=e.pstyle("transition-duration").pfValue,i=e.pstyle("transition-delay").pfValue;if(a.length>0&&o>0){for(var s={},l=!1,u=0;u<a.length;u++){var c=a[u],d=e.pstyle(c),f=t[c];if(f){var h=f.prev,p=null!=f.next?f.next:d,v=!1,g=void 0,m=1e-6;h&&(S(h.pfValue)&&S(p.pfValue)?(v=p.pfValue-h.pfValue,g=h.pfValue+m*v):S(h.value)&&S(p.value)?(v=p.value-h.value,g=h.value+m*v):k(h.value)&&k(p.value)&&(v=h.value[0]!==p.value[0]||h.value[1]!==p.value[1]||h.value[2]!==p.value[2],g=h.strValue),v&&(s[c]=p.strValue,this.applyBypass(e,c,g),l=!0))}}if(!l)return;r.transitioning=!0,new Wn((function(t){i>0?e.delayAnimation(i).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:o,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1)},Io.checkTrigger=function(e,t,n,r,a,o){var i=this.properties[t],s=a(i);null!=s&&s(n,r)&&o(i)},Io.checkZOrderTrigger=function(e,t,n,r){var a=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){a._private.cy.notify("zorder",e)}))},Io.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(a){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),"curve-style"!==t||"bezier"!==n&&"bezier"!==r||!a.triggersBoundsOfParallelBeziers||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()}))}))},Io.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Vo={applyBypass:function(e,t,n,r){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var o=0;o<this.properties.length;o++){var i=this.properties[o].name,s=this.parse(i,n,!0);s&&a.push(s)}}else if(E(t)){var l=this.parse(t,n,!0);l&&a.push(l)}else{if(!C(t))return!1;var u=t;r=n;for(var c=Object.keys(u),d=0;d<c.length;d++){var f=c[d],h=u[f];if(void 0===h&&(h=u[N(f)]),void 0!==h){var p=this.parse(f,h,!0);p&&a.push(p)}}}if(0===a.length)return!1;for(var v=!1,g=0;g<e.length;g++){for(var m=e[g],y={},b=void 0,w=0;w<a.length;w++){var x=a[w];if(r){var _=m.pstyle(x.name);b=y[x.name]={prev:_}}v=this.applyParsedProperty(m,we(x))||v,r&&(b.next=m.pstyle(x.name))}v&&this.updateStyleHints(m),r&&this.updateTransitions(m,y,true)}return v},overrideBypass:function(e,t,n){t=B(t);for(var r=0;r<e.length;r++){var a=e[r],o=a._private.style[t],i=this.properties[t].type,s=i.color,l=i.mutiple,u=o?null!=o.pfValue?o.pfValue:o.value:null;o&&o.bypass?(o.value=n,null!=o.pfValue&&(o.pfValue=n),o.strValue=s?"rgb("+n.join(",")+")":l?n.join(" "):""+n,this.updateStyleHints(a)):this.applyBypass(a,t,n),this.checkTriggers(a,t,u,n)}},removeAllBypasses:function(e,t){return this.removeBypasses(e,this.propertyNames,t)},removeBypasses:function(e,t,n){for(var r=0;r<e.length;r++){for(var a=e[r],o={},i=0;i<t.length;i++){var s=t[i],l=this.properties[s],u=a.pstyle(l.name);if(u&&u.bypass){var c=this.parse(s,"",!0),d=o[l.name]={prev:u};this.applyParsedProperty(a,c),d.next=a.pstyle(l.name)}}this.updateStyleHints(a),n&&this.updateTransitions(a,o,true)}}},Fo={getEmSizeInPixels:function(){var e=this.containerCss("font-size");return null!=e?parseFloat(e):1},containerCss:function(e){var t=this._private.cy.container();if(v&&t&&v.getComputedStyle)return v.getComputedStyle(t).getPropertyValue(e)}},Ho={getRenderedStyle:function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},getRawStyle:function(e,t){var n=this;if(e=e[0]){for(var r={},a=0;a<n.properties.length;a++){var o=n.properties[a],i=n.getStylePropertyValue(e,o.name,t);null!=i&&(r[o.name]=i,r[N(o.name)]=i)}return r}},getIndexedStyle:function(e,t,n,r){var a=e.pstyle(t)[n][r];return null!=a?a:e.cy().style().getDefaultProperty(t)[n][0]},getStylePropertyValue:function(e,t,n){if(e=e[0]){var r=this.properties[t];r.alias&&(r=r.pointsTo);var a=r.type,o=e.pstyle(r.name);if(o){var i=o.value,s=o.units,l=o.strValue;if(n&&a.number&&null!=i&&S(i)){var u=e.cy().zoom(),c=function(e){return e*u},d=function(e,t){return c(e)+t},f=k(i);return(f?s.every((function(e){return null!=e})):null!=s)?f?i.map((function(e,t){return d(e,s[t])})).join(" "):d(i,s):f?i.map((function(e){return E(e)?e:""+c(e)})).join(" "):""+c(i)}if(null!=l)return l}return null}},getAnimationStartStyle:function(e,t){for(var n={},r=0;r<t.length;r++){var a=t[r].name,o=e.pstyle(a);void 0!==o&&(o=C(o)?this.parse(a,o.strValue):this.parse(a,o)),o&&(n[a]=o)}return n},getPropsList:function(e){var t=[],n=e,r=this.properties;if(n)for(var a=Object.keys(n),o=0;o<a.length;o++){var i=a[o],s=n[i],l=r[i]||r[B(i)],u=this.parse(l.name,s);u&&t.push(u)}return t},getNonDefaultPropertiesHash:function(e,t,n){var r,a,o,i,s,l,u=n.slice();for(s=0;s<t.length;s++)if(r=t[s],null!=(a=e.pstyle(r,!1)))if(null!=a.pfValue)u[0]=ne(i,u[0]),u[1]=re(i,u[1]);else for(o=a.strValue,l=0;l<o.length;l++)i=o.charCodeAt(l),u[0]=ne(i,u[0]),u[1]=re(i,u[1]);return u}};Ho.getPropertiesHash=Ho.getNonDefaultPropertiesHash;var Go={appendFromJson:function(e){for(var t=this,n=0;n<e.length;n++){var r=e[n],a=r.selector,o=r.style||r.css,i=Object.keys(o);t.selector(a);for(var s=0;s<i.length;s++){var l=i[s],u=o[l];t.css(l,u)}}return t},fromJson:function(e){var t=this;return t.resetToDefault(),t.appendFromJson(e),t},json:function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var n=this[t],r=n.selector,a=n.properties,o={},i=0;i<a.length;i++){var s=a[i];o[s.name]=s.strValue}e.push({selector:r?r.toString():"core",style:o})}return e}},qo={appendFromString:function(e){var t,n,r,a=this,o=""+e;function i(){o=o.length>t.length?o.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(o=o.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(o.match(/^\s*$/))break;var l=o.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){be("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+o);break}t=l[0];var u=l[1];if("core"!==u)if(new Nr(u).invalid){be("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),i();continue}var c=l[2],d=!1;n=c;for(var f=[];;){if(n.match(/^\s*$/))break;var h=n.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!h){be("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),d=!0;break}r=h[0];var p=h[1],v=h[2];if(this.properties[p])a.parse(p,v)?(f.push({name:p,val:v}),s()):(be("Skipping property: Invalid property definition in: "+r),s());else be("Skipping property: Invalid property name in: "+r),s()}if(d){i();break}a.selector(u);for(var g=0;g<f.length;g++){var m=f[g];a.css(m.name,m.val)}i()}return a},fromString:function(e){var t=this;return t.resetToDefault(),t.appendFromString(e),t}},Yo={};!function(){var e=V,t=function(e){return"^"+e+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},n=function(t){var n=e+"|\\w+|rgb[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%]?)(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|hsl[a]?\\((?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?)))\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))[%])(?:\\s*,\\s*(?:(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))))?\\)|\\#[0-9a-fA-F]{3}|\\#[0-9a-fA-F]{6}";return"^"+t+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+e+")\\s*\\,\\s*("+e+")\\s*,\\s*("+n+")\\s*\\,\\s*("+n+")\\)$"},r=["^url\\s*\\(\\s*['\"]?(.+?)['\"]?\\s*\\)$","^(none)$","^(.+)$"];Yo.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi"]},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","center","bottom"]},halign:{enums:["left","center","right"]},justification:{enums:["left","center","right","auto"]},text:{string:!0},data:{mapping:!0,regex:t("data")},layoutData:{mapping:!0,regex:t("layoutData")},scratch:{mapping:!0,regex:t("scratch")},mapData:{mapping:!0,regex:n("mapData")},mapLayoutData:{mapping:!0,regex:n("mapLayoutData")},mapScratch:{mapping:!0,regex:n("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:r,singleRegexMatchValue:!0},urls:{regexes:r,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:function(e,t){switch(e.length){case 2:return"deg"!==t[0]&&"rad"!==t[0]&&"deg"!==t[1]&&"rad"!==t[1];case 1:return E(e[0])||"deg"===t[0]||"rad"===t[0];default:return!1}}},easing:{regexes:["^(spring)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*,\\s*("+e+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(e){var t=e.length;return 1===t||2===t||4===t}}};var a={zeroNonZero:function(e,t){return(null==e||null==t)&&e!==t||(0==e&&0!=t||0!=e&&0==t)},any:function(e,t){return e!=t},emptyNonEmpty:function(e,t){var n=T(e),r=T(t);return n&&!r||!n&&r}},o=Yo.types,i=[{name:"label",type:o.text,triggersBounds:a.any,triggersZOrder:a.emptyNonEmpty},{name:"text-rotation",type:o.textRotation,triggersBounds:a.any},{name:"text-margin-x",type:o.bidirectionalSize,triggersBounds:a.any},{name:"text-margin-y",type:o.bidirectionalSize,triggersBounds:a.any}],s=[{name:"source-label",type:o.text,triggersBounds:a.any},{name:"source-text-rotation",type:o.textRotation,triggersBounds:a.any},{name:"source-text-margin-x",type:o.bidirectionalSize,triggersBounds:a.any},{name:"source-text-margin-y",type:o.bidirectionalSize,triggersBounds:a.any},{name:"source-text-offset",type:o.size,triggersBounds:a.any}],l=[{name:"target-label",type:o.text,triggersBounds:a.any},{name:"target-text-rotation",type:o.textRotation,triggersBounds:a.any},{name:"target-text-margin-x",type:o.bidirectionalSize,triggersBounds:a.any},{name:"target-text-margin-y",type:o.bidirectionalSize,triggersBounds:a.any},{name:"target-text-offset",type:o.size,triggersBounds:a.any}],u=[{name:"font-family",type:o.fontFamily,triggersBounds:a.any},{name:"font-style",type:o.fontStyle,triggersBounds:a.any},{name:"font-weight",type:o.fontWeight,triggersBounds:a.any},{name:"font-size",type:o.size,triggersBounds:a.any},{name:"text-transform",type:o.textTransform,triggersBounds:a.any},{name:"text-wrap",type:o.textWrap,triggersBounds:a.any},{name:"text-overflow-wrap",type:o.textOverflowWrap,triggersBounds:a.any},{name:"text-max-width",type:o.size,triggersBounds:a.any},{name:"text-outline-width",type:o.size,triggersBounds:a.any},{name:"line-height",type:o.positiveNumber,triggersBounds:a.any}],c=[{name:"text-valign",type:o.valign,triggersBounds:a.any},{name:"text-halign",type:o.halign,triggersBounds:a.any},{name:"color",type:o.color},{name:"text-outline-color",type:o.color},{name:"text-outline-opacity",type:o.zeroOneNumber},{name:"text-background-color",type:o.color},{name:"text-background-opacity",type:o.zeroOneNumber},{name:"text-background-padding",type:o.size,triggersBounds:a.any},{name:"text-border-opacity",type:o.zeroOneNumber},{name:"text-border-color",type:o.color},{name:"text-border-width",type:o.size,triggersBounds:a.any},{name:"text-border-style",type:o.borderStyle,triggersBounds:a.any},{name:"text-background-shape",type:o.textBackgroundShape,triggersBounds:a.any},{name:"text-justification",type:o.justification}],d=[{name:"events",type:o.bool},{name:"text-events",type:o.bool}],f=[{name:"display",type:o.display,triggersZOrder:a.any,triggersBounds:a.any,triggersBoundsOfParallelBeziers:!0},{name:"visibility",type:o.visibility,triggersZOrder:a.any},{name:"opacity",type:o.zeroOneNumber,triggersZOrder:a.zeroNonZero},{name:"text-opacity",type:o.zeroOneNumber},{name:"min-zoomed-font-size",type:o.size},{name:"z-compound-depth",type:o.zCompoundDepth,triggersZOrder:a.any},{name:"z-index-compare",type:o.zIndexCompare,triggersZOrder:a.any},{name:"z-index",type:o.nonNegativeInt,triggersZOrder:a.any}],h=[{name:"overlay-padding",type:o.size,triggersBounds:a.any},{name:"overlay-color",type:o.color},{name:"overlay-opacity",type:o.zeroOneNumber,triggersBounds:a.zeroNonZero},{name:"overlay-shape",type:o.overlayShape,triggersBounds:a.any}],p=[{name:"underlay-padding",type:o.size,triggersBounds:a.any},{name:"underlay-color",type:o.color},{name:"underlay-opacity",type:o.zeroOneNumber,triggersBounds:a.zeroNonZero},{name:"underlay-shape",type:o.overlayShape,triggersBounds:a.any}],v=[{name:"transition-property",type:o.propList},{name:"transition-duration",type:o.time},{name:"transition-delay",type:o.time},{name:"transition-timing-function",type:o.easing}],g=function(e,t){return"label"===t.value?-e.poolIndex():t.pfValue},m=[{name:"height",type:o.nodeSize,triggersBounds:a.any,hashOverride:g},{name:"width",type:o.nodeSize,triggersBounds:a.any,hashOverride:g},{name:"shape",type:o.nodeShape,triggersBounds:a.any},{name:"shape-polygon-points",type:o.polygonPointList,triggersBounds:a.any},{name:"background-color",type:o.color},{name:"background-fill",type:o.fill},{name:"background-opacity",type:o.zeroOneNumber},{name:"background-blacken",type:o.nOneOneNumber},{name:"background-gradient-stop-colors",type:o.colors},{name:"background-gradient-stop-positions",type:o.percentages},{name:"background-gradient-direction",type:o.gradientDirection},{name:"padding",type:o.sizeMaybePercent,triggersBounds:a.any},{name:"padding-relative-to",type:o.paddingRelativeTo,triggersBounds:a.any},{name:"bounds-expansion",type:o.boundsExpansion,triggersBounds:a.any}],y=[{name:"border-color",type:o.color},{name:"border-opacity",type:o.zeroOneNumber},{name:"border-width",type:o.size,triggersBounds:a.any},{name:"border-style",type:o.borderStyle}],b=[{name:"background-image",type:o.urls},{name:"background-image-crossorigin",type:o.bgCrossOrigin},{name:"background-image-opacity",type:o.zeroOneNumbers},{name:"background-image-containment",type:o.bgContainment},{name:"background-image-smoothing",type:o.bools},{name:"background-position-x",type:o.bgPos},{name:"background-position-y",type:o.bgPos},{name:"background-width-relative-to",type:o.bgRelativeTo},{name:"background-height-relative-to",type:o.bgRelativeTo},{name:"background-repeat",type:o.bgRepeat},{name:"background-fit",type:o.bgFit},{name:"background-clip",type:o.bgClip},{name:"background-width",type:o.bgWH},{name:"background-height",type:o.bgWH},{name:"background-offset-x",type:o.bgPos},{name:"background-offset-y",type:o.bgPos}],w=[{name:"position",type:o.position,triggersBounds:a.any},{name:"compound-sizing-wrt-labels",type:o.compoundIncludeLabels,triggersBounds:a.any},{name:"min-width",type:o.size,triggersBounds:a.any},{name:"min-width-bias-left",type:o.sizeMaybePercent,triggersBounds:a.any},{name:"min-width-bias-right",type:o.sizeMaybePercent,triggersBounds:a.any},{name:"min-height",type:o.size,triggersBounds:a.any},{name:"min-height-bias-top",type:o.sizeMaybePercent,triggersBounds:a.any},{name:"min-height-bias-bottom",type:o.sizeMaybePercent,triggersBounds:a.any}],x=[{name:"line-style",type:o.lineStyle},{name:"line-color",type:o.color},{name:"line-fill",type:o.fill},{name:"line-cap",type:o.lineCap},{name:"line-opacity",type:o.zeroOneNumber},{name:"line-dash-pattern",type:o.numbers},{name:"line-dash-offset",type:o.number},{name:"line-gradient-stop-colors",type:o.colors},{name:"line-gradient-stop-positions",type:o.percentages},{name:"curve-style",type:o.curveStyle,triggersBounds:a.any,triggersBoundsOfParallelBeziers:!0},{name:"haystack-radius",type:o.zeroOneNumber,triggersBounds:a.any},{name:"source-endpoint",type:o.edgeEndpoint,triggersBounds:a.any},{name:"target-endpoint",type:o.edgeEndpoint,triggersBounds:a.any},{name:"control-point-step-size",type:o.size,triggersBounds:a.any},{name:"control-point-distances",type:o.bidirectionalSizes,triggersBounds:a.any},{name:"control-point-weights",type:o.numbers,triggersBounds:a.any},{name:"segment-distances",type:o.bidirectionalSizes,triggersBounds:a.any},{name:"segment-weights",type:o.numbers,triggersBounds:a.any},{name:"taxi-turn",type:o.bidirectionalSizeMaybePercent,triggersBounds:a.any},{name:"taxi-turn-min-distance",type:o.size,triggersBounds:a.any},{name:"taxi-direction",type:o.axisDirection,triggersBounds:a.any},{name:"edge-distances",type:o.edgeDistances,triggersBounds:a.any},{name:"arrow-scale",type:o.positiveNumber,triggersBounds:a.any},{name:"loop-direction",type:o.angle,triggersBounds:a.any},{name:"loop-sweep",type:o.angle,triggersBounds:a.any},{name:"source-distance-from-node",type:o.size,triggersBounds:a.any},{name:"target-distance-from-node",type:o.size,triggersBounds:a.any}],_=[{name:"ghost",type:o.bool,triggersBounds:a.any},{name:"ghost-offset-x",type:o.bidirectionalSize,triggersBounds:a.any},{name:"ghost-offset-y",type:o.bidirectionalSize,triggersBounds:a.any},{name:"ghost-opacity",type:o.zeroOneNumber}],k=[{name:"selection-box-color",type:o.color},{name:"selection-box-opacity",type:o.zeroOneNumber},{name:"selection-box-border-color",type:o.color},{name:"selection-box-border-width",type:o.size},{name:"active-bg-color",type:o.color},{name:"active-bg-opacity",type:o.zeroOneNumber},{name:"active-bg-size",type:o.size},{name:"outside-texture-bg-color",type:o.color},{name:"outside-texture-bg-opacity",type:o.zeroOneNumber}],C=[];Yo.pieBackgroundN=16,C.push({name:"pie-size",type:o.sizeMaybePercent});for(var S=1;S<=Yo.pieBackgroundN;S++)C.push({name:"pie-"+S+"-background-color",type:o.color}),C.push({name:"pie-"+S+"-background-size",type:o.percent}),C.push({name:"pie-"+S+"-background-opacity",type:o.zeroOneNumber});var R=[],P=Yo.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:o.arrowShape,triggersBounds:a.any},{name:"arrow-color",type:o.color},{name:"arrow-fill",type:o.arrowFill}].forEach((function(e){P.forEach((function(t){var n=t+"-"+e.name,r=e.type,a=e.triggersBounds;R.push({name:n,type:r,triggersBounds:a})}))}),{});var O=Yo.properties=[].concat(d,v,f,h,p,_,c,u,i,s,l,m,y,b,C,w,x,R,k),M=Yo.propertyGroups={behavior:d,transition:v,visibility:f,overlay:h,underlay:p,ghost:_,commonLabel:c,labelDimensions:u,mainLabel:i,sourceLabel:s,targetLabel:l,nodeBody:m,nodeBorder:y,backgroundImage:b,pie:C,compound:w,edgeLine:x,edgeArrow:R,core:k},j=Yo.propertyGroupNames={};(Yo.propertyGroupKeys=Object.keys(M)).forEach((function(e){j[e]=M[e].map((function(e){return e.name})),M[e].forEach((function(t){return t.groupKey=e}))}));var z=Yo.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];Yo.propertyNames=O.map((function(e){return e.name}));for(var D=0;D<O.length;D++){var A=O[D];O[A.name]=A}for(var B=0;B<z.length;B++){var N=z[B],I=O[N.pointsTo],L={name:N.name,alias:!0,pointsTo:I};O.push(L),O[N.name]=L}}(),Yo.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},Yo.getDefaultProperties=function(){var e=this._private;if(null!=e.defaultProperties)return e.defaultProperties;for(var t=H({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce((function(e,t){for(var n=1;n<=Yo.pieBackgroundN;n++){var r=t.name.replace("{{i}}",n),a=t.value;e[r]=a}return e}),{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"taxi-turn":"50%","taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"}].reduce((function(e,t){return Yo.arrowPrefixes.forEach((function(n){var r=n+"-"+t.name,a=t.value;e[r]=a})),e}),{})),n={},r=0;r<this.properties.length;r++){var a=this.properties[r];if(!a.pointsTo){var o=a.name,i=t[o],s=this.parse(o,i);n[o]=s}}return e.defaultProperties=n,e.defaultProperties},Yo.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var Uo={parse:function(e,t,n,r){var a=this;if(_(t))return a.parseImplWarn(e,t,n,r);var o,i=se(e,""+t,n?"t":"f","mapping"===r||!0===r||!1===r||null==r?"dontcare":r),s=a.propCache=a.propCache||[];return(o=s[i])||(o=s[i]=a.parseImplWarn(e,t,n,r)),(n||"mapping"===r)&&(o=we(o))&&(o.value=we(o.value)),o},parseImplWarn:function(e,t,n,r){var a=this.parseImpl(e,t,n,r);return a||null==t||be("The style property `".concat(e,": ").concat(t,"` is invalid")),!a||"width"!==a.name&&"height"!==a.name||"label"!==t||be("The style value of `label` is deprecated for `"+a.name+"`"),a}};Uo.parseImpl=function(e,t,n,r){var a=this;e=B(e);var o=a.properties[e],i=t,s=a.types;if(!o)return null;if(void 0===t)return null;o.alias&&(o=o.pointsTo,e=o.name);var l=E(t);l&&(t=t.trim());var u,c,d=o.type;if(!d)return null;if(n&&(""===t||null===t))return{name:e,value:t,bypass:!0,deleteBypass:!0};if(_(t))return{name:e,value:t,strValue:"fn",mapped:s.fn,bypass:n};if(!l||r||t.length<7||"a"!==t[1]);else{if(t.length>=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var f=s.data;return{name:e,value:u,strValue:""+t,mapped:f,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(d.multiple)return!1;var h=s.mapData;if(!d.color&&!d.number)return!1;var p=this.parse(e,c[4]);if(!p||p.mapped)return!1;var v=this.parse(e,c[5]);if(!v||v.mapped)return!1;if(p.pfValue===v.pfValue||p.strValue===v.strValue)return be("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+p.strValue+"`"),this.parse(e,p.strValue);if(d.color){var g=p.value,m=v.value;if(!(g[0]!==m[0]||g[1]!==m[1]||g[2]!==m[2]||g[3]!==m[3]&&(null!=g[3]&&1!==g[3]||null!=m[3]&&1!==m[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:h,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:p.value,valueMax:v.value,bypass:n}}}if(d.multiple&&"multiple"!==r){var y;if(y=l?t.split(/\s+/):k(t)?t:[t],d.evenMultiple&&y.length%2!=0)return null;for(var b=[],w=[],x=[],C="",R=!1,P=0;P<y.length;P++){var O=a.parse(e,y[P],n,"multiple");R=R||E(O.value),b.push(O.value),x.push(null!=O.pfValue?O.pfValue:O.value),w.push(O.units),C+=(P>0?" ":"")+O.strValue}return d.validate&&!d.validate(b,w)?null:d.singleEnum&&R?1===b.length&&E(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:x,strValue:C,bypass:n,units:w}}var M,j,z=function(){for(var r=0;r<d.enums.length;r++){if(d.enums[r]===t)return{name:e,value:t,strValue:""+t,bypass:n}}return null};if(d.number){var T,D="px";if(d.units&&(T=d.units),d.implicitUnits&&(D=d.implicitUnits),!d.unitless)if(l){var A="px|em"+(d.allowPercent?"|\\%":"");T&&(A=T);var N=t.match("^("+V+")("+A+")?$");N&&(t=N[1],T=N[2]||D)}else T&&!d.implicitUnits||(T=D);if(t=parseFloat(t),isNaN(t)&&void 0===d.enums)return null;if(isNaN(t)&&void 0!==d.enums)return t=i,z();if(d.integer&&(!S(j=t)||Math.floor(j)!==j))return null;if(void 0!==d.min&&(t<d.min||d.strictMin&&t===d.min)||void 0!==d.max&&(t>d.max||d.strictMax&&t===d.max))return null;var I={name:e,value:t,strValue:""+t+(T||""),units:T,bypass:n};return d.unitless||"px"!==T&&"em"!==T?I.pfValue=t:I.pfValue="px"!==T&&T?this.getEmSizeInPixels()*t:t,"ms"!==T&&"s"!==T||(I.pfValue="ms"===T?t:1e3*t),"deg"!==T&&"rad"!==T||(I.pfValue="rad"===T?t:(M=t,Math.PI*M/180)),"%"===T&&(I.pfValue=t/100),I}if(d.propList){var L=[],F=""+t;if("none"===F);else{for(var H=F.split(/\s*,\s*|\s+/),q=0;q<H.length;q++){var Y=H[q].trim();a.properties[Y]?L.push(Y):be("`"+Y+"` is not a valid property name")}if(0===L.length)return null}return{name:e,value:L,strValue:0===L.length?"none":L.join(" "),bypass:n}}if(d.color){var U=G(t);return U?{name:e,value:U,pfValue:U,strValue:"rgb("+U[0]+","+U[1]+","+U[2]+")",bypass:n}:null}if(d.regex||d.regexes){if(d.enums){var W=z();if(W)return W}for(var $=d.regexes?d.regexes:[d.regex],X=0;X<$.length;X++){var K=new RegExp($[X]).exec(t);if(K)return{name:e,value:d.singleRegexMatchValue?K[1]:K,strValue:""+t,bypass:n}}return null}return d.string?{name:e,value:""+t,strValue:""+t,bypass:n}:d.enums?z():null};var Wo=function e(t){if(!(this instanceof e))return new e(t);j(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):me("A style must have a core reference")},$o=Wo.prototype;$o.instanceString=function(){return"style"},$o.clear=function(){for(var e=this._private,t=e.cy.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,e.contextStyles={},e.propDiffs={},this.cleanElements(t,!0),t.forEach((function(e){var t=e[0]._private;t.styleDirty=!0,t.appliedInitStyle=!1})),this},$o.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},$o.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},$o.selector=function(e){var t="core"===e?null:new Nr(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},$o.css=function(){var e=this,t=arguments;if(1===t.length)for(var n=t[0],r=0;r<e.properties.length;r++){var a=e.properties[r],o=n[a.name];void 0===o&&(o=n[N(a.name)]),void 0!==o&&this.cssRule(a.name,o)}else 2===t.length&&this.cssRule(t[0],t[1]);return this},$o.style=$o.css,$o.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.mapped&&this[r].mappedProperties.push(n),!this[r].selector&&(this._private.coreStyle[n.name]=n)}return this},$o.append=function(e){return z(e)?e.appendToStyle(this):k(e)?this.appendFromJson(e):E(e)&&this.appendFromString(e),this},Wo.fromJson=function(e,t){var n=new Wo(e);return n.fromJson(t),n},Wo.fromString=function(e,t){return new Wo(e).fromString(t)},[Io,Vo,Fo,Ho,Go,qo,Yo,Uo].forEach((function(e){H($o,e)})),Wo.types=$o.types,Wo.properties=$o.properties,Wo.propertyGroups=$o.propertyGroups,Wo.propertyGroupNames=$o.propertyGroupNames,Wo.propertyGroupKeys=$o.propertyGroupKeys;var Xo={style:function(e){e&&this.setStyle(e).update();return this._private.style},setStyle:function(e){var t=this._private;return z(e)?t.style=e.generateStyle(this):k(e)?t.style=Wo.fromJson(this,e):E(e)?t.style=Wo.fromString(this,e):t.style=Wo(this),t.style},updateStyle:function(){this.mutableElements().updateStyle()}},Ko={autolock:function(e){return void 0===e?this._private.autolock:(this._private.autolock=!!e,this)},autoungrabify:function(e){return void 0===e?this._private.autoungrabify:(this._private.autoungrabify=!!e,this)},autounselectify:function(e){return void 0===e?this._private.autounselectify:(this._private.autounselectify=!!e,this)},selectionType:function(e){var t=this._private;return null==t.selectionType&&(t.selectionType="single"),void 0===e?t.selectionType:("additive"!==e&&"single"!==e||(t.selectionType=e),this)},panningEnabled:function(e){return void 0===e?this._private.panningEnabled:(this._private.panningEnabled=!!e,this)},userPanningEnabled:function(e){return void 0===e?this._private.userPanningEnabled:(this._private.userPanningEnabled=!!e,this)},zoomingEnabled:function(e){return void 0===e?this._private.zoomingEnabled:(this._private.zoomingEnabled=!!e,this)},userZoomingEnabled:function(e){return void 0===e?this._private.userZoomingEnabled:(this._private.userZoomingEnabled=!!e,this)},boxSelectionEnabled:function(e){return void 0===e?this._private.boxSelectionEnabled:(this._private.boxSelectionEnabled=!!e,this)},pan:function(){var e,t,n,r,a,o=arguments,i=this._private.pan;switch(o.length){case 0:return i;case 1:if(E(o[0]))return i[e=o[0]];if(C(o[0])){if(!this._private.panningEnabled)return this;r=(n=o[0]).x,a=n.y,S(r)&&(i.x=r),S(a)&&(i.y=a),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;e=o[0],t=o[1],"x"!==e&&"y"!==e||!S(t)||(i[e]=t),this.emit("pan viewport")}return this.notify("viewport"),this},panBy:function(e,t){var n,r,a,o,i,s=arguments,l=this._private.pan;if(!this._private.panningEnabled)return this;switch(s.length){case 1:C(e)&&(o=(a=s[0]).x,i=a.y,S(o)&&(l.x+=o),S(i)&&(l.y+=i),this.emit("pan viewport"));break;case 2:r=t,"x"!==(n=e)&&"y"!==n||!S(r)||(l[n]+=r),this.emit("pan viewport")}return this.notify("viewport"),this},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},getFitViewport:function(e,t){if(S(e)&&void 0===t&&(t=e,e=void 0),this._private.panningEnabled&&this._private.zoomingEnabled){var n,r;if(E(e)){var a=e;e=this.$(a)}else if(C(r=e)&&S(r.x1)&&S(r.x2)&&S(r.y1)&&S(r.y2)){var o=e;(n={x1:o.x1,y1:o.y1,x2:o.x2,y2:o.y2}).w=n.x2-n.x1,n.h=n.y2-n.y1}else P(e)||(e=this.mutableElements());if(!P(e)||!e.empty()){n=n||e.boundingBox();var i,s=this.width(),l=this.height();if(t=S(t)?t:0,!isNaN(s)&&!isNaN(l)&&s>0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:i=(i=(i=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:i)<this._private.minZoom?this._private.minZoom:i,pan:{x:(s-i*(n.x1+n.x2))/2,y:(l-i*(n.y1+n.y2))/2}}}}},zoomRange:function(e,t){var n=this._private;if(null==t){var r=e;e=r.min,t=r.max}return S(e)&&S(t)&&e<=t?(n.minZoom=e,n.maxZoom=t):S(e)&&void 0===t&&e<=n.maxZoom?n.minZoom=e:S(t)&&void 0===e&&t>=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,a=r.pan,o=r.zoom,i=!1;if(r.zoomingEnabled||(i=!0),S(e)?n=e:C(e)&&(n=e.level,null!=e.position?t=$e(e.position,o,a):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(i=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)<r.minZoom?r.minZoom:n,i||!S(n)||n===o||null!=t&&(!S(t.x)||!S(t.y)))return null;if(null!=t){var s=a,l=o,u=n;return{zoomed:!0,panned:!0,zoom:u,pan:{x:-u/l*(t.x-s.x)+t.x,y:-u/l*(t.y-s.y)+t.y}}}return{zoomed:!0,panned:!1,zoom:n,pan:a}},zoom:function(e){if(void 0===e)return this._private.zoom;var t=this.getZoomedViewport(e),n=this._private;return null!=t&&t.zoomed?(n.zoom=t.zoom,t.panned&&(n.pan.x=t.pan.x,n.pan.y=t.pan.y),this.emit("zoom"+(t.panned?" pan":"")+" viewport"),this.notify("viewport"),this):this},viewport:function(e){var t=this._private,n=!0,r=!0,a=[],o=!1,i=!1;if(!e)return this;if(S(e.zoom)||(n=!1),C(e.pan)||(r=!1),!n&&!r)return this;if(n){var s=e.zoom;s<t.minZoom||s>t.maxZoom||!t.zoomingEnabled?o=!0:(t.zoom=s,a.push("zoom"))}if(r&&(!o||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;S(l.x)&&(t.pan.x=l.x,i=!1),S(l.y)&&(t.pan.y=l.y,i=!1),i||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(E(e)){var n=e;e=this.mutableElements().filter(n)}else P(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),a=this.width(),o=this.height();return{x:(a-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(o-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=v.getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};Ko.centre=Ko.center,Ko.autolockNodes=Ko.autolock,Ko.autoungrabifyNodes=Ko.autoungrabify;var Zo={data:Jn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Jn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Jn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Jn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Zo.attr=Zo.data,Zo.removeAttr=Zo.removeData;var Qo=function(e){var t=this,n=(e=H({},e)).container;n&&!R(n)&&R(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var a=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var o=void 0!==v&&void 0!==n&&!e.headless,i=e;i.layout=H({name:o?"grid":"null"},i.layout),i.renderer=H({name:o?"canvas":"null"},i.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:i,elements:new vo(this),listeners:[],aniEles:new vo(this),data:i.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,i.zoomingEnabled),userZoomingEnabled:s(!0,i.userZoomingEnabled),panningEnabled:s(!0,i.panningEnabled),userPanningEnabled:s(!0,i.userPanningEnabled),boxSelectionEnabled:s(!0,i.boxSelectionEnabled),autolock:s(!1,i.autolock,i.autolockNodes),autoungrabify:s(!1,i.autoungrabify,i.autoungrabifyNodes),autounselectify:s(!1,i.autounselectify),styleEnabled:void 0===i.styleEnabled?o:i.styleEnabled,zoom:S(i.zoom)?i.zoom:1,pan:{x:C(i.pan)&&S(i.pan.x)?i.pan.x:0,y:C(i.pan)&&S(i.pan.y)?i.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,i.multiClickDebounceTime)};this.createEmitter(),this.selectionType(i.selectionType),this.zoomRange({min:i.minZoom,max:i.maxZoom});l.styleEnabled&&t.setStyle([]);var u=H({},i,i.renderer);t.initRenderer(u);!function(e,t){if(e.some(D))return Wn.all(e).then(t);t(e)}([i.style,i.elements],(function(e){var n=e[0],o=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var a=t.mutableElements();a.length>0&&a.remove(),null!=e&&(C(e)||k(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var o=H({},t._private.options.layout);o.eles=t.elements(),t.layout(o).run()}(o,(function(){t.startAnimationLoop(),l.ready=!0,_(i.ready)&&t.on("ready",i.ready);for(var e=0;e<a.length;e++){var n=a[e];t.on("ready",n)}r&&(r.readies=[]),t.emit("ready")}),i.done)}))},Jo=Qo.prototype;H(Jo,{instanceString:function(){return"core"},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},mount:function(e){if(null!=e){var t=this,n=t._private,r=n.options;return!R(e)&&R(e[0])&&(e=e[0]),t.stopAnimationLoop(),t.destroyRenderer(),n.container=e,n.styleEnabled=!0,t.invalidateSize(),t.initRenderer(H({},r,r.renderer,{name:"null"===r.renderer.name?"canvas":r.renderer.name})),t.startAnimationLoop(),t.style(r.style),t.emit("mount"),t}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},options:function(){return we(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements();if(C(e)){if(t.startBatch(),e.elements){var a={},o=function(e,n){for(var r=[],o=[],i=0;i<e.length;i++){var s=e[i];if(s.data.id){var l=""+s.data.id,u=t.getElementById(l);a[l]=!0,0!==u.length?o.push({ele:u,json:s}):n?(s.group=n,r.push(s)):r.push(s)}else be("cy.json() cannot handle elements without an ID attribute")}t.add(r);for(var c=0;c<o.length;c++){var d=o[c],f=d.ele,h=d.json;f.json(h)}};if(k(e.elements))o(e.elements);else for(var i=["nodes","edges"],s=0;s<i.length;s++){var l=i[s],u=e.elements[l];k(u)&&o(u,l)}var c=t.collection();r.filter((function(e){return!a[e.id()]})).forEach((function(e){e.isParent()?c.merge(e):e.remove()})),c.forEach((function(e){return e.children().move({parent:null})})),c.forEach((function(e){return function(e){return t.getElementById(e.id())}(e).remove()}))}e.style&&t.style(e.style),null!=e.zoom&&e.zoom!==n.zoom&&t.zoom(e.zoom),e.pan&&(e.pan.x===n.pan.x&&e.pan.y===n.pan.y||t.pan(e.pan)),e.data&&t.data(e.data);for(var d=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],f=0;f<d.length;f++){var h=d[f];null!=e[h]&&t[h](e[h])}return t.endBatch(),this}var p={};!!e?p.elements=this.elements().map((function(e){return e.json()})):(p.elements={},r.forEach((function(e){var t=e.group();p.elements[t]||(p.elements[t]=[]),p.elements[t].push(e.json())}))),this._private.styleEnabled&&(p.style=t.style().json()),p.data=we(t.data());var v=n.options;return p.zoomingEnabled=n.zoomingEnabled,p.userZoomingEnabled=n.userZoomingEnabled,p.zoom=n.zoom,p.minZoom=n.minZoom,p.maxZoom=n.maxZoom,p.panningEnabled=n.panningEnabled,p.userPanningEnabled=n.userPanningEnabled,p.pan=we(n.pan),p.boxSelectionEnabled=n.boxSelectionEnabled,p.renderer=we(v.renderer),p.hideEdgesOnViewport=v.hideEdgesOnViewport,p.textureOnViewport=v.textureOnViewport,p.wheelSensitivity=v.wheelSensitivity,p.motionBlur=v.motionBlur,p.multiClickDebounceTime=v.multiClickDebounceTime,p}}),Jo.$id=Jo.getElementById,[mo,Po,jo,zo,To,Do,Bo,No,Xo,Ko,Zo].forEach((function(e){H(Jo,e)}));var ei={fit:!0,directed:!1,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,maximal:!1,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},ti=function(e){return e.scratch("breadthfirst")},ni=function(e,t){return e.scratch("breadthfirst",t)};function ri(e){this.options=H({},ei,e)}ri.prototype.run=function(){var e,t=this.options,n=t,r=t.cy,a=n.eles,o=a.nodes().filter((function(e){return!e.isParent()})),i=a,s=n.directed,l=n.maximal||n.maximalAdjustments>0,u=it(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(P(n.roots))e=n.roots;else if(k(n.roots)){for(var c=[],d=0;d<n.roots.length;d++){var f=n.roots[d],h=r.getElementById(f);c.push(h)}e=r.collection(c)}else if(E(n.roots))e=r.$(n.roots);else if(s)e=o.roots();else{var p=a.components();e=r.collection();for(var v=function(t){var n=p[t],r=n.maxDegree(!1),a=n.filter((function(e){return e.degree(!1)===r}));e=e.add(a)},g=0;g<p.length;g++)v(g)}var m=[],y={},b=function(e,t){null==m[t]&&(m[t]=[]);var n=m[t].length;m[t].push(e),ni(e,{index:n,depth:t})};i.bfs({roots:e,directed:n.directed,visit:function(e,t,n,r,a){var o=e[0],i=o.id();b(o,a),y[i]=!0}});for(var w=[],x=0;x<o.length;x++){var _=o[x];y[_.id()]||w.push(_)}var C=function(e){for(var t=m[e],n=0;n<t.length;n++){var r=t[n];null!=r?ni(r,{depth:e,index:n}):(t.splice(n,1),n--)}},S=function(){for(var e=0;e<m.length;e++)C(e)},R=function(e,t){for(var n=ti(e),r=e.incomers().filter((function(e){return e.isNode()&&a.has(e)})),o=-1,i=e.id(),s=0;s<r.length;s++){var l=r[s],u=ti(l);o=Math.max(o,u.depth)}return n.depth<=o&&(t[i]?null:(function(e,t){var n=ti(e),r=n.depth,a=n.index;m[r][a]=null,b(e,t)}(e,o+1),t[i]=!0,!0))};if(s&&l){var O=[],M={},j=function(e){return O.push(e)};for(o.forEach((function(e){return O.push(e)}));O.length>0;){var z=O.shift(),T=R(z,M);if(T)z.outgoers().filter((function(e){return e.isNode()&&a.has(e)})).forEach(j);else if(null===T){be("Detected double maximal shift for node `"+z.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}S();var D=0;if(n.avoidOverlap)for(var A=0;A<o.length;A++){var B=o[A].layoutDimensions(n),N=B.w,I=B.h;D=Math.max(D,N,I)}var L={},V=function(e){if(L[e.id()])return L[e.id()];for(var t=ti(e).depth,n=e.neighborhood(),r=0,a=0,i=0;i<n.length;i++){var s=n[i];if(!s.isEdge()&&!s.isParent()&&o.has(s)){var l=ti(s);if(null!=l){var u=l.index,c=l.depth;if(null!=u&&null!=c){var d=m[c].length;c<t&&(r+=u/d,a++)}}}}return r/=a=Math.max(1,a),0===a&&(r=0),L[e.id()]=r,r},H=function(e,t){var n=V(e)-V(t);return 0===n?F(e.id(),t.id()):n};void 0!==n.depthSort&&(H=n.depthSort);for(var G=0;G<m.length;G++)m[G].sort(H),C(G);for(var q=[],Y=0;Y<w.length;Y++)q.push(w[Y]);m.unshift(q),S();for(var U=0,W=0;W<m.length;W++)U=Math.max(m[W].length,U);var $=u.x1+u.w/2,X=u.x1+u.h/2,K=m.reduce((function(e,t){return Math.max(e,t.length)}),0);return a.nodes().layoutPositions(this,n,(function(e){var t=ti(e),r=t.depth,a=t.index,o=m[r].length,i=Math.max(u.w/((n.grid?K:o)+1),D),s=Math.max(u.h/(m.length+1),D),l=Math.min(u.w/2/m.length,u.h/2/m.length);if(l=Math.max(l,D),n.circle){var c=l*r+l-(m.length>0&&m[0].length<=3?l/2:0),d=2*Math.PI/m[r].length*a;return 0===r&&1===m[0].length&&(c=1),{x:$+c*Math.cos(d),y:X+c*Math.sin(d)}}return{x:$+(a+1-(o+1)/2)*i,y:(r+1)*s}})),this};var ai={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function oi(e){this.options=H({},ai,e)}oi.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,o=r.nodes().not(":parent");t.sort&&(o=o.sort(t.sort));for(var i,s=it(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/o.length:t.sweep)/Math.max(1,o.length-1),d=0,f=0;f<o.length;f++){var h=o[f].layoutDimensions(t),p=h.w,v=h.h;d=Math.max(d,p,v)}if(i=S(t.radius)?t.radius:o.length<=1?0:Math.min(s.h,s.w)/2-d,o.length>1&&t.avoidOverlap){d*=1.75;var g=Math.cos(c)-Math.cos(0),m=Math.sin(c)-Math.sin(0),y=Math.sqrt(d*d/(g*g+m*m));i=Math.max(y,i)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*c*(a?1:-1),o=i*Math.cos(r),s=i*Math.sin(r);return{x:l+o,y:u+s}})),this};var ii,si={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function li(e){this.options=H({},si,e)}li.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,a=t.eles,o=a.nodes().not(":parent"),i=it(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=i.x1+i.w/2,l=i.y1+i.h/2,u=[],c=0,d=0;d<o.length;d++){var f,h=o[d];f=t.concentric(h),u.push({value:f,node:h}),h._private.scratch.concentric=f}o.updateStyle();for(var p=0;p<o.length;p++){var v=o[p].layoutDimensions(t);c=Math.max(c,v.w,v.h)}u.sort((function(e,t){return t.value-e.value}));for(var g=t.levelWidth(o),m=[[]],y=m[0],b=0;b<u.length;b++){var w=u[b];if(y.length>0)Math.abs(y[0].value-w.value)>=g&&(y=[],m.push(y));y.push(w)}var x=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=m.length>0&&m[0].length>1,_=(Math.min(i.w,i.h)/2-x)/(m.length+E?1:0);x=Math.min(x,_)}for(var k=0,C=0;C<m.length;C++){var S=m[C],R=void 0===t.sweep?2*Math.PI-2*Math.PI/S.length:t.sweep,P=S.dTheta=R/Math.max(1,S.length-1);if(S.length>1&&t.avoidOverlap){var O=Math.cos(P)-Math.cos(0),M=Math.sin(P)-Math.sin(0),j=Math.sqrt(x*x/(O*O+M*M));k=Math.max(j,k)}S.r=k,k+=x}if(t.equidistant){for(var z=0,T=0,D=0;D<m.length;D++){var A=m[D].r-T;z=Math.max(z,A)}T=0;for(var B=0;B<m.length;B++){var N=m[B];0===B&&(T=N.r),N.r=T,T+=z}}for(var I={},L=0;L<m.length;L++)for(var V=m[L],F=V.dTheta,H=V.r,G=0;G<V.length;G++){var q=V[G],Y=t.startAngle+(n?1:-1)*F*G,U={x:s+H*Math.cos(Y),y:l+H*Math.sin(Y)};I[q.node.id()]=U}return a.nodes().layoutPositions(this,t,(function(e){var t=e.id();return I[t]})),this};var ui={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,t){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function ci(e){this.options=H({},ui,e),this.options.layout=this}ci.prototype.run=function(){var e=this.options,t=e.cy,n=this;n.stopped=!1,!0!==e.animate&&!1!==e.animate||n.emit({type:"layoutstart",layout:n}),ii=!0===e.debug;var r=di(t,n,e);ii&&undefined(r),e.randomize&&pi(r);var a=Z(),o=function(){gi(r,t,e),!0===e.fit&&t.fit(e.padding)},i=function(t){return!(n.stopped||t>=e.numIter)&&(mi(r,e),r.temperature=r.temperature*e.coolingFactor,!(r.temperature<e.minTemp))},s=function(){if(!0===e.animate||!1===e.animate)o(),n.one("layoutstop",e.stop),n.emit({type:"layoutstop",layout:n});else{var t=e.eles.nodes(),a=vi(r,e,t);t.layoutPositions(n,e,a)}},l=0,u=!0;if(!0===e.animate){!function t(){for(var n=0;u&&n<e.refresh;)u=i(l),l++,n++;u?(Z()-a>=e.animationThreshold&&o(),K(t)):(Oi(r,e),s())}()}else{for(;u;)u=i(l),l++;Oi(r,e),s()}return this},ci.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},ci.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var di=function(e,t,n){for(var r=n.eles.edges(),a=n.eles.nodes(),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:e.width(),clientHeight:e.width(),boundingBox:it(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()})},i=n.eles.components(),s={},l=0;l<i.length;l++)for(var u=i[l],c=0;c<u.length;c++){s[u[c].id()]=l}for(l=0;l<o.nodeSize;l++){var d=(g=a[l]).layoutDimensions(n);(T={}).isLocked=g.locked(),T.id=g.data("id"),T.parentId=g.data("parent"),T.cmptId=s[g.id()],T.children=[],T.positionX=g.position("x"),T.positionY=g.position("y"),T.offsetX=0,T.offsetY=0,T.height=d.w,T.width=d.h,T.maxX=T.positionX+T.width/2,T.minX=T.positionX-T.width/2,T.maxY=T.positionY+T.height/2,T.minY=T.positionY-T.height/2,T.padLeft=parseFloat(g.style("padding")),T.padRight=parseFloat(g.style("padding")),T.padTop=parseFloat(g.style("padding")),T.padBottom=parseFloat(g.style("padding")),T.nodeRepulsion=_(n.nodeRepulsion)?n.nodeRepulsion(g):n.nodeRepulsion,o.layoutNodes.push(T),o.idToIndex[T.id]=l}var f=[],h=0,p=-1,v=[];for(l=0;l<o.nodeSize;l++){var g,m=(g=o.layoutNodes[l]).parentId;null!=m?o.layoutNodes[o.idToIndex[m]].children.push(g.id):(f[++p]=g.id,v.push(g.id))}for(o.graphSet.push(v);h<=p;){var y=f[h++],b=o.idToIndex[y],w=o.layoutNodes[b].children;if(w.length>0){o.graphSet.push(w);for(l=0;l<w.length;l++)f[++p]=w[l]}}for(l=0;l<o.graphSet.length;l++){var x=o.graphSet[l];for(c=0;c<x.length;c++){var E=o.idToIndex[x[c]];o.indexToGraph[E]=l}}for(l=0;l<o.edgeSize;l++){var k=r[l],C={};C.id=k.data("id"),C.sourceId=k.data("source"),C.targetId=k.data("target");var S=_(n.idealEdgeLength)?n.idealEdgeLength(k):n.idealEdgeLength,R=_(n.edgeElasticity)?n.edgeElasticity(k):n.edgeElasticity,P=o.idToIndex[C.sourceId],O=o.idToIndex[C.targetId];if(o.indexToGraph[P]!=o.indexToGraph[O]){for(var M=fi(C.sourceId,C.targetId,o),j=o.graphSet[M],z=0,T=o.layoutNodes[P];-1===j.indexOf(T.id);)T=o.layoutNodes[o.idToIndex[T.parentId]],z++;for(T=o.layoutNodes[O];-1===j.indexOf(T.id);)T=o.layoutNodes[o.idToIndex[T.parentId]],z++;S*=z*n.nestingFactor}C.idealLength=S,C.elasticity=R,o.layoutEdges.push(C)}return o},fi=function(e,t,n){var r=hi(e,t,0,n);return 2>r.count?0:r.graph},hi=function e(t,n,r,a){var o=a.graphSet[r];if(-1<o.indexOf(t)&&-1<o.indexOf(n))return{count:2,graph:r};for(var i=0,s=0;s<o.length;s++){var l=o[s],u=a.idToIndex[l],c=a.layoutNodes[u].children;if(0!==c.length){var d=e(t,n,a.indexToGraph[a.idToIndex[c[0]]],a);if(0!==d.count){if(1!==d.count)return d;if(2===++i)break}}}return{count:i,graph:r}},pi=function(e,t){for(var n=e.clientWidth,r=e.clientHeight,a=0;a<e.nodeSize;a++){var o=e.layoutNodes[a];0!==o.children.length||o.isLocked||(o.positionX=Math.random()*n,o.positionY=Math.random()*r)}},vi=function(e,t,n){var r=e.boundingBox,a={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return t.boundingBox&&(n.forEach((function(t){var n=e.layoutNodes[e.idToIndex[t.data("id")]];a.x1=Math.min(a.x1,n.positionX),a.x2=Math.max(a.x2,n.positionX),a.y1=Math.min(a.y1,n.positionY),a.y2=Math.max(a.y2,n.positionY)})),a.w=a.x2-a.x1,a.h=a.y2-a.y1),function(n,o){var i=e.layoutNodes[e.idToIndex[n.data("id")]];if(t.boundingBox){var s=(i.positionX-a.x1)/a.w,l=(i.positionY-a.y1)/a.h;return{x:r.x1+s*r.w,y:r.y1+l*r.h}}return{x:i.positionX,y:i.positionY}}},gi=function(e,t,n){var r=n.layout,a=n.eles.nodes(),o=vi(e,n,a);a.positions(o),!0!==e.ready&&(e.ready=!0,r.one("layoutready",n.ready),r.emit({type:"layoutready",layout:this}))},mi=function(e,t,n){yi(e,t),_i(e),ki(e,t),Ci(e),Si(e)},yi=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var r=e.graphSet[n],a=r.length,o=0;o<a;o++)for(var i=e.layoutNodes[e.idToIndex[r[o]]],s=o+1;s<a;s++){var l=e.layoutNodes[e.idToIndex[r[s]]];wi(i,l,e,t)}},bi=function(e){return-e+2*e*Math.random()},wi=function(e,t,n,r){if(e.cmptId===t.cmptId||n.isCompound){var a=t.positionX-e.positionX,o=t.positionY-e.positionY;0===a&&0===o&&(a=bi(1),o=bi(1));var i=xi(e,t,a,o);if(i>0)var s=(u=r.nodeOverlap*i)*a/(v=Math.sqrt(a*a+o*o)),l=u*o/v;else{var u,c=Ei(e,a,o),d=Ei(t,-1*a,-1*o),f=d.x-c.x,h=d.y-c.y,p=f*f+h*h,v=Math.sqrt(p);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/p)*f/v,l=u*h/v}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},xi=function(e,t,n,r){if(n>0)var a=e.maxX-t.minX;else a=t.maxX-e.minX;if(r>0)var o=e.maxY-t.minY;else o=t.maxY-e.minY;return a>=0&&o>=0?Math.sqrt(a*a+o*o):0},Ei=function(e,t,n){var r=e.positionX,a=e.positionY,o=e.height||1,i=e.width||1,s=n/t,l=o/i,u={};return 0===t&&0<n||0===t&&0>n?(u.x=r,u.y=a+o/2,u):0<t&&-1*l<=s&&s<=l?(u.x=r+i/2,u.y=a+i*n/2/t,u):0>t&&-1*l<=s&&s<=l?(u.x=r-i/2,u.y=a-i*n/2/t,u):0<n&&(s<=-1*l||s>=l)?(u.x=r+o*t/2/n,u.y=a+o/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-o*t/2/n,u.y=a-o/2,u):u},_i=function(e,t){for(var n=0;n<e.edgeSize;n++){var r=e.layoutEdges[n],a=e.idToIndex[r.sourceId],o=e.layoutNodes[a],i=e.idToIndex[r.targetId],s=e.layoutNodes[i],l=s.positionX-o.positionX,u=s.positionY-o.positionY;if(0!==l||0!==u){var c=Ei(o,l,u),d=Ei(s,-1*l,-1*u),f=d.x-c.x,h=d.y-c.y,p=Math.sqrt(f*f+h*h),v=Math.pow(r.idealLength-p,2)/r.elasticity;if(0!==p)var g=v*f/p,m=v*h/p;else g=0,m=0;o.isLocked||(o.offsetX+=g,o.offsetY+=m),s.isLocked||(s.offsetX-=g,s.offsetY-=m)}}},ki=function(e,t){if(0!==t.gravity)for(var n=0;n<e.graphSet.length;n++){var r=e.graphSet[n],a=r.length;if(0===n)var o=e.clientHeight/2,i=e.clientWidth/2;else{var s=e.layoutNodes[e.idToIndex[r[0]]],l=e.layoutNodes[e.idToIndex[s.parentId]];o=l.positionX,i=l.positionY}for(var u=0;u<a;u++){var c=e.layoutNodes[e.idToIndex[r[u]]];if(!c.isLocked){var d=o-c.positionX,f=i-c.positionY,h=Math.sqrt(d*d+f*f);if(h>1){var p=t.gravity*d/h,v=t.gravity*f/h;c.offsetX+=p,c.offsetY+=v}}}}},Ci=function(e,t){var n=[],r=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;r<=a;){var o=n[r++],i=e.idToIndex[o],s=e.layoutNodes[i],l=s.children;if(0<l.length&&!s.isLocked){for(var u=s.offsetX,c=s.offsetY,d=0;d<l.length;d++){var f=e.layoutNodes[e.idToIndex[l[d]]];f.offsetX+=u,f.offsetY+=c,n[++a]=l[d]}s.offsetX=0,s.offsetY=0}}},Si=function(e,t){for(var n=0;n<e.nodeSize;n++){0<(a=e.layoutNodes[n]).children.length&&(a.maxX=void 0,a.minX=void 0,a.maxY=void 0,a.minY=void 0)}for(n=0;n<e.nodeSize;n++){if(!(0<(a=e.layoutNodes[n]).children.length||a.isLocked)){var r=Ri(a.offsetX,a.offsetY,e.temperature);a.positionX+=r.x,a.positionY+=r.y,a.offsetX=0,a.offsetY=0,a.minX=a.positionX-a.width,a.maxX=a.positionX+a.width,a.minY=a.positionY-a.height,a.maxY=a.positionY+a.height,Pi(a,e)}}for(n=0;n<e.nodeSize;n++){var a;0<(a=e.layoutNodes[n]).children.length&&!a.isLocked&&(a.positionX=(a.maxX+a.minX)/2,a.positionY=(a.maxY+a.minY)/2,a.width=a.maxX-a.minX,a.height=a.maxY-a.minY)}},Ri=function(e,t,n){var r=Math.sqrt(e*e+t*t);if(r>n)var a={x:n*e/r,y:n*t/r};else a={x:e,y:t};return a},Pi=function e(t,n){var r=t.parentId;if(null!=r){var a=n.layoutNodes[n.idToIndex[r]],o=!1;return(null==a.maxX||t.maxX+a.padRight>a.maxX)&&(a.maxX=t.maxX+a.padRight,o=!0),(null==a.minX||t.minX-a.padLeft<a.minX)&&(a.minX=t.minX-a.padLeft,o=!0),(null==a.maxY||t.maxY+a.padBottom>a.maxY)&&(a.maxY=t.maxY+a.padBottom,o=!0),(null==a.minY||t.minY-a.padTop<a.minY)&&(a.minY=t.minY-a.padTop,o=!0),o?e(a,n):void 0}},Oi=function(e,t){for(var n=e.layoutNodes,r=[],a=0;a<n.length;a++){var o=n[a],i=o.cmptId;(r[i]=r[i]||[]).push(o)}var s=0;for(a=0;a<r.length;a++){if(v=r[a]){v.x1=1/0,v.x2=-1/0,v.y1=1/0,v.y2=-1/0;for(var l=0;l<v.length;l++){var u=v[l];v.x1=Math.min(v.x1,u.positionX-u.width/2),v.x2=Math.max(v.x2,u.positionX+u.width/2),v.y1=Math.min(v.y1,u.positionY-u.height/2),v.y2=Math.max(v.y2,u.positionY+u.height/2)}v.w=v.x2-v.x1,v.h=v.y2-v.y1,s+=v.w*v.h}}r.sort((function(e,t){return t.w*t.h-e.w*e.h}));var c=0,d=0,f=0,h=0,p=Math.sqrt(s)*e.clientWidth/e.clientHeight;for(a=0;a<r.length;a++){var v;if(v=r[a]){for(l=0;l<v.length;l++){(u=v[l]).isLocked||(u.positionX+=c-v.x1,u.positionY+=d-v.y1)}c+=v.w+t.componentSpacing,f+=v.w+t.componentSpacing,h=Math.max(h,v.h),f>p&&(d+=h+t.componentSpacing,c=0,f=0,h=0)}}},Mi={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function ji(e){this.options=H({},Mi,e)}ji.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));var o=it(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===o.h||0===o.w)r.nodes().layoutPositions(this,t,(function(e){return{x:o.x1,y:o.y1}}));else{var i=a.size(),s=Math.sqrt(i*o.h/o.w),l=Math.round(s),u=Math.round(o.w/o.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},f=t.rows,h=null!=t.cols?t.cols:t.columns;if(null!=f&&null!=h)l=f,u=h;else if(null!=f&&null==h)l=f,u=Math.ceil(i/l);else if(null==f&&null!=h)u=h,l=Math.ceil(i/u);else if(u*l>i){var p=c(),v=d();(p-1)*v>=i?c(p-1):(v-1)*p>=i&&d(v-1)}else for(;u*l<i;){var g=c(),m=d();(m+1)*g>=i?d(m+1):c(g+1)}var y=o.w/u,b=o.h/l;if(t.condense&&(y=0,b=0),t.avoidOverlap)for(var w=0;w<a.length;w++){var x=a[w],E=x._private.position;null!=E.x&&null!=E.y||(E.x=0,E.y=0);var _=x.layoutDimensions(t),k=t.avoidOverlapPadding,C=_.w+k,S=_.h+k;y=Math.max(y,C),b=Math.max(b,S)}for(var R={},P=function(e,t){return!!R["c-"+e+"-"+t]},O=function(e,t){R["c-"+e+"-"+t]=!0},M=0,j=0,z=function(){++j>=u&&(j=0,M++)},T={},D=0;D<a.length;D++){var A=a[D],B=t.position(A);if(B&&(void 0!==B.row||void 0!==B.col)){var N={row:B.row,col:B.col};if(void 0===N.col)for(N.col=0;P(N.row,N.col);)N.col++;else if(void 0===N.row)for(N.row=0;P(N.row,N.col);)N.row++;T[A.id()]=N,O(N.row,N.col)}}a.layoutPositions(this,t,(function(e,t){var n,r;if(e.locked()||e.isParent())return!1;var a=T[e.id()];if(a)n=a.col*y+y/2+o.x1,r=a.row*b+b/2+o.y1;else{for(;P(M,j);)z();n=j*y+y/2+o.x1,r=M*b+b/2+o.y1,O(M,j),z()}return{x:n,y:r}}))}return this};var zi={ready:function(){},stop:function(){}};function Ti(e){this.options=H({},zi,e)}Ti.prototype.run=function(){var e=this.options,t=e.eles,n=this;e.cy;return n.emit("layoutstart"),t.nodes().positions((function(){return{x:0,y:0}})),n.one("layoutready",e.ready),n.emit("layoutready"),n.one("layoutstop",e.stop),n.emit("layoutstop"),this},Ti.prototype.stop=function(){return this};var Di={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Ai(e){this.options=H({},Di,e)}Ai.prototype.run=function(){var e=this.options,t=e.eles.nodes(),n=_(e.positions);return t.layoutPositions(this,e,(function(t,r){var a=function(t){if(null==e.positions)return function(e){return{x:e.x,y:e.y}}(t.position());if(n)return e.positions(t);var r=e.positions[t._private.data.id];return null==r?null:r}(t);return!t.locked()&&null!=a&&a})),this};var Bi={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Ni(e){this.options=H({},Bi,e)}Ni.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,r=it(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});return n.nodes().layoutPositions(this,e,(function(e,t){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}})),this};var Ii=[{name:"breadthfirst",impl:ri},{name:"circle",impl:oi},{name:"concentric",impl:li},{name:"cose",impl:ci},{name:"grid",impl:ji},{name:"null",impl:Ti},{name:"preset",impl:Ai},{name:"random",impl:Ni}];function Li(e){this.options=e,this.notifications=0}var Vi=function(){},Fi=function(){throw new Error("A headless instance can not render images")};Li.prototype={recalculateRenderedStyle:Vi,notify:function(){this.notifications++},init:Vi,isHeadless:function(){return!0},png:Fi,jpg:Fi};var Hi={arrowShapeWidth:.3,registerArrowShapes:function(){var e=this.arrowShapes={},t=this,n=function(e,t,n,r,a,o,i){var s=a.x-n/2-i,l=a.x+n/2+i,u=a.y-n/2-i,c=a.y+n/2+i;return s<=e&&e<=l&&u<=t&&t<=c},r=function(e,t,n,r,a){var o=e*Math.cos(r)-t*Math.sin(r),i=(e*Math.sin(r)+t*Math.cos(r))*n;return{x:o*n+a.x,y:i+a.y}},a=function(e,t,n,a){for(var o=[],i=0;i<e.length;i+=2){var s=e[i],l=e[i+1];o.push(r(s,l,t,n,a))}return o},o=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r.x,r.y)}return t},i=function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").pfValue*2},s=function(r,s){E(s)&&(s=e[s]),e[r]=H({name:r,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(e,t,n,r,i,s){var l=o(a(this.points,n+2*s,r,i));return bt(e,t,l)},roughCollide:n,draw:function(e,n,r,o){var i=a(this.points,n,r,o);t.arrowShapeImpl("polygon")(e,i)},spacing:function(e){return 0},gap:i},s)};s("none",{collide:pe,roughCollide:pe,draw:ge,spacing:ve,gap:ve}),s("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),s("arrow","triangle"),s("triangle-backcurve",{points:e.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(e,n,o,i,s){var l=a(this.points,n,o,i),u=this.controlPoint,c=r(u[0],u[1],n,o,i);t.arrowShapeImpl(this.name)(e,l,c)},gap:function(e){return.8*i(e)}}),s("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(e,t,n,r,i,s,l){var u=o(a(this.points,n+2*l,r,i)),c=o(a(this.pointsTee,n+2*l,r,i));return bt(e,t,u)||bt(e,t,c)},draw:function(e,n,r,o,i){var s=a(this.points,n,r,o),l=a(this.pointsTee,n,r,o);t.arrowShapeImpl(this.name)(e,s,l)}}),s("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(e,t,n,r,i,s,l){var u=i,c=Math.pow(u.x-e,2)+Math.pow(u.y-t,2)<=Math.pow((n+2*l)*this.radius,2),d=o(a(this.points,n+2*l,r,i));return bt(e,t,d)||c},draw:function(e,n,r,o,i){var s=a(this.pointsTr,n,r,o);t.arrowShapeImpl(this.name)(e,s,o.x,o.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),s("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(e,t){var n=this.baseCrossLinePts.slice(),r=t/e;return n[3]=n[3]-r,n[5]=n[5]-r,n},collide:function(e,t,n,r,i,s,l){var u=o(a(this.points,n+2*l,r,i)),c=o(a(this.crossLinePts(n,s),n+2*l,r,i));return bt(e,t,u)||bt(e,t,c)},draw:function(e,n,r,o,i){var s=a(this.points,n,r,o),l=a(this.crossLinePts(n,i),n,r,o);t.arrowShapeImpl(this.name)(e,s,l)}}),s("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(e){return.525*i(e)}}),s("circle",{radius:.15,collide:function(e,t,n,r,a,o,i){var s=a;return Math.pow(s.x-e,2)+Math.pow(s.y-t,2)<=Math.pow((n+2*i)*this.radius,2)},draw:function(e,n,r,a,o){t.arrowShapeImpl(this.name)(e,a.x,a.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.radius}}),s("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(e){return 1},gap:function(e){return 1}}),s("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),s("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(e){return e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}}),s("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(e){return.95*e.pstyle("width").pfValue*e.pstyle("arrow-scale").value}})}},Gi={projectIntoViewport:function(e,t){var n=this.cy,r=this.findContainerClientCoords(),a=r[0],o=r[1],i=r[4],s=n.pan(),l=n.zoom();return[((e-a)/i-s.x)/l,((t-o)/i-s.y)/l]},findContainerClientCoords:function(){if(this.containerBB)return this.containerBB;var e=this.container,t=e.getBoundingClientRect(),n=v.getComputedStyle(e),r=function(e){return parseFloat(n.getPropertyValue(e))},a=r("padding-left"),o=r("padding-right"),i=r("padding-top"),s=r("padding-bottom"),l=r("border-left-width"),u=r("border-right-width"),c=r("border-top-width"),d=(r("border-bottom-width"),e.clientWidth),f=e.clientHeight,h=a+o,p=i+s,g=l+u,m=t.width/(d+g),y=d-h,b=f-p,w=t.left+a+l,x=t.top+i+c;return this.containerBB=[w,x,y,b,m]},invalidateContainerClientCoordsCache:function(){this.containerBB=null},findNearestElement:function(e,t,n,r){return this.findNearestElements(e,t,n,r)[0]},findNearestElements:function(e,t,n,r){var a,o,i=this,s=this,l=s.getCachedZSortedEles(),u=[],c=s.cy.zoom(),d=s.cy.hasCompoundNodes(),f=(r?24:8)/c,h=(r?8:2)/c,p=(r?8:2)/c,v=1/0;function g(e,t){if(e.isNode()){if(o)return;o=e,u.push(e)}if(e.isEdge()&&(null==t||t<v))if(a){if(a.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value&&a.pstyle("z-compound-depth").value===e.pstyle("z-compound-depth").value)for(var n=0;n<u.length;n++)if(u[n].isEdge()){u[n]=e,a=e,v=null!=t?t:v;break}}else u.push(e),a=e,v=null!=t?t:v}function m(n){var r=n.outerWidth()+2*h,a=n.outerHeight()+2*h,o=r/2,l=a/2,u=n.position();if(u.x-o<=e&&e<=u.x+o&&u.y-l<=t&&t<=u.y+l&&s.nodeShapes[i.getNodeShape(n)].checkPoint(e,t,0,r,a,u.x,u.y))return g(n,0),!0}function y(n){var r,a=n._private,o=a.rscratch,l=n.pstyle("width").pfValue,c=n.pstyle("arrow-scale").value,h=l/2+f,p=h*h,v=2*h,y=a.source,b=a.target;if("segments"===o.edgeType||"straight"===o.edgeType||"haystack"===o.edgeType){for(var w=o.allpts,x=0;x+3<w.length;x+=2)if(vt(e,t,w[x],w[x+1],w[x+2],w[x+3],v)&&p>(r=yt(e,t,w[x],w[x+1],w[x+2],w[x+3])))return g(n,r),!0}else if("bezier"===o.edgeType||"multibezier"===o.edgeType||"self"===o.edgeType||"compound"===o.edgeType)for(w=o.allpts,x=0;x+5<o.allpts.length;x+=4)if(gt(e,t,w[x],w[x+1],w[x+2],w[x+3],w[x+4],w[x+5],v)&&p>(r=mt(e,t,w[x],w[x+1],w[x+2],w[x+3],w[x+4],w[x+5])))return g(n,r),!0;y=y||a.source,b=b||a.target;var E=i.getArrowWidth(l,c),_=[{name:"source",x:o.arrowStartX,y:o.arrowStartY,angle:o.srcArrowAngle},{name:"target",x:o.arrowEndX,y:o.arrowEndY,angle:o.tgtArrowAngle},{name:"mid-source",x:o.midX,y:o.midY,angle:o.midsrcArrowAngle},{name:"mid-target",x:o.midX,y:o.midY,angle:o.midtgtArrowAngle}];for(x=0;x<_.length;x++){var k=_[x],C=s.arrowShapes[n.pstyle(k.name+"-arrow-shape").value],S=n.pstyle("width").pfValue;if(C.roughCollide(e,t,E,k.angle,{x:k.x,y:k.y},S,f)&&C.collide(e,t,E,k.angle,{x:k.x,y:k.y},S,f))return g(n),!0}d&&u.length>0&&(m(y),m(b))}function b(e,t,n){return Re(e,t,n)}function w(n,r){var a,o=n._private,i=p;a=r?r+"-":"",n.boundingBox();var s=o.labelBounds[r||"main"],l=n.pstyle(a+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(o.rscratch,"labelX",r),c=b(o.rscratch,"labelY",r),d=b(o.rscratch,"labelAngle",r),f=n.pstyle(a+"text-margin-x").pfValue,h=n.pstyle(a+"text-margin-y").pfValue,v=s.x1-i-f,m=s.x2+i-f,y=s.y1-i-h,w=s.y2+i-h;if(d){var x=Math.cos(d),E=Math.sin(d),_=function(e,t){return{x:(e-=u)*x-(t-=c)*E+u,y:e*E+t*x+c}},k=_(v,y),C=_(v,w),S=_(m,y),R=_(m,w),P=[k.x+f,k.y+h,S.x+f,S.y+h,R.x+f,R.y+h,C.x+f,C.y+h];if(bt(e,t,P))return g(n),!0}else if(ft(s,e,t))return g(n),!0}}n&&(l=l.interactive);for(var x=l.length-1;x>=0;x--){var E=l[x];E.isNode()?m(E)||w(E):y(E)||w(E)||w(E,"source")||w(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var a,o,i=this.getCachedZSortedEles().interactive,s=[],l=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),d=Math.max(t,r),f=it({x1:e=l,y1:t=c,x2:n=u,y2:r=d}),h=0;h<i.length;h++){var p=i[h];if(p.isNode()){var v=p,g=v.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:!1});dt(f,g)&&!ht(g,f)&&s.push(v)}else{var m=p,y=m._private,b=y.rscratch;if(null!=b.startX&&null!=b.startY&&!ft(f,b.startX,b.startY))continue;if(null!=b.endX&&null!=b.endY&&!ft(f,b.endX,b.endY))continue;if("bezier"===b.edgeType||"multibezier"===b.edgeType||"self"===b.edgeType||"compound"===b.edgeType||"segments"===b.edgeType||"haystack"===b.edgeType){for(var w=y.rstyle.bezierPts||y.rstyle.linePts||y.rstyle.haystackPts,x=!0,E=0;E<w.length;E++)if(a=f,o=w[E],!ft(a,o.x,o.y)){x=!1;break}x&&s.push(m)}else"haystack"!==b.edgeType&&"straight"!==b.edgeType||s.push(m)}}return s}},qi={calculateArrowAngles:function(e){var t,n,r,a,o,i,s=e._private.rscratch,l="haystack"===s.edgeType,u="bezier"===s.edgeType,c="multibezier"===s.edgeType,d="segments"===s.edgeType,f="compound"===s.edgeType,h="self"===s.edgeType;if(l?(r=s.haystackPts[0],a=s.haystackPts[1],o=s.haystackPts[2],i=s.haystackPts[3]):(r=s.arrowStartX,a=s.arrowStartY,o=s.arrowEndX,i=s.arrowEndY),v=s.midX,g=s.midY,d)t=r-s.segpts[0],n=a-s.segpts[1];else if(c||f||h||u){var p=s.allpts;t=r-rt(p[0],p[2],p[4],.1),n=a-rt(p[1],p[3],p[5],.1)}else t=r-v,n=a-g;s.srcArrowAngle=Ze(t,n);var v=s.midX,g=s.midY;if(l&&(v=(r+o)/2,g=(a+i)/2),t=o-r,n=i-a,d)if((p=s.allpts).length/2%2==0){var m=(y=p.length/2)-2;t=p[y]-p[m],n=p[y+1]-p[m+1]}else{m=(y=p.length/2-1)-2;var y,b=y+2;t=p[y]-p[m],n=p[y+1]-p[m+1]}else if(c||f||h){var w,x,E,_,p=s.allpts;if(s.ctrlpts.length/2%2==0){var k=(C=(S=p.length/2-1)+2)+2;w=rt(p[S],p[C],p[k],0),x=rt(p[S+1],p[C+1],p[k+1],0),E=rt(p[S],p[C],p[k],1e-4),_=rt(p[S+1],p[C+1],p[k+1],1e-4)}else{var C,S;k=(C=p.length/2-1)+2;w=rt(p[S=C-2],p[C],p[k],.4999),x=rt(p[S+1],p[C+1],p[k+1],.4999),E=rt(p[S],p[C],p[k],.5),_=rt(p[S+1],p[C+1],p[k+1],.5)}t=E-w,n=_-x}(s.midtgtArrowAngle=Ze(t,n),s.midDispX=t,s.midDispY=n,t*=-1,n*=-1,d)&&((p=s.allpts).length/2%2==0||(t=-(p[b=(y=p.length/2-1)+2]-p[y]),n=-(p[b+1]-p[y+1])));if(s.midsrcArrowAngle=Ze(t,n),d)t=o-s.segpts[s.segpts.length-2],n=i-s.segpts[s.segpts.length-1];else if(c||f||h||u){var R=(p=s.allpts).length;t=o-rt(p[R-6],p[R-4],p[R-2],.9),n=i-rt(p[R-5],p[R-3],p[R-1],.9)}else t=o-v,n=i-g;s.tgtArrowAngle=Ze(t,n)}};qi.getArrowWidth=qi.getArrowHeight=function(e,t){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[e+", "+t];return r||(r=Math.max(Math.pow(13.37*e,.9),29)*t,n[e+", "+t]=r,r)};var Yi={};function Ui(e){var t=[];if(null!=e){for(var n=0;n<e.length;n+=2){var r=e[n],a=e[n+1];t.push({x:r,y:a})}return t}}Yi.findHaystackPoints=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n._private,a=r.rscratch;if(!a.haystack){var o=2*Math.random()*Math.PI;a.source={x:Math.cos(o),y:Math.sin(o)},o=2*Math.random()*Math.PI,a.target={x:Math.cos(o),y:Math.sin(o)}}var i=r.source,s=r.target,l=i.position(),u=s.position(),c=i.width(),d=s.width(),f=i.height(),h=s.height(),p=n.pstyle("haystack-radius").value/2;a.haystackPts=a.allpts=[a.source.x*c*p+l.x,a.source.y*f*p+l.y,a.target.x*d*p+u.x,a.target.y*h*p+u.y],a.midX=(a.allpts[0]+a.allpts[2])/2,a.midY=(a.allpts[1]+a.allpts[3])/2,a.edgeType="haystack",a.haystack=!0,this.storeEdgeProjections(n),this.calculateArrowAngles(n),this.recalculateEdgeLabelProjections(n),this.calculateLabelAngles(n)}},Yi.findSegmentsPoints=function(e,t){var n=e._private.rscratch,r=t.posPts,a=t.intersectionPts,o=t.vectorNormInverse,i=e.pstyle("edge-distances").value,s=e.pstyle("segment-weights"),l=e.pstyle("segment-distances"),u=Math.min(s.pfValue.length,l.pfValue.length);n.edgeType="segments",n.segpts=[];for(var c=0;c<u;c++){var d=s.pfValue[c],f=l.pfValue[c],h=1-d,p=d,v="node-position"===i?r:a,g={x:v.x1*h+v.x2*p,y:v.y1*h+v.y2*p};n.segpts.push(g.x+o.x*f,g.y+o.y*f)}},Yi.findLoopPoints=function(e,t,n,r){var a=e._private.rscratch,o=t.dirCounts,i=t.srcPos,s=e.pstyle("control-point-distances"),l=s?s.pfValue[0]:void 0,u=e.pstyle("loop-direction").pfValue,c=e.pstyle("loop-sweep").pfValue,d=e.pstyle("control-point-step-size").pfValue;a.edgeType="self";var f=n,h=d;r&&(f=0,h=l);var p=u-Math.PI/2,v=p-c/2,g=p+c/2,m=String(u+"_"+c);f=void 0===o[m]?o[m]=0:++o[m],a.ctrlpts=[i.x+1.4*Math.cos(v)*h*(f/3+1),i.y+1.4*Math.sin(v)*h*(f/3+1),i.x+1.4*Math.cos(g)*h*(f/3+1),i.y+1.4*Math.sin(g)*h*(f/3+1)]},Yi.findCompoundLoopPoints=function(e,t,n,r){var a=e._private.rscratch;a.edgeType="compound";var o=t.srcPos,i=t.tgtPos,s=t.srcW,l=t.srcH,u=t.tgtW,c=t.tgtH,d=e.pstyle("control-point-step-size").pfValue,f=e.pstyle("control-point-distances"),h=f?f.pfValue[0]:void 0,p=n,v=d;r&&(p=0,v=h);var g={x:o.x-s/2,y:o.y-l/2},m={x:i.x-u/2,y:i.y-c/2},y={x:Math.min(g.x,m.x),y:Math.min(g.y,m.y)},b=Math.max(.5,Math.log(.01*s)),w=Math.max(.5,Math.log(.01*u));a.ctrlpts=[y.x,y.y-(1+Math.pow(50,1.12)/100)*v*(p/3+1)*b,y.x-(1+Math.pow(50,1.12)/100)*v*(p/3+1)*w,y.y]},Yi.findStraightEdgePoints=function(e){e._private.rscratch.edgeType="straight"},Yi.findBezierPoints=function(e,t,n,r,a){var o=e._private.rscratch,i=t.vectorNormInverse,s=t.posPts,l=t.intersectionPts,u=e.pstyle("edge-distances").value,c=e.pstyle("control-point-step-size").pfValue,d=e.pstyle("control-point-distances"),f=e.pstyle("control-point-weights"),h=d&&f?Math.min(d.value.length,f.value.length):1,p=d?d.pfValue[0]:void 0,v=f.value[0],g=r;o.edgeType=g?"multibezier":"bezier",o.ctrlpts=[];for(var m=0;m<h;m++){var y=(.5-t.eles.length/2+n)*c*(a?-1:1),b=void 0,w=Je(y);g&&(p=d?d.pfValue[m]:c,v=f.value[m]);var x=void 0!==(b=r?p:void 0!==p?w*p:void 0)?b:y,E=1-v,_=v,k="node-position"===u?s:l,C={x:k.x1*E+k.x2*_,y:k.y1*E+k.y2*_};o.ctrlpts.push(C.x+i.x*x,C.y+i.y*x)}},Yi.findTaxiPoints=function(e,t){var n=e._private.rscratch;n.edgeType="segments";var r="vertical",a="horizontal",o="leftward",i="rightward",s="downward",l="upward",u=t.posPts,c=t.srcW,d=t.srcH,f=t.tgtW,h=t.tgtH,p="node-position"!==e.pstyle("edge-distances").value,v=e.pstyle("taxi-direction").value,g=v,m=e.pstyle("taxi-turn"),y="%"===m.units,b=m.pfValue,w=b<0,x=e.pstyle("taxi-turn-min-distance").pfValue,E=p?(c+f)/2:0,_=p?(d+h)/2:0,k=u.x2-u.x1,C=u.y2-u.y1,S=function(e,t){return e>0?Math.max(e-t,0):Math.min(e+t,0)},R=S(k,E),P=S(C,_),O=!1;"auto"===g?v=Math.abs(R)>Math.abs(P)?a:r:g===l||g===s?(v=r,O=!0):g!==o&&g!==i||(v=a,O=!0);var M,j=v===r,z=j?P:R,T=j?C:k,D=Je(T),A=!1;(O&&(y||w)||!(g===s&&T<0||g===l&&T>0||g===o&&T>0||g===i&&T<0)||(z=(D*=-1)*Math.abs(z),A=!0),y)?M=(b<0?1+b:b)*z:M=(b<0?z:0)+b*D;var B=function(e){return Math.abs(e)<x||Math.abs(e)>=Math.abs(z)},N=B(M),I=B(Math.abs(z)-Math.abs(M));if((N||I)&&!A)if(j){var L=Math.abs(T)<=d/2,V=Math.abs(k)<=f/2;if(L){var F=(u.x1+u.x2)/2,H=u.y1,G=u.y2;n.segpts=[F,H,F,G]}else if(V){var q=(u.y1+u.y2)/2,Y=u.x1,U=u.x2;n.segpts=[Y,q,U,q]}else n.segpts=[u.x1,u.y2]}else{var W=Math.abs(T)<=c/2,$=Math.abs(C)<=h/2;if(W){var X=(u.y1+u.y2)/2,K=u.x1,Z=u.x2;n.segpts=[K,X,Z,X]}else if($){var Q=(u.x1+u.x2)/2,J=u.y1,ee=u.y2;n.segpts=[Q,J,Q,ee]}else n.segpts=[u.x2,u.y1]}else if(j){var te=u.y1+M+(p?d/2*D:0),ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else{var ae=u.x1+M+(p?c/2*D:0),oe=u.y1,ie=u.y2;n.segpts=[ae,oe,ae,ie]}},Yi.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,a=t.tgtPos,o=t.srcW,i=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,d=!S(n.startX)||!S(n.startY),f=!S(n.arrowStartX)||!S(n.arrowStartY),h=!S(n.endX)||!S(n.endY),p=!S(n.arrowEndX)||!S(n.arrowEndY),v=3*(this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth),g=et({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),m=g<v,y=et({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.endX,y:n.endY}),b=y<v,w=!1;if(d||f||m){w=!0;var x={x:n.ctrlpts[0]-r.x,y:n.ctrlpts[1]-r.y},E=Math.sqrt(x.x*x.x+x.y*x.y),_={x:x.x/E,y:x.y/E},k=Math.max(o,i),C={x:n.ctrlpts[0]+2*_.x*k,y:n.ctrlpts[1]+2*_.y*k},R=u.intersectLine(r.x,r.y,o,i,C.x,C.y,0);m?(n.ctrlpts[0]=n.ctrlpts[0]+_.x*(v-g),n.ctrlpts[1]=n.ctrlpts[1]+_.y*(v-g)):(n.ctrlpts[0]=R[0]+_.x*v,n.ctrlpts[1]=R[1]+_.y*v)}if(h||p||b){w=!0;var P={x:n.ctrlpts[0]-a.x,y:n.ctrlpts[1]-a.y},O=Math.sqrt(P.x*P.x+P.y*P.y),M={x:P.x/O,y:P.y/O},j=Math.max(o,i),z={x:n.ctrlpts[0]+2*M.x*j,y:n.ctrlpts[1]+2*M.y*j},T=c.intersectLine(a.x,a.y,s,l,z.x,z.y,0);b?(n.ctrlpts[0]=n.ctrlpts[0]+M.x*(v-y),n.ctrlpts[1]=n.ctrlpts[1]+M.y*(v-y)):(n.ctrlpts[0]=T[0]+M.x*v,n.ctrlpts[1]=T[1]+M.y*v)}w&&this.findEndpoints(e)}},Yi.storeAllpts=function(e){var t=e._private.rscratch;if("multibezier"===t.edgeType||"bezier"===t.edgeType||"self"===t.edgeType||"compound"===t.edgeType){t.allpts=[],t.allpts.push(t.startX,t.startY);for(var n=0;n+1<t.ctrlpts.length;n+=2)t.allpts.push(t.ctrlpts[n],t.ctrlpts[n+1]),n+3<t.ctrlpts.length&&t.allpts.push((t.ctrlpts[n]+t.ctrlpts[n+2])/2,(t.ctrlpts[n+1]+t.ctrlpts[n+3])/2);var r;t.allpts.push(t.endX,t.endY),t.ctrlpts.length/2%2==0?(r=t.allpts.length/2-1,t.midX=t.allpts[r],t.midY=t.allpts[r+1]):(r=t.allpts.length/2-3,.5,t.midX=rt(t.allpts[r],t.allpts[r+2],t.allpts[r+4],.5),t.midY=rt(t.allpts[r+1],t.allpts[r+3],t.allpts[r+5],.5))}else if("straight"===t.edgeType)t.allpts=[t.startX,t.startY,t.endX,t.endY],t.midX=(t.startX+t.endX+t.arrowStartX+t.arrowEndX)/4,t.midY=(t.startY+t.endY+t.arrowStartY+t.arrowEndY)/4;else if("segments"===t.edgeType)if(t.allpts=[],t.allpts.push(t.startX,t.startY),t.allpts.push.apply(t.allpts,t.segpts),t.allpts.push(t.endX,t.endY),t.segpts.length%4==0){var a=t.segpts.length/2,o=a-2;t.midX=(t.segpts[o]+t.segpts[a])/2,t.midY=(t.segpts[o+1]+t.segpts[a+1])/2}else{var i=t.segpts.length/2-1;t.midX=t.segpts[i],t.midY=t.segpts[i+1]}},Yi.checkForInvalidEdgeWarning=function(e){var t=e[0]._private.rscratch;t.nodesOverlap||S(t.startX)&&S(t.startY)&&S(t.endX)&&S(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,be("Edge `"+e.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},Yi.findEdgeControlPoints=function(e){var t=this;if(e&&0!==e.length){for(var n=this,r=n.cy.hasCompoundNodes(),a={map:new Oe,get:function(e){var t=this.map.get(e[0]);return null!=t?t.get(e[1]):null},set:function(e,t){var n=this.map.get(e[0]);null==n&&(n=new Oe,this.map.set(e[0],n)),n.set(e[1],t)}},o=[],i=[],s=0;s<e.length;s++){var l=e[s],u=l._private,c=l.pstyle("curve-style").value;if(!l.removed()&&l.takesUpSpace())if("haystack"!==c){var d="unbundled-bezier"===c||"segments"===c||"straight"===c||"straight-triangle"===c||"taxi"===c,f="unbundled-bezier"===c||"bezier"===c,h=u.source,p=u.target,v=[h.poolIndex(),p.poolIndex()].sort(),g=a.get(v);null==g&&(g={eles:[]},a.set(v,g),o.push(v)),g.eles.push(l),d&&(g.hasUnbundled=!0),f&&(g.hasBezier=!0)}else i.push(l)}for(var m=function(e){var i=o[e],s=a.get(i),l=void 0;if(!s.hasUnbundled){var u=s.eles[0].parallelEdges().filter((function(e){return e.isBundledBezier()}));Se(s.eles),u.forEach((function(e){return s.eles.push(e)})),s.eles.sort((function(e,t){return e.poolIndex()-t.poolIndex()}))}var c=s.eles[0],d=c.source(),f=c.target();if(d.poolIndex()>f.poolIndex()){var h=d;d=f,f=h}var p=s.srcPos=d.position(),v=s.tgtPos=f.position(),g=s.srcW=d.outerWidth(),m=s.srcH=d.outerHeight(),y=s.tgtW=f.outerWidth(),b=s.tgtH=f.outerHeight(),w=s.srcShape=n.nodeShapes[t.getNodeShape(d)],x=s.tgtShape=n.nodeShapes[t.getNodeShape(f)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var E=0;E<s.eles.length;E++){var _=s.eles[E],k=_[0]._private.rscratch,C=_.pstyle("curve-style").value,R="unbundled-bezier"===C||"segments"===C||"taxi"===C,P=!d.same(_.source());if(!s.calculatedIntersection&&d!==f&&(s.hasBezier||s.hasUnbundled)){s.calculatedIntersection=!0;var O=w.intersectLine(p.x,p.y,g,m,v.x,v.y,0),M=s.srcIntn=O,j=x.intersectLine(v.x,v.y,y,b,p.x,p.y,0),z=s.tgtIntn=j,T=s.intersectionPts={x1:O[0],x2:j[0],y1:O[1],y2:j[1]},D=s.posPts={x1:p.x,x2:v.x,y1:p.y,y2:v.y},A=j[1]-O[1],B=j[0]-O[0],N=Math.sqrt(B*B+A*A),I=s.vector={x:B,y:A},L=s.vectorNorm={x:I.x/N,y:I.y/N},V={x:-L.y,y:L.x};s.nodesOverlap=!S(N)||x.checkPoint(O[0],O[1],0,y,b,v.x,v.y)||w.checkPoint(j[0],j[1],0,g,m,p.x,p.y),s.vectorNormInverse=V,l={nodesOverlap:s.nodesOverlap,dirCounts:s.dirCounts,calculatedIntersection:!0,hasBezier:s.hasBezier,hasUnbundled:s.hasUnbundled,eles:s.eles,srcPos:v,tgtPos:p,srcW:y,srcH:b,tgtW:g,tgtH:m,srcIntn:z,tgtIntn:M,srcShape:x,tgtShape:w,posPts:{x1:D.x2,y1:D.y2,x2:D.x1,y2:D.y1},intersectionPts:{x1:T.x2,y1:T.y2,x2:T.x1,y2:T.y1},vector:{x:-I.x,y:-I.y},vectorNorm:{x:-L.x,y:-L.y},vectorNormInverse:{x:-V.x,y:-V.y}}}var F=P?l:s;k.nodesOverlap=F.nodesOverlap,k.srcIntn=F.srcIntn,k.tgtIntn=F.tgtIntn,r&&(d.isParent()||d.isChild()||f.isParent()||f.isChild())&&(d.parents().anySame(f)||f.parents().anySame(d)||d.same(f)&&d.isParent())?t.findCompoundLoopPoints(_,F,E,R):d===f?t.findLoopPoints(_,F,E,R):"segments"===C?t.findSegmentsPoints(_,F):"taxi"===C?t.findTaxiPoints(_,F):"straight"===C||!R&&s.eles.length%2==1&&E===Math.floor(s.eles.length/2)?t.findStraightEdgePoints(_):t.findBezierPoints(_,F,E,R,P),t.findEndpoints(_),t.tryToCorrectInvalidPoints(_,F),t.checkForInvalidEdgeWarning(_),t.storeAllpts(_),t.storeEdgeProjections(_),t.calculateArrowAngles(_),t.recalculateEdgeLabelProjections(_),t.calculateLabelAngles(_)}},y=0;y<o.length;y++)m(y);this.findHaystackPoints(i)}},Yi.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if("segments"===t.edgeType)return this.recalculateRenderedStyle(e),Ui(t.segpts)},Yi.getControlPoints=function(e){var t=e[0]._private.rscratch,n=t.edgeType;if("bezier"===n||"multibezier"===n||"self"===n||"compound"===n)return this.recalculateRenderedStyle(e),Ui(t.ctrlpts)},Yi.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}};var Wi={manualEndptToPx:function(e,t){var n=e.position(),r=e.outerWidth(),a=e.outerHeight();if(2===t.value.length){var o=[t.pfValue[0],t.pfValue[1]];return"%"===t.units[0]&&(o[0]=o[0]*r),"%"===t.units[1]&&(o[1]=o[1]*a),o[0]+=n.x,o[1]+=n.y,o}var i=t.pfValue[0];i=-Math.PI/2+i;var s=2*Math.max(r,a),l=[n.x+Math.cos(i)*s,n.y+Math.sin(i)*s];return this.nodeShapes[this.getNodeShape(e)].intersectLine(n.x,n.y,r,a,l[0],l[1],0)},findEndpoints:function(e){var t,n,r,a,o,i=this,s=e.source()[0],l=e.target()[0],u=s.position(),c=l.position(),d=e.pstyle("target-arrow-shape").value,f=e.pstyle("source-arrow-shape").value,h=e.pstyle("target-distance-from-node").pfValue,p=e.pstyle("source-distance-from-node").pfValue,v=e.pstyle("curve-style").value,g=e._private.rscratch,m=g.edgeType,y="self"===m||"compound"===m,b="bezier"===m||"multibezier"===m||y,w="bezier"!==m,x="straight"===m||"segments"===m,E="segments"===m,_=b||w||x,k=y||"taxi"===v,C=e.pstyle("source-endpoint"),R=k?"outside-to-node":C.value,P=e.pstyle("target-endpoint"),O=k?"outside-to-node":P.value;if(g.srcManEndpt=C,g.tgtManEndpt=P,b){var M=[g.ctrlpts[0],g.ctrlpts[1]];n=w?[g.ctrlpts[g.ctrlpts.length-2],g.ctrlpts[g.ctrlpts.length-1]]:M,r=M}else if(x){var j=E?g.segpts.slice(0,2):[c.x,c.y];n=E?g.segpts.slice(g.segpts.length-2):[u.x,u.y],r=j}if("inside-to-node"===O)t=[c.x,c.y];else if(P.units)t=this.manualEndptToPx(l,P);else if("outside-to-line"===O)t=g.tgtIntn;else if("outside-to-node"===O||"outside-to-node-or-label"===O?a=n:"outside-to-line"!==O&&"outside-to-line-or-label"!==O||(a=[u.x,u.y]),t=i.nodeShapes[this.getNodeShape(l)].intersectLine(c.x,c.y,l.outerWidth(),l.outerHeight(),a[0],a[1],0),"outside-to-node-or-label"===O||"outside-to-line-or-label"===O){var z=l._private.rscratch,T=z.labelWidth,D=z.labelHeight,A=z.labelX,B=z.labelY,N=T/2,I=D/2,L=l.pstyle("text-valign").value;"top"===L?B-=I:"bottom"===L&&(B+=I);var V=l.pstyle("text-halign").value;"left"===V?A-=N:"right"===V&&(A+=N);var F=Rt(a[0],a[1],[A-N,B-I,A+N,B-I,A+N,B+I,A-N,B+I],c.x,c.y);if(F.length>0){var H=u,G=tt(H,Ke(t)),q=tt(H,Ke(F)),Y=G;if(q<G&&(t=F,Y=q),F.length>2)tt(H,{x:F[2],y:F[3]})<Y&&(t=[F[2],F[3]])}}var U=Pt(t,n,i.arrowShapes[d].spacing(e)+h),W=Pt(t,n,i.arrowShapes[d].gap(e)+h);if(g.endX=W[0],g.endY=W[1],g.arrowEndX=U[0],g.arrowEndY=U[1],"inside-to-node"===R)t=[u.x,u.y];else if(C.units)t=this.manualEndptToPx(s,C);else if("outside-to-line"===R)t=g.srcIntn;else if("outside-to-node"===R||"outside-to-node-or-label"===R?o=r:"outside-to-line"!==R&&"outside-to-line-or-label"!==R||(o=[c.x,c.y]),t=i.nodeShapes[this.getNodeShape(s)].intersectLine(u.x,u.y,s.outerWidth(),s.outerHeight(),o[0],o[1],0),"outside-to-node-or-label"===R||"outside-to-line-or-label"===R){var $=s._private.rscratch,X=$.labelWidth,K=$.labelHeight,Z=$.labelX,Q=$.labelY,J=X/2,ee=K/2,te=s.pstyle("text-valign").value;"top"===te?Q-=ee:"bottom"===te&&(Q+=ee);var ne=s.pstyle("text-halign").value;"left"===ne?Z-=J:"right"===ne&&(Z+=J);var re=Rt(o[0],o[1],[Z-J,Q-ee,Z+J,Q-ee,Z+J,Q+ee,Z-J,Q+ee],u.x,u.y);if(re.length>0){var ae=c,oe=tt(ae,Ke(t)),ie=tt(ae,Ke(re)),se=oe;if(ie<oe&&(t=[re[0],re[1]],se=ie),re.length>2)tt(ae,{x:re[2],y:re[3]})<se&&(t=[re[2],re[3]])}}var le=Pt(t,r,i.arrowShapes[f].spacing(e)+p),ue=Pt(t,r,i.arrowShapes[f].gap(e)+p);g.startX=ue[0],g.startY=ue[1],g.arrowStartX=le[0],g.arrowStartY=le[1],_&&(S(g.startX)&&S(g.startY)&&S(g.endX)&&S(g.endY)?g.badLine=!1:g.badLine=!0)},getSourceEndpoint:function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),"haystack"===t.edgeType?{x:t.haystackPts[0],y:t.haystackPts[1]}:{x:t.arrowStartX,y:t.arrowStartY}},getTargetEndpoint:function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),"haystack"===t.edgeType?{x:t.haystackPts[2],y:t.haystackPts[3]}:{x:t.arrowEndX,y:t.arrowEndY}}},$i={};function Xi(e,t,n){for(var r=function(e,t,n,r){return rt(e,t,n,r)},a=t._private.rstyle.bezierPts,o=0;o<e.bezierProjPcts.length;o++){var i=e.bezierProjPcts[o];a.push({x:r(n[0],n[2],n[4],i),y:r(n[1],n[3],n[5],i)})}}$i.storeEdgeProjections=function(e){var t=e._private,n=t.rscratch,r=n.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,"multibezier"===r||"bezier"===r||"self"===r||"compound"===r){t.rstyle.bezierPts=[];for(var a=0;a+5<n.allpts.length;a+=4)Xi(this,e,n.allpts.slice(a,a+6))}else if("segments"===r){var o=t.rstyle.linePts=[];for(a=0;a+1<n.allpts.length;a+=2)o.push({x:n.allpts[a],y:n.allpts[a+1]})}else if("haystack"===r){var i=n.haystackPts;t.rstyle.haystackPts=[{x:i[0],y:i[1]},{x:i[2],y:i[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth},$i.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)};var Ki={recalculateNodeLabelProjection:function(e){var t=e.pstyle("label").strValue;if(!T(t)){var n,r,a=e._private,o=e.width(),i=e.height(),s=e.padding(),l=e.position(),u=e.pstyle("text-halign").strValue,c=e.pstyle("text-valign").strValue,d=a.rscratch,f=a.rstyle;switch(u){case"left":n=l.x-o/2-s;break;case"right":n=l.x+o/2+s;break;default:n=l.x}switch(c){case"top":r=l.y-i/2-s;break;case"bottom":r=l.y+i/2+s;break;default:r=l.y}d.labelX=n,d.labelY=r,f.labelX=n,f.labelY=r,this.calculateLabelAngles(e),this.applyLabelDimensions(e)}}},Zi=function(e,t){var n=Math.atan(t/e);return 0===e&&n<0&&(n*=-1),n},Qi=function(e,t){var n=t.x-e.x,r=t.y-e.y;return Zi(n,r)};Ki.recalculateEdgeLabelProjections=function(e){var t,n=e._private,r=n.rscratch,a=this,o={mid:e.pstyle("label").strValue,source:e.pstyle("source-label").strValue,target:e.pstyle("target-label").strValue};if(o.mid||o.source||o.target){t={x:r.midX,y:r.midY};var i=function(e,t,r){Pe(n.rscratch,e,t,r),Pe(n.rstyle,e,t,r)};i("labelX",null,t.x),i("labelY",null,t.y);var s=Zi(r.midDispX,r.midDispY);i("labelAutoAngle",null,s);var l=function e(){if(e.cache)return e.cache;for(var t=[],o=0;o+5<r.allpts.length;o+=4){var i={x:r.allpts[o],y:r.allpts[o+1]},s={x:r.allpts[o+2],y:r.allpts[o+3]},l={x:r.allpts[o+4],y:r.allpts[o+5]};t.push({p0:i,p1:s,p2:l,startDist:0,length:0,segments:[]})}var u=n.rstyle.bezierPts,c=a.bezierProjPcts.length;function d(e,t,n,r,a){var o=et(t,n),i=e.segments[e.segments.length-1],s={p0:t,p1:n,t0:r,t1:a,startDist:i?i.startDist+i.length:0,length:o};e.segments.push(s),e.length+=o}for(var f=0;f<t.length;f++){var h=t[f],p=t[f-1];p&&(h.startDist=p.startDist+p.length),d(h,h.p0,u[f*c],0,a.bezierProjPcts[0]);for(var v=0;v<c-1;v++)d(h,u[f*c+v],u[f*c+v+1],a.bezierProjPcts[v],a.bezierProjPcts[v+1]);d(h,u[f*c+c-1],h.p2,a.bezierProjPcts[c-1],1)}return e.cache=t},u=function(n){var a,s="source"===n;if(o[n]){var u=e.pstyle(n+"-text-offset").pfValue;switch(r.edgeType){case"self":case"compound":case"bezier":case"multibezier":for(var c,d=l(),f=0,h=0,p=0;p<d.length;p++){for(var v=d[s?p:d.length-1-p],g=0;g<v.segments.length;g++){var m=v.segments[s?g:v.segments.length-1-g],y=p===d.length-1&&g===v.segments.length-1;if(f=h,(h+=m.length)>=u||y){c={cp:v,segment:m};break}}if(c)break}var b=c.cp,w=c.segment,x=(u-f)/w.length,E=w.t1-w.t0,_=s?w.t0+E*x:w.t1-E*x;_=ot(0,_,1),t=at(b.p0,b.p1,b.p2,_),a=function(e,t,n,r){var a=ot(0,r-.001,1),o=ot(0,r+.001,1),i=at(e,t,n,a),s=at(e,t,n,o);return Qi(i,s)}(b.p0,b.p1,b.p2,_);break;case"straight":case"segments":case"haystack":for(var k,C,S,R,P=0,O=r.allpts.length,M=0;M+3<O&&(s?(S={x:r.allpts[M],y:r.allpts[M+1]},R={x:r.allpts[M+2],y:r.allpts[M+3]}):(S={x:r.allpts[O-2-M],y:r.allpts[O-1-M]},R={x:r.allpts[O-4-M],y:r.allpts[O-3-M]}),C=P,!((P+=k=et(S,R))>=u));M+=2);var j=(u-C)/k;j=ot(0,j,1),t=function(e,t,n,r){var a=t.x-e.x,o=t.y-e.y,i=et(e,t),s=a/i,l=o/i;return n=null==n?0:n,r=null!=r?r:n*i,{x:e.x+s*r,y:e.y+l*r}}(S,R,j),a=Qi(S,R)}i("labelX",n,t.x),i("labelY",n,t.y),i("labelAutoAngle",n,a)}};u("source"),u("target"),this.applyLabelDimensions(e)}},Ki.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Ki.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),a=this.calculateLabelDimensions(e,r),o=e.pstyle("line-height").pfValue,i=e.pstyle("text-wrap").strValue,s=Re(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==i?1:Math.max(s.length,1),u=a.height/l,c=u*o,d=a.width,f=a.height+(l-1)*(o-1)*u;Pe(n.rstyle,"labelWidth",t,d),Pe(n.rscratch,"labelWidth",t,d),Pe(n.rstyle,"labelHeight",t,f),Pe(n.rscratch,"labelHeight",t,f),Pe(n.rscratch,"labelLineHeight",t,c)},Ki.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",a=e.pstyle(r+"label").strValue,o=e.pstyle("text-transform").value,i=function(e,r){return r?(Pe(n.rscratch,e,t,r),r):Re(n.rscratch,e,t)};if(!a)return"";"none"==o||("uppercase"==o?a=a.toUpperCase():"lowercase"==o&&(a=a.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=i("labelKey");if(null!=l&&i("labelWrapKey")===l)return i("labelWrapCachedText");for(var u=a.split("\n"),c=e.pstyle("text-max-width").pfValue,d="anywhere"===e.pstyle("text-overflow-wrap").value,f=[],h=/[\s\u200b]+/,p=d?"":" ",v=0;v<u.length;v++){var g=u[v],m=this.calculateLabelDimensions(e,g).width;if(d){var y=g.split("").join("\u200b");g=y}if(m>c){for(var b=g.split(h),w="",x=0;x<b.length;x++){var E=b[x],_=0===w.length?E:w+p+E;this.calculateLabelDimensions(e,_).width<=c?w+=E+p:(w&&f.push(w),w=E+p)}w.match(/^[\s\u200b]+$/)||f.push(w)}else f.push(g)}i("labelWrapCachedLines",f),a=i("labelWrapCachedText",f.join("\n")),i("labelWrapKey",l)}else if("ellipsis"===s){var k=e.pstyle("text-max-width").pfValue,C="",S=!1;if(this.calculateLabelDimensions(e,a).width<k)return a;for(var R=0;R<a.length;R++){if(this.calculateLabelDimensions(e,C+a[R]+"\u2026").width>k)break;C+=a[R],R===a.length-1&&(S=!0)}return S||(C+="\u2026"),C}return a},Ki.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Ki.calculateLabelDimensions=function(e,t){var n=ie(t,e._private.labelDimsKey),r=this.labelDimCache||(this.labelDimCache=[]),a=r[n];if(null!=a)return a;var o=e.pstyle("font-style").strValue,i=e.pstyle("font-size").pfValue,s=e.pstyle("font-family").strValue,l=e.pstyle("font-weight").strValue,u=this.labelCalcCanvas,c=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=document.createElement("canvas"),c=this.labelCalcCanvasContext=u.getContext("2d");var d=u.style;d.position="absolute",d.left="-9999px",d.top="-9999px",d.zIndex="-1",d.visibility="hidden",d.pointerEvents="none"}c.font="".concat(o," ").concat(l," ").concat(i,"px ").concat(s);for(var f=0,h=0,p=t.split("\n"),v=0;v<p.length;v++){var g=p[v],m=c.measureText(g),y=Math.ceil(m.width),b=i;f=Math.max(y,f),h+=b}return f+=0,h+=0,r[n]={width:f,height:h}},Ki.calculateLabelAngle=function(e,t){var n=e._private.rscratch,r=e.isEdge(),a=t?t+"-":"",o=e.pstyle(a+"text-rotation"),i=o.strValue;return"none"===i?0:r&&"autorotate"===i?n.labelAutoAngle:"autorotate"===i?0:o.pfValue},Ki.calculateLabelAngles=function(e){var t=this,n=e.isEdge(),r=e._private.rscratch;r.labelAngle=t.calculateLabelAngle(e),n&&(r.sourceLabelAngle=t.calculateLabelAngle(e,"source"),r.targetLabelAngle=t.calculateLabelAngle(e,"target"))};var Ji={},es=!1;Ji.getNodeShape=function(e){var t=e.pstyle("shape").value;if("cutrectangle"===t&&(e.width()<28||e.height()<28))return es||(be("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),es=!0),"rectangle";if(e.isParent())return"rectangle"===t||"roundrectangle"===t||"round-rectangle"===t||"cutrectangle"===t||"cut-rectangle"===t||"barrel"===t?t:"rectangle";if("polygon"===t){var n=e.pstyle("shape-polygon-points").value;return this.nodeShapes.makePolygon(n).name}return t};var ts={registerCalculationListeners:function(){var e=this.cy,t=e.collection(),n=this,r=function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r<e.length;r++){var a=e[r],o=a._private,i=o.rstyle;i.clean=!1,i.cleanConnected=!1}};n.binder(e).on("bounds.* dirty.*",(function(e){var t=e.target;r(t)})).on("style.* background.*",(function(e){var t=e.target;r(t,!1)}));var a=function(a){if(a){var o=n.onUpdateEleCalcsFns;t.cleanStyle();for(var i=0;i<t.length;i++){var s=t[i],l=s._private.rstyle;s.isNode()&&!l.cleanConnected&&(r(s.connectedEdges()),l.cleanConnected=!0)}if(o)for(var u=0;u<o.length;u++){(0,o[u])(a,t)}n.recalculateRenderedStyle(t),t=e.collection()}};n.flushRenderedStyleQueue=function(){a(!0)},n.beforeRender(a,n.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},recalculateRenderedStyle:function(e,t){var n=function(e){return e._private.rstyle.cleanConnected},r=[],a=[];if(!this.destroyed){void 0===t&&(t=!0);for(var o=0;o<e.length;o++){var i=e[o],s=i._private,l=s.rstyle;!i.isEdge()||n(i.source())&&n(i.target())||(l.clean=!1),t&&l.clean||i.removed()||"none"!==i.pstyle("display").value&&("nodes"===s.group?a.push(i):r.push(i),l.clean=!0)}for(var u=0;u<a.length;u++){var c=a[u],d=c._private.rstyle,f=c.position();this.recalculateNodeLabelProjection(c),d.nodeX=f.x,d.nodeY=f.y,d.nodeW=c.pstyle("width").pfValue,d.nodeH=c.pstyle("height").pfValue}this.recalculateEdgeProjections(r);for(var h=0;h<r.length;h++){var p=r[h]._private,v=p.rstyle,g=p.rscratch;v.srcX=g.arrowStartX,v.srcY=g.arrowStartY,v.tgtX=g.arrowEndX,v.tgtY=g.arrowEndY,v.midX=g.midX,v.midY=g.midY,v.labelAngle=g.labelAngle,v.sourceLabelAngle=g.sourceLabelAngle,v.targetLabelAngle=g.targetLabelAngle}}}},ns={updateCachedGrabbedEles:function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],n=0;n<e.length;n++){var r=(a=e[n])._private.rscratch;a.grabbed()&&!a.isParent()?t.push(a):r.inDragLayer?e.drag.push(a):e.nondrag.push(a)}for(n=0;n<t.length;n++){var a=t[n];e.drag.push(a)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(e){if(e||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(Ha),t.interactive=t.filter((function(e){return e.interactive()})),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t}},rs={};[Gi,qi,Yi,Wi,$i,Ki,Ji,ts,ns].forEach((function(e){H(rs,e)}));var as={getCachedImage:function(e,t,n){var r=this.imageCache=this.imageCache||{},a=r[e];if(a)return a.image.complete||a.image.addEventListener("load",n),a.image;var o=(a=r[e]=r[e]||{}).image=new Image;o.addEventListener("load",n),o.addEventListener("error",(function(){o.error=!0}));var i="data:";return e.substring(0,i.length).toLowerCase()===i||(o.crossOrigin=t),o.src=e,o}},os={registerBinding:function(e,t,n,r){var a=Array.prototype.slice.apply(arguments,[1]),o=this.binder(e);return o.on.apply(o,a)}};os.binder=function(e){var t,n=this,r=e===window||e===document||e===document.body||(t=e,"undefined"!=typeof HTMLElement&&t instanceof HTMLElement);if(null==n.supportsPassiveEvents){var a=!1;try{var o=Object.defineProperty({},"passive",{get:function(){return a=!0,!0}});window.addEventListener("test",null,o)}catch(s){}n.supportsPassiveEvents=a}var i=function(t,a,o){var i=Array.prototype.slice.call(arguments);return r&&n.supportsPassiveEvents&&(i[2]={capture:null!=o&&o,passive:!1,once:!1}),n.bindings.push({target:e,args:i}),(e.addEventListener||e.on).apply(e,i),this};return{on:i,addEventListener:i,addListener:i,bind:i}},os.nodeIsDraggable=function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},os.nodeIsGrabbable=function(e){return this.nodeIsDraggable(e)&&e.interactive()},os.load=function(){var e=this,t=function(e){return e.selected()},n=function(t,n,r,a){null==t&&(t=e.cy);for(var o=0;o<n.length;o++){var i=n[o];t.emit({originalEvent:r,type:i,position:a})}},r=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},o=function(t,n){var r=!0;if(e.cy.hasCompoundNodes()&&t&&t.pannable())for(var a=0;n&&a<n.length;a++){if((t=n[a]).isNode()&&t.isParent()&&!t.pannable()){r=!1;break}}else r=!0;return r},i=function(e){e[0]._private.rscratch.inDragLayer=!0},s=function(e){e[0]._private.rscratch.isGrabTarget=!0},l=function(e,t){var n=t.addToList;n.has(e)||!e.grabbable()||e.locked()||(n.merge(e),function(e){e[0]._private.grabbed=!0}(e))},u=function(t,n){n=n||{};var r=t.cy().hasCompoundNodes();n.inDragLayer&&(t.forEach(i),t.neighborhood().stdFilter((function(e){return!r||e.isEdge()})).forEach(i)),n.addToList&&t.forEach((function(e){l(e,n)})),function(e,t){if(e.cy().hasCompoundNodes()&&(null!=t.inDragLayer||null!=t.addToList)){var n=e.descendants();t.inDragLayer&&(n.forEach(i),n.connectedEdges().forEach(i)),t.addToList&&l(n,t)}}(t,n),f(t,{inDragLayer:n.inDragLayer}),e.updateCachedGrabbedEles()},c=u,d=function(t){t&&(e.getCachedZSortedEles().forEach((function(e){!function(e){e[0]._private.grabbed=!1}(e),function(e){e[0]._private.rscratch.inDragLayer=!1}(e),function(e){e[0]._private.rscratch.isGrabTarget=!1}(e)})),e.updateCachedGrabbedEles())},f=function(e,t){if((null!=t.inDragLayer||null!=t.addToList)&&e.cy().hasCompoundNodes()){var n=e.ancestors().orphans();if(!n.same(e)){var r=n.descendants().spawnSelf().merge(n).unmerge(e).unmerge(e.descendants()),a=r.connectedEdges();t.inDragLayer&&(a.forEach(i),r.forEach(i)),t.addToList&&r.forEach((function(e){l(e,t)}))}}},h=function(){null!=document.activeElement&&null!=document.activeElement.blur&&document.activeElement.blur()},p="undefined"!=typeof MutationObserver,v="undefined"!=typeof ResizeObserver;p?(e.removeObserver=new MutationObserver((function(t){for(var n=0;n<t.length;n++){var r=t[n].removedNodes;if(r)for(var a=0;a<r.length;a++){if(r[a]===e.container){e.destroy();break}}}})),e.container.parentNode&&e.removeObserver.observe(e.container.parentNode,{childList:!0})):e.registerBinding(e.container,"DOMNodeRemoved",(function(t){e.destroy()}));var g=a((function(){e.cy.resize()}),100);p&&(e.styleObserver=new MutationObserver(g),e.styleObserver.observe(e.container,{attributes:!0})),e.registerBinding(window,"resize",g),v&&(e.resizeObserver=new ResizeObserver(g),e.resizeObserver.observe(e.container));var m=function(){e.invalidateContainerClientCoordsCache()};!function(e,t){for(;null!=e;)t(e),e=e.parentNode}(e.container,(function(t){e.registerBinding(t,"transitionend",m),e.registerBinding(t,"animationend",m),e.registerBinding(t,"scroll",m)})),e.registerBinding(e.container,"contextmenu",(function(e){e.preventDefault()}));var y,b,w,x=function(t){for(var n=e.findContainerClientCoords(),r=n[0],a=n[1],o=n[2],i=n[3],s=t.touches?t.touches:[t],l=!1,u=0;u<s.length;u++){var c=s[u];if(r<=c.clientX&&c.clientX<=r+o&&a<=c.clientY&&c.clientY<=a+i){l=!0;break}}if(!l)return!1;for(var d=e.container,f=t.target.parentNode,h=!1;f;){if(f===d){h=!0;break}f=f.parentNode}return!!h};e.registerBinding(e.container,"mousedown",(function(t){if(x(t)){t.preventDefault(),h(),e.hoverData.capture=!0,e.hoverData.which=t.which;var r=e.cy,a=[t.clientX,t.clientY],o=e.projectIntoViewport(a[0],a[1]),i=e.selection,l=e.findNearestElements(o[0],o[1],!0,!1),d=l[0],f=e.dragData.possibleDragElements;e.hoverData.mdownPos=o,e.hoverData.mdownGPos=a;if(3==t.which){e.hoverData.cxtStarted=!0;var p={originalEvent:t,type:"cxttapstart",position:{x:o[0],y:o[1]}};d?(d.activate(),d.emit(p),e.hoverData.down=d):r.emit(p),e.hoverData.downTime=(new Date).getTime(),e.hoverData.cxtDragged=!1}else if(1==t.which){if(d&&d.activate(),null!=d&&e.nodeIsGrabbable(d)){var v=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(s(d),d.selected()){f=e.dragData.possibleDragElements=r.collection();var g=r.$((function(t){return t.isNode()&&t.selected()&&e.nodeIsGrabbable(t)}));u(g,{addToList:f}),d.emit(v("grabon")),g.forEach((function(e){e.emit(v("grab"))}))}else f=e.dragData.possibleDragElements=r.collection(),c(d,{addToList:f}),d.emit(v("grabon")).emit(v("grab"));e.redrawHint("eles",!0),e.redrawHint("drag",!0)}e.hoverData.down=d,e.hoverData.downs=l,e.hoverData.downTime=(new Date).getTime(),n(d,["mousedown","tapstart","vmousedown"],t,{x:o[0],y:o[1]}),null==d?(i[4]=1,e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()):d.pannable()&&(i[4]=1),e.hoverData.tapholdCancelled=!1,clearTimeout(e.hoverData.tapholdTimeout),e.hoverData.tapholdTimeout=setTimeout((function(){if(!e.hoverData.tapholdCancelled){var n=e.hoverData.down;n?n.emit({originalEvent:t,type:"taphold",position:{x:o[0],y:o[1]}}):r.emit({originalEvent:t,type:"taphold",position:{x:o[0],y:o[1]}})}}),e.tapholdDuration)}i[0]=i[2]=o[0],i[1]=i[3]=o[1]}}),!1),e.registerBinding(window,"mousemove",(function(t){if(e.hoverData.capture||x(t)){var a=!1,i=e.cy,s=i.zoom(),l=[t.clientX,t.clientY],c=e.projectIntoViewport(l[0],l[1]),f=e.hoverData.mdownPos,h=e.hoverData.mdownGPos,p=e.selection,v=null;e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.selecting||(v=e.findNearestElement(c[0],c[1],!0,!1));var g,m=e.hoverData.last,y=e.hoverData.down,b=[c[0]-p[2],c[1]-p[3]],w=e.dragData.possibleDragElements;if(h){var E=l[0]-h[0],_=E*E,k=l[1]-h[1],C=_+k*k;e.hoverData.isOverThresholdDrag=g=C>=e.desktopTapThreshold2}var R=r(t);g&&(e.hoverData.tapholdCancelled=!0);a=!0,n(v,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var P=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||i.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(g){var O={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};y?y.emit(O):i.emit(O),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=v,v&&v.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}else if(e.hoverData.dragging){if(a=!0,i.panningEnabled()&&i.userPanningEnabled()){var M;if(e.hoverData.justStartedPan){var j=e.hoverData.mdownPos;M={x:(c[0]-j[0])*s,y:(c[1]-j[1])*s},e.hoverData.justStartedPan=!1}else M={x:b[0]*s,y:b[1]*s};i.panBy(M),i.emit("dragpan"),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=p[4]||null!=y&&!y.pannable()){if(y&&y.pannable()&&y.active()&&y.unactivate(),y&&y.grabbed()||v==m||(m&&n(m,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),v&&n(v,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=v),y)if(g){if(i.boxSelectionEnabled()&&R)y&&y.grabbed()&&(d(w),y.emit("freeon"),w.emit("free"),e.dragData.didDrag&&(y.emit("dragfreeon"),w.emit("dragfree"))),P();else if(y&&y.grabbed()&&e.nodeIsDraggable(y)){var z=!e.dragData.didDrag;z&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(w,{inDragLayer:!0});var T={x:0,y:0};if(S(b[0])&&S(b[1])&&(T.x+=b[0],T.y+=b[1],z)){var D=e.hoverData.dragDelta;D&&S(D[0])&&S(D[1])&&(T.x+=D[0],T.y+=D[1])}e.hoverData.draggingEles=!0,w.silentShift(T).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(b[0]),t.push(b[1])):(t[0]+=b[0],t[1]+=b[1])}();a=!0}else if(g){if(e.hoverData.dragging||!i.boxSelectionEnabled()||!R&&i.panningEnabled()&&i.userPanningEnabled()){if(!e.hoverData.selecting&&i.panningEnabled()&&i.userPanningEnabled()){o(y,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=Ke(f),e.redrawHint("select",!0),e.redraw())}}else P();y&&y.pannable()&&y.active()&&y.unactivate()}return p[2]=c[0],p[3]=c[1],a?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(window,"mouseup",(function(a){if(e.hoverData.capture){e.hoverData.capture=!1;var o=e.cy,i=e.projectIntoViewport(a.clientX,a.clientY),s=e.selection,l=e.findNearestElement(i[0],i[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,f=r(a);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var h={originalEvent:a,type:"cxttapend",position:{x:i[0],y:i[1]}};if(c?c.emit(h):o.emit(h),!e.hoverData.cxtDragged){var p={originalEvent:a,type:"cxttap",position:{x:i[0],y:i[1]}};c?c.emit(p):o.emit(p)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(n(l,["mouseup","tapend","vmouseup"],a,{x:i[0],y:i[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(n(c,["click","tap","vclick"],a,{x:i[0],y:i[1]}),b=!1,a.timeStamp-w<=o.multiClickDebounceTime()?(y&&clearTimeout(y),b=!0,w=null,n(c,["dblclick","dbltap","vdblclick"],a,{x:i[0],y:i[1]})):(y=setTimeout((function(){b||n(c,["oneclick","onetap","voneclick"],a,{x:i[0],y:i[1]})}),o.multiClickDebounceTime()),w=a.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||r(a)||(o.$(t).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=o.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===o.selectionType()||f?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):f||(o.$(t).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var v=o.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),v.length>0&&e.redrawHint("eles",!0),o.emit({type:"boxend",originalEvent:a,position:{x:i[0],y:i[1]}});var g=function(e){return e.selectable()&&!e.selected()};"additive"===o.selectionType()||f||o.$(t).unmerge(v).unselect(),v.emit("box").stdFilter(g).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var m=c&&c.grabbed();d(u),m&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var E,_,k,C,R,P,O,M,j,z,T,D,A,B=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),a=n.pan(),o=e.projectIntoViewport(t.clientX,t.clientY),i=[o[0]*r+a.x,o[1]*r+a.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:i[0],y:i[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",B,!0),e.registerBinding(window,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||B(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var N,I,L,V,F,H,G,q=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},Y=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",N=function(t){if(e.hasTouchStarted=!0,x(t)){h(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var r=e.cy,a=e.touchData.now,o=e.touchData.earlier;if(t.touches[0]){var i=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);a[0]=i[0],a[1]=i[1]}if(t.touches[1]){i=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);a[2]=i[0],a[3]=i[1]}if(t.touches[2]){i=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);a[4]=i[0],a[5]=i[1]}if(t.touches[1]){e.touchData.singleTouchMoved=!0,d(e.dragData.touchDragEles);var l=e.findContainerClientCoords();j=l[0],z=l[1],T=l[2],D=l[3],E=t.touches[0].clientX-j,_=t.touches[0].clientY-z,k=t.touches[1].clientX-j,C=t.touches[1].clientY-z,A=0<=E&&E<=T&&0<=k&&k<=T&&0<=_&&_<=D&&0<=C&&C<=D;var f=r.pan(),p=r.zoom();R=q(E,_,k,C),P=Y(E,_,k,C),M=[((O=[(E+k)/2,(_+C)/2])[0]-f.x)/p,(O[1]-f.y)/p];if(P<4e4&&!t.touches[2]){var v=e.findNearestElement(a[0],a[1],!0,!0),g=e.findNearestElement(a[2],a[3],!0,!0);return v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=v):g&&g.isNode()?(g.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=g):r.emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])r.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var m=e.findNearestElements(a[0],a[1],!0,!0),y=m[0];if(null!=y&&(y.activate(),e.touchData.start=y,e.touchData.starts=m,e.nodeIsGrabbable(y))){var b=e.dragData.touchDragEles=r.collection(),w=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),y.selected()?(w=r.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),u(w,{addToList:b})):c(y,{addToList:b}),s(y);var S=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};y.emit(S("grabon")),w?w.forEach((function(e){e.emit(S("grab"))})):y.emit(S("grab"))}n(y,["touchstart","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==y&&(e.data.bgActivePosistion={x:i[0],y:i[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||n(e.touchData.start,["taphold"],t,{x:a[0],y:a[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var B=e.touchData.startPosition=[],N=0;N<a.length;N++)B[N]=o[N]=a[N];var I=t.touches[0];e.touchData.startGPosition=[I.clientX,I.clientY]}}},!1),e.registerBinding(window,"touchmove",I=function(t){var r=e.touchData.capture;if(r||x(t)){var a=e.selection,i=e.cy,s=e.touchData.now,l=e.touchData.earlier,c=i.zoom();if(t.touches[0]){var f=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=f[0],s[1]=f[1]}if(t.touches[1]){f=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=f[0],s[3]=f[1]}if(t.touches[2]){f=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=f[0],s[5]=f[1]}var h,p=e.touchData.startGPosition;if(r&&t.touches[0]&&p){for(var v=[],g=0;g<s.length;g++)v[g]=s[g]-l[g];var m=t.touches[0].clientX-p[0],y=m*m,b=t.touches[0].clientY-p[1];h=y+b*b>=e.touchTapThreshold2}if(r&&e.touchData.cxt){t.preventDefault();var w=t.touches[0].clientX-j,O=t.touches[0].clientY-z,T=t.touches[1].clientX-j,D=t.touches[1].clientY-z,B=Y(w,O,T,D);if(B/P>=2.25||B>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var N={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(N),e.touchData.start=null):i.emit(N)}}if(r&&e.touchData.cxt){N={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}};e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(N):i.emit(N),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var I=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&I===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=I,I&&I.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(r&&t.touches[2]&&i.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||i.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(r&&t.touches[1]&&!e.touchData.didSelect&&i.zoomingEnabled()&&i.panningEnabled()&&i.userZoomingEnabled()&&i.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var L=0;L<ee.length;L++){var V=ee[L]._private;V.grabbed=!1,V.rscratch.inDragLayer=!1}}var F=e.touchData.start,H=(w=t.touches[0].clientX-j,O=t.touches[0].clientY-z,T=t.touches[1].clientX-j,D=t.touches[1].clientY-z,q(w,O,T,D)),G=H/R;if(A){var U=(w-E+(T-k))/2,W=(O-_+(D-C))/2,$=i.zoom(),X=$*G,K=i.pan(),Z=M[0]*$+K.x,Q=M[1]*$+K.y,J={x:-X/$*(Z-K.x-U)+Z,y:-X/$*(Q-K.y-W)+Q};if(F&&F.active()){var ee=e.dragData.touchDragEles;d(ee),e.redrawHint("drag",!0),e.redrawHint("eles",!0),F.unactivate().emit("freeon"),ee.emit("free"),e.dragData.didDrag&&(F.emit("dragfreeon"),ee.emit("dragfree"))}i.viewport({zoom:X,pan:J,cancelOnFailedZoom:!0}),i.emit("pinchzoom"),R=H,E=w,_=O,k=T,C=D,e.pinching=!0}if(t.touches[0]){f=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=f[0],s[1]=f[1]}if(t.touches[1]){f=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=f[0],s[3]=f[1]}if(t.touches[2]){f=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=f[0],s[5]=f[1]}}else if(t.touches[0]&&!e.touchData.didSelect){var te=e.touchData.start,ne=e.touchData.last;if(e.hoverData.draggingEles||e.swipePanning||(I=e.findNearestElement(s[0],s[1],!0,!0)),r&&null!=te&&t.preventDefault(),r&&null!=te&&e.nodeIsDraggable(te))if(h){ee=e.dragData.touchDragEles;var re=!e.dragData.didDrag;re&&u(ee,{inDragLayer:!0}),e.dragData.didDrag=!0;var ae={x:0,y:0};if(S(v[0])&&S(v[1]))if(ae.x+=v[0],ae.y+=v[1],re)e.redrawHint("eles",!0),(oe=e.touchData.dragDelta)&&S(oe[0])&&S(oe[1])&&(ae.x+=oe[0],ae.y+=oe[1]);e.hoverData.draggingEles=!0,ee.silentShift(ae).emit("position drag"),e.redrawHint("drag",!0),e.touchData.startPosition[0]==l[0]&&e.touchData.startPosition[1]==l[1]&&e.redrawHint("eles",!0),e.redraw()}else{var oe;0===(oe=e.touchData.dragDelta=e.touchData.dragDelta||[]).length?(oe.push(v[0]),oe.push(v[1])):(oe[0]+=v[0],oe[1]+=v[1])}if(n(te||I,["touchmove","tapdrag","vmousemove"],t,{x:s[0],y:s[1]}),te&&te.grabbed()||I==ne||(ne&&ne.emit({originalEvent:t,type:"tapdragout",position:{x:s[0],y:s[1]}}),I&&I.emit({originalEvent:t,type:"tapdragover",position:{x:s[0],y:s[1]}})),e.touchData.last=I,r)for(L=0;L<s.length;L++)s[L]&&e.touchData.startPosition[L]&&h&&(e.touchData.singleTouchMoved=!0);if(r&&(null==te||te.pannable())&&i.panningEnabled()&&i.userPanningEnabled()){o(te,e.touchData.starts)&&(t.preventDefault(),e.data.bgActivePosistion||(e.data.bgActivePosistion=Ke(e.touchData.startPosition)),e.swipePanning?(i.panBy({x:v[0]*c,y:v[1]*c}),i.emit("dragpan")):h&&(e.swipePanning=!0,i.panBy({x:m*c,y:b*c}),i.emit("dragpan"),te&&(te.unactivate(),e.redrawHint("select",!0),e.touchData.start=null)));f=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=f[0],s[1]=f[1]}}for(g=0;g<s.length;g++)l[g]=s[g];r&&t.touches.length>0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(window,"touchcancel",L=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(window,"touchend",V=function(r){var a=e.touchData.start;if(e.touchData.capture){0===r.touches.length&&(e.touchData.capture=!1),r.preventDefault();var o=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var i,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(r.touches[0]){var f=e.projectIntoViewport(r.touches[0].clientX,r.touches[0].clientY);u[0]=f[0],u[1]=f[1]}if(r.touches[1]){f=e.projectIntoViewport(r.touches[1].clientX,r.touches[1].clientY);u[2]=f[0],u[3]=f[1]}if(r.touches[2]){f=e.projectIntoViewport(r.touches[2].clientX,r.touches[2].clientY);u[4]=f[0],u[5]=f[1]}if(a&&a.unactivate(),e.touchData.cxt){if(i={originalEvent:r,type:"cxttapend",position:{x:u[0],y:u[1]}},a?a.emit(i):s.emit(i),!e.touchData.cxtDragged){var h={originalEvent:r,type:"cxttap",position:{x:u[0],y:u[1]}};a?a.emit(h):s.emit(h)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!r.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var p=s.collection(e.getAllInBox(o[0],o[1],o[2],o[3]));o[0]=void 0,o[1]=void 0,o[2]=void 0,o[3]=void 0,o[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:r,position:{x:u[0],y:u[1]}});p.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),p.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=a&&a.unactivate(),r.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(r.touches[1]);else if(r.touches[0]);else if(!r.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var v=e.dragData.touchDragEles;if(null!=a){var g=a._private.grabbed;d(v),e.redrawHint("drag",!0),e.redrawHint("eles",!0),g&&(a.emit("freeon"),v.emit("free"),e.dragData.didDrag&&(a.emit("dragfreeon"),v.emit("dragfree"))),n(a,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]}),a.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(u[0],u[1],!0,!0);n(m,["touchend","tapend","vmouseup","tapdragout"],r,{x:u[0],y:u[1]})}var y=e.touchData.startPosition[0]-u[0],b=y*y,w=e.touchData.startPosition[1]-u[1],x=(b+w*w)*l*l;e.touchData.singleTouchMoved||(a||s.$(":selected").unselect(["tapunselect"]),n(a,["tap","vclick"],r,{x:u[0],y:u[1]}),F=!1,r.timeStamp-G<=s.multiClickDebounceTime()?(H&&clearTimeout(H),F=!0,G=null,n(a,["dbltap","vdblclick"],r,{x:u[0],y:u[1]})):(H=setTimeout((function(){F||n(a,["onetap","voneclick"],r,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),G=r.timeStamp)),null!=a&&!e.dragData.didDrag&&a._private.selectable&&x<e.touchTapThreshold2&&!e.pinching&&("single"===s.selectionType()?(s.$(t).unmerge(a).unselect(["tapunselect"]),a.select(["tapselect"])):a.selected()?a.unselect(["tapunselect"]):a.select(["tapselect"]),e.redrawHint("eles",!0)),e.touchData.singleTouchMoved=!0}for(var E=0;E<u.length;E++)c[E]=u[E];e.dragData.didDrag=!1,0===r.touches.length&&(e.touchData.dragDelta=[],e.touchData.startPosition=null,e.touchData.startGPosition=null,e.touchData.didSelect=!1),r.touches.length<2&&(1===r.touches.length&&(e.touchData.startGPosition=[r.touches[0].clientX,r.touches[0].clientY]),e.pinching=!1,e.redrawHint("eles",!0),e.redraw())}},!1),"undefined"==typeof TouchEvent){var U=[],W=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},$=function(e){U.push(function(e){return{event:e,touch:W(e)}}(e))},X=function(e){for(var t=0;t<U.length;t++){if(U[t].event.pointerId===e.pointerId)return void U.splice(t,1)}},K=function(e){e.touches=U.map((function(e){return e.touch}))},Z=function(e){return"mouse"===e.pointerType||4===e.pointerType};e.registerBinding(e.container,"pointerdown",(function(e){Z(e)||(e.preventDefault(),$(e),K(e),N(e))})),e.registerBinding(e.container,"pointerup",(function(e){Z(e)||(X(e),K(e),V(e))})),e.registerBinding(e.container,"pointercancel",(function(e){Z(e)||(X(e),K(e),L())})),e.registerBinding(e.container,"pointermove",(function(e){Z(e)||(e.preventDefault(),function(e){var t=U.filter((function(t){return t.event.pointerId===e.pointerId}))[0];t.event=e,t.touch=W(e)}(e),K(e),I(e))}))}};var is={generatePolygon:function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl("polygon",e,t,n,r,a,this.points)},intersectLine:function(e,t,n,r,a,o,i){return Rt(a,o,this.points,e,t,n/2,r/2,i)},checkPoint:function(e,t,n,r,a,o,i){return wt(e,t,this.points,o,i,r,a,[0,-1],n)}}}};is.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},intersectLine:function(e,t,n,r,a,o,i){return function(e,t,n,r,a,o){var i=n-e,s=r-t;i/=a,s/=o;var l=Math.sqrt(i*i+s*s),u=l-1;if(u<0)return[];var c=u/l;return[(n-e)*c+e,(r-t)*c+t]}(a,o,e,t,n/2+i,r/2+i)},checkPoint:function(e,t,n,r,a,o,i){return _t(e,t,r,a,o,i,n)}}},is.generateRoundPolygon=function(e,t){for(var n=new Array(2*t.length),r=0;r<t.length/2;r++){var a=2*r,o=void 0;o=r<t.length/2-1?2*(r+1):0,n[4*r]=t[a],n[4*r+1]=t[a+1];var i=t[o]-t[a],s=t[o+1]-t[a+1],l=Math.sqrt(i*i+s*s);n[4*r+2]=i/l,n[4*r+3]=s/l}return this.nodeShapes[e]={renderer:this,name:e,points:n,draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl("round-polygon",e,t,n,r,a,this.points)},intersectLine:function(e,t,n,r,a,o,i){return function(e,t,n,r,a,o,i,s){for(var l,u=[],c=new Array(n.length),d=o/2,f=i/2,h=Tt(o,i),p=0;p<n.length/4;p++){var v,g=void 0;g=0===p?n.length-2:4*p-2,v=4*p+2;var m=r+d*n[4*p],y=a+f*n[4*p+1],b=-n[g]*n[v]-n[g+1]*n[v+1],w=h/Math.tan(Math.acos(b)/2),x=m-w*n[g],E=y-w*n[g+1],_=m+w*n[v],k=y+w*n[v+1];0===p?(c[n.length-2]=x,c[n.length-1]=E):(c[4*p-2]=x,c[4*p-1]=E),c[4*p]=_,c[4*p+1]=k;var C=n[g+1],S=-n[g];C*n[v]+S*n[v+1]<0&&(C*=-1,S*=-1),0!==(l=kt(e,t,r,a,x+C*h,E+S*h,h)).length&&u.push(l[0],l[1])}for(var R=0;R<c.length/4;R++)0!==(l=St(e,t,r,a,c[4*R],c[4*R+1],c[4*R+2],c[4*R+3],!1)).length&&u.push(l[0],l[1]);if(u.length>2){for(var P=[u[0],u[1]],O=Math.pow(P[0]-e,2)+Math.pow(P[1]-t,2),M=1;M<u.length/2;M++){var j=Math.pow(u[2*M]-e,2)+Math.pow(u[2*M+1]-t,2);j<=O&&(P[0]=u[2*M],P[1]=u[2*M+1],O=j)}return P}return u}(a,o,this.points,e,t,n,r)},checkPoint:function(e,t,n,r,a,o,i){return function(e,t,n,r,a,o,i){for(var s=new Array(n.length),l=o/2,u=i/2,c=Tt(o,i),d=c*c,f=0;f<n.length/4;f++){var h,p=void 0;p=0===f?n.length-2:4*f-2,h=4*f+2;var v=r+l*n[4*f],g=a+u*n[4*f+1],m=-n[p]*n[h]-n[p+1]*n[h+1],y=c/Math.tan(Math.acos(m)/2),b=v-y*n[p],w=g-y*n[p+1],x=v+y*n[h],E=g+y*n[h+1];s[4*f]=b,s[4*f+1]=w,s[4*f+2]=x,s[4*f+3]=E;var _=n[p+1],k=-n[p];_*n[h]+k*n[h+1]<0&&(_*=-1,k*=-1);var C=b+_*c,S=w+k*c;if(Math.pow(C-e,2)+Math.pow(S-t,2)<=d)return!0}return bt(e,t,s)}(e,t,this.points,o,i,r,a)}}},is.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:Ot(4,0),draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},intersectLine:function(e,t,n,r,a,o,i){return pt(a,o,e,t,n,r,i)},checkPoint:function(e,t,n,r,a,o,i){var s=zt(r,a),l=2*s;return!!wt(e,t,this.points,o,i,r,a-l,[0,-1],n)||(!!wt(e,t,this.points,o,i,r-l,a,[0,-1],n)||(!!_t(e,t,l,l,o-r/2+s,i-a/2+s,n)||(!!_t(e,t,l,l,o+r/2-s,i-a/2+s,n)||(!!_t(e,t,l,l,o+r/2-s,i+a/2-s,n)||!!_t(e,t,l,l,o-r/2+s,i+a/2-s,n)))))}}},is.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:8,points:Ot(4,0),draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},generateCutTrianglePts:function(e,t,n,r){var a=this.cornerLength,o=t/2,i=e/2,s=n-i,l=n+i,u=r-o,c=r+o;return{topLeft:[s,u+a,s+a,u,s+a,u+a],topRight:[l-a,u,l,u+a,l-a,u+a],bottomRight:[l,c-a,l-a,c,l-a,c-a],bottomLeft:[s+a,c,s,c-a,s+a,c-a]}},intersectLine:function(e,t,n,r,a,o,i){var s=this.generateCutTrianglePts(n+2*i,r+2*i,e,t),l=[].concat.apply([],[s.topLeft.splice(0,4),s.topRight.splice(0,4),s.bottomRight.splice(0,4),s.bottomLeft.splice(0,4)]);return Rt(a,o,l,e,t)},checkPoint:function(e,t,n,r,a,o,i){if(wt(e,t,this.points,o,i,r,a-2*this.cornerLength,[0,-1],n))return!0;if(wt(e,t,this.points,o,i,r-2*this.cornerLength,a,[0,-1],n))return!0;var s=this.generateCutTrianglePts(r,a,o,i);return bt(e,t,s.topLeft)||bt(e,t,s.topRight)||bt(e,t,s.bottomRight)||bt(e,t,s.bottomLeft)}}},is.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:Ot(4,0),draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},intersectLine:function(e,t,n,r,a,o,i){var s=this.generateBarrelBezierPts(n+2*i,r+2*i,e,t),l=function(e){var t=at({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),n=at({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),r=at({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.85);return[e[0],e[1],t.x,t.y,n.x,n.y,r.x,r.y,e[4],e[5]]},u=[].concat(l(s.topLeft),l(s.topRight),l(s.bottomRight),l(s.bottomLeft));return Rt(a,o,u,e,t)},generateBarrelBezierPts:function(e,t,n,r){var a=t/2,o=e/2,i=n-o,s=n+o,l=r-a,u=r+a,c=Dt(e,t),d=c.heightOffset,f=c.widthOffset,h=c.ctrlPtOffsetPct*e,p={topLeft:[i,l+d,i+h,l,i+f,l],topRight:[s-f,l,s-h,l,s,l+d],bottomRight:[s,u-d,s-h,u,s-f,u],bottomLeft:[i+f,u,i+h,u,i,u-d]};return p.topLeft.isTop=!0,p.topRight.isTop=!0,p.bottomLeft.isBottom=!0,p.bottomRight.isBottom=!0,p},checkPoint:function(e,t,n,r,a,o,i){var s=Dt(r,a),l=s.heightOffset,u=s.widthOffset;if(wt(e,t,this.points,o,i,r,a-2*l,[0,-1],n))return!0;if(wt(e,t,this.points,o,i,r-2*u,a,[0,-1],n))return!0;for(var c=this.generateBarrelBezierPts(r,a,o,i),d=function(e,t,n){var r,a,o=n[4],i=n[2],s=n[0],l=n[5],u=n[1],c=Math.min(o,s),d=Math.max(o,s),f=Math.min(l,u),h=Math.max(l,u);if(c<=e&&e<=d&&f<=t&&t<=h){var p=[(r=o)-2*(a=i)+s,2*(a-r),r],v=function(e,t,n,r){var a=t*t-4*e*(n-=r);if(a<0)return[];var o=Math.sqrt(a),i=2*e;return[(-t+o)/i,(-t-o)/i]}(p[0],p[1],p[2],e).filter((function(e){return 0<=e&&e<=1}));if(v.length>0)return v[0]}return null},f=Object.keys(c),h=0;h<f.length;h++){var p=c[f[h]],v=d(e,t,p);if(null!=v){var g=p[5],m=p[3],y=p[1],b=rt(g,m,y,v);if(p.isTop&&b<=t)return!0;if(p.isBottom&&t<=b)return!0}}return!1}}},is.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:Ot(4,0),draw:function(e,t,n,r,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,a)},intersectLine:function(e,t,n,r,a,o,i){var s=t-(r/2+i),l=St(a,o,e,t,e-(n/2+i),s,e+(n/2+i),s,!1);return l.length>0?l:pt(a,o,e,t,n,r,i)},checkPoint:function(e,t,n,r,a,o,i){var s=zt(r,a),l=2*s;if(wt(e,t,this.points,o,i,r,a-l,[0,-1],n))return!0;if(wt(e,t,this.points,o,i,r-l,a,[0,-1],n))return!0;var u=r/2+2*n,c=a/2+2*n;return!!bt(e,t,[o-u,i-c,o-u,i,o+u,i,o+u,i-c])||(!!_t(e,t,l,l,o+r/2-s,i+a/2-s,n)||!!_t(e,t,l,l,o-r/2+s,i+a/2-s,n))}}},is.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",Ot(3,0)),this.generateRoundPolygon("round-triangle",Ot(3,0)),this.generatePolygon("rectangle",Ot(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",Ot(5,0)),this.generateRoundPolygon("round-pentagon",Ot(5,0)),this.generatePolygon("hexagon",Ot(6,0)),this.generateRoundPolygon("round-hexagon",Ot(6,0)),this.generatePolygon("heptagon",Ot(7,0)),this.generateRoundPolygon("round-heptagon",Ot(7,0)),this.generatePolygon("octagon",Ot(8,0)),this.generateRoundPolygon("round-octagon",Ot(8,0));var r=new Array(20),a=jt(5,0),o=jt(5,Math.PI/5),i=.5*(3-Math.sqrt(5));i*=1.57;for(var s=0;s<o.length/2;s++)o[2*s]*=i,o[2*s+1]*=i;for(s=0;s<5;s++)r[4*s]=a[2*s],r[4*s+1]=a[2*s+1],r[4*s+2]=o[2*s],r[4*s+3]=o[2*s+1];r=Mt(r),this.generatePolygon("star",r),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);var l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",l),this.generateRoundPolygon("round-tag",l),e.makePolygon=function(e){var n,r="polygon-"+e.join("$");return(n=this[r])?n:t.generatePolygon(r,e)}};var ss={timeToRender:function(){return this.redrawTotalTime/this.redrawCount},redraw:function(e){e=e||_e();var t=this;void 0===t.averageRedrawTime&&(t.averageRedrawTime=0),void 0===t.lastRedrawTime&&(t.lastRedrawTime=0),void 0===t.lastDrawTime&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=e},beforeRender:function(e,t){if(!this.destroyed){null==t&&me("Priority is not optional for beforeRender");var n=this.beforeRenderCallbacks;n.push({fn:e,priority:t}),n.sort((function(e,t){return t.priority-e.priority}))}}},ls=function(e,t,n){for(var r=e.beforeRenderCallbacks,a=0;a<r.length;a++)r[a].fn(t,n)};ss.startRenderLoop=function(){var e=this,t=e.cy;if(!e.renderLoopStarted){e.renderLoopStarted=!0;K((function n(r){if(!e.destroyed){if(t.batching());else if(e.requestedFrame&&!e.skipFrame){ls(e,!0,r);var a=Z();e.render(e.renderOptions);var o=e.lastDrawTime=Z();void 0===e.averageRedrawTime&&(e.averageRedrawTime=o-a),void 0===e.redrawCount&&(e.redrawCount=0),e.redrawCount++,void 0===e.redrawTotalTime&&(e.redrawTotalTime=0);var i=o-a;e.redrawTotalTime+=i,e.lastRedrawTime=i,e.averageRedrawTime=e.averageRedrawTime/2+i/2,e.requestedFrame=!1}else ls(e,!1,r);e.skipFrame=!1,K(n)}}))}};var us=function(e){this.init(e)},cs=us.prototype;cs.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],cs.init=function(e){var t=this;t.options=e,t.cy=e.cy;var n=t.container=e.cy.container();if(v){var r=v.document,a=r.head,o="__________cytoscape_stylesheet",i="__________cytoscape_container",s=null!=r.getElementById(o);if(n.className.indexOf(i)<0&&(n.className=(n.className||"")+" "+i),!s){var l=r.createElement("style");l.id=o,l.innerHTML="."+i+" { position: relative; }",a.insertBefore(l,a.children[0])}"static"===v.getComputedStyle(n).getPropertyValue("position")&&be("A Cytoscape container has style position:static and so can not use UI extensions properly")}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},t.redraws=0,t.showFps=e.showFps,t.debug=e.debug,t.hideEdgesOnViewport=e.hideEdgesOnViewport,t.textureOnViewport=e.textureOnViewport,t.wheelSensitivity=e.wheelSensitivity,t.motionBlurEnabled=e.motionBlur,t.forcedPixelRatio=S(e.pixelRatio)?e.pixelRatio:null,t.motionBlur=e.motionBlur,t.motionBlurOpacity=e.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=e.desktopTapThreshold,t.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,t.touchTapThreshold=e.touchTapThreshold,t.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners()},cs.notify=function(e,t){var n=this,r=n.cy;this.destroyed||("init"!==e?"destroy"!==e?(("add"===e||"remove"===e||"move"===e&&r.hasCompoundNodes()||"load"===e||"zorder"===e||"mount"===e)&&n.invalidateCachedZSortedEles(),"viewport"===e&&n.redrawHint("select",!0),"load"!==e&&"resize"!==e&&"mount"!==e||(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint("eles",!0),n.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()):n.destroy():n.load())},cs.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var n=e.bindings[t],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.resizeObserver&&e.resizeObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch(a){}},cs.isHeadless=function(){return!1},[Hi,rs,as,os,is,ss].forEach((function(e){H(cs,e)}));var ds=1e3/60,fs=function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var r=a((function(){n.redrawHint("eles",!0),n.redrawHint("drag",!0),n.redraw()}),e.deqRedrawThreshold),o=e.priority||ge;n.beforeRender((function(a,o){var i=Z(),s=n.averageRedrawTime,l=n.lastRedrawTime,u=[],c=n.cy.extent(),d=n.getPixelRatio();for(a||n.flushRenderedStyleQueue();;){var f=Z(),h=f-i,p=f-o;if(l<ds){var v=ds-(a?s:0);if(p>=e.deqFastCost*v)break}else if(a){if(h>=e.deqCost*l||h>=e.deqAvgCost*s)break}else if(p>=e.deqNoDrawCost*ds)break;var g=e.deq(t,d,c);if(!(g.length>0))break;for(var m=0;m<g.length;m++)u.push(g[m])}u.length>0&&(e.onDeqd(t,u),!a&&e.shouldRedraw(t,u,d,c)&&r())}),o(t))}}},hs=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pe;c(this,e),this.idsByKey=new Oe,this.keyForId=new Oe,this.cachesByLvl=new Oe,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return f(e,[{key:"getIdsFor",value:function(e){null==e&&me("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new je,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new Oe,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),ps={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},vs=ke({getKey:null,doesEleInvalidateKey:pe,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:he,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),gs=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=vs(t);H(n,r),n.lookup=new hs(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},ms=gs.prototype;ms.reasons=ps,ms.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},ms.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},ms.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new o((function(e,t){return t.reqs-e.reqs}))},ms.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},ms.getElement=function(e,t,n,r,a){var o=this,i=this.renderer,s=i.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!o.allowEdgeTxrCaching&&e.isEdge()||!o.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Qe(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,d=t.w*u,f=i.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,f))return null;var h,p=l.get(e,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(h=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||d>1024)return null;var v=o.getTextureQueue(h),g=v[v.length-2],m=function(){return o.recycleTexture(h,d)||o.addTexture(h,d)};g||(g=v[v.length-1]),g||(g=m()),g.width-g.usedWidth<d&&(g=m());for(var y,b=function(e){return e&&e.scaledLabelShown===f},w=a&&a===ps.dequeue,x=a&&a===ps.highQuality,E=a&&a===ps.downscale,_=r+1;_<=3;_++){var k=l.get(e,_);if(k){y=k;break}}var C=y&&y.level===r+1?y:null,S=function(){g.context.drawImage(C.texture.canvas,C.x,0,C.width,C.height,g.usedWidth,0,d,c)};if(g.context.setTransform(1,0,0,1,0,0),g.context.clearRect(g.usedWidth,0,d,h),b(C))S();else if(b(y)){if(!x)return o.queueElement(e,y.level-1),y;for(var R=y.level;R>r;R--)C=o.getElement(e,t,n,R,ps.downscale);S()}else{var P;if(!w&&!x&&!E)for(var O=r-1;O>=-4;O--){var M=l.get(e,O);if(M){P=M;break}}if(b(P))return o.queueElement(e,r),P;g.context.translate(g.usedWidth,0),g.context.scale(u,u),this.drawElement(g.context,e,t,f,!1),g.context.scale(1/u,1/u),g.context.translate(-g.usedWidth,0)}return p={x:g.usedWidth,texture:g,level:r,scale:u,width:d,height:c,scaledLabelShown:f},g.usedWidth+=Math.ceil(d+8),g.eleCaches.push(p),l.set(e,r,p),o.checkTextureFullness(g),p},ms.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},ms.invalidateElement=function(e){var t=this,n=t.lookup,r=[];if(n.isInvalid(e)){for(var a=-4;a<=3;a++){var o=n.getForCachedKey(e,a);o&&r.push(o)}if(n.invalidate(e))for(var i=0;i<r.length;i++){var s=r[i],l=s.texture;l.invalidatedWidth+=s.width,s.invalidated=!0,t.checkTextureUtility(l)}t.removeFromQueue(e)}},ms.checkTextureUtility=function(e){e.invalidatedWidth>=.2*e.width&&this.retireTexture(e)},ms.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?Ce(t,e):e.fullnessChecks++},ms.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;Ce(n,e),e.retired=!0;for(var a=e.eleCaches,o=0;o<a.length;o++){var i=a[o];r.deleteCache(i.key,i.level)}Se(a),this.getRetiredTextureQueue(t).push(e)},ms.addTexture=function(e,t){var n={};return this.getTextureQueue(e).push(n),n.eleCaches=[],n.height=e,n.width=Math.max(1024,t),n.usedWidth=0,n.invalidatedWidth=0,n.fullnessChecks=0,n.canvas=this.renderer.makeOffscreenCanvas(n.width,n.height),n.context=n.canvas.getContext("2d"),n},ms.recycleTexture=function(e,t){for(var n=this.getTextureQueue(e),r=this.getRetiredTextureQueue(e),a=0;a<r.length;a++){var o=r[a];if(o.width>=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Se(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),Ce(r,o),n.push(o),o}},ms.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),a=this.getKey(e),o=r[a];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,n.updateItem(o);else{var i={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(i),r[a]=i}},ms.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),a=[],o=t.lookup,i=0;i<1&&n.size()>0;i++){var s=n.pop(),l=s.key,u=s.eles[0],c=o.hasCache(u,s.level);if(r[l]=null,!c){a.push(s);var d=t.getBoundingBox(u);t.getElement(u,d,e,s.level,ps.dequeue)}}return a},ms.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),a=n[r];null!=a&&(1===a.eles.length?(a.reqs=fe,t.updateItem(a),t.pop(),n[r]=null):a.eles.unmerge(e))},ms.onDequeue=function(e){this.onDequeues.push(e)},ms.offDequeue=function(e){Ce(this.onDequeues,e)},ms.setupDequeueing=fs({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n<e.onDequeues.length;n++){(0,e.onDequeues[n])(t)}},shouldRedraw:function(e,t,n,r){for(var a=0;a<t.length;a++)for(var o=t[a].eles,i=0;i<o.length;i++){var s=o[i].boundingBox();if(dt(s,r))return!0}return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}});var ys=function(e){var t=this,n=t.renderer=e,r=n.cy;t.layersByLevel={},t.firstGet=!0,t.lastInvalidationTime=Z()-500,t.skipping=!1,t.eleTxrDeqs=r.collection(),t.scheduleElementRefinement=a((function(){t.refineElementTextures(t.eleTxrDeqs),t.eleTxrDeqs.unmerge(t.eleTxrDeqs)}),50),n.beforeRender((function(e,n){n-t.lastInvalidationTime<=250?t.skipping=!0:t.skipping=!1}),n.beforeRenderPriorities.lyrTxrSkip);t.layersQueue=new o((function(e,t){return t.reqs-e.reqs})),t.setupDequeueing()},bs=ys.prototype,ws=0,xs=Math.pow(2,53)-1;bs.makeLayer=function(e,t){var n=Math.pow(2,t),r=Math.ceil(e.w*n),a=Math.ceil(e.h*n),o=this.renderer.makeOffscreenCanvas(r,a),i={id:ws=++ws%xs,bb:e,level:t,width:r,height:a,canvas:o,context:o.getContext("2d"),eles:[],elesQueue:[],reqs:0},s=i.context,l=-i.bb.x1,u=-i.bb.y1;return s.scale(n,n),s.translate(l,u),i},bs.getLayers=function(e,t,n){var r=this,a=r.renderer.cy.zoom(),o=r.firstGet;if(r.firstGet=!1,null==n)if((n=Math.ceil(Qe(a*t)))<-4)n=-4;else if(a>=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var i,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},a=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};a(1),a(-1);for(var o=c.length-1;o>=0;o--){var i=c[o];i.invalid&&Ce(c,i)}}();var d=function(t){var a=(t=t||{}).after;if(function(){if(!i){i=it();for(var t=0;t<e.length;t++)n=i,r=e[t].boundingBox(),n.x1=Math.min(n.x1,r.x1),n.x2=Math.max(n.x2,r.x2),n.w=n.x2-n.x1,n.y1=Math.min(n.y1,r.y1),n.y2=Math.max(n.y2,r.y2),n.h=n.y2-n.y1}var n,r}(),i.w*u*(i.h*u)>16e6)return null;var o=r.makeLayer(i,n);if(null!=a){var s=c.indexOf(a)+1;c.splice(s,0,o)}else(void 0===t.insert||t.insert)&&c.unshift(o);return o};if(r.skipping&&!o)return null;for(var f=null,h=e.length/1,p=!o,v=0;v<e.length;v++){var g=e[v],m=g._private.rscratch,y=m.imgLayerCaches=m.imgLayerCaches||{},b=y[n];if(b)f=b;else{if((!f||f.eles.length>=h||!ht(f.bb,g.boundingBox()))&&!(f=d({insert:!0,after:f})))return null;s||p?r.queueLayer(f,g):r.drawEleInLayer(f,g,n,t),f.eles.push(g),y[n]=f}}return s||(p?null:c)},bs.getEleLevelForLayerLevel=function(e,t){return e},bs.drawEleInLayer=function(e,t,n,r){var a=this.renderer,o=e.context,i=t.boundingBox();0!==i.w&&0!==i.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(o,!1),a.drawCachedElement(o,t,null,null,n,true),a.setImgSmoothing(o,!0))},bs.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,a=0;a<n.length;a++){var o=n[a];if(o.reqs>0)return!1;if(o.invalid)return!1;r+=o.eles.length}return r===t.length},bs.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r<n.length;r++){for(var a=n[r],o=-1,i=0;i<t.length;i++)if(a.eles[0]===t[i]){o=i;break}if(o<0)this.invalidateLayer(a);else{var s=o;for(i=0;i<a.eles.length;i++)if(a.eles[i]!==t[s+i]){this.invalidateLayer(a);break}}}},bs.updateElementsInLayers=function(e,t){for(var n=O(e[0]),r=0;r<e.length;r++)for(var a=n?null:e[r],o=n?e[r]:e[r].ele,i=o._private.rscratch,s=i.imgLayerCaches=i.imgLayerCaches||{},l=-4;l<=2;l++){var u=s[l];u&&(a&&this.getEleLevelForLayerLevel(u.level)!==a.level||t(u,o,a))}},bs.haveLayers=function(){for(var e=!1,t=-4;t<=2;t++){var n=this.layersByLevel[t];if(n&&n.length>0){e=!0;break}}return e},bs.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=Z(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},bs.invalidateLayer=function(e){if(this.lastInvalidationTime=Z(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];Ce(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var a=0;a<n.length;a++){var o=n[a]._private.rscratch.imgLayerCaches;o&&(o[t]=null)}}},bs.refineElementTextures=function(e){var t=this;t.updateElementsInLayers(e,(function(e,n,r){var a=e.replacement;if(a||((a=e.replacement=t.makeLayer(e.bb,e.level)).replaces=e,a.eles=e.eles),!a.reqs)for(var o=0;o<a.eles.length;o++)t.queueLayer(a,a.eles[o])}))},bs.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},bs.queueLayer=function(e,t){var n=this.layersQueue,r=e.elesQueue,a=r.hasId=r.hasId||{};if(!e.replacement){if(t){if(a[t.id()])return;r.push(t),a[t.id()]=!0}e.reqs?(e.reqs++,n.updateItem(e)):(e.reqs=1,n.push(e))}},bs.dequeue=function(e){for(var t=this,n=t.layersQueue,r=[],a=0;a<1&&0!==n.size();){var o=n.peek();if(o.replacement)n.pop();else if(o.replaces&&o!==o.replaces.replacement)n.pop();else if(o.invalid)n.pop();else{var i=o.elesQueue.shift();i&&(t.drawEleInLayer(o,i,o.level,e),a++),0===r.length&&r.push(!0),0===o.elesQueue.length&&(n.pop(),o.reqs=0,o.replaces&&t.applyLayerReplacement(o),t.requestRedraw())}}return r},bs.applyLayerReplacement=function(e){var t=this.layersByLevel[e.level],n=e.replaces,r=t.indexOf(n);if(!(r<0||n.invalid)){t[r]=e;for(var a=0;a<e.eles.length;a++){var o=e.eles[a]._private,i=o.imgLayerCaches=o.imgLayerCaches||{};i&&(i[e.level]=e)}this.requestRedraw()}},bs.requestRedraw=a((function(){var e=this.renderer;e.redrawHint("eles",!0),e.redrawHint("drag",!0),e.redraw()}),100),bs.setupDequeueing=fs({deqRedrawThreshold:50,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t){return e.dequeue(t)},onDeqd:ge,shouldRedraw:he,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}});var Es,_s={};function ks(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}}function Cs(e,t,n){for(var r,a=0;a<t.length;a++){var o=t[a];0===a&&(r=o),e.lineTo(o.x,o.y)}e.quadraticCurveTo(n.x,n.y,r.x,r.y)}function Ss(e,t,n){e.beginPath&&e.beginPath();for(var r=t,a=0;a<r.length;a++){var o=r[a];e.lineTo(o.x,o.y)}var i=n,s=n[0];e.moveTo(s.x,s.y);for(a=1;a<i.length;a++){o=i[a];e.lineTo(o.x,o.y)}e.closePath&&e.closePath()}function Rs(e,t,n,r,a){e.beginPath&&e.beginPath(),e.arc(n,r,a,0,2*Math.PI,!1);var o=t,i=o[0];e.moveTo(i.x,i.y);for(var s=0;s<o.length;s++){var l=o[s];e.lineTo(l.x,l.y)}e.closePath&&e.closePath()}function Ps(e,t,n,r){e.arc(t,n,r,0,2*Math.PI,!1)}_s.arrowShapeImpl=function(e){return(Es||(Es={polygon:ks,"triangle-backcurve":Cs,"triangle-tee":Ss,"circle-triangle":Rs,"triangle-cross":Ss,circle:Ps}))[e]};var Os={drawElement:function(e,t,n,r,a,o){t.isNode()?this.drawNode(e,t,n,r,a,o):this.drawEdge(e,t,n,r,a,o)},drawElementOverlay:function(e,t){t.isNode()?this.drawNodeOverlay(e,t):this.drawEdgeOverlay(e,t)},drawElementUnderlay:function(e,t){t.isNode()?this.drawNodeUnderlay(e,t):this.drawEdgeUnderlay(e,t)},drawCachedElementPortion:function(e,t,n,r,a,o,i,s){var l=this,u=n.getBoundingBox(t);if(0!==u.w&&0!==u.h){var c=n.getElement(t,u,r,a,o);if(null!=c){var d=s(l,t);if(0===d)return;var f,h,p,v,g,m,y=i(l,t),b=u.x1,w=u.y1,x=u.w,E=u.h;if(0!==y){var _=n.getRotationPoint(t);p=_.x,v=_.y,e.translate(p,v),e.rotate(y),(g=l.getImgSmoothing(e))||l.setImgSmoothing(e,!0);var k=n.getRotationOffset(t);f=k.x,h=k.y}else f=b,h=w;1!==d&&(m=e.globalAlpha,e.globalAlpha=m*d),e.drawImage(c.texture.canvas,c.x,0,c.width,c.height,f,h,x,E),1!==d&&(e.globalAlpha=m),0!==y&&(e.rotate(-y),e.translate(-p,-v),g||l.setImgSmoothing(e,!1))}else n.drawElement(e,t)}}},Ms=function(){return 0},js=function(e,t){return e.getTextAngle(t,null)},zs=function(e,t){return e.getTextAngle(t,"source")},Ts=function(e,t){return e.getTextAngle(t,"target")},Ds=function(e,t){return t.effectiveOpacity()},As=function(e,t){return t.pstyle("text-opacity").pfValue*t.effectiveOpacity()};Os.drawCachedElement=function(e,t,n,r,a,o){var i=this,s=i.data,l=s.eleTxrCache,u=s.lblTxrCache,c=s.slbTxrCache,d=s.tlbTxrCache,f=t.boundingBox(),h=!0===o?l.reasons.highQuality:null;if(0!==f.w&&0!==f.h&&t.visible()&&(!r||dt(f,r))){var p=t.isEdge(),v=t.element()._private.rscratch.badLine;i.drawElementUnderlay(e,t),i.drawCachedElementPortion(e,t,l,n,a,h,Ms,Ds),p&&v||i.drawCachedElementPortion(e,t,u,n,a,h,js,As),p&&!v&&(i.drawCachedElementPortion(e,t,c,n,a,h,zs,As),i.drawCachedElementPortion(e,t,d,n,a,h,Ts,As)),i.drawElementOverlay(e,t)}},Os.drawElements=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];this.drawElement(e,r)}},Os.drawCachedElements=function(e,t,n,r){for(var a=0;a<t.length;a++){var o=t[a];this.drawCachedElement(e,o,n,r)}},Os.drawCachedNodes=function(e,t,n,r){for(var a=0;a<t.length;a++){var o=t[a];o.isNode()&&this.drawCachedElement(e,o,n,r)}},Os.drawLayeredElements=function(e,t,n,r){var a=this.data.lyrTxrCache.getLayers(t,n);if(a)for(var o=0;o<a.length;o++){var i=a[o],s=i.bb;0!==s.w&&0!==s.h&&e.drawImage(i.canvas,s.x1,s.y1,s.w,s.h)}else this.drawCachedElements(e,t,n,r)};var Bs={drawEdge:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],i=this,s=t._private.rscratch;if((!o||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=o?t.pstyle("opacity").value:1,c=o?t.pstyle("line-opacity").value:1,d=t.pstyle("curve-style").value,f=t.pstyle("line-style").value,h=t.pstyle("width").pfValue,p=t.pstyle("line-cap").value,v=u*c,g=u*c,m=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;"straight-triangle"===d?(i.eleStrokeStyle(e,t,n),i.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=h,e.lineCap=p,i.eleStrokeStyle(e,t,n),i.drawEdgePath(t,e,s.allpts,f),e.lineCap="butt")},y=function(){a&&i.drawEdgeOverlay(e,t)},b=function(){a&&i.drawEdgeUnderlay(e,t)},w=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;i.drawArrowheads(e,t,n)},x=function(){i.drawElementText(e,t,null,r)};e.lineJoin="round";var E="yes"===t.pstyle("ghost").value;if(E){var _=t.pstyle("ghost-offset-x").pfValue,k=t.pstyle("ghost-offset-y").pfValue,C=t.pstyle("ghost-opacity").value,S=v*C;e.translate(_,k),m(S),w(S),e.translate(-_,-k)}b(),m(),w(),y(),x(),n&&e.translate(l.x1,l.y1)}}},Ns=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var a=this,o=a.usePaths(),i=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==i.edgeType||o?t.lineCap="round":t.lineCap="butt",a.colorStrokeStyle(t,l[0],l[1],l[2],r),a.drawEdgePath(n,t,i.allpts,"solid")}}}};Bs.drawEdgeOverlay=Ns("overlay"),Bs.drawEdgeUnderlay=Ns("underlay"),Bs.drawEdgePath=function(e,t,n,r){var a,o=e._private.rscratch,i=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var d=n.join("$");o.pathCacheKey&&o.pathCacheKey===d?(a=t=o.pathCache,s=!0):(a=t=new Path2D,o.pathCacheKey=d,o.pathCache=a)}if(i.setLineDash)switch(r){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=c;break;case"solid":i.setLineDash([])}if(!s&&!o.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),o.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var f=2;f+3<n.length;f+=4)t.quadraticCurveTo(n[f],n[f+1],n[f+2],n[f+3]);break;case"straight":case"segments":case"haystack":for(var h=2;h+1<n.length;h+=2)t.lineTo(n[h],n[h+1])}t=i,l?t.stroke(a):t.stroke(),t.setLineDash&&t.setLineDash([])},Bs.drawEdgeTrianglePath=function(e,t,n){t.fillStyle=t.strokeStyle;for(var r=e.pstyle("width").pfValue,a=0;a+1<n.length;a+=2){var o=[n[a+2]-n[a],n[a+3]-n[a+1]],i=Math.sqrt(o[0]*o[0]+o[1]*o[1]),s=[o[1]/i,-o[0]/i],l=[s[0]*r/2,s[1]*r/2];t.beginPath(),t.moveTo(n[a]-l[0],n[a+1]-l[1]),t.lineTo(n[a]+l[0],n[a+1]+l[1]),t.lineTo(n[a+2],n[a+3]),t.closePath(),t.fill()}},Bs.drawArrowheads=function(e,t,n){var r=t._private.rscratch,a="haystack"===r.edgeType;a||this.drawArrowhead(e,t,"source",r.arrowStartX,r.arrowStartY,r.srcArrowAngle,n),this.drawArrowhead(e,t,"mid-target",r.midX,r.midY,r.midtgtArrowAngle,n),this.drawArrowhead(e,t,"mid-source",r.midX,r.midY,r.midsrcArrowAngle,n),a||this.drawArrowhead(e,t,"target",r.arrowEndX,r.arrowEndY,r.tgtArrowAngle,n)},Bs.drawArrowhead=function(e,t,n,r,a,o,i){if(!(isNaN(r)||null==r||isNaN(a)||null==a||isNaN(o)||null==o)){var s=this,l=t.pstyle(n+"-arrow-shape").value;if("none"!==l){var u="hollow"===t.pstyle(n+"-arrow-fill").value?"both":"filled",c=t.pstyle(n+"-arrow-fill").value,d=t.pstyle("width").pfValue,f=t.pstyle("opacity").value;void 0===i&&(i=f);var h=e.globalCompositeOperation;1===i&&"hollow"!==c||(e.globalCompositeOperation="destination-out",s.colorFillStyle(e,255,255,255,1),s.colorStrokeStyle(e,255,255,255,1),s.drawArrowShape(t,e,u,d,l,r,a,o),e.globalCompositeOperation=h);var p=t.pstyle(n+"-arrow-color").value;s.colorFillStyle(e,p[0],p[1],p[2],i),s.colorStrokeStyle(e,p[0],p[1],p[2],i),s.drawArrowShape(t,e,c,d,l,r,a,o)}}},Bs.drawArrowShape=function(e,t,n,r,a,o,i,s){var l,u=this,c=this.usePaths()&&"triangle-cross"!==a,d=!1,f=t,h={x:o,y:i},p=e.pstyle("arrow-scale").value,v=this.getArrowWidth(r,p),g=u.arrowShapes[a];if(c){var m=u.arrowPathCache=u.arrowPathCache||[],y=ie(a),b=m[y];null!=b?(l=t=b,d=!0):(l=t=new Path2D,m[y]=l)}d||(t.beginPath&&t.beginPath(),c?g.draw(t,1,0,{x:0,y:0},1):g.draw(t,v,s,h,r),t.closePath&&t.closePath()),t=f,c&&(t.translate(o,i),t.rotate(s),t.scale(v,v)),"filled"!==n&&"both"!==n||(c?t.fill(l):t.fill()),"hollow"!==n&&"both"!==n||(t.lineWidth=(g.matchEdgeWidth?r:1)/(c?v:1),t.lineJoin="miter",c?t.stroke(l):t.stroke()),c&&(t.scale(1/v,1/v),t.rotate(-s),t.translate(-o,-i))};var Is={safeDrawImage:function(e,t,n,r,a,o,i,s,l,u){a<=0||o<=0||l<=0||u<=0||e.drawImage(t,n,r,a,o,i,s,l,u)},drawInscribedImage:function(e,t,n,r,a){var o=this,i=n.position(),s=i.x,l=i.y,u=n.cy().style(),c=u.getIndexedStyle.bind(u),d=c(n,"background-fit","value",r),f=c(n,"background-repeat","value",r),h=n.width(),p=n.height(),v=2*n.padding(),g=h+("inner"===c(n,"background-width-relative-to","value",r)?0:v),m=p+("inner"===c(n,"background-height-relative-to","value",r)?0:v),y=n._private.rscratch,b="node"===c(n,"background-clip","value",r),w=c(n,"background-image-opacity","value",r)*a,x=c(n,"background-image-smoothing","value",r),E=t.width||t.cachedW,_=t.height||t.cachedH;null!=E&&null!=_||(document.body.appendChild(t),E=t.cachedW=t.width||t.offsetWidth,_=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var k=E,C=_;if("auto"!==c(n,"background-width","value",r)&&(k="%"===c(n,"background-width","units",r)?c(n,"background-width","pfValue",r)*g:c(n,"background-width","pfValue",r)),"auto"!==c(n,"background-height","value",r)&&(C="%"===c(n,"background-height","units",r)?c(n,"background-height","pfValue",r)*m:c(n,"background-height","pfValue",r)),0!==k&&0!==C){if("contain"===d)k*=S=Math.min(g/k,m/C),C*=S;else if("cover"===d){var S;k*=S=Math.max(g/k,m/C),C*=S}var R=s-g/2,P=c(n,"background-position-x","units",r),O=c(n,"background-position-x","pfValue",r);R+="%"===P?(g-k)*O:O;var M=c(n,"background-offset-x","units",r),j=c(n,"background-offset-x","pfValue",r);R+="%"===M?(g-k)*j:j;var z=l-m/2,T=c(n,"background-position-y","units",r),D=c(n,"background-position-y","pfValue",r);z+="%"===T?(m-C)*D:D;var A=c(n,"background-offset-y","units",r),B=c(n,"background-offset-y","pfValue",r);z+="%"===A?(m-C)*B:B,y.pathCache&&(R-=s,z-=l,s=0,l=0);var N=e.globalAlpha;e.globalAlpha=w;var I=o.getImgSmoothing(e),L=!1;if("no"===x&&I?(o.setImgSmoothing(e,!1),L=!0):"yes"!==x||I||(o.setImgSmoothing(e,!0),L=!0),"no-repeat"===f)b&&(e.save(),y.pathCache?e.clip(y.pathCache):(o.nodeShapes[o.getNodeShape(n)].draw(e,s,l,g,m),e.clip())),o.safeDrawImage(e,t,0,0,E,_,R,z,k,C),b&&e.restore();else{var V=e.createPattern(t,f);e.fillStyle=V,o.nodeShapes[o.getNodeShape(n)].draw(e,s,l,g,m),e.translate(R,z),e.fill(),e.translate(-R,-z)}e.globalAlpha=N,L&&o.setImgSmoothing(e,I)}}},Ls={};function Vs(e,t,n,r,a){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:5;e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+a-o),e.quadraticCurveTo(t+r,n+a,t+r-o,n+a),e.lineTo(t+o,n+a),e.quadraticCurveTo(t,n+a,t,n+a-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath(),e.fill()}Ls.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),a=Math.ceil(Qe(n*r));t=Math.pow(2,a)}return!(e.pstyle("font-size").pfValue*t<e.pstyle("min-zoomed-font-size").pfValue)},Ls.drawElementText=function(e,t,n,r,a){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],i=this;if(null==r){if(o&&!i.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=i.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),d=t.pstyle("source-label"),f=t.pstyle("target-label");if(u||(!c||!c.value)&&(!d||!d.value)&&(!f||!f.value))return;e.textAlign="center",e.textBaseline="bottom"}var h,p=!n;n&&(h=n,e.translate(-h.x1,-h.y1)),null==a?(i.drawText(e,t,null,p,o),t.isEdge()&&(i.drawText(e,t,"source",p,o),i.drawText(e,t,"target",p,o))):i.drawText(e,t,a,p,o),n&&e.translate(h.x1,h.y1)},Ls.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if((t=this.fontCaches[n]).context===e)return t;return t={context:e},this.fontCaches.push(t),t},Ls.setupTextStyle=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,a=t.pstyle("font-size").pfValue+"px",o=t.pstyle("font-family").strValue,i=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+i+" "+a+" "+o,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},Ls.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",a=e.pstyle(r+"text-rotation"),o=Re(n,"labelAngle",t);return"autorotate"===a.strValue?e.isEdge()?o:0:"none"===a.strValue?0:a.pfValue},Ls.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=t._private,i=o.rscratch,s=a?t.effectiveOpacity():1;if(!a||0!==s&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var l,u,c=Re(i,"labelX",n),d=Re(i,"labelY",n),f=this.getLabelText(t,n);if(null!=f&&""!==f&&!isNaN(c)&&!isNaN(d)){this.setupTextStyle(e,t,a);var h,p=n?n+"-":"",v=Re(i,"labelWidth",n),g=Re(i,"labelHeight",n),m=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,b=t.isEdge(),w=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(b&&(w="center",x="center"),c+=m,d+=y,0!==(h=r?this.getTextAngle(t,n):0)&&(l=c,u=d,e.translate(l,u),e.rotate(h),c=0,d=0),x){case"top":break;case"center":d+=g/2;break;case"bottom":d+=g}var E=t.pstyle("text-background-opacity").value,_=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,C=t.pstyle("text-background-padding").pfValue;if(E>0||k>0&&_>0){var S=c-C;switch(w){case"left":S-=v;break;case"center":S-=v/2}var R=d-g-C,P=v+2*C,O=g+2*C;if(E>0){var M=e.fillStyle,j=t.pstyle("text-background-color").value;e.fillStyle="rgba("+j[0]+","+j[1]+","+j[2]+","+E*s+")";var z=t.pstyle("text-background-shape").strValue;0===z.indexOf("round")?Vs(e,S,R,P,O,2):e.fillRect(S,R,P,O),e.fillStyle=M}if(k>0&&_>0){var T=e.strokeStyle,D=e.lineWidth,A=t.pstyle("text-border-color").value,B=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+A[0]+","+A[1]+","+A[2]+","+_*s+")",e.lineWidth=k,e.setLineDash)switch(B){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(e.strokeRect(S,R,P,O),"double"===B){var N=k/2;e.strokeRect(S+N,R+N,P-2*N,O-2*N)}e.setLineDash&&e.setLineDash([]),e.lineWidth=D,e.strokeStyle=T}}var I=2*t.pstyle("text-outline-width").pfValue;if(I>0&&(e.lineWidth=I),"wrap"===t.pstyle("text-wrap").value){var L=Re(i,"labelWrapCachedLines",n),V=Re(i,"labelLineHeight",n),F=v/2,H=this.getLabelJustification(t);switch("auto"===H||("left"===w?"left"===H?c+=-v:"center"===H&&(c+=-F):"center"===w?"left"===H?c+=-F:"right"===H&&(c+=F):"right"===w&&("center"===H?c+=F:"right"===H&&(c+=v))),x){case"top":case"center":case"bottom":d-=(L.length-1)*V}for(var G=0;G<L.length;G++)I>0&&e.strokeText(L[G],c,d),e.fillText(L[G],c,d),d+=V}else I>0&&e.strokeText(f,c,d),e.fillText(f,c,d);0!==h&&(e.rotate(-h),e.translate(-l,-u))}}};var Fs={drawNode:function(e,t,n){var r,a,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,d=t.position();if(S(d.x)&&S(d.y)&&(!s||t.visible())){var f,h,p=s?t.effectiveOpacity():1,v=l.usePaths(),g=!1,m=t.padding();r=t.width()+2*m,a=t.height()+2*m,n&&(h=n,e.translate(-h.x1,-h.y1));for(var y=t.pstyle("background-image"),b=y.value,w=new Array(b.length),x=new Array(b.length),E=0,_=0;_<b.length;_++){var k=b[_],C=w[_]=null!=k&&"none"!==k;if(C){var R=t.cy().style().getIndexedStyle(t,"background-image-crossorigin","value",_);E++,x[_]=l.getCachedImage(k,R,(function(){u.backgroundTimestamp=Date.now(),t.emitAndNotify("background")}))}}var P=t.pstyle("background-blacken").value,O=t.pstyle("border-width").pfValue,M=t.pstyle("background-opacity").value*p,j=t.pstyle("border-color").value,z=t.pstyle("border-style").value,T=t.pstyle("border-opacity").value*p;e.lineJoin="miter";var D=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M;l.eleFillStyle(e,t,n)},A=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T;l.colorStrokeStyle(e,j[0],j[1],j[2],t)},B=t.pstyle("shape").strValue,N=t.pstyle("shape-polygon-points").pfValue;if(v){e.translate(d.x,d.y);var I=l.nodePathCache=l.nodePathCache||[],L=se("polygon"===B?B+","+N.join(","):B,""+a,""+r),V=I[L];null!=V?(f=V,g=!0,c.pathCache=f):(f=new Path2D,I[L]=c.pathCache=f)}var F=function(){if(!g){var n=d;v&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(f||e,n.x,n.y,r,a)}v?e.fill(f):e.fill()},H=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=u.backgrounding,o=0,i=0;i<x.length;i++){var s=t.cy().style().getIndexedStyle(t,"background-image-containment","value",i);r&&"over"===s||!r&&"inside"===s?o++:w[i]&&x[i].complete&&!x[i].error&&(o++,l.drawInscribedImage(e,x[i],t,i,n))}u.backgrounding=!(o===E),a!==u.backgrounding&&t.updateStyle(!1)},G=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;l.hasPie(t)&&(l.drawPie(e,t,o),n&&(v||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a)))},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,n=(P>0?P:-P)*t,r=P>0?0:255;0!==P&&(l.colorFillStyle(e,r,r,r,n),v?e.fill(f):e.fill())},Y=function(){if(O>0){if(e.lineWidth=O,e.lineCap="butt",e.setLineDash)switch(z){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(v?e.stroke(f):e.stroke(),"double"===z){e.lineWidth=O/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",v?e.stroke(f):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}},U=function(){i&&l.drawNodeOverlay(e,t,d,r,a)},W=function(){i&&l.drawNodeUnderlay(e,t,d,r,a)},$=function(){l.drawElementText(e,t,null,o)},X="yes"===t.pstyle("ghost").value;if(X){var K=t.pstyle("ghost-offset-x").pfValue,Z=t.pstyle("ghost-offset-y").pfValue,Q=t.pstyle("ghost-opacity").value,J=Q*p;e.translate(K,Z),D(Q*M),F(),H(J,!0),A(Q*T),Y(),G(0!==P||0!==O),H(J,!1),q(J),e.translate(-K,-Z)}v&&e.translate(-d.x,-d.y),W(),v&&e.translate(d.x,d.y),D(),F(),H(p,!0),A(),Y(),G(0!==P||0!==O),H(p,!1),q(),v&&e.translate(-d.x,-d.y),$(),U(),n&&e.translate(h.x1,h.y1)}}},Hs=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n,r,a,o){if(n.visible()){var i=n.pstyle("".concat(e,"-padding")).pfValue,s=n.pstyle("".concat(e,"-opacity")).value,l=n.pstyle("".concat(e,"-color")).value,u=n.pstyle("".concat(e,"-shape")).value;if(s>0){if(r=r||n.position(),null==a||null==o){var c=n.padding();a=n.width()+2*c,o=n.height()+2*c}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,a+2*i,o+2*i),t.fill()}}}};Fs.drawNodeOverlay=Hs("overlay"),Fs.drawNodeUnderlay=Hs("underlay"),Fs.hasPie=function(e){return(e=e[0])._private.hasPie},Fs.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var a=t.cy().style(),o=t.pstyle("pie-size"),i=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,d=0;this.usePaths()&&(i=0,s=0),"%"===o.units?c*=o.pfValue:void 0!==o.pfValue&&(c=o.pfValue/2);for(var f=1;f<=a.pieBackgroundN;f++){var h=t.pstyle("pie-"+f+"-background-size").value,p=t.pstyle("pie-"+f+"-background-color").value,v=t.pstyle("pie-"+f+"-background-opacity").value*n,g=h/100;g+d>1&&(g=1-d);var m=1.5*Math.PI+2*Math.PI*d,y=m+2*Math.PI*g;0===h||d>=1||d+g>1||(e.beginPath(),e.moveTo(i,s),e.arc(i,s,c,m,y),e.closePath(),this.colorFillStyle(e,p[0],p[1],p[2],v),e.fill(),d+=g)}};var Gs={};Gs.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},Gs.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,a=0;a<n.length;a++)if((t=n[a]).context===e){r=!1;break}return r&&(t={context:e},n.push(t)),t},Gs.createGradientStyleFor=function(e,t,n,r,a){var o,i=this.usePaths(),s=n.pstyle(t+"-gradient-stop-colors").value,l=n.pstyle(t+"-gradient-stop-positions").pfValue;if("radial-gradient"===r)if(n.isEdge()){var u=n.sourceEndpoint(),c=n.targetEndpoint(),d=n.midpoint(),f=et(u,d),h=et(c,d);o=e.createRadialGradient(d.x,d.y,0,d.x,d.y,Math.max(f,h))}else{var p=i?{x:0,y:0}:n.position(),v=n.paddedWidth(),g=n.paddedHeight();o=e.createRadialGradient(p.x,p.y,0,p.x,p.y,Math.max(v,g))}else if(n.isEdge()){var m=n.sourceEndpoint(),y=n.targetEndpoint();o=e.createLinearGradient(m.x,m.y,y.x,y.y)}else{var b=i?{x:0,y:0}:n.position(),w=n.paddedWidth()/2,x=n.paddedHeight()/2;switch(n.pstyle("background-gradient-direction").value){case"to-bottom":o=e.createLinearGradient(b.x,b.y-x,b.x,b.y+x);break;case"to-top":o=e.createLinearGradient(b.x,b.y+x,b.x,b.y-x);break;case"to-left":o=e.createLinearGradient(b.x+w,b.y,b.x-w,b.y);break;case"to-right":o=e.createLinearGradient(b.x-w,b.y,b.x+w,b.y);break;case"to-bottom-right":case"to-right-bottom":o=e.createLinearGradient(b.x-w,b.y-x,b.x+w,b.y+x);break;case"to-top-right":case"to-right-top":o=e.createLinearGradient(b.x-w,b.y+x,b.x+w,b.y-x);break;case"to-bottom-left":case"to-left-bottom":o=e.createLinearGradient(b.x+w,b.y-x,b.x-w,b.y+x);break;case"to-top-left":case"to-left-top":o=e.createLinearGradient(b.x+w,b.y+x,b.x-w,b.y-x)}}if(!o)return null;for(var E=l.length===s.length,_=s.length,k=0;k<_;k++)o.addColorStop(E?l[k]:k/(_-1),"rgba("+s[k][0]+","+s[k][1]+","+s[k][2]+","+a+")");return o},Gs.gradientFillStyle=function(e,t,n,r){var a=this.createGradientStyleFor(e,"background",t,n,r);if(!a)return null;e.fillStyle=a},Gs.colorFillStyle=function(e,t,n,r,a){e.fillStyle="rgba("+t+","+n+","+r+","+a+")"},Gs.eleFillStyle=function(e,t,n){var r=t.pstyle("background-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientFillStyle(e,t,r,n);else{var a=t.pstyle("background-color").value;this.colorFillStyle(e,a[0],a[1],a[2],n)}},Gs.gradientStrokeStyle=function(e,t,n,r){var a=this.createGradientStyleFor(e,"line",t,n,r);if(!a)return null;e.strokeStyle=a},Gs.colorStrokeStyle=function(e,t,n,r,a){e.strokeStyle="rgba("+t+","+n+","+r+","+a+")"},Gs.eleStrokeStyle=function(e,t,n){var r=t.pstyle("line-fill").value;if("linear-gradient"===r||"radial-gradient"===r)this.gradientStrokeStyle(e,t,r,n);else{var a=t.pstyle("line-color").value;this.colorStrokeStyle(e,a[0],a[1],a[2],n)}},Gs.matchCanvasSize=function(e){var t=this,n=t.data,r=t.findContainerClientCoords(),a=r[2],o=r[3],i=t.getPixelRatio(),s=t.motionBlurPxRatio;e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]&&e!==t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG]||(i=s);var l,u=a*i,c=o*i;if(u!==t.canvasWidth||c!==t.canvasHeight){t.fontCaches=null;var d=n.canvasContainer;d.style.width=a+"px",d.style.height=o+"px";for(var f=0;f<t.CANVAS_LAYERS;f++)(l=n.canvases[f]).width=u,l.height=c,l.style.width=a+"px",l.style.height=o+"px";for(f=0;f<t.BUFFER_COUNT;f++)(l=n.bufferCanvases[f]).width=u,l.height=c,l.style.width=a+"px",l.style.height=o+"px";t.textureMult=1,i<=1&&(l=n.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,l.width=u*t.textureMult,l.height=c*t.textureMult),t.canvasWidth=u,t.canvasHeight=c}},Gs.renderTo=function(e,t,n,r){this.render({forcedContext:e,forcedZoom:t,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},Gs.render=function(e){var t=(e=e||_e()).forcedContext,n=e.drawAllLayers,r=e.drawOnlyNodeLayer,a=e.forcedZoom,o=e.forcedPan,i=this,s=void 0===e.forcedPxRatio?this.getPixelRatio():e.forcedPxRatio,l=i.cy,u=i.data,c=u.canvasNeedsRedraw,d=i.textureOnViewport&&!t&&(i.pinching||i.hoverData.dragging||i.swipePanning||i.data.wheelZooming),f=void 0!==e.motionBlur?e.motionBlur:i.motionBlur,h=i.motionBlurPxRatio,p=l.hasCompoundNodes(),v=i.hoverData.draggingEles,g=!(!i.hoverData.selecting&&!i.touchData.selecting),m=f=f&&!t&&i.motionBlurEnabled&&!g;t||(i.prevPxRatio!==s&&(i.invalidateContainerClientCoordsCache(),i.matchCanvasSize(i.container),i.redrawHint("eles",!0),i.redrawHint("drag",!0)),i.prevPxRatio=s),!t&&i.motionBlurTimeout&&clearTimeout(i.motionBlurTimeout),f&&(null==i.mbFrames&&(i.mbFrames=0),i.mbFrames++,i.mbFrames<3&&(m=!1),i.mbFrames>i.minMbLowQualFrames&&(i.motionBlurPxRatio=i.mbPxRBlurry)),i.clearingMotionBlur&&(i.motionBlurPxRatio=1),i.textureDrawLastFrame&&!d&&(c[i.NODE]=!0,c[i.SELECT_BOX]=!0);var y=l.style(),b=l.zoom(),w=void 0!==a?a:b,x=l.pan(),E={x:x.x,y:x.y},_={zoom:b,pan:{x:x.x,y:x.y}},k=i.prevViewport;void 0===k||_.zoom!==k.zoom||_.pan.x!==k.pan.x||_.pan.y!==k.pan.y||v&&!p||(i.motionBlurPxRatio=1),o&&(E=o),w*=s,E.x*=s,E.y*=s;var C=i.getCachedZSortedEles();function S(e,t,n,r,a){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",i.colorFillStyle(e,255,255,255,i.motionBlurTransparency),e.fillRect(t,n,r,a),e.globalCompositeOperation=o}function R(e,r){var s,l,c,d;i.clearingMotionBlur||e!==u.bufferContexts[i.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG]?(s=E,l=w,c=i.canvasWidth,d=i.canvasHeight):(s={x:x.x*h,y:x.y*h},l=b*h,c=i.canvasWidth*h,d=i.canvasHeight*h),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?S(e,0,0,c,d):t||void 0!==r&&!r||e.clearRect(0,0,c,d),n||(e.translate(s.x,s.y),e.scale(l,l)),o&&e.translate(o.x,o.y),a&&e.scale(a,a)}if(d||(i.textureDrawLastFrame=!1),d){if(i.textureDrawLastFrame=!0,!i.textureCache){i.textureCache={},i.textureCache.bb=l.mutableElements().boundingBox(),i.textureCache.texture=i.data.bufferCanvases[i.TEXTURE_BUFFER];var P=i.data.bufferContexts[i.TEXTURE_BUFFER];P.setTransform(1,0,0,1,0,0),P.clearRect(0,0,i.canvasWidth*i.textureMult,i.canvasHeight*i.textureMult),i.render({forcedContext:P,drawOnlyNodeLayer:!0,forcedPxRatio:s*i.textureMult}),(_=i.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:i.canvasWidth,height:i.canvasHeight}).mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}c[i.DRAG]=!1,c[i.NODE]=!1;var O=u.contexts[i.NODE],M=i.textureCache.texture;_=i.textureCache.viewport;O.setTransform(1,0,0,1,0,0),f?S(O,0,0,_.width,_.height):O.clearRect(0,0,_.width,_.height);var j=y.core("outside-texture-bg-color").value,z=y.core("outside-texture-bg-opacity").value;i.colorFillStyle(O,j[0],j[1],j[2],z),O.fillRect(0,0,_.width,_.height);b=l.zoom();R(O,!1),O.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s),O.drawImage(M,_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s)}else i.textureOnViewport&&!t&&(i.textureCache=null);var T=l.extent(),D=i.pinching||i.hoverData.dragging||i.swipePanning||i.data.wheelZooming||i.hoverData.draggingEles||i.cy.animated(),A=i.hideEdgesOnViewport&&D,B=[];if(B[i.NODE]=!c[i.NODE]&&f&&!i.clearedForMotionBlur[i.NODE]||i.clearingMotionBlur,B[i.NODE]&&(i.clearedForMotionBlur[i.NODE]=!0),B[i.DRAG]=!c[i.DRAG]&&f&&!i.clearedForMotionBlur[i.DRAG]||i.clearingMotionBlur,B[i.DRAG]&&(i.clearedForMotionBlur[i.DRAG]=!0),c[i.NODE]||n||r||B[i.NODE]){var N=f&&!B[i.NODE]&&1!==h;R(O=t||(N?i.data.bufferContexts[i.MOTIONBLUR_BUFFER_NODE]:u.contexts[i.NODE]),f&&!N?"motionBlur":void 0),A?i.drawCachedNodes(O,C.nondrag,s,T):i.drawLayeredElements(O,C.nondrag,s,T),i.debug&&i.drawDebugPoints(O,C.nondrag),n||f||(c[i.NODE]=!1)}if(!r&&(c[i.DRAG]||n||B[i.DRAG])){N=f&&!B[i.DRAG]&&1!==h;R(O=t||(N?i.data.bufferContexts[i.MOTIONBLUR_BUFFER_DRAG]:u.contexts[i.DRAG]),f&&!N?"motionBlur":void 0),A?i.drawCachedNodes(O,C.drag,s,T):i.drawCachedElements(O,C.drag,s,T),i.debug&&i.drawDebugPoints(O,C.drag),n||f||(c[i.DRAG]=!1)}if(i.showFps||!r&&c[i.SELECT_BOX]&&!n){if(R(O=t||u.contexts[i.SELECT_BOX]),1==i.selection[4]&&(i.hoverData.selecting||i.touchData.selecting)){b=i.cy.zoom();var I=y.core("selection-box-border-width").value/b;O.lineWidth=I,O.fillStyle="rgba("+y.core("selection-box-color").value[0]+","+y.core("selection-box-color").value[1]+","+y.core("selection-box-color").value[2]+","+y.core("selection-box-opacity").value+")",O.fillRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1]),I>0&&(O.strokeStyle="rgba("+y.core("selection-box-border-color").value[0]+","+y.core("selection-box-border-color").value[1]+","+y.core("selection-box-border-color").value[2]+","+y.core("selection-box-opacity").value+")",O.strokeRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1]))}if(u.bgActivePosistion&&!i.hoverData.selecting){b=i.cy.zoom();var L=u.bgActivePosistion;O.fillStyle="rgba("+y.core("active-bg-color").value[0]+","+y.core("active-bg-color").value[1]+","+y.core("active-bg-color").value[2]+","+y.core("active-bg-opacity").value+")",O.beginPath(),O.arc(L.x,L.y,y.core("active-bg-size").pfValue/b,0,2*Math.PI),O.fill()}var V=i.lastRedrawTime;if(i.showFps&&V){V=Math.round(V);var F=Math.round(1e3/V);O.setTransform(1,0,0,1,0,0),O.fillStyle="rgba(255, 0, 0, 0.75)",O.strokeStyle="rgba(255, 0, 0, 0.75)",O.lineWidth=1,O.fillText("1 frame = "+V+" ms = "+F+" fps",0,20);O.strokeRect(0,30,250,20),O.fillRect(0,30,250*Math.min(F/60,1),20)}n||(c[i.SELECT_BOX]=!1)}if(f&&1!==h){var H=u.contexts[i.NODE],G=i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_NODE],q=u.contexts[i.DRAG],Y=i.data.bufferCanvases[i.MOTIONBLUR_BUFFER_DRAG],U=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!m?e.clearRect(0,0,i.canvasWidth,i.canvasHeight):S(e,0,0,i.canvasWidth,i.canvasHeight);var r=h;e.drawImage(t,0,0,i.canvasWidth*r,i.canvasHeight*r,0,0,i.canvasWidth,i.canvasHeight)};(c[i.NODE]||B[i.NODE])&&(U(H,G,B[i.NODE]),c[i.NODE]=!1),(c[i.DRAG]||B[i.DRAG])&&(U(q,Y,B[i.DRAG]),c[i.DRAG]=!1)}i.prevViewport=_,i.clearingMotionBlur&&(i.clearingMotionBlur=!1,i.motionBlurCleared=!0,i.motionBlur=!0),f&&(i.motionBlurTimeout=setTimeout((function(){i.motionBlurTimeout=null,i.clearedForMotionBlur[i.NODE]=!1,i.clearedForMotionBlur[i.DRAG]=!1,i.motionBlur=!1,i.clearingMotionBlur=!d,i.mbFrames=0,c[i.NODE]=!0,c[i.DRAG]=!0,i.redraw()}),100)),t||l.emit("render")};for(var qs={drawPolygonPath:function(e,t,n,r,a,o){var i=r/2,s=a/2;e.beginPath&&e.beginPath(),e.moveTo(t+i*o[0],n+s*o[1]);for(var l=1;l<o.length/2;l++)e.lineTo(t+i*o[2*l],n+s*o[2*l+1]);e.closePath()},drawRoundPolygonPath:function(e,t,n,r,a,o){var i=r/2,s=a/2,l=Tt(r,a);e.beginPath&&e.beginPath();for(var u=0;u<o.length/4;u++){var c,d=void 0;d=0===u?o.length-2:4*u-2,c=4*u+2;var f=t+i*o[4*u],h=n+s*o[4*u+1],p=-o[d]*o[c]-o[d+1]*o[c+1],v=l/Math.tan(Math.acos(p)/2),g=f-v*o[d],m=h-v*o[d+1],y=f+v*o[c],b=h+v*o[c+1];0===u?e.moveTo(g,m):e.lineTo(g,m),e.arcTo(f,h,y,b,l)}e.closePath()},drawRoundRectanglePath:function(e,t,n,r,a){var o=r/2,i=a/2,s=zt(r,a);e.beginPath&&e.beginPath(),e.moveTo(t,n-i),e.arcTo(t+o,n-i,t+o,n,s),e.arcTo(t+o,n+i,t,n+i,s),e.arcTo(t-o,n+i,t-o,n,s),e.arcTo(t-o,n-i,t,n-i,s),e.lineTo(t,n-i),e.closePath()},drawBottomRoundRectanglePath:function(e,t,n,r,a){var o=r/2,i=a/2,s=zt(r,a);e.beginPath&&e.beginPath(),e.moveTo(t,n-i),e.lineTo(t+o,n-i),e.lineTo(t+o,n),e.arcTo(t+o,n+i,t,n+i,s),e.arcTo(t-o,n+i,t-o,n,s),e.lineTo(t-o,n-i),e.lineTo(t,n-i),e.closePath()},drawCutRectanglePath:function(e,t,n,r,a){var o=r/2,i=a/2;e.beginPath&&e.beginPath(),e.moveTo(t-o+8,n-i),e.lineTo(t+o-8,n-i),e.lineTo(t+o,n-i+8),e.lineTo(t+o,n+i-8),e.lineTo(t+o-8,n+i),e.lineTo(t-o+8,n+i),e.lineTo(t-o,n+i-8),e.lineTo(t-o,n-i+8),e.closePath()},drawBarrelPath:function(e,t,n,r,a){var o=r/2,i=a/2,s=t-o,l=t+o,u=n-i,c=n+i,d=Dt(r,a),f=d.widthOffset,h=d.heightOffset,p=d.ctrlPtOffsetPct*f;e.beginPath&&e.beginPath(),e.moveTo(s,u+h),e.lineTo(s,c-h),e.quadraticCurveTo(s+p,c,s+f,c),e.lineTo(l-f,c),e.quadraticCurveTo(l-p,c,l,c-h),e.lineTo(l,u+h),e.quadraticCurveTo(l-p,u,l-f,u),e.lineTo(s+f,u),e.quadraticCurveTo(s+p,u,s,u+h),e.closePath()}},Ys=Math.sin(0),Us=Math.cos(0),Ws={},$s={},Xs=Math.PI/40,Ks=0*Math.PI;Ks<2*Math.PI;Ks+=Xs)Ws[Ks]=Math.sin(Ks),$s[Ks]=Math.cos(Ks);qs.drawEllipsePath=function(e,t,n,r,a){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,a/2,0,0,2*Math.PI);else for(var o,i,s=r/2,l=a/2,u=0*Math.PI;u<2*Math.PI;u+=Xs)o=t-s*Ws[u]*Ys+s*$s[u]*Us,i=n+l*$s[u]*Ys+l*Ws[u]*Us,0===u?e.moveTo(o,i):e.lineTo(o,i);e.closePath()};var Zs={};function Qs(e){var t=e.indexOf(",");return e.substr(t+1)}function Js(e,t,n){var r=function(){return t.toDataURL(n,e.quality)};switch(e.output){case"blob-promise":return new Wn((function(r,a){try{t.toBlob((function(e){null!=e?r(e):a(new Error("`canvas.toBlob()` sent a null value in its callback"))}),n,e.quality)}catch(o){a(o)}}));case"blob":return function(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),a=new Uint8Array(r),o=0;o<n.length;o++)a[o]=n.charCodeAt(o);return new Blob([r],{type:t})}(Qs(r()),n);case"base64":return Qs(r());default:return r()}}Zs.createBuffer=function(e,t){var n=document.createElement("canvas");return n.width=e,n.height=t,[n,n.getContext("2d")]},Zs.bufferCanvasImage=function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),a=e.full?Math.ceil(n.w):r[2],o=e.full?Math.ceil(n.h):r[3],i=S(e.maxWidth)||S(e.maxHeight),s=this.getPixelRatio(),l=1;if(void 0!==e.scale)a*=e.scale,o*=e.scale,l=e.scale;else if(i){var u=1/0,c=1/0;S(e.maxWidth)&&(u=l*e.maxWidth/a),S(e.maxHeight)&&(c=l*e.maxHeight/o),a*=l=Math.min(u,c),o*=l}i||(a*=s,o*=s,l*=s);var d=document.createElement("canvas");d.width=a,d.height=o,d.style.width=a+"px",d.style.height=o+"px";var f=d.getContext("2d");if(a>0&&o>0){f.clearRect(0,0,a,o),f.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*l,-n.y1*l),f.scale(l,l),this.drawElements(f,h),f.scale(1/l,1/l),f.translate(n.x1*l,n.y1*l);else{var p=t.pan(),v={x:p.x*l,y:p.y*l};l*=t.zoom(),f.translate(v.x,v.y),f.scale(l,l),this.drawElements(f,h),f.scale(1/l,1/l),f.translate(-v.x,-v.y)}e.bg&&(f.globalCompositeOperation="destination-over",f.fillStyle=e.bg,f.rect(0,0,a,o),f.fill())}return d},Zs.png=function(e){return Js(e,this.bufferCanvasImage(e),"image/png")},Zs.jpg=function(e){return Js(e,this.bufferCanvasImage(e),"image/jpeg")};var el={nodeShapeImpl:function(e,t,n,r,a,o,i){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,a,o);case"polygon":return this.drawPolygonPath(t,n,r,a,o,i);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,a,o,i);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,a,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,a,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,a,o);case"barrel":return this.drawBarrelPath(t,n,r,a,o)}}},tl=rl,nl=rl.prototype;function rl(e){var t=this;t.data={canvases:new Array(nl.CANVAS_LAYERS),contexts:new Array(nl.CANVAS_LAYERS),canvasNeedsRedraw:new Array(nl.CANVAS_LAYERS),bufferCanvases:new Array(nl.BUFFER_COUNT),bufferContexts:new Array(nl.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",r="rgba(0,0,0,0)";t.data.canvasContainer=document.createElement("div");var a=t.data.canvasContainer.style;t.data.canvasContainer.style[n]=r,a.position="relative",a.zIndex="0",a.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[n]=r;var i={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};g&&g.userAgent.match(/msie|trident|edge/i)&&(i["-ms-touch-action"]="none",i["touch-action"]="none");for(var s=0;s<nl.CANVAS_LAYERS;s++){var l=t.data.canvases[s]=document.createElement("canvas");t.data.contexts[s]=l.getContext("2d"),Object.keys(i).forEach((function(e){l.style[e]=i[e]})),l.style.position="absolute",l.setAttribute("data-id","layer"+s),l.style.zIndex=String(nl.CANVAS_LAYERS-s),t.data.canvasContainer.appendChild(l),t.data.canvasNeedsRedraw[s]=!1}t.data.topCanvas=t.data.canvases[0],t.data.canvases[nl.NODE].setAttribute("data-id","layer"+nl.NODE+"-node"),t.data.canvases[nl.SELECT_BOX].setAttribute("data-id","layer"+nl.SELECT_BOX+"-selectbox"),t.data.canvases[nl.DRAG].setAttribute("data-id","layer"+nl.DRAG+"-drag");for(s=0;s<nl.BUFFER_COUNT;s++)t.data.bufferCanvases[s]=document.createElement("canvas"),t.data.bufferContexts[s]=t.data.bufferCanvases[s].getContext("2d"),t.data.bufferCanvases[s].style.position="absolute",t.data.bufferCanvases[s].setAttribute("data-id","buffer"+s),t.data.bufferCanvases[s].style.zIndex=String(-s-1),t.data.bufferCanvases[s].style.visibility="hidden";t.pathsEnabled=!0;var u=it(),c=function(e){return{x:-e.w/2,y:-e.h/2}},d=function(e){return e.boundingBox(),e[0]._private.bodyBounds},f=function(e){return e.boundingBox(),e[0]._private.labelBounds.main||u},h=function(e){return e.boundingBox(),e[0]._private.labelBounds.source||u},p=function(e){return e.boundingBox(),e[0]._private.labelBounds.target||u},v=function(e,t){return t},m=function(e,t,n){var r=e?e+"-":"";return{x:t.x+n.pstyle(r+"text-margin-x").pfValue,y:t.y+n.pstyle(r+"text-margin-y").pfValue}},y=function(e,t,n){var r=e[0]._private.rscratch;return{x:r[t],y:r[n]}},b=t.data.eleTxrCache=new gs(t,{getKey:function(e){return e[0]._private.nodeKey},doesEleInvalidateKey:function(e){var t=e[0]._private;return!(t.oldBackgroundTimestamp===t.backgroundTimestamp)},drawElement:function(e,n,r,a,o){return t.drawElement(e,n,r,!1,!1,o)},getBoundingBox:d,getRotationPoint:function(e){return{x:((t=d(e)).x1+t.x2)/2,y:(t.y1+t.y2)/2};var t},getRotationOffset:function(e){return c(d(e))},allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),w=t.data.lblTxrCache=new gs(t,{getKey:function(e){return e[0]._private.labelStyleKey},drawElement:function(e,n,r,a,o){return t.drawElementText(e,n,r,a,"main",o)},getBoundingBox:f,getRotationPoint:function(e){return m("",y(e,"labelX","labelY"),e)},getRotationOffset:function(e){var t=f(e),n=c(f(e));if(e.isNode()){switch(e.pstyle("text-halign").value){case"left":n.x=-t.w;break;case"right":n.x=0}switch(e.pstyle("text-valign").value){case"top":n.y=-t.h;break;case"bottom":n.y=0}}return n},isVisible:v}),x=t.data.slbTxrCache=new gs(t,{getKey:function(e){return e[0]._private.sourceLabelStyleKey},drawElement:function(e,n,r,a,o){return t.drawElementText(e,n,r,a,"source",o)},getBoundingBox:h,getRotationPoint:function(e){return m("source",y(e,"sourceLabelX","sourceLabelY"),e)},getRotationOffset:function(e){return c(h(e))},isVisible:v}),E=t.data.tlbTxrCache=new gs(t,{getKey:function(e){return e[0]._private.targetLabelStyleKey},drawElement:function(e,n,r,a,o){return t.drawElementText(e,n,r,a,"target",o)},getBoundingBox:p,getRotationPoint:function(e){return m("target",y(e,"targetLabelX","targetLabelY"),e)},getRotationOffset:function(e){return c(p(e))},isVisible:v}),_=t.data.lyrTxrCache=new ys(t);t.onUpdateEleCalcs((function(e,t){b.invalidateElements(t),w.invalidateElements(t),x.invalidateElements(t),E.invalidateElements(t),_.invalidateElements(t);for(var n=0;n<t.length;n++){var r=t[n]._private;r.oldBackgroundTimestamp=r.backgroundTimestamp}}));var k=function(e){for(var t=0;t<e.length;t++)_.enqueueElementRefinement(e[t].ele)};b.onDequeue(k),w.onDequeue(k),x.onDequeue(k),E.onDequeue(k)}nl.CANVAS_LAYERS=3,nl.SELECT_BOX=0,nl.DRAG=1,nl.NODE=2,nl.BUFFER_COUNT=3,nl.TEXTURE_BUFFER=0,nl.MOTIONBLUR_BUFFER_NODE=1,nl.MOTIONBLUR_BUFFER_DRAG=2,nl.redrawHint=function(e,t){var n=this;switch(e){case"eles":n.data.canvasNeedsRedraw[nl.NODE]=t;break;case"drag":n.data.canvasNeedsRedraw[nl.DRAG]=t;break;case"select":n.data.canvasNeedsRedraw[nl.SELECT_BOX]=t}};var al="undefined"!=typeof Path2D;nl.path2dEnabled=function(e){if(void 0===e)return this.pathsEnabled;this.pathsEnabled=!!e},nl.usePaths=function(){return al&&this.pathsEnabled},nl.setImgSmoothing=function(e,t){null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)},nl.getImgSmoothing=function(e){return null!=e.imageSmoothingEnabled?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled},nl.makeOffscreenCanvas=function(e,t){var n;return"undefined"!==("undefined"==typeof OffscreenCanvas?"undefined":u(OffscreenCanvas))?n=new OffscreenCanvas(e,t):((n=document.createElement("canvas")).width=e,n.height=t),n},[_s,Os,Bs,Is,Ls,Fs,Gs,qs,Zs,el].forEach((function(e){H(nl,e)}));var ol=[{type:"layout",extensions:Ii},{type:"renderer",extensions:[{name:"null",impl:Li},{name:"base",impl:us},{name:"canvas",impl:tl}]}],il={},sl={};function ll(e,t,n){var r=n,a=function(n){be("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if("core"===e){if(Qo.prototype[t])return a(t);Qo.prototype[t]=n}else if("collection"===e){if(vo.prototype[t])return a(t);vo.prototype[t]=n}else if("layout"===e){for(var o=function(e){this.options=e,n.call(this,e),C(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},i=o.prototype=Object.create(n.prototype),s=[],l=0;l<s.length;l++){var u=s[l];i[u]=i[u]||function(){return this}}i.start&&!i.run?i.run=function(){return this.start(),this}:!i.start&&i.run&&(i.start=function(){return this.run(),this});var c=n.prototype.stop;i.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return c?c.call(this):this.emit("layoutstop"),this},i.destroy||(i.destroy=function(){return this}),i.cy=function(){return this._private.cy};var d=function(e){return e._private.cy},f={addEventFields:function(e,t){t.layout=e,t.cy=d(e),t.target=e},bubble:function(){return!0},parent:function(e){return d(e)}};H(i,{createEmitter:function(){return this._private.emitter=new za(f,this),this},emitter:function(){return this._private.emitter},on:function(e,t){return this.emitter().on(e,t),this},one:function(e,t){return this.emitter().one(e,t),this},once:function(e,t){return this.emitter().one(e,t),this},removeListener:function(e,t){return this.emitter().removeListener(e,t),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(e,t){return this.emitter().emit(e,t),this}}),Jn.eventAliasesOn(i),r=o}else if("renderer"===e&&"null"!==t&&"base"!==t){var h=ul("renderer","base"),p=h.prototype,v=n,g=n.prototype,m=function(){h.apply(this,arguments),v.apply(this,arguments)},y=m.prototype;for(var b in p){var w=p[b];if(null!=g[b])return a(b);y[b]=w}for(var x in g)y[x]=g[x];p.clientFunctions.forEach((function(e){y[e]=y[e]||function(){me("Renderer does not implement `renderer."+e+"()` on its prototype")}})),r=m}else if("__proto__"===e||"constructor"===e||"prototype"===e)return me(e+" is an illegal type to be registered, possibly lead to prototype pollutions");return Y({map:il,keys:[e,t],value:r})}function ul(e,t){return U({map:il,keys:[e,t]})}function cl(e,t,n,r,a){return Y({map:sl,keys:[e,t,n,r],value:a})}function dl(e,t,n,r){return U({map:sl,keys:[e,t,n,r]})}var fl=function(){return 2===arguments.length?ul.apply(null,arguments):3===arguments.length?ll.apply(null,arguments):4===arguments.length?dl.apply(null,arguments):5===arguments.length?cl.apply(null,arguments):void me("Invalid extension access syntax")};Qo.prototype.extension=fl,ol.forEach((function(e){e.extensions.forEach((function(t){ll(e.type,t.name,t.impl)}))}));var hl=function e(){if(!(this instanceof e))return new e;this.length=0},pl=hl.prototype;pl.instanceString=function(){return"stylesheet"},pl.selector=function(e){return this[this.length++]={selector:e,properties:[]},this},pl.css=function(e,t){var n=this.length-1;if(E(e))this[n].properties.push({name:e,value:t});else if(C(e))for(var r=e,a=Object.keys(r),o=0;o<a.length;o++){var i=a[o],s=r[i];if(null!=s){var l=Wo.properties[i]||Wo.properties[N(i)];if(null!=l){var u=l.name,c=s;this[n].properties.push({name:u,value:c})}}}return this},pl.style=pl.css,pl.generateStyle=function(e){var t=new Wo(e);return this.appendToStyle(t)},pl.appendToStyle=function(e){for(var t=0;t<this.length;t++){var n=this[t],r=n.selector,a=n.properties;e.selector(r);for(var o=0;o<a.length;o++){var i=a[o];e.css(i.name,i.value)}}return e};var vl=function(e){return void 0===e&&(e={}),C(e)?new Qo(e):E(e)?fl.apply(fl,arguments):void 0};vl.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(vl),e.apply(null,t),this},vl.warnings=function(e){return ye(e)},vl.version="3.21.0",vl.stylesheet=vl.Stylesheet=hl,e.exports=vl},46506:(e,t,n)=>{e.exports={graphlib:n(71310),layout:n(42529),debug:n(5512),util:{time:n(8783).time,notime:n(8783).notime},version:n(57589)}},85247:(e,t,n)=>{"use strict";var r=n(43294),a=n(38757);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?a(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},a={};function o(i){r.has(a,i)||(a[i]=!0,n[i]=!0,r.forEach(e.outEdges(i),(function(e){r.has(n,e.w)?t.push(e):o(e.w)})),delete n[i])}return r.forEach(e.nodes(),o),t}(e);r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))},undo:function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}}},49654:(e,t,n)=>{var r=n(43294),a=n(8783);function o(e,t,n,r,o,i){var s={width:0,height:0,rank:i,borderType:t},l=o[t][i-1],u=a.addDummyNode(e,"border",s,n);o[t][i]=u,e.setParent(u,r),l&&e.setEdge(l,u,{weight:1})}e.exports=function(e){r.forEach(e.children(),(function t(n){var a=e.children(n),i=e.node(n);if(a.length&&r.forEach(a,t),r.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,l=i.maxRank+1;s<l;++s)o(e,"borderLeft","_bl",n,i,s),o(e,"borderRight","_br",n,i,s)}}))}},25128:(e,t,n)=>{"use strict";var r=n(43294);function a(e){r.forEach(e.nodes(),(function(t){o(e.node(t))})),r.forEach(e.edges(),(function(t){o(e.edge(t))}))}function o(e){var t=e.width;e.width=e.height,e.height=t}function i(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||a(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),(function(t){i(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,i),r.has(n,"y")&&i(n)}))}(e);"lr"!==t&&"rl"!==t||(!function(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(e),a(e))}}},65199:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},5512:(e,t,n)=>{var r=n(43294),a=n(8783),o=n(71310).Graph;e.exports={debugOrdering:function(e){var t=a.buildLayerMatrix(e),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var a="layer"+t;n.setNode(a,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}}},71310:(e,t,n)=>{var r;try{r=n(87377)}catch(a){}r||(r=window.graphlib),e.exports=r},38757:(e,t,n)=>{var r=n(43294),a=n(71310).Graph,o=n(65199);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new a,i=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,a=t(e),o=r+a;n.setEdge(e.v,e.w,o),s=Math.max(s,n.node(e.v).out+=a),i=Math.max(i,n.node(e.w).in+=a)}));var u=r.range(s+i+3).map((function(){return new o})),c=i+1;return r.forEach(n.nodes(),(function(e){l(u,c,n.node(e))})),{graph:n,buckets:u,zeroIdx:c}}(e,t||i),u=function(e,t,n){var r,a=[],o=t[t.length-1],i=t[0];for(;e.nodeCount();){for(;r=i.dequeue();)s(e,t,n,r);for(;r=o.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var l=t.length-2;l>0;--l)if(r=t[l].dequeue()){a=a.concat(s(e,t,n,r,!0));break}}return a}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(t){return e.outEdges(t.v,t.w)})),!0)};var i=r.constant(1);function s(e,t,n,a,o){var i=o?[]:void 0;return r.forEach(e.inEdges(a.v),(function(r){var a=e.edge(r),s=e.node(r.v);o&&i.push({v:r.v,w:r.w}),s.out-=a,l(t,n,s)})),r.forEach(e.outEdges(a.v),(function(r){var a=e.edge(r),o=r.w,i=e.node(o);i.in-=a,l(t,n,i)})),e.removeNode(a.v),i}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},42529:(e,t,n)=>{"use strict";var r=n(43294),a=n(85247),o=n(20450),i=n(64618),s=n(8783).normalizeRanks,l=n(77908),u=n(8783).removeEmptyRanks,c=n(96820),d=n(49654),f=n(25128),h=n(73641),p=n(65784),v=n(8783),g=n(71310).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=S(e.graph());return t.setGraph(r.merge({},y,C(n,m),r.pick(n,b))),r.forEach(e.nodes(),(function(n){var a=S(e.node(n));t.setNode(n,r.defaults(C(a,w),x)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var a=S(e.edge(n));t.setEdge(n,r.merge({},_,C(a,E),r.pick(a,k)))})),t}(e)}));n(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){a.run(e)})),t(" nestingGraph.run",(function(){c.run(e)})),t(" rank",(function(){i(v.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),a={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",a,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){u(e)})),t(" nestingGraph.cleanup",(function(){c.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;r.forEach(e.nodes(),(function(n){var a=e.node(n);a.borderTop&&(a.minRank=e.node(a.borderTop).rank,a.maxRank=e.node(a.borderBottom).rank,t=r.max(t,a.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){o.run(e)})),t(" parentDummyChains",(function(){l(e)})),t(" addBorderSegments",(function(){d(e)})),t(" order",(function(){h(e)})),t(" insertSelfEdges",(function(){!function(e){var t=v.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,a){var o=e.node(t);o.order=a+n,r.forEach(o.selfEdges,(function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:o.rank,order:a+ ++n,e:t.e,label:t.label},"_se")})),delete o.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){f.adjust(e)})),t(" position",(function(){p(e)})),t(" positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),a=r.x+r.width/2,o=r.y,i=n.x-a,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:a+2*i/3,y:o-s},{x:a+5*i/6,y:o-s},{x:a+i,y:o},{x:a+5*i/6,y:o+s},{x:a+2*i/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),a=e.node(n.borderTop),o=e.node(n.borderBottom),i=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-i.x),n.height=Math.abs(o.y-a.y),n.x=i.x+n.width/2,n.y=a.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){o.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){f.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,a=Number.POSITIVE_INFINITY,o=0,i=e.graph(),s=i.marginx||0,l=i.marginy||0;function u(e){var r=e.x,i=e.y,s=e.width,l=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),a=Math.min(a,i-l/2),o=Math.max(o,i+l/2)}r.forEach(e.nodes(),(function(t){u(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&u(n)})),t-=s,a-=l,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=a})),r.forEach(e.edges(),(function(n){var o=e.edge(n);r.forEach(o.points,(function(e){e.x-=t,e.y-=a})),r.has(o,"x")&&(o.x-=t),r.has(o,"y")&&(o.y-=a)})),i.width=n-t+s,i.height=o-a+l}(e)})),t(" assignNodeIntersects",(function(){!function(e){r.forEach(e.edges(),(function(t){var n,r,a=e.edge(t),o=e.node(t.v),i=e.node(t.w);a.points?(n=a.points[0],r=a.points[a.points.length-1]):(a.points=[],n=i,r=o),a.points.unshift(v.intersectRect(o,n)),a.points.push(v.intersectRect(i,r))}))}(e)})),t(" reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){a.undo(e)}))}(t,n)})),n(" updateInputGraph",(function(){!function(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),a=t.node(n);r&&(r.x=a.x,r.y=a.y,t.children(n).length&&(r.width=a.width,r.height=a.height))})),r.forEach(e.edges(),(function(n){var a=e.edge(n),o=t.edge(n);a.points=o.points,r.has(o,"x")&&(a.x=o.x,a.y=o.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],w=["width","height"],x={width:0,height:0},E=["minlen","weight","width","height","labeloffset"],_={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function C(e,t){return r.mapValues(r.pick(e,t),Number)}function S(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},43294:(e,t,n)=>{var r;try{r={cloneDeep:n(9850),constant:n(86874),defaults:n(84573),each:n(79421),filter:n(90882),find:n(55281),flatten:n(35676),forEach:n(59756),forIn:n(20792),has:n(93352),isUndefined:n(84336),last:n(56974),map:n(16760),mapValues:n(34519),max:n(71644),merge:n(98537),min:n(65680),minBy:n(10937),now:n(61100),pick:n(13888),range:n(2689),reduce:n(58215),sortBy:n(829),uniqueId:n(74930),values:n(98346),zipObject:n(46150)}}catch(a){}r||(r=window._),e.exports=r},96820:(e,t,n)=>{var r=n(43294),a=n(8783);function o(e,t,n,i,s,l,u){var c=e.children(u);if(c.length){var d=a.addBorderNode(e,"_bt"),f=a.addBorderNode(e,"_bb"),h=e.node(u);e.setParent(d,u),h.borderTop=d,e.setParent(f,u),h.borderBottom=f,r.forEach(c,(function(r){o(e,t,n,i,s,l,r);var a=e.node(r),c=a.borderTop?a.borderTop:r,h=a.borderBottom?a.borderBottom:r,p=a.borderTop?i:2*i,v=c!==h?1:s-l[u]+1;e.setEdge(d,c,{weight:p,minlen:v,nestingEdge:!0}),e.setEdge(h,f,{weight:p,minlen:v,nestingEdge:!0})})),e.parent(u)||e.setEdge(t,d,{weight:0,minlen:s+l[u]})}else u!==t&&e.setEdge(t,u,{weight:0,minlen:n})}e.exports={run:function(e){var t=a.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(a,o){var i=e.children(a);i&&i.length&&r.forEach(i,(function(e){n(e,o+1)})),t[a]=o}return r.forEach(e.children(),(function(e){n(e,1)})),t}(e),i=r.max(r.values(n))-1,s=2*i+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=s}));var l=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(r){o(e,t,s,l,i,n,r)})),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},20450:(e,t,n)=>{"use strict";var r=n(43294),a=n(8783);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,o,i=t.v,s=e.node(i).rank,l=t.w,u=e.node(l).rank,c=t.name,d=e.edge(t),f=d.labelRank;if(u===s+1)return;for(e.removeEdge(t),o=0,++s;s<u;++o,++s)d.points=[],r={width:0,height:0,edgeLabel:d,edgeObj:t,rank:s},n=a.addDummyNode(e,"edge",r,"_d"),s===f&&(r.width=d.width,r.height=d.height,r.dummy="edge-label",r.labelpos=d.labelpos),e.setEdge(i,n,{weight:d.weight},c),0===o&&e.graph().dummyChains.push(n),i=n;e.setEdge(i,l,{weight:d.weight},c)}(e,t)}))},undo:function(e){r.forEach(e.graph().dummyChains,(function(t){var n,r=e.node(t),a=r.edgeLabel;for(e.setEdge(r.edgeObj,a);r.dummy;)n=e.successors(t)[0],e.removeNode(t),a.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(a.x=r.x,a.y=r.y,a.width=r.width,a.height=r.height),t=n,r=e.node(t)}))}}},47897:(e,t,n)=>{var r=n(43294);e.exports=function(e,t,n){var a,o={};r.forEach(n,(function(n){for(var r,i,s=e.parent(n);s;){if((r=e.parent(s))?(i=o[r],o[r]=s):(i=a,a=s),i&&i!==s)return void t.setEdge(i,s);s=r}}))}},29533:(e,t,n)=>{var r=n(43294);e.exports=function(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var a=r.reduce(n,(function(t,n){var r=e.edge(n),a=e.node(n.v);return{sum:t.sum+r.weight*a.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:a.sum/a.weight,weight:a.weight}}return{v:t}}))}},64622:(e,t,n)=>{var r=n(43294),a=n(71310).Graph;e.exports=function(e,t,n){var o=function(e){var t;for(;e.hasNode(t=r.uniqueId("_root")););return t}(e),i=new a({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(a){var s=e.node(a),l=e.parent(a);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(i.setNode(a),i.setParent(a,l||o),r.forEach(e[n](a),(function(t){var n=t.v===a?t.w:t.v,o=i.edge(n,a),s=r.isUndefined(o)?0:o.weight;i.setEdge(n,a,{weight:e.edge(t).weight+s})})),r.has(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))})),i}},6254:(e,t,n)=>{"use strict";var r=n(43294);function a(e,t,n){for(var a=r.zipObject(n,r.map(n,(function(e,t){return t}))),o=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:a[t.w],weight:e.edge(t).weight}})),"pos")})),!0),i=1;i<n.length;)i<<=1;var s=2*i-1;i-=1;var l=r.map(new Array(s),(function(){return 0})),u=0;return r.forEach(o.forEach((function(e){var t=e.pos+i;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;u+=e.weight*n}))),u}e.exports=function(e,t){for(var n=0,r=1;r<t.length;++r)n+=a(e,t[r-1],t[r]);return n}},73641:(e,t,n)=>{"use strict";var r=n(43294),a=n(65036),o=n(6254),i=n(83956),s=n(64622),l=n(47897),u=n(71310).Graph,c=n(8783);function d(e,t,n){return r.map(t,(function(t){return s(e,t,n)}))}function f(e,t){var n=new u;r.forEach(e,(function(e){var a=e.graph().root,o=i(e,a,n,t);r.forEach(o.vs,(function(t,n){e.node(t).order=n})),l(e,n,o.vs)}))}function h(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}e.exports=function(e){var t=c.maxRank(e),n=d(e,r.range(1,t+1),"inEdges"),i=d(e,r.range(t-1,-1,-1),"outEdges"),s=a(e);h(e,s);for(var l,u=Number.POSITIVE_INFINITY,p=0,v=0;v<4;++p,++v){f(p%2?n:i,p%4>=2),s=c.buildLayerMatrix(e);var g=o(e,s);g<u&&(v=0,l=r.cloneDeep(s),u=g)}h(e,l)}},65036:(e,t,n)=>{"use strict";var r=n(43294);e.exports=function(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),a=r.max(r.map(n,(function(t){return e.node(t).rank}))),o=r.map(r.range(a+1),(function(){return[]}));var i=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(i,(function n(a){if(r.has(t,a))return;t[a]=!0;var i=e.node(a);o[i.rank].push(a),r.forEach(e.successors(a),n)})),o}},39953:(e,t,n)=>{"use strict";var r=n(43294);e.exports=function(e,t){var n={};return r.forEach(e,(function(e,t){var a=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(a.barycenter=e.barycenter,a.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],a=n[e.w];r.isUndefined(t)||r.isUndefined(a)||(a.indegree++,t.out.push(n[e.w]))})),function(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function a(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,a(o))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(e){return!e.indegree})))}},83956:(e,t,n)=>{var r=n(43294),a=n(29533),o=n(39953),i=n(11957);e.exports=function e(t,n,s,l){var u=t.children(n),c=t.node(n),d=c?c.borderLeft:void 0,f=c?c.borderRight:void 0,h={};d&&(u=r.filter(u,(function(e){return e!==d&&e!==f})));var p=a(t,u);r.forEach(p,(function(n){if(t.children(n.v).length){var a=e(t,n.v,s,l);h[n.v]=a,r.has(a,"barycenter")&&(o=n,i=a,r.isUndefined(o.barycenter)?(o.barycenter=i.barycenter,o.weight=i.weight):(o.barycenter=(o.barycenter*o.weight+i.barycenter*i.weight)/(o.weight+i.weight),o.weight+=i.weight))}var o,i}));var v=o(p,s);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(v,h);var g=i(v,l);if(d&&(g.vs=r.flatten([d,g.vs,f],!0),t.predecessors(d).length)){var m=t.node(t.predecessors(d)[0]),y=t.node(t.predecessors(f)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+m.order+y.order)/(g.weight+2),g.weight+=2}return g}},11957:(e,t,n)=>{var r=n(43294),a=n(8783);function o(e,t,n){for(var a;t.length&&(a=r.last(t)).i<=n;)t.pop(),e.push(a.vs),n++;return n}e.exports=function(e,t){var n=a.partition(e,(function(e){return r.has(e,"barycenter")})),i=n.lhs,s=r.sortBy(n.rhs,(function(e){return-e.i})),l=[],u=0,c=0,d=0;i.sort((f=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:f?t.i-e.i:e.i-t.i})),d=o(l,s,d),r.forEach(i,(function(e){d+=e.vs.length,l.push(e.vs),u+=e.barycenter*e.weight,c+=e.weight,d=o(l,s,d)}));var f;var h={vs:r.flatten(l,!0)};c&&(h.barycenter=u/c,h.weight=c);return h}},77908:(e,t,n)=>{var r=n(43294);e.exports=function(e){var t=function(e){var t={},n=0;function a(o){var i=n;r.forEach(e.children(o),a),t[o]={low:i,lim:n++}}return r.forEach(e.children(),a),t}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),a=r.edgeObj,o=function(e,t,n,r){var a,o,i=[],s=[],l=Math.min(t[n].low,t[r].low),u=Math.max(t[n].lim,t[r].lim);a=n;do{a=e.parent(a),i.push(a)}while(a&&(t[a].low>l||u>t[a].lim));o=a,a=r;for(;(a=e.parent(a))!==o;)s.push(a);return{path:i.concat(s.reverse()),lca:o}}(e,t,a.v,a.w),i=o.path,s=o.lca,l=0,u=i[l],c=!0;n!==a.w;){if(r=e.node(n),c){for(;(u=i[l])!==s&&e.node(u).maxRank<r.rank;)l++;u===s&&(c=!1)}if(!c){for(;l<i.length-1&&e.node(u=i[l+1]).minRank<=r.rank;)l++;u=i[l]}e.setParent(n,u),n=e.successors(n)[0]}}))}},91753:(e,t,n)=>{"use strict";var r=n(43294),a=n(71310).Graph,o=n(8783);function i(e,t){var n={};return r.reduce(t,(function(t,a){var o=0,i=0,s=t.length,u=r.last(a);return r.forEach(a,(function(t,c){var d=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),f=d?e.node(d).order:s;(d||t===u)&&(r.forEach(a.slice(i,c+1),(function(t){r.forEach(e.predecessors(t),(function(r){var a=e.node(r),i=a.order;!(i<o||f<i)||a.dummy&&e.node(t).dummy||l(n,r,t)}))})),i=c+1,o=f)})),a})),n}function s(e,t){var n={};function a(t,a,o,i,s){var u;r.forEach(r.range(a,o),(function(a){u=t[a],e.node(u).dummy&&r.forEach(e.predecessors(u),(function(t){var r=e.node(t);r.dummy&&(r.order<i||r.order>s)&&l(n,t,u)}))}))}return r.reduce(t,(function(t,n){var o,i=-1,s=0;return r.forEach(n,(function(r,l){if("border"===e.node(r).dummy){var u=e.predecessors(r);u.length&&(o=e.node(u[0]).order,a(n,s,l,i,o),s=l,i=o)}a(n,s,n.length,o,t.length)})),n})),n}function l(e,t,n){if(t>n){var r=t;t=n,n=r}var a=e[t];a||(e[t]=a={}),a[n]=!0}function u(e,t,n){if(t>n){var a=t;t=n,n=a}return r.has(e[t],n)}function c(e,t,n,a){var o={},i={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){o[e]=e,i[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var l=a(e);if(l.length){l=r.sortBy(l,(function(e){return s[e]}));for(var c=(l.length-1)/2,d=Math.floor(c),f=Math.ceil(c);d<=f;++d){var h=l[d];i[e]===e&&t<s[h]&&!u(n,e,h)&&(i[h]=e,i[e]=o[e]=o[h],t=s[h])}}}))})),{root:o,align:i}}function d(e,t,n,o,i){var s={},l=function(e,t,n,o){var i=new a,s=e.graph(),l=function(e,t,n){return function(a,o,i){var s,l=a.node(o),u=a.node(i),c=0;if(c+=l.width/2,r.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=-l.width/2;break;case"r":s=l.width/2}if(s&&(c+=n?s:-s),s=0,c+=(l.dummy?t:e)/2,c+=(u.dummy?t:e)/2,c+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(c+=n?s:-s),s=0,c}}(s.nodesep,s.edgesep,o);return r.forEach(t,(function(t){var a;r.forEach(t,(function(t){var r=n[t];if(i.setNode(r),a){var o=n[a],s=i.edge(o,r);i.setEdge(o,r,Math.max(l(e,t,a),s||0))}a=t}))})),i}(e,t,n,i),u=i?"borderLeft":"borderRight";function c(e,t){for(var n=l.nodes(),r=n.pop(),a={};r;)a[r]?e(r):(a[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return c((function(e){s[e]=l.inEdges(e).reduce((function(e,t){return Math.max(e,s[t.v]+l.edge(t))}),0)}),l.predecessors.bind(l)),c((function(t){var n=l.outEdges(t).reduce((function(e,t){return Math.min(e,s[t.w]-l.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[t]=Math.max(s[t],n))}),l.successors.bind(l)),r.forEach(o,(function(e){s[e]=s[n[e]]})),s}function f(e,t){return r.minBy(r.values(t),(function(t){var n=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return r.forIn(t,(function(t,r){var o=function(e,t){return e.node(t).width}(e,r)/2;n=Math.max(t+o,n),a=Math.min(t-o,a)})),n-a}))}function h(e,t){var n=r.values(t),a=r.min(n),o=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(i){var s,l=n+i,u=e[l];if(u!==t){var c=r.values(u);(s="l"===i?a-r.min(c):o-r.max(c))&&(e[l]=r.mapValues(u,(function(e){return e+s})))}}))}))}function p(e,t){return r.mapValues(e.ul,(function(n,a){if(t)return e[t.toLowerCase()][a];var o=r.sortBy(r.map(e,a));return(o[1]+o[2])/2}))}e.exports={positionX:function(e){var t,n=o.buildLayerMatrix(e),a=r.merge(i(e,n),s(e,n)),l={};r.forEach(["u","d"],(function(o){t="u"===o?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(t=r.map(t,(function(e){return r.values(e).reverse()})));var i=("u"===o?e.predecessors:e.successors).bind(e),s=c(e,t,a,i),u=d(e,t,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,(function(e){return-e}))),l[o+n]=u}))}));var u=f(e,l);return h(l,u),p(l,e.graph().align)},findType1Conflicts:i,findType2Conflicts:s,addConflict:l,hasConflict:u,verticalAlignment:c,horizontalCompaction:d,alignCoordinates:h,findSmallestWidthAlignment:f,balance:p}},65784:(e,t,n)=>{"use strict";var r=n(43294),a=n(8783),o=n(91753).positionX;e.exports=function(e){(function(e){var t=a.buildLayerMatrix(e),n=e.graph().ranksep,o=0;r.forEach(t,(function(t){var a=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=o+a/2})),o+=a+n}))})(e=a.asNonCompoundGraph(e)),r.forEach(o(e),(function(t,n){e.node(n).x=t}))}},49154:(e,t,n)=>{"use strict";var r=n(43294),a=n(71310).Graph,o=n(85986).slack;function i(e,t){return r.forEach(e.nodes(),(function n(a){r.forEach(t.nodeEdges(a),(function(r){var i=r.v,s=a===i?r.w:i;e.hasNode(s)||o(t,r)||(e.setNode(s,{}),e.setEdge(a,s,{}),n(s))}))})),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return o(t,n)}))}function l(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,r=new a({directed:!1}),u=e.nodes()[0],c=e.nodeCount();r.setNode(u,{});for(;i(r,e)<c;)t=s(r,e),n=r.hasNode(t.v)?o(e,t):-o(e,t),l(r,e,n);return r}},64618:(e,t,n)=>{"use strict";var r=n(85986).longestPath,a=n(49154),o=n(57310);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:s(e);break;case"tight-tree":!function(e){r(e),a(e)}(e);break;case"longest-path":i(e)}};var i=r;function s(e){o(e)}},57310:(e,t,n)=>{"use strict";var r=n(43294),a=n(49154),o=n(85986).slack,i=n(85986).longestPath,s=n(71310).alg.preorder,l=n(71310).alg.postorder,u=n(8783).simplify;function c(e){e=u(e),i(e);var t,n=a(e);for(h(n),d(n,e);t=v(n);)m(n,e,t,g(n,e,t))}function d(e,t){var n=l(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=f(e,t,n)}(e,t,n)}))}function f(e,t,n){var a=e.node(n).parent,o=!0,i=t.edge(n,a),s=0;return i||(o=!1,i=t.edge(a,n)),s=i.weight,r.forEach(t.nodeEdges(n),(function(r){var i,l,u=r.v===n,c=u?r.w:r.v;if(c!==a){var d=u===o,f=t.edge(r).weight;if(s+=d?f:-f,i=n,l=c,e.hasEdge(i,l)){var h=e.edge(n,c).cutvalue;s+=d?-h:h}}})),s}function h(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,a,o){var i=n,s=e.node(a);return t[a]=!0,r.forEach(e.neighbors(a),(function(o){r.has(t,o)||(n=p(e,t,n,o,a))})),s.low=i,s.lim=n++,o?s.parent=o:delete s.parent,n}function v(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function g(e,t,n){var a=n.v,i=n.w;t.hasEdge(a,i)||(a=n.w,i=n.v);var s=e.node(a),l=e.node(i),u=s,c=!1;s.lim>l.lim&&(u=l,c=!0);var d=r.filter(t.edges(),(function(t){return c===y(e,e.node(t.v),u)&&c!==y(e,e.node(t.w),u)}));return r.minBy(d,(function(e){return o(t,e)}))}function m(e,t,n,a){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(a.v,a.w,{}),h(e),d(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),a=s(e,n);a=a.slice(1),r.forEach(a,(function(n){var r=e.node(n).parent,a=t.edge(n,r),o=!1;a||(a=t.edge(r,n),o=!0),t.node(n).rank=t.node(r).rank+(o?a.minlen:-a.minlen)}))}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=c,c.initLowLimValues=h,c.initCutValues=d,c.calcCutValue=f,c.leaveEdge=v,c.enterEdge=g,c.exchangeEdges=m},85986:(e,t,n)=>{"use strict";var r=n(43294);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(function n(a){var o=e.node(a);if(r.has(t,a))return o.rank;t[a]=!0;var i=r.min(r.map(e.outEdges(a),(function(t){return n(t.w)-e.edge(t).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},8783:(e,t,n)=>{"use strict";var r=n(43294),a=n(71310).Graph;function o(e,t,n,a){var o;do{o=r.uniqueId(a)}while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function i(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:o,simplify:function(e){var t=(new a).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},a=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+a.weight,minlen:Math.max(r.minlen,a.minlen)})})),t},asNonCompoundGraph:function(e){var t=new a({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,a=e.x,o=e.y,i=t.x-a,s=t.y-o,l=e.width/2,u=e.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*l>Math.abs(i)*u?(s<0&&(u=-u),n=u*i/s,r=u):(i<0&&(l=-l),n=l,r=l*s/i);return{x:a+n,y:o+r}},buildLayerMatrix:function(e){var t=r.map(r.range(i(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var a=e.node(n),o=a.rank;r.isUndefined(o)||(t[o][a.order]=n)})),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var a=e.node(n);r.has(a,"rank")&&(a.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var a=e.node(r).rank-t;n[a]||(n[a]=[]),n[a].push(r)}));var a=0,o=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%o!=0?--a:a&&r.forEach(t,(function(t){e.node(t).rank+=a}))}))},addBorderNode:function(e,t,n,r){var a={width:0,height:0};arguments.length>=4&&(a.rank=n,a.order=r);return o(e,"border",a,t)},maxRank:i,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},57589:e=>{e.exports="0.8.5"},77847:e=>{e.exports=i,i.default=i,i.stable=c,i.stableStringify=c;var t="[...]",n="[Circular]",r=[],a=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function i(e,t,n,i){var s;void 0===i&&(i=o()),l(e,"",0,[],void 0,0,i);try{s=0===a.length?JSON.stringify(e,t,n):JSON.stringify(e,f(t),n)}catch(c){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var u=r.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function s(e,t,n,o){var i=Object.getOwnPropertyDescriptor(o,n);void 0!==i.get?i.configurable?(Object.defineProperty(o,n,{value:e}),r.push([o,n,t,i])):a.push([t,n,e]):(o[n]=e,r.push([o,n,t]))}function l(e,r,a,o,i,u,c){var d;if(u+=1,"object"==typeof e&&null!==e){for(d=0;d<o.length;d++)if(o[d]===e)return void s(n,e,r,i);if(void 0!==c.depthLimit&&u>c.depthLimit)return void s(t,e,r,i);if(void 0!==c.edgesLimit&&a+1>c.edgesLimit)return void s(t,e,r,i);if(o.push(e),Array.isArray(e))for(d=0;d<e.length;d++)l(e[d],d,d,o,e,u,c);else{var f=Object.keys(e);for(d=0;d<f.length;d++){var h=f[d];l(e[h],h,d,o,e,u,c)}}o.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function c(e,t,n,i){void 0===i&&(i=o());var s,l=d(e,"",0,[],void 0,0,i)||e;try{s=0===a.length?JSON.stringify(l,t,n):JSON.stringify(l,f(t),n)}catch(c){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var u=r.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function d(e,a,o,i,l,c,f){var h;if(c+=1,"object"==typeof e&&null!==e){for(h=0;h<i.length;h++)if(i[h]===e)return void s(n,e,a,l);try{if("function"==typeof e.toJSON)return}catch(m){return}if(void 0!==f.depthLimit&&c>f.depthLimit)return void s(t,e,a,l);if(void 0!==f.edgesLimit&&o+1>f.edgesLimit)return void s(t,e,a,l);if(i.push(e),Array.isArray(e))for(h=0;h<e.length;h++)d(e[h],h,h,i,e,c,f);else{var p={},v=Object.keys(e).sort(u);for(h=0;h<v.length;h++){var g=v[h];d(e[g],g,h,i,e,c,f),p[g]=e[g]}if(void 0===l)return p;r.push([l,a,e]),l[a]=p}i.pop()}}function f(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(a.length>0)for(var r=0;r<a.length;r++){var o=a[r];if(o[1]===t&&o[0]===n){n=o[2],a.splice(r,1);break}}return e.call(this,t,n)}}},87377:(e,t,n)=>{var r=n(89);e.exports={Graph:r.Graph,json:n(80109),alg:n(577),version:r.version}},95189:(e,t,n)=>{var r=n(60274);e.exports=function(e){var t,n={},a=[];function o(a){r.has(n,a)||(n[a]=!0,t.push(a),r.each(e.successors(a),o),r.each(e.predecessors(a),o))}return r.each(e.nodes(),(function(e){t=[],o(e),t.length&&a.push(t)})),a}},70223:(e,t,n)=>{var r=n(60274);function a(e,t,n,o,i,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(i(t),(function(t){a(e,t,n,o,i,s)})),n&&s.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);a(e,t,"post"===n,s,o,i)})),i}},19487:(e,t,n)=>{var r=n(16493),a=n(60274);e.exports=function(e,t,n){return a.transform(e.nodes(),(function(a,o){a[o]=r(e,o,t,n)}),{})}},16493:(e,t,n)=>{var r=n(60274),a=n(70905);e.exports=function(e,t,n,r){return function(e,t,n,r){var o,i,s={},l=new a,u=function(e){var t=e.v!==o?e.v:e.w,r=s[t],a=n(e),u=i.distance+a;if(a<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+a);u<r.distance&&(r.distance=u,r.predecessor=o,l.decrease(t,u))};e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},l.add(e,n)}));for(;l.size()>0&&(o=l.removeMin(),(i=s[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(u);return s}(e,String(t),n||o,r||function(t){return e.outEdges(t)})};var o=r.constant(1)},24395:(e,t,n)=>{var r=n(60274),a=n(99289);e.exports=function(e){return r.filter(a(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},92077:(e,t,n)=>{var r=n(60274);e.exports=function(e,t,n){return function(e,t,n){var r={},a=e.nodes();return a.forEach((function(e){r[e]={},r[e][e]={distance:0},a.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var a=n.v===e?n.w:n.v,o=t(n);r[e][a]={distance:o,predecessor:e}}))})),a.forEach((function(e){var t=r[e];a.forEach((function(n){var o=r[n];a.forEach((function(n){var r=o[e],a=t[n],i=o[n],s=r.distance+a.distance;s<i.distance&&(i.distance=s,i.predecessor=a.predecessor)}))}))})),r}(e,t||a,n||function(t){return e.outEdges(t)})};var a=r.constant(1)},577:(e,t,n)=>{e.exports={components:n(95189),dijkstra:n(16493),dijkstraAll:n(19487),findCycles:n(24395),floydWarshall:n(92077),isAcyclic:n(67141),postorder:n(34825),preorder:n(78852),prim:n(78492),tarjan:n(99289),topsort:n(69176)}},67141:(e,t,n)=>{var r=n(69176);e.exports=function(e){try{r(e)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},34825:(e,t,n)=>{var r=n(70223);e.exports=function(e,t){return r(e,t,"post")}},78852:(e,t,n)=>{var r=n(70223);e.exports=function(e,t){return r(e,t,"pre")}},78492:(e,t,n)=>{var r=n(60274),a=n(53099),o=n(70905);e.exports=function(e,t){var n,i=new a,s={},l=new o;function u(e){var r=e.v===n?e.w:e.v,a=l.priority(r);if(void 0!==a){var o=t(e);o<a&&(s[r]=n,l.decrease(r,o))}}if(0===e.nodeCount())return i;r.each(e.nodes(),(function(e){l.add(e,Number.POSITIVE_INFINITY),i.setNode(e)})),l.decrease(e.nodes()[0],0);var c=!1;for(;l.size()>0;){if(n=l.removeMin(),r.has(s,n))i.setEdge(n,s[n]);else{if(c)throw new Error("Input graph is not connected: "+e);c=!0}e.nodeEdges(n).forEach(u)}return i}},99289:(e,t,n)=>{var r=n(60274);e.exports=function(e){var t=0,n=[],a={},o=[];function i(s){var l=a[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(a,e)?a[e].onStack&&(l.lowlink=Math.min(l.lowlink,a[e].index)):(i(e),l.lowlink=Math.min(l.lowlink,a[e].lowlink))})),l.lowlink===l.index){var u,c=[];do{u=n.pop(),a[u].onStack=!1,c.push(u)}while(s!==u);o.push(c)}}return e.nodes().forEach((function(e){r.has(a,e)||i(e)})),o}},69176:(e,t,n)=>{var r=n(60274);function a(e){var t={},n={},a=[];if(r.each(e.sinks(),(function i(s){if(r.has(n,s))throw new o;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),i),delete n[s],a.push(s))})),r.size(t)!==e.nodeCount())throw new o;return a}function o(){}e.exports=a,a.CycleException=o,o.prototype=new Error},70905:(e,t,n)=>{var r=n(60274);function a(){this._arr=[],this._keyIndices={}}e.exports=a,a.prototype.size=function(){return this._arr.length},a.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},a.prototype.has=function(e){return r.has(this._keyIndices,e)},a.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},a.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var a=this._arr,o=a.length;return n[e]=o,a.push({key:e,priority:t}),this._decrease(o),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},a.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},a.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,a=e;n<t.length&&(a=t[n].priority<t[a].priority?n:a,r<t.length&&(a=t[r].priority<t[a].priority?r:a),a!==e&&(this._swap(e,a),this._heapify(a)))},a.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},a.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,a=n[e],o=n[t];n[e]=o,n[t]=a,r[o.key]=e,r[a.key]=t}},53099:(e,t,n)=>{"use strict";var r=n(60274);e.exports=o;var a="\0";function o(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function i(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function l(e,t,n,a){var o=""+t,i=""+n;if(!e&&o>i){var s=o;o=i,i=s}return o+"\x01"+i+"\x01"+(r.isUndefined(a)?"\0":a)}function u(e,t,n,r){var a=""+t,o=""+n;if(!e&&a>o){var i=a;a=o,o=i}var s={v:a,w:o};return r&&(s.name=r),s}function c(e,t){return l(e,t.v,t.w,t.name)}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(e){return this._label=e,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return r.keys(this._nodes)},o.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},o.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},o.prototype.setNodes=function(e,t){var n=arguments,a=this;return r.each(e,(function(e){n.length>1?a.setNode(e,t):a.setNode(e)})),this},o.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},o.prototype.node=function(e){return this._nodes[e]},o.prototype.hasNode=function(e){return r.has(this._nodes,e)},o.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},o.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=a;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},o.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},o.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}},o.prototype.children=function(e){if(r.isUndefined(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}},o.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},o.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},o.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},o.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},o.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var a={};function o(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(a[e]=r,r):r in a?a[r]:o(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,o(e))})),t},o.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return r.values(this._edgeObjs)},o.prototype.setPath=function(e,t){var n=this,a=arguments;return r.reduce(e,(function(e,r){return a.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},o.prototype.setEdge=function(){var e,t,n,a,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(a=arguments[1],o=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],o=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var c=l(this._isDirected,e,t,n);if(r.has(this._edgeLabels,c))return o&&(this._edgeLabels[c]=a),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[c]=o?a:this._defaultEdgeLabelFn(e,t,n);var d=u(this._isDirected,e,t,n);return e=d.v,t=d.w,Object.freeze(d),this._edgeObjs[c]=d,i(this._preds[t],e),i(this._sucs[e],t),this._in[t][c]=d,this._out[e][c]=d,this._edgeCount++,this},o.prototype.edge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(e,t,n){var a=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return r.has(this._edgeLabels,a)},o.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),a=this._edgeObjs[r];return a&&(e=a.v,t=a.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},o.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var a=r.values(n);return t?r.filter(a,(function(e){return e.v===t})):a}},o.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var a=r.values(n);return t?r.filter(a,(function(e){return e.w===t})):a}},o.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},89:(e,t,n)=>{e.exports={Graph:n(53099),version:n(90702)}},80109:(e,t,n)=>{var r=n(60274),a=n(53099);function o(e){return r.map(e.nodes(),(function(t){var n=e.node(t),a=e.parent(t),o={v:t};return r.isUndefined(n)||(o.value=n),r.isUndefined(a)||(o.parent=a),o}))}function i(e){return r.map(e.edges(),(function(t){var n=e.edge(t),a={v:t.v,w:t.w};return r.isUndefined(t.name)||(a.name=t.name),r.isUndefined(n)||(a.value=n),a}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:o(e),edges:i(e)};r.isUndefined(e.graph())||(t.value=r.clone(e.graph()));return t},read:function(e){var t=new a(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},60274:(e,t,n)=>{var r;try{r={clone:n(54004),constant:n(86874),each:n(79421),filter:n(90882),has:n(93352),isArray:n(86152),isEmpty:n(45455),isFunction:n(61049),isUndefined:n(84336),keys:n(90249),map:n(16760),reduce:n(58215),size:n(36402),transform:n(89466),union:n(26139),values:n(98346)}}catch(a){}r||(r=window._),e.exports=r},90702:e=>{e.exports="2.1.8"},71254:(e,t,n)=>{e.exports=n(38397)},38397:function(e,t){var n,r,a;(function(){var o,i,s,l,u,c,d,f,h,p,v,g,m,y,b;s=Math.floor,p=Math.min,i=function(e,t){return e<t?-1:e>t?1:0},h=function(e,t,n,r,a){var o;if(null==n&&(n=0),null==a&&(a=i),n<0)throw new Error("lo must be non-negative");for(null==r&&(r=e.length);n<r;)a(t,e[o=s((n+r)/2)])<0?r=o:n=o+1;return[].splice.apply(e,[n,n-n].concat(t)),t},c=function(e,t,n){return null==n&&(n=i),e.push(t),y(e,0,e.length-1,n)},u=function(e,t){var n,r;return null==t&&(t=i),n=e.pop(),e.length?(r=e[0],e[0]=n,b(e,0,t)):r=n,r},f=function(e,t,n){var r;return null==n&&(n=i),r=e[0],e[0]=t,b(e,0,n),r},d=function(e,t,n){var r;return null==n&&(n=i),e.length&&n(e[0],t)<0&&(t=(r=[e[0],t])[0],e[0]=r[1],b(e,0,n)),t},l=function(e,t){var n,r,a,o,l,u;for(null==t&&(t=i),o=(function(){u=[];for(var t=0,n=s(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)u.push(t);return u}).apply(this).reverse(),l=[],r=0,a=o.length;r<a;r++)n=o[r],l.push(b(e,n,t));return l},m=function(e,t,n){var r;if(null==n&&(n=i),-1!==(r=e.indexOf(t)))return y(e,0,r,n),b(e,r,n)},v=function(e,t,n){var r,a,o,s,u;if(null==n&&(n=i),!(a=e.slice(0,t)).length)return a;for(l(a,n),o=0,s=(u=e.slice(t)).length;o<s;o++)r=u[o],d(a,r,n);return a.sort(n).reverse()},g=function(e,t,n){var r,a,o,s,c,d,f,v,g;if(null==n&&(n=i),10*t<=e.length){if(!(o=e.slice(0,t).sort(n)).length)return o;for(a=o[o.length-1],s=0,d=(f=e.slice(t)).length;s<d;s++)n(r=f[s],a)<0&&(h(o,r,0,null,n),o.pop(),a=o[o.length-1]);return o}for(l(e,n),g=[],c=0,v=p(t,e.length);0<=v?c<v:c>v;0<=v?++c:--c)g.push(u(e,n));return g},y=function(e,t,n,r){var a,o,s;for(null==r&&(r=i),a=e[n];n>t&&r(a,o=e[s=n-1>>1])<0;)e[n]=o,n=s;return e[n]=a},b=function(e,t,n){var r,a,o,s,l;for(null==n&&(n=i),a=e.length,l=t,o=e[t],r=2*t+1;r<a;)(s=r+1)<a&&!(n(e[r],e[s])<0)&&(r=s),e[t]=e[r],r=2*(t=r)+1;return e[t]=o,y(e,l,t,n)},o=function(){function e(e){this.cmp=null!=e?e:i,this.nodes=[]}return e.push=c,e.pop=u,e.replace=f,e.pushpop=d,e.heapify=l,e.updateItem=m,e.nlargest=v,e.nsmallest=g,e.prototype.push=function(e){return c(this.nodes,e,this.cmp)},e.prototype.pop=function(){return u(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return f(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return d(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return l(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return m(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return(t=new e).nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),r=[],void 0===(a="function"==typeof(n=function(){return o})?n.apply(t,r):n)||(e.exports=a)}).call(this)},15729:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function a(e){return!!e&&!!e[J]}function o(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===te}(e)||Array.isArray(e)||!!e[Q]||!!e.constructor[Q]||h(e)||p(e))}function i(e){return a(e)||r(23,e),e[J].t}function s(e,t,n){void 0===n&&(n=!1),0===l(e)?(n?Object.keys:ne)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function l(e){var t=e[J];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:p(e)?3:0}function u(e,t){return 2===l(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===l(e)?e.get(t):e[t]}function d(e,t,n){var r=l(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return $&&e instanceof Map}function p(e){return X&&e instanceof Set}function v(e){return e.o||e.t}function g(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=re(e);delete t[J];for(var n=ne(t),r=0;r<n.length;r++){var a=n[r],o=t[a];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(Object.getPrototypeOf(e),t)}function m(e,t){return void 0===t&&(t=!1),b(e)||a(e)||!o(e)||(l(e)>1&&(e.set=e.add=e.clear=e.delete=y),Object.freeze(e),t&&s(e,(function(e,t){return m(t,!0)}),!0)),e}function y(){r(2)}function b(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function w(e){var t=ae[e];return t||r(18,e),t}function x(e,t){ae[e]||(ae[e]=t)}function E(){return U}function _(e,t){t&&(w("Patches"),e.u=[],e.s=[],e.v=t)}function k(e){C(e),e.p.forEach(R),e.p=null}function C(e){e===U&&(U=e.l)}function S(e){return U={p:[],l:U,h:e,m:!0,_:0}}function R(e){var t=e[J];0===t.i||1===t.i?t.j():t.O=!0}function P(e,t){t._=t.p.length;var n=t.p[0],a=void 0!==e&&e!==n;return t.h.g||w("ES5").S(t,e,a),a?(n[J].P&&(k(t),r(4)),o(e)&&(e=O(t,e),t.l||j(t,e)),t.u&&w("Patches").M(n[J].t,e,t.u,t.s)):e=O(t,n,[]),k(t),t.u&&t.v(t.u,t.s),e!==Z?e:void 0}function O(e,t,n){if(b(t))return t;var r=t[J];if(!r)return s(t,(function(a,o){return M(e,r,t,a,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return j(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var a=4===r.i||5===r.i?r.o=g(r.k):r.o;s(3===r.i?new Set(a):a,(function(t,o){return M(e,r,a,t,o,n)})),j(e,a,!1),n&&e.u&&w("Patches").R(r,n,e.u,e.s)}return r.o}function M(e,t,n,r,i,s){if(a(i)){var l=O(e,i,s&&t&&3!==t.i&&!u(t.D,r)?s.concat(r):void 0);if(d(n,r,l),!a(l))return;e.m=!1}if(o(i)&&!b(i)){if(!e.h.F&&e._<1)return;O(e,i),t&&t.A.l||j(e,i)}}function j(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&m(t,n)}function z(e,t){var n=e[J];return(n?v(n):e)[t]}function T(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function D(e){e.P||(e.P=!0,e.l&&D(e.l))}function A(e){e.o||(e.o=g(e.t))}function B(e,t,n){var r=h(t)?w("MapSet").N(t,n):p(t)?w("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:E(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},a=r,o=oe;n&&(a=[r],o=ie);var i=Proxy.revocable(a,o),s=i.revoke,l=i.proxy;return r.k=l,r.j=s,l}(t,n):w("ES5").J(t,n);return(n?n.A:E()).p.push(r),r}function N(e){return a(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[J],a=l(t);if(r){if(!r.P&&(r.i<4||!w("ES5").K(r)))return r.t;r.I=!0,n=I(t,a),r.I=!1}else n=I(t,a);return s(n,(function(t,a){r&&c(r.t,t)===a||d(n,t,e(a))})),3===a?new Set(n):n}(e)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return g(e)}function L(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[J];return oe.get(t,e)},set:function(t){var n=this[J];oe.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var a=e[t][J];if(!a.P)switch(a.i){case 5:r(a)&&D(a);break;case 4:n(a)&&D(a)}}}function n(e){for(var t=e.t,n=e.k,r=ne(n),a=r.length-1;a>=0;a--){var o=r[a];if(o!==J){var i=t[o];if(void 0===i&&!u(t,o))return!0;var s=n[o],l=s&&s[J];if(l?l.t!==i:!f(s,i))return!0}}var c=!!t[J];return r.length!==ne(t).length+(c?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var o={};x("ES5",{J:function(t,n){var r=Array.isArray(t),a=function(t,n){if(t){for(var r=Array(n.length),a=0;a<n.length;a++)Object.defineProperty(r,""+a,e(a,!0));return r}var o=re(n);delete o[J];for(var i=ne(o),s=0;s<i.length;s++){var l=i[s];o[l]=e(l,t||!!o[l].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,t),o={i:r?5:4,A:n?n.A:E(),P:!1,I:!1,D:{},l:n,t,k:a,o:null,O:!1,C:!1};return Object.defineProperty(a,J,{value:o,writable:!0}),a},S:function(e,n,o){o?a(n)&&n[J].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[J];if(n){var a=n.t,o=n.k,i=n.D,l=n.i;if(4===l)s(o,(function(t){t!==J&&(void 0!==a[t]||u(a,t)?i[t]||e(o[t]):(i[t]=!0,D(n)))})),s(a,(function(e){void 0!==o[e]||u(o,e)||(i[e]=!1,D(n))}));else if(5===l){if(r(n)&&(D(n),i.length=!0),o.length<a.length)for(var c=o.length;c<a.length;c++)i[c]=!1;else for(var d=a.length;d<o.length;d++)i[d]=!0;for(var f=Math.min(o.length,a.length),h=0;h<f;h++)o.hasOwnProperty(h)||(i[h]=!0),void 0===i[h]&&e(o[h])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}function V(){function e(t){if(!o(t))return t;if(Array.isArray(t))return t.map(e);if(h(t))return new Map(Array.from(t.entries()).map((function(t){return[t[0],e(t[1])]})));if(p(t))return new Set(Array.from(t).map(e));var n=Object.create(Object.getPrototypeOf(t));for(var r in t)n[r]=e(t[r]);return u(t,Q)&&(n[Q]=t[Q]),n}function t(t){return a(t)?e(t):t}var n="add";x("Patches",{$:function(t,a){return a.forEach((function(a){for(var o=a.path,i=a.op,s=t,u=0;u<o.length-1;u++){var d=l(s),f=""+o[u];0!==d&&1!==d||"__proto__"!==f&&"constructor"!==f||r(24),"function"==typeof s&&"prototype"===f&&r(24),"object"!=typeof(s=c(s,f))&&r(15,o.join("/"))}var h=l(s),p=e(a.value),v=o[o.length-1];switch(i){case"replace":switch(h){case 2:return s.set(v,p);case 3:r(16);default:return s[v]=p}case n:switch(h){case 1:return"-"===v?s.push(p):s.splice(v,0,p);case 2:return s.set(v,p);case 3:return s.add(p);default:return s[v]=p}case"remove":switch(h){case 1:return s.splice(v,1);case 2:return s.delete(v);case 3:return s.delete(a.value);default:return delete s[v]}default:r(17,i)}})),t},R:function(e,r,a,o){switch(e.i){case 0:case 4:case 2:return function(e,r,a,o){var i=e.t,l=e.o;s(e.D,(function(e,s){var d=c(i,e),f=c(l,e),h=s?u(i,e)?"replace":n:"remove";if(d!==f||"replace"!==h){var p=r.concat(e);a.push("remove"===h?{op:h,path:p}:{op:h,path:p,value:f}),o.push(h===n?{op:"remove",path:p}:"remove"===h?{op:n,path:p,value:t(d)}:{op:"replace",path:p,value:t(d)})}}))}(e,r,a,o);case 5:case 1:return function(e,r,a,o){var i=e.t,s=e.D,l=e.o;if(l.length<i.length){var u=[l,i];i=u[0],l=u[1];var c=[o,a];a=c[0],o=c[1]}for(var d=0;d<i.length;d++)if(s[d]&&l[d]!==i[d]){var f=r.concat([d]);a.push({op:"replace",path:f,value:t(l[d])}),o.push({op:"replace",path:f,value:t(i[d])})}for(var h=i.length;h<l.length;h++){var p=r.concat([h]);a.push({op:n,path:p,value:t(l[h])})}i.length<l.length&&o.push({op:"replace",path:r.concat(["length"]),value:i.length})}(e,r,a,o);case 3:return function(e,t,r,a){var o=e.t,i=e.o,s=0;o.forEach((function(e){if(!i.has(e)){var o=t.concat([s]);r.push({op:"remove",path:o,value:e}),a.unshift({op:n,path:o,value:e})}s++})),s=0,i.forEach((function(e){if(!o.has(e)){var i=t.concat([s]);r.push({op:n,path:i,value:e}),a.unshift({op:"remove",path:i,value:e})}s++}))}(e,r,a,o)}},M:function(e,t,n,r){n.push({op:"replace",path:[],value:t===Z?void 0:t}),r.push({op:"replace",path:[],value:e})}})}function F(){function e(e,t){function n(){this.constructor=e}i(e,t),e.prototype=(n.prototype=t.prototype,new n)}function t(e){e.o||(e.D=new Map,e.o=new Map(e.t))}function n(e){e.o||(e.o=new Set,e.t.forEach((function(t){if(o(t)){var n=B(e.A.h,t,e);e.p.set(t,n),e.o.add(n)}else e.o.add(t)})))}function a(e){e.O&&r(3,JSON.stringify(v(e)))}var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},l=function(){function n(e,t){return this[J]={i:2,l:t,A:t?t.A:E(),P:!1,I:!1,o:void 0,D:void 0,t:e,k:this,C:!1,O:!1},this}e(n,Map);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return v(this[J]).size}}),r.has=function(e){return v(this[J]).has(e)},r.set=function(e,n){var r=this[J];return a(r),v(r).has(e)&&v(r).get(e)===n||(t(r),D(r),r.D.set(e,!0),r.o.set(e,n),r.D.set(e,!0)),this},r.delete=function(e){if(!this.has(e))return!1;var n=this[J];return a(n),t(n),D(n),n.t.has(e)?n.D.set(e,!1):n.D.delete(e),n.o.delete(e),!0},r.clear=function(){var e=this[J];a(e),v(e).size&&(t(e),D(e),e.D=new Map,s(e.t,(function(t){e.D.set(t,!1)})),e.o.clear())},r.forEach=function(e,t){var n=this;v(this[J]).forEach((function(r,a){e.call(t,n.get(a),a,n)}))},r.get=function(e){var n=this[J];a(n);var r=v(n).get(e);if(n.I||!o(r))return r;if(r!==n.t.get(e))return r;var i=B(n.A.h,r,n);return t(n),n.o.set(e,i),i},r.keys=function(){return v(this[J]).keys()},r.values=function(){var e,t=this,n=this.keys();return(e={})[ee]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},r.entries=function(){var e,t=this,n=this.keys();return(e={})[ee]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},r[ee]=function(){return this.entries()},n}(),u=function(){function t(e,t){return this[J]={i:3,l:t,A:t?t.A:E(),P:!1,I:!1,o:void 0,t:e,k:this,p:new Map,O:!1,C:!1},this}e(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return v(this[J]).size}}),r.has=function(e){var t=this[J];return a(t),t.o?!!t.o.has(e)||!(!t.p.has(e)||!t.o.has(t.p.get(e))):t.t.has(e)},r.add=function(e){var t=this[J];return a(t),this.has(e)||(n(t),D(t),t.o.add(e)),this},r.delete=function(e){if(!this.has(e))return!1;var t=this[J];return a(t),n(t),D(t),t.o.delete(e)||!!t.p.has(e)&&t.o.delete(t.p.get(e))},r.clear=function(){var e=this[J];a(e),v(e).size&&(n(e),D(e),e.o.clear())},r.values=function(){var e=this[J];return a(e),n(e),e.o.values()},r.entries=function(){var e=this[J];return a(e),n(e),e.o.entries()},r.keys=function(){return this.values()},r[ee]=function(){return this.values()},r.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},t}();x("MapSet",{N:function(e,t){return new l(e,t)},T:function(e,t){return new u(e,t)}})}function H(){L(),F(),V()}function G(e){return e}function q(e){return e}n.r(t),n.d(t,{Immer:()=>se,applyPatches:()=>he,castDraft:()=>G,castImmutable:()=>q,createDraft:()=>pe,current:()=>N,default:()=>ge,enableAllPlugins:()=>H,enableES5:()=>L,enableMapSet:()=>F,enablePatches:()=>V,finishDraft:()=>ve,freeze:()=>m,immerable:()=>Q,isDraft:()=>a,isDraftable:()=>o,nothing:()=>Z,original:()=>i,produce:()=>ue,produceWithPatches:()=>ce,setAutoFreeze:()=>de,setUseProxies:()=>fe});var Y,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),$="undefined"!=typeof Map,X="undefined"!=typeof Set,K="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Z=W?Symbol.for("immer-nothing"):((Y={})["immer-nothing"]=!0,Y),Q=W?Symbol.for("immer-draftable"):"__$immer_draftable",J=W?Symbol.for("immer-state"):"__$immer_state",ee="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",te=""+Object.prototype.constructor,ne="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,re=Object.getOwnPropertyDescriptors||function(e){var t={};return ne(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},ae={},oe={get:function(e,t){if(t===J)return e;var n=v(e);if(!u(n,t))return function(e,t,n){var r,a=T(t,n);return a?"value"in a?a.value:null===(r=a.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!o(r)?r:r===z(e.t,t)?(A(e),e.o[t]=B(e.A.h,r,e)):r},has:function(e,t){return t in v(e)},ownKeys:function(e){return Reflect.ownKeys(v(e))},set:function(e,t,n){var r=T(v(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var a=z(v(e),t),o=null==a?void 0:a[J];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(f(n,a)&&(void 0!==n||u(e.t,t)))return!0;A(e),D(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==z(e.t,t)||t in e.t?(e.D[t]=!1,A(e),D(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=v(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},ie={};s(oe,(function(e,t){ie[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ie.deleteProperty=function(e,t){return ie.set.call(this,e,t,void 0)},ie.set=function(e,t,n){return oe.set.call(this,e[0],t,n,e[0])};var se=function(){function e(e){var t=this;this.g=K,this.F=!0,this.produce=function(e,n,a){if("function"==typeof e&&"function"!=typeof n){var i=n;n=e;var s=t;return function(e){var t=this;void 0===e&&(e=i);for(var r=arguments.length,a=Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return s.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))}))}}var l;if("function"!=typeof n&&r(6),void 0!==a&&"function"!=typeof a&&r(7),o(e)){var u=S(t),c=B(t,e,void 0),d=!0;try{l=n(c),d=!1}finally{d?k(u):C(u)}return"undefined"!=typeof Promise&&l instanceof Promise?l.then((function(e){return _(u,a),P(e,u)}),(function(e){throw k(u),e})):(_(u,a),P(l,u))}if(!e||"object"!=typeof e){if(void 0===(l=n(e))&&(l=e),l===Z&&(l=void 0),t.F&&m(l,!0),a){var f=[],h=[];w("Patches").M(e,l,f,h),a(f,h)}return l}r(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,a=Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(a))}))};var r,a,o=t.produce(e,n,(function(e,t){r=e,a=t}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(e){return[e,r,a]})):[o,r,a]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){o(e)||r(8),a(e)&&(e=N(e));var t=S(this),n=B(this,e,void 0);return n[J].C=!0,C(t),n},t.finishDraft=function(e,t){var n=(e&&e[J]).A;return _(n,t),P(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!K&&r(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=w("Patches").$;return a(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),le=new se,ue=le.produce,ce=le.produceWithPatches.bind(le),de=le.setAutoFreeze.bind(le),fe=le.setUseProxies.bind(le),he=le.applyPatches.bind(le),pe=le.createDraft.bind(le),ve=le.finishDraft.bind(le);const ge=ue},80594:e=>{var t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,a=/^0o[0-7]+$/i,o=parseInt,i="object"==typeof global&&global&&global.Object===Object&&global,s="object"==typeof self&&self&&self.Object===Object&&self,l=i||s||Function("return this")(),u=Object.prototype.toString,c=Math.max,d=Math.min,f=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(h(e)){var i="function"==typeof e.valueOf?e.valueOf():e;e=h(i)?i+"":i}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var s=r.test(e);return s||a.test(e)?o(e.slice(2),s?2:8):n.test(e)?NaN:+e}e.exports=function(e,t,n){var r,a,o,i,s,l,u=0,v=!1,g=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=a;return r=a=void 0,u=t,i=e.apply(o,n)}function b(e){return u=e,s=setTimeout(x,t),v?y(e):i}function w(e){var n=e-l;return void 0===l||n>=t||n<0||g&&e-u>=o}function x(){var e=f();if(w(e))return E(e);s=setTimeout(x,function(e){var n=t-(e-l);return g?d(n,o-(e-u)):n}(e))}function E(e){return s=void 0,m&&r?y(e):(r=a=void 0,i)}function _(){var e=f(),n=w(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return b(l);if(g)return s=setTimeout(x,t),y(l)}return void 0===s&&(s=setTimeout(x,t)),i}return t=p(t)||0,h(n)&&(v=!!n.leading,o=(g="maxWait"in n)?c(p(n.maxWait)||0,t):o,m="trailing"in n?!!n.trailing:m),_.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=a=s=void 0},_.flush=function(){return void 0===s?i:E(f())},_}},77485:e=>{var t="__lodash_hash_undefined__",n="[object Function]",r="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/,i=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,c="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,f=c||d||Function("return this")();var h,p=Array.prototype,v=Function.prototype,g=Object.prototype,m=f["__core-js_shared__"],y=(h=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",b=v.toString,w=g.hasOwnProperty,x=g.toString,E=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_=f.Symbol,k=p.splice,C=B(f,"Map"),S=B(Object,"create"),R=_?_.prototype:void 0,P=R?R.toString:void 0;function O(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function z(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function T(e,t){var n;t=function(e,t){if(V(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||H(e))return!0;return o.test(e)||!a.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:V(n=t)?n:N(n);for(var r=0,i=t.length;null!=e&&r<i;)e=e[I(t[r++])];return r&&r==i?e:void 0}function D(e){if(!F(e)||(t=e,y&&y in t))return!1;var t,a=function(e){var t=F(e)?x.call(e):"";return t==n||t==r}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?E:u;return a.test(function(e){if(null!=e){try{return b.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function A(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function B(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return D(n)?n:void 0}O.prototype.clear=function(){this.__data__=S?S(null):{}},O.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},O.prototype.get=function(e){var n=this.__data__;if(S){var r=n[e];return r===t?void 0:r}return w.call(n,e)?n[e]:void 0},O.prototype.has=function(e){var t=this.__data__;return S?void 0!==t[e]:w.call(t,e)},O.prototype.set=function(e,n){return this.__data__[e]=S&&void 0===n?t:n,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=z(t,e);return!(n<0)&&(n==t.length-1?t.pop():k.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=z(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return z(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=z(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},j.prototype.clear=function(){this.__data__={hash:new O,map:new(C||M),string:new O}},j.prototype.delete=function(e){return A(this,e).delete(e)},j.prototype.get=function(e){return A(this,e).get(e)},j.prototype.has=function(e){return A(this,e).has(e)},j.prototype.set=function(e,t){return A(this,e).set(e,t),this};var N=L((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return P?P.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return i.test(e)&&n.push(""),e.replace(s,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function I(e){if("string"==typeof e||H(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function L(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(L.Cache||j),n}L.Cache=j;var V=Array.isArray;function F(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==x.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:T(e,t);return void 0===r?n:r}},880:e=>{var t="__lodash_hash_undefined__",n="[object Function]",r="[object GeneratorFunction]",a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/,i=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,d="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,h=d||f||Function("return this")();var p,v=Array.prototype,g=Function.prototype,m=Object.prototype,y=h["__core-js_shared__"],b=(p=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+p:"",w=g.toString,x=m.hasOwnProperty,E=m.toString,_=RegExp("^"+w.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),k=h.Symbol,C=v.splice,S=I(h,"Map"),R=I(Object,"create"),P=k?k.prototype:void 0,O=P?P.toString:void 0;function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e,t,n){var r=e[t];x.call(e,t)&&G(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function D(e,t){for(var n=e.length;n--;)if(G(e[n][0],t))return n;return-1}function A(e){if(!Y(e)||(t=e,b&&b in t))return!1;var t,a=function(e){var t=Y(e)?E.call(e):"";return t==n||t==r}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?_:u;return a.test(function(e){if(null!=e){try{return w.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function B(e,t,n,r){if(!Y(e))return e;t=function(e,t){if(q(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||U(e))return!0;return o.test(e)||!a.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return q(e)?e:V(e)}(t);for(var i=-1,s=t.length,l=s-1,u=e;null!=u&&++i<s;){var c=F(t[i]),d=n;if(i!=l){var f=u[c];void 0===(d=r?r(f,c,u):void 0)&&(d=Y(f)?f:L(t[i+1])?[]:{})}T(u,c,d),u=u[c]}return e}function N(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function I(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return A(n)?n:void 0}function L(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}M.prototype.clear=function(){this.__data__=R?R(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var n=this.__data__;if(R){var r=n[e];return r===t?void 0:r}return x.call(n,e)?n[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return R?void 0!==t[e]:x.call(t,e)},M.prototype.set=function(e,n){return this.__data__[e]=R&&void 0===n?t:n,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=D(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=D(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return D(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=D(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},z.prototype.clear=function(){this.__data__={hash:new M,map:new(S||j),string:new M}},z.prototype.delete=function(e){return N(this,e).delete(e)},z.prototype.get=function(e){return N(this,e).get(e)},z.prototype.has=function(e){return N(this,e).has(e)},z.prototype.set=function(e,t){return N(this,e).set(e,t),this};var V=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(U(e))return O?O.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return i.test(e)&&n.push(""),e.replace(s,(function(e,t,r,a){n.push(r?a.replace(l,"$1"):t||e)})),n}));function F(e){if("string"==typeof e||U(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function H(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(H.Cache||z),n}function G(e,t){return e===t||e!=e&&t!=t}H.Cache=z;var q=Array.isArray;function Y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function U(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==E.call(e)}e.exports=function(e,t,n){return null==e?e:B(e,t,n)}},85884:e=>{var t="__lodash_hash_undefined__",n="[object Function]",r="[object GeneratorFunction]",a=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=/^\[object .+?Constructor\]$/,l="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,c=l||u||Function("return this")();var d,f=Array.prototype,h=Function.prototype,p=Object.prototype,v=c["__core-js_shared__"],g=(d=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",m=h.toString,y=p.hasOwnProperty,b=p.toString,w=RegExp("^"+m.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=c.Symbol,E=f.splice,_=T(c,"Map"),k=T(Object,"create"),C=x?x.prototype:void 0,S=C?C.toString:void 0;function R(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function P(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function O(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e,t){for(var n,r,a=e.length;a--;)if((n=e[a][0])===(r=t)||n!=n&&r!=r)return a;return-1}function j(e){if(!I(e)||(t=e,g&&g in t))return!1;var t,a=function(e){var t=I(e)?b.call(e):"";return t==n||t==r}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?w:s;return a.test(function(e){if(null!=e){try{return m.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function z(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function T(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}R.prototype.clear=function(){this.__data__=k?k(null):{}},R.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},R.prototype.get=function(e){var n=this.__data__;if(k){var r=n[e];return r===t?void 0:r}return y.call(n,e)?n[e]:void 0},R.prototype.has=function(e){var t=this.__data__;return k?void 0!==t[e]:y.call(t,e)},R.prototype.set=function(e,n){return this.__data__[e]=k&&void 0===n?t:n,this},P.prototype.clear=function(){this.__data__=[]},P.prototype.delete=function(e){var t=this.__data__,n=M(t,e);return!(n<0)&&(n==t.length-1?t.pop():E.call(t,n,1),!0)},P.prototype.get=function(e){var t=this.__data__,n=M(t,e);return n<0?void 0:t[n][1]},P.prototype.has=function(e){return M(this.__data__,e)>-1},P.prototype.set=function(e,t){var n=this.__data__,r=M(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},O.prototype.clear=function(){this.__data__={hash:new R,map:new(_||P),string:new R}},O.prototype.delete=function(e){return z(this,e).delete(e)},O.prototype.get=function(e){return z(this,e).get(e)},O.prototype.has=function(e){return z(this,e).has(e)},O.prototype.set=function(e,t){return z(this,e).set(e,t),this};var D=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(L(e))return S?S.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return a.test(e)&&n.push(""),e.replace(o,(function(e,t,r,a){n.push(r?a.replace(i,"$1"):t||e)})),n}));function A(e){if("string"==typeof e||L(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(B.Cache||O),n}B.Cache=O;var N=Array.isArray;function I(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function L(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==b.call(e)}e.exports=function(e){return N(e)?function(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}(e,A):L(e)?[e]:function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(D(e))}},39515:(e,t,n)=>{var r=n(38761)(n(37772),"DataView");e.exports=r},89612:(e,t,n)=>{var r=n(52118),a=n(96909),o=n(98138),i=n(4174),s=n(7942);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=o,l.prototype.has=i,l.prototype.set=s,e.exports=l},80235:(e,t,n)=>{var r=n(3945),a=n(21846),o=n(88028),i=n(72344),s=n(94769);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=o,l.prototype.has=i,l.prototype.set=s,e.exports=l},10326:(e,t,n)=>{var r=n(38761)(n(37772),"Map");e.exports=r},96738:(e,t,n)=>{var r=n(92411),a=n(36417),o=n(86928),i=n(79493),s=n(24150);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=a,l.prototype.get=o,l.prototype.has=i,l.prototype.set=s,e.exports=l},52760:(e,t,n)=>{var r=n(38761)(n(37772),"Promise");e.exports=r},2143:(e,t,n)=>{var r=n(38761)(n(37772),"Set");e.exports=r},45386:(e,t,n)=>{var r=n(96738),a=n(52842),o=n(52482);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=a,i.prototype.has=o,e.exports=i},86571:(e,t,n)=>{var r=n(80235),a=n(15243),o=n(72858),i=n(4417),s=n(8605),l=n(71418);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=a,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=s,u.prototype.set=l,e.exports=u},50857:(e,t,n)=>{var r=n(37772).Symbol;e.exports=r},79162:(e,t,n)=>{var r=n(37772).Uint8Array;e.exports=r},93215:(e,t,n)=>{var r=n(38761)(n(37772),"WeakMap");e.exports=r},49432:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},72517:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},67552:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o}},38333:(e,t,n)=>{var r=n(77832);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},34893:e=>{e.exports=function(e,t,n){for(var r=-1,a=null==e?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}},1634:(e,t,n)=>{var r=n(36473),a=n(79631),o=n(86152),i=n(73226),s=n(39045),l=n(77598),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&a(e),d=!n&&!c&&i(e),f=!n&&!c&&!d&&l(e),h=n||c||d||f,p=h?r(e.length,String):[],v=p.length;for(var g in e)!t&&!u.call(e,g)||h&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||p.push(g);return p}},50343:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}},65067:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}},81207:e=>{e.exports=function(e,t,n,r){var a=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++a]);++a<o;)n=t(n,e[a],a,e);return n}},87064:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},8589:(e,t,n)=>{var r=n(20256)("length");e.exports=r},28582:(e,t,n)=>{var r=n(13940),a=n(41225);e.exports=function(e,t,n){(void 0!==n&&!a(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},60091:(e,t,n)=>{var r=n(13940),a=n(41225),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var i=e[t];o.call(e,t)&&a(i,n)&&(void 0!==n||t in e)||r(e,t,n)}},22218:(e,t,n)=>{var r=n(41225);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},67993:(e,t,n)=>{var r=n(752),a=n(90249);e.exports=function(e,t){return e&&r(t,a(t),e)}},55906:(e,t,n)=>{var r=n(752),a=n(18582);e.exports=function(e,t){return e&&r(t,a(t),e)}},13940:(e,t,n)=>{var r=n(83043);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},18874:(e,t,n)=>{var r=n(86571),a=n(72517),o=n(60091),i=n(67993),s=n(55906),l=n(92175),u=n(51522),c=n(7680),d=n(19987),f=n(13483),h=n(76939),p=n(70940),v=n(99917),g=n(8222),m=n(78725),y=n(86152),b=n(73226),w=n(4714),x=n(29259),E=n(43679),_=n(90249),k=n(18582),C="[object Arguments]",S="[object Function]",R="[object Object]",P={};P[C]=P["[object Array]"]=P["[object ArrayBuffer]"]=P["[object DataView]"]=P["[object Boolean]"]=P["[object Date]"]=P["[object Float32Array]"]=P["[object Float64Array]"]=P["[object Int8Array]"]=P["[object Int16Array]"]=P["[object Int32Array]"]=P["[object Map]"]=P["[object Number]"]=P[R]=P["[object RegExp]"]=P["[object Set]"]=P["[object String]"]=P["[object Symbol]"]=P["[object Uint8Array]"]=P["[object Uint8ClampedArray]"]=P["[object Uint16Array]"]=P["[object Uint32Array]"]=!0,P["[object Error]"]=P[S]=P["[object WeakMap]"]=!1,e.exports=function e(t,n,O,M,j,z){var T,D=1&n,A=2&n,B=4&n;if(O&&(T=j?O(t,M,j,z):O(t)),void 0!==T)return T;if(!x(t))return t;var N=y(t);if(N){if(T=v(t),!D)return u(t,T)}else{var I=p(t),L=I==S||"[object GeneratorFunction]"==I;if(b(t))return l(t,D);if(I==R||I==C||L&&!j){if(T=A||L?{}:m(t),!D)return A?d(t,s(T,t)):c(t,i(T,t))}else{if(!P[I])return j?t:{};T=g(t,I,D)}}z||(z=new r);var V=z.get(t);if(V)return V;z.set(t,T),E(t)?t.forEach((function(r){T.add(e(r,n,O,r,t,z))})):w(t)&&t.forEach((function(r,a){T.set(a,e(r,n,O,a,t,z))}));var F=N?void 0:(B?A?h:f:A?k:_)(t);return a(F||t,(function(r,a){F&&(r=t[a=r]),o(T,a,e(r,n,O,a,t,z))})),T}},39413:(e,t,n)=>{var r=n(29259),a=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},24303:(e,t,n)=>{var r=n(26548),a=n(92019)(r);e.exports=a},2229:(e,t,n)=>{var r=n(4795);e.exports=function(e,t,n){for(var a=-1,o=e.length;++a<o;){var i=e[a],s=t(i);if(null!=s&&(void 0===l?s==s&&!r(s):n(s,l)))var l=s,u=i}return u}},98043:(e,t,n)=>{var r=n(24303);e.exports=function(e,t){var n=[];return r(e,(function(e,r,a){t(e,r,a)&&n.push(e)})),n}},21359:e=>{e.exports=function(e,t,n,r){for(var a=e.length,o=n+(r?1:-1);r?o--:++o<a;)if(t(e[o],o,e))return o;return-1}},62034:(e,t,n)=>{var r=n(65067),a=n(95882);e.exports=function e(t,n,o,i,s){var l=-1,u=t.length;for(o||(o=a),s||(s=[]);++l<u;){var c=t[l];n>0&&o(c)?n>1?e(c,n-1,o,i,s):r(s,c):i||(s[s.length]=c)}return s}},15308:(e,t,n)=>{var r=n(55463)();e.exports=r},26548:(e,t,n)=>{var r=n(15308),a=n(90249);e.exports=function(e,t){return e&&r(e,t,a)}},13324:(e,t,n)=>{var r=n(17297),a=n(33812);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[a(t[n++])];return n&&n==o?e:void 0}},1897:(e,t,n)=>{var r=n(65067),a=n(86152);e.exports=function(e,t,n){var o=t(e);return a(e)?o:r(o,n(e))}},53366:(e,t,n)=>{var r=n(50857),a=n(62107),o=n(37157),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):o(e)}},84134:e=>{e.exports=function(e,t){return e>t}},32726:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},20187:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},77832:(e,t,n)=>{var r=n(21359),a=n(22195),o=n(66024);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,a,n)}},15183:(e,t,n)=>{var r=n(53366),a=n(15125);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},88746:(e,t,n)=>{var r=n(51952),a=n(15125);e.exports=function e(t,n,o,i,s){return t===n||(null==t||null==n||!a(t)&&!a(n)?t!=t&&n!=n:r(t,n,o,i,e,s))}},51952:(e,t,n)=>{var r=n(86571),a=n(74871),o=n(11491),i=n(17416),s=n(70940),l=n(86152),u=n(73226),c=n(77598),d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,g,m){var y=l(e),b=l(t),w=y?f:s(e),x=b?f:s(t),E=(w=w==d?h:w)==h,_=(x=x==d?h:x)==h,k=w==x;if(k&&u(e)){if(!u(t))return!1;y=!0,E=!1}if(k&&!E)return m||(m=new r),y||c(e)?a(e,t,n,v,g,m):o(e,t,w,n,v,g,m);if(!(1&n)){var C=E&&p.call(e,"__wrapped__"),S=_&&p.call(t,"__wrapped__");if(C||S){var R=C?e.value():e,P=S?t.value():t;return m||(m=new r),g(R,P,n,v,m)}}return!!k&&(m||(m=new r),i(e,t,n,v,g,m))}},74511:(e,t,n)=>{var r=n(70940),a=n(15125);e.exports=function(e){return a(e)&&"[object Map]"==r(e)}},37036:(e,t,n)=>{var r=n(86571),a=n(88746);e.exports=function(e,t,n,o){var i=n.length,s=i,l=!o;if(null==e)return!s;for(e=Object(e);i--;){var u=n[i];if(l&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<s;){var c=(u=n[i])[0],d=e[c],f=u[1];if(l&&u[2]){if(void 0===d&&!(c in e))return!1}else{var h=new r;if(o)var p=o(d,f,c,e,t,h);if(!(void 0===p?a(f,d,3,o,h):p))return!1}}return!0}},22195:e=>{e.exports=function(e){return e!=e}},6840:(e,t,n)=>{var r=n(61049),a=n(47394),o=n(29259),i=n(87035),s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,c=l.toString,d=u.hasOwnProperty,f=RegExp("^"+c.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||a(e))&&(r(e)?f:s).test(i(e))}},8109:(e,t,n)=>{var r=n(70940),a=n(15125);e.exports=function(e){return a(e)&&"[object Set]"==r(e)}},35522:(e,t,n)=>{var r=n(53366),a=n(61158),o=n(15125),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&a(e.length)&&!!i[r(e)]}},68286:(e,t,n)=>{var r=n(26423),a=n(74716),o=n(23059),i=n(86152),s=n(65798);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?i(e)?a(e[0],e[1]):r(e):s(e)}},86411:(e,t,n)=>{var r=n(16001),a=n(54248),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},18390:(e,t,n)=>{var r=n(29259),a=n(16001),o=n(62966),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=a(e),n=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&n.push(s);return n}},17606:e=>{e.exports=function(e,t){return e<t}},93401:(e,t,n)=>{var r=n(24303),a=n(67878);e.exports=function(e,t){var n=-1,o=a(e)?Array(e.length):[];return r(e,(function(e,r,a){o[++n]=t(e,r,a)})),o}},26423:(e,t,n)=>{var r=n(37036),a=n(49882),o=n(73477);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},74716:(e,t,n)=>{var r=n(88746),a=n(72579),o=n(95041),i=n(21401),s=n(28792),l=n(73477),u=n(33812);e.exports=function(e,t){return i(e)&&s(t)?l(u(e),t):function(n){var i=a(n,e);return void 0===i&&i===t?o(n,e):r(t,i,3)}}},84565:(e,t,n)=>{var r=n(86571),a=n(28582),o=n(15308),i=n(25561),s=n(29259),l=n(18582),u=n(52434);e.exports=function e(t,n,c,d,f){t!==n&&o(n,(function(o,l){if(f||(f=new r),s(o))i(t,n,l,c,e,d,f);else{var h=d?d(u(t,l),o,l+"",t,n,f):void 0;void 0===h&&(h=o),a(t,l,h)}}),l)}},25561:(e,t,n)=>{var r=n(28582),a=n(92175),o=n(6190),i=n(51522),s=n(78725),l=n(79631),u=n(86152),c=n(93746),d=n(73226),f=n(61049),h=n(29259),p=n(97030),v=n(77598),g=n(52434),m=n(63329);e.exports=function(e,t,n,y,b,w,x){var E=g(e,n),_=g(t,n),k=x.get(_);if(k)r(e,n,k);else{var C=w?w(E,_,n+"",e,t,x):void 0,S=void 0===C;if(S){var R=u(_),P=!R&&d(_),O=!R&&!P&&v(_);C=_,R||P||O?u(E)?C=E:c(E)?C=i(E):P?(S=!1,C=a(_,!0)):O?(S=!1,C=o(_,!0)):C=[]:p(_)||l(_)?(C=E,l(E)?C=m(E):h(E)&&!f(E)||(C=s(_))):S=!1}S&&(x.set(_,C),b(C,_,y,w,x),x.delete(_)),r(e,n,C)}}},23813:(e,t,n)=>{var r=n(50343),a=n(13324),o=n(68286),i=n(93401),s=n(27095),l=n(47826),u=n(18477),c=n(23059),d=n(86152);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return d(e)?function(t){return a(t,1===e.length?e[0]:e)}:e})):[c];var f=-1;t=r(t,l(o));var h=i(e,(function(e,n,a){return{criteria:r(t,(function(t){return t(e)})),index:++f,value:e}}));return s(h,(function(e,t){return u(e,t,n)}))}},92602:(e,t,n)=>{var r=n(93759),a=n(95041);e.exports=function(e,t){return r(e,t,(function(t,n){return a(e,n)}))}},93759:(e,t,n)=>{var r=n(13324),a=n(82857),o=n(17297);e.exports=function(e,t,n){for(var i=-1,s=t.length,l={};++i<s;){var u=t[i],c=r(e,u);n(c,u)&&a(l,o(u,e),c)}return l}},20256:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},82952:(e,t,n)=>{var r=n(13324);e.exports=function(e){return function(t){return r(t,e)}}},93228:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,a,o){for(var i=-1,s=n(t((r-e)/(a||1)),0),l=Array(s);s--;)l[o?s:++i]=e,e+=a;return l}},5877:e=>{e.exports=function(e,t,n,r,a){return a(e,(function(e,a,o){n=r?(r=!1,e):t(n,e,a,o)})),n}},36060:(e,t,n)=>{var r=n(23059),a=n(43114),o=n(75251);e.exports=function(e,t){return o(a(e,t,r),e+"")}},82857:(e,t,n)=>{var r=n(60091),a=n(17297),o=n(39045),i=n(29259),s=n(33812);e.exports=function(e,t,n,l){if(!i(e))return e;for(var u=-1,c=(t=a(t,e)).length,d=c-1,f=e;null!=f&&++u<c;){var h=s(t[u]),p=n;if("__proto__"===h||"constructor"===h||"prototype"===h)return e;if(u!=d){var v=f[h];void 0===(p=l?l(v,h,f):void 0)&&(p=i(v)?v:o(t[u+1])?[]:{})}r(f,h,p),f=f[h]}return e}},86532:(e,t,n)=>{var r=n(86874),a=n(83043),o=n(23059),i=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=i},27095:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},36473:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},1054:(e,t,n)=>{var r=n(50857),a=n(50343),o=n(86152),i=n(4795),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return a(t,e)+"";if(i(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},51704:(e,t,n)=>{var r=n(52153),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},47826:e=>{e.exports=function(e){return function(t){return e(t)}}},67326:(e,t,n)=>{var r=n(45386),a=n(38333),o=n(34893),i=n(59950),s=n(78803),l=n(16909);e.exports=function(e,t,n){var u=-1,c=a,d=e.length,f=!0,h=[],p=h;if(n)f=!1,c=o;else if(d>=200){var v=t?null:s(e);if(v)return l(v);f=!1,c=i,p=new r}else p=t?[]:h;e:for(;++u<d;){var g=e[u],m=t?t(g):g;if(g=n||0!==g?g:0,f&&m==m){for(var y=p.length;y--;)if(p[y]===m)continue e;t&&p.push(m),h.push(g)}else c(p,m,n)||(p!==h&&p.push(m),h.push(g))}return h}},50753:(e,t,n)=>{var r=n(50343);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},40509:e=>{e.exports=function(e,t,n){for(var r=-1,a=e.length,o=t.length,i={};++r<a;){var s=r<o?t[r]:void 0;n(i,e[r],s)}return i}},59950:e=>{e.exports=function(e,t){return e.has(t)}},89419:(e,t,n)=>{var r=n(23059);e.exports=function(e){return"function"==typeof e?e:r}},17297:(e,t,n)=>{var r=n(86152),a=n(21401),o=n(54452),i=n(66188);e.exports=function(e,t){return r(e)?e:a(e,t)?[e]:o(i(e))}},79882:(e,t,n)=>{var r=n(79162);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},92175:(e,t,n)=>{e=n.nmd(e);var r=n(37772),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a?r.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},34727:(e,t,n)=>{var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},96058:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},70169:(e,t,n)=>{var r=n(50857),a=r?r.prototype:void 0,o=a?a.valueOf:void 0;e.exports=function(e){return o?Object(o.call(e)):{}}},6190:(e,t,n)=>{var r=n(79882);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},27520:(e,t,n)=>{var r=n(4795);e.exports=function(e,t){if(e!==t){var n=void 0!==e,a=null===e,o=e==e,i=r(e),s=void 0!==t,l=null===t,u=t==t,c=r(t);if(!l&&!c&&!i&&e>t||i&&s&&u&&!l&&!c||a&&s&&u||!n&&u||!o)return 1;if(!a&&!i&&!c&&e<t||c&&n&&o&&!a&&!i||l&&n&&o||!s&&o||!u)return-1}return 0}},18477:(e,t,n)=>{var r=n(27520);e.exports=function(e,t,n){for(var a=-1,o=e.criteria,i=t.criteria,s=o.length,l=n.length;++a<s;){var u=r(o[a],i[a]);if(u)return a>=l?u:u*("desc"==n[a]?-1:1)}return e.index-t.index}},51522:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},752:(e,t,n)=>{var r=n(60091),a=n(13940);e.exports=function(e,t,n,o){var i=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var u=t[s],c=o?o(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),i?a(n,u,c):r(n,u,c)}return n}},7680:(e,t,n)=>{var r=n(752),a=n(80633);e.exports=function(e,t){return r(e,a(e),t)}},19987:(e,t,n)=>{var r=n(752),a=n(12680);e.exports=function(e,t){return r(e,a(e),t)}},24019:(e,t,n)=>{var r=n(37772)["__core-js_shared__"];e.exports=r},97263:(e,t,n)=>{var r=n(36060),a=n(82406);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&a(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,i)}return t}))}},92019:(e,t,n)=>{var r=n(67878);e.exports=function(e,t){return function(n,a){if(null==n)return n;if(!r(n))return e(n,a);for(var o=n.length,i=t?o:-1,s=Object(n);(t?i--:++i<o)&&!1!==a(s[i],i,s););return n}}},55463:e=>{e.exports=function(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++a];if(!1===n(o[l],l,o))break}return t}}},98776:(e,t,n)=>{var r=n(68286),a=n(67878),o=n(90249);e.exports=function(e){return function(t,n,i){var s=Object(t);if(!a(t)){var l=r(n,3);t=o(t),n=function(e){return l(s[e],e,s)}}var u=e(t,n,i);return u>-1?s[l?t[u]:u]:void 0}}},82941:(e,t,n)=>{var r=n(93228),a=n(82406),o=n(5707);e.exports=function(e){return function(t,n,i){return i&&"number"!=typeof i&&a(t,n,i)&&(n=i=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),i=void 0===i?t<n?1:-1:o(i),r(t,n,i,e)}}},78803:(e,t,n)=>{var r=n(2143),a=n(34291),o=n(16909),i=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:a;e.exports=i},83043:(e,t,n)=>{var r=n(38761),a=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=a},74871:(e,t,n)=>{var r=n(45386),a=n(87064),o=n(59950);e.exports=function(e,t,n,i,s,l){var u=1&n,c=e.length,d=t.length;if(c!=d&&!(u&&d>c))return!1;var f=l.get(e),h=l.get(t);if(f&&h)return f==t&&h==e;var p=-1,v=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p<c;){var m=e[p],y=t[p];if(i)var b=u?i(y,m,p,t,e,l):i(m,y,p,e,t,l);if(void 0!==b){if(b)continue;v=!1;break}if(g){if(!a(t,(function(e,t){if(!o(g,t)&&(m===e||s(m,e,n,i,l)))return g.push(t)}))){v=!1;break}}else if(m!==y&&!s(m,y,n,i,l)){v=!1;break}}return l.delete(e),l.delete(t),v}},11491:(e,t,n)=>{var r=n(50857),a=n(79162),o=n(41225),i=n(74871),s=n(75179),l=n(16909),u=r?r.prototype:void 0,c=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var p=1&r;if(h||(h=l),e.size!=t.size&&!p)return!1;var v=f.get(e);if(v)return v==t;r|=2,f.set(e,t);var g=i(h(e),h(t),r,u,d,f);return f.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},17416:(e,t,n)=>{var r=n(13483),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,i,s){var l=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!l)return!1;for(var d=c;d--;){var f=u[d];if(!(l?f in t:a.call(t,f)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=l;++d<c;){var m=e[f=u[d]],y=t[f];if(o)var b=l?o(y,m,f,t,e,s):o(m,y,f,e,t,s);if(!(void 0===b?m===y||i(m,y,n,o,s):b)){v=!1;break}g||(g="constructor"==f)}if(v&&!g){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return s.delete(e),s.delete(t),v}},29097:(e,t,n)=>{var r=n(35676),a=n(43114),o=n(75251);e.exports=function(e){return o(a(e,void 0,r),e+"")}},51242:e=>{var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},13483:(e,t,n)=>{var r=n(1897),a=n(80633),o=n(90249);e.exports=function(e){return r(e,o,a)}},76939:(e,t,n)=>{var r=n(1897),a=n(12680),o=n(18582);e.exports=function(e){return r(e,o,a)}},27937:(e,t,n)=>{var r=n(98304);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},49882:(e,t,n)=>{var r=n(28792),a=n(90249);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var o=t[n],i=e[o];t[n]=[o,i,r(i)]}return t}},38761:(e,t,n)=>{var r=n(6840),a=n(98109);e.exports=function(e,t){var n=a(e,t);return r(n)?n:void 0}},47353:(e,t,n)=>{var r=n(60241)(Object.getPrototypeOf,Object);e.exports=r},62107:(e,t,n)=>{var r=n(50857),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var a=i.call(e);return r&&(t?e[s]=n:delete e[s]),a}},80633:(e,t,n)=>{var r=n(67552),a=n(30981),o=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(e){return null==e?[]:(e=Object(e),r(i(e),(function(t){return o.call(e,t)})))}:a;e.exports=s},12680:(e,t,n)=>{var r=n(65067),a=n(47353),o=n(80633),i=n(30981),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=a(e);return t}:i;e.exports=s},70940:(e,t,n)=>{var r=n(39515),a=n(10326),o=n(52760),i=n(2143),s=n(93215),l=n(53366),u=n(87035),c="[object Map]",d="[object Promise]",f="[object Set]",h="[object WeakMap]",p="[object DataView]",v=u(r),g=u(a),m=u(o),y=u(i),b=u(s),w=l;(r&&w(new r(new ArrayBuffer(1)))!=p||a&&w(new a)!=c||o&&w(o.resolve())!=d||i&&w(new i)!=f||s&&w(new s)!=h)&&(w=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case v:return p;case g:return c;case m:return d;case y:return f;case b:return h}return t}),e.exports=w},98109:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},1369:(e,t,n)=>{var r=n(17297),a=n(79631),o=n(86152),i=n(39045),s=n(61158),l=n(33812);e.exports=function(e,t,n){for(var u=-1,c=(t=r(t,e)).length,d=!1;++u<c;){var f=l(t[u]);if(!(d=null!=e&&n(e,f)))break;e=e[f]}return d||++u!=c?d:!!(c=null==e?0:e.length)&&s(c)&&i(f,c)&&(o(e)||a(e))}},33880:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},52118:(e,t,n)=>{var r=n(99191);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},96909:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},98138:(e,t,n)=>{var r=n(99191),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},4174:(e,t,n)=>{var r=n(99191),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},7942:(e,t,n)=>{var r=n(99191);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},99917:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},8222:(e,t,n)=>{var r=n(79882),a=n(34727),o=n(96058),i=n(70169),s=n(6190);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return a(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return o(e);case"[object Symbol]":return i(e)}}},78725:(e,t,n)=>{var r=n(39413),a=n(47353),o=n(16001);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(a(e))}},95882:(e,t,n)=>{var r=n(50857),a=n(79631),o=n(86152),i=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||a(e)||!!(i&&e&&e[i])}},39045:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},82406:(e,t,n)=>{var r=n(41225),a=n(67878),o=n(39045),i=n(29259);e.exports=function(e,t,n){if(!i(n))return!1;var s=typeof t;return!!("number"==s?a(n)&&o(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},21401:(e,t,n)=>{var r=n(86152),a=n(4795),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||(i.test(e)||!o.test(e)||null!=t&&e in Object(t))}},98304:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},47394:(e,t,n)=>{var r,a=n(24019),o=(r=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},16001:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},28792:(e,t,n)=>{var r=n(29259);e.exports=function(e){return e==e&&!r(e)}},3945:e=>{e.exports=function(){this.__data__=[],this.size=0}},21846:(e,t,n)=>{var r=n(22218),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)}},88028:(e,t,n)=>{var r=n(22218);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},72344:(e,t,n)=>{var r=n(22218);e.exports=function(e){return r(this.__data__,e)>-1}},94769:(e,t,n)=>{var r=n(22218);e.exports=function(e,t){var n=this.__data__,a=r(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},92411:(e,t,n)=>{var r=n(89612),a=n(80235),o=n(10326);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||a),string:new r}}},36417:(e,t,n)=>{var r=n(27937);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},86928:(e,t,n)=>{var r=n(27937);e.exports=function(e){return r(this,e).get(e)}},79493:(e,t,n)=>{var r=n(27937);e.exports=function(e){return r(this,e).has(e)}},24150:(e,t,n)=>{var r=n(27937);e.exports=function(e,t){var n=r(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},75179:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},73477:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},77777:(e,t,n)=>{var r=n(30733);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},99191:(e,t,n)=>{var r=n(38761)(Object,"create");e.exports=r},54248:(e,t,n)=>{var r=n(60241)(Object.keys,Object);e.exports=r},62966:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},4146:(e,t,n)=>{e=n.nmd(e);var r=n(51242),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a&&r.process,s=function(){try{var e=o&&o.require&&o.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(t){}}();e.exports=s},37157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},60241:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},43114:(e,t,n)=>{var r=n(49432),a=Math.max;e.exports=function(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var o=arguments,i=-1,s=a(o.length-t,0),l=Array(s);++i<s;)l[i]=o[t+i];i=-1;for(var u=Array(t+1);++i<t;)u[i]=o[i];return u[t]=n(l),r(e,this,u)}}},37772:(e,t,n)=>{var r=n(51242),a="object"==typeof self&&self&&self.Object===Object&&self,o=r||a||Function("return this")();e.exports=o},52434:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},52842:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},52482:e=>{e.exports=function(e){return this.__data__.has(e)}},16909:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},75251:(e,t,n)=>{var r=n(86532),a=n(97787)(r);e.exports=a},97787:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var a=t(),o=16-(a-r);if(r=a,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},15243:(e,t,n)=>{var r=n(80235);e.exports=function(){this.__data__=new r,this.size=0}},72858:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},4417:e=>{e.exports=function(e){return this.__data__.get(e)}},8605:e=>{e.exports=function(e){return this.__data__.has(e)}},71418:(e,t,n)=>{var r=n(80235),a=n(10326),o=n(96738);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!a||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(i)}return n.set(e,t),this.size=n.size,this}},66024:e=>{e.exports=function(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}},82302:(e,t,n)=>{var r=n(8589),a=n(33880),o=n(35555);e.exports=function(e){return a(e)?o(e):r(e)}},54452:(e,t,n)=>{var r=n(77777),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,i=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,r,a){t.push(r?a.replace(o,"$1"):n||e)})),t}));e.exports=i},33812:(e,t,n)=>{var r=n(4795);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},87035:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},52153:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},35555:e=>{var t="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+n+"|"+r+")"+"?",l="[\\ufe0e\\ufe0f]?",u=l+s+("(?:\\u200d(?:"+[a,o,i].join("|")+")"+l+s+")*"),c="(?:"+[a+n+"?",n,o,i,t].join("|")+")",d=RegExp(r+"(?="+r+")|"+c+u,"g");e.exports=function(e){for(var t=d.lastIndex=0;d.test(e);)++t;return t}},54004:(e,t,n)=>{var r=n(18874);e.exports=function(e){return r(e,4)}},9850:(e,t,n)=>{var r=n(18874);e.exports=function(e){return r(e,5)}},86874:e=>{e.exports=function(e){return function(){return e}}},84573:(e,t,n)=>{var r=n(36060),a=n(41225),o=n(82406),i=n(18582),s=Object.prototype,l=s.hasOwnProperty,u=r((function(e,t){e=Object(e);var n=-1,r=t.length,u=r>2?t[2]:void 0;for(u&&o(t[0],t[1],u)&&(r=1);++n<r;)for(var c=t[n],d=i(c),f=-1,h=d.length;++f<h;){var p=d[f],v=e[p];(void 0===v||a(v,s[p])&&!l.call(e,p))&&(e[p]=c[p])}return e}));e.exports=u},79421:(e,t,n)=>{e.exports=n(59756)},41225:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},90882:(e,t,n)=>{var r=n(67552),a=n(98043),o=n(68286),i=n(86152);e.exports=function(e,t){return(i(e)?r:a)(e,o(t,3))}},55281:(e,t,n)=>{var r=n(98776)(n(12982));e.exports=r},12982:(e,t,n)=>{var r=n(21359),a=n(68286),o=n(38101),i=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:o(n);return l<0&&(l=i(s+l,0)),r(e,a(t,3),l)}},35676:(e,t,n)=>{var r=n(62034);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},59756:(e,t,n)=>{var r=n(72517),a=n(24303),o=n(89419),i=n(86152);e.exports=function(e,t){return(i(e)?r:a)(e,o(t))}},20792:(e,t,n)=>{var r=n(15308),a=n(89419),o=n(18582);e.exports=function(e,t){return null==e?e:r(e,a(t),o)}},72579:(e,t,n)=>{var r=n(13324);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},93352:(e,t,n)=>{var r=n(32726),a=n(1369);e.exports=function(e,t){return null!=e&&a(e,t,r)}},95041:(e,t,n)=>{var r=n(20187),a=n(1369);e.exports=function(e,t){return null!=e&&a(e,t,r)}},23059:e=>{e.exports=function(e){return e}},79631:(e,t,n)=>{var r=n(15183),a=n(15125),o=Object.prototype,i=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return a(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},86152:e=>{var t=Array.isArray;e.exports=t},67878:(e,t,n)=>{var r=n(61049),a=n(61158);e.exports=function(e){return null!=e&&a(e.length)&&!r(e)}},93746:(e,t,n)=>{var r=n(67878),a=n(15125);e.exports=function(e){return a(e)&&r(e)}},73226:(e,t,n)=>{e=n.nmd(e);var r=n(37772),a=n(36330),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||a;e.exports=l},45455:(e,t,n)=>{var r=n(86411),a=n(70940),o=n(79631),i=n(86152),s=n(67878),l=n(73226),u=n(16001),c=n(77598),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||o(e)))return!e.length;var t=a(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},61049:(e,t,n)=>{var r=n(53366),a=n(29259);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},61158:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},4714:(e,t,n)=>{var r=n(74511),a=n(47826),o=n(4146),i=o&&o.isMap,s=i?a(i):r;e.exports=s},29259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},15125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},97030:(e,t,n)=>{var r=n(53366),a=n(47353),o=n(15125),i=Function.prototype,s=Object.prototype,l=i.toString,u=s.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=a(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},43679:(e,t,n)=>{var r=n(8109),a=n(47826),o=n(4146),i=o&&o.isSet,s=i?a(i):r;e.exports=s},85505:(e,t,n)=>{var r=n(53366),a=n(86152),o=n(15125);e.exports=function(e){return"string"==typeof e||!a(e)&&o(e)&&"[object String]"==r(e)}},4795:(e,t,n)=>{var r=n(53366),a=n(15125);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},77598:(e,t,n)=>{var r=n(35522),a=n(47826),o=n(4146),i=o&&o.isTypedArray,s=i?a(i):r;e.exports=s},84336:e=>{e.exports=function(e){return void 0===e}},90249:(e,t,n)=>{var r=n(1634),a=n(86411),o=n(67878);e.exports=function(e){return o(e)?r(e):a(e)}},18582:(e,t,n)=>{var r=n(1634),a=n(18390),o=n(67878);e.exports=function(e){return o(e)?r(e,!0):a(e)}},56974:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},16760:(e,t,n)=>{var r=n(50343),a=n(68286),o=n(93401),i=n(86152);e.exports=function(e,t){return(i(e)?r:o)(e,a(t,3))}},34519:(e,t,n)=>{var r=n(13940),a=n(26548),o=n(68286);e.exports=function(e,t){var n={};return t=o(t,3),a(e,(function(e,a,o){r(n,a,t(e,a,o))})),n}},71644:(e,t,n)=>{var r=n(2229),a=n(84134),o=n(23059);e.exports=function(e){return e&&e.length?r(e,o,a):void 0}},30733:(e,t,n)=>{var r=n(96738);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},98537:(e,t,n)=>{var r=n(84565),a=n(97263)((function(e,t,n){r(e,t,n)}));e.exports=a},65680:(e,t,n)=>{var r=n(2229),a=n(17606),o=n(23059);e.exports=function(e){return e&&e.length?r(e,o,a):void 0}},10937:(e,t,n)=>{var r=n(2229),a=n(68286),o=n(17606);e.exports=function(e,t){return e&&e.length?r(e,a(t,2),o):void 0}},34291:e=>{e.exports=function(){}},61100:(e,t,n)=>{var r=n(37772);e.exports=function(){return r.Date.now()}},13888:(e,t,n)=>{var r=n(92602),a=n(29097)((function(e,t){return null==e?{}:r(e,t)}));e.exports=a},65798:(e,t,n)=>{var r=n(20256),a=n(82952),o=n(21401),i=n(33812);e.exports=function(e){return o(e)?r(i(e)):a(e)}},2689:(e,t,n)=>{var r=n(82941)();e.exports=r},58215:(e,t,n)=>{var r=n(81207),a=n(24303),o=n(68286),i=n(5877),s=n(86152);e.exports=function(e,t,n){var l=s(e)?r:i,u=arguments.length<3;return l(e,o(t,4),n,u,a)}},36402:(e,t,n)=>{var r=n(86411),a=n(70940),o=n(67878),i=n(85505),s=n(82302);e.exports=function(e){if(null==e)return 0;if(o(e))return i(e)?s(e):e.length;var t=a(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},829:(e,t,n)=>{var r=n(62034),a=n(23813),o=n(36060),i=n(82406),s=o((function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),a(e,r(t,1),[])}));e.exports=s},30981:e=>{e.exports=function(){return[]}},36330:e=>{e.exports=function(){return!1}},5707:(e,t,n)=>{var r=n(7642),a=1/0;e.exports=function(e){return e?(e=r(e))===a||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},38101:(e,t,n)=>{var r=n(5707);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},7642:(e,t,n)=>{var r=n(51704),a=n(29259),o=n(4795),i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}},63329:(e,t,n)=>{var r=n(752),a=n(18582);e.exports=function(e){return r(e,a(e))}},66188:(e,t,n)=>{var r=n(1054);e.exports=function(e){return null==e?"":r(e)}},89466:(e,t,n)=>{var r=n(72517),a=n(39413),o=n(26548),i=n(68286),s=n(47353),l=n(86152),u=n(73226),c=n(61049),d=n(29259),f=n(77598);e.exports=function(e,t,n){var h=l(e),p=h||u(e)||f(e);if(t=i(t,4),null==n){var v=e&&e.constructor;n=p?h?new v:[]:d(e)&&c(v)?a(s(e)):{}}return(p?r:o)(e,(function(e,r,a){return t(n,e,r,a)})),n}},26139:(e,t,n)=>{var r=n(62034),a=n(36060),o=n(67326),i=n(93746),s=a((function(e){return o(r(e,1,i,!0))}));e.exports=s},74930:(e,t,n)=>{var r=n(66188),a=0;e.exports=function(e){var t=++a;return r(e)+t}},98346:(e,t,n)=>{var r=n(50753),a=n(90249);e.exports=function(e){return null==e?[]:r(e,a(e))}},46150:(e,t,n)=>{var r=n(60091),a=n(40509);e.exports=function(e,t){return a(e||[],t||[],r)}},37320:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),u=1;u<arguments.length;u++){for(var c in i=Object(arguments[u]))n.call(i,c)&&(l[c]=i[c]);if(t){s=t(i);for(var d=0;d<s.length;d++)r.call(i,s[d])&&(l[s[d]]=i[s[d]])}}return l}},12139:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Children:()=>V,Component:()=>i.wA,Fragment:()=>i.HY,PureComponent:()=>D,StrictMode:()=>we,Suspense:()=>G,SuspenseList:()=>U,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>de,cloneElement:()=>ve,createContext:()=>i.kr,createElement:()=>i.az,createFactory:()=>he,createPortal:()=>K,createRef:()=>i.Vf,default:()=>xe,findDOMNode:()=>me,flushSync:()=>be,forwardRef:()=>I,hydrate:()=>ne,isValidElement:()=>pe,lazy:()=>Y,memo:()=>A,render:()=>te,unmountComponentAtNode:()=>ge,unstable_batchedUpdates:()=>ye,useCallback:()=>E,useContext:()=>_,useDebugValue:()=>k,useEffect:()=>m,useErrorBoundary:()=>C,useImperativeHandle:()=>w,useLayoutEffect:()=>y,useMemo:()=>x,useReducer:()=>g,useRef:()=>b,useState:()=>v,version:()=>fe});var r,a,o,i=n(33847),s=0,l=[],u=i.YM.__b,c=i.YM.__r,d=i.YM.diffed,f=i.YM.__c,h=i.YM.unmount;function p(e,t){i.YM.__h&&i.YM.__h(a,e,s||t),s=0;var n=a.__H||(a.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function v(e){return s=1,g(j,e)}function g(e,t,n){var o=p(r++,2);return o.t=e,o.__c||(o.__=[n?n(t):j(void 0,t),function(e){var t=o.t(o.__[0],e);o.__[0]!==t&&(o.__=[t,o.__[1]],o.__c.setState({}))}],o.__c=a),o.__}function m(e,t){var n=p(r++,3);!i.YM.__s&&M(n.__H,t)&&(n.__=e,n.__H=t,a.__H.__h.push(n))}function y(e,t){var n=p(r++,4);!i.YM.__s&&M(n.__H,t)&&(n.__=e,n.__H=t,a.__h.push(n))}function b(e){return s=5,x((function(){return{current:e}}),[])}function w(e,t,n){s=6,y((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function x(e,t){var n=p(r++,7);return M(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function E(e,t){return s=8,x((function(){return e}),t)}function _(e){var t=a.context[e.__c],n=p(r++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(a)),t.props.value):e.__}function k(e,t){i.YM.useDebugValue&&i.YM.useDebugValue(t?t(e):e)}function C(e){var t=p(r++,10),n=v();return t.__=e,a.componentDidCatch||(a.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function S(){var e;for(l.sort((function(e,t){return e.__v.__b-t.__v.__b}));e=l.pop();)if(e.__P)try{e.__H.__h.forEach(P),e.__H.__h.forEach(O),e.__H.__h=[]}catch(a){e.__H.__h=[],i.YM.__e(a,e.__v)}}i.YM.__b=function(e){a=null,u&&u(e)},i.YM.__r=function(e){c&&c(e),r=0;var t=(a=e.__c).__H;t&&(t.__h.forEach(P),t.__h.forEach(O),t.__h=[])},i.YM.diffed=function(e){d&&d(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==l.push(t)&&o===i.YM.requestAnimationFrame||((o=i.YM.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),R&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);R&&(t=requestAnimationFrame(n))})(S)),a=null},i.YM.__c=function(e,t){t.some((function(e){try{e.__h.forEach(P),e.__h=e.__h.filter((function(e){return!e.__||O(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],i.YM.__e(o,e.__v)}})),f&&f(e,t)},i.YM.unmount=function(e){h&&h(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{P(e)}catch(e){t=e}})),t&&i.YM.__e(t,n.__v))};var R="function"==typeof requestAnimationFrame;function P(e){var t=a,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),a=t}function O(e){var t=a;e.__c=e.__(),a=t}function M(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function j(e,t){return"function"==typeof t?t(e):t}function z(e,t){for(var n in t)e[n]=t[n];return e}function T(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function D(e){this.props=e}function A(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:T(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,i.az)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(D.prototype=new i.wA).isPureReactComponent=!0,D.prototype.shouldComponentUpdate=function(e,t){return T(this.props,e)||T(this.state,t)};var B=i.YM.__b;i.YM.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),B&&B(e)};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function I(e){function t(t,n){var r=z({},t);return delete r.ref,e(r,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=N,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var L=function(e,t){return null==e?null:(0,i.bR)((0,i.bR)(e).map(t))},V={map:L,forEach:L,count:function(e){return e?(0,i.bR)(e).length:0},only:function(e){var t=(0,i.bR)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:i.bR},F=i.YM.__e;i.YM.__e=function(e,t,n){if(e.then)for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);F(e,t,n)};var H=i.YM.unmount;function G(){this.__u=0,this.t=null,this.__b=null}function q(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function Y(e){var t,n,r;function a(a){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,i.az)(n,a)}return a.displayName="Lazy",a.__f=!0,a}function U(){this.u=null,this.o=null}i.YM.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),H&&H(e)},(G.prototype=new i.wA).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var a=q(r.__v),o=!1,i=function(){o||(o=!0,n.__R=null,a?a(s):s())};n.__R=i;var s=function(){if(!--r.__u){if(r.state.__e){var e=r.state.__e;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__e:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(i,i)},G.prototype.componentWillUnmount=function(){this.t=[]},G.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=z({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var a=t.__e&&(0,i.az)(i.HY,null,e.fallback);return a&&(a.__h=null),[(0,i.az)(i.HY,null,t.__e?null:e.children),a]};var W=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function $(e){return this.getChildContext=function(){return e.context},e.children}function X(e){var t=this,n=e.i;t.componentWillUnmount=function(){(0,i.sY)(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),(0,i.sY)((0,i.az)($,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function K(e,t){return(0,i.az)(X,{__v:e,i:t})}(U.prototype=new i.wA).__e=function(e){var t=this,n=q(t.__v),r=t.o.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),W(t,e,r)):a()};n?n(o):o()}},U.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,i.bR)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},U.prototype.componentDidUpdate=U.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){W(e,n,t)}))};var Z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Q=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J="undefined"!=typeof document,ee=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function te(e,t,n){return null==t.__k&&(t.textContent=""),(0,i.sY)(e,t),"function"==typeof n&&n(),e?e.__c:null}function ne(e,t,n){return(0,i.ZB)(e,t),"function"==typeof n&&n(),e?e.__c:null}i.wA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(i.wA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var re=i.YM.event;function ae(){}function oe(){return this.cancelBubble}function ie(){return this.defaultPrevented}i.YM.event=function(e){return re&&(e=re(e)),e.persist=ae,e.isPropagationStopped=oe,e.isDefaultPrevented=ie,e.nativeEvent=e};var se,le={configurable:!0,get:function(){return this.class}},ue=i.YM.vnode;i.YM.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var a=-1===t.indexOf("-");for(var o in r={},n){var s=n[o];J&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==s||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!ee(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():a&&Q.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===s&&(s=void 0),r[o]=s)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,i.bR)(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=(0,i.bR)(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(le.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",le))}e.$$typeof=Z,ue&&ue(e)};var ce=i.YM.__r;i.YM.__r=function(e){ce&&ce(e),se=e.__c};var de={ReactCurrentDispatcher:{current:{readContext:function(e){return se.__n[e.__c].props.value}}}},fe="17.0.2";function he(e){return i.az.bind(null,e)}function pe(e){return!!e&&e.$$typeof===Z}function ve(e){return pe(e)?i.Tm.apply(null,arguments):e}function ge(e){return!!e.__k&&((0,i.sY)(null,e),!0)}function me(e){return e&&(e.base||1===e.nodeType&&e)||null}var ye=function(e,t){return e(t)},be=function(e,t){return e(t)},we=i.HY;const xe={useState:v,useReducer:g,useEffect:m,useLayoutEffect:y,useRef:b,useImperativeHandle:w,useMemo:x,useCallback:E,useContext:_,useDebugValue:k,version:"17.0.2",Children:V,render:te,hydrate:ne,unmountComponentAtNode:ge,createPortal:K,createElement:i.az,createContext:i.kr,createFactory:he,cloneElement:ve,createRef:i.Vf,Fragment:i.HY,isValidElement:pe,findDOMNode:me,Component:i.wA,PureComponent:D,memo:A,forwardRef:I,flushSync:be,unstable_batchedUpdates:ye,StrictMode:i.HY,Suspense:G,SuspenseList:U,lazy:Y,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:de}},33847:(e,t,n)=>{"use strict";n.d(t,{HY:()=>y,Tm:()=>V,Vf:()=>m,YM:()=>a,ZB:()=>L,az:()=>v,bR:()=>S,kr:()=>F,sY:()=>I,wA:()=>b});var r,a,o,i,s,l,u,c={},d=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(e,t){for(var n in t)e[n]=t[n];return e}function p(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var a,o,i,s={};for(i in t)"key"==i?a=t[i]:"ref"==i?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return g(e,s,a,o,null)}function g(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++o:i};return null==i&&null!=a.vnode&&a.vnode(s),s}function m(){return{current:null}}function y(e){return e.children}function b(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?w(e):null}function x(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return x(e)}}function E(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!_.__r++||l!==a.debounceRendering)&&((l=a.debounceRendering)||s)(_)}function _(){for(var e;_.__r=i.length;)e=i.sort((function(e,t){return e.__v.__b-t.__v.__b})),i=[],e.some((function(e){var t,n,r,a,o,i;e.__d&&(o=(a=(t=e).__v).__e,(i=t.__P)&&(n=[],(r=h({},a)).__v=a.__v+1,z(i,a,r,t.__n,void 0!==i.ownerSVGElement,null!=a.__h?[o]:null,n,null==o?w(a):o,a.__h),T(n,a),a.__e!=o&&x(a)))}))}function k(e,t,n,r,a,o,i,s,l,u){var f,h,p,v,m,b,x,E=r&&r.__k||d,_=E.length;for(n.__k=[],f=0;f<t.length;f++)if(null!=(v=n.__k[f]=null==(v=t[f])||"boolean"==typeof v?null:"string"==typeof v||"number"==typeof v||"bigint"==typeof v?g(null,v,null,null,v):Array.isArray(v)?g(y,{children:v},null,null,null):v.__b>0?g(v.type,v.props,v.key,null,v.__v):v)){if(v.__=n,v.__b=n.__b+1,null===(p=E[f])||p&&v.key==p.key&&v.type===p.type)E[f]=void 0;else for(h=0;h<_;h++){if((p=E[h])&&v.key==p.key&&v.type===p.type){E[h]=void 0;break}p=null}z(e,v,p=p||c,a,o,i,s,l,u),m=v.__e,(h=v.ref)&&p.ref!=h&&(x||(x=[]),p.ref&&x.push(p.ref,null,v),x.push(h,v.__c||m,v)),null!=m?(null==b&&(b=m),"function"==typeof v.type&&v.__k===p.__k?v.__d=l=C(v,l,e):l=R(e,v,p,E,m,l),"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=w(p))}for(n.__e=b,f=_;f--;)null!=E[f]&&("function"==typeof n.type&&null!=E[f].__e&&E[f].__e==n.__d&&(n.__d=w(r,f+1)),B(E[f],E[f]));if(x)for(f=0;f<x.length;f++)A(x[f],x[++f],x[++f])}function C(e,t,n){for(var r,a=e.__k,o=0;a&&o<a.length;o++)(r=a[o])&&(r.__=e,t="function"==typeof r.type?C(r,t,n):R(n,r,r,a,r.__e,t));return t}function S(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){S(e,t)})):t.push(e)),t}function R(e,t,n,r,a,o){var i,s,l;if(void 0!==t.__d)i=t.__d,t.__d=void 0;else if(null==n||a!=o||null==a.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(a),i=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=2)if(s==a)break e;e.insertBefore(a,o),i=o}return void 0!==i?i:a.nextSibling}function P(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||f.test(t)?n:n+"px"}function O(e,t,n,r,a){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||P(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||P(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?j:M,o):e.removeEventListener(t,o?j:M,o);else if("dangerouslySetInnerHTML"!==t){if(a)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function M(e){this.l[e.type+!1](a.event?a.event(e):e)}function j(e){this.l[e.type+!0](a.event?a.event(e):e)}function z(e,t,n,r,o,i,s,l,u){var c,d,f,p,v,g,m,w,x,E,_,C=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,l=t.__e=n.__e,t.__h=null,i=[l]),(c=a.__b)&&c(t);try{e:if("function"==typeof C){if(w=t.props,x=(c=C.contextType)&&r[c.__c],E=c?x?x.props.value:c.__:r,n.__c?m=(d=t.__c=n.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(w,E):(t.__c=d=new b(w,E),d.constructor=C,d.render=N),x&&x.sub(d),d.props=w,d.state||(d.state={}),d.context=E,d.__n=r,f=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=h({},d.__s)),h(d.__s,C.getDerivedStateFromProps(w,d.__s))),p=d.props,v=d.state,f)null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==C.getDerivedStateFromProps&&w!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(w,E),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(w,d.__s,E)||t.__v===n.__v){d.props=w,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(w,d.__s,E),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,v,g)}))}d.context=E,d.props=w,d.state=d.__s,(c=a.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(r=h(h({},r),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,v)),_=null!=c&&c.type===y&&null==c.key?c.props.children:c,k(e,Array.isArray(_)?_:[_],t,n,r,o,i,s,l,u),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),m&&(d.__E=d.__=null),d.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=D(n.__e,t,n,r,o,i,s,u);(c=a.diffed)&&c(t)}catch(e){t.__v=null,(u||null!=i)&&(t.__e=l,t.__h=!!u,i[i.indexOf(l)]=null),a.__e(e,t,n)}}function T(e,t){a.__c&&a.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){a.__e(e,t.__v)}}))}function D(e,t,n,a,o,i,s,l){var u,d,f,h=n.props,v=t.props,g=t.type,m=0;if("svg"===g&&(o=!0),null!=i)for(;m<i.length;m++)if((u=i[m])&&"setAttribute"in u==!!g&&(g?u.localName===g:3===u.nodeType)){e=u,i[m]=null;break}if(null==e){if(null===g)return document.createTextNode(v);e=o?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,v.is&&v),i=null,l=!1}if(null===g)h===v||l&&e.data===v||(e.data=v);else{if(i=i&&r.call(e.childNodes),d=(h=n.props||c).dangerouslySetInnerHTML,f=v.dangerouslySetInnerHTML,!l){if(null!=i)for(h={},m=0;m<e.attributes.length;m++)h[e.attributes[m].name]=e.attributes[m].value;(f||d)&&(f&&(d&&f.__html==d.__html||f.__html===e.innerHTML)||(e.innerHTML=f&&f.__html||""))}if(function(e,t,n,r,a){var o;for(o in n)"children"===o||"key"===o||o in t||O(e,o,null,n[o],r);for(o in t)a&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||O(e,o,t[o],n[o],r)}(e,v,h,o,l),f)t.__k=[];else if(m=t.props.children,k(e,Array.isArray(m)?m:[m],t,n,a,o&&"foreignObject"!==g,i,s,i?i[0]:n.__k&&w(n,0),l),null!=i)for(m=i.length;m--;)null!=i[m]&&p(i[m]);l||("value"in v&&void 0!==(m=v.value)&&(m!==h.value||m!==e.value||"progress"===g&&!m)&&O(e,"value",m,h.value,!1),"checked"in v&&void 0!==(m=v.checked)&&m!==e.checked&&O(e,"checked",m,h.checked,!1))}return e}function A(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){a.__e(e,n)}}function B(e,t,n){var r,o;if(a.unmount&&a.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||A(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){a.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&B(r[o],t,"function"!=typeof e.type);n||null==e.__e||p(e.__e),e.__e=e.__d=void 0}function N(e,t,n){return this.constructor(e,n)}function I(e,t,n){var o,i,s;a.__&&a.__(e,t),i=(o="function"==typeof n)?null:n&&n.__k||t.__k,s=[],z(t,e=(!o&&n||t).__k=v(y,null,[e]),i||c,c,void 0!==t.ownerSVGElement,!o&&n?[n]:i?null:t.firstChild?r.call(t.childNodes):null,s,!o&&n?n:i?i.__e:t.firstChild,o),T(s,e)}function L(e,t){I(e,t,L)}function V(e,t,n){var a,o,i,s=h({},e.props);for(i in t)"key"==i?a=t[i]:"ref"==i?o=t[i]:s[i]=t[i];return arguments.length>2&&(s.children=arguments.length>3?r.call(arguments,2):n),g(e.type,s,a||e.key,o||e.ref,null)}function F(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(E)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}r=d.slice,a={__e:function(e,t){for(var n,r,a;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),a=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),a=n.__d),a)return n.__E=n}catch(t){e=t}throw e}},o=0,b.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},n),this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),E(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),E(this))},b.prototype.render=y,i=[],s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,_.__r=0,u=0},48186:(e,t,n)=>{"use strict";var r=n(37320),a=n(12139);t.useSubscription=function(e){var t=e.getCurrentValue,n=e.subscribe,o=a.useState((function(){return{getCurrentValue:t,subscribe:n,value:t()}}));e=o[0];var i=o[1];return o=e.value,e.getCurrentValue===t&&e.subscribe===n||(o=t(),i({getCurrentValue:t,subscribe:n,value:o})),a.useDebugValue(o),a.useEffect((function(){function e(){if(!a){var e=t();i((function(a){return a.getCurrentValue!==t||a.subscribe!==n||a.value===e?a:r({},a,{value:e})}))}}var a=!1,o=n(e);return e(),function(){a=!0,o()}}),[t,n]),o}},36718:(e,t,n)=>{"use strict";e.exports=n(48186)},78376:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ActionTypes:()=>o,Interpreter:()=>bt,InterpreterStatus:()=>mt,Machine:()=>Ot,SpecialTargets:()=>i,State:()=>ot,StateNode:()=>Pt,actions:()=>a,assign:()=>At,createMachine:()=>Mt,createSchema:()=>Tt,doneInvoke:()=>Vt,forwardTo:()=>Lt,interpret:()=>xt,mapState:()=>jt,matchState:()=>zt,matchesState:()=>T,send:()=>Bt,sendParent:()=>Nt,sendUpdate:()=>It,spawn:()=>wt,spawnBehavior:()=>gt,t:()=>Dt,toActorRef:()=>Ue,toEventObject:()=>ae,toObserver:()=>ue,toSCXMLEvent:()=>oe});var r={};n.r(r),n.d(r,{after:()=>w,assign:()=>b,cancel:()=>m,choose:()=>O,doneState:()=>x,error:()=>R,errorExecution:()=>C,errorPlatform:()=>S,init:()=>_,invoke:()=>k,log:()=>E,nullEvent:()=>y,pure:()=>M,raise:()=>v,send:()=>g,start:()=>h,stop:()=>p,update:()=>P});var a={};n.r(a),n.d(a,{actionTypes:()=>r,after:()=>Te,assign:()=>je,cancel:()=>Re,choose:()=>Ve,done:()=>De,doneInvoke:()=>Ae,error:()=>Be,escalate:()=>Le,forwardTo:()=>Ie,getActionFunction:()=>fe,initEvent:()=>de,isActionObject:()=>ze,log:()=>Ce,pure:()=>Ne,raise:()=>ge,resolveActions:()=>Fe,resolveLog:()=>Se,resolveRaise:()=>me,resolveSend:()=>be,resolveStop:()=>Me,respond:()=>_e,send:()=>ye,sendParent:()=>we,sendTo:()=>xe,sendUpdate:()=>Ee,start:()=>Pe,stop:()=>Oe,toActionObject:()=>he,toActionObjects:()=>pe,toActivityDefinition:()=>ve});var o,i,s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},s.apply(this,arguments)};function l(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function u(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function d(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}!function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(o||(o={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(i||(i={}));var f,h=o.Start,p=o.Stop,v=o.Raise,g=o.Send,m=o.Cancel,y=o.NullEvent,b=o.Assign,w=o.After,x=o.DoneState,E=o.Log,_=o.Init,k=o.Invoke,C=o.ErrorExecution,S=o.ErrorPlatform,R=o.ErrorCustom,P=o.Update,O=o.Choose,M=o.Pure,j={},z="xstate.guard";function T(e,t,n){void 0===n&&(n=".");var r=B(e,n),a=B(t,n);return J(a)?!!J(r)&&a===r:J(r)?r in a:Object.keys(r).every((function(e){return e in a&&T(r[e],a[e])}))}function D(e){try{return J(e)||"number"==typeof e?"".concat(e):e.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function A(e,t){try{return Z(e)?e:e.toString().split(t)}catch(n){throw new Error("'".concat(e,"' is not a valid state path."))}}function B(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:Z(e)?N(e):"string"!=typeof e?e:N(A(e,t));var n}function N(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function I(e,t){for(var n={},r=Object.keys(e),a=0;a<r.length;a++){var o=r[a];n[o]=t(e[o],o,e,a)}return n}function L(e,t,n){var r,a,o={};try{for(var i=u(Object.keys(e)),s=i.next();!s.done;s=i.next()){var l=s.value,c=e[l];n(c)&&(o[l]=t(c,l,e))}}catch(d){r={error:d}}finally{try{s&&!s.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}var V=function(e){return function(t){var n,r,a=t;try{for(var o=u(e),i=o.next();!i.done;i=o.next()){a=a[i.value]}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}};function F(e){return e?J(e)?[[e]]:H(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?F(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function H(e){var t;return(t=[]).concat.apply(t,d([],c(e),!1))}function G(e){return Z(e)?e:[e]}function q(e){return void 0===e?[]:G(e)}function Y(e,t,n){var r,a;if(Q(e))return e(t,n.data);var o={};try{for(var i=u(Object.keys(e)),s=i.next();!s.done;s=i.next()){var l=s.value,c=e[l];Q(c)?o[l]=c(t,n.data):o[l]=c}}catch(d){r={error:d}}finally{try{s&&!s.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o}function U(e){return e instanceof Promise||!(null===e||!Q(e)&&"object"!=typeof e||!Q(e.then))}function W(e,t){var n,r,a=c([[],[]],2),o=a[0],i=a[1];try{for(var s=u(e),l=s.next();!l.done;l=s.next()){var d=l.value;t(d)?o.push(d):i.push(d)}}catch(f){n={error:f}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,i]}function $(e,t){return I(e.states,(function(e,n){if(e){var r=(J(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:$(e,r)}}}))}function X(e,t,n,r){var a=e?n.reduce((function(e,n){var a,o,i=n.assignment,s={state:r,action:n,_event:t},l={};if(Q(i))l=i(e,t.data,s);else try{for(var c=u(Object.keys(i)),d=c.next();!d.done;d=c.next()){var f=d.value,h=i[f];l[f]=Q(h)?h(e,t.data,s):h}}catch(p){a={error:p}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}return Object.assign({},e,l)}),e):e;return a}var K=function(){};function Z(e){return Array.isArray(e)}function Q(e){return"function"==typeof e}function J(e){return"string"==typeof e}function ee(e,t){if(e)return J(e)?{type:z,name:e,predicate:t?t[e]:void 0}:Q(e)?{type:z,name:e.name,predicate:e}:e}var te=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();(f={})[te]=function(){return this},f[Symbol.observable]=function(){return this};function ne(e){return!!e&&"__xstatenode"in e}var re=function(){var e=0;return function(){return(++e).toString(16)}}();function ae(e,t){return J(e)||"number"==typeof e?s({type:e},t):e}function oe(e,t){if(!J(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=ae(e);return s({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function ie(e,t){return G(t).map((function(t){return void 0===t||"string"==typeof t||ne(t)?{target:t,event:e}:s(s({},t),{event:e})}))}function se(e,t,n,r,a){var o=e.options.guards,i={state:a,cond:t,_event:r};if(t.type===z)return((null==o?void 0:o[t.name])||t.predicate)(n,r.data,i);var s=null==o?void 0:o[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,r.data,i)}function le(e){return"string"==typeof e?{type:e}:e}function ue(e,t,n){if("object"==typeof e)return e;var r=function(){};return{next:e,error:t||r,complete:n||r}}function ce(e,t){return"".concat(e,":invocation[").concat(t,"]")}var de=oe({type:_});function fe(e,t){return t&&t[e]||void 0}function he(e,t){var n;if(J(e)||"number"==typeof e)n=Q(r=fe(e,t))?{type:e,exec:r}:r||{type:e,exec:void 0};else if(Q(e))n={type:e.name||e.toString(),exec:e};else{var r;if(Q(r=fe(e.type,t)))n=s(s({},e),{exec:r});else if(r){var a=r.type||e.type;n=s(s(s({},r),e),{type:a})}else n=e}return n}var pe=function(e,t){return e?(Z(e)?e:[e]).map((function(e){return he(e,t)})):[]};function ve(e){var t=he(e);return s(s({id:J(e)?e:t.id},t),{type:t.type})}function ge(e){return J(e)?{type:v,event:e}:ye(e,{to:i.Internal})}function me(e){return{type:v,_event:oe(e.event)}}function ye(e,t){return{to:t?t.to:void 0,type:g,event:Q(e)?e:ae(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:Q(e)?e.name:D(e)}}function be(e,t,n,r){var a,o={_event:n},i=oe(Q(e.event)?e.event(t,n.data,o):e.event);if(J(e.delay)){var l=r&&r[e.delay];a=Q(l)?l(t,n.data,o):l}else a=Q(e.delay)?e.delay(t,n.data,o):e.delay;var u=Q(e.to)?e.to(t,n.data,o):e.to;return s(s({},e),{to:u,_event:i,event:i.data,delay:a})}function we(e,t){return ye(e,s(s({},t),{to:i.Parent}))}function xe(e,t,n){return ye(t,s(s({},n),{to:e}))}function Ee(){return we(P)}function _e(e,t){return ye(e,s(s({},t),{to:function(e,t,n){return n._event.origin}}))}var ke=function(e,t){return{context:e,event:t}};function Ce(e,t){return void 0===e&&(e=ke),{type:E,label:t,expr:e}}var Se=function(e,t,n){return s(s({},e),{value:J(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},Re=function(e){return{type:m,sendId:e}};function Pe(e){var t=ve(e);return{type:o.Start,activity:t,exec:void 0}}function Oe(e){var t=Q(e)?e:ve(e);return{type:o.Stop,activity:t,exec:void 0}}function Me(e,t,n){var r=Q(e.activity)?e.activity(t,n.data):e.activity,a="string"==typeof r?{id:r}:r;return{type:o.Stop,activity:a}}var je=function(e){return{type:b,assignment:e}};function ze(e){return"object"==typeof e&&"type"in e}function Te(e,t){var n=t?"#".concat(t):"";return"".concat(o.After,"(").concat(e,")").concat(n)}function De(e,t){var n="".concat(o.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Ae(e,t){var n="".concat(o.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Be(e,t){var n="".concat(o.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function Ne(e){return{type:o.Pure,get:e}}function Ie(e,t){return ye((function(e,t){return t}),s(s({},t),{to:e}))}function Le(e,t){return we((function(t,n,r){return{type:R,data:Q(e)?e(t,n,r):e}}),s(s({},t),{to:i.Parent}))}function Ve(e){return{type:o.Choose,conds:e}}function Fe(e,t,n,r,a,o){void 0===o&&(o=!1);var i=c(o?[[],a]:W(a,(function(e){return e.type===b})),2),l=i[0],u=i[1],f=l.length?X(n,r,l,t):n,h=o?[n]:void 0,m=H(u.map((function(n){var a;switch(n.type){case v:return me(n);case g:var i=be(n,f,r,e.options.delays);return i;case E:return Se(n,f,r);case O:if(!(y=null===(a=n.conds.find((function(n){var a=ee(n.cond,e.options.guards);return!a||se(e,a,f,r,t)})))||void 0===a?void 0:a.actions))return[];var l=c(Fe(e,t,f,r,pe(q(y),e.options.actions),o),2),u=l[0],m=l[1];return f=m,null==h||h.push(f),u;case M:var y;if(!(y=n.get(f,r.data)))return[];var w=c(Fe(e,t,f,r,pe(q(y),e.options.actions),o),2),x=w[0],_=w[1];return f=_,null==h||h.push(f),x;case p:return Me(n,f,r);case b:f=X(f,r,[n],t),null==h||h.push(f);break;default:var k=he(n,e.options.actions),C=k.exec;if(C&&h){var S=h.length-1;k=s(s({},k),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];C.apply(void 0,d([h[S]],c(t),!1))}})}return k}})).filter((function(e){return!!e})));return[m,f]}var He=[],Ge=function(e,t){He.push(e);var n=t(e);return He.pop(),n};function qe(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[te]=function(){return this},t}function Ye(e,t,n){var r=qe(t);if(r.deferred=!0,ne(e)){var a=r.state=Ge(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return a}}return r}function Ue(e){var t;return s(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[te]=function(){return this},t),e)}var We=function(e){return"atomic"===e.type||"final"===e.type};function $e(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function Xe(e){var t=[e];return We(e)?t:t.concat(H($e(e).map(Xe)))}function Ke(e,t){var n,r,a,o,i,s,l,c,d=Qe(new Set(e)),f=new Set(t);try{for(var h=u(f),p=h.next();!p.done;p=h.next())for(var v=(k=p.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}catch(C){n={error:C}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var g=Qe(f);try{for(var m=u(f),y=m.next();!y.done;y=m.next()){if("compound"!==(k=y.value).type||g.get(k)&&g.get(k).length){if("parallel"===k.type)try{for(var b=(i=void 0,u($e(k))),w=b.next();!w.done;w=b.next()){var x=w.value;"history"!==x.type&&(f.has(x)||(f.add(x),d.get(x)?d.get(x).forEach((function(e){return f.add(e)})):x.initialStateNodes.forEach((function(e){return f.add(e)}))))}}catch(S){i={error:S}}finally{try{w&&!w.done&&(s=b.return)&&s.call(b)}finally{if(i)throw i.error}}}else d.get(k)?d.get(k).forEach((function(e){return f.add(e)})):k.initialStateNodes.forEach((function(e){return f.add(e)}))}}catch(R){a={error:R}}finally{try{y&&!y.done&&(o=m.return)&&o.call(m)}finally{if(a)throw a.error}}try{for(var E=u(f),_=E.next();!_.done;_=E.next()){var k;for(v=(k=_.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}}catch(P){l={error:P}}finally{try{_&&!_.done&&(c=E.return)&&c.call(E)}finally{if(l)throw l.error}}return f}function Ze(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(We(r))return r.key}var a={};return n.forEach((function(e){a[e.key]=Ze(e,t)})),a}function Qe(e){var t,n,r=new Map;try{for(var a=u(e),o=a.next();!o.done;o=a.next()){var i=o.value;r.has(i)||r.set(i,[]),i.parent&&(r.has(i.parent)||r.set(i.parent,[]),r.get(i.parent).push(i))}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r}function Je(e,t){return Ze(e,Qe(Ke([e],t)))}function et(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function tt(e,t){return"compound"===t.type?$e(t).some((function(t){return"final"===t.type&&et(e,t)})):"parallel"===t.type&&$e(t).every((function(t){return tt(e,t)}))}function nt(e){return new Set(H(e.map((function(e){return e.tags}))))}function rt(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if(J(e)||J(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return rt(e[n],t[n])}))}function at(e){return"object"==typeof e&&null!==e&&("value"in e&&"_event"in e)}var ot=function(){function e(e){var t,n,r=this;this.actions=[],this.activities=j,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||j,this.meta=(void 0===(n=e.configuration)&&(n=[]),n.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return function(e){return d([],c(new Set(H(d([],c(e.map((function(e){return e.ownEvents}))),!1)))),!1)}(r.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:de,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=de;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),J(e))return[e];var r=Object.keys(e);return r.concat.apply(r,d([],c(r.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=l(e,["configuration","transitions","tags","machine"]);return s(s({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return T(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;K(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}(),it={deferEvents:!1},st=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=s(s({},it),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),lt=new Map,ut=0,ct=function(){return"x:".concat(ut++)},dt=function(e,t){return lt.set(e,t),e},ft=function(e){return lt.get(e)},ht=function(e){lt.delete(e)};function pt(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}function vt(e){if(pt()){var t=function(){var e=pt();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}function gt(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,a=[],o=!1,i=Ue({id:t.id,send:function(t){a.push(t),function(){if(!o){for(o=!0;a.length>0;){var t=a.shift();n=e.transition(n,t,s),r.forEach((function(e){return e.next(n)}))}o=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,a){var o=ue(e,t,a);return r.add(o),o.next(n),{unsubscribe:function(){r.delete(o)}}}}),s={parent:t.parent,self:i,id:t.id||"anonymous",observers:r};return n=e.start?e.start(s):n,i}var mt,yt={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(mt||(mt={}));var bt=function(){function e(t,n){var r=this;void 0===n&&(n=e.defaultOptions),this.machine=t,this.scheduler=new st,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=mt.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(e,t){if(Z(e))return r.batch(e),r.state;var n=oe(ae(e,t));if(r.status===mt.Stopped)return r.state;if(r.status!==mt.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(r.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return r.scheduler.schedule((function(){r.forward(n);var e=r.nextState(n);r.update(e,n)})),r._state},this.sendTo=function(e,t){var n,a=r.parent&&(t===i.Parent||r.parent.id===t),o=a?r.parent:J(t)?r.children.get(t)||ft(t):(n=t)&&"function"==typeof n.send?t:void 0;if(o)"machine"in o?o.send(s(s({},e),{name:e.name===R?"".concat(Be(r.id)):e.name,origin:r.sessionId})):o.send(e.data);else if(!a)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(r.id,"'."))};var a=s(s({},e.defaultOptions),n),o=a.clock,l=a.logger,u=a.parent,c=a.id,d=void 0!==c?c:t.id;this.id=d,this.logger=l,this.clock=o,this.parent=u,this.options=a,this.scheduler=new st({deferEvents:this.options.deferEvents}),this.sessionId=ct()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:Ge(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,r;try{for(var a=u(e.actions),o=a.next();!o.done;o=a.next()){var i=o.value;this.exec(i,e,t)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,r,a,o,i,s,l,c,d=this;if(e._sessionid=this.sessionId,this._state=e,this.options.execute&&this.execute(this.state),this.children.forEach((function(e){d.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var f=u(this.eventListeners),h=f.next();!h.done;h=f.next()){(0,h.value)(e.event)}}catch(_){n={error:_}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}try{for(var p=u(this.listeners),v=p.next();!v.done;v=p.next()){(0,v.value)(e,e.event)}}catch(k){a={error:k}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(a)throw a.error}}try{for(var g=u(this.contextListeners),m=g.next();!m.done;m=g.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(C){i={error:C}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(i)throw i.error}}var y=tt(e.configuration||[],this.machine);if(this.state.configuration&&y){var b=e.configuration.find((function(e){return"final"===e.type&&e.parent===d.machine})),w=b&&b.doneData?Y(b.doneData,e.context,t):void 0;try{for(var x=u(this.doneListeners),E=x.next();!E.done;E=x.next()){(0,E.value)(Ae(this.id,w))}}catch(S){l={error:S}}finally{try{E&&!E.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}this.stop()}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===mt.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r,a=this;if(!e)return{unsubscribe:function(){}};var o=n;return"function"==typeof e?r=e:(r=e.next.bind(e),o=e.complete.bind(e)),this.listeners.add(r),this.status===mt.Running&&r(this.state),o&&this.onDone(o),{unsubscribe:function(){r&&a.listeners.delete(r),o&&a.doneListeners.delete(o)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===mt.Running)return this;this.machine._init(),dt(this.sessionId,this),this.initialized=!0,this.status=mt.Running;var n=void 0===e?this.initialState:Ge(this,(function(){return at(e)?t.machine.resolveState(e):t.machine.resolveState(ot.from(e,t.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,de)})),this},e.prototype.stop=function(){var e,t,n,r,a,o,i,s,l,f,h=this;try{for(var p=u(this.listeners),v=p.next();!v.done;v=p.next()){var g=v.value;this.listeners.delete(g)}}catch(S){e={error:S}}finally{try{v&&!v.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}try{for(var m=u(this.stopListeners),y=m.next();!y.done;y=m.next()){(g=y.value)(),this.stopListeners.delete(g)}}catch(R){n={error:R}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}try{for(var b=u(this.contextListeners),w=b.next();!w.done;w=b.next()){g=w.value;this.contextListeners.delete(g)}}catch(P){a={error:P}}finally{try{w&&!w.done&&(o=b.return)&&o.call(b)}finally{if(a)throw a.error}}try{for(var x=u(this.doneListeners),E=x.next();!E.done;E=x.next()){g=E.value;this.doneListeners.delete(g)}}catch(O){i={error:O}}finally{try{E&&!E.done&&(s=x.return)&&s.call(x)}finally{if(i)throw i.error}}if(!this.initialized)return this;d([],c(this.state.configuration),!1).sort((function(e,t){return t.order-e.order})).forEach((function(e){var t,n;try{for(var r=u(e.definition.exit),a=r.next();!a.done;a=r.next()){var o=a.value;h.exec(o,h.state)}}catch(i){t={error:i}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}})),this.children.forEach((function(e){Q(e.stop)&&e.stop()}));try{for(var _=u(Object.keys(this.delayedEventsMap)),k=_.next();!k.done;k=_.next()){var C=k.value;this.clock.clearTimeout(this.delayedEventsMap[C])}}catch(M){l={error:M}}finally{try{k&&!k.done&&(f=_.return)&&f.call(_)}finally{if(l)throw l.error}}return this.scheduler.clear(),this.initialized=!1,this.status=mt.Stopped,ht(this.sessionId),this},e.prototype.batch=function(e){var t=this;if(this.status===mt.NotStarted&&this.options.deferEvents)0;else if(this.status!==mt.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));this.scheduler.schedule((function(){var n,r,a=t.state,o=!1,i=[],l=function(e){var n=oe(e);t.forward(n),a=Ge(t,(function(){return t.machine.transition(a,n)})),i.push.apply(i,d([],c(a.actions.map((function(e){return n=a,r=(t=e).exec,s(s({},t),{exec:void 0!==r?function(){return r(n.context,n.event,{action:t,state:n,_event:n._event})}:void 0});var t,n,r}))),!1)),o=o||!!a.changed};try{for(var f=u(e),h=f.next();!h.done;h=f.next()){l(h.value)}}catch(p){n={error:p}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}a.changed=o,a.actions=i,t.update(a,oe(e[e.length-1]))}))},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype.nextState=function(e){var t=this,n=oe(e);if(0===n.name.indexOf(S)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(S)})))throw n.data.data;return Ge(this,(function(){return t.machine.transition(t.state,n)}))},e.prototype.forward=function(e){var t,n;try{for(var r=u(this.forwardTo),a=r.next();!a.done;a=r.next()){var o=a.value,i=this.children.get(o);if(!i)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));i.send(e)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this;this.delayedEventsMap[e.id]=this.clock.setTimeout((function(){e.to?t.sendTo(e._event,e.to):t.send(e._event)}),e.delay)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions);var r=t.context,a=t._event,i=e.exec||fe(e.type,n),s=Q(i)?i:i?i.exec:e.exec;if(s)try{return s(r,a.data,{action:e,state:this.state,_event:a})}catch(C){throw this.parent&&this.parent.send({type:"xstate.error",data:C}),C}switch(e.type){case g:var l=e;if("number"==typeof l.delay)return void this.defer(l);l.to?this.sendTo(l._event,l.to):this.send(l._event);break;case m:this.cancel(e.sendId);break;case h:if(this.status!==mt.Running)return;var u=e.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===o.Invoke){var c=le(u.src),d=this.machine.options.services?this.machine.options.services[c.type]:void 0,f=u.id,v=u.data;0;var y="autoForward"in u?u.autoForward:!!u.forward;if(!d)return void 0;var b=v?Y(v,r,a):void 0;if("string"==typeof d)return;var w=Q(d)?d(r,a.data,{data:b,src:c,meta:u.meta}):d;if(!w)return;var x=void 0;ne(w)&&(w=b?w.withContext(b):w,x={autoForward:y}),this.spawn(w,f,x)}else this.spawnActivity(u);break;case p:this.stopChild(e.activity.id);break;case E:var _=e.label,k=e.value;_?this.logger(_,k):this.logger(k)}},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),Q(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(U(e))return this.spawnPromise(Promise.resolve(e),t);if(Q(e))return this.spawnCallback(e,t);if(function(e){try{return"function"==typeof e.send}catch(t){return!1}}(a=e)&&"id"in a)return this.spawnActor(e,t);if(function(e){try{return"subscribe"in e&&Q(e.subscribe)}catch(t){return!1}}(e))return this.spawnObservable(e,t);if(ne(e))return this.spawnMachine(e,s(s({},n),{id:t}));if(null!==(r=e)&&"object"==typeof r&&"transition"in r&&"function"==typeof r.transition)return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'));var r,a},e.prototype.spawnMachine=function(t,n){var r=this;void 0===n&&(n={});var a=new e(t,s(s({},this.options),{parent:this,id:n.id||t.id})),o=s(s({},yt),n);o.sync&&a.onTransition((function(e){r.send(P,{state:e,id:a.id})}));var i=a;return this.children.set(a.id,i),o.autoForward&&this.forwardTo.add(a.id),a.onDone((function(e){r.removeChild(a.id),r.send(oe(e,{origin:a.id}))})).start(),i},e.prototype.spawnBehavior=function(e,t){var n=gt(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,a=this,o=!1;e.then((function(e){o||(r=e,a.removeChild(t),a.send(oe(Ae(t,e),{origin:t})))}),(function(e){if(!o){a.removeChild(t);var n=Be(t,e);try{a.send(oe(n,{origin:t}))}catch(r){a.devTools&&a.devTools.send(n,a.state),a.machine.strict&&a.stop()}}}));var i=((n={id:t,send:function(){},subscribe:function(t,n,r){var a=ue(t,n,r),o=!1;return e.then((function(e){o||(a.next(e),o||a.complete())}),(function(e){o||a.error(e)})),{unsubscribe:function(){return o=!0}}},stop:function(){o=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[te]=function(){return this},n);return this.children.set(t,i),i},e.prototype.spawnCallback=function(e,t){var n,r,a,o=this,i=!1,s=new Set,l=new Set;try{a=e((function(e){r=e,l.forEach((function(t){return t(e)})),i||o.send(oe(e,{origin:t}))}),(function(e){s.add(e)}))}catch(c){this.send(Be(t,c))}if(U(a))return this.spawnPromise(a,t);var u=((n={id:t,send:function(e){return s.forEach((function(t){return t(e)}))},subscribe:function(e){var t=ue(e);return l.add(t.next),{unsubscribe:function(){l.delete(t.next)}}},stop:function(){i=!0,Q(a)&&a()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[te]=function(){return this},n);return this.children.set(t,u),u},e.prototype.spawnObservable=function(e,t){var n,r,a=this,o=e.subscribe((function(e){r=e,a.send(oe(e,{origin:t}))}),(function(e){a.removeChild(t),a.send(oe(Be(t,e),{origin:t}))}),(function(){a.removeChild(t),a.send(oe(Ae(t),{origin:t}))})),i=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return o.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[te]=function(){return this},n);return this.children.set(t,i),i},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[te]=function(){return this},n))},e.prototype.attachDev=function(){var e=pt();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(s(s({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:s({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}vt(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[te]=function(){return this},e.prototype.getSnapshot=function(){return this.status===mt.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=xt,e}();function wt(e,t){var n=function(e){return J(e)?s(s({},yt),{name:e}):s(s(s({},yt),{name:re()}),e)}(t);return function(t){return t?t.spawn(e,n.name,n):Ye(e,n.name)}(He[He.length-1])}function xt(e,t){return new bt(e,t)}function Et(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function _t(e){return s(s({type:k},e),{toJSON:function(){e.onDone,e.onError;var t=l(e,["onDone","onError"]);return s(s({},t),{type:k,src:Et(e.src)})}})}var kt="",Ct="*",St={},Rt=function(e){return"#"===e[0]},Pt=function(){function e(t,n,r,a){var o,i=this;void 0===r&&(r="context"in t?t.context:void 0),this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==a?void 0:a.parent,this.key=this.config.key||(null==a?void 0:a.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||d([this.machine.key],c(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(o=this.config.schema)&&void 0!==o?o:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?I(this.config.states,(function(t,n){var r,a=new e(t,{},void 0,{parent:i,key:n});return Object.assign(i.idMap,s(((r={})[a.id]=a,r),a.idMap)),a})):St;var l=0;!function e(t){var n,r;t.order=l++;try{for(var a=u($e(t)),o=a.next();!o.done;o=a.next()){e(o.value)}}catch(i){n={error:i}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===kt})):kt in this.config.on),this.strict=!!this.config.strict,this.onEntry=q(this.config.entry||this.config.onEntry).map((function(e){return he(e)})),this.onExit=q(this.config.exit||this.config.onExit).map((function(e){return he(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=q(this.config.invoke).map((function(e,t){var n,r;if(ne(e)){var a=ce(i.id,t);return i.machine.options.services=s(((n={})[a]=e,n),i.machine.options.services),_t({src:a,id:a})}if(J(e.src)){a=e.id||ce(i.id,t);return _t(s(s({},e),{id:a,src:e.src}))}if(ne(e.src)||Q(e.src)){a=e.id||ce(i.id,t);return i.machine.options.services=s(((r={})[a]=e.src,r),i.machine.options.services),_t(s(s({id:a},e),{src:a}))}var o=e.src;return _t(s(s({id:ce(i.id,t)},e),{src:o}))})),this.activities=q(this.config.activities).concat(this.invoke).map((function(e){return ve(e)})),this.transition=this.transition.bind(this),this.tags=q(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||Xe(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var r=this.options,a=r.actions,o=r.activities,i=r.guards,l=r.services,u=r.delays;return new e(this.config,{actions:s(s({},a),t.actions),activities:s(s({},o),t.activities),guards:s(s({},i),t.guards),services:s(s({},l),t.services),delays:s(s({},u),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return Q(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:I(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===kt,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===Ct}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=Te(Q(t)?"".concat(e.id,":delay[").concat(n,"]"):t,e.id);return e.onEntry.push(ye(r,{delay:t})),e.onExit.push(Re(r)),r};return(Z(t)?t.map((function(e,t){var r=n(e.delay,t);return s(s({},e),{event:r})})):H(Object.keys(t).map((function(e,r){var a=t[e],o=J(a)?{target:a}:a,i=isNaN(+e)?e:+e,l=n(i,r);return q(o).map((function(e){return s(s({},e),{event:l,delay:i})}))})))).map((function(t){var n=t.delay;return s(s({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var r=e instanceof ot?e.value:B(e,this.delimiter);if(J(r)){var a=this.getStateNode(r).initial;return void 0!==a?this.getStateNodes(((t={})[r]=a,t)):[this,this.states[r]]}var o=Object.keys(r),i=[this];return i.push.apply(i,d([],c(H(o.map((function(e){return n.getStateNode(e).getStateNodes(r[e])})))),!1)),i},e.prototype.handles=function(e){var t=D(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof ot?e:ot.create(e),n=Array.from(Ke([],this.getStateNodes(t.value)));return new ot(s(s({},t),{value:this.resolve(t.value),configuration:n,done:tt(n,this),tags:nt(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),a=this.getStateNode(r[0])._transition(e[r[0]],t,n);return a&&a.transitions.length?a:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var r,a,o={};try{for(var i=u(Object.keys(e)),s=i.next();!s.done;s=i.next()){var l=s.value,c=e[l];if(c){var d=this.getStateNode(l)._transition(c,t,n);d&&(o[l]=d)}}}catch(g){r={error:g}}finally{try{s&&!s.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}var f=Object.keys(o).map((function(e){return o[e]})),h=H(f.map((function(e){return e.transitions})));if(!f.some((function(e){return e.transitions.length>0})))return this.next(t,n);var p=H(f.map((function(e){return e.entrySet}))),v=H(Object.keys(o).map((function(e){return o[e].configuration})));return{transitions:h,entrySet:p,exitSet:H(f.map((function(e){return e.exitSet}))),configuration:v,source:t,actions:H(Object.keys(o).map((function(e){return o[e].actions})))}},e.prototype._transition=function(e,t,n){return J(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,oe(t))},e.prototype.next=function(e,t){var n,r,a,o=this,i=t.name,s=[],l=[];try{for(var f=u(this.getCandidates(i)),h=f.next();!h.done;h=f.next()){var p=h.value,v=p.cond,g=p.in,m=e.context,y=!g||(J(g)&&Rt(g)?e.matches(B(this.getStateNodeById(g).path,this.delimiter)):T(B(g,this.delimiter),V(this.path.slice(0,-2))(e.value))),b=!1;try{b=!v||se(this.machine,v,m,t,e)}catch(E){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(i,"' in state node '").concat(this.id,"':\n").concat(E.message))}if(b&&y){void 0!==p.target&&(l=p.target),s.push.apply(s,d([],c(p.actions),!1)),a=p;break}}}catch(_){n={error:_}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}if(a){if(!l.length)return{transitions:[a],entrySet:[],exitSet:[],configuration:e.value?[this]:[],source:e,actions:s};var w=H(l.map((function(t){return o.getRelativeStateNodes(t,e.historyValue)}))),x=!!a.internal;return{transitions:[a],entrySet:x?[]:H(w.map((function(e){return o.nodesFromChild(e)}))),exitSet:x?[]:[this],configuration:w,source:e,actions:s}}},e.prototype.nodesFromChild=function(e){if(e.escapes(this))return[];for(var t=[],n=e;n&&n!==this;)t.push(n),n=n.parent;return t.push(this),t},e.prototype.escapes=function(e){if(this===e)return!1;for(var t=this.parent;t;){if(t===e)return!1;t=t.parent}return!0},e.prototype.getActions=function(e,t,n,r){var a,o,i,s,l=Ke([],r?this.getStateNodes(r.value):[this]),f=e.configuration.length?Ke(l,e.configuration):l;try{for(var h=u(f),p=h.next();!p.done;p=h.next()){et(l,m=p.value)||e.entrySet.push(m)}}catch(k){a={error:k}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(a)throw a.error}}try{for(var v=u(l),g=v.next();!g.done;g=v.next()){var m;et(f,m=g.value)&&!et(e.exitSet,m.parent)||e.exitSet.push(m)}}catch(C){i={error:C}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}var y=H(e.entrySet.map((function(r){var a=[];if("final"!==r.type)return a;var o=r.parent;if(!o.parent)return a;a.push(De(r.id,r.doneData),De(o.id,r.doneData?Y(r.doneData,t,n):void 0));var i=o.parent;return"parallel"===i.type&&$e(i).every((function(t){return tt(e.configuration,t)}))&&a.push(De(i.id)),a})));e.exitSet.sort((function(e,t){return t.order-e.order})),e.entrySet.sort((function(e,t){return e.order-t.order}));var b=new Set(e.entrySet),w=new Set(e.exitSet),x=c([H(Array.from(b).map((function(e){return d(d([],c(e.activities.map((function(e){return Pe(e)}))),!1),c(e.onEntry),!1)}))).concat(y.map(ge)),H(Array.from(w).map((function(e){return d(d([],c(e.onExit),!1),c(e.activities.map((function(e){return Oe(e)}))),!1)})))],2),E=x[0],_=x[1];return pe(_.concat(e.actions).concat(E),this.machine.options.actions)},e.prototype.transition=function(e,t,n){void 0===e&&(e=this.initialState);var r,a,o=oe(t);if(e instanceof ot)r=void 0===n?e:this.resolveState(ot.from(e,n));else{var i=J(e)?this.resolve(N(this.getResolvedPath(e))):this.resolve(e),s=null!=n?n:this.machine.context;r=this.resolveState(ot.from(i,s))}if(this.strict&&!this.events.includes(o.name)&&(a=o.name,!/^(done|error)\./.test(a)))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var l=this._transition(r.value,r,o)||{transitions:[],configuration:[],entrySet:[],exitSet:[],source:r,actions:[]},u=Ke([],this.getStateNodes(r.value)),f=l.configuration.length?Ke(u,l.configuration):u;return l.configuration=d([],c(f),!1),this.resolveTransition(l,r,r.context,o)},e.prototype.resolveRaisedTransition=function(e,t,n){var r,a=e.actions;return(e=this.transition(e,t))._event=n,e.event=n.data,(r=e.actions).unshift.apply(r,d([],c(a),!1)),e},e.prototype.resolveTransition=function(e,t,n,r){var a,o,l=this;void 0===r&&(r=de);var d=e.configuration,f=!t||e.transitions.length>0,m=f?Je(this.machine,d):void 0,b=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,w=this.getActions(e,n,r,t),x=t?s({},t.activities):{};try{for(var E=u(w),_=E.next();!_.done;_=E.next()){var C=_.value;C.type===h?x[C.activity.id||C.activity.type]=C:C.type===p&&(x[C.activity.id||C.activity.type]=!1)}}catch(X){a={error:X}}finally{try{_&&!_.done&&(o=E.return)&&o.call(E)}finally{if(a)throw a.error}}var S,R,O=c(Fe(this,t,n,r,w,this.machine.config.preserveActionOrder),2),M=O[0],j=O[1],z=c(W(M,(function(e){return e.type===v||e.type===g&&e.to===i.Internal})),2),T=z[0],D=z[1],A=M.filter((function(e){var t;return e.type===h&&(null===(t=e.activity)||void 0===t?void 0:t.type)===k})),B=A.reduce((function(e,t){return e[t.activity.id]=function(e,t,n,r){var a,o=le(e.src),i=null===(a=null==t?void 0:t.options.services)||void 0===a?void 0:a[o.type],s=e.data?Y(e.data,n,r):void 0,l=i?Ye(i,e.id,s):qe(e.id);return l.meta=e,l}(t.activity,l.machine,j,r),e}),t?s({},t.children):{}),N=f?e.configuration:t?t.configuration:[],I=tt(N,this),L=new ot({value:m||t.value,context:j,_event:r,_sessionid:t?t._sessionid:null,historyValue:m?b?(S=b,R=m,{current:R,states:$(S,R)}):void 0:t?t.historyValue:void 0,history:!m||e.source?t:void 0,actions:m?D:[],activities:m?x:t?t.activities:{},events:[],configuration:N,transitions:e.transitions,children:B,done:I,tags:null==t?void 0:t.tags,machine:this}),V=n!==j;L.changed=r.name===P||V;var F=L.history;F&&delete F.history;var H=!I&&(this._transient||d.some((function(e){return e._transient})));if(!(f||H&&r.name!==kt))return L;var G=L;if(!I)for(H&&(G=this.resolveRaisedTransition(G,{type:y},r));T.length;){var q=T.shift();G=this.resolveRaisedTransition(G,q._event,r)}var U=G.changed||(F?!!G.actions.length||V||typeof F.value!=typeof G.value||!rt(G.value,F.value):void 0);return G.changed=U,G.history=F,G.tags=nt(G.configuration),G},e.prototype.getStateNode=function(e){if(Rt(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=Rt(e)?e.slice("#".length):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&Rt(e))try{return this.getStateNodeById(e.slice(1))}catch(a){}for(var t=A(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||St;switch(this.type){case"parallel":return I(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):St}));case"compound":if(J(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?I(e,(function(e,t){return e?n.getStateNode(t).resolve(e):St})):this.initialStateValue||{};default:return e||St}},e.prototype.getResolvedPath=function(e){if(Rt(e)){var t=this.machine.idMap[e.slice("#".length)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return A(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=L(this.states,(function(e){return e.initialStateValue||St}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=We(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,entrySet:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=J(t.target)&&Rt(t.target)?N(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;return We(this)?[this]:"compound"!==this.type||this.initial?H(F(this.initialStateValue).map((function(t){return e.getFromRelativePath(t)}))):[this]},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=c(e),n=t[0],r=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var a=this.getStateNode(n);if("history"===a.type)return a.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(r)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:L(this.states,(function(t,n){if(!e)return t.historyValue();var r=J(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?H(F(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var a,o,i=(a=n.path,o="states",function(e){var t,n,r=e;try{for(var i=u(a),s=i.next();!s.done;s=i.next()){var l=s.value;r=r[o][l]}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r})(e).current;return J(i)?[n.getStateNode(i)]:H(F(i).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=H(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,r;if(this.__cache.events)return this.__cache.events;var a=this.states,o=new Set(this.ownEvents);if(a)try{for(var i=u(Object.keys(a)),s=i.next();!s.done;s=i.next()){var l=a[s.value];if(l.states)try{for(var c=(n=void 0,u(l.events)),d=c.next();!d.done;d=c.next()){var f=d.value;o.add("".concat(f))}}catch(h){n={error:h}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}}catch(p){e={error:p}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!J(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(a){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(a.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=function(e){if(void 0!==e&&""!==e)return q(e)}(e.target),r="internal"in e?e.internal:!n||n.some((function(e){return J(e)&&e[0]===t.delimiter})),a=this.machine.options.guards,o=this.resolveTarget(n),i=s(s({},e),{actions:pe(q(e.actions)),cond:ee(e.cond,a),target:o,source:this,internal:r,eventType:e.event,toJSON:function(){return s(s({},i),{target:i.target?i.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return i},e.prototype.formatTransitions=function(){var e,t,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var a=this.config.on,o=Ct,i=a[o],s=void 0===i?[]:i,f=l(a,["*"]);n=H(Object.keys(f).map((function(e){var t=ie(e,f[e]);return t})).concat(ie(Ct,s)))}else n=[];var h=this.config.always?ie("",this.config.always):[],p=this.config.onDone?ie(String(De(this.id)),this.config.onDone):[];var v=H(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,d([],c(ie(String(Ae(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,d([],c(ie(String(Be(e.id)),e.onError)),!1)),t}))),g=this.after,m=H(d(d(d(d([],c(p),!1),c(v),!1),c(n),!1),c(h),!1).map((function(e){return q(e).map((function(e){return r.formatTransition(e)}))})));try{for(var y=u(g),b=y.next();!b.done;b=y.next()){var w=b.value;m.push(w)}}catch(x){e={error:x}}finally{try{b&&!b.done&&(t=y.return)&&t.call(y)}finally{if(e)throw e.error}}return m},e}();function Ot(e,t,n){return void 0===n&&(n=e.context),new Pt(e,t,n)}function Mt(e,t){return new Pt(e,t)}function jt(e,t){var n,r,a;try{for(var o=u(Object.keys(e)),i=o.next();!i.done;i=o.next()){var s=i.value;T(s,t)&&(!a||t.length>a.length)&&(a=s)}}catch(l){n={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e[a]}function zt(e,t,n){var r,a,o=ot.from(e,e instanceof ot?e.context:void 0);try{for(var i=u(t),s=i.next();!s.done;s=i.next()){var l=c(s.value,2),d=l[0],f=l[1];if(o.matches(d))return f(o)}}catch(h){r={error:h}}finally{try{s&&!s.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return n(o)}function Tt(e){return e}var Dt=Tt,At=je,Bt=ye,Nt=we,It=Ee,Lt=Ie,Vt=Ae},10557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(57649),a=n(60035),o=n(84743);function i(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[a.symbolObservable]=function(){return this},t}function s(e,t,n){var r=i(t);if(r.deferred=!0,a.isMachine(e)){var s=r.state=o.provide(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return s}}return r}function l(e){try{return"function"==typeof e.send}catch(t){return!1}}t.createDeferredActor=s,t.createInvocableActor=function(e,t,n,r){var o,l=a.toInvokeSource(e.src),u=null===(o=null==t?void 0:t.options.services)||void 0===o?void 0:o[l.type],c=e.data?a.mapContext(e.data,n,r):void 0,d=u?s(u,e.id,c):i(e.id);return d.meta=e,d},t.createNullActor=i,t.isActor=l,t.isSpawnedActor=function(e){return l(e)&&"id"in e},t.toActorRef=function(e){var t;return r.__assign(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[a.symbolObservable]=function(){return this},t),e)}},57649:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__assign=function(){return t.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.__assign.apply(this,arguments)},t.__read=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i},t.__rest=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},t.__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var r,a=0,o=t.length;a<o;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))},t.__values=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}},83521:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(94309),a=r.ActionTypes.Start,o=r.ActionTypes.Stop,i=r.ActionTypes.Raise,s=r.ActionTypes.Send,l=r.ActionTypes.Cancel,u=r.ActionTypes.NullEvent,c=r.ActionTypes.Assign,d=r.ActionTypes.After,f=r.ActionTypes.DoneState,h=r.ActionTypes.Log,p=r.ActionTypes.Init,v=r.ActionTypes.Invoke,g=r.ActionTypes.ErrorExecution,m=r.ActionTypes.ErrorPlatform,y=r.ActionTypes.ErrorCustom,b=r.ActionTypes.Update,w=r.ActionTypes.Choose,x=r.ActionTypes.Pure;t.after=d,t.assign=c,t.cancel=l,t.choose=w,t.doneState=f,t.error=y,t.errorExecution=g,t.errorPlatform=m,t.init=p,t.invoke=v,t.log=h,t.nullEvent=u,t.pure=x,t.raise=i,t.send=s,t.start=a,t.stop=o,t.update=b},25612:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(57649),a=n(94309),o=n(83521),i=n(60035),s=n(78664),l=i.toSCXMLEvent({type:o.init});function u(e,t){return t&&t[e]||void 0}function c(e,t){var n;if(i.isString(e)||"number"==typeof e){var a=u(e,t);n=i.isFunction(a)?{type:e,exec:a}:a||{type:e,exec:void 0}}else if(i.isFunction(e))n={type:e.name||e.toString(),exec:e};else{a=u(e.type,t);if(i.isFunction(a))n=r.__assign(r.__assign({},e),{exec:a});else if(a){var o=a.type||e.type;n=r.__assign(r.__assign(r.__assign({},a),e),{type:o})}else n=e}return n}var d=function(e,t){return e?(i.isArray(e)?e:[e]).map((function(e){return c(e,t)})):[]};function f(e){var t=c(e);return r.__assign(r.__assign({id:i.isString(e)?e:t.id},t),{type:t.type})}function h(e){return{type:o.raise,_event:i.toSCXMLEvent(e.event)}}function p(e,t){return{to:t?t.to:void 0,type:o.send,event:i.isFunction(e)?e:i.toEventObject(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:i.isFunction(e)?e.name:i.getEventType(e)}}function v(e,t,n,a){var o,s={_event:n},l=i.toSCXMLEvent(i.isFunction(e.event)?e.event(t,n.data,s):e.event);if(i.isString(e.delay)){var u=a&&a[e.delay];o=i.isFunction(u)?u(t,n.data,s):u}else o=i.isFunction(e.delay)?e.delay(t,n.data,s):e.delay;var c=i.isFunction(e.to)?e.to(t,n.data,s):e.to;return r.__assign(r.__assign({},e),{to:c,_event:l,event:l.data,delay:o})}function g(e,t){return p(e,r.__assign(r.__assign({},t),{to:a.SpecialTargets.Parent}))}var m=function(e,t){return{context:e,event:t}};var y=function(e,t,n){return r.__assign(r.__assign({},e),{value:i.isString(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})};function b(e,t,n){var r=i.isFunction(e.activity)?e.activity(t,n.data):e.activity,o="string"==typeof r?{id:r}:r;return{type:a.ActionTypes.Stop,activity:o}}t.actionTypes=o,t.after=function(e,t){var n=t?"#".concat(t):"";return"".concat(a.ActionTypes.After,"(").concat(e,")").concat(n)},t.assign=function(e){return{type:o.assign,assignment:e}},t.cancel=function(e){return{type:o.cancel,sendId:e}},t.choose=function(e){return{type:a.ActionTypes.Choose,conds:e}},t.done=function(e,t){var n="".concat(a.ActionTypes.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r},t.doneInvoke=function(e,t){var n="".concat(a.ActionTypes.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r},t.error=function(e,t){var n="".concat(a.ActionTypes.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r},t.escalate=function(e,t){return g((function(t,n,r){return{type:o.error,data:i.isFunction(e)?e(t,n,r):e}}),r.__assign(r.__assign({},t),{to:a.SpecialTargets.Parent}))},t.forwardTo=function(e,t){return p((function(e,t){return t}),r.__assign(r.__assign({},t),{to:e}))},t.getActionFunction=u,t.initEvent=l,t.isActionObject=function(e){return"object"==typeof e&&"type"in e},t.log=function(e,t){return void 0===e&&(e=m),{type:o.log,label:t,expr:e}},t.pure=function(e){return{type:a.ActionTypes.Pure,get:e}},t.raise=function(e){return i.isString(e)?{type:o.raise,event:e}:p(e,{to:a.SpecialTargets.Internal})},t.resolveActions=function e(t,n,a,l,u,f){void 0===f&&(f=!1);var p=r.__read(f?[[],u]:i.partition(u,(function(e){return e.type===o.assign})),2),g=p[0],m=p[1],w=g.length?i.updateContext(a,l,g,n):a,x=f?[a]:void 0,E=i.flatten(m.map((function(a){var u;switch(a.type){case o.raise:return h(a);case o.send:var p=v(a,w,l,t.options.delays);return s.IS_PRODUCTION||i.warn(!i.isString(a.delay)||"number"==typeof p.delay,"No delay reference for delay expression '".concat(a.delay,"' was found on machine '").concat(t.id,"'")),p;case o.log:return y(a,w,l);case o.choose:if(!(_=null===(u=a.conds.find((function(e){var r=i.toGuard(e.cond,t.options.guards);return!r||i.evaluateGuard(t,r,w,l,n)})))||void 0===u?void 0:u.actions))return[];var g=r.__read(e(t,n,w,l,d(i.toArray(_),t.options.actions),f),2),m=g[0],E=g[1];return w=E,null==x||x.push(w),m;case o.pure:var _;if(!(_=a.get(w,l.data)))return[];var k=r.__read(e(t,n,w,l,d(i.toArray(_),t.options.actions),f),2),C=k[0],S=k[1];return w=S,null==x||x.push(w),C;case o.stop:return b(a,w,l);case o.assign:w=i.updateContext(w,l,[a],n),null==x||x.push(w);break;default:var R=c(a,t.options.actions),P=R.exec;if(P&&x){var O=x.length-1;R=r.__assign(r.__assign({},R),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];P.apply(void 0,r.__spreadArray([x[O]],r.__read(t),!1))}})}return R}})).filter((function(e){return!!e})));return[E,w]},t.resolveLog=y,t.resolveRaise=h,t.resolveSend=v,t.resolveStop=b,t.respond=function(e,t){return p(e,r.__assign(r.__assign({},t),{to:function(e,t,n){return n._event.origin}}))},t.send=p,t.sendParent=g,t.sendTo=function(e,t,n){return p(t,r.__assign(r.__assign({},n),{to:e}))},t.sendUpdate=function(){return g(o.update)},t.start=function(e){var t=f(e);return{type:a.ActionTypes.Start,activity:t,exec:void 0}},t.stop=function(e){var t=i.isFunction(e)?e:f(e);return{type:a.ActionTypes.Stop,activity:t,exec:void 0}},t.toActionObject=c,t.toActionObjects=d,t.toActivityDefinition=f},26067:(e,t,n)=>{"use strict";var r=n(25612),a=n(10557),o=n(60035)},3442:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.DEFAULT_GUARD_TYPE="xstate.guard",t.EMPTY_ACTIVITY_MAP={},t.STATE_DELIMITER=".",t.TARGETLESS_KEY=""},78664:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.IS_PRODUCTION=!0},84743:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=[];t.consume=function(e){return e(n[n.length-1])},t.provide=function(e,t){n.push(e);var r=t(e);return n.pop(),r}},94309:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=void 0,(n=t.ActionTypes||(t.ActionTypes={})).Start="xstate.start",n.Stop="xstate.stop",n.Raise="xstate.raise",n.Send="xstate.send",n.Cancel="xstate.cancel",n.NullEvent="",n.Assign="xstate.assign",n.After="xstate.after",n.DoneState="done.state",n.DoneInvoke="done.invoke",n.Log="xstate.log",n.Init="xstate.init",n.Invoke="xstate.invoke",n.ErrorExecution="error.execution",n.ErrorCommunication="error.communication",n.ErrorPlatform="error.platform",n.ErrorCustom="xstate.error",n.Update="xstate.update",n.Pure="xstate.pure",n.Choose="xstate.choose",t.SpecialTargets=void 0,(r=t.SpecialTargets||(t.SpecialTargets={})).Parent="#_parent",r.Internal="#_internal"},60035:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(57649),o=n(3442),i=n(78664);function s(e,t){try{return g(e)?e:e.toString().split(t)}catch(n){throw new Error("'".concat(e,"' is not a valid state path."))}}function l(e){return"object"==typeof e&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function u(e,t){return l(e)?e.value:g(e)?c(e):"string"!=typeof e?e:c(s(e,t))}function c(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function d(e,t){for(var n={},r=Object.keys(e),a=0;a<r.length;a++){var o=r[a];n[o]=t(e[o],o,e,a)}return n}function f(e){var t;return(t=[]).concat.apply(t,a.__spreadArray([],a.__read(e),!1))}function h(e){return g(e)?e:[e]}function p(e){return void 0===e?[]:h(e)}function v(e,t){return d(e.states,(function(e,n){if(e){var r=(y(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:v(e,r)}}}))}function g(e){return Array.isArray(e)}function m(e){return"function"==typeof e}function y(e){return"string"==typeof e}t.warn=function(){},i.IS_PRODUCTION||(t.warn=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var b=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}(),w=((r={})[b]=function(){return this},r[Symbol.observable]=function(){return this},r);function x(e){return!!e&&"__xstatenode"in e}var E=function(){var e=0;return function(){return(++e).toString(16)}}();function _(e,t){return y(e)||"number"==typeof e?a.__assign({type:e},t):e}t.createInvokeId=function(e,t){return"".concat(e,":invocation[").concat(t,"]")},t.evaluateGuard=function(e,t,n,r,a){var i=e.options.guards,s={state:a,cond:t,_event:r};if(t.type===o.DEFAULT_GUARD_TYPE)return((null==i?void 0:i[t.name])||t.predicate)(n,r.data,s);var l=null==i?void 0:i[t.type];if(!l)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return l(n,r.data,s)},t.flatten=f,t.getActionType=function(e){try{return y(e)||"number"==typeof e?"".concat(e):m(e)?e.name:e.type}catch(t){throw new Error("Actions must be strings or objects with a string action.type property.")}},t.getEventType=function(e){try{return y(e)||"number"==typeof e?"".concat(e):e.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}},t.interopSymbols=w,t.isActor=function(e){return!!e&&"function"==typeof e.send},t.isArray=g,t.isBehavior=function(e){return null!==e&&"object"==typeof e&&"transition"in e&&"function"==typeof e.transition},t.isBuiltInEvent=function(e){return/^(done|error)\./.test(e)},t.isFunction=m,t.isMachine=x,t.isObservable=function(e){try{return"subscribe"in e&&m(e.subscribe)}catch(t){return!1}},t.isPromiseLike=function(e){return e instanceof Promise||!(null===e||!m(e)&&"object"!=typeof e||!m(e.then))},t.isStateLike=l,t.isString=y,t.keys=function(e){return Object.keys(e)},t.mapContext=function(e,t,n){var r,o;if(m(e))return e(t,n.data);var i={};try{for(var s=a.__values(Object.keys(e)),l=s.next();!l.done;l=s.next()){var u=l.value,c=e[u];m(c)?i[u]=c(t,n.data):i[u]=c}}catch(d){r={error:d}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.mapFilterValues=function(e,t,n){var r,o,i={};try{for(var s=a.__values(Object.keys(e)),l=s.next();!l.done;l=s.next()){var u=l.value,c=e[u];n(c)&&(i[u]=t(c,u,e))}}catch(d){r={error:d}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.mapValues=d,t.matchesState=function e(t,n,r){void 0===r&&(r=o.STATE_DELIMITER);var a=u(t,r),i=u(n,r);return y(i)?!!y(a)&&i===a:y(a)?a in i:Object.keys(a).every((function(t){return t in i&&e(a[t],i[t])}))},t.nestedPath=function(e,t){return function(n){var r,o,i=n;try{for(var s=a.__values(e),l=s.next();!l.done;l=s.next()){var u=l.value;i=i[t][u]}}catch(c){r={error:c}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i}},t.normalizeTarget=function(e){if(void 0!==e&&e!==o.TARGETLESS_KEY)return p(e)},t.partition=function(e,t){var n,r,o=a.__read([[],[]],2),i=o[0],s=o[1];try{for(var l=a.__values(e),u=l.next();!u.done;u=l.next()){var c=u.value;t(c)?i.push(c):s.push(c)}}catch(d){n={error:d}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[i,s]},t.path=function(e){return function(t){var n,r,o=t;try{for(var i=a.__values(e),s=i.next();!s.done;s=i.next()){o=o[s.value]}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}},t.pathToStateValue=c,t.pathsToStateValue=function(e){var t,n,r={};if(e&&1===e.length&&1===e[0].length)return e[0][0];try{for(var o=a.__values(e),i=o.next();!i.done;i=o.next())for(var s=i.value,l=r,u=0;u<s.length;u++){var c=s[u];if(u===s.length-2){l[c]=s[u+1];break}l[c]=l[c]||{},l=l[c]}}catch(d){t={error:d}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},t.reportUnhandledExceptionOnInvocation=function(e,t,n){if(!i.IS_PRODUCTION){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var a=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(a))}}},t.symbolObservable=b,t.toArray=p,t.toArrayStrict=h,t.toEventObject=_,t.toGuard=function(e,t){if(e)return y(e)?{type:o.DEFAULT_GUARD_TYPE,name:e,predicate:t?t[e]:void 0}:m(e)?{type:o.DEFAULT_GUARD_TYPE,name:e.name,predicate:e}:e},t.toInvokeSource=function(e){return"string"==typeof e?{type:e}:e},t.toObserver=function(e,t,n){if("object"==typeof e)return e;var r=function(){};return{next:e,error:t||r,complete:n||r}},t.toSCXMLEvent=function(e,t){if(!y(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=_(e);return a.__assign({name:n.type,data:n,$$type:"scxml",type:"external"},t)},t.toStatePath=s,t.toStatePaths=function e(t){return t?y(t)?[[t]]:f(Object.keys(t).map((function(n){var r=t[n];return"string"==typeof r||r&&Object.keys(r).length?e(t[n]).map((function(e){return[n].concat(e)})):[[n]]}))):[[]]},t.toStateValue=u,t.toTransitionConfigArray=function(e,t){return h(t).map((function(t){return void 0===t||"string"==typeof t||x(t)?{target:t,event:e}:a.__assign(a.__assign({},t),{event:e})}))},t.uniqueId=E,t.updateContext=function(e,n,r,o){i.IS_PRODUCTION||t.warn(!!e,"Attempting to update undefined context");var s=e?r.reduce((function(e,t){var r,i,s=t.assignment,l={state:o,action:t,_event:n},u={};if(m(s))u=s(e,n.data,l);else try{for(var c=a.__values(Object.keys(s)),d=c.next();!d.done;d=c.next()){var f=d.value,h=s[f];u[f]=m(h)?h(e,n.data,l):h}}catch(p){r={error:p}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return Object.assign({},e,u)}),e):e;return s},t.updateHistoryStates=v,t.updateHistoryValue=function(e,t){return{current:t,states:v(e,t)}}}},e=>{var t;t=71251,e(e.s=t)}]);
|